diff --git a/.gitignore b/.gitignore
index 44a78773d..390596a0c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -44,6 +44,7 @@ always-ignore extensions
 *.rej
 *.vi
 *.sass-cache
+.zedstate
 
 # OS or Editor folders
 .cache
@@ -86,4 +87,6 @@ login.coffee
 # debugging
 *.heapsnapshot
 
+temp/
 ### If you add something here, copy it to the end of .npmignore, too. ###
+
diff --git a/.npmignore b/.npmignore
index 5d0542980..00ef9a5c8 100644
--- a/.npmignore
+++ b/.npmignore
@@ -68,6 +68,7 @@ always-ignore extensions
 *.rej
 *.vi
 *.sass-cache
+.zedstate
 
 # OS or Editor folders
 .cache
@@ -95,6 +96,8 @@ bin/mongo/
 # Karma coverage
 coverage/
 
+temp/
+
 # local settings
 login.coffee
 
diff --git a/.travis.yml b/.travis.yml
index 705bb9070..0e998a59e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,6 +2,12 @@ language: node_js
 node_js:
   - 0.10
 
+before_install:
+  - "sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10"
+  - "echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list"
+  - "sudo apt-get update"
+  - "sudo apt-get install mongodb-org-server"
+  
 before_script:
   - "npm install"
   - export DISPLAY=:99.0
@@ -9,7 +15,11 @@ before_script:
   - "./node_modules/.bin/bower install"
   - "gem install sass"
   - "./node_modules/.bin/brunch b"
+  - "mkdir mongo"
+  - "mongod --dbpath=./mongo --fork --logpath ./mongodb.log"
+  - "node index.js --unittest &"
+  - "sleep 10" # to give node a chance to start
 
 script:
-  - "./node_modules/.bin/karma start --browsers Firefox --single-run"
-
+  - "./node_modules/jasmine-node/bin/jasmine-node test/server/ --coffee --captureExceptions"
+  - "./node_modules/karma/bin/karma start --browsers Firefox --single-run"
diff --git a/README.md b/README.md
index e26e5b2f2..a73240e67 100644
--- a/README.md
+++ b/README.md
@@ -52,6 +52,4 @@ Whether you're novice or pro, the CodeCombat team is ready to help you implement
 
 ----------
 
-[![](https://dl.dropboxusercontent.com/u/138899/GitHub%20Wikis/challengepost.png)](http://codecombat.challengepost.com/?utm_source=github&utm_medium=oswidget&utm_campaign=codecombat)
-
 [![](http://1-ps.googleusercontent.com/x/s.google-melange.appspot.com/www.google-melange.com/soc/content/2-1-20140225/images/gsoc/logo/920x156xbanner-gsoc2014.png.pagespeed.ic.gdr4t3Igca.png)](http://www.google-melange.com/gsoc/homepage/google/gsoc2014)
\ No newline at end of file
diff --git a/achievement_fixtures.js b/achievement_fixtures.js
new file mode 100644
index 000000000..56b6fb42f
--- /dev/null
+++ b/achievement_fixtures.js
@@ -0,0 +1,12 @@
+// Fixtures
+
+db.achievements.insert({
+    query: '{"level.original": "52d97ecd32362bc86e004e87"}',
+    index: true,
+    slug: 'dungeon-arena-started',
+    name: 'Dungeon Arena started',
+    worth: 1,
+    collection: 'level.session',
+    description: 'Started playing Dungeon Arena.',
+    userField: 'creator'
+});
diff --git a/app/application.coffee b/app/application.coffee
index 4252c87c6..8d71a3249 100644
--- a/app/application.coffee
+++ b/app/application.coffee
@@ -5,6 +5,7 @@ locale = require 'locale/locale'
 {me} = require 'lib/auth'
 Tracker = require 'lib/Tracker'
 CocoView = require 'views/kinds/CocoView'
+AchievementNotify = require '../../templates/achievement_notify'
 
 marked.setOptions {gfm: true, sanitize: true, smartLists: true, breaks: false}
 
@@ -26,7 +27,7 @@ elementAcceptsKeystrokes = (el) ->
   type = el.type?.toLowerCase()
   textInputTypes = ['text', 'password', 'file', 'number', 'search', 'url', 'tel', 'email', 'date', 'month', 'week', 'time', 'datetimelocal']
   # not radio, checkbox, range, or color
-  return (tag is 'textarea' or (tag is 'input' and type in textInputTypes) or el.contentEditable in ["", "true"]) and not (el.readOnly or el.disabled)
+  return (tag is 'textarea' or (tag is 'input' and type in textInputTypes) or el.contentEditable in ['', 'true']) and not (el.readOnly or el.disabled)
 
 COMMON_FILES = ['/images/pages/base/modal_background.png', '/images/level/code_palette_background.png', '/images/level/popover_background.png', '/images/level/code_editor_background.png']
 preload = (arrayOfImages) ->
@@ -39,6 +40,7 @@ Application = initialize: ->
   @facebookHandler = new FacebookHandler()
   @gplusHandler = new GPlusHandler()
   $(document).bind 'keydown', preventBackspace
+  $.notify.addStyle 'achievement', html: $(AchievementNotify())
   @linkedinHandler = new LinkedInHandler()
   preload(COMMON_FILES)
   $.i18n.init {
@@ -47,7 +49,7 @@ Application = initialize: ->
     resStore: locale
     #debug: true
     #sendMissing: true
-    #sendMissingTo: "current"
+    #sendMissingTo: 'current'
     #resPostPath: '/languages/add/__lng__/__ns__'
   }, (t) =>
     @router = new Router()
diff --git a/app/assets/images/pages/account/profile/sample_project.png b/app/assets/images/pages/account/profile/sample_project.png
new file mode 100644
index 000000000..feecec3c7
Binary files /dev/null and b/app/assets/images/pages/account/profile/sample_project.png differ
diff --git a/app/assets/images/pages/base/recruitment_logo.png b/app/assets/images/pages/base/recruitment_logo.png
new file mode 100644
index 000000000..6e107540b
Binary files /dev/null and b/app/assets/images/pages/base/recruitment_logo.png differ
diff --git a/app/assets/images/pages/employer/anon_user.png b/app/assets/images/pages/employer/anon_user.png
new file mode 100644
index 000000000..34c2f197b
Binary files /dev/null and b/app/assets/images/pages/employer/anon_user.png differ
diff --git a/app/assets/images/pages/employer/briefcase.png b/app/assets/images/pages/employer/briefcase.png
new file mode 100644
index 000000000..66e605a47
Binary files /dev/null and b/app/assets/images/pages/employer/briefcase.png differ
diff --git a/app/assets/images/pages/employer/education.png b/app/assets/images/pages/employer/education.png
new file mode 100644
index 000000000..6c4d5b63c
Binary files /dev/null and b/app/assets/images/pages/employer/education.png differ
diff --git a/app/assets/images/pages/employer/employer_icon1.png b/app/assets/images/pages/employer/employer_icon1.png
new file mode 100644
index 000000000..1b58ce8dd
Binary files /dev/null and b/app/assets/images/pages/employer/employer_icon1.png differ
diff --git a/app/assets/images/pages/employer/employer_icon2.png b/app/assets/images/pages/employer/employer_icon2.png
new file mode 100644
index 000000000..3ea5b571d
Binary files /dev/null and b/app/assets/images/pages/employer/employer_icon2.png differ
diff --git a/app/assets/images/pages/employer/employer_icon3.png b/app/assets/images/pages/employer/employer_icon3.png
new file mode 100644
index 000000000..d29b0e609
Binary files /dev/null and b/app/assets/images/pages/employer/employer_icon3.png differ
diff --git a/app/assets/images/pages/employer/employer_icon4.png b/app/assets/images/pages/employer/employer_icon4.png
new file mode 100644
index 000000000..df5c40222
Binary files /dev/null and b/app/assets/images/pages/employer/employer_icon4.png differ
diff --git a/app/assets/images/pages/employer/employer_icon5.png b/app/assets/images/pages/employer/employer_icon5.png
new file mode 100644
index 000000000..85d94b04c
Binary files /dev/null and b/app/assets/images/pages/employer/employer_icon5.png differ
diff --git a/app/assets/images/pages/employer/employer_icon6.png b/app/assets/images/pages/employer/employer_icon6.png
new file mode 100644
index 000000000..bf3bb9e90
Binary files /dev/null and b/app/assets/images/pages/employer/employer_icon6.png differ
diff --git a/app/assets/images/pages/employer/location.png b/app/assets/images/pages/employer/location.png
new file mode 100644
index 000000000..3a21f6422
Binary files /dev/null and b/app/assets/images/pages/employer/location.png differ
diff --git a/app/assets/images/pages/employer/tag.png b/app/assets/images/pages/employer/tag.png
new file mode 100644
index 000000000..0b022ce92
Binary files /dev/null and b/app/assets/images/pages/employer/tag.png differ
diff --git a/app/assets/images/pages/home/language_background_small.png b/app/assets/images/pages/home/language_background_small.png
new file mode 100644
index 000000000..32063a954
Binary files /dev/null and b/app/assets/images/pages/home/language_background_small.png differ
diff --git a/app/assets/images/pages/home/language_beta_sticker.png b/app/assets/images/pages/home/language_beta_sticker.png
new file mode 100644
index 000000000..fb24c3d12
Binary files /dev/null and b/app/assets/images/pages/home/language_beta_sticker.png differ
diff --git a/app/assets/images/pages/home/language_js.png b/app/assets/images/pages/home/language_js.png
new file mode 100644
index 000000000..75db0f254
Binary files /dev/null and b/app/assets/images/pages/home/language_js.png differ
diff --git a/app/assets/images/pages/home/language_logo_clojure.png b/app/assets/images/pages/home/language_logo_clojure.png
new file mode 100644
index 000000000..38f4ae07a
Binary files /dev/null and b/app/assets/images/pages/home/language_logo_clojure.png differ
diff --git a/app/assets/images/pages/home/language_logo_coffeescript.png b/app/assets/images/pages/home/language_logo_coffeescript.png
new file mode 100644
index 000000000..8eb9742ea
Binary files /dev/null and b/app/assets/images/pages/home/language_logo_coffeescript.png differ
diff --git a/app/assets/images/pages/home/language_logo_io.png b/app/assets/images/pages/home/language_logo_io.png
new file mode 100644
index 000000000..c9d3360df
Binary files /dev/null and b/app/assets/images/pages/home/language_logo_io.png differ
diff --git a/app/assets/images/pages/home/language_logo_javascript.png b/app/assets/images/pages/home/language_logo_javascript.png
new file mode 100644
index 000000000..ec8b134ae
Binary files /dev/null and b/app/assets/images/pages/home/language_logo_javascript.png differ
diff --git a/app/assets/images/pages/home/language_logo_lua.png b/app/assets/images/pages/home/language_logo_lua.png
new file mode 100644
index 000000000..724fa0cfc
Binary files /dev/null and b/app/assets/images/pages/home/language_logo_lua.png differ
diff --git a/app/assets/images/pages/home/language_logo_python.png b/app/assets/images/pages/home/language_logo_python.png
new file mode 100644
index 000000000..f16d48c07
Binary files /dev/null and b/app/assets/images/pages/home/language_logo_python.png differ
diff --git a/app/assets/images/pages/home/language_python.png b/app/assets/images/pages/home/language_python.png
new file mode 100644
index 000000000..80e09da9e
Binary files /dev/null and b/app/assets/images/pages/home/language_python.png differ
diff --git a/app/assets/images/pages/home/wizard.png b/app/assets/images/pages/home/wizard.png
new file mode 100644
index 000000000..f31990f6a
Binary files /dev/null and b/app/assets/images/pages/home/wizard.png differ
diff --git a/app/assets/javascripts/boot.js b/app/assets/javascripts/boot.js
new file mode 100755
index 000000000..47b125211
--- /dev/null
+++ b/app/assets/javascripts/boot.js
@@ -0,0 +1,176 @@
+/**
+ Starting with version 2.0, this file "boots" Jasmine, performing all of the necessary initialization before executing the loaded environment and all of a project's specs. This file should be loaded after `jasmine.js`, but before any project source files or spec files are loaded. Thus this file can also be used to customize Jasmine for a project.
+
+ If a project is using Jasmine via the standalone distribution, this file can be customized directly. If a project is using Jasmine via the [Ruby gem][jasmine-gem], this file can be copied into the support directory via `jasmine copy_boot_js`. Other environments (e.g., Python) will have different mechanisms.
+
+ The location of `boot.js` can be specified and/or overridden in `jasmine.yml`.
+
+ [jasmine-gem]: http://github.com/pivotal/jasmine-gem
+ */
+
+(function() {
+
+  /**
+   * ## Require & Instantiate
+   *
+   * Require Jasmine's core files. Specifically, this requires and attaches all of Jasmine's code to the `jasmine` reference.
+   */
+  window.jasmine = jasmineRequire.core(jasmineRequire);
+
+  /**
+   * Since this is being run in a browser and the results should populate to an HTML page, require the HTML-specific Jasmine code, injecting the same reference.
+   */
+  jasmineRequire.html(jasmine);
+
+  /**
+   * Create the Jasmine environment. This is used to run all specs in a project.
+   */
+  var env = jasmine.getEnv();
+
+  /**
+   * ## The Global Interface
+   *
+   * Build up the functions that will be exposed as the Jasmine public interface. A project can customize, rename or alias any of these functions as desired, provided the implementation remains unchanged.
+   */
+  var jasmineInterface = {
+    describe: function(description, specDefinitions) {
+      return env.describe(description, specDefinitions);
+    },
+
+    xdescribe: function(description, specDefinitions) {
+      return env.xdescribe(description, specDefinitions);
+    },
+
+    it: function(desc, func) {
+      return env.it(desc, func);
+    },
+
+    xit: function(desc, func) {
+      return env.xit(desc, func);
+    },
+
+    beforeEach: function(beforeEachFunction) {
+      return env.beforeEach(beforeEachFunction);
+    },
+
+    afterEach: function(afterEachFunction) {
+      return env.afterEach(afterEachFunction);
+    },
+
+    expect: function(actual) {
+      return env.expect(actual);
+    },
+
+    pending: function() {
+      return env.pending();
+    },
+
+    spyOn: function(obj, methodName) {
+      return env.spyOn(obj, methodName);
+    },
+
+    jsApiReporter: new jasmine.JsApiReporter({
+      timer: new jasmine.Timer()
+    })
+  };
+
+  /**
+   * Add all of the Jasmine global/public interface to the proper global, so a project can use the public interface directly. For example, calling `describe` in specs instead of `jasmine.getEnv().describe`.
+   */
+  if (typeof window == "undefined" && typeof exports == "object") {
+    extend(exports, jasmineInterface);
+  } else {
+    extend(window, jasmineInterface);
+  }
+
+  /**
+   * Expose the interface for adding custom equality testers.
+   */
+  jasmine.addCustomEqualityTester = function(tester) {
+    env.addCustomEqualityTester(tester);
+  };
+
+  /**
+   * Expose the interface for adding custom expectation matchers
+   */
+  jasmine.addMatchers = function(matchers) {
+    return env.addMatchers(matchers);
+  };
+
+  /**
+   * Expose the mock interface for the JavaScript timeout functions
+   */
+  jasmine.clock = function() {
+    return env.clock;
+  };
+
+  /**
+   * ## Runner Parameters
+   *
+   * More browser specific code - wrap the query string in an object and to allow for getting/setting parameters from the runner user interface.
+   */
+
+  var queryString = new jasmine.QueryString({
+    getWindowLocation: function() { return window.location; }
+  });
+
+  var catchingExceptions = false; // Setting to false always for CodeCombat, because Jasmine-HTML's reporter doesn't do source maps, and Chrome console does.
+  env.catchExceptions(typeof catchingExceptions === "undefined" ? true : catchingExceptions);
+
+  /**
+   * ## Reporters
+   * The `HtmlReporter` builds all of the HTML UI for the runner page. This reporter paints the dots, stars, and x's for specs, as well as all spec names and all failures (if any).
+   */
+  var htmlReporter = new jasmine.HtmlReporter({
+    env: env,
+    onRaiseExceptionsClick: function() { queryString.setParam("catch", !env.catchingExceptions()); },
+    getContainer: function() { return $('#testing-area')[0]; },
+    createElement: function() { return document.createElement.apply(document, arguments); },
+    createTextNode: function() { return document.createTextNode.apply(document, arguments); },
+    timer: new jasmine.Timer()
+  });
+
+  /**
+   * The `jsApiReporter` also receives spec results, and is used by any environment that needs to extract the results  from JavaScript.
+   */
+  env.addReporter(jasmineInterface.jsApiReporter);
+  env.addReporter(htmlReporter);
+
+  /**
+   * Filter which specs will be run by matching the start of the full name against the `spec` query param.
+   */
+  var specFilter = new jasmine.HtmlSpecFilter({
+    filterString: function() { return queryString.getParam("spec"); }
+  });
+
+  env.specFilter = function(spec) {
+    return specFilter.matches(spec.getFullName());
+  };
+
+  /**
+   * Setting up timing functions to be able to be overridden. Certain browsers (Safari, IE 8, phantomjs) require this hack.
+   */
+  window.setTimeout = window.setTimeout;
+  window.setInterval = window.setInterval;
+  window.clearTimeout = window.clearTimeout;
+  window.clearInterval = window.clearInterval;
+
+  /**
+   * ## Execution
+   *
+   * Replace the browser window's `onload`, ensure it's called, and then run all of the loaded specs. This includes initializing the `HtmlReporter` instance and then executing the loaded Jasmine environment. All of this will happen after all of the specs are loaded.
+   */
+  window.runJasmine = function() {
+    htmlReporter.initialize();
+    env.execute();
+  };
+
+  /**
+   * Helper function for readability above.
+   */
+  function extend(destination, source) {
+    for (var property in source) destination[property] = source[property];
+    return destination;
+  }
+
+}());
diff --git a/app/assets/javascripts/jasmine-html.js b/app/assets/javascripts/jasmine-html.js
new file mode 100755
index 000000000..985d0d1a0
--- /dev/null
+++ b/app/assets/javascripts/jasmine-html.js
@@ -0,0 +1,359 @@
+/*
+Copyright (c) 2008-2013 Pivotal Labs
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+jasmineRequire.html = function(j$) {
+  j$.ResultsNode = jasmineRequire.ResultsNode();
+  j$.HtmlReporter = jasmineRequire.HtmlReporter(j$);
+  j$.QueryString = jasmineRequire.QueryString();
+  j$.HtmlSpecFilter = jasmineRequire.HtmlSpecFilter();
+};
+
+jasmineRequire.HtmlReporter = function(j$) {
+
+  var noopTimer = {
+    start: function() {},
+    elapsed: function() { return 0; }
+  };
+
+  function HtmlReporter(options) {
+    var env = options.env || {},
+      getContainer = options.getContainer,
+      createElement = options.createElement,
+      createTextNode = options.createTextNode,
+      onRaiseExceptionsClick = options.onRaiseExceptionsClick || function() {},
+      timer = options.timer || noopTimer,
+      results = [],
+      specsExecuted = 0,
+      failureCount = 0,
+      pendingSpecCount = 0,
+      htmlReporterMain,
+      symbols;
+
+    this.initialize = function() {
+      htmlReporterMain = createDom("div", {className: "html-reporter"},
+        createDom("div", {className: "banner"},
+          createDom("span", {className: "title"}, "Jasmine"),
+          createDom("span", {className: "version"}, j$.version)
+        ),
+        createDom("ul", {className: "symbol-summary"}),
+        createDom("div", {className: "alert"}),
+        createDom("div", {className: "results"},
+          createDom("div", {className: "failures"})
+        )
+      );
+      getContainer().appendChild(htmlReporterMain);
+
+      symbols = find(".symbol-summary");
+    };
+
+    var totalSpecsDefined;
+    this.jasmineStarted = function(options) {
+      totalSpecsDefined = options.totalSpecsDefined || 0;
+      timer.start();
+    };
+
+    var summary = createDom("div", {className: "summary"});
+
+    var topResults = new j$.ResultsNode({}, "", null),
+      currentParent = topResults;
+
+    this.suiteStarted = function(result) {
+      currentParent.addChild(result, "suite");
+      currentParent = currentParent.last();
+    };
+
+    this.suiteDone = function(result) {
+      if (currentParent == topResults) {
+        return;
+      }
+
+      currentParent = currentParent.parent;
+    };
+
+    this.specStarted = function(result) {
+      currentParent.addChild(result, "spec");
+    };
+
+    var failures = [];
+    this.specDone = function(result) {
+      if (result.status != "disabled") {
+        specsExecuted++;
+      }
+
+      symbols.appendChild(createDom("li", {
+          className: result.status,
+          id: "spec_" + result.id,
+          title: result.fullName
+        }
+      ));
+
+      if (result.status == "failed") {
+        failureCount++;
+
+        var failure =
+          createDom("div", {className: "spec-detail failed"},
+            createDom("div", {className: "description"},
+              createDom("a", {title: result.fullName, href: specHref(result)}, result.fullName)
+            ),
+            createDom("div", {className: "messages"})
+          );
+        var messages = failure.childNodes[1];
+
+        for (var i = 0; i < result.failedExpectations.length; i++) {
+          var expectation = result.failedExpectations[i];
+          messages.appendChild(createDom("div", {className: "result-message"}, expectation.message));
+          messages.appendChild(createDom("div", {className: "stack-trace"}, expectation.stack));
+        }
+
+        failures.push(failure);
+      }
+
+      if (result.status == "pending") {
+        pendingSpecCount++;
+      }
+    };
+
+    this.jasmineDone = function() {
+      var banner = find(".banner");
+      banner.appendChild(createDom("span", {className: "duration"}, "finished in " + timer.elapsed() / 1000 + "s"));
+
+      var alert = find(".alert");
+
+      alert.appendChild(createDom("span", { className: "exceptions" },
+        createDom("label", { className: "label", 'for': "raise-exceptions" }, "raise exceptions"),
+        createDom("input", {
+          className: "raise",
+          id: "raise-exceptions",
+          type: "checkbox"
+        })
+      ));
+      var checkbox = find("input");
+
+      checkbox.checked = !env.catchingExceptions();
+      checkbox.onclick = onRaiseExceptionsClick;
+
+      if (specsExecuted < totalSpecsDefined) {
+        var skippedMessage = "Ran " + specsExecuted + " of " + totalSpecsDefined + " specs - run all";
+        alert.appendChild(
+          createDom("span", {className: "bar skipped"},
+            createDom("a", {href: "?", title: "Run all specs"}, skippedMessage)
+          )
+        );
+      }
+      var statusBarMessage = "" + pluralize("spec", specsExecuted) + ", " + pluralize("failure", failureCount);
+      if (pendingSpecCount) { statusBarMessage += ", " + pluralize("pending spec", pendingSpecCount); }
+
+      var statusBarClassName = "bar " + ((failureCount > 0) ? "failed" : "passed");
+      alert.appendChild(createDom("span", {className: statusBarClassName}, statusBarMessage));
+
+      var results = find(".results");
+      results.appendChild(summary);
+
+      summaryList(topResults, summary);
+
+      function summaryList(resultsTree, domParent) {
+        var specListNode;
+        for (var i = 0; i < resultsTree.children.length; i++) {
+          var resultNode = resultsTree.children[i];
+          if (resultNode.type == "suite") {
+            var suiteListNode = createDom("ul", {className: "suite", id: "suite-" + resultNode.result.id},
+              createDom("li", {className: "suite-detail"},
+                createDom("a", {href: specHref(resultNode.result)}, resultNode.result.description)
+              )
+            );
+
+            summaryList(resultNode, suiteListNode);
+            domParent.appendChild(suiteListNode);
+          }
+          if (resultNode.type == "spec") {
+            if (domParent.getAttribute("class") != "specs") {
+              specListNode = createDom("ul", {className: "specs"});
+              domParent.appendChild(specListNode);
+            }
+            specListNode.appendChild(
+              createDom("li", {
+                  className: resultNode.result.status,
+                  id: "spec-" + resultNode.result.id
+                },
+                createDom("a", {href: specHref(resultNode.result)}, resultNode.result.description)
+              )
+            );
+          }
+        }
+      }
+
+      if (failures.length) {
+        alert.appendChild(
+          createDom('span', {className: "menu bar spec-list"},
+            createDom("span", {}, "Spec List | "),
+            createDom('a', {className: "failures-menu", href: "#"}, "Failures")));
+        alert.appendChild(
+          createDom('span', {className: "menu bar failure-list"},
+            createDom('a', {className: "spec-list-menu", href: "#"}, "Spec List"),
+            createDom("span", {}, " | Failures ")));
+
+        find(".failures-menu").onclick = function() {
+          setMenuModeTo('failure-list');
+        };
+        find(".spec-list-menu").onclick = function() {
+          setMenuModeTo('spec-list');
+        };
+
+        setMenuModeTo('failure-list');
+
+        var failureNode = find(".failures");
+        for (var i = 0; i < failures.length; i++) {
+          failureNode.appendChild(failures[i]);
+        }
+      }
+    };
+
+    return this;
+
+    function find(selector) {
+      return getContainer().querySelector(selector);
+    }
+
+    function createDom(type, attrs, childrenVarArgs) {
+      var el = createElement(type);
+
+      for (var i = 2; i < arguments.length; i++) {
+        var child = arguments[i];
+
+        if (typeof child === 'string') {
+          el.appendChild(createTextNode(child));
+        } else {
+          if (child) {
+            el.appendChild(child);
+          }
+        }
+      }
+
+      for (var attr in attrs) {
+        if (attr == "className") {
+          el[attr] = attrs[attr];
+        } else {
+          el.setAttribute(attr, attrs[attr]);
+        }
+      }
+
+      return el;
+    }
+
+    function pluralize(singular, count) {
+      var word = (count == 1 ? singular : singular + "s");
+
+      return "" + count + " " + word;
+    }
+
+    function specHref(result) {
+      return "?spec=" + encodeURIComponent(result.fullName);
+    }
+
+    function setMenuModeTo(mode) {
+      htmlReporterMain.setAttribute("class", "html-reporter " + mode);
+    }
+  }
+
+  return HtmlReporter;
+};
+
+jasmineRequire.HtmlSpecFilter = function() {
+  function HtmlSpecFilter(options) {
+    var filterString = options && options.filterString() && options.filterString().replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
+    var filterPattern = new RegExp(filterString);
+
+    this.matches = function(specName) {
+      return filterPattern.test(specName);
+    };
+  }
+
+  return HtmlSpecFilter;
+};
+
+jasmineRequire.ResultsNode = function() {
+  function ResultsNode(result, type, parent) {
+    this.result = result;
+    this.type = type;
+    this.parent = parent;
+
+    this.children = [];
+
+    this.addChild = function(result, type) {
+      this.children.push(new ResultsNode(result, type, this));
+    };
+
+    this.last = function() {
+      return this.children[this.children.length - 1];
+    };
+  }
+
+  return ResultsNode;
+};
+
+jasmineRequire.QueryString = function() {
+  function QueryString(options) {
+
+    this.setParam = function(key, value) {
+      var paramMap = queryStringToParamMap();
+      paramMap[key] = value;
+      options.getWindowLocation().search = toQueryString(paramMap);
+    };
+
+    this.getParam = function(key) {
+      return queryStringToParamMap()[key];
+    };
+
+    return this;
+
+    function toQueryString(paramMap) {
+      var qStrPairs = [];
+      for (var prop in paramMap) {
+        qStrPairs.push(encodeURIComponent(prop) + "=" + encodeURIComponent(paramMap[prop]));
+      }
+      return "?" + qStrPairs.join('&');
+    }
+
+    function queryStringToParamMap() {
+      var paramStr = options.getWindowLocation().search.substring(1),
+        params = [],
+        paramMap = {};
+
+      if (paramStr.length > 0) {
+        params = paramStr.split('&');
+        for (var i = 0; i < params.length; i++) {
+          var p = params[i].split('=');
+          var value = decodeURIComponent(p[1]);
+          if (value === "true" || value === "false") {
+            value = JSON.parse(value);
+          }
+          paramMap[decodeURIComponent(p[0])] = value;
+        }
+      }
+
+      return paramMap;
+    }
+
+  }
+
+  return QueryString;
+};
diff --git a/app/assets/javascripts/jasmine.js b/app/assets/javascripts/jasmine.js
new file mode 100755
index 000000000..24463ecb8
--- /dev/null
+++ b/app/assets/javascripts/jasmine.js
@@ -0,0 +1,2402 @@
+/*
+Copyright (c) 2008-2013 Pivotal Labs
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+function getJasmineRequireObj() {
+  if (typeof module !== "undefined" && module.exports) {
+    return exports;
+  } else {
+    window.jasmineRequire = window.jasmineRequire || {};
+    return window.jasmineRequire;
+  }
+}
+
+getJasmineRequireObj().core = function(jRequire) {
+  var j$ = {};
+
+  jRequire.base(j$);
+  j$.util = jRequire.util();
+  j$.Any = jRequire.Any();
+  j$.CallTracker = jRequire.CallTracker();
+  j$.Clock = jRequire.Clock();
+  j$.DelayedFunctionScheduler = jRequire.DelayedFunctionScheduler();
+  j$.Env = jRequire.Env(j$);
+  j$.ExceptionFormatter = jRequire.ExceptionFormatter();
+  j$.Expectation = jRequire.Expectation();
+  j$.buildExpectationResult = jRequire.buildExpectationResult();
+  j$.JsApiReporter = jRequire.JsApiReporter();
+  j$.matchersUtil = jRequire.matchersUtil(j$);
+  j$.ObjectContaining = jRequire.ObjectContaining(j$);
+  j$.pp = jRequire.pp(j$);
+  j$.QueueRunner = jRequire.QueueRunner();
+  j$.ReportDispatcher = jRequire.ReportDispatcher();
+  j$.Spec = jRequire.Spec(j$);
+  j$.SpyStrategy = jRequire.SpyStrategy();
+  j$.Suite = jRequire.Suite();
+  j$.Timer = jRequire.Timer();
+  j$.version = jRequire.version();
+
+  j$.matchers = jRequire.requireMatchers(jRequire, j$);
+
+  return j$;
+};
+
+getJasmineRequireObj().requireMatchers = function(jRequire, j$) {
+  var availableMatchers = [
+      "toBe",
+      "toBeCloseTo",
+      "toBeDefined",
+      "toBeFalsy",
+      "toBeGreaterThan",
+      "toBeLessThan",
+      "toBeNaN",
+      "toBeNull",
+      "toBeTruthy",
+      "toBeUndefined",
+      "toContain",
+      "toEqual",
+      "toHaveBeenCalled",
+      "toHaveBeenCalledWith",
+      "toMatch",
+      "toThrow",
+      "toThrowError"
+    ],
+    matchers = {};
+
+  for (var i = 0; i < availableMatchers.length; i++) {
+    var name = availableMatchers[i];
+    matchers[name] = jRequire[name](j$);
+  }
+
+  return matchers;
+};
+
+getJasmineRequireObj().base = function(j$) {
+  j$.unimplementedMethod_ = function() {
+    throw new Error("unimplemented method");
+  };
+
+  j$.MAX_PRETTY_PRINT_DEPTH = 40;
+  j$.DEFAULT_TIMEOUT_INTERVAL = 5000;
+
+  j$.getGlobal = (function() {
+    var jasmineGlobal = eval.call(null, "this");
+    return function() {
+      return jasmineGlobal;
+    };
+  })();
+
+  j$.getEnv = function(options) {
+    var env = j$.currentEnv_ = j$.currentEnv_ || new j$.Env(options);
+    //jasmine. singletons in here (setTimeout blah blah).
+    return env;
+  };
+
+  j$.isArray_ = function(value) {
+    return j$.isA_("Array", value);
+  };
+
+  j$.isString_ = function(value) {
+    return j$.isA_("String", value);
+  };
+
+  j$.isNumber_ = function(value) {
+    return j$.isA_("Number", value);
+  };
+
+  j$.isA_ = function(typeName, value) {
+    return Object.prototype.toString.apply(value) === '[object ' + typeName + ']';
+  };
+
+  j$.isDomNode = function(obj) {
+    return obj.nodeType > 0;
+  };
+
+  j$.any = function(clazz) {
+    return new j$.Any(clazz);
+  };
+
+  j$.objectContaining = function(sample) {
+    return new j$.ObjectContaining(sample);
+  };
+
+  j$.createSpy = function(name, originalFn) {
+
+    var spyStrategy = new j$.SpyStrategy({
+        name: name,
+        fn: originalFn,
+        getSpy: function() { return spy; }
+      }),
+      callTracker = new j$.CallTracker(),
+      spy = function() {
+        callTracker.track({
+          object: this,
+          args: Array.prototype.slice.apply(arguments)
+        });
+        return spyStrategy.exec.apply(this, arguments);
+      };
+
+    for (var prop in originalFn) {
+      if (prop === 'and' || prop === 'calls') {
+        throw new Error("Jasmine spies would overwrite the 'and' and 'calls' properties on the object being spied upon");
+      }
+
+      spy[prop] = originalFn[prop];
+    }
+
+    spy.and = spyStrategy;
+    spy.calls = callTracker;
+
+    return spy;
+  };
+
+  j$.isSpy = function(putativeSpy) {
+    if (!putativeSpy) {
+      return false;
+    }
+    return putativeSpy.and instanceof j$.SpyStrategy &&
+      putativeSpy.calls instanceof j$.CallTracker;
+  };
+
+  j$.createSpyObj = function(baseName, methodNames) {
+    if (!j$.isArray_(methodNames) || methodNames.length === 0) {
+      throw "createSpyObj requires a non-empty array of method names to create spies for";
+    }
+    var obj = {};
+    for (var i = 0; i < methodNames.length; i++) {
+      obj[methodNames[i]] = j$.createSpy(baseName + '.' + methodNames[i]);
+    }
+    return obj;
+  };
+};
+
+getJasmineRequireObj().util = function() {
+
+  var util = {};
+
+  util.inherit = function(childClass, parentClass) {
+    var Subclass = function() {
+    };
+    Subclass.prototype = parentClass.prototype;
+    childClass.prototype = new Subclass();
+  };
+
+  util.htmlEscape = function(str) {
+    if (!str) {
+      return str;
+    }
+    return str.replace(/&/g, '&amp;')
+      .replace(/</g, '&lt;')
+      .replace(/>/g, '&gt;');
+  };
+
+  util.argsToArray = function(args) {
+    var arrayOfArgs = [];
+    for (var i = 0; i < args.length; i++) {
+      arrayOfArgs.push(args[i]);
+    }
+    return arrayOfArgs;
+  };
+
+  util.isUndefined = function(obj) {
+    return obj === void 0;
+  };
+
+  return util;
+};
+
+getJasmineRequireObj().Spec = function(j$) {
+  function Spec(attrs) {
+    this.expectationFactory = attrs.expectationFactory;
+    this.resultCallback = attrs.resultCallback || function() {};
+    this.id = attrs.id;
+    this.description = attrs.description || '';
+    this.fn = attrs.fn;
+    this.beforeFns = attrs.beforeFns || function() { return []; };
+    this.afterFns = attrs.afterFns || function() { return []; };
+    this.onStart = attrs.onStart || function() {};
+    this.exceptionFormatter = attrs.exceptionFormatter || function() {};
+    this.getSpecName = attrs.getSpecName || function() { return ''; };
+    this.expectationResultFactory = attrs.expectationResultFactory || function() { };
+    this.queueRunnerFactory = attrs.queueRunnerFactory || function() {};
+    this.catchingExceptions = attrs.catchingExceptions || function() { return true; };
+
+    this.timer = attrs.timer || {setTimeout: setTimeout, clearTimeout: clearTimeout};
+
+    if (!this.fn) {
+      this.pend();
+    }
+
+    this.result = {
+      id: this.id,
+      description: this.description,
+      fullName: this.getFullName(),
+      failedExpectations: []
+    };
+  }
+
+  Spec.prototype.addExpectationResult = function(passed, data) {
+    if (passed) {
+      return;
+    }
+    this.result.failedExpectations.push(this.expectationResultFactory(data));
+  };
+
+  Spec.prototype.expect = function(actual) {
+    return this.expectationFactory(actual, this);
+  };
+
+  Spec.prototype.execute = function(onComplete) {
+    var self = this,
+        timeout;
+
+    this.onStart(this);
+
+    if (this.markedPending || this.disabled) {
+      complete();
+      return;
+    }
+
+    function timeoutable(fn) {
+      return function(done) {
+        timeout = Function.prototype.apply.apply(self.timer.setTimeout, [j$.getGlobal(), [function() {
+          onException(new Error('Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.'));
+          done();
+        }, j$.DEFAULT_TIMEOUT_INTERVAL]]);
+
+        var callDone = function() {
+          clearTimeoutable();
+          done();
+        };
+
+        fn.call(this, callDone); //TODO: do we care about more than 1 arg?
+      };
+    }
+
+    function clearTimeoutable() {
+      Function.prototype.apply.apply(self.timer.clearTimeout, [j$.getGlobal(), [timeout]]);
+      timeout = void 0;
+    }
+
+    var allFns = this.beforeFns().concat(this.fn).concat(this.afterFns()),
+      allTimeoutableFns = [];
+    for (var i = 0; i < allFns.length; i++) {
+      var fn = allFns[i];
+      allTimeoutableFns.push(fn.length > 0 ? timeoutable(fn) : fn);
+    }
+
+    this.queueRunnerFactory({
+      fns: allTimeoutableFns,
+      onException: onException,
+      onComplete: complete
+    });
+
+    function onException(e) {
+      clearTimeoutable();
+      if (Spec.isPendingSpecException(e)) {
+        self.pend();
+        return;
+      }
+
+      self.addExpectationResult(false, {
+        matcherName: "",
+        passed: false,
+        expected: "",
+        actual: "",
+        error: e
+      });
+    }
+
+    function complete() {
+      self.result.status = self.status();
+      self.resultCallback(self.result);
+
+      if (onComplete) {
+        onComplete();
+      }
+    }
+  };
+
+  Spec.prototype.disable = function() {
+    this.disabled = true;
+  };
+
+  Spec.prototype.pend = function() {
+    this.markedPending = true;
+  };
+
+  Spec.prototype.status = function() {
+    if (this.disabled) {
+      return 'disabled';
+    }
+
+    if (this.markedPending) {
+      return 'pending';
+    }
+
+    if (this.result.failedExpectations.length > 0) {
+      return 'failed';
+    } else {
+      return 'passed';
+    }
+  };
+
+  Spec.prototype.getFullName = function() {
+    return this.getSpecName(this);
+  };
+
+  Spec.pendingSpecExceptionMessage = "=> marked Pending";
+
+  Spec.isPendingSpecException = function(e) {
+    return e.toString().indexOf(Spec.pendingSpecExceptionMessage) !== -1;
+  };
+
+  return Spec;
+};
+
+if (typeof window == void 0 && typeof exports == "object") {
+  exports.Spec = jasmineRequire.Spec;
+}
+
+getJasmineRequireObj().Env = function(j$) {
+  function Env(options) {
+    options = options || {};
+
+    var self = this;
+    var global = options.global || j$.getGlobal();
+
+    var totalSpecsDefined = 0;
+
+    var catchExceptions = true;
+
+    var realSetTimeout = j$.getGlobal().setTimeout;
+    var realClearTimeout = j$.getGlobal().clearTimeout;
+    this.clock = new j$.Clock(global, new j$.DelayedFunctionScheduler());
+
+    var runnableLookupTable = {};
+
+    var spies = [];
+
+    var currentSpec = null;
+    var currentSuite = null;
+
+    var reporter = new j$.ReportDispatcher([
+      "jasmineStarted",
+      "jasmineDone",
+      "suiteStarted",
+      "suiteDone",
+      "specStarted",
+      "specDone"
+    ]);
+
+    this.specFilter = function() {
+      return true;
+    };
+
+    var equalityTesters = [];
+
+    var customEqualityTesters = [];
+    this.addCustomEqualityTester = function(tester) {
+      customEqualityTesters.push(tester);
+    };
+
+    j$.Expectation.addCoreMatchers(j$.matchers);
+
+    var nextSpecId = 0;
+    var getNextSpecId = function() {
+      return 'spec' + nextSpecId++;
+    };
+
+    var nextSuiteId = 0;
+    var getNextSuiteId = function() {
+      return 'suite' + nextSuiteId++;
+    };
+
+    var expectationFactory = function(actual, spec) {
+      return j$.Expectation.Factory({
+        util: j$.matchersUtil,
+        customEqualityTesters: customEqualityTesters,
+        actual: actual,
+        addExpectationResult: addExpectationResult
+      });
+
+      function addExpectationResult(passed, result) {
+        return spec.addExpectationResult(passed, result);
+      }
+    };
+
+    var specStarted = function(spec) {
+      currentSpec = spec;
+      reporter.specStarted(spec.result);
+    };
+
+    var beforeFns = function(suite) {
+      return function() {
+        var befores = [];
+        while(suite) {
+          befores = befores.concat(suite.beforeFns);
+          suite = suite.parentSuite;
+        }
+        return befores.reverse();
+      };
+    };
+
+    var afterFns = function(suite) {
+      return function() {
+        var afters = [];
+        while(suite) {
+          afters = afters.concat(suite.afterFns);
+          suite = suite.parentSuite;
+        }
+        return afters;
+      };
+    };
+
+    var getSpecName = function(spec, suite) {
+      return suite.getFullName() + ' ' + spec.description;
+    };
+
+    // TODO: we may just be able to pass in the fn instead of wrapping here
+    var buildExpectationResult = j$.buildExpectationResult,
+        exceptionFormatter = new j$.ExceptionFormatter(),
+        expectationResultFactory = function(attrs) {
+          attrs.messageFormatter = exceptionFormatter.message;
+          attrs.stackFormatter = exceptionFormatter.stack;
+
+          return buildExpectationResult(attrs);
+        };
+
+    // TODO: fix this naming, and here's where the value comes in
+    this.catchExceptions = function(value) {
+      catchExceptions = !!value;
+      return catchExceptions;
+    };
+
+    this.catchingExceptions = function() {
+      return catchExceptions;
+    };
+
+    var maximumSpecCallbackDepth = 20;
+    var currentSpecCallbackDepth = 0;
+
+    function clearStack(fn) {
+      currentSpecCallbackDepth++;
+      if (currentSpecCallbackDepth >= maximumSpecCallbackDepth) {
+        currentSpecCallbackDepth = 0;
+        realSetTimeout(fn, 0);
+      } else {
+        fn();
+      }
+    }
+
+    var catchException = function(e) {
+      return j$.Spec.isPendingSpecException(e) || catchExceptions;
+    };
+
+    var queueRunnerFactory = function(options) {
+      options.catchException = catchException;
+      options.clearStack = options.clearStack || clearStack;
+
+      new j$.QueueRunner(options).execute();
+    };
+
+    var topSuite = new j$.Suite({
+      env: this,
+      id: getNextSuiteId(),
+      description: 'Jasmine__TopLevel__Suite',
+      queueRunner: queueRunnerFactory,
+      resultCallback: function() {} // TODO - hook this up
+    });
+    runnableLookupTable[topSuite.id] = topSuite;
+    currentSuite = topSuite;
+
+    this.topSuite = function() {
+      return topSuite;
+    };
+
+    this.execute = function(runnablesToRun) {
+      runnablesToRun = runnablesToRun || [topSuite.id];
+
+      var allFns = [];
+      for(var i = 0; i < runnablesToRun.length; i++) {
+        var runnable = runnableLookupTable[runnablesToRun[i]];
+        allFns.push((function(runnable) { return function(done) { runnable.execute(done); }; })(runnable));
+      }
+
+      reporter.jasmineStarted({
+        totalSpecsDefined: totalSpecsDefined
+      });
+
+      queueRunnerFactory({fns: allFns, onComplete: reporter.jasmineDone});
+    };
+
+    this.addReporter = function(reporterToAdd) {
+      reporter.addReporter(reporterToAdd);
+    };
+
+    this.addMatchers = function(matchersToAdd) {
+      j$.Expectation.addMatchers(matchersToAdd);
+    };
+
+    this.spyOn = function(obj, methodName) {
+      if (j$.util.isUndefined(obj)) {
+        throw new Error("spyOn could not find an object to spy upon for " + methodName + "()");
+      }
+
+      if (j$.util.isUndefined(obj[methodName])) {
+        throw new Error(methodName + '() method does not exist');
+      }
+
+      if (obj[methodName] && j$.isSpy(obj[methodName])) {
+        //TODO?: should this return the current spy? Downside: may cause user confusion about spy state
+        throw new Error(methodName + ' has already been spied upon');
+      }
+
+      var spy = j$.createSpy(methodName, obj[methodName]);
+
+      spies.push({
+        spy: spy,
+        baseObj: obj,
+        methodName: methodName,
+        originalValue: obj[methodName]
+      });
+
+      obj[methodName] = spy;
+
+      return spy;
+    };
+
+    var suiteFactory = function(description) {
+      var suite = new j$.Suite({
+        env: self,
+        id: getNextSuiteId(),
+        description: description,
+        parentSuite: currentSuite,
+        queueRunner: queueRunnerFactory,
+        onStart: suiteStarted,
+        resultCallback: function(attrs) {
+          reporter.suiteDone(attrs);
+        }
+      });
+
+      runnableLookupTable[suite.id] = suite;
+      return suite;
+    };
+
+    this.describe = function(description, specDefinitions) {
+      var suite = suiteFactory(description);
+
+      var parentSuite = currentSuite;
+      parentSuite.addChild(suite);
+      currentSuite = suite;
+
+      var declarationError = null;
+      try {
+        specDefinitions.call(suite);
+      } catch (e) {
+        declarationError = e;
+      }
+
+      if (declarationError) {
+        this.it("encountered a declaration exception", function() {
+          throw declarationError;
+        });
+      }
+
+      currentSuite = parentSuite;
+
+      return suite;
+    };
+
+    this.xdescribe = function(description, specDefinitions) {
+      var suite = this.describe(description, specDefinitions);
+      suite.disable();
+      return suite;
+    };
+
+    var specFactory = function(description, fn, suite) {
+      totalSpecsDefined++;
+
+      var spec = new j$.Spec({
+        id: getNextSpecId(),
+        beforeFns: beforeFns(suite),
+        afterFns: afterFns(suite),
+        expectationFactory: expectationFactory,
+        exceptionFormatter: exceptionFormatter,
+        resultCallback: specResultCallback,
+        getSpecName: function(spec) {
+          return getSpecName(spec, suite);
+        },
+        onStart: specStarted,
+        description: description,
+        expectationResultFactory: expectationResultFactory,
+        queueRunnerFactory: queueRunnerFactory,
+        fn: fn,
+        timer: {setTimeout: realSetTimeout, clearTimeout: realClearTimeout}
+      });
+
+      runnableLookupTable[spec.id] = spec;
+
+      if (!self.specFilter(spec)) {
+        spec.disable();
+      }
+
+      return spec;
+
+      function removeAllSpies() {
+        for (var i = 0; i < spies.length; i++) {
+          var spyEntry = spies[i];
+          spyEntry.baseObj[spyEntry.methodName] = spyEntry.originalValue;
+        }
+        spies = [];
+      }
+
+      function specResultCallback(result) {
+        removeAllSpies();
+        j$.Expectation.resetMatchers();
+        customEqualityTesters = [];
+        currentSpec = null;
+        reporter.specDone(result);
+      }
+    };
+
+    var suiteStarted = function(suite) {
+      reporter.suiteStarted(suite.result);
+    };
+
+    this.it = function(description, fn) {
+      var spec = specFactory(description, fn, currentSuite);
+      currentSuite.addChild(spec);
+      return spec;
+    };
+
+    this.xit = function(description, fn) {
+      var spec = this.it(description, fn);
+      spec.pend();
+      return spec;
+    };
+
+    this.expect = function(actual) {
+      return currentSpec.expect(actual);
+    };
+
+    this.beforeEach = function(beforeEachFunction) {
+      currentSuite.beforeEach(beforeEachFunction);
+    };
+
+    this.afterEach = function(afterEachFunction) {
+      currentSuite.afterEach(afterEachFunction);
+    };
+
+    this.pending = function() {
+      throw j$.Spec.pendingSpecExceptionMessage;
+    };
+  }
+
+  return Env;
+};
+
+getJasmineRequireObj().JsApiReporter = function() {
+
+  var noopTimer = {
+    start: function(){},
+    elapsed: function(){ return 0; }
+  };
+
+  function JsApiReporter(options) {
+    var timer = options.timer || noopTimer,
+        status = "loaded";
+
+    this.started = false;
+    this.finished = false;
+
+    this.jasmineStarted = function() {
+      this.started = true;
+      status = 'started';
+      timer.start();
+    };
+
+    var executionTime;
+
+    this.jasmineDone = function() {
+      this.finished = true;
+      executionTime = timer.elapsed();
+      status = 'done';
+    };
+
+    this.status = function() {
+      return status;
+    };
+
+    var suites = {};
+
+    this.suiteStarted = function(result) {
+      storeSuite(result);
+    };
+
+    this.suiteDone = function(result) {
+      storeSuite(result);
+    };
+
+    function storeSuite(result) {
+      suites[result.id] = result;
+    }
+
+    this.suites = function() {
+      return suites;
+    };
+
+    var specs = [];
+    this.specStarted = function(result) { };
+
+    this.specDone = function(result) {
+      specs.push(result);
+    };
+
+    this.specResults = function(index, length) {
+      return specs.slice(index, index + length);
+    };
+
+    this.specs = function() {
+      return specs;
+    };
+
+    this.executionTime = function() {
+      return executionTime;
+    };
+
+  }
+
+  return JsApiReporter;
+};
+
+getJasmineRequireObj().Any = function() {
+
+  function Any(expectedObject) {
+    this.expectedObject = expectedObject;
+  }
+
+  Any.prototype.jasmineMatches = function(other) {
+    if (this.expectedObject == String) {
+      return typeof other == 'string' || other instanceof String;
+    }
+
+    if (this.expectedObject == Number) {
+      return typeof other == 'number' || other instanceof Number;
+    }
+
+    if (this.expectedObject == Function) {
+      return typeof other == 'function' || other instanceof Function;
+    }
+
+    if (this.expectedObject == Object) {
+      return typeof other == 'object';
+    }
+    
+    if (this.expectedObject == Boolean) {
+      return typeof other == 'boolean';
+    }
+
+    return other instanceof this.expectedObject;
+  };
+
+  Any.prototype.jasmineToString = function() {
+    return '<jasmine.any(' + this.expectedClass + ')>';
+  };
+
+  return Any;
+};
+
+getJasmineRequireObj().CallTracker = function() {
+
+  function CallTracker() {
+    var calls = [];
+
+    this.track = function(context) {
+      calls.push(context);
+    };
+
+    this.any = function() {
+      return !!calls.length;
+    };
+
+    this.count = function() {
+      return calls.length;
+    };
+
+    this.argsFor = function(index) {
+      var call = calls[index];
+      return call ? call.args : [];
+    };
+
+    this.all = function() {
+      return calls;
+    };
+
+    this.allArgs = function() {
+      var callArgs = [];
+      for(var i = 0; i < calls.length; i++){
+        callArgs.push(calls[i].args);
+      }
+
+      return callArgs;
+    };
+
+    this.first = function() {
+      return calls[0];
+    };
+
+    this.mostRecent = function() {
+      return calls[calls.length - 1];
+    };
+
+    this.reset = function() {
+      calls = [];
+    };
+  }
+
+  return CallTracker;
+};
+
+getJasmineRequireObj().Clock = function() {
+  function Clock(global, delayedFunctionScheduler) {
+    var self = this,
+      realTimingFunctions = {
+        setTimeout: global.setTimeout,
+        clearTimeout: global.clearTimeout,
+        setInterval: global.setInterval,
+        clearInterval: global.clearInterval
+      },
+      fakeTimingFunctions = {
+        setTimeout: setTimeout,
+        clearTimeout: clearTimeout,
+        setInterval: setInterval,
+        clearInterval: clearInterval
+      },
+      installed = false,
+      timer;
+
+    self.install = function() {
+      replace(global, fakeTimingFunctions);
+      timer = fakeTimingFunctions;
+      installed = true;
+    };
+
+    self.uninstall = function() {
+      delayedFunctionScheduler.reset();
+      replace(global, realTimingFunctions);
+      timer = realTimingFunctions;
+      installed = false;
+    };
+
+    self.setTimeout = function(fn, delay, params) {
+      if (legacyIE()) {
+        if (arguments.length > 2) {
+          throw new Error("IE < 9 cannot support extra params to setTimeout without a polyfill");
+        }
+        return timer.setTimeout(fn, delay);
+      }
+      return Function.prototype.apply.apply(timer.setTimeout, [global, arguments]);
+    };
+
+    self.setInterval = function(fn, delay, params) {
+      if (legacyIE()) {
+        if (arguments.length > 2) {
+          throw new Error("IE < 9 cannot support extra params to setInterval without a polyfill");
+        }
+        return timer.setInterval(fn, delay);
+      }
+      return Function.prototype.apply.apply(timer.setInterval, [global, arguments]);
+    };
+
+    self.clearTimeout = function(id) {
+      return Function.prototype.call.apply(timer.clearTimeout, [global, id]);
+    };
+
+    self.clearInterval = function(id) {
+      return Function.prototype.call.apply(timer.clearInterval, [global, id]);
+    };
+
+    self.tick = function(millis) {
+      if (installed) {
+        delayedFunctionScheduler.tick(millis);
+      } else {
+        throw new Error("Mock clock is not installed, use jasmine.clock().install()");
+      }
+    };
+
+    return self;
+
+    function legacyIE() {
+      //if these methods are polyfilled, apply will be present
+      return !(realTimingFunctions.setTimeout || realTimingFunctions.setInterval).apply;
+    }
+
+    function replace(dest, source) {
+      for (var prop in source) {
+        dest[prop] = source[prop];
+      }
+    }
+
+    function setTimeout(fn, delay) {
+      return delayedFunctionScheduler.scheduleFunction(fn, delay, argSlice(arguments, 2));
+    }
+
+    function clearTimeout(id) {
+      return delayedFunctionScheduler.removeFunctionWithId(id);
+    }
+
+    function setInterval(fn, interval) {
+      return delayedFunctionScheduler.scheduleFunction(fn, interval, argSlice(arguments, 2), true);
+    }
+
+    function clearInterval(id) {
+      return delayedFunctionScheduler.removeFunctionWithId(id);
+    }
+
+    function argSlice(argsObj, n) {
+      return Array.prototype.slice.call(argsObj, 2);
+    }
+  }
+
+  return Clock;
+};
+
+getJasmineRequireObj().DelayedFunctionScheduler = function() {
+  function DelayedFunctionScheduler() {
+    var self = this;
+    var scheduledLookup = [];
+    var scheduledFunctions = {};
+    var currentTime = 0;
+    var delayedFnCount = 0;
+
+    self.tick = function(millis) {
+      millis = millis || 0;
+      var endTime = currentTime + millis;
+
+      runScheduledFunctions(endTime);
+      currentTime = endTime;
+    };
+
+    self.scheduleFunction = function(funcToCall, millis, params, recurring, timeoutKey, runAtMillis) {
+      var f;
+      if (typeof(funcToCall) === 'string') {
+        /* jshint evil: true */
+        f = function() { return eval(funcToCall); };
+        /* jshint evil: false */
+      } else {
+        f = funcToCall;
+      }
+
+      millis = millis || 0;
+      timeoutKey = timeoutKey || ++delayedFnCount;
+      runAtMillis = runAtMillis || (currentTime + millis);
+
+      var funcToSchedule = {
+        runAtMillis: runAtMillis,
+        funcToCall: f,
+        recurring: recurring,
+        params: params,
+        timeoutKey: timeoutKey,
+        millis: millis
+      };
+
+      if (runAtMillis in scheduledFunctions) {
+        scheduledFunctions[runAtMillis].push(funcToSchedule);
+      } else {
+        scheduledFunctions[runAtMillis] = [funcToSchedule];
+        scheduledLookup.push(runAtMillis);
+        scheduledLookup.sort(function (a, b) {
+          return a - b;
+        });
+      }
+
+      return timeoutKey;
+    };
+
+    self.removeFunctionWithId = function(timeoutKey) {
+      for (var runAtMillis in scheduledFunctions) {
+        var funcs = scheduledFunctions[runAtMillis];
+        var i = indexOfFirstToPass(funcs, function (func) {
+          return func.timeoutKey === timeoutKey;
+        });
+
+        if (i > -1) {
+          if (funcs.length === 1) {
+            delete scheduledFunctions[runAtMillis];
+            deleteFromLookup(runAtMillis);
+          } else {
+            funcs.splice(i, 1);
+          }
+
+          // intervals get rescheduled when executed, so there's never more
+          // than a single scheduled function with a given timeoutKey
+          break;
+        }
+      }
+    };
+
+    self.reset = function() {
+      currentTime = 0;
+      scheduledLookup = [];
+      scheduledFunctions = {};
+      delayedFnCount = 0;
+    };
+
+    return self;
+
+    function indexOfFirstToPass(array, testFn) {
+      var index = -1;
+
+      for (var i = 0; i < array.length; ++i) {
+        if (testFn(array[i])) {
+          index = i;
+          break;
+        }
+      }
+
+      return index;
+    }
+
+    function deleteFromLookup(key) {
+      var value = Number(key);
+      var i = indexOfFirstToPass(scheduledLookup, function (millis) {
+        return millis === value;
+      });
+
+      if (i > -1) {
+        scheduledLookup.splice(i, 1);
+      }
+    }
+
+    function reschedule(scheduledFn) {
+      self.scheduleFunction(scheduledFn.funcToCall,
+        scheduledFn.millis,
+        scheduledFn.params,
+        true,
+        scheduledFn.timeoutKey,
+        scheduledFn.runAtMillis + scheduledFn.millis);
+    }
+
+    function runScheduledFunctions(endTime) {
+      if (scheduledLookup.length === 0 || scheduledLookup[0] > endTime) {
+        return;
+      }
+
+      do {
+        currentTime = scheduledLookup.shift();
+
+        var funcsToRun = scheduledFunctions[currentTime];
+        delete scheduledFunctions[currentTime];
+
+        for (var i = 0; i < funcsToRun.length; ++i) {
+          var funcToRun = funcsToRun[i];
+          funcToRun.funcToCall.apply(null, funcToRun.params || []);
+
+          if (funcToRun.recurring) {
+            reschedule(funcToRun);
+          }
+        }
+      } while (scheduledLookup.length > 0 &&
+              // checking first if we're out of time prevents setTimeout(0)
+              // scheduled in a funcToRun from forcing an extra iteration
+                 currentTime !== endTime  &&
+                 scheduledLookup[0] <= endTime);
+    }
+  }
+
+  return DelayedFunctionScheduler;
+};
+
+getJasmineRequireObj().ExceptionFormatter = function() {
+  function ExceptionFormatter() {
+    this.message = function(error) {
+      var message = error.name +
+        ': ' +
+        error.message;
+
+      if (error.fileName || error.sourceURL) {
+        message += " in " + (error.fileName || error.sourceURL);
+      }
+
+      if (error.line || error.lineNumber) {
+        message += " (line " + (error.line || error.lineNumber) + ")";
+      }
+
+      return message;
+    };
+
+    this.stack = function(error) {
+      return error ? error.stack : null;
+    };
+  }
+
+  return ExceptionFormatter;
+};
+
+getJasmineRequireObj().Expectation = function() {
+
+  var matchers = {};
+
+  function Expectation(options) {
+    this.util = options.util || { buildFailureMessage: function() {} };
+    this.customEqualityTesters = options.customEqualityTesters || [];
+    this.actual = options.actual;
+    this.addExpectationResult = options.addExpectationResult || function(){};
+    this.isNot = options.isNot;
+
+    for (var matcherName in matchers) {
+      this[matcherName] = matchers[matcherName];
+    }
+  }
+
+  Expectation.prototype.wrapCompare = function(name, matcherFactory) {
+    return function() {
+      var args = Array.prototype.slice.call(arguments, 0),
+        expected = args.slice(0),
+        message = "";
+
+      args.unshift(this.actual);
+
+      var matcher = matcherFactory(this.util, this.customEqualityTesters),
+          matcherCompare = matcher.compare;
+
+      function defaultNegativeCompare() {
+        var result = matcher.compare.apply(null, args);
+        result.pass = !result.pass;
+        return result;
+      }
+
+      if (this.isNot) {
+        matcherCompare = matcher.negativeCompare || defaultNegativeCompare;
+      }
+
+      var result = matcherCompare.apply(null, args);
+
+      if (!result.pass) {
+        if (!result.message) {
+          args.unshift(this.isNot);
+          args.unshift(name);
+          message = this.util.buildFailureMessage.apply(null, args);
+        } else {
+          message = result.message;
+        }
+      }
+
+      if (expected.length == 1) {
+        expected = expected[0];
+      }
+
+      // TODO: how many of these params are needed?
+      this.addExpectationResult(
+        result.pass,
+        {
+          matcherName: name,
+          passed: result.pass,
+          message: message,
+          actual: this.actual,
+          expected: expected // TODO: this may need to be arrayified/sliced
+        }
+      );
+    };
+  };
+
+  Expectation.addCoreMatchers = function(matchers) {
+    var prototype = Expectation.prototype;
+    for (var matcherName in matchers) {
+      var matcher = matchers[matcherName];
+      prototype[matcherName] = prototype.wrapCompare(matcherName, matcher);
+    }
+  };
+
+  Expectation.addMatchers = function(matchersToAdd) {
+    for (var name in matchersToAdd) {
+      var matcher = matchersToAdd[name];
+      matchers[name] = Expectation.prototype.wrapCompare(name, matcher);
+    }
+  };
+
+  Expectation.resetMatchers = function() {
+    for (var name in matchers) {
+      delete matchers[name];
+    }
+  };
+
+  Expectation.Factory = function(options) {
+    options = options || {};
+
+    var expect = new Expectation(options);
+
+    // TODO: this would be nice as its own Object - NegativeExpectation
+    // TODO: copy instead of mutate options
+    options.isNot = true;
+    expect.not = new Expectation(options);
+
+    return expect;
+  };
+
+  return Expectation;
+};
+
+//TODO: expectation result may make more sense as a presentation of an expectation.
+getJasmineRequireObj().buildExpectationResult = function() {
+  function buildExpectationResult(options) {
+    var messageFormatter = options.messageFormatter || function() {},
+      stackFormatter = options.stackFormatter || function() {};
+
+    return {
+      matcherName: options.matcherName,
+      expected: options.expected,
+      actual: options.actual,
+      message: message(),
+      stack: stack(),
+      passed: options.passed
+    };
+
+    function message() {
+      if (options.passed) {
+        return "Passed.";
+      } else if (options.message) {
+        return options.message;
+      } else if (options.error) {
+        return messageFormatter(options.error);
+      }
+      return "";
+    }
+
+    function stack() {
+      if (options.passed) {
+        return "";
+      }
+
+      var error = options.error;
+      if (!error) {
+        try {
+          throw new Error(message());
+        } catch (e) {
+          error = e;
+        }
+      }
+      return stackFormatter(error);
+    }
+  }
+
+  return buildExpectationResult;
+};
+
+getJasmineRequireObj().ObjectContaining = function(j$) {
+
+  function ObjectContaining(sample) {
+    this.sample = sample;
+  }
+
+  ObjectContaining.prototype.jasmineMatches = function(other, mismatchKeys, mismatchValues) {
+    if (typeof(this.sample) !== "object") { throw new Error("You must provide an object to objectContaining, not '"+this.sample+"'."); }
+
+    mismatchKeys = mismatchKeys || [];
+    mismatchValues = mismatchValues || [];
+
+    var hasKey = function(obj, keyName) {
+      return obj !== null && !j$.util.isUndefined(obj[keyName]);
+    };
+
+    for (var property in this.sample) {
+      if (!hasKey(other, property) && hasKey(this.sample, property)) {
+        mismatchKeys.push("expected has key '" + property + "', but missing from actual.");
+      }
+      else if (!j$.matchersUtil.equals(this.sample[property], other[property])) {
+        mismatchValues.push("'" + property + "' was '" + (other[property] ? j$.util.htmlEscape(other[property].toString()) : other[property]) + "' in actual, but was '" + (this.sample[property] ? j$.util.htmlEscape(this.sample[property].toString()) : this.sample[property]) + "' in expected.");
+      }
+    }
+
+    return (mismatchKeys.length === 0 && mismatchValues.length === 0);
+  };
+
+  ObjectContaining.prototype.jasmineToString = function() {
+    return "<jasmine.objectContaining(" + j$.pp(this.sample) + ")>";
+  };
+
+  return ObjectContaining;
+};
+
+getJasmineRequireObj().pp = function(j$) {
+
+  function PrettyPrinter() {
+    this.ppNestLevel_ = 0;
+  }
+
+  PrettyPrinter.prototype.format = function(value) {
+    this.ppNestLevel_++;
+    try {
+      if (j$.util.isUndefined(value)) {
+        this.emitScalar('undefined');
+      } else if (value === null) {
+        this.emitScalar('null');
+      } else if (value === j$.getGlobal()) {
+        this.emitScalar('<global>');
+      } else if (value.jasmineToString) {
+        this.emitScalar(value.jasmineToString());
+      } else if (typeof value === 'string') {
+        this.emitString(value);
+      } else if (j$.isSpy(value)) {
+        this.emitScalar("spy on " + value.and.identity());
+      } else if (value instanceof RegExp) {
+        this.emitScalar(value.toString());
+      } else if (typeof value === 'function') {
+        this.emitScalar('Function');
+      } else if (typeof value.nodeType === 'number') {
+        this.emitScalar('HTMLNode');
+      } else if (value instanceof Date) {
+        this.emitScalar('Date(' + value + ')');
+      } else if (value.__Jasmine_been_here_before__) {
+        this.emitScalar('<circular reference: ' + (j$.isArray_(value) ? 'Array' : 'Object') + '>');
+      } else if (j$.isArray_(value) || j$.isA_('Object', value)) {
+        value.__Jasmine_been_here_before__ = true;
+        if (j$.isArray_(value)) {
+          this.emitArray(value);
+        } else {
+          this.emitObject(value);
+        }
+        delete value.__Jasmine_been_here_before__;
+      } else {
+        this.emitScalar(value.toString());
+      }
+    } finally {
+      this.ppNestLevel_--;
+    }
+  };
+
+  PrettyPrinter.prototype.iterateObject = function(obj, fn) {
+    for (var property in obj) {
+      if (!obj.hasOwnProperty(property)) { continue; }
+      if (property == '__Jasmine_been_here_before__') { continue; }
+      fn(property, obj.__lookupGetter__ ? (!j$.util.isUndefined(obj.__lookupGetter__(property)) &&
+          obj.__lookupGetter__(property) !== null) : false);
+    }
+  };
+
+  PrettyPrinter.prototype.emitArray = j$.unimplementedMethod_;
+  PrettyPrinter.prototype.emitObject = j$.unimplementedMethod_;
+  PrettyPrinter.prototype.emitScalar = j$.unimplementedMethod_;
+  PrettyPrinter.prototype.emitString = j$.unimplementedMethod_;
+
+  function StringPrettyPrinter() {
+    PrettyPrinter.call(this);
+
+    this.string = '';
+  }
+
+  j$.util.inherit(StringPrettyPrinter, PrettyPrinter);
+
+  StringPrettyPrinter.prototype.emitScalar = function(value) {
+    this.append(value);
+  };
+
+  StringPrettyPrinter.prototype.emitString = function(value) {
+    this.append("'" + value + "'");
+  };
+
+  StringPrettyPrinter.prototype.emitArray = function(array) {
+    if (this.ppNestLevel_ > j$.MAX_PRETTY_PRINT_DEPTH) {
+      this.append("Array");
+      return;
+    }
+
+    this.append('[ ');
+    for (var i = 0; i < array.length; i++) {
+      if (i > 0) {
+        this.append(', ');
+      }
+      this.format(array[i]);
+    }
+    this.append(' ]');
+  };
+
+  StringPrettyPrinter.prototype.emitObject = function(obj) {
+    if (this.ppNestLevel_ > j$.MAX_PRETTY_PRINT_DEPTH) {
+      this.append("Object");
+      return;
+    }
+
+    var self = this;
+    this.append('{ ');
+    var first = true;
+
+    this.iterateObject(obj, function(property, isGetter) {
+      if (first) {
+        first = false;
+      } else {
+        self.append(', ');
+      }
+
+      self.append(property);
+      self.append(' : ');
+      if (isGetter) {
+        self.append('<getter>');
+      } else {
+        self.format(obj[property]);
+      }
+    });
+
+    this.append(' }');
+  };
+
+  StringPrettyPrinter.prototype.append = function(value) {
+    this.string += value;
+  };
+
+  return function(value) {
+    var stringPrettyPrinter = new StringPrettyPrinter();
+    stringPrettyPrinter.format(value);
+    return stringPrettyPrinter.string;
+  };
+};
+
+getJasmineRequireObj().QueueRunner = function() {
+
+  function QueueRunner(attrs) {
+    this.fns = attrs.fns || [];
+    this.onComplete = attrs.onComplete || function() {};
+    this.clearStack = attrs.clearStack || function(fn) {fn();};
+    this.onException = attrs.onException || function() {};
+    this.catchException = attrs.catchException || function() { return true; };
+    this.userContext = {};
+  }
+
+  QueueRunner.prototype.execute = function() {
+    this.run(this.fns, 0);
+  };
+
+  QueueRunner.prototype.run = function(fns, recursiveIndex) {
+    var length = fns.length,
+        self = this,
+        iterativeIndex;
+
+    for(iterativeIndex = recursiveIndex; iterativeIndex < length; iterativeIndex++) {
+      var fn = fns[iterativeIndex];
+      if (fn.length > 0) {
+        return attemptAsync(fn);
+      } else {
+        attemptSync(fn);
+      }
+    }
+
+    var runnerDone = iterativeIndex >= length;
+
+    if (runnerDone) {
+      this.clearStack(this.onComplete);
+    }
+
+    function attemptSync(fn) {
+      try {
+        fn.call(self.userContext);
+      } catch (e) {
+        handleException(e);
+      }
+    }
+
+    function attemptAsync(fn) {
+      var next = function () { self.run(fns, iterativeIndex + 1); };
+
+      try {
+        fn.call(self.userContext, next);
+      } catch (e) {
+        handleException(e);
+        next();
+      }
+    }
+
+    function handleException(e) {
+      self.onException(e);
+      if (!self.catchException(e)) {
+        //TODO: set a var when we catch an exception and
+        //use a finally block to close the loop in a nice way..
+        throw e;
+      }
+    }
+  };
+
+  return QueueRunner;
+};
+
+getJasmineRequireObj().ReportDispatcher = function() {
+  function ReportDispatcher(methods) {
+
+    var dispatchedMethods = methods || [];
+
+    for (var i = 0; i < dispatchedMethods.length; i++) {
+      var method = dispatchedMethods[i];
+      this[method] = (function(m) {
+        return function() {
+          dispatch(m, arguments);
+        };
+      }(method));
+    }
+
+    var reporters = [];
+
+    this.addReporter = function(reporter) {
+      reporters.push(reporter);
+    };
+
+    return this;
+
+    function dispatch(method, args) {
+      for (var i = 0; i < reporters.length; i++) {
+        var reporter = reporters[i];
+        if (reporter[method]) {
+          reporter[method].apply(reporter, args);
+        }
+      }
+    }
+  }
+
+  return ReportDispatcher;
+};
+
+
+getJasmineRequireObj().SpyStrategy = function() {
+
+  function SpyStrategy(options) {
+    options = options || {};
+
+    var identity = options.name || "unknown",
+        originalFn = options.fn || function() {},
+        getSpy = options.getSpy || function() {},
+        plan = function() {};
+
+    this.identity = function() {
+      return identity;
+    };
+
+    this.exec = function() {
+      return plan.apply(this, arguments);
+    };
+
+    this.callThrough = function() {
+      plan = originalFn;
+      return getSpy();
+    };
+
+    this.returnValue = function(value) {
+      plan = function() {
+        return value;
+      };
+      return getSpy();
+    };
+
+    this.throwError = function(something) {
+      var error = (something instanceof Error) ? something : new Error(something);
+      plan = function() {
+        throw error;
+      };
+      return getSpy();
+    };
+
+    this.callFake = function(fn) {
+      plan = fn;
+      return getSpy();
+    };
+
+    this.stub = function(fn) {
+      plan = function() {};
+      return getSpy();
+    };
+  }
+
+  return SpyStrategy;
+};
+
+getJasmineRequireObj().Suite = function() {
+  function Suite(attrs) {
+    this.env = attrs.env;
+    this.id = attrs.id;
+    this.parentSuite = attrs.parentSuite;
+    this.description = attrs.description;
+    this.onStart = attrs.onStart || function() {};
+    this.resultCallback = attrs.resultCallback || function() {};
+    this.clearStack = attrs.clearStack || function(fn) {fn();};
+
+    this.beforeFns = [];
+    this.afterFns = [];
+    this.queueRunner = attrs.queueRunner || function() {};
+    this.disabled = false;
+
+    this.children = [];
+
+    this.result = {
+      id: this.id,
+      status: this.disabled ? 'disabled' : '',
+      description: this.description,
+      fullName: this.getFullName()
+    };
+  }
+
+  Suite.prototype.getFullName = function() {
+    var fullName = this.description;
+    for (var parentSuite = this.parentSuite; parentSuite; parentSuite = parentSuite.parentSuite) {
+      if (parentSuite.parentSuite) {
+        fullName = parentSuite.description + ' ' + fullName;
+      }
+    }
+    return fullName;
+  };
+
+  Suite.prototype.disable = function() {
+    this.disabled = true;
+  };
+
+  Suite.prototype.beforeEach = function(fn) {
+    this.beforeFns.unshift(fn);
+  };
+
+  Suite.prototype.afterEach = function(fn) {
+    this.afterFns.unshift(fn);
+  };
+
+  Suite.prototype.addChild = function(child) {
+    this.children.push(child);
+  };
+
+  Suite.prototype.execute = function(onComplete) {
+    var self = this;
+    if (this.disabled) {
+      complete();
+      return;
+    }
+
+    var allFns = [];
+
+    for (var i = 0; i < this.children.length; i++) {
+      allFns.push(wrapChildAsAsync(this.children[i]));
+    }
+
+    this.onStart(this);
+
+    this.queueRunner({
+      fns: allFns,
+      onComplete: complete
+    });
+
+    function complete() {
+      self.resultCallback(self.result);
+
+      if (onComplete) {
+        onComplete();
+      }
+    }
+
+    function wrapChildAsAsync(child) {
+      return function(done) { child.execute(done); };
+    }
+  };
+
+  return Suite;
+};
+
+if (typeof window == void 0 && typeof exports == "object") {
+  exports.Suite = jasmineRequire.Suite;
+}
+
+getJasmineRequireObj().Timer = function() {
+  function Timer(options) {
+    options = options || {};
+
+    var now = options.now || function() { return new Date().getTime(); },
+        startTime;
+
+    this.start = function() {
+      startTime = now();
+    };
+
+    this.elapsed = function() {
+      return now() - startTime;
+    };
+  }
+
+  return Timer;
+};
+
+getJasmineRequireObj().matchersUtil = function(j$) {
+  // TODO: what to do about jasmine.pp not being inject? move to JSON.stringify? gut PrettyPrinter?
+
+  return {
+    equals: function(a, b, customTesters) {
+      customTesters = customTesters || [];
+
+      return eq(a, b, [], [], customTesters);
+    },
+
+    contains: function(haystack, needle, customTesters) {
+      customTesters = customTesters || [];
+
+      if (Object.prototype.toString.apply(haystack) === "[object Array]") {
+        for (var i = 0; i < haystack.length; i++) {
+          if (eq(haystack[i], needle, [], [], customTesters)) {
+            return true;
+          }
+        }
+        return false;
+      }
+      return haystack.indexOf(needle) >= 0;
+    },
+
+    buildFailureMessage: function() {
+      var args = Array.prototype.slice.call(arguments, 0),
+        matcherName = args[0],
+        isNot = args[1],
+        actual = args[2],
+        expected = args.slice(3),
+        englishyPredicate = matcherName.replace(/[A-Z]/g, function(s) { return ' ' + s.toLowerCase(); });
+
+      var message = "Expected " +
+        j$.pp(actual) +
+        (isNot ? " not " : " ") +
+        englishyPredicate;
+
+      if (expected.length > 0) {
+        for (var i = 0; i < expected.length; i++) {
+          if (i > 0) {
+            message += ",";
+          }
+          message += " " + j$.pp(expected[i]);
+        }
+      }
+
+      return message + ".";
+    }
+  };
+
+  // Equality function lovingly adapted from isEqual in
+  //   [Underscore](http://underscorejs.org)
+  function eq(a, b, aStack, bStack, customTesters) {
+    var result = true;
+
+    for (var i = 0; i < customTesters.length; i++) {
+      var customTesterResult = customTesters[i](a, b);
+      if (!j$.util.isUndefined(customTesterResult)) {
+        return customTesterResult;
+      }
+    }
+
+    if (a instanceof j$.Any) {
+      result = a.jasmineMatches(b);
+      if (result) {
+        return true;
+      }
+    }
+
+    if (b instanceof j$.Any) {
+      result = b.jasmineMatches(a);
+      if (result) {
+        return true;
+      }
+    }
+
+    if (b instanceof j$.ObjectContaining) {
+      result = b.jasmineMatches(a);
+      if (result) {
+        return true;
+      }
+    }
+
+    if (a instanceof Error && b instanceof Error) {
+      return a.message == b.message;
+    }
+
+    // Identical objects are equal. `0 === -0`, but they aren't identical.
+    // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal).
+    if (a === b) { return a !== 0 || 1 / a == 1 / b; }
+    // A strict comparison is necessary because `null == undefined`.
+    if (a === null || b === null) { return a === b; }
+    var className = Object.prototype.toString.call(a);
+    if (className != Object.prototype.toString.call(b)) { return false; }
+    switch (className) {
+      // Strings, numbers, dates, and booleans are compared by value.
+      case '[object String]':
+        // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is
+        // equivalent to `new String("5")`.
+        return a == String(b);
+      case '[object Number]':
+        // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for
+        // other numeric values.
+        return a != +a ? b != +b : (a === 0 ? 1 / a == 1 / b : a == +b);
+      case '[object Date]':
+      case '[object Boolean]':
+        // Coerce dates and booleans to numeric primitive values. Dates are compared by their
+        // millisecond representations. Note that invalid dates with millisecond representations
+        // of `NaN` are not equivalent.
+        return +a == +b;
+      // RegExps are compared by their source patterns and flags.
+      case '[object RegExp]':
+        return a.source == b.source &&
+          a.global == b.global &&
+          a.multiline == b.multiline &&
+          a.ignoreCase == b.ignoreCase;
+    }
+    if (typeof a != 'object' || typeof b != 'object') { return false; }
+    // Assume equality for cyclic structures. The algorithm for detecting cyclic
+    // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
+    var length = aStack.length;
+    while (length--) {
+      // Linear search. Performance is inversely proportional to the number of
+      // unique nested structures.
+      if (aStack[length] == a) { return bStack[length] == b; }
+    }
+    // Add the first object to the stack of traversed objects.
+    aStack.push(a);
+    bStack.push(b);
+    var size = 0;
+    // Recursively compare objects and arrays.
+    if (className == '[object Array]') {
+      // Compare array lengths to determine if a deep comparison is necessary.
+      size = a.length;
+      result = size == b.length;
+      if (result) {
+        // Deep compare the contents, ignoring non-numeric properties.
+        while (size--) {
+          if (!(result = eq(a[size], b[size], aStack, bStack, customTesters))) { break; }
+        }
+      }
+    } else {
+      // Objects with different constructors are not equivalent, but `Object`s
+      // from different frames are.
+      var aCtor = a.constructor, bCtor = b.constructor;
+      if (aCtor !== bCtor && !(isFunction(aCtor) && (aCtor instanceof aCtor) &&
+        isFunction(bCtor) && (bCtor instanceof bCtor))) {
+        return false;
+      }
+      // Deep compare objects.
+      for (var key in a) {
+        if (has(a, key)) {
+          // Count the expected number of properties.
+          size++;
+          // Deep compare each member.
+          if (!(result = has(b, key) && eq(a[key], b[key], aStack, bStack, customTesters))) { break; }
+        }
+      }
+      // Ensure that both objects contain the same number of properties.
+      if (result) {
+        for (key in b) {
+          if (has(b, key) && !(size--)) { break; }
+        }
+        result = !size;
+      }
+    }
+    // Remove the first object from the stack of traversed objects.
+    aStack.pop();
+    bStack.pop();
+
+    return result;
+
+    function has(obj, key) {
+      return obj.hasOwnProperty(key);
+    }
+
+    function isFunction(obj) {
+      return typeof obj === 'function';
+    }
+  }
+};
+
+getJasmineRequireObj().toBe = function() {
+  function toBe() {
+    return {
+      compare: function(actual, expected) {
+        return {
+          pass: actual === expected
+        };
+      }
+    };
+  }
+
+  return toBe;
+};
+
+getJasmineRequireObj().toBeCloseTo = function() {
+
+  function toBeCloseTo() {
+    return {
+      compare: function(actual, expected, precision) {
+        if (precision !== 0) {
+          precision = precision || 2;
+        }
+
+        return {
+          pass: Math.abs(expected - actual) < (Math.pow(10, -precision) / 2)
+        };
+      }
+    };
+  }
+
+  return toBeCloseTo;
+};
+
+getJasmineRequireObj().toBeDefined = function() {
+  function toBeDefined() {
+    return {
+      compare: function(actual) {
+        return {
+          pass: (void 0 !== actual)
+        };
+      }
+    };
+  }
+
+  return toBeDefined;
+};
+
+getJasmineRequireObj().toBeFalsy = function() {
+  function toBeFalsy() {
+    return {
+      compare: function(actual) {
+        return {
+          pass: !!!actual
+        };
+      }
+    };
+  }
+
+  return toBeFalsy;
+};
+
+getJasmineRequireObj().toBeGreaterThan = function() {
+
+  function toBeGreaterThan() {
+    return {
+      compare: function(actual, expected) {
+        return {
+          pass: actual > expected
+        };
+      }
+    };
+  }
+
+  return toBeGreaterThan;
+};
+
+
+getJasmineRequireObj().toBeLessThan = function() {
+  function toBeLessThan() {
+    return {
+
+      compare: function(actual, expected) {
+        return {
+          pass: actual < expected
+        };
+      }
+    };
+  }
+
+  return toBeLessThan;
+};
+getJasmineRequireObj().toBeNaN = function(j$) {
+
+  function toBeNaN() {
+    return {
+      compare: function(actual) {
+        var result = {
+          pass: (actual !== actual)
+        };
+
+        if (result.pass) {
+          result.message = "Expected actual not to be NaN.";
+        } else {
+          result.message = "Expected " + j$.pp(actual) + " to be NaN.";
+        }
+
+        return result;
+      }
+    };
+  }
+
+  return toBeNaN;
+};
+
+getJasmineRequireObj().toBeNull = function() {
+
+  function toBeNull() {
+    return {
+      compare: function(actual) {
+        return {
+          pass: actual === null
+        };
+      }
+    };
+  }
+
+  return toBeNull;
+};
+
+getJasmineRequireObj().toBeTruthy = function() {
+
+  function toBeTruthy() {
+    return {
+      compare: function(actual) {
+        return {
+          pass: !!actual
+        };
+      }
+    };
+  }
+
+  return toBeTruthy;
+};
+
+getJasmineRequireObj().toBeUndefined = function() {
+
+  function toBeUndefined() {
+    return {
+      compare: function(actual) {
+        return {
+          pass: void 0 === actual
+        };
+      }
+    };
+  }
+
+  return toBeUndefined;
+};
+
+getJasmineRequireObj().toContain = function() {
+  function toContain(util, customEqualityTesters) {
+    customEqualityTesters = customEqualityTesters || [];
+
+    return {
+      compare: function(actual, expected) {
+
+        return {
+          pass: util.contains(actual, expected, customEqualityTesters)
+        };
+      }
+    };
+  }
+
+  return toContain;
+};
+
+getJasmineRequireObj().toEqual = function() {
+
+  function toEqual(util, customEqualityTesters) {
+    customEqualityTesters = customEqualityTesters || [];
+
+    return {
+      compare: function(actual, expected) {
+        var result = {
+          pass: false
+        };
+
+        result.pass = util.equals(actual, expected, customEqualityTesters);
+
+        return result;
+      }
+    };
+  }
+
+  return toEqual;
+};
+
+getJasmineRequireObj().toHaveBeenCalled = function(j$) {
+
+  function toHaveBeenCalled() {
+    return {
+      compare: function(actual) {
+        var result = {};
+
+        if (!j$.isSpy(actual)) {
+          throw new Error('Expected a spy, but got ' + j$.pp(actual) + '.');
+        }
+
+        if (arguments.length > 1) {
+          throw new Error('toHaveBeenCalled does not take arguments, use toHaveBeenCalledWith');
+        }
+
+        result.pass = actual.calls.any();
+
+        result.message = result.pass ?
+          "Expected spy " + actual.and.identity() + " not to have been called." :
+          "Expected spy " + actual.and.identity() + " to have been called.";
+
+        return result;
+      }
+    };
+  }
+
+  return toHaveBeenCalled;
+};
+
+getJasmineRequireObj().toHaveBeenCalledWith = function(j$) {
+
+  function toHaveBeenCalledWith(util) {
+    return {
+      compare: function() {
+        var args = Array.prototype.slice.call(arguments, 0),
+          actual = args[0],
+          expectedArgs = args.slice(1),
+          result = { pass: false };
+
+        if (!j$.isSpy(actual)) {
+          throw new Error('Expected a spy, but got ' + j$.pp(actual) + '.');
+        }
+
+        if (!actual.calls.any()) {
+          result.message = "Expected spy " + actual.and.identity() + " to have been called with " + j$.pp(expectedArgs) + " but it was never called.";
+          return result;
+        }
+
+        if (util.contains(actual.calls.allArgs(), expectedArgs)) {
+          result.pass = true;
+          result.message = "Expected spy " + actual.and.identity() + " not to have been called with " + j$.pp(expectedArgs) + " but it was.";
+        } else {
+          result.message = "Expected spy " + actual.and.identity() + " to have been called with " + j$.pp(expectedArgs) + " but actual calls were " + j$.pp(actual.calls.allArgs()).replace(/^\[ | \]$/g, '') + ".";
+        }
+
+        return result;
+      }
+    };
+  }
+
+  return toHaveBeenCalledWith;
+};
+
+getJasmineRequireObj().toMatch = function() {
+
+  function toMatch() {
+    return {
+      compare: function(actual, expected) {
+        var regexp = new RegExp(expected);
+
+        return {
+          pass: regexp.test(actual)
+        };
+      }
+    };
+  }
+
+  return toMatch;
+};
+
+getJasmineRequireObj().toThrow = function(j$) {
+
+  function toThrow(util) {
+    return {
+      compare: function(actual, expected) {
+        var result = { pass: false },
+          threw = false,
+          thrown;
+
+        if (typeof actual != "function") {
+          throw new Error("Actual is not a Function");
+        }
+
+        try {
+          actual();
+        } catch (e) {
+          threw = true;
+          thrown = e;
+        }
+
+        if (!threw) {
+          result.message = "Expected function to throw an exception.";
+          return result;
+        }
+
+        if (arguments.length == 1) {
+          result.pass = true;
+          result.message = "Expected function not to throw, but it threw " + j$.pp(thrown) + ".";
+
+          return result;
+        }
+
+        if (util.equals(thrown, expected)) {
+          result.pass = true;
+          result.message = "Expected function not to throw " + j$.pp(expected) + ".";
+        } else {
+          result.message = "Expected function to throw " + j$.pp(expected) + ", but it threw " +  j$.pp(thrown) + ".";
+        }
+
+        return result;
+      }
+    };
+  }
+
+  return toThrow;
+};
+
+getJasmineRequireObj().toThrowError = function(j$) {
+  function toThrowError (util) {
+    return {
+      compare: function(actual) {
+        var threw = false,
+          thrown,
+          errorType,
+          message,
+          regexp,
+          name,
+          constructorName;
+
+        if (typeof actual != "function") {
+          throw new Error("Actual is not a Function");
+        }
+
+        extractExpectedParams.apply(null, arguments);
+
+        try {
+          actual();
+        } catch (e) {
+          threw = true;
+          thrown = e;
+        }
+
+        if (!threw) {
+          return fail("Expected function to throw an Error.");
+        }
+
+        if (!(thrown instanceof Error)) {
+          return fail("Expected function to throw an Error, but it threw " + thrown + ".");
+        }
+
+        if (arguments.length == 1) {
+          return pass("Expected function not to throw an Error, but it threw " + fnNameFor(thrown) + ".");
+        }
+
+        if (errorType) {
+          name = fnNameFor(errorType);
+          constructorName = fnNameFor(thrown.constructor);
+        }
+
+        if (errorType && message) {
+          if (thrown.constructor == errorType && util.equals(thrown.message, message)) {
+            return pass("Expected function not to throw " + name + " with message \"" + message + "\".");
+          } else {
+            return fail("Expected function to throw " + name + " with message \"" + message +
+                        "\", but it threw " + constructorName + " with message \"" + thrown.message + "\".");
+          }
+        }
+
+        if (errorType && regexp) {
+          if (thrown.constructor == errorType && regexp.test(thrown.message)) {
+            return pass("Expected function not to throw " + name + " with message matching " + regexp + ".");
+          } else {
+            return fail("Expected function to throw " + name + " with message matching " + regexp +
+                        ", but it threw " + constructorName + " with message \"" + thrown.message + "\".");
+          }
+        }
+
+        if (errorType) {
+          if (thrown.constructor == errorType) {
+            return pass("Expected function not to throw " + name + ".");
+          } else {
+            return fail("Expected function to throw " + name + ", but it threw " + constructorName + ".");
+          }
+        }
+
+        if (message) {
+          if (thrown.message == message) {
+            return pass("Expected function not to throw an exception with message " + j$.pp(message) + ".");
+          } else {
+            return fail("Expected function to throw an exception with message " + j$.pp(message) +
+                        ", but it threw an exception with message " + j$.pp(thrown.message) + ".");
+          }
+        }
+
+        if (regexp) {
+          if (regexp.test(thrown.message)) {
+            return pass("Expected function not to throw an exception with a message matching " + j$.pp(regexp) + ".");
+          } else {
+            return fail("Expected function to throw an exception with a message matching " + j$.pp(regexp) +
+                        ", but it threw an exception with message " + j$.pp(thrown.message) + ".");
+          }
+        }
+
+        function fnNameFor(func) {
+            return func.name || func.toString().match(/^\s*function\s*(\w*)\s*\(/)[1];
+        }
+
+        function pass(notMessage) {
+          return {
+            pass: true,
+            message: notMessage
+          };
+        }
+
+        function fail(message) {
+          return {
+            pass: false,
+            message: message
+          };
+        }
+
+        function extractExpectedParams() {
+          if (arguments.length == 1) {
+            return;
+          }
+
+          if (arguments.length == 2) {
+            var expected = arguments[1];
+
+            if (expected instanceof RegExp) {
+              regexp = expected;
+            } else if (typeof expected == "string") {
+              message = expected;
+            } else if (checkForAnErrorType(expected)) {
+              errorType = expected;
+            }
+
+            if (!(errorType || message || regexp)) {
+              throw new Error("Expected is not an Error, string, or RegExp.");
+            }
+          } else {
+            if (checkForAnErrorType(arguments[1])) {
+              errorType = arguments[1];
+            } else {
+              throw new Error("Expected error type is not an Error.");
+            }
+
+            if (arguments[2] instanceof RegExp) {
+              regexp = arguments[2];
+            } else if (typeof arguments[2] == "string") {
+              message = arguments[2];
+            } else {
+              throw new Error("Expected error message is not a string or RegExp.");
+            }
+          }
+        }
+
+        function checkForAnErrorType(type) {
+          if (typeof type !== "function") {
+            return false;
+          }
+
+          var Surrogate = function() {};
+          Surrogate.prototype = type.prototype;
+          return (new Surrogate()) instanceof Error;
+        }
+      }
+    };
+  }
+
+  return toThrowError;
+};
+
+getJasmineRequireObj().version = function() {
+  return "2.0.0";
+};
diff --git a/app/assets/javascripts/mock-ajax.js b/app/assets/javascripts/mock-ajax.js
new file mode 100644
index 000000000..966033263
--- /dev/null
+++ b/app/assets/javascripts/mock-ajax.js
@@ -0,0 +1,299 @@
+/*
+
+Jasmine-Ajax : a set of helpers for testing AJAX requests under the Jasmine
+BDD framework for JavaScript.
+
+http://github.com/pivotal/jasmine-ajax
+
+Jasmine Home page: http://pivotal.github.com/jasmine
+
+Copyright (c) 2008-2013 Pivotal Labs
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+*/
+
+(function() {
+  function extend(destination, source, propertiesToSkip) {
+    propertiesToSkip = propertiesToSkip || [];
+    for (var property in source) {
+      if (!arrayContains(propertiesToSkip, property)) {
+        destination[property] = source[property];
+      }
+    }
+    return destination;
+  }
+
+  function arrayContains(arr, item) {
+    for (var i = 0; i < arr.length; i++) {
+      if (arr[i] === item) {
+        return true;
+      }
+    }
+    return false;
+  }
+
+  function MockAjax(global) {
+    var requestTracker = new RequestTracker(),
+      stubTracker = new StubTracker(),
+      realAjaxFunction = global.XMLHttpRequest,
+      mockAjaxFunction = fakeRequest(requestTracker, stubTracker);
+
+    this.install = function() {
+      global.XMLHttpRequest = mockAjaxFunction;
+    };
+
+    this.uninstall = function() {
+      global.XMLHttpRequest = realAjaxFunction;
+
+      this.stubs.reset();
+      this.requests.reset();
+    };
+
+    this.stubRequest = function(url, data) {
+      var stub = new RequestStub(url, data);
+      stubTracker.addStub(stub);
+      return stub;
+    };
+
+    this.withMock = function(closure) {
+      this.install();
+      try {
+        closure();
+      } finally {
+        this.uninstall();
+      }
+    };
+
+    this.requests = requestTracker;
+    this.stubs = stubTracker;
+  }
+
+  function StubTracker() {
+    var stubs = [];
+
+    this.addStub = function(stub) {
+      stubs.push(stub);
+    };
+
+    this.reset = function() {
+      stubs = [];
+    };
+
+    this.findStub = function(url, data) {
+      for (var i = stubs.length - 1; i >= 0; i--) {
+        var stub = stubs[i];
+        if (stub.matches(url, data)) {
+          return stub;
+        }
+      }
+    };
+  }
+
+  function fakeRequest(requestTracker, stubTracker) {
+    function FakeXMLHttpRequest() {
+      requestTracker.track(this);
+      this.requestHeaders = {};
+    }
+
+    var iePropertiesThatCannotBeCopied = ['responseBody', 'responseText', 'responseXML', 'status', 'statusText', 'responseTimeout'];
+    extend(FakeXMLHttpRequest.prototype, new window.XMLHttpRequest(), iePropertiesThatCannotBeCopied);
+    extend(FakeXMLHttpRequest.prototype, {
+      open: function() {
+        this.method = arguments[0];
+        this.url = arguments[1];
+        this.username = arguments[3];
+        this.password = arguments[4];
+        this.readyState = 1;
+        this.onreadystatechange();
+      },
+
+      setRequestHeader: function(header, value) {
+        this.requestHeaders[header] = value;
+      },
+
+      abort: function() {
+        this.readyState = 0;
+        this.status = 0;
+        this.statusText = "abort";
+        this.onreadystatechange();
+      },
+
+      readyState: 0,
+
+      onload: function() {
+      },
+
+      onreadystatechange: function(isTimeout) {
+      },
+
+      status: null,
+
+      send: function(data) {
+        this.params = data;
+        this.readyState = 2;
+        this.onreadystatechange();
+
+        var stub = stubTracker.findStub(this.url, data);
+        if (stub) {
+          this.response(stub);
+        }
+      },
+
+      data: function() {
+        var data = {};
+        if (typeof this.params !== 'string') { return data; }
+        var params = this.params.split('&');
+
+        for (var i = 0; i < params.length; ++i) {
+          var kv = params[i].replace(/\+/g, ' ').split('=');
+          var key = decodeURIComponent(kv[0]);
+          data[key] = data[key] || [];
+          data[key].push(decodeURIComponent(kv[1]));
+        }
+        return data;
+      },
+
+      getResponseHeader: function(name) {
+        return this.responseHeaders[name];
+      },
+
+      getAllResponseHeaders: function() {
+        var responseHeaders = [];
+        for (var i in this.responseHeaders) {
+          if (this.responseHeaders.hasOwnProperty(i)) {
+            responseHeaders.push(i + ': ' + this.responseHeaders[i]);
+          }
+        }
+        return responseHeaders.join('\r\n');
+      },
+
+      responseText: null,
+
+      response: function(response) {
+        this.status = response.status;
+        this.statusText = response.statusText || "";
+        this.responseText = response.responseText || "";
+        this.readyState = 4;
+        this.responseHeaders = response.responseHeaders ||
+          {"Content-type": response.contentType || "application/json" };
+
+        this.onload();
+        this.onreadystatechange();
+      },
+
+      responseTimeout: function() {
+        this.readyState = 4;
+        jasmine.clock().tick(30000);
+        this.onreadystatechange('timeout');
+      }
+    });
+
+    return FakeXMLHttpRequest;
+  }
+
+  function RequestTracker() {
+    var requests = [];
+
+    this.track = function(request) {
+      requests.push(request);
+    };
+
+    this.first = function() {
+      return requests[0];
+    };
+
+    this.count = function() {
+      return requests.length;
+    };
+
+    this.reset = function() {
+      requests = [];
+    };
+
+    this.mostRecent = function() {
+      return requests[requests.length - 1];
+    };
+
+    this.at = function(index) {
+      return requests[index];
+    };
+   
+    this.all = function() {
+      return requests.slice(0);
+    };
+
+    this.filter = function(url_to_match) {
+      if (requests.length == 0) return [];
+      var matching_requests = [];
+
+      for (var i = 0; i < requests.length; i++) {
+        if (url_to_match instanceof RegExp &&
+            url_to_match.test(requests[i].url)) {
+            matching_requests.push(requests[i]);
+        } else if (url_to_match instanceof Function &&
+            url_to_match(requests[i])) {
+            matching_requests.push(requests[i]);
+        } else {
+          if (requests[i].url == url_to_match) {
+            matching_requests.push(requests[i]);
+          }
+        }
+      }
+
+      return matching_requests;
+    };
+  }
+
+  function RequestStub(url, stubData) {
+    var split = url.split('?');
+    this.url = split[0];
+
+    var normalizeQuery = function(query) {
+      return query ? query.split('&').sort().join('&') : undefined;
+    };
+
+    this.query = normalizeQuery(split[1]);
+    this.data = normalizeQuery(stubData);
+
+    this.andReturn = function(options) {
+      this.status = options.status || 200;
+
+      this.contentType = options.contentType;
+      this.responseText = options.responseText;
+    };
+
+    this.matches = function(fullUrl, data) {
+      var urlSplit = fullUrl.split('?'),
+          url = urlSplit[0],
+          query = urlSplit[1];
+      return this.url === url && this.query === normalizeQuery(query) && (!this.data || this.data === normalizeQuery(data));
+    };
+  }
+
+  if (typeof window === "undefined" && typeof exports === "object") {
+    exports.MockAjax = MockAjax;
+    jasmine.Ajax = new MockAjax(exports);
+  } else {
+    window.MockAjax = MockAjax;
+    jasmine.Ajax = new MockAjax(window);
+  }
+}());
+
diff --git a/app/assets/javascripts/run-tests.js b/app/assets/javascripts/run-tests.js
new file mode 100644
index 000000000..ad1de1989
--- /dev/null
+++ b/app/assets/javascripts/run-tests.js
@@ -0,0 +1,6 @@
+// Helper for running tests through Karma.
+// Hooks into the test view logic for running tests.
+
+require('initialize');
+TestView = require('views/TestView');
+TestView.runTests();
\ No newline at end of file
diff --git a/app/assets/javascripts/workers/catiline_worker_shim.js b/app/assets/javascripts/workers/catiline_worker_shim.js
deleted file mode 100644
index 38fb64d2a..000000000
--- a/app/assets/javascripts/workers/catiline_worker_shim.js
+++ /dev/null
@@ -1,2 +0,0 @@
-self._noTransferable = true;
-self.onmessage = function(e) { eval(e.data); };
diff --git a/app/assets/javascripts/workers/worker_world.js b/app/assets/javascripts/workers/worker_world.js
index a1c4baf0f..78331cbb8 100644
--- a/app/assets/javascripts/workers/worker_world.js
+++ b/app/assets/javascripts/workers/worker_world.js
@@ -51,20 +51,28 @@ var console = {
         self.postMessage({type: 'console-log', args: args, id: self.workerID});
       }
       catch(error) {
-        self.postMessage({type: 'console-log', args: ["Could not post log: " + args, error.toString(), error.stack, error.stackTrace], id: self.workerID});
+        try {
+          self.postMessage({type: 'console-log', args: ["Could not post log: " + args, error.toString(), error.stack, error.stackTrace], id: self.workerID});
+        }
+        catch(error2) {
+          self.postMessage({type: 'console-log', args: ["Wow, we had a serious problem trying to console.log something."]});
+        }
       }
     }
   }};  // so that we don't crash when debugging statements happen
 console.error = console.warn = console.info = console.debug = console.log;
 self.console = console;
 
-self.importScripts('/javascripts/world.js', '/javascripts/lodash.js', '/javascripts/aether.js');
+self.importScripts('/javascripts/lodash.js', '/javascripts/world.js', '/javascripts/aether.js');
 
-// We could do way more from this: http://stackoverflow.com/questions/10653809/making-webworkers-a-safe-environment
-Object.defineProperty(self, "XMLHttpRequest", {
-  get: function() { throw new Error("Access to XMLHttpRequest is forbidden."); },
-  configurable: false
-});
+var restricted = ["XMLHttpRequest", "importScripts", "Worker"];
+for(var i = 0; i < restricted.length; ++i) {
+  // We could do way more from this: http://stackoverflow.com/questions/10653809/making-webworkers-a-safe-environment
+  Object.defineProperty(self, restricted[i], {
+    get: function() { throw new Error("Access to that global property is forbidden."); },
+    configurable: false
+  });
+}
 
 self.transferableSupported = function transferableSupported() {
   if (typeof self._transferableSupported !== 'undefined') return self._transferableSupported;
@@ -289,6 +297,7 @@ self.setupDebugWorldToRunUntilFrame = function (args) {
             return;
         }
         Math.random = self.debugWorld.rand.randf;  // so user code is predictable
+        Aether.replaceBuiltin("Math", Math);
     }
     self.debugWorld.totalFrames = args.frame; //hack to work around error checking
     self.currentDebugWorldFrame = args.frame;
@@ -343,6 +352,7 @@ self.runWorld = function runWorld(args) {
     return;
   }
   Math.random = self.world.rand.randf;  // so user code is predictable
+  Aether.replaceBuiltin("Math", Math);
   self.postMessage({type: 'start-load-frames'});
   self.world.loadFrames(self.onWorldLoaded, self.onWorldError, self.onWorldLoadProgress);
 };
diff --git a/app/assets/lib/ace/ace.js b/app/assets/lib/ace/ace.js
index 6827f18a3..33f452b9d 100644
--- a/app/assets/lib/ace/ace.js
+++ b/app/assets/lib/ace/ace.js
@@ -1,11 +1 @@
-(function(){function o(e){var i=function(e,t){return r("",e,t)},s=t;e&&(t[e]||(t[e]={}),s=t[e]);if(!s.define||!s.define.packaged)n.original=s.define,s.define=n,s.define.packaged=!0;if(!s.require||!s.require.packaged)r.original=s.require,s.require=i,s.require.packaged=!0}var e="ace",t=function(){return this}();if(!e&&typeof requirejs!="undefined")return;var n=function(e,t,r){if(typeof e!="string"){n.original?n.original.apply(window,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(r=t),n.modules||(n.modules={},n.payloads={}),n.payloads[e]=r,n.modules[e]=null},r=function(e,t,n){if(Object.prototype.toString.call(t)==="[object Array]"){var i=[];for(var o=0,u=t.length;o<u;++o){var a=s(e,t[o]);if(!a&&r.original)return r.original.apply(window,arguments);i.push(a)}n&&n.apply(null,i)}else{if(typeof t=="string"){var f=s(e,t);return!f&&r.original?r.original.apply(window,arguments):(n&&n(),f)}if(r.original)return r.original.apply(window,arguments)}},i=function(e,t){if(t.indexOf("!")!==-1){var n=t.split("!");return i(e,n[0])+"!"+i(e,n[1])}if(t.charAt(0)=="."){var r=e.split("/").slice(0,-1).join("/");t=r+"/"+t;while(t.indexOf(".")!==-1&&s!=t){var s=t;t=t.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return t},s=function(e,t){t=i(e,t);var s=n.modules[t];if(!s){s=n.payloads[t];if(typeof s=="function"){var o={},u={id:t,uri:"",exports:o,packaged:!0},a=function(e,n){return r(t,e,n)},f=s(a,o,u);o=f||u.exports,n.modules[t]=o,delete n.payloads[t]}s=n.modules[t]=o||s}return s};o(e)})(),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/multi_select","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/mode/folding/fold_mode","ace/theme/textmate","ace/config"],function(e,t,n){e("./lib/fixoldbrowsers");var r=e("./lib/dom"),i=e("./lib/event"),s=e("./editor").Editor,o=e("./edit_session").EditSession,u=e("./undomanager").UndoManager,a=e("./virtual_renderer").VirtualRenderer,f=e("./multi_select").MultiSelect;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./mode/folding/fold_mode"),e("./theme/textmate"),t.config=e("./config"),t.require=e,t.edit=function(e){if(typeof e=="string"){var n=e,e=document.getElementById(n);if(!e)throw new Error("ace.edit can't find div #"+n)}if(e.env&&e.env.editor instanceof s)return e.env.editor;var o=t.createEditSession(r.getInnerText(e));e.innerHTML="";var u=new s(new a(e));new f(u),u.setSession(o);var l={document:o,editor:u,onResize:u.resize.bind(u,null)};return i.addListener(window,"resize",l.onResize),u.on("destroy",function(){i.removeListener(window,"resize",l.onResize)}),e.env=u.env=l,u},t.createEditSession=function(e,t){var n=new o(e,t);return n.setUndoManager(new u),n},t.EditSession=o,t.UndoManager=u}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],function(e,t,n){e("./regexp"),e("./es5-shim")}),ace.define("ace/lib/regexp",["require","exports","module"],function(e,t,n){function o(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.extended?"x":"")+(e.sticky?"y":"")}function u(e,t,n){if(Array.prototype.indexOf)return e.indexOf(t,n);for(var r=n||0;r<e.length;r++)if(e[r]===t)return r;return-1}var r={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},i=r.exec.call(/()??/,"")[1]===undefined,s=function(){var e=/^/g;return r.test.call(e,""),!e.lastIndex}();if(s&&i)return;RegExp.prototype.exec=function(e){var t=r.exec.apply(this,arguments),n,a;if(typeof e=="string"&&t){!i&&t.length>1&&u(t,"")>-1&&(a=RegExp(this.source,r.replace.call(o(this),"g","")),r.replace.call(e.slice(t.index),a,function(){for(var e=1;e<arguments.length-2;e++)arguments[e]===undefined&&(t[e]=undefined)}));if(this._xregexp&&this._xregexp.captureNames)for(var f=1;f<t.length;f++)n=this._xregexp.captureNames[f-1],n&&(t[n]=t[f]);!s&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--}return t},s||(RegExp.prototype.test=function(e){var t=r.exec.call(this,e);return t&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--,!!t})}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(e,t,n){function r(){}function w(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(t){}}function H(e){return e=+e,e!==e?e=0:e!==0&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}function B(e){var t=typeof e;return e===null||t==="undefined"||t==="boolean"||t==="number"||t==="string"}function j(e){var t,n,r;if(B(e))return e;n=e.valueOf;if(typeof n=="function"){t=n.call(e);if(B(t))return t}r=e.toString;if(typeof r=="function"){t=r.call(e);if(B(t))return t}throw new TypeError}Function.prototype.bind||(Function.prototype.bind=function(t){var n=this;if(typeof n!="function")throw new TypeError("Function.prototype.bind called on incompatible "+n);var i=u.call(arguments,1),s=function(){if(this instanceof s){var e=n.apply(this,i.concat(u.call(arguments)));return Object(e)===e?e:this}return n.apply(t,i.concat(u.call(arguments)))};return n.prototype&&(r.prototype=n.prototype,s.prototype=new r,r.prototype=null),s});var i=Function.prototype.call,s=Array.prototype,o=Object.prototype,u=s.slice,a=i.bind(o.toString),f=i.bind(o.hasOwnProperty),l,c,h,p,d;if(d=f(o,"__defineGetter__"))l=i.bind(o.__defineGetter__),c=i.bind(o.__defineSetter__),h=i.bind(o.__lookupGetter__),p=i.bind(o.__lookupSetter__);if([1,2].splice(0).length!=2)if(!function(){function e(e){var t=new Array(e+2);return t[0]=t[1]=0,t}var t=[],n;t.splice.apply(t,e(20)),t.splice.apply(t,e(26)),n=t.length,t.splice(5,0,"XXX"),n+1==t.length;if(n+1==t.length)return!0}())Array.prototype.splice=function(e,t){var n=this.length;e>0?e>n&&(e=n):e==void 0?e=0:e<0&&(e=Math.max(n+e,0)),e+t<n||(t=n-e);var r=this.slice(e,e+t),i=u.call(arguments,2),s=i.length;if(e===n)s&&this.push.apply(this,i);else{var o=Math.min(t,n-e),a=e+o,f=a+s-o,l=n-a,c=n-o;if(f<a)for(var h=0;h<l;++h)this[f+h]=this[a+h];else if(f>a)for(h=l;h--;)this[f+h]=this[a+h];if(s&&e===c)this.length=c,this.push.apply(this,i);else{this.length=c+s;for(h=0;h<s;++h)this[e+h]=i[h]}}return r};else{var v=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?v.apply(this,[e===void 0?0:e,t===void 0?this.length-e:t].concat(u.call(arguments,2))):[]}}Array.isArray||(Array.isArray=function(t){return a(t)=="[object Array]"});var m=Object("a"),g=m[0]!="a"||!(0 in m);Array.prototype.forEach||(Array.prototype.forEach=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=arguments[1],s=-1,o=r.length>>>0;if(a(t)!="[object Function]")throw new TypeError;while(++s<o)s in r&&t.call(i,r[s],s,n)}),Array.prototype.map||(Array.prototype.map=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0,s=Array(i),o=arguments[1];if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");for(var u=0;u<i;u++)u in r&&(s[u]=t.call(o,r[u],u,n));return s}),Array.prototype.filter||(Array.prototype.filter=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0,s=[],o,u=arguments[1];if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");for(var f=0;f<i;f++)f in r&&(o=r[f],t.call(u,o,f,n)&&s.push(o));return s}),Array.prototype.every||(Array.prototype.every=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0,s=arguments[1];if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");for(var o=0;o<i;o++)if(o in r&&!t.call(s,r[o],o,n))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0,s=arguments[1];if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");for(var o=0;o<i;o++)if(o in r&&t.call(s,r[o],o,n))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0;if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");if(!i&&arguments.length==1)throw new TypeError("reduce of empty array with no initial value");var s=0,o;if(arguments.length>=2)o=arguments[1];else do{if(s in r){o=r[s++];break}if(++s>=i)throw new TypeError("reduce of empty array with no initial value")}while(!0);for(;s<i;s++)s in r&&(o=t.call(void 0,o,r[s],s,n));return o}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0;if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");if(!i&&arguments.length==1)throw new TypeError("reduceRight of empty array with no initial value");var s,o=i-1;if(arguments.length>=2)s=arguments[1];else do{if(o in r){s=r[o--];break}if(--o<0)throw new TypeError("reduceRight of empty array with no initial value")}while(!0);do o in this&&(s=t.call(void 0,s,r[o],o,n));while(o--);return s});if(!Array.prototype.indexOf||[0,1].indexOf(1,2)!=-1)Array.prototype.indexOf=function(t){var n=g&&a(this)=="[object String]"?this.split(""):F(this),r=n.length>>>0;if(!r)return-1;var i=0;arguments.length>1&&(i=H(arguments[1])),i=i>=0?i:Math.max(0,r+i);for(;i<r;i++)if(i in n&&n[i]===t)return i;return-1};if(!Array.prototype.lastIndexOf||[0,1].lastIndexOf(0,-3)!=-1)Array.prototype.lastIndexOf=function(t){var n=g&&a(this)=="[object String]"?this.split(""):F(this),r=n.length>>>0;if(!r)return-1;var i=r-1;arguments.length>1&&(i=Math.min(i,H(arguments[1]))),i=i>=0?i:r-Math.abs(i);for(;i>=0;i--)if(i in n&&t===n[i])return i;return-1};Object.getPrototypeOf||(Object.getPrototypeOf=function(t){return t.__proto__||(t.constructor?t.constructor.prototype:o)});if(!Object.getOwnPropertyDescriptor){var y="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(t,n){if(typeof t!="object"&&typeof t!="function"||t===null)throw new TypeError(y+t);if(!f(t,n))return;var r,i,s;r={enumerable:!0,configurable:!0};if(d){var u=t.__proto__;t.__proto__=o;var i=h(t,n),s=p(t,n);t.__proto__=u;if(i||s)return i&&(r.get=i),s&&(r.set=s),r}return r.value=t[n],r}}Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(t){return Object.keys(t)});if(!Object.create){var b;Object.prototype.__proto__===null?b=function(){return{__proto__:null}}:b=function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(t,n){var r;if(t===null)r=b();else{if(typeof t!="object")throw new TypeError("typeof prototype["+typeof t+"] != 'object'");var i=function(){};i.prototype=t,r=new i,r.__proto__=t}return n!==void 0&&Object.defineProperties(r,n),r}}if(Object.defineProperty){var E=w({}),S=typeof document=="undefined"||w(document.createElement("div"));if(!E||!S)var x=Object.defineProperty}if(!Object.defineProperty||x){var T="Property description must be an object: ",N="Object.defineProperty called on non-object: ",C="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(t,n,r){if(typeof t!="object"&&typeof t!="function"||t===null)throw new TypeError(N+t);if(typeof r!="object"&&typeof r!="function"||r===null)throw new TypeError(T+r);if(x)try{return x.call(Object,t,n,r)}catch(i){}if(f(r,"value"))if(d&&(h(t,n)||p(t,n))){var s=t.__proto__;t.__proto__=o,delete t[n],t[n]=r.value,t.__proto__=s}else t[n]=r.value;else{if(!d)throw new TypeError(C);f(r,"get")&&l(t,n,r.get),f(r,"set")&&c(t,n,r.set)}return t}}Object.defineProperties||(Object.defineProperties=function(t,n){for(var r in n)f(n,r)&&Object.defineProperty(t,r,n[r]);return t}),Object.seal||(Object.seal=function(t){return t}),Object.freeze||(Object.freeze=function(t){return t});try{Object.freeze(function(){})}catch(k){Object.freeze=function(t){return function(n){return typeof n=="function"?n:t(n)}}(Object.freeze)}Object.preventExtensions||(Object.preventExtensions=function(t){return t}),Object.isSealed||(Object.isSealed=function(t){return!1}),Object.isFrozen||(Object.isFrozen=function(t){return!1}),Object.isExtensible||(Object.isExtensible=function(t){if(Object(t)===t)throw new TypeError;var n="";while(f(t,n))n+="?";t[n]=!0;var r=f(t,n);return delete t[n],r});if(!Object.keys){var L=!0,A=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],O=A.length;for(var M in{toString:null})L=!1;Object.keys=function I(e){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError("Object.keys called on a non-object");var I=[];for(var t in e)f(e,t)&&I.push(t);if(L)for(var n=0,r=O;n<r;n++){var i=A[n];f(e,i)&&I.push(i)}return I}}Date.now||(Date.now=function(){return(new Date).getTime()});var _="	\n\f\r   ᠎              \u2028\u2029";if(!String.prototype.trim||_.trim()){_="["+_+"]";var D=new RegExp("^"+_+_+"*"),P=new RegExp(_+_+"*$");String.prototype.trim=function(){return String(this).replace(D,"").replace(P,"")}}var F=function(e){if(e==null)throw new TypeError("can't convert "+e+" to object");return Object(e)}}),ace.define("ace/lib/dom",["require","exports","module"],function(e,t,n){if(typeof document=="undefined")return;var r="http://www.w3.org/1999/xhtml";t.getDocumentHead=function(e){return e||(e=document),e.head||e.getElementsByTagName("head")[0]||e.documentElement},t.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||r,e):document.createElement(e)},t.hasCssClass=function(e,t){var n=e.className.split(/\s+/g);return n.indexOf(t)!==-1},t.addCssClass=function(e,n){t.hasCssClass(e,n)||(e.className+=" "+n)},t.removeCssClass=function(e,t){var n=e.className.split(/\s+/g);for(;;){var r=n.indexOf(t);if(r==-1)break;n.splice(r,1)}e.className=n.join(" ")},t.toggleCssClass=function(e,t){var n=e.className.split(/\s+/g),r=!0;for(;;){var i=n.indexOf(t);if(i==-1)break;r=!1,n.splice(i,1)}return r&&n.push(t),e.className=n.join(" "),r},t.setCssClass=function(e,n,r){r?t.addCssClass(e,n):t.removeCssClass(e,n)},t.hasCssString=function(e,t){var n=0,r;t=t||document;if(t.createStyleSheet&&(r=t.styleSheets)){while(n<r.length)if(r[n++].owningElement.id===e)return!0}else if(r=t.getElementsByTagName("style"))while(n<r.length)if(r[n++].id===e)return!0;return!1},t.importCssString=function(n,i,s){s=s||document;if(i&&t.hasCssString(i,s))return null;var o;s.createStyleSheet?(o=s.createStyleSheet(),o.cssText=n,i&&(o.owningElement.id=i)):(o=s.createElementNS?s.createElementNS(r,"style"):s.createElement("style"),o.appendChild(s.createTextNode(n)),i&&(o.id=i),t.getDocumentHead(s).appendChild(o))},t.importCssStylsheet=function(e,n){if(n.createStyleSheet)n.createStyleSheet(e);else{var r=t.createElement("link");r.rel="stylesheet",r.href=e,t.getDocumentHead(n).appendChild(r)}},t.getInnerWidth=function(e){return parseInt(t.computedStyle(e,"paddingLeft"),10)+parseInt(t.computedStyle(e,"paddingRight"),10)+e.clientWidth},t.getInnerHeight=function(e){return parseInt(t.computedStyle(e,"paddingTop"),10)+parseInt(t.computedStyle(e,"paddingBottom"),10)+e.clientHeight},window.pageYOffset!==undefined?(t.getPageScrollTop=function(){return window.pageYOffset},t.getPageScrollLeft=function(){return window.pageXOffset}):(t.getPageScrollTop=function(){return document.body.scrollTop},t.getPageScrollLeft=function(){return document.body.scrollLeft}),window.getComputedStyle?t.computedStyle=function(e,t){return t?(window.getComputedStyle(e,"")||{})[t]||"":window.getComputedStyle(e,"")||{}}:t.computedStyle=function(e,t){return t?e.currentStyle[t]:e.currentStyle},t.scrollbarWidth=function(e){var n=t.createElement("ace_inner");n.style.width="100%",n.style.minWidth="0px",n.style.height="200px",n.style.display="block";var r=t.createElement("ace_outer"),i=r.style;i.position="absolute",i.left="-10000px",i.overflow="hidden",i.width="200px",i.minWidth="0px",i.height="150px",i.display="block",r.appendChild(n);var s=e.documentElement;s.appendChild(r);var o=n.offsetWidth;i.overflow="scroll";var u=n.offsetWidth;return o==u&&(u=r.clientWidth),s.removeChild(r),o-u},t.setInnerHtml=function(e,t){var n=e.cloneNode(!1);return n.innerHTML=t,e.parentNode.replaceChild(n,e),n},"textContent"in document.documentElement?(t.setInnerText=function(e,t){e.textContent=t},t.getInnerText=function(e){return e.textContent}):(t.setInnerText=function(e,t){e.innerText=t},t.getInnerText=function(e){return e.innerText}),t.getParentWindow=function(e){return e.defaultView||e.parentWindow}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent","ace/lib/dom"],function(e,t,n){function o(e,t,n){var s=0;!i.isOpera||"KeyboardEvent"in window||!i.isMac?s=0|(t.ctrlKey?1:0)|(t.altKey?2:0)|(t.shiftKey?4:0)|(t.metaKey?8:0):s=0|(t.metaKey?1:0)|(t.altKey?2:0)|(t.shiftKey?4:0)|(t.ctrlKey?8:0);if(!i.isMac&&u){if(u[91]||u[92])s|=8;if(u.altGr){if((3&s)==3)return;u.altGr=0}if(n===18||n===17){var o=t.location||t.keyLocation;if(n===17&&o===1)a=t.timeStamp;else if(n===18&&s===3&&o===2){var f=-a;a=t.timeStamp,f+=a,f<3&&(u.altGr=!0)}}}if(n in r.MODIFIER_KEYS){switch(r.MODIFIER_KEYS[n]){case"Alt":s=2;break;case"Shift":s=4;break;case"Ctrl":s=1;break;default:s=8}n=0}s&8&&(n===91||n===93)&&(n=0);if(!s&&n===13)if(t.location||t.keyLocation===3){e(t,s,-n);if(t.defaultPrevented)return}return!!s||n in r.FUNCTION_KEYS||n in r.PRINTABLE_KEYS?e(t,s,n):!1}var r=e("./keys"),i=e("./useragent"),s=e("./dom");t.addListener=function(e,t,n){if(e.addEventListener)return e.addEventListener(t,n,!1);if(e.attachEvent){var r=function(){n.call(e,window.event)};n._wrapper=r,e.attachEvent("on"+t,r)}},t.removeListener=function(e,t,n){if(e.removeEventListener)return e.removeEventListener(t,n,!1);e.detachEvent&&e.detachEvent("on"+t,n._wrapper||n)},t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},t.preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},t.getButton=function(e){return e.type=="dblclick"?0:e.type=="contextmenu"||e.ctrlKey&&i.isMac?2:e.preventDefault?e.button:{1:0,2:2,4:1}[e.button]},t.capture=function(e,n,r){function i(e){n&&n(e),r&&r(e),t.removeListener(document,"mousemove",n,!0),t.removeListener(document,"mouseup",i,!0),t.removeListener(document,"dragstart",i,!0)}t.addListener(document,"mousemove",n,!0),t.addListener(document,"mouseup",i,!0),t.addListener(document,"dragstart",i,!0)},t.addMouseWheelListener=function(e,n){if("onmousewheel"in e){var r=8;t.addListener(e,"mousewheel",function(e){e.wheelDeltaX!==undefined?(e.wheelX=-e.wheelDeltaX/r,e.wheelY=-e.wheelDeltaY/r):(e.wheelX=0,e.wheelY=-e.wheelDelta/r),n(e)})}else"onwheel"in e?t.addListener(e,"wheel",function(e){e.wheelX=(e.deltaX||0)*5,e.wheelY=(e.deltaY||0)*5,n(e)}):t.addListener(e,"DOMMouseScroll",function(e){e.axis&&e.axis==e.HORIZONTAL_AXIS?(e.wheelX=(e.detail||0)*5,e.wheelY=0):(e.wheelX=0,e.wheelY=(e.detail||0)*5),n(e)})},t.addMultiMouseDownListener=function(e,n,r,s){var o=0,u,a,f,l={2:"dblclick",3:"tripleclick",4:"quadclick"};t.addListener(e,"mousedown",function(e){t.getButton(e)!=0?o=0:e.detail>1?(o++,o>4&&(o=1)):o=1;if(i.isIE){var n=Math.abs(e.clientX-u)>5||Math.abs(e.clientY-a)>5;n&&(o=1),o==1&&(u=e.clientX,a=e.clientY)}r[s]("mousedown",e);if(o>4)o=0;else if(o>1)return r[s](l[o],e)}),i.isOldIE&&t.addListener(e,"dblclick",function(e){o=2,f&&clearTimeout(f),f=setTimeout(function(){f=null},n[o-1]||600),r[s]("mousedown",e),r[s](l[o],e)})};var u=null,a=0;t.addCommandKeyListener=function(e,n){var r=t.addListener;if(i.isOldGecko||i.isOpera&&!("KeyboardEvent"in window)){var s=null;r(e,"keydown",function(e){s=e.keyCode}),r(e,"keypress",function(e){return o(n,e,s)})}else{var a=null;r(e,"keydown",function(e){u[e.keyCode]=!0;var t=o(n,e,e.keyCode);return a=e.defaultPrevented,t}),r(e,"keypress",function(e){a&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),a=null)}),r(e,"keyup",function(e){u[e.keyCode]=null}),u||(u=Object.create(null),r(window,"focus",function(e){u=Object.create(null)}))}};if(window.postMessage&&!i.isOldIE){var f=1;t.nextTick=function(e,n){n=n||window;var r="zero-timeout-message-"+f;t.addListener(n,"message",function i(s){s.data==r&&(t.stopPropagation(s),t.removeListener(n,"message",i),e())}),n.postMessage(r,"*")}}t.nextFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame,t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(e,t,n){var r=e("./oop"),i=function(){var e={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,meta:8,command:8,cmd:8},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",188:",",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"}};for(var t in e.FUNCTION_KEYS){var n=e.FUNCTION_KEYS[t].toLowerCase();e[n]=parseInt(t,10)}return r.mixin(e,e.MODIFIER_KEYS),r.mixin(e,e.PRINTABLE_KEYS),r.mixin(e,e.FUNCTION_KEYS),e.enter=e["return"],e.escape=e.esc,e.del=e["delete"],e[173]="-",e}();r.mixin(t,i),t.keyCodeToString=function(e){return(i[e]||String.fromCharCode(e)).toLowerCase()}}),ace.define("ace/lib/oop",["require","exports","module"],function(e,t,n){t.inherits=function(){var e=Object.create||function(e,t){var n=function(){};n.prototype=e,object=new n,object.__proto__=e,typeof t!="undefined"&&Object.defineProperties&&Object.defineProperties(object,t)};return function(t,n){t.super_=n,t.prototype=e(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}}(),t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}}),ace.define("ace/lib/useragent",["require","exports","module"],function(e,t,n){t.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS};if(typeof navigator!="object")return;var r=(navigator.platform.match(/mac|win|linux/i)||["other"])[0].toLowerCase(),i=navigator.userAgent;t.isWin=r=="win",t.isMac=r=="mac",t.isLinux=r=="linux",t.isIE=(navigator.appName=="Microsoft Internet Explorer"||navigator.appName.indexOf("MSAppHost")>=0)&&parseFloat(navigator.userAgent.match(/MSIE ([0-9]+[\.0-9]+)/)[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=window.controllers&&window.navigator.product==="Gecko",t.isOldGecko=t.isGecko&&parseInt((navigator.userAgent.match(/rv\:(\d+)/)||[])[1],10)<4,t.isOpera=window.opera&&Object.prototype.toString.call(window.opera)=="[object Opera]",t.isWebKit=parseFloat(i.split("WebKit/")[1])||undefined,t.isChrome=parseFloat(i.split(" Chrome/")[1])||undefined,t.isAIR=i.indexOf("AdobeAIR")>=0,t.isIPad=i.indexOf("iPad")>=0,t.isTouchPad=i.indexOf("TouchPad")>=0}),ace.define("ace/editor",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config"],function(e,t,n){e("./lib/fixoldbrowsers");var r=e("./lib/oop"),i=e("./lib/dom"),s=e("./lib/lang"),o=e("./lib/useragent"),u=e("./keyboard/textinput").TextInput,a=e("./mouse/mouse_handler").MouseHandler,f=e("./mouse/fold_handler").FoldHandler,l=e("./keyboard/keybinding").KeyBinding,c=e("./edit_session").EditSession,h=e("./search").Search,p=e("./range").Range,d=e("./lib/event_emitter").EventEmitter,v=e("./commands/command_manager").CommandManager,m=e("./commands/default_commands").commands,g=e("./config"),y=function(e,t){var n=e.getContainerElement();this.container=n,this.renderer=e,this.commands=new v(o.isMac?"mac":"win",m),this.textInput=new u(e.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.keyBinding=new l(this),this.$mouseHandler=new a(this),new f(this),this.$blockScrolling=0,this.$search=(new h).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=s.delayedCall(function(){this._signal("input",{}),this.session.bgTokenizer&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(e,t){t._$emitInputEvent.schedule(31)}),this.setSession(t||new c("")),g.resetOptions(this),g._emit("editor",this)};(function(){r.implement(this,d),this.$initOperationListeners=function(){function e(e){return e[e.length-1]}this.selections=[],this.commands.on("exec",function(t){this.startOperation(t);var n=t.command;if(n.group=="fileJump"){var r=this.prevOp;if(!r||r.command.group!="fileJump")this.lastFileJumpPos=e(this.selections)}else this.lastFileJumpPos=null}.bind(this),!0),this.commands.on("afterExec",function(e){var t=e.command;if(t.group=="fileJump"&&this.lastFileJumpPos&&!this.curOp.selectionChanged){this.selection.fromJSON(this.lastFileJumpPos);return}this.endOperation(e)}.bind(this),!0),this.$opResetTimer=s.delayedCall(this.endOperation.bind(this)),this.on("change",function(){this.curOp||this.startOperation(),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||this.startOperation(),this.curOp.selectionChanged=!0}.bind(this),!0)},this.curOp=null,this.prevOp={},this.startOperation=function(e){if(this.curOp){if(!e||this.curOp.command)return;this.prevOp=this.curOp}e||(this.previousCommand=null,e={}),this.$opResetTimer.schedule(),this.curOp={command:e.command||{},args:e.args};var t=this.curOp.command;t&&t.scrollIntoView&&this.$blockScrolling++,this.selections.push(this.selection.toJSON())},this.endOperation=function(){if(this.curOp){var e=this.curOp.command;if(e&&e.scrollIntoView){this.$blockScrolling--;switch(e.scrollIntoView){case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":this.renderer.scrollCursorIntoView();break;default:}}this.prevOp=this.curOp,this.curOp=null}},this.$historyTracker=function(e){if(!this.$mergeUndoDeltas)return;var t=this.prevOp,n=["backspace","del","insertstring"],r=t.command&&e.command.name==t.command.name;if(e.command.name=="insertstring"){var i=e.args;this.mergeNextCommand===undefined&&(this.mergeNextCommand=!0),r=r&&this.mergeNextCommand&&(!/\s/.test(i)||/\s/.test(t.args)),this.mergeNextCommand=!0}else r=r&&n.indexOf(e.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(r=!1),r?this.session.mergeUndoDeltas=!0:n.indexOf(e.command.name)!==-1&&(this.sequenceStartTime=Date.now())},this.setKeyboardHandler=function(e){if(!e)this.keyBinding.setKeyboardHandler(null);else if(typeof e=="string"){this.$keybindingId=e;var t=this;g.loadModule(["keybinding",e],function(n){t.$keybindingId==e&&t.keyBinding.setKeyboardHandler(n&&n.handler)})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e)},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(e){if(this.session==e)return;if(this.session){var t=this.session;this.session.removeEventListener("change",this.$onDocumentChange),this.session.removeEventListener("changeMode",this.$onChangeMode),this.session.removeEventListener("tokenizerUpdate",this.$onTokenizerUpdate),this.session.removeEventListener("changeTabSize",this.$onChangeTabSize),this.session.removeEventListener("changeWrapLimit",this.$onChangeWrapLimit),this.session.removeEventListener("changeWrapMode",this.$onChangeWrapMode),this.session.removeEventListener("onChangeFold",this.$onChangeFold),this.session.removeEventListener("changeFrontMarker",this.$onChangeFrontMarker),this.session.removeEventListener("changeBackMarker",this.$onChangeBackMarker),this.session.removeEventListener("changeBreakpoint",this.$onChangeBreakpoint),this.session.removeEventListener("changeAnnotation",this.$onChangeAnnotation),this.session.removeEventListener("changeOverwrite",this.$onCursorChange),this.session.removeEventListener("changeScrollTop",this.$onScrollTopChange),this.session.removeEventListener("changeScrollLeft",this.$onScrollLeftChange);var n=this.session.getSelection();n.removeEventListener("changeCursor",this.$onCursorChange),n.removeEventListener("changeSelection",this.$onSelectionChange)}this.session=e,this.$onDocumentChange=this.onDocumentChange.bind(this),e.addEventListener("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.addEventListener("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.addEventListener("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.addEventListener("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.addEventListener("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.addEventListener("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.addEventListener("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.addEventListener("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.addEventListener("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.addEventListener("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.addEventListener("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.addEventListener("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.addEventListener("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.addEventListener("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.addEventListener("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.addEventListener("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.$blockScrolling+=1,this.onCursorChange(),this.$blockScrolling-=1,this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull(),this._emit("changeSession",{session:e,oldSession:t})},this.getSession=function(){return this.session},this.setValue=function(e,t){return this.session.doc.setValue(e),t?t==1?this.navigateFileEnd():t==-1&&this.navigateFileStart():this.selectAll(),e},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e){this.renderer.setTheme(e)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.getFontSize=function(){return this.getOption("fontSize")||i.computedStyle(this.container,"fontSize")},this.setFontSize=function(e){this.setOption("fontSize",e)},this.$highlightBrackets=function(){this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null);if(this.$highlightPending)return;var e=this;this.$highlightPending=!0,setTimeout(function(){e.$highlightPending=!1;var t=e.session.findMatchingBracket(e.getCursorPosition());if(t)var n=new p(t.row,t.column,t.row,t.column+1);else if(e.session.$mode.getMatching)var n=e.session.$mode.getMatching(e.session);n&&(e.session.$bracketHighlight=e.session.addMarker(n,"ace_bracket","text"))},50)},this.focus=function(){var e=this;setTimeout(function(){e.textInput.focus()}),this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(){if(this.$isFocused)return;this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus")},this.onBlur=function(){if(!this.$isFocused)return;this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur")},this.$cursorChange=function(){this.renderer.updateCursor()},this.onDocumentChange=function(e){var t=e.data,n=t.range,r;n.start.row==n.end.row&&t.action!="insertLines"&&t.action!="removeLines"?r=n.end.row:r=Infinity,this.renderer.updateLines(n.start.row,r),this._emit("change",e),this.$cursorChange()},this.onTokenizerUpdate=function(e){var t=e.data;this.renderer.updateLines(t.first,t.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.$cursorChange(),this.$blockScrolling||this.renderer.scrollCursorIntoView(),this.$highlightBrackets(),this.$updateHighlightActiveLine(),this._emit("changeSelection")},this.$updateHighlightActiveLine=function(){var e=this.getSession(),t;if(this.$highlightActiveLine){if(this.$selectionStyle!="line"||!this.selection.isMultiLine())t=this.getCursorPosition();this.renderer.$maxLines&&this.session.getLength()===1&&(t=!1)}if(e.$highlightLineMarker&&!t)e.removeMarker(e.$highlightLineMarker.id),e.$highlightLineMarker=null;else if(!e.$highlightLineMarker&&t){var n=new p(t.row,t.column,t.row,Infinity);n.id=e.addMarker(n,"ace_active-line","screenLine"),e.$highlightLineMarker=n}else t&&(e.$highlightLineMarker.start.row=t.row,e.$highlightLineMarker.end.row=t.row,e.$highlightLineMarker.start.column=t.column,e._emit("changeBackMarker"))},this.onSelectionChange=function(e){var t=this.session;t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null;if(!this.selection.isEmpty()){var n=this.selection.getRange(),r=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,"ace_selection",r)}else this.$updateHighlightActiveLine();var i=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(i),this._emit("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(t.isEmpty()||t.isMultiLine())return;var n=t.start.column-1,r=t.end.column+1,i=e.getLine(t.start.row),s=i.length,o=i.substring(Math.max(n,0),Math.min(r,s));if(n>=0&&/^[\w\d]/.test(o)||r<=s&&/[\w\d]$/.test(o))return;o=i.substring(t.start.column,t.end.column);if(!/^[\w\d]+$/.test(o))return;var u=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:o});return u},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var e=this.getSelectedText();return this._signal("copy",e),e},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(e){if(this.$readOnly)return;this._emit("paste",e),this.insert(e)},this.execCommand=function(e,t){this.commands.exec(e,this,t)},this.insert=function(e){var t=this.session,n=t.getMode(),r=this.getCursorPosition();if(this.getBehavioursEnabled()){var i=n.transformAction(t.getState(r.row),"insertion",this,t,e);i&&(e!==i.text&&(this.session.mergeUndoDeltas=!1,this.$mergeNextCommand=!1),e=i.text)}e=="	"&&(e=this.session.getTabString());if(!this.selection.isEmpty()){var s=this.getSelectionRange();r=this.session.remove(s),this.clearSelection()}else if(this.session.getOverwrite()){var s=new p.fromPoints(r,r);s.end.column+=e.length,this.session.remove(s)}if(e=="\n"||e=="\r\n"){var o=t.getLine(r.row);if(r.column>o.search(/\S|$/)){var u=o.substr(r.column).search(/\S|$/);t.doc.removeInLine(r.row,r.column,r.column+u)}}this.clearSelection();var a=r.column,f=t.getState(r.row),o=t.getLine(r.row),l=n.checkOutdent(f,o,e),c=t.insert(r,e);i&&i.selection&&(i.selection.length==2?this.selection.setSelectionRange(new p(r.row,a+i.selection[0],r.row,a+i.selection[1])):this.selection.setSelectionRange(new p(r.row+i.selection[0],i.selection[1],r.row+i.selection[2],i.selection[3])));if(t.getDocument().isNewLine(e)){var h=n.getNextLineIndent(f,o.slice(0,r.column),t.getTabString());t.insert({row:r.row+1,column:0},h)}l&&n.autoOutdent(f,t,r.row)},this.onTextInput=function(e){this.keyBinding.onTextInput(e)},this.onCommandKey=function(e,t,n){this.keyBinding.onCommandKey(e,t,n)},this.setOverwrite=function(e){this.session.setOverwrite(e)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(e){this.setOption("dragDelay",e)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(e){this.setOption("readOnly",e)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(e){this.selection.isEmpty()&&(e=="left"?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,r=n.getState(t.start.row),i=n.getMode().transformAction(r,"deletion",this,n,t);if(t.end.column==0){var s=n.getTextRange(t);if(s[s.length-1]=="\n"){var o=n.getLine(t.end.row);/^\s+$/.test(o)&&(t.end.column=o.length)}}i&&(t=i)}this.session.remove(t),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},this.transposeLetters=function(){if(!this.selection.isEmpty())return;var e=this.getCursorPosition(),t=e.column;if(t===0)return;var n=this.session.getLine(e.row),r,i;t<n.length?(r=n.charAt(t)+n.charAt(t-1),i=new p(e.row,t-1,e.row,t+1)):(r=n.charAt(t-1)+n.charAt(t-2),i=new p(e.row,t-2,e.row,t)),this.session.replace(i,r)},this.toLowerCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toLowerCase()),this.selection.setSelectionRange(e)},this.toUpperCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toUpperCase()),this.selection.setSelectionRange(e)},this.indent=function(){var e=this.session,t=this.getSelectionRange();if(t.start.row<t.end.row){var n=this.$getSelectedRows();e.indentRows(n.first,n.last,"	");return}if(t.start.column<t.end.column){var r=e.getTextRange(t);if(!/^\s+$/.test(r)){var n=this.$getSelectedRows();e.indentRows(n.first,n.last,"	");return}}var i=e.getLine(t.start.row),o=t.start,u=e.getTabSize(),a=e.documentToScreenColumn(o.row,o.column);if(this.session.getUseSoftTabs())var f=u-a%u,l=s.stringRepeat(" ",f);else{var f=a%u;while(i[t.start.column]==" "&&f)t.start.column--,f--;this.selection.setSelectionRange(t),l="	"}return this.insert(l)},this.blockIndent=function(){var e=this.$getSelectedRows();this.session.indentRows(e.first,e.last,"	")},this.blockOutdent=function(){var e=this.session.getSelection();this.session.outdentRows(e.getRange())},this.sortLines=function(){var e=this.$getSelectedRows(),t=this.session,n=[];for(i=e.first;i<=e.last;i++)n.push(t.getLine(i));n.sort(function(e,t){return e.toLowerCase()<t.toLowerCase()?-1:e.toLowerCase()>t.toLowerCase()?1:0});var r=new p(0,0,0,0);for(var i=e.first;i<=e.last;i++){var s=t.getLine(i);r.start.row=i,r.end.row=i,r.end.column=s.length,t.replace(r,n[i-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},this.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;var r=this.session.getLine(e);while(n.lastIndex<t){var i=n.exec(r);if(i.index<=t&&i.index+i[0].length>=t){var s={value:i[0],start:i.index,end:i.index+i[0].length};return s}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,r=new p(t,n-1,t,n),i=this.session.getTextRange(r);if(!isNaN(parseFloat(i))&&isFinite(i)){var s=this.getNumberAt(t,n);if(s){var o=s.value.indexOf(".")>=0?s.start+s.value.indexOf(".")+1:s.end,u=s.start+s.value.length-o,a=parseFloat(s.value);a*=Math.pow(10,u),o!==s.end&&n<o?e*=Math.pow(10,s.end-n-1):e*=Math.pow(10,s.end-n),a+=e,a/=Math.pow(10,u);var f=a.toFixed(u),l=new p(t,s.start,t,s.end);this.session.replace(l,f),this.moveCursorTo(t,Math.max(s.start+1,n+f.length-s.value.length))}}},this.removeLines=function(){var e=this.$getSelectedRows(),t;e.first===0||e.last+1<this.session.getLength()?t=new p(e.first,0,e.last+1,0):t=new p(e.first-1,this.session.getLine(e.first-1).length,e.last,this.session.getLine(e.last).length),this.session.remove(t),this.clearSelection()},this.duplicateSelection=function(){var e=this.selection,t=this.session,n=e.getRange(),r=e.isBackwards();if(n.isEmpty()){var i=n.start.row;t.duplicateLines(i,i)}else{var s=r?n.start:n.end,o=t.insert(s,t.getTextRange(n),!1);n.start=s,n.end=o,e.setSelectionRange(n,r)}},this.moveLinesDown=function(){this.$moveLines(function(e,t){return this.session.moveLinesDown(e,t)})},this.moveLinesUp=function(){this.$moveLines(function(e,t){return this.session.moveLinesUp(e,t)})},this.moveText=function(e,t,n){return this.session.moveText(e,t,n)},this.copyLinesUp=function(){this.$moveLines(function(e,t){return this.session.duplicateLines(e,t),0})},this.copyLinesDown=function(){this.$moveLines(function(e,t){return this.session.duplicateLines(e,t)})},this.$moveLines=function(e){var t=this.selection;if(!t.inMultiSelectMode||this.inVirtualSelectionMode){var n=t.toOrientedRange(),r=this.$getSelectedRows(n),i=e.call(this,r.first,r.last);n.moveBy(i,0),t.fromOrientedRange(n)}else{var s=t.rangeList.ranges;t.rangeList.detach(this.session);for(var o=s.length;o--;){var u=o,r=s[o].collapseRows(),a=r.end.row,f=r.start.row;while(o--){var r=s[o].collapseRows();if(!(f-r.end.row<=1))break;f=r.end.row}o++;var i=e.call(this,f,a);while(u>=o)s[u].moveBy(i,0),u--}t.fromOrientedRange(t.ranges[0]),t.rangeList.attach(this.session)}},this.$getSelectedRows=function(){var e=this.getSelectionRange().collapseRows();return{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},this.onCompositionStart=function(e){this.renderer.showComposition(this.getCursorPosition())},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var n=this.renderer,r=this.renderer.layerConfig,i=e*Math.floor(r.height/r.lineHeight);this.$blockScrolling++,t==1?this.selection.$moveSelection(function(){this.moveCursorBy(i,0)}):t==0&&(this.selection.moveCursorBy(i,0),this.selection.clearSelection()),this.$blockScrolling--;var s=n.scrollTop;n.scrollBy(0,i*r.lineHeight),t!=null&&n.scrollCursorIntoView(null,.5),n.animateScrolling(s)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,n,r){this.renderer.scrollToLine(e,t,n,r)},this.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.$blockScrolling+=1,this.selection.selectAll(),this.$blockScrolling-=1},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e){var t=this.getCursorPosition(),n=this.session.getBracketRange(t);if(!n){n=this.find({needle:/[{}()\[\]]/g,preventScroll:!0,start:{row:t.row,column:t.column-1}});if(!n)return;var r=n.start;r.row==t.row&&Math.abs(r.column-t.column)<2&&(n=this.session.getBracketRange(r))}r=n&&n.cursor||r,r&&(e?n&&n.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(r.row,r.column):(this.clearSelection(),this.moveCursorTo(r.row,r.column)))},this.gotoLine=function(e,t,n){this.selection.clearSelection(),this.session.unfold({row:e-1,column:t||0}),this.$blockScrolling+=1,this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(e-1,t||0),this.$blockScrolling-=1,this.isRowFullyVisible(e-1)||this.scrollToLine(e-1,!0,n)},this.navigateTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.navigateUp=function(e){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),e=e||1,this.selection.moveCursorBy(-e,0)},this.navigateDown=function(e){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),e=e||1,this.selection.moveCursorBy(e,0)},this.navigateLeft=function(e){if(!this.selection.isEmpty()){var t=this.getSelectionRange().start;this.moveCursorToPosition(t)}else{e=e||1;while(e--)this.selection.moveCursorLeft()}this.clearSelection()},this.navigateRight=function(e){if(!this.selection.isEmpty()){var t=this.getSelectionRange().end;this.moveCursorToPosition(t)}else{e=e||1;while(e--)this.selection.moveCursorRight()}this.clearSelection()},this.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},this.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},this.navigateFileEnd=function(){var e=this.renderer.scrollTop;this.selection.moveCursorFileEnd(),this.clearSelection(),this.renderer.animateScrolling(e)},this.navigateFileStart=function(){var e=this.renderer.scrollTop;this.selection.moveCursorFileStart(),this.clearSelection(),this.renderer.animateScrolling(e)},this.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},this.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},this.replace=function(e,t){t&&this.$search.set(t);var n=this.$search.find(this.session),r=0;return n?(this.$tryReplace(n,e)&&(r=1),n!==null&&(this.selection.setSelectionRange(n),this.renderer.scrollSelectionIntoView(n.start,n.end)),r):r},this.replaceAll=function(e,t){t&&this.$search.set(t);var n=this.$search.findAll(this.session),r=0;if(!n.length)return r;this.$blockScrolling+=1;var i=this.getSelectionRange();this.clearSelection(),this.selection.moveCursorTo(0,0);for(var s=n.length-1;s>=0;--s)this.$tryReplace(n[s],e)&&r++;return this.selection.setSelectionRange(i),this.$blockScrolling-=1,r},this.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return t=this.$search.replace(n,t),t!==null?(e.end=this.session.replace(e,t),e):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(e,t,n){t||(t={}),typeof e=="string"||e instanceof RegExp?t.needle=e:typeof e=="object"&&r.mixin(t,e);var i=this.selection.getRange();t.needle==null&&(e=this.session.getTextRange(i)||this.$search.$options.needle,e||(i=this.session.getWordRange(i.start.row,i.start.column),e=this.session.getTextRange(i)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:i});var s=this.$search.find(this.session);if(t.preventScroll)return s;if(s)return this.revealRange(s,n),s;t.backwards?i.start=i.end:i.end=i.start,this.selection.setRange(i)},this.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},this.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},this.revealRange=function(e,t){this.$blockScrolling+=1,this.session.unfold(e),this.selection.setSelectionRange(e),this.$blockScrolling-=1;var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),t!=0&&this.renderer.animateScrolling(n)},this.undo=function(){this.$blockScrolling++,this.session.getUndoManager().undo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.$blockScrolling++,this.session.getUndoManager().redo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.renderer.destroy(),this._emit("destroy",this)},this.setAutoScrollEditorIntoView=function(e){if(e===!1)return;var t,n=this,r=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var i=this.$scrollAnchor;i.style.cssText="position:absolute",this.container.insertBefore(i,this.container.firstChild);var s=this.on("changeSelection",function(){r=!0}),o=this.renderer.on("beforeRender",function(){r&&(t=n.renderer.container.getBoundingClientRect())}),u=this.renderer.on("afterRender",function(){if(r&&t&&n.isFocused()){var e=n.renderer,s=e.$cursorLayer.$pixelPos,o=e.layerConfig,u=s.top-o.offset;s.top>=0&&u+t.top<0?r=!0:s.top<o.height&&s.top+t.top+o.lineHeight>window.innerHeight?r=!1:r=null,r!=null&&(i.style.top=u+"px",i.style.left=s.left+"px",i.style.height=o.lineHeight+"px",i.scrollIntoView(r)),r=t=null}});this.setAutoScrollEditorIntoView=function(e){if(e===!0)return;delete this.setAutoScrollEditorIntoView,this.removeEventListener("changeSelection",s),this.renderer.removeEventListener("afterRender",u),this.renderer.removeEventListener("beforeRender",o)}},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;if(!t)return;t.setSmoothBlinking(e=="smooth"),t.isBlinking=!this.$readOnly&&e!="wide"}}).call(y.prototype),g.defineOptions(y.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._emit("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){this.textInput.setReadOnly(e),this.$resetCursorStyle()},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",showGutter:"renderer",displayIndentGuides:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimout:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",tabSize:"session",wrap:"session",foldStyle:"session"}),t.Editor=y}),ace.define("ace/lib/lang",["require","exports","module"],function(e,t,n){t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){var n="";while(t>0){t&1&&(n+=e);if(t>>=1)e+=e}return n};var r=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(r,"")},t.stringTrimRight=function(e){return e.replace(i,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){var t=[];for(var n=0,r=e.length;n<r;n++)e[n]&&typeof e[n]=="object"?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=function(e){if(typeof e!="object"||!e)return e;var n=e.constructor;if(n===RegExp)return e;var r=n();for(var i in e)typeof e[i]=="object"?r[i]=t.deepCopy(e[i]):r[i]=e[i];return r},t.arrayToMap=function(e){var t={};for(var n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return e.replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,function(e){n.push({offset:arguments[arguments.length-2],length:e.length})}),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},r=function(e){return r.cancel(),t=setTimeout(n,e||0),r};return r.schedule=r,r.call=function(){return this.cancel(),e(),r},r.cancel=function(){return clearTimeout(t),t=null,r},r.isPending=function(){return t},r},t.delayedCall=function(e,t){var n=null,r=function(){n=null,e()},i=function(e){n==null&&(n=setTimeout(r,e||t))};return i.delay=function(e){n&&clearTimeout(n),n=setTimeout(r,e||t)},i.schedule=i,i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){return n},i}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang"],function(e,t,n){var r=e("../lib/event"),i=e("../lib/useragent"),s=e("../lib/dom"),o=e("../lib/lang"),u=i.isChrome<18,a=function(e,t){function b(e){if(h)return;if(k)t=0,r=e?0:n.value.length-1;else var t=e?2:1,r=2;try{n.setSelectionRange(t,r)}catch(i){}}function w(){if(h)return;n.value=a,i.isWebKit&&y.schedule()}function F(){setTimeout(function(){p&&(n.style.cssText=p,p=""),t.renderer.$keepTextAreaAtCursor==null&&(t.renderer.$keepTextAreaAtCursor=!0,t.renderer.$moveTextAreaToCursor())},0)}var n=s.createElement("textarea");n.className="ace_text-input",i.isTouchPad&&n.setAttribute("x-palm-disable-auto-cap",!0),n.wrap="off",n.autocorrect="off",n.autocapitalize="off",n.spellcheck=!1,n.style.opacity="0",e.insertBefore(n,e.firstChild);var a="",f=!1,l=!1,c=!1,h=!1,p="",d=!0;try{var v=document.activeElement===n}catch(m){}r.addListener(n,"blur",function(){t.onBlur(),v=!1}),r.addListener(n,"focus",function(){v=!0,t.onFocus(),b()}),this.focus=function(){n.focus()},this.blur=function(){n.blur()},this.isFocused=function(){return v};var g=o.delayedCall(function(){v&&b(d)}),y=o.delayedCall(function(){h||(n.value=a,v&&b())});i.isWebKit||t.addEventListener("changeSelection",function(){t.selection.isEmpty()!=d&&(d=!d,g.schedule())}),w(),v&&t.onFocus();var E=function(e){return e.selectionStart===0&&e.selectionEnd===e.value.length};!n.setSelectionRange&&n.createTextRange&&(n.setSelectionRange=function(e,t){var n=this.createTextRange();n.collapse(!0),n.moveStart("character",e),n.moveEnd("character",t),n.select()},E=function(e){try{var t=e.ownerDocument.selection.createRange()}catch(n){}return!t||t.parentElement()!=e?!1:t.text==e.value});if(i.isOldIE){var S=!1,x=function(e){if(S)return;var t=n.value;if(h||!t||t==a)return;if(e&&t==a[0])return T.schedule();A(t),S=!0,w(),S=!1},T=o.delayedCall(x);r.addListener(n,"propertychange",x);var N={13:1,27:1};r.addListener(n,"keyup",function(e){h&&(!n.value||N[e.keyCode])&&setTimeout(B,0);if((n.value.charCodeAt(0)||0)<129)return T.call();h?H():P()}),r.addListener(n,"keydown",function(e){T.schedule(50)})}var C=function(e){f?f=!1:l?l=!1:E(n)?(t.selectAll(),b()):k&&b(t.selection.isEmpty())},k=null;this.setInputHandler=function(e){k=e},this.getInputHandler=function(){return k};var L=!1,A=function(e){k&&(e=k(e),k=null),c?(b(),e&&t.onPaste(e),c=!1):e==a.charAt(0)?L?t.execCommand("del",{source:"ace"}):t.execCommand("backspace",{source:"ace"}):(e.substring(0,2)==a?e=e.substr(2):e.charAt(0)==a.charAt(0)?e=e.substr(1):e.charAt(e.length-1)==a.charAt(0)&&(e=e.slice(0,-1)),e.charAt(e.length-1)==a.charAt(0)&&(e=e.slice(0,-1)),e&&t.onTextInput(e)),L&&(L=!1)},O=function(e){if(h)return;var t=n.value;A(t),w()},M=function(e){var i=t.getCopyText();if(!i){r.preventDefault(e);return}var s=e.clipboardData||window.clipboardData;if(s&&!u){var o=s.setData("Text",i);o&&(t.onCut(),r.preventDefault(e))}o||(f=!0,n.value=i,n.select(),setTimeout(function(){f=!1,w(),b(),t.onCut()}))},_=function(e){var i=t.getCopyText();if(!i){r.preventDefault(e);return}var s=e.clipboardData||window.clipboardData;if(s&&!u){var o=s.setData("Text",i);o&&(t.onCopy(),r.preventDefault(e))}o||(l=!0,n.value=i,n.select(),setTimeout(function(){l=!1,w(),b(),t.onCopy()}))},D=function(e){var s=e.clipboardData||window.clipboardData;if(s){var o=s.getData("Text");o&&t.onPaste(o),i.isIE&&setTimeout(b),r.preventDefault(e)}else n.value="",c=!0};r.addCommandKeyListener(n,t.onCommandKey.bind(t)),r.addListener(n,"select",C),r.addListener(n,"input",O),r.addListener(n,"cut",M),r.addListener(n,"copy",_),r.addListener(n,"paste",D),(!("oncut"in n)||!("oncopy"in n)||!("onpaste"in n))&&r.addListener(e,"keydown",function(e){if(i.isMac&&!e.metaKey||!e.ctrlKey)return;switch(e.keyCode){case 67:_(e);break;case 86:D(e);break;case 88:M(e)}});var P=function(e){if(h)return;h={},t.onCompositionStart(),setTimeout(H,0),t.on("mousedown",B),t.selection.isEmpty()||(t.insert(""),t.session.markUndoGroup(),t.selection.clearSelection()),t.session.markUndoGroup()},H=function(){if(!h)return;var e=n.value.replace(/\x01/g,"");if(h.lastValue===e)return;t.onCompositionUpdate(e),h.lastValue&&t.undo(),h.lastValue=e;if(h.lastValue){var r=t.selection.getRange();t.insert(h.lastValue),t.session.markUndoGroup(),h.range=t.selection.getRange(),t.selection.setRange(r),t.selection.clearSelection()}},B=function(e){var r=h;h=!1;var i=setTimeout(function(){i=null;var e=n.value.replace(/\x01/g,"");if(h)return;e==r.lastValue?w():!r.lastValue&&e&&(w(),A(e))});k=function(n){return i&&clearTimeout(i),n=n.replace(/\x01/g,""),n==r.lastValue?"":(r.lastValue&&i&&t.undo(),n)},t.onCompositionEnd(),t.removeListener("mousedown",B),e.type=="compositionend"&&r.range&&t.selection.setRange(r.range)},j=o.delayedCall(H,50);r.addListener(n,"compositionstart",P),i.isGecko?r.addListener(n,"text",function(){j.schedule()}):(r.addListener(n,"keyup",function(){j.schedule()}),r.addListener(n,"keydown",function(){j.schedule()})),r.addListener(n,"compositionend",B),this.getElement=function(){return n},this.setReadOnly=function(e){n.readOnly=e},this.onContextMenu=function(e){L=!0,p||(p=n.style.cssText),n.style.cssText="z-index:100000;"+(i.isIE?"opacity:0.1;":""),b(t.selection.isEmpty()),t._emit("nativecontextmenu",{target:t,domEvent:e});var o=t.container.getBoundingClientRect(),u=s.computedStyle(t.container),a=o.top+(parseInt(u.borderTopWidth)||0),f=o.left+(parseInt(o.borderLeftWidth)||0),l=o.bottom-a-n.clientHeight,c=function(e){n.style.left=e.clientX-f-2+"px",n.style.top=Math.min(e.clientY-a-2,l)+"px"};c(e);if(e.type!="mousedown")return;t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=null),i.isWin&&r.capture(t.container,c,F)},this.onContextMenuClose=F;if(!i.isGecko||i.isMac){var I=function(e){t.textInput.onContextMenu(e),F()};r.addListener(t.renderer.scroller,"contextmenu",I),r.addListener(n,"contextmenu",I)}};t.TextInput=a}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/config"],function(e,t,n){var r=e("../lib/event"),i=e("../lib/useragent"),s=e("./default_handlers").DefaultHandlers,o=e("./default_gutter_handler").GutterHandler,u=e("./mouse_event").MouseEvent,a=e("./dragdrop_handler").DragdropHandler,f=e("../config"),l=function(e){this.editor=e,new s(this),new o(this),new a(this);var t=e.renderer.getMouseEventTarget();r.addListener(t,"click",this.onMouseEvent.bind(this,"click")),r.addListener(t,"mousemove",this.onMouseMove.bind(this,"mousemove")),r.addMultiMouseDownListener(t,[300,300,250],this,"onMouseEvent"),e.renderer.scrollBarV&&(r.addMultiMouseDownListener(e.renderer.scrollBarV.inner,[300,300,250],this,"onMouseEvent"),r.addMultiMouseDownListener(e.renderer.scrollBarH.inner,[300,300,250],this,"onMouseEvent")),r.addMouseWheelListener(e.container,this.onMouseWheel.bind(this,"mousewheel"));var n=e.renderer.$gutter;r.addListener(n,"mousedown",this.onMouseEvent.bind(this,"guttermousedown")),r.addListener(n,"click",this.onMouseEvent.bind(this,"gutterclick")),r.addListener(n,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick")),r.addListener(n,"mousemove",this.onMouseEvent.bind(this,"guttermousemove")),r.addListener(t,"mousedown",function(t){e.focus()}),r.addListener(n,"mousedown",function(t){return e.focus(),r.preventDefault(t)})};(function(){this.onMouseEvent=function(e,t){this.editor._emit(e,new u(t,this.editor))},this.onMouseMove=function(e,t){var n=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;if(!n||!n.length)return;this.editor._emit(e,new u(t,this.editor))},this.onMouseWheel=function(e,t){var n=new u(t,this.editor);n.speed=this.$scrollSpeed*2,n.wheelX=t.wheelX,n.wheelY=t.wheelY,this.editor._emit(e,n)},this.setState=function(e){this.state=e},this.captureMouse=function(e,t){this.x=e.x,this.y=e.y,this.isMousePressed=!0;var n=this.editor.renderer;n.$keepTextAreaAtCursor&&(n.$keepTextAreaAtCursor=null);var s=this,o=function(e){s.x=e.clientX,s.y=e.clientY,t&&t(e)},u=function(e){clearInterval(f),a(),s[s.state+"End"]&&s[s.state+"End"](e),s.$clickSelection=null,n.$keepTextAreaAtCursor==null&&(n.$keepTextAreaAtCursor=!0,n.$moveTextAreaToCursor()),s.isMousePressed=!1,s.onMouseEvent("mouseup",e)},a=function(){s[s.state]&&s[s.state]()};if(i.isOldIE&&e.domEvent.type=="dblclick")return setTimeout(function(){u(e)});r.capture(this.editor.container,o,u);var f=setInterval(a,20)}}).call(l.prototype),f.defineOptions(l.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:150},dragEnabled:{initialValue:!0},focusTimout:{initialValue:0}}),t.MouseHandler=l}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,t,n){function u(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e));var n=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];n.forEach(function(t){e[t]=this[t]},this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}function a(e,t,n,r){return Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2))}function f(e,t){if(e.start.row==e.end.row)var n=2*t.column-e.start.column-e.end.column;else if(e.start.row==e.end.row-1&&!e.start.column&&!e.end.column)var n=t.column-4;else var n=2*t.row-e.start.row-e.end.row;return n<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}var r=e("../lib/dom"),i=e("../lib/event"),s=e("../lib/useragent"),o=0;(function(){this.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition();this.mousedownEvent=e;var r=this.editor,i=e.getButton();if(i!==0){var s=r.getSelectionRange(),o=s.isEmpty();o&&(r.moveCursorToPosition(n),r.selection.clearSelection()),r.textInput.onContextMenu(e.domEvent);return}if(t&&!r.isFocused()){r.focus();if(this.$focusTimout&&!this.$clickSelection&&!r.inMultiSelectMode){this.mousedownEvent.time=(new Date).getTime(),this.setState("focusWait"),this.captureMouse(e);return}}return!t||this.$clickSelection||e.getShiftKey()||r.inMultiSelectMode?this.startSelect(n):t&&(this.mousedownEvent.time=(new Date).getTime(),this.startSelect(n)),this.captureMouse(e),e.preventDefault()},this.startSelect=function(e){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var t=this.editor,n=this.mousedownEvent.getShiftKey();setTimeout(function(){n?t.selection.selectToPosition(e):this.$clickSelection||(t.moveCursorToPosition(e),t.selection.clearSelection())}.bind(this),0),t.renderer.scroller.setCapture&&t.renderer.scroller.setCapture(),t.setStyle("ace_selecting"),this.setState("select")},this.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var r=this.$clickSelection.comparePoint(n);if(r==-1)e=this.$clickSelection.end;else if(r==1)e=this.$clickSelection.start;else{var i=f(this.$clickSelection,n);n=i.cursor,e=i.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,n=this.editor,r=n.renderer.screenToTextCoordinates(this.x,this.y),i=n.selection[e](r.row,r.column);if(this.$clickSelection){var s=this.$clickSelection.comparePoint(i.start),o=this.$clickSelection.comparePoint(i.end);if(s==-1&&o<=0){t=this.$clickSelection.end;if(i.end.row!=r.row||i.end.column!=r.column)r=i.start}else if(o==1&&s>=0){t=this.$clickSelection.start;if(i.start.row!=r.row||i.start.column!=r.column)r=i.end}else if(s==-1&&o==1)r=i.end,t=i.start;else{var u=f(this.$clickSelection,r);r=u.cursor,t=u.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(r),n.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var e=a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=(new Date).getTime();(e>o||t-this.mousedownEvent.time>this.$focusTimout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,r=n.session,i=r.getBracketRange(t);if(i){i.isEmpty()&&(i.start.column--,i.end.column++),this.$clickSelection=i,this.setState("select");return}this.$clickSelection=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")},this.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines"),this.$clickSelection=n.selection.getLineRange(t.row)},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){if(e.getShiftKey()||e.getAccelKey())return;var t=e.domEvent.timeStamp,n=t-(this.$lastScrollTime||0),r=this.editor,i=r.renderer.isScrollableBy(e.wheelX*e.speed,e.wheelY*e.speed);if(i||n<200)return this.$lastScrollTime=t,r.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()}}).call(u.prototype),t.DefaultHandlers=u}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event"],function(e,t,n){function s(e){function f(){u=r.createElement("div"),u.className="ace_gutter-tooltip",u.style.display="none",t.container.appendChild(u)}function l(){u||f();var e=o.getDocumentPosition().row,r=n.$annotations[e];if(!r)return c();var i=t.session.getLength();if(e==i){var s=t.renderer.pixelToScreenCoordinates(0,o.y).row,l=o.$pos;if(s>t.session.documentToScreenRow(l.row,l.column))return c()}if(a==r)return;a=r.text.join("<br/>"),u.style.display="block",u.innerHTML=a,t.on("mousewheel",c),h(o)}function c(){s&&(s=clearTimeout(s)),a&&(u.style.display="none",a=null,t.removeEventListener("mousewheel",c))}function h(e){var n=t.renderer.$gutter.getBoundingClientRect();u.style.left=e.x+15+"px";if(e.y+3*t.renderer.lineHeight+15<n.bottom)u.style.bottom="",u.style.top=e.y+15+"px";else{u.style.top="";var r=window.innerHeight||document.documentElement.clientHeight;u.style.bottom=r-e.y+5+"px"}}var t=e.editor,n=t.renderer.$gutterLayer;e.editor.setDefaultHandler("guttermousedown",function(r){if(!t.isFocused()||r.getButton()!=0)return;var i=n.getRegion(r);if(i=="foldWidgets")return;var s=r.getDocumentPosition().row,o=t.session.selection;if(r.getShiftKey())o.selectTo(s,0);else{if(r.domEvent.detail==2)return t.selectAll(),r.preventDefault();e.$clickSelection=t.selection.getLineRange(s)}return e.setState("selectByLines"),e.captureMouse(r),r.preventDefault()});var s,o,u,a;e.editor.setDefaultHandler("guttermousemove",function(t){var n=t.domEvent.target||t.domEvent.srcElement;if(r.hasCssClass(n,"ace_fold-widget"))return c();a&&h(t),o=t;if(s)return;s=setTimeout(function(){s=null,o&&!e.isMousePressed?l():c()},50)}),i.addListener(t.renderer.$gutter,"mouseout",function(e){o=null;if(!a||s)return;s=setTimeout(function(){s=null,c()},50)}),t.on("changeSession",c)}var r=e("../lib/dom"),i=e("../lib/event");t.GutterHandler=s}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,n){var r=e("../lib/event"),i=e("../lib/useragent"),s=t.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){r.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){r.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},this.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var e=this.editor,t=e.getSelectionRange();if(t.isEmpty())this.$inSelection=!1;else{var n=this.getDocumentPosition();this.$inSelection=t.contains(n.row,n.column)}return this.$inSelection},this.getButton=function(){return r.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=i.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(s.prototype)}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,t,n){function f(e){function T(e,n){var r=(new Date).getTime(),i=!n||e.row!=n.row,s=!n||e.column!=n.column;if(!S||i||s)t.$blockScrolling+=1,t.moveCursorToPosition(e),t.$blockScrolling-=1,S=r,x={x:p,y:d};else{var o=l(x.x,x.y,p,d);o>a?S=null:r-S>=u&&(t.renderer.scrollCursorIntoView(),S=null)}}function N(e,n){var r=(new Date).getTime(),i=t.renderer.layerConfig.lineHeight,s=t.renderer.layerConfig.characterWidth,u=t.renderer.scroller.getBoundingClientRect(),a={x:{left:p-u.left,right:u.right-p},y:{top:d-u.top,bottom:u.bottom-d}},f=Math.min(a.x.left,a.x.right),l=Math.min(a.y.top,a.y.bottom),c={row:e.row,column:e.column};f/s<=2&&(c.column+=a.x.left<a.x.right?-3:2),l/i<=1&&(c.row+=a.y.top<a.y.bottom?-1:1);var h=e.row!=c.row,v=e.column!=c.column,m=!n||e.row!=n.row;h||v&&!m?E?r-E>=o&&t.renderer.scrollCursorIntoView(c):E=r:E=null}function C(){var e=g;g=t.renderer.screenToTextCoordinates(p,d),T(g,e),N(g,e)}function k(){m=t.selection.toOrientedRange(),h=t.session.addMarker(m,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(v),v=setInterval(C,20),y=0,i.addListener(document,"mousemove",O)}function L(){clearInterval(v),t.session.removeMarker(h),h=null,t.$blockScrolling+=1,t.selection.fromOrientedRange(m),t.$blockScrolling-=1,t.isFocused()&&!w&&t.renderer.$cursorLayer.setBlinking(!t.getReadOnly()),m=null,y=0,E=null,S=null,i.removeListener(document,"mousemove",O)}function O(){A==null&&(A=setTimeout(function(){A!=null&&h&&L()},20))}function M(e){var t=e.types;return!t||Array.prototype.some.call(t,function(e){return e=="text/plain"||e=="Text"})}function _(e){var t=["copy","copymove","all","uninitialized"],n=["move","copymove","linkmove","all","uninitialized"],r=s.isMac?e.altKey:e.ctrlKey,i="uninitialized";try{i=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var o="none";return r&&t.indexOf(i)>=0?o="copy":n.indexOf(i)>=0?o="move":t.indexOf(i)>=0&&(o="copy"),o}var t=e.editor,n=r.createElement("img");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",s.isOpera&&(n.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;");var f=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];f.forEach(function(t){e[t]=this[t]},this),t.addEventListener("mousedown",this.onMouseDown.bind(e));var c=t.container,h,p,d,v,m,g,y=0,b,w,E,S,x;this.onDragStart=function(e){if(this.cancelDrag||!c.draggable){var r=this;return setTimeout(function(){r.startSelect(),r.captureMouse(e)},0),e.preventDefault()}m=t.getSelectionRange();var i=e.dataTransfer;i.effectAllowed=t.getReadOnly()?"copy":"copyMove",s.isOpera&&(t.container.appendChild(n),n._top=n.offsetTop),i.setDragImage&&i.setDragImage(n,0,0),s.isOpera&&t.container.removeChild(n),i.clearData(),i.setData("Text",t.session.getTextRange()),w=!0,this.setState("drag")},this.onDragEnd=function(e){c.draggable=!1,w=!1,this.setState(null);if(!t.getReadOnly()){var n=e.dataTransfer.dropEffect;!b&&n=="move"&&t.session.remove(t.getSelectionRange()),t.renderer.$cursorLayer.setBlinking(!0)}this.editor.unsetStyle("ace_dragging")},this.onDragEnter=function(e){if(t.getReadOnly()||!M(e.dataTransfer))return;return h||k(),y++,e.dataTransfer.dropEffect=b=_(e),i.preventDefault(e)},this.onDragOver=function(e){if(t.getReadOnly()||!M(e.dataTransfer))return;return h||(k(),y++),A!==null&&(A=null),p=e.clientX,d=e.clientY,e.dataTransfer.dropEffect=b=_(e),i.preventDefault(e)},this.onDragLeave=function(e){y--;if(y<=0&&h)return L(),b=null,i.preventDefault(e)},this.onDrop=function(e){if(!h)return;var n=e.dataTransfer;if(w)switch(b){case"move":m.contains(g.row,g.column)?m={start:g,end:g}:m=t.moveText(m,g);break;case"copy":m=t.moveText(m,g,!0)}else{var r=n.getData("Text");m={start:g,end:t.session.insert(g,r)},t.focus(),b=null}return L(),i.preventDefault(e)},i.addListener(c,"dragstart",this.onDragStart.bind(e)),i.addListener(c,"dragend",this.onDragEnd.bind(e)),i.addListener(c,"dragenter",this.onDragEnter.bind(e)),i.addListener(c,"dragover",this.onDragOver.bind(e)),i.addListener(c,"dragleave",this.onDragLeave.bind(e)),i.addListener(c,"drop",this.onDrop.bind(e));var A=null}function l(e,t,n,r){return Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2))}var r=e("../lib/dom"),i=e("../lib/event"),s=e("../lib/useragent"),o=200,u=200,a=5;(function(){this.dragWait=function(){var e=(new Date).getTime()-this.mousedownEvent.time;e>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var e=this.editor.container;e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly()),this.editor.unsetStyle("ace_dragging"),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor.container;e.draggable=!0,this.editor.renderer.$cursorLayer.setBlinking(!1),this.editor.setStyle("ace_dragging"),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;if(s.isIE&&this.state=="dragReady"){var n=l(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>3&&t.dragDrop()}if(this.state==="dragWait"){var n=l(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(e){if(!this.$dragEnabled)return;this.mousedownEvent=e;var t=this.editor,n=e.inSelection(),r=e.getButton(),i=e.domEvent.detail||1;if(i===1&&r===0&&n){this.mousedownEvent.time=(new Date).getTime();var o=e.domEvent.target||e.domEvent.srcElement;"unselectable"in o&&(o.unselectable="on");if(t.getDragDelay()){if(s.isWebKit){self.cancelDrag=!0;var u=t.container;u.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}).call(f.prototype),t.DragdropHandler=f}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/lib/net","ace/lib/event_emitter"],function(e,t,n){"no use strict";function f(e){return e.replace(/-(.)/g,function(e,t){return t.toUpperCase()})}var r=e("./lib/lang"),i=e("./lib/oop"),s=e("./lib/net"),o=e("./lib/event_emitter").EventEmitter,u=function(){return this}(),a={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{}};t.get=function(e){if(!a.hasOwnProperty(e))throw new Error("Unknown config key: "+e);return a[e]},t.set=function(e,t){if(!a.hasOwnProperty(e))throw new Error("Unknown config key: "+e);a[e]=t},t.all=function(){return r.copyObject(a)},i.implement(t,o),t.moduleUrl=function(e,t){if(a.$moduleUrls[e])return a.$moduleUrls[e];var n=e.split("/");t=t||n[n.length-2]||"";var r=t=="snippets"?"/":"-",i=n[n.length-1];if(r=="-"){var s=new RegExp("^"+t+"[\\-_]|[\\-_]"+t+"$","g");i=i.replace(s,"")}(!i||i==t)&&n.length>1&&(i=n[n.length-2]);var o=a[t+"Path"];return o==null?o=a.basePath:r=="/"&&(t=r=""),o&&o.slice(-1)!="/"&&(o+="/"),o+t+r+i+this.get("suffix")},t.setModuleUrl=function(e,t){return a.$moduleUrls[e]=t},t.$loading={},t.loadModule=function(n,r){var i,o;Array.isArray(n)&&(o=n[0],n=n[1]);try{i=e(n)}catch(u){}if(i&&!t.$loading[n])return r&&r(i);t.$loading[n]||(t.$loading[n]=[]),t.$loading[n].push(r);if(t.$loading[n].length>1)return;var a=function(){e([n],function(e){t._emit("load.module",{name:n,module:e});var r=t.$loading[n];t.$loading[n]=null,r.forEach(function(t){t&&t(e)})})};if(!t.get("packaged"))return a();s.loadScript(t.moduleUrl(n,o),a)},t.init=function(){a.packaged=e.packaged||n.packaged||u.define&&define.packaged;if(!u.document)return"";var r={},i="",s=document.getElementsByTagName("script");for(var o=0;o<s.length;o++){var l=s[o],c=l.src||l.getAttribute("src");if(!c)continue;var h=l.attributes;for(var p=0,d=h.length;p<d;p++){var v=h[p];v.name.indexOf("data-ace-")===0&&(r[f(v.name.replace(/^data-ace-/,""))]=v.value)}var m=c.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);m&&(i=m[1])}i&&(r.base=r.base||i,r.packaged=!0),r.basePath=r.base,r.workerPath=r.workerPath||r.base,r.modePath=r.modePath||r.base,r.themePath=r.themePath||r.base,delete r.base;for(var g in r)typeof r[g]!="undefined"&&t.set(g,r[g])};var l={setOptions:function(e){Object.keys(e).forEach(function(t){this.setOption(t,e[t])},this)},getOptions:function(e){var t={};return e?Array.isArray(e)||(t=e,e=Object.keys(t)):e=Object.keys(this.$options),e.forEach(function(e){t[e]=this.getOption(e)},this),t},setOption:function(e,t){if(this["$"+e]===t)return;var n=this.$options[e];if(!n)return typeof console!="undefined"&&console.warn&&console.warn('misspelled option "'+e+'"'),undefined;if(n.forwardTo)return this[n.forwardTo]&&this[n.forwardTo].setOption(e,t);n.handlesSet||(this["$"+e]=t),n&&n.set&&n.set.call(this,t)},getOption:function(e){var t=this.$options[e];return t?t.forwardTo?this[t.forwardTo]&&this[t.forwardTo].getOption(e):t&&t.get?t.get.call(this):this["$"+e]:(typeof console!="undefined"&&console.warn&&console.warn('misspelled option "'+e+'"'),undefined)}},c={};t.defineOptions=function(e,t,n){return e.$options||(c[t]=e.$options={}),Object.keys(n).forEach(function(t){var r=n[t];typeof r=="string"&&(r={forwardTo:r}),r.name||(r.name=t),e.$options[r.name]=r,"initialValue"in r&&(e["$"+r.name]=r.initialValue)}),i.implement(e,l),this},t.resetOptions=function(e){Object.keys(e.$options).forEach(function(t){var n=e.$options[t];"value"in n&&e.setOption(t,n.value)})},t.setDefaultValue=function(e,n,r){var i=c[e]||(c[e]={});i[n]&&(i.forwardTo?t.setDefaultValue(i.forwardTo,n,r):i[n].value=r)},t.setDefaultValues=function(e,n){Object.keys(n).forEach(function(r){t.setDefaultValue(e,r,n[r])})}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,t,n){var r=e("./dom");t.get=function(e,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.onreadystatechange=function(){n.readyState===4&&t(n.responseText)},n.send(null)},t.loadScript=function(e,t){var n=r.getDocumentHead(),i=document.createElement("script");i.src=e,n.appendChild(i),i.onload=i.onreadystatechange=function(e,n){if(n||!i.readyState||i.readyState=="loaded"||i.readyState=="complete")i=i.onload=i.onreadystatechange=null,n||t()}}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,t,n){var r={},i=function(){this.propagationStopped=!0},s=function(){this.defaultPrevented=!0};r._emit=r._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],r=this._defaultHandlers[e];if(!n.length&&!r)return;if(typeof t!="object"||!t)t={};t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=i),t.preventDefault||(t.preventDefault=s),n=n.slice();for(var o=0;o<n.length;o++){n[o](t,this);if(t.propagationStopped)break}if(r&&!t.defaultPrevented)return r(t,this)},r._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(!n)return;n=n.slice();for(var r=0;r<n.length;r++)n[r](t,this)},r.once=function(e,t){var n=this;t&&this.addEventListener(e,function r(){n.removeEventListener(e,r),t.apply(null,arguments)})},r.setDefaultHandler=function(e,t){var n=this._defaultHandlers;n||(n=this._defaultHandlers={_disabled_:{}});if(n[e]){var r=n[e],i=n._disabled_[e];i||(n._disabled_[e]=i=[]),i.push(r);var s=i.indexOf(t);s!=-1&&i.splice(s,1)}n[e]=t},r.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(!n)return;var r=n._disabled_[e];if(n[e]==t){var i=n[e];r&&this.setDefaultHandler(e,r.pop())}else if(r){var s=r.indexOf(t);s!=-1&&r.splice(s,1)}},r.on=r.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[e];return r||(r=this._eventRegistry[e]=[]),r.indexOf(t)==-1&&r[n?"unshift":"push"](t),t},r.off=r.removeListener=r.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(!n)return;var r=n.indexOf(t);r!==-1&&n.splice(r,1)},r.removeAllListeners=function(e){this._eventRegistry&&(this._eventRegistry[e]=[])},t.EventEmitter=r}),ace.define("ace/mouse/fold_handler",["require","exports","module"],function(e,t,n){function r(e){e.on("click",function(t){var n=t.getDocumentPosition(),r=e.session,i=r.getFoldAt(n.row,n.column,1);i&&(t.getAccelKey()?r.removeFold(i):r.expandFold(i),t.stop())}),e.on("gutterclick",function(t){var n=e.renderer.$gutterLayer.getRegion(t);if(n=="foldWidgets"){var r=t.getDocumentPosition().row,i=e.session;i.foldWidgets&&i.foldWidgets[r]&&e.session.onFoldWidgetClick(r,t),e.isFocused()||e.focus(),t.stop()}}),e.on("gutterdblclick",function(t){var n=e.renderer.$gutterLayer.getRegion(t);if(n=="foldWidgets"){var r=t.getDocumentPosition().row,i=e.session,s=i.getParentFoldRangeData(r,!0),o=s.range||s.firstRange;if(o){r=o.start.row;var u=i.getFoldAt(r,i.getLine(r).length,1);u?i.removeFold(u):(i.addFold("...",o),e.renderer.scrollCursorIntoView({row:o.start.row,column:0}))}t.stop()}})}t.FoldHandler=r}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,t,n){var r=e("../lib/keys"),i=e("../lib/event"),s=function(e){this.$editor=e,this.$data={},this.$handlers=[],this.setDefaultHandler(e.commands)};(function(){this.setDefaultHandler=function(e){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=e,this.addKeyboardHandler(e,0),this.$data={editor:this.$editor}},this.setKeyboardHandler=function(e){var t=this.$handlers;if(t[t.length-1]==e)return;while(t[t.length-1]&&t[t.length-1]!=this.$defaultHandler)this.removeKeyboardHandler(t[t.length-1]);this.addKeyboardHandler(e,1)},this.addKeyboardHandler=function(e,t){if(!e)return;var n=this.$handlers.indexOf(e);n!=-1&&this.$handlers.splice(n,1),t==undefined?this.$handlers.push(e):this.$handlers.splice(t,0,e),n==-1&&e.attach&&e.attach(this.$editor)},this.removeKeyboardHandler=function(e){var t=this.$handlers.indexOf(e);return t==-1?!1:(this.$handlers.splice(t,1),e.detach&&e.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.$callKeyboardHandlers=function(e,t,n,r){var s,o=!1,u=this.$editor.commands;for(var a=this.$handlers.length;a--;){s=this.$handlers[a].handleKeyboard(this.$data,e,t,n,r);if(!s||!s.command)continue;s.command=="null"?o=!0:o=u.exec(s.command,this.$editor,s.args,r),o&&r&&e!=-1&&s.passEvent!=1&&s.command.passEvent!=1&&i.stopEvent(r);if(o)break}return o},this.onCommandKey=function(e,t,n){var i=r.keyCodeToString(n);this.$callKeyboardHandlers(t,i,n,e)},this.onTextInput=function(e){var t=this.$callKeyboardHandlers(-1,e);t||this.$editor.commands.exec("insertstring",this.$editor,e)}}).call(s.prototype),t.KeyBinding=s}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/lang"),s=e("./config"),o=e("./lib/event_emitter").EventEmitter,u=e("./selection").Selection,a=e("./mode/text").Mode,f=e("./range").Range,l=e("./document").Document,c=e("./background_tokenizer").BackgroundTokenizer,h=e("./search_highlight").SearchHighlight,p=function(e,t){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.$foldData.toString=function(){return this.join("\n")},this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this);if(typeof e!="object"||!e.getLine)e=new l(e);this.setDocument(e),this.selection=new u(this),s.resetOptions(this),this.setMode(t),s._emit("session",this)};(function(){function g(e){return e<4352?!1:e>=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510}r.implement(this,o),this.setDocument=function(e){this.doc&&this.doc.removeListener("change",this.$onChange),this.doc=e,e.on("change",this.$onChange),this.bgTokenizer&&this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(e){if(!e){this.$docRowCache=[],this.$screenRowCache=[];return}var t=this.$docRowCache.length,n=this.$getRowCacheIndex(this.$docRowCache,e)+1;t>n&&(this.$docRowCache.splice(n,t),this.$screenRowCache.splice(n,t))},this.$getRowCacheIndex=function(e,t){var n=0,r=e.length-1;while(n<=r){var i=n+r>>1,s=e[i];if(t>s)n=i+1;else{if(!(t<s))return i;r=i-1}}return n-1},this.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.bgTokenizer&&this.bgTokenizer.start(0)},this.onChangeFold=function(e){var t=e.data;this.$resetRowCache(t.start.row)},this.onChange=function(e){var t=e.data;this.$modified=!0,this.$resetRowCache(t.range.start.row);var n=this.$updateInternalDataOnChange(e);!this.$fromUndo&&this.$undoManager&&!t.ignore&&(this.$deltasDoc.push(t),n&&n.length!=0&&this.$deltasFold.push({action:"removeFolds",folds:n}),this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(t),this._emit("change",e)},this.setValue=function(e){this.doc.setValue(e),this.selection.moveCursorTo(0,0),this.selection.clearSelection(),this.$resetRowCache(0),this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.getUndoManager().reset()},this.getValue=this.toString=function(){return this.doc.getValue()},this.getSelection=function(){return this.selection},this.getState=function(e){return this.bgTokenizer.getState(e)},this.getTokens=function(e){return this.bgTokenizer.getTokens(e)},this.getTokenAt=function(e,t){var n=this.bgTokenizer.getTokens(e),r,i=0;if(t==null)s=n.length-1,i=this.getLine(e).length;else for(var s=0;s<n.length;s++){i+=n[s].value.length;if(i>=t)break}return r=n[s],r?(r.index=s,r.start=i-r.value.length,r):null},this.setUndoManager=function(e){this.$undoManager=e,this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.$informUndoManager&&this.$informUndoManager.cancel();if(e){var t=this;this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.$deltasFold.length&&(t.$deltas.push({group:"fold",deltas:t.$deltasFold}),t.$deltasFold=[]),t.$deltasDoc.length&&(t.$deltas.push({group:"doc",deltas:t.$deltasDoc}),t.$deltasDoc=[]),t.$deltas.length>0&&e.execute({action:"aceupdate",args:[t.$deltas,t],merge:t.mergeUndoDeltas}),t.mergeUndoDeltas=!1,t.$deltas=[]},this.$informUndoManager=i.delayedCall(this.$syncInformUndoManager)}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},reset:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?i.stringRepeat(" ",this.getTabSize()):"	"},this.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(e){this.setOption("tabSize",e)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize==0},this.$overwrite=!1,this.setOverwrite=function(e){this.setOption("overwrite",e)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._emit("changeBreakpoint",{})},this.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._emit("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t<e.length;t++)this.$breakpoints[e[t]]="ace_breakpoint";this._emit("changeBreakpoint",{})},this.clearBreakpoints=function(){this.$breakpoints=[],this._emit("changeBreakpoint",{})},this.setBreakpoint=function(e,t){t===undefined&&(t="ace_breakpoint"),t?this.$breakpoints[e]=t:delete this.$breakpoints[e],this._emit("changeBreakpoint",{})},this.clearBreakpoint=function(e){delete this.$breakpoints[e],this._emit("changeBreakpoint",{})},this.addMarker=function(e,t,n,r){var i=this.$markerId++,s={range:e,type:n||"line",renderer:typeof n=="function"?n:null,clazz:t,inFront:!!r,id:i};return r?(this.$frontMarkers[i]=s,this._emit("changeFrontMarker")):(this.$backMarkers[i]=s,this._emit("changeBackMarker")),i},this.addDynamicMarker=function(e,t){if(!e.update)return;var n=this.$markerId++;return e.id=n,e.inFront=!!t,t?(this.$frontMarkers[n]=e,this._emit("changeFrontMarker")):(this.$backMarkers[n]=e,this._emit("changeBackMarker")),e},this.removeMarker=function(e){var t=this.$frontMarkers[e]||this.$backMarkers[e];if(!t)return;var n=t.inFront?this.$frontMarkers:this.$backMarkers;t&&(delete n[e],this._emit(t.inFront?"changeFrontMarker":"changeBackMarker"))},this.getMarkers=function(e){return e?this.$frontMarkers:this.$backMarkers},this.highlight=function(e){if(!this.$searchHighlight){var t=new h(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(t)}this.$searchHighlight.setRegexp(e)},this.highlightLines=function(e,t,n,r){typeof t!="number"&&(n=t,t=e),n||(n="ace_step");var i=new f(e,0,t,Infinity);return i.id=this.addMarker(i,n,"fullLine",r),i},this.setAnnotations=function(e){this.$annotations=e,this._emit("changeAnnotation",{})},this.getAnnotations=function(){return this.$annotations||[]},this.clearAnnotations=function(){this.setAnnotations([])},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r?\n)/m);t?this.$autoNewLine=t[1]:this.$autoNewLine="\n"},this.getWordRange=function(e,t){var n=this.getLine(e),r=!1;t>0&&(r=!!n.charAt(t-1).match(this.tokenRe)),r||(r=!!n.charAt(t).match(this.tokenRe));if(r)var i=this.tokenRe;else if(/^\s+$/.test(n.slice(t-1,t+1)))var i=/\s/;else var i=this.nonTokenRe;var s=t;if(s>0){do s--;while(s>=0&&n.charAt(s).match(i));s++}var o=t;while(o<n.length&&n.charAt(o).match(i))o++;return new f(e,s,e,o)},this.getAWordRange=function(e,t){var n=this.getWordRange(e,t),r=this.getLine(n.end.row);while(r.charAt(n.end.column).match(/[ \t]/))n.end.column+=1;return n},this.setNewLineMode=function(e){this.doc.setNewLineMode(e)},this.getNewLineMode=function(){return this.doc.getNewLineMode()},this.setUseWorker=function(e){this.setOption("useWorker",e)},this.getUseWorker=function(){return this.$useWorker},this.onReloadTokenizer=function(e){var t=e.data;this.bgTokenizer.start(t.first),this._emit("tokenizerUpdate",e)},this.$modes={},this.$mode=null,this.$modeId=null,this.setMode=function(e,t){if(e&&typeof e=="object"){if(e.getTokenizer)return this.$onChangeMode(e);var n=e,r=n.path}else r=e||"ace/mode/text";this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new a);if(this.$modes[r]&&!n){this.$onChangeMode(this.$modes[r]),t&&t();return}this.$modeId=r,s.loadModule(["mode",r],function(e){if(this.$modeId!==r)return t&&t();if(this.$modes[r]&&!n)return this.$onChangeMode(this.$modes[r]);e&&e.Mode&&(e=new e.Mode(n),n||(this.$modes[r]=e,e.$id=r),this.$onChangeMode(e),t&&t())}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},this.$onChangeMode=function(e,t){t||(this.$modeId=e.$id);if(this.$mode===e)return;this.$mode=e,this.$stopWorker(),this.$useWorker&&this.$startWorker();var n=e.getTokenizer();if(n.addEventListener!==undefined){var r=this.onReloadTokenizer.bind(this);n.addEventListener("update",r)}if(!this.bgTokenizer){this.bgTokenizer=new c(n);var i=this;this.bgTokenizer.addEventListener("update",function(e){i._emit("tokenizerUpdate",e)})}else this.bgTokenizer.setTokenizer(n);this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=e.tokenRe,this.nonTokenRe=e.nonTokenRe,t||(this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(e.foldingRules),this._emit("changeMode"),this.bgTokenizer.start(0))},this.$stopWorker=function(){this.$worker&&this.$worker.terminate(),this.$worker=null},this.$startWorker=function(){if(typeof Worker!="undefined"&&!e.noWorker)try{this.$worker=this.$mode.createWorker(this)}catch(t){console.log("Could not load worker"),console.log(t),this.$worker=null}else this.$worker=null},this.getMode=function(){return this.$mode},this.$scrollTop=0,this.setScrollTop=function(e){if(this.$scrollTop===e||isNaN(e))return;this.$scrollTop=e,this._signal("changeScrollTop",e)},this.getScrollTop=function(){return this.$scrollTop},this.$scrollLeft=0,this.setScrollLeft=function(e){if(this.$scrollLeft===e||isNaN(e))return;this.$scrollLeft=e,this._signal("changeScrollLeft",e)},this.getScrollLeft=function(){return this.$scrollLeft},this.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},this.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var e=0;return this.lineWidgets.forEach(function(t){t&&t.screenWidth>e&&(e=t.screenWidth)}),this.lineWidgetWidth=e},this.$computeWidth=function(e){if(this.$modified||e){this.$modified=!1;if(this.$useWrapMode)return this.screenWidth=this.$wrapLimit;var t=this.doc.getAllLines(),n=this.$rowLengthCache,r=0,i=0,s=this.$foldData[i],o=s?s.start.row:Infinity,u=t.length;for(var a=0;a<u;a++){if(a>o){a=s.end.row+1;if(a>=u)break;s=this.$foldData[i++],o=s?s.start.row:Infinity}n[a]==null&&(n[a]=this.$getStringScreenWidth(t[a])[0]),n[a]>r&&(r=n[a])}this.screenWidth=r}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.undoChanges=function(e,t){if(!e.length)return;this.$fromUndo=!0;var n=null;for(var r=e.length-1;r!=-1;r--){var i=e[r];i.group=="doc"?(this.doc.revertDeltas(i.deltas),n=this.$getUndoSelection(i.deltas,!0,n)):i.deltas.forEach(function(e){this.addFolds(e.folds)},this)}return this.$fromUndo=!1,n&&this.$undoSelect&&!t&&this.selection.setSelectionRange(n),n},this.redoChanges=function(e,t){if(!e.length)return;this.$fromUndo=!0;var n=null;for(var r=0;r<e.length;r++){var i=e[r];i.group=="doc"&&(this.doc.applyDeltas(i.deltas),n=this.$getUndoSelection(i.deltas,!1,n))}return this.$fromUndo=!1,n&&this.$undoSelect&&!t&&this.selection.setSelectionRange(n),n},this.setUndoSelect=function(e){this.$undoSelect=e},this.$getUndoSelection=function(e,t,n){function r(e){var n=e.action==="insertText"||e.action==="insertLines";return t?!n:n}var i=e[0],s,o,u=!1;r(i)?(s=f.fromPoints(i.range.start,i.range.end),u=!0):(s=f.fromPoints(i.range.start,i.range.start),u=!1);for(var a=1;a<e.length;a++)i=e[a],r(i)?(o=i.range.start,s.compare(o.row,o.column)==-1&&s.setStart(i.range.start),o=i.range.end,s.compare(o.row,o.column)==1&&s.setEnd(i.range.end),u=!0):(o=i.range.start,s.compare(o.row,o.column)==-1&&(s=f.fromPoints(i.range.start,i.range.start)),u=!1);if(n!=null){f.comparePoints(n.start,s.start)==0&&(n.start.column+=s.end.column-s.start.column,n.end.column+=s.end.column-s.start.column);var l=n.compareRange(s);l==1?s.setStart(n.start):l==-1&&s.setEnd(n.end)}return s},this.replace=function(e,t){return this.doc.replace(e,t)},this.moveText=function(e,t,n){var r=this.getTextRange(e),i=this.getFoldsInRange(e),s=f.fromPoints(t,t);if(!n){this.remove(e);var o=e.start.row-e.end.row,u=o?-e.end.column:e.start.column-e.end.column;u&&(s.start.row==e.end.row&&s.start.column>e.end.column&&(s.start.column+=u),s.end.row==e.end.row&&s.end.column>e.end.column&&(s.end.column+=u)),o&&s.start.row>=e.end.row&&(s.start.row+=o,s.end.row+=o)}s.end=this.insert(s.start,r);if(i.length){var a=e.start,l=s.start,o=l.row-a.row,u=l.column-a.column;this.addFolds(i.map(function(e){return e=e.clone(),e.start.row==a.row&&(e.start.column+=u),e.end.row==a.row&&(e.end.column+=u),e.start.row+=o,e.end.row+=o,e}))}return s},this.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var r=e;r<=t;r++)this.insert({row:r,column:0},n)},this.outdentRows=function(e){var t=e.collapseRows(),n=new f(0,0,0,0),r=this.getTabSize();for(var i=t.start.row;i<=t.end.row;++i){var s=this.getLine(i);n.start.row=i,n.end.row=i;for(var o=0;o<r;++o)if(s.charAt(o)!=" ")break;o<r&&s.charAt(o)=="	"?(n.start.column=o,n.end.column=o+1):(n.start.column=0,n.end.column=o),this.remove(n)}},this.$moveLines=function(e,t,n){e=this.getRowFoldStart(e),t=this.getRowFoldEnd(t);if(n<0){var r=this.getRowFoldStart(e+n);if(r<0)return 0;var i=r-e}else if(n>0){var r=this.getRowFoldEnd(t+n);if(r>this.doc.getLength()-1)return 0;var i=r-t}else{e=this.$clipRowToDocument(e),t=this.$clipRowToDocument(t);var i=t-e+1}var s=new f(e,0,t,Number.MAX_VALUE),o=this.getFoldsInRange(s).map(function(e){return e=e.clone(),e.start.row+=i,e.end.row+=i,e}),u=n==0?this.doc.getLines(e,t):this.doc.removeLines(e,t);return this.doc.insertLines(e+i,u),o.length&&this.addFolds(o),i},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){t=Math.max(0,t);if(e<0)e=0,t=0;else{var n=this.doc.getLength();e>=n?(e=n-1,t=this.doc.getLine(n-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},this.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(e){if(e!=this.$useWrapMode){this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0);if(e){var t=this.getLength();this.$wrapData=[];for(var n=0;n<t;n++)this.$wrapData.push([]);this.$updateWrapData(0,t-1)}this._emit("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(e,t){if(this.$wrapLimitRange.min!==e||this.$wrapLimitRange.max!==t)this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this._emit("changeWrapMode")},this.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange;n.max<0&&(n={min:t,max:t});var r=this.$constrainWrapLimit(e,n.min,n.max);return r!=this.$wrapLimit&&r>1?(this.$wrapLimit=r,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._emit("changeWrapLimit")),!0):!1},this.$constrainWrapLimit=function(e,t,n){return t&&(e=Math.max(t,e)),n&&(e=Math.min(n,e)),e},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n,r=e.data.action,i=e.data.range.start.row,s=e.data.range.end.row,o=e.data.range.start,u=e.data.range.end,a=null;r.indexOf("Lines")!=-1?(r=="insertLines"?s=i+e.data.lines.length:s=i,n=e.data.lines?e.data.lines.length:s-i):n=s-i,this.$updating=!0;if(n!=0)if(r.indexOf("remove")!=-1){this[t?"$wrapData":"$rowLengthCache"].splice(i,n);var f=this.$foldData;a=this.getFoldsInRange(e.data.range),this.removeFolds(a);var l=this.getFoldLine(u.row),c=0;if(l){l.addRemoveChars(u.row,u.column,o.column-u.column),l.shiftRow(-n);var h=this.getFoldLine(i);h&&h!==l&&(h.merge(l),l=h),c=f.indexOf(l)+1}for(c;c<f.length;c++){var l=f[c];l.start.row>=u.row&&l.shiftRow(-n)}s=i}else{var p;if(t){p=[i,0];for(var d=0;d<n;d++)p.push([]);this.$wrapData.splice.apply(this.$wrapData,p)}else p=Array(n),p.unshift(i,0),this.$rowLengthCache.splice.apply(this.$rowLengthCache,p);var f=this.$foldData,l=this.getFoldLine(i),c=0;if(l){var v=l.range.compareInside(o.row,o.column);v==0?(l=l.split(o.row,o.column),l.shiftRow(n),l.addRemoveChars(s,0,u.column-o.column)):v==-1&&(l.addRemoveChars(i,0,u.column-o.column),l.shiftRow(n)),c=f.indexOf(l)+1}for(c;c<f.length;c++){var l=f[c];l.start.row>=i&&l.shiftRow(n)}}else{n=Math.abs(e.data.range.start.column-e.data.range.end.column),r.indexOf("remove")!=-1&&(a=this.getFoldsInRange(e.data.range),this.removeFolds(a),n=-n);var l=this.getFoldLine(i);l&&l.addRemoveChars(i,o.column,n)}return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(i,s):this.$updateRowLengthCache(i,s),a},this.$updateRowLengthCache=function(e,t,n){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(e,t){var n=this.doc.getAllLines(),r=this.getTabSize(),i=this.$wrapData,s=this.$wrapLimit,o,a,f=e;t=Math.min(t,n.length-1);while(f<=t)a=this.getFoldLine(f,a),a?(o=[],a.walk(function(e,t,r,i){var s;if(e!=null){s=this.$getDisplayTokens(e,o.length),s[0]=u;for(var a=1;a<s.length;a++)s[a]=l}else s=this.$getDisplayTokens(n[t].substring(i,r),o.length);o=o.concat(s)}.bind(this),a.end.row,n[a.end.row].length+1),i[a.start.row]=this.$computeWrapSplits(o,s,r),f=a.end.row+1):(o=this.$getDisplayTokens(n[f]),i[f]=this.$computeWrapSplits(o,s,r),f++)};var t=1,n=2,u=3,l=4,p=9,d=10,v=11,m=12;this.$computeWrapSplits=function(e,t){function a(t){var r=e.slice(i,t),o=r.length;r.join("").replace(/12/g,function(){o-=1}).replace(/2/g,function(){o-=1}),s+=o,n.push(s),i=t}if(e.length==0)return[];var n=[],r=e.length,i=0,s=0,o=this.$wrapAsCode;while(r-i>t){var f=i+t;if(e[f-1]>=d&&e[f]>=d){a(f);continue}if(e[f]==u||e[f]==l){for(f;f!=i-1;f--)if(e[f]==u)break;if(f>i){a(f);continue}f=i+t;for(f;f<e.length;f++)if(e[f]!=l)break;if(f==e.length)break;a(f);continue}var c=Math.max(f-(o?10:t-(t>>2)),i-1);while(f>c&&e[f]<u)f--;if(o){while(f>c&&e[f]<u)f--;while(f>c&&e[f]==p)f--}else while(f>c&&e[f]<d)f--;if(f>c){a(++f);continue}f=i+t,a(f)}return n},this.$getDisplayTokens=function(e,r){var i=[],s;r=r||0;for(var o=0;o<e.length;o++){var u=e.charCodeAt(o);if(u==9){s=this.getScreenTabSize(i.length+r),i.push(v);for(var a=1;a<s;a++)i.push(m)}else u==32?i.push(d):u>39&&u<48||u>57&&u<64?i.push(p):u>=4352&&g(u)?i.push(t,n):i.push(t)}return i},this.$getStringScreenWidth=function(e,t,n){if(t==0)return[0,0];t==null&&(t=Infinity),n=n||0;var r,i;for(i=0;i<e.length;i++){r=e.charCodeAt(i),r==9?n+=this.getScreenTabSize(n):r>=4352&&g(r)?n+=2:n+=1;if(n>t)break}return[n,i]},this.lineWidgets=null,this.getRowLength=function(e){if(this.lineWidgets)var t=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0;else t=0;return!this.$useWrapMode||!this.$wrapData[e]?1+t:this.$wrapData[e].length+1+t},this.getRowLineCount=function(e){return!this.$useWrapMode||!this.$wrapData[e]?1:this.$wrapData[e].length+1},this.getScreenLastRowColumn=function(e){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE);return this.documentToScreenColumn(t.row,t.column)},this.getDocumentLastRowColumn=function(e,t){var n=this.documentToScreenRow(e,t);return this.getScreenLastRowColumn(n)},this.getDocumentLastRowColumnPosition=function(e,t){var n=this.documentToScreenRow(e,t);return this.screenToDocumentPosition(n,Number.MAX_VALUE/10)},this.getRowSplitData=function(e){return this.$useWrapMode?this.$wrapData[e]:undefined},this.getScreenTabSize=function(e){return this.$tabSize-e%this.$tabSize},this.screenToDocumentRow=function(e,t){return this.screenToDocumentPosition(e,t).row},this.screenToDocumentColumn=function(e,t){return this.screenToDocumentPosition(e,t).column},this.screenToDocumentPosition=function(e,t){if(e<0)return{row:0,column:0};var n,r=0,i=0,s,o=0,u=0,a=this.$screenRowCache,f=this.$getRowCacheIndex(a,e),l=a.length;if(l&&f>=0)var o=a[f],r=this.$docRowCache[f],c=e>a[l-1];else var c=!l;var h=this.getLength()-1,p=this.getNextFoldLine(r),d=p?p.start.row:Infinity;while(o<=e){u=this.getRowLength(r);if(o+u>e||r>=h)break;o+=u,r++,r>d&&(r=p.end.row+1,p=this.getNextFoldLine(r,p),d=p?p.start.row:Infinity),c&&(this.$docRowCache.push(r),this.$screenRowCache.push(o))}if(p&&p.start.row<=r)n=this.getFoldDisplayLine(p),r=p.start.row;else{if(o+u<=e||r>h)return{row:h,column:this.getLine(h).length};n=this.getLine(r),p=null}if(this.$useWrapMode){var v=this.$wrapData[r];if(v){var m=Math.floor(e-o);s=v[m],m>0&&v.length&&(i=v[m-1]||v[v.length-1],n=n.substring(i))}}return i+=this.$getStringScreenWidth(n,t)[1],this.$useWrapMode&&i>=s&&(i=s-1),p?p.idxToPosition(i):{row:r,column:i}},this.documentToScreenPosition=function(e,t){if(typeof t=="undefined")var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var r=0,i=null,s=null;s=this.getFoldAt(e,t,1),s&&(e=s.start.row,t=s.start.column);var o,u=0,a=this.$docRowCache,f=this.$getRowCacheIndex(a,e),l=a.length;if(l&&f>=0)var u=a[f],r=this.$screenRowCache[f],c=e>a[l-1];else var c=!l;var h=this.getNextFoldLine(u),p=h?h.start.row:Infinity;while(u<e){if(u>=p){o=h.end.row+1;if(o>e)break;h=this.getNextFoldLine(o,h),p=h?h.start.row:Infinity}else o=u+1;r+=this.getRowLength(u),u=o,c&&(this.$docRowCache.push(u),this.$screenRowCache.push(r))}var d="";h&&u>=p?(d=this.getFoldDisplayLine(h,e,t),i=h.start.row):(d=this.getLine(e).substring(0,t),i=e);if(this.$useWrapMode){var v=this.$wrapData[i],m=0;while(d.length>=v[m])r++,m++;d=d.substring(v[m-1]||0,d.length)}return{row:r,column:this.$getStringScreenWidth(d)[0]}},this.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},this.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},this.getScreenLength=function(){var e=0,t=null;if(!this.$useWrapMode){e=this.getLength();var n=this.$foldData;for(var r=0;r<n.length;r++)t=n[r],e-=t.end.row-t.start.row}else{var i=this.$wrapData.length,s=0,r=0,t=this.$foldData[r++],o=t?t.start.row:Infinity;while(s<i)e+=this.$wrapData[s].length+1,s++,s>o&&(s=t.end.row+1,t=this.$foldData[r++],o=t?t.start.row:Infinity)}return this.lineWidgets&&(e+=this.$getWidgetScreenLength()),e}}).call(p.prototype),e("./edit_session/folding").Folding.call(p.prototype),e("./edit_session/bracket_match").BracketMatch.call(p.prototype),s.defineOptions(p.prototype,"session",{wrap:{set:function(e){!e||e=="off"?e=!1:e=="free"?e=!0:e=="printMargin"?e=-1:typeof e=="string"&&(e=parseInt(e,10)||!1);if(this.$wrap==e)return;if(!e)this.setUseWrapMode(!1);else{var t=typeof e=="number"?e:null;this.setWrapLimitRange(t,t),this.setUseWrapMode(!0)}this.$wrap=e},get:function(){return this.getUseWrapMode()?this.getWrapLimitRange().min||"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){e=e=="auto"?this.$mode.type!="text":e!="text",e!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode&&(this.$modified=!0,this.$resetRowCache(0),this.$updateWrapData(0,this.getLength()-1)))},initialValue:"auto"},firstLineNumber:{set:function(){this._emit("changeBreakpoint")},initialValue:1},useWorker:{set:function(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){if(isNaN(e)||this.$tabSize===e)return;this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._emit("changeTabSize")},initialValue:4,handlesSet:!0},overwrite:{set:function(e){this._emit("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0}}),t.EditSession=p}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/lang"),s=e("./lib/event_emitter").EventEmitter,o=e("./range").Range,u=function(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.lead=this.selectionLead=this.doc.createAnchor(0,0),this.anchor=this.selectionAnchor=this.doc.createAnchor(0,0);var t=this;this.lead.on("change",function(e){t._emit("changeCursor"),t.$isEmpty||t._emit("changeSelection"),!t.$keepDesiredColumnOnChange&&e.old.column!=e.value.column&&(t.$desiredColumn=null)}),this.selectionAnchor.on("change",function(){t.$isEmpty||t._emit("changeSelection")})};(function(){r.implement(this,s),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return this.isEmpty()?!1:this.getRange().isMultiLine()},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(e,t){this.anchor.setPosition(e,t),this.$isEmpty&&(this.$isEmpty=!1,this._emit("changeSelection"))},this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.shiftSelection=function(e){if(this.$isEmpty){this.moveCursorTo(this.lead.row,this.lead.column+e);return}var t=this.getSelectionAnchor(),n=this.getSelectionLead(),r=this.isBackwards();(!r||t.column!==0)&&this.setSelectionAnchor(t.row,t.column+e),(r||n.column!==0)&&this.$moveSelection(function(){this.moveCursorTo(n.row,n.column+e)})},this.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.isEmpty()?o.fromPoints(t,t):this.isBackwards()?o.fromPoints(t,e):o.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){var e=this.doc.getLength()-1;this.setSelectionAnchor(0,0),this.moveCursorTo(e,this.doc.getLine(e).length)},this.setRange=this.setSelectionRange=function(e,t){t?(this.setSelectionAnchor(e.end.row,e.end.column),this.selectTo(e.start.row,e.start.column)):(this.setSelectionAnchor(e.start.row,e.start.column),this.selectTo(e.end.row,e.end.column)),this.getRange().isEmpty()&&(this.$isEmpty=!0),this.$desiredColumn=null},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection(function(){this.moveCursorTo(e,t)})},this.selectToPosition=function(e){this.$moveSelection(function(){this.moveCursorToPosition(e)})},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,t){if(typeof t=="undefined"){var n=e||this.lead;e=n.row,t=n.column}return this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},this.getLineRange=function(e,t){var n=typeof e=="number"?e:this.lead.row,r,i=this.session.getFoldLine(n);return i?(n=i.start.row,r=i.end.row):r=n,t===!0?new o(n,0,r,this.session.getLine(r).length):new o(n,0,r+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.moveCursorLeft=function(){var e=this.lead.getPosition(),t;if(t=this.session.getFoldAt(e.row,e.column,-1))this.moveCursorTo(t.start.row,t.start.column);else if(e.column==0)e.row>0&&this.moveCursorTo(e.row-1,this.doc.getLine(e.row-1).length);else{var n=this.session.getTabSize();this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(e.column-n,e.column).split(" ").length-1==n?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var e=this.lead.getPosition(),t;if(t=this.session.getFoldAt(e.row,e.column,1))this.moveCursorTo(t.end.row,t.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var n=this.session.getTabSize(),e=this.lead;this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(e.column,e.column+n).split(" ").length-1==n?this.moveCursorBy(0,n):this.moveCursorBy(0,1)}},this.moveCursorLineStart=function(){var e=this.lead.row,t=this.lead.column,n=this.session.documentToScreenRow(e,t),r=this.session.screenToDocumentPosition(n,0),i=this.session.getDisplayLine(e,null,r.row,r.column),s=i.match(/^\s*/);s[0].length!=t&&!this.session.$useEmacsStyleLineStart&&(r.column+=s[0].length),this.moveCursorToPosition(r)},this.moveCursorLineEnd=function(){var e=this.lead,t=this.session.getDocumentLastRowColumnPosition(e.row,e.column);if(this.lead.column==t.column){var n=this.session.getLine(t.row);if(t.column==n.length){var r=n.search(/\s+$/);r>0&&(t.column=r)}}this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t),i;this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var s=this.session.getFoldAt(e,t,1);if(s){this.moveCursorTo(s.end.row,s.end.column);return}if(i=this.session.nonTokenRe.exec(r))t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,r=n.substring(t);if(t>=n.length){this.moveCursorTo(e,n.length),this.moveCursorRight(),e<this.doc.getLength()-1&&this.moveCursorWordRight();return}if(i=this.session.tokenRe.exec(r))t+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0;this.moveCursorTo(e,t)},this.moveCursorLongWordLeft=function(){var e=this.lead.row,t=this.lead.column,n;if(n=this.session.getFoldAt(e,t,-1)){this.moveCursorTo(n.start.row,n.start.column);return}var r=this.session.getFoldStringAt(e,t,-1);r==null&&(r=this.doc.getLine(e).substring(0,t));var s=i.stringReverse(r),o;this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;if(o=this.session.nonTokenRe.exec(s))t-=this.session.nonTokenRe.lastIndex,s=s.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0;if(t<=0){this.moveCursorTo(e,0),this.moveCursorLeft(),e>0&&this.moveCursorWordLeft();return}if(o=this.session.tokenRe.exec(s))t-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0;this.moveCursorTo(e,t)},this.$shortWordEndIndex=function(e){var t,n=0,r,i=/\s/,s=this.session.tokenRe;s.lastIndex=0;if(t=this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{while((r=e[n])&&i.test(r))n++;if(n<1){s.lastIndex=0;while((r=e[n])&&!s.test(r)){s.lastIndex=0,n++;if(i.test(r)){if(n>2){n--;break}while((r=e[n])&&i.test(r))n++;if(n>2)break}}}}return s.lastIndex=0,n},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t),i=this.session.getFoldAt(e,t,1);if(i)return this.moveCursorTo(i.end.row,i.end.column);if(t==n.length){var s=this.doc.getLength();do e++,r=this.doc.getLine(e);while(e<s&&/^\s*$/.test(r));/^\s+/.test(r)||(r=""),t=0}var o=this.$shortWordEndIndex(r);this.moveCursorTo(e,t+o)},this.moveCursorShortWordLeft=function(){var e=this.lead.row,t=this.lead.column,n;if(n=this.session.getFoldAt(e,t,-1))return this.moveCursorTo(n.start.row,n.start.column);var r=this.session.getLine(e).substring(0,t);if(t==0){do e--,r=this.doc.getLine(e);while(e>0&&/^\s*$/.test(r));t=r.length,/\s+$/.test(r)||(r="")}var s=i.stringReverse(r),o=this.$shortWordEndIndex(s);return this.moveCursorTo(e,t-o)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(e,t){var n=this.session.documentToScreenPosition(this.lead.row,this.lead.column);t===0&&(this.$desiredColumn?n.column=this.$desiredColumn:this.$desiredColumn=n.column);var r=this.session.screenToDocumentPosition(n.row+e,n.column);e!==0&&t===0&&r.row===this.lead.row&&r.column===this.lead.column&&this.session.lineWidgets&&this.session.lineWidgets[r.row]&&r.row++,this.moveCursorTo(r.row,r.column+t,t===0)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,n){var r=this.session.getFoldAt(e,t,1);r&&(e=r.start.row,t=r.start.column),this.$keepDesiredColumnOnChange=!0,this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,n){var r=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(r.row,r.column,n)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},this.toJSON=function(){if(this.rangeCount)var e=this.ranges.map(function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t});else{var e=this.getRange();e.isBackwards=this.isBackwards()}return e},this.fromJSON=function(e){if(e.start==undefined){if(this.rangeList){this.toSingleRange(e[0]);for(var t=e.length;t--;){var n=o.fromPoints(e[t].start,e[t].end);e.isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},this.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0}}).call(u.prototype),t.Selection=u}),ace.define("ace/range",["require","exports","module"],function(e,t,n){var r=function(e,t){return e.row-t.row||e.column-t.column},i=function(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return this.compare(e,t)==0},this.compareRange=function(e){var t,n=e.end,r=e.start;return t=this.compare(n.row,n.column),t==1?(t=this.compare(r.row,r.column),t==1?2:t==0?1:0):t==-1?-2:(t=this.compare(r.row,r.column),t==-1?-1:t==1?42:0)},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return this.comparePoint(e.start)==0&&this.comparePoint(e.end)==0},this.intersects=function(e){var t=this.compareRange(e);return t==-1||t==0||t==1},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){typeof e=="object"?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){typeof e=="object"?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)||this.isStart(e,t)?!1:!0:!1},this.insideStart=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)?!1:!0:!1},this.insideEnd=function(e,t){return this.compare(e,t)==0?this.isStart(e,t)?!1:!0:!1},this.compare=function(e,t){return!this.isMultiLine()&&e===this.start.row?t<this.start.column?-1:t>this.end.column?1:0:e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else if(this.end.row<e)var n={row:e,column:0};if(this.start.row>t)var r={row:t+1,column:0};else if(this.start.row<e)var r={row:e,column:0};return i.fromPoints(r||this.start,n||this.end)},this.extend=function(e,t){var n=this.compare(e,t);if(n==0)return this;if(n==-1)var r={row:e,column:t};else var s={row:e,column:t};return i.fromPoints(r||this.start,s||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return i.fromPoints(this.start,this.end)},this.collapseRows=function(){return this.end.column==0?new i(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new i(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),n=e.documentToScreenPosition(this.end);return new i(t.row,t.column,n.row,n.column)},this.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t}}).call(i.prototype),i.fromPoints=function(e,t){return new i(e.row,e.column,t.row,t.column)},i.comparePoints=r,i.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=i}),ace.define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(e,t,n){var r=e("../tokenizer").Tokenizer,i=e("./text_highlight_rules").TextHighlightRules,s=e("./behaviour").Behaviour,o=e("../unicode"),u=e("../lib/lang"),a=e("../token_iterator").TokenIterator,f=e("../range").Range,l=function(){this.HighlightRules=i,this.$behaviour=new s};(function(){this.tokenRe=new RegExp("^["+o.packages.L+o.packages.Mn+o.packages.Mc+o.packages.Nd+o.packages.Pc+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+o.packages.L+o.packages.Mn+o.packages.Mc+o.packages.Nd+o.packages.Pc+"\\$_]|s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=new this.HighlightRules,this.$tokenizer=new r(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,t,n,r){function w(e){for(var t=n;t<=r;t++)e(i.getLine(t),t)}var i=t.doc,s=!0,o=!0,a=Infinity,f=t.getTabSize(),l=!1;if(!this.lineCommentStart){if(!this.blockComment)return!1;var c=this.blockComment.start,h=this.blockComment.end,p=new RegExp("^(\\s*)(?:"+u.escapeRegExp(c)+")"),d=new RegExp("(?:"+u.escapeRegExp(h)+")\\s*$"),v=function(e,t){if(g(e,t))return;if(!s||/\S/.test(e))i.insertInLine({row:t,column:e.length},h),i.insertInLine({row:t,column:a},c)},m=function(e,t){var n;(n=e.match(d))&&i.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(p))&&i.removeInLine(t,n[1].length,n[0].length)},g=function(e,n){if(p.test(e))return!0;var r=t.getTokens(n);for(var i=0;i<r.length;i++)if(r[i].type==="comment")return!0}}else{if(Array.isArray(this.lineCommentStart))var p=this.lineCommentStart.map(u.escapeRegExp).join("|"),c=this.lineCommentStart[0];else var p=u.escapeRegExp(this.lineCommentStart),c=this.lineCommentStart;p=new RegExp("^(\\s*)(?:"+p+") ?"),l=t.getUseSoftTabs();var m=function(e,t){var n=e.match(p);if(!n)return;var r=n[1].length,s=n[0].length;!b(e,r,s)&&n[0][s-1]==" "&&s--,i.removeInLine(t,r,s)},y=c+" ",v=function(e,t){if(!s||/\S/.test(e))b(e,a,a)?i.insertInLine({row:t,column:a},y):i.insertInLine({row:t,column:a},c)},g=function(e,t){return p.test(e)},b=function(e,t,n){var r=0;while(t--&&e.charAt(t)==" ")r++;if(r%f!=0)return!1;var r=0;while(e.charAt(n++)==" ")r++;return f>2?r%f!=f-1:r%f==0}}var E=Infinity;w(function(e,t){var n=e.search(/\S/);n!==-1?(n<a&&(a=n),o&&!g(e,t)&&(o=!1)):E>e.length&&(E=e.length)}),a==Infinity&&(a=E,s=!1,o=!1),l&&a%f!=0&&(a=Math.floor(a/f)*f),w(o?m:v)},this.toggleBlockComment=function(e,t,n,r){var i=this.blockComment;if(!i)return;!i.start&&i[0]&&(i=i[0]);var s=new a(t,r.row,r.column),o=s.getCurrentToken(),u=t.selection,l=t.selection.toOrientedRange(),c,h;if(o&&/comment/.test(o.type)){var p,d;while(o&&/comment/.test(o.type)){var v=o.value.indexOf(i.start);if(v!=-1){var m=s.getCurrentTokenRow(),g=s.getCurrentTokenColumn()+v;p=new f(m,g,m,g+i.start.length);break}o=s.stepBackward()}var s=new a(t,r.row,r.column),o=s.getCurrentToken();while(o&&/comment/.test(o.type)){var v=o.value.indexOf(i.end);if(v!=-1){var m=s.getCurrentTokenRow(),g=s.getCurrentTokenColumn()+v;d=new f(m,g,m,g+i.end.length);break}o=s.stepForward()}d&&t.remove(d),p&&(t.remove(p),c=p.start.row,h=-i.start.length)}else h=i.start.length,c=n.start.row,t.insert(n.end,i.end),t.insert(n.start,i.start);l.start.row==c&&(l.start.column+=h),l.end.row==c&&(l.end.column+=h),t.selection.fromOrientedRange(l)},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.autoOutdent=function(e,t,n){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){this.$embeds=[],this.$modes={};for(var t in e)e[t]&&(this.$embeds.push(t),this.$modes[t]=new e[t]);var n=["toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"];for(var t=0;t<n.length;t++)(function(e){var r=n[t],i=e[r];e[n[t]]=function(){return this.$delegator(r,arguments,i)}})(this)},this.$delegator=function(e,t,n){var r=t[0];typeof r!="string"&&(r=r[0]);for(var i=0;i<this.$embeds.length;i++){if(!this.$modes[this.$embeds[i]])continue;var s=r.split(this.$embeds[i]);if(!s[0]&&s[1]){t[0]=s[1];var o=this.$modes[this.$embeds[i]];return o[e].apply(o,t)}}var u=n.apply(this,t);return n?u:undefined},this.transformAction=function(e,t,n,r,i){if(this.$behaviour){var s=this.$behaviour.getBehaviours();for(var o in s)if(s[o][t]){var u=s[o][t].apply(this,arguments);if(u)return u}}},this.getKeywords=function(e){if(!this.completionKeywords){var t=this.$tokenizer.rules,n=[];for(var r in t){var i=t[r];for(var s=0,o=i.length;s<o;s++)if(typeof i[s].token=="string")/keyword|support|storage/.test(i[s].token)&&n.push(i[s].regex);else if(typeof i[s].token=="object")for(var u=0,a=i[s].token.length;u<a;u++)if(/keyword|support|storage/.test(i[s].token[u])){var r=i[s].regex.match(/\(.+?\)/g)[u];n.push(r.substr(1,r.length-2))}}this.completionKeywords=n}return e?n.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,t,n,r){var i=this.$keywordList||this.$createKeywordList();return i.map(function(e){return{name:e,value:e,score:0,meta:"keyword"}})}}).call(l.prototype),t.Mode=l}),ace.define("ace/tokenizer",["require","exports","module"],function(e,t,n){var r=1e3,i=function(e){this.states=e,this.regExps={},this.matchMappings={};for(var t in this.states){var n=this.states[t],r=[],i=0,s=this.matchMappings[t]={defaultToken:"text"},o="g",u=[];for(var a=0;a<n.length;a++){var f=n[a];f.defaultToken&&(s.defaultToken=f.defaultToken),f.caseInsensitive&&(o="gi");if(f.regex==null)continue;f.regex instanceof RegExp&&(f.regex=f.regex.toString().slice(1,-1));var l=f.regex,c=(new RegExp("(?:("+l+")|(.))")).exec("a").length-2;if(Array.isArray(f.token))if(f.token.length==1||c==1)f.token=f.token[0];else{if(c-1!=f.token.length)throw new Error("number of classes and regexp groups in '"+f.token+"'\n'"+f.regex+"' doesn't match\n"+(c-1)+"!="+f.token.length);f.tokenArray=f.token,f.token=null,f.onMatch=this.$arrayTokens}else typeof f.token=="function"&&!f.onMatch&&(c>1?f.onMatch=this.$applyToken:f.onMatch=f.token);c>1&&(/\\\d/.test(f.regex)?l=f.regex.replace(/\\([0-9]+)/g,function(e,t){return"\\"+(parseInt(t,10)+i+1)}):(c=1,l=this.removeCapturingGroups(f.regex)),!f.splitRegex&&typeof f.token!="string"&&u.push(f)),s[i]=a,i+=c,r.push(l),f.onMatch||(f.onMatch=null),f.__proto__=null}u.forEach(function(e){e.splitRegex=this.createSplitterRegexp(e.regex,o)},this),this.regExps[t]=new RegExp("("+r.join(")|(")+")|($)",o)}};(function(){this.$setMaxTokenCount=function(e){r=e|0},this.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),n=this.token.apply(this,t);if(typeof n=="string")return[{type:n,value:e}];var r=[];for(var i=0,s=n.length;i<s;i++)t[i]&&(r[r.length]={type:n[i],value:t[i]});return r},this.$arrayTokens=function(e){if(!e)return[];var t=this.splitRegex.exec(e);if(!t)return"text";var n=[],r=this.tokenArray;for(var i=0,s=r.length;i<s;i++)t[i+1]&&(n[n.length]={type:r[i],value:t[i+1]});return n},this.removeCapturingGroups=function(e){var t=e.replace(/\[(?:\\.|[^\]])*?\]|\\.|\(\?[:=!]|(\()/g,function(e,t){return t?"(?:":e});return t},this.createSplitterRegexp=function(e,t){if(e.indexOf("(?=")!=-1){var n=0,r=!1,i={};e.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(e,t,s,o,u,a){return r?r=u!="]":u?r=!0:o?(n==i.stack&&(i.end=a+1,i.stack=-1),n--):s&&(n++,s.length!=1&&(i.stack=n,i.start=a)),e}),i.end!=null&&/^\)*$/.test(e.substr(i.end))&&(e=e.substring(0,i.start)+e.substr(i.end))}return new RegExp(e,(t||"").replace("g",""))},this.getLineTokens=function(e,t){if(t&&typeof t!="string"){var n=t.slice(0);t=n[0]}else var n=[];var i=t||"start",s=this.states[i],o=this.matchMappings[i],u=this.regExps[i];u.lastIndex=0;var a,f=[],l=0,c={type:null,value:""};while(a=u.exec(e)){var h=o.defaultToken,p=null,d=a[0],v=u.lastIndex;if(v-d.length>l){var m=e.substring(l,v-d.length);c.type==h?c.value+=m:(c.type&&f.push(c),c={type:h,value:m})}for(var g=0;g<a.length-2;g++){if(a[g+1]===undefined)continue;p=s[o[g]],p.onMatch?h=p.onMatch(d,i,n):h=p.token,p.next&&(typeof p.next=="string"?i=p.next:i=p.next(i,n),s=this.states[i],s||(window.console&&console.error&&console.error(i,"doesn't exist"),i="start",s=this.states[i]),o=this.matchMappings[i],l=v,u=this.regExps[i],u.lastIndex=v);break}if(d)if(typeof h=="string")!!p&&p.merge===!1||c.type!==h?(c.type&&f.push(c),c={type:h,value:d}):c.value+=d;else if(h){c.type&&f.push(c),c={type:null,value:""};for(var g=0;g<h.length;g++)f.push(h[g])}if(l==e.length)break;l=v;if(f.length>r){while(l<e.length)c.type&&f.push(c),c={value:e.substring(l,l+=2e3),type:"overflow"};i="start",n=[];break}}return c.type&&f.push(c),n.length>1&&n[0]!==i&&n.unshift(i),{tokens:f,state:n.length?n:i}}}).call(i.prototype),t.Tokenizer=i}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(e,t,n){var r=e("../lib/lang"),i=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(e,t){if(!t){for(var n in e)this.$rules[n]=e[n];return}for(var n in e){var r=e[n];for(var i=0;i<r.length;i++){var s=r[i];s.next&&(typeof s.next!="string"?s.nextState&&s.nextState.indexOf(t)!==0&&(s.nextState=t+s.nextState):s.next.indexOf(t)!==0&&(s.next=t+s.next))}this.$rules[t+n]=r}},this.getRules=function(){return this.$rules},this.embedRules=function(e,t,n,i,s){var o=(new e).getRules();if(i)for(var u=0;u<i.length;u++)i[u]=t+i[u];else{i=[];for(var a in o)i.push(t+a)}this.addRules(o,t);if(n){var f=Array.prototype[s?"push":"unshift"];for(var u=0;u<i.length;u++)f.apply(this.$rules[i[u]],r.deepCopy(n))}this.$embeds||(this.$embeds=[]),this.$embeds.push(t)},this.getEmbeds=function(){return this.$embeds};var e=function(e,t){return e!="start"&&t.unshift(this.nextState,e),this.nextState},t=function(e,t){return t[0]!==e?"start":(t.shift(),t.shift())};this.normalizeRules=function(){function i(s){var o=r[s];o.processed=!0;for(var u=0;u<o.length;u++){var a=o[u];!a.regex&&a.start&&(a.regex=a.start,a.next||(a.next=[]),a.next.push({defaultToken:a.token},{token:a.token+".end",regex:a.end||a.start,next:"pop"}),a.token=a.token+".start",a.push=!0);var f=a.next||a.push;if(f&&Array.isArray(f)){var l=a.stateName;l||(l=a.token,typeof l!="string"&&(l=l[0]||""),r[l]&&(l+=n++)),r[l]=f,a.next=l,i(l)}else f=="pop"&&(a.next=t);a.push&&(a.nextState=a.next||a.push,a.next=e,delete a.push);if(a.rules)for(var c in a.rules)r[c]?r[c].push&&r[c].push.apply(r[c],a.rules[c]):r[c]=a.rules[c];if(a.include||typeof a=="string")var h=a.include||a,p=r[h];else Array.isArray(a)&&(p=a);if(p){var d=[u,1].concat(p);a.noEscape&&(d=d.filter(function(e){return!e.next})),o.splice.apply(o,d),u--,p=null}a.keywordMap&&(a.token=this.createKeywordMapper(a.keywordMap,a.defaultToken||"text",a.caseInsensitive),delete a.defaultToken)}}var n=0,r=this.$rules;Object.keys(r).forEach(i,this)},this.createKeywordMapper=function(e,t,n,r){var i=Object.create(null);return Object.keys(e).forEach(function(t){var s=e[t];n&&(s=s.toLowerCase());var o=s.split(r||"|");for(var u=o.length;u--;)i[o[u]]=t}),Object.getPrototypeOf(i)&&(i.__proto__=null),this.$keywordList=Object.keys(i),e=null,n?function(e){return i[e.toLowerCase()]||t}:function(e){return i[e]||t}},this.getKeywords=function(){return this.$keywords}}).call(i.prototype),t.TextHighlightRules=i}),ace.define("ace/mode/behaviour",["require","exports","module"],function(e,t,n){var r=function(){this.$behaviours={}};(function(){this.add=function(e,t,n){switch(undefined){case this.$behaviours:this.$behaviours={};case this.$behaviours[e]:this.$behaviours[e]={}}this.$behaviours[e][t]=n},this.addBehaviours=function(e){for(var t in e)for(var n in e[t])this.add(t,n,e[t][n])},this.remove=function(e){this.$behaviours&&this.$behaviours[e]&&delete this.$behaviours[e]},this.inherit=function(e,t){if(typeof e=="function")var n=(new e).getBehaviours(t);else var n=e.getBehaviours(t);this.addBehaviours(n)},this.getBehaviours=function(e){if(!e)return this.$behaviours;var t={};for(var n=0;n<e.length;n++)this.$behaviours[e[n]]&&(t[e[n]]=this.$behaviours[e[n]]);return t}}).call(r.prototype),t.Behaviour=r}),ace.define("ace/unicode",["require","exports","module"],function(e,t,n){function r(e){var n=/\w{4}/g;for(var r in e)t.packages[r]=e[r].replace(n,"\\u$&")}t.packages={},r({L:"0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",Ll:"0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A",Lu:"0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A",Lt:"01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC",Lm:"02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F",Lo:"01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",M:"0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26",Mn:"0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26",Mc:"0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC",Me:"0488048906DE20DD-20E020E2-20E4A670-A672",N:"0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nd:"0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nl:"16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF",No:"00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835",P:"0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65",Pd:"002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D",Ps:"0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62",Pe:"0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63",Pi:"00AB2018201B201C201F20392E022E042E092E0C2E1C2E20",Pf:"00BB2019201D203A2E032E052E0A2E0D2E1D2E21",Pc:"005F203F20402054FE33FE34FE4D-FE4FFF3F",Po:"0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65",S:"0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD",Sm:"002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC",Sc:"002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6",Sk:"005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3",So:"00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD",Z:"002000A01680180E2000-200A20282029202F205F3000",Zs:"002000A01680180E2000-200A202F205F3000",Zl:"2028",Zp:"2029",C:"0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF",Cc:"0000-001F007F-009F",Cf:"00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB",Co:"E000-F8FF",Cs:"D800-DFFF",Cn:"03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF"})}),ace.define("ace/token_iterator",["require","exports","module"],function(e,t,n){var r=function(e,t,n){this.$session=e,this.$row=t,this.$rowTokens=e.getTokens(t);var r=e.getTokenAt(t,n);this.$tokenIndex=r?r.index:-1};(function(){this.stepBackward=function(){this.$tokenIndex-=1;while(this.$tokenIndex<0){this.$row-=1;if(this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},this.stepForward=function(){this.$tokenIndex+=1;var e;while(this.$tokenIndex>=this.$rowTokens.length){this.$row+=1,e||(e=this.$session.getLength());if(this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(n!==undefined)return n;n=0;while(t>0)t-=1,n+=e[t].value.length;return n}}).call(r.prototype),t.TokenIterator=r}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,o=e("./anchor").Anchor,u=function(e){this.$lines=[],e.length==0?this.$lines=[""]:Array.isArray(e)?this._insertLines(0,e):this.insert({row:0,column:0},e)};(function(){r.implement(this,i),this.setValue=function(e){var t=this.getLength();this.remove(new s(0,0,t,this.getLine(t-1).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new o(this,e,t)},"aaa".split(/a/).length==0?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n"},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine}},this.$autoNewLine="\n",this.$newLineMode="auto",this.setNewLineMode=function(e){if(this.$newLineMode===e)return;this.$newLineMode=e},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return e=="\r\n"||e=="\r"||e=="\n"},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){if(e.start.row==e.end.row)return this.getLine(e.start.row).substring(e.start.column,e.end.column);var t=this.getLines(e.start.row,e.end.row);t[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;return e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column)),t.join(this.getNewLineCharacter())},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):e.row<0&&(e.row=0),e},this.insert=function(e,t){if(!t||t.length===0)return e;e=this.$clipPosition(e),this.getLength()<=1&&this.$detectNewLine(t);var n=this.$split(t),r=n.splice(0,1)[0],i=n.length==0?null:n.splice(n.length-1,1)[0];return e=this.insertInLine(e,r),i!==null&&(e=this.insertNewLine(e),e=this._insertLines(e.row,n),e=this.insertInLine(e,i||"")),e},this.insertLines=function(e,t){return e>=this.getLength()?this.insert({row:e,column:0},"\n"+t.join("\n")):this._insertLines(Math.max(e,0),t)},this._insertLines=function(e,t){if(t.length==0)return{row:e,column:0};if(t.length>65535){var n=this._insertLines(e,t.slice(65535));t=t.slice(0,65535)}var r=[e,0];r.push.apply(r,t),this.$lines.splice.apply(this.$lines,r);var i=new s(e,0,e+t.length,0),o={action:"insertLines",range:i,lines:t};return this._emit("change",{data:o}),n||i.end},this.insertNewLine=function(e){e=this.$clipPosition(e);var t=this.$lines[e.row]||"";this.$lines[e.row]=t.substring(0,e.column),this.$lines.splice(e.row+1,0,t.substring(e.column,t.length));var n={row:e.row+1,column:0},r={action:"insertText",range:s.fromPoints(e,n),text:this.getNewLineCharacter()};return this._emit("change",{data:r}),n},this.insertInLine=function(e,t){if(t.length==0)return e;var n=this.$lines[e.row]||"";this.$lines[e.row]=n.substring(0,e.column)+t+n.substring(e.column);var r={row:e.row,column:e.column+t.length},i={action:"insertText",range:s.fromPoints(e,r),text:t};return this._emit("change",{data:i}),r},this.remove=function(e){!e instanceof s&&(e=s.fromPoints(e.start,e.end)),e.start=this.$clipPosition(e.start),e.end=this.$clipPosition(e.end);if(e.isEmpty())return e.start;var t=e.start.row,n=e.end.row;if(e.isMultiLine()){var r=e.start.column==0?t:t+1,i=n-1;e.end.column>0&&this.removeInLine(n,0,e.end.column),i>=r&&this._removeLines(r,i),r!=t&&(this.removeInLine(t,e.start.column,this.getLine(t).length),this.removeNewLine(e.start.row))}else this.removeInLine(t,e.start.column,e.end.column);return e.start},this.removeInLine=function(e,t,n){if(t==n)return;var r=new s(e,t,e,n),i=this.getLine(e),o=i.substring(t,n),u=i.substring(0,t)+i.substring(n,i.length);this.$lines.splice(e,1,u);var a={action:"removeText",range:r,text:o};return this._emit("change",{data:a}),r.start},this.removeLines=function(e,t){return e<0||t>=this.getLength()?this.remove(new s(e,0,t+1,0)):this._removeLines(e,t)},this._removeLines=function(e,t){var n=new s(e,0,t+1,0),r=this.$lines.splice(e,t-e+1),i={action:"removeLines",range:n,nl:this.getNewLineCharacter(),lines:r};return this._emit("change",{data:i}),r},this.removeNewLine=function(e){var t=this.getLine(e),n=this.getLine(e+1),r=new s(e,t.length,e+1,0),i=t+n;this.$lines.splice(e,2,i);var o={action:"removeText",range:r,text:this.getNewLineCharacter()};this._emit("change",{data:o})},this.replace=function(e,t){!e instanceof s&&(e=s.fromPoints(e.start,e.end));if(t.length==0&&e.isEmpty())return e.start;if(t==this.getTextRange(e))return e.end;this.remove(e);if(t)var n=this.insert(e.start,t);else n=e.start;return n},this.applyDeltas=function(e){for(var t=0;t<e.length;t++){var n=e[t],r=s.fromPoints(n.range.start,n.range.end);n.action=="insertLines"?this.insertLines(r.start.row,n.lines):n.action=="insertText"?this.insert(r.start,n.text):n.action=="removeLines"?this._removeLines(r.start.row,r.end.row-1):n.action=="removeText"&&this.remove(r)}},this.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--){var n=e[t],r=s.fromPoints(n.range.start,n.range.end);n.action=="insertLines"?this._removeLines(r.start.row,r.end.row-1):n.action=="insertText"?this.remove(r):n.action=="removeLines"?this._insertLines(r.start.row,n.lines):n.action=="removeText"&&this.insert(r.start,n.text)}},this.indexToPosition=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length;for(var i=t||0,s=n.length;i<s;i++){e-=n[i].length+r;if(e<0)return{row:i,column:e+n[i].length+r}}return{row:s-1,column:n[s-1].length}},this.positionToIndex=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=0,s=Math.min(e.row,n.length);for(var o=t||0;o<s;++o)i+=n[o].length+r;return i+e.column}}).call(u.prototype),t.Document=u}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=t.Anchor=function(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),typeof n=="undefined"?this.setPosition(t.row,t.column):this.setPosition(t,n)};(function(){r.implement(this,i),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(e){var t=e.data,n=t.range;if(n.start.row==n.end.row&&n.start.row!=this.row)return;if(n.start.row>this.row)return;if(n.start.row==this.row&&n.start.column>this.column)return;var r=this.row,i=this.column,s=n.start,o=n.end;if(t.action==="insertText")if(s.row===r&&s.column<=i){if(s.column!==i||!this.$insertRight)s.row===o.row?i+=o.column-s.column:(i-=s.column,r+=o.row-s.row)}else s.row!==o.row&&s.row<r&&(r+=o.row-s.row);else t.action==="insertLines"?s.row<=r&&(r+=o.row-s.row):t.action==="removeText"?s.row===r&&s.column<i?o.column>=i?i=s.column:i=Math.max(0,i-(o.column-s.column)):s.row!==o.row&&s.row<r?(o.row===r&&(i=Math.max(0,i-o.column)+s.column),r-=o.row-s.row):o.row===r&&(r-=o.row-s.row,i=Math.max(0,i-o.column)+s.column):t.action=="removeLines"&&s.row<=r&&(o.row<=r?r-=o.row-s.row:(r=s.row,i=0));this.setPosition(r,i,!0)},this.setPosition=function(e,t,n){var r;n?r={row:e,column:t}:r=this.$clipPositionToDocument(e,t);if(this.row==r.row&&this.column==r.column)return;var i={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._emit("change",{old:i,value:r})},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(s.prototype)}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=function(e,t){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=e;var n=this;this.$worker=function(){if(!n.running)return;var e=new Date,t=n.currentLine,r=-1,i=n.doc;while(n.lines[t])t++;var s=t,o=i.getLength(),u=0;n.running=!1;while(t<o){n.$tokenizeRow(t),r=t;do t++;while(n.lines[t]);u++;if(u%5==0&&new Date-e>20){n.running=setTimeout(n.$worker,20),n.currentLine=t;return}}n.currentLine=t,s<=r&&n.fireUpdateEvent(s,r)}};(function(){r.implement(this,i),this.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(e,t){var n={first:e,last:t};this._emit("update",{data:n})},this.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(e){var t=e.range,n=t.start.row,r=t.end.row-n;if(r===0)this.lines[n]=null;else if(e.action=="removeText"||e.action=="removeLines")this.lines.splice(n,r+1,null),this.states.splice(n,r+1,null);else{var i=Array(r+1);i.unshift(n,1),this.lines.splice.apply(this.lines,i),this.states.splice.apply(this.states,i)}this.currentLine=Math.min(n,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},this.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},this.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1],r=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!=r.state+""?(this.states[e]=r.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=r.tokens}}).call(s.prototype),t.BackgroundTokenizer=s}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,n){var r=e("./lib/lang"),i=e("./lib/oop"),s=e("./range").Range,o=function(e,t,n){this.setRegexp(e),this.clazz=t,this.type=n||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){if(this.regExp+""==e+"")return;this.regExp=e,this.cache=[]},this.update=function(e,t,n,i){if(!this.regExp)return;var o=i.firstRow,u=i.lastRow;for(var a=o;a<=u;a++){var f=this.cache[a];f==null&&(f=r.getMatchOffsets(n.getLine(a),this.regExp),f.length>this.MAX_RANGES&&(f=f.slice(0,this.MAX_RANGES)),f=f.map(function(e){return new s(a,e.offset,a,e.offset+e.length)}),this.cache[a]=f.length?f:"");for(var l=f.length;l--;)t.drawSingleLineMarker(e,f[l].toScreenRange(n),this.clazz,i)}}}).call(o.prototype),t.SearchHighlight=o}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"],function(e,t,n){function u(){this.getFoldAt=function(e,t,n){var r=this.getFoldLine(e);if(!r)return null;var i=r.folds;for(var s=0;s<i.length;s++){var o=i[s];if(o.range.contains(e,t)){if(n==1&&o.range.isEnd(e,t))continue;if(n==-1&&o.range.isStart(e,t))continue;return o}}},this.getFoldsInRange=function(e){var t=e.start,n=e.end,r=this.$foldData,i=[];t.column+=1,n.column-=1;for(var s=0;s<r.length;s++){var o=r[s].range.compareRange(e);if(o==2)continue;if(o==-2)break;var u=r[s].folds;for(var a=0;a<u.length;a++){var f=u[a];o=f.range.compareRange(e);if(o==-2)break;if(o==2)continue;if(o==42)break;i.push(f)}}return t.column-=1,n.column+=1,i},this.getFoldsInRangeList=function(e){if(Array.isArray(e)){var t=[];e.forEach(function(e){t=t.concat(this.getFoldsInRange(e))},this)}else var t=this.getFoldsInRange(e);return t},this.getAllFolds=function(){function n(t){e.push(t)}var e=[],t=this.$foldData;for(var r=0;r<t.length;r++)for(var i=0;i<t[r].folds.length;i++)n(t[r].folds[i]);return e},this.getFoldStringAt=function(e,t,n,r){r=r||this.getFoldLine(e);if(!r)return null;var i={end:{column:0}},s,o;for(var u=0;u<r.folds.length;u++){o=r.folds[u];var a=o.range.compareEnd(e,t);if(a==-1){s=this.getLine(o.start.row).substring(i.end.column,o.start.column);break}if(a===0)return null;i=o}return s||(s=this.getLine(o.start.row).substring(i.end.column)),n==-1?s.substring(0,t-i.end.column):n==1?s.substring(t-i.end.column):s},this.getFoldLine=function(e,t){var n=this.$foldData,r=0;t&&(r=n.indexOf(t)),r==-1&&(r=0);for(r;r<n.length;r++){var i=n[r];if(i.start.row<=e&&i.end.row>=e)return i;if(i.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,r=0;t&&(r=n.indexOf(t)),r==-1&&(r=0);for(r;r<n.length;r++){var i=n[r];if(i.end.row>=e)return i}return null},this.getFoldedRowCount=function(e,t){var n=this.$foldData,r=t-e+1;for(var i=0;i<n.length;i++){var s=n[i],o=s.end.row,u=s.start.row;if(o>=t){u<t&&(u>=e?r-=t-u:r=0);break}o>=e&&(u>=e?r-=o-u:r-=o-e+1)}return r},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort(function(e,t){return e.start.row-t.start.row}),e},this.addFold=function(e,t){var n=this.$foldData,r=!1,o;e instanceof s?o=e:(o=new s(t,e),o.collapseChildren=t.collapseChildren),this.$clipRangeToDocument(o.range);var u=o.start.row,a=o.start.column,f=o.end.row,l=o.end.column;if(u<f||u==f&&a<=l-2){var c=this.getFoldAt(u,a,1),h=this.getFoldAt(f,l,-1);if(c&&h==c)return c.addSubFold(o);if(c&&!c.range.isStart(u,a)||h&&!h.range.isEnd(f,l))throw new Error("A fold can't intersect already existing fold"+o.range+c.range);var p=this.getFoldsInRange(o.range);p.length>0&&(this.removeFolds(p),p.forEach(function(e){o.addSubFold(e)}));for(var d=0;d<n.length;d++){var v=n[d];if(f==v.start.row){v.addFold(o),r=!0;break}if(u==v.end.row){v.addFold(o),r=!0;if(!o.sameRow){var m=n[d+1];if(m&&m.start.row==f){v.merge(m);break}}break}if(f<=v.start.row)break}return r||(v=this.$addFoldLine(new i(this.$foldData,o))),this.$useWrapMode?this.$updateWrapData(v.start.row,v.start.row):this.$updateRowLengthCache(v.start.row,v.start.row),this.$modified=!0,this._emit("changeFold",{data:o,action:"add"}),o}throw new Error("The range has to be at least 2 characters width")},this.addFolds=function(e){e.forEach(function(e){this.addFold(e)},this)},this.removeFold=function(e){var t=e.foldLine,n=t.start.row,r=t.end.row,i=this.$foldData,s=t.folds;if(s.length==1)i.splice(i.indexOf(t),1);else if(t.range.isEnd(e.end.row,e.end.column))s.pop(),t.end.row=s[s.length-1].end.row,t.end.column=s[s.length-1].end.column;else if(t.range.isStart(e.start.row,e.start.column))s.shift(),t.start.row=s[0].start.row,t.start.column=s[0].start.column;else if(e.sameRow)s.splice(s.indexOf(e),1);else{var o=t.split(e.start.row,e.start.column);s=o.folds,s.shift(),o.start.row=s[0].start.row,o.start.column=s[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(n,r):this.$updateRowLengthCache(n,r)),this.$modified=!0,this._emit("changeFold",{data:e,action:"remove"})},this.removeFolds=function(e){var t=[];for(var n=0;n<e.length;n++)t.push(e[n]);t.forEach(function(e){this.removeFold(e)},this),this.$modified=!0},this.expandFold=function(e){this.removeFold(e),e.subFolds.forEach(function(t){e.restoreRange(t),this.addFold(t)},this),e.collapseChildren>0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach(function(e){this.expandFold(e)},this)},this.unfold=function(e,t){var n,i;e==null?(n=new r(0,0,this.getLength(),0),t=!0):typeof e=="number"?n=new r(e,0,e,this.getLine(e).length):"row"in e?n=r.fromPoints(e,e):n=e,i=this.getFoldsInRangeList(n);if(t)this.removeFolds(i);else while(i.length)this.expandFolds(i),i=this.getFoldsInRangeList(n)},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var n=this.getFoldLine(e,t);return n?n.end.row:e},this.getRowFoldStart=function(e,t){var n=this.getFoldLine(e,t);return n?n.start.row:e},this.getFoldDisplayLine=function(e,t,n,r,i){r==null&&(r=e.start.row,i=0),t==null&&(t=e.end.row,n=this.getLine(t).length);var s=this.doc,o="";return e.walk(function(e,t,n,u){if(t<r)return;if(t==r){if(n<i)return;u=Math.max(i,u)}e!=null?o+=e:o+=s.getLine(t).substring(u,n)},t,n),o},this.getDisplayLine=function(e,t,n,r){var i=this.getFoldLine(e);if(!i){var s;return s=this.doc.getLine(e),s.substring(r||0,t||s.length)}return this.getFoldDisplayLine(i,e,t,n,r)},this.$cloneFoldData=function(){var e=[];return e=this.$foldData.map(function(t){var n=t.folds.map(function(e){return e.clone()});return new i(e,n)}),e},this.toggleFold=function(e){var t=this.selection,n=t.getRange(),r,i;if(n.isEmpty()){var s=n.start;r=this.getFoldAt(s.row,s.column);if(r){this.expandFold(r);return}(i=this.findMatchingBracket(s))?n.comparePoint(i)==1?n.end=i:(n.start=i,n.start.column++,n.end.column--):(i=this.findMatchingBracket({row:s.row,column:s.column+1}))?(n.comparePoint(i)==1?n.end=i:n.start=i,n.start.column++):n=this.getCommentFoldRange(s.row,s.column)||n}else{var o=this.getFoldsInRange(n);if(e&&o.length){this.expandFolds(o);return}o.length==1&&(r=o[0])}r||(r=this.getFoldAt(n.start.row,n.start.column));if(r&&r.range.toString()==n.toString()){this.expandFold(r);return}var u="...";if(!n.isMultiLine()){u=this.getTextRange(n);if(u.length<4)return;u=u.trim().substring(0,2)+".."}this.addFold(u,n)},this.getCommentFoldRange=function(e,t,n){var i=new o(this,e,t),s=i.getCurrentToken();if(s&&/^comment|string/.test(s.type)){var u=new r,a=new RegExp(s.type.replace(/\..*/,"\\."));if(n!=1){do s=i.stepBackward();while(s&&a.test(s.type));i.stepForward()}u.start.row=i.getCurrentTokenRow(),u.start.column=i.getCurrentTokenColumn()+2,i=new o(this,e,t);if(n!=-1){do s=i.stepForward();while(s&&a.test(s.type));s=i.stepBackward()}else s=i.getCurrentToken();return u.end.row=i.getCurrentTokenRow(),u.end.column=i.getCurrentTokenColumn()+s.value.length-2,u}},this.foldAll=function(e,t,n){n==undefined&&(n=1e5);var r=this.foldWidgets;if(!r)return;t=t||this.getLength(),e=e||0;for(var i=e;i<t;i++){r[i]==null&&(r[i]=this.getFoldWidget(i));if(r[i]!="start")continue;var s=this.getFoldWidgetRange(i);if(s&&s.isMultiLine()&&s.end.row<=t&&s.start.row>=e)try{var o=this.addFold("...",s);o.collapseChildren=n,i=s.end.row}catch(u){}}},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw new Error("invalid fold style: "+e+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle==e)return;this.$foldStyle=e,e=="manual"&&this.unfold();var t=this.$foldMode;this.$setFolding(null),this.$setFolding(t)},this.$setFolding=function(e){if(this.$foldMode==e)return;this.$foldMode=e,this.removeListener("change",this.$updateFoldWidgets),this._emit("changeAnnotation");if(!e||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets)},this.getParentFoldRangeData=function(e,t){var n=this.foldWidgets;if(!n||t&&n[e])return{};var r=e-1,i;while(r>=0){var s=n[r];s==null&&(s=n[r]=this.getFoldWidget(r));if(s=="start"){var o=this.getFoldWidgetRange(r);i||(i=o);if(o&&o.end.row>=e)break}r--}return{range:r!==-1&&o,firstRange:i}},this.onFoldWidgetClick=function(e,t){t=t.domEvent;var n={children:t.shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey},r=this.$toggleFoldWidget(e,n);r||((t.target||t.srcElement).className+=" ace_invalid")},this.$toggleFoldWidget=function(e,t){var n=this.getFoldWidget(e),r=this.getLine(e),i=n==="end"?-1:1,s=this.getFoldAt(e,i===-1?0:r.length,i);if(s){t.children||t.all?this.removeFold(s):this.expandFold(s);return}var o=this.getFoldWidgetRange(e,!0);if(o&&!o.isMultiLine()){s=this.getFoldAt(o.start.row,o.start.column,1);if(s&&o.isEqual(s.range)){this.removeFold(s);return}}if(t.siblings){var u=this.getParentFoldRangeData(e);if(u.range)var a=u.range.start.row+1,f=u.range.end.row;this.foldAll(a,f,t.all?1e4:0)}else t.children?(f=o?o.end.row:this.getLength(),this.foldAll(e+1,o.end.row,t.all?1e4:0)):o&&(t.all&&(o.collapseChildren=1e4),this.addFold("...",o));return o},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var n=this.$toggleFoldWidget(t,{});if(n)return;var r=this.getParentFoldRangeData(t,!0);n=r.range||r.firstRange;if(n){t=n.start.row;var i=this.getFoldAt(t,this.getLine(t).length,1);i?this.removeFold(i):this.addFold("...",n)}},this.updateFoldWidgets=function(e){var t=e.data,n=t.range,r=n.start.row,i=n.end.row-r;if(i===0)this.foldWidgets[r]=null;else if(t.action=="removeText"||t.action=="removeLines")this.foldWidgets.splice(r,i+1,null);else{var s=Array(i+1);s.unshift(r,1),this.foldWidgets.splice.apply(this.foldWidgets,s)}}}var r=e("../range").Range,i=e("./fold_line").FoldLine,s=e("./fold").Fold,o=e("../token_iterator").TokenIterator;t.Folding=u}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,t,n){function i(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new r(t[0].start.row,t[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(e){e.setFoldLine(this)},this)}var r=e("../range").Range;(function(){this.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach(function(t){t.start.row+=e,t.end.row+=e})},this.addFold=function(e){if(e.sameRow){if(e.start.row<this.startRow||e.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort(function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)}),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},this.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},this.walk=function(e,t,n){var r=0,i=this.folds,s,o,u,a=!0;t==null&&(t=this.end.row,n=this.end.column);for(var f=0;f<i.length;f++){s=i[f],o=s.range.compareStart(t,n);if(o==-1){e(null,t,n,r,a);return}u=e(null,s.start.row,s.start.column,r,a),u=!u&&e(s.placeholder,s.start.row,s.start.column,r);if(u||o==0)return;a=!s.sameRow,r=s.end.column}e(null,t,n,r,a)},this.getNextFoldTo=function(e,t){var n,r;for(var i=0;i<this.folds.length;i++){n=this.folds[i],r=n.range.compareEnd(e,t);if(r==-1)return{fold:n,kind:"after"};if(r==0)return{fold:n,kind:"inside"}}return null},this.addRemoveChars=function(e,t,n){var r=this.getNextFoldTo(e,t),i,s;if(r){i=r.fold;if(r.kind=="inside"&&i.start.column!=t&&i.start.row!=e)window.console&&window.console.log(e,t,i);else if(i.start.row==e){s=this.folds;var o=s.indexOf(i);o==0&&(this.start.column+=n);for(o;o<s.length;o++){i=s[o],i.start.column+=n;if(!i.sameRow)return;i.end.column+=n}this.end.column+=n}}},this.split=function(e,t){var n=this.getNextFoldTo(e,t).fold,r=this.folds,s=this.foldData;if(!n)return null;var o=r.indexOf(n),u=r[o-1];this.end.row=u.end.row,this.end.column=u.end.column,r=r.splice(o,r.length-o);var a=new i(s,r);return s.splice(s.indexOf(this)+1,0,a),a},this.merge=function(e){var t=e.folds;for(var n=0;n<t.length;n++)this.addFold(t[n]);var r=this.foldData;r.splice(r.indexOf(e),1)},this.toString=function(){var e=[this.range.toString()+": ["];return this.folds.forEach(function(t){e.push("  "+t.toString())}),e.push("]"),e.join("\n")},this.idxToPosition=function(e){var t=0,n;for(var r=0;r<this.folds.length;r++){var n=this.folds[r];e-=n.start.column-t;if(e<0)return{row:n.start.row,column:n.start.column+e};e-=n.placeholder.length;if(e<0)return n.start;t=n.end.column}return{row:this.end.row,column:this.end.column+e}}}).call(i.prototype),t.FoldLine=i}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range","ace/range_list","ace/lib/oop"],function(e,t,n){function u(e,t){e.row-=t.row,e.row==0&&(e.column-=t.column)}function a(e,t){u(e.start,t),u(e.end,t)}function f(e,t){e.row==0&&(e.column+=t.column),e.row+=t.row}function l(e,t){f(e.start,t),f(e.end,t)}var r=e("../range").Range,i=e("../range_list").RangeList,s=e("../lib/oop"),o=t.Fold=function(e,t){this.foldLine=null,this.placeholder=t,this.range=e,this.start=e.start,this.end=e.end,this.sameRow=e.start.row==e.end.row,this.subFolds=this.ranges=[]};s.inherits(o,i),function(){this.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},this.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach(function(t){t.setFoldLine(e)})},this.clone=function(){var e=this.range.clone(),t=new o(e,this.placeholder);return this.subFolds.forEach(function(e){t.subFolds.push(e.clone())}),t.collapseChildren=this.collapseChildren,t},this.addSubFold=function(e){if(this.range.isEqual(e))return;if(!this.range.containsRange(e))throw new Error("A fold can't intersect already existing fold"+e.range+this.range);a(e,this.start);var t=e.start.row,n=e.start.column;for(var r=0,i=-1;r<this.subFolds.length;r++){i=this.subFolds[r].range.compare(t,n);if(i!=1)break}var s=this.subFolds[r];if(i==0)return s.addSubFold(e);var t=e.range.end.row,n=e.range.end.column;for(var o=r,i=-1;o<this.subFolds.length;o++){i=this.subFolds[o].range.compare(t,n);if(i!=1)break}var u=this.subFolds[o];if(i==0)throw new Error("A fold can't intersect already existing fold"+e.range+this.range);var f=this.subFolds.splice(r,o-r,e);return e.setFoldLine(this.foldLine),e},this.restoreRange=function(e){return l(e,this.start)}}.call(o.prototype)}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(e,t,n){var r=e("./range").Range,i=r.comparePoints,s=function(){this.ranges=[]};(function(){this.comparePoints=i,this.pointIndex=function(e,t,n){var r=this.ranges;for(var s=n||0;s<r.length;s++){var o=r[s],u=i(e,o.end);if(u>0)continue;var a=i(e,o.start);return u===0?t&&a!==0?-s-2:s:a>0||a===0&&!t?s:-s-1}return-s-1},this.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var r=this.pointIndex(e.end,t,n);return r<0?r=-r-1:r++,this.ranges.splice(n,r-n,e)},this.addList=function(e){var t=[];for(var n=e.length;n--;)t.push.call(t,this.add(e[n]));return t},this.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},this.merge=function(){var e=[],t=this.ranges;t=t.sort(function(e,t){return i(e.start,t.start)});var n=t[0],r;for(var s=1;s<t.length;s++){r=n,n=t[s];var o=i(r.end,n.start);if(o<0)continue;if(o==0&&!r.isEmpty()&&!n.isEmpty())continue;i(r.end,n.end)<0&&(r.end.row=n.end.row,r.end.column=n.end.column),t.splice(s,1),e.push(n),n=r,s--}return this.ranges=t,e},this.contains=function(e,t){return this.pointIndex({row:e,column:t})>=0},this.containsPoint=function(e){return this.pointIndex(e)>=0},this.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},this.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.row<e)return[];var r=this.pointIndex({row:e,column:0});r<0&&(r=-r-1);var i=this.pointIndex({row:t,column:0},r);i<0&&(i=-i-1);var s=[];for(var o=r;o<i;o++)s.push(n[o]);return s},this.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},this.attach=function(e){this.session&&this.detach(),this.session=e,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},this.detach=function(){if(!this.session)return;this.session.removeListener("change",this.onChange),this.session=null},this.$onChange=function(e){var t=e.data.range;if(e.data.action[0]=="i")var n=t.start,r=t.end;else var r=t.start,n=t.end;var i=n.row,s=r.row,o=s-i,u=-n.column+r.column,a=this.ranges;for(var f=0,l=a.length;f<l;f++){var c=a[f];if(c.end.row<i)continue;if(c.start.row>i)break;c.start.row==i&&c.start.column>=n.column&&(c.start.column!=n.column||!this.$insertRight)&&(c.start.column+=u,c.start.row+=o);if(c.end.row==i&&c.end.column>=n.column){if(c.end.column==n.column&&this.$insertRight)continue;c.end.column==n.column&&u>0&&f<l-1&&c.end.column>c.start.column&&c.end.column==a[f+1].start.column&&(c.end.column-=u),c.end.column+=u,c.end.row+=o}}if(o!=0&&f<l)for(;f<l;f++){var c=a[f];c.start.row+=o,c.end.row+=o}}}).call(s.prototype),t.RangeList=s}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,t,n){function s(){this.findMatchingBracket=function(e,t){if(e.column==0)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(n=="")return null;var r=n.match(/([\(\[\{])|([\)\]\}])/);return r?r[1]?this.$findClosingBracket(r[1],e):this.$findOpeningBracket(r[2],e):null},this.getBracketRange=function(e){var t=this.getLine(e.row),n=!0,r,s=t.charAt(e.column-1),o=s&&s.match(/([\(\[\{])|([\)\]\}])/);o||(s=t.charAt(e.column),e={row:e.row,column:e.column+1},o=s&&s.match(/([\(\[\{])|([\)\]\}])/),n=!1);if(!o)return null;if(o[1]){var u=this.$findClosingBracket(o[1],e);if(!u)return null;r=i.fromPoints(e,u),n||(r.end.column++,r.start.column--),r.cursor=r.end}else{var u=this.$findOpeningBracket(o[2],e);if(!u)return null;r=i.fromPoints(u,e),n||(r.start.column++,r.end.column--),r.cursor=r.start}return r},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{"},this.$findOpeningBracket=function(e,t,n){var i=this.$brackets[e],s=1,o=new r(this,t.row,t.column),u=o.getCurrentToken();u||(u=o.stepForward());if(!u)return;n||(n=new RegExp("(\\.?"+u.type.replace(".","\\.").replace("rparen",".paren")+")+"));var a=t.column-o.getCurrentTokenColumn()-2,f=u.value;for(;;){while(a>=0){var l=f.charAt(a);if(l==i){s-=1;if(s==0)return{row:o.getCurrentTokenRow(),column:a+o.getCurrentTokenColumn()}}else l==e&&(s+=1);a-=1}do u=o.stepBackward();while(u&&!n.test(u.type));if(u==null)break;f=u.value,a=f.length-1}return null},this.$findClosingBracket=function(e,t,n){var i=this.$brackets[e],s=1,o=new r(this,t.row,t.column),u=o.getCurrentToken();u||(u=o.stepForward());if(!u)return;n||(n=new RegExp("(\\.?"+u.type.replace(".","\\.").replace("lparen",".paren")+")+"));var a=t.column-o.getCurrentTokenColumn();for(;;){var f=u.value,l=f.length;while(a<l){var c=f.charAt(a);if(c==i){s-=1;if(s==0)return{row:o.getCurrentTokenRow(),column:a+o.getCurrentTokenColumn()}}else c==e&&(s+=1);a+=1}do u=o.stepForward();while(u&&!n.test(u.type));if(u==null)break;a=0}return null}}var r=e("../token_iterator").TokenIterator,i=e("../range").Range;t.BracketMatch=s}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,n){var r=e("./lib/lang"),i=e("./lib/oop"),s=e("./range").Range,o=function(){this.$options={}};(function(){this.set=function(e){return i.mixin(this.$options,e),this},this.getOptions=function(){return r.copyObject(this.$options)},this.setOptions=function(e){this.$options=e},this.find=function(e){var t=this.$matchIterator(e,this.$options);if(!t)return!1;var n=null;return t.forEach(function(e,t,r){if(!e.start){var i=e.offset+(r||0);n=new s(t,i,t,i+e.length)}else n=e;return!0}),n},this.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,i=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),o=[],u=t.re;if(t.$isMultiLine){var a=u.length,f=i.length-a;for(var l=u.offset||0;l<=f;l++){for(var c=0;c<a;c++)if(i[l+c].search(u[c])==-1)break;var h=i[l],p=i[l+a-1],d=h.match(u[0])[0].length,v=p.match(u[a-1])[0].length;o.push(new s(l,h.length-d,l+a-1,v))}}else for(var m=0;m<i.length;m++){var g=r.getMatchOffsets(i[m],u);for(var c=0;c<g.length;c++){var y=g[c];o.push(new s(m,y.offset,m,y.offset+y.length))}}if(n){var b=n.start.column,w=n.start.column,m=0,c=o.length-1;while(m<c&&o[m].start.column<b&&o[m].start.row==n.start.row)m++;while(m<c&&o[c].end.column>w&&o[c].end.row==n.end.row)c--;o=o.slice(m,c+1);for(m=0,c=o.length;m<c;m++)o[m].start.row+=n.start.row,o[m].end.row+=n.start.row}return o},this.replace=function(e,t){var n=this.$options,r=this.$assembleRegExp(n);if(n.$isMultiLine)return t;if(!r)return;var i=r.exec(e);if(!i||i[0].length!=e.length)return null;t=e.replace(r,t);if(n.preserveCase){t=t.split("");for(var s=Math.min(e.length,e.length);s--;){var o=e[s];o&&o.toLowerCase()!=o?t[s]=t[s].toUpperCase():t[s]=t[s].toLowerCase()}t=t.join("")}return t},this.$matchIterator=function(e,t){var n=this.$assembleRegExp(t);if(!n)return!1;var i=this,o,u=t.backwards;if(t.$isMultiLine)var a=n.length,f=function(t,r,i){var u=t.search(n[0]);if(u==-1)return;for(var f=1;f<a;f++){t=e.getLine(r+f);if(t.search(n[f])==-1)return}var l=t.match(n[a-1])[0].length,c=new s(r,u,r+a-1,l);n.offset==1?(c.start.row--,c.start.column=Number.MAX_VALUE):i&&(c.start.column+=i);if(o(c))return!0};else if(u)var f=function(e,t,i){var s=r.getMatchOffsets(e,n);for(var u=s.length-1;u>=0;u--)if(o(s[u],t,i))return!0};else var f=function(e,t,i){var s=r.getMatchOffsets(e,n);for(var u=0;u<s.length;u++)if(o(s[u],t,i))return!0};return{forEach:function(n){o=n,i.$lineIterator(e,t).forEach(f)}}},this.$assembleRegExp=function(e,t){if(e.needle instanceof RegExp)return e.re=e.needle;var n=e.needle;if(!e.needle)return e.re=!1;e.regExp||(n=r.escapeRegExp(n)),e.wholeWord&&(n="\\b"+n+"\\b");var i=e.caseSensitive?"g":"gi";e.$isMultiLine=!t&&/[\n\r]/.test(n);if(e.$isMultiLine)return e.re=this.$assembleMultilineRegExp(n,i);try{var s=new RegExp(n,i)}catch(o){s=!1}return e.re=s},this.$assembleMultilineRegExp=function(e,t){var n=e.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),r=[];for(var i=0;i<n.length;i++)try{r.push(new RegExp(n[i],t))}catch(s){return!1}return n[0]==""?(r.shift(),r.offset=1):r.offset=0,r},this.$lineIterator=function(e,t){var n=t.backwards==1,r=t.skipCurrent!=0,i=t.range,s=t.start;s||(s=i?i[n?"end":"start"]:e.selection.getRange()),s.start&&(s=s[r!=n?"end":"start"]);var o=i?i.start.row:0,u=i?i.end.row:e.getLength()-1,a=n?function(n){var r=s.row,i=e.getLine(r).substring(0,s.column);if(n(i,r))return;for(r--;r>=o;r--)if(n(e.getLine(r),r))return;if(t.wrap==0)return;for(r=u,o=s.row;r>=o;r--)if(n(e.getLine(r),r))return}:function(n){var r=s.row,i=e.getLine(r).substr(s.column);if(n(i,r,s.column))return;for(r+=1;r<=u;r++)if(n(e.getLine(r),r))return;if(t.wrap==0)return;for(r=o,u=s.row;r<=u;r++)if(n(e.getLine(r),r))return};return{forEach:a}}}).call(o.prototype),t.Search=o}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,t,n){var r=e("../lib/oop"),i=e("../keyboard/hash_handler").HashHandler,s=e("../lib/event_emitter").EventEmitter,o=function(e,t){i.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",function(e){return e.command.exec(e.editor,e.args||{})})};r.inherits(o,i),function(){r.implement(this,s),this.exec=function(e,t,n){typeof e=="string"&&(e=this.commands[e]);if(!e)return!1;if(t&&t.$readOnly&&!e.readOnly)return!1;var r={editor:t,command:e,args:n},i=this._emit("exec",r);return this._signal("afterExec",r),i===!1?!1:!0},this.toggleRecording=function(e){if(this.$inReplay)return;return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.removeEventListener("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(e){if(this.$inReplay||!this.macro)return;if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach(function(t){typeof t=="string"?this.exec(t,e):this.exec(t[0],e,t[1])},this)}finally{this.$inReplay=!1}},this.trimMacro=function(e){return e.map(function(e){return typeof e[0]!="string"&&(e[0]=e[0].name),e[1]||(e=e[0]),e})}}.call(o.prototype),t.CommandManager=o}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,n){function s(e,t){this.platform=t||(i.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={};if(this.__defineGetter__&&this.__defineSetter__&&typeof console!="undefined"&&console.error){var n=!1,r=function(){n||(n=!0,console.error("commmandKeyBinding has too many m's. use commandKeyBinding"))};this.__defineGetter__("commmandKeyBinding",function(){return r(),this.commandKeyBinding}),this.__defineSetter__("commmandKeyBinding",function(e){return r(),this.commandKeyBinding=e})}else this.commmandKeyBinding=this.commandKeyBinding;this.addCommands(e)}var r=e("../lib/keys"),i=e("../lib/useragent");(function(){this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e){var t=typeof e=="string"?e:e.name;e=this.commands[t],delete this.commands[t];var n=this.commandKeyBinding;for(var r in n)for(var i in n[r])n[r][i]==e&&delete n[r][i]},this.bindKey=function(e,t){if(!e)return;if(typeof t=="function"){this.addCommand({exec:t,bindKey:e,name:t.name||e});return}var n=this.commandKeyBinding;e.split("|").forEach(function(e){var r=this.parseKeys(e,t),i=r.hashId;(n[i]||(n[i]={}))[r.key]=t},this)},this.addCommands=function(e){e&&Object.keys(e).forEach(function(t){var n=e[t];if(!n)return;if(typeof n=="string")return this.bindKey(n,t);typeof n=="function"&&(n={exec:n});if(typeof n!="object")return;n.name||(n.name=t),this.addCommand(n)},this)},this.removeCommands=function(e){Object.keys(e).forEach(function(t){this.removeCommand(e[t])},this)},this.bindKeys=function(e){Object.keys(e).forEach(function(t){this.bindKey(t,e[t])},this)},this._buildKeyHash=function(e){var t=e.bindKey;if(!t)return;var n=typeof t=="string"?t:t[this.platform];this.bindKey(n,e)},this.parseKeys=function(e){e.indexOf(" ")!=-1&&(e=e.split(/\s+/).pop());var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(e){return e}),n=t.pop(),i=r[n];if(r.FUNCTION_KEYS[i])n=r.FUNCTION_KEYS[i].toLowerCase();else{if(!t.length)return{key:n,hashId:-1};if(t.length==1&&t[0]=="shift")return{key:n.toUpperCase(),hashId:-1}}var s=0;for(var o=t.length;o--;){var u=r.KEY_MODS[t[o]];if(u==null)return typeof console!="undefined"&&console.error("invalid modifier "+t[o]+" in "+e),!1;s|=u}return{key:n,hashId:s}},this.findKeyCommand=function(t,n){var r=this.commandKeyBinding;return r[t]&&r[t][n]},this.handleKeyboard=function(e,t,n,r){return{command:this.findKeyCommand(t,n)}}}).call(s.prototype),t.HashHandler=s}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config"],function(e,t,n){function s(e,t){return{win:e,mac:t}}var r=e("../lib/lang"),i=e("../config");t.commands=[{name:"showSettingsMenu",bindKey:s("Ctrl-,","Command-,"),exec:function(e){i.loadModule("ace/ext/settings_menu",function(t){t.init(e),e.showSettingsMenu()})},readOnly:!0},{name:"selectall",bindKey:s("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",bindKey:s(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",bindKey:s("Ctrl-L","Command-L"),exec:function(e){var t=parseInt(prompt("Enter line number:"),10);isNaN(t)||e.gotoLine(t)},readOnly:!0},{name:"fold",bindKey:s("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:s("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",bindKey:s("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:s("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},scrollIntoView:"center",readOnly:!0},{name:"foldall",bindKey:s("Ctrl-Alt-0","Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",bindKey:s("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",bindKey:s("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",bindKey:s("Ctrl-K","Command-G"),exec:function(e){e.findNext()},readOnly:!0},{name:"findprevious",bindKey:s("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},readOnly:!0},{name:"find",bindKey:s("Ctrl-F","Command-F"),exec:function(e){i.loadModule("ace/ext/searchbox",function(t){t.Search(e)})},readOnly:!0},{name:"overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",bindKey:s("Ctrl-Shift-Home","Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,group:"fileJump"},{name:"gotostart",bindKey:s("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,group:"fileJump"},{name:"selectup",bindKey:s("Shift-Up","Shift-Up"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",readOnly:!0},{name:"golineup",bindKey:s("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",readOnly:!0},{name:"selecttoend",bindKey:s("Ctrl-Shift-End","Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,group:"fileJump"},{name:"gotoend",bindKey:s("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,group:"fileJump"},{name:"selectdown",bindKey:s("Shift-Down","Shift-Down"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",readOnly:!0},{name:"golinedown",bindKey:s("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",readOnly:!0},{name:"selectwordleft",bindKey:s("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",readOnly:!0},{name:"gotowordleft",bindKey:s("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",readOnly:!0},{name:"selecttolinestart",bindKey:s("Alt-Shift-Left","Command-Shift-Left"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",readOnly:!0},{name:"gotolinestart",bindKey:s("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",readOnly:!0},{name:"selectleft",bindKey:s("Shift-Left","Shift-Left"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",readOnly:!0},{name:"gotoleft",bindKey:s("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",readOnly:!0},{name:"selectwordright",bindKey:s("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",readOnly:!0},{name:"gotowordright",bindKey:s("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",readOnly:!0},{name:"selecttolineend",bindKey:s("Alt-Shift-Right","Command-Shift-Right"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",readOnly:!0},{name:"gotolineend",bindKey:s("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",readOnly:!0},{name:"selectright",bindKey:s("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",readOnly:!0},{name:"gotoright",bindKey:s("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",readOnly:!0},{name:"selectpagedown",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",bindKey:s(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",bindKey:s("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",bindKey:s(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",bindKey:s("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",bindKey:s("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",readOnly:!0},{name:"selectlineend",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",readOnly:!0},{name:"togglerecording",bindKey:s("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",bindKey:s("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",bindKey:s("Ctrl-P","Ctrl-Shift-P"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",readOnly:!0},{name:"selecttomatching",bindKey:s("Ctrl-Shift-P",null),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",readOnly:!0},{name:"cut",exec:function(e){var t=e.getSelectionRange();e._emit("cut",t),e.selection.isEmpty()||(e.session.remove(t),e.clearSelection())},multiSelectAction:"forEach"},{name:"removeline",bindKey:s("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},multiSelectAction:"forEachLine"},{name:"duplicateSelection",bindKey:s("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},multiSelectAction:"forEach"},{name:"sortlines",bindKey:s("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},multiSelectAction:"forEachLine"},{name:"togglecomment",bindKey:s("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",bindKey:s("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach"},{name:"modifyNumberUp",bindKey:s("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},multiSelectAction:"forEach"},{name:"modifyNumberDown",bindKey:s("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},multiSelectAction:"forEach"},{name:"replace",bindKey:s("Ctrl-H","Command-Option-F"),exec:function(e){i.loadModule("ace/ext/searchbox",function(t){t.Search(e,!0)})}},{name:"undo",bindKey:s("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",bindKey:s("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",bindKey:s("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()}},{name:"movelinesup",bindKey:s("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()}},{name:"copylinesdown",bindKey:s("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()}},{name:"movelinesdown",bindKey:s("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()}},{name:"del",bindKey:s("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach"},{name:"backspace",bindKey:s("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach"},{name:"cut_or_delete",bindKey:s("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach"},{name:"removetolinestart",bindKey:s("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach"},{name:"removetolineend",bindKey:s("Alt-Delete","Ctrl-K"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach"},{name:"removewordleft",bindKey:s("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach"},{name:"removewordright",bindKey:s("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach"},{name:"outdent",bindKey:s("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",bindKey:s("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",bindKey:s("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",bindKey:s("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",exec:function(e,t){e.insert(r.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach"},{name:"splitline",bindKey:s(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach"},{name:"transposeletters",bindKey:s("Ctrl-T","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)}},{name:"touppercase",bindKey:s("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach"},{name:"tolowercase",bindKey:s("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach"}]}),ace.define("ace/undomanager",["require","exports","module"],function(e,t,n){var r=function(){this.reset()};(function(){this.execute=function(e){var t=e.args[0];this.$doc=e.args[1],e.merge&&this.hasUndo()&&(t=this.$undoStack.pop().concat(t)),this.$undoStack.push(t),this.$redoStack=[],this.dirtyCounter<0&&(this.dirtyCounter=NaN),this.dirtyCounter++},this.undo=function(e){var t=this.$undoStack.pop(),n=null;return t&&(n=this.$doc.undoChanges(t,e),this.$redoStack.push(t),this.dirtyCounter--),n},this.redo=function(e){var t=this.$redoStack.pop(),n=null;return t&&(n=this.$doc.redoChanges(t,e),this.$undoStack.push(t),this.dirtyCounter++),n},this.reset=function(){this.$undoStack=[],this.$redoStack=[],this.dirtyCounter=0},this.hasUndo=function(){return this.$undoStack.length>0},this.hasRedo=function(){return this.$redoStack.length>0},this.markClean=function(){this.dirtyCounter=0},this.isClean=function(){return this.dirtyCounter===0}}).call(r.prototype),t.UndoManager=r}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/useragent","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/renderloop","ace/lib/event_emitter"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/dom"),s=e("./lib/useragent"),o=e("./config"),u=e("./layer/gutter").Gutter,a=e("./layer/marker").Marker,f=e("./layer/text").Text,l=e("./layer/cursor").Cursor,c=e("./scrollbar").ScrollBarH,h=e("./scrollbar").ScrollBarV,p=e("./renderloop").RenderLoop,d=e("./lib/event_emitter").EventEmitter,v=".ace_editor {position: relative;overflow: hidden;font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;font-size: 12px;line-height: normal;color: black;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;}.ace_content {position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;cursor: text;}.ace_dragging, .ace_dragging * {cursor: move !important;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: '';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QUM2OEZDQTQ4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QUM2OEZDQTU4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBQzY4RkNBMjhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBQzY4RkNBMzhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkgXxbAAAAJbSURBVHjapFNNaBNBFH4zs5vdZLP5sQmNpT82QY209heh1ioWisaDRcSKF0WKJ0GQnrzrxasHsR6EnlrwD0TagxJabaVEpFYxLWlLSS822tr87m66ccfd2GKyVhA6MMybgfe97/vmPUQphd0sZjto9XIn9OOsvlu2nkqRzVU+6vvlzPf8W6bk8dxQ0NPbxAALgCgg2JkaQuhzQau/El0zbmUA7U0Es8v2CiYmKQJHGO1QICCLoqilMhkmurDAyapKgqItezi/USRdJqEYY4D5jCy03ht2yMkkvL91jTTX10qzyyu2hruPRN7jgbH+EOsXcMLgYiThEgAMhABW85oqy1DXdRIdvP1AHJ2acQXvDIrVHcdQNrEKNYSVMSZGMjEzIIAwDXIo+6G/FxcGnzkC3T2oMhLjre49sBB+RRcHLqdafK6sYdE/GGBwU1VpFNj0aN8pJbe+BkZyevUrvLl6Xmm0W9IuTc0DxrDNAJd5oEvI/KRsNC3bQyNjPO9yQ1YHcfj2QvfQc/5TUhJTBc2iM0U7AWDQtc1nJHvD/cfO2s7jaGkiTEfa/Ep8coLu7zmNmh8+dc5lZDuUeFAGUNA/OY6JVaypQ0vjr7XYjUvJM37vt+j1vuTK5DgVfVUoTjVe+y3/LxMxY2GgU+CSLy4cpfsYorRXuXIOi0Vt40h67uZFTdIo6nLaZcwUJWAzwNS0tBnqqKzQDnjdG/iPyZxo46HaKUpbvYkj8qYRTZsBhge+JHhZyh0x9b95JqjVJkT084kZIPwu/mPWqPgfQ5jXh2+92Ay7HedfAgwA6KDWafb4w3cAAAAASUVORK5CYII=\");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QUM2OEZDQTg4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QUM2OEZDQTk4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBQzY4RkNBNjhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBQzY4RkNBNzhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pgd7PfIAAAGmSURBVHjaYvr//z8DJZiJgUIANoCRkREb9gLiSVAaQx4OQM7AAkwd7XU2/v++/rOttdYGEB9dASEvOMydGKfH8Gv/p4XTkvRBfLxeQAP+1cUhXopyvzhP7P/IoSj7g7Mw09cNKO6J1QQ0L4gICPIv/veg/8W+JdFvQNLHVsW9/nmn9zk7B+cCkDwhL7gt6knSZnx9/LuCEOcvkIAMP+cvto9nfqyZmmUAksfnBUtbM60gX/3/kgyv3/xSFOL5DZT+L8vP+Yfh5cvfPvp/xUHyQHXGyAYwgpwBjZYFT3Y1OEl/OfCH4ffv3wzc4iwMvNIsDJ+f/mH4+vIPAxsb631WW0Yln6ZpQLXdMK/DXGDflh+sIv37EivD5x//Gb7+YWT4y86sl7BCCkSD+Z++/1dkvsFRl+HnD1Rvje4F8whjMXmGj58YGf5zsDMwcnAwfPvKcml62DsQDeaDxN+/Y0qwlpEHqrdB94IRNIDUgfgfKJChGK4OikEW3gTiXUB950ASLFAF54AC94A0G9QAfOnmF9DCDzABFqS08IHYDIScdijOjQABBgC+/9awBH96jwAAAABJRU5ErkJggg==\");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url(\"data:image/gif;base64,R0lGODlhEAAQAMQAAAAAAEFBQVJSUl5eXmRkZGtra39/f4WFhYmJiZGRkaampry8vMPDw8zMzNXV1dzc3OTk5Orq6vDw8P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkAABQALAAAAAAQABAAAAUuICWOZGmeaBml5XGwFCQSBGyXRSAwtqQIiRuiwIM5BoYVbEFIyGCQoeJGrVptIQA7\");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpGRTk5MTVGREIxNDkxMUUxOTc5Q0FFREQyMTNGMjBFQyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpGRTk5MTVGRUIxNDkxMUUxOTc5Q0FFREQyMTNGMjBFQyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkZFOTkxNUZCQjE0OTExRTE5NzlDQUVERDIxM0YyMEVDIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkZFOTkxNUZDQjE0OTExRTE5NzlDQUVERDIxM0YyMEVDIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+SIDkjAAAAJ1JREFUeNpi/P//PwMlgImBQkB7A6qrq/+DMC55FkIGKCoq4pVnpFkgTp069f/+/fv/r1u37r+tre1/kg0A+ptn9uzZYLaRkRHpLvjw4cNXWVlZhufPnzOcO3eOdAO0tbVPAjHDmzdvGA4fPsxIsgGSkpJmv379Ynj37h2DjIyMCMkG3LhxQ/T27dsMampqDHZ2dq/pH41DxwCAAAMAFdc68dUsFZgAAAAASUVORK5CYII=\");}.ace_scrollbar {position: absolute;overflow-x: hidden;overflow-y: auto;right: 0;top: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-h {position: absolute;overflow-x: auto;overflow-y: hidden;right: 0;left: 0;bottom: 0;z-index: 6;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;text-indent: -1em;-ms-user-select: text;-moz-user-select: text;-webkit-user-select: text;user-select: text;}.ace_text-input.ace_composition {background: #f8f8f8;color: #111;z-index: 1000;opacity: 1;text-indent: 0;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;white-space: pre;height: 100%;width: 100%;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;/* setting pointer-events: auto; on node under the mouse, which changesduring scroll, will break mouse wheel scrolling in Safari */pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;}.ace_text-layer {font: inherit !important;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;border-left: 2px solid}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0px;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_smooth-blinking .ace_cursor {-moz-transition: opacity 0.18s;-webkit-transition: opacity 0.18s;-o-transition: opacity 0.18s;-ms-transition: opacity 0.18s;transition: opacity 0.18s;}.ace_cursor[style*=\"opacity: 0\"]{-ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";}.ace_editor.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;}.ace_line .ace_fold {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%11%00%00%00%09%08%06%00%00%00%D4%E8%C7%0C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%B5IDAT(%15%A5%91%3D%0E%02!%10%85ac%E1%05%D6%CE%D6%C6%CE%D2%E8%ED%CD%DE%C0%C6%D6N.%E0V%F8%3D%9Ca%891XH%C2%BE%D9y%3F%90!%E6%9C%C3%BFk%E5%011%C6-%F5%C8N%04%DF%BD%FF%89%DFt%83DN%60%3E%F3%AB%A0%DE%1A%5Dg%BE%10Q%97%1B%40%9C%A8o%10%8F%5E%828%B4%1B%60%87%F6%02%26%85%1Ch%1E%C1%2B%5Bk%FF%86%EE%B7j%09%9A%DA%9B%ACe%A3%F9%EC%DA!9%B4%D5%A6%81%86%86%98%CC%3C%5B%40%FA%81%B3%E9%CB%23%94%C16Azo%05%D4%E1%C1%95a%3B%8A'%A0%E8%CC%17%22%85%1D%BA%00%A2%FA%DC%0A%94%D1%D1%8D%8B%3A%84%17B%C7%60%1A%25Z%FC%8D%00%00%00%00IEND%AEB%60%82\"),url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%007%08%06%00%00%00%C4%DD%80C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%3AIDAT8%11c%FC%FF%FF%7F%18%03%1A%60%01%F2%3F%A0%891%80%04%FF%11-%F8%17%9BJ%E2%05%B1ZD%81v%26t%E7%80%F8%A3%82h%A12%1A%20%A3%01%02%0F%01%BA%25%06%00%19%C0%0D%AEF%D5%3ES%00%00%00%00IEND%AEB%60%82\");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;-moz-border-radius: 2px;-webkit-border-radius: 2px;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%11%00%00%00%09%08%06%00%00%00%D4%E8%C7%0C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%B5IDAT(%15%A5%91%3D%0E%02!%10%85ac%E1%05%D6%CE%D6%C6%CE%D2%E8%ED%CD%DE%C0%C6%D6N.%E0V%F8%3D%9Ca%891XH%C2%BE%D9y%3F%90!%E6%9C%C3%BFk%E5%011%C6-%F5%C8N%04%DF%BD%FF%89%DFt%83DN%60%3E%F3%AB%A0%DE%1A%5Dg%BE%10Q%97%1B%40%9C%A8o%10%8F%5E%828%B4%1B%60%87%F6%02%26%85%1Ch%1E%C1%2B%5Bk%FF%86%EE%B7j%09%9A%DA%9B%ACe%A3%F9%EC%DA!9%B4%D5%A6%81%86%86%98%CC%3C%5B%40%FA%81%B3%E9%CB%23%94%C16Azo%05%D4%E1%C1%95a%3B%8A'%A0%E8%CC%17%22%85%1D%BA%00%A2%FA%DC%0A%94%D1%D1%8D%8B%3A%84%17B%C7%60%1A%25Z%FC%8D%00%00%00%00IEND%AEB%60%82\"),url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%007%08%06%00%00%00%C4%DD%80C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%003IDAT8%11c%FC%FF%FF%7F%3E%03%1A%60%01%F2%3F%A3%891%80%04%FFQ%26%F8w%C0%B43%A1%DB%0C%E2%8F%0A%A2%85%CAh%80%8C%06%08%3C%04%E8%96%18%00%A3S%0D%CD%CF%D8%C1%9D%00%00%00%00IEND%AEB%60%82\");background-repeat: no-repeat, repeat-x;background-position: center center, top left;}.ace_gutter-tooltip {background-color: #FFF;background-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1));background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;display: inline-block;max-width: 500px;padding: 4px;position: fixed;z-index: 999999;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;cursor: default;white-space: pre-line;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%00%05%08%06%00%00%00%8Do%26%E5%00%00%004IDATx%DAe%8A%B1%0D%000%0C%C2%F2%2CK%96%BC%D0%8F9%81%88H%E9%D0%0E%96%C0%10%92%3E%02%80%5E%82%E4%A9*-%EEsw%C8%CC%11%EE%96w%D8%DC%E9*Eh%0C%151(%00%00%00%00IEND%AEB%60%82\");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block;   }.ace_fold-widget.ace_end {background-image: url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%00%05%08%06%00%00%00%8Do%26%E5%00%00%004IDATx%DAm%C7%C1%09%000%08C%D1%8C%ECE%C8E(%8E%EC%02)%1EZJ%F1%C1'%04%07I%E1%E5%EE%CAL%F5%A2%99%99%22%E2%D6%1FU%B5%FE0%D9x%A7%26Wz5%0E%D5%00%00%00%00IEND%AEB%60%82\");}.ace_fold-widget.ace_closed {background-image: url(\"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%03%00%00%00%06%08%06%00%00%00%06%E5%24%0C%00%00%009IDATx%DA5%CA%C1%09%000%08%03%C0%AC*(%3E%04%C1%0D%BA%B1%23%A4Uh%E0%20%81%C0%CC%F8%82%81%AA%A2%AArGfr%88%08%11%11%1C%DD%7D%E0%EE%5B%F6%F6%CB%B8%05Q%2F%E9tai%D9%00%00%00%00IEND%AEB%60%82\");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);-moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);-webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);-moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);-webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}/*** Dark version for fold widgets*/.ace_dark .ace_fold-widget {background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC\");}.ace_dark .ace_fold-widget.ace_end {background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==\");}.ace_dark .ace_fold-widget.ace_closed {background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==\");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {-moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);-webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {-moz-transition: opacity 0.4s ease 0.05s;-webkit-transition: opacity 0.4s ease 0.05s;-o-transition: opacity 0.4s ease 0.05s;-ms-transition: opacity 0.4s ease 0.05s;transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {-moz-transition: opacity 0.05s ease 0.05s;-webkit-transition: opacity 0.05s ease 0.05s;-o-transition: opacity 0.05s ease 0.05s;-ms-transition: opacity 0.05s ease 0.05s;transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}";i.importCssString(v,"ace_editor");var m=function(e,t){var n=this;this.container=e||i.createElement("div"),this.$keepTextAreaAtCursor=!0,i.addCssClass(this.container,"ace_editor"),this.setTheme(t),this.$gutter=i.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.scroller=i.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=i.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new u(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new a(this.content);var r=this.$textLayer=new f(this.content);this.canvas=r.element,this.$markerFront=new a(this.content),this.$cursorLayer=new l(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new h(this.container,this),this.scrollBarH=new c(this.container,this),this.scrollBarV.addEventListener("scroll",function(e){n.$scrollAnimation||n.session.setScrollTop(e.data-n.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(e){n.$scrollAnimation||n.session.setScrollLeft(e.data-n.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$textLayer.addEventListener("changeCharacterSize",function(){n.updateCharacterSize(),n.onResize(!0),n._signal("changeCharacterSize")}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$loop=new p(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),o.resetOptions(this),o._emit("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,r.implement(this,d),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin()},this.setSession=function(e){this.session=e,this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.scroller.className="ace_scroller",this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),this.$loop.schedule(this.CHANGE_FULL)},this.updateLines=function(e,t){t===undefined&&(t=Infinity),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRow<t&&(this.$changedLines.lastRow=t)):this.$changedLines={firstRow:e,lastRow:t};if(this.$changedLines.firstRow>this.layerConfig.lastRow||this.$changedLines.lastRow<this.layerConfig.firstRow)return;this.$loop.schedule(this.CHANGE_LINES)},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(e,t,n,r){if(this.resizing>2)return;this.resizing>0?this.resizing++:this.resizing=e?1:0;var i=this.container;r||(r=i.clientHeight||i.scrollHeight),n||(n=i.clientWidth||i.scrollWidth);var s=this.$updateCachedSize(e,t,n,r);if(!this.$size.scrollerHeight||!n&&!r)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(s|this.$changes,!0):this.$loop.schedule(s|this.$changes),this.resizing&&(this.resizing=0)},this.$updateCachedSize=function(e,t,n,r){var i=0,s=this.$size,o={width:s.width,height:s.height,scrollerHeight:s.scrollerHeight,scrollerWidth:s.scrollerWidth};r&&(e||s.height!=r)&&(s.height=r,i=this.CHANGE_SIZE,s.scrollerHeight=s.height,this.$horizScroll&&(s.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",this.session&&(i|=this.CHANGE_SCROLL));if(n&&(e||s.width!=n)){i=this.CHANGE_SIZE,s.width=n,t==null&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,this.scrollBarH.element.style.left=this.scroller.style.left=t+"px",s.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()),this.scrollBarH.element.style.right=this.scroller.style.right=this.scrollBarV.getWidth()+"px",this.scroller.style.bottom=this.scrollBarH.getHeight()+"px";if(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)i|=this.CHANGE_FULL}return s.$dirty&&(s.$dirty=!n&&!r),i&&this._signal("resize",o),i},this.onGutterResize=function(){var e=this.$showGutter?this.$gutter.offsetWidth:0;e!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,e,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):(this.$computeLayerConfig(),this.$loop.schedule(this.CHANGE_MARKER))},this.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-this.$padding*2,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(e){this.setOption("showInvisibles",e)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},this.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(e){return this.setOption("showGutter",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updateGutterLineHighlight=function(){var e=this.$cursorLayer.$pixelPos,t=this.layerConfig.lineHeight;if(this.session.getUseWrapMode()){var n=this.session.selection.getCursor();n.column=0,e=this.$cursorLayer.getPixelPosition(n,!0),t*=this.session.getRowLength(n.row)}this.$gutterLineHighlight.style.top=e.top-this.layerConfig.offset+"px",this.$gutterLineHighlight.style.height=t+"px"},this.$updatePrintMargin=function(){if(!this.$showPrintMargin&&!this.$printMarginEl)return;if(!this.$printMarginEl){var e=i.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=i.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=this.characterWidth*this.$printMarginColumn+this.$padding+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.content},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(!this.$keepTextAreaAtCursor)return;var e=this.layerConfig,t=this.$cursorLayer.$pixelPos.top,n=this.$cursorLayer.$pixelPos.left;t-=e.offset;var r=this.lineHeight;if(t<0||t>e.height-r)return;var i=this.characterWidth;if(this.$composition){var s=this.textarea.value.replace(/^\x01+/,"");i*=this.session.$getStringScreenWidth(s)[0]+2,r+=2,t-=1}n-=this.scrollLeft,n>this.$size.scrollerWidth-i&&(n=this.$size.scrollerWidth-i),n-=this.scrollBar.width,this.textarea.style.height=r+"px",this.textarea.style.width=i+"px",this.textarea.style.right=Math.max(0,this.$size.scrollerWidth-n-i)+"px",this.textarea.style.bottom=Math.max(0,this.$size.height-t-r)+"px"},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},this.getLastFullyVisibleRow=function(){var e=Math.floor((this.layerConfig.height+this.layerConfig.offset)/this.layerConfig.lineHeight);return this.layerConfig.firstRow-1+e},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(e,t,n,r){var i=this.scrollMargin;i.top=e|0,i.bottom=t|0,i.right=r|0,i.left=n|0,i.v=i.top+i.bottom,i.h=i.left+i.right,i.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(i.top),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},this.getVScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},this.$updateScrollBarV=function(){this.scrollBarV.setInnerHeight(this.layerConfig.maxHeight+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setInnerWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$renderChanges=function(e,t){this.$changes&&(e|=this.$changes,this.$changes=0);if(!this.session||!this.container.offsetWidth||!e&&!t){this.$changes|=e;return}if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender");if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL)e|=this.$computeLayerConfig();e&this.CHANGE_H_SCROLL&&(this.$updateScrollBarH(),this.content.style.marginLeft=-this.scrollLeft+"px",this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left");if(e&this.CHANGE_FULL){this.$updateScrollBarV(),this.$updateScrollBarH(),this.$textLayer.update(this.layerConfig),this.$showGutter&&this.$gutterLayer.update(this.layerConfig),this.$markerBack.update(this.layerConfig),this.$markerFront.update(this.layerConfig),this.$cursorLayer.update(this.layerConfig),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this._signal("afterRender");return}if(e&this.CHANGE_SCROLL){this.$updateScrollBarV(),e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(this.layerConfig):this.$textLayer.scrollLines(this.layerConfig),this.$showGutter&&this.$gutterLayer.update(this.layerConfig),this.$markerBack.update(this.layerConfig),this.$markerFront.update(this.layerConfig),this.$cursorLayer.update(this.layerConfig),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this.$moveTextAreaToCursor(),this._signal("afterRender");return}e&this.CHANGE_TEXT?(this.$textLayer.update(this.layerConfig),this.$showGutter&&this.$gutterLayer.update(this.layerConfig)):e&this.CHANGE_LINES?(this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(this.layerConfig):(e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER)&&this.$showGutter&&this.$gutterLayer.update(this.layerConfig),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(this.layerConfig),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(this.layerConfig),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(this.layerConfig);if(e&this.CHANGE_SIZE||e&this.CHANGE_LINES)this.$updateScrollBarV(),this.$updateScrollBarH();this._signal("afterRender")},this.$autosize=function(e,t){var e=this.session.getScreenLength()*this.lineHeight,n=this.$maxLines*this.lineHeight,r=Math.max((this.$minLines||1)*this.lineHeight,Math.min(n,e)),i=e>n;if(r!=this.desiredHeight||this.$size.height!=this.desiredHeight||i!=this.$vScroll){i!=this.$vScroll&&(this.$vScroll=i,this.scrollBarV.setVisible(i));var s=this.container.clientWidth;this.container.style.height=r+"px",this.$updateCachedSize(!0,this.$gutterWidth,s,r),this.desiredHeight=r}},this.$computeLayerConfig=function(){this.$maxLines&&this.lineHeight>1&&this.$autosize();var e=this.session,t=this.$size.height<=2*this.lineHeight,n=this.session.getScreenLength(),r=n*this.lineHeight,i=this.scrollTop%this.lineHeight,s=this.$size.scrollerHeight+this.lineHeight,o=this.$getLongestLine(),u=!t&&(this.$hScrollBarAlwaysVisible||this.$size.scrollerWidth-o-2*this.$padding<0),a=this.$horizScroll!==u;a&&(this.$horizScroll=u,this.scrollBarH.setVisible(u)),!this.$maxLines&&this.$scrollPastEnd&&this.scrollTop>r-this.$size.scrollerHeight&&(r+=Math.min((this.$size.scrollerHeight-this.lineHeight)*this.$scrollPastEnd,this.scrollTop-r+this.$size.scrollerHeight));var f=!t&&(this.$vScrollBarAlwaysVisible||this.$size.scrollerHeight-r<0),l=this.$vScroll!==f;l&&(this.$vScroll=f,this.scrollBarV.setVisible(f)),this.session.setScrollTop(Math.max(-this.scrollMargin.top,Math.min(this.scrollTop,r-this.$size.scrollerHeight+this.scrollMargin.v))),this.session.setScrollLeft(Math.max(-this.scrollMargin.left,Math.min(this.scrollLeft,o+2*this.$padding-this.$size.scrollerWidth+this.scrollMargin.h)));var c=Math.ceil(s/this.lineHeight)-1,h=Math.max(0,Math.round((this.scrollTop-i)/this.lineHeight)),p=h+c,d,v,m=this.lineHeight;h=e.screenToDocumentRow(h,0);var g=e.getFoldLine(h);g&&(h=g.start.row),d=e.documentToScreenRow(h,0),v=e.getRowLength(h)*m,p=Math.min(e.screenToDocumentRow(p,0),e.getLength()-1),s=this.$size.scrollerHeight+e.getRowLength(p)*m+v,i=this.scrollTop-d*m;var y=0;if(a||l)y=this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this._signal("scrollbarVisibilityChanged"),l&&(o=this.$getLongestLine());return this.layerConfig={width:o,padding:this.$padding,firstRow:h,firstRowScreen:d,lastRow:p,lineHeight:m,characterWidth:this.characterWidth,minHeight:s,maxHeight:r,offset:i,height:this.$size.scrollerHeight},this.$gutterLayer.element.style.marginTop=-i+"px",this.content.style.marginTop=-i+"px",this.content.style.width=o+2*this.$padding+"px",this.content.style.height=s+"px",y},this.$updateLines=function(){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(e>n.lastRow+1)return;if(t<n.firstRow)return;if(t===Infinity){this.$showGutter&&this.$gutterLayer.update(n),this.$textLayer.update(n);return}return this.$textLayer.updateLines(n,e,t),!0},this.$getLongestLine=function(){var e=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(e+=1),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},this.updateBreakpoints=function(e){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(e,t,n){this.scrollCursorIntoView(e,n),this.scrollCursorIntoView(t,n)},this.scrollCursorIntoView=function(e,t){if(this.$size.scrollerHeight===0)return;var n=this.$cursorLayer.getPixelPosition(e),r=n.left,i=n.top,s=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;s>i?(t&&(i-=t*this.$size.scrollerHeight),i==0?i=-this.scrollMargin.top:i==0&&(i=+this.scrollMargin.bottom),this.session.setScrollTop(i)):s+this.$size.scrollerHeight<i+this.lineHeight&&(t&&(i+=t*this.$size.scrollerHeight),this.session.setScrollTop(i+this.lineHeight-this.$size.scrollerHeight));var o=this.scrollLeft;o>r?(r<this.$padding+2*this.layerConfig.characterWidth&&(r=-this.scrollMargin.left),this.session.setScrollLeft(r)):o+this.$size.scrollerWidth<r+this.characterWidth?this.session.setScrollLeft(Math.round(r+this.characterWidth-this.$size.scrollerWidth)):o<=this.$padding&&r-o<this.characterWidth&&this.session.setScrollLeft(0)},this.getScrollTop=function(){return this.session.getScrollTop()},this.getScrollLeft=function(){return this.session.getScrollLeft()},this.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},this.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},this.scrollToRow=function(e){this.session.setScrollTop(e*this.lineHeight)},this.alignCursor=function(e,t){typeof e=="number"&&(e={row:e,column:0});var n=this.$cursorLayer.getPixelPosition(e),r=this.$size.scrollerHeight-this.lineHeight,i=n.top-r*(t||0);return this.session.setScrollTop(i),i},this.STEPS=8,this.$calcSteps=function(e,t){var n=0,r=this.STEPS,i=[],s=function(e,t,n){return n*(Math.pow(e-1,3)+1)+t};for(n=0;n<r;++n)i.push(s(n/this.STEPS,e,t-e));return i},this.scrollToLine=function(e,t,n,r){var i=this.$cursorLayer.getPixelPosition({row:e,column:0}),s=i.top;t&&(s-=this.$size.scrollerHeight/2);var o=this.scrollTop;this.session.setScrollTop(s),n!==!1&&this.animateScrolling(o,r)},this.animateScrolling=function(e,t){var n=this.scrollTop;if(!this.$animatedScroll)return;var r=this;if(e==n)return;if(this.$scrollAnimation){var i=this.$scrollAnimation.steps;if(i.length){e=i[0];if(e==n)return}}var s=r.$calcSteps(e,n);this.$scrollAnimation={from:e,to:n,steps:s},clearInterval(this.$timer),r.session.setScrollTop(s.shift()),this.$timer=setInterval(function(){s.length?(r.session.setScrollTop(s.shift()),r.session.$scrollTop=n):n!=null?(r.session.$scrollTop=-1,r.session.setScrollTop(n),n=null):(r.$timer=clearInterval(r.$timer),r.$scrollAnimation=null,t&&t())},10)},this.scrollToY=function(e){this.scrollTop!==e&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=e)},this.scrollToX=function(e){this.scrollLeft!==e&&(this.scrollLeft=e),this.$loop.schedule(this.CHANGE_H_SCROLL)},this.scrollTo=function(e,t){this.session.setScrollTop(t),this.session.setScrollLeft(t)},this.scrollBy=function(e,t){t&&this.session.setScrollTop(this.session.getScrollTop()+t),e&&this.session.setScrollLeft(this.session.getScrollLeft()+e)},this.isScrollableBy=function(e,t){if(t<0&&this.session.getScrollTop()>=1-this.scrollMargin.top)return!0;if(t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight-(this.$size.scrollerHeight-this.lineHeight)*this.$scrollPastEnd<-1+this.scrollMargin.bottom)return!0;if(e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left)return!0;if(e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},this.pixelToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=(e+this.scrollLeft-n.left-this.$padding)/this.characterWidth,i=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),s=Math.round(r);return{row:i,column:s,side:r-s>0?1:-1}},this.screenToTextCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=Math.round((e+this.scrollLeft-n.left-this.$padding)/this.characterWidth),i=(t+this.scrollTop-n.top)/this.lineHeight;return this.session.screenToDocumentPosition(i,Math.max(r,0))},this.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=this.session.documentToScreenPosition(e,t),i=this.$padding+Math.round(r.column*this.characterWidth),s=r.row*this.lineHeight;return{pageX:n.left+i-this.scrollLeft,pageY:n.top+s-this.scrollTop}},this.visualizeFocus=function(){i.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){i.removeCssClass(this.container,"ace_focus")},this.showComposition=function(e){this.$composition||(this.$composition={keepTextAreaAtCursor:this.$keepTextAreaAtCursor,cssText:this.textarea.style.cssText}),this.$keepTextAreaAtCursor=!0,i.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor()},this.setCompositionText=function(e){this.$moveTextAreaToCursor()},this.hideComposition=function(){if(!this.$composition)return;i.removeCssClass(this.textarea,"ace_composition"),this.$keepTextAreaAtCursor=this.$composition.keepTextAreaAtCursor,this.textarea.style.cssText=this.$composition.cssText,this.$composition=null},this.setTheme=function(e,t){function s(r){if(n.$themeValue!=e)return t&&t();if(!r.cssClass)return;i.importCssString(r.cssText,r.cssClass,n.container.ownerDocument),n.theme&&i.removeCssClass(n.container,n.theme.cssClass),n.$theme=r.cssClass,n.theme=r,i.addCssClass(n.container,r.cssClass),i.setCssClass(n.container,"ace_dark",r.isDark);var s="padding"in r?r.padding:4;n.$padding&&s!=n.$padding&&n.setPadding(s),n.$size&&(n.$size.width=0,n.onResize()),n._dispatchEvent("themeLoaded",{theme:r}),t&&t()}var n=this;this.$themeValue=e,n._dispatchEvent("themeChange",{theme:e});if(!e||typeof e=="string"){var r=e||"ace/theme/textmate";o.loadModule(["theme",r],s)}else s(e)},this.getTheme=function(){return this.$themeValue},this.setStyle=function(e,t){i.setCssClass(this.container,e,t!=0)},this.unsetStyle=function(e){i.removeCssClass(this.container,e)},this.setMouseCursor=function(e){this.content.style.cursor=e},this.destroy=function(){this.$textLayer.destroy(),this.$cursorLayer.destroy()}}).call(m.prototype),o.defineOptions(m.prototype,"renderer",{animatedScroll:{initialValue:!1},showInvisibles:{set:function(e){this.$textLayer.setShowInvisibles(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(e){typeof e=="number"&&(this.$printMarginColumn=e),this.$showPrintMargin=!!e,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(e){this.$gutter.style.display=e?"block":"none",this.onGutterResize()},initialValue:!0},fadeFoldWidgets:{set:function(e){i.setCssClass(this.$gutter,"ace_fade-fold-widgets",e)},initialValue:!1},showFoldWidgets:{set:function(e){this.$gutterLayer.setShowFoldWidgets(e)},initialValue:!0},displayIndentGuides:{set:function(e){this.$textLayer.setDisplayIndentGuides(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightGutterLine:{set:function(e){if(!this.$gutterLineHighlight){this.$gutterLineHighlight=i.createElement("div"),this.$gutterLineHighlight.className="ace_gutter-active-line",this.$gutter.appendChild(this.$gutterLineHighlight);return}this.$gutterLineHighlight.style.display=e?"":"none",this.$cursorLayer.$pixelPos&&this.$updateGutterLineHighlight()},initialValue:!1,value:!0},hScrollBarAlwaysVisible:{set:function(e){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(e){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(e){typeof e=="number"&&(e+="px"),this.container.style.fontSize=e,this.updateFontSize()},initialValue:12},fontFamily:{set:function(e){this.container.style.fontFamily=e,this.updateFontSize()}},maxLines:{set:function(e){this.updateFull()}},minLines:{set:function(e){this.updateFull()}},scrollPastEnd:{set:function(e){e=+e||0;if(this.$scrollPastEnd==e)return;this.$scrollPastEnd=e,this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(e){this.$gutterLayer.$fixedWidth=!!e,this.$loop.schedule(this.CHANGE_GUTTER)}}}),t.VirtualRenderer=m}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter"],function(e,t,n){var r=e("../lib/dom"),i=e("../lib/oop"),s=e("../lib/lang"),o=e("../lib/event_emitter").EventEmitter,u=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$cells=[]};(function(){i.implement(this,o),this.setSession=function(e){this.session&&this.session.removeEventListener("change",this.$updateAnnotations),this.session=e,e.on("change",this.$updateAnnotations)},this.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,t)},this.setAnnotations=function(e){this.$annotations=[];for(var t=0;t<e.length;t++){var n=e[t],r=n.row,i=this.$annotations[r];i||(i=this.$annotations[r]={text:[]});var o=n.text;o=o?s.escapeHTML(o):n.html||"",i.text.indexOf(o)===-1&&i.text.push(o);var u=n.type;u=="error"?i.className=" ace_error":u=="warning"&&i.className!=" ace_error"?i.className=" ace_warning":u=="info"&&!i.className&&(i.className=" ace_info")}},this.$updateAnnotations=function(e){if(!this.$annotations.length)return;var t=e.data,n=t.range,r=n.start.row,i=n.end.row-r;if(i!==0)if(t.action=="removeText"||t.action=="removeLines")this.$annotations.splice(r,i+1,null);else{var s=new Array(i+1);s.unshift(r,1),this.$annotations.splice.apply(this.$annotations,s)}},this.update=function(e){var t=e.firstRow,n=e.lastRow,i=this.session,s=i.getNextFoldLine(t),o=s?s.start.row:Infinity,u=this.$showFoldWidgets&&i.foldWidgets,a=i.$breakpoints,f=i.$decorations,l=i.$firstLineNumber,c=0,h=i.gutterRenderer,p=null,d=-1,v=t;for(;;){v>o&&(v=s.end.row+1,s=i.getNextFoldLine(v,s),o=s?s.start.row:Infinity);if(v>n){while(this.$cells.length>d+1)p=this.$cells.pop(),this.element.removeChild(p.element);break}p=this.$cells[++d],p||(p={element:null,textNode:null,foldWidget:null},p.element=r.createElement("div"),p.textNode=document.createTextNode(""),p.element.appendChild(p.textNode),this.element.appendChild(p.element),this.$cells[d]=p);var m="ace_gutter-cell ";a[v]&&(m+=a[v]),f[v]&&(m+=f[v]),this.$annotations[v]&&(m+=this.$annotations[v].className),p.element.className!=m&&(p.element.className=m);var g=i.getRowLength(v)*e.lineHeight+"px";g!=p.element.style.height&&(p.element.style.height=g);if(u){var y=u[v];y==null&&(y=u[v]=i.getFoldWidget(v))}if(y){p.foldWidget||(p.foldWidget=r.createElement("span"),p.element.appendChild(p.foldWidget));var m="ace_fold-widget ace_"+y;y=="start"&&v==o&&v<s.end.row?m+=" ace_closed":m+=" ace_open",p.foldWidget.className!=m&&(p.foldWidget.className=m);var g=e.lineHeight+"px";p.foldWidget.style.height!=g&&(p.foldWidget.style.height=g)}else p.foldWidget&&(p.element.removeChild(p.foldWidget),p.foldWidget=null);var b=c=h?h.getText(i,v):v+l;b!=p.textNode.data&&(p.textNode.data=b),v++}this.element.style.height=e.minHeight+"px";if(this.$fixedWidth||i.$useWrapMode)c=i.getLength();var w=h?h.getWidth(i,c,e):c.toString().length*e.characterWidth,E=this.$padding||this.$computePadding();w+=E.left+E.right,w!==this.gutterWidth&&!isNaN(w)&&(this.gutterWidth=w,this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._emit("changeGutterWidth",w))},this.$fixedWidth=!1,this.$showFoldWidgets=!0,this.setShowFoldWidgets=function(e){e?r.addCssClass(this.element,"ace_folding-enabled"):r.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},this.getShowFoldWidgets=function(){return this.$showFoldWidgets},this.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=r.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=parseInt(e.paddingLeft)+1||0,this.$padding.right=parseInt(e.paddingRight)||0,this.$padding},this.getRegion=function(e){var t=this.$padding||this.$computePadding(),n=this.element.getBoundingClientRect();if(e.x<t.left+n.left)return"markers";if(this.$showFoldWidgets&&e.x>n.right-t.right)return"foldWidgets"}}).call(u.prototype),t.Gutter=u}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,t,n){var r=e("../range").Range,i=e("../lib/dom"),s=function(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)};(function(){this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.update=function(e){var e=e||this.config;if(!e)return;this.config=e;var t=[];for(var n in this.markers){var r=this.markers[n];if(!r.range){r.update(t,this,this.session,e);continue}var s=r.range.clipRows(e.firstRow,e.lastRow);if(s.isEmpty())continue;s=s.toScreenRange(this.session);if(r.renderer){var o=this.$getTop(s.start.row,e),u=this.$padding+s.start.column*e.characterWidth;r.renderer(t,s,u,o,e)}else r.type=="fullLine"?this.drawFullLineMarker(t,s,r.clazz,e):r.type=="screenLine"?this.drawScreenLineMarker(t,s,r.clazz,e):s.isMultiLine()?r.type=="text"?this.drawTextMarker(t,s,r.clazz,e):this.drawMultiLineMarker(t,s,r.clazz,e):this.drawSingleLineMarker(t,s,r.clazz+" ace_start",e)}this.element=i.setInnerHtml(this.element,t.join(""))},this.$getTop=function(e,t){return(e-t.firstRowScreen)*t.lineHeight},this.drawTextMarker=function(e,t,n,i,s){var o=t.start.row,u=new r(o,t.start.column,o,this.session.getScreenLastRowColumn(o));this.drawSingleLineMarker(e,u,n+" ace_start",i,1,s),o=t.end.row,u=new r(o,0,o,t.end.column),this.drawSingleLineMarker(e,u,n,i,0,s);for(o=t.start.row+1;o<t.end.row;o++)u.start.row=o,u.end.row=o,u.end.column=this.session.getScreenLastRowColumn(o),this.drawSingleLineMarker(e,u,n,i,1,s)},this.drawMultiLineMarker=function(e,t,n,r,i){var s=this.$padding,o=r.lineHeight,u=this.$getTop(t.start.row,r),a=s+t.start.column*r.characterWidth;i=i||"",e.push("<div class='",n," ace_start' style='","height:",o,"px;","right:0;","top:",u,"px;","left:",a,"px;",i,"'></div>"),u=this.$getTop(t.end.row,r);var f=t.end.column*r.characterWidth;e.push("<div class='",n,"' style='","height:",o,"px;","width:",f,"px;","top:",u,"px;","left:",s,"px;",i,"'></div>"),o=(t.end.row-t.start.row-1)*r.lineHeight;if(o<0)return;u=this.$getTop(t.start.row+1,r),e.push("<div class='",n,"' style='","height:",o,"px;","right:0;","top:",u,"px;","left:",s,"px;",i,"'></div>")},this.drawSingleLineMarker=function(e,t,n,r,i,s){var o=r.lineHeight,u=(t.end.column+(i||0)-t.start.column)*r.characterWidth,a=this.$getTop(t.start.row,r),f=this.$padding+t.start.column*r.characterWidth;e.push("<div class='",n,"' style='","height:",o,"px;","width:",u,"px;","top:",a,"px;","left:",f,"px;",s||"","'></div>")},this.drawFullLineMarker=function(e,t,n,r,i){var s=this.$getTop(t.start.row,r),o=r.lineHeight;t.start.row!=t.end.row&&(o+=this.$getTop(t.end.row,r)-s),e.push("<div class='",n,"' style='","height:",o,"px;","top:",s,"px;","left:0;right:0;",i||"","'></div>")},this.drawScreenLineMarker=function(e,t,n,r,i){var s=this.$getTop(t.start.row,r),o=r.lineHeight;e.push("<div class='",n,"' style='","height:",o,"px;","top:",s,"px;","left:0;right:0;",i||"","'></div>")}}).call(s.prototype),t.Marker=s}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(e,t,n){var r=e("../lib/oop"),i=e("../lib/dom"),s=e("../lib/lang"),o=e("../lib/useragent"),u=e("../lib/event_emitter").EventEmitter,a=function(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$characterSize={width:0,height:0},this.checkForSizeChanges(),this.$pollSizeChanges()};(function(){r.implement(this,u),this.EOF_CHAR="¶",this.EOL_CHAR="¬",this.TAB_CHAR="→",this.SPACE_CHAR="·",this.$padding=0,this.setPadding=function(e){this.$padding=e,this.element.style.padding="0 "+e+"px"},this.getLineHeight=function(){return this.$characterSize.height||0},this.getCharacterWidth=function(){return this.$characterSize.width||0},this.checkForSizeChanges=function(){var e=this.$measureSizes();if(e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},this.$pollSizeChanges=function(){var e=this;this.$pollSizeChangesTimer=setInterval(function(){e.checkForSizeChanges()},500)},this.$fontStyles={fontFamily:1,fontSize:1,fontWeight:1,fontStyle:1,lineHeight:1},this.$measureSizes=o.isIE||o.isOldGecko?function(){var e=1e3;if(!this.$measureNode){var t=this.$measureNode=i.createElement("div"),n=t.style;n.width=n.height="auto",n.left=n.top=-e*40+"px",n.visibility="hidden",n.position="fixed",n.overflow="visible",n.whiteSpace="nowrap",t.innerHTML=s.stringRepeat("Xy",e);if(this.element.ownerDocument.body)this.element.ownerDocument.body.appendChild(t);else{var r=this.element.parentNode;while(!i.hasCssClass(r,"ace_editor"))r=r.parentNode;r.appendChild(t)}}if(!this.element.offsetWidth)return null;var n=this.$measureNode.style,o=i.computedStyle(this.element);for(var u in this.$fontStyles)n[u]=o[u];var a={height:this.$measureNode.offsetHeight,width:this.$measureNode.offsetWidth/(e*2)};return a.width==0||a.height==0?null:a}:function(){if(!this.$measureNode){var e=this.$measureNode=i.createElement("div"),t=e.style;t.width=t.height="auto",t.left=t.top="-100px",t.visibility="hidden",t.position="fixed",t.overflow="visible",t.whiteSpace="nowrap",e.innerHTML=s.stringRepeat("X",100);var n=this.element.parentNode;while(n&&!i.hasCssClass(n,"ace_editor"))n=n.parentNode;if(!n)return this.$measureNode=null;n.appendChild(e)}var r=this.$measureNode.getBoundingClientRect(),o={height:r.height,width:r.width/100};return o.width==0||o.height==0?null:o},this.setSession=function(e){this.session=e,this.$computeTabString()},this.showInvisibles=!1,this.setShowInvisibles=function(e){return this.showInvisibles==e?!1:(this.showInvisibles=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides==e?!1:(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;var t=this.$tabStrings=[0];for(var n=1;n<e+1;n++)this.showInvisibles?t.push("<span class='ace_invisible'>"+this.TAB_CHAR+s.stringRepeat(" ",n-1)+"</span>"):t.push(s.stringRepeat(" ",n));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var r="ace_indent-guide";if(this.showInvisibles){r+=" ace_invisible";var i=s.stringRepeat(this.SPACE_CHAR,this.tabSize),o=this.TAB_CHAR+s.stringRepeat(" ",this.tabSize-1)}else var i=s.stringRepeat(" ",this.tabSize),o=i;this.$tabStrings[" "]="<span class='"+r+"'>"+i+"</span>",this.$tabStrings["	"]="<span class='"+r+"'>"+o+"</span>"}},this.updateLines=function(e,t,n){(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)&&this.scrollLines(e),this.config=e;var r=Math.max(t,e.firstRow),s=Math.min(n,e.lastRow),o=this.element.childNodes,u=0;for(var a=e.firstRow;a<r;a++){var f=this.session.getFoldLine(a);if(f){if(f.containsRow(r)){r=f.start.row;break}a=f.end.row}u++}var a=r,f=this.session.getNextFoldLine(a),l=f?f.start.row:Infinity;for(;;){a>l&&(a=f.end.row+1,f=this.session.getNextFoldLine(a,f),l=f?f.start.row:Infinity);if(a>s)break;var c=o[u++];if(c){var h=[];this.$renderLine(h,a,!this.$useLineGroups(),a==l?f:!1),c.style.height=e.lineHeight*this.session.getRowLength(a)+"px",i.setInnerHtml(c,h.join(""))}a++}},this.scrollLines=function(e){var t=this.config;this.config=e;if(!t||t.lastRow<e.firstRow)return this.update(e);if(e.lastRow<t.firstRow)return this.update(e);var n=this.element;if(t.firstRow<e.firstRow)for(var r=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);r>0;r--)n.removeChild(n.firstChild);if(t.lastRow>e.lastRow)for(var r=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);r>0;r--)n.removeChild(n.lastChild);if(e.firstRow<t.firstRow){var i=this.$renderLinesFragment(e,e.firstRow,t.firstRow-1);n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i)}if(e.lastRow>t.lastRow){var i=this.$renderLinesFragment(e,t.lastRow+1,e.lastRow);n.appendChild(i)}},this.$renderLinesFragment=function(e,t,n){var r=this.element.ownerDocument.createDocumentFragment(),s=t,o=this.session.getNextFoldLine(s),u=o?o.start.row:Infinity;for(;;){s>u&&(s=o.end.row+1,o=this.session.getNextFoldLine(s,o),u=o?o.start.row:Infinity);if(s>n)break;var a=i.createElement("div"),f=[];this.$renderLine(f,s,!1,s==u?o:!1),a.innerHTML=f.join("");if(this.$useLineGroups())a.className="ace_line_group",r.appendChild(a),a.style.height=e.lineHeight*this.session.getRowLength(s)+"px";else{var l=a.childNodes;while(l.length)r.appendChild(l[0])}s++}return r},this.update=function(e){this.config=e;var t=[],n=e.firstRow,r=e.lastRow,s=n,o=this.session.getNextFoldLine(s),u=o?o.start.row:Infinity;for(;;){s>u&&(s=o.end.row+1,o=this.session.getNextFoldLine(s,o),u=o?o.start.row:Infinity);if(s>r)break;this.$useLineGroups()&&t.push("<div class='ace_line_group' style='height:",e.lineHeight*this.session.getRowLength(s),"px'>"),this.$renderLine(t,s,!1,s==u?o:!1),this.$useLineGroups()&&t.push("</div>"),s++}this.element=i.setInnerHtml(this.element,t.join(""))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,t,n,r){var i=this,o=/\t|&|<|( +)|([\x00-\x1f\x80-\xa0\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]/g,u=function(e,n,r,o,u){if(n)return i.showInvisibles?"<span class='ace_invisible'>"+s.stringRepeat(i.SPACE_CHAR,e.length)+"</span>":s.stringRepeat(" ",e.length);if(e=="&")return"&#38;";if(e=="<")return"&#60;";if(e=="	"){var a=i.session.getScreenTabSize(t+o);return t+=a-1,i.$tabStrings[a]}if(e==" "){var f=i.showInvisibles?"ace_cjk ace_invisible":"ace_cjk",l=i.showInvisibles?i.SPACE_CHAR:"";return t+=1,"<span class='"+f+"' style='width:"+i.config.characterWidth*2+"px'>"+l+"</span>"}return r?"<span class='ace_invisible ace_invalid'>"+i.SPACE_CHAR+"</span>":(t+=1,"<span class='ace_cjk' style='width:"+i.config.characterWidth*2+"px'>"+e+"</span>")},a=r.replace(o,u);if(!this.$textToken[n.type]){var f="ace_"+n.type.replace(/\./g," ace_"),l="";n.type=="fold"&&(l=" style='width:"+n.value.length*this.config.characterWidth+"px;' "),e.push("<span class='",f,"'",l,">",a,"</span>")}else e.push(a);return t+r.length},this.renderIndentGuide=function(e,t,n){var r=t.search(this.$indentGuideRe);return r<=0||r>=n?t:t[0]==" "?(r-=r%this.tabSize,e.push(s.stringRepeat(this.$tabStrings[" "],r/this.tabSize)),t.substr(r)):t[0]=="	"?(e.push(s.stringRepeat(this.$tabStrings["	"],r)),t.substr(r)):t},this.$renderWrappedLine=function(e,t,n,r){var i=0,s=0,o=n[0],u=0;for(var a=0;a<t.length;a++){var f=t[a],l=f.value;if(a==0&&this.displayIndentGuides){i=l.length,l=this.renderIndentGuide(e,l,o);if(!l)continue;i-=l.length}if(i+l.length<o)u=this.$renderToken(e,u,f,l),i+=l.length;else{while(i+l.length>=o)u=this.$renderToken(e,u,f,l.substring(0,o-i)),l=l.substring(o-i),i=o,r||e.push("</div>","<div class='ace_line' style='height:",this.config.lineHeight,"px'>"),s++,u=0,o=n[s]||Number.MAX_VALUE;l.length!=0&&(i+=l.length,u=this.$renderToken(e,u,f,l))}}},this.$renderSimpleLine=function(e,t){var n=0,r=t[0],i=r.value;this.displayIndentGuides&&(i=this.renderIndentGuide(e,i)),i&&(n=this.$renderToken(e,n,r,i));for(var s=1;s<t.length;s++)r=t[s],i=r.value,n=this.$renderToken(e,n,r,i)},this.$renderLine=function(e,t,n,r){!r&&r!=0&&(r=this.session.getFoldLine(t));if(r)var i=this.$getFoldLineTokens(t,r);else var i=this.session.getTokens(t);n||e.push("<div class='ace_line' style='height:",this.config.lineHeight*(this.$useLineGroups()?1:this.session.getRowLength(t)),"px'>");if(i.length){var s=this.session.getRowSplitData(t);s&&s.length?this.$renderWrappedLine(e,i,s,n):this.$renderSimpleLine(e,i)}this.showInvisibles&&(r&&(t=r.end.row),e.push("<span class='ace_invisible'>",t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,"</span>")),n||e.push("</div>")},this.$getFoldLineTokens=function(e,t){function i(e,t,n){var i=0,s=0;while(s+e[i].value.length<t){s+=e[i].value.length,i++;if(i==e.length)return}if(s!=t){var o=e[i].value.substring(t-s);o.length>n-t&&(o=o.substring(0,n-t)),r.push({type:e[i].type,value:o}),s=t+o.length,i+=1}while(s<n&&i<e.length){var o=e[i].value;o.length+s>n?r.push({type:e[i].type,value:o.substring(0,n-s)}):r.push(e[i]),s+=o.length,i+=1}}var n=this.session,r=[],s=n.getTokens(e);return t.walk(function(e,t,o,u,a){e!=null?r.push({type:"fold",value:e}):(a&&(s=n.getTokens(t)),s.length&&i(s,u,o))},t.end.row,this.session.getLine(t.end.row).length),r},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$measureNode&&this.$measureNode.parentNode.removeChild(this.$measureNode),delete this.$measureNode}}).call(a.prototype),t.Text=a}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,t,n){var r=e("../lib/dom"),i=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),r.addCssClass(this.element,"ace_hidden-cursors")};(function(){this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,e?r.addCssClass(this.element,"ace_smooth-blinking"):r.removeCssClass(this.element,"ace_smooth-blinking"),this.restartTimer())},this.addCursor=function(){var e=r.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},this.hideCursor=function(){this.isVisible=!1,r.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,r.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.smoothBlinking&&r.removeCssClass(this.element,"ace_smooth-blinking");for(var e=this.cursors.length;e--;)this.cursors[e].style.opacity="";if(!this.isBlinking||!this.blinkInterval||!this.isVisible)return;this.smoothBlinking&&setTimeout(function(){r.addCssClass(this.element,"ace_smooth-blinking")}.bind(this));var t=function(){this.timeoutId=setTimeout(function(){for(var e=this.cursors.length;e--;)this.cursors[e].style.opacity=0}.bind(this),.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){for(var e=this.cursors.length;e--;)this.cursors[e].style.opacity="";t()}.bind(this),this.blinkInterval),t()},this.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(e),r=this.$padding+n.column*this.config.characterWidth,i=(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:r,top:i}},this.update=function(e){this.config=e;var t=this.session.$selectionMarkers,n=0,r=0;if(t===undefined||t.length===0)t=[{cursor:null}];for(var n=0,i=t.length;n<i;n++){var s=this.getPixelPosition(t[n].cursor,!0);if((s.top>e.height+e.offset||s.top<-e.offset)&&n>1)continue;var o=(this.cursors[r++]||this.addCursor()).style;o.left=s.left+"px",o.top=s.top+"px",o.width=e.characterWidth+"px",o.height=e.lineHeight+"px"}while(this.cursors.length>r)this.removeCursor();var u=this.session.getOverwrite();this.$setOverwrite(u),this.$pixelPos=s,this.restartTimer()},this.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?r.addCssClass(this.element,"ace_overwrite-cursors"):r.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(i.prototype),t.Cursor=i}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/dom"),s=e("./lib/event"),o=e("./lib/event_emitter").EventEmitter,u=function(e,t){this.element=i.createElement("div"),this.element.className="ace_scrollbar",this.inner=i.createElement("div"),this.inner.className="ace_scrollbar-inner",this.element.appendChild(this.inner),e.appendChild(this.element),t.$scrollbarWidth=this.width=i.scrollbarWidth(e.ownerDocument),t.$scrollbarWidth=this.width=i.scrollbarWidth(e.ownerDocument),this.fullWidth=this.width,this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.setVisible(!1),this.element.style.overflowY="scroll",s.addListener(this.element,"scroll",this.onScrollV.bind(this)),s.addListener(this.element,"mousedown",s.preventDefault)},a=function(e,t){this.element=i.createElement("div"),this.element.className="ace_scrollbar-h",this.inner=i.createElement("div"),this.inner.className="ace_scrollbar-inner",this.element.appendChild(this.inner),e.appendChild(this.element),this.height=t.$scrollbarWidth,this.fullHeight=this.height,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px",this.setVisible(!1),this.element.style.overflowX="scroll",s.addListener(this.element,"scroll",this.onScrollH.bind(this)),s.addListener(this.element,"mousedown",s.preventDefault)};(function(){r.implement(this,o),this.setVisible=function(e){e?(this.element.style.display="",this.fullWidth&&(this.width=this.fullWidth),this.fullHeight&&(this.height=this.fullHeight)):(this.element.style.display="none",this.height=this.width=0)},this.onScrollV=function(){this.skipEvent||(this.scrollTop=this.element.scrollTop,this._emit("scroll",{data:this.scrollTop})),this.skipEvent=!1},this.onScrollH=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getWidth=function(){return this.width},this.getHeight=function(){return this.height},this.setHeight=function(e){this.element.style.height=e+"px"},this.setWidth=function(e){this.element.style.width=e+"px"},this.setInnerHeight=function(e){this.inner.style.height=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=this.element.scrollTop=e)},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}).call(u.prototype),a.prototype=u.prototype,t.ScrollBar=u,t.ScrollBarV=u,t.ScrollBarH=a}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,t,n){var r=e("./lib/event"),i=function(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.window=t||window};(function(){this.schedule=function(e){this.changes=this.changes|e;if(!this.pending){this.pending=!0;var t=this;r.nextFrame(function(){t.pending=!1;var e;while(e=t.changes)t.changes=0,t.onRender(e)},this.window)}}}).call(i.prototype),t.RenderLoop=i}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(e,t,n){function h(e,t,n){return c.$options.wrap=!0,c.$options.needle=t,c.$options.backwards=n==-1,c.find(e)}function v(e,t){return e.row==t.row&&e.column==t.column}function m(e){if(e.$multiselectOnSessionChange)return;e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",o),e.commands.addCommands(f.defaultCommands),g(e)}function g(e){function r(t){n&&(e.renderer.setMouseCursor(""),n=!1)}var t=e.textInput.getElement(),n=!1;u.addListener(t,"keydown",function(t){t.keyCode==18&&!(t.ctrlKey||t.shiftKey||t.metaKey)?n||(e.renderer.setMouseCursor("crosshair"),n=!0):n&&r()}),u.addListener(t,"keyup",r),u.addListener(t,"blur",r)}var r=e("./range_list").RangeList,i=e("./range").Range,s=e("./selection").Selection,o=e("./mouse/multi_select_handler").onMouseDown,u=e("./lib/event"),a=e("./lib/lang"),f=e("./commands/multi_select_commands");t.commands=f.defaultCommands.concat(f.multiSelectCommands);var l=e("./search").Search,c=new l,p=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(p.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(!e)return;if(!this.inMultiSelectMode&&this.rangeCount==0){var n=this.toOrientedRange();this.rangeList.add(n),this.rangeList.add(e);if(this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(n),this.$onAddRange(n)}e.cursor||(e.cursor=e.end);var r=this.rangeList.add(e);return this.$onAddRange(e),r.length&&this.$onRemoveRange(r),this.rangeCount>1&&!this.inMultiSelectMode&&(this._emit("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length?this.$onRemoveRange(e):this.ranges[0]&&this.fromOrientedRange(this.ranges[0])},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._emit("addRange",{range:e})},this.$onRemoveRange=function(e){this.rangeCount=this.rangeList.ranges.length;if(this.rangeCount==1&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var n=e.length;n--;){var r=this.ranges.indexOf(e[n]);this.ranges.splice(r,1)}this._emit("removeRange",{ranges:e}),this.rangeCount==0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._emit("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),t=t||this.ranges[0],t&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){if(this.rangeList)return;this.rangeList=new r,this.ranges=[],this.rangeCount=0},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],n=i.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var n=this.getRange(),r=this.isBackwards(),s=n.start.row,o=n.end.row;if(s==o){if(r)var u=n.end,a=n.start;else var u=n.start,a=n.end;this.addRange(i.fromPoints(a,a)),this.addRange(i.fromPoints(u,u));return}var f=[],l=this.getLineRange(s,!0);l.start.column=n.start.column,f.push(l);for(var c=s+1;c<o;c++)f.push(this.getLineRange(c,!0));l=this.getLineRange(o,!0),l.end.column=n.end.column,f.push(l),f.forEach(this.addRange,this)}},this.toggleBlockSelection=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],n=i.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var r=this.session.documentToScreenPosition(this.selectionLead),s=this.session.documentToScreenPosition(this.selectionAnchor),o=this.rectangularRangeBlock(r,s);o.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var r=[],s=e.column<t.column;if(s)var o=e.column,u=t.column;else var o=t.column,u=e.column;var a=e.row<t.row;if(a)var f=e.row,l=t.row;else var f=t.row,l=e.row;o<0&&(o=0),f<0&&(f=0),f==l&&(n=!0);for(var c=f;c<=l;c++){var h=i.fromPoints(this.session.screenToDocumentPosition(c,o),this.session.screenToDocumentPosition(c,u));if(h.isEmpty()){if(p&&v(h.end,p))break;var p=h.end}h.cursor=s?h.start:h.end,r.push(h)}a&&r.reverse();if(!n){var d=r.length-1;while(r[d].isEmpty()&&d>0)d--;if(d>0){var m=0;while(r[m].isEmpty())m++}for(var g=d;g>=m;g--)r[g].isEmpty()&&r.splice(g,1)}return r}}.call(s.prototype);var d=e("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(!e.marker)return;this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);t!=-1&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length},this.removeSelectionMarkers=function(e){var t=this.session.$selectionMarkers;for(var n=e.length;n--;){var r=e[n];if(!r.marker)continue;this.session.removeMarker(r.marker);var i=t.indexOf(r);i!=-1&&t.splice(i,1)}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){if(this.inMultiSelectMode)return;this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(f.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onSingleSelect=function(e){if(this.session.multiSelect.inVirtualMode)return;this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(f.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelectExec=function(e){var t=e.command,n=e.editor;if(!n.multiSelect)return;if(!t.multiSelectAction){var r=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}else t.multiSelectAction=="forEach"?r=n.forEachSelection(t,e.args):t.multiSelectAction=="forEachLine"?r=n.forEachSelection(t,e.args,!0):t.multiSelectAction=="single"?(n.exitMultiSelectMode(),r=t.exec(n,e.args||{})):r=t.multiSelectAction(n,e.args||{});return r},this.forEachSelection=function(e,t,n){if(this.inVirtualSelectionMode)return;var r=this.session,i=this.selection,o=i.rangeList,u,a=i._eventRegistry;i._eventRegistry={};var f=new s(r);this.inVirtualSelectionMode=!0;for(var l=o.ranges.length;l--;){if(n)while(l>0&&o.ranges[l].start.row==o.ranges[l-1].end.row)l--;f.fromOrientedRange(o.ranges[l]),this.selection=r.selection=f;var c=e.exec(this,t||{});!u==undefined&&(u=c),f.toOrientedRange(o.ranges[l])}f.detach(),this.selection=r.selection=i,this.inVirtualSelectionMode=!1,i._eventRegistry=a,i.mergeOverlappingRanges();var h=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),h&&h.from==h.to&&this.renderer.animateScrolling(h.from),u},this.exitMultiSelectMode=function(){if(!this.inMultiSelectMode||this.inVirtualSelectionMode)return;this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var t=this.multiSelect.rangeList.ranges,n=[];for(var r=0;r<t.length;r++)n.push(this.session.getTextRange(t[r]));var i=this.session.getDocument().getNewLineCharacter();e=n.join(i),e.length==(n.length-1)*i.length&&(e="")}else this.selection.isEmpty()||(e=this.session.getTextRange(this.getSelectionRange()));return e},this.onPaste=function(e){if(this.$readOnly)return;this._signal("paste",e);if(!this.inMultiSelectMode||this.inVirtualSelectionMode)return this.insert(e);var t=e.split(/\r\n|\r|\n/),n=this.selection.rangeList.ranges;if(t.length>n.length||t.length<2||!t[1])return this.commands.exec("insertstring",this,e);for(var r=n.length;r--;){var i=n[r];i.isEmpty()||this.session.remove(i),this.session.insert(i.start,t[r])}},this.findAll=function(e,t,n){t=t||{},t.needle=e||t.needle,this.$search.set(t);var r=this.$search.findAll(this.session);if(!r.length)return 0;this.$blockScrolling+=1;var i=this.multiSelect;n||i.toSingleRange(r[0]);for(var s=r.length;s--;)i.addRange(r[s],!0);return this.$blockScrolling-=1,r.length},this.selectMoreLines=function(e,t){var n=this.selection.toOrientedRange(),r=n.cursor==n.end,s=this.session.documentToScreenPosition(n.cursor);this.selection.$desiredColumn&&(s.column=this.selection.$desiredColumn);var o=this.session.screenToDocumentPosition(s.row+e,s.column);if(!n.isEmpty())var u=this.session.documentToScreenPosition(r?n.end:n.start),a=this.session.screenToDocumentPosition(u.row+e,u.column);else var a=o;if(r){var f=i.fromPoints(o,a);f.cursor=f.start}else{var f=i.fromPoints(a,o);f.cursor=f.end}f.desiredColumn=s.column;if(!this.selection.inMultiSelectMode)this.selection.addRange(n);else if(t)var l=n.cursor;this.selection.addRange(f),l&&this.selection.substractPoint(l)},this.transposeSelections=function(e){var t=this.session,n=t.multiSelect,r=n.ranges;for(var i=r.length;i--;){var s=r[i];if(s.isEmpty()){var o=t.getWordRange(s.start.row,s.start.column);s.start.row=o.start.row,s.start.column=o.start.column,s.end.row=o.end.row,s.end.column=o.end.column}}n.mergeOverlappingRanges();var u=[];for(var i=r.length;i--;){var s=r[i];u.unshift(t.getTextRange(s))}e<0?u.unshift(u.pop()):u.push(u.shift());for(var i=r.length;i--;){var s=r[i],o=s.clone();t.replace(s,u[i]),s.start.row=o.start.row,s.start.column=o.start.column}},this.selectMore=function(e,t){var n=this.session,r=n.multiSelect,i=r.toOrientedRange();if(i.isEmpty()){i=n.getWordRange(i.start.row,i.start.column),i.cursor=e==-1?i.start:i.end,this.multiSelect.addRange(i);return}var s=n.getTextRange(i),o=h(n,s,e);o&&(o.cursor=e==-1?o.start:o.end,this.$blockScrolling+=1,this.session.unfold(o),this.multiSelect.addRange(o),this.$blockScrolling-=1,this.renderer.scrollCursorIntoView(null,.5)),t&&this.multiSelect.substractPoint(i.cursor)},this.alignCursors=function(){var e=this.session,t=e.multiSelect,n=t.ranges;if(!n.length){var r=this.selection.getRange(),s=r.start.row,o=r.end.row,u=s==o;if(u){var f=this.session.getLength(),l;do l=this.session.getLine(o);while(/[=:]/.test(l)&&++o<f);do l=this.session.getLine(s);while(/[=:]/.test(l)&&--s>0);s<0&&(s=0),o>=f&&(o=f-1)}var c=this.session.doc.removeLines(s,o);c=this.$reAlignText(c,u),this.session.doc.insert({row:s,column:0},c.join("\n")+"\n"),u||(r.start.column=0,r.end.column=c[c.length-1].length),this.selection.setRange(r)}else{var h=-1,p=n.filter(function(e){if(e.cursor.row==h)return!0;h=e.cursor.row});t.$onRemoveRange(p);var d=0,v=Infinity,m=n.map(function(t){var n=t.cursor,r=e.getLine(n.row),i=r.substr(n.column).search(/\S/g);return i==-1&&(i=0),n.column>d&&(d=n.column),i<v&&(v=i),i});n.forEach(function(t,n){var r=t.cursor,s=d-r.column,o=m[n]-v;s>o?e.insert(r,a.stringRepeat(" ",s-o)):e.remove(new i(r.row,r.column,r.row,r.column-s+o)),t.start.column=t.end.column=d,t.start.row=t.end.row=r.row,t.cursor=t.end}),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(e,t){function u(e){return a.stringRepeat(" ",e)}function f(e){return e[2]?u(i)+e[2]+u(s-e[2].length+o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function l(e){return e[2]?u(i+s-e[2].length)+e[2]+u(o," ")+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function c(e){return e[2]?u(i)+e[2]+u(o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}var n=!0,r=!0,i,s,o;return e.map(function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?i==null?(i=t[1].length,s=t[2].length,o=t[3].length,t):(i+s+o!=t[1].length+t[2].length+t[3].length&&(r=!1),i!=t[1].length&&(n=!1),i>t[1].length&&(i=t[1].length),s<t[2].length&&(s=t[2].length),o>t[3].length&&(o=t[3].length),t):[e]}).map(t?f:n?r?l:f:c)}}).call(d.prototype),t.onSessionChange=function(e){var t=e.session;t.multiSelect||(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t.multiSelect;var n=e.oldSession;n&&(n.multiSelect.removeEventListener("addRange",this.$onAddRange),n.multiSelect.removeEventListener("removeRange",this.$onRemoveRange),n.multiSelect.removeEventListener("multiSelect",this.$onMultiSelect),n.multiSelect.removeEventListener("singleSelect",this.$onSingleSelect)),t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=m,e("./config").defineOptions(d.prototype,"editor",{enableMultiselect:{set:function(e){m(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",o)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",o))},value:!0}})}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event"],function(e,t,n){function i(e,t){return e.row==t.row&&e.column==t.column}function s(e){var t=e.domEvent,n=t.altKey,s=t.shiftKey,o=e.getAccelKey(),u=e.getButton();if(e.editor.inMultiSelectMode&&u==2){e.editor.textInput.onContextMenu(e.domEvent);return}if(!o&&!n){u==0&&e.editor.inMultiSelectMode&&e.editor.exitMultiSelectMode();return}var a=e.editor,f=a.selection,l=a.inMultiSelectMode,c=e.getDocumentPosition(),h=f.getCursor(),p=e.inSelection()||f.isEmpty()&&i(c,h),d=e.x,v=e.y,m=function(e){d=e.clientX,v=e.clientY},g=function(){var e=a.renderer.pixelToScreenCoordinates(d,v),t=y.screenToDocumentPosition(e.row,e.column);if(i(w,e)&&i(t,f.selectionLead))return;w=e,a.selection.moveCursorToPosition(t),a.selection.clearSelection(),a.renderer.scrollCursorIntoView(),a.removeSelectionMarkers(x),x=f.rectangularRangeBlock(w,b),x.forEach(a.addSelectionMarker,a),a.updateSelectionMarkers()},y=a.session,b=a.renderer.pixelToScreenCoordinates(d,v),w=b;if(o&&!s&&!n&&u==0){if(!l&&p)return;if(!l){var E=f.toOrientedRange();a.addSelectionMarker(E)}var S=f.rangeList.rangeAtPoint(c);a.once("mouseup",function(){var e=f.toOrientedRange();S&&e.isEmpty()&&i(S.cursor,e.cursor)?f.substractPoint(e.cursor):(E&&(a.removeSelectionMarker(E),f.addRange(E)),f.addRange(e))})}else if(n&&u==0){e.stop(),l&&!o?f.toSingleRange():!l&&o&&f.addRange();var x=[];s?(b=y.documentToScreenPosition(f.lead),g()):(f.moveCursorToPosition(c),f.clearSelection());var T=function(e){clearInterval(C),a.removeSelectionMarkers(x);for(var t=0;t<x.length;t++)f.addRange(x[t])},N=g;r.capture(a.container,m,T);var C=setInterval(function(){N()},20);return e.preventDefault()}}var r=e("../lib/event");t.onMouseDown=s}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(e,t,n){t.defaultCommands=[{name:"addCursorAbove",exec:function(e){e.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},readonly:!0},{name:"addCursorBelow",exec:function(e){e.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},readonly:!0},{name:"addCursorAboveSkipCurrent",exec:function(e){e.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},readonly:!0},{name:"addCursorBelowSkipCurrent",exec:function(e){e.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},readonly:!0},{name:"selectMoreBefore",exec:function(e){e.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},readonly:!0},{name:"selectMoreAfter",exec:function(e){e.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},readonly:!0},{name:"selectNextBefore",exec:function(e){e.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},readonly:!0},{name:"selectNextAfter",exec:function(e){e.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},readonly:!0},{name:"splitIntoLines",exec:function(e){e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readonly:!0},{name:"alignCursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"}}],t.multiSelectCommands=[{name:"singleSelection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},readonly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var r=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new r(t.multiSelectCommands)}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/config"],function(e,t,n){var r=e("../lib/oop"),i=e("../lib/event_emitter").EventEmitter,s=e("../config"),o=function(t,n,r){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl);var i;if(s.get("packaged")||!e.toUrl)i=s.moduleUrl(n,"worker");else{var o=this.$normalizePath;i=o(e.toUrl("ace/worker/worker.js",null,"_"));var u={};t.forEach(function(t){u[t]=o(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}this.$worker=new Worker(i),this.$worker.postMessage({init:!0,tlns:u,module:n,classname:r}),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){r.implement(this,i),this.onMessage=function(e){var t=e.data;switch(t.type){case"log":window.console&&console.log&&console.log.apply(console,t.data);break;case"event":this._emit(t.name,{data:t.data});break;case"call":var n=this.callbacks[t.id];n&&(n(t.data),delete this.callbacks[t.id])}},this.$normalizePath=function(e){return location.host?(e=e.replace(/^[a-z]+:\/\/[^\/]+/,""),e=location.protocol+"//"+location.host+(e.charAt(0)=="/"?"":location.pathname.replace(/\/[^\/]*$/,""))+"/"+e.replace(/^[\/]+/,""),e):e},this.terminate=function(){this._emit("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc.removeEventListener("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,n){if(n){var r=this.callbackId++;this.callbacks[r]=n,t.push(r)}this.send(e,t)},this.emit=function(e,t){try{this.$worker.postMessage({event:e,data:{data:t.data}})}catch(n){}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener)},this.changeListener=function(e){this.deltaQueue?this.deltaQueue.push(e.data):(this.deltaQueue=[e.data],setTimeout(this.$sendDeltaQueue,0))},this.$sendDeltaQueue=function(){var e=this.deltaQueue;if(!e)return;this.deltaQueue=null,e.length>20&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e})}}).call(o.prototype);var u=function(e,t,n){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.callbackId=1,this.callbacks={},this.messageBuffer=[];var r=null,o=Object.create(i),u=this;this.$worker={},this.$worker.terminate=function(){},this.$worker.postMessage=function(e){u.messageBuffer.push(e),r&&setTimeout(a)};var a=function(){var e=u.messageBuffer.shift();e.command?r[e.command].apply(r,e.args):e.event&&o._emit(e.event,e.data)};o.postMessage=function(e){u.onMessage({data:e})},o.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},o.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},s.loadModule(["worker",t],function(e){r=new e[n](o);while(u.messageBuffer.length)a()})};u.prototype=o.prototype,t.UIWorkerClient=u,t.WorkerClient=o}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,t,n){var r=e("./range").Range,i=e("./lib/event_emitter").EventEmitter,s=e("./lib/oop"),o=function(e,t,n,r,i,s){var o=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=i,this.othersClass=s,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=r,this.$onCursorChange=function(){setTimeout(function(){o.onCursorChange()})},this.$pos=n;var u=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=u.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)};(function(){s.implement(this,i),this.setup=function(){var e=this,t=this.doc,n=this.session,i=this.$pos;this.pos=t.createAnchor(i.row,i.column),this.markerId=n.addMarker(new r(i.row,i.column,i.row,i.column+this.length),this.mainClass,null,!1),this.pos.on("change",function(t){n.removeMarker(e.markerId),e.markerId=n.addMarker(new r(t.value.row,t.value.column,t.value.row,t.value.column+e.length),e.mainClass,null,!1)}),this.others=[],this.$others.forEach(function(n){var r=t.createAnchor(n.row,n.column);e.others.push(r)}),n.setUndoSelect(!1)},this.showOtherMarkers=function(){if(this.othersActive)return;var e=this.session,t=this;this.othersActive=!0,this.others.forEach(function(n){n.markerId=e.addMarker(new r(n.row,n.column,n.row,n.column+t.length),t.othersClass,null,!1),n.on("change",function(i){e.removeMarker(n.markerId),n.markerId=e.addMarker(new r(i.value.row,i.value.column,i.value.row,i.value.column+t.length),t.othersClass,null,!1)})})},this.hideOtherMarkers=function(){if(!this.othersActive)return;this.othersActive=!1;for(var e=0;e<this.others.length;e++)this.session.removeMarker(this.others[e].markerId)},this.onUpdate=function(e){var t=e.data,n=t.range;if(n.start.row!==n.end.row)return;if(n.start.row!==this.pos.row)return;if(this.$updating)return;this.$updating=!0;var i=t.action==="insertText"?n.end.column-n.start.column:n.start.column-n.end.column;if(n.start.column>=this.pos.column&&n.start.column<=this.pos.column+this.length+1){var s=n.start.column-this.pos.column;this.length+=i;if(!this.session.$fromUndo){if(t.action==="insertText")for(var o=this.others.length-1;o>=0;o--){var u=this.others[o],a={row:u.row,column:u.column+s};u.row===n.start.row&&n.start.column<u.column&&(a.column+=i),this.doc.insert(a,t.text)}else if(t.action==="removeText")for(var o=this.others.length-1;o>=0;o--){var u=this.others[o],a={row:u.row,column:u.column+s};u.row===n.start.row&&n.start.column<u.column&&(a.column+=i),this.doc.remove(new r(a.row,a.column,a.row,a.column-i))}n.start.column===this.pos.column&&t.action==="insertText"?setTimeout(function(){this.pos.setPosition(this.pos.row,this.pos.column-i);for(var e=0;e<this.others.length;e++){var t=this.others[e],r={row:t.row,column:t.column-i};t.row===n.start.row&&n.start.column<t.column&&(r.column+=i),t.setPosition(r.row,r.column)}}.bind(this),0):n.start.column===this.pos.column&&t.action==="removeText"&&setTimeout(function(){for(var e=0;e<this.others.length;e++){var t=this.others[e];t.row===n.start.row&&n.start.column<t.column&&t.setPosition(t.row,t.column-i)}}.bind(this),0)}this.pos._emit("change",{value:this.pos});for(var o=0;o<this.others.length;o++)this.others[o]._emit("change",{value:this.others[o]})}this.$updating=!1},this.onCursorChange=function(e){if(this.$updating)return;var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))},this.detach=function(){this.session.removeMarker(this.markerId),this.hideOtherMarkers(),this.doc.removeEventListener("change",this.$onUpdate),this.session.selection.removeEventListener("changeCursor",this.$onCursorChange),this.pos.detach();for(var e=0;e<this.others.length;e++)this.others[e].detach();this.session.setUndoSelect(!0)},this.cancel=function(){if(this.$undoStackDepth===-1)throw Error("Canceling placeholders only supported with undo manager attached to session.");var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth;for(var n=0;n<t;n++)e.undo(!0)}}).call(o.prototype),t.PlaceHolder=o}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,t,n){var r=e("../../range").Range,i=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);return this.foldingStartMarker.test(r)?"start":t=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(r)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var i=/\S/,s=e.getLine(t),o=s.search(i);if(o==-1)return;var u=n||s.length,a=e.getLength(),f=t,l=t;while(++t<a){var c=e.getLine(t).search(i);if(c==-1)continue;if(c<=o)break;l=t}if(l>f){var h=e.getLine(l).length;return new r(f,u,l,h)}},this.openingBracketBlock=function(e,t,n,i,s){var o={row:n,column:i+1},u=e.$findClosingBracket(t,o,s);if(!u)return;var a=e.foldWidgets[u.row];return a==null&&(a=e.getFoldWidget(u.row)),a=="start"&&u.row>o.row&&(u.row--,u.column=e.getLine(u.row).length),r.fromPoints(o,u)},this.closingBracketBlock=function(e,t,n,i,s){var o={row:n,column:i},u=e.$findOpeningBracket(t,o);if(!u)return;return u.column++,o.column--,r.fromPoints(u,o)}}).call(i.prototype)}),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!1,t.cssClass="ace-tm",t.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;border-radius: 2px;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}';var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)});
-            (function() {
-                ace.require(["ace/ace"], function(a) {
-                    a && a.config.init();
-                    if (!window.ace)
-                        window.ace = {};
-                    for (var key in a) if (a.hasOwnProperty(key))
-                        ace[key] = a[key];
-                });
-            })();
-        
\ No newline at end of file
+(function(){function o(e){var i=function(e,t){return r("",e,t)},s=t;e&&(t[e]||(t[e]={}),s=t[e]);if(!s.define||!s.define.packaged)n.original=s.define,s.define=n,s.define.packaged=!0;if(!s.require||!s.require.packaged)r.original=s.require,s.require=i,s.require.packaged=!0}var e="ace",t=function(){return this}();if(!e&&typeof requirejs!="undefined")return;var n=function(e,t,r){if(typeof e!="string"){n.original?n.original.apply(window,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(r=t),n.modules||(n.modules={},n.payloads={}),n.payloads[e]=r,n.modules[e]=null},r=function(e,t,n){if(Object.prototype.toString.call(t)==="[object Array]"){var i=[];for(var o=0,u=t.length;o<u;++o){var a=s(e,t[o]);if(!a&&r.original)return r.original.apply(window,arguments);i.push(a)}n&&n.apply(null,i)}else{if(typeof t=="string"){var f=s(e,t);return!f&&r.original?r.original.apply(window,arguments):(n&&n(),f)}if(r.original)return r.original.apply(window,arguments)}},i=function(e,t){if(t.indexOf("!")!==-1){var n=t.split("!");return i(e,n[0])+"!"+i(e,n[1])}if(t.charAt(0)=="."){var r=e.split("/").slice(0,-1).join("/");t=r+"/"+t;while(t.indexOf(".")!==-1&&s!=t){var s=t;t=t.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return t},s=function(e,t){t=i(e,t);var s=n.modules[t];if(!s){s=n.payloads[t];if(typeof s=="function"){var o={},u={id:t,uri:"",exports:o,packaged:!0},a=function(e,n){return r(t,e,n)},f=s(a,o,u);o=f||u.exports,n.modules[t]=o,delete n.payloads[t]}s=n.modules[t]=o||s}return s};o(e)})(),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],function(e,t,n){e("./lib/fixoldbrowsers");var r=e("./lib/dom"),i=e("./lib/event"),s=e("./editor").Editor,o=e("./edit_session").EditSession,u=e("./undomanager").UndoManager,a=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.require=e,t.edit=function(e){if(typeof e=="string"){var n=e;e=document.getElementById(n);if(!e)throw new Error("ace.edit can't find div #"+n)}if(e.env&&e.env.editor instanceof s)return e.env.editor;var o=t.createEditSession(r.getInnerText(e));e.innerHTML="";var u=new s(new a(e));u.setSession(o);var f={document:o,editor:u,onResize:u.resize.bind(u,null)};return i.addListener(window,"resize",f.onResize),u.on("destroy",function(){i.removeListener(window,"resize",f.onResize)}),e.env=u.env=f,u},t.createEditSession=function(e,t){var n=new o(e,t);return n.setUndoManager(new u),n},t.EditSession=o,t.UndoManager=u}),ace.define("ace/mode/behaviour",["require","exports","module"],function(e,t,n){var r=function(){this.$behaviours={}};(function(){this.add=function(e,t,n){switch(undefined){case this.$behaviours:this.$behaviours={};case this.$behaviours[e]:this.$behaviours[e]={}}this.$behaviours[e][t]=n},this.addBehaviours=function(e){for(var t in e)for(var n in e[t])this.add(t,n,e[t][n])},this.remove=function(e){this.$behaviours&&this.$behaviours[e]&&delete this.$behaviours[e]},this.inherit=function(e,t){if(typeof e=="function")var n=(new e).getBehaviours(t);else var n=e.getBehaviours(t);this.addBehaviours(n)},this.getBehaviours=function(e){if(!e)return this.$behaviours;var t={};for(var n=0;n<e.length;n++)this.$behaviours[e[n]]&&(t[e[n]]=this.$behaviours[e[n]]);return t}}).call(r.prototype),t.Behaviour=r}),ace.define("ace/unicode",["require","exports","module"],function(e,t,n){function r(e){var n=/\w{4}/g;for(var r in e)t.packages[r]=e[r].replace(n,"\\u$&")}t.packages={},r({L:"0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",Ll:"0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A",Lu:"0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A",Lt:"01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC",Lm:"02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F",Lo:"01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",M:"0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26",Mn:"0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26",Mc:"0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC",Me:"0488048906DE20DD-20E020E2-20E4A670-A672",N:"0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nd:"0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nl:"16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF",No:"00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835",P:"0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65",Pd:"002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D",Ps:"0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62",Pe:"0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63",Pi:"00AB2018201B201C201F20392E022E042E092E0C2E1C2E20",Pf:"00BB2019201D203A2E032E052E0A2E0D2E1D2E21",Pc:"005F203F20402054FE33FE34FE4D-FE4FFF3F",Po:"0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65",S:"0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD",Sm:"002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC",Sc:"002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6",Sk:"005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3",So:"00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD",Z:"002000A01680180E2000-200A20282029202F205F3000",Zs:"002000A01680180E2000-200A202F205F3000",Zl:"2028",Zp:"2029",C:"0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF",Cc:"0000-001F007F-009F",Cf:"00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB",Co:"E000-F8FF",Cs:"D800-DFFF",Cn:"03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF"})}),ace.define("ace/token_iterator",["require","exports","module"],function(e,t,n){var r=function(e,t,n){this.$session=e,this.$row=t,this.$rowTokens=e.getTokens(t);var r=e.getTokenAt(t,n);this.$tokenIndex=r?r.index:-1};(function(){this.stepBackward=function(){this.$tokenIndex-=1;while(this.$tokenIndex<0){this.$row-=1;if(this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},this.stepForward=function(){this.$tokenIndex+=1;var e;while(this.$tokenIndex>=this.$rowTokens.length){this.$row+=1,e||(e=this.$session.getLength());if(this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(n!==undefined)return n;n=0;while(t>0)t-=1,n+=e[t].value.length;return n}}).call(r.prototype),t.TokenIterator=r}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(e,t,n){var r=e("../lib/lang"),i=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(e,t){if(!t){for(var n in e)this.$rules[n]=e[n];return}for(var n in e){var r=e[n];for(var i=0;i<r.length;i++){var s=r[i];s.next&&(typeof s.next!="string"?s.nextState&&s.nextState.indexOf(t)!==0&&(s.nextState=t+s.nextState):s.next.indexOf(t)!==0&&(s.next=t+s.next))}this.$rules[t+n]=r}},this.getRules=function(){return this.$rules},this.embedRules=function(e,t,n,i,s){var o=typeof e=="function"?(new e).getRules():e;if(i)for(var u=0;u<i.length;u++)i[u]=t+i[u];else{i=[];for(var a in o)i.push(t+a)}this.addRules(o,t);if(n){var f=Array.prototype[s?"push":"unshift"];for(var u=0;u<i.length;u++)f.apply(this.$rules[i[u]],r.deepCopy(n))}this.$embeds||(this.$embeds=[]),this.$embeds.push(t)},this.getEmbeds=function(){return this.$embeds};var e=function(e,t){return(e!="start"||t.length)&&t.unshift(this.nextState,e),this.nextState},t=function(e,t){return t.shift(),t.shift()||"start"};this.normalizeRules=function(){function i(s){var o=r[s];o.processed=!0;for(var u=0;u<o.length;u++){var a=o[u];!a.regex&&a.start&&(a.regex=a.start,a.next||(a.next=[]),a.next.push({defaultToken:a.token},{token:a.token+".end",regex:a.end||a.start,next:"pop"}),a.token=a.token+".start",a.push=!0);var f=a.next||a.push;if(f&&Array.isArray(f)){var l=a.stateName;l||(l=a.token,typeof l!="string"&&(l=l[0]||""),r[l]&&(l+=n++)),r[l]=f,a.next=l,i(l)}else f=="pop"&&(a.next=t);a.push&&(a.nextState=a.next||a.push,a.next=e,delete a.push);if(a.rules)for(var c in a.rules)r[c]?r[c].push&&r[c].push.apply(r[c],a.rules[c]):r[c]=a.rules[c];if(a.include||typeof a=="string")var h=a.include||a,p=r[h];else Array.isArray(a)&&(p=a);if(p){var d=[u,1].concat(p);a.noEscape&&(d=d.filter(function(e){return!e.next})),o.splice.apply(o,d),u--,p=null}a.keywordMap&&(a.token=this.createKeywordMapper(a.keywordMap,a.defaultToken||"text",a.caseInsensitive),delete a.defaultToken)}}var n=0,r=this.$rules;Object.keys(r).forEach(i,this)},this.createKeywordMapper=function(e,t,n,r){var i=Object.create(null);return Object.keys(e).forEach(function(t){var s=e[t];n&&(s=s.toLowerCase());var o=s.split(r||"|");for(var u=o.length;u--;)i[o[u]]=t}),Object.getPrototypeOf(i)&&(i.__proto__=null),this.$keywordList=Object.keys(i),e=null,n?function(e){return i[e.toLowerCase()]||t}:function(e){return i[e]||t}},this.getKeywords=function(){return this.$keywords}}).call(i.prototype),t.TextHighlightRules=i}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=t.Anchor=function(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),typeof n=="undefined"?this.setPosition(t.row,t.column):this.setPosition(t,n)};(function(){r.implement(this,i),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(e){var t=e.data,n=t.range;if(n.start.row==n.end.row&&n.start.row!=this.row)return;if(n.start.row>this.row)return;if(n.start.row==this.row&&n.start.column>this.column)return;var r=this.row,i=this.column,s=n.start,o=n.end;if(t.action==="insertText")if(s.row===r&&s.column<=i){if(s.column!==i||!this.$insertRight)s.row===o.row?i+=o.column-s.column:(i-=s.column,r+=o.row-s.row)}else s.row!==o.row&&s.row<r&&(r+=o.row-s.row);else t.action==="insertLines"?(s.row!==r||i!==0||!this.$insertRight)&&s.row<=r&&(r+=o.row-s.row):t.action==="removeText"?s.row===r&&s.column<i?o.column>=i?i=s.column:i=Math.max(0,i-(o.column-s.column)):s.row!==o.row&&s.row<r?(o.row===r&&(i=Math.max(0,i-o.column)+s.column),r-=o.row-s.row):o.row===r&&(r-=o.row-s.row,i=Math.max(0,i-o.column)+s.column):t.action=="removeLines"&&s.row<=r&&(o.row<=r?r-=o.row-s.row:(r=s.row,i=0));this.setPosition(r,i,!0)},this.setPosition=function(e,t,n){var r;n?r={row:e,column:t}:r=this.$clipPositionToDocument(e,t);if(this.row==r.row&&this.column==r.column)return;var i={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._signal("change",{old:i,value:r})},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(s.prototype)}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=function(e,t){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=e;var n=this;this.$worker=function(){if(!n.running)return;var e=new Date,t=n.currentLine,r=-1,i=n.doc;while(n.lines[t])t++;var s=t,o=i.getLength(),u=0;n.running=!1;while(t<o){n.$tokenizeRow(t),r=t;do t++;while(n.lines[t]);u++;if(u%5==0&&new Date-e>20){n.running=setTimeout(n.$worker,20),n.currentLine=t;return}}n.currentLine=t,s<=r&&n.fireUpdateEvent(s,r)}};(function(){r.implement(this,i),this.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(e,t){var n={first:e,last:t};this._signal("update",{data:n})},this.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(e){var t=e.range,n=t.start.row,r=t.end.row-n;if(r===0)this.lines[n]=null;else if(e.action=="removeText"||e.action=="removeLines")this.lines.splice(n,r+1,null),this.states.splice(n,r+1,null);else{var i=Array(r+1);i.unshift(n,1),this.lines.splice.apply(this.lines,i),this.states.splice.apply(this.states,i)}this.currentLine=Math.min(n,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},this.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},this.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1],r=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!=r.state+""?(this.states[e]=r.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=r.tokens}}).call(s.prototype),t.BackgroundTokenizer=s}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,n){var r=e("./lib/lang"),i=e("./lib/oop"),s=e("./range").Range,o=function(e,t,n){this.setRegexp(e),this.clazz=t,this.type=n||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){if(this.regExp+""==e+"")return;this.regExp=e,this.cache=[]},this.update=function(e,t,n,i){if(!this.regExp)return;var o=i.firstRow,u=i.lastRow;for(var a=o;a<=u;a++){var f=this.cache[a];f==null&&(f=r.getMatchOffsets(n.getLine(a),this.regExp),f.length>this.MAX_RANGES&&(f=f.slice(0,this.MAX_RANGES)),f=f.map(function(e){return new s(a,e.offset,a,e.offset+e.length)}),this.cache[a]=f.length?f:"");for(var l=f.length;l--;)t.drawSingleLineMarker(e,f[l].toScreenRange(n),this.clazz,i)}}}).call(o.prototype),t.SearchHighlight=o}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"],function(e,t,n){function u(){this.getFoldAt=function(e,t,n){var r=this.getFoldLine(e);if(!r)return null;var i=r.folds;for(var s=0;s<i.length;s++){var o=i[s];if(o.range.contains(e,t)){if(n==1&&o.range.isEnd(e,t))continue;if(n==-1&&o.range.isStart(e,t))continue;return o}}},this.getFoldsInRange=function(e){var t=e.start,n=e.end,r=this.$foldData,i=[];t.column+=1,n.column-=1;for(var s=0;s<r.length;s++){var o=r[s].range.compareRange(e);if(o==2)continue;if(o==-2)break;var u=r[s].folds;for(var a=0;a<u.length;a++){var f=u[a];o=f.range.compareRange(e);if(o==-2)break;if(o==2)continue;if(o==42)break;i.push(f)}}return t.column-=1,n.column+=1,i},this.getFoldsInRangeList=function(e){if(Array.isArray(e)){var t=[];e.forEach(function(e){t=t.concat(this.getFoldsInRange(e))},this)}else var t=this.getFoldsInRange(e);return t},this.getAllFolds=function(){var e=[],t=this.$foldData;for(var n=0;n<t.length;n++)for(var r=0;r<t[n].folds.length;r++)e.push(t[n].folds[r]);return e},this.getFoldStringAt=function(e,t,n,r){r=r||this.getFoldLine(e);if(!r)return null;var i={end:{column:0}},s,o;for(var u=0;u<r.folds.length;u++){o=r.folds[u];var a=o.range.compareEnd(e,t);if(a==-1){s=this.getLine(o.start.row).substring(i.end.column,o.start.column);break}if(a===0)return null;i=o}return s||(s=this.getLine(o.start.row).substring(i.end.column)),n==-1?s.substring(0,t-i.end.column):n==1?s.substring(t-i.end.column):s},this.getFoldLine=function(e,t){var n=this.$foldData,r=0;t&&(r=n.indexOf(t)),r==-1&&(r=0);for(r;r<n.length;r++){var i=n[r];if(i.start.row<=e&&i.end.row>=e)return i;if(i.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,r=0;t&&(r=n.indexOf(t)),r==-1&&(r=0);for(r;r<n.length;r++){var i=n[r];if(i.end.row>=e)return i}return null},this.getFoldedRowCount=function(e,t){var n=this.$foldData,r=t-e+1;for(var i=0;i<n.length;i++){var s=n[i],o=s.end.row,u=s.start.row;if(o>=t){u<t&&(u>=e?r-=t-u:r=0);break}o>=e&&(u>=e?r-=o-u:r-=o-e+1)}return r},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort(function(e,t){return e.start.row-t.start.row}),e},this.addFold=function(e,t){var n=this.$foldData,r=!1,o;e instanceof s?o=e:(o=new s(t,e),o.collapseChildren=t.collapseChildren),this.$clipRangeToDocument(o.range);var u=o.start.row,a=o.start.column,f=o.end.row,l=o.end.column;if(u<f||u==f&&a<=l-2){var c=this.getFoldAt(u,a,1),h=this.getFoldAt(f,l,-1);if(c&&h==c)return c.addSubFold(o);if(c&&!c.range.isStart(u,a)||h&&!h.range.isEnd(f,l))throw new Error("A fold can't intersect already existing fold"+o.range+c.range);var p=this.getFoldsInRange(o.range);p.length>0&&(this.removeFolds(p),p.forEach(function(e){o.addSubFold(e)}));for(var d=0;d<n.length;d++){var v=n[d];if(f==v.start.row){v.addFold(o),r=!0;break}if(u==v.end.row){v.addFold(o),r=!0;if(!o.sameRow){var m=n[d+1];if(m&&m.start.row==f){v.merge(m);break}}break}if(f<=v.start.row)break}return r||(v=this.$addFoldLine(new i(this.$foldData,o))),this.$useWrapMode?this.$updateWrapData(v.start.row,v.start.row):this.$updateRowLengthCache(v.start.row,v.start.row),this.$modified=!0,this._emit("changeFold",{data:o,action:"add"}),o}throw new Error("The range has to be at least 2 characters width")},this.addFolds=function(e){e.forEach(function(e){this.addFold(e)},this)},this.removeFold=function(e){var t=e.foldLine,n=t.start.row,r=t.end.row,i=this.$foldData,s=t.folds;if(s.length==1)i.splice(i.indexOf(t),1);else if(t.range.isEnd(e.end.row,e.end.column))s.pop(),t.end.row=s[s.length-1].end.row,t.end.column=s[s.length-1].end.column;else if(t.range.isStart(e.start.row,e.start.column))s.shift(),t.start.row=s[0].start.row,t.start.column=s[0].start.column;else if(e.sameRow)s.splice(s.indexOf(e),1);else{var o=t.split(e.start.row,e.start.column);s=o.folds,s.shift(),o.start.row=s[0].start.row,o.start.column=s[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(n,r):this.$updateRowLengthCache(n,r)),this.$modified=!0,this._emit("changeFold",{data:e,action:"remove"})},this.removeFolds=function(e){var t=[];for(var n=0;n<e.length;n++)t.push(e[n]);t.forEach(function(e){this.removeFold(e)},this),this.$modified=!0},this.expandFold=function(e){this.removeFold(e),e.subFolds.forEach(function(t){e.restoreRange(t),this.addFold(t)},this),e.collapseChildren>0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach(function(e){this.expandFold(e)},this)},this.unfold=function(e,t){var n,i;e==null?(n=new r(0,0,this.getLength(),0),t=!0):typeof e=="number"?n=new r(e,0,e,this.getLine(e).length):"row"in e?n=r.fromPoints(e,e):n=e,i=this.getFoldsInRangeList(n);if(t)this.removeFolds(i);else{var s=i;while(s.length)this.expandFolds(s),s=this.getFoldsInRangeList(n)}if(i.length)return i},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var n=this.getFoldLine(e,t);return n?n.end.row:e},this.getRowFoldStart=function(e,t){var n=this.getFoldLine(e,t);return n?n.start.row:e},this.getFoldDisplayLine=function(e,t,n,r,i){r==null&&(r=e.start.row,i=0),t==null&&(t=e.end.row,n=this.getLine(t).length);var s=this.doc,o="";return e.walk(function(e,t,n,u){if(t<r)return;if(t==r){if(n<i)return;u=Math.max(i,u)}e!=null?o+=e:o+=s.getLine(t).substring(u,n)},t,n),o},this.getDisplayLine=function(e,t,n,r){var i=this.getFoldLine(e);if(!i){var s;return s=this.doc.getLine(e),s.substring(r||0,t||s.length)}return this.getFoldDisplayLine(i,e,t,n,r)},this.$cloneFoldData=function(){var e=[];return e=this.$foldData.map(function(t){var n=t.folds.map(function(e){return e.clone()});return new i(e,n)}),e},this.toggleFold=function(e){var t=this.selection,n=t.getRange(),r,i;if(n.isEmpty()){var s=n.start;r=this.getFoldAt(s.row,s.column);if(r){this.expandFold(r);return}(i=this.findMatchingBracket(s))?n.comparePoint(i)==1?n.end=i:(n.start=i,n.start.column++,n.end.column--):(i=this.findMatchingBracket({row:s.row,column:s.column+1}))?(n.comparePoint(i)==1?n.end=i:n.start=i,n.start.column++):n=this.getCommentFoldRange(s.row,s.column)||n}else{var o=this.getFoldsInRange(n);if(e&&o.length){this.expandFolds(o);return}o.length==1&&(r=o[0])}r||(r=this.getFoldAt(n.start.row,n.start.column));if(r&&r.range.toString()==n.toString()){this.expandFold(r);return}var u="...";if(!n.isMultiLine()){u=this.getTextRange(n);if(u.length<4)return;u=u.trim().substring(0,2)+".."}this.addFold(u,n)},this.getCommentFoldRange=function(e,t,n){var i=new o(this,e,t),s=i.getCurrentToken();if(s&&/^comment|string/.test(s.type)){var u=new r,a=new RegExp(s.type.replace(/\..*/,"\\."));if(n!=1){do s=i.stepBackward();while(s&&a.test(s.type));i.stepForward()}u.start.row=i.getCurrentTokenRow(),u.start.column=i.getCurrentTokenColumn()+2,i=new o(this,e,t);if(n!=-1){do s=i.stepForward();while(s&&a.test(s.type));s=i.stepBackward()}else s=i.getCurrentToken();return u.end.row=i.getCurrentTokenRow(),u.end.column=i.getCurrentTokenColumn()+s.value.length-2,u}},this.foldAll=function(e,t,n){n==undefined&&(n=1e5);var r=this.foldWidgets;if(!r)return;t=t||this.getLength(),e=e||0;for(var i=e;i<t;i++){r[i]==null&&(r[i]=this.getFoldWidget(i));if(r[i]!="start")continue;var s=this.getFoldWidgetRange(i);if(s&&s.isMultiLine()&&s.end.row<=t&&s.start.row>=e){i=s.end.row;try{var o=this.addFold("...",s);o&&(o.collapseChildren=n)}catch(u){}}}},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw new Error("invalid fold style: "+e+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle==e)return;this.$foldStyle=e,e=="manual"&&this.unfold();var t=this.$foldMode;this.$setFolding(null),this.$setFolding(t)},this.$setFolding=function(e){if(this.$foldMode==e)return;this.$foldMode=e,this.removeListener("change",this.$updateFoldWidgets),this._emit("changeAnnotation");if(!e||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets)},this.getParentFoldRangeData=function(e,t){var n=this.foldWidgets;if(!n||t&&n[e])return{};var r=e-1,i;while(r>=0){var s=n[r];s==null&&(s=n[r]=this.getFoldWidget(r));if(s=="start"){var o=this.getFoldWidgetRange(r);i||(i=o);if(o&&o.end.row>=e)break}r--}return{range:r!==-1&&o,firstRange:i}},this.onFoldWidgetClick=function(e,t){t=t.domEvent;var n={children:t.shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey},r=this.$toggleFoldWidget(e,n);if(!r){var i=t.target||t.srcElement;i&&/ace_fold-widget/.test(i.className)&&(i.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(!this.getFoldWidget)return;var n=this.getFoldWidget(e),r=this.getLine(e),i=n==="end"?-1:1,s=this.getFoldAt(e,i===-1?0:r.length,i);if(s){t.children||t.all?this.removeFold(s):this.expandFold(s);return}var o=this.getFoldWidgetRange(e,!0);if(o&&!o.isMultiLine()){s=this.getFoldAt(o.start.row,o.start.column,1);if(s&&o.isEqual(s.range)){this.removeFold(s);return}}if(t.siblings){var u=this.getParentFoldRangeData(e);if(u.range)var a=u.range.start.row+1,f=u.range.end.row;this.foldAll(a,f,t.all?1e4:0)}else t.children?(f=o?o.end.row:this.getLength(),this.foldAll(e+1,o.end.row,t.all?1e4:0)):o&&(t.all&&(o.collapseChildren=1e4),this.addFold("...",o));return o},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var n=this.$toggleFoldWidget(t,{});if(n)return;var r=this.getParentFoldRangeData(t,!0);n=r.range||r.firstRange;if(n){t=n.start.row;var i=this.getFoldAt(t,this.getLine(t).length,1);i?this.removeFold(i):this.addFold("...",n)}},this.updateFoldWidgets=function(e){var t=e.data,n=t.range,r=n.start.row,i=n.end.row-r;if(i===0)this.foldWidgets[r]=null;else if(t.action=="removeText"||t.action=="removeLines")this.foldWidgets.splice(r,i+1,null);else{var s=Array(i+1);s.unshift(r,1),this.foldWidgets.splice.apply(this.foldWidgets,s)}}}var r=e("../range").Range,i=e("./fold_line").FoldLine,s=e("./fold").Fold,o=e("../token_iterator").TokenIterator;t.Folding=u}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,t,n){function i(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new r(t[0].start.row,t[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(e){e.setFoldLine(this)},this)}var r=e("../range").Range;(function(){this.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach(function(t){t.start.row+=e,t.end.row+=e})},this.addFold=function(e){if(e.sameRow){if(e.start.row<this.startRow||e.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort(function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)}),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},this.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},this.walk=function(e,t,n){var r=0,i=this.folds,s,o,u,a=!0;t==null&&(t=this.end.row,n=this.end.column);for(var f=0;f<i.length;f++){s=i[f],o=s.range.compareStart(t,n);if(o==-1){e(null,t,n,r,a);return}u=e(null,s.start.row,s.start.column,r,a),u=!u&&e(s.placeholder,s.start.row,s.start.column,r);if(u||o==0)return;a=!s.sameRow,r=s.end.column}e(null,t,n,r,a)},this.getNextFoldTo=function(e,t){var n,r;for(var i=0;i<this.folds.length;i++){n=this.folds[i],r=n.range.compareEnd(e,t);if(r==-1)return{fold:n,kind:"after"};if(r==0)return{fold:n,kind:"inside"}}return null},this.addRemoveChars=function(e,t,n){var r=this.getNextFoldTo(e,t),i,s;if(r){i=r.fold;if(r.kind=="inside"&&i.start.column!=t&&i.start.row!=e)window.console&&window.console.log(e,t,i);else if(i.start.row==e){s=this.folds;var o=s.indexOf(i);o==0&&(this.start.column+=n);for(o;o<s.length;o++){i=s[o],i.start.column+=n;if(!i.sameRow)return;i.end.column+=n}this.end.column+=n}}},this.split=function(e,t){var n=this.getNextFoldTo(e,t).fold,r=this.folds,s=this.foldData;if(!n)return null;var o=r.indexOf(n),u=r[o-1];this.end.row=u.end.row,this.end.column=u.end.column,r=r.splice(o,r.length-o);var a=new i(s,r);return s.splice(s.indexOf(this)+1,0,a),a},this.merge=function(e){var t=e.folds;for(var n=0;n<t.length;n++)this.addFold(t[n]);var r=this.foldData;r.splice(r.indexOf(e),1)},this.toString=function(){var e=[this.range.toString()+": ["];return this.folds.forEach(function(t){e.push("  "+t.toString())}),e.push("]"),e.join("\n")},this.idxToPosition=function(e){var t=0,n;for(var r=0;r<this.folds.length;r++){var n=this.folds[r];e-=n.start.column-t;if(e<0)return{row:n.start.row,column:n.start.column+e};e-=n.placeholder.length;if(e<0)return n.start;t=n.end.column}return{row:this.end.row,column:this.end.column+e}}}).call(i.prototype),t.FoldLine=i}),ace.define("ace/tokenizer",["require","exports","module"],function(e,t,n){var r=1e3,i=function(e){this.states=e,this.regExps={},this.matchMappings={};for(var t in this.states){var n=this.states[t],r=[],i=0,s=this.matchMappings[t]={defaultToken:"text"},o="g",u=[];for(var a=0;a<n.length;a++){var f=n[a];f.defaultToken&&(s.defaultToken=f.defaultToken),f.caseInsensitive&&(o="gi");if(f.regex==null)continue;f.regex instanceof RegExp&&(f.regex=f.regex.toString().slice(1,-1));var l=f.regex,c=(new RegExp("(?:("+l+")|(.))")).exec("a").length-2;if(Array.isArray(f.token))if(f.token.length==1||c==1)f.token=f.token[0];else{if(c-1!=f.token.length)throw new Error("number of classes and regexp groups in '"+f.token+"'\n'"+f.regex+"' doesn't match\n"+(c-1)+"!="+f.token.length);f.tokenArray=f.token,f.token=null,f.onMatch=this.$arrayTokens}else typeof f.token=="function"&&!f.onMatch&&(c>1?f.onMatch=this.$applyToken:f.onMatch=f.token);c>1&&(/\\\d/.test(f.regex)?l=f.regex.replace(/\\([0-9]+)/g,function(e,t){return"\\"+(parseInt(t,10)+i+1)}):(c=1,l=this.removeCapturingGroups(f.regex)),!f.splitRegex&&typeof f.token!="string"&&u.push(f)),s[i]=a,i+=c,r.push(l),f.onMatch||(f.onMatch=null)}u.forEach(function(e){e.splitRegex=this.createSplitterRegexp(e.regex,o)},this),this.regExps[t]=new RegExp("("+r.join(")|(")+")|($)",o)}};(function(){this.$setMaxTokenCount=function(e){r=e|0},this.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),n=this.token.apply(this,t);if(typeof n=="string")return[{type:n,value:e}];var r=[];for(var i=0,s=n.length;i<s;i++)t[i]&&(r[r.length]={type:n[i],value:t[i]});return r},this.$arrayTokens=function(e){if(!e)return[];var t=this.splitRegex.exec(e);if(!t)return"text";var n=[],r=this.tokenArray;for(var i=0,s=r.length;i<s;i++)t[i+1]&&(n[n.length]={type:r[i],value:t[i+1]});return n},this.removeCapturingGroups=function(e){var t=e.replace(/\[(?:\\.|[^\]])*?\]|\\.|\(\?[:=!]|(\()/g,function(e,t){return t?"(?:":e});return t},this.createSplitterRegexp=function(e,t){if(e.indexOf("(?=")!=-1){var n=0,r=!1,i={};e.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(e,t,s,o,u,a){return r?r=u!="]":u?r=!0:o?(n==i.stack&&(i.end=a+1,i.stack=-1),n--):s&&(n++,s.length!=1&&(i.stack=n,i.start=a)),e}),i.end!=null&&/^\)*$/.test(e.substr(i.end))&&(e=e.substring(0,i.start)+e.substr(i.end))}return new RegExp(e,(t||"").replace("g",""))},this.getLineTokens=function(e,t){if(t&&typeof t!="string"){var n=t.slice(0);t=n[0]}else var n=[];var i=t||"start",s=this.states[i];s||(i="start",s=this.states[i]);var o=this.matchMappings[i],u=this.regExps[i];u.lastIndex=0;var a,f=[],l=0,c={type:null,value:""};while(a=u.exec(e)){var h=o.defaultToken,p=null,d=a[0],v=u.lastIndex;if(v-d.length>l){var m=e.substring(l,v-d.length);c.type==h?c.value+=m:(c.type&&f.push(c),c={type:h,value:m})}for(var g=0;g<a.length-2;g++){if(a[g+1]===undefined)continue;p=s[o[g]],p.onMatch?h=p.onMatch(d,i,n):h=p.token,p.next&&(typeof p.next=="string"?i=p.next:i=p.next(i,n),s=this.states[i],s||(window.console&&console.error&&console.error(i,"doesn't exist"),i="start",s=this.states[i]),o=this.matchMappings[i],l=v,u=this.regExps[i],u.lastIndex=v);break}if(d)if(typeof h=="string")!!p&&p.merge===!1||c.type!==h?(c.type&&f.push(c),c={type:h,value:d}):c.value+=d;else if(h){c.type&&f.push(c),c={type:null,value:""};for(var g=0;g<h.length;g++)f.push(h[g])}if(l==e.length)break;l=v;if(f.length>r){while(l<e.length)c.type&&f.push(c),c={value:e.substring(l,l+=2e3),type:"overflow"};i="start",n=[];break}}return c.type&&f.push(c),n.length>1&&n[0]!==i&&n.unshift(i),{tokens:f,state:n.length?n:i}}}).call(i.prototype),t.Tokenizer=i}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range","ace/range_list","ace/lib/oop"],function(e,t,n){function u(e,t){e.row-=t.row,e.row==0&&(e.column-=t.column)}function a(e,t){u(e.start,t),u(e.end,t)}function f(e,t){e.row==0&&(e.column+=t.column),e.row+=t.row}function l(e,t){f(e.start,t),f(e.end,t)}var r=e("../range").Range,i=e("../range_list").RangeList,s=e("../lib/oop"),o=t.Fold=function(e,t){this.foldLine=null,this.placeholder=t,this.range=e,this.start=e.start,this.end=e.end,this.sameRow=e.start.row==e.end.row,this.subFolds=this.ranges=[]};s.inherits(o,i),function(){this.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},this.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach(function(t){t.setFoldLine(e)})},this.clone=function(){var e=this.range.clone(),t=new o(e,this.placeholder);return this.subFolds.forEach(function(e){t.subFolds.push(e.clone())}),t.collapseChildren=this.collapseChildren,t},this.addSubFold=function(e){if(this.range.isEqual(e))return;if(!this.range.containsRange(e))throw new Error("A fold can't intersect already existing fold"+e.range+this.range);a(e,this.start);var t=e.start.row,n=e.start.column;for(var r=0,i=-1;r<this.subFolds.length;r++){i=this.subFolds[r].range.compare(t,n);if(i!=1)break}var s=this.subFolds[r];if(i==0)return s.addSubFold(e);var t=e.range.end.row,n=e.range.end.column;for(var o=r,i=-1;o<this.subFolds.length;o++){i=this.subFolds[o].range.compare(t,n);if(i!=1)break}var u=this.subFolds[o];if(i==0)throw new Error("A fold can't intersect already existing fold"+e.range+this.range);var f=this.subFolds.splice(r,o-r,e);return e.setFoldLine(this.foldLine),e},this.restoreRange=function(e){return l(e,this.start)}}.call(o.prototype)}),ace.define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(e,t,n){var r=e("../tokenizer").Tokenizer,i=e("./text_highlight_rules").TextHighlightRules,s=e("./behaviour").Behaviour,o=e("../unicode"),u=e("../lib/lang"),a=e("../token_iterator").TokenIterator,f=e("../range").Range,l=function(){this.HighlightRules=i,this.$behaviour=new s};(function(){this.tokenRe=new RegExp("^["+o.packages.L+o.packages.Mn+o.packages.Mc+o.packages.Nd+o.packages.Pc+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+o.packages.L+o.packages.Mn+o.packages.Mc+o.packages.Nd+o.packages.Pc+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=new this.HighlightRules,this.$tokenizer=new r(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,t,n,r){function w(e){for(var t=n;t<=r;t++)e(i.getLine(t),t)}var i=t.doc,s=!0,o=!0,a=Infinity,f=t.getTabSize(),l=!1;if(!this.lineCommentStart){if(!this.blockComment)return!1;var c=this.blockComment.start,h=this.blockComment.end,p=new RegExp("^(\\s*)(?:"+u.escapeRegExp(c)+")"),d=new RegExp("(?:"+u.escapeRegExp(h)+")\\s*$"),v=function(e,t){if(g(e,t))return;if(!s||/\S/.test(e))i.insertInLine({row:t,column:e.length},h),i.insertInLine({row:t,column:a},c)},m=function(e,t){var n;(n=e.match(d))&&i.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(p))&&i.removeInLine(t,n[1].length,n[0].length)},g=function(e,n){if(p.test(e))return!0;var r=t.getTokens(n);for(var i=0;i<r.length;i++)if(r[i].type==="comment")return!0}}else{if(Array.isArray(this.lineCommentStart))var p=this.lineCommentStart.map(u.escapeRegExp).join("|"),c=this.lineCommentStart[0];else var p=u.escapeRegExp(this.lineCommentStart),c=this.lineCommentStart;p=new RegExp("^(\\s*)(?:"+p+") ?"),l=t.getUseSoftTabs();var m=function(e,t){var n=e.match(p);if(!n)return;var r=n[1].length,s=n[0].length;!b(e,r,s)&&n[0][s-1]==" "&&s--,i.removeInLine(t,r,s)},y=c+" ",v=function(e,t){if(!s||/\S/.test(e))b(e,a,a)?i.insertInLine({row:t,column:a},y):i.insertInLine({row:t,column:a},c)},g=function(e,t){return p.test(e)},b=function(e,t,n){var r=0;while(t--&&e.charAt(t)==" ")r++;if(r%f!=0)return!1;var r=0;while(e.charAt(n++)==" ")r++;return f>2?r%f!=f-1:r%f==0}}var E=Infinity;w(function(e,t){var n=e.search(/\S/);n!==-1?(n<a&&(a=n),o&&!g(e,t)&&(o=!1)):E>e.length&&(E=e.length)}),a==Infinity&&(a=E,s=!1,o=!1),l&&a%f!=0&&(a=Math.floor(a/f)*f),w(o?m:v)},this.toggleBlockComment=function(e,t,n,r){var i=this.blockComment;if(!i)return;!i.start&&i[0]&&(i=i[0]);var s=new a(t,r.row,r.column),o=s.getCurrentToken(),u=t.selection,l=t.selection.toOrientedRange(),c,h;if(o&&/comment/.test(o.type)){var p,d;while(o&&/comment/.test(o.type)){var v=o.value.indexOf(i.start);if(v!=-1){var m=s.getCurrentTokenRow(),g=s.getCurrentTokenColumn()+v;p=new f(m,g,m,g+i.start.length);break}o=s.stepBackward()}var s=new a(t,r.row,r.column),o=s.getCurrentToken();while(o&&/comment/.test(o.type)){var v=o.value.indexOf(i.end);if(v!=-1){var m=s.getCurrentTokenRow(),g=s.getCurrentTokenColumn()+v;d=new f(m,g,m,g+i.end.length);break}o=s.stepForward()}d&&t.remove(d),p&&(t.remove(p),c=p.start.row,h=-i.start.length)}else h=i.start.length,c=n.start.row,t.insert(n.end,i.end),t.insert(n.start,i.start);l.start.row==c&&(l.start.column+=h),l.end.row==c&&(l.end.column+=h),t.selection.fromOrientedRange(l)},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.autoOutdent=function(e,t,n){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){this.$embeds=[],this.$modes={};for(var t in e)e[t]&&(this.$embeds.push(t),this.$modes[t]=new e[t]);var n=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"];for(var t=0;t<n.length;t++)(function(e){var r=n[t],i=e[r];e[n[t]]=function(){return this.$delegator(r,arguments,i)}})(this)},this.$delegator=function(e,t,n){var r=t[0];typeof r!="string"&&(r=r[0]);for(var i=0;i<this.$embeds.length;i++){if(!this.$modes[this.$embeds[i]])continue;var s=r.split(this.$embeds[i]);if(!s[0]&&s[1]){t[0]=s[1];var o=this.$modes[this.$embeds[i]];return o[e].apply(o,t)}}var u=n.apply(this,t);return n?u:undefined},this.transformAction=function(e,t,n,r,i){if(this.$behaviour){var s=this.$behaviour.getBehaviours();for(var o in s)if(s[o][t]){var u=s[o][t].apply(this,arguments);if(u)return u}}},this.getKeywords=function(e){if(!this.completionKeywords){var t=this.$tokenizer.rules,n=[];for(var r in t){var i=t[r];for(var s=0,o=i.length;s<o;s++)if(typeof i[s].token=="string")/keyword|support|storage/.test(i[s].token)&&n.push(i[s].regex);else if(typeof i[s].token=="object")for(var u=0,a=i[s].token.length;u<a;u++)if(/keyword|support|storage/.test(i[s].token[u])){var r=i[s].regex.match(/\(.+?\)/g)[u];n.push(r.substr(1,r.length-2))}}this.completionKeywords=n}return e?n.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,t,n,r){var i=this.$keywordList||this.$createKeywordList();return i.map(function(e){return{name:e,value:e,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(l.prototype),t.Mode=l}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(e,t,n){var r=e("./range").Range,i=r.comparePoints,s=function(){this.ranges=[]};(function(){this.comparePoints=i,this.pointIndex=function(e,t,n){var r=this.ranges;for(var s=n||0;s<r.length;s++){var o=r[s],u=i(e,o.end);if(u>0)continue;var a=i(e,o.start);return u===0?t&&a!==0?-s-2:s:a>0||a===0&&!t?s:-s-1}return-s-1},this.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var r=this.pointIndex(e.end,t,n);return r<0?r=-r-1:r++,this.ranges.splice(n,r-n,e)},this.addList=function(e){var t=[];for(var n=e.length;n--;)t.push.call(t,this.add(e[n]));return t},this.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},this.merge=function(){var e=[],t=this.ranges;t=t.sort(function(e,t){return i(e.start,t.start)});var n=t[0],r;for(var s=1;s<t.length;s++){r=n,n=t[s];var o=i(r.end,n.start);if(o<0)continue;if(o==0&&!r.isEmpty()&&!n.isEmpty())continue;i(r.end,n.end)<0&&(r.end.row=n.end.row,r.end.column=n.end.column),t.splice(s,1),e.push(n),n=r,s--}return this.ranges=t,e},this.contains=function(e,t){return this.pointIndex({row:e,column:t})>=0},this.containsPoint=function(e){return this.pointIndex(e)>=0},this.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},this.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.row<e)return[];var r=this.pointIndex({row:e,column:0});r<0&&(r=-r-1);var i=this.pointIndex({row:t,column:0},r);i<0&&(i=-i-1);var s=[];for(var o=r;o<i;o++)s.push(n[o]);return s},this.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},this.attach=function(e){this.session&&this.detach(),this.session=e,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},this.detach=function(){if(!this.session)return;this.session.removeListener("change",this.onChange),this.session=null},this.$onChange=function(e){var t=e.data.range;if(e.data.action[0]=="i")var n=t.start,r=t.end;else var r=t.start,n=t.end;var i=n.row,s=r.row,o=s-i,u=-n.column+r.column,a=this.ranges;for(var f=0,l=a.length;f<l;f++){var c=a[f];if(c.end.row<i)continue;if(c.start.row>i)break;c.start.row==i&&c.start.column>=n.column&&(c.start.column!=n.column||!this.$insertRight)&&(c.start.column+=u,c.start.row+=o);if(c.end.row==i&&c.end.column>=n.column){if(c.end.column==n.column&&this.$insertRight)continue;c.end.column==n.column&&u>0&&f<l-1&&c.end.column>c.start.column&&c.end.column==a[f+1].start.column&&(c.end.column-=u),c.end.column+=u,c.end.row+=o}}if(o!=0&&f<l)for(;f<l;f++){var c=a[f];c.start.row+=o,c.end.row+=o}}}).call(s.prototype),t.RangeList=s}),ace.define("ace/range",["require","exports","module"],function(e,t,n){var r=function(e,t){return e.row-t.row||e.column-t.column},i=function(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return this.compare(e,t)==0},this.compareRange=function(e){var t,n=e.end,r=e.start;return t=this.compare(n.row,n.column),t==1?(t=this.compare(r.row,r.column),t==1?2:t==0?1:0):t==-1?-2:(t=this.compare(r.row,r.column),t==-1?-1:t==1?42:0)},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return this.comparePoint(e.start)==0&&this.comparePoint(e.end)==0},this.intersects=function(e){var t=this.compareRange(e);return t==-1||t==0||t==1},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){typeof e=="object"?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){typeof e=="object"?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)||this.isStart(e,t)?!1:!0:!1},this.insideStart=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)?!1:!0:!1},this.insideEnd=function(e,t){return this.compare(e,t)==0?this.isStart(e,t)?!1:!0:!1},this.compare=function(e,t){return!this.isMultiLine()&&e===this.start.row?t<this.start.column?-1:t>this.end.column?1:0:e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else if(this.end.row<e)var n={row:e,column:0};if(this.start.row>t)var r={row:t+1,column:0};else if(this.start.row<e)var r={row:e,column:0};return i.fromPoints(r||this.start,n||this.end)},this.extend=function(e,t){var n=this.compare(e,t);if(n==0)return this;if(n==-1)var r={row:e,column:t};else var s={row:e,column:t};return i.fromPoints(r||this.start,s||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return i.fromPoints(this.start,this.end)},this.collapseRows=function(){return this.end.column==0?new i(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new i(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),n=e.documentToScreenPosition(this.end);return new i(t.row,t.column,n.row,n.column)},this.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t}}).call(i.prototype),i.fromPoints=function(e,t){return new i(e.row,e.column,t.row,t.column)},i.comparePoints=r,i.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=i}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,t,n){function s(){this.findMatchingBracket=function(e,t){if(e.column==0)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(n=="")return null;var r=n.match(/([\(\[\{])|([\)\]\}])/);return r?r[1]?this.$findClosingBracket(r[1],e):this.$findOpeningBracket(r[2],e):null},this.getBracketRange=function(e){var t=this.getLine(e.row),n=!0,r,s=t.charAt(e.column-1),o=s&&s.match(/([\(\[\{])|([\)\]\}])/);o||(s=t.charAt(e.column),e={row:e.row,column:e.column+1},o=s&&s.match(/([\(\[\{])|([\)\]\}])/),n=!1);if(!o)return null;if(o[1]){var u=this.$findClosingBracket(o[1],e);if(!u)return null;r=i.fromPoints(e,u),n||(r.end.column++,r.start.column--),r.cursor=r.end}else{var u=this.$findOpeningBracket(o[2],e);if(!u)return null;r=i.fromPoints(u,e),n||(r.start.column++,r.end.column--),r.cursor=r.start}return r},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{"},this.$findOpeningBracket=function(e,t,n){var i=this.$brackets[e],s=1,o=new r(this,t.row,t.column),u=o.getCurrentToken();u||(u=o.stepForward());if(!u)return;n||(n=new RegExp("(\\.?"+u.type.replace(".","\\.").replace("rparen",".paren")+")+"));var a=t.column-o.getCurrentTokenColumn()-2,f=u.value;for(;;){while(a>=0){var l=f.charAt(a);if(l==i){s-=1;if(s==0)return{row:o.getCurrentTokenRow(),column:a+o.getCurrentTokenColumn()}}else l==e&&(s+=1);a-=1}do u=o.stepBackward();while(u&&!n.test(u.type));if(u==null)break;f=u.value,a=f.length-1}return null},this.$findClosingBracket=function(e,t,n){var i=this.$brackets[e],s=1,o=new r(this,t.row,t.column),u=o.getCurrentToken();u||(u=o.stepForward());if(!u)return;n||(n=new RegExp("(\\.?"+u.type.replace(".","\\.").replace("lparen",".paren")+")+"));var a=t.column-o.getCurrentTokenColumn();for(;;){var f=u.value,l=f.length;while(a<l){var c=f.charAt(a);if(c==i){s-=1;if(s==0)return{row:o.getCurrentTokenRow(),column:a+o.getCurrentTokenColumn()}}else c==e&&(s+=1);a+=1}do u=o.stepForward();while(u&&!n.test(u.type));if(u==null)break;a=0}return null}}var r=e("../token_iterator").TokenIterator,i=e("../range").Range;t.BracketMatch=s}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/lang"),s=e("./lib/event_emitter").EventEmitter,o=e("./range").Range,u=function(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.lead=this.selectionLead=this.doc.createAnchor(0,0),this.anchor=this.selectionAnchor=this.doc.createAnchor(0,0);var t=this;this.lead.on("change",function(e){t._emit("changeCursor"),t.$isEmpty||t._emit("changeSelection"),!t.$keepDesiredColumnOnChange&&e.old.column!=e.value.column&&(t.$desiredColumn=null)}),this.selectionAnchor.on("change",function(){t.$isEmpty||t._emit("changeSelection")})};(function(){r.implement(this,s),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return this.isEmpty()?!1:this.getRange().isMultiLine()},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(e,t){this.anchor.setPosition(e,t),this.$isEmpty&&(this.$isEmpty=!1,this._emit("changeSelection"))},this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.shiftSelection=function(e){if(this.$isEmpty){this.moveCursorTo(this.lead.row,this.lead.column+e);return}var t=this.getSelectionAnchor(),n=this.getSelectionLead(),r=this.isBackwards();(!r||t.column!==0)&&this.setSelectionAnchor(t.row,t.column+e),(r||n.column!==0)&&this.$moveSelection(function(){this.moveCursorTo(n.row,n.column+e)})},this.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.isEmpty()?o.fromPoints(t,t):this.isBackwards()?o.fromPoints(t,e):o.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){var e=this.doc.getLength()-1;this.setSelectionAnchor(0,0),this.moveCursorTo(e,this.doc.getLine(e).length)},this.setRange=this.setSelectionRange=function(e,t){t?(this.setSelectionAnchor(e.end.row,e.end.column),this.selectTo(e.start.row,e.start.column)):(this.setSelectionAnchor(e.start.row,e.start.column),this.selectTo(e.end.row,e.end.column)),this.getRange().isEmpty()&&(this.$isEmpty=!0),this.$desiredColumn=null},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection(function(){this.moveCursorTo(e,t)})},this.selectToPosition=function(e){this.$moveSelection(function(){this.moveCursorToPosition(e)})},this.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,t){if(typeof t=="undefined"){var n=e||this.lead;e=n.row,t=n.column}return this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},this.getLineRange=function(e,t){var n=typeof e=="number"?e:this.lead.row,r,i=this.session.getFoldLine(n);return i?(n=i.start.row,r=i.end.row):r=n,t===!0?new o(n,0,r,this.session.getLine(r).length):new o(n,0,r+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.moveCursorLeft=function(){var e=this.lead.getPosition(),t;if(t=this.session.getFoldAt(e.row,e.column,-1))this.moveCursorTo(t.start.row,t.start.column);else if(e.column==0)e.row>0&&this.moveCursorTo(e.row-1,this.doc.getLine(e.row-1).length);else{var n=this.session.getTabSize();this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(e.column-n,e.column).split(" ").length-1==n?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var e=this.lead.getPosition(),t;if(t=this.session.getFoldAt(e.row,e.column,1))this.moveCursorTo(t.end.row,t.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var n=this.session.getTabSize(),e=this.lead;this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(e.column,e.column+n).split(" ").length-1==n?this.moveCursorBy(0,n):this.moveCursorBy(0,1)}},this.moveCursorLineStart=function(){var e=this.lead.row,t=this.lead.column,n=this.session.documentToScreenRow(e,t),r=this.session.screenToDocumentPosition(n,0),i=this.session.getDisplayLine(e,null,r.row,r.column),s=i.match(/^\s*/);s[0].length!=t&&!this.session.$useEmacsStyleLineStart&&(r.column+=s[0].length),this.moveCursorToPosition(r)},this.moveCursorLineEnd=function(){var e=this.lead,t=this.session.getDocumentLastRowColumnPosition(e.row,e.column);if(this.lead.column==t.column){var n=this.session.getLine(t.row);if(t.column==n.length){var r=n.search(/\s+$/);r>0&&(t.column=r)}}this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t),i;this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var s=this.session.getFoldAt(e,t,1);if(s){this.moveCursorTo(s.end.row,s.end.column);return}if(i=this.session.nonTokenRe.exec(r))t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,r=n.substring(t);if(t>=n.length){this.moveCursorTo(e,n.length),this.moveCursorRight(),e<this.doc.getLength()-1&&this.moveCursorWordRight();return}if(i=this.session.tokenRe.exec(r))t+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0;this.moveCursorTo(e,t)},this.moveCursorLongWordLeft=function(){var e=this.lead.row,t=this.lead.column,n;if(n=this.session.getFoldAt(e,t,-1)){this.moveCursorTo(n.start.row,n.start.column);return}var r=this.session.getFoldStringAt(e,t,-1);r==null&&(r=this.doc.getLine(e).substring(0,t));var s=i.stringReverse(r),o;this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;if(o=this.session.nonTokenRe.exec(s))t-=this.session.nonTokenRe.lastIndex,s=s.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0;if(t<=0){this.moveCursorTo(e,0),this.moveCursorLeft(),e>0&&this.moveCursorWordLeft();return}if(o=this.session.tokenRe.exec(s))t-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0;this.moveCursorTo(e,t)},this.$shortWordEndIndex=function(e){var t,n=0,r,i=/\s/,s=this.session.tokenRe;s.lastIndex=0;if(t=this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{while((r=e[n])&&i.test(r))n++;if(n<1){s.lastIndex=0;while((r=e[n])&&!s.test(r)){s.lastIndex=0,n++;if(i.test(r)){if(n>2){n--;break}while((r=e[n])&&i.test(r))n++;if(n>2)break}}}}return s.lastIndex=0,n},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t),i=this.session.getFoldAt(e,t,1);if(i)return this.moveCursorTo(i.end.row,i.end.column);if(t==n.length){var s=this.doc.getLength();do e++,r=this.doc.getLine(e);while(e<s&&/^\s*$/.test(r));/^\s+/.test(r)||(r=""),t=0}var o=this.$shortWordEndIndex(r);this.moveCursorTo(e,t+o)},this.moveCursorShortWordLeft=function(){var e=this.lead.row,t=this.lead.column,n;if(n=this.session.getFoldAt(e,t,-1))return this.moveCursorTo(n.start.row,n.start.column);var r=this.session.getLine(e).substring(0,t);if(t==0){do e--,r=this.doc.getLine(e);while(e>0&&/^\s*$/.test(r));t=r.length,/\s+$/.test(r)||(r="")}var s=i.stringReverse(r),o=this.$shortWordEndIndex(s);return this.moveCursorTo(e,t-o)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(e,t){var n=this.session.documentToScreenPosition(this.lead.row,this.lead.column);t===0&&(this.$desiredColumn?n.column=this.$desiredColumn:this.$desiredColumn=n.column);var r=this.session.screenToDocumentPosition(n.row+e,n.column);e!==0&&t===0&&r.row===this.lead.row&&r.column===this.lead.column&&this.session.lineWidgets&&this.session.lineWidgets[r.row]&&r.row++,this.moveCursorTo(r.row,r.column+t,t===0)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,n){var r=this.session.getFoldAt(e,t,1);r&&(e=r.start.row,t=r.start.column),this.$keepDesiredColumnOnChange=!0,this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,n){var r=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(r.row,r.column,n)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},this.getRangeOfMovements=function(e){var t=this.getCursor();try{e.call(null,this);var n=this.getCursor();return o.fromPoints(t,n)}catch(r){return o.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},this.toJSON=function(){if(this.rangeCount)var e=this.ranges.map(function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t});else{var e=this.getRange();e.isBackwards=this.isBackwards()}return e},this.fromJSON=function(e){if(e.start==undefined){if(this.rangeList){this.toSingleRange(e[0]);for(var t=e.length;t--;){var n=o.fromPoints(e[t].start,e[t].end);e.isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},this.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0}}).call(u.prototype),t.Selection=u}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,n){var r=e("./lib/lang"),i=e("./lib/oop"),s=e("./range").Range,o=function(){this.$options={}};(function(){this.set=function(e){return i.mixin(this.$options,e),this},this.getOptions=function(){return r.copyObject(this.$options)},this.setOptions=function(e){this.$options=e},this.find=function(e){var t=this.$matchIterator(e,this.$options);if(!t)return!1;var n=null;return t.forEach(function(e,t,r){if(!e.start){var i=e.offset+(r||0);n=new s(t,i,t,i+e.length)}else n=e;return!0}),n},this.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,i=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),o=[],u=t.re;if(t.$isMultiLine){var a=u.length,f=i.length-a,l;e:for(var c=u.offset||0;c<=f;c++){for(var h=0;h<a;h++)if(i[c+h].search(u[h])==-1)continue e;var p=i[c],d=i[c+a-1],v=p.length-p.match(u[0])[0].length,m=d.match(u[a-1])[0].length;if(l&&l.end.row===c&&l.end.column>v)continue;o.push(l=new s(c,v,c+a-1,m)),a>2&&(c=c+a-2)}}else for(var g=0;g<i.length;g++){var y=r.getMatchOffsets(i[g],u);for(var h=0;h<y.length;h++){var b=y[h];o.push(new s(g,b.offset,g,b.offset+b.length))}}if(n){var w=n.start.column,E=n.start.column,g=0,h=o.length-1;while(g<h&&o[g].start.column<w&&o[g].start.row==n.start.row)g++;while(g<h&&o[h].end.column>E&&o[h].end.row==n.end.row)h--;o=o.slice(g,h+1);for(g=0,h=o.length;g<h;g++)o[g].start.row+=n.start.row,o[g].end.row+=n.start.row}return o},this.replace=function(e,t){var n=this.$options,r=this.$assembleRegExp(n);if(n.$isMultiLine)return t;if(!r)return;var i=r.exec(e);if(!i||i[0].length!=e.length)return null;t=e.replace(r,t);if(n.preserveCase){t=t.split("");for(var s=Math.min(e.length,e.length);s--;){var o=e[s];o&&o.toLowerCase()!=o?t[s]=t[s].toUpperCase():t[s]=t[s].toLowerCase()}t=t.join("")}return t},this.$matchIterator=function(e,t){var n=this.$assembleRegExp(t);if(!n)return!1;var i=this,o,u=t.backwards;if(t.$isMultiLine)var a=n.length,f=function(t,r,i){var u=t.search(n[0]);if(u==-1)return;for(var f=1;f<a;f++){t=e.getLine(r+f);if(t.search(n[f])==-1)return}var l=t.match(n[a-1])[0].length,c=new s(r,u,r+a-1,l);n.offset==1?(c.start.row--,c.start.column=Number.MAX_VALUE):i&&(c.start.column+=i);if(o(c))return!0};else if(u)var f=function(e,t,i){var s=r.getMatchOffsets(e,n);for(var u=s.length-1;u>=0;u--)if(o(s[u],t,i))return!0};else var f=function(e,t,i){var s=r.getMatchOffsets(e,n);for(var u=0;u<s.length;u++)if(o(s[u],t,i))return!0};return{forEach:function(n){o=n,i.$lineIterator(e,t).forEach(f)}}},this.$assembleRegExp=function(e,t){if(e.needle instanceof RegExp)return e.re=e.needle;var n=e.needle;if(!e.needle)return e.re=!1;e.regExp||(n=r.escapeRegExp(n)),e.wholeWord&&(n="\\b"+n+"\\b");var i=e.caseSensitive?"g":"gi";e.$isMultiLine=!t&&/[\n\r]/.test(n);if(e.$isMultiLine)return e.re=this.$assembleMultilineRegExp(n,i);try{var s=new RegExp(n,i)}catch(o){s=!1}return e.re=s},this.$assembleMultilineRegExp=function(e,t){var n=e.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),r=[];for(var i=0;i<n.length;i++)try{r.push(new RegExp(n[i],t))}catch(s){return!1}return n[0]==""?(r.shift(),r.offset=1):r.offset=0,r},this.$lineIterator=function(e,t){var n=t.backwards==1,r=t.skipCurrent!=0,i=t.range,s=t.start;s||(s=i?i[n?"end":"start"]:e.selection.getRange()),s.start&&(s=s[r!=n?"end":"start"]);var o=i?i.start.row:0,u=i?i.end.row:e.getLength()-1,a=n?function(n){var r=s.row,i=e.getLine(r).substring(0,s.column);if(n(i,r))return;for(r--;r>=o;r--)if(n(e.getLine(r),r))return;if(t.wrap==0)return;for(r=u,o=s.row;r>=o;r--)if(n(e.getLine(r),r))return}:function(n){var r=s.row,i=e.getLine(r).substr(s.column);if(n(i,r,s.column))return;for(r+=1;r<=u;r++)if(n(e.getLine(r),r))return;if(t.wrap==0)return;for(r=o,u=s.row;r<=u;r++)if(n(e.getLine(r),r))return};return{forEach:a}}}).call(o.prototype),t.Search=o}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/lang"),s=e("./config"),o=e("./lib/event_emitter").EventEmitter,u=e("./selection").Selection,a=e("./mode/text").Mode,f=e("./range").Range,l=e("./document").Document,c=e("./background_tokenizer").BackgroundTokenizer,h=e("./search_highlight").SearchHighlight,p=function(e,t){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.$foldData.toString=function(){return this.join("\n")},this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this);if(typeof e!="object"||!e.getLine)e=new l(e);this.setDocument(e),this.selection=new u(this),s.resetOptions(this),this.setMode(t),s._signal("session",this)};(function(){function g(e){return e<4352?!1:e>=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510}r.implement(this,o),this.setDocument=function(e){this.doc&&this.doc.removeListener("change",this.$onChange),this.doc=e,e.on("change",this.$onChange),this.bgTokenizer&&this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(e){if(!e){this.$docRowCache=[],this.$screenRowCache=[];return}var t=this.$docRowCache.length,n=this.$getRowCacheIndex(this.$docRowCache,e)+1;t>n&&(this.$docRowCache.splice(n,t),this.$screenRowCache.splice(n,t))},this.$getRowCacheIndex=function(e,t){var n=0,r=e.length-1;while(n<=r){var i=n+r>>1,s=e[i];if(t>s)n=i+1;else{if(!(t<s))return i;r=i-1}}return n-1},this.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.bgTokenizer&&this.bgTokenizer.start(0)},this.onChangeFold=function(e){var t=e.data;this.$resetRowCache(t.start.row)},this.onChange=function(e){var t=e.data;this.$modified=!0,this.$resetRowCache(t.range.start.row);var n=this.$updateInternalDataOnChange(e);!this.$fromUndo&&this.$undoManager&&!t.ignore&&(this.$deltasDoc.push(t),n&&n.length!=0&&this.$deltasFold.push({action:"removeFolds",folds:n}),this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(t),this._signal("change",e)},this.setValue=function(e){this.doc.setValue(e),this.selection.moveTo(0,0),this.$resetRowCache(0),this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},this.getValue=this.toString=function(){return this.doc.getValue()},this.getSelection=function(){return this.selection},this.getState=function(e){return this.bgTokenizer.getState(e)},this.getTokens=function(e){return this.bgTokenizer.getTokens(e)},this.getTokenAt=function(e,t){var n=this.bgTokenizer.getTokens(e),r,i=0;if(t==null)s=n.length-1,i=this.getLine(e).length;else for(var s=0;s<n.length;s++){i+=n[s].value.length;if(i>=t)break}return r=n[s],r?(r.index=s,r.start=i-r.value.length,r):null},this.setUndoManager=function(e){this.$undoManager=e,this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.$informUndoManager&&this.$informUndoManager.cancel();if(e){var t=this;this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.$deltasFold.length&&(t.$deltas.push({group:"fold",deltas:t.$deltasFold}),t.$deltasFold=[]),t.$deltasDoc.length&&(t.$deltas.push({group:"doc",deltas:t.$deltasDoc}),t.$deltasDoc=[]),t.$deltas.length>0&&e.execute({action:"aceupdate",args:[t.$deltas,t],merge:t.mergeUndoDeltas}),t.mergeUndoDeltas=!1,t.$deltas=[]},this.$informUndoManager=i.delayedCall(this.$syncInformUndoManager)}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},reset:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?i.stringRepeat(" ",this.getTabSize()):"	"},this.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(e){this.setOption("tabSize",e)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize===0},this.$overwrite=!1,this.setOverwrite=function(e){this.setOption("overwrite",e)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t<e.length;t++)this.$breakpoints[e[t]]="ace_breakpoint";this._signal("changeBreakpoint",{})},this.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},this.setBreakpoint=function(e,t){t===undefined&&(t="ace_breakpoint"),t?this.$breakpoints[e]=t:delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},this.clearBreakpoint=function(e){delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},this.addMarker=function(e,t,n,r){var i=this.$markerId++,s={range:e,type:n||"line",renderer:typeof n=="function"?n:null,clazz:t,inFront:!!r,id:i};return r?(this.$frontMarkers[i]=s,this._signal("changeFrontMarker")):(this.$backMarkers[i]=s,this._signal("changeBackMarker")),i},this.addDynamicMarker=function(e,t){if(!e.update)return;var n=this.$markerId++;return e.id=n,e.inFront=!!t,t?(this.$frontMarkers[n]=e,this._signal("changeFrontMarker")):(this.$backMarkers[n]=e,this._signal("changeBackMarker")),e},this.removeMarker=function(e){var t=this.$frontMarkers[e]||this.$backMarkers[e];if(!t)return;var n=t.inFront?this.$frontMarkers:this.$backMarkers;t&&(delete n[e],this._signal(t.inFront?"changeFrontMarker":"changeBackMarker"))},this.getMarkers=function(e){return e?this.$frontMarkers:this.$backMarkers},this.highlight=function(e){if(!this.$searchHighlight){var t=new h(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(t)}this.$searchHighlight.setRegexp(e)},this.highlightLines=function(e,t,n,r){typeof t!="number"&&(n=t,t=e),n||(n="ace_step");var i=new f(e,0,t,Infinity);return i.id=this.addMarker(i,n,"fullLine",r),i},this.setAnnotations=function(e){this.$annotations=e,this._signal("changeAnnotation",{})},this.getAnnotations=function(){return this.$annotations||[]},this.clearAnnotations=function(){this.setAnnotations([])},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r?\n)/m);t?this.$autoNewLine=t[1]:this.$autoNewLine="\n"},this.getWordRange=function(e,t){var n=this.getLine(e),r=!1;t>0&&(r=!!n.charAt(t-1).match(this.tokenRe)),r||(r=!!n.charAt(t).match(this.tokenRe));if(r)var i=this.tokenRe;else if(/^\s+$/.test(n.slice(t-1,t+1)))var i=/\s/;else var i=this.nonTokenRe;var s=t;if(s>0){do s--;while(s>=0&&n.charAt(s).match(i));s++}var o=t;while(o<n.length&&n.charAt(o).match(i))o++;return new f(e,s,e,o)},this.getAWordRange=function(e,t){var n=this.getWordRange(e,t),r=this.getLine(n.end.row);while(r.charAt(n.end.column).match(/[ \t]/))n.end.column+=1;return n},this.setNewLineMode=function(e){this.doc.setNewLineMode(e)},this.getNewLineMode=function(){return this.doc.getNewLineMode()},this.setUseWorker=function(e){this.setOption("useWorker",e)},this.getUseWorker=function(){return this.$useWorker},this.onReloadTokenizer=function(e){var t=e.data;this.bgTokenizer.start(t.first),this._signal("tokenizerUpdate",e)},this.$modes={},this.$mode=null,this.$modeId=null,this.setMode=function(e,t){if(e&&typeof e=="object"){if(e.getTokenizer)return this.$onChangeMode(e);var n=e,r=n.path}else r=e||"ace/mode/text";this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new a);if(this.$modes[r]&&!n){this.$onChangeMode(this.$modes[r]),t&&t();return}this.$modeId=r,s.loadModule(["mode",r],function(e){if(this.$modeId!==r)return t&&t();if(this.$modes[r]&&!n)return this.$onChangeMode(this.$modes[r]);e&&e.Mode&&(e=new e.Mode(n),n||(this.$modes[r]=e,e.$id=r),this.$onChangeMode(e),t&&t())}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},this.$onChangeMode=function(e,t){t||(this.$modeId=e.$id);if(this.$mode===e)return;this.$mode=e,this.$stopWorker(),this.$useWorker&&this.$startWorker();var n=e.getTokenizer();if(n.addEventListener!==undefined){var r=this.onReloadTokenizer.bind(this);n.addEventListener("update",r)}if(!this.bgTokenizer){this.bgTokenizer=new c(n);var i=this;this.bgTokenizer.addEventListener("update",function(e){i._signal("tokenizerUpdate",e)})}else this.bgTokenizer.setTokenizer(n);this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=e.tokenRe,this.nonTokenRe=e.nonTokenRe,t||(this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(e.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode"))},this.$stopWorker=function(){this.$worker&&this.$worker.terminate(),this.$worker=null},this.$startWorker=function(){if(typeof Worker!="undefined"&&!e.noWorker)try{this.$worker=this.$mode.createWorker(this)}catch(t){console.log("Could not load worker"),console.log(t),this.$worker=null}else this.$worker=null},this.getMode=function(){return this.$mode},this.$scrollTop=0,this.setScrollTop=function(e){if(this.$scrollTop===e||isNaN(e))return;this.$scrollTop=e,this._signal("changeScrollTop",e)},this.getScrollTop=function(){return this.$scrollTop},this.$scrollLeft=0,this.setScrollLeft=function(e){if(this.$scrollLeft===e||isNaN(e))return;this.$scrollLeft=e,this._signal("changeScrollLeft",e)},this.getScrollLeft=function(){return this.$scrollLeft},this.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},this.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var e=0;return this.lineWidgets.forEach(function(t){t&&t.screenWidth>e&&(e=t.screenWidth)}),this.lineWidgetWidth=e},this.$computeWidth=function(e){if(this.$modified||e){this.$modified=!1;if(this.$useWrapMode)return this.screenWidth=this.$wrapLimit;var t=this.doc.getAllLines(),n=this.$rowLengthCache,r=0,i=0,s=this.$foldData[i],o=s?s.start.row:Infinity,u=t.length;for(var a=0;a<u;a++){if(a>o){a=s.end.row+1;if(a>=u)break;s=this.$foldData[i++],o=s?s.start.row:Infinity}n[a]==null&&(n[a]=this.$getStringScreenWidth(t[a])[0]),n[a]>r&&(r=n[a])}this.screenWidth=r}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.undoChanges=function(e,t){if(!e.length)return;this.$fromUndo=!0;var n=null;for(var r=e.length-1;r!=-1;r--){var i=e[r];i.group=="doc"?(this.doc.revertDeltas(i.deltas),n=this.$getUndoSelection(i.deltas,!0,n)):i.deltas.forEach(function(e){this.addFolds(e.folds)},this)}return this.$fromUndo=!1,n&&this.$undoSelect&&!t&&this.selection.setSelectionRange(n),n},this.redoChanges=function(e,t){if(!e.length)return;this.$fromUndo=!0;var n=null;for(var r=0;r<e.length;r++){var i=e[r];i.group=="doc"&&(this.doc.applyDeltas(i.deltas),n=this.$getUndoSelection(i.deltas,!1,n))}return this.$fromUndo=!1,n&&this.$undoSelect&&!t&&this.selection.setSelectionRange(n),n},this.setUndoSelect=function(e){this.$undoSelect=e},this.$getUndoSelection=function(e,t,n){function r(e){var n=e.action==="insertText"||e.action==="insertLines";return t?!n:n}var i=e[0],s,o,u=!1;r(i)?(s=f.fromPoints(i.range.start,i.range.end),u=!0):(s=f.fromPoints(i.range.start,i.range.start),u=!1);for(var a=1;a<e.length;a++)i=e[a],r(i)?(o=i.range.start,s.compare(o.row,o.column)==-1&&s.setStart(i.range.start),o=i.range.end,s.compare(o.row,o.column)==1&&s.setEnd(i.range.end),u=!0):(o=i.range.start,s.compare(o.row,o.column)==-1&&(s=f.fromPoints(i.range.start,i.range.start)),u=!1);if(n!=null){f.comparePoints(n.start,s.start)===0&&(n.start.column+=s.end.column-s.start.column,n.end.column+=s.end.column-s.start.column);var l=n.compareRange(s);l==1?s.setStart(n.start):l==-1&&s.setEnd(n.end)}return s},this.replace=function(e,t){return this.doc.replace(e,t)},this.moveText=function(e,t,n){var r=this.getTextRange(e),i=this.getFoldsInRange(e),s=f.fromPoints(t,t);if(!n){this.remove(e);var o=e.start.row-e.end.row,u=o?-e.end.column:e.start.column-e.end.column;u&&(s.start.row==e.end.row&&s.start.column>e.end.column&&(s.start.column+=u),s.end.row==e.end.row&&s.end.column>e.end.column&&(s.end.column+=u)),o&&s.start.row>=e.end.row&&(s.start.row+=o,s.end.row+=o)}s.end=this.insert(s.start,r);if(i.length){var a=e.start,l=s.start,o=l.row-a.row,u=l.column-a.column;this.addFolds(i.map(function(e){return e=e.clone(),e.start.row==a.row&&(e.start.column+=u),e.end.row==a.row&&(e.end.column+=u),e.start.row+=o,e.end.row+=o,e}))}return s},this.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var r=e;r<=t;r++)this.insert({row:r,column:0},n)},this.outdentRows=function(e){var t=e.collapseRows(),n=new f(0,0,0,0),r=this.getTabSize();for(var i=t.start.row;i<=t.end.row;++i){var s=this.getLine(i);n.start.row=i,n.end.row=i;for(var o=0;o<r;++o)if(s.charAt(o)!=" ")break;o<r&&s.charAt(o)=="	"?(n.start.column=o,n.end.column=o+1):(n.start.column=0,n.end.column=o),this.remove(n)}},this.$moveLines=function(e,t,n){e=this.getRowFoldStart(e),t=this.getRowFoldEnd(t);if(n<0){var r=this.getRowFoldStart(e+n);if(r<0)return 0;var i=r-e}else if(n>0){var r=this.getRowFoldEnd(t+n);if(r>this.doc.getLength()-1)return 0;var i=r-t}else{e=this.$clipRowToDocument(e),t=this.$clipRowToDocument(t);var i=t-e+1}var s=new f(e,0,t,Number.MAX_VALUE),o=this.getFoldsInRange(s).map(function(e){return e=e.clone(),e.start.row+=i,e.end.row+=i,e}),u=n==0?this.doc.getLines(e,t):this.doc.removeLines(e,t);return this.doc.insertLines(e+i,u),o.length&&this.addFolds(o),i},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){t=Math.max(0,t);if(e<0)e=0,t=0;else{var n=this.doc.getLength();e>=n?(e=n-1,t=this.doc.getLine(n-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},this.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(e){if(e!=this.$useWrapMode){this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0);if(e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(e,t){if(this.$wrapLimitRange.min!==e||this.$wrapLimitRange.max!==t)this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this._signal("changeWrapMode")},this.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange;n.max<0&&(n={min:t,max:t});var r=this.$constrainWrapLimit(e,n.min,n.max);return r!=this.$wrapLimit&&r>1?(this.$wrapLimit=r,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},this.$constrainWrapLimit=function(e,t,n){return t&&(e=Math.max(t,e)),n&&(e=Math.min(n,e)),e},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n,r=e.data.action,i=e.data.range.start.row,s=e.data.range.end.row,o=e.data.range.start,u=e.data.range.end,a=null;r.indexOf("Lines")!=-1?(r=="insertLines"?s=i+e.data.lines.length:s=i,n=e.data.lines?e.data.lines.length:s-i):n=s-i,this.$updating=!0;if(n!=0)if(r.indexOf("remove")!=-1){this[t?"$wrapData":"$rowLengthCache"].splice(i,n);var f=this.$foldData;a=this.getFoldsInRange(e.data.range),this.removeFolds(a);var l=this.getFoldLine(u.row),c=0;if(l){l.addRemoveChars(u.row,u.column,o.column-u.column),l.shiftRow(-n);var h=this.getFoldLine(i);h&&h!==l&&(h.merge(l),l=h),c=f.indexOf(l)+1}for(c;c<f.length;c++){var l=f[c];l.start.row>=u.row&&l.shiftRow(-n)}s=i}else{var p=Array(n);p.unshift(i,0);var d=t?this.$wrapData:this.$rowLengthCache;d.splice.apply(d,p);var f=this.$foldData,l=this.getFoldLine(i),c=0;if(l){var v=l.range.compareInside(o.row,o.column);v==0?(l=l.split(o.row,o.column),l.shiftRow(n),l.addRemoveChars(s,0,u.column-o.column)):v==-1&&(l.addRemoveChars(i,0,u.column-o.column),l.shiftRow(n)),c=f.indexOf(l)+1}for(c;c<f.length;c++){var l=f[c];l.start.row>=i&&l.shiftRow(n)}}else{n=Math.abs(e.data.range.start.column-e.data.range.end.column),r.indexOf("remove")!=-1&&(a=this.getFoldsInRange(e.data.range),this.removeFolds(a),n=-n);var l=this.getFoldLine(i);l&&l.addRemoveChars(i,o.column,n)}return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(i,s):this.$updateRowLengthCache(i,s),a},this.$updateRowLengthCache=function(e,t,n){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(e,t){var n=this.doc.getAllLines(),r=this.getTabSize(),i=this.$wrapData,s=this.$wrapLimit,o,a,f=e;t=Math.min(t,n.length-1);while(f<=t)a=this.getFoldLine(f,a),a?(o=[],a.walk(function(e,t,r,i){var s;if(e!=null){s=this.$getDisplayTokens(e,o.length),s[0]=u;for(var a=1;a<s.length;a++)s[a]=l}else s=this.$getDisplayTokens(n[t].substring(i,r),o.length);o=o.concat(s)}.bind(this),a.end.row,n[a.end.row].length+1),i[a.start.row]=this.$computeWrapSplits(o,s,r),f=a.end.row+1):(o=this.$getDisplayTokens(n[f]),i[f]=this.$computeWrapSplits(o,s,r),f++)};var t=1,n=2,u=3,l=4,p=9,d=10,v=11,m=12;this.$computeWrapSplits=function(e,t){function a(t){var r=e.slice(i,t),o=r.length;r.join("").replace(/12/g,function(){o-=1}).replace(/2/g,function(){o-=1}),s+=o,n.push(s),i=t}if(e.length==0)return[];var n=[],r=e.length,i=0,s=0,o=this.$wrapAsCode;while(r-i>t){var f=i+t;if(e[f-1]>=d&&e[f]>=d){a(f);continue}if(e[f]==u||e[f]==l){for(f;f!=i-1;f--)if(e[f]==u)break;if(f>i){a(f);continue}f=i+t;for(f;f<e.length;f++)if(e[f]!=l)break;if(f==e.length)break;a(f);continue}var c=Math.max(f-(o?10:t-(t>>2)),i-1);while(f>c&&e[f]<u)f--;if(o){while(f>c&&e[f]<u)f--;while(f>c&&e[f]==p)f--}else while(f>c&&e[f]<d)f--;if(f>c){a(++f);continue}f=i+t,a(f)}return n},this.$getDisplayTokens=function(e,r){var i=[],s;r=r||0;for(var o=0;o<e.length;o++){var u=e.charCodeAt(o);if(u==9){s=this.getScreenTabSize(i.length+r),i.push(v);for(var a=1;a<s;a++)i.push(m)}else u==32?i.push(d):u>39&&u<48||u>57&&u<64?i.push(p):u>=4352&&g(u)?i.push(t,n):i.push(t)}return i},this.$getStringScreenWidth=function(e,t,n){if(t==0)return[0,0];t==null&&(t=Infinity),n=n||0;var r,i;for(i=0;i<e.length;i++){r=e.charCodeAt(i),r==9?n+=this.getScreenTabSize(n):r>=4352&&g(r)?n+=2:n+=1;if(n>t)break}return[n,i]},this.lineWidgets=null,this.getRowLength=function(e){if(this.lineWidgets)var t=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0;else t=0;return!this.$useWrapMode||!this.$wrapData[e]?1+t:this.$wrapData[e].length+1+t},this.getRowLineCount=function(e){return!this.$useWrapMode||!this.$wrapData[e]?1:this.$wrapData[e].length+1},this.getScreenLastRowColumn=function(e){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE);return this.documentToScreenColumn(t.row,t.column)},this.getDocumentLastRowColumn=function(e,t){var n=this.documentToScreenRow(e,t);return this.getScreenLastRowColumn(n)},this.getDocumentLastRowColumnPosition=function(e,t){var n=this.documentToScreenRow(e,t);return this.screenToDocumentPosition(n,Number.MAX_VALUE/10)},this.getRowSplitData=function(e){return this.$useWrapMode?this.$wrapData[e]:undefined},this.getScreenTabSize=function(e){return this.$tabSize-e%this.$tabSize},this.screenToDocumentRow=function(e,t){return this.screenToDocumentPosition(e,t).row},this.screenToDocumentColumn=function(e,t){return this.screenToDocumentPosition(e,t).column},this.screenToDocumentPosition=function(e,t){if(e<0)return{row:0,column:0};var n,r=0,i=0,s,o=0,u=0,a=this.$screenRowCache,f=this.$getRowCacheIndex(a,e),l=a.length;if(l&&f>=0)var o=a[f],r=this.$docRowCache[f],c=e>a[l-1];else var c=!l;var h=this.getLength()-1,p=this.getNextFoldLine(r),d=p?p.start.row:Infinity;while(o<=e){u=this.getRowLength(r);if(o+u>e||r>=h)break;o+=u,r++,r>d&&(r=p.end.row+1,p=this.getNextFoldLine(r,p),d=p?p.start.row:Infinity),c&&(this.$docRowCache.push(r),this.$screenRowCache.push(o))}if(p&&p.start.row<=r)n=this.getFoldDisplayLine(p),r=p.start.row;else{if(o+u<=e||r>h)return{row:h,column:this.getLine(h).length};n=this.getLine(r),p=null}if(this.$useWrapMode){var v=this.$wrapData[r];if(v){var m=Math.floor(e-o);s=v[m],m>0&&v.length&&(i=v[m-1]||v[v.length-1],n=n.substring(i))}}return i+=this.$getStringScreenWidth(n,t)[1],this.$useWrapMode&&i>=s&&(i=s-1),p?p.idxToPosition(i):{row:r,column:i}},this.documentToScreenPosition=function(e,t){if(typeof t=="undefined")var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var r=0,i=null,s=null;s=this.getFoldAt(e,t,1),s&&(e=s.start.row,t=s.start.column);var o,u=0,a=this.$docRowCache,f=this.$getRowCacheIndex(a,e),l=a.length;if(l&&f>=0)var u=a[f],r=this.$screenRowCache[f],c=e>a[l-1];else var c=!l;var h=this.getNextFoldLine(u),p=h?h.start.row:Infinity;while(u<e){if(u>=p){o=h.end.row+1;if(o>e)break;h=this.getNextFoldLine(o,h),p=h?h.start.row:Infinity}else o=u+1;r+=this.getRowLength(u),u=o,c&&(this.$docRowCache.push(u),this.$screenRowCache.push(r))}var d="";h&&u>=p?(d=this.getFoldDisplayLine(h,e,t),i=h.start.row):(d=this.getLine(e).substring(0,t),i=e);if(this.$useWrapMode){var v=this.$wrapData[i];if(v){var m=0;while(d.length>=v[m])r++,m++;d=d.substring(v[m-1]||0,d.length)}}return{row:r,column:this.$getStringScreenWidth(d)[0]}},this.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},this.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},this.getScreenLength=function(){var e=0,t=null;if(!this.$useWrapMode){e=this.getLength();var n=this.$foldData;for(var r=0;r<n.length;r++)t=n[r],e-=t.end.row-t.start.row}else{var i=this.$wrapData.length,s=0,r=0,t=this.$foldData[r++],o=t?t.start.row:Infinity;while(s<i){var u=this.$wrapData[s];e+=u?u.length+1:1,s++,s>o&&(s=t.end.row+1,t=this.$foldData[r++],o=t?t.start.row:Infinity)}}return this.lineWidgets&&(e+=this.$getWidgetScreenLength()),e},this.$setFontMetrics=function(e){}}).call(p.prototype),e("./edit_session/folding").Folding.call(p.prototype),e("./edit_session/bracket_match").BracketMatch.call(p.prototype),s.defineOptions(p.prototype,"session",{wrap:{set:function(e){!e||e=="off"?e=!1:e=="free"?e=!0:e=="printMargin"?e=-1:typeof e=="string"&&(e=parseInt(e,10)||!1);if(this.$wrap==e)return;if(!e)this.setUseWrapMode(!1);else{var t=typeof e=="number"?e:null;this.setWrapLimitRange(t,t),this.setUseWrapMode(!0)}this.$wrap=e},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){e=e=="auto"?this.$mode.type!="text":e!="text",e!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode&&(this.$modified=!0,this.$resetRowCache(0),this.$updateWrapData(0,this.getLength()-1)))},initialValue:"auto"},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){if(isNaN(e)||this.$tabSize===e)return;this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize")},initialValue:4,handlesSet:!0},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId}}}),t.EditSession=p}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,t,n){var r=e("../lib/oop"),i=e("../keyboard/hash_handler").HashHandler,s=e("../lib/event_emitter").EventEmitter,o=function(e,t){i.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",function(e){return e.command.exec(e.editor,e.args||{})})};r.inherits(o,i),function(){r.implement(this,s),this.exec=function(e,t,n){typeof e=="string"&&(e=this.commands[e]);if(!e)return!1;if(t&&t.$readOnly&&!e.readOnly)return!1;var r={editor:t,command:e,args:n},i=this._emit("exec",r);return this._signal("afterExec",r),i===!1?!1:!0},this.toggleRecording=function(e){if(this.$inReplay)return;return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.removeEventListener("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(e){if(this.$inReplay||!this.macro)return;if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach(function(t){typeof t=="string"?this.exec(t,e):this.exec(t[0],e,t[1])},this)}finally{this.$inReplay=!1}},this.trimMacro=function(e){return e.map(function(e){return typeof e[0]!="string"&&(e[0]=e[0].name),e[1]||(e=e[0]),e})}}.call(o.prototype),t.CommandManager=o}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,t,n){var r=e("../lib/keys"),i=e("../lib/event"),s=function(e){this.$editor=e,this.$data={editor:e},this.$handlers=[],this.setDefaultHandler(e.commands)};(function(){this.setDefaultHandler=function(e){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=e,this.addKeyboardHandler(e,0)},this.setKeyboardHandler=function(e){var t=this.$handlers;if(t[t.length-1]==e)return;while(t[t.length-1]&&t[t.length-1]!=this.$defaultHandler)this.removeKeyboardHandler(t[t.length-1]);this.addKeyboardHandler(e,1)},this.addKeyboardHandler=function(e,t){if(!e)return;typeof e=="function"&&!e.handleKeyboard&&(e.handleKeyboard=e);var n=this.$handlers.indexOf(e);n!=-1&&this.$handlers.splice(n,1),t==undefined?this.$handlers.push(e):this.$handlers.splice(t,0,e),n==-1&&e.attach&&e.attach(this.$editor)},this.removeKeyboardHandler=function(e){var t=this.$handlers.indexOf(e);return t==-1?!1:(this.$handlers.splice(t,1),e.detach&&e.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.$callKeyboardHandlers=function(e,t,n,r){var s,o=!1,u=this.$editor.commands;for(var a=this.$handlers.length;a--;){s=this.$handlers[a].handleKeyboard(this.$data,e,t,n,r);if(!s||!s.command)continue;s.command=="null"?o=!0:o=u.exec(s.command,this.$editor,s.args,r),o&&r&&e!=-1&&s.passEvent!=1&&s.command.passEvent!=1&&i.stopEvent(r);if(o)break}return o},this.onCommandKey=function(e,t,n){var i=r.keyCodeToString(n);this.$callKeyboardHandlers(t,i,n,e)},this.onTextInput=function(e){var t=this.$callKeyboardHandlers(-1,e);t||this.$editor.commands.exec("insertstring",this.$editor,e)}}).call(s.prototype),t.KeyBinding=s}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,n){function s(e,t){this.platform=t||(i.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={};if(this.__defineGetter__&&this.__defineSetter__&&typeof console!="undefined"&&console.error){var n=!1,r=function(){n||(n=!0,console.error("commmandKeyBinding has too many m's. use commandKeyBinding"))};this.__defineGetter__("commmandKeyBinding",function(){return r(),this.commandKeyBinding}),this.__defineSetter__("commmandKeyBinding",function(e){return r(),this.commandKeyBinding=e})}else this.commmandKeyBinding=this.commandKeyBinding;this.addCommands(e)}var r=e("../lib/keys"),i=e("../lib/useragent");(function(){this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e){var t=typeof e=="string"?e:e.name;e=this.commands[t],delete this.commands[t];var n=this.commandKeyBinding;for(var r in n)for(var i in n[r])n[r][i]==e&&delete n[r][i]},this.bindKey=function(e,t){if(!e)return;if(typeof t=="function"){this.addCommand({exec:t,bindKey:e,name:t.name||e});return}var n=this.commandKeyBinding;e.split("|").forEach(function(e){var r=this.parseKeys(e,t),i=r.hashId;(n[i]||(n[i]={}))[r.key]=t},this)},this.addCommands=function(e){e&&Object.keys(e).forEach(function(t){var n=e[t];if(!n)return;if(typeof n=="string")return this.bindKey(n,t);typeof n=="function"&&(n={exec:n});if(typeof n!="object")return;n.name||(n.name=t),this.addCommand(n)},this)},this.removeCommands=function(e){Object.keys(e).forEach(function(t){this.removeCommand(e[t])},this)},this.bindKeys=function(e){Object.keys(e).forEach(function(t){this.bindKey(t,e[t])},this)},this._buildKeyHash=function(e){var t=e.bindKey;if(!t)return;var n=typeof t=="string"?t:t[this.platform];this.bindKey(n,e)},this.parseKeys=function(e){e.indexOf(" ")!=-1&&(e=e.split(/\s+/).pop());var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(e){return e}),n=t.pop(),i=r[n];if(r.FUNCTION_KEYS[i])n=r.FUNCTION_KEYS[i].toLowerCase();else{if(!t.length)return{key:n,hashId:-1};if(t.length==1&&t[0]=="shift")return{key:n.toUpperCase(),hashId:-1}}var s=0;for(var o=t.length;o--;){var u=r.KEY_MODS[t[o]];if(u==null)return typeof console!="undefined"&&console.error("invalid modifier "+t[o]+" in "+e),!1;s|=u}return{key:n,hashId:s}},this.findKeyCommand=function(t,n){var r=this.commandKeyBinding;return r[t]&&r[t][n]},this.handleKeyboard=function(e,t,n,r){return{command:this.findKeyCommand(t,n)}}}).call(s.prototype),t.HashHandler=s}),ace.define("ace/mouse/fold_handler",["require","exports","module"],function(e,t,n){function r(e){e.on("click",function(t){var n=t.getDocumentPosition(),r=e.session,i=r.getFoldAt(n.row,n.column,1);i&&(t.getAccelKey()?r.removeFold(i):r.expandFold(i),t.stop())}),e.on("gutterclick",function(t){var n=e.renderer.$gutterLayer.getRegion(t);if(n=="foldWidgets"){var r=t.getDocumentPosition().row,i=e.session;i.foldWidgets&&i.foldWidgets[r]&&e.session.onFoldWidgetClick(r,t),e.isFocused()||e.focus(),t.stop()}}),e.on("gutterdblclick",function(t){var n=e.renderer.$gutterLayer.getRegion(t);if(n=="foldWidgets"){var r=t.getDocumentPosition().row,i=e.session,s=i.getParentFoldRangeData(r,!0),o=s.range||s.firstRange;if(o){r=o.start.row;var u=i.getFoldAt(r,i.getLine(r).length,1);u?i.removeFold(u):(i.addFold("...",o),e.renderer.scrollCursorIntoView({row:o.start.row,column:0}))}t.stop()}})}t.FoldHandler=r}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,t,n){function o(e,t){return{win:e,mac:t}}var r=e("../lib/lang"),i=e("../config"),s=e("../range").Range;t.commands=[{name:"showSettingsMenu",bindKey:o("Ctrl-,","Command-,"),exec:function(e){i.loadModule("ace/ext/settings_menu",function(t){t.init(e),e.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",bindKey:o("Alt-E","Ctrl-E"),exec:function(e){i.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:o("Alt-Shift-E","Ctrl-Shift-E"),exec:function(e){i.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",bindKey:o("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",bindKey:o(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",bindKey:o("Ctrl-L","Command-L"),exec:function(e){var t=parseInt(prompt("Enter line number:"),10);isNaN(t)||e.gotoLine(t)},readOnly:!0},{name:"fold",bindKey:o("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:o("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",bindKey:o("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:o("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},scrollIntoView:"center",readOnly:!0},{name:"foldall",bindKey:o("Ctrl-Alt-0","Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",bindKey:o("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",bindKey:o("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",bindKey:o("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",bindKey:o("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",bindKey:o("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",bindKey:o("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",bindKey:o("Ctrl-F","Command-F"),exec:function(e){i.loadModule("ace/ext/searchbox",function(t){t.Search(e)})},readOnly:!0},{name:"overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",bindKey:o("Ctrl-Shift-Home","Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",bindKey:o("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",bindKey:o("Shift-Up","Shift-Up"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",readOnly:!0},{name:"golineup",bindKey:o("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",readOnly:!0},{name:"selecttoend",bindKey:o("Ctrl-Shift-End","Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",bindKey:o("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",bindKey:o("Shift-Down","Shift-Down"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",bindKey:o("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",bindKey:o("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",bindKey:o("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",bindKey:o("Alt-Shift-Left","Command-Shift-Left"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",bindKey:o("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",bindKey:o("Shift-Left","Shift-Left"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",bindKey:o("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",bindKey:o("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",bindKey:o("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",bindKey:o("Alt-Shift-Right","Command-Shift-Right"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",bindKey:o("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",bindKey:o("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",bindKey:o("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",bindKey:o(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",bindKey:o("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",bindKey:o(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",bindKey:o("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",bindKey:o("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",bindKey:o("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",bindKey:o("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",bindKey:o("Ctrl-P","Ctrl-Shift-P"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",readOnly:!0},{name:"selecttomatching",bindKey:o("Ctrl-Shift-P",null),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",readOnly:!0},{name:"cut",exec:function(e){var t=e.getSelectionRange();e._emit("cut",t),e.selection.isEmpty()||(e.session.remove(t),e.clearSelection())},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"removeline",bindKey:o("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",bindKey:o("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",bindKey:o("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",bindKey:o("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",bindKey:o("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",bindKey:o("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},multiSelectAction:"forEach"},{name:"modifyNumberDown",bindKey:o("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},multiSelectAction:"forEach"},{name:"replace",bindKey:o("Ctrl-H","Command-Option-F"),exec:function(e){i.loadModule("ace/ext/searchbox",function(t){t.Search(e,!0)})}},{name:"undo",bindKey:o("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",bindKey:o("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",bindKey:o("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",bindKey:o("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",bindKey:o("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",bindKey:o("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",bindKey:o("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",bindKey:o("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",bindKey:o("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",bindKey:o("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",bindKey:o("Alt-Delete","Ctrl-K"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",bindKey:o("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",bindKey:o("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",bindKey:o("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",bindKey:o("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",bindKey:o("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",bindKey:o("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",exec:function(e,t){e.insert(r.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",bindKey:o(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",bindKey:o("Ctrl-T","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",bindKey:o("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",bindKey:o("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"expandtoline",bindKey:o("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",bindKey:o(null,null),exec:function(e){var t=e.selection.isBackwards(),n=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),i=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),o=e.session.doc.getLine(n.row).length,u=e.session.doc.getTextRange(e.selection.getRange()),a=u.replace(/\n\s*/," ").length,f=e.session.doc.getLine(n.row);for(var l=n.row+1;l<=i.row+1;l++){var c=r.stringTrimLeft(r.stringTrimRight(e.session.doc.getLine(l)));c.length!==0&&(c=" "+c),f+=c}i.row+1<e.session.doc.getLength()-1&&(f+=e.session.doc.getNewLineCharacter()),e.clearSelection(),e.session.doc.replace(new s(n.row,0,i.row+2,0),f),a>0?(e.selection.moveCursorTo(n.row,n.column),e.selection.selectTo(n.row,n.column+a)):(o=e.session.doc.getLine(n.row).length>o?o+1:o,e.selection.moveCursorTo(n.row,o))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",bindKey:o(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,r=e.selection.rangeList.ranges,i=[];r.length<1&&(r=[e.selection.getRange()]);for(var o=0;o<r.length;o++)o==r.length-1&&(r[o].end.row!==t||r[o].end.column!==n)&&i.push(new s(r[o].end.row,r[o].end.column,t,n)),o===0?(r[o].start.row!==0||r[o].start.column!==0)&&i.push(new s(0,0,r[o].start.row,r[o].start.column)):i.push(new s(r[o-1].end.row,r[o-1].end.column,r[o].start.row,r[o].start.column));e.exitMultiSelectMode(),e.clearSelection();for(var o=0;o<i.length;o++)e.selection.addRange(i[o],!1)},readOnly:!0,scrollIntoView:"none"}]}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,t,n){var r={},i=function(){this.propagationStopped=!0},s=function(){this.defaultPrevented=!0};r._emit=r._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],r=this._defaultHandlers[e];if(!n.length&&!r)return;if(typeof t!="object"||!t)t={};t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=i),t.preventDefault||(t.preventDefault=s),n=n.slice();for(var o=0;o<n.length;o++){n[o](t,this);if(t.propagationStopped)break}if(r&&!t.defaultPrevented)return r(t,this)},r._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(!n)return;n=n.slice();for(var r=0;r<n.length;r++)n[r](t,this)},r.once=function(e,t){var n=this;t&&this.addEventListener(e,function r(){n.removeEventListener(e,r),t.apply(null,arguments)})},r.setDefaultHandler=function(e,t){var n=this._defaultHandlers;n||(n=this._defaultHandlers={_disabled_:{}});if(n[e]){var r=n[e],i=n._disabled_[e];i||(n._disabled_[e]=i=[]),i.push(r);var s=i.indexOf(t);s!=-1&&i.splice(s,1)}n[e]=t},r.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(!n)return;var r=n._disabled_[e];if(n[e]==t){var i=n[e];r&&this.setDefaultHandler(e,r.pop())}else if(r){var s=r.indexOf(t);s!=-1&&r.splice(s,1)}},r.on=r.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[e];return r||(r=this._eventRegistry[e]=[]),r.indexOf(t)==-1&&r[n?"unshift":"push"](t),t},r.off=r.removeListener=r.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(!n)return;var r=n.indexOf(t);r!==-1&&n.splice(r,1)},r.removeAllListeners=function(e){this._eventRegistry&&(this._eventRegistry[e]=[])},t.EventEmitter=r}),ace.define("ace/undomanager",["require","exports","module"],function(e,t,n){var r=function(){this.reset()};(function(){this.execute=function(e){var t=e.args[0];this.$doc=e.args[1],e.merge&&this.hasUndo()&&(this.dirtyCounter--,t=this.$undoStack.pop().concat(t)),this.$undoStack.push(t),this.$redoStack=[],this.dirtyCounter<0&&(this.dirtyCounter=NaN),this.dirtyCounter++},this.undo=function(e){var t=this.$undoStack.pop(),n=null;return t&&(n=this.$doc.undoChanges(t,e),this.$redoStack.push(t),this.dirtyCounter--),n},this.redo=function(e){var t=this.$redoStack.pop(),n=null;return t&&(n=this.$doc.redoChanges(t,e),this.$undoStack.push(t),this.dirtyCounter++),n},this.reset=function(){this.$undoStack=[],this.$redoStack=[],this.dirtyCounter=0},this.hasUndo=function(){return this.$undoStack.length>0},this.hasRedo=function(){return this.$redoStack.length>0},this.markClean=function(){this.dirtyCounter=0},this.isClean=function(){return this.dirtyCounter===0}}).call(r.prototype),t.UndoManager=r}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,t,n){var r=e("./dom");t.get=function(e,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.onreadystatechange=function(){n.readyState===4&&t(n.responseText)},n.send(null)},t.loadScript=function(e,t){var n=r.getDocumentHead(),i=document.createElement("script");i.src=e,n.appendChild(i),i.onload=i.onreadystatechange=function(e,n){if(n||!i.readyState||i.readyState=="loaded"||i.readyState=="complete")i=i.onload=i.onreadystatechange=null,n||t()}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/lib/useragent","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/dom"),s=e("./config"),o=e("./lib/useragent"),u=e("./layer/gutter").Gutter,a=e("./layer/marker").Marker,f=e("./layer/text").Text,l=e("./layer/cursor").Cursor,c=e("./scrollbar").HScrollBar,h=e("./scrollbar").VScrollBar,p=e("./renderloop").RenderLoop,d=e("./layer/font_metrics").FontMetrics,v=e("./lib/event_emitter").EventEmitter,m='.ace_editor {position: relative;overflow: hidden;font-family: \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;font-size: 12px;line-height: normal;direction: ltr;}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;}.ace_content {position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;cursor: text;min-width: 100%;}.ace_dragging, .ace_dragging * {cursor: move !important;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: \'\';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");}.ace_scrollbar {position: absolute;right: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-v{overflow-x: hidden;overflow-y: scroll;top: 0;}.ace_scrollbar-h {overflow-x: scroll;overflow-y: hidden;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;text-indent: -1em;-ms-user-select: text;-moz-user-select: text;-webkit-user-select: text;user-select: text;}.ace_text-input.ace_composition {background: #f8f8f8;color: #111;z-index: 1000;opacity: 1;text-indent: 0;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;white-space: pre;height: 100%;width: 100%;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;/* setting pointer-events: auto; on node under the mouse, which changesduring scroll, will break mouse wheel scrolling in Safari */pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;}.ace_text-layer {font: inherit !important;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;border-left: 2px solid}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0px;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_smooth-blinking .ace_cursor {-moz-transition: opacity 0.18s;-webkit-transition: opacity 0.18s;-o-transition: opacity 0.18s;-ms-transition: opacity 0.18s;transition: opacity 0.18s;}.ace_editor.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;}.ace_line .ace_fold {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;-moz-border-radius: 2px;-webkit-border-radius: 2px;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");}.ace_tooltip {background-color: #FFF;background-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1));background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;display: block;max-width: 100%;padding: 3px 4px;position: fixed;z-index: 999999;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;cursor: default;white-space: pre;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;pointer-events: none;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block;   }.ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");}.ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);-moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);-webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);-moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);-webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}/*** Dark version for fold widgets*/.ace_dark .ace_fold-widget {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");}.ace_dark .ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {-moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);-webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {-moz-transition: opacity 0.4s ease 0.05s;-webkit-transition: opacity 0.4s ease 0.05s;-o-transition: opacity 0.4s ease 0.05s;-ms-transition: opacity 0.4s ease 0.05s;transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {-moz-transition: opacity 0.05s ease 0.05s;-webkit-transition: opacity 0.05s ease 0.05s;-o-transition: opacity 0.05s ease 0.05s;-ms-transition: opacity 0.05s ease 0.05s;transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}';i.importCssString(m,"ace_editor");var g=function(e,t){var n=this;this.container=e||i.createElement("div"),this.$keepTextAreaAtCursor=!o.isOldIE,i.addCssClass(this.container,"ace_editor"),this.setTheme(t),this.$gutter=i.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.scroller=i.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=i.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new u(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new a(this.content);var r=this.$textLayer=new f(this.content);this.canvas=r.element,this.$markerFront=new a(this.content),this.$cursorLayer=new l(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new h(this.container,this),this.scrollBarH=new c(this.container,this),this.scrollBarV.addEventListener("scroll",function(e){n.$scrollAnimation||n.session.setScrollTop(e.data-n.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(e){n.$scrollAnimation||n.session.setScrollLeft(e.data-n.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new d(this.container,500),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.addEventListener("changeCharacterSize",function(e){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal("changeCharacterSize",e)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$loop=new p(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),s.resetOptions(this),s._emit("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,r.implement(this,v),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin()},this.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=e;if(!e)return;this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode)},this.updateLines=function(e,t){t===undefined&&(t=Infinity),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRow<t&&(this.$changedLines.lastRow=t)):this.$changedLines={firstRow:e,lastRow:t};if(this.$changedLines.firstRow>this.layerConfig.lastRow||this.$changedLines.lastRow<this.layerConfig.firstRow)return;this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar()},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(e,t,n,r){if(this.resizing>2)return;this.resizing>0?this.resizing++:this.resizing=e?1:0;var i=this.container;r||(r=i.clientHeight||i.scrollHeight),n||(n=i.clientWidth||i.scrollWidth);var s=this.$updateCachedSize(e,t,n,r);if(!this.$size.scrollerHeight||!n&&!r)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(s|this.$changes,!0):this.$loop.schedule(s|this.$changes),this.resizing&&(this.resizing=0)},this.$updateCachedSize=function(e,t,n,r){r-=this.$extraHeight||0;var i=0,s=this.$size,o={width:s.width,height:s.height,scrollerHeight:s.scrollerHeight,scrollerWidth:s.scrollerWidth};r&&(e||s.height!=r)&&(s.height=r,i|=this.CHANGE_SIZE,s.scrollerHeight=s.height,this.$horizScroll&&(s.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",i|=this.CHANGE_SCROLL);if(n&&(e||s.width!=n)){i|=this.CHANGE_SIZE,s.width=n,t==null&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,this.scrollBarH.element.style.left=this.scroller.style.left=t+"px",s.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()),this.scrollBarH.element.style.right=this.scroller.style.right=this.scrollBarV.getWidth()+"px",this.scroller.style.bottom=this.scrollBarH.getHeight()+"px";if(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)i|=this.CHANGE_FULL}return s.$dirty=!n||!r,i&&this._signal("resize",o),i},this.onGutterResize=function(){var e=this.$showGutter?this.$gutter.offsetWidth:0;e!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,e,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):(this.$computeLayerConfig(),this.$loop.schedule(this.CHANGE_MARKER))},this.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-this.$padding*2,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(e){this.setOption("showInvisibles",e)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},this.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(e){return this.setOption("showGutter",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updateGutterLineHighlight=function(){var e=this.$cursorLayer.$pixelPos,t=this.layerConfig.lineHeight;if(this.session.getUseWrapMode()){var n=this.session.selection.getCursor();n.column=0,e=this.$cursorLayer.getPixelPosition(n,!0),t*=this.session.getRowLength(n.row)}this.$gutterLineHighlight.style.top=e.top-this.layerConfig.offset+"px",this.$gutterLineHighlight.style.height=t+"px"},this.$updatePrintMargin=function(){if(!this.$showPrintMargin&&!this.$printMarginEl)return;if(!this.$printMarginEl){var e=i.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=i.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=this.characterWidth*this.$printMarginColumn+this.$padding+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.content},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(!this.$keepTextAreaAtCursor)return;var e=this.layerConfig,t=this.$cursorLayer.$pixelPos.top,n=this.$cursorLayer.$pixelPos.left;t-=e.offset;var r=this.lineHeight;if(t<0||t>e.height-r)return;var i=this.characterWidth;if(this.$composition){var s=this.textarea.value.replace(/^\x01+/,"");i*=this.session.$getStringScreenWidth(s)[0]+2,r+=2,t-=1}n-=this.scrollLeft,n>this.$size.scrollerWidth-i&&(n=this.$size.scrollerWidth-i),n-=this.scrollBar.width,this.textarea.style.height=r+"px",this.textarea.style.width=i+"px",this.textarea.style.right=Math.max(0,this.$size.scrollerWidth-n-i)+"px",this.textarea.style.bottom=Math.max(0,this.$size.height-t-r)+"px"},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},this.getLastFullyVisibleRow=function(){var e=Math.floor((this.layerConfig.height+this.layerConfig.offset)/this.layerConfig.lineHeight);return this.layerConfig.firstRow-1+e},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(e,t,n,r){var i=this.scrollMargin;i.top=e|0,i.bottom=t|0,i.right=r|0,i.left=n|0,i.v=i.top+i.bottom,i.h=i.left+i.right,i.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-i.top),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},this.getVScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},this.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(e,t){this.$changes&&(e|=this.$changes,this.$changes=0);if(!this.session||!this.container.offsetWidth||this.$frozen||!e&&!t){this.$changes|=e;return}if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender");var n=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL)e|=this.$computeLayerConfig(),n=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),this.$gutterLayer.element.style.marginTop=-n.offset+"px",this.content.style.marginTop=-n.offset+"px",this.content.style.width=n.width+2*this.$padding+"px",this.content.style.height=n.minHeight+"px";e&this.CHANGE_H_SCROLL&&(this.content.style.marginLeft=-this.scrollLeft+"px",this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left");if(e&this.CHANGE_FULL){this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this._signal("afterRender");return}if(e&this.CHANGE_SCROLL){e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(n):this.$textLayer.scrollLines(n),this.$showGutter&&this.$gutterLayer.update(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this.$moveTextAreaToCursor(),this._signal("afterRender");return}e&this.CHANGE_TEXT?(this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n)):e&this.CHANGE_LINES?(this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n):(e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER)&&this.$showGutter&&this.$gutterLayer.update(n),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(n),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(n),this._signal("afterRender")},this.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,n=Math.max((this.$minLines||1)*this.lineHeight,Math.min(t,e))+this.scrollMargin.v+(this.$extraHeight||0),r=e>t;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||r!=this.$vScroll){r!=this.$vScroll&&(this.$vScroll=r,this.scrollBarV.setVisible(r));var i=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,i,n),this.desiredHeight=n}},this.$computeLayerConfig=function(){this.$maxLines&&this.lineHeight>1&&this.$autosize();var e=this.session,t=this.$size,n=t.height<=2*this.lineHeight,r=this.session.getScreenLength(),i=r*this.lineHeight,s=this.scrollTop%this.lineHeight,o=t.scrollerHeight+this.lineHeight,u=this.$getLongestLine(),a=!n&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-u-2*this.$padding<0),f=this.$horizScroll!==a;f&&(this.$horizScroll=a,this.scrollBarH.setVisible(a)),!this.$maxLines&&this.$scrollPastEnd&&(i+=(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd);var l=!n&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-i<0),c=this.$vScroll!==l;c&&(this.$vScroll=l,this.scrollBarV.setVisible(l)),this.session.setScrollTop(Math.max(-this.scrollMargin.top,Math.min(this.scrollTop,i-t.scrollerHeight+this.scrollMargin.bottom))),this.session.setScrollLeft(Math.max(-this.scrollMargin.left,Math.min(this.scrollLeft,u+2*this.$padding-t.scrollerWidth+this.scrollMargin.right)));var h=Math.ceil(o/this.lineHeight)-1,p=Math.max(0,Math.round((this.scrollTop-s)/this.lineHeight)),d=p+h,v,m,g=this.lineHeight;p=e.screenToDocumentRow(p,0);var y=e.getFoldLine(p);y&&(p=y.start.row),v=e.documentToScreenRow(p,0),m=e.getRowLength(p)*g,d=Math.min(e.screenToDocumentRow(d,0),e.getLength()-1),o=t.scrollerHeight+e.getRowLength(d)*g+m,s=this.scrollTop-v*g;var b=0;this.layerConfig.width!=u&&(b=this.CHANGE_H_SCROLL);if(f||c)b=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),c&&(u=this.$getLongestLine());return this.layerConfig={width:u,padding:this.$padding,firstRow:p,firstRowScreen:v,lastRow:d,lineHeight:g,characterWidth:this.characterWidth,minHeight:o,maxHeight:i,offset:s,gutterOffset:Math.max(0,Math.ceil((s+t.height-t.scrollerHeight)/g)),height:this.$size.scrollerHeight},b},this.$updateLines=function(){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(e>n.lastRow+1)return;if(t<n.firstRow)return;if(t===Infinity){this.$showGutter&&this.$gutterLayer.update(n),this.$textLayer.update(n);return}return this.$textLayer.updateLines(n,e,t),!0},this.$getLongestLine=function(){var e=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(e+=1),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},this.updateBreakpoints=function(e){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(e,t,n){this.scrollCursorIntoView(e,n),this.scrollCursorIntoView(t,n)},this.scrollCursorIntoView=function(e,t,n){if(this.$size.scrollerHeight===0)return;var r=this.$cursorLayer.getPixelPosition(e),i=r.left,s=r.top,o=n&&n.top||0,u=n&&n.bottom||0,a=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;a+o>s?(t&&(s-=t*this.$size.scrollerHeight),s===0&&(s=-this.scrollMargin.top),this.session.setScrollTop(s)):a+this.$size.scrollerHeight-u<s+this.lineHeight&&(t&&(s+=t*this.$size.scrollerHeight),this.session.setScrollTop(s+this.lineHeight-this.$size.scrollerHeight));var f=this.scrollLeft;f>i?(i<this.$padding+2*this.layerConfig.characterWidth&&(i=-this.scrollMargin.left),this.session.setScrollLeft(i)):f+this.$size.scrollerWidth<i+this.characterWidth?this.session.setScrollLeft(Math.round(i+this.characterWidth-this.$size.scrollerWidth)):f<=this.$padding&&i-f<this.characterWidth&&this.session.setScrollLeft(0)},this.getScrollTop=function(){return this.session.getScrollTop()},this.getScrollLeft=function(){return this.session.getScrollLeft()},this.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},this.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},this.scrollToRow=function(e){this.session.setScrollTop(e*this.lineHeight)},this.alignCursor=function(e,t){typeof e=="number"&&(e={row:e,column:0});var n=this.$cursorLayer.getPixelPosition(e),r=this.$size.scrollerHeight-this.lineHeight,i=n.top-r*(t||0);return this.session.setScrollTop(i),i},this.STEPS=8,this.$calcSteps=function(e,t){var n=0,r=this.STEPS,i=[],s=function(e,t,n){return n*(Math.pow(e-1,3)+1)+t};for(n=0;n<r;++n)i.push(s(n/this.STEPS,e,t-e));return i},this.scrollToLine=function(e,t,n,r){var i=this.$cursorLayer.getPixelPosition({row:e,column:0}),s=i.top;t&&(s-=this.$size.scrollerHeight/2);var o=this.scrollTop;this.session.setScrollTop(s),n!==!1&&this.animateScrolling(o,r)},this.animateScrolling=function(e,t){var n=this.scrollTop;if(!this.$animatedScroll)return;var r=this;if(e==n)return;if(this.$scrollAnimation){var i=this.$scrollAnimation.steps;if(i.length){e=i[0];if(e==n)return}}var s=r.$calcSteps(e,n);this.$scrollAnimation={from:e,to:n,steps:s},clearInterval(this.$timer),r.session.setScrollTop(s.shift()),r.session.$scrollTop=n,this.$timer=setInterval(function(){s.length?(r.session.setScrollTop(s.shift()),r.session.$scrollTop=n):n!=null?(r.session.$scrollTop=-1,r.session.setScrollTop(n),n=null):(r.$timer=clearInterval(r.$timer),r.$scrollAnimation=null,t&&t())},10)},this.scrollToY=function(e){this.scrollTop!==e&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=e)},this.scrollToX=function(e){this.scrollLeft!==e&&(this.scrollLeft=e),this.$loop.schedule(this.CHANGE_H_SCROLL)},this.scrollTo=function(e,t){this.session.setScrollTop(t),this.session.setScrollLeft(t)},this.scrollBy=function(e,t){t&&this.session.setScrollTop(this.session.getScrollTop()+t),e&&this.session.setScrollLeft(this.session.getScrollLeft()+e)},this.isScrollableBy=function(e,t){if(t<0&&this.session.getScrollTop()>=1-this.scrollMargin.top)return!0;if(t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom)return!0;if(e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left)return!0;if(e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},this.pixelToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=(e+this.scrollLeft-n.left-this.$padding)/this.characterWidth,i=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),s=Math.round(r);return{row:i,column:s,side:r-s>0?1:-1}},this.screenToTextCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=Math.round((e+this.scrollLeft-n.left-this.$padding)/this.characterWidth),i=(t+this.scrollTop-n.top)/this.lineHeight;return this.session.screenToDocumentPosition(i,Math.max(r,0))},this.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=this.session.documentToScreenPosition(e,t),i=this.$padding+Math.round(r.column*this.characterWidth),s=r.row*this.lineHeight;return{pageX:n.left+i-this.scrollLeft,pageY:n.top+s-this.scrollTop}},this.visualizeFocus=function(){i.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){i.removeCssClass(this.container,"ace_focus")},this.showComposition=function(e){this.$composition||(this.$composition={keepTextAreaAtCursor:this.$keepTextAreaAtCursor,cssText:this.textarea.style.cssText}),this.$keepTextAreaAtCursor=!0,i.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor()},this.setCompositionText=function(e){this.$moveTextAreaToCursor()},this.hideComposition=function(){if(!this.$composition)return;i.removeCssClass(this.textarea,"ace_composition"),this.$keepTextAreaAtCursor=this.$composition.keepTextAreaAtCursor,this.textarea.style.cssText=this.$composition.cssText,this.$composition=null},this.setTheme=function(e,t){function o(r){if(n.$themeId!=e)return t&&t();if(!r.cssClass)return;i.importCssString(r.cssText,r.cssClass,n.container.ownerDocument),n.theme&&i.removeCssClass(n.container,n.theme.cssClass);var s="padding"in r?r.padding:"padding"in(n.theme||{})?4:n.$padding;n.$padding&&s!=n.$padding&&n.setPadding(s),n.$theme=r.cssClass,n.theme=r,i.addCssClass(n.container,r.cssClass),i.setCssClass(n.container,"ace_dark",r.isDark),n.$size&&(n.$size.width=0,n.$updateSizeAsync()),n._dispatchEvent("themeLoaded",{theme:r}),t&&t()}var n=this;this.$themeId=e,n._dispatchEvent("themeChange",{theme:e});if(!e||typeof e=="string"){var r=e||this.$options.theme.initialValue;s.loadModule(["theme",r],o)}else o(e)},this.getTheme=function(){return this.$themeId},this.setStyle=function(e,t){i.setCssClass(this.container,e,t!==!1)},this.unsetStyle=function(e){i.removeCssClass(this.container,e)},this.setCursorStyle=function(e){this.content.style.cursor!=e&&(this.content.style.cursor=e)},this.setMouseCursor=function(e){this.content.style.cursor=e},this.destroy=function(){this.$textLayer.destroy(),this.$cursorLayer.destroy()}}).call(g.prototype),s.defineOptions(g.prototype,"renderer",{animatedScroll:{initialValue:!1},showInvisibles:{set:function(e){this.$textLayer.setShowInvisibles(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(e){typeof e=="number"&&(this.$printMarginColumn=e),this.$showPrintMargin=!!e,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(e){this.$gutter.style.display=e?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},fadeFoldWidgets:{set:function(e){i.setCssClass(this.$gutter,"ace_fade-fold-widgets",e)},initialValue:!1},showFoldWidgets:{set:function(e){this.$gutterLayer.setShowFoldWidgets(e)},initialValue:!0},showLineNumbers:{set:function(e){this.$gutterLayer.setShowLineNumbers(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(e){this.$textLayer.setDisplayIndentGuides(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightGutterLine:{set:function(e){if(!this.$gutterLineHighlight){this.$gutterLineHighlight=i.createElement("div"),this.$gutterLineHighlight.className="ace_gutter-active-line",this.$gutter.appendChild(this.$gutterLineHighlight);return}this.$gutterLineHighlight.style.display=e?"":"none",this.$cursorLayer.$pixelPos&&this.$updateGutterLineHighlight()},initialValue:!1,value:!0},hScrollBarAlwaysVisible:{set:function(e){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(e){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(e){typeof e=="number"&&(e+="px"),this.container.style.fontSize=e,this.updateFontSize()},initialValue:12},fontFamily:{set:function(e){this.container.style.fontFamily=e,this.updateFontSize()}},maxLines:{set:function(e){this.updateFull()}},minLines:{set:function(e){this.updateFull()}},scrollPastEnd:{set:function(e){e=+e||0;if(this.$scrollPastEnd==e)return;this.$scrollPastEnd=e,this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(e){this.$gutterLayer.$fixedWidth=!!e,this.$loop.schedule(this.CHANGE_GUTTER)}},theme:{set:function(e){this.setTheme(e)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0}}),t.VirtualRenderer=g}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/lib/net","ace/lib/event_emitter"],function(e,t,n){"no use strict";function f(r){a.packaged=r||e.packaged||n.packaged||u.define&&define.packaged;if(!u.document)return"";var i={},s="",o=document.getElementsByTagName("script");for(var f=0;f<o.length;f++){var c=o[f],h=c.src||c.getAttribute("src");if(!h)continue;var p=c.attributes;for(var d=0,v=p.length;d<v;d++){var m=p[d];m.name.indexOf("data-ace-")===0&&(i[l(m.name.replace(/^data-ace-/,""))]=m.value)}var g=h.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);g&&(s=g[1])}s&&(i.base=i.base||s,i.packaged=!0),i.basePath=i.base,i.workerPath=i.workerPath||i.base,i.modePath=i.modePath||i.base,i.themePath=i.themePath||i.base,delete i.base;for(var y in i)typeof i[y]!="undefined"&&t.set(y,i[y])}function l(e){return e.replace(/-(.)/g,function(e,t){return t.toUpperCase()})}var r=e("./lib/lang"),i=e("./lib/oop"),s=e("./lib/net"),o=e("./lib/event_emitter").EventEmitter,u=function(){return this}(),a={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{}};t.get=function(e){if(!a.hasOwnProperty(e))throw new Error("Unknown config key: "+e);return a[e]},t.set=function(e,t){if(!a.hasOwnProperty(e))throw new Error("Unknown config key: "+e);a[e]=t},t.all=function(){return r.copyObject(a)},i.implement(t,o),t.moduleUrl=function(e,t){if(a.$moduleUrls[e])return a.$moduleUrls[e];var n=e.split("/");t=t||n[n.length-2]||"";var r=t=="snippets"?"/":"-",i=n[n.length-1];if(r=="-"){var s=new RegExp("^"+t+"[\\-_]|[\\-_]"+t+"$","g");i=i.replace(s,"")}(!i||i==t)&&n.length>1&&(i=n[n.length-2]);var o=a[t+"Path"];return o==null?o=a.basePath:r=="/"&&(t=r=""),o&&o.slice(-1)!="/"&&(o+="/"),o+t+r+i+this.get("suffix")},t.setModuleUrl=function(e,t){return a.$moduleUrls[e]=t},t.$loading={},t.loadModule=function(n,r){var i,o;Array.isArray(n)&&(o=n[0],n=n[1]);try{i=e(n)}catch(u){}if(i&&!t.$loading[n])return r&&r(i);t.$loading[n]||(t.$loading[n]=[]),t.$loading[n].push(r);if(t.$loading[n].length>1)return;var a=function(){e([n],function(e){t._emit("load.module",{name:n,module:e});var r=t.$loading[n];t.$loading[n]=null,r.forEach(function(t){t&&t(e)})})};if(!t.get("packaged"))return a();s.loadScript(t.moduleUrl(n,o),a)},f(!0),t.init=f;var c={setOptions:function(e){Object.keys(e).forEach(function(t){this.setOption(t,e[t])},this)},getOptions:function(e){var t={};return e?Array.isArray(e)||(t=e,e=Object.keys(t)):e=Object.keys(this.$options),e.forEach(function(e){t[e]=this.getOption(e)},this),t},setOption:function(e,t){if(this["$"+e]===t)return;var n=this.$options[e];if(!n)return typeof console!="undefined"&&console.warn&&console.warn('misspelled option "'+e+'"'),undefined;if(n.forwardTo)return this[n.forwardTo]&&this[n.forwardTo].setOption(e,t);n.handlesSet||(this["$"+e]=t),n&&n.set&&n.set.call(this,t)},getOption:function(e){var t=this.$options[e];return t?t.forwardTo?this[t.forwardTo]&&this[t.forwardTo].getOption(e):t&&t.get?t.get.call(this):this["$"+e]:(typeof console!="undefined"&&console.warn&&console.warn('misspelled option "'+e+'"'),undefined)}},h={};t.defineOptions=function(e,t,n){return e.$options||(h[t]=e.$options={}),Object.keys(n).forEach(function(t){var r=n[t];typeof r=="string"&&(r={forwardTo:r}),r.name||(r.name=t),e.$options[r.name]=r,"initialValue"in r&&(e["$"+r.name]=r.initialValue)}),i.implement(e,c),this},t.resetOptions=function(e){Object.keys(e.$options).forEach(function(t){var n=e.$options[t];"value"in n&&e.setOption(t,n.value)})},t.setDefaultValue=function(e,n,r){var i=h[e]||(h[e]={});i[n]&&(i.forwardTo?t.setDefaultValue(i.forwardTo,n,r):i[n].value=r)},t.setDefaultValues=function(e,n){Object.keys(n).forEach(function(r){t.setDefaultValue(e,r,n[r])})}}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter"],function(e,t,n){var r=e("../lib/dom"),i=e("../lib/oop"),s=e("../lib/lang"),o=e("../lib/event_emitter").EventEmitter,u=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$cells=[]};(function(){i.implement(this,o),this.setSession=function(e){this.session&&this.session.removeEventListener("change",this.$updateAnnotations),this.session=e,e.on("change",this.$updateAnnotations)},this.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,t)},this.setAnnotations=function(e){this.$annotations=[];for(var t=0;t<e.length;t++){var n=e[t],r=n.row,i=this.$annotations[r];i||(i=this.$annotations[r]={text:[]});var o=n.text;o=o?s.escapeHTML(o):n.html||"",i.text.indexOf(o)===-1&&i.text.push(o);var u=n.type;u=="error"?i.className=" ace_error":u=="warning"&&i.className!=" ace_error"?i.className=" ace_warning":u=="info"&&!i.className&&(i.className=" ace_info")}},this.$updateAnnotations=function(e){if(!this.$annotations.length)return;var t=e.data,n=t.range,r=n.start.row,i=n.end.row-r;if(i!==0)if(t.action=="removeText"||t.action=="removeLines")this.$annotations.splice(r,i+1,null);else{var s=new Array(i+1);s.unshift(r,1),this.$annotations.splice.apply(this.$annotations,s)}},this.update=function(e){var t=this.session,n=e.firstRow,i=Math.min(e.lastRow+e.gutterOffset,t.getLength()-1),s=t.getNextFoldLine(n),o=s?s.start.row:Infinity,u=this.$showFoldWidgets&&t.foldWidgets,a=t.$breakpoints,f=t.$decorations,l=t.$firstLineNumber,c=0,h=t.gutterRenderer||this.$renderer,p=null,d=-1,v=n;for(;;){v>o&&(v=s.end.row+1,s=t.getNextFoldLine(v,s),o=s?s.start.row:Infinity);if(v>i){while(this.$cells.length>d+1)p=this.$cells.pop(),this.element.removeChild(p.element);break}p=this.$cells[++d],p||(p={element:null,textNode:null,foldWidget:null},p.element=r.createElement("div"),p.textNode=document.createTextNode(""),p.element.appendChild(p.textNode),this.element.appendChild(p.element),this.$cells[d]=p);var m="ace_gutter-cell ";a[v]&&(m+=a[v]),f[v]&&(m+=f[v]),this.$annotations[v]&&(m+=this.$annotations[v].className),p.element.className!=m&&(p.element.className=m);var g=t.getRowLength(v)*e.lineHeight+"px";g!=p.element.style.height&&(p.element.style.height=g);if(u){var y=u[v];y==null&&(y=u[v]=t.getFoldWidget(v))}if(y){p.foldWidget||(p.foldWidget=r.createElement("span"),p.element.appendChild(p.foldWidget));var m="ace_fold-widget ace_"+y;y=="start"&&v==o&&v<s.end.row?m+=" ace_closed":m+=" ace_open",p.foldWidget.className!=m&&(p.foldWidget.className=m);var g=e.lineHeight+"px";p.foldWidget.style.height!=g&&(p.foldWidget.style.height=g)}else p.foldWidget&&(p.element.removeChild(p.foldWidget),p.foldWidget=null);var b=c=h?h.getText(t,v):v+l;b!=p.textNode.data&&(p.textNode.data=b),v++}this.element.style.height=e.minHeight+"px";if(this.$fixedWidth||t.$useWrapMode)c=t.getLength()+l;var w=h?h.getWidth(t,c,e):c.toString().length*e.characterWidth,E=this.$padding||this.$computePadding();w+=E.left+E.right,w!==this.gutterWidth&&!isNaN(w)&&(this.gutterWidth=w,this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._emit("changeGutterWidth",w))},this.$fixedWidth=!1,this.$showLineNumbers=!0,this.$renderer="",this.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return""},getText:function(){return""}}},this.getShowLineNumbers=function(){return this.$showLineNumbers},this.$showFoldWidgets=!0,this.setShowFoldWidgets=function(e){e?r.addCssClass(this.element,"ace_folding-enabled"):r.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},this.getShowFoldWidgets=function(){return this.$showFoldWidgets},this.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=r.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=parseInt(e.paddingLeft)+1||0,this.$padding.right=parseInt(e.paddingRight)||0,this.$padding},this.getRegion=function(e){var t=this.$padding||this.$computePadding(),n=this.element.getBoundingClientRect();if(e.x<t.left+n.left)return"markers";if(this.$showFoldWidgets&&e.x>n.right-t.right)return"foldWidgets"}}).call(u.prototype),t.Gutter=u}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,t,n){function f(e){function T(e,n){var r=Date.now(),i=!n||e.row!=n.row,s=!n||e.column!=n.column;if(!S||i||s)t.$blockScrolling+=1,t.moveCursorToPosition(e),t.$blockScrolling-=1,S=r,x={x:p,y:d};else{var o=l(x.x,x.y,p,d);o>a?S=null:r-S>=u&&(t.renderer.scrollCursorIntoView(),S=null)}}function N(e,n){var r=Date.now(),i=t.renderer.layerConfig.lineHeight,s=t.renderer.layerConfig.characterWidth,u=t.renderer.scroller.getBoundingClientRect(),a={x:{left:p-u.left,right:u.right-p},y:{top:d-u.top,bottom:u.bottom-d}},f=Math.min(a.x.left,a.x.right),l=Math.min(a.y.top,a.y.bottom),c={row:e.row,column:e.column};f/s<=2&&(c.column+=a.x.left<a.x.right?-3:2),l/i<=1&&(c.row+=a.y.top<a.y.bottom?-1:1);var h=e.row!=c.row,v=e.column!=c.column,m=!n||e.row!=n.row;h||v&&!m?E?r-E>=o&&t.renderer.scrollCursorIntoView(c):E=r:E=null}function C(){var e=g;g=t.renderer.screenToTextCoordinates(p,d),T(g,e),N(g,e)}function k(){m=t.selection.toOrientedRange(),h=t.session.addMarker(m,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(v),v=setInterval(C,20),y=0,i.addListener(document,"mousemove",O)}function L(){clearInterval(v),t.session.removeMarker(h),h=null,t.$blockScrolling+=1,t.selection.fromOrientedRange(m),t.$blockScrolling-=1,t.isFocused()&&!w&&t.renderer.$cursorLayer.setBlinking(!t.getReadOnly()),m=null,y=0,E=null,S=null,i.removeListener(document,"mousemove",O)}function O(){A==null&&(A=setTimeout(function(){A!=null&&h&&L()},20))}function M(e){var t=e.types;return!t||Array.prototype.some.call(t,function(e){return e=="text/plain"||e=="Text"})}function _(e){var t=["copy","copymove","all","uninitialized"],n=["move","copymove","linkmove","all","uninitialized"],r=s.isMac?e.altKey:e.ctrlKey,i="uninitialized";try{i=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var o="none";return r&&t.indexOf(i)>=0?o="copy":n.indexOf(i)>=0?o="move":t.indexOf(i)>=0&&(o="copy"),o}var t=e.editor,n=r.createElement("img");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",s.isOpera&&(n.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;");var f=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];f.forEach(function(t){e[t]=this[t]},this),t.addEventListener("mousedown",this.onMouseDown.bind(e));var c=t.container,h,p,d,v,m,g,y=0,b,w,E,S,x;this.onDragStart=function(e){if(this.cancelDrag||!c.draggable){var r=this;return setTimeout(function(){r.startSelect(),r.captureMouse(e)},0),e.preventDefault()}m=t.getSelectionRange();var i=e.dataTransfer;i.effectAllowed=t.getReadOnly()?"copy":"copyMove",s.isOpera&&(t.container.appendChild(n),n._top=n.offsetTop),i.setDragImage&&i.setDragImage(n,0,0),s.isOpera&&t.container.removeChild(n),i.clearData(),i.setData("Text",t.session.getTextRange()),w=!0,this.setState("drag")},this.onDragEnd=function(e){c.draggable=!1,w=!1,this.setState(null);if(!t.getReadOnly()){var n=e.dataTransfer.dropEffect;!b&&n=="move"&&t.session.remove(t.getSelectionRange()),t.renderer.$cursorLayer.setBlinking(!0)}this.editor.unsetStyle("ace_dragging")},this.onDragEnter=function(e){if(t.getReadOnly()||!M(e.dataTransfer))return;return h||k(),y++,e.dataTransfer.dropEffect=b=_(e),i.preventDefault(e)},this.onDragOver=function(e){if(t.getReadOnly()||!M(e.dataTransfer))return;return h||(k(),y++),A!==null&&(A=null),p=e.clientX,d=e.clientY,e.dataTransfer.dropEffect=b=_(e),i.preventDefault(e)},this.onDragLeave=function(e){y--;if(y<=0&&h)return L(),b=null,i.preventDefault(e)},this.onDrop=function(e){if(!h)return;var n=e.dataTransfer;if(w)switch(b){case"move":m.contains(g.row,g.column)?m={start:g,end:g}:m=t.moveText(m,g);break;case"copy":m=t.moveText(m,g,!0)}else{var r=n.getData("Text");m={start:g,end:t.session.insert(g,r)},t.focus(),b=null}return L(),i.preventDefault(e)},i.addListener(c,"dragstart",this.onDragStart.bind(e)),i.addListener(c,"dragend",this.onDragEnd.bind(e)),i.addListener(c,"dragenter",this.onDragEnter.bind(e)),i.addListener(c,"dragover",this.onDragOver.bind(e)),i.addListener(c,"dragleave",this.onDragLeave.bind(e)),i.addListener(c,"drop",this.onDrop.bind(e));var A=null}function l(e,t,n,r){return Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2))}var r=e("../lib/dom"),i=e("../lib/event"),s=e("../lib/useragent"),o=200,u=200,a=5;(function(){this.dragWait=function(){var e=Date.now()-this.mousedownEvent.time;e>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var e=this.editor.container;e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly()),this.editor.unsetStyle("ace_dragging"),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor.container;e.draggable=!0,this.editor.renderer.$cursorLayer.setBlinking(!1),this.editor.setStyle("ace_dragging"),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;if(s.isIE&&this.state=="dragReady"){var n=l(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>3&&t.dragDrop()}if(this.state==="dragWait"){var n=l(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(e){if(!this.$dragEnabled)return;this.mousedownEvent=e;var t=this.editor,n=e.inSelection(),r=e.getButton(),i=e.domEvent.detail||1;if(i===1&&r===0&&n){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var o=e.domEvent.target||e.domEvent.srcElement;"unselectable"in o&&(o.unselectable="on");if(t.getDragDelay()){if(s.isWebKit){this.cancelDrag=!0;var u=t.container;u.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}).call(f.prototype),t.DragdropHandler=f}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,t,n){var r=e("../range").Range,i=e("../lib/dom"),s=function(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)};(function(){this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.update=function(e){var e=e||this.config;if(!e)return;this.config=e;var t=[];for(var n in this.markers){var r=this.markers[n];if(!r.range){r.update(t,this,this.session,e);continue}var s=r.range.clipRows(e.firstRow,e.lastRow);if(s.isEmpty())continue;s=s.toScreenRange(this.session);if(r.renderer){var o=this.$getTop(s.start.row,e),u=this.$padding+s.start.column*e.characterWidth;r.renderer(t,s,u,o,e)}else r.type=="fullLine"?this.drawFullLineMarker(t,s,r.clazz,e):r.type=="screenLine"?this.drawScreenLineMarker(t,s,r.clazz,e):s.isMultiLine()?r.type=="text"?this.drawTextMarker(t,s,r.clazz,e):this.drawMultiLineMarker(t,s,r.clazz,e):this.drawSingleLineMarker(t,s,r.clazz+" ace_start",e)}this.element=i.setInnerHtml(this.element,t.join(""))},this.$getTop=function(e,t){return(e-t.firstRowScreen)*t.lineHeight},this.drawTextMarker=function(e,t,n,i,s){var o=t.start.row,u=new r(o,t.start.column,o,this.session.getScreenLastRowColumn(o));this.drawSingleLineMarker(e,u,n+" ace_start",i,1,s),o=t.end.row,u=new r(o,0,o,t.end.column),this.drawSingleLineMarker(e,u,n,i,0,s);for(o=t.start.row+1;o<t.end.row;o++)u.start.row=o,u.end.row=o,u.end.column=this.session.getScreenLastRowColumn(o),this.drawSingleLineMarker(e,u,n,i,1,s)},this.drawMultiLineMarker=function(e,t,n,r,i){var s=this.$padding,o=r.lineHeight,u=this.$getTop(t.start.row,r),a=s+t.start.column*r.characterWidth;i=i||"",e.push("<div class='",n," ace_start' style='","height:",o,"px;","right:0;","top:",u,"px;","left:",a,"px;",i,"'></div>"),u=this.$getTop(t.end.row,r);var f=t.end.column*r.characterWidth;e.push("<div class='",n,"' style='","height:",o,"px;","width:",f,"px;","top:",u,"px;","left:",s,"px;",i,"'></div>"),o=(t.end.row-t.start.row-1)*r.lineHeight;if(o<0)return;u=this.$getTop(t.start.row+1,r),e.push("<div class='",n,"' style='","height:",o,"px;","right:0;","top:",u,"px;","left:",s,"px;",i,"'></div>")},this.drawSingleLineMarker=function(e,t,n,r,i,s){var o=r.lineHeight,u=(t.end.column+(i||0)-t.start.column)*r.characterWidth,a=this.$getTop(t.start.row,r),f=this.$padding+t.start.column*r.characterWidth;e.push("<div class='",n,"' style='","height:",o,"px;","width:",u,"px;","top:",a,"px;","left:",f,"px;",s||"","'></div>")},this.drawFullLineMarker=function(e,t,n,r,i){var s=this.$getTop(t.start.row,r),o=r.lineHeight;t.start.row!=t.end.row&&(o+=this.$getTop(t.end.row,r)-s),e.push("<div class='",n,"' style='","height:",o,"px;","top:",s,"px;","left:0;right:0;",i||"","'></div>")},this.drawScreenLineMarker=function(e,t,n,r,i){var s=this.$getTop(t.start.row,r),o=r.lineHeight;e.push("<div class='",n,"' style='","height:",o,"px;","top:",s,"px;","left:0;right:0;",i||"","'></div>")}}).call(s.prototype),t.Marker=s}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,n){var r=e("../lib/event"),i=e("../lib/useragent"),s=t.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){r.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){r.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},this.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var e=this.editor,t=e.getSelectionRange();if(t.isEmpty())this.$inSelection=!1;else{var n=this.getDocumentPosition();this.$inSelection=t.contains(n.row,n.column)}return this.$inSelection},this.getButton=function(){return r.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=i.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(s.prototype)}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(e,t,n){var r=e("../lib/oop"),i=e("../lib/dom"),s=e("../lib/lang"),o=e("../lib/useragent"),u=e("../lib/event_emitter").EventEmitter,a=function(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this)};(function(){r.implement(this,u),this.EOF_CHAR="\xb6",this.EOL_CHAR_LF="\xac",this.EOL_CHAR_CRLF="\xa4",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="\u2192",this.SPACE_CHAR="\xb7",this.$padding=0,this.$updateEolChar=function(){var e=this.session.doc.getNewLineCharacter()=="\n"?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=e)return this.EOL_CHAR=e,!0},this.setPadding=function(e){this.$padding=e,this.element.style.padding="0 "+e+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(e){this.session=e,this.$computeTabString()},this.showInvisibles=!1,this.setShowInvisibles=function(e){return this.showInvisibles==e?!1:(this.showInvisibles=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides==e?!1:(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;var t=this.$tabStrings=[0];for(var n=1;n<e+1;n++)this.showInvisibles?t.push("<span class='ace_invisible ace_invisible_tab'>"+this.TAB_CHAR+s.stringRepeat("\xa0",n-1)+"</span>"):t.push(s.stringRepeat("\xa0",n));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var r="ace_indent-guide",i="",o="";if(this.showInvisibles){r+=" ace_invisible",i=" ace_invisible_space",o=" ace_invisible_tab";var u=s.stringRepeat(this.SPACE_CHAR,this.tabSize),a=this.TAB_CHAR+s.stringRepeat("\xa0",this.tabSize-1)}else var u=s.stringRepeat("\xa0",this.tabSize),a=u;this.$tabStrings[" "]="<span class='"+r+i+"'>"+u+"</span>",this.$tabStrings["	"]="<span class='"+r+o+"'>"+a+"</span>"}},this.updateLines=function(e,t,n){(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)&&this.scrollLines(e),this.config=e;var r=Math.max(t,e.firstRow),s=Math.min(n,e.lastRow),o=this.element.childNodes,u=0;for(var a=e.firstRow;a<r;a++){var f=this.session.getFoldLine(a);if(f){if(f.containsRow(r)){r=f.start.row;break}a=f.end.row}u++}var a=r,f=this.session.getNextFoldLine(a),l=f?f.start.row:Infinity;for(;;){a>l&&(a=f.end.row+1,f=this.session.getNextFoldLine(a,f),l=f?f.start.row:Infinity);if(a>s)break;var c=o[u++];if(c){var h=[];this.$renderLine(h,a,!this.$useLineGroups(),a==l?f:!1),c.style.height=e.lineHeight*this.session.getRowLength(a)+"px",i.setInnerHtml(c,h.join(""))}a++}},this.scrollLines=function(e){var t=this.config;this.config=e;if(!t||t.lastRow<e.firstRow)return this.update(e);if(e.lastRow<t.firstRow)return this.update(e);var n=this.element;if(t.firstRow<e.firstRow)for(var r=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);r>0;r--)n.removeChild(n.firstChild);if(t.lastRow>e.lastRow)for(var r=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);r>0;r--)n.removeChild(n.lastChild);if(e.firstRow<t.firstRow){var i=this.$renderLinesFragment(e,e.firstRow,t.firstRow-1);n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i)}if(e.lastRow>t.lastRow){var i=this.$renderLinesFragment(e,t.lastRow+1,e.lastRow);n.appendChild(i)}},this.$renderLinesFragment=function(e,t,n){var r=this.element.ownerDocument.createDocumentFragment(),s=t,o=this.session.getNextFoldLine(s),u=o?o.start.row:Infinity;for(;;){s>u&&(s=o.end.row+1,o=this.session.getNextFoldLine(s,o),u=o?o.start.row:Infinity);if(s>n)break;var a=i.createElement("div"),f=[];this.$renderLine(f,s,!1,s==u?o:!1),a.innerHTML=f.join("");if(this.$useLineGroups())a.className="ace_line_group",r.appendChild(a),a.style.height=e.lineHeight*this.session.getRowLength(s)+"px";else while(a.firstChild)r.appendChild(a.firstChild);s++}return r},this.update=function(e){this.config=e;var t=[],n=e.firstRow,r=e.lastRow,s=n,o=this.session.getNextFoldLine(s),u=o?o.start.row:Infinity;for(;;){s>u&&(s=o.end.row+1,o=this.session.getNextFoldLine(s,o),u=o?o.start.row:Infinity);if(s>r)break;this.$useLineGroups()&&t.push("<div class='ace_line_group' style='height:",e.lineHeight*this.session.getRowLength(s),"px'>"),this.$renderLine(t,s,!1,s==u?o:!1),this.$useLineGroups()&&t.push("</div>"),s++}this.element=i.setInnerHtml(this.element,t.join(""))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,t,n,r){var i=this,o=/\t|&|<|( +)|([\x00-\x1f\x80-\xa0\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]/g,u=function(e,n,r,o,u){if(n)return i.showInvisibles?"<span class='ace_invisible ace_invisible_space'>"+s.stringRepeat(i.SPACE_CHAR,e.length)+"</span>":s.stringRepeat("\xa0",e.length);if(e=="&")return"&#38;";if(e=="<")return"&#60;";if(e=="	"){var a=i.session.getScreenTabSize(t+o);return t+=a-1,i.$tabStrings[a]}if(e=="\u3000"){var f=i.showInvisibles?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",l=i.showInvisibles?i.SPACE_CHAR:"";return t+=1,"<span class='"+f+"' style='width:"+i.config.characterWidth*2+"px'>"+l+"</span>"}return r?"<span class='ace_invisible ace_invisible_space ace_invalid'>"+i.SPACE_CHAR+"</span>":(t+=1,"<span class='ace_cjk' style='width:"+i.config.characterWidth*2+"px'>"+e+"</span>")},a=r.replace(o,u);if(!this.$textToken[n.type]){var f="ace_"+n.type.replace(/\./g," ace_"),l="";n.type=="fold"&&(l=" style='width:"+n.value.length*this.config.characterWidth+"px;' "),e.push("<span class='",f,"'",l,">",a,"</span>")}else e.push(a);return t+r.length},this.renderIndentGuide=function(e,t,n){var r=t.search(this.$indentGuideRe);return r<=0||r>=n?t:t[0]==" "?(r-=r%this.tabSize,e.push(s.stringRepeat(this.$tabStrings[" "],r/this.tabSize)),t.substr(r)):t[0]=="	"?(e.push(s.stringRepeat(this.$tabStrings["	"],r)),t.substr(r)):t},this.$renderWrappedLine=function(e,t,n,r){var i=0,s=0,o=n[0],u=0;for(var a=0;a<t.length;a++){var f=t[a],l=f.value;if(a==0&&this.displayIndentGuides){i=l.length,l=this.renderIndentGuide(e,l,o);if(!l)continue;i-=l.length}if(i+l.length<o)u=this.$renderToken(e,u,f,l),i+=l.length;else{while(i+l.length>=o)u=this.$renderToken(e,u,f,l.substring(0,o-i)),l=l.substring(o-i),i=o,r||e.push("</div>","<div class='ace_line' style='height:",this.config.lineHeight,"px'>"),s++,u=0,o=n[s]||Number.MAX_VALUE;l.length!=0&&(i+=l.length,u=this.$renderToken(e,u,f,l))}}},this.$renderSimpleLine=function(e,t){var n=0,r=t[0],i=r.value;this.displayIndentGuides&&(i=this.renderIndentGuide(e,i)),i&&(n=this.$renderToken(e,n,r,i));for(var s=1;s<t.length;s++)r=t[s],i=r.value,n=this.$renderToken(e,n,r,i)},this.$renderLine=function(e,t,n,r){!r&&r!=0&&(r=this.session.getFoldLine(t));if(r)var i=this.$getFoldLineTokens(t,r);else var i=this.session.getTokens(t);n||e.push("<div class='ace_line' style='height:",this.config.lineHeight*(this.$useLineGroups()?1:this.session.getRowLength(t)),"px'>");if(i.length){var s=this.session.getRowSplitData(t);s&&s.length?this.$renderWrappedLine(e,i,s,n):this.$renderSimpleLine(e,i)}this.showInvisibles&&(r&&(t=r.end.row),e.push("<span class='ace_invisible ace_invisible_eol'>",t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,"</span>")),n||e.push("</div>")},this.$getFoldLineTokens=function(e,t){function i(e,t,n){var i=0,s=0;while(s+e[i].value.length<t){s+=e[i].value.length,i++;if(i==e.length)return}if(s!=t){var o=e[i].value.substring(t-s);o.length>n-t&&(o=o.substring(0,n-t)),r.push({type:e[i].type,value:o}),s=t+o.length,i+=1}while(s<n&&i<e.length){var o=e[i].value;o.length+s>n?r.push({type:e[i].type,value:o.substring(0,n-s)}):r.push(e[i]),s+=o.length,i+=1}}var n=this.session,r=[],s=n.getTokens(e);return t.walk(function(e,t,o,u,a){e!=null?r.push({type:"fold",value:e}):(a&&(s=n.getTokens(t)),s.length&&i(s,u,o))},t.end.row,this.session.getLine(t.end.row).length),r},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$measureNode&&this.$measureNode.parentNode.removeChild(this.$measureNode),delete this.$measureNode}}).call(a.prototype),t.Text=a}),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],function(e,t,n){function s(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}var r=e("./lib/oop"),i=e("./lib/dom");(function(){this.$init=function(){return this.$element=i.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(e){i.setInnerText(this.getElement(),e)},this.setHtml=function(e){this.getElement().innerHTML=e},this.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},this.setClassName=function(e){i.addCssClass(this.getElement(),e)},this.show=function(e,t,n){e!=null&&this.setText(e),t!=null&&n!=null&&this.setPosition(t,n),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth}}).call(s.prototype),t.Tooltip=s}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,t,n){var r=e("../lib/dom"),i,s=function(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),i===undefined&&(i="opacity"in this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),r.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateVisibility.bind(this)};(function(){this.$updateVisibility=function(e){var t=this.cursors;for(var n=t.length;n--;)t[n].style.visibility=e?"":"hidden"},this.$updateOpacity=function(e){var t=this.cursors;for(var n=t.length;n--;)t[n].style.opacity=e?"":"0"},this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e!=this.smoothBlinking&&!i&&(this.smoothBlinking=e,r.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.$updateCursors=(e?this.$updateOpacity:this.$updateVisibility).bind(this),this.restartTimer())},this.addCursor=function(){var e=r.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},this.hideCursor=function(){this.isVisible=!1,r.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,r.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var e=this.$updateCursors;clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.smoothBlinking&&r.removeCssClass(this.element,"ace_smooth-blinking"),e(!0);if(!this.isBlinking||!this.blinkInterval||!this.isVisible)return;this.smoothBlinking&&setTimeout(function(){r.addCssClass(this.element,"ace_smooth-blinking")}.bind(this));var t=function(){this.timeoutId=setTimeout(function(){e(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){e(!0),t()},this.blinkInterval),t()},this.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(e),r=this.$padding+n.column*this.config.characterWidth,i=(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:r,top:i}},this.update=function(e){this.config=e;var t=this.session.$selectionMarkers,n=0,r=0;if(t===undefined||t.length===0)t=[{cursor:null}];for(var n=0,i=t.length;n<i;n++){var s=this.getPixelPosition(t[n].cursor,!0);if((s.top>e.height+e.offset||s.top<0)&&n>1)continue;var o=(this.cursors[r++]||this.addCursor()).style;o.left=s.left+"px",o.top=s.top+"px",o.width=e.characterWidth+"px",o.height=e.lineHeight+"px"}while(this.cursors.length>r)this.removeCursor();var u=this.session.getOverwrite();this.$setOverwrite(u),this.$pixelPos=s,this.restartTimer()},this.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?r.addCssClass(this.element,"ace_overwrite-cursors"):r.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(s.prototype),t.Cursor=s}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],function(e,t,n){function u(e){function l(){var r=u.getDocumentPosition().row,s=n.$annotations[r];if(!s)return c();var o=t.session.getLength();if(r==o){var a=t.renderer.pixelToScreenCoordinates(0,u.y).row,l=u.$pos;if(a>t.session.documentToScreenRow(l.row,l.column))return c()}if(f==s)return;f=s.text.join("<br/>"),i.setHtml(f),i.show(),t.on("mousewheel",c);if(e.$tooltipFollowsMouse)h(u);else{var p=n.$cells[t.session.documentToScreenRow(r,0)].element,d=p.getBoundingClientRect(),v=i.getElement().style;v.left=d.right+"px",v.top=d.bottom+"px"}}function c(){o&&(o=clearTimeout(o)),f&&(i.hide(),f=null,t.removeEventListener("mousewheel",c))}function h(e){i.setPosition(e.x,e.y)}var t=e.editor,n=t.renderer.$gutterLayer,i=new a(t.container);e.editor.setDefaultHandler("guttermousedown",function(r){if(!t.isFocused()||r.getButton()!=0)return;var i=n.getRegion(r);if(i=="foldWidgets")return;var s=r.getDocumentPosition().row,o=t.session.selection;if(r.getShiftKey())o.selectTo(s,0);else{if(r.domEvent.detail==2)return t.selectAll(),r.preventDefault();e.$clickSelection=t.selection.getLineRange(s)}return e.setState("selectByLines"),e.captureMouse(r),r.preventDefault()});var o,u,f;e.editor.setDefaultHandler("guttermousemove",function(t){var n=t.domEvent.target||t.domEvent.srcElement;if(r.hasCssClass(n,"ace_fold-widget"))return c();f&&e.$tooltipFollowsMouse&&h(t),u=t;if(o)return;o=setTimeout(function(){o=null,u&&!e.isMousePressed?l():c()},50)}),s.addListener(t.renderer.$gutter,"mouseout",function(e){u=null;if(!f||o)return;o=setTimeout(function(){o=null,c()},50)}),t.on("changeSession",c)}function a(e){o.call(this,e)}var r=e("../lib/dom"),i=e("../lib/oop"),s=e("../lib/event"),o=e("../tooltip").Tooltip;i.inherits(a,o),function(){this.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,r=window.innerHeight||document.documentElement.clientHeight,i=this.getWidth(),s=this.getHeight();e+=15,t+=15,e+i>n&&(e-=e+i-n),t+s>r&&(t-=20+s),o.prototype.setPosition.call(this,e,t)}}.call(a.prototype),t.GutterHandler=u}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/dom"),s=e("./lib/event"),o=e("./lib/event_emitter").EventEmitter,u=function(e){this.element=i.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=i.createElement("div"),this.inner.className="ace_scrollbar-inner",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,s.addListener(this.element,"scroll",this.onScroll.bind(this)),s.addListener(this.element,"mousedown",s.preventDefault)};(function(){r.implement(this,o),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e}}).call(u.prototype);var a=function(e,t){u.call(this,e),this.scrollTop=0,t.$scrollbarWidth=this.width=i.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px"};r.inherits(a,u),function(){this.classSuffix="-v",this.onScroll=function(){this.skipEvent||(this.scrollTop=this.element.scrollTop,this._emit("scroll",{data:this.scrollTop})),this.skipEvent=!1},this.getWidth=function(){return this.isVisible?this.width:0},this.setHeight=function(e){this.element.style.height=e+"px"},this.setInnerHeight=function(e){this.inner.style.height=e+"px"},this.setScrollHeight=function(e){this.inner.style.height=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=this.element.scrollTop=e)}}.call(a.prototype);var f=function(e,t){u.call(this,e),this.scrollLeft=0,this.height=t.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};r.inherits(f,u),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(e){this.element.style.width=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollWidth=function(e){this.inner.style.width=e+"px"},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}.call(f.prototype),t.ScrollBar=a,t.ScrollBarV=a,t.ScrollBarH=f,t.VScrollBar=a,t.HScrollBar=f}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,t,n){function u(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e));var n=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];n.forEach(function(t){e[t]=this[t]},this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}function a(e,t,n,r){return Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2))}function f(e,t){if(e.start.row==e.end.row)var n=2*t.column-e.start.column-e.end.column;else if(e.start.row==e.end.row-1&&!e.start.column&&!e.end.column)var n=t.column-4;else var n=2*t.row-e.start.row-e.end.row;return n<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}var r=e("../lib/dom"),i=e("../lib/event"),s=e("../lib/useragent"),o=0;(function(){this.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition();this.mousedownEvent=e;var r=this.editor,i=e.getButton();if(i!==0){var s=r.getSelectionRange(),o=s.isEmpty();o&&r.selection.moveToPosition(n),r.textInput.onContextMenu(e.domEvent);return}if(t&&!r.isFocused()){r.focus();if(this.$focusTimout&&!this.$clickSelection&&!r.inMultiSelectMode){this.mousedownEvent.time=Date.now(),this.setState("focusWait"),this.captureMouse(e);return}}return this.captureMouse(e),!t||this.$clickSelection||e.getShiftKey()||r.inMultiSelectMode?this.startSelect(n):t&&(this.mousedownEvent.time=Date.now(),this.startSelect(n)),e.preventDefault()},this.startSelect=function(e){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var t=this.editor,n=this.mousedownEvent.getShiftKey();n?t.selection.selectToPosition(e):this.$clickSelection||t.selection.moveToPosition(e),t.renderer.scroller.setCapture&&t.renderer.scroller.setCapture(),t.setStyle("ace_selecting"),this.setState("select")},this.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var r=this.$clickSelection.comparePoint(n);if(r==-1)e=this.$clickSelection.end;else if(r==1)e=this.$clickSelection.start;else{var i=f(this.$clickSelection,n);n=i.cursor,e=i.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,n=this.editor,r=n.renderer.screenToTextCoordinates(this.x,this.y),i=n.selection[e](r.row,r.column);if(this.$clickSelection){var s=this.$clickSelection.comparePoint(i.start),o=this.$clickSelection.comparePoint(i.end);if(s==-1&&o<=0){t=this.$clickSelection.end;if(i.end.row!=r.row||i.end.column!=r.column)r=i.start}else if(o==1&&s>=0){t=this.$clickSelection.start;if(i.start.row!=r.row||i.start.column!=r.column)r=i.end}else if(s==-1&&o==1)r=i.end,t=i.start;else{var u=f(this.$clickSelection,r);r=u.cursor,t=u.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(r),n.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var e=a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=Date.now();(e>o||t-this.mousedownEvent.time>this.$focusTimout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,r=n.session,i=r.getBracketRange(t);i?(i.isEmpty()&&(i.start.column--,i.end.column++),this.setState("select")):(i=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=i,this[this.state]&&this[this.state](e)},this.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines"),this.$clickSelection=n.selection.getLineRange(t.row),this[this.state]&&this[this.state](e)},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){if(e.getAccelKey())return;e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=e.domEvent.timeStamp,n=t-(this.$lastScrollTime||0),r=this.editor,i=r.renderer.isScrollableBy(e.wheelX*e.speed,e.wheelY*e.speed);if(i||n<200)return this.$lastScrollTime=t,r.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()}}).call(u.prototype),t.DefaultHandlers=u}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,t,n){var r=e("./lib/event"),i=function(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.window=t||window};(function(){this.schedule=function(e){this.changes=this.changes|e;if(!this.pending&&this.changes){this.pending=!0;var t=this;r.nextFrame(function(){t.pending=!1;var e;while(e=t.changes)t.changes=0,t.onRender(e)},this.window)}}}).call(i.prototype),t.RenderLoop=i}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/config"],function(e,t,n){var r=e("../lib/event"),i=e("../lib/useragent"),s=e("./default_handlers").DefaultHandlers,o=e("./default_gutter_handler").GutterHandler,u=e("./mouse_event").MouseEvent,a=e("./dragdrop_handler").DragdropHandler,f=e("../config"),l=function(e){var t=this;this.editor=e,new s(this),new o(this),new a(this);var n=function(t){e.focus()},u=e.renderer.getMouseEventTarget();r.addListener(u,"click",this.onMouseEvent.bind(this,"click")),r.addListener(u,"mousemove",this.onMouseMove.bind(this,"mousemove")),r.addMultiMouseDownListener(u,[400,300,250],this,"onMouseEvent"),e.renderer.scrollBarV&&(r.addMultiMouseDownListener(e.renderer.scrollBarV.inner,[400,300,250],this,"onMouseEvent"),r.addMultiMouseDownListener(e.renderer.scrollBarH.inner,[400,300,250],this,"onMouseEvent"),i.isIE&&(r.addListener(e.renderer.scrollBarV.element,"mousedown",n),r.addListener(e.renderer.scrollBarH.element,"mousemove",n))),r.addMouseWheelListener(e.container,this.onMouseWheel.bind(this,"mousewheel"));var f=e.renderer.$gutter;r.addListener(f,"mousedown",this.onMouseEvent.bind(this,"guttermousedown")),r.addListener(f,"click",this.onMouseEvent.bind(this,"gutterclick")),r.addListener(f,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick")),r.addListener(f,"mousemove",this.onMouseEvent.bind(this,"guttermousemove")),r.addListener(u,"mousedown",n),r.addListener(f,"mousedown",function(t){return e.focus(),r.preventDefault(t)}),e.on("mousemove",function(n){if(t.state||t.$dragDelay||!t.$dragEnabled)return;var r=e.renderer.screenToTextCoordinates(n.x,n.y),i=e.session.selection.getRange(),s=e.renderer;!i.isEmpty()&&i.insideStart(r.row,r.column)?s.setCursorStyle("default"):s.setCursorStyle("")})};(function(){this.onMouseEvent=function(e,t){this.editor._emit(e,new u(t,this.editor))},this.onMouseMove=function(e,t){var n=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;if(!n||!n.length)return;this.editor._emit(e,new u(t,this.editor))},this.onMouseWheel=function(e,t){var n=new u(t,this.editor);n.speed=this.$scrollSpeed*2,n.wheelX=t.wheelX,n.wheelY=t.wheelY,this.editor._emit(e,n)},this.setState=function(e){this.state=e},this.captureMouse=function(e,t){this.x=e.x,this.y=e.y,this.isMousePressed=!0;var n=this.editor.renderer;n.$keepTextAreaAtCursor&&(n.$keepTextAreaAtCursor=null);var s=this,o=function(e){if(!e)return;if(i.isWebKit&&!e.which&&s.releaseMouse)return s.releaseMouse();s.x=e.clientX,s.y=e.clientY,t&&t(e),s.mouseEvent=new u(e,s.editor),s.$mouseMoved=!0},a=function(e){clearInterval(l),f(),s[s.state+"End"]&&s[s.state+"End"](e),s.state="",n.$keepTextAreaAtCursor==null&&(n.$keepTextAreaAtCursor=!0,n.$moveTextAreaToCursor()),s.isMousePressed=!1,s.$onCaptureMouseMove=s.releaseMouse=null,e&&s.onMouseEvent("mouseup",e)},f=function(){s[s.state]&&s[s.state](),s.$mouseMoved=!1};if(i.isOldIE&&e.domEvent.type=="dblclick")return setTimeout(function(){a(e)});s.$onCaptureMouseMove=o,s.releaseMouse=r.capture(this.editor.container,o,a);var l=setInterval(f,20)},this.releaseMouse=null}).call(l.prototype),f.defineOptions(l.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:150},dragEnabled:{initialValue:!0},focusTimout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),t.MouseHandler=l}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(e,t,n){var r=e("../lib/oop"),i=e("../lib/dom"),s=e("../lib/lang"),o=e("../lib/useragent"),u=e("../lib/event_emitter").EventEmitter,a=0,f=t.FontMetrics=function(e,t){this.el=i.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=i.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=i.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),a||this.$testFractionalRect(),this.$measureNode.innerHTML=s.stringRepeat("X",a),this.$characterSize={width:0,height:0},this.checkForSizeChanges()};(function(){r.implement(this,u),this.$characterSize={width:0,height:0},this.$testFractionalRect=function(){var e=i.createElement("div");this.$setMeasureNodeStyles(e.style),e.style.width="0.2px",document.documentElement.appendChild(e);var t=e.getBoundingClientRect().width;t>0&&t<1?a=1:a=100,e.parentNode.removeChild(e)},this.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="-100px",e.visibility="hidden",e.position="fixed",e.whiteSpace="pre",o.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},this.checkForSizeChanges=function(){var e=this.$measureSizes();if(e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=setInterval(function(){e.checkForSizeChanges()},500)},this.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&this.$pollSizeChangesTimer},this.$measureSizes=function(){if(a===1)var e=this.$measureNode.getBoundingClientRect(),t={height:e.height,width:e.width};else var t={height:this.$measureNode.clientHeight,width:this.$measureNode.clientWidth/a};return t.width===0||t.height===0?null:t},this.$measureCharWidth=function(e){this.$main.innerHTML=s.stringRepeat(e,a);var t=this.$main.getBoundingClientRect();return t.width/a},this.getCharacterWidth=function(e){var t=this.charSizes[e];return t===undefined&&(this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)}}).call(f.prototype)}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang"],function(e,t,n){var r=e("../lib/event"),i=e("../lib/useragent"),s=e("../lib/dom"),o=e("../lib/lang"),u=i.isChrome<18,a=i.isIE,f=function(e,t){function b(e){if(h)return;if(k)t=0,r=e?0:n.value.length-1;else var t=e?2:1,r=2;try{n.setSelectionRange(t,r)}catch(i){}}function w(){if(h)return;n.value=f,i.isWebKit&&y.schedule()}function q(){setTimeout(function(){p&&(n.style.cssText=p,p=""),t.renderer.$keepTextAreaAtCursor==null&&(t.renderer.$keepTextAreaAtCursor=!0,t.renderer.$moveTextAreaToCursor())},0)}var n=s.createElement("textarea");n.className="ace_text-input",i.isTouchPad&&n.setAttribute("x-palm-disable-auto-cap",!0),n.wrap="off",n.autocorrect="off",n.autocapitalize="off",n.spellcheck=!1,n.style.opacity="0",e.insertBefore(n,e.firstChild);var f="\x01\x01",l=!1,c=!1,h=!1,p="",d=!0;try{var v=document.activeElement===n}catch(m){}r.addListener(n,"blur",function(){t.onBlur(),v=!1}),r.addListener(n,"focus",function(){v=!0,t.onFocus(),b()}),this.focus=function(){n.focus()},this.blur=function(){n.blur()},this.isFocused=function(){return v};var g=o.delayedCall(function(){v&&b(d)}),y=o.delayedCall(function(){h||(n.value=f,v&&b())});i.isWebKit||t.addEventListener("changeSelection",function(){t.selection.isEmpty()!=d&&(d=!d,g.schedule())}),w(),v&&t.onFocus();var E=function(e){return e.selectionStart===0&&e.selectionEnd===e.value.length};!n.setSelectionRange&&n.createTextRange&&(n.setSelectionRange=function(e,t){var n=this.createTextRange();n.collapse(!0),n.moveStart("character",e),n.moveEnd("character",t),n.select()},E=function(e){try{var t=e.ownerDocument.selection.createRange()}catch(n){}return!t||t.parentElement()!=e?!1:t.text==e.value});if(i.isOldIE){var S=!1,x=function(e){if(S)return;var t=n.value;if(h||!t||t==f)return;if(e&&t==f[0])return T.schedule();A(t),S=!0,w(),S=!1},T=o.delayedCall(x);r.addListener(n,"propertychange",x);var N={13:1,27:1};r.addListener(n,"keyup",function(e){h&&(!n.value||N[e.keyCode])&&setTimeout(F,0);if((n.value.charCodeAt(0)||0)<129)return T.call();h?j():B()}),r.addListener(n,"keydown",function(e){T.schedule(50)})}var C=function(e){l?l=!1:E(n)?(t.selectAll(),b()):k&&b(t.selection.isEmpty())},k=null;this.setInputHandler=function(e){k=e},this.getInputHandler=function(){return k};var L=!1,A=function(e){k&&(e=k(e),k=null),c?(b(),e&&t.onPaste(e),c=!1):e==f.charAt(0)?L?t.execCommand("del",{source:"ace"}):t.execCommand("backspace",{source:"ace"}):(e.substring(0,2)==f?e=e.substr(2):e.charAt(0)==f.charAt(0)?e=e.substr(1):e.charAt(e.length-1)==f.charAt(0)&&(e=e.slice(0,-1)),e.charAt(e.length-1)==f.charAt(0)&&(e=e.slice(0,-1)),e&&t.onTextInput(e)),L&&(L=!1)},O=function(e){if(h)return;var t=n.value;A(t),w()},M=function(e,t){var n=e.clipboardData||window.clipboardData;if(!n||u)return;var r=a?"Text":"text/plain";return t?n.setData(r,t)!==!1:n.getData(r)},_=function(e,i){var s=t.getCopyText();if(!s)return r.preventDefault(e);M(e,s)?(i?t.onCut():t.onCopy(),r.preventDefault(e)):(l=!0,n.value=s,n.select(),setTimeout(function(){l=!1,w(),b(),i?t.onCut():t.onCopy()}))},D=function(e){_(e,!0)},P=function(e){_(e,!1)},H=function(e){var s=M(e);typeof s=="string"?(s&&t.onPaste(s),i.isIE&&setTimeout(b),r.preventDefault(e)):(n.value="",c=!0)};r.addCommandKeyListener(n,t.onCommandKey.bind(t)),r.addListener(n,"select",C),r.addListener(n,"input",O),r.addListener(n,"cut",D),r.addListener(n,"copy",P),r.addListener(n,"paste",H),(!("oncut"in n)||!("oncopy"in n)||!("onpaste"in n))&&r.addListener(e,"keydown",function(e){if(i.isMac&&!e.metaKey||!e.ctrlKey)return;switch(e.keyCode){case 67:P(e);break;case 86:H(e);break;case 88:D(e)}});var B=function(e){if(h||!t.onCompositionStart)return;h={},t.onCompositionStart(),setTimeout(j,0),t.on("mousedown",F),t.selection.isEmpty()||(t.insert(""),t.session.markUndoGroup(),t.selection.clearSelection()),t.session.markUndoGroup()},j=function(){if(!h||!t.onCompositionUpdate)return;var e=n.value.replace(/\x01/g,"");if(h.lastValue===e)return;t.onCompositionUpdate(e),h.lastValue&&t.undo(),h.lastValue=e;if(h.lastValue){var r=t.selection.getRange();t.insert(h.lastValue),t.session.markUndoGroup(),h.range=t.selection.getRange(),t.selection.setRange(r),t.selection.clearSelection()}},F=function(e){if(!t.onCompositionEnd)return;var r=h;h=!1;var i=setTimeout(function(){i=null;var e=n.value.replace(/\x01/g,"");if(h)return;e==r.lastValue?w():!r.lastValue&&e&&(w(),A(e))});k=function(n){return i&&clearTimeout(i),n=n.replace(/\x01/g,""),n==r.lastValue?"":(r.lastValue&&i&&t.undo(),n)},t.onCompositionEnd(),t.removeListener("mousedown",F),e.type=="compositionend"&&r.range&&t.selection.setRange(r.range)},I=o.delayedCall(j,50);r.addListener(n,"compositionstart",B),i.isGecko?r.addListener(n,"text",function(){I.schedule()}):(r.addListener(n,"keyup",function(){I.schedule()}),r.addListener(n,"keydown",function(){I.schedule()})),r.addListener(n,"compositionend",F),this.getElement=function(){return n},this.setReadOnly=function(e){n.readOnly=e},this.onContextMenu=function(e){L=!0,p||(p=n.style.cssText),n.style.cssText="z-index:100000;"+(i.isIE?"opacity:0.1;":""),b(t.selection.isEmpty()),t._emit("nativecontextmenu",{target:t,domEvent:e});var o=t.container.getBoundingClientRect(),u=s.computedStyle(t.container),a=o.top+(parseInt(u.borderTopWidth)||0),f=o.left+(parseInt(o.borderLeftWidth)||0),l=o.bottom-a-n.clientHeight,c=function(e){n.style.left=e.clientX-f-2+"px",n.style.top=Math.min(e.clientY-a-2,l)+"px"};c(e);if(e.type!="mousedown")return;t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=null),i.isWin&&r.capture(t.container,c,q)},this.onContextMenuClose=q;if(!i.isGecko||i.isMac){var R=function(e){t.textInput.onContextMenu(e),q()};r.addListener(t.renderer.scroller,"contextmenu",R),r.addListener(n,"contextmenu",R)}};t.TextInput=f}),ace.define("ace/lib/lang",["require","exports","module"],function(e,t,n){t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){var n="";while(t>0){t&1&&(n+=e);if(t>>=1)e+=e}return n};var r=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(r,"")},t.stringTrimRight=function(e){return e.replace(i,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){var t=[];for(var n=0,r=e.length;n<r;n++)e[n]&&typeof e[n]=="object"?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=function(e){if(typeof e!="object"||!e)return e;var n=e.constructor;if(n===RegExp)return e;var r=n();for(var i in e)typeof e[i]=="object"?r[i]=t.deepCopy(e[i]):r[i]=e[i];return r},t.arrayToMap=function(e){var t={};for(var n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return e.replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,function(e){n.push({offset:arguments[arguments.length-2],length:e.length})}),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},r=function(e){return r.cancel(),t=setTimeout(n,e||0),r};return r.schedule=r,r.call=function(){return this.cancel(),e(),r},r.cancel=function(){return clearTimeout(t),t=null,r},r.isPending=function(){return t},r},t.delayedCall=function(e,t){var n=null,r=function(){n=null,e()},i=function(e){n==null&&(n=setTimeout(r,e||t))};return i.delay=function(e){n&&clearTimeout(n),n=setTimeout(r,e||t)},i.schedule=i,i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){return n},i}}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(e,t,n){var r=e("../lib/oop"),i=e("../lib/net"),s=e("../lib/event_emitter").EventEmitter,o=e("../config"),u=function(t,n,r,i){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl);if(o.get("packaged")||!e.toUrl)i=i||o.moduleUrl(n,"worker");else{var s=this.$normalizePath;i=i||s(e.toUrl("ace/worker/worker.js",null,"_"));var u={};t.forEach(function(t){u[t]=s(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}try{this.$worker=new Worker(i)}catch(a){if(!(a instanceof window.DOMException))throw a;var f=this.$workerBlob(i),l=window.URL||window.webkitURL,c=l.createObjectURL(f);this.$worker=new Worker(c),l.revokeObjectURL(c)}this.$worker.postMessage({init:!0,tlns:u,module:n,classname:r}),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){r.implement(this,s),this.onMessage=function(e){var t=e.data;switch(t.type){case"log":window.console&&console.log&&console.log.apply(console,t.data);break;case"event":this._signal(t.name,{data:t.data});break;case"call":var n=this.callbacks[t.id];n&&(n(t.data),delete this.callbacks[t.id])}},this.$normalizePath=function(e){return i.qualifyURL(e)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc.removeEventListener("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,n){if(n){var r=this.callbackId++;this.callbacks[r]=n,t.push(r)}this.send(e,t)},this.emit=function(e,t){try{this.$worker.postMessage({event:e,data:{data:t.data}})}catch(n){console.error(n.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener)},this.changeListener=function(e){this.deltaQueue?this.deltaQueue.push(e.data):(this.deltaQueue=[e.data],setTimeout(this.$sendDeltaQueue,0))},this.$sendDeltaQueue=function(){var e=this.deltaQueue;if(!e)return;this.deltaQueue=null,e.length>20&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e})},this.$workerBlob=function(e){var t="importScripts('"+i.qualifyURL(e)+"');";try{return new Blob([t],{type:"application/javascript"})}catch(n){var r=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,s=new r;return s.append(t),s.getBlob("application/javascript")}}}).call(u.prototype);var a=function(e,t,n){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.callbackId=1,this.callbacks={},this.messageBuffer=[];var r=null,i=!1,u=Object.create(s),a=this;this.$worker={},this.$worker.terminate=function(){},this.$worker.postMessage=function(e){a.messageBuffer.push(e),r&&(i?setTimeout(f):f())},this.setEmitSync=function(e){i=e};var f=function(){var e=a.messageBuffer.shift();e.command?r[e.command].apply(r,e.args):e.event&&u._signal(e.event,e.data)};u.postMessage=function(e){a.onMessage({data:e})},u.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},u.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},o.loadModule(["worker",t],function(e){r=new e[n](u);while(a.messageBuffer.length)f()})};a.prototype=u.prototype,t.UIWorkerClient=a,t.WorkerClient=u}),ace.define("ace/editor",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator"],function(e,t,n){e("./lib/fixoldbrowsers");var r=e("./lib/oop"),i=e("./lib/dom"),s=e("./lib/lang"),o=e("./lib/useragent"),u=e("./keyboard/textinput").TextInput,a=e("./mouse/mouse_handler").MouseHandler,f=e("./mouse/fold_handler").FoldHandler,l=e("./keyboard/keybinding").KeyBinding,c=e("./edit_session").EditSession,h=e("./search").Search,p=e("./range").Range,d=e("./lib/event_emitter").EventEmitter,v=e("./commands/command_manager").CommandManager,m=e("./commands/default_commands").commands,g=e("./config"),y=e("./token_iterator").TokenIterator,b=function(e,t){var n=e.getContainerElement();this.container=n,this.renderer=e,this.commands=new v(o.isMac?"mac":"win",m),this.textInput=new u(e.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.keyBinding=new l(this),this.$mouseHandler=new a(this),new f(this),this.$blockScrolling=0,this.$search=(new h).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=s.delayedCall(function(){this._signal("input",{}),this.session.bgTokenizer&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(e,t){t._$emitInputEvent.schedule(31)}),this.setSession(t||new c("")),g.resetOptions(this),g._signal("editor",this)};(function(){r.implement(this,d),this.$initOperationListeners=function(){function e(e){return e[e.length-1]}this.selections=[],this.commands.on("exec",function(t){this.startOperation(t);var n=t.command;if(n.aceCommandGroup=="fileJump"){var r=this.prevOp;if(!r||r.command.aceCommandGroup!="fileJump")this.lastFileJumpPos=e(this.selections)}else this.lastFileJumpPos=null}.bind(this),!0),this.commands.on("afterExec",function(e){var t=e.command;t.aceCommandGroup=="fileJump"&&this.lastFileJumpPos&&!this.curOp.selectionChanged&&this.selection.fromJSON(this.lastFileJumpPos),this.endOperation(e)}.bind(this),!0),this.$opResetTimer=s.delayedCall(this.endOperation.bind(this)),this.on("change",function(){this.curOp||this.startOperation(),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||this.startOperation(),this.curOp.selectionChanged=!0}.bind(this),!0)},this.curOp=null,this.prevOp={},this.startOperation=function(e){if(this.curOp){if(!e||this.curOp.command)return;this.prevOp=this.curOp}e||(this.previousCommand=null,e={}),this.$opResetTimer.schedule(),this.curOp={command:e.command||{},args:e.args,scrollTop:this.renderer.scrollTop};var t=this.curOp.command;t&&t.scrollIntoView&&this.$blockScrolling++,this.selections.push(this.selection.toJSON())},this.endOperation=function(){if(this.curOp){var e=this.curOp.command;if(e&&e.scrollIntoView){this.$blockScrolling--;switch(e.scrollIntoView){case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var t=this.selection.getRange(),n=this.renderer.layerConfig;(t.start.row>=n.lastRow||t.end.row<=n.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break;default:}e.scrollIntoView=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.prevOp=this.curOp,this.curOp=null}},this.$historyTracker=function(e){if(!this.$mergeUndoDeltas)return;var t=this.prevOp,n=["backspace","del","insertstring"],r=t.command&&e.command.name==t.command.name;if(e.command.name=="insertstring"){var i=e.args;this.mergeNextCommand===undefined&&(this.mergeNextCommand=!0),r=r&&this.mergeNextCommand&&(!/\s/.test(i)||/\s/.test(t.args)),this.mergeNextCommand=!0}else r=r&&n.indexOf(e.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(r=!1),r?this.session.mergeUndoDeltas=!0:n.indexOf(e.command.name)!==-1&&(this.sequenceStartTime=Date.now())},this.setKeyboardHandler=function(e){if(!e)this.keyBinding.setKeyboardHandler(null);else if(typeof e=="string"){this.$keybindingId=e;var t=this;g.loadModule(["keybinding",e],function(n){t.$keybindingId==e&&t.keyBinding.setKeyboardHandler(n&&n.handler)})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e)},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(e){if(this.session==e)return;var t=this.session;if(t){this.session.removeEventListener("change",this.$onDocumentChange),this.session.removeEventListener("changeMode",this.$onChangeMode),this.session.removeEventListener("tokenizerUpdate",this.$onTokenizerUpdate),this.session.removeEventListener("changeTabSize",this.$onChangeTabSize),this.session.removeEventListener("changeWrapLimit",this.$onChangeWrapLimit),this.session.removeEventListener("changeWrapMode",this.$onChangeWrapMode),this.session.removeEventListener("onChangeFold",this.$onChangeFold),this.session.removeEventListener("changeFrontMarker",this.$onChangeFrontMarker),this.session.removeEventListener("changeBackMarker",this.$onChangeBackMarker),this.session.removeEventListener("changeBreakpoint",this.$onChangeBreakpoint),this.session.removeEventListener("changeAnnotation",this.$onChangeAnnotation),this.session.removeEventListener("changeOverwrite",this.$onCursorChange),this.session.removeEventListener("changeScrollTop",this.$onScrollTopChange),this.session.removeEventListener("changeScrollLeft",this.$onScrollLeftChange);var n=this.session.getSelection();n.removeEventListener("changeCursor",this.$onCursorChange),n.removeEventListener("changeSelection",this.$onSelectionChange)}this.session=e,e&&(this.$onDocumentChange=this.onDocumentChange.bind(this),e.addEventListener("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.addEventListener("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.addEventListener("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.addEventListener("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.addEventListener("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.addEventListener("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.addEventListener("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.addEventListener("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.addEventListener("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.addEventListener("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.addEventListener("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.addEventListener("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.addEventListener("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.addEventListener("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.addEventListener("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.addEventListener("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.$blockScrolling+=1,this.onCursorChange(),this.$blockScrolling-=1,this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()),this._signal("changeSession",{session:e,oldSession:t}),t&&t._signal("changeEditor",{oldEditor:this}),e&&e._signal("changeEditor",{editor:this})},this.getSession=function(){return this.session},this.setValue=function(e,t){return this.session.doc.setValue(e),t?t==1?this.navigateFileEnd():t==-1&&this.navigateFileStart():this.selectAll(),e},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e,t){this.renderer.setTheme(e,t)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.getFontSize=function(){return this.getOption("fontSize")||i.computedStyle(this.container,"fontSize")},this.setFontSize=function(e){this.setOption("fontSize",e)},this.$highlightBrackets=function(){this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null);if(this.$highlightPending)return;var e=this;this.$highlightPending=!0,setTimeout(function(){e.$highlightPending=!1;var t=e.session.findMatchingBracket(e.getCursorPosition());if(t)var n=new p(t.row,t.column,t.row,t.column+1);else if(e.session.$mode.getMatching)var n=e.session.$mode.getMatching(e.session);n&&(e.session.$bracketHighlight=e.session.addMarker(n,"ace_bracket","text"))},50)},this.$highlightTags=function(){var e=this.session;if(this.$highlightTagPending)return;var t=this;this.$highlightTagPending=!0,setTimeout(function(){t.$highlightTagPending=!1;var n=t.getCursorPosition(),r=new y(t.session,n.row,n.column),i=r.getCurrentToken();if(!i||i.type.indexOf("tag-name")===-1){e.removeMarker(e.$tagHighlight),e.$tagHighlight=null;return}var s=i.value,o=0,u=r.stepBackward();if(u.value=="<"){do u=i,i=r.stepForward(),i&&i.value===s&&i.type.indexOf("tag-name")!==-1&&(u.value==="<"?o++:u.value==="</"&&o--);while(i&&o>=0)}else{do i=u,u=r.stepBackward(),i&&i.value===s&&i.type.indexOf("tag-name")!==-1&&(u.value==="<"?o++:u.value==="</"&&o--);while(u&&o<=0);r.stepForward()}if(!i){e.removeMarker(e.$tagHighlight),e.$tagHighlight=null;return}var a=r.getCurrentTokenRow(),f=r.getCurrentTokenColumn(),l=new p(a,f,a,f+i.value.length);e.$tagHighlight&&l.compareRange(e.$backMarkers[e.$tagHighlight].range)!==0&&(e.removeMarker(e.$tagHighlight),e.$tagHighlight=null),l&&!e.$tagHighlight&&(e.$tagHighlight=e.addMarker(l,"ace_bracket","text"))},50)},this.focus=function(){var e=this;setTimeout(function(){e.textInput.focus()}),this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(){if(this.$isFocused)return;this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus")},this.onBlur=function(){if(!this.$isFocused)return;this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur")},this.$cursorChange=function(){this.renderer.updateCursor()},this.onDocumentChange=function(e){var t=e.data,n=t.range,r;n.start.row==n.end.row&&t.action!="insertLines"&&t.action!="removeLines"?r=n.end.row:r=Infinity,this.renderer.updateLines(n.start.row,r),this._signal("change",e),this.$cursorChange()},this.onTokenizerUpdate=function(e){var t=e.data;this.renderer.updateLines(t.first,t.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.$cursorChange(),this.$blockScrolling||this.renderer.scrollCursorIntoView(),this.$highlightBrackets(),this.$highlightTags(),this.$updateHighlightActiveLine(),this._signal("changeSelection")},this.$updateHighlightActiveLine=function(){var e=this.getSession(),t;if(this.$highlightActiveLine){if(this.$selectionStyle!="line"||!this.selection.isMultiLine())t=this.getCursorPosition();this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(t=!1)}if(e.$highlightLineMarker&&!t)e.removeMarker(e.$highlightLineMarker.id),e.$highlightLineMarker=null;else if(!e.$highlightLineMarker&&t){var n=new p(t.row,t.column,t.row,Infinity);n.id=e.addMarker(n,"ace_active-line","screenLine"),e.$highlightLineMarker=n}else t&&(e.$highlightLineMarker.start.row=t.row,e.$highlightLineMarker.end.row=t.row,e.$highlightLineMarker.start.column=t.column,e._signal("changeBackMarker"))},this.onSelectionChange=function(e){var t=this.session;t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null;if(!this.selection.isEmpty()){var n=this.selection.getRange(),r=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,"ace_selection",r)}else this.$updateHighlightActiveLine();var i=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(i),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(t.isEmpty()||t.isMultiLine())return;var n=t.start.column-1,r=t.end.column+1,i=e.getLine(t.start.row),s=i.length,o=i.substring(Math.max(n,0),Math.min(r,s));if(n>=0&&/^[\w\d]/.test(o)||r<=s&&/[\w\d]$/.test(o))return;o=i.substring(t.start.column,t.end.column);if(!/^[\w\d]+$/.test(o))return;var u=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:o});return u},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var e=this.getSelectedText();return this._signal("copy",e),e},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(e){if(this.$readOnly)return;var t={text:e};this._signal("paste",t),this.insert(t.text,!0)},this.execCommand=function(e,t){this.commands.exec(e,this,t)},this.insert=function(e,t){var n=this.session,r=n.getMode(),i=this.getCursorPosition();if(this.getBehavioursEnabled()&&!t){var s=r.transformAction(n.getState(i.row),"insertion",this,n,e);s&&(e!==s.text&&(this.session.mergeUndoDeltas=!1,this.$mergeNextCommand=!1),e=s.text)}e=="	"&&(e=this.session.getTabString());if(!this.selection.isEmpty()){var o=this.getSelectionRange();i=this.session.remove(o),this.clearSelection()}else if(this.session.getOverwrite()){var o=new p.fromPoints(i,i);o.end.column+=e.length,this.session.remove(o)}if(e=="\n"||e=="\r\n"){var u=n.getLine(i.row);if(i.column>u.search(/\S|$/)){var a=u.substr(i.column).search(/\S|$/);n.doc.removeInLine(i.row,i.column,i.column+a)}}this.clearSelection();var f=i.column,l=n.getState(i.row),u=n.getLine(i.row),c=r.checkOutdent(l,u,e),h=n.insert(i,e);s&&s.selection&&(s.selection.length==2?this.selection.setSelectionRange(new p(i.row,f+s.selection[0],i.row,f+s.selection[1])):this.selection.setSelectionRange(new p(i.row+s.selection[0],s.selection[1],i.row+s.selection[2],s.selection[3])));if(n.getDocument().isNewLine(e)){var d=r.getNextLineIndent(l,u.slice(0,i.column),n.getTabString());n.insert({row:i.row+1,column:0},d)}c&&r.autoOutdent(l,n,i.row)},this.onTextInput=function(e){this.keyBinding.onTextInput(e)},this.onCommandKey=function(e,t,n){this.keyBinding.onCommandKey(e,t,n)},this.setOverwrite=function(e){this.session.setOverwrite(e)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(e){this.setOption("dragDelay",e)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(e){this.setOption("readOnly",e)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(e){this.selection.isEmpty()&&(e=="left"?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,r=n.getState(t.start.row),i=n.getMode().transformAction(r,"deletion",this,n,t);if(t.end.column===0){var s=n.getTextRange(t);if(s[s.length-1]=="\n"){var o=n.getLine(t.end.row);/^\s+$/.test(o)&&(t.end.column=o.length)}}i&&(t=i)}this.session.remove(t),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},this.transposeLetters=function(){if(!this.selection.isEmpty())return;var e=this.getCursorPosition(),t=e.column;if(t===0)return;var n=this.session.getLine(e.row),r,i;t<n.length?(r=n.charAt(t)+n.charAt(t-1),i=new p(e.row,t-1,e.row,t+1)):(r=n.charAt(t-1)+n.charAt(t-2),i=new p(e.row,t-2,e.row,t)),this.session.replace(i,r)},this.toLowerCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toLowerCase()),this.selection.setSelectionRange(e)},this.toUpperCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toUpperCase()),this.selection.setSelectionRange(e)},this.indent=function(){var e=this.session,t=this.getSelectionRange();if(t.start.row<t.end.row){var n=this.$getSelectedRows();e.indentRows(n.first,n.last,"	");return}if(t.start.column<t.end.column){var r=e.getTextRange(t);if(!/^\s+$/.test(r)){var n=this.$getSelectedRows();e.indentRows(n.first,n.last,"	");return}}var i=e.getLine(t.start.row),o=t.start,u=e.getTabSize(),a=e.documentToScreenColumn(o.row,o.column);if(this.session.getUseSoftTabs())var f=u-a%u,l=s.stringRepeat(" ",f);else{var f=a%u;while(i[t.start.column]==" "&&f)t.start.column--,f--;this.selection.setSelectionRange(t),l="	"}return this.insert(l)},this.blockIndent=function(){var e=this.$getSelectedRows();this.session.indentRows(e.first,e.last,"	")},this.blockOutdent=function(){var e=this.session.getSelection();this.session.outdentRows(e.getRange())},this.sortLines=function(){var e=this.$getSelectedRows(),t=this.session,n=[];for(i=e.first;i<=e.last;i++)n.push(t.getLine(i));n.sort(function(e,t){return e.toLowerCase()<t.toLowerCase()?-1:e.toLowerCase()>t.toLowerCase()?1:0});var r=new p(0,0,0,0);for(var i=e.first;i<=e.last;i++){var s=t.getLine(i);r.start.row=i,r.end.row=i,r.end.column=s.length,t.replace(r,n[i-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},this.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;var r=this.session.getLine(e);while(n.lastIndex<t){var i=n.exec(r);if(i.index<=t&&i.index+i[0].length>=t){var s={value:i[0],start:i.index,end:i.index+i[0].length};return s}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,r=new p(t,n-1,t,n),i=this.session.getTextRange(r);if(!isNaN(parseFloat(i))&&isFinite(i)){var s=this.getNumberAt(t,n);if(s){var o=s.value.indexOf(".")>=0?s.start+s.value.indexOf(".")+1:s.end,u=s.start+s.value.length-o,a=parseFloat(s.value);a*=Math.pow(10,u),o!==s.end&&n<o?e*=Math.pow(10,s.end-n-1):e*=Math.pow(10,s.end-n),a+=e,a/=Math.pow(10,u);var f=a.toFixed(u),l=new p(t,s.start,t,s.end);this.session.replace(l,f),this.moveCursorTo(t,Math.max(s.start+1,n+f.length-s.value.length))}}},this.removeLines=function(){var e=this.$getSelectedRows(),t;e.first===0||e.last+1<this.session.getLength()?t=new p(e.first,0,e.last+1,0):t=new p(e.first-1,this.session.getLine(e.first-1).length,e.last,this.session.getLine(e.last).length),this.session.remove(t),this.clearSelection()},this.duplicateSelection=function(){var e=this.selection,t=this.session,n=e.getRange(),r=e.isBackwards();if(n.isEmpty()){var i=n.start.row;t.duplicateLines(i,i)}else{var s=r?n.start:n.end,o=t.insert(s,t.getTextRange(n),!1);n.start=s,n.end=o,e.setSelectionRange(n,r)}},this.moveLinesDown=function(){this.$moveLines(function(e,t){return this.session.moveLinesDown(e,t)})},this.moveLinesUp=function(){this.$moveLines(function(e,t){return this.session.moveLinesUp(e,t)})},this.moveText=function(e,t,n){return this.session.moveText(e,t,n)},this.copyLinesUp=function(){this.$moveLines(function(e,t){return this.session.duplicateLines(e,t),0})},this.copyLinesDown=function(){this.$moveLines(function(e,t){return this.session.duplicateLines(e,t)})},this.$moveLines=function(e){var t=this.selection;if(!t.inMultiSelectMode||this.inVirtualSelectionMode){var n=t.toOrientedRange(),r=this.$getSelectedRows(n),i=e.call(this,r.first,r.last);n.moveBy(i,0),t.fromOrientedRange(n)}else{var s=t.rangeList.ranges;t.rangeList.detach(this.session);for(var o=s.length;o--;){var u=o,r=s[o].collapseRows(),a=r.end.row,f=r.start.row;while(o--){r=s[o].collapseRows();if(!(f-r.end.row<=1))break;f=r.end.row}o++;var i=e.call(this,f,a);while(u>=o)s[u].moveBy(i,0),u--}t.fromOrientedRange(t.ranges[0]),t.rangeList.attach(this.session)}},this.$getSelectedRows=function(){var e=this.getSelectionRange().collapseRows();return{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},this.onCompositionStart=function(e){this.renderer.showComposition(this.getCursorPosition())},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var n=this.renderer,r=this.renderer.layerConfig,i=e*Math.floor(r.height/r.lineHeight);this.$blockScrolling++,t===!0?this.selection.$moveSelection(function(){this.moveCursorBy(i,0)}):t===!1&&(this.selection.moveCursorBy(i,0),this.selection.clearSelection()),this.$blockScrolling--;var s=n.scrollTop;n.scrollBy(0,i*r.lineHeight),t!=null&&n.scrollCursorIntoView(null,.5),n.animateScrolling(s)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,n,r){this.renderer.scrollToLine(e,t,n,r)},this.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.$blockScrolling+=1,this.selection.selectAll(),this.$blockScrolling-=1},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e){var t=this.getCursorPosition(),n=this.session.getBracketRange(t);if(!n){n=this.find({needle:/[{}()\[\]]/g,preventScroll:!0,start:{row:t.row,column:t.column-1}});if(!n)return;var r=n.start;r.row==t.row&&Math.abs(r.column-t.column)<2&&(n=this.session.getBracketRange(r))}r=n&&n.cursor||r,r&&(e?n&&n.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(r.row,r.column):this.selection.moveTo(r.row,r.column))},this.gotoLine=function(e,t,n){this.selection.clearSelection(),this.session.unfold({row:e-1,column:t||0}),this.$blockScrolling+=1,this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(e-1,t||0),this.$blockScrolling-=1,this.isRowFullyVisible(e-1)||this.scrollToLine(e-1,!0,n)},this.navigateTo=function(e,t){this.selection.moveTo(e,t)},this.navigateUp=function(e){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(-e||-1,0)},this.navigateDown=function(e){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(e||1,0)},this.navigateLeft=function(e){if(!this.selection.isEmpty()){var t=this.getSelectionRange().start;this.moveCursorToPosition(t)}else{e=e||1;while(e--)this.selection.moveCursorLeft()}this.clearSelection()},this.navigateRight=function(e){if(!this.selection.isEmpty()){var t=this.getSelectionRange().end;this.moveCursorToPosition(t)}else{e=e||1;while(e--)this.selection.moveCursorRight()}this.clearSelection()},this.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},this.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},this.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},this.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},this.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},this.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},this.replace=function(e,t){t&&this.$search.set(t);var n=this.$search.find(this.session),r=0;return n?(this.$tryReplace(n,e)&&(r=1),n!==null&&(this.selection.setSelectionRange(n),this.renderer.scrollSelectionIntoView(n.start,n.end)),r):r},this.replaceAll=function(e,t){t&&this.$search.set(t);var n=this.$search.findAll(this.session),r=0;if(!n.length)return r;this.$blockScrolling+=1;var i=this.getSelectionRange();this.selection.moveTo(0,0);for(var s=n.length-1;s>=0;--s)this.$tryReplace(n[s],e)&&r++;return this.selection.setSelectionRange(i),this.$blockScrolling-=1,r},this.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return t=this.$search.replace(n,t),t!==null?(e.end=this.session.replace(e,t),e):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(e,t,n){t||(t={}),typeof e=="string"||e instanceof RegExp?t.needle=e:typeof e=="object"&&r.mixin(t,e);var i=this.selection.getRange();t.needle==null&&(e=this.session.getTextRange(i)||this.$search.$options.needle,e||(i=this.session.getWordRange(i.start.row,i.start.column),e=this.session.getTextRange(i)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:i});var s=this.$search.find(this.session);if(t.preventScroll)return s;if(s)return this.revealRange(s,n),s;t.backwards?i.start=i.end:i.end=i.start,this.selection.setRange(i)},this.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},this.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},this.revealRange=function(e,t){this.$blockScrolling+=1,this.session.unfold(e),this.selection.setSelectionRange(e),this.$blockScrolling-=1;var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),t!==!1&&this.renderer.animateScrolling(n)},this.undo=function(){this.$blockScrolling++,this.session.getUndoManager().undo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.$blockScrolling++,this.session.getUndoManager().redo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.renderer.destroy(),this._signal("destroy",this)},this.setAutoScrollEditorIntoView=function(e){if(!e)return;var t,n=this,r=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var i=this.$scrollAnchor;i.style.cssText="position:absolute",this.container.insertBefore(i,this.container.firstChild);var s=this.on("changeSelection",function(){r=!0}),o=this.renderer.on("beforeRender",function(){r&&(t=n.renderer.container.getBoundingClientRect())}),u=this.renderer.on("afterRender",function(){if(r&&t&&n.isFocused()){var e=n.renderer,s=e.$cursorLayer.$pixelPos,o=e.layerConfig,u=s.top-o.offset;s.top>=0&&u+t.top<0?r=!0:s.top<o.height&&s.top+t.top+o.lineHeight>window.innerHeight?r=!1:r=null,r!=null&&(i.style.top=u+"px",i.style.left=s.left+"px",i.style.height=o.lineHeight+"px",i.scrollIntoView(r)),r=t=null}});this.setAutoScrollEditorIntoView=function(e){if(e)return;delete this.setAutoScrollEditorIntoView,this.removeEventListener("changeSelection",s),this.renderer.removeEventListener("afterRender",u),this.renderer.removeEventListener("beforeRender",o)}},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;if(!t)return;t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&e!="wide",i.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e))}}).call(b.prototype),g.defineOptions(b.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){this.$resetCursorStyle()},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",showLineNumbers:"renderer",showGutter:"renderer",displayIndentGuides:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",tabSize:"session",wrap:"session",foldStyle:"session",mode:"session"}),t.Editor=b}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,t,n){var r=e("./range").Range,i=e("./lib/event_emitter").EventEmitter,s=e("./lib/oop"),o=function(e,t,n,r,i,s){var o=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=i,this.othersClass=s,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=r,this.$onCursorChange=function(){setTimeout(function(){o.onCursorChange()})},this.$pos=n;var u=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=u.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)};(function(){s.implement(this,i),this.setup=function(){var e=this,t=this.doc,n=this.session,i=this.$pos;this.pos=t.createAnchor(i.row,i.column),this.markerId=n.addMarker(new r(i.row,i.column,i.row,i.column+this.length),this.mainClass,null,!1),this.pos.on("change",function(t){n.removeMarker(e.markerId),e.markerId=n.addMarker(new r(t.value.row,t.value.column,t.value.row,t.value.column+e.length),e.mainClass,null,!1)}),this.others=[],this.$others.forEach(function(n){var r=t.createAnchor(n.row,n.column);e.others.push(r)}),n.setUndoSelect(!1)},this.showOtherMarkers=function(){if(this.othersActive)return;var e=this.session,t=this;this.othersActive=!0,this.others.forEach(function(n){n.markerId=e.addMarker(new r(n.row,n.column,n.row,n.column+t.length),t.othersClass,null,!1),n.on("change",function(i){e.removeMarker(n.markerId),n.markerId=e.addMarker(new r(i.value.row,i.value.column,i.value.row,i.value.column+t.length),t.othersClass,null,!1)})})},this.hideOtherMarkers=function(){if(!this.othersActive)return;this.othersActive=!1;for(var e=0;e<this.others.length;e++)this.session.removeMarker(this.others[e].markerId)},this.onUpdate=function(e){var t=e.data,n=t.range;if(n.start.row!==n.end.row)return;if(n.start.row!==this.pos.row)return;if(this.$updating)return;this.$updating=!0;var i=t.action==="insertText"?n.end.column-n.start.column:n.start.column-n.end.column;if(n.start.column>=this.pos.column&&n.start.column<=this.pos.column+this.length+1){var s=n.start.column-this.pos.column;this.length+=i;if(!this.session.$fromUndo){if(t.action==="insertText")for(var o=this.others.length-1;o>=0;o--){var u=this.others[o],a={row:u.row,column:u.column+s};u.row===n.start.row&&n.start.column<u.column&&(a.column+=i),this.doc.insert(a,t.text)}else if(t.action==="removeText")for(var o=this.others.length-1;o>=0;o--){var u=this.others[o],a={row:u.row,column:u.column+s};u.row===n.start.row&&n.start.column<u.column&&(a.column+=i),this.doc.remove(new r(a.row,a.column,a.row,a.column-i))}n.start.column===this.pos.column&&t.action==="insertText"?setTimeout(function(){this.pos.setPosition(this.pos.row,this.pos.column-i);for(var e=0;e<this.others.length;e++){var t=this.others[e],r={row:t.row,column:t.column-i};t.row===n.start.row&&n.start.column<t.column&&(r.column+=i),t.setPosition(r.row,r.column)}}.bind(this),0):n.start.column===this.pos.column&&t.action==="removeText"&&setTimeout(function(){for(var e=0;e<this.others.length;e++){var t=this.others[e];t.row===n.start.row&&n.start.column<t.column&&t.setPosition(t.row,t.column-i)}}.bind(this),0)}this.pos._emit("change",{value:this.pos});for(var o=0;o<this.others.length;o++)this.others[o]._emit("change",{value:this.others[o]})}this.$updating=!1},this.onCursorChange=function(e){if(this.$updating)return;var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))},this.detach=function(){this.session.removeMarker(this.markerId),this.hideOtherMarkers(),this.doc.removeEventListener("change",this.$onUpdate),this.session.selection.removeEventListener("changeCursor",this.$onCursorChange),this.pos.detach();for(var e=0;e<this.others.length;e++)this.others[e].detach();this.session.setUndoSelect(!0)},this.cancel=function(){if(this.$undoStackDepth===-1)throw Error("Canceling placeholders only supported with undo manager attached to session.");var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth;for(var n=0;n<t;n++)e.undo(!0)}}).call(o.prototype),t.PlaceHolder=o}),ace.define("ace/lib/useragent",["require","exports","module"],function(e,t,n){t.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS};if(typeof navigator!="object")return;var r=(navigator.platform.match(/mac|win|linux/i)||["other"])[0].toLowerCase(),i=navigator.userAgent;t.isWin=r=="win",t.isMac=r=="mac",t.isLinux=r=="linux",t.isIE=navigator.appName=="Microsoft Internet Explorer"||navigator.appName.indexOf("MSAppHost")>=0?parseFloat((i.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((i.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=window.controllers&&window.navigator.product==="Gecko",t.isOldGecko=t.isGecko&&parseInt((i.match(/rv\:(\d+)/)||[])[1],10)<4,t.isOpera=window.opera&&Object.prototype.toString.call(window.opera)=="[object Opera]",t.isWebKit=parseFloat(i.split("WebKit/")[1])||undefined,t.isChrome=parseFloat(i.split(" Chrome/")[1])||undefined,t.isAIR=i.indexOf("AdobeAIR")>=0,t.isIPad=i.indexOf("iPad")>=0,t.isTouchPad=i.indexOf("TouchPad")>=0,t.isChromeOS=i.indexOf(" CrOS ")>=0}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(e,t,n){function h(e,t,n){return c.$options.wrap=!0,c.$options.needle=t,c.$options.backwards=n==-1,c.find(e)}function v(e,t){return e.row==t.row&&e.column==t.column}function m(e){if(e.$multiselectOnSessionChange)return;e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",o),e.commands.addCommands(f.defaultCommands),g(e)}function g(e){function r(t){n&&(e.renderer.setMouseCursor(""),n=!1)}var t=e.textInput.getElement(),n=!1;u.addListener(t,"keydown",function(t){t.keyCode==18&&!(t.ctrlKey||t.shiftKey||t.metaKey)?n||(e.renderer.setMouseCursor("crosshair"),n=!0):n&&r()}),u.addListener(t,"keyup",r),u.addListener(t,"blur",r)}var r=e("./range_list").RangeList,i=e("./range").Range,s=e("./selection").Selection,o=e("./mouse/multi_select_handler").onMouseDown,u=e("./lib/event"),a=e("./lib/lang"),f=e("./commands/multi_select_commands");t.commands=f.defaultCommands.concat(f.multiSelectCommands);var l=e("./search").Search,c=new l,p=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(p.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(!e)return;if(!this.inMultiSelectMode&&this.rangeCount==0){var n=this.toOrientedRange();this.rangeList.add(n),this.rangeList.add(e);if(this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(n),this.$onAddRange(n)}e.cursor||(e.cursor=e.end);var r=this.rangeList.add(e);return this.$onAddRange(e),r.length&&this.$onRemoveRange(r),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length?this.$onRemoveRange(e):this.ranges[0]&&this.fromOrientedRange(this.ranges[0])},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){this.rangeCount=this.rangeList.ranges.length;if(this.rangeCount==1&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var n=e.length;n--;){var r=this.ranges.indexOf(e[n]);this.ranges.splice(r,1)}this._signal("removeRange",{ranges:e}),this.rangeCount==0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),t=t||this.ranges[0],t&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){if(this.rangeList)return;this.rangeList=new r,this.ranges=[],this.rangeCount=0},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],n=i.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var n=this.getRange(),r=this.isBackwards(),s=n.start.row,o=n.end.row;if(s==o){if(r)var u=n.end,a=n.start;else var u=n.start,a=n.end;this.addRange(i.fromPoints(a,a)),this.addRange(i.fromPoints(u,u));return}var f=[],l=this.getLineRange(s,!0);l.start.column=n.start.column,f.push(l);for(var c=s+1;c<o;c++)f.push(this.getLineRange(c,!0));l=this.getLineRange(o,!0),l.end.column=n.end.column,f.push(l),f.forEach(this.addRange,this)}},this.toggleBlockSelection=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],n=i.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var r=this.session.documentToScreenPosition(this.selectionLead),s=this.session.documentToScreenPosition(this.selectionAnchor),o=this.rectangularRangeBlock(r,s);o.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var r=[],s=e.column<t.column;if(s)var o=e.column,u=t.column;else var o=t.column,u=e.column;var a=e.row<t.row;if(a)var f=e.row,l=t.row;else var f=t.row,l=e.row;o<0&&(o=0),f<0&&(f=0),f==l&&(n=!0);for(var c=f;c<=l;c++){var h=i.fromPoints(this.session.screenToDocumentPosition(c,o),this.session.screenToDocumentPosition(c,u));if(h.isEmpty()){if(p&&v(h.end,p))break;var p=h.end}h.cursor=s?h.start:h.end,r.push(h)}a&&r.reverse();if(!n){var d=r.length-1;while(r[d].isEmpty()&&d>0)d--;if(d>0){var m=0;while(r[m].isEmpty())m++}for(var g=d;g>=m;g--)r[g].isEmpty()&&r.splice(g,1)}return r}}.call(s.prototype);var d=e("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(!e.marker)return;this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);t!=-1&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length},this.removeSelectionMarkers=function(e){var t=this.session.$selectionMarkers;for(var n=e.length;n--;){var r=e[n];if(!r.marker)continue;this.session.removeMarker(r.marker);var i=t.indexOf(r);i!=-1&&t.splice(i,1)}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){if(this.inMultiSelectMode)return;this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(f.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onSingleSelect=function(e){if(this.session.multiSelect.inVirtualMode)return;this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(f.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection")},this.$onMultiSelectExec=function(e){var t=e.command,n=e.editor;if(!n.multiSelect)return;if(!t.multiSelectAction){var r=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}else t.multiSelectAction=="forEach"?r=n.forEachSelection(t,e.args):t.multiSelectAction=="forEachLine"?r=n.forEachSelection(t,e.args,!0):t.multiSelectAction=="single"?(n.exitMultiSelectMode(),r=t.exec(n,e.args||{})):r=t.multiSelectAction(n,e.args||{});return r},this.forEachSelection=function(e,t,n){if(this.inVirtualSelectionMode)return;var r=n&&n.keepOrder,i=n==1||n&&n.$byLines,o=this.session,u=this.selection,a=u.rangeList,f=(r?u:a).ranges,l;if(!f.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var c=u._eventRegistry;u._eventRegistry={};var h=new s(o);this.inVirtualSelectionMode=!0;for(var p=f.length;p--;){if(i)while(p>0&&f[p].start.row==f[p-1].end.row)p--;h.fromOrientedRange(f[p]),h.index=p,this.selection=o.selection=h;var d=e.exec?e.exec(this,t||{}):e(this,t||{});!l&&d!==undefined&&(l=d),h.toOrientedRange(f[p])}h.detach(),this.selection=o.selection=u,this.inVirtualSelectionMode=!1,u._eventRegistry=c,u.mergeOverlappingRanges();var v=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),v&&v.from==v.to&&this.renderer.animateScrolling(v.from),l},this.exitMultiSelectMode=function(){if(!this.inMultiSelectMode||this.inVirtualSelectionMode)return;this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var t=this.multiSelect.rangeList.ranges,n=[];for(var r=0;r<t.length;r++)n.push(this.session.getTextRange(t[r]));var i=this.session.getDocument().getNewLineCharacter();e=n.join(i),e.length==(n.length-1)*i.length&&(e="")}else this.selection.isEmpty()||(e=this.session.getTextRange(this.getSelectionRange()));return e},this.onPaste=function(e){if(this.$readOnly)return;var t={text:e};this._signal("paste",t),e=t.text;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)return this.insert(e);var n=e.split(/\r\n|\r|\n/),r=this.selection.rangeList.ranges;if(n.length>r.length||n.length<2||!n[1])return this.commands.exec("insertstring",this,e);for(var i=r.length;i--;){var s=r[i];s.isEmpty()||this.session.remove(s),this.session.insert(s.start,n[i])}},this.findAll=function(e,t,n){t=t||{},t.needle=e||t.needle;if(t.needle==undefined){var r=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();t.needle=this.session.getTextRange(r)}this.$search.set(t);var i=this.$search.findAll(this.session);if(!i.length)return 0;this.$blockScrolling+=1;var s=this.multiSelect;n||s.toSingleRange(i[0]);for(var o=i.length;o--;)s.addRange(i[o],!0);return r&&s.rangeList.rangeAtPoint(r.start)&&s.addRange(r,!0),this.$blockScrolling-=1,i.length},this.selectMoreLines=function(e,t){var n=this.selection.toOrientedRange(),r=n.cursor==n.end,s=this.session.documentToScreenPosition(n.cursor);this.selection.$desiredColumn&&(s.column=this.selection.$desiredColumn);var o=this.session.screenToDocumentPosition(s.row+e,s.column);if(!n.isEmpty())var u=this.session.documentToScreenPosition(r?n.end:n.start),a=this.session.screenToDocumentPosition(u.row+e,u.column);else var a=o;if(r){var f=i.fromPoints(o,a);f.cursor=f.start}else{var f=i.fromPoints(a,o);f.cursor=f.end}f.desiredColumn=s.column;if(!this.selection.inMultiSelectMode)this.selection.addRange(n);else if(t)var l=n.cursor;this.selection.addRange(f),l&&this.selection.substractPoint(l)},this.transposeSelections=function(e){var t=this.session,n=t.multiSelect,r=n.ranges;for(var i=r.length;i--;){var s=r[i];if(s.isEmpty()){var o=t.getWordRange(s.start.row,s.start.column);s.start.row=o.start.row,s.start.column=o.start.column,s.end.row=o.end.row,s.end.column=o.end.column}}n.mergeOverlappingRanges();var u=[];for(var i=r.length;i--;){var s=r[i];u.unshift(t.getTextRange(s))}e<0?u.unshift(u.pop()):u.push(u.shift());for(var i=r.length;i--;){var s=r[i],o=s.clone();t.replace(s,u[i]),s.start.row=o.start.row,s.start.column=o.start.column}},this.selectMore=function(e,t){var n=this.session,r=n.multiSelect,i=r.toOrientedRange();i.isEmpty()&&(i=n.getWordRange(i.start.row,i.start.column),i.cursor=e==-1?i.start:i.end,this.multiSelect.addRange(i));var s=n.getTextRange(i),o=h(n,s,e);o&&(o.cursor=e==-1?o.start:o.end,this.$blockScrolling+=1,this.session.unfold(o),this.multiSelect.addRange(o),this.$blockScrolling-=1,this.renderer.scrollCursorIntoView(null,.5)),t&&this.multiSelect.substractPoint(i.cursor)},this.alignCursors=function(){var e=this.session,t=e.multiSelect,n=t.ranges;if(!n.length){var r=this.selection.getRange(),s=r.start.row,o=r.end.row,u=s==o;if(u){var f=this.session.getLength(),l;do l=this.session.getLine(o);while(/[=:]/.test(l)&&++o<f);do l=this.session.getLine(s);while(/[=:]/.test(l)&&--s>0);s<0&&(s=0),o>=f&&(o=f-1)}var c=this.session.doc.removeLines(s,o);c=this.$reAlignText(c,u),this.session.doc.insert({row:s,column:0},c.join("\n")+"\n"),u||(r.start.column=0,r.end.column=c[c.length-1].length),this.selection.setRange(r)}else{var h=-1,p=n.filter(function(e){if(e.cursor.row==h)return!0;h=e.cursor.row});t.$onRemoveRange(p);var d=0,v=Infinity,m=n.map(function(t){var n=t.cursor,r=e.getLine(n.row),i=r.substr(n.column).search(/\S/g);return i==-1&&(i=0),n.column>d&&(d=n.column),i<v&&(v=i),i});n.forEach(function(t,n){var r=t.cursor,s=d-r.column,o=m[n]-v;s>o?e.insert(r,a.stringRepeat(" ",s-o)):e.remove(new i(r.row,r.column,r.row,r.column-s+o)),t.start.column=t.end.column=d,t.start.row=t.end.row=r.row,t.cursor=t.end}),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(e,t){function u(e){return a.stringRepeat(" ",e)}function f(e){return e[2]?u(i)+e[2]+u(s-e[2].length+o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function l(e){return e[2]?u(i+s-e[2].length)+e[2]+u(o," ")+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function c(e){return e[2]?u(i)+e[2]+u(o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}var n=!0,r=!0,i,s,o;return e.map(function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?i==null?(i=t[1].length,s=t[2].length,o=t[3].length,t):(i+s+o!=t[1].length+t[2].length+t[3].length&&(r=!1),i!=t[1].length&&(n=!1),i>t[1].length&&(i=t[1].length),s<t[2].length&&(s=t[2].length),o>t[3].length&&(o=t[3].length),t):[e]}).map(t?f:n?r?l:f:c)}}).call(d.prototype),t.onSessionChange=function(e){var t=e.session;t.multiSelect||(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t.multiSelect;var n=e.oldSession;n&&(n.multiSelect.removeEventListener("addRange",this.$onAddRange),n.multiSelect.removeEventListener("removeRange",this.$onRemoveRange),n.multiSelect.removeEventListener("multiSelect",this.$onMultiSelect),n.multiSelect.removeEventListener("singleSelect",this.$onSingleSelect)),t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=m,e("./config").defineOptions(d.prototype,"editor",{enableMultiselect:{set:function(e){m(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",o)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",o))},value:!0}})}),ace.define("ace/lib/oop",["require","exports","module"],function(e,t,n){t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event"],function(e,t,n){function i(e,t){return e.row==t.row&&e.column==t.column}function s(e){var t=e.domEvent,n=t.altKey,s=t.shiftKey,o=e.getAccelKey(),u=e.getButton();if(e.editor.inMultiSelectMode&&u==2){e.editor.textInput.onContextMenu(e.domEvent);return}if(!o&&!n){u===0&&e.editor.inMultiSelectMode&&e.editor.exitMultiSelectMode();return}var a=e.editor,f=a.selection,l=a.inMultiSelectMode,c=e.getDocumentPosition(),h=f.getCursor(),p=e.inSelection()||f.isEmpty()&&i(c,h),d=e.x,v=e.y,m=function(e){d=e.clientX,v=e.clientY},g=function(){var e=a.renderer.pixelToScreenCoordinates(d,v),t=y.screenToDocumentPosition(e.row,e.column);if(i(w,e)&&i(t,f.selectionLead))return;w=e,a.selection.moveToPosition(t),a.renderer.scrollCursorIntoView(),a.removeSelectionMarkers(x),x=f.rectangularRangeBlock(w,b),x.forEach(a.addSelectionMarker,a),a.updateSelectionMarkers()},y=a.session,b=a.renderer.pixelToScreenCoordinates(d,v),w=b;if(o&&!n&&!s&&u===0){if(!l&&p)return;if(!l){var E=f.toOrientedRange();a.addSelectionMarker(E)}var S=f.rangeList.rangeAtPoint(c);a.$blockScrolling++,a.once("mouseup",function(){var e=f.toOrientedRange();S&&e.isEmpty()&&i(S.cursor,e.cursor)?f.substractPoint(e.cursor):(E&&(a.removeSelectionMarker(E),f.addRange(E)),f.addRange(e)),a.$blockScrolling--})}else if(n&&u===0){e.stop(),l&&!o?f.toSingleRange():!l&&o&&f.addRange();var x=[];s?(b=y.documentToScreenPosition(f.lead),g()):f.moveToPosition(c);var T=function(e){clearInterval(C),a.removeSelectionMarkers(x);for(var t=0;t<x.length;t++)f.addRange(x[t])},N=g;r.capture(a.container,m,T);var C=setInterval(function(){N()},20);return e.preventDefault()}}var r=e("../lib/event");t.onMouseDown=s}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(e,t,n){var r=e("./oop"),i=function(){var e={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,"super":8,meta:8,command:8,cmd:8},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"}},t,n;for(n in e.FUNCTION_KEYS)t=e.FUNCTION_KEYS[n].toLowerCase(),e[t]=parseInt(n,10);for(n in e.PRINTABLE_KEYS)t=e.PRINTABLE_KEYS[n].toLowerCase(),e[t]=parseInt(n,10);return r.mixin(e,e.MODIFIER_KEYS),r.mixin(e,e.PRINTABLE_KEYS),r.mixin(e,e.FUNCTION_KEYS),e.enter=e["return"],e.escape=e.esc,e.del=e["delete"],e[173]="-",function(){var t=["cmd","ctrl","alt","shift"];for(var n=Math.pow(2,t.length);n--;)e.KEY_MODS[n]=t.filter(function(t){return n&e.KEY_MODS[t]}).join("-")+"-"}(),e}();r.mixin(t,i),t.keyCodeToString=function(e){var t=i[e];return typeof t!="string"&&(t=String.fromCharCode(e)),t.toLowerCase()}}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(e,t,n){t.defaultCommands=[{name:"addCursorAbove",exec:function(e){e.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},readonly:!0},{name:"addCursorBelow",exec:function(e){e.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},readonly:!0},{name:"addCursorAboveSkipCurrent",exec:function(e){e.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},readonly:!0},{name:"addCursorBelowSkipCurrent",exec:function(e){e.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},readonly:!0},{name:"selectMoreBefore",exec:function(e){e.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},readonly:!0},{name:"selectMoreAfter",exec:function(e){e.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},readonly:!0},{name:"selectNextBefore",exec:function(e){e.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},readonly:!0},{name:"selectNextAfter",exec:function(e){e.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},readonly:!0},{name:"splitIntoLines",exec:function(e){e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readonly:!0},{name:"alignCursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"}},{name:"findAll",exec:function(e){e.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},readonly:!0}],t.multiSelectCommands=[{name:"singleSelection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},readonly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var r=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new r(t.multiSelectCommands)}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,n){function o(e,t,n){var o=s(t);if(!i.isMac&&u){if(u[91]||u[92])o|=8;if(u.altGr){if((3&o)==3)return;u.altGr=0}if(n===18||n===17){var f=t.location||t.keyLocation;if(n===17&&f===1)a=t.timeStamp;else if(n===18&&o===3&&f===2){var l=-a;a=t.timeStamp,l+=a,l<3&&(u.altGr=!0)}}}if(n in r.MODIFIER_KEYS){switch(r.MODIFIER_KEYS[n]){case"Alt":o=2;break;case"Shift":o=4;break;case"Ctrl":o=1;break;default:o=8}n=-1}o&8&&(n===91||n===93)&&(n=-1);if(!o&&n===13)if(t.location||t.keyLocation===3){e(t,o,-n);if(t.defaultPrevented)return}if(i.isChromeOS&&o&8){e(t,o,n);if(t.defaultPrevented)return;o&=-9}return!!o||n in r.FUNCTION_KEYS||n in r.PRINTABLE_KEYS?e(t,o,n):!1}var r=e("./keys"),i=e("./useragent");t.addListener=function(e,t,n){if(e.addEventListener)return e.addEventListener(t,n,!1);if(e.attachEvent){var r=function(){n.call(e,window.event)};n._wrapper=r,e.attachEvent("on"+t,r)}},t.removeListener=function(e,t,n){if(e.removeEventListener)return e.removeEventListener(t,n,!1);e.detachEvent&&e.detachEvent("on"+t,n._wrapper||n)},t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},t.preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},t.getButton=function(e){return e.type=="dblclick"?0:e.type=="contextmenu"||e.ctrlKey&&i.isMac?2:e.preventDefault?e.button:{1:0,2:2,4:1}[e.button]},t.capture=function(e,n,r){function i(e){n&&n(e),r&&r(e),t.removeListener(document,"mousemove",n,!0),t.removeListener(document,"mouseup",i,!0),t.removeListener(document,"dragstart",i,!0)}return t.addListener(document,"mousemove",n,!0),t.addListener(document,"mouseup",i,!0),t.addListener(document,"dragstart",i,!0),i},t.addMouseWheelListener=function(e,n){"onmousewheel"in e?t.addListener(e,"mousewheel",function(e){var t=8;e.wheelDeltaX!==undefined?(e.wheelX=-e.wheelDeltaX/t,e.wheelY=-e.wheelDeltaY/t):(e.wheelX=0,e.wheelY=-e.wheelDelta/t),n(e)}):"onwheel"in e?t.addListener(e,"wheel",function(e){var t=.35;switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=e.deltaX*t||0,e.wheelY=e.deltaY*t||0;break;case e.DOM_DELTA_LINE:case e.DOM_DELTA_PAGE:e.wheelX=(e.deltaX||0)*5,e.wheelY=(e.deltaY||0)*5}n(e)}):t.addListener(e,"DOMMouseScroll",function(e){e.axis&&e.axis==e.HORIZONTAL_AXIS?(e.wheelX=(e.detail||0)*5,e.wheelY=0):(e.wheelX=0,e.wheelY=(e.detail||0)*5),n(e)})},t.addMultiMouseDownListener=function(e,n,r,s){var o=0,u,a,f,l={2:"dblclick",3:"tripleclick",4:"quadclick"};t.addListener(e,"mousedown",function(e){t.getButton(e)!==0?o=0:e.detail>1?(o++,o>4&&(o=1)):o=1;if(i.isIE){var c=Math.abs(e.clientX-u)>5||Math.abs(e.clientY-a)>5;if(!f||c)o=1;f&&clearTimeout(f),f=setTimeout(function(){f=null},n[o-1]||600),o==1&&(u=e.clientX,a=e.clientY)}r[s]("mousedown",e);if(o>4)o=0;else if(o>1)return r[s](l[o],e)}),i.isOldIE&&t.addListener(e,"dblclick",function(e){o=2,f&&clearTimeout(f),f=setTimeout(function(){f=null},n[o-1]||600),r[s]("mousedown",e),r[s](l[o],e)})};var s=!i.isMac||!i.isOpera||"KeyboardEvent"in window?function(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)}:function(e){return 0|(e.metaKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.ctrlKey?8:0)};t.getModifierString=function(e){return r.KEY_MODS[s(e)]};var u=null,a=0;t.addCommandKeyListener=function(e,n){var r=t.addListener;if(i.isOldGecko||i.isOpera&&!("KeyboardEvent"in window)){var s=null;r(e,"keydown",function(e){s=e.keyCode}),r(e,"keypress",function(e){return o(n,e,s)})}else{var a=null;r(e,"keydown",function(e){u[e.keyCode]=!0;var t=o(n,e,e.keyCode);return a=e.defaultPrevented,t}),r(e,"keypress",function(e){a&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),a=null)}),r(e,"keyup",function(e){u[e.keyCode]=null}),u||(u=Object.create(null),r(window,"focus",function(e){u=Object.create(null)}))}};if(window.postMessage&&!i.isOldIE){var f=1;t.nextTick=function(e,n){n=n||window;var r="zero-timeout-message-"+f;t.addListener(n,"message",function i(s){s.data==r&&(t.stopPropagation(s),t.removeListener(n,"message",i),e())}),n.postMessage(r,"*")}}t.nextFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame,t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,t,n){var r=e("../../range").Range,i=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);return this.foldingStartMarker.test(r)?"start":t=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(r)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var i=/\S/,s=e.getLine(t),o=s.search(i);if(o==-1)return;var u=n||s.length,a=e.getLength(),f=t,l=t;while(++t<a){var c=e.getLine(t).search(i);if(c==-1)continue;if(c<=o)break;l=t}if(l>f){var h=e.getLine(l).length;return new r(f,u,l,h)}},this.openingBracketBlock=function(e,t,n,i,s){var o={row:n,column:i+1},u=e.$findClosingBracket(t,o,s);if(!u)return;var a=e.foldWidgets[u.row];return a==null&&(a=e.getFoldWidget(u.row)),a=="start"&&u.row>o.row&&(u.row--,u.column=e.getLine(u.row).length),r.fromPoints(o,u)},this.closingBracketBlock=function(e,t,n,i,s){var o={row:n,column:i},u=e.$findOpeningBracket(t,o);if(!u)return;return u.column++,o.column--,r.fromPoints(u,o)}}).call(i.prototype)}),ace.define("ace/lib/dom",["require","exports","module"],function(e,t,n){if(typeof document=="undefined")return;var r="http://www.w3.org/1999/xhtml";t.getDocumentHead=function(e){return e||(e=document),e.head||e.getElementsByTagName("head")[0]||e.documentElement},t.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||r,e):document.createElement(e)},t.hasCssClass=function(e,t){var n=e.className.split(/\s+/g);return n.indexOf(t)!==-1},t.addCssClass=function(e,n){t.hasCssClass(e,n)||(e.className+=" "+n)},t.removeCssClass=function(e,t){var n=e.className.split(/\s+/g);for(;;){var r=n.indexOf(t);if(r==-1)break;n.splice(r,1)}e.className=n.join(" ")},t.toggleCssClass=function(e,t){var n=e.className.split(/\s+/g),r=!0;for(;;){var i=n.indexOf(t);if(i==-1)break;r=!1,n.splice(i,1)}return r&&n.push(t),e.className=n.join(" "),r},t.setCssClass=function(e,n,r){r?t.addCssClass(e,n):t.removeCssClass(e,n)},t.hasCssString=function(e,t){var n=0,r;t=t||document;if(t.createStyleSheet&&(r=t.styleSheets)){while(n<r.length)if(r[n++].owningElement.id===e)return!0}else if(r=t.getElementsByTagName("style"))while(n<r.length)if(r[n++].id===e)return!0;return!1},t.importCssString=function(n,i,s){s=s||document;if(i&&t.hasCssString(i,s))return null;var o;s.createStyleSheet?(o=s.createStyleSheet(),o.cssText=n,i&&(o.owningElement.id=i)):(o=s.createElementNS?s.createElementNS(r,"style"):s.createElement("style"),o.appendChild(s.createTextNode(n)),i&&(o.id=i),t.getDocumentHead(s).appendChild(o))},t.importCssStylsheet=function(e,n){if(n.createStyleSheet)n.createStyleSheet(e);else{var r=t.createElement("link");r.rel="stylesheet",r.href=e,t.getDocumentHead(n).appendChild(r)}},t.getInnerWidth=function(e){return parseInt(t.computedStyle(e,"paddingLeft"),10)+parseInt(t.computedStyle(e,"paddingRight"),10)+e.clientWidth},t.getInnerHeight=function(e){return parseInt(t.computedStyle(e,"paddingTop"),10)+parseInt(t.computedStyle(e,"paddingBottom"),10)+e.clientHeight},window.pageYOffset!==undefined?(t.getPageScrollTop=function(){return window.pageYOffset},t.getPageScrollLeft=function(){return window.pageXOffset}):(t.getPageScrollTop=function(){return document.body.scrollTop},t.getPageScrollLeft=function(){return document.body.scrollLeft}),window.getComputedStyle?t.computedStyle=function(e,t){return t?(window.getComputedStyle(e,"")||{})[t]||"":window.getComputedStyle(e,"")||{}}:t.computedStyle=function(e,t){return t?e.currentStyle[t]:e.currentStyle},t.scrollbarWidth=function(e){var n=t.createElement("ace_inner");n.style.width="100%",n.style.minWidth="0px",n.style.height="200px",n.style.display="block";var r=t.createElement("ace_outer"),i=r.style;i.position="absolute",i.left="-10000px",i.overflow="hidden",i.width="200px",i.minWidth="0px",i.height="150px",i.display="block",r.appendChild(n);var s=e.documentElement;s.appendChild(r);var o=n.offsetWidth;i.overflow="scroll";var u=n.offsetWidth;return o==u&&(u=r.clientWidth),s.removeChild(r),o-u},t.setInnerHtml=function(e,t){var n=e.cloneNode(!1);return n.innerHTML=t,e.parentNode.replaceChild(n,e),n},"textContent"in document.documentElement?(t.setInnerText=function(e,t){e.textContent=t},t.getInnerText=function(e){return e.textContent}):(t.setInnerText=function(e,t){e.innerText=t},t.getInnerText=function(e){return e.innerText}),t.getParentWindow=function(e){return e.defaultView||e.parentWindow}}),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!1,t.cssClass="ace-tm",t.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;border-radius: 2px;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}';var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(e,t,n){function r(){}function w(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(t){}}function H(e){return e=+e,e!==e?e=0:e!==0&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}function B(e){var t=typeof e;return e===null||t==="undefined"||t==="boolean"||t==="number"||t==="string"}function j(e){var t,n,r;if(B(e))return e;n=e.valueOf;if(typeof n=="function"){t=n.call(e);if(B(t))return t}r=e.toString;if(typeof r=="function"){t=r.call(e);if(B(t))return t}throw new TypeError}Function.prototype.bind||(Function.prototype.bind=function(t){var n=this;if(typeof n!="function")throw new TypeError("Function.prototype.bind called on incompatible "+n);var i=u.call(arguments,1),s=function(){if(this instanceof s){var e=n.apply(this,i.concat(u.call(arguments)));return Object(e)===e?e:this}return n.apply(t,i.concat(u.call(arguments)))};return n.prototype&&(r.prototype=n.prototype,s.prototype=new r,r.prototype=null),s});var i=Function.prototype.call,s=Array.prototype,o=Object.prototype,u=s.slice,a=i.bind(o.toString),f=i.bind(o.hasOwnProperty),l,c,h,p,d;if(d=f(o,"__defineGetter__"))l=i.bind(o.__defineGetter__),c=i.bind(o.__defineSetter__),h=i.bind(o.__lookupGetter__),p=i.bind(o.__lookupSetter__);if([1,2].splice(0).length!=2)if(!function(){function e(e){var t=new Array(e+2);return t[0]=t[1]=0,t}var t=[],n;t.splice.apply(t,e(20)),t.splice.apply(t,e(26)),n=t.length,t.splice(5,0,"XXX"),n+1==t.length;if(n+1==t.length)return!0}())Array.prototype.splice=function(e,t){var n=this.length;e>0?e>n&&(e=n):e==void 0?e=0:e<0&&(e=Math.max(n+e,0)),e+t<n||(t=n-e);var r=this.slice(e,e+t),i=u.call(arguments,2),s=i.length;if(e===n)s&&this.push.apply(this,i);else{var o=Math.min(t,n-e),a=e+o,f=a+s-o,l=n-a,c=n-o;if(f<a)for(var h=0;h<l;++h)this[f+h]=this[a+h];else if(f>a)for(h=l;h--;)this[f+h]=this[a+h];if(s&&e===c)this.length=c,this.push.apply(this,i);else{this.length=c+s;for(h=0;h<s;++h)this[e+h]=i[h]}}return r};else{var v=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?v.apply(this,[e===void 0?0:e,t===void 0?this.length-e:t].concat(u.call(arguments,2))):[]}}Array.isArray||(Array.isArray=function(t){return a(t)=="[object Array]"});var m=Object("a"),g=m[0]!="a"||!(0 in m);Array.prototype.forEach||(Array.prototype.forEach=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=arguments[1],s=-1,o=r.length>>>0;if(a(t)!="[object Function]")throw new TypeError;while(++s<o)s in r&&t.call(i,r[s],s,n)}),Array.prototype.map||(Array.prototype.map=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0,s=Array(i),o=arguments[1];if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");for(var u=0;u<i;u++)u in r&&(s[u]=t.call(o,r[u],u,n));return s}),Array.prototype.filter||(Array.prototype.filter=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0,s=[],o,u=arguments[1];if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");for(var f=0;f<i;f++)f in r&&(o=r[f],t.call(u,o,f,n)&&s.push(o));return s}),Array.prototype.every||(Array.prototype.every=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0,s=arguments[1];if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");for(var o=0;o<i;o++)if(o in r&&!t.call(s,r[o],o,n))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0,s=arguments[1];if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");for(var o=0;o<i;o++)if(o in r&&t.call(s,r[o],o,n))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0;if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");if(!i&&arguments.length==1)throw new TypeError("reduce of empty array with no initial value");var s=0,o;if(arguments.length>=2)o=arguments[1];else do{if(s in r){o=r[s++];break}if(++s>=i)throw new TypeError("reduce of empty array with no initial value")}while(!0);for(;s<i;s++)s in r&&(o=t.call(void 0,o,r[s],s,n));return o}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0;if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");if(!i&&arguments.length==1)throw new TypeError("reduceRight of empty array with no initial value");var s,o=i-1;if(arguments.length>=2)s=arguments[1];else do{if(o in r){s=r[o--];break}if(--o<0)throw new TypeError("reduceRight of empty array with no initial value")}while(!0);do o in this&&(s=t.call(void 0,s,r[o],o,n));while(o--);return s});if(!Array.prototype.indexOf||[0,1].indexOf(1,2)!=-1)Array.prototype.indexOf=function(t){var n=g&&a(this)=="[object String]"?this.split(""):F(this),r=n.length>>>0;if(!r)return-1;var i=0;arguments.length>1&&(i=H(arguments[1])),i=i>=0?i:Math.max(0,r+i);for(;i<r;i++)if(i in n&&n[i]===t)return i;return-1};if(!Array.prototype.lastIndexOf||[0,1].lastIndexOf(0,-3)!=-1)Array.prototype.lastIndexOf=function(t){var n=g&&a(this)=="[object String]"?this.split(""):F(this),r=n.length>>>0;if(!r)return-1;var i=r-1;arguments.length>1&&(i=Math.min(i,H(arguments[1]))),i=i>=0?i:r-Math.abs(i);for(;i>=0;i--)if(i in n&&t===n[i])return i;return-1};Object.getPrototypeOf||(Object.getPrototypeOf=function(t){return t.__proto__||(t.constructor?t.constructor.prototype:o)});if(!Object.getOwnPropertyDescriptor){var y="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(t,n){if(typeof t!="object"&&typeof t!="function"||t===null)throw new TypeError(y+t);if(!f(t,n))return;var r,i,s;r={enumerable:!0,configurable:!0};if(d){var u=t.__proto__;t.__proto__=o;var i=h(t,n),s=p(t,n);t.__proto__=u;if(i||s)return i&&(r.get=i),s&&(r.set=s),r}return r.value=t[n],r}}Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(t){return Object.keys(t)});if(!Object.create){var b;Object.prototype.__proto__===null?b=function(){return{__proto__:null}}:b=function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(t,n){var r;if(t===null)r=b();else{if(typeof t!="object")throw new TypeError("typeof prototype["+typeof t+"] != 'object'");var i=function(){};i.prototype=t,r=new i,r.__proto__=t}return n!==void 0&&Object.defineProperties(r,n),r}}if(Object.defineProperty){var E=w({}),S=typeof document=="undefined"||w(document.createElement("div"));if(!E||!S)var x=Object.defineProperty}if(!Object.defineProperty||x){var T="Property description must be an object: ",N="Object.defineProperty called on non-object: ",C="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(t,n,r){if(typeof t!="object"&&typeof t!="function"||t===null)throw new TypeError(N+t);if(typeof r!="object"&&typeof r!="function"||r===null)throw new TypeError(T+r);if(x)try{return x.call(Object,t,n,r)}catch(i){}if(f(r,"value"))if(d&&(h(t,n)||p(t,n))){var s=t.__proto__;t.__proto__=o,delete t[n],t[n]=r.value,t.__proto__=s}else t[n]=r.value;else{if(!d)throw new TypeError(C);f(r,"get")&&l(t,n,r.get),f(r,"set")&&c(t,n,r.set)}return t}}Object.defineProperties||(Object.defineProperties=function(t,n){for(var r in n)f(n,r)&&Object.defineProperty(t,r,n[r]);return t}),Object.seal||(Object.seal=function(t){return t}),Object.freeze||(Object.freeze=function(t){return t});try{Object.freeze(function(){})}catch(k){Object.freeze=function(t){return function(n){return typeof n=="function"?n:t(n)}}(Object.freeze)}Object.preventExtensions||(Object.preventExtensions=function(t){return t}),Object.isSealed||(Object.isSealed=function(t){return!1}),Object.isFrozen||(Object.isFrozen=function(t){return!1}),Object.isExtensible||(Object.isExtensible=function(t){if(Object(t)===t)throw new TypeError;var n="";while(f(t,n))n+="?";t[n]=!0;var r=f(t,n);return delete t[n],r});if(!Object.keys){var L=!0,A=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],O=A.length;for(var M in{toString:null})L=!1;Object.keys=function I(e){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError("Object.keys called on a non-object");var I=[];for(var t in e)f(e,t)&&I.push(t);if(L)for(var n=0,r=O;n<r;n++){var i=A[n];f(e,i)&&I.push(i)}return I}}Date.now||(Date.now=function(){return(new Date).getTime()});var _="	\n\x0b\f\r \xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff";if(!String.prototype.trim||_.trim()){_="["+_+"]";var D=new RegExp("^"+_+_+"*"),P=new RegExp(_+_+"*$");String.prototype.trim=function(){return String(this).replace(D,"").replace(P,"")}}var F=function(e){if(e==null)throw new TypeError("can't convert "+e+" to object");return Object(e)}}),ace.define("ace/lib/regexp",["require","exports","module"],function(e,t,n){function o(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.extended?"x":"")+(e.sticky?"y":"")}function u(e,t,n){if(Array.prototype.indexOf)return e.indexOf(t,n);for(var r=n||0;r<e.length;r++)if(e[r]===t)return r;return-1}var r={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},i=r.exec.call(/()??/,"")[1]===undefined,s=function(){var e=/^/g;return r.test.call(e,""),!e.lastIndex}();if(s&&i)return;RegExp.prototype.exec=function(e){var t=r.exec.apply(this,arguments),n,a;if(typeof e=="string"&&t){!i&&t.length>1&&u(t,"")>-1&&(a=RegExp(this.source,r.replace.call(o(this),"g","")),r.replace.call(e.slice(t.index),a,function(){for(var e=1;e<arguments.length-2;e++)arguments[e]===undefined&&(t[e]=undefined)}));if(this._xregexp&&this._xregexp.captureNames)for(var f=1;f<t.length;f++)n=this._xregexp.captureNames[f-1],n&&(t[n]=t[f]);!s&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--}return t},s||(RegExp.prototype.test=function(e){var t=r.exec.call(this,e);return t&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--,!!t})}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],function(e,t,n){function o(e,t,n){var r=0,i=e.length-1;while(r<=i){var s=r+i>>1,o=n(t,e[s]);if(o>0)r=s+1;else{if(!(o<0))return s;i=s-1}}return-(r+1)}function u(e,t,n){var r=e.getAnnotations().sort(s.comparePoints);if(!r.length)return;var i=o(r,{row:t,column:-1},s.comparePoints);i<0&&(i=-i-1),i>=r.length-1?i=n>0?0:r.length-1:i===0&&n<0&&(i=r.length-1);var u=r[i];if(!u||!n)return;if(u.row===t){do u=r[i+=n];while(u&&u.row===t);if(!u)return r.slice()}var a=[];t=u.row;do a[n<0?"unshift":"push"](u),u=r[i+=n];while(u&&u.row==t);return a.length&&a}var r=e("ace/line_widgets").LineWidgets,i=e("ace/lib/dom"),s=e("ace/range").Range;t.showErrorMarker=function(e,t){var n=e.session;n.widgetManager||(n.widgetManager=new r(n),n.widgetManager.attach(e));var s=e.getCursorPosition(),o=s.row,a=n.lineWidgets&&n.lineWidgets[o];a?a.destroy():o-=t;var f=u(n,o,t),l;if(f){var c=f[0];s.column=(c.pos&&typeof c.column!="number"?c.pos.sc:c.column)||0,s.row=c.row,l=e.renderer.$gutterLayer.$annotations[s.row]}else{if(a)return;l={text:["Looks good!"],className:"ace_ok"}}e.session.unfold(s.row),e.selection.moveToPosition(s);var h={row:s.row,fixedWidth:!0,coverGutter:!0,el:i.createElement("div")},p=h.el.appendChild(i.createElement("div")),d=h.el.appendChild(i.createElement("div"));d.className="error_widget_arrow "+l.className;var v=e.renderer.$cursorLayer.getPixelPosition(s).left;d.style.left=v+e.renderer.gutterWidth-5+"px",h.el.className="error_widget_wrapper",p.className="error_widget "+l.className,p.innerHTML=l.text.join("<br>"),p.appendChild(i.createElement("div"));var m=function(e,t,n){if(t===0&&(n==="esc"||n==="return"))return h.destroy(),{command:"null"}};h.destroy=function(){if(e.$mouseHandler.isMousePressed)return;e.keyBinding.removeKeyboardHandler(m),n.widgetManager.removeLineWidget(h),e.off("changeSelection",h.destroy),e.off("changeSession",h.destroy),e.off("mouseup",h.destroy),e.off("change",h.destroy)},e.keyBinding.addKeyboardHandler(m),e.on("changeSelection",h.destroy),e.on("changeSession",h.destroy),e.on("mouseup",h.destroy),e.on("change",h.destroy),e.session.widgetManager.addLineWidget(h),h.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:h.el.offsetHeight})},i.importCssString("    .error_widget_wrapper {        background: inherit;        color: inherit;        border:none    }    .error_widget {        border-top: solid 2px;        border-bottom: solid 2px;        margin: 5px 0;        padding: 10px 40px;        white-space: pre-wrap;    }    .error_widget.ace_error, .error_widget_arrow.ace_error{        border-color: #ff5a5a    }    .error_widget.ace_warning, .error_widget_arrow.ace_warning{        border-color: #F1D817    }    .error_widget.ace_info, .error_widget_arrow.ace_info{        border-color: #5a5a5a    }    .error_widget.ace_ok, .error_widget_arrow.ace_ok{        border-color: #5aaa5a    }    .error_widget_arrow {        position: absolute;        border: solid 5px;        border-top-color: transparent!important;        border-right-color: transparent!important;        border-left-color: transparent!important;        top: -5px;    }","")}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],function(e,t,n){e("./regexp"),e("./es5-shim")}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"],function(e,t,n){function o(e){this.session=e,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.detach=this.detach.bind(this),this.session.on("change",this.updateOnChange)}var r=e("./lib/oop"),i=e("./lib/dom"),s=e("./range").Range;(function(){this.getRowLength=function(e){var t;return this.lineWidgets?t=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0:t=0,!this.$useWrapMode||!this.$wrapData[e]?1+t:this.$wrapData[e].length+1+t},this.$getWidgetScreenLength=function(){var e=0;return this.lineWidgets.forEach(function(t){t&&t.rowCount&&(e+=t.rowCount)}),e},this.attach=function(e){e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach();if(this.editor==e)return;this.detach(),this.editor=e,this.editor.on("changeSession",this.detach),e.widgetManager=this,e.setOption("enableLineWidgets",!0),e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets)},this.detach=function(e){if(e&&e.session==this.session)return;var t=this.editor;if(!t)return;t.off("changeSession",this.detach),this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets);var n=this.session.lineWidgets;n&&n.forEach(function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))})},this.updateOnChange=function(e){var t=this.session.lineWidgets;if(!t)return;var n=e.data,r=n.range,i=r.start.row,s=r.end.row-i;if(s!==0)if(n.action=="removeText"||n.action=="removeLines"){var o=t.splice(i+1,s);o.forEach(function(e){e&&this.removeLineWidget(e)},this),this.$updateRows()}else{var u=new Array(s);u.unshift(i,0),t.splice.apply(t,u),this.$updateRows()}},this.$updateRows=function(){var e=this.session.lineWidgets;if(!e)return;var t=!0;e.forEach(function(e,n){e&&(t=!1,e.row=n)}),t&&(this.session.lineWidgets=null)},this.addLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength())),this.session.lineWidgets[e.row]=e;var t=this.editor.renderer;return e.html&&!e.el&&(e.el=i.createElement("div"),e.el.innerHTML=e.html),e.el&&(i.addCssClass(e.el,"ace_lineWidgetContainer"),e.el.style.position="absolute",e.el.style.zIndex=5,t.container.appendChild(e.el),e._inDocument=!0),e.coverGutter||(e.el.style.zIndex=3),e.pixelHeight||(e.pixelHeight=e.el.offsetHeight),e.rowCount==null&&(e.rowCount=e.pixelHeight/t.layerConfig.lineHeight),this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,t),e},this.removeLineWidget=function(e){e._inDocument=!1,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el);if(e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(t){}this.session.lineWidgets&&(this.session.lineWidgets[e.row]=undefined),this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},this.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(e,t){var n=this.session._changedWidgets,r=t.layerConfig;if(!n||!n.length)return;var i=Infinity;for(var s=0;s<n.length;s++){var o=n[s];o._inDocument||(o._inDocument=!0,t.container.appendChild(o.el)),o.h=o.el.offsetHeight,o.fixedWidth||(o.w=o.el.offsetWidth,o.screenWidth=Math.ceil(o.w/r.characterWidth));var u=o.h/r.lineHeight;o.coverLine&&(u-=this.session.getRowLineCount(o.row),u<0&&(u=0)),o.rowCount!=u&&(o.rowCount=u,o.row<i&&(i=o.row))}i!=Infinity&&(this.session._emit("changeFold",{data:{start:{row:i}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]},this.renderWidgets=function(e,t){var n=t.layerConfig,r=this.session.lineWidgets;if(!r)return;var i=Math.min(this.firstRow,n.firstRow),s=Math.max(this.lastRow,n.lastRow,r.length);while(i>0&&!r[i])i--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$cursorLayer.config=n;for(var o=i;o<=s;o++){var u=r[o];if(!u||!u.el)continue;u._inDocument||(u._inDocument=!0,t.container.appendChild(u.el));var a=t.$cursorLayer.getPixelPosition({row:o,column:0},!0).top;u.coverLine||(a+=n.lineHeight*this.session.getRowLineCount(u.row)),u.el.style.top=a-n.offset+"px";var f=u.coverGutter?0:t.gutterWidth;u.fixedWidth||(f-=t.scrollLeft),u.el.style.left=f+"px",u.fixedWidth?u.el.style.right=t.scrollBar.getWidth()+"px":u.el.style.right=""}}}).call(o.prototype),t.LineWidgets=o}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,o=e("./anchor").Anchor,u=function(e){this.$lines=[],e.length===0?this.$lines=[""]:Array.isArray(e)?this._insertLines(0,e):this.insert({row:0,column:0},e)};(function(){r.implement(this,i),this.setValue=function(e){var t=this.getLength();this.remove(new s(0,0,t,this.getLine(t-1).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new o(this,e,t)},"aaa".split(/a/).length===0?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){if(this.$newLineMode===e)return;this.$newLineMode=e,this._signal("changeNewLineMode")},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return e=="\r\n"||e=="\r"||e=="\n"},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){if(e.start.row==e.end.row)return this.getLine(e.start.row).substring(e.start.column,e.end.column);var t=this.getLines(e.start.row,e.end.row);t[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;return e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column)),t.join(this.getNewLineCharacter())},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):e.row<0&&(e.row=0),e},this.insert=function(e,t){if(!t||t.length===0)return e;e=this.$clipPosition(e),this.getLength()<=1&&this.$detectNewLine(t);var n=this.$split(t),r=n.splice(0,1)[0],i=n.length==0?null:n.splice(n.length-1,1)[0];return e=this.insertInLine(e,r),i!==null&&(e=this.insertNewLine(e),e=this._insertLines(e.row,n),e=this.insertInLine(e,i||"")),e},this.insertLines=function(e,t){return e>=this.getLength()?this.insert({row:e,column:0},"\n"+t.join("\n")):this._insertLines(Math.max(e,0),t)},this._insertLines=function(e,t){if(t.length==0)return{row:e,column:0};while(t.length>61440){var n=this._insertLines(e,t.slice(0,61440));t=t.slice(61440),e=n.row}var r=[e,0];r.push.apply(r,t),this.$lines.splice.apply(this.$lines,r);var i=new s(e,0,e+t.length,0),o={action:"insertLines",range:i,lines:t};return this._signal("change",{data:o}),i.end},this.insertNewLine=function(e){e=this.$clipPosition(e);var t=this.$lines[e.row]||"";this.$lines[e.row]=t.substring(0,e.column),this.$lines.splice(e.row+1,0,t.substring(e.column,t.length));var n={row:e.row+1,column:0},r={action:"insertText",range:s.fromPoints(e,n),text:this.getNewLineCharacter()};return this._signal("change",{data:r}),n},this.insertInLine=function(e,t){if(t.length==0)return e;var n=this.$lines[e.row]||"";this.$lines[e.row]=n.substring(0,e.column)+t+n.substring(e.column);var r={row:e.row,column:e.column+t.length},i={action:"insertText",range:s.fromPoints(e,r),text:t};return this._signal("change",{data:i}),r},this.remove=function(e){e instanceof s||(e=s.fromPoints(e.start,e.end)),e.start=this.$clipPosition(e.start),e.end=this.$clipPosition(e.end);if(e.isEmpty())return e.start;var t=e.start.row,n=e.end.row;if(e.isMultiLine()){var r=e.start.column==0?t:t+1,i=n-1;e.end.column>0&&this.removeInLine(n,0,e.end.column),i>=r&&this._removeLines(r,i),r!=t&&(this.removeInLine(t,e.start.column,this.getLine(t).length),this.removeNewLine(e.start.row))}else this.removeInLine(t,e.start.column,e.end.column);return e.start},this.removeInLine=function(e,t,n){if(t==n)return;var r=new s(e,t,e,n),i=this.getLine(e),o=i.substring(t,n),u=i.substring(0,t)+i.substring(n,i.length);this.$lines.splice(e,1,u);var a={action:"removeText",range:r,text:o};return this._signal("change",{data:a}),r.start},this.removeLines=function(e,t){return e<0||t>=this.getLength()?this.remove(new s(e,0,t+1,0)):this._removeLines(e,t)},this._removeLines=function(e,t){var n=new s(e,0,t+1,0),r=this.$lines.splice(e,t-e+1),i={action:"removeLines",range:n,nl:this.getNewLineCharacter(),lines:r};return this._signal("change",{data:i}),r},this.removeNewLine=function(e){var t=this.getLine(e),n=this.getLine(e+1),r=new s(e,t.length,e+1,0),i=t+n;this.$lines.splice(e,2,i);var o={action:"removeText",range:r,text:this.getNewLineCharacter()};this._signal("change",{data:o})},this.replace=function(e,t){e instanceof s||(e=s.fromPoints(e.start,e.end));if(t.length==0&&e.isEmpty())return e.start;if(t==this.getTextRange(e))return e.end;this.remove(e);if(t)var n=this.insert(e.start,t);else n=e.start;return n},this.applyDeltas=function(e){for(var t=0;t<e.length;t++){var n=e[t],r=s.fromPoints(n.range.start,n.range.end);n.action=="insertLines"?this.insertLines(r.start.row,n.lines):n.action=="insertText"?this.insert(r.start,n.text):n.action=="removeLines"?this._removeLines(r.start.row,r.end.row-1):n.action=="removeText"&&this.remove(r)}},this.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--){var n=e[t],r=s.fromPoints(n.range.start,n.range.end);n.action=="insertLines"?this._removeLines(r.start.row,r.end.row-1):n.action=="insertText"?this.remove(r):n.action=="removeLines"?this._insertLines(r.start.row,n.lines):n.action=="removeText"&&this.insert(r.start,n.text)}},this.indexToPosition=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length;for(var i=t||0,s=n.length;i<s;i++){e-=n[i].length+r;if(e<0)return{row:i,column:e+n[i].length+r}}return{row:s-1,column:n[s-1].length}},this.positionToIndex=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=0,s=Math.min(e.row,n.length);for(var o=t||0;o<s;++o)i+=n[o].length+r;return i+e.column}}).call(u.prototype),t.Document=u}),function(){ace.require(["ace/ace"],function(e){e&&e.config.init(!0),window.ace||(window.ace=e);for(var t in e)e.hasOwnProperty(t)&&(ace[t]=e[t])})}()
\ No newline at end of file
diff --git a/app/assets/lib/ace/ext-beautify.js b/app/assets/lib/ace/ext-beautify.js
new file mode 100644
index 000000000..0bfbb2657
--- /dev/null
+++ b/app/assets/lib/ace/ext-beautify.js
@@ -0,0 +1 @@
+ace.define("ace/ext/beautify",["require","exports","module","ace/token_iterator","ace/ext/beautify/php_rules"],function(e,t,n){var r=e("ace/token_iterator").TokenIterator,i=e("./beautify/php_rules").transform;t.beautify=function(e){var t=new r(e,0,0),n=t.getCurrentToken(),s=e.$modeId.split("/").pop(),o=i(t,s);e.doc.setValue(o)},t.commands=[{name:"beautify",exec:function(e){t.beautify(e.session)},bindKey:"Ctrl-Shift-B"}]}),ace.define("ace/ext/beautify/php_rules",["require","exports","module","ace/token_iterator"],function(e,t,n){var r=e("ace/token_iterator").TokenIterator;t.newLines=[{type:"support.php_tag",value:"<?php"},{type:"support.php_tag",value:"<?"},{type:"support.php_tag",value:"?>"},{type:"paren.lparen",value:"{",indent:!0},{type:"paren.rparen",breakBefore:!0,value:"}",indent:!1},{type:"paren.rparen",breakBefore:!0,value:"})",indent:!1,dontBreak:!0},{type:"comment"},{type:"text",value:";"},{type:"text",value:":",context:"php"},{type:"keyword",value:"case",indent:!0,dontBreak:!0},{type:"keyword",value:"default",indent:!0,dontBreak:!0},{type:"keyword",value:"break",indent:!1,dontBreak:!0},{type:"punctuation.doctype.end",value:">"},{type:"meta.tag.punctuation.end",value:">"},{type:"meta.tag.punctuation.begin",value:"<",blockTag:!0,indent:!0,dontBreak:!0},{type:"meta.tag.punctuation.begin",value:"</",indent:!1,breakBefore:!0,dontBreak:!0},{type:"punctuation.operator",value:";"}],t.spaces=[{type:"xml-pe",prepend:!0},{type:"entity.other.attribute-name",prepend:!0},{type:"storage.type",value:"var",append:!0},{type:"storage.type",value:"function",append:!0},{type:"keyword.operator",value:"="},{type:"keyword",value:"as",prepend:!0,append:!0},{type:"keyword",value:"function",append:!0},{type:"support.function",next:/[^\(]/,append:!0},{type:"keyword",value:"or",append:!0,prepend:!0},{type:"keyword",value:"and",append:!0,prepend:!0},{type:"keyword",value:"case",append:!0},{type:"keyword.operator",value:"||",append:!0,prepend:!0},{type:"keyword.operator",value:"&&",append:!0,prepend:!0}],t.singleTags=["!doctype","area","base","br","hr","input","img","link","meta"],t.transform=function(e,n,r){var i=e.getCurrentToken(),s=t.newLines,o=t.spaces,u=t.singleTags,a="",f=0,l=!1,c,h,p={},d,v={},m=!1,g="";while(i!==null){console.log(i);if(!i){i=e.stepForward();continue}i.type=="support.php_tag"&&i.value!="?>"?r="php":i.type=="support.php_tag"&&i.value=="?>"?r="html":i.type=="meta.tag.name.style"&&r!="css"?r="css":i.type=="meta.tag.name.style"&&r=="css"?r="html":i.type=="meta.tag.name.script"&&r!="js"?r="js":i.type=="meta.tag.name.script"&&r=="js"&&(r="html"),v=e.stepForward(),v&&v.type.indexOf("meta.tag.name")==0&&(d=v.value),p.type=="support.php_tag"&&p.value=="<?="&&(l=!0),i.type=="meta.tag.name"&&(i.value=i.value.toLowerCase()),i.type=="text"&&(i.value=i.value.trim());if(!i.value){i=v;continue}g=i.value;for(var y in o)i.type==o[y].type&&(!o[y].value||i.value==o[y].value)&&v&&(!o[y].next||o[y].next.test(v.value))&&(o[y].prepend&&(g=" "+i.value),o[y].append&&(g+=" "));i.type.indexOf("meta.tag.name")==0&&(c=i.value),m=!1;for(y in s)if(i.type==s[y].type&&(!s[y].value||i.value==s[y].value)&&(!s[y].blockTag||u.indexOf(d)===-1)&&(!s[y].context||s[y].context===r)){s[y].indent===!1&&f--;if(s[y].breakBefore&&(!s[y].prev||s[y].prev.test(p.value))){a+="\n",m=!0;for(y=0;y<f;y++)a+="	"}break}if(l===!1)for(y in s)if(p.type==s[y].type&&(!s[y].value||p.value==s[y].value)&&(!s[y].blockTag||u.indexOf(c)===-1)&&(!s[y].context||s[y].context===r)){s[y].indent===!0&&f++;if(!s[y].dontBreak&&!m){a+="\n";for(y=0;y<f;y++)a+="	"}break}a+=g,p.type=="support.php_tag"&&p.value=="?>"&&(l=!1),h=c,p=i,i=v;if(i===null)break}return a}}),function(){ace.require(["ace/ext/beautify"],function(){})}()
\ No newline at end of file
diff --git a/app/assets/lib/ace/ext-chromevox.js b/app/assets/lib/ace/ext-chromevox.js
index 8c17ac865..530a40a64 100644
--- a/app/assets/lib/ace/ext-chromevox.js
+++ b/app/assets/lib/ace/ext-chromevox.js
@@ -1 +1 @@
-ace.define("ace/ext/chromevox",["require","exports","module","ace/editor","ace/config"],function(e,t,n){function gt(){return typeof cvox!="undefined"&&cvox&&cvox.Api}function wt(e){if(gt())mt(e);else{yt++;if(yt>=bt)return;window.setTimeout(wt,500,e)}}var r={};r.SpeechProperty,r.Cursor,r.Token,r.Annotation;var i={rate:.8,pitch:.4,volume:.9},s={rate:1,pitch:.5,volume:.9},o={rate:.8,pitch:.8,volume:.9},u={rate:.8,pitch:.3,volume:.9},a={rate:.8,pitch:.7,volume:.9},f={rate:.8,pitch:.8,volume:.9},l={punctuationEcho:"none",relativePitch:-0.6},c="ALERT_NONMODAL",h="ALERT_MODAL",p="INVALID_KEYPRESS",d="insertMode",v="start",m=[{substr:";",newSubstr:" semicolon "},{substr:":",newSubstr:" colon "}],g={SPEAK_ANNOT:"annots",SPEAK_ALL_ANNOTS:"all_annots",TOGGLE_LOCATION:"toggle_location",SPEAK_MODE:"mode",SPEAK_ROW_COL:"row_col",TOGGLE_DISPLACEMENT:"toggle_displacement",FOCUS_TEXT:"focus_text"},y="CONTROL + SHIFT ";r.editor=null;var b=null,w={},E=!1,S=!1,x=!1,T=null,N={},C={},k=function(e){return y+String.fromCharCode(e)},L=function(){var e=r.editor.keyBinding.getKeyboardHandler();return e.$id==="ace/keyboard/vim"},A=function(e){return r.editor.getSession().getTokenAt(e.row,e.column+1)},O=function(e){return r.editor.getSession().getLine(e.row)},M=function(e){w[e.row]&&cvox.Api.playEarcon(c),E?(cvox.Api.stop(),W(e),R(A(e)),I(e.row,1)):I(e.row,0)},_=function(e){var t=O(e),n=t.substr(e.column-1);e.column===0&&(n=" "+t);var r=/^\W(\w+)/,i=r.exec(n);return i!==null},D={constant:{prop:i},entity:{prop:o},keyword:{prop:u},storage:{prop:a},variable:{prop:f},meta:{prop:s,replace:[{substr:"</",newSubstr:" closing tag "},{substr:"/>",newSubstr:" close tag "},{substr:"<",newSubstr:" tag start "},{substr:">",newSubstr:" tag end "}]}},P={prop:P},H=function(e,t){var n=e;for(var r=0;r<t.length;r++){var i=t[r],s=new RegExp(i.substr,"g");n=n.replace(s,i.newSubstr)}return n},B=function(e,t,n){var r={};r.value="",r.type=e[t].type;for(var i=t;i<n;i++)r.value+=e[i].value;return r},j=function(e){if(e.length<=1)return e;var t=[],n=0;for(var r=1;r<e.length;r++){var i=e[n],s=e[r];U(i)!==U(s)&&(t.push(B(e,n,r)),n=r)}return t.push(B(e,n,e.length)),t},F=function(e){var t=r.editor.getSession().getLine(e),n=/^\s*$/;return n.exec(t)!==null},I=function(e,t){var n=r.editor.getSession().getTokens(e);if(n.length===0||F(e)){cvox.Api.playEarcon("EDITABLE_TEXT");return}n=j(n);var i=n[0];n=n.filter(function(e){return e!==i}),z(i,t),n.forEach(R)},q=function(e){z(e,0)},R=function(e){z(e,1)},U=function(e){if(!e||!e.type)return;var t=e.type.split(".");if(t.length===0)return;var n=t[0],r=D[n];return r?r:P},z=function(e,t){var n=U(e),r=H(e.value,m);n.replace&&(r=H(r,n.replace)),cvox.Api.speak(r,t,n.prop)},W=function(e){var t=O(e);cvox.Api.speak(t[e.column],1)},X=function(e,t){var n=O(t),r=n.substring(e.column,t.column);r=r.replace(/ /g," space "),cvox.Api.speak(r)},V=function(e,t){if(Math.abs(e.column-t.column)!==1){var n=O(t).length;if(t.column===0||t.column===n){I(t.row,0);return}if(_(t)){cvox.Api.stop(),R(A(t));return}}W(t)},$=function(e,t){r.editor.selection.isEmpty()?S?X(e,t):V(e,t):(X(e,t),cvox.Api.speak("selected",1))},J=function(e){if(x){x=!1;return}var t=r.editor.selection.getCursor();t.row!==b.row?M(t):$(b,t),b=t},K=function(e){r.editor.selection.isEmpty()&&cvox.Api.speak("unselected")},Q=function(e){var t=e.data;switch(t.action){case"removeText":cvox.Api.speak(t.text,0,l),x=!0;break;case"insertText":cvox.Api.speak(t.text,0),x=!0}},G=function(e){var t=e.row,n=e.column;return!w[t]||!w[t][n]},Y=function(e){w={};for(var t=0;t<e.length;t++){var n=e[t],r=n.row,i=n.column;w[r]||(w[r]={}),w[r][i]=n}},Z=function(e){var t=r.editor.getSession().getAnnotations(),n=t.filter(G);n.length>0&&cvox.Api.playEarcon(c),Y(t)},et=function(e){var t=e.type+" "+e.text+" on "+nt(e.row,e.column);t=t.replace(";","semicolon"),cvox.Api.speak(t,1)},tt=function(e){var t=w[e];for(var n in t)et(t[n])},nt=function(e,t){return"row "+(e+1)+" column "+(t+1)},rt=function(){cvox.Api.speak(nt(b.row,b.column))},it=function(){for(var e in w)tt(e)},st=function(){if(!L())return;switch(r.editor.keyBinding.$data.state){case d:cvox.Api.speak("Insert mode");break;case v:cvox.Api.speak("Command mode")}},ot=function(){E=!E,E?cvox.Api.speak("Speak location on row change enabled."):cvox.Api.speak("Speak location on row change disabled.")},ut=function(){S=!S,S?cvox.Api.speak("Speak displacement on column changes."):cvox.Api.speak("Speak current character or word on column changes.")},at=function(e){if(e.ctrlKey&&e.shiftKey){var t=N[e.keyCode];t&&t.func()}},ft=function(e,t){if(!L())return;var n=t.keyBinding.$data.state;if(n===T)return;switch(n){case d:cvox.Api.playEarcon(h),cvox.Api.setKeyEcho(!0);break;case v:cvox.Api.playEarcon(h),cvox.Api.setKeyEcho(!1)}T=n},lt=function(e){var t=e.detail.customCommand,n=C[t];n&&(n.func(),r.editor.focus())},ct=function(){var e=dt.map(function(e){return{desc:e.desc+k(e.keyCode),cmd:e.cmd}}),t=document.querySelector("body");t.setAttribute("contextMenuActions",JSON.stringify(e)),t.addEventListener("ATCustomEvent",lt,!0)},ht=function(e){e.match?I(b.row,0):cvox.Api.playEarcon(p)},pt=function(){r.editor.focus()},dt=[{keyCode:49,func:function(){tt(b.row)},cmd:g.SPEAK_ANNOT,desc:"Speak annotations on line"},{keyCode:50,func:it,cmd:g.SPEAK_ALL_ANNOTS,desc:"Speak all annotations"},{keyCode:51,func:st,cmd:g.SPEAK_MODE,desc:"Speak Vim mode"},{keyCode:52,func:ot,cmd:g.TOGGLE_LOCATION,desc:"Toggle speak row location"},{keyCode:53,func:rt,cmd:g.SPEAK_ROW_COL,desc:"Speak row and column"},{keyCode:54,func:ut,cmd:g.TOGGLE_DISPLACEMENT,desc:"Toggle speak displacement"},{keyCode:55,func:pt,cmd:g.FOCUS_TEXT,desc:"Focus text"}],vt=function(){r.editor=editor,editor.getSession().selection.on("changeCursor",J),editor.getSession().selection.on("changeSelection",K),editor.getSession().on("change",Q),editor.getSession().on("changeAnnotation",Z),editor.on("changeStatus",ft),editor.on("findSearchBox",ht),editor.container.addEventListener("keydown",at),b=editor.selection.getCursor()},mt=function(e){vt(),dt.forEach(function(e){N[e.keyCode]=e,C[e.cmd]=e}),e.on("focus",vt),L()&&cvox.Api.setKeyEcho(!1),ct()},yt=0,bt=15,Et=e("../editor").Editor;e("../config").defineOptions(Et.prototype,"editor",{enableChromevoxEnhancements:{set:function(e){e&&wt(this)},value:!0}})})
\ No newline at end of file
+ace.define("ace/ext/chromevox",["require","exports","module","ace/editor","ace/config"],function(e,t,n){function gt(){return typeof cvox!="undefined"&&cvox&&cvox.Api}function wt(e){if(gt())mt(e);else{yt++;if(yt>=bt)return;window.setTimeout(wt,500,e)}}var r={};r.SpeechProperty,r.Cursor,r.Token,r.Annotation;var i={rate:.8,pitch:.4,volume:.9},s={rate:1,pitch:.5,volume:.9},o={rate:.8,pitch:.8,volume:.9},u={rate:.8,pitch:.3,volume:.9},a={rate:.8,pitch:.7,volume:.9},f={rate:.8,pitch:.8,volume:.9},l={punctuationEcho:"none",relativePitch:-0.6},c="ALERT_NONMODAL",h="ALERT_MODAL",p="INVALID_KEYPRESS",d="insertMode",v="start",m=[{substr:";",newSubstr:" semicolon "},{substr:":",newSubstr:" colon "}],g={SPEAK_ANNOT:"annots",SPEAK_ALL_ANNOTS:"all_annots",TOGGLE_LOCATION:"toggle_location",SPEAK_MODE:"mode",SPEAK_ROW_COL:"row_col",TOGGLE_DISPLACEMENT:"toggle_displacement",FOCUS_TEXT:"focus_text"},y="CONTROL + SHIFT ";r.editor=null;var b=null,w={},E=!1,S=!1,x=!1,T=null,N={},C={},k=function(e){return y+String.fromCharCode(e)},L=function(){var e=r.editor.keyBinding.getKeyboardHandler();return e.$id==="ace/keyboard/vim"},A=function(e){return r.editor.getSession().getTokenAt(e.row,e.column+1)},O=function(e){return r.editor.getSession().getLine(e.row)},M=function(e){w[e.row]&&cvox.Api.playEarcon(c),E?(cvox.Api.stop(),W(e),R(A(e)),I(e.row,1)):I(e.row,0)},_=function(e){var t=O(e),n=t.substr(e.column-1);e.column===0&&(n=" "+t);var r=/^\W(\w+)/,i=r.exec(n);return i!==null},D={constant:{prop:i},entity:{prop:o},keyword:{prop:u},storage:{prop:a},variable:{prop:f},meta:{prop:s,replace:[{substr:"</",newSubstr:" closing tag "},{substr:"/>",newSubstr:" close tag "},{substr:"<",newSubstr:" tag start "},{substr:">",newSubstr:" tag end "}]}},P={prop:P},H=function(e,t){var n=e;for(var r=0;r<t.length;r++){var i=t[r],s=new RegExp(i.substr,"g");n=n.replace(s,i.newSubstr)}return n},B=function(e,t,n){var r={};r.value="",r.type=e[t].type;for(var i=t;i<n;i++)r.value+=e[i].value;return r},j=function(e){if(e.length<=1)return e;var t=[],n=0;for(var r=1;r<e.length;r++){var i=e[n],s=e[r];U(i)!==U(s)&&(t.push(B(e,n,r)),n=r)}return t.push(B(e,n,e.length)),t},F=function(e){var t=r.editor.getSession().getLine(e),n=/^\s*$/;return n.exec(t)!==null},I=function(e,t){var n=r.editor.getSession().getTokens(e);if(n.length===0||F(e)){cvox.Api.playEarcon("EDITABLE_TEXT");return}n=j(n);var i=n[0];n=n.filter(function(e){return e!==i}),z(i,t),n.forEach(R)},q=function(e){z(e,0)},R=function(e){z(e,1)},U=function(e){if(!e||!e.type)return;var t=e.type.split(".");if(t.length===0)return;var n=t[0],r=D[n];return r?r:P},z=function(e,t){var n=U(e),r=H(e.value,m);n.replace&&(r=H(r,n.replace)),cvox.Api.speak(r,t,n.prop)},W=function(e){var t=O(e);cvox.Api.speak(t[e.column],1)},X=function(e,t){var n=O(t),r=n.substring(e.column,t.column);r=r.replace(/ /g," space "),cvox.Api.speak(r)},V=function(e,t){if(Math.abs(e.column-t.column)!==1){var n=O(t).length;if(t.column===0||t.column===n){I(t.row,0);return}if(_(t)){cvox.Api.stop(),R(A(t));return}}W(t)},$=function(e,t){r.editor.selection.isEmpty()?S?X(e,t):V(e,t):(X(e,t),cvox.Api.speak("selected",1))},J=function(e){if(x){x=!1;return}var t=r.editor.selection.getCursor();t.row!==b.row?M(t):$(b,t),b=t},K=function(e){r.editor.selection.isEmpty()&&cvox.Api.speak("unselected")},Q=function(e){var t=e.data;switch(t.action){case"removeText":cvox.Api.speak(t.text,0,l),x=!0;break;case"insertText":cvox.Api.speak(t.text,0),x=!0}},G=function(e){var t=e.row,n=e.column;return!w[t]||!w[t][n]},Y=function(e){w={};for(var t=0;t<e.length;t++){var n=e[t],r=n.row,i=n.column;w[r]||(w[r]={}),w[r][i]=n}},Z=function(e){var t=r.editor.getSession().getAnnotations(),n=t.filter(G);n.length>0&&cvox.Api.playEarcon(c),Y(t)},et=function(e){var t=e.type+" "+e.text+" on "+nt(e.row,e.column);t=t.replace(";","semicolon"),cvox.Api.speak(t,1)},tt=function(e){var t=w[e];for(var n in t)et(t[n])},nt=function(e,t){return"row "+(e+1)+" column "+(t+1)},rt=function(){cvox.Api.speak(nt(b.row,b.column))},it=function(){for(var e in w)tt(e)},st=function(){if(!L())return;switch(r.editor.keyBinding.$data.state){case d:cvox.Api.speak("Insert mode");break;case v:cvox.Api.speak("Command mode")}},ot=function(){E=!E,E?cvox.Api.speak("Speak location on row change enabled."):cvox.Api.speak("Speak location on row change disabled.")},ut=function(){S=!S,S?cvox.Api.speak("Speak displacement on column changes."):cvox.Api.speak("Speak current character or word on column changes.")},at=function(e){if(e.ctrlKey&&e.shiftKey){var t=N[e.keyCode];t&&t.func()}},ft=function(e,t){if(!L())return;var n=t.keyBinding.$data.state;if(n===T)return;switch(n){case d:cvox.Api.playEarcon(h),cvox.Api.setKeyEcho(!0);break;case v:cvox.Api.playEarcon(h),cvox.Api.setKeyEcho(!1)}T=n},lt=function(e){var t=e.detail.customCommand,n=C[t];n&&(n.func(),r.editor.focus())},ct=function(){var e=dt.map(function(e){return{desc:e.desc+k(e.keyCode),cmd:e.cmd}}),t=document.querySelector("body");t.setAttribute("contextMenuActions",JSON.stringify(e)),t.addEventListener("ATCustomEvent",lt,!0)},ht=function(e){e.match?I(b.row,0):cvox.Api.playEarcon(p)},pt=function(){r.editor.focus()},dt=[{keyCode:49,func:function(){tt(b.row)},cmd:g.SPEAK_ANNOT,desc:"Speak annotations on line"},{keyCode:50,func:it,cmd:g.SPEAK_ALL_ANNOTS,desc:"Speak all annotations"},{keyCode:51,func:st,cmd:g.SPEAK_MODE,desc:"Speak Vim mode"},{keyCode:52,func:ot,cmd:g.TOGGLE_LOCATION,desc:"Toggle speak row location"},{keyCode:53,func:rt,cmd:g.SPEAK_ROW_COL,desc:"Speak row and column"},{keyCode:54,func:ut,cmd:g.TOGGLE_DISPLACEMENT,desc:"Toggle speak displacement"},{keyCode:55,func:pt,cmd:g.FOCUS_TEXT,desc:"Focus text"}],vt=function(){r.editor=editor,editor.getSession().selection.on("changeCursor",J),editor.getSession().selection.on("changeSelection",K),editor.getSession().on("change",Q),editor.getSession().on("changeAnnotation",Z),editor.on("changeStatus",ft),editor.on("findSearchBox",ht),editor.container.addEventListener("keydown",at),b=editor.selection.getCursor()},mt=function(e){vt(),dt.forEach(function(e){N[e.keyCode]=e,C[e.cmd]=e}),e.on("focus",vt),L()&&cvox.Api.setKeyEcho(!1),ct()},yt=0,bt=15,Et=e("../editor").Editor;e("../config").defineOptions(Et.prototype,"editor",{enableChromevoxEnhancements:{set:function(e){e&&wt(this)},value:!0}})}),function(){ace.require(["ace/ext/chromevox"],function(){})}()
\ No newline at end of file
diff --git a/app/assets/lib/ace/ext-elastic_tabstops_lite.js b/app/assets/lib/ace/ext-elastic_tabstops_lite.js
index 432e02a92..e4b0c343b 100644
--- a/app/assets/lib/ace/ext-elastic_tabstops_lite.js
+++ b/app/assets/lib/ace/ext-elastic_tabstops_lite.js
@@ -1 +1 @@
-ace.define("ace/ext/elastic_tabstops_lite",["require","exports","module","ace/editor","ace/config"],function(e,t,n){var r=function(e){this.$editor=e;var t=this,n=[],r=!1;this.onAfterExec=function(){r=!1,t.processRows(n),n=[]},this.onExec=function(){r=!0},this.onChange=function(e){var t=e.data.range;r&&(n.indexOf(t.start.row)==-1&&n.push(t.start.row),t.end.row!=t.start.row&&n.push(t.end.row))}};(function(){this.processRows=function(e){this.$inChange=!0;var t=[];for(var n=0,r=e.length;n<r;n++){var i=e[n];if(t.indexOf(i)>-1)continue;var s=this.$findCellWidthsForBlock(i),o=this.$setBlockCellWidthsToMax(s.cellWidths),u=s.firstRow;for(var a=0,f=o.length;a<f;a++){var l=o[a];t.push(u),this.$adjustRow(u,l),u++}}this.$inChange=!1},this.$findCellWidthsForBlock=function(e){var t=[],n,r=e;while(r>=0){n=this.$cellWidthsForRow(r);if(n.length==0)break;t.unshift(n),r--}var i=r+1;r=e;var s=this.$editor.session.getLength();while(r<s-1){r++,n=this.$cellWidthsForRow(r);if(n.length==0)break;t.push(n)}return{cellWidths:t,firstRow:i}},this.$cellWidthsForRow=function(e){var t=this.$selectionColumnsForRow(e),n=[-1].concat(this.$tabsForRow(e)),r=n.map(function(e){return 0}).slice(1),i=this.$editor.session.getLine(e);for(var s=0,o=n.length-1;s<o;s++){var u=n[s]+1,a=n[s+1],f=this.$rightmostSelectionInCell(t,a),l=i.substring(u,a);r[s]=Math.max(l.replace(/\s+$/g,"").length,f-u)}return r},this.$selectionColumnsForRow=function(e){var t=[],n=this.$editor.getCursorPosition();return this.$editor.session.getSelection().isEmpty()&&e==n.row&&t.push(n.column),t},this.$setBlockCellWidthsToMax=function(e){var t=!0,n,r,i,s=this.$izip_longest(e);for(var o=0,u=s.length;o<u;o++){var a=s[o];if(!a.push){console.error(a);continue}a.push(NaN);for(var f=0,l=a.length;f<l;f++){var c=a[f];t&&(n=f,i=0,t=!1);if(isNaN(c)){r=f;for(var h=n;h<r;h++)e[h][o]=i;t=!0}i=Math.max(i,c)}}return e},this.$rightmostSelectionInCell=function(e,t){var n=0;if(e.length){var r=[];for(var i=0,s=e.length;i<s;i++)e[i]<=t?r.push(i):r.push(0);n=Math.max.apply(Math,r)}return n},this.$tabsForRow=function(e){var t=[],n=this.$editor.session.getLine(e),r=/\t/g,i;while((i=r.exec(n))!=null)t.push(i.index);return t},this.$adjustRow=function(e,t){var n=this.$tabsForRow(e);if(n.length==0)return;var r=0,i=-1,s=this.$izip(t,n);for(var o=0,u=s.length;o<u;o++){var a=s[o][0],f=s[o][1];i+=1+a,f+=r;var l=i-f;if(l==0)continue;var c=this.$editor.session.getLine(e).substr(0,f),h=c.replace(/\s*$/g,""),p=c.length-h.length;l>0&&(this.$editor.session.getDocument().insertInLine({row:e,column:f+1},Array(l+1).join(" ")+"	"),this.$editor.session.getDocument().removeInLine(e,f,f+1),r+=l),l<0&&p>=-l&&(this.$editor.session.getDocument().removeInLine(e,f+l,f),r+=l)}},this.$izip_longest=function(e){if(!e[0])return[];var t=e[0].length,n=e.length;for(var r=1;r<n;r++){var i=e[r].length;i>t&&(t=i)}var s=[];for(var o=0;o<t;o++){var u=[];for(var r=0;r<n;r++)e[r][o]===""?u.push(NaN):u.push(e[r][o]);s.push(u)}return s},this.$izip=function(e,t){var n=e.length>=t.length?t.length:e.length,r=[];for(var i=0;i<n;i++){var s=[e[i],t[i]];r.push(s)}return r}}).call(r.prototype),t.ElasticTabstopsLite=r;var i=e("../editor").Editor;e("../config").defineOptions(i.prototype,"editor",{useElasticTabstops:{set:function(e){e?(this.elasticTabstops||(this.elasticTabstops=new r(this)),this.commands.on("afterExec",this.elasticTabstops.onAfterExec),this.commands.on("exec",this.elasticTabstops.onExec),this.on("change",this.elasticTabstops.onChange)):this.elasticTabstops&&(this.commands.removeListener("afterExec",this.elasticTabstops.onAfterExec),this.commands.removeListener("exec",this.elasticTabstops.onExec),this.removeListener("change",this.elasticTabstops.onChange))}}})})
\ No newline at end of file
+ace.define("ace/ext/elastic_tabstops_lite",["require","exports","module","ace/editor","ace/config"],function(e,t,n){var r=function(e){this.$editor=e;var t=this,n=[],r=!1;this.onAfterExec=function(){r=!1,t.processRows(n),n=[]},this.onExec=function(){r=!0},this.onChange=function(e){var t=e.data.range;r&&(n.indexOf(t.start.row)==-1&&n.push(t.start.row),t.end.row!=t.start.row&&n.push(t.end.row))}};(function(){this.processRows=function(e){this.$inChange=!0;var t=[];for(var n=0,r=e.length;n<r;n++){var i=e[n];if(t.indexOf(i)>-1)continue;var s=this.$findCellWidthsForBlock(i),o=this.$setBlockCellWidthsToMax(s.cellWidths),u=s.firstRow;for(var a=0,f=o.length;a<f;a++){var l=o[a];t.push(u),this.$adjustRow(u,l),u++}}this.$inChange=!1},this.$findCellWidthsForBlock=function(e){var t=[],n,r=e;while(r>=0){n=this.$cellWidthsForRow(r);if(n.length==0)break;t.unshift(n),r--}var i=r+1;r=e;var s=this.$editor.session.getLength();while(r<s-1){r++,n=this.$cellWidthsForRow(r);if(n.length==0)break;t.push(n)}return{cellWidths:t,firstRow:i}},this.$cellWidthsForRow=function(e){var t=this.$selectionColumnsForRow(e),n=[-1].concat(this.$tabsForRow(e)),r=n.map(function(e){return 0}).slice(1),i=this.$editor.session.getLine(e);for(var s=0,o=n.length-1;s<o;s++){var u=n[s]+1,a=n[s+1],f=this.$rightmostSelectionInCell(t,a),l=i.substring(u,a);r[s]=Math.max(l.replace(/\s+$/g,"").length,f-u)}return r},this.$selectionColumnsForRow=function(e){var t=[],n=this.$editor.getCursorPosition();return this.$editor.session.getSelection().isEmpty()&&e==n.row&&t.push(n.column),t},this.$setBlockCellWidthsToMax=function(e){var t=!0,n,r,i,s=this.$izip_longest(e);for(var o=0,u=s.length;o<u;o++){var a=s[o];if(!a.push){console.error(a);continue}a.push(NaN);for(var f=0,l=a.length;f<l;f++){var c=a[f];t&&(n=f,i=0,t=!1);if(isNaN(c)){r=f;for(var h=n;h<r;h++)e[h][o]=i;t=!0}i=Math.max(i,c)}}return e},this.$rightmostSelectionInCell=function(e,t){var n=0;if(e.length){var r=[];for(var i=0,s=e.length;i<s;i++)e[i]<=t?r.push(i):r.push(0);n=Math.max.apply(Math,r)}return n},this.$tabsForRow=function(e){var t=[],n=this.$editor.session.getLine(e),r=/\t/g,i;while((i=r.exec(n))!=null)t.push(i.index);return t},this.$adjustRow=function(e,t){var n=this.$tabsForRow(e);if(n.length==0)return;var r=0,i=-1,s=this.$izip(t,n);for(var o=0,u=s.length;o<u;o++){var a=s[o][0],f=s[o][1];i+=1+a,f+=r;var l=i-f;if(l==0)continue;var c=this.$editor.session.getLine(e).substr(0,f),h=c.replace(/\s*$/g,""),p=c.length-h.length;l>0&&(this.$editor.session.getDocument().insertInLine({row:e,column:f+1},Array(l+1).join(" ")+"	"),this.$editor.session.getDocument().removeInLine(e,f,f+1),r+=l),l<0&&p>=-l&&(this.$editor.session.getDocument().removeInLine(e,f+l,f),r+=l)}},this.$izip_longest=function(e){if(!e[0])return[];var t=e[0].length,n=e.length;for(var r=1;r<n;r++){var i=e[r].length;i>t&&(t=i)}var s=[];for(var o=0;o<t;o++){var u=[];for(var r=0;r<n;r++)e[r][o]===""?u.push(NaN):u.push(e[r][o]);s.push(u)}return s},this.$izip=function(e,t){var n=e.length>=t.length?t.length:e.length,r=[];for(var i=0;i<n;i++){var s=[e[i],t[i]];r.push(s)}return r}}).call(r.prototype),t.ElasticTabstopsLite=r;var i=e("../editor").Editor;e("../config").defineOptions(i.prototype,"editor",{useElasticTabstops:{set:function(e){e?(this.elasticTabstops||(this.elasticTabstops=new r(this)),this.commands.on("afterExec",this.elasticTabstops.onAfterExec),this.commands.on("exec",this.elasticTabstops.onExec),this.on("change",this.elasticTabstops.onChange)):this.elasticTabstops&&(this.commands.removeListener("afterExec",this.elasticTabstops.onAfterExec),this.commands.removeListener("exec",this.elasticTabstops.onExec),this.removeListener("change",this.elasticTabstops.onChange))}}})}),function(){ace.require(["ace/ext/elastic_tabstops_lite"],function(){})}()
\ No newline at end of file
diff --git a/app/assets/lib/ace/ext-emmet.js b/app/assets/lib/ace/ext-emmet.js
index dedb3e069..edae96dd8 100644
--- a/app/assets/lib/ace/ext-emmet.js
+++ b/app/assets/lib/ace/ext-emmet.js
@@ -1 +1 @@
-ace.define("ace/ext/emmet",["require","exports","module","ace/keyboard/hash_handler","ace/editor","ace/snippets","ace/range","ace/config"],function(e,t,n){function a(){}var r=e("ace/keyboard/hash_handler").HashHandler,i=e("ace/editor").Editor,s=e("ace/snippets").snippetManager,o=e("ace/range").Range,u;i.prototype.indexToPosition=function(e){return this.session.doc.indexToPosition(e)},i.prototype.positionToIndex=function(e){return this.session.doc.positionToIndex(e)},a.prototype={setupContext:function(e){this.ace=e,this.indentation=e.session.getTabString(),u||(u=window.emmet),u.require("resources").setVariable("indentation",this.indentation),this.$syntax=null,this.$syntax=this.getSyntax()},getSelectionRange:function(){var e=this.ace.getSelectionRange();return{start:this.ace.positionToIndex(e.start),end:this.ace.positionToIndex(e.end)}},createSelection:function(e,t){this.ace.selection.setRange({start:this.ace.indexToPosition(e),end:this.ace.indexToPosition(t)})},getCurrentLineRange:function(){var e=this.ace.getCursorPosition().row,t=this.ace.session.getLine(e).length,n=this.ace.positionToIndex({row:e,column:0});return{start:n,end:n+t}},getCaretPos:function(){var e=this.ace.getCursorPosition();return this.ace.positionToIndex(e)},setCaretPos:function(e){var t=this.ace.indexToPosition(e);this.ace.clearSelection(),this.ace.selection.moveCursorToPosition(t)},getCurrentLine:function(){var e=this.ace.getCursorPosition().row;return this.ace.session.getLine(e)},replaceContent:function(e,t,n,r){n==null&&(n=t==null?this.getContent().length:t),t==null&&(t=0);var i=this.ace,u=o.fromPoints(i.indexToPosition(t),i.indexToPosition(n));i.session.remove(u),u.end=u.start,e=this.$updateTabstops(e),s.insertSnippet(i,e)},getContent:function(){return this.ace.getValue()},getSyntax:function(){if(this.$syntax)return this.$syntax;var e=this.ace.session.$modeId.split("/").pop();if(e=="html"||e=="php"){var t=this.ace.getCursorPosition(),n=this.ace.session.getState(t.row);typeof n!="string"&&(n=n[0]),n&&(n=n.split("-"),n.length>1?e=n[0]:e=="php"&&(e="html"))}return e},getProfileName:function(){switch(this.getSyntax()){case"css":return"css";case"xml":case"xsl":return"xml";case"html":var e=u.require("resources").getVariable("profile");return e||(e=this.ace.session.getLines(0,2).join("").search(/<!DOCTYPE[^>]+XHTML/i)!=-1?"xhtml":"html"),e}return"xhtml"},prompt:function(e){return prompt(e)},getSelection:function(){return this.ace.session.getTextRange()},getFilePath:function(){return""},$updateTabstops:function(e){var t=1e3,n=0,r=null,i=u.require("range"),s=u.require("tabStops"),o=u.require("resources").getVocabulary("user"),a={tabstop:function(e){var o=parseInt(e.group,10),u=o===0;u?o=++n:o+=t;var f=e.placeholder;f&&(f=s.processText(f,a));var l="${"+o+(f?":"+f:"")+"}";return u&&(r=i.create(e.start,l)),l},escape:function(e){return e=="$"?"\\$":e=="\\"?"\\\\":e}};return e=s.processText(e,a),o.variables.insert_final_tabstop&&!/\$\{0\}$/.test(e)?e+="${0}":r&&(e=u.require("utils").replaceSubstring(e,"${0}",r)),e}};var f={expand_abbreviation:{mac:"ctrl+alt+e",win:"alt+e"},match_pair_outward:{mac:"ctrl+d",win:"ctrl+,"},match_pair_inward:{mac:"ctrl+j",win:"ctrl+shift+0"},matching_pair:{mac:"ctrl+alt+j",win:"alt+j"},next_edit_point:"alt+right",prev_edit_point:"alt+left",toggle_comment:{mac:"command+/",win:"ctrl+/"},split_join_tag:{mac:"shift+command+'",win:"shift+ctrl+`"},remove_tag:{mac:"command+'",win:"shift+ctrl+;"},evaluate_math_expression:{mac:"shift+command+y",win:"shift+ctrl+y"},increment_number_by_1:"ctrl+up",decrement_number_by_1:"ctrl+down",increment_number_by_01:"alt+up",decrement_number_by_01:"alt+down",increment_number_by_10:{mac:"alt+command+up",win:"shift+alt+up"},decrement_number_by_10:{mac:"alt+command+down",win:"shift+alt+down"},select_next_item:{mac:"shift+command+.",win:"shift+ctrl+."},select_previous_item:{mac:"shift+command+,",win:"shift+ctrl+,"},reflect_css_value:{mac:"shift+command+r",win:"shift+ctrl+r"},encode_decode_data_url:{mac:"shift+ctrl+d",win:"ctrl+'"},expand_abbreviation_with_tab:"Tab",wrap_with_abbreviation:{mac:"shift+ctrl+a",win:"shift+ctrl+a"}},l=new a;t.commands=new r,t.runEmmetCommand=function(e){l.setupContext(e);if(l.getSyntax()=="php")return!1;var t=u.require("actions");if(this.action=="expand_abbreviation_with_tab"&&!e.selection.isEmpty())return!1;if(this.action=="wrap_with_abbreviation")return setTimeout(function(){t.run("wrap_with_abbreviation",l)},0);try{var n=t.run(this.action,l)}catch(r){e._signal("changeStatus",typeof r=="string"?r:r.message),console.log(r)}return n};for(var c in f)t.commands.addCommand({name:"emmet:"+c,action:c,bindKey:f[c],exec:t.runEmmetCommand,multiSelectAction:"forEach"});var h=function(e,n){var r=n;if(!r)return;var i=r.session.$modeId,s=i&&/css|less|scss|sass|stylus|html|php/.test(i);e.enableEmmet===!1&&(s=!1),s?r.keyBinding.addKeyboardHandler(t.commands):r.keyBinding.removeKeyboardHandler(t.commands)};t.AceEmmetEditor=a,e("ace/config").defineOptions(i.prototype,"editor",{enableEmmet:{set:function(e){this[e?"on":"removeListener"]("changeMode",h),h({enableEmmet:!!e},this)},value:!0}}),t.setCore=function(e){u=e}}),ace.define("ace/snippets",["require","exports","module","ace/lib/lang","ace/range","ace/keyboard/hash_handler","ace/tokenizer","ace/lib/dom"],function(e,t,n){var r=e("./lib/lang"),i=e("./range").Range,s=e("./keyboard/hash_handler").HashHandler,o=e("./tokenizer").Tokenizer,u=i.comparePoints,a=function(){this.snippetMap={},this.snippetNameMap={}};(function(){this.getTokenizer=function(){function e(e,t,n){return e=e.substr(1),/^\d+$/.test(e)&&!n.inFormatString?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function t(e){return"(?:[^\\\\"+e+"]|\\\\.)"}return a.$tokenizer=new o({start:[{regex:/:/,onMatch:function(e,t,n){return n.length&&n[0].expectIf?(n[0].expectIf=!1,n[0].elseBranch=n[0],[n[0]]):":"}},{regex:/\\./,onMatch:function(e,t,n){var r=e[1];return r=="}"&&n.length?e=r:"`$\\".indexOf(r)!=-1?e=r:n.inFormatString&&(r=="n"?e="\n":r=="t"?e="\n":"ulULE".indexOf(r)!=-1&&(e={changeCase:r,local:r>"a"})),[e]}},{regex:/}/,onMatch:function(e,t,n){return[n.length?n.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:e},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(t,n,r){var i=e(t.substr(1),n,r);return r.unshift(i[0]),i},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+t("\\|")+"*\\|",onMatch:function(e,t,n){n[0].choices=e.slice(1,-1).split(",")},next:"start"},{regex:"/("+t("/")+"+)/(?:("+t("/")+"*)/)(\\w*):?",onMatch:function(e,t,n){var r=n[0];return r.fmtString=e,e=this.splitRegex.exec(e),r.guard=e[1],r.fmt=e[2],r.flag=e[3],""},next:"start"},{regex:"`"+t("`")+"*`",onMatch:function(e,t,n){return n[0].code=e.splice(1,-1),""},next:"start"},{regex:"\\?",onMatch:function(e,t,n){n[0]&&(n[0].expectIf=!0)},next:"start"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:"/("+t("/")+"+)/",token:"regex"},{regex:"",onMatch:function(e,t,n){n.inFormatString=!0},next:"start"}]}),a.prototype.getTokenizer=function(){return a.$tokenizer},a.$tokenizer},this.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map(function(e){return e.value||e})},this.$getDefaultValue=function(e,t){if(/^[A-Z]\d+$/.test(t)){var n=t.substr(1);return(this.variables[t[0]+"__"]||{})[n]}if(/^\d+$/.test(t))return(this.variables.__||{})[t];t=t.replace(/^TM_/,"");if(!e)return;var r=e.session;switch(t){case"CURRENT_WORD":var i=r.getWordRange();case"SELECTION":case"SELECTED_TEXT":return r.getTextRange(i);case"CURRENT_LINE":return r.getLine(e.getCursorPosition().row);case"PREV_LINE":return r.getLine(e.getCursorPosition().row-1);case"LINE_INDEX":return e.getCursorPosition().column;case"LINE_NUMBER":return e.getCursorPosition().row+1;case"SOFT_TABS":return r.getUseSoftTabs()?"YES":"NO";case"TAB_SIZE":return r.getTabSize();case"FILENAME":case"FILEPATH":return"ace.ajax.org";case"FULLNAME":return"Ace"}},this.variables={},this.getVariableValue=function(e,t){return this.variables.hasOwnProperty(t)?this.variables[t](e,t)||"":this.$getDefaultValue(e,t)||""},this.tmStrFormat=function(e,t,n){var r=t.flag||"",i=t.guard;i=new RegExp(i,r.replace(/[^gi]/,""));var s=this.tokenizeTmSnippet(t.fmt,"formatString"),o=this,u=e.replace(i,function(){o.variables.__=arguments;var e=o.resolveVariables(s,n),t="E";for(var r=0;r<e.length;r++){var i=e[r];if(typeof i=="object"){e[r]="";if(i.changeCase&&i.local){var u=e[r+1];u&&typeof u=="string"&&(i.changeCase=="u"?e[r]=u[0].toUpperCase():e[r]=u[0].toLowerCase(),e[r+1]=u.substr(1))}else i.changeCase&&(t=i.changeCase)}else t=="U"?e[r]=i.toUpperCase():t=="L"&&(e[r]=i.toLowerCase())}return e.join("")});return this.variables.__=null,u},this.resolveVariables=function(e,t){function o(t){var n=e.indexOf(t,r+1);n!=-1&&(r=n)}var n=[];for(var r=0;r<e.length;r++){var i=e[r];if(typeof i=="string")n.push(i);else{if(typeof i!="object")continue;if(i.skip)o(i);else{if(i.processed<r)continue;if(i.text){var s=this.getVariableValue(t,i.text);s&&i.fmtString&&(s=this.tmStrFormat(s,i)),i.processed=r,i.expectIf==null?s&&(n.push(s),o(i)):s?i.skip=i.elseBranch:o(i)}else i.tabstopId!=null?n.push(i):i.changeCase!=null&&n.push(i)}}}return n},this.insertSnippet=function(e,t){function l(e){var t=[];for(var n=0;n<e.length;n++){var r=e[n];if(typeof r=="object"){if(a[r.tabstopId])continue;var i=e.lastIndexOf(r,n-1);r=t[i]||{tabstopId:r.tabstopId}}t[n]=r}return t}var n=e.getCursorPosition(),r=e.session.getLine(n.row),i=r.match(/^\s*/)[0],s=e.session.getTabString(),o=this.tokenizeTmSnippet(t);o=this.resolveVariables(o,e),o=o.map(function(e){return e=="\n"?e+i:typeof e=="string"?e.replace(/\t/g,s):e});var u=[];o.forEach(function(e,t){if(typeof e!="object")return;var n=e.tabstopId,r=u[n];r||(r=u[n]=[],r.index=n,r.value="");if(r.indexOf(e)!==-1)return;r.push(e);var i=o.indexOf(e,t+1);if(i===-1)return;var s=o.slice(t+1,i),a=s.some(function(e){return typeof e=="object"});a&&!r.value?r.value=s:s.length&&(!r.value||typeof r.value!="string")&&(r.value=s.join(""))}),u.forEach(function(e){e.length=0});var a={};for(var c=0;c<o.length;c++){var h=o[c];if(typeof h!="object")continue;var p=h.tabstopId,d=o.indexOf(h,c+1);if(a[p]==h){a[p]=null;continue}var v=u[p],m=typeof v.value=="string"?[v.value]:l(v.value);m.unshift(c+1,Math.max(0,d-c)),m.push(h),a[p]=h,o.splice.apply(o,m),v.indexOf(h)===-1&&v.push(h)}var g=0,y=0,b="";o.forEach(function(e){typeof e=="string"?(e[0]==="\n"?(y=e.length-1,g++):y+=e.length,b+=e):e.start?e.end={row:g,column:y}:e.start={row:g,column:y}});var w=e.getSelectionRange(),E=e.session.replace(w,b),S=new f(e);S.addTabstops(u,w.start,E),S.tabNext()},this.$getScope=function(e){var t=e.session.$mode.$id||"";t=t.split("/").pop();if(t==="html"||t==="php"){t==="php"&&(t="html");var n=e.getCursorPosition(),r=e.session.getState(n.row);typeof r=="object"&&(r=r[0]),r.substring&&(r.substring(0,3)=="js-"?t="javascript":r.substring(0,4)=="css-"?t="css":r.substring(0,4)=="php-"&&(t="php"))}return t},this.expandWithTab=function(e){var t=e.getCursorPosition(),n=e.session.getLine(t.row),r=n.substring(0,t.column),i=n.substr(t.column),s=this.$getScope(e),o=this.snippetMap,u;return[s,"_"].some(function(e){var t=o[e];return t&&(u=this.findMatchingSnippet(t,r,i)),!!u},this),u?(e.session.doc.removeInLine(t.row,t.column-u.replaceBefore.length,t.column+u.replaceAfter.length),this.variables.M__=u.matchBefore,this.variables.T__=u.matchAfter,this.insertSnippet(e,u.content),this.variables.M__=this.variables.T__=null,!0):!1},this.findMatchingSnippet=function(e,t,n){for(var r=e.length;r--;){var i=e[r];if(i.startRe&&!i.startRe.test(t))continue;if(i.endRe&&!i.endRe.test(n))continue;if(!i.startRe&&!i.endRe)continue;return i.matchBefore=i.startRe?i.startRe.exec(t):[""],i.matchAfter=i.endRe?i.endRe.exec(n):[""],i.replaceBefore=i.triggerRe?i.triggerRe.exec(t)[0]:"",i.replaceAfter=i.endTriggerRe?i.endTriggerRe.exec(n)[0]:"",i}},this.snippetMap={},this.snippetNameMap={},this.register=function(e,t){function o(e){return e&&!/^\^?\(.*\)\$?$|^\\b$/.test(e)&&(e="(?:"+e+")"),e||""}function u(e,t,n){return e=o(e),t=o(t),n?(e=t+e,e&&e[e.length-1]!="$"&&(e+="$")):(e+=t,e&&e[0]!="^"&&(e="^"+e)),new RegExp(e)}function a(e){e.scope||(e.scope=t||"_"),t=e.scope,n[t]||(n[t]=[],i[t]={});var o=i[t];if(e.name){var a=o[e.name];a&&s.unregister(a),o[e.name]=e}n[t].push(e),e.tabTrigger&&!e.trigger&&(!e.guard&&/^\w/.test(e.tabTrigger)&&(e.guard="\\b"),e.trigger=r.escapeRegExp(e.tabTrigger)),e.startRe=u(e.trigger,e.guard,!0),e.triggerRe=new RegExp(e.trigger,"",!0),e.endRe=u(e.endTrigger,e.endGuard,!0),e.endTriggerRe=new RegExp(e.endTrigger,"",!0)}var n=this.snippetMap,i=this.snippetNameMap,s=this;e.content?a(e):Array.isArray(e)&&e.forEach(a)},this.unregister=function(e,t){function i(e){var i=r[e.scope||t];if(i&&i[e.name]){delete i[e.name];var s=n[e.scope||t],o=s&&s.indexOf(e);o>=0&&s.splice(o,1)}}var n=this.snippetMap,r=this.snippetNameMap;e.content?i(e):Array.isArray(e)&&e.forEach(i)},this.parseSnippetFile=function(e){e=e.replace(/\r/g,"");var t=[],n={},r=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,i;while(i=r.exec(e)){if(i[1])try{n=JSON.parse(i[1]),t.push(n)}catch(s){}if(i[4])n.content=i[4].replace(/^\t/gm,""),t.push(n),n={};else{var o=i[2],u=i[3];if(o=="regex"){var a=/\/((?:[^\/\\]|\\.)*)|$/g;n.guard=a.exec(u)[1],n.trigger=a.exec(u)[1],n.endTrigger=a.exec(u)[1],n.endGuard=a.exec(u)[1]}else o=="snippet"?(n.tabTrigger=u.match(/^\S*/)[0],n.name||(n.name=u)):n[o]=u}}return t},this.getSnippetByName=function(e,t){var n=t&&this.$getScope(t),r=this.snippetNameMap,i;return[n,"_"].some(function(t){var n=r[t];return n&&(i=n[e]),!!i},this),i}}).call(a.prototype);var f=function(e){if(e.tabstopManager)return e.tabstopManager;e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=r.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)};(function(){this.attach=function(e){this.index=-1,this.ranges=[],this.tabstops=[],this.selectedTabstop=null,this.editor=e,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},this.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges=null,this.tabstops=null,this.selectedTabstop=null,this.editor.removeListener("change",this.$onChange),this.editor.removeListener("changeSelection",this.$onChangeSelection),this.editor.removeListener("changeSession",this.$onChangeSession),this.editor.commands.removeListener("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.editor=null},this.onChange=function(e){var t=e.data.range,n=e.data.action[0]=="r",r=t.start,i=t.end,s=r.row,o=i.row,a=o-s,f=i.column-r.column;n&&(a=-a,f=-f);if(!this.$inChange&&n){var l=this.selectedTabstop,c=!l.some(function(e){return u(e.start,r)<=0&&u(e.end,i)>=0});if(c)return this.detach()}var h=this.ranges;for(var p=0;p<h.length;p++){var d=h[p];if(d.end.row<r.row)continue;if(u(r,d.start)<0&&u(i,d.end)>0){this.removeRange(d),p--;continue}d.start.row==s&&d.start.column>r.column&&(d.start.column+=f),d.end.row==s&&d.end.column>=r.column&&(d.end.column+=f),d.start.row>=s&&(d.start.row+=a),d.end.row>=s&&(d.end.row+=a),u(d.start,d.end)>0&&this.removeRange(d)}h.length||this.detach()},this.updateLinkedFields=function(){var e=this.selectedTabstop;if(!e.hasLinkedRanges)return;this.$inChange=!0;var n=this.editor.session,r=n.getTextRange(e.firstNonLinked);for(var i=e.length;i--;){var s=e[i];if(!s.linked)continue;var o=t.snippetManager.tmStrFormat(r,s.original);n.replace(s,o)}this.$inChange=!1},this.onAfterExec=function(e){e.command&&!e.command.readOnly&&this.updateLinkedFields()},this.onChangeSelection=function(){if(!this.editor)return;var e=this.editor.selection.lead,t=this.editor.selection.anchor,n=this.editor.selection.isEmpty();for(var r=this.ranges.length;r--;){if(this.ranges[r].linked)continue;var i=this.ranges[r].contains(e.row,e.column),s=n||this.ranges[r].contains(t.row,t.column);if(i&&s)return}this.detach()},this.onChangeSession=function(){this.detach()},this.tabNext=function(e){var t=this.tabstops.length-1,n=this.index+(e||1);n=Math.min(Math.max(n,0),t),this.selectTabstop(n),n==t&&this.detach()},this.selectTabstop=function(e){var t=this.tabstops[this.index];t&&this.addTabstopMarkers(t),this.index=e,t=this.tabstops[this.index];if(!t||!t.length)return;this.selectedTabstop=t;if(!this.editor.inVirtualSelectionMode){var n=this.editor.multiSelect;n.toSingleRange(t.firstNonLinked.clone());for(var r=t.length;r--;){if(t.hasLinkedRanges&&t[r].linked)continue;n.addRange(t[r].clone(),!0)}}else this.editor.selection.setRange(t.firstNonLinked);this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},this.addTabstops=function(e,t,n){if(!e[0]){var r=i.fromPoints(n,n);c(r.start,t),c(r.end,t),e[0]=[r],e[0].index=0}var s=this.index,o=[s,0],u=this.ranges,a=this.editor;e.forEach(function(e){for(var n=e.length;n--;){var r=e[n],s=i.fromPoints(r.start,r.end||r.start);l(s.start,t),l(s.end,t),s.original=r,s.tabstop=e,u.push(s),e[n]=s,r.fmtString?(s.linked=!0,e.hasLinkedRanges=!0):e.firstNonLinked||(e.firstNonLinked=s)}e.firstNonLinked||(e.hasLinkedRanges=!1),o.push(e),this.addTabstopMarkers(e)},this),o.push(o.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,o)},this.addTabstopMarkers=function(e){var t=this.editor.session;e.forEach(function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))})},this.removeTabstopMarkers=function(e){var t=this.editor.session;e.forEach(function(e){t.removeMarker(e.markerId),e.markerId=null})},this.removeRange=function(e){var t=e.tabstop.indexOf(e);e.tabstop.splice(t,1),t=this.ranges.indexOf(e),this.ranges.splice(t,1),this.editor.session.removeMarker(e.markerId)},this.keyboardHandler=new s,this.keyboardHandler.bindKeys({Tab:function(e){e.tabstopManager.tabNext(1)},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1)},Esc:function(e){e.tabstopManager.detach()},Return:function(e){return!1}})}).call(f.prototype);var l=function(e,t){e.row==0&&(e.column+=t.column),e.row+=t.row},c=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};e("./lib/dom").importCssString(".ace_snippet-marker {    -moz-box-sizing: border-box;    box-sizing: border-box;    background: rgba(194, 193, 208, 0.09);    border: 1px dotted rgba(211, 208, 235, 0.62);    position: absolute;}"),t.snippetManager=new a})
\ No newline at end of file
+ace.define("ace/ext/emmet",["require","exports","module","ace/keyboard/hash_handler","ace/editor","ace/snippets","ace/range","ace/config"],function(e,t,n){function a(){}var r=e("ace/keyboard/hash_handler").HashHandler,i=e("ace/editor").Editor,s=e("ace/snippets").snippetManager,o=e("ace/range").Range,u;i.prototype.indexToPosition=function(e){return this.session.doc.indexToPosition(e)},i.prototype.positionToIndex=function(e){return this.session.doc.positionToIndex(e)},a.prototype={setupContext:function(e){this.ace=e,this.indentation=e.session.getTabString(),u||(u=window.emmet),u.require("resources").setVariable("indentation",this.indentation),this.$syntax=null,this.$syntax=this.getSyntax()},getSelectionRange:function(){var e=this.ace.getSelectionRange();return{start:this.ace.positionToIndex(e.start),end:this.ace.positionToIndex(e.end)}},createSelection:function(e,t){this.ace.selection.setRange({start:this.ace.indexToPosition(e),end:this.ace.indexToPosition(t)})},getCurrentLineRange:function(){var e=this.ace.getCursorPosition().row,t=this.ace.session.getLine(e).length,n=this.ace.positionToIndex({row:e,column:0});return{start:n,end:n+t}},getCaretPos:function(){var e=this.ace.getCursorPosition();return this.ace.positionToIndex(e)},setCaretPos:function(e){var t=this.ace.indexToPosition(e);this.ace.selection.moveToPosition(t)},getCurrentLine:function(){var e=this.ace.getCursorPosition().row;return this.ace.session.getLine(e)},replaceContent:function(e,t,n,r){n==null&&(n=t==null?this.getContent().length:t),t==null&&(t=0);var i=this.ace,u=o.fromPoints(i.indexToPosition(t),i.indexToPosition(n));i.session.remove(u),u.end=u.start,e=this.$updateTabstops(e),s.insertSnippet(i,e)},getContent:function(){return this.ace.getValue()},getSyntax:function(){if(this.$syntax)return this.$syntax;var e=this.ace.session.$modeId.split("/").pop();if(e=="html"||e=="php"){var t=this.ace.getCursorPosition(),n=this.ace.session.getState(t.row);typeof n!="string"&&(n=n[0]),n&&(n=n.split("-"),n.length>1?e=n[0]:e=="php"&&(e="html"))}return e},getProfileName:function(){switch(this.getSyntax()){case"css":return"css";case"xml":case"xsl":return"xml";case"html":var e=u.require("resources").getVariable("profile");return e||(e=this.ace.session.getLines(0,2).join("").search(/<!DOCTYPE[^>]+XHTML/i)!=-1?"xhtml":"html"),e}return"xhtml"},prompt:function(e){return prompt(e)},getSelection:function(){return this.ace.session.getTextRange()},getFilePath:function(){return""},$updateTabstops:function(e){var t=1e3,n=0,r=null,i=u.require("range"),s=u.require("tabStops"),o=u.require("resources").getVocabulary("user"),a={tabstop:function(e){var o=parseInt(e.group,10),u=o===0;u?o=++n:o+=t;var f=e.placeholder;f&&(f=s.processText(f,a));var l="${"+o+(f?":"+f:"")+"}";return u&&(r=i.create(e.start,l)),l},escape:function(e){return e=="$"?"\\$":e=="\\"?"\\\\":e}};return e=s.processText(e,a),o.variables.insert_final_tabstop&&!/\$\{0\}$/.test(e)?e+="${0}":r&&(e=u.require("utils").replaceSubstring(e,"${0}",r)),e}};var f={expand_abbreviation:{mac:"ctrl+alt+e",win:"alt+e"},match_pair_outward:{mac:"ctrl+d",win:"ctrl+,"},match_pair_inward:{mac:"ctrl+j",win:"ctrl+shift+0"},matching_pair:{mac:"ctrl+alt+j",win:"alt+j"},next_edit_point:"alt+right",prev_edit_point:"alt+left",toggle_comment:{mac:"command+/",win:"ctrl+/"},split_join_tag:{mac:"shift+command+'",win:"shift+ctrl+`"},remove_tag:{mac:"command+'",win:"shift+ctrl+;"},evaluate_math_expression:{mac:"shift+command+y",win:"shift+ctrl+y"},increment_number_by_1:"ctrl+up",decrement_number_by_1:"ctrl+down",increment_number_by_01:"alt+up",decrement_number_by_01:"alt+down",increment_number_by_10:{mac:"alt+command+up",win:"shift+alt+up"},decrement_number_by_10:{mac:"alt+command+down",win:"shift+alt+down"},select_next_item:{mac:"shift+command+.",win:"shift+ctrl+."},select_previous_item:{mac:"shift+command+,",win:"shift+ctrl+,"},reflect_css_value:{mac:"shift+command+r",win:"shift+ctrl+r"},encode_decode_data_url:{mac:"shift+ctrl+d",win:"ctrl+'"},expand_abbreviation_with_tab:"Tab",wrap_with_abbreviation:{mac:"shift+ctrl+a",win:"shift+ctrl+a"}},l=new a;t.commands=new r,t.runEmmetCommand=function(e){l.setupContext(e);if(l.getSyntax()=="php")return!1;var t=u.require("actions");if(this.action=="expand_abbreviation_with_tab"&&!e.selection.isEmpty())return!1;if(this.action=="wrap_with_abbreviation")return setTimeout(function(){t.run("wrap_with_abbreviation",l)},0);try{var n=t.run(this.action,l)}catch(r){e._signal("changeStatus",typeof r=="string"?r:r.message),console.log(r),n=!1}return n};for(var c in f)t.commands.addCommand({name:"emmet:"+c,action:c,bindKey:f[c],exec:t.runEmmetCommand,multiSelectAction:"forEach"});var h=function(e,n){var r=n;if(!r)return;var i=r.session.$modeId,s=i&&/css|less|scss|sass|stylus|html|php/.test(i);e.enableEmmet===!1&&(s=!1),s?r.keyBinding.addKeyboardHandler(t.commands):r.keyBinding.removeKeyboardHandler(t.commands)};t.AceEmmetEditor=a,e("ace/config").defineOptions(i.prototype,"editor",{enableEmmet:{set:function(e){this[e?"on":"removeListener"]("changeMode",h),h({enableEmmet:!!e},this)},value:!0}}),t.setCore=function(e){u=e}}),ace.define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/anchor","ace/keyboard/hash_handler","ace/tokenizer","ace/lib/dom","ace/editor"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=e("./lib/lang"),o=e("./range").Range,u=e("./anchor").Anchor,a=e("./keyboard/hash_handler").HashHandler,f=e("./tokenizer").Tokenizer,l=o.comparePoints,c=function(){this.snippetMap={},this.snippetNameMap={}};(function(){r.implement(this,i),this.getTokenizer=function(){function e(e,t,n){return e=e.substr(1),/^\d+$/.test(e)&&!n.inFormatString?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function t(e){return"(?:[^\\\\"+e+"]|\\\\.)"}return c.$tokenizer=new f({start:[{regex:/:/,onMatch:function(e,t,n){return n.length&&n[0].expectIf?(n[0].expectIf=!1,n[0].elseBranch=n[0],[n[0]]):":"}},{regex:/\\./,onMatch:function(e,t,n){var r=e[1];return r=="}"&&n.length?e=r:"`$\\".indexOf(r)!=-1?e=r:n.inFormatString&&(r=="n"?e="\n":r=="t"?e="\n":"ulULE".indexOf(r)!=-1&&(e={changeCase:r,local:r>"a"})),[e]}},{regex:/}/,onMatch:function(e,t,n){return[n.length?n.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:e},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(t,n,r){var i=e(t.substr(1),n,r);return r.unshift(i[0]),i},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+t("\\|")+"*\\|",onMatch:function(e,t,n){n[0].choices=e.slice(1,-1).split(",")},next:"start"},{regex:"/("+t("/")+"+)/(?:("+t("/")+"*)/)(\\w*):?",onMatch:function(e,t,n){var r=n[0];return r.fmtString=e,e=this.splitRegex.exec(e),r.guard=e[1],r.fmt=e[2],r.flag=e[3],""},next:"start"},{regex:"`"+t("`")+"*`",onMatch:function(e,t,n){return n[0].code=e.splice(1,-1),""},next:"start"},{regex:"\\?",onMatch:function(e,t,n){n[0]&&(n[0].expectIf=!0)},next:"start"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:"/("+t("/")+"+)/",token:"regex"},{regex:"",onMatch:function(e,t,n){n.inFormatString=!0},next:"start"}]}),c.prototype.getTokenizer=function(){return c.$tokenizer},c.$tokenizer},this.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map(function(e){return e.value||e})},this.$getDefaultValue=function(e,t){if(/^[A-Z]\d+$/.test(t)){var n=t.substr(1);return(this.variables[t[0]+"__"]||{})[n]}if(/^\d+$/.test(t))return(this.variables.__||{})[t];t=t.replace(/^TM_/,"");if(!e)return;var r=e.session;switch(t){case"CURRENT_WORD":var i=r.getWordRange();case"SELECTION":case"SELECTED_TEXT":return r.getTextRange(i);case"CURRENT_LINE":return r.getLine(e.getCursorPosition().row);case"PREV_LINE":return r.getLine(e.getCursorPosition().row-1);case"LINE_INDEX":return e.getCursorPosition().column;case"LINE_NUMBER":return e.getCursorPosition().row+1;case"SOFT_TABS":return r.getUseSoftTabs()?"YES":"NO";case"TAB_SIZE":return r.getTabSize();case"FILENAME":case"FILEPATH":return"";case"FULLNAME":return"Ace"}},this.variables={},this.getVariableValue=function(e,t){return this.variables.hasOwnProperty(t)?this.variables[t](e,t)||"":this.$getDefaultValue(e,t)||""},this.tmStrFormat=function(e,t,n){var r=t.flag||"",i=t.guard;i=new RegExp(i,r.replace(/[^gi]/,""));var s=this.tokenizeTmSnippet(t.fmt,"formatString"),o=this,u=e.replace(i,function(){o.variables.__=arguments;var e=o.resolveVariables(s,n),t="E";for(var r=0;r<e.length;r++){var i=e[r];if(typeof i=="object"){e[r]="";if(i.changeCase&&i.local){var u=e[r+1];u&&typeof u=="string"&&(i.changeCase=="u"?e[r]=u[0].toUpperCase():e[r]=u[0].toLowerCase(),e[r+1]=u.substr(1))}else i.changeCase&&(t=i.changeCase)}else t=="U"?e[r]=i.toUpperCase():t=="L"&&(e[r]=i.toLowerCase())}return e.join("")});return this.variables.__=null,u},this.resolveVariables=function(e,t){function o(t){var n=e.indexOf(t,r+1);n!=-1&&(r=n)}var n=[];for(var r=0;r<e.length;r++){var i=e[r];if(typeof i=="string")n.push(i);else{if(typeof i!="object")continue;if(i.skip)o(i);else{if(i.processed<r)continue;if(i.text){var s=this.getVariableValue(t,i.text);s&&i.fmtString&&(s=this.tmStrFormat(s,i)),i.processed=r,i.expectIf==null?s&&(n.push(s),o(i)):s?i.skip=i.elseBranch:o(i)}else i.tabstopId!=null?n.push(i):i.changeCase!=null&&n.push(i)}}}return n},this.insertSnippetForSelection=function(e,t){function f(e){var t=[];for(var n=0;n<e.length;n++){var r=e[n];if(typeof r=="object"){if(a[r.tabstopId])continue;var i=e.lastIndexOf(r,n-1);r=t[i]||{tabstopId:r.tabstopId}}t[n]=r}return t}var n=e.getCursorPosition(),r=e.session.getLine(n.row),i=e.session.getTabString(),s=r.match(/^\s*/)[0];n.column<s.length&&(s=s.slice(0,n.column));var o=this.tokenizeTmSnippet(t);o=this.resolveVariables(o,e),o=o.map(function(e){return e=="\n"?e+s:typeof e=="string"?e.replace(/\t/g,i):e});var u=[];o.forEach(function(e,t){if(typeof e!="object")return;var n=e.tabstopId,r=u[n];r||(r=u[n]=[],r.index=n,r.value="");if(r.indexOf(e)!==-1)return;r.push(e);var i=o.indexOf(e,t+1);if(i===-1)return;var s=o.slice(t+1,i),a=s.some(function(e){return typeof e=="object"});a&&!r.value?r.value=s:s.length&&(!r.value||typeof r.value!="string")&&(r.value=s.join(""))}),u.forEach(function(e){e.length=0});var a={};for(var l=0;l<o.length;l++){var c=o[l];if(typeof c!="object")continue;var p=c.tabstopId,d=o.indexOf(c,l+1);if(a[p]){a[p]===c&&(a[p]=null);continue}var v=u[p],m=typeof v.value=="string"?[v.value]:f(v.value);m.unshift(l+1,Math.max(0,d-l)),m.push(c),a[p]=c,o.splice.apply(o,m),v.indexOf(c)===-1&&v.push(c)}var g=0,y=0,b="";o.forEach(function(e){typeof e=="string"?(e[0]==="\n"?(y=e.length-1,g++):y+=e.length,b+=e):e.start?e.end={row:g,column:y}:e.start={row:g,column:y}});var w=e.getSelectionRange(),E=e.session.replace(w,b),S=new h(e),x=e.inVirtualSelectionMode&&e.selection.index;S.addTabstops(u,w.start,E,x)},this.insertSnippet=function(e,t){var n=this;if(e.inVirtualSelectionMode)return n.insertSnippetForSelection(e,t);e.forEachSelection(function(){n.insertSnippetForSelection(e,t)},null,{keepOrder:!0}),e.tabstopManager&&e.tabstopManager.tabNext()},this.$getScope=function(e){var t=e.session.$mode.$id||"";t=t.split("/").pop();if(t==="html"||t==="php"){t==="php"&&!e.session.$mode.inlinePhp&&(t="html");var n=e.getCursorPosition(),r=e.session.getState(n.row);typeof r=="object"&&(r=r[0]),r.substring&&(r.substring(0,3)=="js-"?t="javascript":r.substring(0,4)=="css-"?t="css":r.substring(0,4)=="php-"&&(t="php"))}return t},this.getActiveScopes=function(e){var t=this.$getScope(e),n=[t],r=this.snippetMap;return r[t]&&r[t].includeScopes&&n.push.apply(n,r[t].includeScopes),n.push("_"),n},this.expandWithTab=function(e,t){var n=this,r=e.forEachSelection(function(){return n.expandSnippetForSelection(e,t)},null,{keepOrder:!0});return r&&e.tabstopManager&&e.tabstopManager.tabNext(),r},this.expandSnippetForSelection=function(e,t){var n=e.getCursorPosition(),r=e.session.getLine(n.row),i=r.substring(0,n.column),s=r.substr(n.column),o=this.snippetMap,u;return this.getActiveScopes(e).some(function(e){var t=o[e];return t&&(u=this.findMatchingSnippet(t,i,s)),!!u},this),u?t&&t.dryRun?!0:(e.session.doc.removeInLine(n.row,n.column-u.replaceBefore.length,n.column+u.replaceAfter.length),this.variables.M__=u.matchBefore,this.variables.T__=u.matchAfter,this.insertSnippetForSelection(e,u.content),this.variables.M__=this.variables.T__=null,!0):!1},this.findMatchingSnippet=function(e,t,n){for(var r=e.length;r--;){var i=e[r];if(i.startRe&&!i.startRe.test(t))continue;if(i.endRe&&!i.endRe.test(n))continue;if(!i.startRe&&!i.endRe)continue;return i.matchBefore=i.startRe?i.startRe.exec(t):[""],i.matchAfter=i.endRe?i.endRe.exec(n):[""],i.replaceBefore=i.triggerRe?i.triggerRe.exec(t)[0]:"",i.replaceAfter=i.endTriggerRe?i.endTriggerRe.exec(n)[0]:"",i}},this.snippetMap={},this.snippetNameMap={},this.register=function(e,t){function o(e){return e&&!/^\^?\(.*\)\$?$|^\\b$/.test(e)&&(e="(?:"+e+")"),e||""}function u(e,t,n){return e=o(e),t=o(t),n?(e=t+e,e&&e[e.length-1]!="$"&&(e+="$")):(e+=t,e&&e[0]!="^"&&(e="^"+e)),new RegExp(e)}function a(e){e.scope||(e.scope=t||"_"),t=e.scope,n[t]||(n[t]=[],r[t]={});var o=r[t];if(e.name){var a=o[e.name];a&&i.unregister(a),o[e.name]=e}n[t].push(e),e.tabTrigger&&!e.trigger&&(!e.guard&&/^\w/.test(e.tabTrigger)&&(e.guard="\\b"),e.trigger=s.escapeRegExp(e.tabTrigger)),e.startRe=u(e.trigger,e.guard,!0),e.triggerRe=new RegExp(e.trigger,"",!0),e.endRe=u(e.endTrigger,e.endGuard,!0),e.endTriggerRe=new RegExp(e.endTrigger,"",!0)}var n=this.snippetMap,r=this.snippetNameMap,i=this;e.content?a(e):Array.isArray(e)&&e.forEach(a),this._signal("registerSnippets",{scope:t})},this.unregister=function(e,t){function i(e){var i=r[e.scope||t];if(i&&i[e.name]){delete i[e.name];var s=n[e.scope||t],o=s&&s.indexOf(e);o>=0&&s.splice(o,1)}}var n=this.snippetMap,r=this.snippetNameMap;e.content?i(e):Array.isArray(e)&&e.forEach(i)},this.parseSnippetFile=function(e){e=e.replace(/\r/g,"");var t=[],n={},r=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,i;while(i=r.exec(e)){if(i[1])try{n=JSON.parse(i[1]),t.push(n)}catch(s){}if(i[4])n.content=i[4].replace(/^\t/gm,""),t.push(n),n={};else{var o=i[2],u=i[3];if(o=="regex"){var a=/\/((?:[^\/\\]|\\.)*)|$/g;n.guard=a.exec(u)[1],n.trigger=a.exec(u)[1],n.endTrigger=a.exec(u)[1],n.endGuard=a.exec(u)[1]}else o=="snippet"?(n.tabTrigger=u.match(/^\S*/)[0],n.name||(n.name=u)):n[o]=u}}return t},this.getSnippetByName=function(e,t){var n=this.snippetNameMap,r;return this.getActiveScopes(t).some(function(t){var i=n[t];return i&&(r=i[e]),!!r},this),r}}).call(c.prototype);var h=function(e){if(e.tabstopManager)return e.tabstopManager;e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=s.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)};(function(){this.attach=function(e){this.index=0,this.ranges=[],this.tabstops=[],this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},this.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges=null,this.tabstops=null,this.selectedTabstop=null,this.editor.removeListener("change",this.$onChange),this.editor.removeListener("changeSelection",this.$onChangeSelection),this.editor.removeListener("changeSession",this.$onChangeSession),this.editor.commands.removeListener("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.editor=null},this.onChange=function(e){var t=e.data.range,n=e.data.action[0]=="r",r=t.start,i=t.end,s=r.row,o=i.row,u=o-s,a=i.column-r.column;n&&(u=-u,a=-a);if(!this.$inChange&&n){var f=this.selectedTabstop,c=f&&!f.some(function(e){return l(e.start,r)<=0&&l(e.end,i)>=0});if(c)return this.detach()}var h=this.ranges;for(var p=0;p<h.length;p++){var d=h[p];if(d.end.row<r.row)continue;if(n&&l(r,d.start)<0&&l(i,d.end)>0){this.removeRange(d),p--;continue}d.start.row==s&&d.start.column>r.column&&(d.start.column+=a),d.end.row==s&&d.end.column>=r.column&&(d.end.column+=a),d.start.row>=s&&(d.start.row+=u),d.end.row>=s&&(d.end.row+=u),l(d.start,d.end)>0&&this.removeRange(d)}h.length||this.detach()},this.updateLinkedFields=function(){var e=this.selectedTabstop;if(!e||!e.hasLinkedRanges)return;this.$inChange=!0;var n=this.editor.session,r=n.getTextRange(e.firstNonLinked);for(var i=e.length;i--;){var s=e[i];if(!s.linked)continue;var o=t.snippetManager.tmStrFormat(r,s.original);n.replace(s,o)}this.$inChange=!1},this.onAfterExec=function(e){e.command&&!e.command.readOnly&&this.updateLinkedFields()},this.onChangeSelection=function(){if(!this.editor)return;var e=this.editor.selection.lead,t=this.editor.selection.anchor,n=this.editor.selection.isEmpty();for(var r=this.ranges.length;r--;){if(this.ranges[r].linked)continue;var i=this.ranges[r].contains(e.row,e.column),s=n||this.ranges[r].contains(t.row,t.column);if(i&&s)return}this.detach()},this.onChangeSession=function(){this.detach()},this.tabNext=function(e){var t=this.tabstops.length,n=this.index+(e||1);n=Math.min(Math.max(n,1),t),n==t&&(n=0),this.selectTabstop(n),n===0&&this.detach()},this.selectTabstop=function(e){this.$openTabstops=null;var t=this.tabstops[this.index];t&&this.addTabstopMarkers(t),this.index=e,t=this.tabstops[this.index];if(!t||!t.length)return;this.selectedTabstop=t;if(!this.editor.inVirtualSelectionMode){var n=this.editor.multiSelect;n.toSingleRange(t.firstNonLinked.clone());for(var r=t.length;r--;){if(t.hasLinkedRanges&&t[r].linked)continue;n.addRange(t[r].clone(),!0)}n.ranges[0]&&n.addRange(n.ranges[0].clone())}else this.editor.selection.setRange(t.firstNonLinked);this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},this.addTabstops=function(e,t,n){this.$openTabstops||(this.$openTabstops=[]);if(!e[0]){var r=o.fromPoints(n,n);v(r.start,t),v(r.end,t),e[0]=[r],e[0].index=0}var i=this.index,s=[i+1,0],u=this.ranges;e.forEach(function(e,n){var r=this.$openTabstops[n]||e;for(var i=e.length;i--;){var a=e[i],f=o.fromPoints(a.start,a.end||a.start);d(f.start,t),d(f.end,t),f.original=a,f.tabstop=r,u.push(f),r!=e?r.unshift(f):r[i]=f,a.fmtString?(f.linked=!0,r.hasLinkedRanges=!0):r.firstNonLinked||(r.firstNonLinked=f)}r.firstNonLinked||(r.hasLinkedRanges=!1),r===e&&(s.push(r),this.$openTabstops[n]=r),this.addTabstopMarkers(r)},this),s.length>2&&(this.tabstops.length&&s.push(s.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,s))},this.addTabstopMarkers=function(e){var t=this.editor.session;e.forEach(function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))})},this.removeTabstopMarkers=function(e){var t=this.editor.session;e.forEach(function(e){t.removeMarker(e.markerId),e.markerId=null})},this.removeRange=function(e){var t=e.tabstop.indexOf(e);e.tabstop.splice(t,1),t=this.ranges.indexOf(e),this.ranges.splice(t,1),this.editor.session.removeMarker(e.markerId),e.tabstop.length||(t=this.tabstops.indexOf(e.tabstop),t!=-1&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},this.keyboardHandler=new a,this.keyboardHandler.bindKeys({Tab:function(e){if(t.snippetManager&&t.snippetManager.expandWithTab(e))return;e.tabstopManager.tabNext(1)},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1)},Esc:function(e){e.tabstopManager.detach()},Return:function(e){return!1}})}).call(h.prototype);var p={};p.onChange=u.prototype.onChange,p.setPosition=function(e,t){this.pos.row=e,this.pos.column=t},p.update=function(e,t,n){this.$insertRight=n,this.pos=e,this.onChange(t)};var d=function(e,t){e.row==0&&(e.column+=t.column),e.row+=t.row},v=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};e("./lib/dom").importCssString(".ace_snippet-marker {    -moz-box-sizing: border-box;    box-sizing: border-box;    background: rgba(194, 193, 208, 0.09);    border: 1px dotted rgba(211, 208, 235, 0.62);    position: absolute;}"),t.snippetManager=new c;var m=e("./editor").Editor;(function(){this.insertSnippet=function(e,n){return t.snippetManager.insertSnippet(this,e,n)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}).call(m.prototype)}),function(){ace.require(["ace/ext/emmet"],function(){})}()
\ No newline at end of file
diff --git a/app/assets/lib/ace/ext-error_marker.js b/app/assets/lib/ace/ext-error_marker.js
new file mode 100644
index 000000000..d7c017d83
--- /dev/null
+++ b/app/assets/lib/ace/ext-error_marker.js
@@ -0,0 +1 @@
+(function(){ace.require(["ace/ext/error_marker"],function(){})})()
\ No newline at end of file
diff --git a/app/assets/lib/ace/ext-keybinding_menu.js b/app/assets/lib/ace/ext-keybinding_menu.js
index 963ef91ed..a4b46611b 100644
--- a/app/assets/lib/ace/ext-keybinding_menu.js
+++ b/app/assets/lib/ace/ext-keybinding_menu.js
@@ -1 +1 @@
-ace.define("ace/ext/keybinding_menu",["require","exports","module","ace/editor","ace/ext/menu_tools/overlay_page","ace/ext/menu_tools/get_editor_keyboard_shortcuts"],function(e,t,n){function i(t){if(!document.getElementById("kbshortcutmenu")){var n=e("./menu_tools/overlay_page").overlayPage,r=e("./menu_tools/get_editor_keyboard_shortcuts").getEditorKeybordShortcuts,i=r(t),s=document.createElement("div"),o=i.reduce(function(e,t){return e+'<div class="ace_optionsMenuEntry"><span class="ace_optionsMenuCommand">'+t.command+"</span> : "+'<span class="ace_optionsMenuKey">'+t.key+"</span></div>"},"");s.id="kbshortcutmenu",s.innerHTML="<h1>Keyboard Shortcuts</h1>"+o+"</div>",n(t,s,"0","0","0",null)}}var r=e("ace/editor").Editor;n.exports.init=function(e){r.prototype.showKeyboardShortcuts=function(){i(this)},e.commands.addCommands([{name:"showKeyboardShortcuts",bindKey:{win:"Ctrl-Alt-h",mac:"Command-Alt-h"},exec:function(e,t){e.showKeyboardShortcuts()}}])}}),ace.define("ace/ext/menu_tools/overlay_page",["require","exports","module","ace/lib/dom"],function(e,t,n){var r=e("../../lib/dom"),i="#ace_settingsmenu, #kbshortcutmenu {background-color: #F7F7F7;color: black;box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);padding: 1em 0.5em 2em 1em;overflow: auto;position: absolute;margin: 0;bottom: 0;right: 0;top: 0;z-index: 9991;cursor: default;}.ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);background-color: rgba(255, 255, 255, 0.6);color: black;}.ace_optionsMenuEntry:hover {background-color: rgba(100, 100, 100, 0.1);-webkit-transition: all 0.5s;transition: all 0.3s}.ace_closeButton {background: rgba(245, 146, 146, 0.5);border: 1px solid #F48A8A;border-radius: 50%;padding: 7px;position: absolute;right: -8px;top: -8px;z-index: 1000;}.ace_closeButton{background: rgba(245, 146, 146, 0.9);}.ace_optionsMenuKey {color: darkslateblue;font-weight: bold;}.ace_optionsMenuCommand {color: darkcyan;font-weight: normal;}";r.importCssString(i),n.exports.overlayPage=function(t,n,i,s,o,u){function l(e){e.keyCode===27&&a.click()}i=i?"top: "+i+";":"",o=o?"bottom: "+o+";":"",s=s?"right: "+s+";":"",u=u?"left: "+u+";":"";var a=document.createElement("div"),f=document.createElement("div");a.style.cssText="margin: 0; padding: 0; position: fixed; top:0; bottom:0; left:0; right:0;z-index: 9990; background-color: rgba(0, 0, 0, 0.3);",a.addEventListener("click",function(){document.removeEventListener("keydown",l),a.parentNode.removeChild(a),t.focus(),a=null}),document.addEventListener("keydown",l),f.style.cssText=i+s+o+u,f.addEventListener("click",function(e){e.stopPropagation()});var c=r.createElement("div");c.style.position="relative";var h=r.createElement("div");h.className="ace_closeButton",h.addEventListener("click",function(){a.click()}),c.appendChild(h),f.appendChild(c),f.appendChild(n),a.appendChild(f),document.body.appendChild(a),t.blur()}}),ace.define("ace/ext/menu_tools/get_editor_keyboard_shortcuts",["require","exports","module","ace/lib/keys"],function(e,t,n){var r=e("../../lib/keys");n.exports.getEditorKeybordShortcuts=function(e){var t=r.KEY_MODS,n=[],i={};return e.keyBinding.$handlers.forEach(function(e){var r=e.commandKeyBinding;for(var s in r){var o=parseInt(s);o==-1?o="":isNaN(o)?o=s:o=""+(o&t.command?"Cmd-":"")+(o&t.ctrl?"Ctrl-":"")+(o&t.alt?"Alt-":"")+(o&t.shift?"Shift-":"");for(var u in r[s]){var a=r[s][u];typeof a!="string"&&(a=a.name),i[a]?i[a].key+="|"+o+u:(i[a]={key:o+u,command:a},n.push(i[a]))}}}),n}})
\ No newline at end of file
+ace.define("ace/ext/keybinding_menu",["require","exports","module","ace/editor","ace/ext/menu_tools/overlay_page","ace/ext/menu_tools/get_editor_keyboard_shortcuts"],function(e,t,n){function i(t){if(!document.getElementById("kbshortcutmenu")){var n=e("./menu_tools/overlay_page").overlayPage,r=e("./menu_tools/get_editor_keyboard_shortcuts").getEditorKeybordShortcuts,i=r(t),s=document.createElement("div"),o=i.reduce(function(e,t){return e+'<div class="ace_optionsMenuEntry"><span class="ace_optionsMenuCommand">'+t.command+"</span> : "+'<span class="ace_optionsMenuKey">'+t.key+"</span></div>"},"");s.id="kbshortcutmenu",s.innerHTML="<h1>Keyboard Shortcuts</h1>"+o+"</div>",n(t,s,"0","0","0",null)}}var r=e("ace/editor").Editor;n.exports.init=function(e){r.prototype.showKeyboardShortcuts=function(){i(this)},e.commands.addCommands([{name:"showKeyboardShortcuts",bindKey:{win:"Ctrl-Alt-h",mac:"Command-Alt-h"},exec:function(e,t){e.showKeyboardShortcuts()}}])}}),ace.define("ace/ext/menu_tools/overlay_page",["require","exports","module","ace/lib/dom"],function(e,t,n){var r=e("../../lib/dom"),i="#ace_settingsmenu, #kbshortcutmenu {background-color: #F7F7F7;color: black;box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);padding: 1em 0.5em 2em 1em;overflow: auto;position: absolute;margin: 0;bottom: 0;right: 0;top: 0;z-index: 9991;cursor: default;}.ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);background-color: rgba(255, 255, 255, 0.6);color: black;}.ace_optionsMenuEntry:hover {background-color: rgba(100, 100, 100, 0.1);-webkit-transition: all 0.5s;transition: all 0.3s}.ace_closeButton {background: rgba(245, 146, 146, 0.5);border: 1px solid #F48A8A;border-radius: 50%;padding: 7px;position: absolute;right: -8px;top: -8px;z-index: 1000;}.ace_closeButton{background: rgba(245, 146, 146, 0.9);}.ace_optionsMenuKey {color: darkslateblue;font-weight: bold;}.ace_optionsMenuCommand {color: darkcyan;font-weight: normal;}";r.importCssString(i),n.exports.overlayPage=function(t,n,i,s,o,u){function l(e){e.keyCode===27&&a.click()}i=i?"top: "+i+";":"",o=o?"bottom: "+o+";":"",s=s?"right: "+s+";":"",u=u?"left: "+u+";":"";var a=document.createElement("div"),f=document.createElement("div");a.style.cssText="margin: 0; padding: 0; position: fixed; top:0; bottom:0; left:0; right:0;z-index: 9990; background-color: rgba(0, 0, 0, 0.3);",a.addEventListener("click",function(){document.removeEventListener("keydown",l),a.parentNode.removeChild(a),t.focus(),a=null}),document.addEventListener("keydown",l),f.style.cssText=i+s+o+u,f.addEventListener("click",function(e){e.stopPropagation()});var c=r.createElement("div");c.style.position="relative";var h=r.createElement("div");h.className="ace_closeButton",h.addEventListener("click",function(){a.click()}),c.appendChild(h),f.appendChild(c),f.appendChild(n),a.appendChild(f),document.body.appendChild(a),t.blur()}}),ace.define("ace/ext/menu_tools/get_editor_keyboard_shortcuts",["require","exports","module","ace/lib/keys"],function(e,t,n){var r=e("../../lib/keys");n.exports.getEditorKeybordShortcuts=function(e){var t=r.KEY_MODS,n=[],i={};return e.keyBinding.$handlers.forEach(function(e){var r=e.commandKeyBinding;for(var s in r){var o=parseInt(s);o==-1?o="":isNaN(o)?o=s:o=""+(o&t.command?"Cmd-":"")+(o&t.ctrl?"Ctrl-":"")+(o&t.alt?"Alt-":"")+(o&t.shift?"Shift-":"");for(var u in r[s]){var a=r[s][u];typeof a!="string"&&(a=a.name),i[a]?i[a].key+="|"+o+u:(i[a]={key:o+u,command:a},n.push(i[a]))}}}),n}}),function(){ace.require(["ace/ext/keybinding_menu"],function(){})}()
\ No newline at end of file
diff --git a/app/assets/lib/ace/ext-language_tools.js b/app/assets/lib/ace/ext-language_tools.js
index 44bc98c1f..c2a3d7321 100644
--- a/app/assets/lib/ace/ext-language_tools.js
+++ b/app/assets/lib/ace/ext-language_tools.js
@@ -1 +1 @@
-ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/autocomplete/text_completer","ace/editor"],function(e,t,n){var r=e("../snippets").snippetManager,i=e("../autocomplete").Autocomplete,s=e("../config"),o=e("../autocomplete/text_completer"),u={getCompletions:function(e,t,n,r,i){var s=e.session.getState(n.row),o=t.$mode.getCompletions(s,t,n,r);i(null,o)}},a={getCompletions:function(e,t,n,i,s){var o=r.$getScope(e),u=r.snippetMap,a=[];[o,"_"].forEach(function(e){var t=u[e]||[];for(var n=t.length;n--;){var r=t[n],i=r.name||r.tabTrigger;if(!i)continue;a.push({caption:i,snippet:r.content,meta:r.tabTrigger&&!r.name?r.tabTrigger+"⇥ ":"snippet"})}},this),s(null,a)}},f=[a,o,u];t.addCompleter=function(e){f.push(e)};var l={name:"expandSnippet",exec:function(e){var t=r.expandWithTab(e);t||e.execCommand("indent")},bindKey:"tab"},c=function(e,t){var n=t.session.$mode,i=n.$id;r.files||(r.files={});if(i&&!r.files[i]){var o=i.replace("mode","snippets");s.loadModule(o,function(e){e&&(r.files[i]=e,e.snippets=r.parseSnippetFile(e.snippetText),r.register(e.snippets,e.scope))})}},h=e("../editor").Editor;e("../config").defineOptions(h.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(this.completers=f,this.commands.addCommand(i.startCommand)):this.commands.removeCommand(i.startCommand)},value:!1},enableSnippets:{set:function(e){e?(this.commands.addCommand(l),this.on("changeMode",c),c(null,this)):(this.commands.removeCommand(l),this.off("changeMode",c))},value:!1}})}),ace.define("ace/snippets",["require","exports","module","ace/lib/lang","ace/range","ace/keyboard/hash_handler","ace/tokenizer","ace/lib/dom"],function(e,t,n){var r=e("./lib/lang"),i=e("./range").Range,s=e("./keyboard/hash_handler").HashHandler,o=e("./tokenizer").Tokenizer,u=i.comparePoints,a=function(){this.snippetMap={},this.snippetNameMap={}};(function(){this.getTokenizer=function(){function e(e,t,n){return e=e.substr(1),/^\d+$/.test(e)&&!n.inFormatString?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function t(e){return"(?:[^\\\\"+e+"]|\\\\.)"}return a.$tokenizer=new o({start:[{regex:/:/,onMatch:function(e,t,n){return n.length&&n[0].expectIf?(n[0].expectIf=!1,n[0].elseBranch=n[0],[n[0]]):":"}},{regex:/\\./,onMatch:function(e,t,n){var r=e[1];return r=="}"&&n.length?e=r:"`$\\".indexOf(r)!=-1?e=r:n.inFormatString&&(r=="n"?e="\n":r=="t"?e="\n":"ulULE".indexOf(r)!=-1&&(e={changeCase:r,local:r>"a"})),[e]}},{regex:/}/,onMatch:function(e,t,n){return[n.length?n.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:e},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(t,n,r){var i=e(t.substr(1),n,r);return r.unshift(i[0]),i},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+t("\\|")+"*\\|",onMatch:function(e,t,n){n[0].choices=e.slice(1,-1).split(",")},next:"start"},{regex:"/("+t("/")+"+)/(?:("+t("/")+"*)/)(\\w*):?",onMatch:function(e,t,n){var r=n[0];return r.fmtString=e,e=this.splitRegex.exec(e),r.guard=e[1],r.fmt=e[2],r.flag=e[3],""},next:"start"},{regex:"`"+t("`")+"*`",onMatch:function(e,t,n){return n[0].code=e.splice(1,-1),""},next:"start"},{regex:"\\?",onMatch:function(e,t,n){n[0]&&(n[0].expectIf=!0)},next:"start"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:"/("+t("/")+"+)/",token:"regex"},{regex:"",onMatch:function(e,t,n){n.inFormatString=!0},next:"start"}]}),a.prototype.getTokenizer=function(){return a.$tokenizer},a.$tokenizer},this.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map(function(e){return e.value||e})},this.$getDefaultValue=function(e,t){if(/^[A-Z]\d+$/.test(t)){var n=t.substr(1);return(this.variables[t[0]+"__"]||{})[n]}if(/^\d+$/.test(t))return(this.variables.__||{})[t];t=t.replace(/^TM_/,"");if(!e)return;var r=e.session;switch(t){case"CURRENT_WORD":var i=r.getWordRange();case"SELECTION":case"SELECTED_TEXT":return r.getTextRange(i);case"CURRENT_LINE":return r.getLine(e.getCursorPosition().row);case"PREV_LINE":return r.getLine(e.getCursorPosition().row-1);case"LINE_INDEX":return e.getCursorPosition().column;case"LINE_NUMBER":return e.getCursorPosition().row+1;case"SOFT_TABS":return r.getUseSoftTabs()?"YES":"NO";case"TAB_SIZE":return r.getTabSize();case"FILENAME":case"FILEPATH":return"ace.ajax.org";case"FULLNAME":return"Ace"}},this.variables={},this.getVariableValue=function(e,t){return this.variables.hasOwnProperty(t)?this.variables[t](e,t)||"":this.$getDefaultValue(e,t)||""},this.tmStrFormat=function(e,t,n){var r=t.flag||"",i=t.guard;i=new RegExp(i,r.replace(/[^gi]/,""));var s=this.tokenizeTmSnippet(t.fmt,"formatString"),o=this,u=e.replace(i,function(){o.variables.__=arguments;var e=o.resolveVariables(s,n),t="E";for(var r=0;r<e.length;r++){var i=e[r];if(typeof i=="object"){e[r]="";if(i.changeCase&&i.local){var u=e[r+1];u&&typeof u=="string"&&(i.changeCase=="u"?e[r]=u[0].toUpperCase():e[r]=u[0].toLowerCase(),e[r+1]=u.substr(1))}else i.changeCase&&(t=i.changeCase)}else t=="U"?e[r]=i.toUpperCase():t=="L"&&(e[r]=i.toLowerCase())}return e.join("")});return this.variables.__=null,u},this.resolveVariables=function(e,t){function o(t){var n=e.indexOf(t,r+1);n!=-1&&(r=n)}var n=[];for(var r=0;r<e.length;r++){var i=e[r];if(typeof i=="string")n.push(i);else{if(typeof i!="object")continue;if(i.skip)o(i);else{if(i.processed<r)continue;if(i.text){var s=this.getVariableValue(t,i.text);s&&i.fmtString&&(s=this.tmStrFormat(s,i)),i.processed=r,i.expectIf==null?s&&(n.push(s),o(i)):s?i.skip=i.elseBranch:o(i)}else i.tabstopId!=null?n.push(i):i.changeCase!=null&&n.push(i)}}}return n},this.insertSnippet=function(e,t){function l(e){var t=[];for(var n=0;n<e.length;n++){var r=e[n];if(typeof r=="object"){if(a[r.tabstopId])continue;var i=e.lastIndexOf(r,n-1);r=t[i]||{tabstopId:r.tabstopId}}t[n]=r}return t}var n=e.getCursorPosition(),r=e.session.getLine(n.row),i=r.match(/^\s*/)[0],s=e.session.getTabString(),o=this.tokenizeTmSnippet(t);o=this.resolveVariables(o,e),o=o.map(function(e){return e=="\n"?e+i:typeof e=="string"?e.replace(/\t/g,s):e});var u=[];o.forEach(function(e,t){if(typeof e!="object")return;var n=e.tabstopId,r=u[n];r||(r=u[n]=[],r.index=n,r.value="");if(r.indexOf(e)!==-1)return;r.push(e);var i=o.indexOf(e,t+1);if(i===-1)return;var s=o.slice(t+1,i),a=s.some(function(e){return typeof e=="object"});a&&!r.value?r.value=s:s.length&&(!r.value||typeof r.value!="string")&&(r.value=s.join(""))}),u.forEach(function(e){e.length=0});var a={};for(var c=0;c<o.length;c++){var h=o[c];if(typeof h!="object")continue;var p=h.tabstopId,d=o.indexOf(h,c+1);if(a[p]==h){a[p]=null;continue}var v=u[p],m=typeof v.value=="string"?[v.value]:l(v.value);m.unshift(c+1,Math.max(0,d-c)),m.push(h),a[p]=h,o.splice.apply(o,m),v.indexOf(h)===-1&&v.push(h)}var g=0,y=0,b="";o.forEach(function(e){typeof e=="string"?(e[0]==="\n"?(y=e.length-1,g++):y+=e.length,b+=e):e.start?e.end={row:g,column:y}:e.start={row:g,column:y}});var w=e.getSelectionRange(),E=e.session.replace(w,b),S=new f(e);S.addTabstops(u,w.start,E),S.tabNext()},this.$getScope=function(e){var t=e.session.$mode.$id||"";t=t.split("/").pop();if(t==="html"||t==="php"){t==="php"&&(t="html");var n=e.getCursorPosition(),r=e.session.getState(n.row);typeof r=="object"&&(r=r[0]),r.substring&&(r.substring(0,3)=="js-"?t="javascript":r.substring(0,4)=="css-"?t="css":r.substring(0,4)=="php-"&&(t="php"))}return t},this.expandWithTab=function(e){var t=e.getCursorPosition(),n=e.session.getLine(t.row),r=n.substring(0,t.column),i=n.substr(t.column),s=this.$getScope(e),o=this.snippetMap,u;return[s,"_"].some(function(e){var t=o[e];return t&&(u=this.findMatchingSnippet(t,r,i)),!!u},this),u?(e.session.doc.removeInLine(t.row,t.column-u.replaceBefore.length,t.column+u.replaceAfter.length),this.variables.M__=u.matchBefore,this.variables.T__=u.matchAfter,this.insertSnippet(e,u.content),this.variables.M__=this.variables.T__=null,!0):!1},this.findMatchingSnippet=function(e,t,n){for(var r=e.length;r--;){var i=e[r];if(i.startRe&&!i.startRe.test(t))continue;if(i.endRe&&!i.endRe.test(n))continue;if(!i.startRe&&!i.endRe)continue;return i.matchBefore=i.startRe?i.startRe.exec(t):[""],i.matchAfter=i.endRe?i.endRe.exec(n):[""],i.replaceBefore=i.triggerRe?i.triggerRe.exec(t)[0]:"",i.replaceAfter=i.endTriggerRe?i.endTriggerRe.exec(n)[0]:"",i}},this.snippetMap={},this.snippetNameMap={},this.register=function(e,t){function o(e){return e&&!/^\^?\(.*\)\$?$|^\\b$/.test(e)&&(e="(?:"+e+")"),e||""}function u(e,t,n){return e=o(e),t=o(t),n?(e=t+e,e&&e[e.length-1]!="$"&&(e+="$")):(e+=t,e&&e[0]!="^"&&(e="^"+e)),new RegExp(e)}function a(e){e.scope||(e.scope=t||"_"),t=e.scope,n[t]||(n[t]=[],i[t]={});var o=i[t];if(e.name){var a=o[e.name];a&&s.unregister(a),o[e.name]=e}n[t].push(e),e.tabTrigger&&!e.trigger&&(!e.guard&&/^\w/.test(e.tabTrigger)&&(e.guard="\\b"),e.trigger=r.escapeRegExp(e.tabTrigger)),e.startRe=u(e.trigger,e.guard,!0),e.triggerRe=new RegExp(e.trigger,"",!0),e.endRe=u(e.endTrigger,e.endGuard,!0),e.endTriggerRe=new RegExp(e.endTrigger,"",!0)}var n=this.snippetMap,i=this.snippetNameMap,s=this;e.content?a(e):Array.isArray(e)&&e.forEach(a)},this.unregister=function(e,t){function i(e){var i=r[e.scope||t];if(i&&i[e.name]){delete i[e.name];var s=n[e.scope||t],o=s&&s.indexOf(e);o>=0&&s.splice(o,1)}}var n=this.snippetMap,r=this.snippetNameMap;e.content?i(e):Array.isArray(e)&&e.forEach(i)},this.parseSnippetFile=function(e){e=e.replace(/\r/g,"");var t=[],n={},r=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,i;while(i=r.exec(e)){if(i[1])try{n=JSON.parse(i[1]),t.push(n)}catch(s){}if(i[4])n.content=i[4].replace(/^\t/gm,""),t.push(n),n={};else{var o=i[2],u=i[3];if(o=="regex"){var a=/\/((?:[^\/\\]|\\.)*)|$/g;n.guard=a.exec(u)[1],n.trigger=a.exec(u)[1],n.endTrigger=a.exec(u)[1],n.endGuard=a.exec(u)[1]}else o=="snippet"?(n.tabTrigger=u.match(/^\S*/)[0],n.name||(n.name=u)):n[o]=u}}return t},this.getSnippetByName=function(e,t){var n=t&&this.$getScope(t),r=this.snippetNameMap,i;return[n,"_"].some(function(t){var n=r[t];return n&&(i=n[e]),!!i},this),i}}).call(a.prototype);var f=function(e){if(e.tabstopManager)return e.tabstopManager;e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=r.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)};(function(){this.attach=function(e){this.index=-1,this.ranges=[],this.tabstops=[],this.selectedTabstop=null,this.editor=e,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},this.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges=null,this.tabstops=null,this.selectedTabstop=null,this.editor.removeListener("change",this.$onChange),this.editor.removeListener("changeSelection",this.$onChangeSelection),this.editor.removeListener("changeSession",this.$onChangeSession),this.editor.commands.removeListener("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.editor=null},this.onChange=function(e){var t=e.data.range,n=e.data.action[0]=="r",r=t.start,i=t.end,s=r.row,o=i.row,a=o-s,f=i.column-r.column;n&&(a=-a,f=-f);if(!this.$inChange&&n){var l=this.selectedTabstop,c=!l.some(function(e){return u(e.start,r)<=0&&u(e.end,i)>=0});if(c)return this.detach()}var h=this.ranges;for(var p=0;p<h.length;p++){var d=h[p];if(d.end.row<r.row)continue;if(u(r,d.start)<0&&u(i,d.end)>0){this.removeRange(d),p--;continue}d.start.row==s&&d.start.column>r.column&&(d.start.column+=f),d.end.row==s&&d.end.column>=r.column&&(d.end.column+=f),d.start.row>=s&&(d.start.row+=a),d.end.row>=s&&(d.end.row+=a),u(d.start,d.end)>0&&this.removeRange(d)}h.length||this.detach()},this.updateLinkedFields=function(){var e=this.selectedTabstop;if(!e.hasLinkedRanges)return;this.$inChange=!0;var n=this.editor.session,r=n.getTextRange(e.firstNonLinked);for(var i=e.length;i--;){var s=e[i];if(!s.linked)continue;var o=t.snippetManager.tmStrFormat(r,s.original);n.replace(s,o)}this.$inChange=!1},this.onAfterExec=function(e){e.command&&!e.command.readOnly&&this.updateLinkedFields()},this.onChangeSelection=function(){if(!this.editor)return;var e=this.editor.selection.lead,t=this.editor.selection.anchor,n=this.editor.selection.isEmpty();for(var r=this.ranges.length;r--;){if(this.ranges[r].linked)continue;var i=this.ranges[r].contains(e.row,e.column),s=n||this.ranges[r].contains(t.row,t.column);if(i&&s)return}this.detach()},this.onChangeSession=function(){this.detach()},this.tabNext=function(e){var t=this.tabstops.length-1,n=this.index+(e||1);n=Math.min(Math.max(n,0),t),this.selectTabstop(n),n==t&&this.detach()},this.selectTabstop=function(e){var t=this.tabstops[this.index];t&&this.addTabstopMarkers(t),this.index=e,t=this.tabstops[this.index];if(!t||!t.length)return;this.selectedTabstop=t;if(!this.editor.inVirtualSelectionMode){var n=this.editor.multiSelect;n.toSingleRange(t.firstNonLinked.clone());for(var r=t.length;r--;){if(t.hasLinkedRanges&&t[r].linked)continue;n.addRange(t[r].clone(),!0)}}else this.editor.selection.setRange(t.firstNonLinked);this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},this.addTabstops=function(e,t,n){if(!e[0]){var r=i.fromPoints(n,n);c(r.start,t),c(r.end,t),e[0]=[r],e[0].index=0}var s=this.index,o=[s,0],u=this.ranges,a=this.editor;e.forEach(function(e){for(var n=e.length;n--;){var r=e[n],s=i.fromPoints(r.start,r.end||r.start);l(s.start,t),l(s.end,t),s.original=r,s.tabstop=e,u.push(s),e[n]=s,r.fmtString?(s.linked=!0,e.hasLinkedRanges=!0):e.firstNonLinked||(e.firstNonLinked=s)}e.firstNonLinked||(e.hasLinkedRanges=!1),o.push(e),this.addTabstopMarkers(e)},this),o.push(o.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,o)},this.addTabstopMarkers=function(e){var t=this.editor.session;e.forEach(function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))})},this.removeTabstopMarkers=function(e){var t=this.editor.session;e.forEach(function(e){t.removeMarker(e.markerId),e.markerId=null})},this.removeRange=function(e){var t=e.tabstop.indexOf(e);e.tabstop.splice(t,1),t=this.ranges.indexOf(e),this.ranges.splice(t,1),this.editor.session.removeMarker(e.markerId)},this.keyboardHandler=new s,this.keyboardHandler.bindKeys({Tab:function(e){e.tabstopManager.tabNext(1)},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1)},Esc:function(e){e.tabstopManager.detach()},Return:function(e){return!1}})}).call(f.prototype);var l=function(e,t){e.row==0&&(e.column+=t.column),e.row+=t.row},c=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};e("./lib/dom").importCssString(".ace_snippet-marker {    -moz-box-sizing: border-box;    box-sizing: border-box;    background: rgba(194, 193, 208, 0.09);    border: 1px dotted rgba(211, 208, 235, 0.62);    position: absolute;}"),t.snippetManager=new a}),ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/event","ace/lib/lang","ace/snippets"],function(e,t,n){var r=e("./keyboard/hash_handler").HashHandler,i=e("./autocomplete/popup").AcePopup,s=e("./autocomplete/util"),o=e("./lib/event"),u=e("./lib/lang"),a=e("./snippets").snippetManager,f=function(){this.keyboardHandler=new r,this.keyboardHandler.bindKeys(this.commands),this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.changeTimer=u.delayedCall(function(){this.updateCompletions(!0)}.bind(this))};(function(){this.$init=function(){this.popup=new i(document.body||document.documentElement),this.popup.on("click",function(e){this.insertMatch(),e.stop()}.bind(this))},this.openPopup=function(e,t,n){this.popup||this.$init(),this.popup.setData(this.completions.filtered);var r=e.renderer;if(!n){this.popup.setFontSize(e.getFontSize());var i=r.layerConfig.lineHeight,s=r.$cursorLayer.getPixelPosition(this.base,!0);s.left-=this.popup.getTextLeftOffset();var o=e.container.getBoundingClientRect();s.top+=o.top-r.layerConfig.offset,s.left+=o.left,s.left+=r.$gutterLayer.gutterWidth,this.popup.show(s,i)}},this.detach=function(){this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.changeListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener),this.changeTimer.cancel(),this.popup&&this.popup.hide(),this.activated=!1,this.completions=this.base=null},this.changeListener=function(e){var t=this.editor.selection.lead;(t.row!=this.base.row||t.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},this.blurListener=function(){document.activeElement!=this.editor.textInput.getElement()&&this.detach()},this.mousedownListener=function(e){this.detach()},this.mousewheelListener=function(e){this.detach()},this.goTo=function(e){var t=this.popup.getRow(),n=this.popup.session.getLength()-1;switch(e){case"up":t=t<0?n:t-1;break;case"down":t=t>=n?-1:t+1;break;case"start":t=0;break;case"end":t=n}this.popup.setRow(t)},this.insertMatch=function(e){e||(e=this.popup.getData(this.popup.getRow()));if(!e)return!1;if(e.completer&&e.completer.insertMatch)e.completer.insertMatch(this.editor);else{if(this.completions.filterText){var t=this.editor.selection.getAllRanges();for(var n=0,r;r=t[n];n++)r.start.column-=this.completions.filterText.length,this.editor.session.remove(r)}e.snippet?a.insertSnippet(this.editor,e.snippet):this.editor.execCommand("insertstring",e.value||e)}this.detach()},this.commands={Up:function(e){e.completer.goTo("up")},Down:function(e){e.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(e){e.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(e){e.completer.goTo("end")},Esc:function(e){e.completer.detach()},Space:function(e){e.completer.detach(),e.insert(" ")},Return:function(e){e.completer.insertMatch()},"Shift-Return":function(e){e.completer.insertMatch(!0)},Tab:function(e){e.completer.insertMatch()},PageUp:function(e){e.completer.popup.gotoPageUp()},PageDown:function(e){e.completer.popup.gotoPageDown()}},this.gatherCompletions=function(e,t){var n=e.getSession(),r=e.getCursorPosition(),i=n.getLine(r.row),o=s.retrievePrecedingIdentifier(i,r.column);this.base=e.getCursorPosition(),this.base.column-=o.length;var u=[];return s.parForEach(e.completers,function(t,i){t.getCompletions(e,n,r,o,function(e,t){e||(u=u.concat(t)),i()})},function(){t(null,{prefix:o,matches:u})}),!0},this.showPopup=function(e){this.editor&&this.detach(),this.activated=!0,this.editor=e,e.completer!=this&&(e.completer&&e.completer.detach(),e.completer=this),e.keyBinding.addKeyboardHandler(this.keyboardHandler),e.on("changeSelection",this.changeListener),e.on("blur",this.blurListener),e.on("mousedown",this.mousedownListener),e.on("mousewheel",this.mousewheelListener),this.updateCompletions()},this.updateCompletions=function(e){if(e&&this.base&&this.completions){var t=this.editor.getCursorPosition(),n=this.editor.session.getTextRange({start:this.base,end:t});if(n==this.completions.filterText)return;this.completions.setFilter(n);if(!this.completions.filtered.length)return this.detach();this.openPopup(this.editor,n,e);return}this.gatherCompletions(this.editor,function(t,n){var r=n&&n.matches;if(!r||!r.length)return this.detach();this.completions=new l(r),this.completions.setFilter(n.prefix);if(!this.completions.filtered.length)return this.detach();this.openPopup(this.editor,n.prefix,e)}.bind(this))},this.cancelContextMenu=function(){var e=function(t){this.editor.off("nativecontextmenu",e),t&&t.domEvent&&o.stopEvent(t.domEvent)}.bind(this);setTimeout(e,10),this.editor.on("nativecontextmenu",e)}}).call(f.prototype),f.startCommand={name:"startAutocomplete",exec:function(e){e.completer||(e.completer=new f),e.completer.showPopup(e),e.completer.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var l=function(e,t,n){this.all=e,this.filtered=e,this.filterText=t||""};(function(){this.setFilter=function(e){if(e.length>this.filterText&&e.lastIndexOf(this.filterText,0)===0)var t=this.filtered;else var t=this.all;this.filterText=e,t=this.filterCompletions(t,this.filterText),t=t.sort(function(e,t){return t.exactMatch-e.exactMatch||t.score-e.score});var n=null;t=t.filter(function(e){var t=e.value||e.caption||e.snippet;return t===n?!1:(n=t,!0)}),this.filtered=t},this.filterCompletions=function(e,t){var n=[],r=t.toUpperCase(),i=t.toLowerCase();e:for(var s=0,o;o=e[s];s++){var u=o.value||o.caption||o.snippet;if(!u)continue;var a=-1,f=0,l=0,c,h;for(var p=0;p<t.length;p++){var d=u.indexOf(i[p],a+1),v=u.indexOf(r[p],a+1);c=d>=0?v<0||d<v?d:v:v;if(c<0)continue e;h=c-a-1,h>0&&(a===-1&&(l+=10),l+=h),f|=1<<c,a=c}o.matchMask=f,o.exactMatch=l?0:1,o.score=(o.score||0)-l,n.push(o)}return n}}).call(l.prototype),t.Autocomplete=f,t.FilteredList=l}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/edit_session","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom"],function(e,t,n){var r=e("../edit_session").EditSession,i=e("../virtual_renderer").VirtualRenderer,s=e("../editor").Editor,o=e("../range").Range,u=e("../lib/event"),a=e("../lib/lang"),f=e("../lib/dom"),l=function(e){var t=new i(e);t.$maxLines=4;var n=new s(t);return n.setHighlightActiveLine(!1),n.setShowPrintMargin(!1),n.renderer.setShowGutter(!1),n.renderer.setHighlightGutterLine(!1),n.$mouseHandler.$focusWaitTimout=0,n},c=function(e){var t=f.createElement("div"),n=new l(t);e&&e.appendChild(t),t.style.display="none",n.renderer.content.style.cursor="default",n.renderer.setStyle("ace_autocomplete"),n.setOption("displayIndentGuides",!1);var r=function(){};n.focus=r,n.$isFocused=!0,n.renderer.$cursorLayer.restartTimer=r,n.renderer.$cursorLayer.element.style.opacity=0,n.renderer.$maxLines=8,n.renderer.$keepTextAreaAtCursor=!1,n.setHighlightActiveLine(!1),n.session.highlight(""),n.session.$searchHighlight.clazz="ace_highlight-marker",n.on("mousedown",function(e){var t=e.getDocumentPosition();n.moveCursorToPosition(t),n.selection.clearSelection(),c.start.row=c.end.row=t.row,e.stop()});var i,s=new o(-1,0,-1,Infinity),c=new o(-1,0,-1,Infinity);c.id=n.session.addMarker(c,"ace_active-line","fullLine"),n.setSelectOnHover=function(e){e?s.id&&(n.session.removeMarker(s.id),s.id=null):s.id=n.session.addMarker(s,"ace_line-hover","fullLine")},n.setSelectOnHover(!1),n.on("mousemove",function(e){if(!i){i=e;return}if(i.x==e.x&&i.y==e.y)return;i=e,i.scrollTop=n.renderer.scrollTop;var t=i.getDocumentPosition().row;s.start.row!=t&&(s.id||n.setRow(t),p(t))}),n.renderer.on("beforeRender",function(){if(i&&s.start.row!=-1){i.$pos=null;var e=i.getDocumentPosition().row;s.id||n.setRow(e),p(e,!0)}}),n.renderer.on("afterRender",function(){var e=n.getRow(),t=n.renderer.$textLayer,r=t.element.childNodes[e-t.config.firstRow];if(r==t.selectedNode)return;t.selectedNode&&f.removeCssClass(t.selectedNode,"ace_selected"),t.selectedNode=r,r&&f.addCssClass(r,"ace_selected")});var h=function(){p(-1)},p=function(e,t){e!==s.start.row&&(s.start.row=s.end.row=e,t||n.session._emit("changeBackMarker"),n._emit("changeHoverMarker"))};n.getHoveredRow=function(){return s.start.row},u.addListener(n.container,"mouseout",h),n.on("hide",h),n.on("changeSelection",h),n.session.doc.getLength=function(){return n.data.length},n.session.doc.getLine=function(e){var t=n.data[e];return typeof t=="string"?t:t&&t.value||""};var d=n.session.bgTokenizer;return d.$tokenizeRow=function(e){var t=n.data[e],r=[];if(!t)return r;typeof t=="string"&&(t={value:t}),t.caption||(t.caption=t.value);var i=-1,s,o;for(var e=0;e<t.caption.length;e++)o=t.caption[e],s=t.matchMask&1<<e?1:0,i!==s?(r.push({type:t.className||""+(s?"completion-highlight":""),value:o}),i=s):r[r.length-1].value+=o;if(t.meta){var u=n.renderer.$size.scrollerWidth/n.renderer.layerConfig.characterWidth;t.meta.length+t.caption.length<u-2&&r.push({type:"rightAlignedText",value:t.meta})}return r},d.$updateOnChange=r,d.start=r,n.session.$computeWidth=function(){return this.screenWidth=0},n.isOpen=!1,n.isTopdown=!1,n.data=[],n.setData=function(e){n.data=e||[],n.setValue(a.stringRepeat("\n",e.length),-1),n.setRow(0)},n.getData=function(e){return n.data[e]},n.getRow=function(){return c.start.row},n.setRow=function(e){e=Math.max(-1,Math.min(this.data.length,e)),c.start.row!=e&&(n.selection.clearSelection(),c.start.row=c.end.row=e||0,n.session._emit("changeBackMarker"),n.moveCursorTo(e||0,0),n.isOpen&&n._signal("select"))},n.on("changeSelection",function(){n.isOpen&&n.setRow(n.selection.lead.row)}),n.hide=function(){this.container.style.display="none",this._signal("hide"),n.isOpen=!1},n.show=function(e,t,r){var s=this.container,o=window.innerHeight,u=this.renderer,a=u.$maxLines*t*1.4,f=e.top+this.$borderSize;f+a>o-t&&!r?(s.style.top="",s.style.bottom=o-f+"px",n.isTopdown=!1):(f+=t,s.style.top=f+"px",s.style.bottom="",n.isTopdown=!0),s.style.left=e.left+"px",s.style.display="",this.renderer.$textLayer.checkForSizeChanges(),this._signal("show"),i=null,n.isOpen=!0},n.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},n.$imageSize=0,n.$borderSize=1,n};f.importCssString(".ace_autocomplete.ace-tm .ace_marker-layer .ace_active-line {    background-color: #CAD6FA;    z-index: 1;}.ace_autocomplete.ace-tm .ace_line-hover {    border: 1px solid #abbffe;    margin-top: -1px;    background: rgba(233,233,253,0.4);}.ace_autocomplete .ace_line-hover {    position: absolute;    z-index: 2;}.ace_rightAlignedText {    color: gray;    display: inline-block;    position: absolute;    right: 4px;    text-align: right;    z-index: -1;}.ace_autocomplete .ace_completion-highlight{    color: #000;    text-shadow: 0 0 0.01em;}.ace_autocomplete {    width: 280px;    z-index: 200000;    background: #fbfbfb;    color: #444;    border: 1px lightgray solid;    position: fixed;    box-shadow: 2px 3px 5px rgba(0,0,0,.2);    line-height: 1.4;}"),t.AcePopup=c}),ace.define("ace/autocomplete/util",["require","exports","module"],function(e,t,n){t.parForEach=function(e,t,n){var r=0,i=e.length;i===0&&n();for(var s=0;s<i;s++)t(e[s],function(e,t){r++,r===i&&n(e,t)})};var r=/[a-zA-Z_0-9\$-]/;t.retrievePrecedingIdentifier=function(e,t,n){n=n||r;var i=[];for(var s=t-1;s>=0;s--){if(!n.test(e[s]))break;i.push(e[s])}return i.reverse().join("")},t.retrieveFollowingIdentifier=function(e,t,n){n=n||r;var i=[];for(var s=t;s<e.length;s++){if(!n.test(e[s]))break;i.push(e[s])}return i}}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(e,t,n){function s(e,t){var n=e.getTextRange(r.fromPoints({row:0,column:0},t));return n.split(i).length-1}function o(e,t){var n=s(e,t),r=e.getValue().split(i),o=Object.create(null),u=r[n];return r.forEach(function(e,t){if(!e||e===u)return;var i=Math.abs(n-t),s=r.length-i;o[e]?o[e]=Math.max(s,o[e]):o[e]=s}),o}var r=e("ace/range").Range,i=/[^a-zA-Z_0-9\$\-]+/;t.getCompletions=function(e,t,n,r,i){var s=o(t,n,r),u=Object.keys(s);i(null,u.map(function(e){return{name:e,value:e,score:s[e],meta:"local"}}))}})
\ No newline at end of file
+ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor"],function(e,t,n){var r=e("../snippets").snippetManager,i=e("../autocomplete").Autocomplete,s=e("../config"),o=e("../autocomplete/util"),u=e("../autocomplete/text_completer"),a={getCompletions:function(e,t,n,r,i){var s=e.session.getState(n.row),o=t.$mode.getCompletions(s,t,n,r);i(null,o)}},f={getCompletions:function(e,t,n,i,s){var o=r.snippetMap,u=[];r.getActiveScopes(e).forEach(function(e){var t=o[e]||[];for(var n=t.length;n--;){var r=t[n],i=r.name||r.tabTrigger;if(!i)continue;u.push({caption:i,snippet:r.content,meta:r.tabTrigger&&!r.name?r.tabTrigger+"\u21e5 ":"snippet"})}},this),s(null,u)}},l=[f,u,a];t.addCompleter=function(e){l.push(e)},t.textCompleter=u,t.keyWordCompleter=a,t.snippetCompleter=f;var c={name:"expandSnippet",exec:function(e){var t=r.expandWithTab(e);t||e.execCommand("indent")},bindKey:"Tab"},h=function(e,t){p(t.session.$mode)},p=function(e){var t=e.$id;r.files||(r.files={}),d(t),e.modes&&e.modes.forEach(p)},d=function(e){if(!e||r.files[e])return;var t=e.replace("mode","snippets");r.files[e]={},s.loadModule(t,function(t){t&&(r.files[e]=t,!t.snippets&&t.snippetText&&(t.snippets=r.parseSnippetFile(t.snippetText)),r.register(t.snippets||[],t.scope),t.includeScopes&&(r.snippetMap[t.scope].includeScopes=t.includeScopes,t.includeScopes.forEach(function(e){d("ace/mode/"+e)})))})},v=function(e){var t=e.editor,n=e.args||"",r=t.getCursorPosition(),s=t.session.getLine(r.row),u=t.completer&&t.completer.activated,a=o.retrievePrecedingIdentifier(s,r.column);l.forEach(function(e){e.identifierRegexps&&e.identifierRegexps.forEach(function(e){a||(a=o.retrievePrecedingIdentifier(s,r.column,e))})}),e.command.name==="backspace"&&!a?u&&t.completer.detach():e.command.name==="insertstring"&&(a&&!u?(t.completer||(t.completer=new i,t.completer.autoSelect=!1,t.completer.autoInsert=!1),t.completer.showPopup(t)):!a&&u&&t.completer.detach())},m=e("../editor").Editor;e("../config").defineOptions(m.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(this.completers=Array.isArray(e)?e:l,this.commands.addCommand(i.startCommand)):this.commands.removeCommand(i.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers=Array.isArray(e)?e:l,this.commands.on("afterExec",v)):this.commands.removeListener("afterExec",v)},value:!1},enableSnippets:{set:function(e){e?(this.commands.addCommand(c),this.on("changeMode",h),h(null,this)):(this.commands.removeCommand(c),this.off("changeMode",h))},value:!1}})}),ace.define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/anchor","ace/keyboard/hash_handler","ace/tokenizer","ace/lib/dom","ace/editor"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=e("./lib/lang"),o=e("./range").Range,u=e("./anchor").Anchor,a=e("./keyboard/hash_handler").HashHandler,f=e("./tokenizer").Tokenizer,l=o.comparePoints,c=function(){this.snippetMap={},this.snippetNameMap={}};(function(){r.implement(this,i),this.getTokenizer=function(){function e(e,t,n){return e=e.substr(1),/^\d+$/.test(e)&&!n.inFormatString?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function t(e){return"(?:[^\\\\"+e+"]|\\\\.)"}return c.$tokenizer=new f({start:[{regex:/:/,onMatch:function(e,t,n){return n.length&&n[0].expectIf?(n[0].expectIf=!1,n[0].elseBranch=n[0],[n[0]]):":"}},{regex:/\\./,onMatch:function(e,t,n){var r=e[1];return r=="}"&&n.length?e=r:"`$\\".indexOf(r)!=-1?e=r:n.inFormatString&&(r=="n"?e="\n":r=="t"?e="\n":"ulULE".indexOf(r)!=-1&&(e={changeCase:r,local:r>"a"})),[e]}},{regex:/}/,onMatch:function(e,t,n){return[n.length?n.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:e},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(t,n,r){var i=e(t.substr(1),n,r);return r.unshift(i[0]),i},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+t("\\|")+"*\\|",onMatch:function(e,t,n){n[0].choices=e.slice(1,-1).split(",")},next:"start"},{regex:"/("+t("/")+"+)/(?:("+t("/")+"*)/)(\\w*):?",onMatch:function(e,t,n){var r=n[0];return r.fmtString=e,e=this.splitRegex.exec(e),r.guard=e[1],r.fmt=e[2],r.flag=e[3],""},next:"start"},{regex:"`"+t("`")+"*`",onMatch:function(e,t,n){return n[0].code=e.splice(1,-1),""},next:"start"},{regex:"\\?",onMatch:function(e,t,n){n[0]&&(n[0].expectIf=!0)},next:"start"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:"/("+t("/")+"+)/",token:"regex"},{regex:"",onMatch:function(e,t,n){n.inFormatString=!0},next:"start"}]}),c.prototype.getTokenizer=function(){return c.$tokenizer},c.$tokenizer},this.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map(function(e){return e.value||e})},this.$getDefaultValue=function(e,t){if(/^[A-Z]\d+$/.test(t)){var n=t.substr(1);return(this.variables[t[0]+"__"]||{})[n]}if(/^\d+$/.test(t))return(this.variables.__||{})[t];t=t.replace(/^TM_/,"");if(!e)return;var r=e.session;switch(t){case"CURRENT_WORD":var i=r.getWordRange();case"SELECTION":case"SELECTED_TEXT":return r.getTextRange(i);case"CURRENT_LINE":return r.getLine(e.getCursorPosition().row);case"PREV_LINE":return r.getLine(e.getCursorPosition().row-1);case"LINE_INDEX":return e.getCursorPosition().column;case"LINE_NUMBER":return e.getCursorPosition().row+1;case"SOFT_TABS":return r.getUseSoftTabs()?"YES":"NO";case"TAB_SIZE":return r.getTabSize();case"FILENAME":case"FILEPATH":return"";case"FULLNAME":return"Ace"}},this.variables={},this.getVariableValue=function(e,t){return this.variables.hasOwnProperty(t)?this.variables[t](e,t)||"":this.$getDefaultValue(e,t)||""},this.tmStrFormat=function(e,t,n){var r=t.flag||"",i=t.guard;i=new RegExp(i,r.replace(/[^gi]/,""));var s=this.tokenizeTmSnippet(t.fmt,"formatString"),o=this,u=e.replace(i,function(){o.variables.__=arguments;var e=o.resolveVariables(s,n),t="E";for(var r=0;r<e.length;r++){var i=e[r];if(typeof i=="object"){e[r]="";if(i.changeCase&&i.local){var u=e[r+1];u&&typeof u=="string"&&(i.changeCase=="u"?e[r]=u[0].toUpperCase():e[r]=u[0].toLowerCase(),e[r+1]=u.substr(1))}else i.changeCase&&(t=i.changeCase)}else t=="U"?e[r]=i.toUpperCase():t=="L"&&(e[r]=i.toLowerCase())}return e.join("")});return this.variables.__=null,u},this.resolveVariables=function(e,t){function o(t){var n=e.indexOf(t,r+1);n!=-1&&(r=n)}var n=[];for(var r=0;r<e.length;r++){var i=e[r];if(typeof i=="string")n.push(i);else{if(typeof i!="object")continue;if(i.skip)o(i);else{if(i.processed<r)continue;if(i.text){var s=this.getVariableValue(t,i.text);s&&i.fmtString&&(s=this.tmStrFormat(s,i)),i.processed=r,i.expectIf==null?s&&(n.push(s),o(i)):s?i.skip=i.elseBranch:o(i)}else i.tabstopId!=null?n.push(i):i.changeCase!=null&&n.push(i)}}}return n},this.insertSnippetForSelection=function(e,t){function f(e){var t=[];for(var n=0;n<e.length;n++){var r=e[n];if(typeof r=="object"){if(a[r.tabstopId])continue;var i=e.lastIndexOf(r,n-1);r=t[i]||{tabstopId:r.tabstopId}}t[n]=r}return t}var n=e.getCursorPosition(),r=e.session.getLine(n.row),i=e.session.getTabString(),s=r.match(/^\s*/)[0];n.column<s.length&&(s=s.slice(0,n.column));var o=this.tokenizeTmSnippet(t);o=this.resolveVariables(o,e),o=o.map(function(e){return e=="\n"?e+s:typeof e=="string"?e.replace(/\t/g,i):e});var u=[];o.forEach(function(e,t){if(typeof e!="object")return;var n=e.tabstopId,r=u[n];r||(r=u[n]=[],r.index=n,r.value="");if(r.indexOf(e)!==-1)return;r.push(e);var i=o.indexOf(e,t+1);if(i===-1)return;var s=o.slice(t+1,i),a=s.some(function(e){return typeof e=="object"});a&&!r.value?r.value=s:s.length&&(!r.value||typeof r.value!="string")&&(r.value=s.join(""))}),u.forEach(function(e){e.length=0});var a={};for(var l=0;l<o.length;l++){var c=o[l];if(typeof c!="object")continue;var p=c.tabstopId,d=o.indexOf(c,l+1);if(a[p]){a[p]===c&&(a[p]=null);continue}var v=u[p],m=typeof v.value=="string"?[v.value]:f(v.value);m.unshift(l+1,Math.max(0,d-l)),m.push(c),a[p]=c,o.splice.apply(o,m),v.indexOf(c)===-1&&v.push(c)}var g=0,y=0,b="";o.forEach(function(e){typeof e=="string"?(e[0]==="\n"?(y=e.length-1,g++):y+=e.length,b+=e):e.start?e.end={row:g,column:y}:e.start={row:g,column:y}});var w=e.getSelectionRange(),E=e.session.replace(w,b),S=new h(e),x=e.inVirtualSelectionMode&&e.selection.index;S.addTabstops(u,w.start,E,x)},this.insertSnippet=function(e,t){var n=this;if(e.inVirtualSelectionMode)return n.insertSnippetForSelection(e,t);e.forEachSelection(function(){n.insertSnippetForSelection(e,t)},null,{keepOrder:!0}),e.tabstopManager&&e.tabstopManager.tabNext()},this.$getScope=function(e){var t=e.session.$mode.$id||"";t=t.split("/").pop();if(t==="html"||t==="php"){t==="php"&&!e.session.$mode.inlinePhp&&(t="html");var n=e.getCursorPosition(),r=e.session.getState(n.row);typeof r=="object"&&(r=r[0]),r.substring&&(r.substring(0,3)=="js-"?t="javascript":r.substring(0,4)=="css-"?t="css":r.substring(0,4)=="php-"&&(t="php"))}return t},this.getActiveScopes=function(e){var t=this.$getScope(e),n=[t],r=this.snippetMap;return r[t]&&r[t].includeScopes&&n.push.apply(n,r[t].includeScopes),n.push("_"),n},this.expandWithTab=function(e,t){var n=this,r=e.forEachSelection(function(){return n.expandSnippetForSelection(e,t)},null,{keepOrder:!0});return r&&e.tabstopManager&&e.tabstopManager.tabNext(),r},this.expandSnippetForSelection=function(e,t){var n=e.getCursorPosition(),r=e.session.getLine(n.row),i=r.substring(0,n.column),s=r.substr(n.column),o=this.snippetMap,u;return this.getActiveScopes(e).some(function(e){var t=o[e];return t&&(u=this.findMatchingSnippet(t,i,s)),!!u},this),u?t&&t.dryRun?!0:(e.session.doc.removeInLine(n.row,n.column-u.replaceBefore.length,n.column+u.replaceAfter.length),this.variables.M__=u.matchBefore,this.variables.T__=u.matchAfter,this.insertSnippetForSelection(e,u.content),this.variables.M__=this.variables.T__=null,!0):!1},this.findMatchingSnippet=function(e,t,n){for(var r=e.length;r--;){var i=e[r];if(i.startRe&&!i.startRe.test(t))continue;if(i.endRe&&!i.endRe.test(n))continue;if(!i.startRe&&!i.endRe)continue;return i.matchBefore=i.startRe?i.startRe.exec(t):[""],i.matchAfter=i.endRe?i.endRe.exec(n):[""],i.replaceBefore=i.triggerRe?i.triggerRe.exec(t)[0]:"",i.replaceAfter=i.endTriggerRe?i.endTriggerRe.exec(n)[0]:"",i}},this.snippetMap={},this.snippetNameMap={},this.register=function(e,t){function o(e){return e&&!/^\^?\(.*\)\$?$|^\\b$/.test(e)&&(e="(?:"+e+")"),e||""}function u(e,t,n){return e=o(e),t=o(t),n?(e=t+e,e&&e[e.length-1]!="$"&&(e+="$")):(e+=t,e&&e[0]!="^"&&(e="^"+e)),new RegExp(e)}function a(e){e.scope||(e.scope=t||"_"),t=e.scope,n[t]||(n[t]=[],r[t]={});var o=r[t];if(e.name){var a=o[e.name];a&&i.unregister(a),o[e.name]=e}n[t].push(e),e.tabTrigger&&!e.trigger&&(!e.guard&&/^\w/.test(e.tabTrigger)&&(e.guard="\\b"),e.trigger=s.escapeRegExp(e.tabTrigger)),e.startRe=u(e.trigger,e.guard,!0),e.triggerRe=new RegExp(e.trigger,"",!0),e.endRe=u(e.endTrigger,e.endGuard,!0),e.endTriggerRe=new RegExp(e.endTrigger,"",!0)}var n=this.snippetMap,r=this.snippetNameMap,i=this;e.content?a(e):Array.isArray(e)&&e.forEach(a),this._signal("registerSnippets",{scope:t})},this.unregister=function(e,t){function i(e){var i=r[e.scope||t];if(i&&i[e.name]){delete i[e.name];var s=n[e.scope||t],o=s&&s.indexOf(e);o>=0&&s.splice(o,1)}}var n=this.snippetMap,r=this.snippetNameMap;e.content?i(e):Array.isArray(e)&&e.forEach(i)},this.parseSnippetFile=function(e){e=e.replace(/\r/g,"");var t=[],n={},r=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,i;while(i=r.exec(e)){if(i[1])try{n=JSON.parse(i[1]),t.push(n)}catch(s){}if(i[4])n.content=i[4].replace(/^\t/gm,""),t.push(n),n={};else{var o=i[2],u=i[3];if(o=="regex"){var a=/\/((?:[^\/\\]|\\.)*)|$/g;n.guard=a.exec(u)[1],n.trigger=a.exec(u)[1],n.endTrigger=a.exec(u)[1],n.endGuard=a.exec(u)[1]}else o=="snippet"?(n.tabTrigger=u.match(/^\S*/)[0],n.name||(n.name=u)):n[o]=u}}return t},this.getSnippetByName=function(e,t){var n=this.snippetNameMap,r;return this.getActiveScopes(t).some(function(t){var i=n[t];return i&&(r=i[e]),!!r},this),r}}).call(c.prototype);var h=function(e){if(e.tabstopManager)return e.tabstopManager;e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=s.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)};(function(){this.attach=function(e){this.index=0,this.ranges=[],this.tabstops=[],this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},this.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges=null,this.tabstops=null,this.selectedTabstop=null,this.editor.removeListener("change",this.$onChange),this.editor.removeListener("changeSelection",this.$onChangeSelection),this.editor.removeListener("changeSession",this.$onChangeSession),this.editor.commands.removeListener("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.editor=null},this.onChange=function(e){var t=e.data.range,n=e.data.action[0]=="r",r=t.start,i=t.end,s=r.row,o=i.row,u=o-s,a=i.column-r.column;n&&(u=-u,a=-a);if(!this.$inChange&&n){var f=this.selectedTabstop,c=f&&!f.some(function(e){return l(e.start,r)<=0&&l(e.end,i)>=0});if(c)return this.detach()}var h=this.ranges;for(var p=0;p<h.length;p++){var d=h[p];if(d.end.row<r.row)continue;if(n&&l(r,d.start)<0&&l(i,d.end)>0){this.removeRange(d),p--;continue}d.start.row==s&&d.start.column>r.column&&(d.start.column+=a),d.end.row==s&&d.end.column>=r.column&&(d.end.column+=a),d.start.row>=s&&(d.start.row+=u),d.end.row>=s&&(d.end.row+=u),l(d.start,d.end)>0&&this.removeRange(d)}h.length||this.detach()},this.updateLinkedFields=function(){var e=this.selectedTabstop;if(!e||!e.hasLinkedRanges)return;this.$inChange=!0;var n=this.editor.session,r=n.getTextRange(e.firstNonLinked);for(var i=e.length;i--;){var s=e[i];if(!s.linked)continue;var o=t.snippetManager.tmStrFormat(r,s.original);n.replace(s,o)}this.$inChange=!1},this.onAfterExec=function(e){e.command&&!e.command.readOnly&&this.updateLinkedFields()},this.onChangeSelection=function(){if(!this.editor)return;var e=this.editor.selection.lead,t=this.editor.selection.anchor,n=this.editor.selection.isEmpty();for(var r=this.ranges.length;r--;){if(this.ranges[r].linked)continue;var i=this.ranges[r].contains(e.row,e.column),s=n||this.ranges[r].contains(t.row,t.column);if(i&&s)return}this.detach()},this.onChangeSession=function(){this.detach()},this.tabNext=function(e){var t=this.tabstops.length,n=this.index+(e||1);n=Math.min(Math.max(n,1),t),n==t&&(n=0),this.selectTabstop(n),n===0&&this.detach()},this.selectTabstop=function(e){this.$openTabstops=null;var t=this.tabstops[this.index];t&&this.addTabstopMarkers(t),this.index=e,t=this.tabstops[this.index];if(!t||!t.length)return;this.selectedTabstop=t;if(!this.editor.inVirtualSelectionMode){var n=this.editor.multiSelect;n.toSingleRange(t.firstNonLinked.clone());for(var r=t.length;r--;){if(t.hasLinkedRanges&&t[r].linked)continue;n.addRange(t[r].clone(),!0)}n.ranges[0]&&n.addRange(n.ranges[0].clone())}else this.editor.selection.setRange(t.firstNonLinked);this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},this.addTabstops=function(e,t,n){this.$openTabstops||(this.$openTabstops=[]);if(!e[0]){var r=o.fromPoints(n,n);v(r.start,t),v(r.end,t),e[0]=[r],e[0].index=0}var i=this.index,s=[i+1,0],u=this.ranges;e.forEach(function(e,n){var r=this.$openTabstops[n]||e;for(var i=e.length;i--;){var a=e[i],f=o.fromPoints(a.start,a.end||a.start);d(f.start,t),d(f.end,t),f.original=a,f.tabstop=r,u.push(f),r!=e?r.unshift(f):r[i]=f,a.fmtString?(f.linked=!0,r.hasLinkedRanges=!0):r.firstNonLinked||(r.firstNonLinked=f)}r.firstNonLinked||(r.hasLinkedRanges=!1),r===e&&(s.push(r),this.$openTabstops[n]=r),this.addTabstopMarkers(r)},this),s.length>2&&(this.tabstops.length&&s.push(s.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,s))},this.addTabstopMarkers=function(e){var t=this.editor.session;e.forEach(function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))})},this.removeTabstopMarkers=function(e){var t=this.editor.session;e.forEach(function(e){t.removeMarker(e.markerId),e.markerId=null})},this.removeRange=function(e){var t=e.tabstop.indexOf(e);e.tabstop.splice(t,1),t=this.ranges.indexOf(e),this.ranges.splice(t,1),this.editor.session.removeMarker(e.markerId),e.tabstop.length||(t=this.tabstops.indexOf(e.tabstop),t!=-1&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},this.keyboardHandler=new a,this.keyboardHandler.bindKeys({Tab:function(e){if(t.snippetManager&&t.snippetManager.expandWithTab(e))return;e.tabstopManager.tabNext(1)},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1)},Esc:function(e){e.tabstopManager.detach()},Return:function(e){return!1}})}).call(h.prototype);var p={};p.onChange=u.prototype.onChange,p.setPosition=function(e,t){this.pos.row=e,this.pos.column=t},p.update=function(e,t,n){this.$insertRight=n,this.pos=e,this.onChange(t)};var d=function(e,t){e.row==0&&(e.column+=t.column),e.row+=t.row},v=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};e("./lib/dom").importCssString(".ace_snippet-marker {    -moz-box-sizing: border-box;    box-sizing: border-box;    background: rgba(194, 193, 208, 0.09);    border: 1px dotted rgba(211, 208, 235, 0.62);    position: absolute;}"),t.snippetManager=new c;var m=e("./editor").Editor;(function(){this.insertSnippet=function(e,n){return t.snippetManager.insertSnippet(this,e,n)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}).call(m.prototype)}),ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/event","ace/lib/lang","ace/snippets"],function(e,t,n){var r=e("./keyboard/hash_handler").HashHandler,i=e("./autocomplete/popup").AcePopup,s=e("./autocomplete/util"),o=e("./lib/event"),u=e("./lib/lang"),a=e("./snippets").snippetManager,f=function(){this.autoInsert=!0,this.autoSelect=!0,this.keyboardHandler=new r,this.keyboardHandler.bindKeys(this.commands),this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.changeTimer=u.delayedCall(function(){this.updateCompletions(!0)}.bind(this))};(function(){this.gatherCompletionsId=0,this.$init=function(){this.popup=new i(document.body||document.documentElement),this.popup.on("click",function(e){this.insertMatch(),e.stop()}.bind(this)),this.popup.focus=this.editor.focus.bind(this.editor)},this.openPopup=function(e,t,n){this.popup||this.$init(),this.popup.setData(this.completions.filtered);var r=e.renderer;this.popup.setRow(this.autoSelect?0:-1);if(!n){this.popup.setTheme(e.getTheme()),this.popup.setFontSize(e.getFontSize());var i=r.layerConfig.lineHeight,s=r.$cursorLayer.getPixelPosition(this.base,!0);s.left-=this.popup.getTextLeftOffset();var o=e.container.getBoundingClientRect();s.top+=o.top-r.layerConfig.offset,s.left+=o.left-e.renderer.scrollLeft,s.left+=r.$gutterLayer.gutterWidth,this.popup.show(s,i)}},this.detach=function(){this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener),this.changeTimer.cancel(),this.popup&&this.popup.isOpen&&(this.gatherCompletionsId=this.gatherCompletionsId+1),this.popup&&this.popup.hide(),this.activated=!1,this.completions=this.base=null},this.changeListener=function(e){var t=this.editor.selection.lead;(t.row!=this.base.row||t.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},this.blurListener=function(){var e=document.activeElement;e!=this.editor.textInput.getElement()&&e.parentNode!=this.popup.container&&this.detach()},this.mousedownListener=function(e){this.detach()},this.mousewheelListener=function(e){this.detach()},this.goTo=function(e){var t=this.popup.getRow(),n=this.popup.session.getLength()-1;switch(e){case"up":t=t<=0?n:t-1;break;case"down":t=t>=n?-1:t+1;break;case"start":t=0;break;case"end":t=n}this.popup.setRow(t)},this.insertMatch=function(e){e||(e=this.popup.getData(this.popup.getRow()));if(!e)return!1;if(e.completer&&e.completer.insertMatch)e.completer.insertMatch(this.editor);else{if(this.completions.filterText){var t=this.editor.selection.getAllRanges();for(var n=0,r;r=t[n];n++)r.start.column-=this.completions.filterText.length,this.editor.session.remove(r)}e.snippet?a.insertSnippet(this.editor,e.snippet):this.editor.execCommand("insertstring",e.value||e)}this.detach()},this.commands={Up:function(e){e.completer.goTo("up")},Down:function(e){e.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(e){e.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(e){e.completer.goTo("end")},Esc:function(e){e.completer.detach()},Space:function(e){e.completer.detach(),e.insert(" ")},Return:function(e){return e.completer.insertMatch()},"Shift-Return":function(e){e.completer.insertMatch(!0)},Tab:function(e){var t=e.completer.insertMatch();if(!!t||!!e.tabstopManager)return t;e.completer.goTo("down")},PageUp:function(e){e.completer.popup.gotoPageUp()},PageDown:function(e){e.completer.popup.gotoPageDown()}},this.gatherCompletions=function(e,t){var n=e.getSession(),r=e.getCursorPosition(),i=n.getLine(r.row),o=s.retrievePrecedingIdentifier(i,r.column);this.base=e.getCursorPosition(),this.base.column-=o.length;var u=[],a=e.completers.length;return e.completers.forEach(function(i,f){i.getCompletions(e,n,r,o,function(r,i){r||(u=u.concat(i));var o=e.getCursorPosition(),f=n.getLine(o.row);t(null,{prefix:s.retrievePrecedingIdentifier(f,o.column,i[0]&&i[0].identifierRegex),matches:u,finished:--a===0})})}),!0},this.showPopup=function(e){this.editor&&this.detach(),this.activated=!0,this.editor=e,e.completer!=this&&(e.completer&&e.completer.detach(),e.completer=this),e.keyBinding.addKeyboardHandler(this.keyboardHandler),e.on("changeSelection",this.changeListener),e.on("blur",this.blurListener),e.on("mousedown",this.mousedownListener),e.on("mousewheel",this.mousewheelListener),this.updateCompletions()},this.updateCompletions=function(e){if(e&&this.base&&this.completions){var t=this.editor.getCursorPosition(),n=this.editor.session.getTextRange({start:this.base,end:t});if(n==this.completions.filterText)return;this.completions.setFilter(n);if(!this.completions.filtered.length)return this.detach();if(this.completions.filtered.length==1&&this.completions.filtered[0].value==n&&!this.completions.filtered[0].snippet)return this.detach();this.openPopup(this.editor,n,e);return}var r=this.gatherCompletionsId;this.gatherCompletions(this.editor,function(t,n){var i=function(){if(!n.finished)return;return this.detach()}.bind(this),s=n.prefix,o=n&&n.matches;if(!o||!o.length)return i();if(s.indexOf(n.prefix)!==0||r!=this.gatherCompletionsId)return;this.completions=new l(o),this.completions.setFilter(s);var u=this.completions.filtered;if(!u.length)return i();if(u.length==1&&u[0].value==s&&!u[0].snippet)return i();if(this.autoInsert&&u.length==1)return this.insertMatch(u[0]);this.openPopup(this.editor,s,e)}.bind(this))},this.cancelContextMenu=function(){var e=function(t){this.editor.off("nativecontextmenu",e),t&&t.domEvent&&o.stopEvent(t.domEvent)}.bind(this);setTimeout(e,10),this.editor.on("nativecontextmenu",e)}}).call(f.prototype),f.startCommand={name:"startAutocomplete",exec:function(e){e.completer||(e.completer=new f),e.completer.autoInsert=e.completer.autoSelect=!0,e.completer.showPopup(e),e.completer.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var l=function(e,t,n){this.all=e,this.filtered=e,this.filterText=t||""};(function(){this.setFilter=function(e){if(e.length>this.filterText&&e.lastIndexOf(this.filterText,0)===0)var t=this.filtered;else var t=this.all;this.filterText=e,t=this.filterCompletions(t,this.filterText),t=t.sort(function(e,t){return t.exactMatch-e.exactMatch||t.score-e.score});var n=null;t=t.filter(function(e){var t=e.value||e.caption||e.snippet;return t===n?!1:(n=t,!0)}),this.filtered=t},this.filterCompletions=function(e,t){var n=[],r=t.toUpperCase(),i=t.toLowerCase();e:for(var s=0,o;o=e[s];s++){var u=o.value||o.caption||o.snippet;if(!u)continue;var a=-1,f=0,l=0,c,h;for(var p=0;p<t.length;p++){var d=u.indexOf(i[p],a+1),v=u.indexOf(r[p],a+1);c=d>=0?v<0||d<v?d:v:v;if(c<0)continue e;h=c-a-1,h>0&&(a===-1&&(l+=10),l+=h),f|=1<<c,a=c}o.matchMask=f,o.exactMatch=l?0:1,o.score=(o.score||0)-l,n.push(o)}return n}}).call(l.prototype),t.Autocomplete=f,t.FilteredList=l}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/edit_session","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom"],function(e,t,n){var r=e("../edit_session").EditSession,i=e("../virtual_renderer").VirtualRenderer,s=e("../editor").Editor,o=e("../range").Range,u=e("../lib/event"),a=e("../lib/lang"),f=e("../lib/dom"),l=function(e){var t=new i(e);t.$maxLines=4;var n=new s(t);return n.setHighlightActiveLine(!1),n.setShowPrintMargin(!1),n.renderer.setShowGutter(!1),n.renderer.setHighlightGutterLine(!1),n.$mouseHandler.$focusWaitTimout=0,n},c=function(e){var t=f.createElement("div"),n=new l(t);e&&e.appendChild(t),t.style.display="none",n.renderer.content.style.cursor="default",n.renderer.setStyle("ace_autocomplete"),n.setOption("displayIndentGuides",!1);var r=function(){};n.focus=r,n.$isFocused=!0,n.renderer.$cursorLayer.restartTimer=r,n.renderer.$cursorLayer.element.style.opacity=0,n.renderer.$maxLines=8,n.renderer.$keepTextAreaAtCursor=!1,n.setHighlightActiveLine(!1),n.session.highlight(""),n.session.$searchHighlight.clazz="ace_highlight-marker",n.on("mousedown",function(e){var t=e.getDocumentPosition();n.selection.moveToPosition(t),c.start.row=c.end.row=t.row,e.stop()});var i,s=new o(-1,0,-1,Infinity),c=new o(-1,0,-1,Infinity);c.id=n.session.addMarker(c,"ace_active-line","fullLine"),n.setSelectOnHover=function(e){e?s.id&&(n.session.removeMarker(s.id),s.id=null):s.id=n.session.addMarker(s,"ace_line-hover","fullLine")},n.setSelectOnHover(!1),n.on("mousemove",function(e){if(!i){i=e;return}if(i.x==e.x&&i.y==e.y)return;i=e,i.scrollTop=n.renderer.scrollTop;var t=i.getDocumentPosition().row;s.start.row!=t&&(s.id||n.setRow(t),p(t))}),n.renderer.on("beforeRender",function(){if(i&&s.start.row!=-1){i.$pos=null;var e=i.getDocumentPosition().row;s.id||n.setRow(e),p(e,!0)}}),n.renderer.on("afterRender",function(){var e=n.getRow(),t=n.renderer.$textLayer,r=t.element.childNodes[e-t.config.firstRow];if(r==t.selectedNode)return;t.selectedNode&&f.removeCssClass(t.selectedNode,"ace_selected"),t.selectedNode=r,r&&f.addCssClass(r,"ace_selected")});var h=function(){p(-1)},p=function(e,t){e!==s.start.row&&(s.start.row=s.end.row=e,t||n.session._emit("changeBackMarker"),n._emit("changeHoverMarker"))};n.getHoveredRow=function(){return s.start.row},u.addListener(n.container,"mouseout",h),n.on("hide",h),n.on("changeSelection",h),n.session.doc.getLength=function(){return n.data.length},n.session.doc.getLine=function(e){var t=n.data[e];return typeof t=="string"?t:t&&t.value||""};var d=n.session.bgTokenizer;return d.$tokenizeRow=function(e){var t=n.data[e],r=[];if(!t)return r;typeof t=="string"&&(t={value:t}),t.caption||(t.caption=t.value);var i=-1,s,o;for(var e=0;e<t.caption.length;e++)o=t.caption[e],s=t.matchMask&1<<e?1:0,i!==s?(r.push({type:t.className||""+(s?"completion-highlight":""),value:o}),i=s):r[r.length-1].value+=o;if(t.meta){var u=n.renderer.$size.scrollerWidth/n.renderer.layerConfig.characterWidth;t.meta.length+t.caption.length<u-2&&r.push({type:"rightAlignedText",value:t.meta})}return r},d.$updateOnChange=r,d.start=r,n.session.$computeWidth=function(){return this.screenWidth=0},n.isOpen=!1,n.isTopdown=!1,n.data=[],n.setData=function(e){n.data=e||[],n.setValue(a.stringRepeat("\n",e.length),-1),n.setRow(0)},n.getData=function(e){return n.data[e]},n.getRow=function(){return c.start.row},n.setRow=function(e){e=Math.max(-1,Math.min(this.data.length,e)),c.start.row!=e&&(n.selection.clearSelection(),c.start.row=c.end.row=e||0,n.session._emit("changeBackMarker"),n.moveCursorTo(e||0,0),n.isOpen&&n._signal("select"))},n.on("changeSelection",function(){n.isOpen&&n.setRow(n.selection.lead.row)}),n.hide=function(){this.container.style.display="none",this._signal("hide"),n.isOpen=!1},n.show=function(e,t,r){var s=this.container,o=window.innerHeight,u=window.innerWidth,a=this.renderer,f=a.$maxLines*t*1.4,l=e.top+this.$borderSize;l+f>o-t&&!r?(s.style.top="",s.style.bottom=o-l+"px",n.isTopdown=!1):(l+=t,s.style.top=l+"px",s.style.bottom="",n.isTopdown=!0),s.style.display="",this.renderer.$textLayer.checkForSizeChanges();var c=e.left;c+s.offsetWidth>u&&(c=u-s.offsetWidth),s.style.left=c+"px",this._signal("show"),i=null,n.isOpen=!0},n.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},n.$imageSize=0,n.$borderSize=1,n};f.importCssString(".ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {    background-color: #CAD6FA;    z-index: 1;}.ace_editor.ace_autocomplete .ace_line-hover {    border: 1px solid #abbffe;    margin-top: -1px;    background: rgba(233,233,253,0.4);}.ace_editor.ace_autocomplete .ace_line-hover {    position: absolute;    z-index: 2;}.ace_editor.ace_autocomplete .ace_scroller {   background: none;   border: none;   box-shadow: none;}.ace_rightAlignedText {    color: gray;    display: inline-block;    position: absolute;    right: 4px;    text-align: right;    z-index: -1;}.ace_editor.ace_autocomplete .ace_completion-highlight{    color: #000;    text-shadow: 0 0 0.01em;}.ace_editor.ace_autocomplete {    width: 280px;    z-index: 200000;    background: #fbfbfb;    color: #444;    border: 1px lightgray solid;    position: fixed;    box-shadow: 2px 3px 5px rgba(0,0,0,.2);    line-height: 1.4;}"),t.AcePopup=c}),ace.define("ace/autocomplete/util",["require","exports","module"],function(e,t,n){t.parForEach=function(e,t,n){var r=0,i=e.length;i===0&&n();for(var s=0;s<i;s++)t(e[s],function(e,t){r++,r===i&&n(e,t)})};var r=/[a-zA-Z_0-9\$\-\u00A2-\uFFFF]/;t.retrievePrecedingIdentifier=function(e,t,n){n=n||r;var i=[];for(var s=t-1;s>=0;s--){if(!n.test(e[s]))break;i.push(e[s])}return i.reverse().join("")},t.retrieveFollowingIdentifier=function(e,t,n){n=n||r;var i=[];for(var s=t;s<e.length;s++){if(!n.test(e[s]))break;i.push(e[s])}return i}}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(e,t,n){function s(e,t){var n=e.getTextRange(r.fromPoints({row:0,column:0},t));return n.split(i).length-1}function o(e,t){var n=s(e,t),r=e.getValue().split(i),o=Object.create(null),u=r[n];return r.forEach(function(e,t){if(!e||e===u)return;var i=Math.abs(n-t),s=r.length-i;o[e]?o[e]=Math.max(s,o[e]):o[e]=s}),o}var r=e("../range").Range,i=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;t.getCompletions=function(e,t,n,r,i){var s=o(t,n,r),u=Object.keys(s);i(null,u.map(function(e){return{name:e,value:e,score:s[e],meta:"local"}}))}}),function(){ace.require(["ace/ext/language_tools"],function(){})}()
\ No newline at end of file
diff --git a/app/assets/lib/ace/ext-linking.js b/app/assets/lib/ace/ext-linking.js
new file mode 100644
index 000000000..8b7fc3af5
--- /dev/null
+++ b/app/assets/lib/ace/ext-linking.js
@@ -0,0 +1 @@
+ace.define("ace/ext/linking",["require","exports","module","ace/editor","ace/config"],function(e,t,n){function i(e){var t=e.editor,n=e.getAccelKey();if(n){var t=e.editor,r=e.getDocumentPosition(),i=t.session,s=i.getTokenAt(r.row,r.column);t._emit("linkHover",{position:r,token:s})}}function s(e){var t=e.getAccelKey(),n=e.getButton();if(n==0&&t){var r=e.editor,i=e.getDocumentPosition(),s=r.session,o=s.getTokenAt(i.row,i.column);r._emit("linkClick",{position:i,token:o})}}var r=e("ace/editor").Editor;e("../config").defineOptions(r.prototype,"editor",{enableLinking:{set:function(e){e?(this.on("click",s),this.on("mousemove",i)):(this.off("click",s),this.off("mousemove",i))},value:!1}})}),function(){ace.require(["ace/ext/linking"],function(){})}()
\ No newline at end of file
diff --git a/app/assets/lib/ace/ext-modelist.js b/app/assets/lib/ace/ext-modelist.js
index 66a9f5402..b74eae87e 100644
--- a/app/assets/lib/ace/ext-modelist.js
+++ b/app/assets/lib/ace/ext-modelist.js
@@ -1 +1 @@
-ace.define("ace/ext/modelist",["require","exports","module"],function(e,t,n){function i(e){var t=a.text,n=e.split(/[\/\\]/).pop();for(var i=0;i<r.length;i++)if(r[i].supportsFile(n)){t=r[i];break}return t}var r=[],s=function(e,t,n){this.name=e,this.caption=t,this.mode="ace/mode/"+e,this.extensions=n;if(/\^/.test(n))var r=n.replace(/\|(\^)?/g,function(e,t){return"$|"+(t?"^":"^.*\\.")})+"$";else var r="^.*\\.("+n+")$";this.extRe=new RegExp(r,"gi")};s.prototype.supportsFile=function(e){return e.match(this.extRe)};var o={ABAP:["abap"],ActionScript:["as"],ADA:["ada|adb"],AsciiDoc:["asciidoc"],Assembly_x86:["asm"],AutoHotKey:["ahk"],BatchFile:["bat|cmd"],C9Search:["c9search_results"],C_Cpp:["cpp|c|cc|cxx|h|hh|hpp"],Clojure:["clj"],Cobol:["CBL|COB"],coffee:["coffee|cf|cson|^Cakefile"],ColdFusion:["cfm"],CSharp:["cs"],CSS:["css"],Curly:["curly"],D:["d|di"],Dart:["dart"],Diff:["diff|patch"],Dot:["dot"],Erlang:["erl|hrl"],EJS:["ejs"],Forth:["frt|fs|ldr"],FTL:["ftl"],Glsl:["glsl|frag|vert"],golang:["go"],Groovy:["groovy"],HAML:["haml"],Handlebars:["hbs|handlebars|tpl|mustache"],Haskell:["hs"],haXe:["hx"],HTML:["html|htm|xhtml"],HTML_Ruby:["erb|rhtml|html.erb"],INI:["ini|conf|cfg|prefs"],Jack:["jack"],Jade:["jade"],Java:["java"],JavaScript:["js|jsm"],JSON:["json"],JSONiq:["jq"],JSP:["jsp"],JSX:["jsx"],Julia:["jl"],LaTeX:["tex|latex|ltx|bib"],LESS:["less"],Liquid:["liquid"],Lisp:["lisp"],LiveScript:["ls"],LogiQL:["logic|lql"],LSL:["lsl"],Lua:["lua"],LuaPage:["lp"],Lucene:["lucene"],Makefile:["^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make"],MATLAB:["matlab"],Markdown:["md|markdown"],MySQL:["mysql"],MUSHCode:["mc|mush"],Nix:["nix"],ObjectiveC:["m|mm"],OCaml:["ml|mli"],Pascal:["pas|p"],Perl:["pl|pm"],pgSQL:["pgsql"],PHP:["php|phtml"],Powershell:["ps1"],Prolog:["plg|prolog"],Properties:["properties"],Protobuf:["proto"],Python:["py"],R:["r"],RDoc:["Rd"],RHTML:["Rhtml"],Ruby:["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"],Rust:["rs"],SASS:["sass"],SCAD:["scad"],Scala:["scala"],Scheme:["scm|rkt"],SCSS:["scss"],SH:["sh|bash|^.bashrc"],SJS:["sjs"],Space:["space"],snippets:["snippets"],Soy_Template:["soy"],SQL:["sql"],Stylus:["styl|stylus"],SVG:["svg"],Tcl:["tcl"],Tex:["tex"],Text:["txt"],Textile:["textile"],Toml:["toml"],Twig:["twig"],Typescript:["ts|typescript|str"],VBScript:["vbs"],Velocity:["vm"],Verilog:["v|vh|sv|svh"],XML:["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl"],XQuery:["xq"],YAML:["yaml|yml"]},u={ObjectiveC:"Objective-C",CSharp:"C#",golang:"Go",C_Cpp:"C/C++",coffee:"CoffeeScript",HTML_Ruby:"HTML (Ruby)",FTL:"FreeMarker"},a={};for(var f in o){var l=o[f],c=u[f]||f,h=f.toLowerCase(),p=new s(h,c,l[0]);a[h]=p,r.push(p)}n.exports={getModeForPath:i,modes:r,modesByName:a}})
\ No newline at end of file
+ace.define("ace/ext/modelist",["require","exports","module"],function(e,t,n){function i(e){var t=a.text,n=e.split(/[\/\\]/).pop();for(var i=0;i<r.length;i++)if(r[i].supportsFile(n)){t=r[i];break}return t}var r=[],s=function(e,t,n){this.name=e,this.caption=t,this.mode="ace/mode/"+e,this.extensions=n;if(/\^/.test(n))var r=n.replace(/\|(\^)?/g,function(e,t){return"$|"+(t?"^":"^.*\\.")})+"$";else var r="^.*\\.("+n+")$";this.extRe=new RegExp(r,"gi")};s.prototype.supportsFile=function(e){return e.match(this.extRe)};var o={ABAP:["abap"],ActionScript:["as"],ADA:["ada|adb"],Apache_Conf:["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"],AsciiDoc:["asciidoc"],Assembly_x86:["asm"],AutoHotKey:["ahk"],BatchFile:["bat|cmd"],C9Search:["c9search_results"],C_Cpp:["cpp|c|cc|cxx|h|hh|hpp"],Cirru:["cirru|cr"],Clojure:["clj"],Cobol:["CBL|COB"],coffee:["coffee|cf|cson|^Cakefile"],ColdFusion:["cfm"],CSharp:["cs"],CSS:["css"],Curly:["curly"],D:["d|di"],Dart:["dart"],Diff:["diff|patch"],Dockerfile:["^Dockerfile"],Dot:["dot"],Erlang:["erl|hrl"],EJS:["ejs"],Forth:["frt|fs|ldr"],FTL:["ftl"],Gherkin:["feature"],Glsl:["glsl|frag|vert"],golang:["go"],Groovy:["groovy"],HAML:["haml"],Handlebars:["hbs|handlebars|tpl|mustache"],Haskell:["hs"],haXe:["hx"],HTML:["html|htm|xhtml"],HTML_Ruby:["erb|rhtml|html.erb"],INI:["ini|conf|cfg|prefs"],Jack:["jack"],Jade:["jade"],Java:["java"],JavaScript:["js|jsm"],JSON:["json"],JSONiq:["jq"],JSP:["jsp"],JSX:["jsx"],Julia:["jl"],LaTeX:["tex|latex|ltx|bib"],LESS:["less"],Liquid:["liquid"],Lisp:["lisp"],LiveScript:["ls"],LogiQL:["logic|lql"],LSL:["lsl"],Lua:["lua"],LuaPage:["lp"],Lucene:["lucene"],Makefile:["^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make"],MATLAB:["matlab"],Markdown:["md|markdown"],MEL:["mel"],MySQL:["mysql"],MUSHCode:["mc|mush"],Nix:["nix"],ObjectiveC:["m|mm"],OCaml:["ml|mli"],Pascal:["pas|p"],Perl:["pl|pm"],pgSQL:["pgsql"],PHP:["php|phtml"],Powershell:["ps1"],Prolog:["plg|prolog"],Properties:["properties"],Protobuf:["proto"],Python:["py"],R:["r"],RDoc:["Rd"],RHTML:["Rhtml"],Ruby:["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"],Rust:["rs"],SASS:["sass"],SCAD:["scad"],Scala:["scala"],Smarty:["smarty|tpl"],Scheme:["scm|rkt"],SCSS:["scss"],SH:["sh|bash|^.bashrc"],SJS:["sjs"],Space:["space"],snippets:["snippets"],Soy_Template:["soy"],SQL:["sql"],Stylus:["styl|stylus"],SVG:["svg"],Tcl:["tcl"],Tex:["tex"],Text:["txt"],Textile:["textile"],Toml:["toml"],Twig:["twig"],Typescript:["ts|typescript|str"],Vala:["vala"],VBScript:["vbs"],Velocity:["vm"],Verilog:["v|vh|sv|svh"],XML:["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl"],XQuery:["xq"],YAML:["yaml|yml"]},u={ObjectiveC:"Objective-C",CSharp:"C#",golang:"Go",C_Cpp:"C/C++",coffee:"CoffeeScript",HTML_Ruby:"HTML (Ruby)",FTL:"FreeMarker"},a={};for(var f in o){var l=o[f],c=(u[f]||f).replace(/_/g," "),h=f.toLowerCase(),p=new s(h,c,l[0]);a[h]=p,r.push(p)}n.exports={getModeForPath:i,modes:r,modesByName:a}}),function(){ace.require(["ace/ext/modelist"],function(){})}()
\ No newline at end of file
diff --git a/app/assets/lib/ace/ext-old_ie.js b/app/assets/lib/ace/ext-old_ie.js
index aa7e0f63a..27cfeb9a8 100644
--- a/app/assets/lib/ace/ext-old_ie.js
+++ b/app/assets/lib/ace/ext-old_ie.js
@@ -1 +1 @@
-ace.define("ace/ext/old_ie",["require","exports","module","ace/lib/useragent","ace/tokenizer","ace/ext/searchbox"],function(require,exports,module){function patch(obj,name,regexp,replacement){eval("obj['"+name+"']="+obj[name].toString().replace(regexp,replacement))}var MAX_TOKEN_COUNT=1e3,useragent=require("../lib/useragent"),TokenizerModule=require("../tokenizer");useragent.isIE&&useragent.isIE<10&&window.top.document.compatMode==="BackCompat"&&(useragent.isOldIE=!0);if(typeof document!="undefined"&&!document.documentElement.querySelector){useragent.isOldIE=!0;var qs=function(e,t){if(t.charAt(0)==".")var n=t.slice(1);else var r=t.match(/(\w+)=(\w+)/),i=r&&r[1],s=r&&r[2];for(var o=0;o<e.all.length;o++){var u=e.all[o];if(n){if(u.className.indexOf(n)!=-1)return u}else if(i&&u.getAttribute(i)==s)return u}},sb=require("./searchbox").SearchBox.prototype;patch(sb,"$initElements",/([^\s=]*).querySelector\((".*?")\)/g,"qs($1, $2)")}var compliantExecNpcg=/()??/.exec("")[1]===undefined;if(compliantExecNpcg)return;var proto=TokenizerModule.Tokenizer.prototype;TokenizerModule.Tokenizer_orig=TokenizerModule.Tokenizer,proto.getLineTokens_orig=proto.getLineTokens,patch(TokenizerModule,"Tokenizer","ruleRegExps.push(adjustedregex);\n",function(e){return e+'        if (state[i].next && RegExp(adjustedregex).test(""))\n            rule._qre = RegExp(adjustedregex, "g");\n        '}),TokenizerModule.Tokenizer.prototype=proto,patch(proto,"getLineTokens",/if \(match\[i \+ 1\] === undefined\)\s*continue;/,"if (!match[i + 1]) {\n        if (value)continue;\n        var qre = state[mapping[i]]._qre;\n        if (!qre) continue;\n        qre.lastIndex = lastIndex;\n        if (!qre.exec(line) || qre.lastIndex != lastIndex)\n            continue;\n    }"),useragent.isOldIE=!0}),ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/keyboard/hash_handler","ace/lib/keys"],function(e,t,n){var r=e("../lib/dom"),i=e("../lib/lang"),s=e("../lib/event"),o="/* ------------------------------------------------------------------------------------------* Editor Search Form* --------------------------------------------------------------------------------------- */.ace_search {background-color: #ddd;border: 1px solid #cbcbcb;border-top: 0 none;max-width: 297px;overflow: hidden;margin: 0;padding: 4px;padding-right: 6px;padding-bottom: 0;position: absolute;top: 0px;z-index: 99;}.ace_search.left {border-left: 0 none;border-radius: 0px 0px 5px 0px;left: 0;}.ace_search.right {border-radius: 0px 0px 0px 5px;border-right: 0 none;right: 0;}.ace_search_form, .ace_replace_form {border-radius: 3px;border: 1px solid #cbcbcb;float: left;margin-bottom: 4px;overflow: hidden;}.ace_search_form.ace_nomatch {outline: 1px solid red;}.ace_search_field {background-color: white;border-right: 1px solid #cbcbcb;border: 0 none;-webkit-box-sizing: border-box;-moz-box-sizing: border-box;box-sizing: border-box;display: block;float: left;height: 22px;outline: 0;padding: 0 7px;width: 214px;margin: 0;}.ace_searchbtn,.ace_replacebtn {background: #fff;border: 0 none;border-left: 1px solid #dcdcdc;cursor: pointer;display: block;float: left;height: 22px;margin: 0;padding: 0;position: relative;}.ace_searchbtn:last-child,.ace_replacebtn:last-child {border-top-right-radius: 3px;border-bottom-right-radius: 3px;}.ace_searchbtn:disabled {background: none;cursor: default;}.ace_searchbtn {background-position: 50% 50%;background-repeat: no-repeat;width: 27px;}.ace_searchbtn.prev {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADFJREFUeNpiSU1NZUAC/6E0I0yACYskCpsJiySKIiY0SUZk40FyTEgCjGgKwTRAgAEAQJUIPCE+qfkAAAAASUVORK5CYII=);    }.ace_searchbtn.next {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADRJREFUeNpiTE1NZQCC/0DMyIAKwGJMUAYDEo3M/s+EpvM/mkKwCQxYjIeLMaELoLMBAgwAU7UJObTKsvAAAAAASUVORK5CYII=);    }.ace_searchbtn_close {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;border-radius: 50%;border: 0 none;color: #656565;cursor: pointer;display: block;float: right;font-family: Arial;font-size: 16px;height: 14px;line-height: 16px;margin: 5px 1px 9px 5px;padding: 0;text-align: center;width: 14px;}.ace_searchbtn_close:hover {background-color: #656565;background-position: 50% 100%;color: white;}.ace_replacebtn.prev {width: 54px}.ace_replacebtn.next {width: 27px}.ace_button {margin-left: 2px;cursor: pointer;-webkit-user-select: none;-moz-user-select: none;-o-user-select: none;-ms-user-select: none;user-select: none;overflow: hidden;opacity: 0.7;border: 1px solid rgba(100,100,100,0.23);padding: 1px;-moz-box-sizing: border-box;box-sizing:    border-box;color: black;}.ace_button:hover {background-color: #eee;opacity:1;}.ace_button:active {background-color: #ddd;}.ace_button.checked {border-color: #3399ff;opacity:1;}.ace_search_options{margin-bottom: 3px;text-align: right;-webkit-user-select: none;-moz-user-select: none;-o-user-select: none;-ms-user-select: none;user-select: none;}",u=e("../keyboard/hash_handler").HashHandler,a=e("../lib/keys");r.importCssString(o,"ace_searchbox");var f='<div class="ace_search right">    <button type="button" action="hide" class="ace_searchbtn_close"></button>    <div class="ace_search_form">        <input class="ace_search_field" placeholder="Search for" spellcheck="false"></input>        <button type="button" action="findNext" class="ace_searchbtn next"></button>        <button type="button" action="findPrev" class="ace_searchbtn prev"></button>    </div>    <div class="ace_replace_form">        <input class="ace_search_field" placeholder="Replace with" spellcheck="false"></input>        <button type="button" action="replaceAndFindNext" class="ace_replacebtn">Replace</button>        <button type="button" action="replaceAll" class="ace_replacebtn">All</button>    </div>    <div class="ace_search_options">        <span action="toggleRegexpMode" class="ace_button" title="RegExp Search">.*</span>        <span action="toggleCaseSensitive" class="ace_button" title="CaseSensitive Search">Aa</span>        <span action="toggleWholeWords" class="ace_button" title="Whole Word Search">\\b</span>    </div></div>'.replace(/>\s+/g,">"),l=function(e,t,n){var i=r.createElement("div");i.innerHTML=f,this.element=i.firstChild,this.$init(),this.setEditor(e)};(function(){this.setEditor=function(e){e.searchBox=this,e.container.appendChild(this.element),this.editor=e},this.$initElements=function(e){this.searchBox=e.querySelector(".ace_search_form"),this.replaceBox=e.querySelector(".ace_replace_form"),this.searchOptions=e.querySelector(".ace_search_options"),this.regExpOption=e.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=e.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=e.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field")},this.$init=function(){var e=this.element;this.$initElements(e);var t=this;s.addListener(e,"mousedown",function(e){setTimeout(function(){t.activeInput.focus()},0),s.stopPropagation(e)}),s.addListener(e,"click",function(e){var n=e.target||e.srcElement,r=n.getAttribute("action");r&&t[r]?t[r]():t.$searchBarKb.commands[r]&&t.$searchBarKb.commands[r].exec(t),s.stopPropagation(e)}),s.addCommandKeyListener(e,function(e,n,r){var i=a.keyCodeToString(r),o=t.$searchBarKb.findKeyCommand(n,i);o&&o.exec&&(o.exec(t),s.stopEvent(e))}),this.$onChange=i.delayedCall(function(){t.find(!1,!1)}),s.addListener(this.searchInput,"input",function(){t.$onChange.schedule(20)}),s.addListener(this.searchInput,"focus",function(){t.activeInput=t.searchInput,t.searchInput.value&&t.highlight()}),s.addListener(this.replaceInput,"focus",function(){t.activeInput=t.replaceInput,t.searchInput.value&&t.highlight()})},this.$closeSearchBarKb=new u([{bindKey:"Esc",name:"closeSearchBar",exec:function(e){e.searchBox.hide()}}]),this.$searchBarKb=new u,this.$searchBarKb.bindKeys({"Ctrl-f|Command-f|Ctrl-H|Command-Option-F":function(e){var t=e.isReplace=!e.isReplace;e.replaceBox.style.display=t?"":"none",e[t?"replaceInput":"searchInput"].focus()},"Ctrl-G|Command-G":function(e){e.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(e){e.findPrev()},esc:function(e){setTimeout(function(){e.hide()})},Return:function(e){e.activeInput==e.replaceInput&&e.replace(),e.findNext()},"Shift-Return":function(e){e.activeInput==e.replaceInput&&e.replace(),e.findPrev()},Tab:function(e){(e.activeInput==e.replaceInput?e.searchInput:e.replaceInput).focus()}}),this.$searchBarKb.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(e){e.regExpOption.checked=!e.regExpOption.checked,e.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(e){e.caseSensitiveOption.checked=!e.caseSensitiveOption.checked,e.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(e){e.wholeWordOption.checked=!e.wholeWordOption.checked,e.$syncOptions()}}]),this.$syncOptions=function(){r.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),r.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),r.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked),this.find(!1,!1)},this.highlight=function(e){this.editor.session.highlight(e||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},this.find=function(e,t){var n=this.editor.find(this.searchInput.value,{skipCurrent:e,backwards:t,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),i=!n&&this.searchInput.value;r.setCssClass(this.searchBox,"ace_nomatch",i),this.editor._emit("findSearchBox",{match:!i}),this.highlight()},this.findNext=function(){this.find(!0,!1)},this.findPrev=function(){this.find(!0,!0)},this.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},this.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},this.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},this.hide=function(){this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},this.show=function(e,t){this.element.style.display="",this.replaceBox.style.display=t?"":"none",this.isReplace=t,e&&(this.searchInput.value=e),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb)}}).call(l.prototype),t.SearchBox=l,t.Search=function(e,t){var n=e.searchBox||new l(e);n.show(e.session.getTextRange(),t)}})
\ No newline at end of file
+ace.define("ace/ext/old_ie",["require","exports","module","ace/lib/useragent","ace/tokenizer","ace/ext/searchbox","ace/mode/text"],function(require,exports,module){function patch(obj,name,regexp,replacement){eval("obj['"+name+"']="+obj[name].toString().replace(regexp,replacement))}var MAX_TOKEN_COUNT=1e3,useragent=require("../lib/useragent"),TokenizerModule=require("../tokenizer");useragent.isIE&&useragent.isIE<10&&window.top.document.compatMode==="BackCompat"&&(useragent.isOldIE=!0);if(typeof document!="undefined"&&!document.documentElement.querySelector){useragent.isOldIE=!0;var qs=function(e,t){if(t.charAt(0)==".")var n=t.slice(1);else var r=t.match(/(\w+)=(\w+)/),i=r&&r[1],s=r&&r[2];for(var o=0;o<e.all.length;o++){var u=e.all[o];if(n){if(u.className.indexOf(n)!=-1)return u}else if(i&&u.getAttribute(i)==s)return u}},sb=require("./searchbox").SearchBox.prototype;patch(sb,"$initElements",/([^\s=]*).querySelector\((".*?")\)/g,"qs($1, $2)")}var compliantExecNpcg=/()??/.exec("")[1]===undefined;if(compliantExecNpcg)return;var proto=TokenizerModule.Tokenizer.prototype;TokenizerModule.Tokenizer_orig=TokenizerModule.Tokenizer,proto.getLineTokens_orig=proto.getLineTokens,patch(TokenizerModule,"Tokenizer","ruleRegExps.push(adjustedregex);\n",function(e){return e+'        if (state[i].next && RegExp(adjustedregex).test(""))\n            rule._qre = RegExp(adjustedregex, "g");\n        '}),TokenizerModule.Tokenizer.prototype=proto,patch(proto,"getLineTokens",/if \(match\[i \+ 1\] === undefined\)\s*continue;/,"if (!match[i + 1]) {\n        if (value)continue;\n        var qre = state[mapping[i]]._qre;\n        if (!qre) continue;\n        qre.lastIndex = lastIndex;\n        if (!qre.exec(line) || qre.lastIndex != lastIndex)\n            continue;\n    }"),patch(require("../mode/text").Mode.prototype,"getTokenizer",/Tokenizer/,"TokenizerModule.Tokenizer"),useragent.isOldIE=!0}),ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/keyboard/hash_handler","ace/lib/keys"],function(e,t,n){var r=e("../lib/dom"),i=e("../lib/lang"),s=e("../lib/event"),o="/* ------------------------------------------------------------------------------------------* Editor Search Form* --------------------------------------------------------------------------------------- */.ace_search {background-color: #ddd;border: 1px solid #cbcbcb;border-top: 0 none;max-width: 297px;overflow: hidden;margin: 0;padding: 4px;padding-right: 6px;padding-bottom: 0;position: absolute;top: 0px;z-index: 99;white-space: normal;}.ace_search.left {border-left: 0 none;border-radius: 0px 0px 5px 0px;left: 0;}.ace_search.right {border-radius: 0px 0px 0px 5px;border-right: 0 none;right: 0;}.ace_search_form, .ace_replace_form {border-radius: 3px;border: 1px solid #cbcbcb;float: left;margin-bottom: 4px;overflow: hidden;}.ace_search_form.ace_nomatch {outline: 1px solid red;}.ace_search_field {background-color: white;border-right: 1px solid #cbcbcb;border: 0 none;-webkit-box-sizing: border-box;-moz-box-sizing: border-box;box-sizing: border-box;display: block;float: left;height: 22px;outline: 0;padding: 0 7px;width: 214px;margin: 0;}.ace_searchbtn,.ace_replacebtn {background: #fff;border: 0 none;border-left: 1px solid #dcdcdc;cursor: pointer;display: block;float: left;height: 22px;margin: 0;padding: 0;position: relative;}.ace_searchbtn:last-child,.ace_replacebtn:last-child {border-top-right-radius: 3px;border-bottom-right-radius: 3px;}.ace_searchbtn:disabled {background: none;cursor: default;}.ace_searchbtn {background-position: 50% 50%;background-repeat: no-repeat;width: 27px;}.ace_searchbtn.prev {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADFJREFUeNpiSU1NZUAC/6E0I0yACYskCpsJiySKIiY0SUZk40FyTEgCjGgKwTRAgAEAQJUIPCE+qfkAAAAASUVORK5CYII=);    }.ace_searchbtn.next {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADRJREFUeNpiTE1NZQCC/0DMyIAKwGJMUAYDEo3M/s+EpvM/mkKwCQxYjIeLMaELoLMBAgwAU7UJObTKsvAAAAAASUVORK5CYII=);    }.ace_searchbtn_close {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;border-radius: 50%;border: 0 none;color: #656565;cursor: pointer;display: block;float: right;font-family: Arial;font-size: 16px;height: 14px;line-height: 16px;margin: 5px 1px 9px 5px;padding: 0;text-align: center;width: 14px;}.ace_searchbtn_close:hover {background-color: #656565;background-position: 50% 100%;color: white;}.ace_replacebtn.prev {width: 54px}.ace_replacebtn.next {width: 27px}.ace_button {margin-left: 2px;cursor: pointer;-webkit-user-select: none;-moz-user-select: none;-o-user-select: none;-ms-user-select: none;user-select: none;overflow: hidden;opacity: 0.7;border: 1px solid rgba(100,100,100,0.23);padding: 1px;-moz-box-sizing: border-box;box-sizing:    border-box;color: black;}.ace_button:hover {background-color: #eee;opacity:1;}.ace_button:active {background-color: #ddd;}.ace_button.checked {border-color: #3399ff;opacity:1;}.ace_search_options{margin-bottom: 3px;text-align: right;-webkit-user-select: none;-moz-user-select: none;-o-user-select: none;-ms-user-select: none;user-select: none;}",u=e("../keyboard/hash_handler").HashHandler,a=e("../lib/keys");r.importCssString(o,"ace_searchbox");var f='<div class="ace_search right">    <button type="button" action="hide" class="ace_searchbtn_close"></button>    <div class="ace_search_form">        <input class="ace_search_field" placeholder="Search for" spellcheck="false"></input>        <button type="button" action="findNext" class="ace_searchbtn next"></button>        <button type="button" action="findPrev" class="ace_searchbtn prev"></button>    </div>    <div class="ace_replace_form">        <input class="ace_search_field" placeholder="Replace with" spellcheck="false"></input>        <button type="button" action="replaceAndFindNext" class="ace_replacebtn">Replace</button>        <button type="button" action="replaceAll" class="ace_replacebtn">All</button>    </div>    <div class="ace_search_options">        <span action="toggleRegexpMode" class="ace_button" title="RegExp Search">.*</span>        <span action="toggleCaseSensitive" class="ace_button" title="CaseSensitive Search">Aa</span>        <span action="toggleWholeWords" class="ace_button" title="Whole Word Search">\\b</span>    </div></div>'.replace(/>\s+/g,">"),l=function(e,t,n){var i=r.createElement("div");i.innerHTML=f,this.element=i.firstChild,this.$init(),this.setEditor(e)};(function(){this.setEditor=function(e){e.searchBox=this,e.container.appendChild(this.element),this.editor=e},this.$initElements=function(e){this.searchBox=e.querySelector(".ace_search_form"),this.replaceBox=e.querySelector(".ace_replace_form"),this.searchOptions=e.querySelector(".ace_search_options"),this.regExpOption=e.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=e.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=e.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field")},this.$init=function(){var e=this.element;this.$initElements(e);var t=this;s.addListener(e,"mousedown",function(e){setTimeout(function(){t.activeInput.focus()},0),s.stopPropagation(e)}),s.addListener(e,"click",function(e){var n=e.target||e.srcElement,r=n.getAttribute("action");r&&t[r]?t[r]():t.$searchBarKb.commands[r]&&t.$searchBarKb.commands[r].exec(t),s.stopPropagation(e)}),s.addCommandKeyListener(e,function(e,n,r){var i=a.keyCodeToString(r),o=t.$searchBarKb.findKeyCommand(n,i);o&&o.exec&&(o.exec(t),s.stopEvent(e))}),this.$onChange=i.delayedCall(function(){t.find(!1,!1)}),s.addListener(this.searchInput,"input",function(){t.$onChange.schedule(20)}),s.addListener(this.searchInput,"focus",function(){t.activeInput=t.searchInput,t.searchInput.value&&t.highlight()}),s.addListener(this.replaceInput,"focus",function(){t.activeInput=t.replaceInput,t.searchInput.value&&t.highlight()})},this.$closeSearchBarKb=new u([{bindKey:"Esc",name:"closeSearchBar",exec:function(e){e.searchBox.hide()}}]),this.$searchBarKb=new u,this.$searchBarKb.bindKeys({"Ctrl-f|Command-f|Ctrl-H|Command-Option-F":function(e){var t=e.isReplace=!e.isReplace;e.replaceBox.style.display=t?"":"none",e[t?"replaceInput":"searchInput"].focus()},"Ctrl-G|Command-G":function(e){e.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(e){e.findPrev()},esc:function(e){setTimeout(function(){e.hide()})},Return:function(e){e.activeInput==e.replaceInput&&e.replace(),e.findNext()},"Shift-Return":function(e){e.activeInput==e.replaceInput&&e.replace(),e.findPrev()},Tab:function(e){(e.activeInput==e.replaceInput?e.searchInput:e.replaceInput).focus()}}),this.$searchBarKb.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(e){e.regExpOption.checked=!e.regExpOption.checked,e.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(e){e.caseSensitiveOption.checked=!e.caseSensitiveOption.checked,e.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(e){e.wholeWordOption.checked=!e.wholeWordOption.checked,e.$syncOptions()}}]),this.$syncOptions=function(){r.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),r.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),r.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked),this.find(!1,!1)},this.highlight=function(e){this.editor.session.highlight(e||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},this.find=function(e,t){var n=this.editor.find(this.searchInput.value,{skipCurrent:e,backwards:t,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),i=!n&&this.searchInput.value;r.setCssClass(this.searchBox,"ace_nomatch",i),this.editor._emit("findSearchBox",{match:!i}),this.highlight()},this.findNext=function(){this.find(!0,!1)},this.findPrev=function(){this.find(!0,!0)},this.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},this.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},this.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},this.hide=function(){this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},this.show=function(e,t){this.element.style.display="",this.replaceBox.style.display=t?"":"none",this.isReplace=t,e&&(this.searchInput.value=e),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb)}}).call(l.prototype),t.SearchBox=l,t.Search=function(e,t){var n=e.searchBox||new l(e);n.show(e.session.getTextRange(),t)}}),function(){ace.require(["ace/ext/old_ie"],function(){})}()
\ No newline at end of file
diff --git a/app/assets/lib/ace/ext-prompt.js b/app/assets/lib/ace/ext-prompt.js
new file mode 100644
index 000000000..b4f0f2aea
--- /dev/null
+++ b/app/assets/lib/ace/ext-prompt.js
@@ -0,0 +1 @@
+ace.define("ace/ext/prompt",["require","exports","module","ace/lib/lang","ace/lib/dom","ace/lib/event","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/editor","ace/multi_select"],function(e,t,n){function c(e,t){var n=this.pixelToScreenCoordinates(e,t);return this.session.screenToDocumentPosition(Math.min(this.session.getScreenLength()-1,Math.max(n.row,0)),Math.max(n.column,0))}var r=e("../lib/lang"),i=e("ace/lib/dom"),s=e("ace/lib/event"),o=e("ace/edit_session").EditSession,u=e("ace/undomanager").UndoManager,a=e("ace/virtual_renderer").VirtualRenderer,f=e("ace/editor").Editor,l=e("ace/multi_select").MultiSelect;t.singleLineEditor=function(e){var t=new a;t.container.style.overflow="hidden",t.screenToTextCoordinates=c,t.setStyle("ace_one-line");var n=new f(t);return n.session.setUndoManager(new u),n.setOptions({showPrintMargin:!1,showGutter:!1,highlightGutterLine:!1,focusWaitTimout:0,maxLines:4}),n}}),function(){ace.require(["ace/ext/prompt"],function(){})}()
\ No newline at end of file
diff --git a/app/assets/lib/ace/ext-searchbox.js b/app/assets/lib/ace/ext-searchbox.js
index 21189d8c1..999eaacf0 100644
--- a/app/assets/lib/ace/ext-searchbox.js
+++ b/app/assets/lib/ace/ext-searchbox.js
@@ -1 +1 @@
-ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/keyboard/hash_handler","ace/lib/keys"],function(e,t,n){var r=e("../lib/dom"),i=e("../lib/lang"),s=e("../lib/event"),o="/* ------------------------------------------------------------------------------------------* Editor Search Form* --------------------------------------------------------------------------------------- */.ace_search {background-color: #ddd;border: 1px solid #cbcbcb;border-top: 0 none;max-width: 297px;overflow: hidden;margin: 0;padding: 4px;padding-right: 6px;padding-bottom: 0;position: absolute;top: 0px;z-index: 99;}.ace_search.left {border-left: 0 none;border-radius: 0px 0px 5px 0px;left: 0;}.ace_search.right {border-radius: 0px 0px 0px 5px;border-right: 0 none;right: 0;}.ace_search_form, .ace_replace_form {border-radius: 3px;border: 1px solid #cbcbcb;float: left;margin-bottom: 4px;overflow: hidden;}.ace_search_form.ace_nomatch {outline: 1px solid red;}.ace_search_field {background-color: white;border-right: 1px solid #cbcbcb;border: 0 none;-webkit-box-sizing: border-box;-moz-box-sizing: border-box;box-sizing: border-box;display: block;float: left;height: 22px;outline: 0;padding: 0 7px;width: 214px;margin: 0;}.ace_searchbtn,.ace_replacebtn {background: #fff;border: 0 none;border-left: 1px solid #dcdcdc;cursor: pointer;display: block;float: left;height: 22px;margin: 0;padding: 0;position: relative;}.ace_searchbtn:last-child,.ace_replacebtn:last-child {border-top-right-radius: 3px;border-bottom-right-radius: 3px;}.ace_searchbtn:disabled {background: none;cursor: default;}.ace_searchbtn {background-position: 50% 50%;background-repeat: no-repeat;width: 27px;}.ace_searchbtn.prev {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADFJREFUeNpiSU1NZUAC/6E0I0yACYskCpsJiySKIiY0SUZk40FyTEgCjGgKwTRAgAEAQJUIPCE+qfkAAAAASUVORK5CYII=);    }.ace_searchbtn.next {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADRJREFUeNpiTE1NZQCC/0DMyIAKwGJMUAYDEo3M/s+EpvM/mkKwCQxYjIeLMaELoLMBAgwAU7UJObTKsvAAAAAASUVORK5CYII=);    }.ace_searchbtn_close {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;border-radius: 50%;border: 0 none;color: #656565;cursor: pointer;display: block;float: right;font-family: Arial;font-size: 16px;height: 14px;line-height: 16px;margin: 5px 1px 9px 5px;padding: 0;text-align: center;width: 14px;}.ace_searchbtn_close:hover {background-color: #656565;background-position: 50% 100%;color: white;}.ace_replacebtn.prev {width: 54px}.ace_replacebtn.next {width: 27px}.ace_button {margin-left: 2px;cursor: pointer;-webkit-user-select: none;-moz-user-select: none;-o-user-select: none;-ms-user-select: none;user-select: none;overflow: hidden;opacity: 0.7;border: 1px solid rgba(100,100,100,0.23);padding: 1px;-moz-box-sizing: border-box;box-sizing:    border-box;color: black;}.ace_button:hover {background-color: #eee;opacity:1;}.ace_button:active {background-color: #ddd;}.ace_button.checked {border-color: #3399ff;opacity:1;}.ace_search_options{margin-bottom: 3px;text-align: right;-webkit-user-select: none;-moz-user-select: none;-o-user-select: none;-ms-user-select: none;user-select: none;}",u=e("../keyboard/hash_handler").HashHandler,a=e("../lib/keys");r.importCssString(o,"ace_searchbox");var f='<div class="ace_search right">    <button type="button" action="hide" class="ace_searchbtn_close"></button>    <div class="ace_search_form">        <input class="ace_search_field" placeholder="Search for" spellcheck="false"></input>        <button type="button" action="findNext" class="ace_searchbtn next"></button>        <button type="button" action="findPrev" class="ace_searchbtn prev"></button>    </div>    <div class="ace_replace_form">        <input class="ace_search_field" placeholder="Replace with" spellcheck="false"></input>        <button type="button" action="replaceAndFindNext" class="ace_replacebtn">Replace</button>        <button type="button" action="replaceAll" class="ace_replacebtn">All</button>    </div>    <div class="ace_search_options">        <span action="toggleRegexpMode" class="ace_button" title="RegExp Search">.*</span>        <span action="toggleCaseSensitive" class="ace_button" title="CaseSensitive Search">Aa</span>        <span action="toggleWholeWords" class="ace_button" title="Whole Word Search">\\b</span>    </div></div>'.replace(/>\s+/g,">"),l=function(e,t,n){var i=r.createElement("div");i.innerHTML=f,this.element=i.firstChild,this.$init(),this.setEditor(e)};(function(){this.setEditor=function(e){e.searchBox=this,e.container.appendChild(this.element),this.editor=e},this.$initElements=function(e){this.searchBox=e.querySelector(".ace_search_form"),this.replaceBox=e.querySelector(".ace_replace_form"),this.searchOptions=e.querySelector(".ace_search_options"),this.regExpOption=e.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=e.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=e.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field")},this.$init=function(){var e=this.element;this.$initElements(e);var t=this;s.addListener(e,"mousedown",function(e){setTimeout(function(){t.activeInput.focus()},0),s.stopPropagation(e)}),s.addListener(e,"click",function(e){var n=e.target||e.srcElement,r=n.getAttribute("action");r&&t[r]?t[r]():t.$searchBarKb.commands[r]&&t.$searchBarKb.commands[r].exec(t),s.stopPropagation(e)}),s.addCommandKeyListener(e,function(e,n,r){var i=a.keyCodeToString(r),o=t.$searchBarKb.findKeyCommand(n,i);o&&o.exec&&(o.exec(t),s.stopEvent(e))}),this.$onChange=i.delayedCall(function(){t.find(!1,!1)}),s.addListener(this.searchInput,"input",function(){t.$onChange.schedule(20)}),s.addListener(this.searchInput,"focus",function(){t.activeInput=t.searchInput,t.searchInput.value&&t.highlight()}),s.addListener(this.replaceInput,"focus",function(){t.activeInput=t.replaceInput,t.searchInput.value&&t.highlight()})},this.$closeSearchBarKb=new u([{bindKey:"Esc",name:"closeSearchBar",exec:function(e){e.searchBox.hide()}}]),this.$searchBarKb=new u,this.$searchBarKb.bindKeys({"Ctrl-f|Command-f|Ctrl-H|Command-Option-F":function(e){var t=e.isReplace=!e.isReplace;e.replaceBox.style.display=t?"":"none",e[t?"replaceInput":"searchInput"].focus()},"Ctrl-G|Command-G":function(e){e.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(e){e.findPrev()},esc:function(e){setTimeout(function(){e.hide()})},Return:function(e){e.activeInput==e.replaceInput&&e.replace(),e.findNext()},"Shift-Return":function(e){e.activeInput==e.replaceInput&&e.replace(),e.findPrev()},Tab:function(e){(e.activeInput==e.replaceInput?e.searchInput:e.replaceInput).focus()}}),this.$searchBarKb.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(e){e.regExpOption.checked=!e.regExpOption.checked,e.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(e){e.caseSensitiveOption.checked=!e.caseSensitiveOption.checked,e.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(e){e.wholeWordOption.checked=!e.wholeWordOption.checked,e.$syncOptions()}}]),this.$syncOptions=function(){r.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),r.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),r.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked),this.find(!1,!1)},this.highlight=function(e){this.editor.session.highlight(e||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},this.find=function(e,t){var n=this.editor.find(this.searchInput.value,{skipCurrent:e,backwards:t,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),i=!n&&this.searchInput.value;r.setCssClass(this.searchBox,"ace_nomatch",i),this.editor._emit("findSearchBox",{match:!i}),this.highlight()},this.findNext=function(){this.find(!0,!1)},this.findPrev=function(){this.find(!0,!0)},this.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},this.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},this.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},this.hide=function(){this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},this.show=function(e,t){this.element.style.display="",this.replaceBox.style.display=t?"":"none",this.isReplace=t,e&&(this.searchInput.value=e),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb)}}).call(l.prototype),t.SearchBox=l,t.Search=function(e,t){var n=e.searchBox||new l(e);n.show(e.session.getTextRange(),t)}})
\ No newline at end of file
+ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/keyboard/hash_handler","ace/lib/keys"],function(e,t,n){var r=e("../lib/dom"),i=e("../lib/lang"),s=e("../lib/event"),o="/* ------------------------------------------------------------------------------------------* Editor Search Form* --------------------------------------------------------------------------------------- */.ace_search {background-color: #ddd;border: 1px solid #cbcbcb;border-top: 0 none;max-width: 297px;overflow: hidden;margin: 0;padding: 4px;padding-right: 6px;padding-bottom: 0;position: absolute;top: 0px;z-index: 99;white-space: normal;}.ace_search.left {border-left: 0 none;border-radius: 0px 0px 5px 0px;left: 0;}.ace_search.right {border-radius: 0px 0px 0px 5px;border-right: 0 none;right: 0;}.ace_search_form, .ace_replace_form {border-radius: 3px;border: 1px solid #cbcbcb;float: left;margin-bottom: 4px;overflow: hidden;}.ace_search_form.ace_nomatch {outline: 1px solid red;}.ace_search_field {background-color: white;border-right: 1px solid #cbcbcb;border: 0 none;-webkit-box-sizing: border-box;-moz-box-sizing: border-box;box-sizing: border-box;display: block;float: left;height: 22px;outline: 0;padding: 0 7px;width: 214px;margin: 0;}.ace_searchbtn,.ace_replacebtn {background: #fff;border: 0 none;border-left: 1px solid #dcdcdc;cursor: pointer;display: block;float: left;height: 22px;margin: 0;padding: 0;position: relative;}.ace_searchbtn:last-child,.ace_replacebtn:last-child {border-top-right-radius: 3px;border-bottom-right-radius: 3px;}.ace_searchbtn:disabled {background: none;cursor: default;}.ace_searchbtn {background-position: 50% 50%;background-repeat: no-repeat;width: 27px;}.ace_searchbtn.prev {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADFJREFUeNpiSU1NZUAC/6E0I0yACYskCpsJiySKIiY0SUZk40FyTEgCjGgKwTRAgAEAQJUIPCE+qfkAAAAASUVORK5CYII=);    }.ace_searchbtn.next {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADRJREFUeNpiTE1NZQCC/0DMyIAKwGJMUAYDEo3M/s+EpvM/mkKwCQxYjIeLMaELoLMBAgwAU7UJObTKsvAAAAAASUVORK5CYII=);    }.ace_searchbtn_close {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;border-radius: 50%;border: 0 none;color: #656565;cursor: pointer;display: block;float: right;font-family: Arial;font-size: 16px;height: 14px;line-height: 16px;margin: 5px 1px 9px 5px;padding: 0;text-align: center;width: 14px;}.ace_searchbtn_close:hover {background-color: #656565;background-position: 50% 100%;color: white;}.ace_replacebtn.prev {width: 54px}.ace_replacebtn.next {width: 27px}.ace_button {margin-left: 2px;cursor: pointer;-webkit-user-select: none;-moz-user-select: none;-o-user-select: none;-ms-user-select: none;user-select: none;overflow: hidden;opacity: 0.7;border: 1px solid rgba(100,100,100,0.23);padding: 1px;-moz-box-sizing: border-box;box-sizing:    border-box;color: black;}.ace_button:hover {background-color: #eee;opacity:1;}.ace_button:active {background-color: #ddd;}.ace_button.checked {border-color: #3399ff;opacity:1;}.ace_search_options{margin-bottom: 3px;text-align: right;-webkit-user-select: none;-moz-user-select: none;-o-user-select: none;-ms-user-select: none;user-select: none;}",u=e("../keyboard/hash_handler").HashHandler,a=e("../lib/keys");r.importCssString(o,"ace_searchbox");var f='<div class="ace_search right">    <button type="button" action="hide" class="ace_searchbtn_close"></button>    <div class="ace_search_form">        <input class="ace_search_field" placeholder="Search for" spellcheck="false"></input>        <button type="button" action="findNext" class="ace_searchbtn next"></button>        <button type="button" action="findPrev" class="ace_searchbtn prev"></button>    </div>    <div class="ace_replace_form">        <input class="ace_search_field" placeholder="Replace with" spellcheck="false"></input>        <button type="button" action="replaceAndFindNext" class="ace_replacebtn">Replace</button>        <button type="button" action="replaceAll" class="ace_replacebtn">All</button>    </div>    <div class="ace_search_options">        <span action="toggleRegexpMode" class="ace_button" title="RegExp Search">.*</span>        <span action="toggleCaseSensitive" class="ace_button" title="CaseSensitive Search">Aa</span>        <span action="toggleWholeWords" class="ace_button" title="Whole Word Search">\\b</span>    </div></div>'.replace(/>\s+/g,">"),l=function(e,t,n){var i=r.createElement("div");i.innerHTML=f,this.element=i.firstChild,this.$init(),this.setEditor(e)};(function(){this.setEditor=function(e){e.searchBox=this,e.container.appendChild(this.element),this.editor=e},this.$initElements=function(e){this.searchBox=e.querySelector(".ace_search_form"),this.replaceBox=e.querySelector(".ace_replace_form"),this.searchOptions=e.querySelector(".ace_search_options"),this.regExpOption=e.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=e.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=e.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field")},this.$init=function(){var e=this.element;this.$initElements(e);var t=this;s.addListener(e,"mousedown",function(e){setTimeout(function(){t.activeInput.focus()},0),s.stopPropagation(e)}),s.addListener(e,"click",function(e){var n=e.target||e.srcElement,r=n.getAttribute("action");r&&t[r]?t[r]():t.$searchBarKb.commands[r]&&t.$searchBarKb.commands[r].exec(t),s.stopPropagation(e)}),s.addCommandKeyListener(e,function(e,n,r){var i=a.keyCodeToString(r),o=t.$searchBarKb.findKeyCommand(n,i);o&&o.exec&&(o.exec(t),s.stopEvent(e))}),this.$onChange=i.delayedCall(function(){t.find(!1,!1)}),s.addListener(this.searchInput,"input",function(){t.$onChange.schedule(20)}),s.addListener(this.searchInput,"focus",function(){t.activeInput=t.searchInput,t.searchInput.value&&t.highlight()}),s.addListener(this.replaceInput,"focus",function(){t.activeInput=t.replaceInput,t.searchInput.value&&t.highlight()})},this.$closeSearchBarKb=new u([{bindKey:"Esc",name:"closeSearchBar",exec:function(e){e.searchBox.hide()}}]),this.$searchBarKb=new u,this.$searchBarKb.bindKeys({"Ctrl-f|Command-f|Ctrl-H|Command-Option-F":function(e){var t=e.isReplace=!e.isReplace;e.replaceBox.style.display=t?"":"none",e[t?"replaceInput":"searchInput"].focus()},"Ctrl-G|Command-G":function(e){e.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(e){e.findPrev()},esc:function(e){setTimeout(function(){e.hide()})},Return:function(e){e.activeInput==e.replaceInput&&e.replace(),e.findNext()},"Shift-Return":function(e){e.activeInput==e.replaceInput&&e.replace(),e.findPrev()},Tab:function(e){(e.activeInput==e.replaceInput?e.searchInput:e.replaceInput).focus()}}),this.$searchBarKb.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(e){e.regExpOption.checked=!e.regExpOption.checked,e.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(e){e.caseSensitiveOption.checked=!e.caseSensitiveOption.checked,e.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(e){e.wholeWordOption.checked=!e.wholeWordOption.checked,e.$syncOptions()}}]),this.$syncOptions=function(){r.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),r.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),r.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked),this.find(!1,!1)},this.highlight=function(e){this.editor.session.highlight(e||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},this.find=function(e,t){var n=this.editor.find(this.searchInput.value,{skipCurrent:e,backwards:t,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),i=!n&&this.searchInput.value;r.setCssClass(this.searchBox,"ace_nomatch",i),this.editor._emit("findSearchBox",{match:!i}),this.highlight()},this.findNext=function(){this.find(!0,!1)},this.findPrev=function(){this.find(!0,!0)},this.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},this.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},this.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},this.hide=function(){this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},this.show=function(e,t){this.element.style.display="",this.replaceBox.style.display=t?"":"none",this.isReplace=t,e&&(this.searchInput.value=e),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb)}}).call(l.prototype),t.SearchBox=l,t.Search=function(e,t){var n=e.searchBox||new l(e);n.show(e.session.getTextRange(),t)}}),function(){ace.require(["ace/ext/searchbox"],function(){})}()
\ No newline at end of file
diff --git a/app/assets/lib/ace/ext-settings_menu.js b/app/assets/lib/ace/ext-settings_menu.js
index 46b2d3f3b..ee6324c1a 100644
--- a/app/assets/lib/ace/ext-settings_menu.js
+++ b/app/assets/lib/ace/ext-settings_menu.js
@@ -1 +1 @@
-ace.define("ace/ext/settings_menu",["require","exports","module","ace/ext/menu_tools/generate_settings_menu","ace/ext/menu_tools/overlay_page","ace/editor"],function(e,t,n){function s(e){var t=document.getElementById("ace_settingsmenu");t||i(e,r(e),"0","0","0")}var r=e("./menu_tools/generate_settings_menu").generateSettingsMenu,i=e("./menu_tools/overlay_page").overlayPage;n.exports.init=function(t){var n=e("ace/editor").Editor;n.prototype.showSettingsMenu=function(){s(this)}}}),ace.define("ace/ext/menu_tools/generate_settings_menu",["require","exports","module","ace/ext/menu_tools/element_generator","ace/ext/menu_tools/add_editor_menu_options","ace/ext/menu_tools/get_set_functions"],function(e,t,n){var r=e("./element_generator"),i=e("./add_editor_menu_options").addEditorMenuOptions,s=e("./get_set_functions").getSetFunctions;n.exports.generateSettingsMenu=function(t){function o(){n.sort(function(e,t){var n=e.getAttribute("contains"),r=t.getAttribute("contains");return n.localeCompare(r)})}function u(){var e=document.createElement("div");return e.setAttribute("id","ace_settingsmenu"),n.forEach(function(t){e.appendChild(t)}),e}function a(e,n,i,s){var o,u=document.createElement("div");return u.setAttribute("contains",i),u.setAttribute("class","ace_optionsMenuEntry"),u.setAttribute("style","clear: both;"),u.appendChild(r.createLabel(i.replace(/^set/,"").replace(/([A-Z])/g," $1").trim(),i)),Array.isArray(s)?(o=r.createSelection(i,s,n),o.addEventListener("change",function(n){try{t.menuOptions[n.target.id].forEach(function(e){e.textContent!==n.target.textContent&&delete e.selected}),e[n.target.id](n.target.value)}catch(r){throw new Error(r)}})):typeof s=="boolean"?(o=r.createCheckbox(i,s,n),o.addEventListener("change",function(t){try{e[t.target.id](!!t.target.checked)}catch(n){throw new Error(n)}})):(o=r.createInput(i,s,n),o.addEventListener("change",function(t){try{t.target.value==="true"?e[t.target.id](!0):t.target.value==="false"?e[t.target.id](!1):e[t.target.id](t.target.value)}catch(n){throw new Error(n)}})),o.style.cssText="float:right;",u.appendChild(o),u}function f(e,n,r,i){var s=t.menuOptions[e],o=n[i]();return typeof o=="object"&&(o=o.$id),s.forEach(function(e){e.value===o&&(e.selected="selected")}),a(n,r,e,s)}function l(e){var r=e.functionName,i=e.parentObj,s=e.parentName,o,u=r.replace(/^set/,"get");if(t.menuOptions[r]!==undefined)n.push(f(r,i,s,u));else if(typeof i[u]=="function")try{o=i[u](),typeof o=="object"&&(o=o.$id),n.push(a(i,s,r,o))}catch(l){}}var n=[];return i(t),s(t).forEach(function(e){l(e)}),o(),u()}}),ace.define("ace/ext/menu_tools/element_generator",["require","exports","module"],function(e,t,n){n.exports.createOption=function(t){var n,r=document.createElement("option");for(n in t)t.hasOwnProperty(n)&&(n==="selected"?r.setAttribute(n,t[n]):r[n]=t[n]);return r},n.exports.createCheckbox=function(t,n,r){var i=document.createElement("input");return i.setAttribute("type","checkbox"),i.setAttribute("id",t),i.setAttribute("name",t),i.setAttribute("value",n),i.setAttribute("class",r),n&&i.setAttribute("checked","checked"),i},n.exports.createInput=function(t,n,r){var i=document.createElement("input");return i.setAttribute("type","text"),i.setAttribute("id",t),i.setAttribute("name",t),i.setAttribute("value",n),i.setAttribute("class",r),i},n.exports.createLabel=function(t,n){var r=document.createElement("label");return r.setAttribute("for",n),r.textContent=t,r},n.exports.createSelection=function(t,r,i){var s=document.createElement("select");return s.setAttribute("id",t),s.setAttribute("name",t),s.setAttribute("class",i),r.forEach(function(e){s.appendChild(n.exports.createOption(e))}),s}}),ace.define("ace/ext/menu_tools/add_editor_menu_options",["require","exports","module","ace/ext/modelist","ace/ext/themelist"],function(e,t,n){n.exports.addEditorMenuOptions=function(n){var r=e("../modelist"),i=e("../themelist");n.menuOptions={setNewLineMode:[{textContent:"unix",value:"unix"},{textContent:"windows",value:"windows"},{textContent:"auto",value:"auto"}],setTheme:[],setMode:[],setKeyboardHandler:[{textContent:"ace",value:""},{textContent:"vim",value:"ace/keyboard/vim"},{textContent:"emacs",value:"ace/keyboard/emacs"}]},n.menuOptions.setTheme=i.themes.map(function(e){return{textContent:e.desc,value:e.theme}}),n.menuOptions.setMode=r.modes.map(function(e){return{textContent:e.name,value:e.mode}})}}),ace.define("ace/ext/modelist",["require","exports","module"],function(e,t,n){function i(e){var t=a.text,n=e.split(/[\/\\]/).pop();for(var i=0;i<r.length;i++)if(r[i].supportsFile(n)){t=r[i];break}return t}var r=[],s=function(e,t,n){this.name=e,this.caption=t,this.mode="ace/mode/"+e,this.extensions=n;if(/\^/.test(n))var r=n.replace(/\|(\^)?/g,function(e,t){return"$|"+(t?"^":"^.*\\.")})+"$";else var r="^.*\\.("+n+")$";this.extRe=new RegExp(r,"gi")};s.prototype.supportsFile=function(e){return e.match(this.extRe)};var o={ABAP:["abap"],ActionScript:["as"],ADA:["ada|adb"],AsciiDoc:["asciidoc"],Assembly_x86:["asm"],AutoHotKey:["ahk"],BatchFile:["bat|cmd"],C9Search:["c9search_results"],C_Cpp:["cpp|c|cc|cxx|h|hh|hpp"],Clojure:["clj"],Cobol:["CBL|COB"],coffee:["coffee|cf|cson|^Cakefile"],ColdFusion:["cfm"],CSharp:["cs"],CSS:["css"],Curly:["curly"],D:["d|di"],Dart:["dart"],Diff:["diff|patch"],Dot:["dot"],Erlang:["erl|hrl"],EJS:["ejs"],Forth:["frt|fs|ldr"],FTL:["ftl"],Glsl:["glsl|frag|vert"],golang:["go"],Groovy:["groovy"],HAML:["haml"],Handlebars:["hbs|handlebars|tpl|mustache"],Haskell:["hs"],haXe:["hx"],HTML:["html|htm|xhtml"],HTML_Ruby:["erb|rhtml|html.erb"],INI:["ini|conf|cfg|prefs"],Jack:["jack"],Jade:["jade"],Java:["java"],JavaScript:["js|jsm"],JSON:["json"],JSONiq:["jq"],JSP:["jsp"],JSX:["jsx"],Julia:["jl"],LaTeX:["tex|latex|ltx|bib"],LESS:["less"],Liquid:["liquid"],Lisp:["lisp"],LiveScript:["ls"],LogiQL:["logic|lql"],LSL:["lsl"],Lua:["lua"],LuaPage:["lp"],Lucene:["lucene"],Makefile:["^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make"],MATLAB:["matlab"],Markdown:["md|markdown"],MySQL:["mysql"],MUSHCode:["mc|mush"],Nix:["nix"],ObjectiveC:["m|mm"],OCaml:["ml|mli"],Pascal:["pas|p"],Perl:["pl|pm"],pgSQL:["pgsql"],PHP:["php|phtml"],Powershell:["ps1"],Prolog:["plg|prolog"],Properties:["properties"],Protobuf:["proto"],Python:["py"],R:["r"],RDoc:["Rd"],RHTML:["Rhtml"],Ruby:["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"],Rust:["rs"],SASS:["sass"],SCAD:["scad"],Scala:["scala"],Scheme:["scm|rkt"],SCSS:["scss"],SH:["sh|bash|^.bashrc"],SJS:["sjs"],Space:["space"],snippets:["snippets"],Soy_Template:["soy"],SQL:["sql"],Stylus:["styl|stylus"],SVG:["svg"],Tcl:["tcl"],Tex:["tex"],Text:["txt"],Textile:["textile"],Toml:["toml"],Twig:["twig"],Typescript:["ts|typescript|str"],VBScript:["vbs"],Velocity:["vm"],Verilog:["v|vh|sv|svh"],XML:["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl"],XQuery:["xq"],YAML:["yaml|yml"]},u={ObjectiveC:"Objective-C",CSharp:"C#",golang:"Go",C_Cpp:"C/C++",coffee:"CoffeeScript",HTML_Ruby:"HTML (Ruby)",FTL:"FreeMarker"},a={};for(var f in o){var l=o[f],c=u[f]||f,h=f.toLowerCase(),p=new s(h,c,l[0]);a[h]=p,r.push(p)}n.exports={getModeForPath:i,modes:r,modesByName:a}}),ace.define("ace/ext/themelist",["require","exports","module","ace/ext/themelist_utils/themes"],function(e,t,n){n.exports.themes=e("ace/ext/themelist_utils/themes").themes,n.exports.ThemeDescription=function(e){this.name=e,this.desc=e.split("_").map(function(e){return e[0].toUpperCase()+e.slice(1)}).join(" "),this.theme="ace/theme/"+e},n.exports.themesByName={},n.exports.themes=n.exports.themes.map(function(e){return n.exports.themesByName[e]=new n.exports.ThemeDescription(e),n.exports.themesByName[e]})}),ace.define("ace/ext/themelist_utils/themes",["require","exports","module"],function(e,t,n){n.exports.themes=["ambiance","chaos","chrome","clouds","clouds_midnight","cobalt","crimson_editor","dawn","dreamweaver","eclipse","github","idle_fingers","kr_theme","merbivore","merbivore_soft","mono_industrial","monokai","pastel_on_dark","solarized_dark","solarized_light","terminal","textmate","tomorrow","tomorrow_night","tomorrow_night_blue","tomorrow_night_bright","tomorrow_night_eighties","twilight","vibrant_ink","xcode"]}),ace.define("ace/ext/menu_tools/get_set_functions",["require","exports","module"],function(e,t,n){n.exports.getSetFunctions=function(t){var n=[],r={editor:t,session:t.session,renderer:t.renderer},i=[],s=["setOption","setUndoManager","setDocument","setValue","setBreakpoints","setScrollTop","setScrollLeft","setSelectionStyle","setWrapLimitRange"];return["renderer","session","editor"].forEach(function(e){var t=r[e],o=e;for(var u in t)s.indexOf(u)===-1&&/^set/.test(u)&&i.indexOf(u)===-1&&(i.push(u),n.push({functionName:u,parentObj:t,parentName:o}))}),n}}),ace.define("ace/ext/menu_tools/overlay_page",["require","exports","module","ace/lib/dom"],function(e,t,n){var r=e("../../lib/dom"),i="#ace_settingsmenu, #kbshortcutmenu {background-color: #F7F7F7;color: black;box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);padding: 1em 0.5em 2em 1em;overflow: auto;position: absolute;margin: 0;bottom: 0;right: 0;top: 0;z-index: 9991;cursor: default;}.ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);background-color: rgba(255, 255, 255, 0.6);color: black;}.ace_optionsMenuEntry:hover {background-color: rgba(100, 100, 100, 0.1);-webkit-transition: all 0.5s;transition: all 0.3s}.ace_closeButton {background: rgba(245, 146, 146, 0.5);border: 1px solid #F48A8A;border-radius: 50%;padding: 7px;position: absolute;right: -8px;top: -8px;z-index: 1000;}.ace_closeButton{background: rgba(245, 146, 146, 0.9);}.ace_optionsMenuKey {color: darkslateblue;font-weight: bold;}.ace_optionsMenuCommand {color: darkcyan;font-weight: normal;}";r.importCssString(i),n.exports.overlayPage=function(t,n,i,s,o,u){function l(e){e.keyCode===27&&a.click()}i=i?"top: "+i+";":"",o=o?"bottom: "+o+";":"",s=s?"right: "+s+";":"",u=u?"left: "+u+";":"";var a=document.createElement("div"),f=document.createElement("div");a.style.cssText="margin: 0; padding: 0; position: fixed; top:0; bottom:0; left:0; right:0;z-index: 9990; background-color: rgba(0, 0, 0, 0.3);",a.addEventListener("click",function(){document.removeEventListener("keydown",l),a.parentNode.removeChild(a),t.focus(),a=null}),document.addEventListener("keydown",l),f.style.cssText=i+s+o+u,f.addEventListener("click",function(e){e.stopPropagation()});var c=r.createElement("div");c.style.position="relative";var h=r.createElement("div");h.className="ace_closeButton",h.addEventListener("click",function(){a.click()}),c.appendChild(h),f.appendChild(c),f.appendChild(n),a.appendChild(f),document.body.appendChild(a),t.blur()}})
\ No newline at end of file
+ace.define("ace/ext/settings_menu",["require","exports","module","ace/ext/menu_tools/generate_settings_menu","ace/ext/menu_tools/overlay_page","ace/editor"],function(e,t,n){function s(e){var t=document.getElementById("ace_settingsmenu");t||i(e,r(e),"0","0","0")}var r=e("./menu_tools/generate_settings_menu").generateSettingsMenu,i=e("./menu_tools/overlay_page").overlayPage;n.exports.init=function(t){var n=e("ace/editor").Editor;n.prototype.showSettingsMenu=function(){s(this)}}}),ace.define("ace/ext/menu_tools/generate_settings_menu",["require","exports","module","ace/ext/menu_tools/element_generator","ace/ext/menu_tools/add_editor_menu_options","ace/ext/menu_tools/get_set_functions"],function(e,t,n){var r=e("./element_generator"),i=e("./add_editor_menu_options").addEditorMenuOptions,s=e("./get_set_functions").getSetFunctions;n.exports.generateSettingsMenu=function(t){function o(){n.sort(function(e,t){var n=e.getAttribute("contains"),r=t.getAttribute("contains");return n.localeCompare(r)})}function u(){var e=document.createElement("div");return e.setAttribute("id","ace_settingsmenu"),n.forEach(function(t){e.appendChild(t)}),e}function a(e,n,i,s){var o,u=document.createElement("div");return u.setAttribute("contains",i),u.setAttribute("class","ace_optionsMenuEntry"),u.setAttribute("style","clear: both;"),u.appendChild(r.createLabel(i.replace(/^set/,"").replace(/([A-Z])/g," $1").trim(),i)),Array.isArray(s)?(o=r.createSelection(i,s,n),o.addEventListener("change",function(n){try{t.menuOptions[n.target.id].forEach(function(e){e.textContent!==n.target.textContent&&delete e.selected}),e[n.target.id](n.target.value)}catch(r){throw new Error(r)}})):typeof s=="boolean"?(o=r.createCheckbox(i,s,n),o.addEventListener("change",function(t){try{e[t.target.id](!!t.target.checked)}catch(n){throw new Error(n)}})):(o=r.createInput(i,s,n),o.addEventListener("change",function(t){try{t.target.value==="true"?e[t.target.id](!0):t.target.value==="false"?e[t.target.id](!1):e[t.target.id](t.target.value)}catch(n){throw new Error(n)}})),o.style.cssText="float:right;",u.appendChild(o),u}function f(e,n,r,i){var s=t.menuOptions[e],o=n[i]();return typeof o=="object"&&(o=o.$id),s.forEach(function(e){e.value===o&&(e.selected="selected")}),a(n,r,e,s)}function l(e){var r=e.functionName,i=e.parentObj,s=e.parentName,o,u=r.replace(/^set/,"get");if(t.menuOptions[r]!==undefined)n.push(f(r,i,s,u));else if(typeof i[u]=="function")try{o=i[u](),typeof o=="object"&&(o=o.$id),n.push(a(i,s,r,o))}catch(l){}}var n=[];return i(t),s(t).forEach(function(e){l(e)}),o(),u()}}),ace.define("ace/ext/menu_tools/element_generator",["require","exports","module"],function(e,t,n){n.exports.createOption=function(t){var n,r=document.createElement("option");for(n in t)t.hasOwnProperty(n)&&(n==="selected"?r.setAttribute(n,t[n]):r[n]=t[n]);return r},n.exports.createCheckbox=function(t,n,r){var i=document.createElement("input");return i.setAttribute("type","checkbox"),i.setAttribute("id",t),i.setAttribute("name",t),i.setAttribute("value",n),i.setAttribute("class",r),n&&i.setAttribute("checked","checked"),i},n.exports.createInput=function(t,n,r){var i=document.createElement("input");return i.setAttribute("type","text"),i.setAttribute("id",t),i.setAttribute("name",t),i.setAttribute("value",n),i.setAttribute("class",r),i},n.exports.createLabel=function(t,n){var r=document.createElement("label");return r.setAttribute("for",n),r.textContent=t,r},n.exports.createSelection=function(t,r,i){var s=document.createElement("select");return s.setAttribute("id",t),s.setAttribute("name",t),s.setAttribute("class",i),r.forEach(function(e){s.appendChild(n.exports.createOption(e))}),s}}),ace.define("ace/ext/menu_tools/add_editor_menu_options",["require","exports","module","ace/ext/modelist","ace/ext/themelist"],function(e,t,n){n.exports.addEditorMenuOptions=function(n){var r=e("../modelist"),i=e("../themelist");n.menuOptions={setNewLineMode:[{textContent:"unix",value:"unix"},{textContent:"windows",value:"windows"},{textContent:"auto",value:"auto"}],setTheme:[],setMode:[],setKeyboardHandler:[{textContent:"ace",value:""},{textContent:"vim",value:"ace/keyboard/vim"},{textContent:"emacs",value:"ace/keyboard/emacs"}]},n.menuOptions.setTheme=i.themes.map(function(e){return{textContent:e.caption,value:e.theme}}),n.menuOptions.setMode=r.modes.map(function(e){return{textContent:e.name,value:e.mode}})}}),ace.define("ace/ext/modelist",["require","exports","module"],function(e,t,n){function i(e){var t=a.text,n=e.split(/[\/\\]/).pop();for(var i=0;i<r.length;i++)if(r[i].supportsFile(n)){t=r[i];break}return t}var r=[],s=function(e,t,n){this.name=e,this.caption=t,this.mode="ace/mode/"+e,this.extensions=n;if(/\^/.test(n))var r=n.replace(/\|(\^)?/g,function(e,t){return"$|"+(t?"^":"^.*\\.")})+"$";else var r="^.*\\.("+n+")$";this.extRe=new RegExp(r,"gi")};s.prototype.supportsFile=function(e){return e.match(this.extRe)};var o={ABAP:["abap"],ActionScript:["as"],ADA:["ada|adb"],Apache_Conf:["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"],AsciiDoc:["asciidoc"],Assembly_x86:["asm"],AutoHotKey:["ahk"],BatchFile:["bat|cmd"],C9Search:["c9search_results"],C_Cpp:["cpp|c|cc|cxx|h|hh|hpp"],Cirru:["cirru|cr"],Clojure:["clj"],Cobol:["CBL|COB"],coffee:["coffee|cf|cson|^Cakefile"],ColdFusion:["cfm"],CSharp:["cs"],CSS:["css"],Curly:["curly"],D:["d|di"],Dart:["dart"],Diff:["diff|patch"],Dockerfile:["^Dockerfile"],Dot:["dot"],Erlang:["erl|hrl"],EJS:["ejs"],Forth:["frt|fs|ldr"],FTL:["ftl"],Gherkin:["feature"],Glsl:["glsl|frag|vert"],golang:["go"],Groovy:["groovy"],HAML:["haml"],Handlebars:["hbs|handlebars|tpl|mustache"],Haskell:["hs"],haXe:["hx"],HTML:["html|htm|xhtml"],HTML_Ruby:["erb|rhtml|html.erb"],INI:["ini|conf|cfg|prefs"],Jack:["jack"],Jade:["jade"],Java:["java"],JavaScript:["js|jsm"],JSON:["json"],JSONiq:["jq"],JSP:["jsp"],JSX:["jsx"],Julia:["jl"],LaTeX:["tex|latex|ltx|bib"],LESS:["less"],Liquid:["liquid"],Lisp:["lisp"],LiveScript:["ls"],LogiQL:["logic|lql"],LSL:["lsl"],Lua:["lua"],LuaPage:["lp"],Lucene:["lucene"],Makefile:["^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make"],MATLAB:["matlab"],Markdown:["md|markdown"],MEL:["mel"],MySQL:["mysql"],MUSHCode:["mc|mush"],Nix:["nix"],ObjectiveC:["m|mm"],OCaml:["ml|mli"],Pascal:["pas|p"],Perl:["pl|pm"],pgSQL:["pgsql"],PHP:["php|phtml"],Powershell:["ps1"],Prolog:["plg|prolog"],Properties:["properties"],Protobuf:["proto"],Python:["py"],R:["r"],RDoc:["Rd"],RHTML:["Rhtml"],Ruby:["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"],Rust:["rs"],SASS:["sass"],SCAD:["scad"],Scala:["scala"],Smarty:["smarty|tpl"],Scheme:["scm|rkt"],SCSS:["scss"],SH:["sh|bash|^.bashrc"],SJS:["sjs"],Space:["space"],snippets:["snippets"],Soy_Template:["soy"],SQL:["sql"],Stylus:["styl|stylus"],SVG:["svg"],Tcl:["tcl"],Tex:["tex"],Text:["txt"],Textile:["textile"],Toml:["toml"],Twig:["twig"],Typescript:["ts|typescript|str"],Vala:["vala"],VBScript:["vbs"],Velocity:["vm"],Verilog:["v|vh|sv|svh"],XML:["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl"],XQuery:["xq"],YAML:["yaml|yml"]},u={ObjectiveC:"Objective-C",CSharp:"C#",golang:"Go",C_Cpp:"C/C++",coffee:"CoffeeScript",HTML_Ruby:"HTML (Ruby)",FTL:"FreeMarker"},a={};for(var f in o){var l=o[f],c=(u[f]||f).replace(/_/g," "),h=f.toLowerCase(),p=new s(h,c,l[0]);a[h]=p,r.push(p)}n.exports={getModeForPath:i,modes:r,modesByName:a}}),ace.define("ace/ext/themelist",["require","exports","module","ace/lib/fixoldbrowsers"],function(e,t,n){e("ace/lib/fixoldbrowsers");var r=[["Chrome"],["Clouds"],["Crimson Editor"],["Dawn"],["Dreamweaver"],["Eclipse"],["GitHub"],["Solarized Light"],["TextMate"],["Tomorrow"],["XCode"],["Kuroir"],["KatzenMilch"],["Ambiance","ambiance","dark"],["Chaos","chaos","dark"],["Clouds Midnight","clouds_midnight","dark"],["Cobalt","cobalt","dark"],["idle Fingers","idle_fingers","dark"],["krTheme","kr_theme","dark"],["Merbivore","merbivore","dark"],["Merbivore Soft","merbivore_soft","dark"],["Mono Industrial","mono_industrial","dark"],["Monokai","monokai","dark"],["Pastel on dark","pastel_on_dark","dark"],["Solarized Dark","solarized_dark","dark"],["Terminal","terminal","dark"],["Tomorrow Night","tomorrow_night","dark"],["Tomorrow Night Blue","tomorrow_night_blue","dark"],["Tomorrow Night Bright","tomorrow_night_bright","dark"],["Tomorrow Night 80s","tomorrow_night_eighties","dark"],["Twilight","twilight","dark"],["Vibrant Ink","vibrant_ink","dark"]];t.themesByName={},t.themes=r.map(function(e){var n=e[1]||e[0].replace(/ /g,"_").toLowerCase(),r={caption:e[0],theme:"ace/theme/"+n,isDark:e[2]=="dark",name:n};return t.themesByName[n]=r,r})}),ace.define("ace/ext/menu_tools/get_set_functions",["require","exports","module"],function(e,t,n){n.exports.getSetFunctions=function(t){var n=[],r={editor:t,session:t.session,renderer:t.renderer},i=[],s=["setOption","setUndoManager","setDocument","setValue","setBreakpoints","setScrollTop","setScrollLeft","setSelectionStyle","setWrapLimitRange"];return["renderer","session","editor"].forEach(function(e){var t=r[e],o=e;for(var u in t)s.indexOf(u)===-1&&/^set/.test(u)&&i.indexOf(u)===-1&&(i.push(u),n.push({functionName:u,parentObj:t,parentName:o}))}),n}}),ace.define("ace/ext/menu_tools/overlay_page",["require","exports","module","ace/lib/dom"],function(e,t,n){var r=e("../../lib/dom"),i="#ace_settingsmenu, #kbshortcutmenu {background-color: #F7F7F7;color: black;box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);padding: 1em 0.5em 2em 1em;overflow: auto;position: absolute;margin: 0;bottom: 0;right: 0;top: 0;z-index: 9991;cursor: default;}.ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);background-color: rgba(255, 255, 255, 0.6);color: black;}.ace_optionsMenuEntry:hover {background-color: rgba(100, 100, 100, 0.1);-webkit-transition: all 0.5s;transition: all 0.3s}.ace_closeButton {background: rgba(245, 146, 146, 0.5);border: 1px solid #F48A8A;border-radius: 50%;padding: 7px;position: absolute;right: -8px;top: -8px;z-index: 1000;}.ace_closeButton{background: rgba(245, 146, 146, 0.9);}.ace_optionsMenuKey {color: darkslateblue;font-weight: bold;}.ace_optionsMenuCommand {color: darkcyan;font-weight: normal;}";r.importCssString(i),n.exports.overlayPage=function(t,n,i,s,o,u){function l(e){e.keyCode===27&&a.click()}i=i?"top: "+i+";":"",o=o?"bottom: "+o+";":"",s=s?"right: "+s+";":"",u=u?"left: "+u+";":"";var a=document.createElement("div"),f=document.createElement("div");a.style.cssText="margin: 0; padding: 0; position: fixed; top:0; bottom:0; left:0; right:0;z-index: 9990; background-color: rgba(0, 0, 0, 0.3);",a.addEventListener("click",function(){document.removeEventListener("keydown",l),a.parentNode.removeChild(a),t.focus(),a=null}),document.addEventListener("keydown",l),f.style.cssText=i+s+o+u,f.addEventListener("click",function(e){e.stopPropagation()});var c=r.createElement("div");c.style.position="relative";var h=r.createElement("div");h.className="ace_closeButton",h.addEventListener("click",function(){a.click()}),c.appendChild(h),f.appendChild(c),f.appendChild(n),a.appendChild(f),document.body.appendChild(a),t.blur()}}),function(){ace.require(["ace/ext/settings_menu"],function(){})}()
\ No newline at end of file
diff --git a/app/assets/lib/ace/ext-spellcheck.js b/app/assets/lib/ace/ext-spellcheck.js
index a5fdf8429..5192021f8 100644
--- a/app/assets/lib/ace/ext-spellcheck.js
+++ b/app/assets/lib/ace/ext-spellcheck.js
@@ -1 +1 @@
-ace.define("ace/ext/spellcheck",["require","exports","module","ace/lib/event","ace/editor","ace/config"],function(e,t,n){var r=e("../lib/event");t.contextMenuHandler=function(e){var t=e.target,n=t.textInput.getElement();if(!t.selection.isEmpty())return;var i=t.getCursorPosition(),s=t.session.getWordRange(i.row,i.column),o=t.session.getTextRange(s);t.session.tokenRe.lastIndex=0;if(!t.session.tokenRe.test(o))return;var u="",a=o+" "+u;n.value=a,n.setSelectionRange(o.length,o.length+1),n.setSelectionRange(0,0),n.setSelectionRange(0,o.length);var f=!1;r.addListener(n,"keydown",function l(){r.removeListener(n,"keydown",l),f=!0}),t.textInput.setInputHandler(function(e){console.log(e,a,n.selectionStart,n.selectionEnd);if(e==a)return"";if(e.lastIndexOf(a,0)===0)return e.slice(a.length);if(e.substr(n.selectionEnd)==a)return e.slice(0,-a.length);if(e.slice(-2)==u){var r=e.slice(0,-2);if(r.slice(-1)==" ")return f?r.substring(0,n.selectionEnd):(r=r.slice(0,-1),t.session.replace(s,r),"")}return e})};var i=e("../editor").Editor;e("../config").defineOptions(i.prototype,"editor",{spellcheck:{set:function(e){var n=this.textInput.getElement();n.spellcheck=!!e,e?this.on("nativecontextmenu",t.contextMenuHandler):this.removeListener("nativecontextmenu",t.contextMenuHandler)},value:!0}})})
\ No newline at end of file
+ace.define("ace/ext/spellcheck",["require","exports","module","ace/lib/event","ace/editor","ace/config"],function(e,t,n){var r=e("../lib/event");t.contextMenuHandler=function(e){var t=e.target,n=t.textInput.getElement();if(!t.selection.isEmpty())return;var i=t.getCursorPosition(),s=t.session.getWordRange(i.row,i.column),o=t.session.getTextRange(s);t.session.tokenRe.lastIndex=0;if(!t.session.tokenRe.test(o))return;var u="\x01\x01",a=o+" "+u;n.value=a,n.setSelectionRange(o.length,o.length+1),n.setSelectionRange(0,0),n.setSelectionRange(0,o.length);var f=!1;r.addListener(n,"keydown",function l(){r.removeListener(n,"keydown",l),f=!0}),t.textInput.setInputHandler(function(e){console.log(e,a,n.selectionStart,n.selectionEnd);if(e==a)return"";if(e.lastIndexOf(a,0)===0)return e.slice(a.length);if(e.substr(n.selectionEnd)==a)return e.slice(0,-a.length);if(e.slice(-2)==u){var r=e.slice(0,-2);if(r.slice(-1)==" ")return f?r.substring(0,n.selectionEnd):(r=r.slice(0,-1),t.session.replace(s,r),"")}return e})};var i=e("../editor").Editor;e("../config").defineOptions(i.prototype,"editor",{spellcheck:{set:function(e){var n=this.textInput.getElement();n.spellcheck=!!e,e?this.on("nativecontextmenu",t.contextMenuHandler):this.removeListener("nativecontextmenu",t.contextMenuHandler)},value:!0}})}),function(){ace.require(["ace/ext/spellcheck"],function(){})}()
\ No newline at end of file
diff --git a/app/assets/lib/ace/ext-split.js b/app/assets/lib/ace/ext-split.js
index 55d305b62..696bf526b 100644
--- a/app/assets/lib/ace/ext-split.js
+++ b/app/assets/lib/ace/ext-split.js
@@ -1 +1 @@
-ace.define("ace/ext/split",["require","exports","module","ace/split"],function(e,t,n){n.exports=e("../split")}),ace.define("ace/split",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/editor","ace/virtual_renderer","ace/edit_session"],function(e,t,n){function l(e,t){this.$u=e,this.$doc=t}var r=e("./lib/oop"),i=e("./lib/lang"),s=e("./lib/event_emitter").EventEmitter,o=e("./editor").Editor,u=e("./virtual_renderer").VirtualRenderer,a=e("./edit_session").EditSession,f=function(e,t,n){this.BELOW=1,this.BESIDE=0,this.$container=e,this.$theme=t,this.$splits=0,this.$editorCSS="",this.$editors=[],this.$orientation=this.BESIDE,this.setSplits(n||1),this.$cEditor=this.$editors[0],this.on("focus",function(e){this.$cEditor=e}.bind(this))};(function(){r.implement(this,s),this.$createEditor=function(){var e=document.createElement("div");e.className=this.$editorCSS,e.style.cssText="position: absolute; top:0px; bottom:0px",this.$container.appendChild(e);var t=new o(new u(e,this.$theme));return t.on("focus",function(){this._emit("focus",t)}.bind(this)),this.$editors.push(t),t.setFontSize(this.$fontSize),t},this.setSplits=function(e){var t;if(e<1)throw"The number of splits have to be > 0!";if(e==this.$splits)return;if(e>this.$splits){while(this.$splits<this.$editors.length&&this.$splits<e)t=this.$editors[this.$splits],this.$container.appendChild(t.container),t.setFontSize(this.$fontSize),this.$splits++;while(this.$splits<e)this.$createEditor(),this.$splits++}else while(this.$splits>e)t=this.$editors[this.$splits-1],this.$container.removeChild(t.container),this.$splits--;this.resize()},this.getSplits=function(){return this.$splits},this.getEditor=function(e){return this.$editors[e]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(e){this.$editors.forEach(function(t){t.setTheme(e)})},this.setKeyboardHandler=function(e){this.$editors.forEach(function(t){t.setKeyboardHandler(e)})},this.forEach=function(e,t){this.$editors.forEach(e,t)},this.$fontSize="",this.setFontSize=function(e){this.$fontSize=e,this.forEach(function(t){t.setFontSize(e)})},this.$cloneSession=function(e){var t=new a(e.getDocument(),e.getMode()),n=e.getUndoManager();if(n){var r=new l(n,t);t.setUndoManager(r)}return t.$informUndoManager=i.delayedCall(function(){t.$deltas=[]}),t.setTabSize(e.getTabSize()),t.setUseSoftTabs(e.getUseSoftTabs()),t.setOverwrite(e.getOverwrite()),t.setBreakpoints(e.getBreakpoints()),t.setUseWrapMode(e.getUseWrapMode()),t.setUseWorker(e.getUseWorker()),t.setWrapLimitRange(e.$wrapLimitRange.min,e.$wrapLimitRange.max),t.$foldData=e.$cloneFoldData(),t},this.setSession=function(e,t){var n;t==null?n=this.$cEditor:n=this.$editors[t];var r=this.$editors.some(function(t){return t.session===e});return r&&(e=this.$cloneSession(e)),n.setSession(e),e},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(e){if(this.$orientation==e)return;this.$orientation=e,this.resize()},this.resize=function(){var e=this.$container.clientWidth,t=this.$container.clientHeight,n;if(this.$orientation==this.BESIDE){var r=e/this.$splits;for(var i=0;i<this.$splits;i++)n=this.$editors[i],n.container.style.width=r+"px",n.container.style.top="0px",n.container.style.left=i*r+"px",n.container.style.height=t+"px",n.resize()}else{var s=t/this.$splits;for(var i=0;i<this.$splits;i++)n=this.$editors[i],n.container.style.width=e+"px",n.container.style.top=i*s+"px",n.container.style.left="0px",n.container.style.height=s+"px",n.resize()}}}).call(f.prototype),function(){this.execute=function(e){this.$u.execute(e)},this.undo=function(){var e=this.$u.undo(!0);e&&this.$doc.selection.setSelectionRange(e)},this.redo=function(){var e=this.$u.redo(!0);e&&this.$doc.selection.setSelectionRange(e)},this.reset=function(){this.$u.reset()},this.hasUndo=function(){return this.$u.hasUndo()},this.hasRedo=function(){return this.$u.hasRedo()}}.call(l.prototype),t.Split=f})
\ No newline at end of file
+ace.define("ace/ext/split",["require","exports","module","ace/split"],function(e,t,n){n.exports=e("../split")}),ace.define("ace/split",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/editor","ace/virtual_renderer","ace/edit_session"],function(e,t,n){function l(e,t){this.$u=e,this.$doc=t}var r=e("./lib/oop"),i=e("./lib/lang"),s=e("./lib/event_emitter").EventEmitter,o=e("./editor").Editor,u=e("./virtual_renderer").VirtualRenderer,a=e("./edit_session").EditSession,f=function(e,t,n){this.BELOW=1,this.BESIDE=0,this.$container=e,this.$theme=t,this.$splits=0,this.$editorCSS="",this.$editors=[],this.$orientation=this.BESIDE,this.setSplits(n||1),this.$cEditor=this.$editors[0],this.on("focus",function(e){this.$cEditor=e}.bind(this))};(function(){r.implement(this,s),this.$createEditor=function(){var e=document.createElement("div");e.className=this.$editorCSS,e.style.cssText="position: absolute; top:0px; bottom:0px",this.$container.appendChild(e);var t=new o(new u(e,this.$theme));return t.on("focus",function(){this._emit("focus",t)}.bind(this)),this.$editors.push(t),t.setFontSize(this.$fontSize),t},this.setSplits=function(e){var t;if(e<1)throw"The number of splits have to be > 0!";if(e==this.$splits)return;if(e>this.$splits){while(this.$splits<this.$editors.length&&this.$splits<e)t=this.$editors[this.$splits],this.$container.appendChild(t.container),t.setFontSize(this.$fontSize),this.$splits++;while(this.$splits<e)this.$createEditor(),this.$splits++}else while(this.$splits>e)t=this.$editors[this.$splits-1],this.$container.removeChild(t.container),this.$splits--;this.resize()},this.getSplits=function(){return this.$splits},this.getEditor=function(e){return this.$editors[e]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(e){this.$editors.forEach(function(t){t.setTheme(e)})},this.setKeyboardHandler=function(e){this.$editors.forEach(function(t){t.setKeyboardHandler(e)})},this.forEach=function(e,t){this.$editors.forEach(e,t)},this.$fontSize="",this.setFontSize=function(e){this.$fontSize=e,this.forEach(function(t){t.setFontSize(e)})},this.$cloneSession=function(e){var t=new a(e.getDocument(),e.getMode()),n=e.getUndoManager();if(n){var r=new l(n,t);t.setUndoManager(r)}return t.$informUndoManager=i.delayedCall(function(){t.$deltas=[]}),t.setTabSize(e.getTabSize()),t.setUseSoftTabs(e.getUseSoftTabs()),t.setOverwrite(e.getOverwrite()),t.setBreakpoints(e.getBreakpoints()),t.setUseWrapMode(e.getUseWrapMode()),t.setUseWorker(e.getUseWorker()),t.setWrapLimitRange(e.$wrapLimitRange.min,e.$wrapLimitRange.max),t.$foldData=e.$cloneFoldData(),t},this.setSession=function(e,t){var n;t==null?n=this.$cEditor:n=this.$editors[t];var r=this.$editors.some(function(t){return t.session===e});return r&&(e=this.$cloneSession(e)),n.setSession(e),e},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(e){if(this.$orientation==e)return;this.$orientation=e,this.resize()},this.resize=function(){var e=this.$container.clientWidth,t=this.$container.clientHeight,n;if(this.$orientation==this.BESIDE){var r=e/this.$splits;for(var i=0;i<this.$splits;i++)n=this.$editors[i],n.container.style.width=r+"px",n.container.style.top="0px",n.container.style.left=i*r+"px",n.container.style.height=t+"px",n.resize()}else{var s=t/this.$splits;for(var i=0;i<this.$splits;i++)n=this.$editors[i],n.container.style.width=e+"px",n.container.style.top=i*s+"px",n.container.style.left="0px",n.container.style.height=s+"px",n.resize()}}}).call(f.prototype),function(){this.execute=function(e){this.$u.execute(e)},this.undo=function(){var e=this.$u.undo(!0);e&&this.$doc.selection.setSelectionRange(e)},this.redo=function(){var e=this.$u.redo(!0);e&&this.$doc.selection.setSelectionRange(e)},this.reset=function(){this.$u.reset()},this.hasUndo=function(){return this.$u.hasUndo()},this.hasRedo=function(){return this.$u.hasRedo()}}.call(l.prototype),t.Split=f}),function(){ace.require(["ace/ext/split"],function(){})}()
\ No newline at end of file
diff --git a/app/assets/lib/ace/ext-static_highlight.js b/app/assets/lib/ace/ext-static_highlight.js
index 39a2541f8..e70c811a1 100644
--- a/app/assets/lib/ace/ext-static_highlight.js
+++ b/app/assets/lib/ace/ext-static_highlight.js
@@ -1 +1 @@
-ace.define("ace/ext/static_highlight",["require","exports","module","ace/edit_session","ace/layer/text","ace/config","ace/lib/dom"],function(e,t,n){var r=e("../edit_session").EditSession,i=e("../layer/text").Text,s=".ace_static_highlight {font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', 'Droid Sans Mono', monospace;font-size: 12px;}.ace_static_highlight .ace_gutter {width: 25px !important;display: block;float: left;text-align: right;padding: 0 3px 0 0;margin-right: 3px;position: static !important;}.ace_static_highlight .ace_line { clear: both; }.ace_static_highlight .ace_gutter-cell {-moz-user-select: -moz-none;-khtml-user-select: none;-webkit-user-select: none;user-select: none;}",o=e("../config"),u=e("../lib/dom"),a=function(e,t,n){var r=e.className.match(/lang-(\w+)/),i=t.mode||r&&"ace/mode/"+r[1];if(!i)return!1;var s=t.theme||"ace/theme/textmate",o="",f=[];if(e.firstElementChild){var l=0;for(var c=0;c<e.childNodes.length;c++){var h=e.childNodes[c];h.nodeType==3?(l+=h.data.length,o+=h.data):f.push(l,h)}}else o=u.getInnerText(e),t.trim&&(o=o.trim());a.render(o,i,s,t.firstLineNumber,!t.showGutter,function(t){u.importCssString(t.css,"ace_highlight"),e.innerHTML=t.html;var r=e.firstChild.firstChild;for(var i=0;i<f.length;i+=2){var s=t.session.doc.indexToPosition(f[i]),o=f[i+1],a=r.children[s.row];a&&a.appendChild(o)}n&&n()})};a.render=function(e,t,n,i,s,u){function c(){var r=a.renderSync(e,t,n,i,s);return u?u(r):r}var f=0,l=r.prototype.$modes;return typeof n=="string"&&(f++,o.loadModule(["theme",n],function(e){n=e,--f||c()})),typeof t=="string"&&(f++,o.loadModule(["mode",t],function(e){l[t]||(l[t]=new e.Mode),t=l[t],--f||c()})),f||c()},a.renderSync=function(e,t,n,o,u){o=parseInt(o||1,10);var a=new r("");a.setUseWorker(!1),a.setMode(t);var f=new i(document.createElement("div"));f.setSession(a),f.config={characterWidth:10,lineHeight:20},a.setValue(e);var l=[],c=a.getLength();for(var h=0;h<c;h++)l.push("<div class='ace_line'>"),u||l.push("<span class='ace_gutter ace_gutter-cell' unselectable='on'>"+(h+o)+"</span>"),f.$renderLine(l,h,!0,!1),l.push("\n</div>");var p="<div class='"+n.cssClass+"'>"+"<div class='ace_static_highlight'>"+l.join("")+"</div>"+"</div>";return f.destroy(),{css:s+n.cssText,html:p,session:a}},n.exports=a,n.exports.highlight=a})
\ No newline at end of file
+ace.define("ace/ext/static_highlight",["require","exports","module","ace/edit_session","ace/layer/text","ace/config","ace/lib/dom"],function(e,t,n){var r=e("../edit_session").EditSession,i=e("../layer/text").Text,s=".ace_static_highlight {font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', 'Droid Sans Mono', monospace;font-size: 12px;}.ace_static_highlight .ace_gutter {width: 25px !important;display: block;float: left;text-align: right;padding: 0 3px 0 0;margin-right: 3px;position: static !important;}.ace_static_highlight .ace_line { clear: both; }.ace_static_highlight .ace_gutter-cell {-moz-user-select: -moz-none;-khtml-user-select: none;-webkit-user-select: none;user-select: none;}.ace_static_highlight .ace_gutter-cell:before {content: counter(ace_line, decimal);counter-increment: ace_line;}.ace_static_highlight {counter-reset: ace_line;}",o=e("../config"),u=e("../lib/dom"),a=function(e,t,n){var r=e.className.match(/lang-(\w+)/),i=t.mode||r&&"ace/mode/"+r[1];if(!i)return!1;var s=t.theme||"ace/theme/textmate",o="",f=[];if(e.firstElementChild){var l=0;for(var c=0;c<e.childNodes.length;c++){var h=e.childNodes[c];h.nodeType==3?(l+=h.data.length,o+=h.data):f.push(l,h)}}else o=u.getInnerText(e),t.trim&&(o=o.trim());a.render(o,i,s,t.firstLineNumber,!t.showGutter,function(t){u.importCssString(t.css,"ace_highlight"),e.innerHTML=t.html;var r=e.firstChild.firstChild;for(var i=0;i<f.length;i+=2){var s=t.session.doc.indexToPosition(f[i]),o=f[i+1],a=r.children[s.row];a&&a.appendChild(o)}n&&n()})};a.render=function(e,t,n,i,s,u){function c(){var r=a.renderSync(e,t,n,i,s);return u?u(r):r}var f=1,l=r.prototype.$modes;return typeof n=="string"&&(f++,o.loadModule(["theme",n],function(e){n=e,--f||c()})),typeof t=="string"&&(f++,o.loadModule(["mode",t],function(e){l[t]||(l[t]=new e.Mode),t=l[t],--f||c()})),--f||c()},a.renderSync=function(e,t,n,o,u){o=parseInt(o||1,10);var a=new r("");a.setUseWorker(!1),a.setMode(t);var f=new i(document.createElement("div"));f.setSession(a),f.config={characterWidth:10,lineHeight:20},a.setValue(e);var l=[],c=a.getLength();for(var h=0;h<c;h++)l.push("<div class='ace_line'>"),u||l.push("<span class='ace_gutter ace_gutter-cell' unselectable='on'></span>"),f.$renderLine(l,h,!0,!1),l.push("\n</div>");var p="<div class='"+n.cssClass+"'>"+"<div class='ace_static_highlight' style='counter-reset:ace_line "+(o-1)+"'>"+l.join("")+"</div>"+"</div>";return f.destroy(),{css:s+n.cssText,html:p,session:a}},n.exports=a,n.exports.highlight=a}),function(){ace.require(["ace/ext/static_highlight"],function(){})}()
\ No newline at end of file
diff --git a/app/assets/lib/ace/ext-statusbar.js b/app/assets/lib/ace/ext-statusbar.js
index 96c27e528..7e1bf037d 100644
--- a/app/assets/lib/ace/ext-statusbar.js
+++ b/app/assets/lib/ace/ext-statusbar.js
@@ -1 +1 @@
-ace.define("ace/ext/statusbar",["require","exports","module","ace/lib/dom","ace/lib/lang"],function(e,t,n){var r=e("ace/lib/dom"),i=e("ace/lib/lang"),s=function(e,t){this.element=r.createElement("div"),this.element.className="ace_status-indicator",this.element.style.cssText="display: inline-block;",t.appendChild(this.element);var n=i.delayedCall(function(){this.updateStatus(e)}.bind(this));e.on("changeStatus",function(){n.schedule(100)}),e.on("changeSelection",function(){n.schedule(100)})};(function(){this.updateStatus=function(e){function n(e,n){e&&t.push(e,n||"|")}var t=[];e.$vimModeHandler?n(e.$vimModeHandler.getStatusText()):e.commands.recording&&n("REC");var r=e.selection.lead;n(r.row+":"+r.column," ");if(!e.selection.isEmpty()){var i=e.getSelectionRange();n("("+(i.end.row-i.start.row)+":"+(i.end.column-i.start.column)+")")}t.pop(),this.element.textContent=t.join("")}}).call(s.prototype),t.StatusBar=s})
\ No newline at end of file
+ace.define("ace/ext/statusbar",["require","exports","module","ace/lib/dom","ace/lib/lang"],function(e,t,n){var r=e("ace/lib/dom"),i=e("ace/lib/lang"),s=function(e,t){this.element=r.createElement("div"),this.element.className="ace_status-indicator",this.element.style.cssText="display: inline-block;",t.appendChild(this.element);var n=i.delayedCall(function(){this.updateStatus(e)}.bind(this));e.on("changeStatus",function(){n.schedule(100)}),e.on("changeSelection",function(){n.schedule(100)})};(function(){this.updateStatus=function(e){function n(e,n){e&&t.push(e,n||"|")}var t=[];e.$vimModeHandler?n(e.$vimModeHandler.getStatusText()):e.commands.recording&&n("REC");var r=e.selection.lead;n(r.row+":"+r.column," ");if(!e.selection.isEmpty()){var i=e.getSelectionRange();n("("+(i.end.row-i.start.row)+":"+(i.end.column-i.start.column)+")")}t.pop(),this.element.textContent=t.join("")}}).call(s.prototype),t.StatusBar=s}),function(){ace.require(["ace/ext/statusbar"],function(){})}()
\ No newline at end of file
diff --git a/app/assets/lib/ace/ext-textarea.js b/app/assets/lib/ace/ext-textarea.js
index 9afb029be..d9b5bedf1 100644
--- a/app/assets/lib/ace/ext-textarea.js
+++ b/app/assets/lib/ace/ext-textarea.js
@@ -1 +1 @@
-ace.define("ace/ext/textarea",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/net","ace/ace","ace/theme/textmate","ace/mode/text"],function(e,t,n){function a(e,t){for(var n in t)e.style[n]=t[n]}function f(e,t){if(e.type!="textarea")throw new Error("Textarea required!");var n=e.parentNode,i=document.createElement("div"),s=function(){var t="position:relative;";["margin-top","margin-left","margin-right","margin-bottom"].forEach(function(n){t+=n+":"+u(e,i,n)+";"});var n=u(e,i,"width")||e.clientWidth+"px",r=u(e,i,"height")||e.clientHeight+"px";t+="height:"+r+";width:"+n+";",t+="display:inline-block;",i.setAttribute("style",t)};r.addListener(window,"resize",s),s(),n.insertBefore(i,e.nextSibling);while(n!==document){if(n.tagName.toUpperCase()==="FORM"){var o=n.onsubmit;n.onsubmit=function(n){e.value=t(),o&&o.call(this,n)};break}n=n.parentNode}return i}function l(t,n,r){s.loadScript(t,function(){e([n],r)})}function c(n,r,i,s,o,u){function c(e){return e==="true"||e==1}var a=n.getSession(),f=n.renderer;return u=u||l,n.setDisplaySettings=function(e){e==null&&(e=i.style.display=="none"),e?(i.style.display="block",i.hideButton.focus(),n.on("focus",function t(){n.removeListener("focus",t),i.style.display="none"})):n.focus()},n.$setOption=n.setOption,n.setOption=function(t,i){if(o[t]==i)return;switch(t){case"mode":i!="text"?u("mode-"+i+".js","ace/mode/"+i,function(){var t=e("../mode/"+i).Mode;a.setMode(new t)}):a.setMode(new(e("../mode/text").Mode));break;case"theme":i!="textmate"?u("theme-"+i+".js","ace/theme/"+i,function(){n.setTheme("ace/theme/"+i)}):n.setTheme("ace/theme/textmate");break;case"fontSize":r.style.fontSize=i;break;case"keybindings":switch(i){case"vim":n.setKeyboardHandler("ace/keyboard/vim");break;case"emacs":n.setKeyboardHandler("ace/keyboard/emacs");break;default:n.setKeyboardHandler(null)}break;case"softWrap":switch(i){case"off":a.setUseWrapMode(!1),f.setPrintMarginColumn(80);break;case"40":a.setUseWrapMode(!0),a.setWrapLimitRange(40,40),f.setPrintMarginColumn(40);break;case"80":a.setUseWrapMode(!0),a.setWrapLimitRange(80,80),f.setPrintMarginColumn(80);break;case"free":a.setUseWrapMode(!0),a.setWrapLimitRange(null,null),f.setPrintMarginColumn(80)}break;default:n.$setOption(t,c(i))}o[t]=i},n.getOption=function(e){return o[e]},n.getOptions=function(){return o},n.setOptions(t.options),n}function h(e,t,n,i){function f(e,t,n,r){if(!n){e.push("<input type='checkbox' title='",t,"' ",r=="true"?"checked='true'":"","'></input>");return}e.push("<select title='"+t+"'>");for(var i in n)e.push("<option value='"+i+"' "),r==i&&e.push(" selected "),e.push(">",n[i],"</option>");e.push("</select>")}var s=null,o={mode:"Mode:",gutter:"Display Gutter:",theme:"Theme:",fontSize:"Font Size:",softWrap:"Soft Wrap:",keybindings:"Keyboard",showPrintMargin:"Show Print Margin:",useSoftTabs:"Use Soft Tabs:",showInvisibles:"Show Invisibles"},u={mode:{text:"Plain",javascript:"JavaScript",xml:"XML",html:"HTML",css:"CSS",scss:"SCSS",python:"Python",php:"PHP",java:"Java",ruby:"Ruby",c_cpp:"C/C++",coffee:"CoffeeScript",json:"json",perl:"Perl",clojure:"Clojure",ocaml:"OCaml",csharp:"C#",haxe:"haXe",svg:"SVG",textile:"Textile",groovy:"Groovy",liquid:"Liquid",Scala:"Scala"},theme:{clouds:"Clouds",clouds_midnight:"Clouds Midnight",cobalt:"Cobalt",crimson_editor:"Crimson Editor",dawn:"Dawn",eclipse:"Eclipse",idle_fingers:"Idle Fingers",kr_theme:"Kr Theme",merbivore:"Merbivore",merbivore_soft:"Merbivore Soft",mono_industrial:"Mono Industrial",monokai:"Monokai",pastel_on_dark:"Pastel On Dark",solarized_dark:"Solarized Dark",solarized_light:"Solarized Light",textmate:"Textmate",twilight:"Twilight",vibrant_ink:"Vibrant Ink"},gutter:s,fontSize:{"10px":"10px","11px":"11px","12px":"12px","14px":"14px","16px":"16px"},softWrap:{off:"Off",40:"40",80:"80",free:"Free"},keybindings:{ace:"ace",vim:"vim",emacs:"emacs"},showPrintMargin:s,useSoftTabs:s,showInvisibles:s},a=[];a.push("<table><tr><th>Setting</th><th>Value</th></tr>");for(var l in i)a.push("<tr><td>",o[l],"</td>"),a.push("<td>"),f(a,l,u[l],i[l]),a.push("</td></tr>");a.push("</table>"),e.innerHTML=a.join("");var c=function(e){var t=e.currentTarget;n.setOption(t.title,t.value)},h=function(e){var t=e.currentTarget;n.setOption(t.title,t.checked)},p=e.getElementsByTagName("select");for(var d=0;d<p.length;d++)p[d].onchange=c;var v=e.getElementsByTagName("input");for(var d=0;d<v.length;d++)v[d].onclick=h;var m=document.createElement("input");m.type="button",m.value="Hide",r.addListener(m,"click",function(){n.setDisplaySettings(!1)}),e.appendChild(m),e.hideButton=m}var r=e("../lib/event"),i=e("../lib/useragent"),s=e("../lib/net"),o=e("../ace");e("../theme/textmate"),n.exports=t=o;var u=function(e,t,n){var r=e.style[n];r||(window.getComputedStyle?r=window.getComputedStyle(e,"").getPropertyValue(n):r=e.currentStyle[n]);if(!r||r=="auto"||r=="intrinsic")r=t.style[n];return r};t.transformTextarea=function(e,t){var n,s=f(e,function(){return n.getValue()});e.style.display="none",s.style.background="white";var u=document.createElement("div");a(u,{top:"0px",left:"0px",right:"0px",bottom:"0px",border:"1px solid gray",position:"absolute"}),s.appendChild(u);var l=document.createElement("div");a(l,{position:"absolute",right:"0px",bottom:"0px",background:"red",cursor:"nw-resize",borderStyle:"solid",borderWidth:"9px 8px 10px 9px",width:"2px",borderColor:"lightblue gray gray lightblue",zIndex:101});var p=document.createElement("div"),d={top:"0px",left:"20%",right:"0px",bottom:"0px",position:"absolute",padding:"5px",zIndex:100,color:"white",display:"none",overflow:"auto",fontSize:"14px",boxShadow:"-5px 2px 3px gray"};i.isOldIE?d.backgroundColor="#333":d.backgroundColor="rgba(0, 0, 0, 0.6)",a(p,d),s.appendChild(p);var v={},m=o.edit(u);n=m.getSession(),n.setValue(e.value||e.innerHTML),m.focus(),s.appendChild(l),c(m,u,p,o,v,t),h(p,l,m,v);var g="";return r.addListener(l,"mousemove",function(e){var t=this.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;n+r<(t.width+t.height)/2?(this.style.cursor="pointer",g="toggle"):(g="resize",this.style.cursor="nw-resize")}),r.addListener(l,"mousedown",function(e){if(g=="toggle"){m.setDisplaySettings();return}s.style.zIndex=1e5;var t=s.getBoundingClientRect(),n=t.width+t.left-e.clientX,i=t.height+t.top-e.clientY;r.capture(l,function(e){s.style.width=e.clientX-t.left+n+"px",s.style.height=e.clientY-t.top+i+"px",m.resize()},function(){})}),m},t.options={mode:"text",theme:"textmate",gutter:"false",fontSize:"12px",softWrap:"off",keybindings:"ace",showPrintMargin:"false",useSoftTabs:"true",showInvisibles:"false"}})
\ No newline at end of file
+ace.define("ace/ext/textarea",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/net","ace/ace","ace/theme/textmate","ace/mode/text"],function(e,t,n){function a(e,t){for(var n in t)e.style[n]=t[n]}function f(e,t){if(e.type!="textarea")throw new Error("Textarea required!");var n=e.parentNode,i=document.createElement("div"),s=function(){var t="position:relative;";["margin-top","margin-left","margin-right","margin-bottom"].forEach(function(n){t+=n+":"+u(e,i,n)+";"});var n=u(e,i,"width")||e.clientWidth+"px",r=u(e,i,"height")||e.clientHeight+"px";t+="height:"+r+";width:"+n+";",t+="display:inline-block;",i.setAttribute("style",t)};r.addListener(window,"resize",s),s(),n.insertBefore(i,e.nextSibling);while(n!==document){if(n.tagName.toUpperCase()==="FORM"){var o=n.onsubmit;n.onsubmit=function(n){e.value=t(),o&&o.call(this,n)};break}n=n.parentNode}return i}function l(t,n,r){s.loadScript(t,function(){e([n],r)})}function c(n,r,i,s,o,u){function c(e){return e==="true"||e==1}var a=n.getSession(),f=n.renderer;return u=u||l,n.setDisplaySettings=function(e){e==null&&(e=i.style.display=="none"),e?(i.style.display="block",i.hideButton.focus(),n.on("focus",function t(){n.removeListener("focus",t),i.style.display="none"})):n.focus()},n.$setOption=n.setOption,n.setOption=function(t,i){if(o[t]==i)return;switch(t){case"mode":i!="text"?u("mode-"+i+".js","ace/mode/"+i,function(){var t=e("../mode/"+i).Mode;a.setMode(new t)}):a.setMode(new(e("../mode/text").Mode));break;case"theme":i!="textmate"?u("theme-"+i+".js","ace/theme/"+i,function(){n.setTheme("ace/theme/"+i)}):n.setTheme("ace/theme/textmate");break;case"fontSize":r.style.fontSize=i;break;case"keybindings":switch(i){case"vim":n.setKeyboardHandler("ace/keyboard/vim");break;case"emacs":n.setKeyboardHandler("ace/keyboard/emacs");break;default:n.setKeyboardHandler(null)}break;case"softWrap":switch(i){case"off":a.setUseWrapMode(!1),f.setPrintMarginColumn(80);break;case"40":a.setUseWrapMode(!0),a.setWrapLimitRange(40,40),f.setPrintMarginColumn(40);break;case"80":a.setUseWrapMode(!0),a.setWrapLimitRange(80,80),f.setPrintMarginColumn(80);break;case"free":a.setUseWrapMode(!0),a.setWrapLimitRange(null,null),f.setPrintMarginColumn(80)}break;default:n.$setOption(t,c(i))}o[t]=i},n.getOption=function(e){return o[e]},n.getOptions=function(){return o},n.setOptions(t.options),n}function h(e,t,n,i){function f(e,t,n,r){if(!n){e.push("<input type='checkbox' title='",t,"' ",r=="true"?"checked='true'":"","'></input>");return}e.push("<select title='"+t+"'>");for(var i in n)e.push("<option value='"+i+"' "),r==i&&e.push(" selected "),e.push(">",n[i],"</option>");e.push("</select>")}var s=null,o={mode:"Mode:",gutter:"Display Gutter:",theme:"Theme:",fontSize:"Font Size:",softWrap:"Soft Wrap:",keybindings:"Keyboard",showPrintMargin:"Show Print Margin:",useSoftTabs:"Use Soft Tabs:",showInvisibles:"Show Invisibles"},u={mode:{text:"Plain",javascript:"JavaScript",xml:"XML",html:"HTML",css:"CSS",scss:"SCSS",python:"Python",php:"PHP",java:"Java",ruby:"Ruby",c_cpp:"C/C++",coffee:"CoffeeScript",json:"json",perl:"Perl",clojure:"Clojure",ocaml:"OCaml",csharp:"C#",haxe:"haXe",svg:"SVG",textile:"Textile",groovy:"Groovy",liquid:"Liquid",Scala:"Scala"},theme:{clouds:"Clouds",clouds_midnight:"Clouds Midnight",cobalt:"Cobalt",crimson_editor:"Crimson Editor",dawn:"Dawn",eclipse:"Eclipse",idle_fingers:"Idle Fingers",kr_theme:"Kr Theme",merbivore:"Merbivore",merbivore_soft:"Merbivore Soft",mono_industrial:"Mono Industrial",monokai:"Monokai",pastel_on_dark:"Pastel On Dark",solarized_dark:"Solarized Dark",solarized_light:"Solarized Light",textmate:"Textmate",twilight:"Twilight",vibrant_ink:"Vibrant Ink"},gutter:s,fontSize:{"10px":"10px","11px":"11px","12px":"12px","14px":"14px","16px":"16px"},softWrap:{off:"Off",40:"40",80:"80",free:"Free"},keybindings:{ace:"ace",vim:"vim",emacs:"emacs"},showPrintMargin:s,useSoftTabs:s,showInvisibles:s},a=[];a.push("<table><tr><th>Setting</th><th>Value</th></tr>");for(var l in i)a.push("<tr><td>",o[l],"</td>"),a.push("<td>"),f(a,l,u[l],i[l]),a.push("</td></tr>");a.push("</table>"),e.innerHTML=a.join("");var c=function(e){var t=e.currentTarget;n.setOption(t.title,t.value)},h=function(e){var t=e.currentTarget;n.setOption(t.title,t.checked)},p=e.getElementsByTagName("select");for(var d=0;d<p.length;d++)p[d].onchange=c;var v=e.getElementsByTagName("input");for(var d=0;d<v.length;d++)v[d].onclick=h;var m=document.createElement("input");m.type="button",m.value="Hide",r.addListener(m,"click",function(){n.setDisplaySettings(!1)}),e.appendChild(m),e.hideButton=m}var r=e("../lib/event"),i=e("../lib/useragent"),s=e("../lib/net"),o=e("../ace");e("../theme/textmate"),n.exports=t=o;var u=function(e,t,n){var r=e.style[n];r||(window.getComputedStyle?r=window.getComputedStyle(e,"").getPropertyValue(n):r=e.currentStyle[n]);if(!r||r=="auto"||r=="intrinsic")r=t.style[n];return r};t.transformTextarea=function(e,t){var n,s=f(e,function(){return n.getValue()});e.style.display="none",s.style.background="white";var u=document.createElement("div");a(u,{top:"0px",left:"0px",right:"0px",bottom:"0px",border:"1px solid gray",position:"absolute"}),s.appendChild(u);var l=document.createElement("div");a(l,{position:"absolute",right:"0px",bottom:"0px",background:"red",cursor:"nw-resize",borderStyle:"solid",borderWidth:"9px 8px 10px 9px",width:"2px",borderColor:"lightblue gray gray lightblue",zIndex:101});var p=document.createElement("div"),d={top:"0px",left:"20%",right:"0px",bottom:"0px",position:"absolute",padding:"5px",zIndex:100,color:"white",display:"none",overflow:"auto",fontSize:"14px",boxShadow:"-5px 2px 3px gray"};i.isOldIE?d.backgroundColor="#333":d.backgroundColor="rgba(0, 0, 0, 0.6)",a(p,d),s.appendChild(p);var v={},m=o.edit(u);n=m.getSession(),n.setValue(e.value||e.innerHTML),m.focus(),s.appendChild(l),c(m,u,p,o,v,t),h(p,l,m,v);var g="";return r.addListener(l,"mousemove",function(e){var t=this.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;n+r<(t.width+t.height)/2?(this.style.cursor="pointer",g="toggle"):(g="resize",this.style.cursor="nw-resize")}),r.addListener(l,"mousedown",function(e){if(g=="toggle"){m.setDisplaySettings();return}s.style.zIndex=1e5;var t=s.getBoundingClientRect(),n=t.width+t.left-e.clientX,i=t.height+t.top-e.clientY;r.capture(l,function(e){s.style.width=e.clientX-t.left+n+"px",s.style.height=e.clientY-t.top+i+"px",m.resize()},function(){})}),m},t.options={mode:"text",theme:"textmate",gutter:"false",fontSize:"12px",softWrap:"off",keybindings:"ace",showPrintMargin:"false",useSoftTabs:"true",showInvisibles:"false"}}),function(){ace.require(["ace/ext/textarea"],function(){})}()
\ No newline at end of file
diff --git a/app/assets/lib/ace/ext-themelist.js b/app/assets/lib/ace/ext-themelist.js
index d3166f67a..a6c10d149 100644
--- a/app/assets/lib/ace/ext-themelist.js
+++ b/app/assets/lib/ace/ext-themelist.js
@@ -1 +1 @@
-ace.define("ace/ext/themelist",["require","exports","module","ace/ext/themelist_utils/themes"],function(e,t,n){n.exports.themes=e("ace/ext/themelist_utils/themes").themes,n.exports.ThemeDescription=function(e){this.name=e,this.desc=e.split("_").map(function(e){return e[0].toUpperCase()+e.slice(1)}).join(" "),this.theme="ace/theme/"+e},n.exports.themesByName={},n.exports.themes=n.exports.themes.map(function(e){return n.exports.themesByName[e]=new n.exports.ThemeDescription(e),n.exports.themesByName[e]})}),ace.define("ace/ext/themelist_utils/themes",["require","exports","module"],function(e,t,n){n.exports.themes=["ambiance","chaos","chrome","clouds","clouds_midnight","cobalt","crimson_editor","dawn","dreamweaver","eclipse","github","idle_fingers","kr_theme","merbivore","merbivore_soft","mono_industrial","monokai","pastel_on_dark","solarized_dark","solarized_light","terminal","textmate","tomorrow","tomorrow_night","tomorrow_night_blue","tomorrow_night_bright","tomorrow_night_eighties","twilight","vibrant_ink","xcode"]})
\ No newline at end of file
+ace.define("ace/ext/themelist",["require","exports","module","ace/lib/fixoldbrowsers"],function(e,t,n){e("ace/lib/fixoldbrowsers");var r=[["Chrome"],["Clouds"],["Crimson Editor"],["Dawn"],["Dreamweaver"],["Eclipse"],["GitHub"],["Solarized Light"],["TextMate"],["Tomorrow"],["XCode"],["Kuroir"],["KatzenMilch"],["Ambiance","ambiance","dark"],["Chaos","chaos","dark"],["Clouds Midnight","clouds_midnight","dark"],["Cobalt","cobalt","dark"],["idle Fingers","idle_fingers","dark"],["krTheme","kr_theme","dark"],["Merbivore","merbivore","dark"],["Merbivore Soft","merbivore_soft","dark"],["Mono Industrial","mono_industrial","dark"],["Monokai","monokai","dark"],["Pastel on dark","pastel_on_dark","dark"],["Solarized Dark","solarized_dark","dark"],["Terminal","terminal","dark"],["Tomorrow Night","tomorrow_night","dark"],["Tomorrow Night Blue","tomorrow_night_blue","dark"],["Tomorrow Night Bright","tomorrow_night_bright","dark"],["Tomorrow Night 80s","tomorrow_night_eighties","dark"],["Twilight","twilight","dark"],["Vibrant Ink","vibrant_ink","dark"]];t.themesByName={},t.themes=r.map(function(e){var n=e[1]||e[0].replace(/ /g,"_").toLowerCase(),r={caption:e[0],theme:"ace/theme/"+n,isDark:e[2]=="dark",name:n};return t.themesByName[n]=r,r})}),function(){ace.require(["ace/ext/themelist"],function(){})}()
\ No newline at end of file
diff --git a/app/assets/lib/ace/ext-whitespace.js b/app/assets/lib/ace/ext-whitespace.js
index 4ae776df9..73f96e2e9 100644
--- a/app/assets/lib/ace/ext-whitespace.js
+++ b/app/assets/lib/ace/ext-whitespace.js
@@ -1 +1 @@
-ace.define("ace/ext/whitespace",["require","exports","module","ace/lib/lang"],function(e,t,n){var r=e("../lib/lang");t.$detectIndentation=function(e,t){function h(e){var t=0;for(var r=e;r<n.length;r+=e)t+=n[r]||0;return t}var n=[],r=[],i=0,s=0,o=Math.min(e.length,1e3);for(var u=0;u<o;u++){var a=e[u];if(!/^\s*[^*+\-\s]/.test(a))continue;var f=a.match(/^\t*/)[0].length;a[0]=="	"&&i++;var l=a.match(/^ */)[0].length;if(l&&a[l]!="	"){var c=l-s;c>0&&!(s%c)&&!(l%c)&&(r[c]=(r[c]||0)+1),n[l]=(n[l]||0)+1}s=l;while(a[a.length-1]=="\\")a=e[u++]}var p=r.reduce(function(e,t){return e+t},0),d={score:0,length:0},v=0;for(var u=1;u<12;u++){if(u==1){v=h(u);var m=1}else var m=h(u)/v;r[u]&&(m+=r[u]/p),m>d.score&&(d={score:m,length:u})}if(d.score&&d.score>1.4)var g=d.length;if(i>v+1)return{ch:"	",length:g};if(v+1>i)return{ch:" ",length:g}},t.detectIndentation=function(e){var n=e.getLines(0,1e3),r=t.$detectIndentation(n)||{};return r.ch&&e.setUseSoftTabs(r.ch==" "),r.length&&e.setTabSize(r.length),r},t.trimTrailingSpace=function(e,t){var n=e.getDocument(),r=n.getAllLines(),i=t?-1:0;for(var s=0,o=r.length;s<o;s++){var u=r[s],a=u.search(/\s+$/);a>i&&n.removeInLine(s,a,u.length)}},t.convertIndentation=function(e,t,n){var i=e.getTabString()[0],s=e.getTabSize();n||(n=s),t||(t=i);var o=t=="	"?t:r.stringRepeat(t,n),u=e.doc,a=u.getAllLines(),f={},l={};for(var c=0,h=a.length;c<h;c++){var p=a[c],d=p.match(/^\s*/)[0];if(d){var v=e.$getStringScreenWidth(d)[0],m=Math.floor(v/s),g=v%s,y=f[m]||(f[m]=r.stringRepeat(o,m));y+=l[g]||(l[g]=r.stringRepeat(" ",g)),y!=d&&(u.removeInLine(c,0,d.length),u.insertInLine({row:c,column:0},y))}}e.setTabSize(n),e.setUseSoftTabs(t==" ")},t.$parseStringArg=function(e){var t={};/t/.test(e)?t.ch="	":/s/.test(e)&&(t.ch=" ");var n=e.match(/\d+/);return n&&(t.length=parseInt(n[0],10)),t},t.$parseArg=function(e){return e?typeof e=="string"?t.$parseStringArg(e):typeof e.text=="string"?t.$parseStringArg(e.text):e:{}},t.commands=[{name:"detectIndentation",exec:function(e){t.detectIndentation(e.session)}},{name:"trimTrailingSpace",exec:function(e){t.trimTrailingSpace(e.session)}},{name:"convertIndentation",exec:function(e,n){var r=t.$parseArg(n);t.convertIndentation(e.session,r.ch,r.length)}},{name:"setIndentation",exec:function(e,n){var r=t.$parseArg(n);r.length&&e.session.setTabSize(r.length),r.ch&&e.session.setUseSoftTabs(r.ch==" ")}}]})
\ No newline at end of file
+ace.define("ace/ext/whitespace",["require","exports","module","ace/lib/lang"],function(e,t,n){var r=e("../lib/lang");t.$detectIndentation=function(e,t){function h(e){var t=0;for(var r=e;r<n.length;r+=e)t+=n[r]||0;return t}var n=[],r=[],i=0,s=0,o=Math.min(e.length,1e3);for(var u=0;u<o;u++){var a=e[u];if(!/^\s*[^*+\-\s]/.test(a))continue;var f=a.match(/^\t*/)[0].length;a[0]=="	"&&i++;var l=a.match(/^ */)[0].length;if(l&&a[l]!="	"){var c=l-s;c>0&&!(s%c)&&!(l%c)&&(r[c]=(r[c]||0)+1),n[l]=(n[l]||0)+1}s=l;while(u<o&&a[a.length-1]=="\\")a=e[u++]}if(!n.length)return;var p=r.reduce(function(e,t){return e+t},0),d={score:0,length:0},v=0;for(var u=1;u<12;u++){if(u==1){v=h(u);var m=1}else var m=h(u)/v;r[u]&&(m+=r[u]/p),m>d.score&&(d={score:m,length:u})}if(d.score&&d.score>1.4)var g=d.length;if(i>v+1)return{ch:"	",length:g};if(v+1>i)return{ch:" ",length:g}},t.detectIndentation=function(e){var n=e.getLines(0,1e3),r=t.$detectIndentation(n)||{};return r.ch&&e.setUseSoftTabs(r.ch==" "),r.length&&e.setTabSize(r.length),r},t.trimTrailingSpace=function(e,t){var n=e.getDocument(),r=n.getAllLines(),i=t?-1:0;for(var s=0,o=r.length;s<o;s++){var u=r[s],a=u.search(/\s+$/);a>i&&n.removeInLine(s,a,u.length)}},t.convertIndentation=function(e,t,n){var i=e.getTabString()[0],s=e.getTabSize();n||(n=s),t||(t=i);var o=t=="	"?t:r.stringRepeat(t,n),u=e.doc,a=u.getAllLines(),f={},l={};for(var c=0,h=a.length;c<h;c++){var p=a[c],d=p.match(/^\s*/)[0];if(d){var v=e.$getStringScreenWidth(d)[0],m=Math.floor(v/s),g=v%s,y=f[m]||(f[m]=r.stringRepeat(o,m));y+=l[g]||(l[g]=r.stringRepeat(" ",g)),y!=d&&(u.removeInLine(c,0,d.length),u.insertInLine({row:c,column:0},y))}}e.setTabSize(n),e.setUseSoftTabs(t==" ")},t.$parseStringArg=function(e){var t={};/t/.test(e)?t.ch="	":/s/.test(e)&&(t.ch=" ");var n=e.match(/\d+/);return n&&(t.length=parseInt(n[0],10)),t},t.$parseArg=function(e){return e?typeof e=="string"?t.$parseStringArg(e):typeof e.text=="string"?t.$parseStringArg(e.text):e:{}},t.commands=[{name:"detectIndentation",exec:function(e){t.detectIndentation(e.session)}},{name:"trimTrailingSpace",exec:function(e){t.trimTrailingSpace(e.session)}},{name:"convertIndentation",exec:function(e,n){var r=t.$parseArg(n);t.convertIndentation(e.session,r.ch,r.length)}},{name:"setIndentation",exec:function(e,n){var r=t.$parseArg(n);r.length&&e.session.setTabSize(r.length),r.ch&&e.session.setUseSoftTabs(r.ch==" ")}}]}),function(){ace.require(["ace/ext/whitespace"],function(){})}()
\ No newline at end of file
diff --git a/app/assets/lib/ace/keybinding-emacs.js b/app/assets/lib/ace/keybinding-emacs.js
index 727d5e6d6..61482519b 100644
--- a/app/assets/lib/ace/keybinding-emacs.js
+++ b/app/assets/lib/ace/keybinding-emacs.js
@@ -1 +1 @@
-ace.define("ace/keyboard/emacs",["require","exports","module","ace/lib/dom","ace/incremental_search","ace/commands/incremental_search_commands","ace/keyboard/hash_handler","ace/lib/keys"],function(e,t,n){var r=e("../lib/dom");e("../incremental_search");var i=e("../commands/incremental_search_commands"),s=function(e,t){var n=this.scroller.getBoundingClientRect(),r=Math.floor((e+this.scrollLeft-n.left-this.$padding)/this.characterWidth),i=Math.floor((t+this.scrollTop-n.top)/this.lineHeight);return this.session.screenToDocumentPosition(i,r)},o=e("./hash_handler").HashHandler;t.handler=new o,t.handler.isEmacs=!0,t.handler.$id="ace/keyboard/emacs";var u=!1,a,f;t.handler.attach=function(e){u||(u=!0,r.importCssString("            .emacs-mode .ace_cursor{                border: 2px rgba(50,250,50,0.8) solid!important;                -moz-box-sizing: border-box!important;                -webkit-box-sizing: border-box!important;                box-sizing: border-box!important;                background-color: rgba(0,250,0,0.9);                opacity: 0.5;            }            .emacs-mode .ace_hidden-cursors .ace_cursor{                opacity: 1;                background-color: transparent;            }            .emacs-mode .ace_overwrite-cursors .ace_cursor {                opacity: 1;                background-color: transparent;                border-width: 0 0 2px 2px !important;            }            .emacs-mode .ace_text-layer {                z-index: 4            }            .emacs-mode .ace_cursor-layer {                z-index: 2            }","emacsMode")),a=e.session.$selectLongWords,e.session.$selectLongWords=!0,f=e.session.$useEmacsStyleLineStart,e.session.$useEmacsStyleLineStart=!0,e.session.$emacsMark=null,e.session.$emacsMarkRing=e.session.$emacsMarkRing||[],e.emacsMark=function(){return this.session.$emacsMark},e.setEmacsMark=function(e){this.session.$emacsMark=e},e.pushEmacsMark=function(e,t){var n=this.session.$emacsMark;n&&this.session.$emacsMarkRing.push(n),!e||t?this.setEmacsMark(e):this.session.$emacsMarkRing.push(e)},e.popEmacsMark=function(){var e=this.emacsMark();return e?(this.setEmacsMark(null),e):this.session.$emacsMarkRing.pop()},e.getLastEmacsMark=function(e){return this.session.$emacsMark||this.session.$emacsMarkRing.slice(-1)[0]},e.on("click",c),e.on("changeSession",l),e.renderer.screenToTextCoordinates=s,e.setStyle("emacs-mode"),e.commands.addCommands(v),t.handler.platform=e.commands.platform,e.$emacsModeHandler=this,e.addEventListener("copy",this.onCopy),e.addEventListener("paste",this.onPaste)},t.handler.detach=function(e){delete e.renderer.screenToTextCoordinates,e.session.$selectLongWords=a,e.session.$useEmacsStyleLineStart=f,e.removeEventListener("click",c),e.removeEventListener("changeSession",l),e.unsetStyle("emacs-mode"),e.commands.removeCommands(v),e.removeEventListener("copy",this.onCopy),e.removeEventListener("paste",this.onPaste)};var l=function(e){e.oldSession&&(e.oldSession.$selectLongWords=a,e.oldSession.$useEmacsStyleLineStart=f),a=e.session.$selectLongWords,e.session.$selectLongWords=!0,f=e.session.$useEmacsStyleLineStart,e.session.$useEmacsStyleLineStart=!0,e.session.hasOwnProperty("$emacsMark")||(e.session.$emacsMark=null),e.session.hasOwnProperty("$emacsMarkRing")||(e.session.$emacsMarkRing=[])},c=function(e){e.editor.session.$emacsMark=null},h=e("../lib/keys").KEY_MODS,p={C:"ctrl",S:"shift",M:"alt",CMD:"command"},d=["C-S-M-CMD","S-M-CMD","C-M-CMD","C-S-CMD","C-S-M","M-CMD","S-CMD","S-M","C-CMD","C-M","C-S","CMD","M","S","C"];d.forEach(function(e){var t=0;e.split("-").forEach(function(e){t|=h[p[e]]}),p[t]=e.toLowerCase()+"-"}),t.handler.onCopy=function(e,n){if(n.$handlesEmacsOnCopy)return;n.$handlesEmacsOnCopy=!0,t.handler.commands.killRingSave.exec(n),delete n.$handlesEmacsOnCopy},t.handler.onPaste=function(e,t){t.pushEmacsMark(t.getCursorPosition())},t.handler.bindKey=function(e,t){if(!e)return;var n=this.commandKeyBinding;e.split("|").forEach(function(e){e=e.toLowerCase(),n[e]=t;var r=e.split(" ").slice(0,-1);r.reduce(function(e,t,n){var r=e[n-1]?e[n-1]+" ":"";return e.concat([r+t])},[]).forEach(function(e){n[e]||(n[e]="null")})},this)},t.handler.handleKeyboard=function(e,t,n,r){var i=e.editor;if(t==-1){i.pushEmacsMark();if(e.count){var s=Array(e.count+1).join(n);return e.count=null,{command:"insertstring",args:s}}}if(n=="\0")return undefined;var o=p[t];if(o=="c-"||e.universalArgument){var u=String(e.count||0),a=parseInt(n[n.length-1]);if(typeof a=="number"&&!isNaN(a))return e.count=parseInt(u+a),{command:"null"};e.universalArgument&&(e.count=4)}e.universalArgument=!1,o&&(n=o+n),e.keyChain&&(n=e.keyChain+=" "+n);var f=this.commandKeyBinding[n];e.keyChain=f=="null"?n:"";if(!f)return undefined;if(f==="null")return{command:"null"};if(f==="universalArgument")return e.universalArgument=!0,{command:"null"};var l;typeof f!="string"&&(l=f.args,f.command&&(f=f.command),f==="goorselect"&&(f=i.emacsMark()?l[1]:l[0],l=null));if(typeof f=="string"){(f==="insertstring"||f==="splitline"||f==="togglecomment")&&i.pushEmacsMark(),f=this.commands[f]||i.commands.commands[f];if(!f)return undefined}!f.readonly&&!f.isYank&&(e.lastCommand=null);if(e.count){var a=e.count;e.count=0;if(!f||!f.handlesCount)return{args:l,command:{exec:function(e,t){for(var n=0;n<a;n++)f.exec(e,t)}}};l||(l={}),typeof l=="object"&&(l.count=a)}return{command:f,args:l}},t.emacsKeys={"Up|C-p":{command:"goorselect",args:["golineup","selectup"]},"Down|C-n":{command:"goorselect",args:["golinedown","selectdown"]},"Left|C-b":{command:"goorselect",args:["gotoleft","selectleft"]},"Right|C-f":{command:"goorselect",args:["gotoright","selectright"]},"C-Left|M-b":{command:"goorselect",args:["gotowordleft","selectwordleft"]},"C-Right|M-f":{command:"goorselect",args:["gotowordright","selectwordright"]},"Home|C-a":{command:"goorselect",args:["gotolinestart","selecttolinestart"]},"End|C-e":{command:"goorselect",args:["gotolineend","selecttolineend"]},"C-Home|S-M-,":{command:"goorselect",args:["gotostart","selecttostart"]},"C-End|S-M-.":{command:"goorselect",args:["gotoend","selecttoend"]},"S-Up|S-C-p":"selectup","S-Down|S-C-n":"selectdown","S-Left|S-C-b":"selectleft","S-Right|S-C-f":"selectright","S-C-Left|S-M-b":"selectwordleft","S-C-Right|S-M-f":"selectwordright","S-Home|S-C-a":"selecttolinestart","S-End|S-C-e":"selecttolineend","S-C-Home":"selecttostart","S-C-End":"selecttoend","C-l":"recenterTopBottom","M-s":"centerselection","M-g":"gotoline","C-x C-p":"selectall","C-Down":{command:"goorselect",args:["gotopagedown","selectpagedown"]},"C-Up":{command:"goorselect",args:["gotopageup","selectpageup"]},"PageDown|C-v":{command:"goorselect",args:["gotopagedown","selectpagedown"]},"PageUp|M-v":{command:"goorselect",args:["gotopageup","selectpageup"]},"S-C-Down":"selectpagedown","S-C-Up":"selectpageup","C-s":"iSearch","C-r":"iSearchBackwards","M-C-s":"findnext","M-C-r":"findprevious","S-M-5":"replace",Backspace:"backspace","Delete|C-d":"del","Return|C-m":{command:"insertstring",args:"\n"},"C-o":"splitline","M-d|C-Delete":{command:"killWord",args:"right"},"C-Backspace|M-Backspace|M-Delete":{command:"killWord",args:"left"},"C-k":"killLine","C-y|S-Delete":"yank","M-y":"yankRotate","C-g":"keyboardQuit","C-w":"killRegion","M-w":"killRingSave","C-Space":"setMark","C-x C-x":"exchangePointAndMark","C-t":"transposeletters","M-u":"touppercase","M-l":"tolowercase","M-/":"autocomplete","C-u":"universalArgument","M-;":"togglecomment","C-/|C-x u|S-C--|C-z":"undo","S-C-/|S-C-x u|C--|S-C-z":"redo","C-x r":"selectRectangularRegion","M-x":{command:"focusCommandLine",args:"M-x "}},t.handler.bindKeys(t.emacsKeys),t.handler.addCommands({recenterTopBottom:function(e){var t=e.renderer,n=t.$cursorLayer.getPixelPosition(),r=t.$size.scrollerHeight-t.lineHeight,i=t.scrollTop;Math.abs(n.top-i)<2?i=n.top-r:Math.abs(n.top-i-r*.5)<2?i=n.top:i=n.top-r*.5,e.session.setScrollTop(i)},selectRectangularRegion:function(e){e.multiSelect.toggleBlockSelection()},setMark:{exec:function(e,t){if(t&&t.count){var n=e.popEmacsMark();n&&e.selection.moveCursorToPosition(n);return}var n=e.emacsMark(),r=!0;if(r&&(n||!e.selection.isEmpty())){e.pushEmacsMark(),e.clearSelection();return}if(n){var i=e.getCursorPosition();if(e.selection.isEmpty()&&n.row==i.row&&n.column==i.column){e.pushEmacsMark();return}}n=e.getCursorPosition(),e.setEmacsMark(n),e.selection.setSelectionAnchor(n.row,n.column)},readonly:!0,handlesCount:!0,multiSelectAction:"forEach"},exchangePointAndMark:{exec:function(e,t){var n=e.selection;if(t.count){var r=e.getCursorPosition();n.clearSelection(),n.moveCursorToPosition(e.popEmacsMark()),e.pushEmacsMark(r);return}var i=e.getLastEmacsMark(),s=n.getRange();if(s.isEmpty()){n.selectToPosition(i);return}n.setSelectionRange(s,!n.isBackwards())},readonly:!0,handlesCount:!0,multiSelectAction:"forEach"},killWord:{exec:function(e,n){e.clearSelection(),n=="left"?e.selection.selectWordLeft():e.selection.selectWordRight();var r=e.getSelectionRange(),i=e.session.getTextRange(r);t.killRing.add(i),e.session.remove(r),e.clearSelection()},multiSelectAction:"forEach"},killLine:function(e){e.pushEmacsMark(null);var n=e.getCursorPosition();n.column==0&&e.session.doc.getLine(n.row).length==0?e.selection.selectLine():(e.clearSelection(),e.selection.selectLineEnd());var r=e.getSelectionRange(),i=e.session.getTextRange(r);t.killRing.add(i),e.session.remove(r),e.clearSelection()},yank:function(e){e.onPaste(t.killRing.get()||""),e.keyBinding.$data.lastCommand="yank"},yankRotate:function(e){if(e.keyBinding.$data.lastCommand!="yank")return;e.undo(),e.onPaste(t.killRing.rotate()),e.keyBinding.$data.lastCommand="yank"},killRegion:{exec:function(e){t.killRing.add(e.getCopyText()),e.commands.byName.cut.exec(e)},readonly:!0,multiSelectAction:"forEach"},killRingSave:{exec:function(e){t.killRing.add(e.getCopyText()),setTimeout(function(){var t=e.selection,n=t.getRange();e.pushEmacsMark(t.isBackwards()?n.end:n.start),t.clearSelection()},0)},readonly:!0},keyboardQuit:function(e){e.selection.clearSelection(),e.setEmacsMark(null)},focusCommandLine:function(e,t){e.showCommandLine&&e.showCommandLine(t)}}),t.handler.addCommands(i.iSearchStartCommands);var v=t.handler.commands;v.yank.isYank=!0,v.yankRotate.isYank=!0,t.killRing={$data:[],add:function(e){e&&this.$data.push(e),this.$data.length>30&&this.$data.shift()},get:function(e){return e=e||1,this.$data.slice(this.$data.length-e,this.$data.length).reverse().join("\n")},pop:function(){return this.$data.length>1&&this.$data.pop(),this.get()},rotate:function(){return this.$data.unshift(this.$data.pop()),this.get()}}}),ace.define("ace/incremental_search",["require","exports","module","ace/lib/oop","ace/range","ace/search","ace/search_highlight","ace/commands/incremental_search_commands","ace/lib/dom","ace/commands/command_manager","ace/editor","ace/config"],function(e,t,n){function f(){this.$options={wrap:!1,skipCurrent:!1},this.$keyboardHandler=new a(this)}var r=e("./lib/oop"),i=e("./range").Range,s=e("./search").Search,o=e("./search_highlight").SearchHighlight,u=e("./commands/incremental_search_commands"),a=u.IncrementalSearchKeyboardHandler;r.inherits(f,s),function(){this.activate=function(e,t){this.$editor=e,this.$startPos=this.$currentPos=e.getCursorPosition(),this.$options.needle="",this.$options.backwards=t,e.keyBinding.addKeyboardHandler(this.$keyboardHandler),this.$mousedownHandler=e.addEventListener("mousedown",this.onMouseDown.bind(this)),this.selectionFix(e),this.statusMessage(!0)},this.deactivate=function(e){this.cancelSearch(e),this.$editor.keyBinding.removeKeyboardHandler(this.$keyboardHandler),this.$mousedownHandler&&(this.$editor.removeEventListener("mousedown",this.$mousedownHandler),delete this.$mousedownHandler),this.message("")},this.selectionFix=function(e){e.selection.isEmpty()&&!e.session.$emacsMark&&e.clearSelection()},this.highlight=function(e){var t=this.$editor.session,n=t.$isearchHighlight=t.$isearchHighlight||t.addDynamicMarker(new o(null,"ace_isearch-result","text"));n.setRegexp(e),t._emit("changeBackMarker")},this.cancelSearch=function(e){var t=this.$editor;return this.$prevNeedle=this.$options.needle,this.$options.needle="",e?(t.moveCursorToPosition(this.$startPos),this.$currentPos=this.$startPos):t.pushEmacsMark&&t.pushEmacsMark(this.$startPos,!1),this.highlight(null),i.fromPoints(this.$currentPos,this.$currentPos)},this.highlightAndFindWithNeedle=function(e,t){if(!this.$editor)return null;var n=this.$options;t&&(n.needle=t.call(this,n.needle||"")||"");if(n.needle.length===0)return this.statusMessage(!0),this.cancelSearch(!0);n.start=this.$currentPos;var r=this.$editor.session,s=this.find(r);return s&&(n.backwards&&(s=i.fromPoints(s.end,s.start)),this.$editor.moveCursorToPosition(s.end),e&&(this.$currentPos=s.end),this.highlight(n.re)),this.statusMessage(s),s},this.addChar=function(e){return this.highlightAndFindWithNeedle(!1,function(t){return t+e})},this.removeChar=function(e){return this.highlightAndFindWithNeedle(!1,function(e){return e.length>0?e.substring(0,e.length-1):e})},this.next=function(e){return e=e||{},this.$options.backwards=!!e.backwards,this.$currentPos=this.$editor.getCursorPosition(),this.highlightAndFindWithNeedle(!0,function(t){return e.useCurrentOrPrevSearch&&t.length===0?this.$prevNeedle||"":t})},this.onMouseDown=function(e){return this.deactivate(),!0},this.statusMessage=function(e){var t=this.$options,n="";n+=t.backwards?"reverse-":"",n+="isearch: "+t.needle,n+=e?"":" (not found)",this.message(n)},this.message=function(e){this.$editor.showCommandLine?(this.$editor.showCommandLine(e),this.$editor.focus()):console.log(e)}}.call(f.prototype),t.IncrementalSearch=f;var l=e("./lib/dom");l.importCssString&&l.importCssString(".ace_marker-layer .ace_isearch-result {  position: absolute;  z-index: 6;  -moz-box-sizing: border-box;  -webkit-box-sizing: border-box;  box-sizing: border-box;}div.ace_isearch-result {  border-radius: 4px;  background-color: rgba(255, 200, 0, 0.5);  box-shadow: 0 0 4px rgb(255, 200, 0);}.ace_dark div.ace_isearch-result {  background-color: rgb(100, 110, 160);  box-shadow: 0 0 4px rgb(80, 90, 140);}","incremental-search-highlighting");var c=e("./commands/command_manager");(function(){this.setupIncrementalSearch=function(e,t){if(this.usesIncrementalSearch==t)return;this.usesIncrementalSearch=t;var n=u.iSearchStartCommands,r=t?"addCommands":"removeCommands";this[r](n)}}).call(c.CommandManager.prototype);var h=e("./editor").Editor;e("./config").defineOptions(h.prototype,"editor",{useIncrementalSearch:{set:function(e){this.keyBinding.$handlers.forEach(function(t){t.setupIncrementalSearch&&t.setupIncrementalSearch(this,e)}),this._emit("incrementalSearchSettingChanged",{isEnabled:e})}}})}),ace.define("ace/commands/incremental_search_commands",["require","exports","module","ace/config","ace/lib/oop","ace/keyboard/hash_handler","ace/commands/occur_commands"],function(e,t,n){function u(e){this.$iSearch=e}var r=e("../config"),i=e("../lib/oop"),s=e("../keyboard/hash_handler").HashHandler,o=e("./occur_commands").occurStartCommand;t.iSearchStartCommands=[{name:"iSearch",bindKey:{win:"Ctrl-F",mac:"Command-F"},exec:function(e,t){r.loadModule(["core","ace/incremental_search"],function(n){var r=n.iSearch=n.iSearch||new n.IncrementalSearch;r.activate(e,t.backwards),t.jumpToFirstMatch&&r.next(t)})},readOnly:!0},{name:"iSearchBackwards",exec:function(e,t){e.execCommand("iSearch",{backwards:!0})},readOnly:!0},{name:"iSearchAndGo",bindKey:{win:"Ctrl-K",mac:"Command-G"},exec:function(e,t){e.execCommand("iSearch",{jumpToFirstMatch:!0,useCurrentOrPrevSearch:!0})},readOnly:!0},{name:"iSearchBackwardsAndGo",bindKey:{win:"Ctrl-Shift-K",mac:"Command-Shift-G"},exec:function(e){e.execCommand("iSearch",{jumpToFirstMatch:!0,backwards:!0,useCurrentOrPrevSearch:!0})},readOnly:!0}],t.iSearchCommands=[{name:"restartSearch",bindKey:{win:"Ctrl-F",mac:"Command-F"},exec:function(e){e.cancelSearch(!0)},readOnly:!0,isIncrementalSearchCommand:!0},{name:"searchForward",bindKey:{win:"Ctrl-S|Ctrl-K",mac:"Ctrl-S|Command-G"},exec:function(e,t){t.useCurrentOrPrevSearch=!0,e.next(t)},readOnly:!0,isIncrementalSearchCommand:!0},{name:"searchBackward",bindKey:{win:"Ctrl-R|Ctrl-Shift-K",mac:"Ctrl-R|Command-Shift-G"},exec:function(e,t){t.useCurrentOrPrevSearch=!0,t.backwards=!0,e.next(t)},readOnly:!0,isIncrementalSearchCommand:!0},{name:"extendSearchTerm",exec:function(e,t){e.addChar(t)},readOnly:!0,isIncrementalSearchCommand:!0},{name:"extendSearchTermSpace",bindKey:"space",exec:function(e){e.addChar(" ")},readOnly:!0,isIncrementalSearchCommand:!0},{name:"shrinkSearchTerm",bindKey:"backspace",exec:function(e){e.removeChar()},readOnly:!0,isIncrementalSearchCommand:!0},{name:"confirmSearch",bindKey:"return",exec:function(e){e.deactivate()},readOnly:!0,isIncrementalSearchCommand:!0},{name:"cancelSearch",bindKey:"esc|Ctrl-G",exec:function(e){e.deactivate(!0)},readOnly:!0,isIncrementalSearchCommand:!0},{name:"occurisearch",bindKey:"Ctrl-O",exec:function(e){var t=i.mixin({},e.$options);e.deactivate(),o.exec(e.$editor,t)},readOnly:!0,isIncrementalSearchCommand:!0}],i.inherits(u,s),function(){this.attach=function(e){var n=this.$iSearch;s.call(this,t.iSearchCommands,e.commands.platform),this.$commandExecHandler=e.commands.addEventListener("exec",function(e){return e.command.isIncrementalSearchCommand?(e.stopPropagation(),e.preventDefault(),e.command.exec(n,e.args||{})):undefined})},this.detach=function(e){if(!this.$commandExecHandler)return;e.commands.removeEventListener("exec",this.$commandExecHandler),delete this.$commandExecHandler};var e=this.handleKeyboard;this.handleKeyboard=function(t,n,r,i){var s=e.call(this,t,n,r,i);if(s.command)return s;if(n==-1){var o=this.commands.extendSearchTerm;if(o)return{command:o,args:r}}return{command:"null",passEvent:n==0||n==4}}}.call(u.prototype),t.IncrementalSearchKeyboardHandler=u}),ace.define("ace/commands/occur_commands",["require","exports","module","ace/config","ace/occur","ace/keyboard/hash_handler","ace/lib/oop"],function(e,t,n){function f(){}var r=e("../config"),i=e("../occur").Occur,s={name:"occur",exec:function(e,t){var n=!!e.session.$occur,r=(new i).enter(e,t);r&&!n&&f.installIn(e)},readOnly:!0},o=[{name:"occurexit",bindKey:"esc|Ctrl-G",exec:function(e){var t=e.session.$occur;if(!t)return;t.exit(e,{}),e.session.$occur||f.uninstallFrom(e)},readOnly:!0},{name:"occuraccept",bindKey:"enter",exec:function(e){var t=e.session.$occur;if(!t)return;t.exit(e,{translatePosition:!0}),e.session.$occur||f.uninstallFrom(e)},readOnly:!0}],u=e("../keyboard/hash_handler").HashHandler,a=e("../lib/oop");a.inherits(f,u),function(){this.isOccurHandler=!0,this.attach=function(e){u.call(this,o,e.commands.platform),this.$editor=e};var e=this.handleKeyboard;this.handleKeyboard=function(t,n,r,i){var s=e.call(this,t,n,r,i);return s&&s.command?s:undefined}}.call(f.prototype),f.installIn=function(e){var t=new this;e.keyBinding.addKeyboardHandler(t),e.commands.addCommands(o)},f.uninstallFrom=function(e){e.commands.removeCommands(o);var t=e.getKeyboardHandler();t.isOccurHandler&&e.keyBinding.removeKeyboardHandler(t)},t.occurStartCommand=s}),ace.define("ace/occur",["require","exports","module","ace/lib/oop","ace/range","ace/search","ace/edit_session","ace/search_highlight","ace/lib/dom"],function(e,t,n){function a(){}var r=e("./lib/oop"),i=e("./range").Range,s=e("./search").Search,o=e("./edit_session").EditSession,u=e("./search_highlight").SearchHighlight;r.inherits(a,s),function(){this.enter=function(e,t){if(!t.needle)return!1;var n=e.getCursorPosition();this.displayOccurContent(e,t);var r=this.originalToOccurPosition(e.session,n);return e.moveCursorToPosition(r),!0},this.exit=function(e,t){var n=t.translatePosition&&e.getCursorPosition(),r=n&&this.occurToOriginalPosition(e.session,n);return this.displayOriginalContent(e),r&&e.moveCursorToPosition(r),!0},this.highlight=function(e,t){var n=e.$occurHighlight=e.$occurHighlight||e.addDynamicMarker(new u(null,"ace_occur-highlight","text"));n.setRegexp(t),e._emit("changeBackMarker")},this.displayOccurContent=function(e,t){this.$originalSession=e.session;var n=this.matchingLines(e.session,t),r=n.map(function(e){return e.content}),i=new o(r.join("\n"));i.$occur=this,i.$occurMatchingLines=n,e.setSession(i),this.highlight(i,t.re),i._emit("changeBackMarker")},this.displayOriginalContent=function(e){e.setSession(this.$originalSession)},this.originalToOccurPosition=function(e,t){var n=e.$occurMatchingLines,r={row:0,column:0};if(!n)return r;for(var i=0;i<n.length;i++)if(n[i].row===t.row)return{row:i,column:t.column};return r},this.occurToOriginalPosition=function(e,t){var n=e.$occurMatchingLines;return!n||!n[t.row]?t:{row:n[t.row].row,column:t.column}},this.matchingLines=function(e,t){t=r.mixin({},t);if(!e||!t.needle)return[];var n=new s;return n.set(t),n.findAll(e).reduce(function(t,n){var r=n.start.row,i=t[t.length-1];return i&&i.row===r?t:t.concat({row:r,content:e.getLine(r)})},[])}}.call(a.prototype);var f=e("./lib/dom");f.importCssString(".ace_occur-highlight {\n    border-radius: 4px;\n    background-color: rgba(87, 255, 8, 0.25);\n    position: absolute;\n    z-index: 4;\n    -moz-box-sizing: border-box;\n    -webkit-box-sizing: border-box;\n    box-sizing: border-box;\n    box-shadow: 0 0 4px rgb(91, 255, 50);\n}\n.ace_dark .ace_occur-highlight {\n    background-color: rgb(80, 140, 85);\n    box-shadow: 0 0 4px rgb(60, 120, 70);\n}\n","incremental-occur-highlighting"),t.Occur=a})
\ No newline at end of file
+ace.define("ace/keyboard/emacs",["require","exports","module","ace/lib/dom","ace/incremental_search","ace/commands/incremental_search_commands","ace/keyboard/hash_handler","ace/lib/keys"],function(e,t,n){var r=e("../lib/dom");e("../incremental_search");var i=e("../commands/incremental_search_commands"),s=function(e,t){var n=this.scroller.getBoundingClientRect(),r=Math.floor((e+this.scrollLeft-n.left-this.$padding)/this.characterWidth),i=Math.floor((t+this.scrollTop-n.top)/this.lineHeight);return this.session.screenToDocumentPosition(i,r)},o=e("./hash_handler").HashHandler;t.handler=new o,t.handler.isEmacs=!0,t.handler.$id="ace/keyboard/emacs";var u=!1,a,f;t.handler.attach=function(e){u||(u=!0,r.importCssString("            .emacs-mode .ace_cursor{                border: 2px rgba(50,250,50,0.8) solid!important;                -moz-box-sizing: border-box!important;                -webkit-box-sizing: border-box!important;                box-sizing: border-box!important;                background-color: rgba(0,250,0,0.9);                opacity: 0.5;            }            .emacs-mode .ace_hidden-cursors .ace_cursor{                opacity: 1;                background-color: transparent;            }            .emacs-mode .ace_overwrite-cursors .ace_cursor {                opacity: 1;                background-color: transparent;                border-width: 0 0 2px 2px !important;            }            .emacs-mode .ace_text-layer {                z-index: 4            }            .emacs-mode .ace_cursor-layer {                z-index: 2            }","emacsMode")),a=e.session.$selectLongWords,e.session.$selectLongWords=!0,f=e.session.$useEmacsStyleLineStart,e.session.$useEmacsStyleLineStart=!0,e.session.$emacsMark=null,e.session.$emacsMarkRing=e.session.$emacsMarkRing||[],e.emacsMark=function(){return this.session.$emacsMark},e.setEmacsMark=function(e){this.session.$emacsMark=e},e.pushEmacsMark=function(e,t){var n=this.session.$emacsMark;n&&this.session.$emacsMarkRing.push(n),!e||t?this.setEmacsMark(e):this.session.$emacsMarkRing.push(e)},e.popEmacsMark=function(){var e=this.emacsMark();return e?(this.setEmacsMark(null),e):this.session.$emacsMarkRing.pop()},e.getLastEmacsMark=function(e){return this.session.$emacsMark||this.session.$emacsMarkRing.slice(-1)[0]},e.on("click",c),e.on("changeSession",l),e.renderer.screenToTextCoordinates=s,e.setStyle("emacs-mode"),e.commands.addCommands(v),t.handler.platform=e.commands.platform,e.$emacsModeHandler=this,e.addEventListener("copy",this.onCopy),e.addEventListener("paste",this.onPaste)},t.handler.detach=function(e){delete e.renderer.screenToTextCoordinates,e.session.$selectLongWords=a,e.session.$useEmacsStyleLineStart=f,e.removeEventListener("click",c),e.removeEventListener("changeSession",l),e.unsetStyle("emacs-mode"),e.commands.removeCommands(v),e.removeEventListener("copy",this.onCopy),e.removeEventListener("paste",this.onPaste)};var l=function(e){e.oldSession&&(e.oldSession.$selectLongWords=a,e.oldSession.$useEmacsStyleLineStart=f),a=e.session.$selectLongWords,e.session.$selectLongWords=!0,f=e.session.$useEmacsStyleLineStart,e.session.$useEmacsStyleLineStart=!0,e.session.hasOwnProperty("$emacsMark")||(e.session.$emacsMark=null),e.session.hasOwnProperty("$emacsMarkRing")||(e.session.$emacsMarkRing=[])},c=function(e){e.editor.session.$emacsMark=null},h=e("../lib/keys").KEY_MODS,p={C:"ctrl",S:"shift",M:"alt",CMD:"command"},d=["C-S-M-CMD","S-M-CMD","C-M-CMD","C-S-CMD","C-S-M","M-CMD","S-CMD","S-M","C-CMD","C-M","C-S","CMD","M","S","C"];d.forEach(function(e){var t=0;e.split("-").forEach(function(e){t|=h[p[e]]}),p[t]=e.toLowerCase()+"-"}),t.handler.onCopy=function(e,n){if(n.$handlesEmacsOnCopy)return;n.$handlesEmacsOnCopy=!0,t.handler.commands.killRingSave.exec(n),delete n.$handlesEmacsOnCopy},t.handler.onPaste=function(e,t){t.pushEmacsMark(t.getCursorPosition())},t.handler.bindKey=function(e,t){if(!e)return;var n=this.commandKeyBinding;e.split("|").forEach(function(e){e=e.toLowerCase(),n[e]=t;var r=e.split(" ").slice(0,-1);r.reduce(function(e,t,n){var r=e[n-1]?e[n-1]+" ":"";return e.concat([r+t])},[]).forEach(function(e){n[e]||(n[e]="null")})},this)},t.handler.handleKeyboard=function(e,t,n,r){if(r===-1)return undefined;var i=e.editor;if(t==-1){i.pushEmacsMark();if(e.count){var s=(new Array(e.count+1)).join(n);return e.count=null,{command:"insertstring",args:s}}}if(n=="\0")return undefined;var o=p[t];if(o=="c-"||e.universalArgument){var u=String(e.count||0),a=parseInt(n[n.length-1]);if(typeof a=="number"&&!isNaN(a))return e.count=parseInt(u+a),{command:"null"};e.universalArgument&&(e.count=4)}e.universalArgument=!1,o&&(n=o+n),e.keyChain&&(n=e.keyChain+=" "+n);var f=this.commandKeyBinding[n];e.keyChain=f=="null"?n:"";if(!f)return undefined;if(f==="null")return{command:"null"};if(f==="universalArgument")return e.universalArgument=!0,{command:"null"};var l;typeof f!="string"&&(l=f.args,f.command&&(f=f.command),f==="goorselect"&&(f=i.emacsMark()?l[1]:l[0],l=null));if(typeof f=="string"){(f==="insertstring"||f==="splitline"||f==="togglecomment")&&i.pushEmacsMark(),f=this.commands[f]||i.commands.commands[f];if(!f)return undefined}!f.readonly&&!f.isYank&&(e.lastCommand=null);if(e.count){var a=e.count;e.count=0;if(!f||!f.handlesCount)return{args:l,command:{exec:function(e,t){for(var n=0;n<a;n++)f.exec(e,t)}}};l||(l={}),typeof l=="object"&&(l.count=a)}return{command:f,args:l}},t.emacsKeys={"Up|C-p":{command:"goorselect",args:["golineup","selectup"]},"Down|C-n":{command:"goorselect",args:["golinedown","selectdown"]},"Left|C-b":{command:"goorselect",args:["gotoleft","selectleft"]},"Right|C-f":{command:"goorselect",args:["gotoright","selectright"]},"C-Left|M-b":{command:"goorselect",args:["gotowordleft","selectwordleft"]},"C-Right|M-f":{command:"goorselect",args:["gotowordright","selectwordright"]},"Home|C-a":{command:"goorselect",args:["gotolinestart","selecttolinestart"]},"End|C-e":{command:"goorselect",args:["gotolineend","selecttolineend"]},"C-Home|S-M-,":{command:"goorselect",args:["gotostart","selecttostart"]},"C-End|S-M-.":{command:"goorselect",args:["gotoend","selecttoend"]},"S-Up|S-C-p":"selectup","S-Down|S-C-n":"selectdown","S-Left|S-C-b":"selectleft","S-Right|S-C-f":"selectright","S-C-Left|S-M-b":"selectwordleft","S-C-Right|S-M-f":"selectwordright","S-Home|S-C-a":"selecttolinestart","S-End|S-C-e":"selecttolineend","S-C-Home":"selecttostart","S-C-End":"selecttoend","C-l":"recenterTopBottom","M-s":"centerselection","M-g":"gotoline","C-x C-p":"selectall","C-Down":{command:"goorselect",args:["gotopagedown","selectpagedown"]},"C-Up":{command:"goorselect",args:["gotopageup","selectpageup"]},"PageDown|C-v":{command:"goorselect",args:["gotopagedown","selectpagedown"]},"PageUp|M-v":{command:"goorselect",args:["gotopageup","selectpageup"]},"S-C-Down":"selectpagedown","S-C-Up":"selectpageup","C-s":"iSearch","C-r":"iSearchBackwards","M-C-s":"findnext","M-C-r":"findprevious","S-M-5":"replace",Backspace:"backspace","Delete|C-d":"del","Return|C-m":{command:"insertstring",args:"\n"},"C-o":"splitline","M-d|C-Delete":{command:"killWord",args:"right"},"C-Backspace|M-Backspace|M-Delete":{command:"killWord",args:"left"},"C-k":"killLine","C-y|S-Delete":"yank","M-y":"yankRotate","C-g":"keyboardQuit","C-w":"killRegion","M-w":"killRingSave","C-Space":"setMark","C-x C-x":"exchangePointAndMark","C-t":"transposeletters","M-u":"touppercase","M-l":"tolowercase","M-/":"autocomplete","C-u":"universalArgument","M-;":"togglecomment","C-/|C-x u|S-C--|C-z":"undo","S-C-/|S-C-x u|C--|S-C-z":"redo","C-x r":"selectRectangularRegion","M-x":{command:"focusCommandLine",args:"M-x "}},t.handler.bindKeys(t.emacsKeys),t.handler.addCommands({recenterTopBottom:function(e){var t=e.renderer,n=t.$cursorLayer.getPixelPosition(),r=t.$size.scrollerHeight-t.lineHeight,i=t.scrollTop;Math.abs(n.top-i)<2?i=n.top-r:Math.abs(n.top-i-r*.5)<2?i=n.top:i=n.top-r*.5,e.session.setScrollTop(i)},selectRectangularRegion:function(e){e.multiSelect.toggleBlockSelection()},setMark:{exec:function(e,t){if(t&&t.count){var n=e.popEmacsMark();n&&e.selection.moveCursorToPosition(n);return}var n=e.emacsMark(),r=!0;if(r&&(n||!e.selection.isEmpty())){e.pushEmacsMark(),e.clearSelection();return}if(n){var i=e.getCursorPosition();if(e.selection.isEmpty()&&n.row==i.row&&n.column==i.column){e.pushEmacsMark();return}}n=e.getCursorPosition(),e.setEmacsMark(n),e.selection.setSelectionAnchor(n.row,n.column)},readonly:!0,handlesCount:!0,multiSelectAction:"forEach"},exchangePointAndMark:{exec:function(e,t){var n=e.selection;if(t.count){var r=e.getCursorPosition();n.clearSelection(),n.moveCursorToPosition(e.popEmacsMark()),e.pushEmacsMark(r);return}var i=e.getLastEmacsMark(),s=n.getRange();if(s.isEmpty()){n.selectToPosition(i);return}n.setSelectionRange(s,!n.isBackwards())},readonly:!0,handlesCount:!0,multiSelectAction:"forEach"},killWord:{exec:function(e,n){e.clearSelection(),n=="left"?e.selection.selectWordLeft():e.selection.selectWordRight();var r=e.getSelectionRange(),i=e.session.getTextRange(r);t.killRing.add(i),e.session.remove(r),e.clearSelection()},multiSelectAction:"forEach"},killLine:function(e){e.pushEmacsMark(null);var n=e.getCursorPosition();n.column===0&&e.session.doc.getLine(n.row).length===0?e.selection.selectLine():(e.clearSelection(),e.selection.selectLineEnd());var r=e.getSelectionRange(),i=e.session.getTextRange(r);t.killRing.add(i),e.session.remove(r),e.clearSelection()},yank:function(e){e.onPaste(t.killRing.get()||""),e.keyBinding.$data.lastCommand="yank"},yankRotate:function(e){if(e.keyBinding.$data.lastCommand!="yank")return;e.undo(),e.onPaste(t.killRing.rotate()),e.keyBinding.$data.lastCommand="yank"},killRegion:{exec:function(e){t.killRing.add(e.getCopyText()),e.commands.byName.cut.exec(e)},readonly:!0,multiSelectAction:"forEach"},killRingSave:{exec:function(e){t.killRing.add(e.getCopyText()),setTimeout(function(){var t=e.selection,n=t.getRange();e.pushEmacsMark(t.isBackwards()?n.end:n.start),t.clearSelection()},0)},readonly:!0},keyboardQuit:function(e){e.selection.clearSelection(),e.setEmacsMark(null)},focusCommandLine:function(e,t){e.showCommandLine&&e.showCommandLine(t)}}),t.handler.addCommands(i.iSearchStartCommands);var v=t.handler.commands;v.yank.isYank=!0,v.yankRotate.isYank=!0,t.killRing={$data:[],add:function(e){e&&this.$data.push(e),this.$data.length>30&&this.$data.shift()},get:function(e){return e=e||1,this.$data.slice(this.$data.length-e,this.$data.length).reverse().join("\n")},pop:function(){return this.$data.length>1&&this.$data.pop(),this.get()},rotate:function(){return this.$data.unshift(this.$data.pop()),this.get()}}}),ace.define("ace/incremental_search",["require","exports","module","ace/lib/oop","ace/range","ace/search","ace/search_highlight","ace/commands/incremental_search_commands","ace/lib/dom","ace/commands/command_manager","ace/editor","ace/config"],function(e,t,n){function f(){this.$options={wrap:!1,skipCurrent:!1},this.$keyboardHandler=new a(this)}var r=e("./lib/oop"),i=e("./range").Range,s=e("./search").Search,o=e("./search_highlight").SearchHighlight,u=e("./commands/incremental_search_commands"),a=u.IncrementalSearchKeyboardHandler;r.inherits(f,s),function(){this.activate=function(e,t){this.$editor=e,this.$startPos=this.$currentPos=e.getCursorPosition(),this.$options.needle="",this.$options.backwards=t,e.keyBinding.addKeyboardHandler(this.$keyboardHandler),this.$originalEditorOnPaste=e.onPaste,e.onPaste=this.onPaste.bind(this),this.$mousedownHandler=e.addEventListener("mousedown",this.onMouseDown.bind(this)),this.selectionFix(e),this.statusMessage(!0)},this.deactivate=function(e){this.cancelSearch(e);var t=this.$editor;t.keyBinding.removeKeyboardHandler(this.$keyboardHandler),this.$mousedownHandler&&(t.removeEventListener("mousedown",this.$mousedownHandler),delete this.$mousedownHandler),t.onPaste=this.$originalEditorOnPaste,this.message("")},this.selectionFix=function(e){e.selection.isEmpty()&&!e.session.$emacsMark&&e.clearSelection()},this.highlight=function(e){var t=this.$editor.session,n=t.$isearchHighlight=t.$isearchHighlight||t.addDynamicMarker(new o(null,"ace_isearch-result","text"));n.setRegexp(e),t._emit("changeBackMarker")},this.cancelSearch=function(e){var t=this.$editor;return this.$prevNeedle=this.$options.needle,this.$options.needle="",e?(t.moveCursorToPosition(this.$startPos),this.$currentPos=this.$startPos):t.pushEmacsMark&&t.pushEmacsMark(this.$startPos,!1),this.highlight(null),i.fromPoints(this.$currentPos,this.$currentPos)},this.highlightAndFindWithNeedle=function(e,t){if(!this.$editor)return null;var n=this.$options;t&&(n.needle=t.call(this,n.needle||"")||"");if(n.needle.length===0)return this.statusMessage(!0),this.cancelSearch(!0);n.start=this.$currentPos;var r=this.$editor.session,s=this.find(r);return s&&(n.backwards&&(s=i.fromPoints(s.end,s.start)),this.$editor.moveCursorToPosition(s.end),e&&(this.$currentPos=s.end),this.highlight(n.re)),this.statusMessage(s),s},this.addString=function(e){return this.highlightAndFindWithNeedle(!1,function(t){return t+e})},this.removeChar=function(e){return this.highlightAndFindWithNeedle(!1,function(e){return e.length>0?e.substring(0,e.length-1):e})},this.next=function(e){return e=e||{},this.$options.backwards=!!e.backwards,this.$currentPos=this.$editor.getCursorPosition(),this.highlightAndFindWithNeedle(!0,function(t){return e.useCurrentOrPrevSearch&&t.length===0?this.$prevNeedle||"":t})},this.onMouseDown=function(e){return this.deactivate(),!0},this.onPaste=function(e){this.addString(e)},this.statusMessage=function(e){var t=this.$options,n="";n+=t.backwards?"reverse-":"",n+="isearch: "+t.needle,n+=e?"":" (not found)",this.message(n)},this.message=function(e){this.$editor.showCommandLine?(this.$editor.showCommandLine(e),this.$editor.focus()):console.log(e)}}.call(f.prototype),t.IncrementalSearch=f;var l=e("./lib/dom");l.importCssString&&l.importCssString(".ace_marker-layer .ace_isearch-result {  position: absolute;  z-index: 6;  -moz-box-sizing: border-box;  -webkit-box-sizing: border-box;  box-sizing: border-box;}div.ace_isearch-result {  border-radius: 4px;  background-color: rgba(255, 200, 0, 0.5);  box-shadow: 0 0 4px rgb(255, 200, 0);}.ace_dark div.ace_isearch-result {  background-color: rgb(100, 110, 160);  box-shadow: 0 0 4px rgb(80, 90, 140);}","incremental-search-highlighting");var c=e("./commands/command_manager");(function(){this.setupIncrementalSearch=function(e,t){if(this.usesIncrementalSearch==t)return;this.usesIncrementalSearch=t;var n=u.iSearchStartCommands,r=t?"addCommands":"removeCommands";this[r](n)}}).call(c.CommandManager.prototype);var h=e("./editor").Editor;e("./config").defineOptions(h.prototype,"editor",{useIncrementalSearch:{set:function(e){this.keyBinding.$handlers.forEach(function(t){t.setupIncrementalSearch&&t.setupIncrementalSearch(this,e)}),this._emit("incrementalSearchSettingChanged",{isEnabled:e})}}})}),ace.define("ace/commands/incremental_search_commands",["require","exports","module","ace/config","ace/lib/oop","ace/keyboard/hash_handler","ace/commands/occur_commands"],function(e,t,n){function u(e){this.$iSearch=e}var r=e("../config"),i=e("../lib/oop"),s=e("../keyboard/hash_handler").HashHandler,o=e("./occur_commands").occurStartCommand;t.iSearchStartCommands=[{name:"iSearch",bindKey:{win:"Ctrl-F",mac:"Command-F"},exec:function(e,t){r.loadModule(["core","ace/incremental_search"],function(n){var r=n.iSearch=n.iSearch||new n.IncrementalSearch;r.activate(e,t.backwards),t.jumpToFirstMatch&&r.next(t)})},readOnly:!0},{name:"iSearchBackwards",exec:function(e,t){e.execCommand("iSearch",{backwards:!0})},readOnly:!0},{name:"iSearchAndGo",bindKey:{win:"Ctrl-K",mac:"Command-G"},exec:function(e,t){e.execCommand("iSearch",{jumpToFirstMatch:!0,useCurrentOrPrevSearch:!0})},readOnly:!0},{name:"iSearchBackwardsAndGo",bindKey:{win:"Ctrl-Shift-K",mac:"Command-Shift-G"},exec:function(e){e.execCommand("iSearch",{jumpToFirstMatch:!0,backwards:!0,useCurrentOrPrevSearch:!0})},readOnly:!0}],t.iSearchCommands=[{name:"restartSearch",bindKey:{win:"Ctrl-F",mac:"Command-F"},exec:function(e){e.cancelSearch(!0)},readOnly:!0,isIncrementalSearchCommand:!0},{name:"searchForward",bindKey:{win:"Ctrl-S|Ctrl-K",mac:"Ctrl-S|Command-G"},exec:function(e,t){t.useCurrentOrPrevSearch=!0,e.next(t)},readOnly:!0,isIncrementalSearchCommand:!0},{name:"searchBackward",bindKey:{win:"Ctrl-R|Ctrl-Shift-K",mac:"Ctrl-R|Command-Shift-G"},exec:function(e,t){t.useCurrentOrPrevSearch=!0,t.backwards=!0,e.next(t)},readOnly:!0,isIncrementalSearchCommand:!0},{name:"extendSearchTerm",exec:function(e,t){e.addString(t)},readOnly:!0,isIncrementalSearchCommand:!0},{name:"extendSearchTermSpace",bindKey:"space",exec:function(e){e.addString(" ")},readOnly:!0,isIncrementalSearchCommand:!0},{name:"shrinkSearchTerm",bindKey:"backspace",exec:function(e){e.removeChar()},readOnly:!0,isIncrementalSearchCommand:!0},{name:"confirmSearch",bindKey:"return",exec:function(e){e.deactivate()},readOnly:!0,isIncrementalSearchCommand:!0},{name:"cancelSearch",bindKey:"esc|Ctrl-G",exec:function(e){e.deactivate(!0)},readOnly:!0,isIncrementalSearchCommand:!0},{name:"occurisearch",bindKey:"Ctrl-O",exec:function(e){var t=i.mixin({},e.$options);e.deactivate(),o.exec(e.$editor,t)},readOnly:!0,isIncrementalSearchCommand:!0},{name:"yankNextWord",bindKey:"Ctrl-w",exec:function(e){var t=e.$editor,n=t.selection.getRangeOfMovements(function(e){e.moveCursorWordRight()}),r=t.session.getTextRange(n);e.addString(r)},readOnly:!0,isIncrementalSearchCommand:!0},{name:"yankNextChar",bindKey:"Ctrl-Alt-y",exec:function(e){var t=e.$editor,n=t.selection.getRangeOfMovements(function(e){e.moveCursorRight()}),r=t.session.getTextRange(n);e.addString(r)},readOnly:!0,isIncrementalSearchCommand:!0},{name:"recenterTopBottom",bindKey:"Ctrl-l",exec:function(e){e.$editor.execCommand("recenterTopBottom")},readOnly:!0,isIncrementalSearchCommand:!0}],i.inherits(u,s),function(){this.attach=function(e){var n=this.$iSearch;s.call(this,t.iSearchCommands,e.commands.platform),this.$commandExecHandler=e.commands.addEventListener("exec",function(e){return e.command.isIncrementalSearchCommand?(e.stopPropagation(),e.preventDefault(),e.command.exec(n,e.args||{})):undefined})},this.detach=function(e){if(!this.$commandExecHandler)return;e.commands.removeEventListener("exec",this.$commandExecHandler),delete this.$commandExecHandler};var e=this.handleKeyboard;this.handleKeyboard=function(t,n,r,i){if((n===1||n===8)&&r==="v"||n===1&&r==="y")return null;var s=e.call(this,t,n,r,i);if(s.command)return s;if(n==-1){var o=this.commands.extendSearchTerm;if(o)return{command:o,args:r}}return{command:"null",passEvent:n==0||n==4}}}.call(u.prototype),t.IncrementalSearchKeyboardHandler=u}),ace.define("ace/commands/occur_commands",["require","exports","module","ace/config","ace/occur","ace/keyboard/hash_handler","ace/lib/oop"],function(e,t,n){function f(){}var r=e("../config"),i=e("../occur").Occur,s={name:"occur",exec:function(e,t){var n=!!e.session.$occur,r=(new i).enter(e,t);r&&!n&&f.installIn(e)},readOnly:!0},o=[{name:"occurexit",bindKey:"esc|Ctrl-G",exec:function(e){var t=e.session.$occur;if(!t)return;t.exit(e,{}),e.session.$occur||f.uninstallFrom(e)},readOnly:!0},{name:"occuraccept",bindKey:"enter",exec:function(e){var t=e.session.$occur;if(!t)return;t.exit(e,{translatePosition:!0}),e.session.$occur||f.uninstallFrom(e)},readOnly:!0}],u=e("../keyboard/hash_handler").HashHandler,a=e("../lib/oop");a.inherits(f,u),function(){this.isOccurHandler=!0,this.attach=function(e){u.call(this,o,e.commands.platform),this.$editor=e};var e=this.handleKeyboard;this.handleKeyboard=function(t,n,r,i){var s=e.call(this,t,n,r,i);return s&&s.command?s:undefined}}.call(f.prototype),f.installIn=function(e){var t=new this;e.keyBinding.addKeyboardHandler(t),e.commands.addCommands(o)},f.uninstallFrom=function(e){e.commands.removeCommands(o);var t=e.getKeyboardHandler();t.isOccurHandler&&e.keyBinding.removeKeyboardHandler(t)},t.occurStartCommand=s}),ace.define("ace/occur",["require","exports","module","ace/lib/oop","ace/range","ace/search","ace/edit_session","ace/search_highlight","ace/lib/dom"],function(e,t,n){function a(){}var r=e("./lib/oop"),i=e("./range").Range,s=e("./search").Search,o=e("./edit_session").EditSession,u=e("./search_highlight").SearchHighlight;r.inherits(a,s),function(){this.enter=function(e,t){if(!t.needle)return!1;var n=e.getCursorPosition();this.displayOccurContent(e,t);var r=this.originalToOccurPosition(e.session,n);return e.moveCursorToPosition(r),!0},this.exit=function(e,t){var n=t.translatePosition&&e.getCursorPosition(),r=n&&this.occurToOriginalPosition(e.session,n);return this.displayOriginalContent(e),r&&e.moveCursorToPosition(r),!0},this.highlight=function(e,t){var n=e.$occurHighlight=e.$occurHighlight||e.addDynamicMarker(new u(null,"ace_occur-highlight","text"));n.setRegexp(t),e._emit("changeBackMarker")},this.displayOccurContent=function(e,t){this.$originalSession=e.session;var n=this.matchingLines(e.session,t),r=n.map(function(e){return e.content}),i=new o(r.join("\n"));i.$occur=this,i.$occurMatchingLines=n,e.setSession(i),this.$useEmacsStyleLineStart=this.$originalSession.$useEmacsStyleLineStart,i.$useEmacsStyleLineStart=this.$useEmacsStyleLineStart,this.highlight(i,t.re),i._emit("changeBackMarker")},this.displayOriginalContent=function(e){e.setSession(this.$originalSession),this.$originalSession.$useEmacsStyleLineStart=this.$useEmacsStyleLineStart},this.originalToOccurPosition=function(e,t){var n=e.$occurMatchingLines,r={row:0,column:0};if(!n)return r;for(var i=0;i<n.length;i++)if(n[i].row===t.row)return{row:i,column:t.column};return r},this.occurToOriginalPosition=function(e,t){var n=e.$occurMatchingLines;return!n||!n[t.row]?t:{row:n[t.row].row,column:t.column}},this.matchingLines=function(e,t){t=r.mixin({},t);if(!e||!t.needle)return[];var n=new s;return n.set(t),n.findAll(e).reduce(function(t,n){var r=n.start.row,i=t[t.length-1];return i&&i.row===r?t:t.concat({row:r,content:e.getLine(r)})},[])}}.call(a.prototype);var f=e("./lib/dom");f.importCssString(".ace_occur-highlight {\n    border-radius: 4px;\n    background-color: rgba(87, 255, 8, 0.25);\n    position: absolute;\n    z-index: 4;\n    -moz-box-sizing: border-box;\n    -webkit-box-sizing: border-box;\n    box-sizing: border-box;\n    box-shadow: 0 0 4px rgb(91, 255, 50);\n}\n.ace_dark .ace_occur-highlight {\n    background-color: rgb(80, 140, 85);\n    box-shadow: 0 0 4px rgb(60, 120, 70);\n}\n","incremental-occur-highlighting"),t.Occur=a})
\ No newline at end of file
diff --git a/app/assets/lib/ace/keybinding-vim.js b/app/assets/lib/ace/keybinding-vim.js
index 478eedaa8..8c966e17c 100644
--- a/app/assets/lib/ace/keybinding-vim.js
+++ b/app/assets/lib/ace/keybinding-vim.js
@@ -1 +1 @@
-ace.define("ace/keyboard/vim",["require","exports","module","ace/keyboard/vim/commands","ace/keyboard/vim/maps/util","ace/lib/useragent"],function(e,t,n){var r=e("./vim/commands"),i=r.coreCommands,s=e("./vim/maps/util"),o=e("../lib/useragent"),u={i:{command:i.start},I:{command:i.startBeginning},a:{command:i.append},A:{command:i.appendEnd},"ctrl-f":{command:"gotopagedown"},"ctrl-b":{command:"gotopageup"}};t.handler={$id:"ace/keyboard/vim",handleMacRepeat:function(e,t,n){if(t==-1)e.inputChar=n,e.lastEvent="input";else if(e.inputChar&&e.$lastHash==t&&e.$lastKey==n){if(e.lastEvent=="input")e.lastEvent="input1";else if(e.lastEvent=="input1")return!0}else e.$lastHash=t,e.$lastKey=n,e.lastEvent="keypress"},updateMacCompositionHandlers:function(e,t){var n=function(e){if(s.currentMode!=="insert"){var t=this.textInput.getElement();t.blur(),t.focus(),t.value=e}else this.onCompositionUpdateOrig(e)},r=function(e){s.currentMode==="insert"&&this.onCompositionStartOrig(e)};t?e.onCompositionUpdateOrig||(e.onCompositionUpdateOrig=e.onCompositionUpdate,e.onCompositionUpdate=n,e.onCompositionStartOrig=e.onCompositionStart,e.onCompositionStart=r):e.onCompositionUpdateOrig&&(e.onCompositionUpdate=e.onCompositionUpdateOrig,e.onCompositionUpdateOrig=null,e.onCompositionStart=e.onCompositionStartOrig,e.onCompositionStartOrig=null)},handleKeyboard:function(e,t,n,s,a){if(t!=0&&(n==""||n=="\0"))return null;var f=e.editor;t==1&&(n="ctrl-"+n);if(n=="ctrl-c")return!o.isMac&&f.getCopyText()?(f.once("copy",function(){e.state=="start"?i.stop.exec(f):f.selection.clearSelection()}),{command:"null",passEvent:!0}):{command:i.stop};if(n=="esc"&&t==0||n=="ctrl-[")return{command:i.stop};if(e.state=="start"){o.isMac&&this.handleMacRepeat(e,t,n)&&(t=-1,n=e.inputChar);if(t==-1||t==1||t==0&&n.length>1)return r.inputBuffer.idle&&u[n]?u[n]:(r.inputBuffer.push(f,n),{command:"null",passEvent:!1});if(n.length==1&&(t==0||t==4))return{command:"null",passEvent:!0};if(n=="esc"&&t==0)return{command:i.stop}}else if(n=="ctrl-w")return{command:"removewordleft"}},attach:function(e){e.on("click",t.onCursorMove),s.currentMode!=="insert"&&r.coreCommands.stop.exec(e),e.$vimModeHandler=this,this.updateMacCompositionHandlers(e,!0)},detach:function(e){e.removeListener("click",t.onCursorMove),s.noMode(e),s.currentMode="normal",this.updateMacCompositionHandlers(e,!1)},actions:r.actions,getStatusText:function(){return s.currentMode=="insert"?"INSERT":s.onVisualMode?(s.onVisualLineMode?"VISUAL LINE ":"VISUAL ")+r.inputBuffer.status:r.inputBuffer.status}},t.onCursorMove=function(e){r.onCursorMove(e.editor,e),t.onCursorMove.scheduled=!1}}),ace.define("ace/keyboard/vim/commands",["require","exports","module","ace/lib/lang","ace/keyboard/vim/maps/util","ace/keyboard/vim/maps/motions","ace/keyboard/vim/maps/operators","ace/keyboard/vim/maps/aliases","ace/keyboard/vim/registers"],function(e,t,n){"never use strict";function y(e){g.previous={action:{action:{fn:e}}}}var r=e("../../lib/lang"),i=e("./maps/util"),s=e("./maps/motions"),o=e("./maps/operators"),u=e("./maps/aliases"),a=e("./registers"),f=1,l=2,c=3,h=4,p=8,d=function(t,n,r){while(0<n--)t.apply(this,r)},v=function(e){var t=e.renderer,n=t.$cursorLayer.getPixelPosition(),r=n.top,i=p*t.layerConfig.lineHeight;2*i>t.$size.scrollerHeight&&(i=t.$size.scrollerHeight/2),t.scrollTop>r-i&&t.session.setScrollTop(r-i),t.scrollTop+t.$size.scrollerHeight<r+i+t.lineHeight&&t.session.setScrollTop(r+i+t.lineHeight-t.$size.scrollerHeight)},m=t.actions={z:{param:!0,fn:function(e,t,n,r){switch(r){case"z":e.renderer.alignCursor(null,.5);break;case"t":e.renderer.alignCursor(null,0);break;case"b":e.renderer.alignCursor(null,1);break;case"c":e.session.onFoldWidgetClick(t.start.row,{domEvent:{target:{}}});break;case"o":e.session.onFoldWidgetClick(t.start.row,{domEvent:{target:{}}});break;case"C":e.session.foldAll();break;case"O":e.session.unfold()}}},r:{param:!0,fn:function(e,t,n,r){r&&r.length&&(r.length>1&&(r=r=="return"?"\n":r=="tab"?"	":r),d(function(){e.insert(r)},n||1),e.navigateLeft())}},R:{fn:function(e,t,n,r){i.insertMode(e),e.setOverwrite(!0)}},"~":{fn:function(e,t,n){d(function(){var t=e.selection.getRange();t.isEmpty()&&t.end.column++;var n=e.session.getTextRange(t),r=n.toUpperCase();r==n?e.navigateRight():e.session.replace(t,r)},n||1)}},"*":{fn:function(e,t,n,r){e.selection.selectWord(),e.findNext(),v(e);var i=e.selection.getRange();e.selection.setSelectionRange(i,!0)}},"#":{fn:function(e,t,n,r){e.selection.selectWord(),e.findPrevious(),v(e);var i=e.selection.getRange();e.selection.setSelectionRange(i,!0)}},m:{param:!0,fn:function(e,t,n,r){var i=e.session,s=i.vimMarkers||(i.vimMarkers={}),o=e.getCursorPosition();s[r]||(s[r]=e.session.doc.createAnchor(o)),s[r].setPosition(o.row,o.column,!0)}},n:{fn:function(e,t,n,r){var i=e.getLastSearchOptions();i.backwards=!1,e.selection.moveCursorRight(),e.selection.clearSelection(),e.findNext(i),v(e);var s=e.selection.getRange();s.end.row=s.start.row,s.end.column=s.start.column,e.selection.setSelectionRange(s,!0)}},N:{fn:function(e,t,n,r){var i=e.getLastSearchOptions();i.backwards=!0,e.findPrevious(i),v(e);var s=e.selection.getRange();s.end.row=s.start.row,s.end.column=s.start.column,e.selection.setSelectionRange(s,!0)}},v:{fn:function(e,t,n,r){e.selection.selectRight(),i.visualMode(e,!1)},acceptsMotion:!0},V:{fn:function(e,t,n,r){var s=e.getCursorPosition().row;e.selection.clearSelection(),e.selection.moveCursorTo(s,0),e.selection.selectLineEnd(),e.selection.visualLineStart=s,i.visualMode(e,!0)},acceptsMotion:!0},Y:{fn:function(e,t,n,r){i.copyLine(e)}},p:{fn:function(e,t,n,i){var s=a._default;e.setOverwrite(!1);if(s.isLine){var o=e.getCursorPosition();o.column=e.session.getLine(o.row).length;var u=r.stringRepeat("\n"+s.text,n||1);e.session.insert(o,u),e.moveCursorTo(o.row+1,0)}else e.navigateRight(),e.insert(r.stringRepeat(s.text,n||1)),e.navigateLeft();e.setOverwrite(!0),e.selection.clearSelection()}},P:{fn:function(e,t,n,i){var s=a._default;e.setOverwrite(!1);if(s.isLine){var o=e.getCursorPosition();o.column=0;var u=r.stringRepeat(s.text+"\n",n||1);e.session.insert(o,u),e.moveCursorToPosition(o)}else e.insert(r.stringRepeat(s.text,n||1));e.setOverwrite(!0),e.selection.clearSelection()}},J:{fn:function(e,t,n,r){var i=e.session;t=e.getSelectionRange();var s={row:t.start.row,column:t.start.column};n=n||t.end.row-t.start.row;var o=Math.min(s.row+(n||1),i.getLength()-1);t.start.column=i.getLine(s.row).length,t.end.column=i.getLine(o).length,t.end.row=o;var u="";for(var a=s.row;a<o;a++){var f=i.getLine(a+1);u+=" "+/^\s*(.*)$/.exec(f)[1]||""}i.replace(t,u),e.moveCursorTo(s.row,s.column)}},u:{fn:function(e,t,n,r){n=parseInt(n||1,10);for(var i=0;i<n;i++)e.undo();e.selection.clearSelection()}},"ctrl-r":{fn:function(e,t,n,r){n=parseInt(n||1,10);for(var i=0;i<n;i++)e.redo();e.selection.clearSelection()}},":":{fn:function(e,t,n,r){var i=":";n>1&&(i=".,.+"+n+i),e.showCommandLine&&e.showCommandLine(i)}},"/":{fn:function(e,t,n,r){e.showCommandLine&&e.showCommandLine("/")}},"?":{fn:function(e,t,n,r){e.showCommandLine&&e.showCommandLine("?")}},".":{fn:function(e,t,n,r){i.onInsertReplaySequence=g.lastInsertCommands;var s=g.previous;s&&g.exec(e,s.action,s.param)}},"ctrl-x":{fn:function(e,t,n,r){e.modifyNumber(-(n||1))}},"ctrl-a":{fn:function(e,t,n,r){e.modifyNumber(n||1)}}},g=t.inputBuffer={accepting:[f,l,c,h],currentCmd:null,currentCount:"",status:"",operator:null,motion:null,lastInsertCommands:[],push:function(e,t,n){var r=this.status,i=!0;this.idle=!1;var a=this.waitingForParam;/^numpad\d+$/i.test(t)&&(t=t.substr(6));if(a)this.exec(e,a,t);else if(t==="0"&&!this.currentCount.length||!/^\d+$/.test(t)||!this.isAccepting(f))if(!this.operator&&this.isAccepting(l)&&o[t])this.operator={ch:t,count:this.getCount()},this.currentCmd=l,this.accepting=[f,c,h],this.exec(e,{operator:this.operator});else if(s[t]&&this.isAccepting(c)){this.currentCmd=c;var p={operator:this.operator,motion:{ch:t,count:this.getCount()}};s[t].param?this.waitForParam(p):this.exec(e,p)}else if(u[t]&&this.isAccepting(c))u[t].operator.count=this.getCount(),this.exec(e,u[t]);else if(m[t]&&this.isAccepting(h)){var d={action:{fn:m[t].fn,count:this.getCount()}};m[t].param?this.waitForParam(d):this.exec(e,d),m[t].acceptsMotion&&(this.idle=!1)}else this.operator?(this.operator.count=this.getCount(),this.exec(e,{operator:this.operator},t)):(i=t.length==1,this.reset());else this.currentCount+=t,this.currentCmd=f,this.accepting=[f,l,c,h];return this.waitingForParam||this.motion||this.operator?this.status+=t:this.currentCount?this.status=this.currentCount:this.status&&(this.status=""),this.status!=r&&e._emit("changeStatus"),i},waitForParam:function(e){this.waitingForParam=e},getCount:function(){var e=this.currentCount;return this.currentCount="",e&&parseInt(e,10)},exec:function(e,t,n){var r=t.motion,u=t.operator,a=t.action;n||(n=t.param),u&&(this.previous={action:t,param:n});if(u&&!e.selection.isEmpty()){o[u.ch].selFn&&(o[u.ch].selFn(e,e.getSelectionRange(),u.count,n),this.reset());return}if(!r&&!a&&u&&n)o[u.ch].fn(e,null,u.count,n),this.reset();else if(r){var f=function(t){t&&typeof t=="function"&&(r.count&&!l.handlesCount?d(t,r.count,[e,null,r.count,n]):t(e,null,r.count,n))},l=s[r.ch],c=l.sel;u?c&&d(function(){f(l.sel),o[u.ch].fn(e,e.getSelectionRange(),u.count,n)},u.count||1):(i.onVisualMode||i.onVisualLineMode)&&c?f(l.sel):f(l.nav),this.reset()}else a&&(a.fn(e,e.getSelectionRange(),a.count,n),this.reset());b(e)},isAccepting:function(e){return this.accepting.indexOf(e)!==-1},reset:function(){this.operator=null,this.motion=null,this.currentCount="",this.status="",this.accepting=[f,l,c,h],this.idle=!0,this.waitingForParam=null}};t.coreCommands={start:{exec:function w(e){i.insertMode(e),y(w)}},startBeginning:{exec:function E(e){e.navigateLineStart(),i.insertMode(e),y(E)}},stop:{exec:function(t){g.reset(),i.onVisualMode=!1,i.onVisualLineMode=!1,g.lastInsertCommands=i.normalMode(t)}},append:{exec:function S(e){var t=e.getCursorPosition(),n=e.session.getLine(t.row).length;n&&e.navigateRight(),i.insertMode(e),y(S)}},appendEnd:{exec:function x(e){e.navigateLineEnd(),i.insertMode(e),y(x)}}};var b=t.onCursorMove=function(e,t){if(i.currentMode==="insert"||b.running)return;if(!e.selection.isEmpty()){b.running=!0;if(i.onVisualLineMode){var n=e.selection.visualLineStart,r=e.getCursorPosition().row;if(n<=r){var s=e.session.getLine(r);e.selection.clearSelection(),e.selection.moveCursorTo(n,0),e.selection.selectTo(r,s.length)}else{var s=e.session.getLine(n);e.selection.clearSelection(),e.selection.moveCursorTo(n,s.length),e.selection.selectTo(r,0)}}b.running=!1;return}t&&(i.onVisualLineMode||i.onVisualMode)&&(e.selection.clearSelection(),i.normalMode(e)),b.running=!0;var o=e.getCursorPosition(),u=e.session.getLine(o.row).length;u&&o.column===u&&e.navigateLeft(),b.running=!1}}),ace.define("ace/keyboard/vim/maps/util",["require","exports","module","ace/keyboard/vim/registers","ace/lib/dom"],function(e,t,n){var r=e("../registers"),i=e("../../../lib/dom");i.importCssString(".insert-mode .ace_cursor{    border-left: 2px solid #333333;}.ace_dark.insert-mode .ace_cursor{    border-left: 2px solid #eeeeee;}.normal-mode .ace_cursor{    border: 0!important;    background-color: red;    opacity: 0.5;}","vimMode"),n.exports={onVisualMode:!1,onVisualLineMode:!1,currentMode:"normal",noMode:function(e){e.unsetStyle("insert-mode"),e.unsetStyle("normal-mode"),e.commands.recording&&e.commands.toggleRecording(e),e.setOverwrite(!1)},insertMode:function(e){this.currentMode="insert",e.setStyle("insert-mode"),e.unsetStyle("normal-mode"),e.setOverwrite(!1),e.keyBinding.$data.buffer="",e.keyBinding.$data.state="insertMode",this.onVisualMode=!1,this.onVisualLineMode=!1,this.onInsertReplaySequence?(e.commands.macro=this.onInsertReplaySequence,e.commands.replay(e),this.onInsertReplaySequence=null,this.normalMode(e)):(e._emit("changeStatus"),e.commands.recording||e.commands.toggleRecording(e))},normalMode:function(e){this.currentMode="normal",e.unsetStyle("insert-mode"),e.setStyle("normal-mode"),e.clearSelection();var t;return e.getOverwrite()||(t=e.getCursorPosition(),t.column>0&&e.navigateLeft()),e.setOverwrite(!0),e.keyBinding.$data.buffer="",e.keyBinding.$data.state="start",this.onVisualMode=!1,this.onVisualLineMode=!1,e._emit("changeStatus"),e.commands.recording?(e.commands.toggleRecording(e),e.commands.macro):[]},visualMode:function(e,t){if(this.onVisualLineMode&&t||this.onVisualMode&&!t){this.normalMode(e);return}e.setStyle("insert-mode"),e.unsetStyle("normal-mode"),e._emit("changeStatus"),t?this.onVisualLineMode=!0:(this.onVisualMode=!0,this.onVisualLineMode=!1)},getRightNthChar:function(e,t,n,r){var i=e.getSession().getLine(t.row),s=i.substr(t.column+1).split(n);return r<s.length?s.slice(0,r).join(n).length:null},getLeftNthChar:function(e,t,n,r){var i=e.getSession().getLine(t.row),s=i.substr(0,t.column).split(n);return r<s.length?s.slice(-1*r).join(n).length:null},toRealChar:function(e){return e.length===1?e:/^shift-./.test(e)?e[e.length-1].toUpperCase():""},copyLine:function(e){var t=e.getCursorPosition();e.selection.clearSelection(),e.moveCursorTo(t.row,t.column),e.selection.selectLine(),r._default.isLine=!0,r._default.text=e.getCopyText().replace(/\n$/,""),e.selection.clearSelection(),e.moveCursorTo(t.row,t.column)}}}),ace.define("ace/keyboard/vim/registers",["require","exports","module"],function(e,t,n){"never use strict";n.exports={_default:{text:"",isLine:!1}}}),ace.define("ace/keyboard/vim/maps/motions",["require","exports","module","ace/keyboard/vim/maps/util","ace/search","ace/range"],function(e,t,n){function s(e){if(typeof e=="function"){var t=e;e=this}else var t=e.getPos;return e.nav=function(e,n,r,i){var s=t(e,n,r,i,!1);if(!s)return;e.clearSelection(),e.moveCursorTo(s.row,s.column)},e.sel=function(e,n,r,i){var s=t(e,n,r,i,!0);if(!s)return;e.selection.selectTo(s.row,s.column)},e}function h(e,t,n){return c.$options.needle=t,c.$options.backwards=n==-1,c.find(e.session)}var r=e("./util"),i=function(e,t){var n=e.renderer.getScrollTopRow(),r=e.getCursorPosition().row,i=r-n;t&&t.call(e),e.renderer.scrollToRow(e.getCursorPosition().row-i)},o=/[\s.\/\\()\"'-:,.;<>~!@#$%^&*|+=\[\]{}`~?]/,u=/[.\/\\()\"'-:,.;<>~!@#$%^&*|+=\[\]{}`~?]/,a=/\s/,f=function(e,t){var n=e.selection;this.range=n.getRange(),t=t||n.selectionLead,this.row=t.row,this.col=t.column;var r=e.session.getLine(this.row),i=e.session.getLength();this.ch=r[this.col]||"\n",this.skippedLines=0,this.next=function(){return this.ch=r[++this.col]||this.handleNewLine(1),this.ch},this.prev=function(){return this.ch=r[--this.col]||this.handleNewLine(-1),this.ch},this.peek=function(t){var n=r[this.col+t];return n?n:t==-1?"\n":this.col==r.length-1?"\n":e.session.getLine(this.row+1)[0]||"\n"},this.handleNewLine=function(t){if(t==1)return this.col==r.length?"\n":this.row==i-1?"":(this.col=0,this.row++,r=e.session.getLine(this.row),this.skippedLines++,r[0]||"\n");if(t==-1)return this.row===0?"":(this.row--,r=e.session.getLine(this.row),this.col=r.length,this.skippedLines--,"\n")},this.debug=function(){console.log(r.substring(0,this.col)+"|"+this.ch+"'"+this.col+"'"+r.substr(this.col+1))}},l=e("../../../search").Search,c=new l,p=e("../../../range").Range,d={};n.exports={w:new s(function(e){var t=new f(e);if(t.ch&&u.test(t.ch))while(t.ch&&u.test(t.ch))t.next();else while(t.ch&&!o.test(t.ch))t.next();while(t.ch&&a.test(t.ch)&&t.skippedLines<2)t.next();return t.skippedLines==2&&t.prev(),{column:t.col,row:t.row}}),W:new s(function(e){var t=new f(e);while(t.ch&&(!a.test(t.ch)||!!a.test(t.peek(1)))&&t.skippedLines<2)t.next();return t.skippedLines==2?t.prev():t.next(),{column:t.col,row:t.row}}),b:new s(function(e){var t=new f(e);t.prev();while(t.ch&&a.test(t.ch)&&t.skippedLines>-2)t.prev();if(t.ch&&u.test(t.ch))while(t.ch&&u.test(t.ch))t.prev();else while(t.ch&&!o.test(t.ch))t.prev();return t.ch&&t.next(),{column:t.col,row:t.row}}),B:new s(function(e){var t=new f(e);t.prev();while(t.ch&&(!!a.test(t.ch)||!a.test(t.peek(-1)))&&t.skippedLines>-2)t.prev();return t.skippedLines==-2&&t.next(),{column:t.col,row:t.row}}),e:new s(function(e){var t=new f(e);t.next();while(t.ch&&a.test(t.ch))t.next();if(t.ch&&u.test(t.ch))while(t.ch&&u.test(t.ch))t.next();else while(t.ch&&!o.test(t.ch))t.next();return t.ch&&t.prev(),{column:t.col,row:t.row}}),E:new s(function(e){var t=new f(e);t.next();while(t.ch&&(!!a.test(t.ch)||!a.test(t.peek(1))))t.next();return{column:t.col,row:t.row}}),l:{nav:function(e){var t=e.getCursorPosition(),n=t.column,r=e.session.getLine(t.row).length;r&&n!==r&&e.navigateRight()},sel:function(e){var t=e.getCursorPosition(),n=t.column,r=e.session.getLine(t.row).length;r&&n!==r&&e.selection.selectRight()}},h:{nav:function(e){var t=e.getCursorPosition();t.column>0&&e.navigateLeft()},sel:function(e){var t=e.getCursorPosition();t.column>0&&e.selection.selectLeft()}},H:{nav:function(e){var t=e.renderer.getScrollTopRow();e.moveCursorTo(t)},sel:function(e){var t=e.renderer.getScrollTopRow();e.selection.selectTo(t)}},M:{nav:function(e){var t=e.renderer.getScrollTopRow(),n=e.renderer.getScrollBottomRow(),r=t+(n-t)/2;e.moveCursorTo(r)},sel:function(e){var t=e.renderer.getScrollTopRow(),n=e.renderer.getScrollBottomRow(),r=t+(n-t)/2;e.selection.selectTo(r)}},L:{nav:function(e){var t=e.renderer.getScrollBottomRow();e.moveCursorTo(t)},sel:function(e){var t=e.renderer.getScrollBottomRow();e.selection.selectTo(t)}},k:{nav:function(e){e.navigateUp()},sel:function(e){e.selection.selectUp()}},j:{nav:function(e){e.navigateDown()},sel:function(e){e.selection.selectDown()}},i:{param:!0,sel:function(e,t,n,r){switch(r){case"w":e.selection.selectWord();break;case"W":e.selection.selectAWord();break;case"(":case"{":case"[":var i=e.getCursorPosition(),s=e.session.$findClosingBracket(r,i,/paren/);if(!s)return;var o=e.session.$findOpeningBracket(e.session.$brackets[r],i,/paren/);if(!o)return;o.column++,e.selection.setSelectionRange(p.fromPoints(o,s));break;case"'":case'"':case"/":var s=h(e,r,1);if(!s)return;var o=h(e,r,-1);if(!o)return;e.selection.setSelectionRange(p.fromPoints(o.end,s.start))}}},a:{param:!0,sel:function(e,t,n,r){switch(r){case"w":e.selection.selectAWord();break;case"W":e.selection.selectAWord();break;case"(":case"{":case"[":var i=e.getCursorPosition(),s=e.session.$findClosingBracket(r,i,/paren/);if(!s)return;var o=e.session.$findOpeningBracket(e.session.$brackets[r],i,/paren/);if(!o)return;s.column++,e.selection.setSelectionRange(p.fromPoints(o,s));break;case"'":case'"':case"/":var s=h(e,r,1);if(!s)return;var o=h(e,r,-1);if(!o)return;s.column++,e.selection.setSelectionRange(p.fromPoints(o.start,s.end))}}},f:new s({param:!0,handlesCount:!0,getPos:function(e,t,n,i,s,o){o||(d={ch:"f",param:i});var u=e.getCursorPosition(),a=r.getRightNthChar(e,u,i,n||1);if(typeof a=="number")return u.column+=a+(s?2:1),u}}),F:new s({param:!0,handlesCount:!0,getPos:function(e,t,n,i,s,o){o||(d={ch:"F",param:i});var u=e.getCursorPosition(),a=r.getLeftNthChar(e,u,i,n||1);if(typeof a=="number")return u.column-=a+1,u}}),t:new s({param:!0,handlesCount:!0,getPos:function(e,t,n,i,s,o){o||(d={ch:"t",param:i});var u=e.getCursorPosition(),a=r.getRightNthChar(e,u,i,n||1);if(o&&a==0&&!(n>1))var a=r.getRightNthChar(e,u,i,2);if(typeof a=="number")return u.column+=a+(s?1:0),u}}),T:new s({param:!0,handlesCount:!0,getPos:function(e,t,n,i,s,o){o||(d={ch:"T",param:i});var u=e.getCursorPosition(),a=r.getLeftNthChar(e,u,i,n||1);if(o&&a==0&&!(n>1))var a=r.getLeftNthChar(e,u,i,2);if(typeof a=="number")return u.column-=a,u}}),";":new s({handlesCount:!0,getPos:function(e,t,r,i,s){var o=d.ch;if(!o)return;return n.exports[o].getPos(e,t,r,d.param,s,!0)}}),",":new s({handlesCount:!0,getPos:function(e,t,r,i,s){var o=d.ch;if(!o)return;var u=o.toUpperCase();return o=o===u?o.toLowerCase():u,n.exports[o].getPos(e,t,r,d.param,s,!0)}}),"^":{nav:function(e){e.navigateLineStart()},sel:function(e){e.selection.selectLineStart()}},$:{nav:function(e){e.navigateLineEnd()},sel:function(e){e.selection.selectLineEnd()}},0:new s(function(e){return{row:e.selection.lead.row,column:0}}),G:{nav:function(e,t,n,r){!n&&n!==0&&(n=e.session.getLength()),e.gotoLine(n)},sel:function(e,t,n,r){!n&&n!==0&&(n=e.session.getLength()),e.selection.selectTo(n,0)}},g:{param:!0,nav:function(e,t,n,r){switch(r){case"m":console.log("Middle line");break;case"e":console.log("End of prev word");break;case"g":e.gotoLine(n||0);case"u":e.gotoLine(n||0);case"U":e.gotoLine(n||0)}},sel:function(e,t,n,r){switch(r){case"m":console.log("Middle line");break;case"e":console.log("End of prev word");break;case"g":e.selection.selectTo(n||0,0)}}},o:{nav:function(e,t,n,i){n=n||1;var s="";while(0<n--)s+="\n";s.length&&(e.navigateLineEnd(),e.insert(s),r.insertMode(e))}},O:{nav:function(e,t,n,i){var s=e.getCursorPosition().row;n=n||1;var o="";while(0<n--)o+="\n";o.length&&(s>0?(e.navigateUp(),e.navigateLineEnd(),e.insert(o)):(e.session.insert({row:0,column:0},o),e.navigateUp()),r.insertMode(e))}},"%":new s(function(e){var t=/[\[\]{}()]/g,n=e.getCursorPosition(),r=e.session.getLine(n.row)[n.column];if(!t.test(r)){var i=h(e,t);if(!i)return;n=i.start}var s=e.session.findMatchingBracket({row:n.row,column:n.column+1});return s}),"{":new s(function(e){var t=e.session,n=t.selection.lead.row;while(n>0&&!/\S/.test(t.getLine(n)))n--;while(/\S/.test(t.getLine(n)))n--;return{column:0,row:n}}),"}":new s(function(e){var t=e.session,n=t.getLength(),r=t.selection.lead.row;while(r<n&&!/\S/.test(t.getLine(r)))r++;while(/\S/.test(t.getLine(r)))r++;return{column:0,row:r}}),"ctrl-d":{nav:function(e,t,n,r){e.selection.clearSelection(),i(e,e.gotoPageDown)},sel:function(e,t,n,r){i(e,e.selectPageDown)}},"ctrl-u":{nav:function(e,t,n,r){e.selection.clearSelection(),i(e,e.gotoPageUp)},sel:function(e,t,n,r){i(e,e.selectPageUp)}},"`":new s({param:!0,handlesCount:!0,getPos:function(e,t,n,r,i){var s=e.session,o=s.vimMarkers&&s.vimMarkers[r];if(o)return o.getPosition()}}),"'":new s({param:!0,handlesCount:!0,getPos:function(e,t,n,r,i){var s=e.session,o=s.vimMarkers&&s.vimMarkers[r];if(o){var u=o.getPosition(),a=e.session.getLine(u.row);return u.column=a.search(/\S/),u.column==-1&&(u.column=a.length),u}}})},n.exports.backspace=n.exports.left=n.exports.h,n.exports.space=n.exports["return"]=n.exports.right=n.exports.l,n.exports.up=n.exports.k,n.exports.down=n.exports.j,n.exports.pagedown=n.exports["ctrl-d"],n.exports.pageup=n.exports["ctrl-u"]}),ace.define("ace/keyboard/vim/maps/operators",["require","exports","module","ace/keyboard/vim/maps/util","ace/keyboard/vim/registers"],function(e,t,n){var r=e("./util"),i=e("../registers");n.exports={d:{selFn:function(e,t,n,s){i._default.text=e.getCopyText(),i._default.isLine=r.onVisualLineMode,r.onVisualLineMode?e.removeLines():e.session.remove(t),r.normalMode(e)},fn:function(e,t,n,r){n=n||1;switch(r){case"d":i._default.text="",i._default.isLine=!0;for(var s=0;s<n;s++){e.selection.selectLine(),i._default.text+=e.getCopyText();var o=e.getSelectionRange();if(!o.isMultiLine()){var u=o.start.row-1,a=e.session.getLine(u).length;o.setStart(u,a),e.session.remove(o),e.selection.clearSelection();break}e.session.remove(o),e.selection.clearSelection()}i._default.text=i._default.text.replace(/\n$/,"");break;default:t&&(e.selection.setSelectionRange(t),i._default.text=e.getCopyText(),i._default.isLine=!1,e.session.remove(t),e.selection.clearSelection())}}},c:{selFn:function(e,t,n,i){e.session.remove(t),r.insertMode(e)},fn:function(e,t,n,i){n=n||1;switch(i){case"c":for(var s=0;s<n;s++)e.removeLines(),r.insertMode(e);break;default:t&&(e.session.remove(t),r.insertMode(e))}}},y:{selFn:function(e,t,n,s){i._default.text=e.getCopyText(),i._default.isLine=r.onVisualLineMode,e.selection.clearSelection(),r.normalMode(e)},fn:function(e,t,n,r){n=n||1;switch(r){case"y":var s=e.getCursorPosition();e.selection.selectLine();for(var o=0;o<n-1;o++)e.selection.moveCursorDown();i._default.text=e.getCopyText().replace(/\n$/,""),e.selection.clearSelection(),i._default.isLine=!0,e.moveCursorToPosition(s);break;default:if(t){var s=e.getCursorPosition();e.selection.setSelectionRange(t),i._default.text=e.getCopyText(),i._default.isLine=!1,e.selection.clearSelection(),e.moveCursorTo(s.row,s.column)}}}},">":{selFn:function(e,t,n,i){n=n||1;for(var s=0;s<n;s++)e.indent();r.normalMode(e)},fn:function(e,t,n,r){n=parseInt(n||1,10);switch(r){case">":var i=e.getCursorPosition();e.selection.selectLine();for(var s=0;s<n-1;s++)e.selection.moveCursorDown();e.indent(),e.selection.clearSelection(),e.moveCursorToPosition(i),e.navigateLineEnd(),e.navigateLineStart()}}},"<":{selFn:function(e,t,n,i){n=n||1;for(var s=0;s<n;s++)e.blockOutdent();r.normalMode(e)},fn:function(e,t,n,r){n=n||1;switch(r){case"<":var i=e.getCursorPosition();e.selection.selectLine();for(var s=0;s<n-1;s++)e.selection.moveCursorDown();e.blockOutdent(),e.selection.clearSelection(),e.moveCursorToPosition(i),e.navigateLineEnd(),e.navigateLineStart()}}}}}),"use strict",ace.define("ace/keyboard/vim/maps/aliases",["require","exports","module"],function(e,t,n){n.exports={x:{operator:{ch:"d",count:1},motion:{ch:"l",count:1}},X:{operator:{ch:"d",count:1},motion:{ch:"h",count:1}},D:{operator:{ch:"d",count:1},motion:{ch:"$",count:1}},C:{operator:{ch:"c",count:1},motion:{ch:"$",count:1}},s:{operator:{ch:"c",count:1},motion:{ch:"l",count:1}},S:{operator:{ch:"c",count:1},param:"c"}}})
\ No newline at end of file
+ace.define("ace/keyboard/vim",["require","exports","module","ace/keyboard/vim/commands","ace/keyboard/vim/maps/util","ace/lib/useragent"],function(e,t,n){var r=e("./vim/commands"),i=r.coreCommands,s=e("./vim/maps/util"),o=e("../lib/useragent"),u={i:{command:i.start},I:{command:i.startBeginning},a:{command:i.append},A:{command:i.appendEnd},"ctrl-f":{command:"gotopagedown"},"ctrl-b":{command:"gotopageup"}};t.handler={$id:"ace/keyboard/vim",handleMacRepeat:function(e,t,n){if(t==-1)e.inputChar=n,e.lastEvent="input";else if(e.inputChar&&e.$lastHash==t&&e.$lastKey==n){if(e.lastEvent=="input")e.lastEvent="input1";else if(e.lastEvent=="input1")return!0}else e.$lastHash=t,e.$lastKey=n,e.lastEvent="keypress"},updateMacCompositionHandlers:function(e,t){var n=function(e){if(s.currentMode!=="insert"){var t=this.textInput.getElement();t.blur(),t.focus(),t.value=e}else this.onCompositionUpdateOrig(e)},r=function(e){s.currentMode==="insert"&&this.onCompositionStartOrig(e)};t?e.onCompositionUpdateOrig||(e.onCompositionUpdateOrig=e.onCompositionUpdate,e.onCompositionUpdate=n,e.onCompositionStartOrig=e.onCompositionStart,e.onCompositionStart=r):e.onCompositionUpdateOrig&&(e.onCompositionUpdate=e.onCompositionUpdateOrig,e.onCompositionUpdateOrig=null,e.onCompositionStart=e.onCompositionStartOrig,e.onCompositionStartOrig=null)},handleKeyboard:function(e,t,n,s,a){if(t!==0&&(!n||s==-1))return null;var f=e.editor,l=e.vimState||"start";t==1&&(n="ctrl-"+n);if(n=="ctrl-c")return!o.isMac&&f.getCopyText()?(f.once("copy",function(){l=="start"?i.stop.exec(f):f.selection.clearSelection()}),{command:"null",passEvent:!0}):{command:i.stop};if(n=="esc"&&t===0||n=="ctrl-[")return{command:i.stop};if(l=="start"){o.isMac&&this.handleMacRepeat(e,t,n)&&(t=-1,n=e.inputChar);if(t==-1||t==1||t===0&&n.length>1){if(r.inputBuffer.idle&&u[n])return u[n];var c=r.inputBuffer.push(f,n);if(!c&&t!==-1)return;return{command:"null",passEvent:!c}}if(n=="esc"&&t===0)return{command:i.stop};if(t===0||t==4)return{command:"null",passEvent:!0}}else if(n=="ctrl-w")return{command:"removewordleft"}},attach:function(e){e.on("click",t.onCursorMove),s.currentMode!=="insert"&&r.coreCommands.stop.exec(e),e.$vimModeHandler=this,this.updateMacCompositionHandlers(e,!0)},detach:function(e){e.removeListener("click",t.onCursorMove),s.noMode(e),s.currentMode="normal",this.updateMacCompositionHandlers(e,!1)},actions:r.actions,getStatusText:function(){return s.currentMode=="insert"?"INSERT":s.onVisualMode?(s.onVisualLineMode?"VISUAL LINE ":"VISUAL ")+r.inputBuffer.status:r.inputBuffer.status}},t.onCursorMove=function(e){r.onCursorMove(e.editor,e),t.onCursorMove.scheduled=!1}}),ace.define("ace/keyboard/vim/commands",["require","exports","module","ace/lib/lang","ace/keyboard/vim/maps/util","ace/keyboard/vim/maps/motions","ace/keyboard/vim/maps/operators","ace/keyboard/vim/maps/aliases","ace/keyboard/vim/registers"],function(e,t,n){"never use strict";function y(e){g.previous={action:{action:{fn:e}}}}var r=e("../../lib/lang"),i=e("./maps/util"),s=e("./maps/motions"),o=e("./maps/operators"),u=e("./maps/aliases"),a=e("./registers"),f=1,l=2,c=3,h=4,p=8,d=function(t,n,r){while(0<n--)t.apply(this,r)},v=function(e){var t=e.renderer,n=t.$cursorLayer.getPixelPosition(),r=n.top,i=p*t.layerConfig.lineHeight;2*i>t.$size.scrollerHeight&&(i=t.$size.scrollerHeight/2),t.scrollTop>r-i&&t.session.setScrollTop(r-i),t.scrollTop+t.$size.scrollerHeight<r+i+t.lineHeight&&t.session.setScrollTop(r+i+t.lineHeight-t.$size.scrollerHeight)},m=t.actions={z:{param:!0,fn:function(e,t,n,r){switch(r){case"z":e.renderer.alignCursor(null,.5);break;case"t":e.renderer.alignCursor(null,0);break;case"b":e.renderer.alignCursor(null,1);break;case"c":e.session.onFoldWidgetClick(t.start.row,{domEvent:{target:{}}});break;case"o":e.session.onFoldWidgetClick(t.start.row,{domEvent:{target:{}}});break;case"C":e.session.foldAll();break;case"O":e.session.unfold()}}},r:{param:!0,fn:function(e,t,n,r){r&&r.length&&(r.length>1&&(r=r=="return"?"\n":r=="tab"?"	":r),d(function(){e.insert(r)},n||1),e.navigateLeft())}},R:{fn:function(e,t,n,r){i.insertMode(e),e.setOverwrite(!0)}},"~":{fn:function(e,t,n){d(function(){var t=e.selection.getRange();t.isEmpty()&&t.end.column++;var n=e.session.getTextRange(t),r=n.toUpperCase();r!=n?e.session.replace(t,r):n.toLowerCase()!=n?e.session.replace(t,n.toLowerCase()):e.navigateRight()},n||1)}},"*":{fn:function(e,t,n,r){e.selection.selectWord(),e.findNext(),v(e);var i=e.selection.getRange();e.selection.setSelectionRange(i,!0)}},"#":{fn:function(e,t,n,r){e.selection.selectWord(),e.findPrevious(),v(e);var i=e.selection.getRange();e.selection.setSelectionRange(i,!0)}},m:{param:!0,fn:function(e,t,n,r){var i=e.session,s=i.vimMarkers||(i.vimMarkers={}),o=e.getCursorPosition();s[r]||(s[r]=e.session.doc.createAnchor(o)),s[r].setPosition(o.row,o.column,!0)}},n:{fn:function(e,t,n,r){var i=e.getLastSearchOptions();i.backwards=!1,i.start=null,e.selection.moveCursorRight(),e.selection.clearSelection(),e.findNext(i),v(e);var s=e.selection.getRange();s.end.row=s.start.row,s.end.column=s.start.column,e.selection.setSelectionRange(s,!0)}},N:{fn:function(e,t,n,r){var i=e.getLastSearchOptions();i.backwards=!0,i.start=null,e.findPrevious(i),v(e);var s=e.selection.getRange();s.end.row=s.start.row,s.end.column=s.start.column,e.selection.setSelectionRange(s,!0)}},v:{fn:function(e,t,n,r){e.selection.selectRight(),i.visualMode(e,!1)},acceptsMotion:!0},V:{fn:function(e,t,n,r){var s=e.getCursorPosition().row;e.selection.moveTo(s,0),e.selection.selectLineEnd(),e.selection.visualLineStart=s,i.visualMode(e,!0)},acceptsMotion:!0},Y:{fn:function(e,t,n,r){i.copyLine(e)}},p:{fn:function(e,t,n,i){var s=a._default;e.setOverwrite(!1);if(s.isLine){var o=e.getCursorPosition();o.column=e.session.getLine(o.row).length;var u=r.stringRepeat("\n"+s.text,n||1);e.session.insert(o,u),e.moveCursorTo(o.row+1,0)}else e.navigateRight(),e.insert(r.stringRepeat(s.text,n||1)),e.navigateLeft();e.setOverwrite(!0),e.selection.clearSelection()}},P:{fn:function(e,t,n,i){var s=a._default;e.setOverwrite(!1);if(s.isLine){var o=e.getCursorPosition();o.column=0;var u=r.stringRepeat(s.text+"\n",n||1);e.session.insert(o,u),e.moveCursorToPosition(o)}else e.insert(r.stringRepeat(s.text,n||1));e.setOverwrite(!0),e.selection.clearSelection()}},J:{fn:function(e,t,n,r){var i=e.session;t=e.getSelectionRange();var s={row:t.start.row,column:t.start.column};n=n||t.end.row-t.start.row;var o=Math.min(s.row+(n||1),i.getLength()-1);t.start.column=i.getLine(s.row).length,t.end.column=i.getLine(o).length,t.end.row=o;var u="";for(var a=s.row;a<o;a++){var f=i.getLine(a+1);u+=" "+/^\s*(.*)$/.exec(f)[1]||""}i.replace(t,u),e.moveCursorTo(s.row,s.column)}},u:{fn:function(e,t,n,r){n=parseInt(n||1,10);for(var i=0;i<n;i++)e.undo();e.selection.clearSelection()}},"ctrl-r":{fn:function(e,t,n,r){n=parseInt(n||1,10);for(var i=0;i<n;i++)e.redo();e.selection.clearSelection()}},":":{fn:function(e,t,n,r){var i=":";n>1&&(i=".,.+"+n+i),e.showCommandLine&&e.showCommandLine(i)}},"/":{fn:function(e,t,n,r){e.showCommandLine&&e.showCommandLine("/")}},"?":{fn:function(e,t,n,r){e.showCommandLine&&e.showCommandLine("?")}},".":{fn:function(e,t,n,r){i.onInsertReplaySequence=g.lastInsertCommands;var s=g.previous;s&&g.exec(e,s.action,s.param)}},"ctrl-x":{fn:function(e,t,n,r){e.modifyNumber(-(n||1))}},"ctrl-a":{fn:function(e,t,n,r){e.modifyNumber(n||1)}}},g=t.inputBuffer={accepting:[f,l,c,h],currentCmd:null,currentCount:"",pendingCount:"",status:"",operator:null,motion:null,lastInsertCommands:[],push:function(e,t,n){var r=this.status,i=!0;this.idle=!1;var a=this.waitingForParam;/^numpad\d+$/i.test(t)&&(t=t.substr(6));if(a)this.exec(e,a,t);else if(t==="0"&&!this.currentCount.length||!/^\d+$/.test(t)||!this.isAccepting(f))if(!this.operator&&this.isAccepting(l)&&o[t])this.operator={ch:t,count:this.getCount()},this.currentCmd=l,this.accepting=[f,c,h],this.exec(e,{operator:this.operator});else if(s[t]&&this.isAccepting(c)){this.currentCmd=c;var p={operator:this.operator,motion:{ch:t,count:this.getCount()}};s[t].param?this.waitForParam(p):this.exec(e,p)}else if(u[t]&&this.isAccepting(c))u[t].operator.count=this.getCount(),this.exec(e,u[t]);else if(m[t]&&this.isAccepting(h)){var d={action:{fn:m[t].fn,count:this.getCount()}};m[t].param?this.waitForParam(d):this.exec(e,d),m[t].acceptsMotion&&(this.idle=!1)}else this.operator?(this.operator.count=this.getCount(),this.exec(e,{operator:this.operator},t)):(i=t.length==1,this.reset());else this.currentCount+=t,this.currentCmd=f,this.accepting=[f,l,c,h];return this.waitingForParam||this.motion||this.operator?this.status+=t:this.currentCount?this.status=this.currentCount:this.status&&(this.status=""),this.status!=r&&e._emit("changeStatus"),i},waitForParam:function(e){this.waitingForParam=e},getCount:function(){var e=this.currentCount||this.pendingCount;return this.currentCount="",this.pendingCount=e,e&&parseInt(e,10)},exec:function(e,t,n){var r=t.motion,u=t.operator,a=t.action;n||(n=t.param),u&&(this.previous={action:t,param:n});if(u&&!e.selection.isEmpty()){o[u.ch].selFn&&(o[u.ch].selFn(e,e.getSelectionRange(),u.count,n),this.reset());return}if(!r&&!a&&u&&n)o[u.ch].fn(e,null,u.count,n),this.reset();else if(r){var f=function(t){t&&typeof t=="function"&&(r.count&&!l.handlesCount?d(t,r.count,[e,null,r.count,n]):t(e,null,r.count,n))},l=s[r.ch],c=l.sel;u?c&&d(function(){f(l.sel),o[u.ch].fn(e,e.getSelectionRange(),u.count,l.param?l:n)},u.count||1):(i.onVisualMode||i.onVisualLineMode)&&c?f(l.sel):f(l.nav),this.reset()}else a&&(a.fn(e,e.getSelectionRange(),a.count,n),this.reset());b(e)},isAccepting:function(e){return this.accepting.indexOf(e)!==-1},reset:function(){this.operator=null,this.motion=null,this.currentCount="",this.pendingCount="",this.status="",this.accepting=[f,l,c,h],this.idle=!0,this.waitingForParam=null}};t.coreCommands={start:{exec:function w(e){i.insertMode(e),y(w)}},startBeginning:{exec:function E(e){e.navigateLineStart(),i.insertMode(e),y(E)}},stop:{exec:function(t){g.reset(),i.onVisualMode=!1,i.onVisualLineMode=!1,g.lastInsertCommands=i.normalMode(t)}},append:{exec:function S(e){var t=e.getCursorPosition(),n=e.session.getLine(t.row).length;n&&e.navigateRight(),i.insertMode(e),y(S)}},appendEnd:{exec:function x(e){e.navigateLineEnd(),i.insertMode(e),y(x)}}};var b=t.onCursorMove=function(e,t){if(i.currentMode==="insert"||b.running)return;if(!e.selection.isEmpty()){b.running=!0;if(i.onVisualLineMode){var n=e.selection.visualLineStart,r=e.getCursorPosition().row;if(n<=r){var s=e.session.getLine(r);e.selection.moveTo(n,0),e.selection.selectTo(r,s.length)}else{var s=e.session.getLine(n);e.selection.moveTo(n,s.length),e.selection.selectTo(r,0)}}b.running=!1;return}t&&(i.onVisualLineMode||i.onVisualMode)&&(e.selection.clearSelection(),i.normalMode(e)),b.running=!0;var o=e.getCursorPosition(),u=e.session.getLine(o.row).length;u&&o.column===u&&e.navigateLeft(),b.running=!1}}),ace.define("ace/keyboard/vim/maps/util",["require","exports","module","ace/keyboard/vim/registers","ace/lib/dom"],function(e,t,n){var r=e("../registers"),i=e("../../../lib/dom");i.importCssString(".insert-mode .ace_cursor{    border-left: 2px solid #333333;}.ace_dark.insert-mode .ace_cursor{    border-left: 2px solid #eeeeee;}.normal-mode .ace_cursor{    border: 0!important;    background-color: red;    opacity: 0.5;}","vimMode"),n.exports={onVisualMode:!1,onVisualLineMode:!1,currentMode:"normal",noMode:function(e){e.unsetStyle("insert-mode"),e.unsetStyle("normal-mode"),e.commands.recording&&e.commands.toggleRecording(e),e.setOverwrite(!1)},insertMode:function(e){this.currentMode="insert",e.setStyle("insert-mode"),e.unsetStyle("normal-mode"),e.setOverwrite(!1),e.keyBinding.$data.buffer="",e.keyBinding.$data.vimState="insertMode",this.onVisualMode=!1,this.onVisualLineMode=!1,this.onInsertReplaySequence?(e.commands.macro=this.onInsertReplaySequence,e.commands.replay(e),this.onInsertReplaySequence=null,this.normalMode(e)):(e._emit("changeStatus"),e.commands.recording||e.commands.toggleRecording(e))},normalMode:function(e){this.currentMode="normal",e.unsetStyle("insert-mode"),e.setStyle("normal-mode"),e.clearSelection();var t;return e.getOverwrite()||(t=e.getCursorPosition(),t.column>0&&e.navigateLeft()),e.setOverwrite(!0),e.keyBinding.$data.buffer="",e.keyBinding.$data.vimState="start",this.onVisualMode=!1,this.onVisualLineMode=!1,e._emit("changeStatus"),e.commands.recording?(e.commands.toggleRecording(e),e.commands.macro):[]},visualMode:function(e,t){if(this.onVisualLineMode&&t||this.onVisualMode&&!t){this.normalMode(e);return}e.setStyle("insert-mode"),e.unsetStyle("normal-mode"),e._emit("changeStatus"),t?this.onVisualLineMode=!0:(this.onVisualMode=!0,this.onVisualLineMode=!1)},getRightNthChar:function(e,t,n,r){var i=e.getSession().getLine(t.row),s=i.substr(t.column+1).split(n);return r<s.length?s.slice(0,r).join(n).length:null},getLeftNthChar:function(e,t,n,r){var i=e.getSession().getLine(t.row),s=i.substr(0,t.column).split(n);return r<s.length?s.slice(-1*r).join(n).length:null},toRealChar:function(e){return e.length===1?e:/^shift-./.test(e)?e[e.length-1].toUpperCase():""},copyLine:function(e){var t=e.getCursorPosition();e.selection.moveTo(t.row,t.column),e.selection.selectLine(),r._default.isLine=!0,r._default.text=e.getCopyText().replace(/\n$/,""),e.selection.moveTo(t.row,t.column)}}}),ace.define("ace/keyboard/vim/registers",["require","exports","module"],function(e,t,n){"never use strict";n.exports={_default:{text:"",isLine:!1}}}),ace.define("ace/keyboard/vim/maps/motions",["require","exports","module","ace/keyboard/vim/maps/util","ace/search","ace/range"],function(e,t,n){function s(e){if(typeof e=="function"){var t=e;e=this}else var t=e.getPos;return e.nav=function(e,n,r,i){var s=t(e,n,r,i,!1);if(!s)return;e.selection.moveTo(s.row,s.column)},e.sel=function(e,n,r,i){var s=t(e,n,r,i,!0);if(!s)return;e.selection.selectTo(s.row,s.column)},e}function h(e,t,n){return c.$options.needle=t,c.$options.backwards=n==-1,c.find(e.session)}var r=e("./util"),i=function(e,t){var n=e.renderer.getScrollTopRow(),r=e.getCursorPosition().row,i=r-n;t&&t.call(e),e.renderer.scrollToRow(e.getCursorPosition().row-i)},o=/[\s.\/\\()\"'-:,.;<>~!@#$%^&*|+=\[\]{}`~?]/,u=/[.\/\\()\"'-:,.;<>~!@#$%^&*|+=\[\]{}`~?]/,a=/\s/,f=function(e,t){var n=e.selection;this.range=n.getRange(),t=t||n.selectionLead,this.row=t.row,this.col=t.column;var r=e.session.getLine(this.row),i=e.session.getLength();this.ch=r[this.col]||"\n",this.skippedLines=0,this.next=function(){return this.ch=r[++this.col]||this.handleNewLine(1),this.ch},this.prev=function(){return this.ch=r[--this.col]||this.handleNewLine(-1),this.ch},this.peek=function(t){var n=r[this.col+t];return n?n:t==-1?"\n":this.col==r.length-1?"\n":e.session.getLine(this.row+1)[0]||"\n"},this.handleNewLine=function(t){if(t==1)return this.col==r.length?"\n":this.row==i-1?"":(this.col=0,this.row++,r=e.session.getLine(this.row),this.skippedLines++,r[0]||"\n");if(t==-1)return this.row===0?"":(this.row--,r=e.session.getLine(this.row),this.col=r.length,this.skippedLines--,"\n")},this.debug=function(){console.log(r.substring(0,this.col)+"|"+this.ch+"'"+this.col+"'"+r.substr(this.col+1))}},l=e("../../../search").Search,c=new l,p=e("../../../range").Range,d={};n.exports={w:new s(function(e){var t=new f(e);if(t.ch&&u.test(t.ch))while(t.ch&&u.test(t.ch))t.next();else while(t.ch&&!o.test(t.ch))t.next();while(t.ch&&a.test(t.ch)&&t.skippedLines<2)t.next();return t.skippedLines==2&&t.prev(),{column:t.col,row:t.row}}),W:new s(function(e){var t=new f(e);while(t.ch&&(!a.test(t.ch)||!!a.test(t.peek(1)))&&t.skippedLines<2)t.next();return t.skippedLines==2?t.prev():t.next(),{column:t.col,row:t.row}}),b:new s(function(e){var t=new f(e);t.prev();while(t.ch&&a.test(t.ch)&&t.skippedLines>-2)t.prev();if(t.ch&&u.test(t.ch))while(t.ch&&u.test(t.ch))t.prev();else while(t.ch&&!o.test(t.ch))t.prev();return t.ch&&t.next(),{column:t.col,row:t.row}}),B:new s(function(e){var t=new f(e);t.prev();while(t.ch&&(!!a.test(t.ch)||!a.test(t.peek(-1)))&&t.skippedLines>-2)t.prev();return t.skippedLines==-2&&t.next(),{column:t.col,row:t.row}}),e:new s(function(e){var t=new f(e);t.next();while(t.ch&&a.test(t.ch))t.next();if(t.ch&&u.test(t.ch))while(t.ch&&u.test(t.ch))t.next();else while(t.ch&&!o.test(t.ch))t.next();return t.ch&&t.prev(),{column:t.col,row:t.row}}),E:new s(function(e){var t=new f(e);t.next();while(t.ch&&(!!a.test(t.ch)||!a.test(t.peek(1))))t.next();return{column:t.col,row:t.row}}),l:{nav:function(e){var t=e.getCursorPosition(),n=t.column,r=e.session.getLine(t.row).length;r&&n!==r&&e.navigateRight()},sel:function(e){var t=e.getCursorPosition(),n=t.column,r=e.session.getLine(t.row).length;r&&n!==r&&e.selection.selectRight()}},h:{nav:function(e){var t=e.getCursorPosition();t.column>0&&e.navigateLeft()},sel:function(e){var t=e.getCursorPosition();t.column>0&&e.selection.selectLeft()}},H:{nav:function(e){var t=e.renderer.getScrollTopRow();e.moveCursorTo(t)},sel:function(e){var t=e.renderer.getScrollTopRow();e.selection.selectTo(t)}},M:{nav:function(e){var t=e.renderer.getScrollTopRow(),n=e.renderer.getScrollBottomRow(),r=t+(n-t)/2;e.moveCursorTo(r)},sel:function(e){var t=e.renderer.getScrollTopRow(),n=e.renderer.getScrollBottomRow(),r=t+(n-t)/2;e.selection.selectTo(r)}},L:{nav:function(e){var t=e.renderer.getScrollBottomRow();e.moveCursorTo(t)},sel:function(e){var t=e.renderer.getScrollBottomRow();e.selection.selectTo(t)}},k:{nav:function(e){e.navigateUp()},sel:function(e){e.selection.selectUp()}},j:{nav:function(e){e.navigateDown()},sel:function(e){e.selection.selectDown()}},i:{param:!0,sel:function(e,t,n,r){switch(r){case"w":e.selection.selectWord();break;case"W":e.selection.selectAWord();break;case"(":case"{":case"[":var i=e.getCursorPosition(),s=e.session.$findClosingBracket(r,i,/paren/);if(!s)return;var o=e.session.$findOpeningBracket(e.session.$brackets[r],i,/paren/);if(!o)return;o.column++,e.selection.setSelectionRange(p.fromPoints(o,s));break;case"'":case'"':case"/":var s=h(e,r,1);if(!s)return;var o=h(e,r,-1);if(!o)return;e.selection.setSelectionRange(p.fromPoints(o.end,s.start))}}},a:{param:!0,sel:function(e,t,n,r){switch(r){case"w":e.selection.selectAWord();break;case"W":e.selection.selectAWord();break;case")":case"}":case"]":r=e.session.$brackets[r];case"(":case"{":case"[":var i=e.getCursorPosition(),s=e.session.$findClosingBracket(r,i,/paren/);if(!s)return;var o=e.session.$findOpeningBracket(e.session.$brackets[r],i,/paren/);if(!o)return;s.column++,e.selection.setSelectionRange(p.fromPoints(o,s));break;case"'":case'"':case"/":var s=h(e,r,1);if(!s)return;var o=h(e,r,-1);if(!o)return;s.column++,e.selection.setSelectionRange(p.fromPoints(o.start,s.end))}}},f:new s({param:!0,handlesCount:!0,getPos:function(e,t,n,i,s,o){i=="space"&&(i=" "),o||(d={ch:"f",param:i});var u=e.getCursorPosition(),a=r.getRightNthChar(e,u,i,n||1);if(typeof a=="number")return u.column+=a+(s?2:1),u}}),F:new s({param:!0,handlesCount:!0,getPos:function(e,t,n,i,s,o){i=="space"&&(i=" "),o||(d={ch:"F",param:i});var u=e.getCursorPosition(),a=r.getLeftNthChar(e,u,i,n||1);if(typeof a=="number")return u.column-=a+1,u}}),t:new s({param:!0,handlesCount:!0,getPos:function(e,t,n,i,s,o){i=="space"&&(i=" "),o||(d={ch:"t",param:i});var u=e.getCursorPosition(),a=r.getRightNthChar(e,u,i,n||1);if(o&&a==0&&!(n>1))var a=r.getRightNthChar(e,u,i,2);if(typeof a=="number")return u.column+=a+(s?1:0),u}}),T:new s({param:!0,handlesCount:!0,getPos:function(e,t,n,i,s,o){i=="space"&&(i=" "),o||(d={ch:"T",param:i});var u=e.getCursorPosition(),a=r.getLeftNthChar(e,u,i,n||1);if(o&&a==0&&!(n>1))var a=r.getLeftNthChar(e,u,i,2);if(typeof a=="number")return u.column-=a,u}}),";":new s({handlesCount:!0,getPos:function(e,t,r,i,s){var o=d.ch;if(!o)return;return n.exports[o].getPos(e,t,r,d.param,s,!0)}}),",":new s({handlesCount:!0,getPos:function(e,t,r,i,s){var o=d.ch;if(!o)return;var u=o.toUpperCase();return o=o===u?o.toLowerCase():u,n.exports[o].getPos(e,t,r,d.param,s,!0)}}),"^":{nav:function(e){e.navigateLineStart()},sel:function(e){e.selection.selectLineStart()}},$:{handlesCount:!0,nav:function(e,t,n,r){n>1&&e.navigateDown(n-1),e.navigateLineEnd()},sel:function(e,t,n,r){n>1&&e.selection.moveCursorBy(n-1,0),e.selection.selectLineEnd()}},0:new s(function(e){return{row:e.selection.lead.row,column:0}}),G:{nav:function(e,t,n,r){!n&&n!==0&&(n=e.session.getLength()),e.gotoLine(n)},sel:function(e,t,n,r){!n&&n!==0&&(n=e.session.getLength()),e.selection.selectTo(n,0)}},g:{param:!0,nav:function(e,t,n,r){switch(r){case"m":console.log("Middle line");break;case"e":console.log("End of prev word");break;case"g":e.gotoLine(n||0);case"u":e.gotoLine(n||0);case"U":e.gotoLine(n||0)}},sel:function(e,t,n,r){switch(r){case"m":console.log("Middle line");break;case"e":console.log("End of prev word");break;case"g":e.selection.selectTo(n||0,0)}}},o:{nav:function(e,t,n,i){n=n||1;var s="";while(0<n--)s+="\n";s.length&&(e.navigateLineEnd(),e.insert(s),r.insertMode(e))}},O:{nav:function(e,t,n,i){var s=e.getCursorPosition().row;n=n||1;var o="";while(0<n--)o+="\n";o.length&&(s>0?(e.navigateUp(),e.navigateLineEnd(),e.insert(o)):(e.session.insert({row:0,column:0},o),e.navigateUp()),r.insertMode(e))}},"%":new s(function(e){var t=/[\[\]{}()]/g,n=e.getCursorPosition(),r=e.session.getLine(n.row)[n.column];if(!t.test(r)){var i=h(e,t);if(!i)return;n=i.start}var s=e.session.findMatchingBracket({row:n.row,column:n.column+1});return s}),"{":new s(function(e){var t=e.session,n=t.selection.lead.row;while(n>0&&!/\S/.test(t.getLine(n)))n--;while(/\S/.test(t.getLine(n)))n--;return{column:0,row:n}}),"}":new s(function(e){var t=e.session,n=t.getLength(),r=t.selection.lead.row;while(r<n&&!/\S/.test(t.getLine(r)))r++;while(/\S/.test(t.getLine(r)))r++;return{column:0,row:r}}),"ctrl-d":{nav:function(e,t,n,r){e.selection.clearSelection(),i(e,e.gotoPageDown)},sel:function(e,t,n,r){i(e,e.selectPageDown)}},"ctrl-u":{nav:function(e,t,n,r){e.selection.clearSelection(),i(e,e.gotoPageUp)},sel:function(e,t,n,r){i(e,e.selectPageUp)}},"`":new s({param:!0,handlesCount:!0,getPos:function(e,t,n,r,i){var s=e.session,o=s.vimMarkers&&s.vimMarkers[r];if(o)return o.getPosition()}}),"'":new s({param:!0,handlesCount:!0,getPos:function(e,t,n,r,i){var s=e.session,o=s.vimMarkers&&s.vimMarkers[r];if(o){var u=o.getPosition(),a=e.session.getLine(u.row);return u.column=a.search(/\S/),u.column==-1&&(u.column=a.length),u}},isLine:!0})},n.exports.backspace=n.exports.left=n.exports.h,n.exports.space=n.exports["return"]=n.exports.right=n.exports.l,n.exports.up=n.exports.k,n.exports.down=n.exports.j,n.exports.pagedown=n.exports["ctrl-d"],n.exports.pageup=n.exports["ctrl-u"],n.exports.home=n.exports[0],n.exports.end=n.exports.$}),ace.define("ace/keyboard/vim/maps/operators",["require","exports","module","ace/keyboard/vim/maps/util","ace/keyboard/vim/registers"],function(e,t,n){var r=e("./util"),i=e("../registers");n.exports={d:{selFn:function(e,t,n,s){i._default.text=e.getCopyText(),i._default.isLine=r.onVisualLineMode,r.onVisualLineMode?e.removeLines():e.session.remove(t),r.normalMode(e)},fn:function(e,t,n,r){n=n||1;switch(r){case"d":i._default.text="",i._default.isLine=!0;for(var s=0;s<n;s++){e.selection.selectLine(),i._default.text+=e.getCopyText();var o=e.getSelectionRange();if(!o.isMultiLine()){var u=o.start.row-1,a=e.session.getLine(u).length;o.setStart(u,a),e.session.remove(o),e.selection.clearSelection();break}e.session.remove(o),e.selection.clearSelection()}i._default.text=i._default.text.replace(/\n$/,"");break;default:t&&(e.selection.setSelectionRange(t),i._default.text=e.getCopyText(),i._default.isLine=!1,e.session.remove(t),e.selection.clearSelection())}}},c:{selFn:function(e,t,n,i){e.session.remove(t),r.insertMode(e)},fn:function(e,t,n,i){n=n||1;switch(i){case"c":for(var s=0;s<n;s++)e.removeLines(),r.insertMode(e);break;default:t&&(e.session.remove(t),r.insertMode(e))}}},y:{selFn:function(e,t,n,s){i._default.text=e.getCopyText(),i._default.isLine=r.onVisualLineMode,e.selection.clearSelection(),r.normalMode(e)},fn:function(e,t,n,r){n=n||1,r&&r.isLine&&(r="y");switch(r){case"y":var s=e.getCursorPosition();e.selection.selectLine();for(var o=0;o<n-1;o++)e.selection.moveCursorDown();i._default.text=e.getCopyText().replace(/\n$/,""),e.selection.clearSelection(),i._default.isLine=!0,e.moveCursorToPosition(s);break;default:if(t){var s=e.getCursorPosition();e.selection.setSelectionRange(t),i._default.text=e.getCopyText(),i._default.isLine=!1,e.selection.clearSelection(),e.moveCursorTo(s.row,s.column)}}}},">":{selFn:function(e,t,n,i){n=n||1;for(var s=0;s<n;s++)e.indent();r.normalMode(e)},fn:function(e,t,n,r){n=parseInt(n||1,10);switch(r){case">":var i=e.getCursorPosition();e.selection.selectLine();for(var s=0;s<n-1;s++)e.selection.moveCursorDown();e.indent(),e.selection.clearSelection(),e.moveCursorToPosition(i),e.navigateLineEnd(),e.navigateLineStart()}}},"<":{selFn:function(e,t,n,i){n=n||1;for(var s=0;s<n;s++)e.blockOutdent();r.normalMode(e)},fn:function(e,t,n,r){n=n||1;switch(r){case"<":var i=e.getCursorPosition();e.selection.selectLine();for(var s=0;s<n-1;s++)e.selection.moveCursorDown();e.blockOutdent(),e.selection.clearSelection(),e.moveCursorToPosition(i),e.navigateLineEnd(),e.navigateLineStart()}}}}}),"use strict",ace.define("ace/keyboard/vim/maps/aliases",["require","exports","module"],function(e,t,n){n.exports={x:{operator:{ch:"d",count:1},motion:{ch:"l",count:1}},X:{operator:{ch:"d",count:1},motion:{ch:"h",count:1}},D:{operator:{ch:"d",count:1},motion:{ch:"$",count:1}},C:{operator:{ch:"c",count:1},motion:{ch:"$",count:1}},s:{operator:{ch:"c",count:1},motion:{ch:"l",count:1}},S:{operator:{ch:"c",count:1},param:"c"}}})
\ No newline at end of file
diff --git a/app/assets/lib/ace/mode-clojure.js b/app/assets/lib/ace/mode-clojure.js
index 0ce87413c..8624ef50d 100644
--- a/app/assets/lib/ace/mode-clojure.js
+++ b/app/assets/lib/ace/mode-clojure.js
@@ -1 +1 @@
-ace.define("ace/mode/clojure",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/clojure_highlight_rules","ace/mode/matching_parens_outdent","ace/range"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("./clojure_highlight_rules").ClojureHighlightRules,o=e("./matching_parens_outdent").MatchingParensOutdent,u=e("../range").Range,a=function(){this.HighlightRules=s,this.$outdent=new o};r.inherits(a,i),function(){this.lineCommentStart=";",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/[\(\[]/);o&&(r+="  "),o=t.match(/[\)]/),o&&(r="")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/clojure"}.call(a.prototype),t.Mode=a}),ace.define("ace/mode/clojure_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="* *1 *2 *3 *agent* *allow-unresolved-vars* *assert* *clojure-version* *command-line-args* *compile-files* *compile-path* *e *err* *file* *flush-on-newline* *in* *macro-meta* *math-context* *ns* *out* *print-dup* *print-length* *print-level* *print-meta* *print-readably* *read-eval* *source-path* *use-context-classloader* *warn-on-reflection* + - -> ->> .. / < <= = == > &gt; >= &gt;= accessor aclone add-classpath add-watch agent agent-errors aget alength alias all-ns alter alter-meta! alter-var-root amap ancestors and apply areduce array-map aset aset-boolean aset-byte aset-char aset-double aset-float aset-int aset-long aset-short assert assoc assoc! assoc-in associative? atom await await-for await1 bases bean bigdec bigint binding bit-and bit-and-not bit-clear bit-flip bit-not bit-or bit-set bit-shift-left bit-shift-right bit-test bit-xor boolean boolean-array booleans bound-fn bound-fn* butlast byte byte-array bytes cast char char-array char-escape-string char-name-string char? chars chunk chunk-append chunk-buffer chunk-cons chunk-first chunk-next chunk-rest chunked-seq? class class? clear-agent-errors clojure-version coll? comment commute comp comparator compare compare-and-set! compile complement concat cond condp conj conj! cons constantly construct-proxy contains? count counted? create-ns create-struct cycle dec decimal? declare definline defmacro defmethod defmulti defn defn- defonce defstruct delay delay? deliver deref derive descendants destructure disj disj! dissoc dissoc! distinct distinct? doall doc dorun doseq dosync dotimes doto double double-array doubles drop drop-last drop-while empty empty? ensure enumeration-seq eval even? every? false? ffirst file-seq filter find find-doc find-ns find-var first float float-array float? floats flush fn fn? fnext for force format future future-call future-cancel future-cancelled? future-done? future? gen-class gen-interface gensym get get-in get-method get-proxy-class get-thread-bindings get-validator hash hash-map hash-set identical? identity if-let if-not ifn? import in-ns inc init-proxy instance? int int-array integer? interleave intern interpose into into-array ints io! isa? iterate iterator-seq juxt key keys keyword keyword? last lazy-cat lazy-seq let letfn line-seq list list* list? load load-file load-reader load-string loaded-libs locking long long-array longs loop macroexpand macroexpand-1 make-array make-hierarchy map map? mapcat max max-key memfn memoize merge merge-with meta method-sig methods min min-key mod name namespace neg? newline next nfirst nil? nnext not not-any? not-empty not-every? not= ns ns-aliases ns-imports ns-interns ns-map ns-name ns-publics ns-refers ns-resolve ns-unalias ns-unmap nth nthnext num number? odd? or parents partial partition pcalls peek persistent! pmap pop pop! pop-thread-bindings pos? pr pr-str prefer-method prefers primitives-classnames print print-ctor print-doc print-dup print-method print-namespace-doc print-simple print-special-doc print-str printf println println-str prn prn-str promise proxy proxy-call-with-super proxy-mappings proxy-name proxy-super push-thread-bindings pvalues quot rand rand-int range ratio? rational? rationalize re-find re-groups re-matcher re-matches re-pattern re-seq read read-line read-string reduce ref ref-history-count ref-max-history ref-min-history ref-set refer refer-clojure release-pending-sends rem remove remove-method remove-ns remove-watch repeat repeatedly replace replicate require reset! reset-meta! resolve rest resultset-seq reverse reversible? rseq rsubseq second select-keys send send-off seq seq? seque sequence sequential? set set-validator! set? short short-array shorts shutdown-agents slurp some sort sort-by sorted-map sorted-map-by sorted-set sorted-set-by sorted? special-form-anchor special-symbol? split-at split-with str stream? string? struct struct-map subs subseq subvec supers swap! symbol symbol? sync syntax-symbol-anchor take take-last take-nth take-while test the-ns time to-array to-array-2d trampoline transient tree-seq true? type unchecked-add unchecked-dec unchecked-divide unchecked-inc unchecked-multiply unchecked-negate unchecked-remainder unchecked-subtract underive unquote unquote-splicing update-in update-proxy use val vals var-get var-set var? vary-meta vec vector vector? when when-first when-let when-not while with-bindings with-bindings* with-in-str with-loading-context with-local-vars with-meta with-open with-out-str with-precision xml-seq zero? zipmap",t="throw try var def do fn if let loop monitor-enter monitor-exit new quote recur set!",n="true false nil",r=this.createKeywordMapper({keyword:t,"constant.language":n,"support.function":e},"identifier",!1," ");this.$rules={start:[{token:"comment",regex:";.*$"},{token:"keyword",regex:"[\\(|\\)]"},{token:"keyword",regex:"[\\'\\(]"},{token:"keyword",regex:"[\\[|\\]]"},{token:"keyword",regex:"[\\{|\\}|\\#\\{|\\#\\}]"},{token:"keyword",regex:"[\\&]"},{token:"keyword",regex:"[\\#\\^\\{]"},{token:"keyword",regex:"[\\%]"},{token:"keyword",regex:"[@]"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language",regex:"[!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+||=|!=|<=|>=|<>|<|>|!|&&]"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$\\-]*\\b"},{token:"string",regex:'"',next:"string"},{token:"constant",regex:/:[^()\[\]{}'"\^%`,;\s]+/},{token:"string.regexp",regex:'/#"(?:\\.|(?:\\")|[^""\n])*"/g'}],string:[{token:"constant.language.escape",regex:"\\\\.|\\\\$"},{token:"string",regex:'[^"\\\\]+'},{token:"string",regex:'"',next:"start"}]}};r.inherits(s,i),t.ClojureHighlightRules=s}),ace.define("ace/mode/matching_parens_outdent",["require","exports","module","ace/range"],function(e,t,n){var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\)/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\))/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){var t=e.match(/^(\s+)/);return t?t[1]:""}}).call(i.prototype),t.MatchingParensOutdent=i})
+ace.define("ace/mode/clojure",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/clojure_highlight_rules","ace/mode/matching_parens_outdent"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("./clojure_highlight_rules").ClojureHighlightRules,o=e("./matching_parens_outdent").MatchingParensOutdent,u=function(){this.HighlightRules=s,this.$outdent=new o};r.inherits(u,i),function(){this.lineCommentStart=";",this.minorIndentFunctions=["defn","defn-","defmacro","def","deftest","testing"],this.$toIndent=function(e){return e.split("").map(function(e){return/\s/.exec(e)?e:" "}).join("")},this.$calculateIndent=function(e,t){var n=this.$getIndent(e),r=0,i,s;for(var o=e.length-1;o>=0;o--){s=e[o],s==="("?(r--,i=!0):s==="("||s==="["||s==="{"?(r--,i=!1):(s===")"||s==="]"||s==="}")&&r++;if(r<0)break}if(!(r<0&&i))return r<0&&!i?this.$toIndent(e.substring(0,o+1)):r>0?(n=n.substring(0,n.length-t.length),n):n;o+=1;var u=o,a="";for(;;){s=e[o];if(s===" "||s==="	")return this.minorIndentFunctions.indexOf(a)!==-1?this.$toIndent(e.substring(0,u-1)+t):this.$toIndent(e.substring(0,o+1));if(s===undefined)return this.$toIndent(e.substring(0,u-1)+t);a+=e[o],o++}},this.getNextLineIndent=function(e,t,n){return this.$calculateIndent(t,n)},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/clojure"}.call(u.prototype),t.Mode=u}),ace.define("ace/mode/clojure_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="* *1 *2 *3 *agent* *allow-unresolved-vars* *assert* *clojure-version* *command-line-args* *compile-files* *compile-path* *e *err* *file* *flush-on-newline* *in* *macro-meta* *math-context* *ns* *out* *print-dup* *print-length* *print-level* *print-meta* *print-readably* *read-eval* *source-path* *use-context-classloader* *warn-on-reflection* + - -> ->> .. / < <= = == > &gt; >= &gt;= accessor aclone add-classpath add-watch agent agent-errors aget alength alias all-ns alter alter-meta! alter-var-root amap ancestors and apply areduce array-map aset aset-boolean aset-byte aset-char aset-double aset-float aset-int aset-long aset-short assert assoc assoc! assoc-in associative? atom await await-for await1 bases bean bigdec bigint binding bit-and bit-and-not bit-clear bit-flip bit-not bit-or bit-set bit-shift-left bit-shift-right bit-test bit-xor boolean boolean-array booleans bound-fn bound-fn* butlast byte byte-array bytes cast char char-array char-escape-string char-name-string char? chars chunk chunk-append chunk-buffer chunk-cons chunk-first chunk-next chunk-rest chunked-seq? class class? clear-agent-errors clojure-version coll? comment commute comp comparator compare compare-and-set! compile complement concat cond condp conj conj! cons constantly construct-proxy contains? count counted? create-ns create-struct cycle dec decimal? declare definline defmacro defmethod defmulti defn defn- defonce defstruct delay delay? deliver deref derive descendants destructure disj disj! dissoc dissoc! distinct distinct? doall doc dorun doseq dosync dotimes doto double double-array doubles drop drop-last drop-while empty empty? ensure enumeration-seq eval even? every? false? ffirst file-seq filter find find-doc find-ns find-var first float float-array float? floats flush fn fn? fnext for force format future future-call future-cancel future-cancelled? future-done? future? gen-class gen-interface gensym get get-in get-method get-proxy-class get-thread-bindings get-validator hash hash-map hash-set identical? identity if-let if-not ifn? import in-ns inc init-proxy instance? int int-array integer? interleave intern interpose into into-array ints io! isa? iterate iterator-seq juxt key keys keyword keyword? last lazy-cat lazy-seq let letfn line-seq list list* list? load load-file load-reader load-string loaded-libs locking long long-array longs loop macroexpand macroexpand-1 make-array make-hierarchy map map? mapcat max max-key memfn memoize merge merge-with meta method-sig methods min min-key mod name namespace neg? newline next nfirst nil? nnext not not-any? not-empty not-every? not= ns ns-aliases ns-imports ns-interns ns-map ns-name ns-publics ns-refers ns-resolve ns-unalias ns-unmap nth nthnext num number? odd? or parents partial partition pcalls peek persistent! pmap pop pop! pop-thread-bindings pos? pr pr-str prefer-method prefers primitives-classnames print print-ctor print-doc print-dup print-method print-namespace-doc print-simple print-special-doc print-str printf println println-str prn prn-str promise proxy proxy-call-with-super proxy-mappings proxy-name proxy-super push-thread-bindings pvalues quot rand rand-int range ratio? rational? rationalize re-find re-groups re-matcher re-matches re-pattern re-seq read read-line read-string reduce ref ref-history-count ref-max-history ref-min-history ref-set refer refer-clojure release-pending-sends rem remove remove-method remove-ns remove-watch repeat repeatedly replace replicate require reset! reset-meta! resolve rest resultset-seq reverse reversible? rseq rsubseq second select-keys send send-off seq seq? seque sequence sequential? set set-validator! set? short short-array shorts shutdown-agents slurp some sort sort-by sorted-map sorted-map-by sorted-set sorted-set-by sorted? special-form-anchor special-symbol? split-at split-with str stream? string? struct struct-map subs subseq subvec supers swap! symbol symbol? sync syntax-symbol-anchor take take-last take-nth take-while test the-ns time to-array to-array-2d trampoline transient tree-seq true? type unchecked-add unchecked-dec unchecked-divide unchecked-inc unchecked-multiply unchecked-negate unchecked-remainder unchecked-subtract underive unquote unquote-splicing update-in update-proxy use val vals var-get var-set var? vary-meta vec vector vector? when when-first when-let when-not while with-bindings with-bindings* with-in-str with-loading-context with-local-vars with-meta with-open with-out-str with-precision xml-seq zero? zipmap",t="throw try var def do fn if let loop monitor-enter monitor-exit new quote recur set!",n="true false nil",r=this.createKeywordMapper({keyword:t,"constant.language":n,"support.function":e},"identifier",!1," ");this.$rules={start:[{token:"comment",regex:";.*$"},{token:"keyword",regex:"[\\(|\\)]"},{token:"keyword",regex:"[\\'\\(]"},{token:"keyword",regex:"[\\[|\\]]"},{token:"keyword",regex:"[\\{|\\}|\\#\\{|\\#\\}]"},{token:"keyword",regex:"[\\&]"},{token:"keyword",regex:"[\\#\\^\\{]"},{token:"keyword",regex:"[\\%]"},{token:"keyword",regex:"[@]"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language",regex:"[!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+||=|!=|<=|>=|<>|<|>|!|&&]"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$\\-]*\\b"},{token:"string",regex:'"',next:"string"},{token:"constant",regex:/:[^()\[\]{}'"\^%`,;\s]+/},{token:"string.regexp",regex:'/#"(?:\\.|(?:\\")|[^""\n])*"/g'}],string:[{token:"constant.language.escape",regex:"\\\\.|\\\\$"},{token:"string",regex:'[^"\\\\]+'},{token:"string",regex:'"',next:"start"}]}};r.inherits(s,i),t.ClojureHighlightRules=s}),ace.define("ace/mode/matching_parens_outdent",["require","exports","module","ace/range"],function(e,t,n){var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\)/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\))/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){var t=e.match(/^(\s+)/);return t?t[1]:""}}).call(i.prototype),t.MatchingParensOutdent=i})
\ No newline at end of file
diff --git a/app/assets/lib/ace/mode-coffee.js b/app/assets/lib/ace/mode-coffee.js
index ffca52d6d..70f9c894f 100644
--- a/app/assets/lib/ace/mode-coffee.js
+++ b/app/assets/lib/ace/mode-coffee.js
@@ -1 +1 @@
-ace.define("ace/mode/coffee",["require","exports","module","ace/tokenizer","ace/mode/coffee_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/coffee","ace/range","ace/mode/text","ace/worker/worker_client","ace/lib/oop"],function(e,t,n){function c(){this.HighlightRules=i,this.$outdent=new s,this.foldingRules=new o}var r=e("../tokenizer").Tokenizer,i=e("./coffee_highlight_rules").CoffeeHighlightRules,s=e("./matching_brace_outdent").MatchingBraceOutdent,o=e("./folding/coffee").FoldMode,u=e("../range").Range,a=e("./text").Mode,f=e("../worker/worker_client").WorkerClient,l=e("../lib/oop");l.inherits(c,a),function(){var e=/(?:[({[=:]|[-=]>|\b(?:else|switch|try|catch(?:\s*[$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)?|finally))\s*$/,t=/^(\s*)#/,n=/^\s*###(?!#)/,r=/^\s*/;this.getNextLineIndent=function(t,n,r){var i=this.$getIndent(n),s=this.getTokenizer().getLineTokens(n,t).tokens;return(!s.length||s[s.length-1].type!=="comment")&&t==="start"&&e.test(n)&&(i+=r),i},this.toggleCommentLines=function(e,i,s,o){console.log("toggle");var a=new u(0,0,0,0);for(var f=s;f<=o;++f){var l=i.getLine(f);if(n.test(l))continue;t.test(l)?l=l.replace(t,"$1"):l=l.replace(r,"$&#"),a.end.row=a.start.row=f,a.end.column=l.length+1,i.replace(a,l)}},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new f(["ace"],"ace/mode/coffee_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("error",function(t){e.setAnnotations([t.data])}),t.on("ok",function(t){e.clearAnnotations()}),t}}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/coffee_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){function s(){var e="[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*",t="this|throw|then|try|typeof|super|switch|return|break|by|continue|catch|class|in|instanceof|is|isnt|if|else|extends|for|own|finally|function|while|when|new|no|not|delete|debugger|do|loop|of|off|or|on|unless|until|and|yes",n="true|false|null|undefined|NaN|Infinity",r="case|const|default|function|var|void|with|enum|export|implements|interface|let|package|private|protected|public|static|yield|__hasProp|slice|bind|indexOf",i="Array|Boolean|Date|Function|Number|Object|RegExp|ReferenceError|String|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray",s="Math|JSON|isNaN|isFinite|parseInt|parseFloat|encodeURI|encodeURIComponent|decodeURI|decodeURIComponent|String|",o="window|arguments|prototype|document",u=this.createKeywordMapper({keyword:t,"constant.language":n,"invalid.illegal":r,"language.support.class":i,"language.support.function":s,"variable.language":o},"identifier"),a={token:["paren.lparen","variable.parameter","paren.rparen","text","storage.type"],regex:/(?:(\()((?:"[^")]*?"|'[^')]*?'|\/[^\/)]*?\/|[^()\"'\/])*?)(\))(\s*))?([\-=]>)/.source},f=/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)/;this.$rules={start:[{token:"constant.numeric",regex:"(?:0x[\\da-fA-F]+|(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[eE][+-]?\\d+)?)"},{stateName:"qdoc",token:"string",regex:"'''",next:[{token:"string",regex:"'''",next:"start"},{token:"constant.language.escape",regex:f},{defaultToken:"string"}]},{stateName:"qqdoc",token:"string",regex:'"""',next:[{token:"string",regex:'"""',next:"start"},{token:"paren.string",regex:"#{",push:"start"},{token:"constant.language.escape",regex:f},{defaultToken:"string"}]},{stateName:"qstring",token:"string",regex:"'",next:[{token:"string",regex:"'",next:"start"},{token:"constant.language.escape",regex:f},{defaultToken:"string"}]},{stateName:"qqstring",token:"string.start",regex:'"',next:[{token:"string.end",regex:'"',next:"start"},{token:"paren.string",regex:"#{",push:"start"},{token:"constant.language.escape",regex:f},{defaultToken:"string"}]},{stateName:"js",token:"string",regex:"`",next:[{token:"string",regex:"`",next:"start"},{token:"constant.language.escape",regex:f},{defaultToken:"string"}]},{regex:"[{}]",onMatch:function(e,t,n){this.next="";if(e=="{"&&n.length)return n.unshift("start",t),"paren";if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1)return"paren.string"}return"paren"}},{token:"string.regex",regex:"///",next:"heregex"},{token:"string.regex",regex:/(?:\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)(?:[imgy]{0,4})(?!\w)/},{token:"comment",regex:"###(?!#)",next:"comment"},{token:"comment",regex:"#.*"},{token:["punctuation.operator","text","identifier"],regex:"(\\.)(\\s*)("+r+")"},{token:"punctuation.operator",regex:"\\."},{token:["keyword","text","language.support.class","text","keyword","text","language.support.class"],regex:"(class)(\\s+)("+e+")(?:(\\s+)(extends)(\\s+)("+e+"))?"},{token:["entity.name.function","text","keyword.operator","text"].concat(a.token),regex:"("+e+")(\\s*)([=:])(\\s*)"+a.regex},a,{token:"variable",regex:"@(?:"+e+")?"},{token:u,regex:e},{token:"punctuation.operator",regex:"\\,|\\."},{token:"storage.type",regex:"[\\-=]>"},{token:"keyword.operator",regex:"(?:[-+*/%<>&|^!?=]=|>>>=?|\\-\\-|\\+\\+|::|&&=|\\|\\|=|<<=|>>=|\\?\\.|\\.{2,3}|[!*+-=><])"},{token:"paren.lparen",regex:"[({[]"},{token:"paren.rparen",regex:"[\\]})]"},{token:"text",regex:"\\s+"}],heregex:[{token:"string.regex",regex:".*?///[imgy]{0,4}",next:"start"},{token:"comment.regex",regex:"\\s+(?:#.*)?"},{token:"string.regex",regex:"\\S+"}],comment:[{token:"comment",regex:"###",next:"start"},{defaultToken:"comment"}]},this.normalizeRules()}var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules;r.inherits(s,i),t.CoffeeHighlightRules=s}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;var i=/\S/,o=e.getLine(n),u=o.search(i);if(u==-1||o[u]!="#")return;var a=o.length,f=e.getLength(),l=n,c=n;while(++n<f){o=e.getLine(n);var h=o.search(i);if(h==-1)continue;if(o[h]!="#")break;c=n}if(c>l){var p=e.getLine(c).length;return new s(l,a,c,p)}},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u<a?"start":"","";if(u==-1){if(i==a&&r[i]=="#"&&s[i]=="#")return e.foldWidgets[n-1]="",e.foldWidgets[n+1]="","start"}else if(u==i&&r[i]=="#"&&o[i]=="#"&&e.getLine(n-2).search(/\S/)==-1)return e.foldWidgets[n-1]="start",e.foldWidgets[n+1]="","";return u!=-1&&u<i?e.foldWidgets[n-1]="start":e.foldWidgets[n-1]="",i<a?"start":""}}.call(o.prototype)})
\ No newline at end of file
+ace.define("ace/mode/coffee",["require","exports","module","ace/mode/coffee_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/coffee","ace/range","ace/mode/text","ace/worker/worker_client","ace/lib/oop"],function(e,t,n){function l(){this.HighlightRules=r,this.$outdent=new i,this.foldingRules=new s}var r=e("./coffee_highlight_rules").CoffeeHighlightRules,i=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("./folding/coffee").FoldMode,o=e("../range").Range,u=e("./text").Mode,a=e("../worker/worker_client").WorkerClient,f=e("../lib/oop");f.inherits(l,u),function(){var e=/(?:[({[=:]|[-=]>|\b(?:else|try|(?:swi|ca)tch(?:\s+[$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)?|finally))\s*$|^\s*(else\b\s*)?(?:if|for|while|loop)\b(?!.*\bthen\b)/,t=/^(\s*)#/,n=/^\s*###(?!#)/,r=/^\s*/;this.getNextLineIndent=function(t,n,r){var i=this.$getIndent(n),s=this.getTokenizer().getLineTokens(n,t).tokens;return(!s.length||s[s.length-1].type!=="comment")&&t==="start"&&e.test(n)&&(i+=r),i},this.toggleCommentLines=function(e,i,s,u){console.log("toggle");var a=new o(0,0,0,0);for(var f=s;f<=u;++f){var l=i.getLine(f);if(n.test(l))continue;t.test(l)?l=l.replace(t,"$1"):l=l.replace(r,"$&#"),a.end.row=a.start.row=f,a.end.column=l.length+1,i.replace(a,l)}},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new a(["ace"],"ace/mode/coffee_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("error",function(t){e.setAnnotations([t.data])}),t.on("ok",function(t){e.clearAnnotations()}),t},this.$id="ace/mode/coffee"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/coffee_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){function s(){var e="[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*",t="this|throw|then|try|typeof|super|switch|return|break|by|continue|catch|class|in|instanceof|is|isnt|if|else|extends|for|own|finally|function|while|when|new|no|not|delete|debugger|do|loop|of|off|or|on|unless|until|and|yes",n="true|false|null|undefined|NaN|Infinity",r="case|const|default|function|var|void|with|enum|export|implements|interface|let|package|private|protected|public|static|yield|__hasProp|slice|bind|indexOf",i="Array|Boolean|Date|Function|Number|Object|RegExp|ReferenceError|String|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray",s="Math|JSON|isNaN|isFinite|parseInt|parseFloat|encodeURI|encodeURIComponent|decodeURI|decodeURIComponent|String|",o="window|arguments|prototype|document",u=this.createKeywordMapper({keyword:t,"constant.language":n,"invalid.illegal":r,"language.support.class":i,"language.support.function":s,"variable.language":o},"identifier"),a={token:["paren.lparen","variable.parameter","paren.rparen","text","storage.type"],regex:/(?:(\()((?:"[^")]*?"|'[^')]*?'|\/[^\/)]*?\/|[^()\"'\/])*?)(\))(\s*))?([\-=]>)/.source},f=/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)/;this.$rules={start:[{token:"constant.numeric",regex:"(?:0x[\\da-fA-F]+|(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[eE][+-]?\\d+)?)"},{stateName:"qdoc",token:"string",regex:"'''",next:[{token:"string",regex:"'''",next:"start"},{token:"constant.language.escape",regex:f},{defaultToken:"string"}]},{stateName:"qqdoc",token:"string",regex:'"""',next:[{token:"string",regex:'"""',next:"start"},{token:"paren.string",regex:"#{",push:"start"},{token:"constant.language.escape",regex:f},{defaultToken:"string"}]},{stateName:"qstring",token:"string",regex:"'",next:[{token:"string",regex:"'",next:"start"},{token:"constant.language.escape",regex:f},{defaultToken:"string"}]},{stateName:"qqstring",token:"string.start",regex:'"',next:[{token:"string.end",regex:'"',next:"start"},{token:"paren.string",regex:"#{",push:"start"},{token:"constant.language.escape",regex:f},{defaultToken:"string"}]},{stateName:"js",token:"string",regex:"`",next:[{token:"string",regex:"`",next:"start"},{token:"constant.language.escape",regex:f},{defaultToken:"string"}]},{regex:"[{}]",onMatch:function(e,t,n){this.next="";if(e=="{"&&n.length)return n.unshift("start",t),"paren";if(e=="}"&&n.length){n.shift(),this.next=n.shift();if(this.next.indexOf("string")!=-1)return"paren.string"}return"paren"}},{token:"string.regex",regex:"///",next:"heregex"},{token:"string.regex",regex:/(?:\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)(?:[imgy]{0,4})(?!\w)/},{token:"comment",regex:"###(?!#)",next:"comment"},{token:"comment",regex:"#.*"},{token:["punctuation.operator","text","identifier"],regex:"(\\.)(\\s*)("+r+")"},{token:"punctuation.operator",regex:"\\."},{token:["keyword","text","language.support.class","text","keyword","text","language.support.class"],regex:"(class)(\\s+)("+e+")(?:(\\s+)(extends)(\\s+)("+e+"))?"},{token:["entity.name.function","text","keyword.operator","text"].concat(a.token),regex:"("+e+")(\\s*)([=:])(\\s*)"+a.regex},a,{token:"variable",regex:"@(?:"+e+")?"},{token:u,regex:e},{token:"punctuation.operator",regex:"\\,|\\."},{token:"storage.type",regex:"[\\-=]>"},{token:"keyword.operator",regex:"(?:[-+*/%<>&|^!?=]=|>>>=?|\\-\\-|\\+\\+|::|&&=|\\|\\|=|<<=|>>=|\\?\\.|\\.{2,3}|[!*+-=><])"},{token:"paren.lparen",regex:"[({[]"},{token:"paren.rparen",regex:"[\\]})]"},{token:"text",regex:"\\s+"}],heregex:[{token:"string.regex",regex:".*?///[imgy]{0,4}",next:"start"},{token:"comment.regex",regex:"\\s+(?:#.*)?"},{token:"string.regex",regex:"\\S+"}],comment:[{token:"comment",regex:"###",next:"start"},{defaultToken:"comment"}]},this.normalizeRules()}var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules;r.inherits(s,i),t.CoffeeHighlightRules=s}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;var i=/\S/,o=e.getLine(n),u=o.search(i);if(u==-1||o[u]!="#")return;var a=o.length,f=e.getLength(),l=n,c=n;while(++n<f){o=e.getLine(n);var h=o.search(i);if(h==-1)continue;if(o[h]!="#")break;c=n}if(c>l){var p=e.getLine(c).length;return new s(l,a,c,p)}},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u<a?"start":"","";if(u==-1){if(i==a&&r[i]=="#"&&s[i]=="#")return e.foldWidgets[n-1]="",e.foldWidgets[n+1]="","start"}else if(u==i&&r[i]=="#"&&o[i]=="#"&&e.getLine(n-2).search(/\S/)==-1)return e.foldWidgets[n-1]="start",e.foldWidgets[n+1]="","";return u!=-1&&u<i?e.foldWidgets[n-1]="start":e.foldWidgets[n-1]="",i<a?"start":""}}.call(o.prototype)})
\ No newline at end of file
diff --git a/app/assets/lib/ace/mode-javascript.js b/app/assets/lib/ace/mode-javascript.js
index e5237d738..4623b3578 100644
--- a/app/assets/lib/ace/mode-javascript.js
+++ b/app/assets/lib/ace/mode-javascript.js
@@ -1,892 +1 @@
-// Edited by Nick to remove some browser-specific stuff and make more things identifiers, not support constants.
-ace.define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextMode = require("./text").Mode;
-var Tokenizer = require("../tokenizer").Tokenizer;
-var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
-var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
-var Range = require("../range").Range;
-var WorkerClient = require("../worker/worker_client").WorkerClient;
-var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
-var CStyleFoldMode = require("./folding/cstyle").FoldMode;
-
-var Mode = function() {
-    this.HighlightRules = JavaScriptHighlightRules;
-    
-    this.$outdent = new MatchingBraceOutdent();
-    this.$behaviour = new CstyleBehaviour();
-    this.foldingRules = new CStyleFoldMode();
-};
-oop.inherits(Mode, TextMode);
-
-(function() {
-
-    this.lineCommentStart = "//";
-    this.blockComment = {start: "/*", end: "*/"};
-
-    this.getNextLineIndent = function(state, line, tab) {
-        var indent = this.$getIndent(line);
-
-        var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
-        var tokens = tokenizedLine.tokens;
-        var endState = tokenizedLine.state;
-
-        if (tokens.length && tokens[tokens.length-1].type == "comment") {
-            return indent;
-        }
-
-        if (state == "start" || state == "no_regex") {
-            var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
-            if (match) {
-                indent += tab;
-            }
-        } else if (state == "doc-start") {
-            if (endState == "start" || endState == "no_regex") {
-                return "";
-            }
-            var match = line.match(/^\s*(\/?)\*/);
-            if (match) {
-                if (match[1]) {
-                    indent += " ";
-                }
-                indent += "* ";
-            }
-        }
-
-        return indent;
-    };
-
-    this.checkOutdent = function(state, line, input) {
-        return this.$outdent.checkOutdent(line, input);
-    };
-
-    this.autoOutdent = function(state, doc, row) {
-        this.$outdent.autoOutdent(doc, row);
-    };
-
-    this.createWorker = function(session) {
-        var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
-        worker.attachToDocument(session.getDocument());
-
-        worker.on("jslint", function(results) {
-            session.setAnnotations(results.data);
-        });
-
-        worker.on("terminate", function() {
-            session.clearAnnotations();
-        });
-
-        return worker;
-    };
-
-    this.$id = "ace/mode/javascript";
-}).call(Mode.prototype);
-
-exports.Mode = Mode;
-});
-
-ace.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var JavaScriptHighlightRules = function() {
-    var keywordMapper = this.createKeywordMapper({
-        "variable.language":
-            "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|"  + // Constructors
-            "Namespace|QName|XML|XMLList|"                                             + // E4X
-            "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|"   +
-            "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|"                    +
-            "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|"   + // Errors
-            "SyntaxError|TypeError|URIError|"                                          +
-            "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
-            "isNaN|parseFloat|parseInt|"                                               +
-            "JSON|Math|"                                                               + // Other
-            "this|arguments|prototype"                                                 , // Pseudo
-        "keyword":
-            "const|yield|import|get|set|" +
-            "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
-            "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
-            "__parent__|__count__|escape|unescape|with|__proto__|" +
-            "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
-        "storage.type":
-            "const|let|var|function",
-        "constant.language":
-            "null|Infinity|NaN|undefined",
-        "support.function":
-            "alert",
-        "constant.language.boolean": "true|false"
-    }, "identifier");
-    var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
-    var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b";
-
-    var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
-        "u[0-9a-fA-F]{4}|" + // unicode
-        "[0-2][0-7]{0,2}|" + // oct
-        "3[0-6][0-7]?|" + // oct
-        "37[0-7]?|" + // oct
-        "[4-7][0-7]?|" + //oct
-        ".)";
-
-    this.$rules = {
-        "no_regex" : [
-            {
-                token : "comment",
-                regex : "\\/\\/",
-                next : "line_comment"
-            },
-            DocCommentHighlightRules.getStartRule("doc-start"),
-            {
-                token : "comment", // multi line comment
-                regex : /\/\*/,
-                next : "comment"
-            }, {
-                token : "string",
-                regex : "'(?=.)",
-                next  : "qstring"
-            }, {
-                token : "string",
-                regex : '"(?=.)',
-                next  : "qqstring"
-            }, {
-                token : "constant.numeric", // hex
-                regex : /0[xX][0-9a-fA-F]+\b/
-            }, {
-                token : "constant.numeric", // float
-                regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
-            }, {
-                token : [
-                    "storage.type", "punctuation.operator", "support.function",
-                    "punctuation.operator", "entity.name.function", "text","keyword.operator"
-                ],
-                regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
-                next: "function_arguments"
-            }, {
-                token : [
-                    "storage.type", "punctuation.operator", "entity.name.function", "text",
-                    "keyword.operator", "text", "storage.type", "text", "paren.lparen"
-                ],
-                regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
-                next: "function_arguments"
-            }, {
-                token : [
-                    "entity.name.function", "text", "keyword.operator", "text", "storage.type",
-                    "text", "paren.lparen"
-                ],
-                regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
-                next: "function_arguments"
-            }, {
-                token : [
-                    "storage.type", "punctuation.operator", "entity.name.function", "text",
-                    "keyword.operator", "text",
-                    "storage.type", "text", "entity.name.function", "text", "paren.lparen"
-                ],
-                regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
-                next: "function_arguments"
-            }, {
-                token : [
-                    "storage.type", "text", "entity.name.function", "text", "paren.lparen"
-                ],
-                regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
-                next: "function_arguments"
-            }, {
-                token : [
-                    "entity.name.function", "text", "punctuation.operator",
-                    "text", "storage.type", "text", "paren.lparen"
-                ],
-                regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
-                next: "function_arguments"
-            }, {
-                token : [
-                    "text", "text", "storage.type", "text", "paren.lparen"
-                ],
-                regex : "(:)(\\s*)(function)(\\s*)(\\()",
-                next: "function_arguments"
-            }, {
-                token : "keyword",
-                regex : "(?:" + kwBeforeRe + ")\\b",
-                next : "start"
-            }, {
-                token : keywordMapper,
-                regex : identifierRe
-            }, {
-                token : "keyword.operator",
-                regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
-                next  : "start"
-            }, {
-                token : "punctuation.operator",
-                regex : /\?|\:|\,|\;|\./,
-                next  : "start"
-            }, {
-                token : "paren.lparen",
-                regex : /[\[({]/,
-                next  : "start"
-            }, {
-                token : "paren.rparen",
-                regex : /[\])}]/
-            }, {
-                token : "keyword.operator",
-                regex : /\/=?/,
-                next  : "start"
-            }, {
-                token: "comment",
-                regex: /^#!.*$/
-            }
-        ],
-        "start": [
-            DocCommentHighlightRules.getStartRule("doc-start"),
-            {
-                token : "comment", // multi line comment
-                regex : "\\/\\*",
-                next : "comment_regex_allowed"
-            }, {
-                token : "comment",
-                regex : "\\/\\/",
-                next : "line_comment_regex_allowed"
-            }, {
-                token: "string.regexp",
-                regex: "\\/",
-                next: "regex"
-            }, {
-                token : "text",
-                regex : "\\s+|^$",
-                next : "start"
-            }, {
-                token: "empty",
-                regex: "",
-                next: "no_regex"
-            }
-        ],
-        "regex": [
-            {
-                token: "regexp.keyword.operator",
-                regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
-            }, {
-                token: "string.regexp",
-                regex: "/[sxngimy]*",
-                next: "no_regex"
-            }, {
-                token : "invalid",
-                regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
-            }, {
-                token : "constant.language.escape",
-                regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
-            }, {
-                token : "constant.language.delimiter",
-                regex: /\|/
-            }, {
-                token: "constant.language.escape",
-                regex: /\[\^?/,
-                next: "regex_character_class"
-            }, {
-                token: "empty",
-                regex: "$",
-                next: "no_regex"
-            }, {
-                defaultToken: "string.regexp"
-            }
-        ],
-        "regex_character_class": [
-            {
-                token: "regexp.keyword.operator",
-                regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
-            }, {
-                token: "constant.language.escape",
-                regex: "]",
-                next: "regex"
-            }, {
-                token: "constant.language.escape",
-                regex: "-"
-            }, {
-                token: "empty",
-                regex: "$",
-                next: "no_regex"
-            }, {
-                defaultToken: "string.regexp.charachterclass"
-            }
-        ],
-        "function_arguments": [
-            {
-                token: "variable.parameter",
-                regex: identifierRe
-            }, {
-                token: "punctuation.operator",
-                regex: "[, ]+"
-            }, {
-                token: "punctuation.operator",
-                regex: "$"
-            }, {
-                token: "empty",
-                regex: "",
-                next: "no_regex"
-            }
-        ],
-        "comment_regex_allowed" : [
-            {token : "comment", regex : "\\*\\/", next : "start"},
-            {defaultToken : "comment"}
-        ],
-        "comment" : [
-            {token : "comment", regex : "\\*\\/", next : "no_regex"},
-            {defaultToken : "comment"}
-        ],
-        "line_comment_regex_allowed" : [
-            {token : "comment", regex : "$|^", next : "start"},
-            {defaultToken : "comment"}
-        ],
-        "line_comment" : [
-            {token : "comment", regex : "$|^", next : "no_regex"},
-            {defaultToken : "comment"}
-        ],
-        "qqstring" : [
-            {
-                token : "constant.language.escape",
-                regex : escapedRe
-            }, {
-                token : "string",
-                regex : "\\\\$",
-                next  : "qqstring"
-            }, {
-                token : "string",
-                regex : '"|$',
-                next  : "no_regex"
-            }, {
-                defaultToken: "string"
-            }
-        ],
-        "qstring" : [
-            {
-                token : "constant.language.escape",
-                regex : escapedRe
-            }, {
-                token : "string",
-                regex : "\\\\$",
-                next  : "qstring"
-            }, {
-                token : "string",
-                regex : "'|$",
-                next  : "no_regex"
-            }, {
-                defaultToken: "string"
-            }
-        ]
-    };
-
-    this.embedRules(DocCommentHighlightRules, "doc-",
-        [ DocCommentHighlightRules.getEndRule("no_regex") ]);
-};
-
-oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
-
-exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
-});
-
-ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
-
-
-var oop = require("../lib/oop");
-var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
-
-var DocCommentHighlightRules = function() {
-
-    this.$rules = {
-        "start" : [ {
-            token : "comment.doc.tag",
-            regex : "@[\\w\\d_]+" // TODO: fix email addresses
-        }, {
-            token : "comment.doc.tag",
-            regex : "\\bTODO\\b"
-        }, {
-            defaultToken : "comment.doc"
-        }]
-    };
-};
-
-oop.inherits(DocCommentHighlightRules, TextHighlightRules);
-
-DocCommentHighlightRules.getStartRule = function(start) {
-    return {
-        token : "comment.doc", // doc comment
-        regex : "\\/\\*(?=\\*)",
-        next  : start
-    };
-};
-
-DocCommentHighlightRules.getEndRule = function (start) {
-    return {
-        token : "comment.doc", // closing comment
-        regex : "\\*\\/",
-        next  : start
-    };
-};
-
-
-exports.DocCommentHighlightRules = DocCommentHighlightRules;
-
-});
-
-ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
-
-
-var Range = require("../range").Range;
-
-var MatchingBraceOutdent = function() {};
-
-(function() {
-
-    this.checkOutdent = function(line, input) {
-        if (! /^\s+$/.test(line))
-            return false;
-
-        return /^\s*\}/.test(input);
-    };
-
-    this.autoOutdent = function(doc, row) {
-        var line = doc.getLine(row);
-        var match = line.match(/^(\s*\})/);
-
-        if (!match) return 0;
-
-        var column = match[1].length;
-        var openBracePos = doc.findMatchingBracket({row: row, column: column});
-
-        if (!openBracePos || openBracePos.row == row) return 0;
-
-        var indent = this.$getIndent(doc.getLine(openBracePos.row));
-        doc.replace(new Range(row, 0, row, column-1), indent);
-    };
-
-    this.$getIndent = function(line) {
-        return line.match(/^\s*/)[0];
-    };
-
-}).call(MatchingBraceOutdent.prototype);
-
-exports.MatchingBraceOutdent = MatchingBraceOutdent;
-});
-
-ace.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
-
-
-var oop = require("../../lib/oop");
-var Behaviour = require("../behaviour").Behaviour;
-var TokenIterator = require("../../token_iterator").TokenIterator;
-var lang = require("../../lib/lang");
-
-var SAFE_INSERT_IN_TOKENS =
-    ["text", "paren.rparen", "punctuation.operator"];
-var SAFE_INSERT_BEFORE_TOKENS =
-    ["text", "paren.rparen", "punctuation.operator", "comment"];
-
-
-var autoInsertedBrackets = 0;
-var autoInsertedRow = -1;
-var autoInsertedLineEnd = "";
-var maybeInsertedBrackets = 0;
-var maybeInsertedRow = -1;
-var maybeInsertedLineStart = "";
-var maybeInsertedLineEnd = "";
-
-var CstyleBehaviour = function () {
-    
-    CstyleBehaviour.isSaneInsertion = function(editor, session) {
-        var cursor = editor.getCursorPosition();
-        var iterator = new TokenIterator(session, cursor.row, cursor.column);
-        if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
-            var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
-            if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
-                return false;
-        }
-        iterator.stepForward();
-        return iterator.getCurrentTokenRow() !== cursor.row ||
-            this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
-    };
-    
-    CstyleBehaviour.$matchTokenType = function(token, types) {
-        return types.indexOf(token.type || token) > -1;
-    };
-    
-    CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
-        var cursor = editor.getCursorPosition();
-        var line = session.doc.getLine(cursor.row);
-        if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
-            autoInsertedBrackets = 0;
-        autoInsertedRow = cursor.row;
-        autoInsertedLineEnd = bracket + line.substr(cursor.column);
-        autoInsertedBrackets++;
-    };
-    
-    CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
-        var cursor = editor.getCursorPosition();
-        var line = session.doc.getLine(cursor.row);
-        if (!this.isMaybeInsertedClosing(cursor, line))
-            maybeInsertedBrackets = 0;
-        maybeInsertedRow = cursor.row;
-        maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
-        maybeInsertedLineEnd = line.substr(cursor.column);
-        maybeInsertedBrackets++;
-    };
-    
-    CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
-        return autoInsertedBrackets > 0 &&
-            cursor.row === autoInsertedRow &&
-            bracket === autoInsertedLineEnd[0] &&
-            line.substr(cursor.column) === autoInsertedLineEnd;
-    };
-    
-    CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
-        return maybeInsertedBrackets > 0 &&
-            cursor.row === maybeInsertedRow &&
-            line.substr(cursor.column) === maybeInsertedLineEnd &&
-            line.substr(0, cursor.column) == maybeInsertedLineStart;
-    };
-    
-    CstyleBehaviour.popAutoInsertedClosing = function() {
-        autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
-        autoInsertedBrackets--;
-    };
-    
-    CstyleBehaviour.clearMaybeInsertedClosing = function() {
-        maybeInsertedBrackets = 0;
-        maybeInsertedRow = -1;
-    };
-
-    this.add("braces", "insertion", function (state, action, editor, session, text) {
-        var cursor = editor.getCursorPosition();
-        var line = session.doc.getLine(cursor.row);
-        if (text == '{') {
-            var selection = editor.getSelectionRange();
-            var selected = session.doc.getTextRange(selection);
-            if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
-                return {
-                    text: '{' + selected + '}',
-                    selection: false
-                };
-            } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
-                if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
-                    CstyleBehaviour.recordAutoInsert(editor, session, "}");
-                    return {
-                        text: '{}',
-                        selection: [1, 1]
-                    };
-                } else {
-                    CstyleBehaviour.recordMaybeInsert(editor, session, "{");
-                    return {
-                        text: '{',
-                        selection: [1, 1]
-                    };
-                }
-            }
-        } else if (text == '}') {
-            var rightChar = line.substring(cursor.column, cursor.column + 1);
-            if (rightChar == '}') {
-                var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
-                if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
-                    CstyleBehaviour.popAutoInsertedClosing();
-                    return {
-                        text: '',
-                        selection: [1, 1]
-                    };
-                }
-            }
-        } else if (text == "\n" || text == "\r\n") {
-            var closing = "";
-            if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
-                closing = lang.stringRepeat("}", maybeInsertedBrackets);
-                CstyleBehaviour.clearMaybeInsertedClosing();
-            }
-            var rightChar = line.substring(cursor.column, cursor.column + 1);
-            if (rightChar === '}') {
-                var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
-                if (!openBracePos)
-                     return null;
-                var next_indent = this.$getIndent(session.getLine(openBracePos.row));
-            } else if (closing) {
-                var next_indent = this.$getIndent(line);
-            } else {
-                return;
-            }
-            var indent = next_indent + session.getTabString();
-
-            return {
-                text: '\n' + indent + '\n' + next_indent + closing,
-                selection: [1, indent.length, 1, indent.length]
-            };
-        } else {
-            CstyleBehaviour.clearMaybeInsertedClosing();
-        }
-    });
-
-    this.add("braces", "deletion", function (state, action, editor, session, range) {
-        var selected = session.doc.getTextRange(range);
-        if (!range.isMultiLine() && selected == '{') {
-            var line = session.doc.getLine(range.start.row);
-            var rightChar = line.substring(range.end.column, range.end.column + 1);
-            if (rightChar == '}') {
-                range.end.column++;
-                return range;
-            } else {
-                maybeInsertedBrackets--;
-            }
-        }
-    });
-
-    this.add("parens", "insertion", function (state, action, editor, session, text) {
-        if (text == '(') {
-            var selection = editor.getSelectionRange();
-            var selected = session.doc.getTextRange(selection);
-            if (selected !== "" && editor.getWrapBehavioursEnabled()) {
-                return {
-                    text: '(' + selected + ')',
-                    selection: false
-                };
-            } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
-                CstyleBehaviour.recordAutoInsert(editor, session, ")");
-                return {
-                    text: '()',
-                    selection: [1, 1]
-                };
-            }
-        } else if (text == ')') {
-            var cursor = editor.getCursorPosition();
-            var line = session.doc.getLine(cursor.row);
-            var rightChar = line.substring(cursor.column, cursor.column + 1);
-            if (rightChar == ')') {
-                var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
-                if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
-                    CstyleBehaviour.popAutoInsertedClosing();
-                    return {
-                        text: '',
-                        selection: [1, 1]
-                    };
-                }
-            }
-        }
-    });
-
-    this.add("parens", "deletion", function (state, action, editor, session, range) {
-        var selected = session.doc.getTextRange(range);
-        if (!range.isMultiLine() && selected == '(') {
-            var line = session.doc.getLine(range.start.row);
-            var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
-            if (rightChar == ')') {
-                range.end.column++;
-                return range;
-            }
-        }
-    });
-
-    this.add("brackets", "insertion", function (state, action, editor, session, text) {
-        if (text == '[') {
-            var selection = editor.getSelectionRange();
-            var selected = session.doc.getTextRange(selection);
-            if (selected !== "" && editor.getWrapBehavioursEnabled()) {
-                return {
-                    text: '[' + selected + ']',
-                    selection: false
-                };
-            } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
-                CstyleBehaviour.recordAutoInsert(editor, session, "]");
-                return {
-                    text: '[]',
-                    selection: [1, 1]
-                };
-            }
-        } else if (text == ']') {
-            var cursor = editor.getCursorPosition();
-            var line = session.doc.getLine(cursor.row);
-            var rightChar = line.substring(cursor.column, cursor.column + 1);
-            if (rightChar == ']') {
-                var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
-                if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
-                    CstyleBehaviour.popAutoInsertedClosing();
-                    return {
-                        text: '',
-                        selection: [1, 1]
-                    };
-                }
-            }
-        }
-    });
-
-    this.add("brackets", "deletion", function (state, action, editor, session, range) {
-        var selected = session.doc.getTextRange(range);
-        if (!range.isMultiLine() && selected == '[') {
-            var line = session.doc.getLine(range.start.row);
-            var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
-            if (rightChar == ']') {
-                range.end.column++;
-                return range;
-            }
-        }
-    });
-
-    this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
-        if (text == '"' || text == "'") {
-            var quote = text;
-            var selection = editor.getSelectionRange();
-            var selected = session.doc.getTextRange(selection);
-            if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
-                return {
-                    text: quote + selected + quote,
-                    selection: false
-                };
-            } else {
-                var cursor = editor.getCursorPosition();
-                var line = session.doc.getLine(cursor.row);
-                var leftChar = line.substring(cursor.column-1, cursor.column);
-                if (leftChar == '\\') {
-                    return null;
-                }
-                var tokens = session.getTokens(selection.start.row);
-                var col = 0, token;
-                var quotepos = -1; // Track whether we're inside an open quote.
-
-                for (var x = 0; x < tokens.length; x++) {
-                    token = tokens[x];
-                    if (token.type == "string") {
-                      quotepos = -1;
-                    } else if (quotepos < 0) {
-                      quotepos = token.value.indexOf(quote);
-                    }
-                    if ((token.value.length + col) > selection.start.column) {
-                        break;
-                    }
-                    col += tokens[x].value.length;
-                }
-                if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
-                    if (!CstyleBehaviour.isSaneInsertion(editor, session))
-                        return;
-                    return {
-                        text: quote + quote,
-                        selection: [1,1]
-                    };
-                } else if (token && token.type === "string") {
-                    var rightChar = line.substring(cursor.column, cursor.column + 1);
-                    if (rightChar == quote) {
-                        return {
-                            text: '',
-                            selection: [1, 1]
-                        };
-                    }
-                }
-            }
-        }
-    });
-
-    this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
-        var selected = session.doc.getTextRange(range);
-        if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
-            var line = session.doc.getLine(range.start.row);
-            var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
-            if (rightChar == selected) {
-                range.end.column++;
-                return range;
-            }
-        }
-    });
-
-};
-
-oop.inherits(CstyleBehaviour, Behaviour);
-
-exports.CstyleBehaviour = CstyleBehaviour;
-});
-
-ace.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
-
-
-var oop = require("../../lib/oop");
-var Range = require("../../range").Range;
-var BaseFoldMode = require("./fold_mode").FoldMode;
-
-var FoldMode = exports.FoldMode = function(commentRegex) {
-    if (commentRegex) {
-        this.foldingStartMarker = new RegExp(
-            this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
-        );
-        this.foldingStopMarker = new RegExp(
-            this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
-        );
-    }
-};
-oop.inherits(FoldMode, BaseFoldMode);
-
-(function() {
-
-    this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
-    this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
-
-    this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
-        var line = session.getLine(row);
-        var match = line.match(this.foldingStartMarker);
-        if (match) {
-            var i = match.index;
-
-            if (match[1])
-                return this.openingBracketBlock(session, match[1], row, i);
-                
-            var range = session.getCommentFoldRange(row, i + match[0].length, 1);
-            
-            if (range && !range.isMultiLine()) {
-                if (forceMultiline) {
-                    range = this.getSectionRange(session, row);
-                } else if (foldStyle != "all")
-                    range = null;
-            }
-            
-            return range;
-        }
-
-        if (foldStyle === "markbegin")
-            return;
-
-        var match = line.match(this.foldingStopMarker);
-        if (match) {
-            var i = match.index + match[0].length;
-
-            if (match[1])
-                return this.closingBracketBlock(session, match[1], row, i);
-
-            return session.getCommentFoldRange(row, i, -1);
-        }
-    };
-    
-    this.getSectionRange = function(session, row) {
-        var line = session.getLine(row);
-        var startIndent = line.search(/\S/);
-        var startRow = row;
-        var startColumn = line.length;
-        row = row + 1;
-        var endRow = row;
-        var maxRow = session.getLength();
-        while (++row < maxRow) {
-            line = session.getLine(row);
-            var indent = line.search(/\S/);
-            if (indent === -1)
-                continue;
-            if  (startIndent > indent)
-                break;
-            var subRange = this.getFoldWidgetRange(session, "all", row);
-            
-            if (subRange) {
-                if (subRange.start.row <= startRow) {
-                    break;
-                } else if (subRange.isMultiLine()) {
-                    row = subRange.end.row;
-                } else if (startIndent == indent) {
-                    break;
-                }
-            }
-            endRow = row;
-        }
-        
-        return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
-    };
-
-}).call(FoldMode.prototype);
-
-});
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../range").Range,a=e("../worker/worker_client").WorkerClient,f=e("./behaviour/cstyle").CstyleBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new f,this.foldingRules=new l};r.inherits(c,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start"){if(o=="start"||o=="no_regex")return"";var u=t.match(/^\s*(\/?)\*/);u&&(u[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new a(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("jslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript"}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),t="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",n="[a-zA-Z\\$_\xa1-\uffff][a-zA-Z\\d\\$_\xa1-\uffff]*\\b",r="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[{token:"comment",regex:"\\/\\/",next:"line_comment"},i.getStartRule("doc-start"),{token:"comment",regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+n+")(\\.)(prototype)(\\.)("+n+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+n+")(\\.)("+n+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+n+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+n+")(\\.)("+n+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+n+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+n+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"(?:"+t+")\\b",next:"start"},{token:["punctuation.operator","support.function"],regex:/(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:["punctuation.operator","support.function.dom"],regex:/(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:["punctuation.operator","support.constant"],regex:/(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:e,regex:n},{token:"keyword.operator",regex:/--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,next:"start"},{token:"punctuation.operator",regex:/\?|\:|\,|\;|\./,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"keyword.operator",regex:/\/=?/,next:"start"},{token:"comment",regex:/^#!.*$/}],start:[i.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/",next:"line_comment_regex_allowed"},{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:n},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],comment_regex_allowed:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],comment:[{token:"comment",regex:"\\*\\/",next:"no_regex"},{defaultToken:"comment"}],line_comment_regex_allowed:[{token:"comment",regex:"$|^",next:"start"},{defaultToken:"comment"}],line_comment:[{token:"comment",regex:"$|^",next:"no_regex"},{defaultToken:"comment"}],qqstring:[{token:"constant.language.escape",regex:r},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:r},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},this.embedRules(i,"doc-",[i.getEndRule("no_regex")])};r.inherits(o,s),t.JavaScriptHighlightRules=o}),ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc.tag",regex:"\\bTODO\\b"},{defaultToken:"comment.doc"}]}};r.inherits(s,i),s.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,o=e("../../lib/lang"),u=["text","paren.rparen","punctuation.operator"],a=["text","paren.rparen","punctuation.operator","comment"],f,l={},c=function(e){var t=-1;e.multiSelect&&(t=e.selection.id,l.rangeCount!=e.multiSelect.rangeCount&&(l={rangeCount:e.multiSelect.rangeCount}));if(l[t])return f=l[t];f=l[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},h=function(){this.add("braces","insertion",function(e,t,n,r,i){var s=n.getCursorPosition(),u=r.doc.getLine(s.row);if(i=="{"){c(n);var a=n.getSelectionRange(),l=r.doc.getTextRange(a);if(l!==""&&l!=="{"&&n.getWrapBehavioursEnabled())return{text:"{"+l+"}",selection:!1};if(h.isSaneInsertion(n,r))return/[\]\}\)]/.test(u[s.column])||n.inMultiSelectMode?(h.recordAutoInsert(n,r,"}"),{text:"{}",selection:[1,1]}):(h.recordMaybeInsert(n,r,"{"),{text:"{",selection:[1,1]})}else if(i=="}"){c(n);var p=u.substring(s.column,s.column+1);if(p=="}"){var d=r.$findOpeningBracket("}",{column:s.column+1,row:s.row});if(d!==null&&h.isAutoInsertedClosing(s,u,i))return h.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if(i=="\n"||i=="\r\n"){c(n);var v="";h.isMaybeInsertedClosing(s,u)&&(v=o.stringRepeat("}",f.maybeInsertedBrackets),h.clearMaybeInsertedClosing());var p=u.substring(s.column,s.column+1);if(p==="}"){var m=r.findMatchingBracket({row:s.row,column:s.column+1},"}");if(!m)return null;var g=this.$getIndent(r.getLine(m.row))}else{if(!v){h.clearMaybeInsertedClosing();return}var g=this.$getIndent(u)}var y=g+r.getTabString();return{text:"\n"+y+"\n"+g+v,selection:[1,y.length,1,y.length]}}h.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s=="{"){c(n);var o=r.doc.getLine(i.start.row),u=o.substring(i.end.column,i.end.column+1);if(u=="}")return i.end.column++,i;f.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,r,i){if(i=="("){c(n);var s=n.getSelectionRange(),o=r.doc.getTextRange(s);if(o!==""&&n.getWrapBehavioursEnabled())return{text:"("+o+")",selection:!1};if(h.isSaneInsertion(n,r))return h.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(i==")"){c(n);var u=n.getCursorPosition(),a=r.doc.getLine(u.row),f=a.substring(u.column,u.column+1);if(f==")"){var l=r.$findOpeningBracket(")",{column:u.column+1,row:u.row});if(l!==null&&h.isAutoInsertedClosing(u,a,i))return h.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s=="("){c(n);var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==")")return i.end.column++,i}}),this.add("brackets","insertion",function(e,t,n,r,i){if(i=="["){c(n);var s=n.getSelectionRange(),o=r.doc.getTextRange(s);if(o!==""&&n.getWrapBehavioursEnabled())return{text:"["+o+"]",selection:!1};if(h.isSaneInsertion(n,r))return h.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if(i=="]"){c(n);var u=n.getCursorPosition(),a=r.doc.getLine(u.row),f=a.substring(u.column,u.column+1);if(f=="]"){var l=r.$findOpeningBracket("]",{column:u.column+1,row:u.row});if(l!==null&&h.isAutoInsertedClosing(u,a,i))return h.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s=="["){c(n);var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u=="]")return i.end.column++,i}}),this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){c(n);var s=i,o=n.getSelectionRange(),u=r.doc.getTextRange(o);if(u!==""&&u!=="'"&&u!='"'&&n.getWrapBehavioursEnabled())return{text:s+u+s,selection:!1};var a=n.getCursorPosition(),f=r.doc.getLine(a.row),l=f.substring(a.column-1,a.column);if(l=="\\")return null;var p=r.getTokens(o.start.row),d=0,v,m=-1;for(var g=0;g<p.length;g++){v=p[g],v.type=="string"?m=-1:m<0&&(m=v.value.indexOf(s));if(v.value.length+d>o.start.column)break;d+=p[g].value.length}if(!v||m<0&&v.type!=="comment"&&(v.type!=="string"||o.start.column!==v.value.length+d-1&&v.value.lastIndexOf(s)===v.value.length-1)){if(!h.isSaneInsertion(n,r))return;return{text:s+s,selection:[1,1]}}if(v&&v.type==="string"){var y=f.substring(a.column,a.column+1);if(y==s)return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){c(n);var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}})};h.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new s(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",u)){var i=new s(t,n.row,n.column+1);if(!this.$matchTokenType(i.getCurrentToken()||"text",u))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",a)},h.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},h.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,i,f.autoInsertedLineEnd[0])||(f.autoInsertedBrackets=0),f.autoInsertedRow=r.row,f.autoInsertedLineEnd=n+i.substr(r.column),f.autoInsertedBrackets++},h.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,i)||(f.maybeInsertedBrackets=0),f.maybeInsertedRow=r.row,f.maybeInsertedLineStart=i.substr(0,r.column)+n,f.maybeInsertedLineEnd=i.substr(r.column),f.maybeInsertedBrackets++},h.isAutoInsertedClosing=function(e,t,n){return f.autoInsertedBrackets>0&&e.row===f.autoInsertedRow&&n===f.autoInsertedLineEnd[0]&&t.substr(e.column)===f.autoInsertedLineEnd},h.isMaybeInsertedClosing=function(e,t){return f.maybeInsertedBrackets>0&&e.row===f.maybeInsertedRow&&t.substr(e.column)===f.maybeInsertedLineEnd&&t.substr(0,e.column)==f.maybeInsertedLineStart},h.popAutoInsertedClosing=function(){f.autoInsertedLineEnd=f.autoInsertedLineEnd.substr(1),f.autoInsertedBrackets--},h.clearMaybeInsertedClosing=function(){f&&(f.maybeInsertedBrackets=0,f.maybeInsertedRow=-1)},r.inherits(h,i),t.CstyleBehaviour=h}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n),s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++t<a){n=e.getLine(t);var f=n.search(/\S/);if(f===-1)continue;if(r>f)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)}}.call(o.prototype)})
\ No newline at end of file
diff --git a/app/assets/lib/ace/mode-lua.js b/app/assets/lib/ace/mode-lua.js
index c056df5e7..a1a333cfe 100644
--- a/app/assets/lib/ace/mode-lua.js
+++ b/app/assets/lib/ace/mode-lua.js
@@ -1 +1 @@
-ace.define("ace/mode/lua",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lua_highlight_rules","ace/mode/folding/lua","ace/range","ace/worker/worker_client"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("./lua_highlight_rules").LuaHighlightRules,o=e("./folding/lua").FoldMode,u=e("../range").Range,a=e("../worker/worker_client").WorkerClient,f=function(){this.HighlightRules=s,this.foldingRules=new o};r.inherits(f,i),function(){function n(t){var n=0;for(var r=0;r<t.length;r++){var i=t[r];i.type=="keyword"?i.value in e&&(n+=e[i.value]):i.type=="paren.lparen"?n++:i.type=="paren.rparen"&&n--}return n<0?-1:n>0?1:0}this.lineCommentStart="--",this.blockComment={start:"--[",end:"]--"};var e={"function":1,then:1,"do":1,"else":1,elseif:1,repeat:1,end:-1,until:-1},t=["else","elseif","end","until"];this.getNextLineIndent=function(e,t,r){var i=this.$getIndent(t),s=0,o=this.getTokenizer().getLineTokens(t,e),u=o.tokens;return e=="start"&&(s=n(u)),s>0?i+r:s<0&&i.substr(i.length-r.length)==r&&!this.checkOutdent(e,t,"\n")?i.substr(0,i.length-r.length):i},this.checkOutdent=function(e,n,r){if(r!="\n"&&r!="\r"&&r!="\r\n")return!1;if(n.match(/^\s*[\)\}\]]$/))return!0;var i=this.getTokenizer().getLineTokens(n.trim(),e).tokens;return!i||!i.length?!1:i[0].type=="keyword"&&t.indexOf(i[0].value)!=-1},this.autoOutdent=function(e,t,r){var i=t.getLine(r-1),s=this.$getIndent(i).length,o=this.getTokenizer().getLineTokens(i,"start").tokens,a=t.getTabString().length,f=s+a*n(o),l=this.$getIndent(t.getLine(r)).length;if(l<f)return;t.outdentRows(new u(r,0,r+2,0))},this.createWorker=function(e){var t=new a(["ace"],"ace/mode/lua_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("error",function(t){e.setAnnotations([t.data])}),t.on("ok",function(t){e.clearAnnotations()}),t},this.$id="ace/mode/lua"}.call(f.prototype),t.Mode=f}),ace.define("ace/mode/lua_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="break|do|else|elseif|end|for|function|if|in|local|repeat|return|then|until|while|or|and|not",t="true|false|nil|_G|_VERSION",n="string|xpcall|package|tostring|print|os|unpack|require|getfenv|setmetatable|next|assert|tonumber|io|rawequal|collectgarbage|getmetatable|module|rawset|math|debug|pcall|table|newproxy|type|coroutine|_G|select|gcinfo|pairs|rawget|loadstring|ipairs|_VERSION|dofile|setfenv|load|error|loadfile|sub|upper|len|gfind|rep|find|match|char|dump|gmatch|reverse|byte|format|gsub|lower|preload|loadlib|loaded|loaders|cpath|config|path|seeall|exit|setlocale|date|getenv|difftime|remove|time|clock|tmpname|rename|execute|lines|write|close|flush|open|output|type|read|stderr|stdin|input|stdout|popen|tmpfile|log|max|acos|huge|ldexp|pi|cos|tanh|pow|deg|tan|cosh|sinh|random|randomseed|frexp|ceil|floor|rad|abs|sqrt|modf|asin|min|mod|fmod|log10|atan2|exp|sin|atan|getupvalue|debug|sethook|getmetatable|gethook|setmetatable|setlocal|traceback|setfenv|getinfo|setupvalue|getlocal|getregistry|getfenv|setn|insert|getn|foreachi|maxn|foreach|concat|sort|remove|resume|yield|status|wrap|create|running|__add|__sub|__mod|__unm|__concat|__lt|__index|__call|__gc|__metatable|__mul|__div|__pow|__len|__eq|__le|__newindex|__tostring|__mode|__tonumber",r="string|package|os|io|math|debug|table|coroutine",i="",s="setn|foreach|foreachi|gcinfo|log10|maxn",o=this.createKeywordMapper({keyword:e,"support.function":n,"invalid.deprecated":s,"constant.library":r,"constant.language":t,"invalid.illegal":i,"variable.language":"self"},"identifier"),u="(?:(?:[1-9]\\d*)|(?:0))",a="(?:0[xX][\\dA-Fa-f]+)",f="(?:"+u+"|"+a+")",l="(?:\\.\\d+)",c="(?:\\d+)",h="(?:(?:"+c+"?"+l+")|(?:"+c+"\\.))",p="(?:"+h+")";this.$rules={start:[{stateName:"bracketedComment",onMatch:function(e,t,n){return n.unshift(this.next,e.length-2,t),"comment"},regex:/\-\-\[=*\[/,next:[{onMatch:function(e,t,n){return e.length==n[1]?(n.shift(),n.shift(),this.next=n.shift()):this.next="","comment"},regex:/\]=*\]/,next:"start"},{defaultToken:"comment"}]},{token:"comment",regex:"\\-\\-.*$"},{stateName:"bracketedString",onMatch:function(e,t,n){return n.unshift(this.next,e.length,t),"comment"},regex:/\[=*\[/,next:[{onMatch:function(e,t,n){return e.length==n[1]?(n.shift(),n.shift(),this.next=n.shift()):this.next="","comment"},regex:/\]=*\]/,next:"start"},{defaultToken:"comment"}]},{token:"string",regex:'"(?:[^\\\\]|\\\\.)*?"'},{token:"string",regex:"'(?:[^\\\\]|\\\\.)*?'"},{token:"constant.numeric",regex:p},{token:"constant.numeric",regex:f+"\\b"},{token:o,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\/|%|\\#|\\^|~|<|>|<=|=>|==|~=|=|\\:|\\.\\.\\.|\\.\\."},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:"text",regex:"\\s+|\\w+"}]},this.normalizeRules()};r.inherits(s,i),t.LuaHighlightRules=s}),ace.define("ace/mode/folding/lua",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(e,t,n){var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=e("../../token_iterator").TokenIterator,u=t.FoldMode=function(){};r.inherits(u,i),function(){this.foldingStartMarker=/\b(function|then|do|repeat)\b|{\s*$|(\[=*\[)/,this.foldingStopMarker=/\bend\b|^\s*}|\]=*\]/,this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=this.foldingStartMarker.test(r),s=this.foldingStopMarker.test(r);if(i&&!s){var o=r.match(this.foldingStartMarker);if(o[1]=="then"&&/\belseif\b/.test(r))return;if(o[1]){if(e.getTokenAt(n,o.index+1).type==="keyword")return"start"}else{if(!o[2])return"start";var u=e.bgTokenizer.getState(n)||"";if(u[0]=="bracketedComment"||u[0]=="bracketedString")return"start"}}if(t!="markbeginend"||!s||i&&s)return"";var o=r.match(this.foldingStopMarker);if(o[0]==="end"){if(e.getTokenAt(n,o.index+1).type==="keyword")return"end"}else{if(o[0][0]!=="]")return"end";var u=e.bgTokenizer.getState(n-1)||"";if(u[0]=="bracketedComment"||u[0]=="bracketedString")return"end"}},this.getFoldWidgetRange=function(e,t,n){var r=e.doc.getLine(n),i=this.foldingStartMarker.exec(r);if(i)return i[1]?this.luaBlock(e,n,i.index+1):i[2]?e.getCommentFoldRange(n,i.index+1):this.openingBracketBlock(e,"{",n,i.index);var i=this.foldingStopMarker.exec(r);if(i)return i[0]==="end"&&e.getTokenAt(n,i.index+1).type==="keyword"?this.luaBlock(e,n,i.index+1):i[0][0]==="]"?e.getCommentFoldRange(n,i.index+1):this.closingBracketBlock(e,"}",n,i.index+i[0].length)},this.luaBlock=function(e,t,n){var r=new o(e,t,n),i={"function":1,"do":1,then:1,elseif:-1,end:-1,repeat:1,until:-1},u=r.getCurrentToken();if(!u||u.type!="keyword")return;var a=u.value,f=[a],l=i[a];if(!l)return;var c=l===-1?r.getCurrentTokenColumn():e.getLine(t).length,h=t;r.step=l===-1?r.stepBackward:r.stepForward;while(u=r.step()){if(u.type!=="keyword")continue;var p=l*i[u.value];if(p>0)f.unshift(u.value);else if(p<=0){f.shift();if(!f.length&&u.value!="elseif")break;p===0&&f.unshift(u.value)}}var t=r.getCurrentTokenRow();return l===-1?new s(t,e.getLine(t).length,h,c):new s(h,c,t,r.getCurrentTokenColumn())}}.call(u.prototype)})
+ace.define("ace/mode/lua",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lua_highlight_rules","ace/mode/folding/lua","ace/range","ace/worker/worker_client"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("./lua_highlight_rules").LuaHighlightRules,o=e("./folding/lua").FoldMode,u=e("../range").Range,a=e("../worker/worker_client").WorkerClient,f=function(){this.HighlightRules=s,this.foldingRules=new o};r.inherits(f,i),function(){function n(t){var n=0;for(var r=0;r<t.length;r++){var i=t[r];i.type=="keyword"?i.value in e&&(n+=e[i.value]):i.type=="paren.lparen"?n++:i.type=="paren.rparen"&&n--}return n<0?-1:n>0?1:0}this.lineCommentStart="--",this.blockComment={start:"--[",end:"]--"};var e={"function":1,then:1,"do":1,"else":1,elseif:1,repeat:1,end:-1,until:-1},t=["else","elseif","end","until"];this.getNextLineIndent=function(e,t,r){var i=this.$getIndent(t),s=0,o=this.getTokenizer().getLineTokens(t,e),u=o.tokens;return e=="start"&&(s=n(u)),s>0?i+r:s<0&&i.substr(i.length-r.length)==r&&!this.checkOutdent(e,t,"\n")?i.substr(0,i.length-r.length):i},this.checkOutdent=function(e,n,r){if(r!="\n"&&r!="\r"&&r!="\r\n")return!1;if(n.match(/^\s*[\)\}\]]$/))return!0;var i=this.getTokenizer().getLineTokens(n.trim(),e).tokens;return!i||!i.length?!1:i[0].type=="keyword"&&t.indexOf(i[0].value)!=-1},this.autoOutdent=function(e,t,r){var i=t.getLine(r-1),s=this.$getIndent(i).length,o=this.getTokenizer().getLineTokens(i,"start").tokens,a=t.getTabString().length,f=s+a*n(o),l=this.$getIndent(t.getLine(r)).length;if(l<f)return;t.outdentRows(new u(r,0,r+2,0))},this.createWorker=function(e){var t=new a(["ace"],"ace/mode/lua_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("error",function(t){e.setAnnotations([t.data])}),t.on("ok",function(t){e.clearAnnotations()}),t},this.$id="ace/mode/lua"}.call(f.prototype),t.Mode=f}),ace.define("ace/mode/lua_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="break|do|else|elseif|end|for|function|if|in|local|repeat|return|then|until|while|or|and|not",t="true|false|nil|_G|_VERSION",n="string|xpcall|package|tostring|print|os|unpack|require|getfenv|setmetatable|next|assert|tonumber|io|rawequal|collectgarbage|getmetatable|module|rawset|math|debug|pcall|table|newproxy|type|coroutine|_G|select|gcinfo|pairs|rawget|loadstring|ipairs|_VERSION|dofile|setfenv|load|error|loadfile|sub|upper|len|gfind|rep|find|match|char|dump|gmatch|reverse|byte|format|gsub|lower|preload|loadlib|loaded|loaders|cpath|config|path|seeall|exit|setlocale|date|getenv|difftime|remove|time|clock|tmpname|rename|execute|lines|write|close|flush|open|output|type|read|stderr|stdin|input|stdout|popen|tmpfile|log|max|acos|huge|ldexp|pi|cos|tanh|pow|deg|tan|cosh|sinh|random|randomseed|frexp|ceil|floor|rad|abs|sqrt|modf|asin|min|mod|fmod|log10|atan2|exp|sin|atan|getupvalue|debug|sethook|getmetatable|gethook|setmetatable|setlocal|traceback|setfenv|getinfo|setupvalue|getlocal|getregistry|getfenv|setn|insert|getn|foreachi|maxn|foreach|concat|sort|remove|resume|yield|status|wrap|create|running|__add|__sub|__mod|__unm|__concat|__lt|__index|__call|__gc|__metatable|__mul|__div|__pow|__len|__eq|__le|__newindex|__tostring|__mode|__tonumber",r="string|package|os|io|math|debug|table|coroutine",i="",s="setn|foreach|foreachi|gcinfo|log10|maxn",o=this.createKeywordMapper({keyword:e,"support.function":n,"invalid.deprecated":s,"constant.library":r,"constant.language":t,"invalid.illegal":i,"variable.language":"self"},"identifier"),u="(?:(?:[1-9]\\d*)|(?:0))",a="(?:0[xX][\\dA-Fa-f]+)",f="(?:"+u+"|"+a+")",l="(?:\\.\\d+)",c="(?:\\d+)",h="(?:(?:"+c+"?"+l+")|(?:"+c+"\\.))",p="(?:"+h+")";this.$rules={start:[{stateName:"bracketedComment",onMatch:function(e,t,n){return n.unshift(this.next,e.length-2,t),"comment"},regex:/\-\-\[=*\[/,next:[{onMatch:function(e,t,n){return e.length==n[1]?(n.shift(),n.shift(),this.next=n.shift()):this.next="","comment"},regex:/\]=*\]/,next:"start"},{defaultToken:"comment"}]},{token:"comment",regex:"\\-\\-.*$"},{stateName:"bracketedString",onMatch:function(e,t,n){return n.unshift(this.next,e.length,t),"comment"},regex:/\[=*\[/,next:[{onMatch:function(e,t,n){return e.length==n[1]?(n.shift(),n.shift(),this.next=n.shift()):this.next="","comment"},regex:/\]=*\]/,next:"start"},{defaultToken:"comment"}]},{token:"string",regex:'"(?:[^\\\\]|\\\\.)*?"'},{token:"string",regex:"'(?:[^\\\\]|\\\\.)*?'"},{token:"constant.numeric",regex:p},{token:"constant.numeric",regex:f+"\\b"},{token:o,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\/|%|\\#|\\^|~|<|>|<=|=>|==|~=|=|\\:|\\.\\.\\.|\\.\\."},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:"text",regex:"\\s+|\\w+"}]},this.normalizeRules()};r.inherits(s,i),t.LuaHighlightRules=s}),ace.define("ace/mode/folding/lua",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(e,t,n){var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=e("../../token_iterator").TokenIterator,u=t.FoldMode=function(){};r.inherits(u,i),function(){this.foldingStartMarker=/\b(function|then|do|repeat)\b|{\s*$|(\[=*\[)/,this.foldingStopMarker=/\bend\b|^\s*}|\]=*\]/,this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=this.foldingStartMarker.test(r),s=this.foldingStopMarker.test(r);if(i&&!s){var o=r.match(this.foldingStartMarker);if(o[1]=="then"&&/\belseif\b/.test(r))return;if(o[1]){if(e.getTokenAt(n,o.index+1).type==="keyword")return"start"}else{if(!o[2])return"start";var u=e.bgTokenizer.getState(n)||"";if(u[0]=="bracketedComment"||u[0]=="bracketedString")return"start"}}if(t!="markbeginend"||!s||i&&s)return"";var o=r.match(this.foldingStopMarker);if(o[0]==="end"){if(e.getTokenAt(n,o.index+1).type==="keyword")return"end"}else{if(o[0][0]!=="]")return"end";var u=e.bgTokenizer.getState(n-1)||"";if(u[0]=="bracketedComment"||u[0]=="bracketedString")return"end"}},this.getFoldWidgetRange=function(e,t,n){var r=e.doc.getLine(n),i=this.foldingStartMarker.exec(r);if(i)return i[1]?this.luaBlock(e,n,i.index+1):i[2]?e.getCommentFoldRange(n,i.index+1):this.openingBracketBlock(e,"{",n,i.index);var i=this.foldingStopMarker.exec(r);if(i)return i[0]==="end"&&e.getTokenAt(n,i.index+1).type==="keyword"?this.luaBlock(e,n,i.index+1):i[0][0]==="]"?e.getCommentFoldRange(n,i.index+1):this.closingBracketBlock(e,"}",n,i.index+i[0].length)},this.luaBlock=function(e,t,n){var r=new o(e,t,n),i={"function":1,"do":1,then:1,elseif:-1,end:-1,repeat:1,until:-1},u=r.getCurrentToken();if(!u||u.type!="keyword")return;var a=u.value,f=[a],l=i[a];if(!l)return;var c=l===-1?r.getCurrentTokenColumn():e.getLine(t).length,h=t;r.step=l===-1?r.stepBackward:r.stepForward;while(u=r.step()){if(u.type!=="keyword")continue;var p=l*i[u.value];if(p>0)f.unshift(u.value);else if(p<=0){f.shift();if(!f.length&&u.value!="elseif")break;p===0&&f.unshift(u.value)}}var t=r.getCurrentTokenRow();return l===-1?new s(t,e.getLine(t).length,h,c):new s(h,c,t,r.getCurrentTokenColumn())}}.call(u.prototype)})
\ No newline at end of file
diff --git a/app/assets/lib/ace/mode-markdown.js b/app/assets/lib/ace/mode-markdown.js
deleted file mode 100644
index bbb35cfa0..000000000
--- a/app/assets/lib/ace/mode-markdown.js
+++ /dev/null
@@ -1 +0,0 @@
-ace.define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript","ace/mode/xml","ace/mode/html","ace/tokenizer","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript").Mode,o=e("./xml").Mode,u=e("./html").Mode,a=e("../tokenizer").Tokenizer,f=e("./markdown_highlight_rules").MarkdownHighlightRules,l=e("./folding/markdown").FoldMode,c=function(){this.HighlightRules=f,this.createModeDelegates({"js-":s,"xml-":o,"html-":u}),this.foldingRules=new l};r.inherits(c,i),function(){this.type="text",this.lineCommentStart=">",this.getNextLineIndent=function(e,t,n){if(e=="listblock"){var r=/^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(t);if(!r)return"";var i=r[2];return i||(i=parseInt(r[3],10)+1+"."),r[1]+i+r[4]}return this.$getIndent(t)}}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("../tokenizer").Tokenizer,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("../range").Range,f=e("../worker/worker_client").WorkerClient,l=e("./behaviour/cstyle").CstyleBehaviour,c=e("./folding/cstyle").FoldMode,h=function(){this.HighlightRules=o,this.$outdent=new u,this.$behaviour=new l,this.foldingRules=new c};r.inherits(h,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens,o=i.state;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"||e=="no_regex"){var u=t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);u&&(r+=n)}else if(e=="doc-start"){if(o=="start"||o=="no_regex")return"";var u=t.match(/^\s*(\/?)\*/);u&&(u[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new f(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("jslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t}}.call(h.prototype),t.Mode=h}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),t="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",n="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b",r="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[{token:"comment",regex:"\\/\\/",next:"line_comment"},i.getStartRule("doc-start"),{token:"comment",regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+n+")(\\.)(prototype)(\\.)("+n+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+n+")(\\.)("+n+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+n+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+n+")(\\.)("+n+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+n+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+n+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"(?:"+t+")\\b",next:"start"},{token:["punctuation.operator","support.function"],regex:/(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:["punctuation.operator","support.function.dom"],regex:/(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:["punctuation.operator","support.constant"],regex:/(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/},{token:e,regex:n},{token:"keyword.operator",regex:/--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,next:"start"},{token:"punctuation.operator",regex:/\?|\:|\,|\;|\./,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"keyword.operator",regex:/\/=?/,next:"start"},{token:"comment",regex:/^#!.*$/}],start:[i.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/",next:"line_comment_regex_allowed"},{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/\\w*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:n},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],comment_regex_allowed:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],comment:[{token:"comment",regex:"\\*\\/",next:"no_regex"},{defaultToken:"comment"}],line_comment_regex_allowed:[{token:"comment",regex:"$|^",next:"start"},{defaultToken:"comment"}],line_comment:[{token:"comment",regex:"$|^",next:"no_regex"},{defaultToken:"comment"}],qqstring:[{token:"constant.language.escape",regex:r},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:r},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},this.embedRules(i,"doc-",[i.getEndRule("no_regex")])};r.inherits(o,s),t.JavaScriptHighlightRules=o}),ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc.tag",regex:"\\bTODO\\b"},{defaultToken:"comment.doc"}]}};r.inherits(s,i),s.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,o=e("../../lib/lang"),u=["text","paren.rparen","punctuation.operator"],a=["text","paren.rparen","punctuation.operator","comment"],f=0,l=-1,c="",h=0,p=-1,d="",v="",m=function(){m.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new s(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",u)){var i=new s(t,n.row,n.column+1);if(!this.$matchTokenType(i.getCurrentToken()||"text",u))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",a)},m.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},m.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,i,c[0])||(f=0),l=r.row,c=n+i.substr(r.column),f++},m.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,i)||(h=0),p=r.row,d=i.substr(0,r.column)+n,v=i.substr(r.column),h++},m.isAutoInsertedClosing=function(e,t,n){return f>0&&e.row===l&&n===c[0]&&t.substr(e.column)===c},m.isMaybeInsertedClosing=function(e,t){return h>0&&e.row===p&&t.substr(e.column)===v&&t.substr(0,e.column)==d},m.popAutoInsertedClosing=function(){c=c.substr(1),f--},m.clearMaybeInsertedClosing=function(){h=0,p=-1},this.add("braces","insertion",function(e,t,n,r,i){var s=n.getCursorPosition(),u=r.doc.getLine(s.row);if(i=="{"){var a=n.getSelectionRange(),f=r.doc.getTextRange(a);if(f!==""&&f!=="{"&&n.getWrapBehavioursEnabled())return{text:"{"+f+"}",selection:!1};if(m.isSaneInsertion(n,r))return/[\]\}\)]/.test(u[s.column])?(m.recordAutoInsert(n,r,"}"),{text:"{}",selection:[1,1]}):(m.recordMaybeInsert(n,r,"{"),{text:"{",selection:[1,1]})}else if(i=="}"){var l=u.substring(s.column,s.column+1);if(l=="}"){var c=r.$findOpeningBracket("}",{column:s.column+1,row:s.row});if(c!==null&&m.isAutoInsertedClosing(s,u,i))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(i=="\n"||i=="\r\n"){var p="";m.isMaybeInsertedClosing(s,u)&&(p=o.stringRepeat("}",h),m.clearMaybeInsertedClosing());var l=u.substring(s.column,s.column+1);if(l=="}"||p!==""){var d=r.findMatchingBracket({row:s.row,column:s.column+1},"}");if(!d)return null;var v=this.getNextLineIndent(e,u.substring(0,s.column),r.getTabString()),g=this.$getIndent(u);return{text:"\n"+v+"\n"+g+p,selection:[1,v.length,1,v.length]}}}}),this.add("braces","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s=="{"){var o=r.doc.getLine(i.start.row),u=o.substring(i.end.column,i.end.column+1);if(u=="}")return i.end.column++,i;h--}}),this.add("parens","insertion",function(e,t,n,r,i){if(i=="("){var s=n.getSelectionRange(),o=r.doc.getTextRange(s);if(o!==""&&n.getWrapBehavioursEnabled())return{text:"("+o+")",selection:!1};if(m.isSaneInsertion(n,r))return m.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(i==")"){var u=n.getCursorPosition(),a=r.doc.getLine(u.row),f=a.substring(u.column,u.column+1);if(f==")"){var l=r.$findOpeningBracket(")",{column:u.column+1,row:u.row});if(l!==null&&m.isAutoInsertedClosing(u,a,i))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s=="("){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==")")return i.end.column++,i}}),this.add("brackets","insertion",function(e,t,n,r,i){if(i=="["){var s=n.getSelectionRange(),o=r.doc.getTextRange(s);if(o!==""&&n.getWrapBehavioursEnabled())return{text:"["+o+"]",selection:!1};if(m.isSaneInsertion(n,r))return m.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if(i=="]"){var u=n.getCursorPosition(),a=r.doc.getLine(u.row),f=a.substring(u.column,u.column+1);if(f=="]"){var l=r.$findOpeningBracket("]",{column:u.column+1,row:u.row});if(l!==null&&m.isAutoInsertedClosing(u,a,i))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s=="["){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u=="]")return i.end.column++,i}}),this.add("string_dquotes","insertion",function(e,t,n,r,i){if(i=='"'||i=="'"){var s=i,o=n.getSelectionRange(),u=r.doc.getTextRange(o);if(u!==""&&u!=="'"&&u!='"'&&n.getWrapBehavioursEnabled())return{text:s+u+s,selection:!1};var a=n.getCursorPosition(),f=r.doc.getLine(a.row),l=f.substring(a.column-1,a.column);if(l=="\\")return null;var c=r.getTokens(o.start.row),h=0,p,d=-1;for(var v=0;v<c.length;v++){p=c[v],p.type=="string"?d=-1:d<0&&(d=p.value.indexOf(s));if(p.value.length+h>o.start.column)break;h+=c[v].value.length}if(!p||d<0&&p.type!=="comment"&&(p.type!=="string"||o.start.column!==p.value.length+h-1&&p.value.lastIndexOf(s)===p.value.length-1)){if(!m.isSaneInsertion(n,r))return;return{text:s+s,selection:[1,1]}}if(p&&p.type==="string"){var g=f.substring(a.column,a.column+1);if(g==s)return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&(s=='"'||s=="'")){var o=r.doc.getLine(i.start.row),u=o.substring(i.start.column+1,i.start.column+2);if(u==s)return i.end.column++,i}})};r.inherits(m,i),t.CstyleBehaviour=m}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n),s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++t<a){n=e.getLine(t);var f=n.search(/\S/);if(f===-1)continue;if(r>f)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)}}.call(o.prototype)}),ace.define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("../tokenizer").Tokenizer,o=e("./xml_highlight_rules").XmlHighlightRules,u=e("./behaviour/xml").XmlBehaviour,a=e("./folding/xml").FoldMode,f=function(){this.HighlightRules=o,this.$behaviour=new u,this.foldingRules=new a};r.inherits(f,i),function(){this.blockComment={start:"<!--",end:"-->"}}.call(f.prototype),t.Mode=f}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/xml_util","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./xml_util"),s=e("./text_highlight_rules").TextHighlightRules,o=function(e){this.$rules={start:[{token:"punctuation.string.begin",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.begin","keyword.instruction"],regex:"(<\\?)(xml)(?=[\\s])",next:"xml_declaration"},{token:["punctuation.instruction.begin","keyword.instruction"],regex:"(<\\?)([-_a-zA-Z0-9]+)",next:"instruction"},{token:"comment",regex:"<\\!--",next:"comment"},{token:["punctuation.doctype.begin","meta.tag.doctype"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype"},{include:"tag"},{include:"reference"}],xml_declaration:[{include:"attributes"},{include:"instruction"}],instruction:[{token:"punctuation.instruction.end",regex:"\\?>",next:"start"}],doctype:[{include:"space"},{include:"string"},{token:"punctuation.doctype.end",regex:">",next:"start"},{token:"xml-pe",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.begin",regex:"\\[",push:"declarations"}],declarations:[{token:"text",regex:"\\s+"},{token:"punctuation.end",regex:"]",next:"pop"},{token:["punctuation.begin","keyword"],regex:"(<\\!)([-_a-zA-Z0-9]+)",push:[{token:"text",regex:"\\s+"},{token:"punctuation.end",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.end",regex:"\\]\\]>",next:"start"},{token:"text",regex:"\\s+"},{token:"text",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment",regex:"-->",next:"start"},{defaultToken:"comment"}],tag:[{token:["meta.tag.punctuation.begin","meta.tag.name"],regex:"(<)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",next:[{include:"attributes"},{token:"meta.tag.punctuation.end",regex:"/?>",next:"start"}]},{token:["meta.tag.punctuation.begin","meta.tag.name"],regex:"(</)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",next:[{include:"space"},{token:"meta.tag.punctuation.end",regex:">",next:"start"}]}],space:[{token:"text",regex:"\\s+"}],reference:[{token:"constant.language.escape",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"},{token:"invalid.illegal",regex:"&"}],string:[{token:"string",regex:"'",push:"qstring_inner"},{token:"string",regex:'"',push:"qqstring_inner"}],qstring_inner:[{token:"string",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string"}],qqstring_inner:[{token:"string",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string"}],attributes:[{token:"entity.other.attribute-name",regex:"(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"},{token:"keyword.operator.separator",regex:"="},{include:"space"},{include:"string"}]},this.constructor===o&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.begin","meta.tag.name."+n],regex:"(<)("+n+")",next:[{include:"space"},{include:"attributes"},{token:"meta.tag.punctuation.end",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"space"},{token:"meta.tag.punctuation.end",regex:">",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.begin","meta.tag.name."+n],regex:"(</)("+n+")",next:n+"-end"},{token:"string.begin",regex:"<\\!\\[CDATA\\["},{token:"string.end",regex:"\\]\\]>"}])}}).call(s.prototype),r.inherits(o,s),t.XmlHighlightRules=o}),ace.define("ace/mode/xml_util",["require","exports","module"],function(e,t,n){function r(e){return[{token:"string",regex:'"',next:e+"_qqstring"},{token:"string",regex:"'",next:e+"_qstring"}]}function i(e,t){return[{token:"string",regex:e,next:t},{token:"constant.language.escape",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"},{defaultToken:"string"}]}t.tag=function(e,t,n,s){e[t]=[{token:"text",regex:"\\s+"},{token:s?function(e){return s[e]?"meta.tag.tag-name."+s[e]:"meta.tag.tag-name"}:"meta.tag.tag-name",regex:"[-_a-zA-Z0-9:]+",next:t+"_embed_attribute_list"},{token:"empty",regex:"",next:t+"_embed_attribute_list"}],e[t+"_qstring"]=i("'",t+"_embed_attribute_list"),e[t+"_qqstring"]=i('"',t+"_embed_attribute_list"),e[t+"_embed_attribute_list"]=[{token:"meta.tag.r",regex:"/?>",next:n},{token:"keyword.operator",regex:"="},{token:"entity.other.attribute-name",regex:"[-_a-zA-Z0-9:]+"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"text",regex:"\\s+"}].concat(r(t))}}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){function u(e,t){var n=e.type.split(".");return t.split(".").every(function(e){return n.indexOf(e)!==-1})}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,a=function(){this.inherit(s,["string_dquotes"]),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var s=n.getCursorPosition(),a=new o(r,s.row,s.column),f=a.getCurrentToken();if(f&&u(f,"string")&&a.getCurrentTokenColumn()+f.value.length>s.column)return;var l=!1;if(!f||!u(f,"meta.tag")&&(!u(f,"text")||!f.value.match("/"))){do f=a.stepBackward();while(f&&(u(f,"string")||u(f,"keyword.operator")||u(f,"entity.attribute-name")||u(f,"text")))}else l=!0;if(!f||!u(f,"meta.tag.name")||a.stepBackward().value.match("/"))return;var c=f.value;if(l)var c=c.substring(0,s.column-f.start);return{text:"></"+c+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,i){if(i=="\n"){var s=n.getCursorPosition(),o=r.getLine(s.row),u=o.substring(s.column,s.column+2);if(u=="</"){var a=this.$getIndent(o),f=a+r.getTabString();return{text:"\n"+f+"\n"+a,selection:[1,f.length,1,f.length]}}}})};r.inherits(a,i),t.XmlBehaviour=a}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"],function(e,t,n){var r=e("../../lib/oop"),i=e("../../lib/lang"),s=e("../../range").Range,o=e("./fold_mode").FoldMode,u=e("../../token_iterator").TokenIterator,a=t.FoldMode=function(e){o.call(this),this.voidElements=e||{}};r.inherits(a,o),function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r.closing?t=="markbeginend"?"end":"":!r.tagName||this.voidElements[r.tagName.toLowerCase()]?"":r.selfClosing?"":r.value.indexOf("/"+r.tagName)!==-1?"":"start"},this._getFirstTagInLine=function(e,t){var n=e.getTokens(t),r="";for(var s=0;s<n.length;s++){var o=n[s];o.type.lastIndexOf("meta.tag",0)===0?r+=o.value:r+=i.stringRepeat(" ",o.value.length)}return this._parseTag(r)},this.tagRe=/^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/,this._parseTag=function(e){var t=e.match(this.tagRe),n=0;return{value:e,match:t?t[2]:"",closing:t?!!t[3]:!1,selfClosing:t?!!t[5]||t[2]=="/>":!1,tagName:t?t[4]:"",column:t[1]?n+t[1].length:n}},this._readTagForward=function(e){var t=e.getCurrentToken();if(!t)return null;var n="",r;do if(t.type.lastIndexOf("meta.tag",0)===0){if(!r)var r={row:e.getCurrentTokenRow(),column:e.getCurrentTokenColumn()};n+=t.value;if(n.indexOf(">")!==-1){var i=this._parseTag(n);return i.start=r,i.end={row:e.getCurrentTokenRow(),column:e.getCurrentTokenColumn()+t.value.length},e.stepForward(),i}}while(t=e.stepForward());return null},this._readTagBackward=function(e){var t=e.getCurrentToken();if(!t)return null;var n="",r;do if(t.type.lastIndexOf("meta.tag",0)===0){r||(r={row:e.getCurrentTokenRow(),column:e.getCurrentTokenColumn()+t.value.length}),n=t.value+n;if(n.indexOf("<")!==-1){var i=this._parseTag(n);return i.end=r,i.start={row:e.getCurrentTokenRow(),column:e.getCurrentTokenColumn()},e.stepBackward(),i}}while(t=e.stepBackward());return null},this._pop=function(e,t){while(e.length){var n=e[e.length-1];if(!t||n.tagName==t.tagName)return e.pop();if(this.voidElements[t.tagName])return;if(this.voidElements[n.tagName]){e.pop();continue}return null}},this.getFoldWidgetRange=function(e,t,n){var r=this._getFirstTagInLine(e,n);if(!r.match)return null;var i=r.closing||r.selfClosing,o=[],a;if(!i){var f=new u(e,n,r.column),l={row:n,column:r.column+r.tagName.length+2};while(a=this._readTagForward(f)){if(a.selfClosing){if(!o.length)return a.start.column+=a.tagName.length+2,a.end.column-=2,s.fromPoints(a.start,a.end);continue}if(a.closing){this._pop(o,a);if(o.length==0)return s.fromPoints(l,a.start)}else o.push(a)}}else{var f=new u(e,n,r.column+r.match.length),c={row:n,column:r.column};while(a=this._readTagBackward(f)){if(a.selfClosing){if(!o.length)return a.start.column+=a.tagName.length+2,a.end.column-=2,s.fromPoints(a.start,a.end);continue}if(!a.closing){this._pop(o,a);if(o.length==0)return a.start.column+=a.tagName.length+2,s.fromPoints(a.start,c)}else o.push(a)}}}}.call(a.prototype)}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/tokenizer","ace/mode/html_highlight_rules","ace/mode/behaviour/html","ace/mode/folding/html","ace/mode/html_completions"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("./javascript").Mode,o=e("./css").Mode,u=e("../tokenizer").Tokenizer,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./behaviour/html").HtmlBehaviour,l=e("./folding/html").FoldMode,c=e("./html_completions").HtmlCompletions,h=function(){this.HighlightRules=a,this.$behaviour=new f,this.$completer=new c,this.createModeDelegates({"js-":s,"css-":o}),this.foldingRules=new l};r.inherits(h,i),function(){this.blockComment={start:"<!--",end:"-->"},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)}}.call(h.prototype),t.Mode=h}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("../tokenizer").Tokenizer,o=e("./css_highlight_rules").CssHighlightRules,u=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("../worker/worker_client").WorkerClient,f=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=o,this.$outdent=new u,this.$behaviour=new f,this.foldingRules=new l};r.inherits(c,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e).tokens;if(i.length&&i[i.length-1].type=="comment")return r;var s=t.match(/^.*\{\s*$/);return s&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new a(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("csslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t}}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=t.supportType="animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index",u=t.supportFunction="rgb|rgba|url|attr|counter|counters",a=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero",f=t.supportConstantColor="aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow",l=t.supportConstantFonts="arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",d=function(){var e=this.createKeywordMapper({"support.function":u,"support.constant":a,"support.type":o,"support.constant.color":f,"support.constant.fonts":l},"text",!0);this.$rules={start:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"@.*?{",push:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"\\}",next:"pop"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],comment:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}],ruleset:[{token:"paren.rparen",regex:"\\}",next:"pop"},{token:"comment",regex:"\\/\\*",push:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{token:["support.function","string","support.function"],regex:"(url\\()(.*)(\\))"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}]},this.normalizeRules()};r.inherits(d,s),t.CssHighlightRules=d}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=function(){this.inherit(s),this.add("colon","insertion",function(e,t,n,r,i){if(i===":"){var s=n.getCursorPosition(),u=new o(r,s.row,s.column),a=u.getCurrentToken();a&&a.value.match(/\s+/)&&(a=u.stepBackward());if(a&&a.type==="support.type"){var f=r.doc.getLine(s.row),l=f.substring(s.column,s.column+1);if(l===":")return{text:"",selection:[1,1]};if(!f.substring(s.column).match(/^\s*;/))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,i){var s=r.doc.getTextRange(i);if(!i.isMultiLine()&&s===":"){var u=n.getCursorPosition(),a=new o(r,u.row,u.column),f=a.getCurrentToken();f&&f.value.match(/\s+/)&&(f=a.stepBackward());if(f&&f.type==="support.type"){var l=r.doc.getLine(i.start.row),c=l.substring(i.end.column,i.end.column+1);if(c===";")return i.end.column++,i}}}),this.add("semicolon","insertion",function(e,t,n,r,i){if(i===";"){var s=n.getCursorPosition(),o=r.doc.getLine(s.row),u=o.substring(s.column,s.column+1);if(u===";")return{text:"",selection:[1,1]}}})};r.inherits(u,s),t.CssBehaviour=u}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./css_highlight_rules").CssHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=i.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),f=function(){u.call(this),this.addRules({attributes:[{include:"space"},{token:"entity.other.attribute-name",regex:"[-_a-zA-Z0-9:]+"},{token:"keyword.operator.separator",regex:"=",push:[{include:"space"},{token:"string",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"string"}],tag:[{token:function(e,t){var n=a[t];return["meta.tag.punctuation.begin","meta.tag.name"+(n?"."+n:"")]},regex:"(<)([-_a-zA-Z0-9:]+)",next:"start_tag_stuff"},{token:function(e,t){var n=a[t];return["meta.tag.punctuation.begin","meta.tag.name"+(n?"."+n:"")]},regex:"(</)([-_a-zA-Z0-9:]+)",next:"end_tag_stuff"}],start_tag_stuff:[{include:"attributes"},{token:"meta.tag.punctuation.end",regex:"/?>",next:"start"}],end_tag_stuff:[{include:"space"},{token:"meta.tag.punctuation.end",regex:">",next:"start"}]}),this.embedTagRules(s,"css-","style"),this.embedTagRules(o,"js-","script"),this.constructor===f&&this.normalizeRules()};r.inherits(f,u),t.HtmlHighlightRules=f}),ace.define("ace/mode/behaviour/html",["require","exports","module","ace/lib/oop","ace/mode/behaviour/xml","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){function a(e,t){var n=e.type.split(".");return t.split(".").every(function(e){return n.indexOf(e)!==-1})}var r=e("../../lib/oop"),i=e("../behaviour/xml").XmlBehaviour,s=e("./cstyle").CstyleBehaviour,o=e("../../token_iterator").TokenIterator,u=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],f=function(){this.inherit(i),this.add("autoclosing","insertion",function(e,t,n,r,i){if(i==">"){var s=n.getCursorPosition(),f=new o(r,s.row,s.column),l=f.getCurrentToken();if(l&&a(l,"string")&&f.getCurrentTokenColumn()+l.value.length>s.column)return;var c=!1;if(!l||!a(l,"meta.tag")&&(!a(l,"text")||!l.value.match("/"))){do l=f.stepBackward();while(l&&(a(l,"string")||a(l,"keyword.operator")||a(l,"entity.attribute-name")||a(l,"text")))}else c=!0;if(!l||!a(l,"meta.tag.name")||f.stepBackward().value.match("/"))return;var h=l.value;if(c)var h=h.substring(0,s.column-l.start);if(u.indexOf(h)!==-1)return;return{text:"></"+h+">",selection:[1,1]}}})};r.inherits(f,i),t.HtmlBehaviour=f}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){var r=e("../../lib/oop"),i=e("./mixed").FoldMode,s=e("./xml").FoldMode,o=e("./cstyle").FoldMode,u=t.FoldMode=function(){i.call(this,new s({area:1,base:1,br:1,col:1,command:1,embed:1,hr:1,img:1,input:1,keygen:1,link:1,meta:1,param:1,source:1,track:1,wbr:1,li:1,dt:1,dd:1,p:1,rt:1,rp:1,optgroup:1,option:1,colgroup:1,td:1,th:1}),{"js-":new o,"css-":new o})};r.inherits(u,i)}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(s,i),function(){this.$getMode=function(e){typeof e!="string"&&(e=e[0]);for(var t in this.subModes)if(e.indexOf(t)===0)return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var i=this.$getMode(e);return i?i.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));if(!r||!r.getFoldWidget(e,t,n))r=this.$getMode(e.getState(n));if(!r||!r.getFoldWidget(e,t,n))r=this.defaultMode;return r.getFoldWidgetRange(e,t,n)}}.call(s.prototype)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){function f(e,t){var n=e.type.split(".");return t.split(".").every(function(e){return n.indexOf(e)!==-1})}function l(e,t){var n=new r(e,t.row,t.column),i=n.getCurrentToken();if(!i||!f(i,"tag")&&(!f(i,"text")||!i.value.match("/")))do i=n.stepBackward();while(i&&(f(i,"string")||f(i,"operator")||f(i,"attribute-name")||f(i,"text")));if(i&&f(i,"tag-name")&&!n.stepBackward().value.match("/"))return i.value}var r=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],o=i.concat(s),u={html:["manifest"],head:[],title:[],base:["href","target"],link:["href","hreflang","rel","media","type","sizes"],meta:["http-equiv","name","content","charset"],style:["type","media","scoped"],script:["charset","type","src","defer","async"],noscript:["href"],body:["onafterprint","onbeforeprint","onbeforeunload","onhashchange","onmessage","onoffline","onpopstate","onredo","onresize","onstorage","onundo","onunload"],section:[],nav:[],article:["pubdate"],aside:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],footer:[],address:[],main:[],p:[],hr:[],pre:[],blockquote:["cite"],ol:["start","reversed"],ul:[],li:["value"],dl:[],dt:[],dd:[],figure:[],figcaption:[],div:[],a:["href","target","ping","rel","media","hreflang","type"],em:[],strong:[],small:[],s:[],cite:[],q:["cite"],dfn:[],abbr:[],data:[],time:["datetime"],code:[],"var":[],samp:[],kbd:[],sub:[],sup:[],i:[],b:[],u:[],mark:[],ruby:[],rt:[],rp:[],bdi:[],bdo:[],span:[],br:[],wbr:[],ins:["cite","datetime"],del:["cite","datetime"],img:["alt","src","height","width","usemap","ismap"],iframe:["name","src","height","width","sandbox","seamless"],embed:["src","height","width","type"],object:["param","data","type","height","width","usemap","name","form","classid"],param:["name","value"],video:["src","autobuffer","autoplay","loop","controls","width","height","poster"],audio:["src","autobuffer","autoplay","loop","controls"],source:["src","type","media"],track:["kind","src","srclang","label","default"],canvas:["width","height"],map:["name"],area:["shape","coords","href","hreflang","alt","target","media","rel","ping","type"],svg:[],math:[],table:["summary"],caption:[],colgroup:["span"],col:["span"],tbody:[],thead:[],tfoot:[],tr:[],td:["headers","rowspan","colspan"],th:["headers","rowspan","colspan","scope"],form:["accept-charset","action","autocomplete","enctype","method","name","novalidate","target"],fieldset:["disabled","form","name"],legend:[],label:["form","for"],input:["type","accept","alt","autocomplete","checked","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","list","max","maxlength","min","multiple","pattern","placeholder","readonly","required","size","src","step","width","files","value"],button:["autofocus","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","value","type"],select:["autofocus","disabled","form","multiple","name","size"],datalist:[],optgroup:["disabled","label"],option:["disabled","selected","label","value"],textarea:["autofocus","disabled","form","maxlength","name","placeholder","readonly","required","rows","cols","wrap"],keygen:["autofocus","challenge","disabled","form","keytype","name"],output:["for","form","name"],progress:["value","max"],meter:["value","min","max","low","high","optimum"],details:["open"],summary:[],command:["type","label","icon","disabled","checked","radiogroup","command"],menu:["type","label"],dialog:["open"]},a=Object.keys(u),c=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);return i?f(i,"tag-name")||i.value=="<"&&f(i,"text")?this.getTagCompletions(e,t,n,r):f(i,"text")||f(i,"attribute-name")?this.getAttributeCompetions(e,t,n,r):[]:[]},this.getTagCompletions=function(e,t,n,r){var i=a;return r&&(i=i.filter(function(e){return e.indexOf(r)===0})),i.map(function(e){return{value:e,meta:"tag"}})},this.getAttributeCompetions=function(e,t,n,r){var i=l(t,n);if(!i)return[];var s=o;return i in u&&(s=s.concat(u[i])),r&&(s=s.filter(function(e){return e.indexOf(r)===0})),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute"}})}}).call(c.prototype),t.HtmlCompletions=c}),ace.define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules","ace/mode/html_highlight_rules","ace/mode/css_highlight_rules"],function(e,t,n){function c(e,t){return{token:"support.function",regex:"^```"+e+"\\s*$",push:t+"start"}}var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,u=e("./xml_highlight_rules").XmlHighlightRules,a=e("./html_highlight_rules").HtmlHighlightRules,f=e("./css_highlight_rules").CssHighlightRules,l=function(e){return"(?:[^"+i.escapeRegExp(e)+"\\\\]|\\\\.)*"},h=function(){a.call(this),this.$rules.start.unshift({token:"empty_line",regex:"^$",next:"allowBlock"},{token:"markup.heading.1",regex:"^=+(?=\\s*$)"},{token:"markup.heading.2",regex:"^\\-+(?=\\s*$)"},{token:function(e){return"markup.heading."+e.length},regex:/^#{1,6}(?=\s*[^ #]|\s+#.)/,next:"header"},c("(?:javascript|js)","jscode-"),c("xml","xmlcode-"),c("html","htmlcode-"),c("css","csscode-"),{token:"support.function",regex:"^```\\s*[a-zA-Z]*(?:{.*?\\})?\\s*$",next:"githubblock"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{token:"constant",regex:"^ {0,2}(?:(?: ?\\* ?){3,}|(?: ?\\- ?){3,}|(?: ?\\_ ?){3,})\\s*$",next:"allowBlock"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic"}),this.addRules({basic:[{token:"constant.language.escape",regex:/\\[\\`*_{}\[\]()#+\-.!]/},{token:"support.function",regex:"(`+)(.*?[^`])(\\1)"},{token:["text","constant","text","url","string","text"],regex:'^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?(\\s*))$'},{token:["text","string","text","constant","text"],regex:"(\\[)("+l("]")+")(\\]s*\\[)("+l("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\[)("+l("]")+")(\\]\\()"+'((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)'+'(\\s*"'+l('"')+'"\\s*)?'+"(\\))"},{token:"string.strong",regex:"([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"},{token:"string.emphasis",regex:"([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"},{token:["text","url","text"],regex:"(<)((?:https?|ftp|dict):[^'\">\\s]+|(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+)(>)"}],allowBlock:[{token:"support.function",regex:"^ {4}.+",next:"allowBlock"},{token:"empty",regex:"",next:"start"}],header:[{regex:"$",next:"start"},{include:"basic"},{defaultToken:"heading"}],"listblock-start":[{token:"support.variable",regex:/(?:\[[ x]\])?/,next:"listblock"}],listblock:[{token:"empty_line",regex:"^$",next:"start"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic",noEscape:!0},{defaultToken:"list"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{include:"basic",noEscape:!0},{defaultToken:"string.blockquote"}],githubblock:[{token:"support.function",regex:"^```",next:"start"},{token:"support.function",regex:".+"}]}),this.embedRules(o,"jscode-",[{token:"support.function",regex:"^```",next:"pop"}]),this.embedRules(a,"htmlcode-",[{token:"support.function",regex:"^```",next:"pop"}]),this.embedRules(f,"csscode-",[{token:"support.function",regex:"^```",next:"pop"}]),this.embedRules(u,"xmlcode-",[{token:"support.function",regex:"^```",next:"pop"}]),this.normalizeRules()};r.inherits(h,s),t.MarkdownHighlightRules=h}),ace.define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.foldingStartMarker=/^(?:[=-]+\s*$|#{1,6} |`{3})/,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);return this.foldingStartMarker.test(r)?r[0]=="`"?e.bgTokenizer.getState(n)=="start"?"end":"start":"start":""},this.getFoldWidgetRange=function(e,t,n){function l(t){return f=e.getTokens(t)[0],f&&f.type.lastIndexOf(c,0)===0}function h(){var e=f.value[0];return e=="="?6:e=="-"?5:7-f.value.search(/[^#]/)}var r=e.getLine(n),i=r.length,o=e.getLength(),u=n,a=n;if(!r.match(this.foldingStartMarker))return;if(r[0]=="`"){if(e.bgTokenizer.getState(n)!=="start"){while(++n<o){r=e.getLine(n);if(r[0]=="`"&r.substring(0,3)=="```")break}return new s(u,i,n,0)}while(n-->0){r=e.getLine(n);if(r[0]=="`"&r.substring(0,3)=="```")break}return new s(n,r.length,u,0)}var f,c="markup.heading";if(l(n)){var p=h();while(++n<o){if(!l(n))continue;var d=h();if(d>=p)break}a=n-(!f||["=","-"].indexOf(f.value[0])==-1?1:2);if(a>u)while(a>u&&/^\s*$/.test(e.getLine(a)))a--;if(a>u){var v=e.getLine(a).length;return new s(u,i,a,v)}}}}.call(o.prototype)})
\ No newline at end of file
diff --git a/app/assets/lib/ace/mode-plain_text.js b/app/assets/lib/ace/mode-plain_text.js
new file mode 100644
index 000000000..f174d3e4c
--- /dev/null
+++ b/app/assets/lib/ace/mode-plain_text.js
@@ -0,0 +1 @@
+ace.define("ace/mode/plain_text",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/behaviour"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("./text_highlight_rules").TextHighlightRules,o=e("./behaviour").Behaviour,u=function(){this.HighlightRules=s,this.$behaviour=new o};r.inherits(u,i),function(){this.type="text",this.getNextLineIndent=function(e,t,n){return""},this.$id="ace/mode/plain_text"}.call(u.prototype),t.Mode=u})
\ No newline at end of file
diff --git a/app/assets/lib/ace/mode-python.js b/app/assets/lib/ace/mode-python.js
index 69c918f04..2bda278b8 100644
--- a/app/assets/lib/ace/mode-python.js
+++ b/app/assets/lib/ace/mode-python.js
@@ -1 +1 @@
-ace.define("ace/mode/python",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/python_highlight_rules","ace/mode/folding/pythonic","ace/range"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("./python_highlight_rules").PythonHighlightRules,o=e("./folding/pythonic").FoldMode,u=e("../range").Range,a=function(){this.HighlightRules=s,this.foldingRules=new o("\\:")};r.inherits(a,i),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[\:]\s*$/);o&&(r+=n)}return r};var e={pass:1,"return":1,raise:1,"break":1,"continue":1};this.checkOutdent=function(t,n,r){if(r!=="\r\n"&&r!=="\r"&&r!=="\n")return!1;var i=this.getTokenizer().getLineTokens(n.trim(),t).tokens;if(!i)return!1;do var s=i.pop();while(s&&(s.type=="comment"||s.type=="text"&&s.value.match(/^\s+$/)));return s?s.type=="keyword"&&e[s.value]:!1},this.autoOutdent=function(e,t,n){n+=1;var r=this.$getIndent(t.getLine(n)),i=t.getTabString();r.slice(-i.length)==i&&t.remove(new u(n,r.length-i.length,n,r.length))},this.$id="ace/mode/python"}.call(a.prototype),t.Mode=a}),ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="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",t="True|False|None|NotImplemented|Ellipsis|__debug__",n="abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|set|apply|delattr|help|next|setattr|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern",r=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":n,"constant.language":t,keyword:e},"identifier"),i="(?:r|u|ur|R|U|UR|Ur|uR)?",s="(?:(?:[1-9]\\d*)|(?:0))",o="(?:0[oO]?[0-7]+)",u="(?:0[xX][\\dA-Fa-f]+)",a="(?:0[bB][01]+)",f="(?:"+s+"|"+o+"|"+u+"|"+a+")",l="(?:[eE][+-]?\\d+)",c="(?:\\.\\d+)",h="(?:\\d+)",p="(?:(?:"+h+"?"+c+")|(?:"+h+"\\.))",d="(?:(?:"+p+"|"+h+")"+l+")",v="(?:"+d+"|"+p+")",m="\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})";this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:i+'"{3}',next:"qqstring3"},{token:"string",regex:i+'"(?=.)',next:"qqstring"},{token:"string",regex:i+"'{3}",next:"qstring3"},{token:"string",regex:i+"'(?=.)",next:"qstring"},{token:"constant.numeric",regex:"(?:"+v+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:v},{token:"constant.numeric",regex:f+"[lL]\\b"},{token:"constant.numeric",regex:f+"\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:"text",regex:"\\s+"}],qqstring3:[{token:"constant.language.escape",regex:m},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qstring3:[{token:"constant.language.escape",regex:m},{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:m},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:m},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}]}};r.inherits(s,i),t.PythonHighlightRules=s}),ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+e+")(?:\\s*)(?:#.*)?$")};r.inherits(s,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i=r.match(this.foldingStartMarker);if(i)return i[1]?this.openingBracketBlock(e,i[1],n,i.index):i[2]?this.indentationBlock(e,n,i.index+i[2].length):this.indentationBlock(e,n)}}.call(s.prototype)})
+ace.define("ace/mode/python",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/python_highlight_rules","ace/mode/folding/pythonic","ace/range"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("./python_highlight_rules").PythonHighlightRules,o=e("./folding/pythonic").FoldMode,u=e("../range").Range,a=function(){this.HighlightRules=s,this.foldingRules=new o("\\:")};r.inherits(a,i),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[\:]\s*$/);o&&(r+=n)}return r};var e={pass:1,"return":1,raise:1,"break":1,"continue":1};this.checkOutdent=function(t,n,r){if(r!=="\r\n"&&r!=="\r"&&r!=="\n")return!1;var i=this.getTokenizer().getLineTokens(n.trim(),t).tokens;if(!i)return!1;do var s=i.pop();while(s&&(s.type=="comment"||s.type=="text"&&s.value.match(/^\s+$/)));return s?s.type=="keyword"&&e[s.value]:!1},this.autoOutdent=function(e,t,n){n+=1;var r=this.$getIndent(t.getLine(n)),i=t.getTabString();r.slice(-i.length)==i&&t.remove(new u(n,r.length-i.length,n,r.length))},this.$id="ace/mode/python"}.call(a.prototype),t.Mode=a}),ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="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",t="True|False|None|NotImplemented|Ellipsis|__debug__",n="abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|set|apply|delattr|help|next|setattr|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern",r=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":n,"constant.language":t,keyword:e},"identifier"),i="(?:r|u|ur|R|U|UR|Ur|uR)?",s="(?:(?:[1-9]\\d*)|(?:0))",o="(?:0[oO]?[0-7]+)",u="(?:0[xX][\\dA-Fa-f]+)",a="(?:0[bB][01]+)",f="(?:"+s+"|"+o+"|"+u+"|"+a+")",l="(?:[eE][+-]?\\d+)",c="(?:\\.\\d+)",h="(?:\\d+)",p="(?:(?:"+h+"?"+c+")|(?:"+h+"\\.))",d="(?:(?:"+p+"|"+h+")"+l+")",v="(?:"+d+"|"+p+")",m="\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})";this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:i+'"{3}',next:"qqstring3"},{token:"string",regex:i+'"(?=.)',next:"qqstring"},{token:"string",regex:i+"'{3}",next:"qstring3"},{token:"string",regex:i+"'(?=.)",next:"qstring"},{token:"constant.numeric",regex:"(?:"+v+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:v},{token:"constant.numeric",regex:f+"[lL]\\b"},{token:"constant.numeric",regex:f+"\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:"text",regex:"\\s+"}],qqstring3:[{token:"constant.language.escape",regex:m},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qstring3:[{token:"constant.language.escape",regex:m},{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:m},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:m},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}]}};r.inherits(s,i),t.PythonHighlightRules=s}),ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+e+")(?:\\s*)(?:#.*)?$")};r.inherits(s,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i=r.match(this.foldingStartMarker);if(i)return i[1]?this.openingBracketBlock(e,i[1],n,i.index):i[2]?this.indentationBlock(e,n,i.index+i[2].length):this.indentationBlock(e,n)}}.call(s.prototype)})
\ No newline at end of file
diff --git a/app/assets/lib/ace/mode-ruby.js b/app/assets/lib/ace/mode-ruby.js
new file mode 100644
index 000000000..7e3be195a
--- /dev/null
+++ b/app/assets/lib/ace/mode-ruby.js
@@ -0,0 +1 @@
+ace.define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/folding/coffee"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("./ruby_highlight_rules").RubyHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("../range").Range,a=e("./folding/coffee").FoldMode,f=function(){this.HighlightRules=s,this.$outdent=new o,this.foldingRules=new a};r.inherits(f,i),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[]\s*$/),u=t.match(/^\s*(class|def|module)\s.*$/),a=t.match(/.*do(\s*|\s+\|.*\|\s*)$/),f=t.match(/^\s*(if|else)\s*/);if(o||u||a||f)r+=n}return r},this.checkOutdent=function(e,t,n){return/^\s+end$/.test(t+n)||/^\s+}$/.test(t+n)||/^\s+else$/.test(t+n)},this.autoOutdent=function(e,t,n){var r=this.$getIndent(t.getLine(n)),i=t.getTabString();r.slice(-i.length)==i&&t.remove(new u(n,r.length-i.length,n,r.length))},this.$id="ace/mode/ruby"}.call(f.prototype),t.Mode=f}),ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=t.constantOtherSymbol={token:"constant.other.symbol.ruby",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"},o=t.qString={token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},u=t.qqString={token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},a=t.tString={token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"},f=t.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},l=t.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?\\b"},c=function(){var e="abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|validates_inclusion_of|validates_numericality_of|validates_with|validates_each|authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|cache|expire_fragment|expire_cache_for|observe|cache_sweeper|has_many|has_one|belongs_to|has_and_belongs_to_many",t="alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield",n="true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING",r="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",i=this.$keywords=this.createKeywordMapper({keyword:t,"constant.language":n,"variable.language":r,"support.function":e,"invalid.deprecated":"debugger"},"identifier");this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"comment",regex:"^=begin(?:$|\\s.*$)",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},o,u,a,{token:"text",regex:"::"},{token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},{token:"support.class",regex:"[A-Z][a-zA-Z_\\d]+"},s,f,l,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:i,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(e,t,n){var r=e[2]=="-"?"indentedHeredoc":"heredoc",i=e.split(this.splitRegex);return n.push(r,i[3]),[{type:"constant",value:i[1]},{type:"string",value:i[2]},{type:"support.class",value:i[3]},{type:"string",value:i[4]}]},regex:"(<<-?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(e,t){return t[0]==="heredoc"||t[0]==="indentedHeredoc"?t[0]:e}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:"^=end(?:$|\\s.*$)",next:"start"},{token:"comment",regex:".+"}]},this.normalizeRules()};r.inherits(c,i),t.RubyHighlightRules=c}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;var i=/\S/,o=e.getLine(n),u=o.search(i);if(u==-1||o[u]!="#")return;var a=o.length,f=e.getLength(),l=n,c=n;while(++n<f){o=e.getLine(n);var h=o.search(i);if(h==-1)continue;if(o[h]!="#")break;c=n}if(c>l){var p=e.getLine(c).length;return new s(l,a,c,p)}},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u<a?"start":"","";if(u==-1){if(i==a&&r[i]=="#"&&s[i]=="#")return e.foldWidgets[n-1]="",e.foldWidgets[n+1]="","start"}else if(u==i&&r[i]=="#"&&o[i]=="#"&&e.getLine(n-2).search(/\S/)==-1)return e.foldWidgets[n-1]="start",e.foldWidgets[n+1]="","";return u!=-1&&u<i?e.foldWidgets[n-1]="start":e.foldWidgets[n-1]="",i<a?"start":""}}.call(o.prototype)})
\ No newline at end of file
diff --git a/app/assets/lib/ace/snippets/clojure.js b/app/assets/lib/ace/snippets/clojure.js
new file mode 100644
index 000000000..af347e250
--- /dev/null
+++ b/app/assets/lib/ace/snippets/clojure.js
@@ -0,0 +1 @@
+ace.define("ace/snippets/clojure",["require","exports","module"],function(e,t,n){t.snippetText='snippet comm\n	(comment\n	  ${1}\n	  )\nsnippet condp\n	(condp ${1:pred} ${2:expr}\n	  ${3})\nsnippet def\n	(def ${1})\nsnippet defm\n	(defmethod ${1:multifn} "${2:doc-string}" ${3:dispatch-val} [${4:args}]\n	  ${5})\nsnippet defmm\n	(defmulti ${1:name} "${2:doc-string}" ${3:dispatch-fn})\nsnippet defma\n	(defmacro ${1:name} "${2:doc-string}" ${3:dispatch-fn})\nsnippet defn\n	(defn ${1:name} "${2:doc-string}" [${3:arg-list}]\n	  ${4})\nsnippet defp\n	(defprotocol ${1:name}\n	  ${2})\nsnippet defr\n	(defrecord ${1:name} [${2:fields}]\n	  ${3:protocol}\n	  ${4})\nsnippet deft\n	(deftest ${1:name}\n	    (is (= ${2:assertion})))\n	  ${3})\nsnippet is\n	(is (= ${1} ${2}))\nsnippet defty\n	(deftype ${1:Name} [${2:fields}]\n	  ${3:Protocol}\n	  ${4})\nsnippet doseq\n	(doseq [${1:elem} ${2:coll}]\n	  ${3})\nsnippet fn\n	(fn [${1:arg-list}] ${2})\nsnippet if\n	(if ${1:test-expr}\n	  ${2:then-expr}\n	  ${3:else-expr})\nsnippet if-let \n	(if-let [${1:result} ${2:test-expr}]\n		(${3:then-expr} $1)\n		(${4:else-expr}))\nsnippet imp\n	(:import [${1:package}])\n	& {:keys [${1:keys}] :or {${2:defaults}}}\nsnippet let\n	(let [${1:name} ${2:expr}]\n		${3})\nsnippet letfn\n	(letfn [(${1:name) [${2:args}]\n	          ${3})])\nsnippet map\n	(map ${1:func} ${2:coll})\nsnippet mapl\n	(map #(${1:lambda}) ${2:coll})\nsnippet met\n	(${1:name} [${2:this} ${3:args}]\n	  ${4})\nsnippet ns\n	(ns ${1:name}\n	  ${2})\nsnippet dotimes\n	(dotimes [_ 10]\n	  (time\n	    (dotimes [_ ${1:times}]\n	      ${2})))\nsnippet pmethod\n	(${1:name} [${2:this} ${3:args}])\nsnippet refer\n	(:refer-clojure :exclude [${1}])\nsnippet require\n	(:require [${1:namespace} :as [${2}]])\nsnippet use\n	(:use [${1:namespace} :only [${2}]])\nsnippet print\n	(println ${1})\nsnippet reduce\n	(reduce ${1:(fn [p n] ${3})} ${2})\nsnippet when\n	(when ${1:test} ${2:body})\nsnippet when-let\n	(when-let [${1:result} ${2:test}]\n		${3:body})\n',t.scope="clojure"})
\ No newline at end of file
diff --git a/app/assets/lib/ace/snippets/lua.js b/app/assets/lib/ace/snippets/lua.js
new file mode 100644
index 000000000..0328db963
--- /dev/null
+++ b/app/assets/lib/ace/snippets/lua.js
@@ -0,0 +1 @@
+ace.define("ace/snippets/lua",["require","exports","module"],function(e,t,n){t.snippetText="snippet #!\n	#!/usr/bin/env lua\n	$1\nsnippet local\n	local ${1:x} = ${2:1}\nsnippet fun\n	function ${1:fname}(${2:...})\n		${3:-- body}\n	end\nsnippet for\n	for ${1:i}=${2:1},${3:10} do\n		${4:print(i)}\n	end\nsnippet forp\n	for ${1:i},${2:v} in pairs(${3:table_name}) do\n	   ${4:-- body}\n	end\nsnippet fori\n	for ${1:i},${2:v} in ipairs(${3:table_name}) do\n	   ${4:-- body}\n	end\n",t.scope="lua"})
\ No newline at end of file
diff --git a/app/assets/lib/ace/snippets/luapage.js b/app/assets/lib/ace/snippets/luapage.js
new file mode 100644
index 000000000..1681d3457
--- /dev/null
+++ b/app/assets/lib/ace/snippets/luapage.js
@@ -0,0 +1 @@
+ace.define("ace/snippets/luapage",["require","exports","module"],function(e,t,n){t.snippetText="",t.scope="luapage"})
\ No newline at end of file
diff --git a/app/assets/lib/ace/snippets/plain_text.js b/app/assets/lib/ace/snippets/plain_text.js
new file mode 100644
index 000000000..bbabfdaca
--- /dev/null
+++ b/app/assets/lib/ace/snippets/plain_text.js
@@ -0,0 +1 @@
+ace.define("ace/snippets/plain_text",["require","exports","module"],function(e,t,n){t.snippetText="",t.scope="plain_text"})
\ No newline at end of file
diff --git a/app/assets/lib/ace/snippets/python.js b/app/assets/lib/ace/snippets/python.js
new file mode 100644
index 000000000..ecca4b2c6
--- /dev/null
+++ b/app/assets/lib/ace/snippets/python.js
@@ -0,0 +1 @@
+ace.define("ace/snippets/python",["require","exports","module"],function(e,t,n){t.snippetText='snippet #!\n	#!/usr/bin/env python\nsnippet imp\n	import ${1:module}\nsnippet from\n	from ${1:package} import ${2:module}\n# Module Docstring\nsnippet docs\n	\'\'\'\n	File: ${1:FILENAME:file_name}\n	Author: ${2:author}\n	Description: ${3}\n	\'\'\'\nsnippet wh\n	while ${1:condition}:\n		${2:# TODO: write code...}\n# dowh - does the same as do...while in other languages\nsnippet dowh\n	while True:\n		${1:# TODO: write code...}\n		if ${2:condition}:\n			break\nsnippet with\n	with ${1:expr} as ${2:var}:\n		${3:# TODO: write code...}\n# New Class\nsnippet cl\n	class ${1:ClassName}(${2:object}):\n		"""${3:docstring for $1}"""\n		def __init__(self, ${4:arg}):\n			${5:super($1, self).__init__()}\n			self.$4 = $4\n			${6}\n# New Function\nsnippet def\n	def ${1:fname}(${2:`indent(\'.\') ? \'self\' : \'\'`}):\n		"""${3:docstring for $1}"""\n		${4:# TODO: write code...}\nsnippet deff\n	def ${1:fname}(${2:`indent(\'.\') ? \'self\' : \'\'`}):\n		${3:# TODO: write code...}\n# New Method\nsnippet defs\n	def ${1:mname}(self, ${2:arg}):\n		${3:# TODO: write code...}\n# New Property\nsnippet property\n	def ${1:foo}():\n		doc = "${2:The $1 property.}"\n		def fget(self):\n			${3:return self._$1}\n		def fset(self, value):\n			${4:self._$1 = value}\n# Ifs\nsnippet if\n	if ${1:condition}:\n		${2:# TODO: write code...}\nsnippet el\n	else:\n		${1:# TODO: write code...}\nsnippet ei\n	elif ${1:condition}:\n		${2:# TODO: write code...}\n# For\nsnippet for\n	for ${1:item} in ${2:items}:\n		${3:# TODO: write code...}\n# Encodes\nsnippet cutf8\n	# -*- coding: utf-8 -*-\nsnippet clatin1\n	# -*- coding: latin-1 -*-\nsnippet cascii\n	# -*- coding: ascii -*-\n# Lambda\nsnippet ld\n	${1:var} = lambda ${2:vars} : ${3:action}\nsnippet .\n	self.\nsnippet try Try/Except\n	try:\n		${1:# TODO: write code...}\n	except ${2:Exception}, ${3:e}:\n		${4:raise $3}\nsnippet try Try/Except/Else\n	try:\n		${1:# TODO: write code...}\n	except ${2:Exception}, ${3:e}:\n		${4:raise $3}\n	else:\n		${5:# TODO: write code...}\nsnippet try Try/Except/Finally\n	try:\n		${1:# TODO: write code...}\n	except ${2:Exception}, ${3:e}:\n		${4:raise $3}\n	finally:\n		${5:# TODO: write code...}\nsnippet try Try/Except/Else/Finally\n	try:\n		${1:# TODO: write code...}\n	except ${2:Exception}, ${3:e}:\n		${4:raise $3}\n	else:\n		${5:# TODO: write code...}\n	finally:\n		${6:# TODO: write code...}\n# if __name__ == \'__main__\':\nsnippet ifmain\n	if __name__ == \'__main__\':\n		${1:main()}\n# __magic__\nsnippet _\n	__${1:init}__${2}\n# python debugger (pdb)\nsnippet pdb\n	import pdb; pdb.set_trace()\n# ipython debugger (ipdb)\nsnippet ipdb\n	import ipdb; ipdb.set_trace()\n# ipython debugger (pdbbb)\nsnippet pdbbb\n	import pdbpp; pdbpp.set_trace()\nsnippet pprint\n	import pprint; pprint.pprint(${1})${2}\nsnippet "\n	"""\n	${1:doc}\n	"""\n# test function/method\nsnippet test\n	def test_${1:description}(${2:self}):\n		${3:# TODO: write code...}\n# test case\nsnippet testcase\n	class ${1:ExampleCase}(unittest.TestCase):\n		\n		def test_${2:description}(self):\n			${3:# TODO: write code...}\nsnippet fut\n	from __future__ import ${1}\n#getopt\nsnippet getopt\n	try:\n		# Short option syntax: "hv:"\n		# Long option syntax: "help" or "verbose="\n		opts, args = getopt.getopt(sys.argv[1:], "${1:short_options}", [${2:long_options}])\n	\n	except getopt.GetoptError, err:\n		# Print debug info\n		print str(err)\n		${3:error_action}\n\n	for option, argument in opts:\n		if option in ("-h", "--help"):\n			${4}\n		elif option in ("-v", "--verbose"):\n			verbose = argument\n',t.scope="python"})
\ No newline at end of file
diff --git a/app/assets/lib/ace/snippets/ruby.js b/app/assets/lib/ace/snippets/ruby.js
new file mode 100644
index 000000000..961a554d8
--- /dev/null
+++ b/app/assets/lib/ace/snippets/ruby.js
@@ -0,0 +1 @@
+ace.define("ace/snippets/ruby",["require","exports","module"],function(e,t,n){t.snippetText='########################################\n# Ruby snippets - for Rails, see below #\n########################################\n\n# encoding for Ruby 1.9\nsnippet enc\n	# encoding: utf-8\n\n# #!/usr/bin/env ruby\nsnippet #!\n	#!/usr/bin/env ruby\n	# encoding: utf-8\n\n# New Block\nsnippet =b\n	=begin rdoc\n		${1}\n	=end\nsnippet y\n	:yields: ${1:arguments}\nsnippet rb\n	#!/usr/bin/env ruby -wKU\nsnippet beg\n	begin\n		${3}\n	rescue ${1:Exception} => ${2:e}\n	end\n\nsnippet req require\n	require "${1}"${2}\nsnippet #\n	# =>\nsnippet end\n	__END__\nsnippet case\n	case ${1:object}\n	when ${2:condition}\n		${3}\n	end\nsnippet when\n	when ${1:condition}\n		${2}\nsnippet def\n	def ${1:method_name}\n		${2}\n	end\nsnippet deft\n	def test_${1:case_name}\n		${2}\n	end\nsnippet if\n	if ${1:condition}\n		${2}\n	end\nsnippet ife\n	if ${1:condition}\n		${2}\n	else\n		${3}\n	end\nsnippet elsif\n	elsif ${1:condition}\n		${2}\nsnippet unless\n	unless ${1:condition}\n		${2}\n	end\nsnippet while\n	while ${1:condition}\n		${2}\n	end\nsnippet for\n	for ${1:e} in ${2:c}\n		${3}\n	end\nsnippet until\n	until ${1:condition}\n		${2}\n	end\nsnippet cla class .. end\n	class ${1:`substitute(Filename(), \'\\(_\\|^\\)\\(.\\)\', \'\\u\\2\', \'g\')`}\n		${2}\n	end\nsnippet cla class .. initialize .. end\n	class ${1:`substitute(Filename(), \'\\(_\\|^\\)\\(.\\)\', \'\\u\\2\', \'g\')`}\n		def initialize(${2:args})\n			${3}\n		end\n	end\nsnippet cla class .. < ParentClass .. initialize .. end\n	class ${1:`substitute(Filename(), \'\\(_\\|^\\)\\(.\\)\', \'\\u\\2\', \'g\')`} < ${2:ParentClass}\n		def initialize(${3:args})\n			${4}\n		end\n	end\nsnippet cla ClassName = Struct .. do .. end\n	${1:`substitute(Filename(), \'\\(_\\|^\\)\\(.\\)\', \'\\u\\2\', \'g\')`} = Struct.new(:${2:attr_names}) do\n		def ${3:method_name}\n			${4}\n		end\n	end\nsnippet cla class BlankSlate .. initialize .. end\n	class ${1:BlankSlate}\n		instance_methods.each { |meth| undef_method(meth) unless meth =~ /\\A__/ }\n	end\nsnippet cla class << self .. end\n	class << ${1:self}\n		${2}\n	end\n# class .. < DelegateClass .. initialize .. end\nsnippet cla-\n	class ${1:`substitute(Filename(), \'\\(_\\|^\\)\\(.\\)\', \'\\u\\2\', \'g\')`} < DelegateClass(${2:ParentClass})\n		def initialize(${3:args})\n			super(${4:del_obj})\n\n			${5}\n		end\n	end\nsnippet mod module .. end\n	module ${1:`substitute(Filename(), \'\\(_\\|^\\)\\(.\\)\', \'\\u\\2\', \'g\')`}\n		${2}\n	end\nsnippet mod module .. module_function .. end\n	module ${1:`substitute(Filename(), \'\\(_\\|^\\)\\(.\\)\', \'\\u\\2\', \'g\')`}\n		module_function\n\n		${2}\n	end\nsnippet mod module .. ClassMethods .. end\n	module ${1:`substitute(Filename(), \'\\(_\\|^\\)\\(.\\)\', \'\\u\\2\', \'g\')`}\n		module ClassMethods\n			${2}\n		end\n\n		module InstanceMethods\n\n		end\n\n		def self.included(receiver)\n			receiver.extend         ClassMethods\n			receiver.send :include, InstanceMethods\n		end\n	end\n# attr_reader\nsnippet r\n	attr_reader :${1:attr_names}\n# attr_writer\nsnippet w\n	attr_writer :${1:attr_names}\n# attr_accessor\nsnippet rw\n	attr_accessor :${1:attr_names}\nsnippet atp\n	attr_protected :${1:attr_names}\nsnippet ata\n	attr_accessible :${1:attr_names}\n# include Enumerable\nsnippet Enum\n	include Enumerable\n\n	def each(&block)\n		${1}\n	end\n# include Comparable\nsnippet Comp\n	include Comparable\n\n	def <=>(other)\n		${1}\n	end\n# extend Forwardable\nsnippet Forw-\n	extend Forwardable\n# def self\nsnippet defs\n	def self.${1:class_method_name}\n		${2}\n	end\n# def method_missing\nsnippet defmm\n	def method_missing(meth, *args, &blk)\n		${1}\n	end\nsnippet defd\n	def_delegator :${1:@del_obj}, :${2:del_meth}, :${3:new_name}\nsnippet defds\n	def_delegators :${1:@del_obj}, :${2:del_methods}\nsnippet am\n	alias_method :${1:new_name}, :${2:old_name}\nsnippet app\n	if __FILE__ == $PROGRAM_NAME\n		${1}\n	end\n# usage_if()\nsnippet usai\n	if ARGV.${1}\n		abort "Usage: #{$PROGRAM_NAME} ${2:ARGS_GO_HERE}"${3}\n	end\n# usage_unless()\nsnippet usau\n	unless ARGV.${1}\n		abort "Usage: #{$PROGRAM_NAME} ${2:ARGS_GO_HERE}"${3}\n	end\nsnippet array\n	Array.new(${1:10}) { |${2:i}| ${3} }\nsnippet hash\n	Hash.new { |${1:hash}, ${2:key}| $1[$2] = ${3} }\nsnippet file File.foreach() { |line| .. }\n	File.foreach(${1:"path/to/file"}) { |${2:line}| ${3} }\nsnippet file File.read()\n	File.read(${1:"path/to/file"})${2}\nsnippet Dir Dir.global() { |file| .. }\n	Dir.glob(${1:"dir/glob/*"}) { |${2:file}| ${3} }\nsnippet Dir Dir[".."]\n	Dir[${1:"glob/**/*.rb"}]${2}\nsnippet dir\n	Filename.dirname(__FILE__)\nsnippet deli\n	delete_if { |${1:e}| ${2} }\nsnippet fil\n	fill(${1:range}) { |${2:i}| ${3} }\n# flatten_once()\nsnippet flao\n	inject(Array.new) { |${1:arr}, ${2:a}| $1.push(*$2)}${3}\nsnippet zip\n	zip(${1:enums}) { |${2:row}| ${3} }\n# downto(0) { |n| .. }\nsnippet dow\n	downto(${1:0}) { |${2:n}| ${3} }\nsnippet ste\n	step(${1:2}) { |${2:n}| ${3} }\nsnippet tim\n	times { |${1:n}| ${2} }\nsnippet upt\n	upto(${1:1.0/0.0}) { |${2:n}| ${3} }\nsnippet loo\n	loop { ${1} }\nsnippet ea\n	each { |${1:e}| ${2} }\nsnippet ead\n	each do |${1:e}|\n		${2}\n	end\nsnippet eab\n	each_byte { |${1:byte}| ${2} }\nsnippet eac- each_char { |chr| .. }\n	each_char { |${1:chr}| ${2} }\nsnippet eac- each_cons(..) { |group| .. }\n	each_cons(${1:2}) { |${2:group}| ${3} }\nsnippet eai\n	each_index { |${1:i}| ${2} }\nsnippet eaid\n	each_index do |${1:i}|\n		${2}\n	end\nsnippet eak\n	each_key { |${1:key}| ${2} }\nsnippet eakd\n	each_key do |${1:key}|\n		${2}\n	end\nsnippet eal\n	each_line { |${1:line}| ${2} }\nsnippet eald\n	each_line do |${1:line}|\n		${2}\n	end\nsnippet eap\n	each_pair { |${1:name}, ${2:val}| ${3} }\nsnippet eapd\n	each_pair do |${1:name}, ${2:val}|\n		${3}\n	end\nsnippet eas-\n	each_slice(${1:2}) { |${2:group}| ${3} }\nsnippet easd-\n	each_slice(${1:2}) do |${2:group}|\n		${3}\n	end\nsnippet eav\n	each_value { |${1:val}| ${2} }\nsnippet eavd\n	each_value do |${1:val}|\n		${2}\n	end\nsnippet eawi\n	each_with_index { |${1:e}, ${2:i}| ${3} }\nsnippet eawid\n	each_with_index do |${1:e},${2:i}|\n		${3}\n	end\nsnippet reve\n	reverse_each { |${1:e}| ${2} }\nsnippet reved\n	reverse_each do |${1:e}|\n		${2}\n	end\nsnippet inj\n	inject(${1:init}) { |${2:mem}, ${3:var}| ${4} }\nsnippet injd\n	inject(${1:init}) do |${2:mem}, ${3:var}|\n		${4}\n	end\nsnippet map\n	map { |${1:e}| ${2} }\nsnippet mapd\n	map do |${1:e}|\n		${2}\n	end\nsnippet mapwi-\n	enum_with_index.map { |${1:e}, ${2:i}| ${3} }\nsnippet sor\n	sort { |a, b| ${1} }\nsnippet sorb\n	sort_by { |${1:e}| ${2} }\nsnippet ran\n	sort_by { rand }\nsnippet all\n	all? { |${1:e}| ${2} }\nsnippet any\n	any? { |${1:e}| ${2} }\nsnippet cl\n	classify { |${1:e}| ${2} }\nsnippet col\n	collect { |${1:e}| ${2} }\nsnippet cold\n	collect do |${1:e}|\n		${2}\n	end\nsnippet det\n	detect { |${1:e}| ${2} }\nsnippet detd\n	detect do |${1:e}|\n		${2}\n	end\nsnippet fet\n	fetch(${1:name}) { |${2:key}| ${3} }\nsnippet fin\n	find { |${1:e}| ${2} }\nsnippet find\n	find do |${1:e}|\n		${2}\n	end\nsnippet fina\n	find_all { |${1:e}| ${2} }\nsnippet finad\n	find_all do |${1:e}|\n		${2}\n	end\nsnippet gre\n	grep(${1:/pattern/}) { |${2:match}| ${3} }\nsnippet sub\n	${1:g}sub(${2:/pattern/}) { |${3:match}| ${4} }\nsnippet sca\n	scan(${1:/pattern/}) { |${2:match}| ${3} }\nsnippet scad\n	scan(${1:/pattern/}) do |${2:match}|\n		${3}\n	end\nsnippet max\n	max { |a, b| ${1} }\nsnippet min\n	min { |a, b| ${1} }\nsnippet par\n	partition { |${1:e}| ${2} }\nsnippet pard\n	partition do |${1:e}|\n		${2}\n	end\nsnippet rej\n	reject { |${1:e}| ${2} }\nsnippet rejd\n	reject do |${1:e}|\n		${2}\n	end\nsnippet sel\n	select { |${1:e}| ${2} }\nsnippet seld\n	select do |${1:e}|\n		${2}\n	end\nsnippet lam\n	lambda { |${1:args}| ${2} }\nsnippet doo\n	do\n		${1}\n	end\nsnippet dov\n	do |${1:variable}|\n		${2}\n	end\nsnippet :\n	:${1:key} => ${2:"value"}${3}\nsnippet ope\n	open(${1:"path/or/url/or/pipe"}, "${2:w}") { |${3:io}| ${4} }\n# path_from_here()\nsnippet fpath\n	File.join(File.dirname(__FILE__), *%2[${1:rel path here}])${2}\n# unix_filter {}\nsnippet unif\n	ARGF.each_line${1} do |${2:line}|\n		${3}\n	end\n# option_parse {}\nsnippet optp\n	require "optparse"\n\n	options = {${1:default => "args"}}\n\n	ARGV.options do |opts|\n		opts.banner = "Usage: #{File.basename($PROGRAM_NAME)}\nsnippet opt\n	opts.on( "-${1:o}", "--${2:long-option-name}", ${3:String},\n	         "${4:Option description.}") do |${5:opt}|\n		${6}\n	end\nsnippet tc\n	require "test/unit"\n\n	require "${1:library_file_name}"\n\n	class Test${2:$1} < Test::Unit::TestCase\n		def test_${3:case_name}\n			${4}\n		end\n	end\nsnippet ts\n	require "test/unit"\n\n	require "tc_${1:test_case_file}"\n	require "tc_${2:test_case_file}"${3}\nsnippet as\n	assert ${1:test}, "${2:Failure message.}"${3}\nsnippet ase\n	assert_equal ${1:expected}, ${2:actual}${3}\nsnippet asne\n	assert_not_equal ${1:unexpected}, ${2:actual}${3}\nsnippet asid\n	assert_in_delta ${1:expected_float}, ${2:actual_float}, ${3:2 ** -20}${4}\nsnippet asio\n	assert_instance_of ${1:ExpectedClass}, ${2:actual_instance}${3}\nsnippet asko\n	assert_kind_of ${1:ExpectedKind}, ${2:actual_instance}${3}\nsnippet asn\n	assert_nil ${1:instance}${2}\nsnippet asnn\n	assert_not_nil ${1:instance}${2}\nsnippet asm\n	assert_match /${1:expected_pattern}/, ${2:actual_string}${3}\nsnippet asnm\n	assert_no_match /${1:unexpected_pattern}/, ${2:actual_string}${3}\nsnippet aso\n	assert_operator ${1:left}, :${2:operator}, ${3:right}${4}\nsnippet asr\n	assert_raise ${1:Exception} { ${2} }\nsnippet asrd\n	assert_raise ${1:Exception} do\n		${2}\n	end\nsnippet asnr\n	assert_nothing_raised ${1:Exception} { ${2} }\nsnippet asnrd\n	assert_nothing_raised ${1:Exception} do\n		${2}\n	end\nsnippet asrt\n	assert_respond_to ${1:object}, :${2:method}${3}\nsnippet ass assert_same(..)\n	assert_same ${1:expected}, ${2:actual}${3}\nsnippet ass assert_send(..)\n	assert_send [${1:object}, :${2:message}, ${3:args}]${4}\nsnippet asns\n	assert_not_same ${1:unexpected}, ${2:actual}${3}\nsnippet ast\n	assert_throws :${1:expected} { ${2} }\nsnippet astd\n	assert_throws :${1:expected} do\n		${2}\n	end\nsnippet asnt\n	assert_nothing_thrown { ${1} }\nsnippet asntd\n	assert_nothing_thrown do\n		${1}\n	end\nsnippet fl\n	flunk "${1:Failure message.}"${2}\n# Benchmark.bmbm do .. end\nsnippet bm-\n	TESTS = ${1:10_000}\n	Benchmark.bmbm do |results|\n		${2}\n	end\nsnippet rep\n	results.report("${1:name}:") { TESTS.times { ${2} }}\n# Marshal.dump(.., file)\nsnippet Md\n	File.open(${1:"path/to/file.dump"}, "wb") { |${2:file}| Marshal.dump(${3:obj}, $2) }${4}\n# Mashal.load(obj)\nsnippet Ml\n	File.open(${1:"path/to/file.dump"}, "rb") { |${2:file}| Marshal.load($2) }${3}\n# deep_copy(..)\nsnippet deec\n	Marshal.load(Marshal.dump(${1:obj_to_copy}))${2}\nsnippet Pn-\n	PStore.new(${1:"file_name.pstore"})${2}\nsnippet tra\n	transaction(${1:true}) { ${2} }\n# xmlread(..)\nsnippet xml-\n	REXML::Document.new(File.read(${1:"path/to/file"}))${2}\n# xpath(..) { .. }\nsnippet xpa\n	elements.each(${1:"//Xpath"}) do |${2:node}|\n		${3}\n	end\n# class_from_name()\nsnippet clafn\n	split("::").inject(Object) { |par, const| par.const_get(const) }\n# singleton_class()\nsnippet sinc\n	class << self; self end\nsnippet nam\n	namespace :${1:`Filename()`} do\n		${2}\n	end\nsnippet tas\n	desc "${1:Task description}"\n	task :${2:task_name => [:dependent, :tasks]} do\n		${3}\n	end\n# block\nsnippet b\n	{ |${1:var}| ${2} }\nsnippet begin\n	begin\n		raise \'A test exception.\'\n	rescue Exception => e\n		puts e.message\n		puts e.backtrace.inspect\n	else\n		# other exception\n	ensure\n		# always executed\n	end\n\n#debugging\nsnippet debug\n	require \'ruby-debug\'; debugger; true;\nsnippet pry\n	require \'pry\'; binding.pry\n\n#############################################\n# Rails snippets - for pure Ruby, see above #\n#############################################\nsnippet art\n	assert_redirected_to ${1::action => "${2:index}"}\nsnippet artnp\n	assert_redirected_to ${1:parent}_${2:child}_path(${3:@$1}, ${4:@$2})\nsnippet artnpp\n	assert_redirected_to ${1:parent}_${2:child}_path(${3:@$1})\nsnippet artp\n	assert_redirected_to ${1:model}_path(${2:@$1})\nsnippet artpp\n	assert_redirected_to ${1:model}s_path\nsnippet asd\n	assert_difference "${1:Model}.${2:count}", $1 do\n		${3}\n	end\nsnippet asnd\n	assert_no_difference "${1:Model}.${2:count}" do\n		${3}\n	end\nsnippet asre\n	assert_response :${1:success}, @response.body${2}\nsnippet asrj\n	assert_rjs :${1:replace}, "${2:dom id}"\nsnippet ass assert_select(..)\n	assert_select \'${1:path}\', :${2:text} => \'${3:inner_html\' ${4:do}\nsnippet bf\n	before_filter :${1:method}\nsnippet bt\n	belongs_to :${1:association}\nsnippet crw\n	cattr_accessor :${1:attr_names}\nsnippet defcreate\n	def create\n		@${1:model_class_name} = ${2:ModelClassName}.new(params[:$1])\n\n		respond_to do |wants|\n			if @$1.save\n				flash[:notice] = \'$2 was successfully created.\'\n				wants.html { redirect_to(@$1) }\n				wants.xml  { render :xml => @$1, :status => :created, :location => @$1 }\n			else\n				wants.html { render :action => "new" }\n				wants.xml  { render :xml => @$1.errors, :status => :unprocessable_entity }\n			end\n		end\n	end${3}\nsnippet defdestroy\n	def destroy\n		@${1:model_class_name} = ${2:ModelClassName}.find(params[:id])\n		@$1.destroy\n\n		respond_to do |wants|\n			wants.html { redirect_to($1s_url) }\n			wants.xml  { head :ok }\n		end\n	end${3}\nsnippet defedit\n	def edit\n		@${1:model_class_name} = ${2:ModelClassName}.find(params[:id])\n	end\nsnippet defindex\n	def index\n		@${1:model_class_name} = ${2:ModelClassName}.all\n\n		respond_to do |wants|\n			wants.html # index.html.erb\n			wants.xml  { render :xml => @$1s }\n		end\n	end${3}\nsnippet defnew\n	def new\n		@${1:model_class_name} = ${2:ModelClassName}.new\n\n		respond_to do |wants|\n			wants.html # new.html.erb\n			wants.xml  { render :xml => @$1 }\n		end\n	end${3}\nsnippet defshow\n	def show\n		@${1:model_class_name} = ${2:ModelClassName}.find(params[:id])\n\n		respond_to do |wants|\n			wants.html # show.html.erb\n			wants.xml  { render :xml => @$1 }\n		end\n	end${3}\nsnippet defupdate\n	def update\n		@${1:model_class_name} = ${2:ModelClassName}.find(params[:id])\n\n		respond_to do |wants|\n			if @$1.update_attributes(params[:$1])\n				flash[:notice] = \'$2 was successfully updated.\'\n				wants.html { redirect_to(@$1) }\n				wants.xml  { head :ok }\n			else\n				wants.html { render :action => "edit" }\n				wants.xml  { render :xml => @$1.errors, :status => :unprocessable_entity }\n			end\n		end\n	end${3}\nsnippet flash\n	flash[:${1:notice}] = "${2}"\nsnippet habtm\n	has_and_belongs_to_many :${1:object}, :join_table => "${2:table_name}", :foreign_key => "${3}_id"${4}\nsnippet hm\n	has_many :${1:object}\nsnippet hmd\n	has_many :${1:other}s, :class_name => "${2:$1}", :foreign_key => "${3:$1}_id", :dependent => :destroy${4}\nsnippet hmt\n	has_many :${1:object}, :through => :${2:object}\nsnippet ho\n	has_one :${1:object}\nsnippet i18\n	I18n.t(\'${1:type.key}\')${2}\nsnippet ist\n	<%= image_submit_tag("${1:agree.png}", :id => "${2:id}"${3} %>\nsnippet log\n	Rails.logger.${1:debug} ${2}\nsnippet log2\n	RAILS_DEFAULT_LOGGER.${1:debug} ${2}\nsnippet logd\n	logger.debug { "${1:message}" }${2}\nsnippet loge\n	logger.error { "${1:message}" }${2}\nsnippet logf\n	logger.fatal { "${1:message}" }${2}\nsnippet logi\n	logger.info { "${1:message}" }${2}\nsnippet logw\n	logger.warn { "${1:message}" }${2}\nsnippet mapc\n	${1:map}.${2:connect} \'${3:controller/:action/:id}\'\nsnippet mapca\n	${1:map}.catch_all "*${2:anything}", :controller => "${3:default}", :action => "${4:error}"${5}\nsnippet mapr\n	${1:map}.resource :${2:resource}\nsnippet maprs\n	${1:map}.resources :${2:resource}\nsnippet mapwo\n	${1:map}.with_options :${2:controller} => \'${3:thing}\' do |$3|\n		${4}\n	end\nsnippet mbs\n	before_save :${1:method}\nsnippet mcht\n	change_table :${1:table_name} do |t|\n		${2}\n	end\nsnippet mp\n	map(&:${1:id})\nsnippet mrw\n	mattr_accessor :${1:attr_names}\nsnippet oa\n	order("${1:field}")\nsnippet od\n	order("${1:field} DESC")\nsnippet pa\n	params[:${1:id}]${2}\nsnippet ra\n	render :action => "${1:action}"\nsnippet ral\n	render :action => "${1:action}", :layout => "${2:layoutname}"\nsnippet rest\n	respond_to do |wants|\n		wants.${1:html} { ${2} }\n	end\nsnippet rf\n	render :file => "${1:filepath}"\nsnippet rfu\n	render :file => "${1:filepath}", :use_full_path => ${2:false}\nsnippet ri\n	render :inline => "${1:<%= \'hello\' %>}"\nsnippet ril\n	render :inline => "${1:<%= \'hello\' %>}", :locals => { ${2::name} => "${3:value}"${4} }\nsnippet rit\n	render :inline => "${1:<%= \'hello\' %>}", :type => ${2::rxml}\nsnippet rjson\n	render :json => ${1:text to render}\nsnippet rl\n	render :layout => "${1:layoutname}"\nsnippet rn\n	render :nothing => ${1:true}\nsnippet rns\n	render :nothing => ${1:true}, :status => ${2:401}\nsnippet rp\n	render :partial => "${1:item}"\nsnippet rpc\n	render :partial => "${1:item}", :collection => ${2:@$1s}\nsnippet rpl\n	render :partial => "${1:item}", :locals => { :${2:$1} => ${3:@$1}\nsnippet rpo\n	render :partial => "${1:item}", :object => ${2:@$1}\nsnippet rps\n	render :partial => "${1:item}", :status => ${2:500}\nsnippet rt\n	render :text => "${1:text to render}"\nsnippet rtl\n	render :text => "${1:text to render}", :layout => "${2:layoutname}"\nsnippet rtlt\n	render :text => "${1:text to render}", :layout => ${2:true}\nsnippet rts\n	render :text => "${1:text to render}", :status => ${2:401}\nsnippet ru\n	render :update do |${1:page}|\n		$1.${2}\n	end\nsnippet rxml\n	render :xml => ${1:text to render}\nsnippet sc\n	scope :${1:name}, :where(:@${2:field} => ${3:value})\nsnippet sl\n	scope :${1:name}, lambda do |${2:value}|\n		where("${3:field = ?}", ${4:bind var})\n	end\nsnippet sha1\n	Digest::SHA1.hexdigest(${1:string})\nsnippet sweeper\n	class ${1:ModelClassName}Sweeper < ActionController::Caching::Sweeper\n		observe $1\n\n		def after_save(${2:model_class_name})\n			expire_cache($2)\n		end\n\n		def after_destroy($2)\n			expire_cache($2)\n		end\n\n		def expire_cache($2)\n			expire_page\n		end\n	end\nsnippet tcb\n	t.boolean :${1:title}\n	${2}\nsnippet tcbi\n	t.binary :${1:title}, :limit => ${2:2}.megabytes\n	${3}\nsnippet tcd\n	t.decimal :${1:title}, :precision => ${2:10}, :scale => ${3:2}\n	${4}\nsnippet tcda\n	t.date :${1:title}\n	${2}\nsnippet tcdt\n	t.datetime :${1:title}\n	${2}\nsnippet tcf\n	t.float :${1:title}\n	${2}\nsnippet tch\n	t.change :${1:name}, :${2:string}, :${3:limit} => ${4:80}\n	${5}\nsnippet tci\n	t.integer :${1:title}\n	${2}\nsnippet tcl\n	t.integer :lock_version, :null => false, :default => 0\n	${1}\nsnippet tcr\n	t.references :${1:taggable}, :polymorphic => { :default => \'${2:Photo}\' }\n	${3}\nsnippet tcs\n	t.string :${1:title}\n	${2}\nsnippet tct\n	t.text :${1:title}\n	${2}\nsnippet tcti\n	t.time :${1:title}\n	${2}\nsnippet tcts\n	t.timestamp :${1:title}\n	${2}\nsnippet tctss\n	t.timestamps\n	${1}\nsnippet va\n	validates_associated :${1:attribute}\nsnippet vao\n	validates_acceptance_of :${1:terms}\nsnippet vc\n	validates_confirmation_of :${1:attribute}\nsnippet ve\n	validates_exclusion_of :${1:attribute}, :in => ${2:%w( mov avi )}\nsnippet vf\n	validates_format_of :${1:attribute}, :with => /${2:regex}/\nsnippet vi\n	validates_inclusion_of :${1:attribute}, :in => %w(${2: mov avi })\nsnippet vl\n	validates_length_of :${1:attribute}, :within => ${2:3}..${3:20}\nsnippet vn\n	validates_numericality_of :${1:attribute}\nsnippet vpo\n	validates_presence_of :${1:attribute}\nsnippet vu\n	validates_uniqueness_of :${1:attribute}\nsnippet wants\n	wants.${1:js|xml|html} { ${2} }\nsnippet wc\n	where(${1:"conditions"}${2:, bind_var})\nsnippet wh\n	where(${1:field} => ${2:value})\nsnippet xdelete\n	xhr :delete, :${1:destroy}, :id => ${2:1}${3}\nsnippet xget\n	xhr :get, :${1:show}, :id => ${2:1}${3}\nsnippet xpost\n	xhr :post, :${1:create}, :${2:object} => { ${3} }\nsnippet xput\n	xhr :put, :${1:update}, :id => ${2:1}, :${3:object} => { ${4} }${5}\nsnippet test\n	test "should ${1:do something}" do\n		${2}\n	end\n#migrations\nsnippet mac\n	add_column :${1:table_name}, :${2:column_name}, :${3:data_type}\nsnippet mrc\n	remove_column :${1:table_name}, :${2:column_name}\nsnippet mrnc\n	rename_column :${1:table_name}, :${2:old_column_name}, :${3:new_column_name}\nsnippet mcc\n	change_column :${1:table}, :${2:column}, :${3:type}\nsnippet mccc\n	t.column :${1:title}, :${2:string}\nsnippet mct\n	create_table :${1:table_name} do |t|\n		t.column :${2:name}, :${3:type}\n	end\nsnippet migration\n	class ${1:class_name} < ActiveRecord::Migration\n		def self.up\n			${2}\n		end\n\n		def self.down\n		end\n	end\n\nsnippet trc\n	t.remove :${1:column}\nsnippet tre\n	t.rename :${1:old_column_name}, :${2:new_column_name}\n	${3}\nsnippet tref\n	t.references :${1:model}\n\n#rspec\nsnippet it\n	it "${1:spec_name}" do\n		${2}\n	end\nsnippet itp\n	it "${1:spec_name}"\n	${2}\nsnippet desc\n	describe ${1:class_name} do\n		${2}\n	end\nsnippet cont\n	context "${1:message}" do\n		${2}\n	end\nsnippet bef\n	before :${1:each} do\n		${2}\n	end\nsnippet aft\n	after :${1:each} do\n		${2}\n	end\n',t.scope="ruby"})
\ No newline at end of file
diff --git a/app/assets/lib/ace/snippets/snippets.js b/app/assets/lib/ace/snippets/snippets.js
new file mode 100644
index 000000000..2099ecaf5
--- /dev/null
+++ b/app/assets/lib/ace/snippets/snippets.js
@@ -0,0 +1 @@
+ace.define("ace/snippets/snippets",["require","exports","module"],function(e,t,n){t.snippetText="# snippets for making snippets :)\nsnippet snip\n	snippet ${1:trigger}\n		${2}\nsnippet msnip\n	snippet ${1:trigger} ${2:description}\n		${3}\nsnippet v\n	{VISUAL}\n",t.scope="snippets"})
\ No newline at end of file
diff --git a/app/assets/lib/ace/snippets/text.js b/app/assets/lib/ace/snippets/text.js
new file mode 100644
index 000000000..c0828b98b
--- /dev/null
+++ b/app/assets/lib/ace/snippets/text.js
@@ -0,0 +1 @@
+ace.define("ace/snippets/text",["require","exports","module"],function(e,t,n){t.snippetText="",t.scope="text"})
\ No newline at end of file
diff --git a/app/assets/lib/ace/theme-textmate.js b/app/assets/lib/ace/theme-textmate.js
index a768895f4..e2481482f 100644
--- a/app/assets/lib/ace/theme-textmate.js
+++ b/app/assets/lib/ace/theme-textmate.js
@@ -1 +1 @@
-ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!1,t.cssClass="ace-tm",t.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;border-radius: 2px;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}';var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)})
\ No newline at end of file
+ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!1,t.cssClass="ace-tm",t.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;border-radius: 2px;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}';var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)})
\ No newline at end of file
diff --git a/app/assets/lib/ace/worker-coffee.js b/app/assets/lib/ace/worker-coffee.js
index e82f17c4f..e54a16315 100644
--- a/app/assets/lib/ace/worker-coffee.js
+++ b/app/assets/lib/ace/worker-coffee.js
@@ -1 +1 @@
-"no use strict";(function(e){if(typeof e.window!="undefined"&&e.document)return;e.console=function(){var e=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:e})},e.console.error=e.console.warn=e.console.log=e.console.trace=e.console,e.window=e,e.ace=e,e.onerror=function(e,t,n,r,i){console.error("Worker "+i.stack)},e.normalizeModule=function(t,n){if(n.indexOf("!")!==-1){var r=n.split("!");return e.normalizeModule(t,r[0])+"!"+e.normalizeModule(t,r[1])}if(n.charAt(0)=="."){var i=t.split("/").slice(0,-1).join("/");n=(i?i+"/":"")+n;while(n.indexOf(".")!==-1&&s!=n){var s=n;n=n.replace(/^\.\//,"").replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return n},e.require=function(t,n){n||(n=t,t=null);if(!n.charAt)throw new Error("worker.js require() accepts only (parentId, id) as arguments");n=e.normalizeModule(t,n);var r=e.require.modules[n];if(r)return r.initialized||(r.initialized=!0,r.exports=r.factory().exports),r.exports;var i=n.split("/");if(!e.require.tlns)return console.log("unable to load "+n);i[0]=e.require.tlns[i[0]]||i[0];var s=i.join("/")+".js";return e.require.id=n,importScripts(s),e.require(t,n)},e.require.modules={},e.require.tlns={},e.define=function(t,n,r){arguments.length==2?(r=n,typeof t!="string"&&(n=t,t=e.require.id)):arguments.length==1&&(r=t,n=[],t=e.require.id),n.length||(n=["require","exports","module"]);if(t.indexOf("text!")===0)return;var i=function(n){return e.require(t,n)};e.require.modules[t]={exports:{},factory:function(){var e=this,t=r.apply(this,n.map(function(t){switch(t){case"require":return i;case"exports":return e.exports;case"module":return e;default:return i(t)}}));return t&&(e.exports=t),e}}},e.define.amd={},e.initBaseUrls=function(e){require.tlns=e},e.initSender=function(){var t=e.require("ace/lib/event_emitter").EventEmitter,n=e.require("ace/lib/oop"),r=function(){};return function(){n.implement(this,t),this.callback=function(e,t){postMessage({type:"call",id:t,data:e})},this.emit=function(e,t){postMessage({type:"event",name:e,data:t})}}.call(r.prototype),new r},e.main=null,e.sender=null,e.onmessage=function(e){var t=e.data;if(t.command){if(!main[t.command])throw new Error("Unknown command:"+t.command);main[t.command].apply(main,t.args)}else if(t.init){initBaseUrls(t.tlns),require("ace/lib/es5-shim"),sender=initSender();var n=require(t.module)[t.classname];main=new n(sender)}else t.event&&sender&&sender._emit(t.event,t.data)}})(this),ace.define("ace/lib/es5-shim",["require","exports","module"],function(e,t,n){function r(){}function i(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(t){}}function s(e){return e=+e,e!==e?e=0:e!==0&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}function o(e){var t=typeof e;return e===null||t==="undefined"||t==="boolean"||t==="number"||t==="string"}function u(e){var t,n,r;if(o(e))return e;n=e.valueOf;if(typeof n=="function"){t=n.call(e);if(o(t))return t}r=e.toString;if(typeof r=="function"){t=r.call(e);if(o(t))return t}throw new TypeError}Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if(typeof t!="function")throw new TypeError("Function.prototype.bind called on incompatible "+t);var n=c.call(arguments,1),i=function(){if(this instanceof i){var r=t.apply(this,n.concat(c.call(arguments)));return Object(r)===r?r:this}return t.apply(e,n.concat(c.call(arguments)))};return t.prototype&&(r.prototype=t.prototype,i.prototype=new r,r.prototype=null),i});var a=Function.prototype.call,f=Array.prototype,l=Object.prototype,c=f.slice,h=a.bind(l.toString),p=a.bind(l.hasOwnProperty),d,v,m,g,y;if(y=p(l,"__defineGetter__"))d=a.bind(l.__defineGetter__),v=a.bind(l.__defineSetter__),m=a.bind(l.__lookupGetter__),g=a.bind(l.__lookupSetter__);if([1,2].splice(0).length!=2)if(!function(){function e(e){var t=new Array(e+2);return t[0]=t[1]=0,t}var t=[],n;t.splice.apply(t,e(20)),t.splice.apply(t,e(26)),n=t.length,t.splice(5,0,"XXX"),n+1==t.length;if(n+1==t.length)return!0}())Array.prototype.splice=function(e,t){var n=this.length;e>0?e>n&&(e=n):e==void 0?e=0:e<0&&(e=Math.max(n+e,0)),e+t<n||(t=n-e);var r=this.slice(e,e+t),i=c.call(arguments,2),s=i.length;if(e===n)s&&this.push.apply(this,i);else{var o=Math.min(t,n-e),u=e+o,a=u+s-o,f=n-u,l=n-o;if(a<u)for(var h=0;h<f;++h)this[a+h]=this[u+h];else if(a>u)for(h=f;h--;)this[a+h]=this[u+h];if(s&&e===l)this.length=l,this.push.apply(this,i);else{this.length=l+s;for(h=0;h<s;++h)this[e+h]=i[h]}}return r};else{var b=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?b.apply(this,[e===void 0?0:e,t===void 0?this.length-e:t].concat(c.call(arguments,2))):[]}}Array.isArray||(Array.isArray=function(e){return h(e)=="[object Array]"});var w=Object("a"),E=w[0]!="a"||!(0 in w);Array.prototype.forEach||(Array.prototype.forEach=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=arguments[1],i=-1,s=n.length>>>0;if(h(e)!="[object Function]")throw new TypeError;while(++i<s)i in n&&e.call(r,n[i],i,t)}),Array.prototype.map||(Array.prototype.map=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=Array(r),s=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var o=0;o<r;o++)o in n&&(i[o]=e.call(s,n[o],o,t));return i}),Array.prototype.filter||(Array.prototype.filter=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=[],s,o=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var u=0;u<r;u++)u in n&&(s=n[u],e.call(o,s,u,t)&&i.push(s));return i}),Array.prototype.every||(Array.prototype.every=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var s=0;s<r;s++)if(s in n&&!e.call(i,n[s],s,t))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var s=0;s<r;s++)if(s in n&&e.call(i,n[s],s,t))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0;if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");if(!r&&arguments.length==1)throw new TypeError("reduce of empty array with no initial value");var i=0,s;if(arguments.length>=2)s=arguments[1];else do{if(i in n){s=n[i++];break}if(++i>=r)throw new TypeError("reduce of empty array with no initial value")}while(!0);for(;i<r;i++)i in n&&(s=e.call(void 0,s,n[i],i,t));return s}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0;if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");if(!r&&arguments.length==1)throw new TypeError("reduceRight of empty array with no initial value");var i,s=r-1;if(arguments.length>=2)i=arguments[1];else do{if(s in n){i=n[s--];break}if(--s<0)throw new TypeError("reduceRight of empty array with no initial value")}while(!0);do s in this&&(i=e.call(void 0,i,n[s],s,t));while(s--);return i});if(!Array.prototype.indexOf||[0,1].indexOf(1,2)!=-1)Array.prototype.indexOf=function(e){var t=E&&h(this)=="[object String]"?this.split(""):F(this),n=t.length>>>0;if(!n)return-1;var r=0;arguments.length>1&&(r=s(arguments[1])),r=r>=0?r:Math.max(0,n+r);for(;r<n;r++)if(r in t&&t[r]===e)return r;return-1};if(!Array.prototype.lastIndexOf||[0,1].lastIndexOf(0,-3)!=-1)Array.prototype.lastIndexOf=function(e){var t=E&&h(this)=="[object String]"?this.split(""):F(this),n=t.length>>>0;if(!n)return-1;var r=n-1;arguments.length>1&&(r=Math.min(r,s(arguments[1]))),r=r>=0?r:n-Math.abs(r);for(;r>=0;r--)if(r in t&&e===t[r])return r;return-1};Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__||(e.constructor?e.constructor.prototype:l)});if(!Object.getOwnPropertyDescriptor){var S="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(e,t){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError(S+e);if(!p(e,t))return;var n,r,i;n={enumerable:!0,configurable:!0};if(y){var s=e.__proto__;e.__proto__=l;var r=m(e,t),i=g(e,t);e.__proto__=s;if(r||i)return r&&(n.get=r),i&&(n.set=i),n}return n.value=e[t],n}}Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){return Object.keys(e)});if(!Object.create){var x;Object.prototype.__proto__===null?x=function(){return{__proto__:null}}:x=function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(e,t){var n;if(e===null)n=x();else{if(typeof e!="object")throw new TypeError("typeof prototype["+typeof e+"] != 'object'");var r=function(){};r.prototype=e,n=new r,n.__proto__=e}return t!==void 0&&Object.defineProperties(n,t),n}}if(Object.defineProperty){var T=i({}),N=typeof document=="undefined"||i(document.createElement("div"));if(!T||!N)var C=Object.defineProperty}if(!Object.defineProperty||C){var k="Property description must be an object: ",L="Object.defineProperty called on non-object: ",A="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(e,t,n){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError(L+e);if(typeof n!="object"&&typeof n!="function"||n===null)throw new TypeError(k+n);if(C)try{return C.call(Object,e,t,n)}catch(r){}if(p(n,"value"))if(y&&(m(e,t)||g(e,t))){var i=e.__proto__;e.__proto__=l,delete e[t],e[t]=n.value,e.__proto__=i}else e[t]=n.value;else{if(!y)throw new TypeError(A);p(n,"get")&&d(e,t,n.get),p(n,"set")&&v(e,t,n.set)}return e}}Object.defineProperties||(Object.defineProperties=function(e,t){for(var n in t)p(t,n)&&Object.defineProperty(e,n,t[n]);return e}),Object.seal||(Object.seal=function(e){return e}),Object.freeze||(Object.freeze=function(e){return e});try{Object.freeze(function(){})}catch(O){Object.freeze=function(e){return function(t){return typeof t=="function"?t:e(t)}}(Object.freeze)}Object.preventExtensions||(Object.preventExtensions=function(e){return e}),Object.isSealed||(Object.isSealed=function(e){return!1}),Object.isFrozen||(Object.isFrozen=function(e){return!1}),Object.isExtensible||(Object.isExtensible=function(e){if(Object(e)===e)throw new TypeError;var t="";while(p(e,t))t+="?";e[t]=!0;var n=p(e,t);return delete e[t],n});if(!Object.keys){var M=!0,_=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],D=_.length;for(var P in{toString:null})M=!1;Object.keys=function I(e){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError("Object.keys called on a non-object");var I=[];for(var t in e)p(e,t)&&I.push(t);if(M)for(var n=0,r=D;n<r;n++){var i=_[n];p(e,i)&&I.push(i)}return I}}Date.now||(Date.now=function(){return(new Date).getTime()});var H="	\n\f\r   ᠎              \u2028\u2029";if(!String.prototype.trim||H.trim()){H="["+H+"]";var B=new RegExp("^"+H+H+"*"),j=new RegExp(H+H+"*$");String.prototype.trim=function(){return String(this).replace(B,"").replace(j,"")}}var F=function(e){if(e==null)throw new TypeError("can't convert "+e+" to object");return Object(e)}}),ace.define("ace/mode/coffee_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/coffee/coffee-script"],function(e,t,n){var r=e("../lib/oop"),i=e("../worker/mirror").Mirror,s=e("../mode/coffee/coffee-script");window.addEventListener=function(){};var o=t.Worker=function(e){i.call(this,e),this.setTimeout(250)};r.inherits(o,i),function(){this.onUpdate=function(){var e=this.doc.getValue();try{s.parse(e).compile()}catch(t){var n=t.location;n&&this.sender.emit("error",{row:n.first_line,column:n.first_column,endRow:n.last_line,endColumn:n.last_column,text:t.message,type:"error"});return}this.sender.emit("ok")}}.call(o.prototype)}),ace.define("ace/lib/oop",["require","exports","module"],function(e,t,n){t.inherits=function(){var e=Object.create||function(e,t){var n=function(){};n.prototype=e,object=new n,object.__proto__=e,typeof t!="undefined"&&Object.defineProperties&&Object.defineProperties(object,t)};return function(t,n){t.super_=n,t.prototype=e(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}}(),t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}}),ace.define("ace/worker/mirror",["require","exports","module","ace/document","ace/lib/lang"],function(e,t,n){var r=e("../document").Document,i=e("../lib/lang"),s=t.Mirror=function(e){this.sender=e;var t=this.doc=new r(""),n=this.deferredUpdate=i.delayedCall(this.onUpdate.bind(this)),s=this;e.on("change",function(e){t.applyDeltas(e.data);if(s.$timeout)return n.schedule(s.$timeout);s.onUpdate()})};(function(){this.$timeout=500,this.setTimeout=function(e){this.$timeout=e},this.setValue=function(e){this.doc.setValue(e),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(e){this.sender.callback(this.doc.getValue(),e)},this.onUpdate=function(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(s.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,o=e("./anchor").Anchor,u=function(e){this.$lines=[],e.length==0?this.$lines=[""]:Array.isArray(e)?this._insertLines(0,e):this.insert({row:0,column:0},e)};(function(){r.implement(this,i),this.setValue=function(e){var t=this.getLength();this.remove(new s(0,0,t,this.getLine(t-1).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new o(this,e,t)},"aaa".split(/a/).length==0?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n"},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine}},this.$autoNewLine="\n",this.$newLineMode="auto",this.setNewLineMode=function(e){if(this.$newLineMode===e)return;this.$newLineMode=e},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return e=="\r\n"||e=="\r"||e=="\n"},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){if(e.start.row==e.end.row)return this.getLine(e.start.row).substring(e.start.column,e.end.column);var t=this.getLines(e.start.row,e.end.row);t[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;return e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column)),t.join(this.getNewLineCharacter())},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):e.row<0&&(e.row=0),e},this.insert=function(e,t){if(!t||t.length===0)return e;e=this.$clipPosition(e),this.getLength()<=1&&this.$detectNewLine(t);var n=this.$split(t),r=n.splice(0,1)[0],i=n.length==0?null:n.splice(n.length-1,1)[0];return e=this.insertInLine(e,r),i!==null&&(e=this.insertNewLine(e),e=this._insertLines(e.row,n),e=this.insertInLine(e,i||"")),e},this.insertLines=function(e,t){return e>=this.getLength()?this.insert({row:e,column:0},"\n"+t.join("\n")):this._insertLines(Math.max(e,0),t)},this._insertLines=function(e,t){if(t.length==0)return{row:e,column:0};if(t.length>65535){var n=this._insertLines(e,t.slice(65535));t=t.slice(0,65535)}var r=[e,0];r.push.apply(r,t),this.$lines.splice.apply(this.$lines,r);var i=new s(e,0,e+t.length,0),o={action:"insertLines",range:i,lines:t};return this._emit("change",{data:o}),n||i.end},this.insertNewLine=function(e){e=this.$clipPosition(e);var t=this.$lines[e.row]||"";this.$lines[e.row]=t.substring(0,e.column),this.$lines.splice(e.row+1,0,t.substring(e.column,t.length));var n={row:e.row+1,column:0},r={action:"insertText",range:s.fromPoints(e,n),text:this.getNewLineCharacter()};return this._emit("change",{data:r}),n},this.insertInLine=function(e,t){if(t.length==0)return e;var n=this.$lines[e.row]||"";this.$lines[e.row]=n.substring(0,e.column)+t+n.substring(e.column);var r={row:e.row,column:e.column+t.length},i={action:"insertText",range:s.fromPoints(e,r),text:t};return this._emit("change",{data:i}),r},this.remove=function(e){!e instanceof s&&(e=s.fromPoints(e.start,e.end)),e.start=this.$clipPosition(e.start),e.end=this.$clipPosition(e.end);if(e.isEmpty())return e.start;var t=e.start.row,n=e.end.row;if(e.isMultiLine()){var r=e.start.column==0?t:t+1,i=n-1;e.end.column>0&&this.removeInLine(n,0,e.end.column),i>=r&&this._removeLines(r,i),r!=t&&(this.removeInLine(t,e.start.column,this.getLine(t).length),this.removeNewLine(e.start.row))}else this.removeInLine(t,e.start.column,e.end.column);return e.start},this.removeInLine=function(e,t,n){if(t==n)return;var r=new s(e,t,e,n),i=this.getLine(e),o=i.substring(t,n),u=i.substring(0,t)+i.substring(n,i.length);this.$lines.splice(e,1,u);var a={action:"removeText",range:r,text:o};return this._emit("change",{data:a}),r.start},this.removeLines=function(e,t){return e<0||t>=this.getLength()?this.remove(new s(e,0,t+1,0)):this._removeLines(e,t)},this._removeLines=function(e,t){var n=new s(e,0,t+1,0),r=this.$lines.splice(e,t-e+1),i={action:"removeLines",range:n,nl:this.getNewLineCharacter(),lines:r};return this._emit("change",{data:i}),r},this.removeNewLine=function(e){var t=this.getLine(e),n=this.getLine(e+1),r=new s(e,t.length,e+1,0),i=t+n;this.$lines.splice(e,2,i);var o={action:"removeText",range:r,text:this.getNewLineCharacter()};this._emit("change",{data:o})},this.replace=function(e,t){!e instanceof s&&(e=s.fromPoints(e.start,e.end));if(t.length==0&&e.isEmpty())return e.start;if(t==this.getTextRange(e))return e.end;this.remove(e);if(t)var n=this.insert(e.start,t);else n=e.start;return n},this.applyDeltas=function(e){for(var t=0;t<e.length;t++){var n=e[t],r=s.fromPoints(n.range.start,n.range.end);n.action=="insertLines"?this.insertLines(r.start.row,n.lines):n.action=="insertText"?this.insert(r.start,n.text):n.action=="removeLines"?this._removeLines(r.start.row,r.end.row-1):n.action=="removeText"&&this.remove(r)}},this.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--){var n=e[t],r=s.fromPoints(n.range.start,n.range.end);n.action=="insertLines"?this._removeLines(r.start.row,r.end.row-1):n.action=="insertText"?this.remove(r):n.action=="removeLines"?this._insertLines(r.start.row,n.lines):n.action=="removeText"&&this.insert(r.start,n.text)}},this.indexToPosition=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length;for(var i=t||0,s=n.length;i<s;i++){e-=n[i].length+r;if(e<0)return{row:i,column:e+n[i].length+r}}return{row:s-1,column:n[s-1].length}},this.positionToIndex=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=0,s=Math.min(e.row,n.length);for(var o=t||0;o<s;++o)i+=n[o].length+r;return i+e.column}}).call(u.prototype),t.Document=u}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,t,n){var r={},i=function(){this.propagationStopped=!0},s=function(){this.defaultPrevented=!0};r._emit=r._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],r=this._defaultHandlers[e];if(!n.length&&!r)return;if(typeof t!="object"||!t)t={};t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=i),t.preventDefault||(t.preventDefault=s),n=n.slice();for(var o=0;o<n.length;o++){n[o](t,this);if(t.propagationStopped)break}if(r&&!t.defaultPrevented)return r(t,this)},r._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(!n)return;n=n.slice();for(var r=0;r<n.length;r++)n[r](t,this)},r.once=function(e,t){var n=this;t&&this.addEventListener(e,function r(){n.removeEventListener(e,r),t.apply(null,arguments)})},r.setDefaultHandler=function(e,t){var n=this._defaultHandlers;n||(n=this._defaultHandlers={_disabled_:{}});if(n[e]){var r=n[e],i=n._disabled_[e];i||(n._disabled_[e]=i=[]),i.push(r);var s=i.indexOf(t);s!=-1&&i.splice(s,1)}n[e]=t},r.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(!n)return;var r=n._disabled_[e];if(n[e]==t){var i=n[e];r&&this.setDefaultHandler(e,r.pop())}else if(r){var s=r.indexOf(t);s!=-1&&r.splice(s,1)}},r.on=r.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[e];return r||(r=this._eventRegistry[e]=[]),r.indexOf(t)==-1&&r[n?"unshift":"push"](t),t},r.off=r.removeListener=r.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(!n)return;var r=n.indexOf(t);r!==-1&&n.splice(r,1)},r.removeAllListeners=function(e){this._eventRegistry&&(this._eventRegistry[e]=[])},t.EventEmitter=r}),ace.define("ace/range",["require","exports","module"],function(e,t,n){var r=function(e,t){return e.row-t.row||e.column-t.column},i=function(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return this.compare(e,t)==0},this.compareRange=function(e){var t,n=e.end,r=e.start;return t=this.compare(n.row,n.column),t==1?(t=this.compare(r.row,r.column),t==1?2:t==0?1:0):t==-1?-2:(t=this.compare(r.row,r.column),t==-1?-1:t==1?42:0)},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return this.comparePoint(e.start)==0&&this.comparePoint(e.end)==0},this.intersects=function(e){var t=this.compareRange(e);return t==-1||t==0||t==1},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){typeof e=="object"?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){typeof e=="object"?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)||this.isStart(e,t)?!1:!0:!1},this.insideStart=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)?!1:!0:!1},this.insideEnd=function(e,t){return this.compare(e,t)==0?this.isStart(e,t)?!1:!0:!1},this.compare=function(e,t){return!this.isMultiLine()&&e===this.start.row?t<this.start.column?-1:t>this.end.column?1:0:e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else if(this.end.row<e)var n={row:e,column:0};if(this.start.row>t)var r={row:t+1,column:0};else if(this.start.row<e)var r={row:e,column:0};return i.fromPoints(r||this.start,n||this.end)},this.extend=function(e,t){var n=this.compare(e,t);if(n==0)return this;if(n==-1)var r={row:e,column:t};else var s={row:e,column:t};return i.fromPoints(r||this.start,s||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return i.fromPoints(this.start,this.end)},this.collapseRows=function(){return this.end.column==0?new i(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new i(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),n=e.documentToScreenPosition(this.end);return new i(t.row,t.column,n.row,n.column)},this.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t}}).call(i.prototype),i.fromPoints=function(e,t){return new i(e.row,e.column,t.row,t.column)},i.comparePoints=r,i.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=i}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=t.Anchor=function(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),typeof n=="undefined"?this.setPosition(t.row,t.column):this.setPosition(t,n)};(function(){r.implement(this,i),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(e){var t=e.data,n=t.range;if(n.start.row==n.end.row&&n.start.row!=this.row)return;if(n.start.row>this.row)return;if(n.start.row==this.row&&n.start.column>this.column)return;var r=this.row,i=this.column,s=n.start,o=n.end;if(t.action==="insertText")if(s.row===r&&s.column<=i){if(s.column!==i||!this.$insertRight)s.row===o.row?i+=o.column-s.column:(i-=s.column,r+=o.row-s.row)}else s.row!==o.row&&s.row<r&&(r+=o.row-s.row);else t.action==="insertLines"?s.row<=r&&(r+=o.row-s.row):t.action==="removeText"?s.row===r&&s.column<i?o.column>=i?i=s.column:i=Math.max(0,i-(o.column-s.column)):s.row!==o.row&&s.row<r?(o.row===r&&(i=Math.max(0,i-o.column)+s.column),r-=o.row-s.row):o.row===r&&(r-=o.row-s.row,i=Math.max(0,i-o.column)+s.column):t.action=="removeLines"&&s.row<=r&&(o.row<=r?r-=o.row-s.row:(r=s.row,i=0));this.setPosition(r,i,!0)},this.setPosition=function(e,t,n){var r;n?r={row:e,column:t}:r=this.$clipPositionToDocument(e,t);if(this.row==r.row&&this.column==r.column)return;var i={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._emit("change",{old:i,value:r})},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(s.prototype)}),ace.define("ace/lib/lang",["require","exports","module"],function(e,t,n){t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){var n="";while(t>0){t&1&&(n+=e);if(t>>=1)e+=e}return n};var r=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(r,"")},t.stringTrimRight=function(e){return e.replace(i,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){var t=[];for(var n=0,r=e.length;n<r;n++)e[n]&&typeof e[n]=="object"?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=function(e){if(typeof e!="object"||!e)return e;var n=e.constructor;if(n===RegExp)return e;var r=n();for(var i in e)typeof e[i]=="object"?r[i]=t.deepCopy(e[i]):r[i]=e[i];return r},t.arrayToMap=function(e){var t={};for(var n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return e.replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,function(e){n.push({offset:arguments[arguments.length-2],length:e.length})}),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},r=function(e){return r.cancel(),t=setTimeout(n,e||0),r};return r.schedule=r,r.call=function(){return this.cancel(),e(),r},r.cancel=function(){return clearTimeout(t),t=null,r},r.isPending=function(){return t},r},t.delayedCall=function(e,t){var n=null,r=function(){n=null,e()},i=function(e){n==null&&(n=setTimeout(r,e||t))};return i.delay=function(e){n&&clearTimeout(n),n=setTimeout(r,e||t)},i.schedule=i,i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){return n},i}}),ace.define("ace/mode/coffee/coffee-script",["require","exports","module","ace/mode/coffee/lexer","ace/mode/coffee/parser","ace/mode/coffee/nodes"],function(e,t,n){var r=e("./lexer").Lexer,i=e("./parser"),s=new r;i.lexer={lex:function(){var e,t;return t=this.tokens[this.pos++],t?(e=t[0],this.yytext=t[1],this.yylloc=t[2],this.yylineno=this.yylloc.first_line):e="",e},setInput:function(e){return this.tokens=e,this.pos=0},upcomingInput:function(){return""}},i.yy=e("./nodes"),t.parse=function(e){return i.parse(s.tokenize(e))}}),ace.define("ace/mode/coffee/lexer",["require","exports","module","ace/mode/coffee/rewriter","ace/mode/coffee/helpers"],function(e,t,n){var r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w,E,S,x,T,N,C,k,L,A,O,M,_,D,P,H,B,j,F,I,q,R,U,z,W,X,V,$,J,K,Q,G,Y,Z,et,tt,nt=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1};et=e("./rewriter"),F=et.Rewriter,w=et.INVERSES,tt=e("./helpers"),V=tt.count,Y=tt.starts,X=tt.compact,K=tt.last,G=tt.repeat,$=tt.invertLiterate,Q=tt.locationDataToString,Z=tt.throwSyntaxError,t.Lexer=k=function(){function e(){}return e.prototype.tokenize=function(e,t){var n,r,i,s;t==null&&(t={}),this.literate=t.literate,this.indent=0,this.baseIndent=0,this.indebt=0,this.outdebt=0,this.indents=[],this.ends=[],this.tokens=[],this.chunkLine=t.line||0,this.chunkColumn=t.column||0,e=this.clean(e),r=0;while(this.chunk=e.slice(r))n=this.identifierToken()||this.commentToken()||this.whitespaceToken()||this.lineToken()||this.heredocToken()||this.stringToken()||this.numberToken()||this.regexToken()||this.jsToken()||this.literalToken(),s=this.getLineAndColumnFromChunk(n),this.chunkLine=s[0],this.chunkColumn=s[1],r+=n;return this.closeIndentation(),(i=this.ends.pop())&&this.error("missing "+i),t.rewrite===!1?this.tokens:(new F).rewrite(this.tokens)},e.prototype.clean=function(e){return e.charCodeAt(0)===r&&(e=e.slice(1)),e=e.replace(/\r/g,"").replace(U,""),W.test(e)&&(e="\n"+e,this.chunkLine--),this.literate&&(e=$(e)),e},e.prototype.identifierToken=function(){var e,t,n,r,i,s,o,l,c,h,p,d,v,m;return(o=y.exec(this.chunk))?(s=o[0],r=o[1],e=o[2],i=r.length,l=void 0,r==="own"&&this.tag()==="FOR"?(this.token("OWN",r),r.length):(n=e||(c=K(this.tokens))&&((d=c[0])==="."||d==="?."||d==="::"||d==="?::"||!c.spaced&&c[0]==="@"),h="IDENTIFIER",!n&&(nt.call(x,r)>=0||nt.call(f,r)>=0)&&(h=r.toUpperCase(),h==="WHEN"&&(v=this.tag(),nt.call(T,v)>=0)?h="LEADING_WHEN":h==="FOR"?this.seenFor=!0:h==="UNLESS"?h="IF":nt.call(z,h)>=0?h="UNARY":nt.call(B,h)>=0&&(h!=="INSTANCEOF"&&this.seenFor?(h="FOR"+h,this.seenFor=!1):(h="RELATION",this.value()==="!"&&(l=this.tokens.pop(),r="!"+r)))),nt.call(S,r)>=0&&(n?(h="IDENTIFIER",r=new String(r),r.reserved=!0):nt.call(j,r)>=0&&this.error('reserved word "'+r+'"')),n||(nt.call(u,r)>=0&&(r=a[r]),h=function(){switch(r){case"!":return"UNARY";case"==":case"!=":return"COMPARE";case"&&":case"||":return"LOGIC";case"true":case"false":return"BOOL";case"break":case"continue":return"STATEMENT";default:return h}}()),p=this.token(h,r,0,i),l&&(m=[l[2].first_line,l[2].first_column],p[2].first_line=m[0],p[2].first_column=m[1]),e&&(t=s.lastIndexOf(":"),this.token(":",":",t,e.length)),s.length)):0},e.prototype.numberToken=function(){var e,t,n,r,i;if(!(n=D.exec(this.chunk)))return 0;r=n[0],/^0[BOX]/.test(r)?this.error("radix prefix '"+r+"' must be lowercase"):/E/.test(r)&&!/^0x/.test(r)?this.error("exponential notation '"+r+"' must be indicated with a lowercase 'e'"):/^0\d*[89]/.test(r)?this.error("decimal literal '"+r+"' must not be prefixed with '0'"):/^0\d+/.test(r)&&this.error("octal literal '"+r+"' must be prefixed with '0o'"),t=r.length;if(i=/^0o([0-7]+)/.exec(r))r="0x"+parseInt(i[1],8).toString(16);if(e=/^0b([01]+)/.exec(r))r="0x"+parseInt(e[1],2).toString(16);return this.token("NUMBER",r,0,t),t},e.prototype.stringToken=function(){var e,t,n;switch(this.chunk.charAt(0)){case"'":if(!(e=q.exec(this.chunk)))return 0;n=e[0],this.token("STRING",n.replace(A,"\\\n"),0,n.length);break;case'"':if(!(n=this.balancedString(this.chunk,'"')))return 0;0<n.indexOf("#{",1)?this.interpolateString(n.slice(1,-1),{strOffset:1,lexedLength:n.length}):this.token("STRING",this.escapeLines(n,0,n.length));break;default:return 0}return(t=/^(?:\\.|[^\\])*\\(?:0[0-7]|[1-7])/.test(n))&&this.error("octal escape sequences "+n+" are not allowed"),n.length},e.prototype.heredocToken=function(){var e,t,n,r;return(n=p.exec(this.chunk))?(t=n[0],r=t.charAt(0),e=this.sanitizeHeredoc(n[2],{quote:r,indent:null}),r==='"'&&0<=e.indexOf("#{")?this.interpolateString(e,{heredoc:!0,strOffset:3,lexedLength:t.length}):this.token("STRING",this.makeString(e,r,!0),0,t.length),t.length):0},e.prototype.commentToken=function(){var e,t,n;return(n=this.chunk.match(l))?(e=n[0],t=n[1],t&&this.token("HERECOMMENT",this.sanitizeHeredoc(t,{herecomment:!0,indent:G(" ",this.indent)}),0,e.length),e.length):0},e.prototype.jsToken=function(){var e,t;return this.chunk.charAt(0)!=="`"||!(e=E.exec(this.chunk))?0:(this.token("JS",(t=e[0]).slice(1,-1),0,t.length),t.length)},e.prototype.regexToken=function(){var e,t,n,r,i,s,o;return this.chunk.charAt(0)!=="/"?0:(n=m.exec(this.chunk))?(t=this.heregexToken(n),t):(r=K(this.tokens),r&&(s=r[0],nt.call(r.spaced?M:_,s)>=0)?0:(n=H.exec(this.chunk))?(o=n,n=o[0],i=o[1],e=o[2],i.slice(0,2)==="/*"&&this.error("regular expressions cannot begin with `*`"),i==="//"&&(i="/(?:)/"),this.token("REGEX",""+i+e,0,n.length),n.length):0)},e.prototype.heregexToken=function(e){var t,n,r,i,s,o,u,a,f,l,c,h,p,d,v,m;i=e[0],t=e[1],n=e[2];if(0>t.indexOf("#{"))return u=t.replace(g,"").replace(/\//g,"\\/"),u.match(/^\*/)&&this.error("regular expressions cannot begin with `*`"),this.token("REGEX","/"+(u||"(?:)")+"/"+n,0,i.length),i.length;this.token("IDENTIFIER","RegExp",0,0),this.token("CALL_START","(",0,0),l=[],d=this.interpolateString(t,{regex:!0});for(h=0,p=d.length;h<p;h++){f=d[h],a=f[0],c=f[1];if(a==="TOKENS")l.push.apply(l,c);else if(a==="NEOSTRING"){if(!(c=c.replace(g,"")))continue;c=c.replace(/\\/g,"\\\\"),f[0]="STRING",f[1]=this.makeString(c,'"',!0),l.push(f)}else this.error("Unexpected "+a);o=K(this.tokens),s=["+","+"],s[2]=o[2],l.push(s)}return l.pop(),((v=l[0])!=null?v[0]:void 0)!=="STRING"&&(this.token("STRING",'""',0,0),this.token("+","+",0,0)),(m=this.tokens).push.apply(m,l),n&&(r=i.lastIndexOf(n),this.token(",",",",r,0),this.token("STRING",'"'+n+'"',r,n.length)),this.token(")",")",i.length-1,0),i.length},e.prototype.lineToken=function(){var e,t,n,r,i;if(!(n=O.exec(this.chunk)))return 0;t=n[0],this.seenFor=!1,i=t.length-1-t.lastIndexOf("\n"),r=this.unfinished();if(i-this.indebt===this.indent)return r?this.suppressNewlines():this.newlineToken(0),t.length;if(i>this.indent){if(r)return this.indebt=i-this.indent,this.suppressNewlines(),t.length;if(!this.tokens.length)return this.baseIndent=this.indent=i,t.length;e=i-this.indent+this.outdebt,this.token("INDENT",e,t.length-i,i),this.indents.push(e),this.ends.push("OUTDENT"),this.outdebt=this.indebt=0}else i<this.baseIndent?this.error("missing indentation",t.length):(this.indebt=0,this.outdentToken(this.indent-i,r,t.length));return this.indent=i,t.length},e.prototype.outdentToken=function(e,t,n){var r,i;while(e>0)i=this.indents.length-1,this.indents[i]===void 0?e=0:this.indents[i]===this.outdebt?(e-=this.outdebt,this.outdebt=0):this.indents[i]<this.outdebt?(this.outdebt-=this.indents[i],e-=this.indents[i]):(r=this.indents.pop()+this.outdebt,e-=r,this.outdebt=0,this.pair("OUTDENT"),this.token("OUTDENT",r,0,n));r&&(this.outdebt-=e);while(this.value()===";")this.tokens.pop();return this.tag()!=="TERMINATOR"&&!t&&this.token("TERMINATOR","\n",n,0),this},e.prototype.whitespaceToken=function(){var e,t,n;return!(e=W.exec(this.chunk))&&!(t=this.chunk.charAt(0)==="\n")?0:(n=K(this.tokens),n&&(n[e?"spaced":"newLine"]=!0),e?e[0].length:0)},e.prototype.newlineToken=function(e){while(this.value()===";")this.tokens.pop();return this.tag()!=="TERMINATOR"&&this.token("TERMINATOR","\n",e,0),this},e.prototype.suppressNewlines=function(){return this.value()==="\\"&&this.tokens.pop(),this},e.prototype.literalToken=function(){var e,t,n,r,i,u,a,f;(e=P.exec(this.chunk))?(r=e[0],o.test(r)&&this.tagParameters()):r=this.chunk.charAt(0),n=r,t=K(this.tokens);if(r==="="&&t){!t[1].reserved&&(i=t[1],nt.call(S,i)>=0)&&this.error('reserved word "'+this.value()+"\" can't be assigned");if((u=t[1])==="||"||u==="&&")return t[0]="COMPOUND_ASSIGN",t[1]+="=",r.length}if(r===";")this.seenFor=!1,n="TERMINATOR";else if(nt.call(L,r)>=0)n="MATH";else if(nt.call(c,r)>=0)n="COMPARE";else if(nt.call(h,r)>=0)n="COMPOUND_ASSIGN";else if(nt.call(z,r)>=0)n="UNARY";else if(nt.call(I,r)>=0)n="SHIFT";else if(nt.call(C,r)>=0||r==="?"&&(t!=null?t.spaced:void 0))n="LOGIC";else if(t&&!t.spaced)if(r==="("&&(a=t[0],nt.call(s,a)>=0))t[0]==="?"&&(t[0]="FUNC_EXIST"),n="CALL_START";else if(r==="["&&(f=t[0],nt.call(b,f)>=0)){n="INDEX_START";switch(t[0]){case"?":t[0]="INDEX_SOAK"}}switch(r){case"(":case"{":case"[":this.ends.push(w[r]);break;case")":case"}":case"]":this.pair(r)}return this.token(n,r),r.length},e.prototype.sanitizeHeredoc=function(e,t){var n,r,i,s,o;i=t.indent,r=t.herecomment;if(r){d.test(e)&&this.error('block comment cannot contain "*/", starting');if(e.indexOf("\n")<0)return e}else while(s=v.exec(e)){n=s[1];if(i===null||0<(o=n.length)&&o<i.length)i=n}return i&&(e=e.replace(RegExp("\\n"+i,"g"),"\n")),r||(e=e.replace(/^\n/,"")),e},e.prototype.tagParameters=function(){var e,t,n,r;if(this.tag()!==")")return this;t=[],r=this.tokens,e=r.length,r[--e][0]="PARAM_END";while(n=r[--e])switch(n[0]){case")":t.push(n);break;case"(":case"CALL_START":if(!t.length)return n[0]==="("?(n[0]="PARAM_START",this):this;t.pop()}return this},e.prototype.closeIndentation=function(){return this.outdentToken(this.indent)},e.prototype.balancedString=function(e,t){var n,r,i,s,o,u,a,f;n=0,u=[t];for(r=a=1,f=e.length;1<=f?a<f:a>f;r=1<=f?++a:--a){if(n){--n;continue}switch(i=e.charAt(r)){case"\\":++n;continue;case t:u.pop();if(!u.length)return e.slice(0,+r+1||9e9);t=u[u.length-1];continue}t!=="}"||i!=='"'&&i!=="'"?t==="}"&&i==="/"&&(s=m.exec(e.slice(r))||H.exec(e.slice(r)))?n+=s[0].length-1:t==="}"&&i==="{"?u.push(t="}"):t==='"'&&o==="#"&&i==="{"&&u.push(t="}"):u.push(t=i),o=i}return this.error("missing "+u.pop()+", starting")},e.prototype.interpolateString=function(t,n){var r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w,E,S,x,T,N,C,k,L,A,O;n==null&&(n={}),s=n.heredoc,b=n.regex,v=n.offsetInChunk,E=n.strOffset,c=n.lexedLength,v=v||0,E=E||0,c=c||t.length,s&&t.length>0&&t[0]==="\n"&&(t=t.slice(1),E++),T=[],m=0,o=-1;while(l=t.charAt(o+=1)){if(l==="\\"){o+=1;continue}if(l!=="#"||t.charAt(o+1)!=="{"||!(i=this.balancedString(t.slice(o+1),"}")))continue;m<o&&T.push(this.makeToken("NEOSTRING",t.slice(m,o),E+m)),u=i.slice(1,-1);if(u.length){L=this.getLineAndColumnFromChunk(E+o+1),h=L[0],r=L[1],d=(new e).tokenize(u,{line:h,column:r,rewrite:!1}),y=d.pop(),((A=d[0])!=null?A[0]:void 0)==="TERMINATOR"&&(y=d.shift());if(f=d.length)f>1&&(d.unshift(this.makeToken("(","(",E+o+1,0)),d.push(this.makeToken(")",")",E+o+1+u.length,0))),T.push(["TOKENS",d])}o+=i.length,m=o+1}o>m&&m<t.length&&T.push(this.makeToken("NEOSTRING",t.slice(m),E+m));if(b)return T;if(!T.length)return this.token("STRING",'""',v,c);T[0][0]!=="NEOSTRING"&&T.unshift(this.makeToken("NEOSTRING","",v)),(a=T.length>1)&&this.token("(","(",v,0);for(o=C=0,k=T.length;C<k;o=++C)x=T[o],S=x[0],N=x[1],o&&(o&&(g=this.token("+","+")),p=S==="TOKENS"?N[0]:x,g[2]={first_line:p[2].first_line,first_column:p[2].first_column,last_line:p[2].first_line,last_column:p[2].first_column}),S==="TOKENS"?(O=this.tokens).push.apply(O,N):S==="NEOSTRING"?(x[0]="STRING",x[1]=this.makeString(N,'"',s),this.tokens.push(x)):this.error("Unexpected "+S);return a&&(w=this.makeToken(")",")",v+c,0),w.stringEnd=!0,this.tokens.push(w)),T},e.prototype.pair=function(e){var t,n;return e!==(n=K(this.ends))?("OUTDENT"!==n&&this.error("unmatched "+e),this.indent-=t=K(this.indents),this.outdentToken(t,!0),this.pair(e)):this.ends.pop()},e.prototype.getLineAndColumnFromChunk=function(e){var t,n,r,i;return e===0?[this.chunkLine,this.chunkColumn]:(e>=this.chunk.length?i=this.chunk:i=this.chunk.slice(0,+(e-1)+1||9e9),n=V(i,"\n"),t=this.chunkColumn,n>0?(r=i.split("\n"),t=K(r).length):t+=i.length,[this.chunkLine+n,t])},e.prototype.makeToken=function(e,t,n,r){var i,s,o,u,a;return n==null&&(n=0),r==null&&(r=t.length),s={},u=this.getLineAndColumnFromChunk(n),s.first_line=u[0],s.first_column=u[1],i=Math.max(0,r-1),a=this.getLineAndColumnFromChunk(n+i),s.last_line=a[0],s.last_column=a[1],o=[e,t,s],o},e.prototype.token=function(e,t,n,r){var i;return i=this.makeToken(e,t,n,r),this.tokens.push(i),i},e.prototype.tag=function(e,t){var n;return(n=K(this.tokens,e))&&(t?n[0]=t:n[0])},e.prototype.value=function(e,t){var n;return(n=K(this.tokens,e))&&(t?n[1]=t:n[1])},e.prototype.unfinished=function(){var e;return N.test(this.chunk)||(e=this.tag())==="\\"||e==="."||e==="?."||e==="?::"||e==="UNARY"||e==="MATH"||e==="+"||e==="-"||e==="SHIFT"||e==="RELATION"||e==="COMPARE"||e==="LOGIC"||e==="THROW"||e==="EXTENDS"},e.prototype.escapeLines=function(e,t){return e.replace(A,t?"\\n":"")},e.prototype.makeString=function(e,t,n){return e?(e=e.replace(/\\([\s\S])/g,function(e,n){return n==="\n"||n===t?n:e}),e=e.replace(RegExp(""+t,"g"),"\\$&"),t+this.escapeLines(e,n)+t):t+t},e.prototype.error=function(e,t){var n,r,i;return t==null&&(t=0),i=this.getLineAndColumnFromChunk(t),r=i[0],n=i[1],Z(e,{first_line:r,first_column:n})},e}(),x=["true","false","null","this","new","delete","typeof","in","instanceof","return","throw","break","continue","debugger","if","else","switch","for","while","do","try","catch","finally","class","extends","super"],f=["undefined","then","unless","until","loop","of","by","when"],a={and:"&&",or:"||",is:"==",isnt:"!=",not:"!",yes:"true",no:"false",on:"true",off:"false"},u=function(){var e;e=[];for(J in a)e.push(J);return e}(),f=f.concat(u),j=["case","default","function","var","void","with","const","let","enum","export","import","native","__hasProp","__extends","__slice","__bind","__indexOf","implements","interface","package","private","protected","public","static","yield"],R=["arguments","eval"],S=x.concat(j).concat(R),t.RESERVED=j.concat(x).concat(f).concat(R),t.STRICT_PROSCRIBED=R,r=65279,y=/^([$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)([^\n\S]*:(?!:))?/,D=/^0b[01]+|^0o[0-7]+|^0x[\da-f]+|^\d*\.?\d+(?:e[+-]?\d+)?/i,p=/^("""|''')([\s\S]*?)(?:\n[^\n\S]*)?\1/,P=/^(?:[-=]>|[-+*\/%<>&|^!?=]=|>>>=?|([-+:])\1|([&|<>])\2=?|\?(\.|::)|\.{2,3})/,W=/^[^\n\S]+/,l=/^###([^#][\s\S]*?)(?:###[^\n\S]*|(?:###)$)|^(?:\s*#(?!##[^#]).*)+/,o=/^[-=]>/,O=/^(?:\n[^\n\S]*)+/,q=/^'[^\\']*(?:\\.[^\\']*)*'/,E=/^`[^\\`]*(?:\\.[^\\`]*)*`/,H=/^(\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)([imgy]{0,4})(?!\w)/,m=/^\/{3}([\s\S]+?)\/{3}([imgy]{0,4})(?!\w)/,g=/\s+(?:#.*)?/g,A=/\n/g,v=/\n+([^\n\S]*)/g,d=/\*\//,N=/^\s*(?:,|\??\.(?![.\d])|::)/,U=/\s+$/,h=["-=","+=","/=","*=","%=","||=","&&=","?=","<<=",">>=",">>>=","&=","^=","|="],z=["!","~","NEW","TYPEOF","DELETE","DO"],C=["&&","||","&","|","^"],I=["<<",">>",">>>"],c=["==","!=","<",">","<=",">="],L=["*","/","%"],B=["IN","OF","INSTANCEOF"],i=["TRUE","FALSE"],M=["NUMBER","REGEX","BOOL","NULL","UNDEFINED","++","--"],_=M.concat(")","}","THIS","IDENTIFIER","STRING","]"),s=["IDENTIFIER","STRING","REGEX",")","]","}","?","::","@","THIS","SUPER"],b=s.concat("NUMBER","BOOL","NULL","UNDEFINED"),T=["INDENT","OUTDENT","TERMINATOR"]}),ace.define("ace/mode/coffee/rewriter",["require","exports","module"],function(e,t,n){var r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w,E=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1},S=[].slice;v=function(e,t){var n;return n=[e,t],n.generated=!0,n},t.Rewriter=function(){function e(){}return e.prototype.rewrite=function(e){return this.tokens=e,this.removeLeadingNewlines(),this.removeMidExpressionNewlines(),this.closeOpenCalls(),this.closeOpenIndexes(),this.addImplicitIndentation(),this.tagPostfixConditionals(),this.addImplicitBracesAndParens(),this.addLocationDataToGeneratedTokens(),this.tokens},e.prototype.scanTokens=function(e){var t,n,r;r=this.tokens,t=0;while(n=r[t])t+=e.call(this,n,t,r);return!0},e.prototype.detectEnd=function(e,t,n){var r,i,u,a,f;u=this.tokens,r=0;while(i=u[e]){if(r===0&&t.call(this,i,e))return n.call(this,i,e);if(!i||r<0)return n.call(this,i,e-1);if(a=i[0],E.call(o,a)>=0)r+=1;else if(f=i[0],E.call(s,f)>=0)r-=1;e+=1}return e-1},e.prototype.removeLeadingNewlines=function(){var e,t,n,r,i;i=this.tokens;for(e=n=0,r=i.length;n<r;e=++n){t=i[e][0];if(t!=="TERMINATOR")break}if(e)return this.tokens.splice(0,e)},e.prototype.removeMidExpressionNewlines=function(){return this.scanTokens(function(e,t,n){var r;return e[0]==="TERMINATOR"&&(r=this.tag(t+1),E.call(i,r)>=0)?(n.splice(t,1),0):1})},e.prototype.closeOpenCalls=function(){var e,t;return t=function(e,t){var n;return(n=e[0])===")"||n==="CALL_END"||e[0]==="OUTDENT"&&this.tag(t-1)===")"},e=function(e,t){return this.tokens[e[0]==="OUTDENT"?t-1:t][0]="CALL_END"},this.scanTokens(function(n,r){return n[0]==="CALL_START"&&this.detectEnd(r+1,t,e),1})},e.prototype.closeOpenIndexes=function(){var e,t;return t=function(e,t){var n;return(n=e[0])==="]"||n==="INDEX_END"},e=function(e,t){return e[0]="INDEX_END"},this.scanTokens(function(n,r){return n[0]==="INDEX_START"&&this.detectEnd(r+1,t,e),1})},e.prototype.matchTags=function(){var e,t,n,r,i,s,o;t=arguments[0],r=2<=arguments.length?S.call(arguments,1):[],e=0;for(n=i=0,s=r.length;0<=s?i<s:i>s;n=0<=s?++i:--i){while(this.tag(t+n+e)==="HERECOMMENT")e+=2;if(r[n]==null)continue;typeof r[n]=="string"&&(r[n]=[r[n]]);if(o=this.tag(t+n+e),E.call(r[n],o)<0)return!1}return!0},e.prototype.looksObjectish=function(e){return this.matchTags(e,"@",null,":")||this.matchTags(e,null,":")},e.prototype.findTagsBackwards=function(e,t){var n,r,i,u,a,f,l;n=[];while(e>=0&&(n.length||(u=this.tag(e),E.call(t,u)<0)&&((a=this.tag(e),E.call(o,a)<0)||this.tokens[e].generated)&&(f=this.tag(e),E.call(h,f)<0)))(r=this.tag(e),E.call(s,r)>=0)&&n.push(this.tag(e)),(i=this.tag(e),E.call(o,i)>=0)&&n.length&&n.pop(),e-=1;return l=this.tag(e),E.call(t,l)>=0},e.prototype.addImplicitBracesAndParens=function(){var e;return e=[],this.scanTokens(function(t,n,r){var i,c,p,d,m,g,y,b,w,S,x,T,N,C,k,L,A,O,M,_,D,P,H,B,j,F;_=t[0],S=(n>0?r[n-1]:[])[0],b=(n<r.length-1?r[n+1]:[])[0],k=function(){return e[e.length-1]},L=n,p=function(e){return n-L+e},d=function(){var e,t;return(e=k())!=null?(t=e[2])!=null?t.ours:void 0:void 0},m=function(){var e;return d()&&((e=k())!=null?e[0]:void 0)==="("},y=function(){var e;return d()&&((e=k())!=null?e[0]:void 0)==="{"},g=function(){var e;return d&&((e=k())!=null?e[0]:void 0)==="CONTROL"},A=function(t){var i;i=t!=null?t:n,e.push(["(",i,{ours:!0}]),r.splice(i,0,v("CALL_START","("));if(t==null)return n+=1},i=function(){return e.pop(),r.splice(n,0,v("CALL_END",")")),n+=1},O=function(t,i){var s;i==null&&(i=!0),s=t!=null?t:n,e.push(["{",s,{sameLine:!0,startsLine:i,ours:!0}]),r.splice(s,0,v("{",v(new String("{"))));if(t==null)return n+=1},c=function(t){return t=t!=null?t:n,e.pop(),r.splice(t,0,v("}","}")),n+=1};if(!m()||_!=="IF"&&_!=="TRY"&&_!=="FINALLY"&&_!=="CATCH"&&_!=="CLASS"&&_!=="SWITCH"){if(_==="INDENT"&&d()){if(S!=="=>"&&S!=="->"&&S!=="["&&S!=="("&&S!==","&&S!=="{"&&S!=="TRY"&&S!=="ELSE"&&S!=="=")while(m())i();return g()&&e.pop(),e.push([_,n]),p(1)}if(E.call(o,_)>=0)return e.push([_,n]),p(1);if(E.call(s,_)>=0){while(d())m()?i():y()?c():e.pop();e.pop()}if((E.call(f,_)>=0&&t.spaced&&!t.stringEnd||_==="?"&&n>0&&!r[n-1].spaced)&&(E.call(u,b)>=0||E.call(l,b)>=0&&((D=r[n+1])!=null?!D.spaced:!void 0)&&((P=r[n+1])!=null?!P.newLine:!void 0)))return _==="?"&&(_=t[0]="FUNC_EXIST"),A(n+1),p(2);if(E.call(f,_)>=0&&this.matchTags(n+1,"INDENT",null,":")&&!this.findTagsBackwards(n,["CLASS","EXTENDS","IF","CATCH","SWITCH","LEADING_WHEN","FOR","WHILE","UNTIL"]))return A(n+1),e.push(["INDENT",n+2]),p(3);if(_===":"){this.tag(n-2)==="@"?x=n-2:x=n-1;while(this.tag(x-2)==="HERECOMMENT")x-=2;M=x===0||(H=this.tag(x-1),E.call(h,H)>=0)||r[x-1].newLine;if(k()){B=k(),C=B[0],N=B[1];if((C==="{"||C==="INDENT"&&this.tag(N-1)==="{")&&(M||this.tag(x-1)===","||this.tag(x-1)==="{"))return p(1)}return O(x,!!M),p(2)}if(S!=="OUTDENT"||!m()||_!=="."&&_!=="?."&&_!=="::"&&_!=="?::"){y()&&E.call(h,_)>=0&&(k()[2].sameLine=!1);if(E.call(a,_)>=0)while(d()){j=k(),C=j[0],N=j[1],F=j[2],T=F.sameLine,M=F.startsLine;if(m()&&S!==",")i();else if(y()&&T&&!M)c();else{if(!y()||_!=="TERMINATOR"||S===","||!!M&&!!this.looksObjectish(n+1))break;c()}}if(_===","&&!this.looksObjectish(n+1)&&y()&&(b!=="TERMINATOR"||!this.looksObjectish(n+2))){w=b==="OUTDENT"?1:0;while(y())c(n+w)}return p(1)}return i(),p(1)}return e.push(["CONTROL",n,{ours:!0}]),p(1)})},e.prototype.addLocationDataToGeneratedTokens=function(){return this.scanTokens(function(e,t,n){var r,i,s,o,u,a;return e[2]?1:!e.generated&&!e.explicit?1:(e[0]==="{"&&(s=(u=n[t+1])!=null?u[2]:void 0)?(i=s.first_line,r=s.first_column):(o=(a=n[t-1])!=null?a[2]:void 0)?(i=o.last_line,r=o.last_column):i=r=0,e[2]={first_line:i,first_column:r,last_line:i,last_column:r},1)})},e.prototype.addImplicitIndentation=function(){var e,t,n,r,i;return i=n=r=null,t=function(e,t){var n,r;return e[1]!==";"&&(n=e[0],E.call(p,n)>=0)&&(e[0]!=="ELSE"||i==="THEN")&&((r=e[0])!=="CATCH"&&r!=="FINALLY"||i!=="->"&&i!=="=>")},e=function(e,t){return this.tokens.splice(this.tag(t-1)===","?t-1:t,0,r)},this.scanTokens(function(s,o,u){var a,f,l,c,h;f=s[0];if(f==="TERMINATOR"&&this.tag(o+1)==="THEN")return u.splice(o,1),0;if(f==="ELSE"&&this.tag(o-1)!=="OUTDENT")return u.splice.apply(u,[o,0].concat(S.call(this.indentation()))),2;if(f==="CATCH")for(a=l=1;l<=2;a=++l){if((c=this.tag(o+a))!=="OUTDENT"&&c!=="TERMINATOR"&&c!=="FINALLY")continue;return u.splice.apply(u,[o+a,0].concat(S.call(this.indentation()))),2+a}return E.call(d,f)>=0&&this.tag(o+1)!=="INDENT"&&(f!=="ELSE"||this.tag(o+1)!=="IF")?(i=f,h=this.indentation(!0),n=h[0],r=h[1],i==="THEN"&&(n.fromThen=!0),u.splice(o+1,0,n),this.detectEnd(o+2,t,e),f==="THEN"&&u.splice(o,1),1):1})},e.prototype.tagPostfixConditionals=function(){var e,t,n;return n=null,t=function(e,t){var n,r;return r=e[0],n=this.tokens[t-1][0],r==="TERMINATOR"||r==="INDENT"&&E.call(d,n)<0},e=function(e,t){if(e[0]!=="INDENT"||e.generated&&!e.fromThen)return n[0]="POST_"+n[0]},this.scanTokens(function(r,i){return r[0]!=="IF"?1:(n=r,this.detectEnd(i+1,t,e),1)})},e.prototype.indentation=function(e){var t,n;return e==null&&(e=!1),t=["INDENT",2],n=["OUTDENT",2],e&&(t.generated=n.generated=!0),e||(t.explicit=n.explicit=!0),[t,n]},e.prototype.generate=v,e.prototype.tag=function(e){var t;return(t=this.tokens[e])!=null?t[0]:void 0},e}(),r=[["(",")"],["[","]"],["{","}"],["INDENT","OUTDENT"],["CALL_START","CALL_END"],["PARAM_START","PARAM_END"],["INDEX_START","INDEX_END"]],t.INVERSES=c={},o=[],s=[];for(y=0,b=r.length;y<b;y++)w=r[y],m=w[0],g=w[1],o.push(c[g]=m),s.push(c[m]=g);i=["CATCH","WHEN","ELSE","FINALLY"].concat(s),f=["IDENTIFIER","SUPER",")","CALL_END","]","INDEX_END","@","THIS"],u=["IDENTIFIER","NUMBER","STRING","JS","REGEX","NEW","PARAM_START","CLASS","IF","TRY","SWITCH","THIS","BOOL","NULL","UNDEFINED","UNARY","SUPER","THROW","@","->","=>","[","(","{","--","++"],l=["+","-"],a=["POST_IF","FOR","WHILE","UNTIL","WHEN","BY","LOOP","TERMINATOR"],d=["ELSE","->","=>","TRY","FINALLY","THEN"],p=["TERMINATOR","CATCH","FINALLY","ELSE","OUTDENT","LEADING_WHEN"],h=["TERMINATOR","INDENT","OUTDENT"]}),ace.define("ace/mode/coffee/helpers",["require","exports","module"],function(e,t,n){var r,i,s,o,u,a,f;t.starts=function(e,t,n){return t===e.substr(n,t.length)},t.ends=function(e,t,n){var r;return r=t.length,t===e.substr(e.length-r-(n||0),r)},t.repeat=u=function(e,t){var n;n="";while(t>0)t&1&&(n+=e),t>>>=1,e+=e;return n},t.compact=function(e){var t,n,r,i;i=[];for(n=0,r=e.length;n<r;n++)t=e[n],t&&i.push(t);return i},t.count=function(e,t){var n,r;n=r=0;if(!t.length)return 1/0;while(r=1+e.indexOf(t,r))n++;return n},t.merge=function(e,t){return i(i({},e),t)},i=t.extend=function(e,t){var n,r;for(n in t)r=t[n],e[n]=r;return e},t.flatten=s=function(e){var t,n,r,i;n=[];for(r=0,i=e.length;r<i;r++)t=e[r],t instanceof Array?n=n.concat(s(t)):n.push(t);return n},t.del=function(e,t){var n;return n=e[t],delete e[t],n},t.last=o=function(e,t){return e[e.length-(t||0)-1]},t.some=(f=Array.prototype.some)!=null?f:function(e){var t,n,r;for(n=0,r=this.length;n<r;n++){t=this[n];if(e(t))return!0}return!1},t.invertLiterate=function(e){var t,n,r;return r=!0,n=function(){var n,i,s,o;s=e.split("\n"),o=[];for(n=0,i=s.length;n<i;n++)t=s[n],r&&/^([ ]{4}|[ ]{0,3}\t)/.test(t)?o.push(t):(r=/^\s*$/.test(t))?o.push(t):o.push("# "+t);return o}(),n.join("\n")},r=function(e,t){return t?{first_line:e.first_line,first_column:e.first_column,last_line:t.last_line,last_column:t.last_column}:e},t.addLocationDataFn=function(e,t){return function(n){return typeof n=="object"&&!!n.updateLocationDataIfMissing&&n.updateLocationDataIfMissing(r(e,t)),n}},t.locationDataToString=function(e){var t;return"2"in e&&"first_line"in e[2]?t=e[2]:"first_line"in e&&(t=e),t?""+(t.first_line+1)+":"+(t.first_column+1)+"-"+(""+(t.last_line+1)+":"+(t.last_column+1)):"No location data"},t.baseFileName=function(e,t,n){var r,i;return t==null&&(t=!1),n==null&&(n=!1),i=n?/\\|\//:/\//,r=e.split(i),e=r[r.length-1],t?(r=e.split("."),r.pop(),r[r.length-1]==="coffee"&&r.length>1&&r.pop(),r.join(".")):e},t.isCoffee=function(e){return/\.((lit)?coffee|coffee\.md)$/.test(e)},t.isLiterate=function(e){return/\.(litcoffee|coffee\.md)$/.test(e)},t.throwSyntaxError=function(e,t){var n;throw t.last_line==null&&(t.last_line=t.first_line),t.last_column==null&&(t.last_column=t.first_column),n=new SyntaxError(e),n.location=t,n.toString=a,n.stack=n.toString(),n},t.updateSyntaxError=function(e,t,n){return e.toString===a&&(e.code||(e.code=t),e.filename||(e.filename=n),e.stack=e.toString()),e},a=function(){var e,t,n,r,i,s,o,a,f,l,c,h,p;if(!this.code||!this.location)return Error.prototype.toString.call(this);h=this.location,o=h.first_line,s=h.first_column,f=h.last_line,a=h.last_column,f==null&&(f=o),a==null&&(a=s),i=this.filename||"[stdin]",e=this.code.split("\n")[o],c=s,r=o===f?a+1:e.length,l=u(" ",c)+u("^",r-c),typeof process!="undefined"&&process!==null&&(n=process.stdout.isTTY&&!process.env.NODE_DISABLE_COLORS);if((p=this.colorful)!=null?p:n)t=function(e){return""+e+""},e=e.slice(0,c)+t(e.slice(c,r))+e.slice(r),l=t(l);return""+i+":"+(o+1)+":"+(s+1)+": error: "+this.message+"\n"+e+"\n"+l}}),ace.define("ace/mode/coffee/parser",["require","exports","module"],function(e,t,n){function r(){this.yy={}}var i={trace:function(){},yy:{},symbols_:{error:2,Root:3,Body:4,Line:5,TERMINATOR:6,Expression:7,Statement:8,Return:9,Comment:10,STATEMENT:11,Value:12,Invocation:13,Code:14,Operation:15,Assign:16,If:17,Try:18,While:19,For:20,Switch:21,Class:22,Throw:23,Block:24,INDENT:25,OUTDENT:26,Identifier:27,IDENTIFIER:28,AlphaNumeric:29,NUMBER:30,STRING:31,Literal:32,JS:33,REGEX:34,DEBUGGER:35,UNDEFINED:36,NULL:37,BOOL:38,Assignable:39,"=":40,AssignObj:41,ObjAssignable:42,":":43,ThisProperty:44,RETURN:45,HERECOMMENT:46,PARAM_START:47,ParamList:48,PARAM_END:49,FuncGlyph:50,"->":51,"=>":52,OptComma:53,",":54,Param:55,ParamVar:56,"...":57,Array:58,Object:59,Splat:60,SimpleAssignable:61,Accessor:62,Parenthetical:63,Range:64,This:65,".":66,"?.":67,"::":68,"?::":69,Index:70,INDEX_START:71,IndexValue:72,INDEX_END:73,INDEX_SOAK:74,Slice:75,"{":76,AssignList:77,"}":78,CLASS:79,EXTENDS:80,OptFuncExist:81,Arguments:82,SUPER:83,FUNC_EXIST:84,CALL_START:85,CALL_END:86,ArgList:87,THIS:88,"@":89,"[":90,"]":91,RangeDots:92,"..":93,Arg:94,SimpleArgs:95,TRY:96,Catch:97,FINALLY:98,CATCH:99,THROW:100,"(":101,")":102,WhileSource:103,WHILE:104,WHEN:105,UNTIL:106,Loop:107,LOOP:108,ForBody:109,FOR:110,ForStart:111,ForSource:112,ForVariables:113,OWN:114,ForValue:115,FORIN:116,FOROF:117,BY:118,SWITCH:119,Whens:120,ELSE:121,When:122,LEADING_WHEN:123,IfBlock:124,IF:125,POST_IF:126,UNARY:127,"-":128,"+":129,"--":130,"++":131,"?":132,MATH:133,SHIFT:134,COMPARE:135,LOGIC:136,RELATION:137,COMPOUND_ASSIGN:138,$accept:0,$end:1},terminals_:{2:"error",6:"TERMINATOR",11:"STATEMENT",25:"INDENT",26:"OUTDENT",28:"IDENTIFIER",30:"NUMBER",31:"STRING",33:"JS",34:"REGEX",35:"DEBUGGER",36:"UNDEFINED",37:"NULL",38:"BOOL",40:"=",43:":",45:"RETURN",46:"HERECOMMENT",47:"PARAM_START",49:"PARAM_END",51:"->",52:"=>",54:",",57:"...",66:".",67:"?.",68:"::",69:"?::",71:"INDEX_START",73:"INDEX_END",74:"INDEX_SOAK",76:"{",78:"}",79:"CLASS",80:"EXTENDS",83:"SUPER",84:"FUNC_EXIST",85:"CALL_START",86:"CALL_END",88:"THIS",89:"@",90:"[",91:"]",93:"..",96:"TRY",98:"FINALLY",99:"CATCH",100:"THROW",101:"(",102:")",104:"WHILE",105:"WHEN",106:"UNTIL",108:"LOOP",110:"FOR",114:"OWN",116:"FORIN",117:"FOROF",118:"BY",119:"SWITCH",121:"ELSE",123:"LEADING_WHEN",125:"IF",126:"POST_IF",127:"UNARY",128:"-",129:"+",130:"--",131:"++",132:"?",133:"MATH",134:"SHIFT",135:"COMPARE",136:"LOGIC",137:"RELATION",138:"COMPOUND_ASSIGN"},productions_:[0,[3,0],[3,1],[4,1],[4,3],[4,2],[5,1],[5,1],[8,1],[8,1],[8,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[24,2],[24,3],[27,1],[29,1],[29,1],[32,1],[32,1],[32,1],[32,1],[32,1],[32,1],[32,1],[16,3],[16,4],[16,5],[41,1],[41,3],[41,5],[41,1],[42,1],[42,1],[42,1],[9,2],[9,1],[10,1],[14,5],[14,2],[50,1],[50,1],[53,0],[53,1],[48,0],[48,1],[48,3],[48,4],[48,6],[55,1],[55,2],[55,3],[56,1],[56,1],[56,1],[56,1],[60,2],[61,1],[61,2],[61,2],[61,1],[39,1],[39,1],[39,1],[12,1],[12,1],[12,1],[12,1],[12,1],[62,2],[62,2],[62,2],[62,2],[62,1],[62,1],[70,3],[70,2],[72,1],[72,1],[59,4],[77,0],[77,1],[77,3],[77,4],[77,6],[22,1],[22,2],[22,3],[22,4],[22,2],[22,3],[22,4],[22,5],[13,3],[13,3],[13,1],[13,2],[81,0],[81,1],[82,2],[82,4],[65,1],[65,1],[44,2],[58,2],[58,4],[92,1],[92,1],[64,5],[75,3],[75,2],[75,2],[75,1],[87,1],[87,3],[87,4],[87,4],[87,6],[94,1],[94,1],[95,1],[95,3],[18,2],[18,3],[18,4],[18,5],[97,3],[97,3],[97,2],[23,2],[63,3],[63,5],[103,2],[103,4],[103,2],[103,4],[19,2],[19,2],[19,2],[19,1],[107,2],[107,2],[20,2],[20,2],[20,2],[109,2],[109,2],[111,2],[111,3],[115,1],[115,1],[115,1],[115,1],[113,1],[113,3],[112,2],[112,2],[112,4],[112,4],[112,4],[112,6],[112,6],[21,5],[21,7],[21,4],[21,6],[120,1],[120,2],[122,3],[122,4],[124,3],[124,5],[17,1],[17,3],[17,3],[17,3],[15,2],[15,2],[15,2],[15,2],[15,2],[15,2],[15,2],[15,2],[15,3],[15,3],[15,3],[15,3],[15,3],[15,3],[15,3],[15,3],[15,5],[15,4],[15,3]],performAction:function(e,t,n,r,i,s,o){var u=s.length-1;switch(i){case 1:return this.$=r.addLocationDataFn(o[u],o[u])(new r.Block);case 2:return this.$=s[u];case 3:this.$=r.addLocationDataFn(o[u],o[u])(r.Block.wrap([s[u]]));break;case 4:this.$=r.addLocationDataFn(o[u-2],o[u])(s[u-2].push(s[u]));break;case 5:this.$=s[u-1];break;case 6:this.$=s[u];break;case 7:this.$=s[u];break;case 8:this.$=s[u];break;case 9:this.$=s[u];break;case 10:this.$=r.addLocationDataFn(o[u],o[u])(new r.Literal(s[u]));break;case 11:this.$=s[u];break;case 12:this.$=s[u];break;case 13:this.$=s[u];break;case 14:this.$=s[u];break;case 15:this.$=s[u];break;case 16:this.$=s[u];break;case 17:this.$=s[u];break;case 18:this.$=s[u];break;case 19:this.$=s[u];break;case 20:this.$=s[u];break;case 21:this.$=s[u];break;case 22:this.$=s[u];break;case 23:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Block);break;case 24:this.$=r.addLocationDataFn(o[u-2],o[u])(s[u-1]);break;case 25:this.$=r.addLocationDataFn(o[u],o[u])(new r.Literal(s[u]));break;case 26:this.$=r.addLocationDataFn(o[u],o[u])(new r.Literal(s[u]));break;case 27:this.$=r.addLocationDataFn(o[u],o[u])(new r.Literal(s[u]));break;case 28:this.$=s[u];break;case 29:this.$=r.addLocationDataFn(o[u],o[u])(new r.Literal(s[u]));break;case 30:this.$=r.addLocationDataFn(o[u],o[u])(new r.Literal(s[u]));break;case 31:this.$=r.addLocationDataFn(o[u],o[u])(new r.Literal(s[u]));break;case 32:this.$=r.addLocationDataFn(o[u],o[u])(new r.Undefined);break;case 33:this.$=r.addLocationDataFn(o[u],o[u])(new r.Null);break;case 34:this.$=r.addLocationDataFn(o[u],o[u])(new r.Bool(s[u]));break;case 35:this.$=r.addLocationDataFn(o[u-2],o[u])(new r.Assign(s[u-2],s[u]));break;case 36:this.$=r.addLocationDataFn(o[u-3],o[u])(new r.Assign(s[u-3],s[u]));break;case 37:this.$=r.addLocationDataFn(o[u-4],o[u])(new r.Assign(s[u-4],s[u-1]));break;case 38:this.$=r.addLocationDataFn(o[u],o[u])(new r.Value(s[u]));break;case 39:this.$=r.addLocationDataFn(o[u-2],o[u])(new r.Assign(r.addLocationDataFn(o[u-2])(new r.Value(s[u-2])),s[u],"object"));break;case 40:this.$=r.addLocationDataFn(o[u-4],o[u])(new r.Assign(r.addLocationDataFn(o[u-4])(new r.Value(s[u-4])),s[u-1],"object"));break;case 41:this.$=s[u];break;case 42:this.$=s[u];break;case 43:this.$=s[u];break;case 44:this.$=s[u];break;case 45:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Return(s[u]));break;case 46:this.$=r.addLocationDataFn(o[u],o[u])(new r.Return);break;case 47:this.$=r.addLocationDataFn(o[u],o[u])(new r.Comment(s[u]));break;case 48:this.$=r.addLocationDataFn(o[u-4],o[u])(new r.Code(s[u-3],s[u],s[u-1]));break;case 49:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Code([],s[u],s[u-1]));break;case 50:this.$=r.addLocationDataFn(o[u],o[u])("func");break;case 51:this.$=r.addLocationDataFn(o[u],o[u])("boundfunc");break;case 52:this.$=s[u];break;case 53:this.$=s[u];break;case 54:this.$=r.addLocationDataFn(o[u],o[u])([]);break;case 55:this.$=r.addLocationDataFn(o[u],o[u])([s[u]]);break;case 56:this.$=r.addLocationDataFn(o[u-2],o[u])(s[u-2].concat(s[u]));break;case 57:this.$=r.addLocationDataFn(o[u-3],o[u])(s[u-3].concat(s[u]));break;case 58:this.$=r.addLocationDataFn(o[u-5],o[u])(s[u-5].concat(s[u-2]));break;case 59:this.$=r.addLocationDataFn(o[u],o[u])(new r.Param(s[u]));break;case 60:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Param(s[u-1],null,!0));break;case 61:this.$=r.addLocationDataFn(o[u-2],o[u])(new r.Param(s[u-2],s[u]));break;case 62:this.$=s[u];break;case 63:this.$=s[u];break;case 64:this.$=s[u];break;case 65:this.$=s[u];break;case 66:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Splat(s[u-1]));break;case 67:this.$=r.addLocationDataFn(o[u],o[u])(new r.Value(s[u]));break;case 68:this.$=r.addLocationDataFn(o[u-1],o[u])(s[u-1].add(s[u]));break;case 69:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Value(s[u-1],[].concat(s[u])));break;case 70:this.$=s[u];break;case 71:this.$=s[u];break;case 72:this.$=r.addLocationDataFn(o[u],o[u])(new r.Value(s[u]));break;case 73:this.$=r.addLocationDataFn(o[u],o[u])(new r.Value(s[u]));break;case 74:this.$=s[u];break;case 75:this.$=r.addLocationDataFn(o[u],o[u])(new r.Value(s[u]));break;case 76:this.$=r.addLocationDataFn(o[u],o[u])(new r.Value(s[u]));break;case 77:this.$=r.addLocationDataFn(o[u],o[u])(new r.Value(s[u]));break;case 78:this.$=s[u];break;case 79:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Access(s[u]));break;case 80:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Access(s[u],"soak"));break;case 81:this.$=r.addLocationDataFn(o[u-1],o[u])([r.addLocationDataFn(o[u-1])(new r.Access(new r.Literal("prototype"))),r.addLocationDataFn(o[u])(new r.Access(s[u]))]);break;case 82:this.$=r.addLocationDataFn(o[u-1],o[u])([r.addLocationDataFn(o[u-1])(new r.Access(new r.Literal("prototype"),"soak")),r.addLocationDataFn(o[u])(new r.Access(s[u]))]);break;case 83:this.$=r.addLocationDataFn(o[u],o[u])(new r.Access(new r.Literal("prototype")));break;case 84:this.$=s[u];break;case 85:this.$=r.addLocationDataFn(o[u-2],o[u])(s[u-1]);break;case 86:this.$=r.addLocationDataFn(o[u-1],o[u])(r.extend(s[u],{soak:!0}));break;case 87:this.$=r.addLocationDataFn(o[u],o[u])(new r.Index(s[u]));break;case 88:this.$=r.addLocationDataFn(o[u],o[u])(new r.Slice(s[u]));break;case 89:this.$=r.addLocationDataFn(o[u-3],o[u])(new r.Obj(s[u-2],s[u-3].generated));break;case 90:this.$=r.addLocationDataFn(o[u],o[u])([]);break;case 91:this.$=r.addLocationDataFn(o[u],o[u])([s[u]]);break;case 92:this.$=r.addLocationDataFn(o[u-2],o[u])(s[u-2].concat(s[u]));break;case 93:this.$=r.addLocationDataFn(o[u-3],o[u])(s[u-3].concat(s[u]));break;case 94:this.$=r.addLocationDataFn(o[u-5],o[u])(s[u-5].concat(s[u-2]));break;case 95:this.$=r.addLocationDataFn(o[u],o[u])(new r.Class);break;case 96:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Class(null,null,s[u]));break;case 97:this.$=r.addLocationDataFn(o[u-2],o[u])(new r.Class(null,s[u]));break;case 98:this.$=r.addLocationDataFn(o[u-3],o[u])(new r.Class(null,s[u-1],s[u]));break;case 99:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Class(s[u]));break;case 100:this.$=r.addLocationDataFn(o[u-2],o[u])(new r.Class(s[u-1],null,s[u]));break;case 101:this.$=r.addLocationDataFn(o[u-3],o[u])(new r.Class(s[u-2],s[u]));break;case 102:this.$=r.addLocationDataFn(o[u-4],o[u])(new r.Class(s[u-3],s[u-1],s[u]));break;case 103:this.$=r.addLocationDataFn(o[u-2],o[u])(new r.Call(s[u-2],s[u],s[u-1]));break;case 104:this.$=r.addLocationDataFn(o[u-2],o[u])(new r.Call(s[u-2],s[u],s[u-1]));break;case 105:this.$=r.addLocationDataFn(o[u],o[u])(new r.Call("super",[new r.Splat(new r.Literal("arguments"))]));break;case 106:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Call("super",s[u]));break;case 107:this.$=r.addLocationDataFn(o[u],o[u])(!1);break;case 108:this.$=r.addLocationDataFn(o[u],o[u])(!0);break;case 109:this.$=r.addLocationDataFn(o[u-1],o[u])([]);break;case 110:this.$=r.addLocationDataFn(o[u-3],o[u])(s[u-2]);break;case 111:this.$=r.addLocationDataFn(o[u],o[u])(new r.Value(new r.Literal("this")));break;case 112:this.$=r.addLocationDataFn(o[u],o[u])(new r.Value(new r.Literal("this")));break;case 113:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Value(r.addLocationDataFn(o[u-1])(new r.Literal("this")),[r.addLocationDataFn(o[u])(new r.Access(s[u]))],"this"));break;case 114:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Arr([]));break;case 115:this.$=r.addLocationDataFn(o[u-3],o[u])(new r.Arr(s[u-2]));break;case 116:this.$=r.addLocationDataFn(o[u],o[u])("inclusive");break;case 117:this.$=r.addLocationDataFn(o[u],o[u])("exclusive");break;case 118:this.$=r.addLocationDataFn(o[u-4],o[u])(new r.Range(s[u-3],s[u-1],s[u-2]));break;case 119:this.$=r.addLocationDataFn(o[u-2],o[u])(new r.Range(s[u-2],s[u],s[u-1]));break;case 120:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Range(s[u-1],null,s[u]));break;case 121:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Range(null,s[u],s[u-1]));break;case 122:this.$=r.addLocationDataFn(o[u],o[u])(new r.Range(null,null,s[u]));break;case 123:this.$=r.addLocationDataFn(o[u],o[u])([s[u]]);break;case 124:this.$=r.addLocationDataFn(o[u-2],o[u])(s[u-2].concat(s[u]));break;case 125:this.$=r.addLocationDataFn(o[u-3],o[u])(s[u-3].concat(s[u]));break;case 126:this.$=r.addLocationDataFn(o[u-3],o[u])(s[u-2]);break;case 127:this.$=r.addLocationDataFn(o[u-5],o[u])(s[u-5].concat(s[u-2]));break;case 128:this.$=s[u];break;case 129:this.$=s[u];break;case 130:this.$=s[u];break;case 131:this.$=r.addLocationDataFn(o[u-2],o[u])([].concat(s[u-2],s[u]));break;case 132:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Try(s[u]));break;case 133:this.$=r.addLocationDataFn(o[u-2],o[u])(new r.Try(s[u-1],s[u][0],s[u][1]));break;case 134:this.$=r.addLocationDataFn(o[u-3],o[u])(new r.Try(s[u-2],null,null,s[u]));break;case 135:this.$=r.addLocationDataFn(o[u-4],o[u])(new r.Try(s[u-3],s[u-2][0],s[u-2][1],s[u]));break;case 136:this.$=r.addLocationDataFn(o[u-2],o[u])([s[u-1],s[u]]);break;case 137:this.$=r.addLocationDataFn(o[u-2],o[u])([r.addLocationDataFn(o[u-1])(new r.Value(s[u-1])),s[u]]);break;case 138:this.$=r.addLocationDataFn(o[u-1],o[u])([null,s[u]]);break;case 139:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Throw(s[u]));break;case 140:this.$=r.addLocationDataFn(o[u-2],o[u])(new r.Parens(s[u-1]));break;case 141:this.$=r.addLocationDataFn(o[u-4],o[u])(new r.Parens(s[u-2]));break;case 142:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.While(s[u]));break;case 143:this.$=r.addLocationDataFn(o[u-3],o[u])(new r.While(s[u-2],{guard:s[u]}));break;case 144:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.While(s[u],{invert:!0}));break;case 145:this.$=r.addLocationDataFn(o[u-3],o[u])(new r.While(s[u-2],{invert:!0,guard:s[u]}));break;case 146:this.$=r.addLocationDataFn(o[u-1],o[u])(s[u-1].addBody(s[u]));break;case 147:this.$=r.addLocationDataFn(o[u-1],o[u])(s[u].addBody(r.addLocationDataFn(o[u-1])(r.Block.wrap([s[u-1]]))));break;case 148:this.$=r.addLocationDataFn(o[u-1],o[u])(s[u].addBody(r.addLocationDataFn(o[u-1])(r.Block.wrap([s[u-1]]))));break;case 149:this.$=r.addLocationDataFn(o[u],o[u])(s[u]);break;case 150:this.$=r.addLocationDataFn(o[u-1],o[u])((new r.While(r.addLocationDataFn(o[u-1])(new r.Literal("true")))).addBody(s[u]));break;case 151:this.$=r.addLocationDataFn(o[u-1],o[u])((new r.While(r.addLocationDataFn(o[u-1])(new r.Literal("true")))).addBody(r.addLocationDataFn(o[u])(r.Block.wrap([s[u]]))));break;case 152:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.For(s[u-1],s[u]));break;case 153:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.For(s[u-1],s[u]));break;case 154:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.For(s[u],s[u-1]));break;case 155:this.$=r.addLocationDataFn(o[u-1],o[u])({source:r.addLocationDataFn(o[u])(new r.Value(s[u]))});break;case 156:this.$=r.addLocationDataFn(o[u-1],o[u])(function(){return s[u].own=s[u-1].own,s[u].name=s[u-1][0],s[u].index=s[u-1][1],s[u]}());break;case 157:this.$=r.addLocationDataFn(o[u-1],o[u])(s[u]);break;case 158:this.$=r.addLocationDataFn(o[u-2],o[u])(function(){return s[u].own=!0,s[u]}());break;case 159:this.$=s[u];break;case 160:this.$=s[u];break;case 161:this.$=r.addLocationDataFn(o[u],o[u])(new r.Value(s[u]));break;case 162:this.$=r.addLocationDataFn(o[u],o[u])(new r.Value(s[u]));break;case 163:this.$=r.addLocationDataFn(o[u],o[u])([s[u]]);break;case 164:this.$=r.addLocationDataFn(o[u-2],o[u])([s[u-2],s[u]]);break;case 165:this.$=r.addLocationDataFn(o[u-1],o[u])({source:s[u]});break;case 166:this.$=r.addLocationDataFn(o[u-1],o[u])({source:s[u],object:!0});break;case 167:this.$=r.addLocationDataFn(o[u-3],o[u])({source:s[u-2],guard:s[u]});break;case 168:this.$=r.addLocationDataFn(o[u-3],o[u])({source:s[u-2],guard:s[u],object:!0});break;case 169:this.$=r.addLocationDataFn(o[u-3],o[u])({source:s[u-2],step:s[u]});break;case 170:this.$=r.addLocationDataFn(o[u-5],o[u])({source:s[u-4],guard:s[u-2],step:s[u]});break;case 171:this.$=r.addLocationDataFn(o[u-5],o[u])({source:s[u-4],step:s[u-2],guard:s[u]});break;case 172:this.$=r.addLocationDataFn(o[u-4],o[u])(new r.Switch(s[u-3],s[u-1]));break;case 173:this.$=r.addLocationDataFn(o[u-6],o[u])(new r.Switch(s[u-5],s[u-3],s[u-1]));break;case 174:this.$=r.addLocationDataFn(o[u-3],o[u])(new r.Switch(null,s[u-1]));break;case 175:this.$=r.addLocationDataFn(o[u-5],o[u])(new r.Switch(null,s[u-3],s[u-1]));break;case 176:this.$=s[u];break;case 177:this.$=r.addLocationDataFn(o[u-1],o[u])(s[u-1].concat(s[u]));break;case 178:this.$=r.addLocationDataFn(o[u-2],o[u])([[s[u-1],s[u]]]);break;case 179:this.$=r.addLocationDataFn(o[u-3],o[u])([[s[u-2],s[u-1]]]);break;case 180:this.$=r.addLocationDataFn(o[u-2],o[u])(new r.If(s[u-1],s[u],{type:s[u-2]}));break;case 181:this.$=r.addLocationDataFn(o[u-4],o[u])(s[u-4].addElse(r.addLocationDataFn(o[u-2],o[u])(new r.If(s[u-1],s[u],{type:s[u-2]}))));break;case 182:this.$=s[u];break;case 183:this.$=r.addLocationDataFn(o[u-2],o[u])(s[u-2].addElse(s[u]));break;case 184:this.$=r.addLocationDataFn(o[u-2],o[u])(new r.If(s[u],r.addLocationDataFn(o[u-2])(r.Block.wrap([s[u-2]])),{type:s[u-1],statement:!0}));break;case 185:this.$=r.addLocationDataFn(o[u-2],o[u])(new r.If(s[u],r.addLocationDataFn(o[u-2])(r.Block.wrap([s[u-2]])),{type:s[u-1],statement:!0}));break;case 186:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Op(s[u-1],s[u]));break;case 187:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Op("-",s[u]));break;case 188:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Op("+",s[u]));break;case 189:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Op("--",s[u]));break;case 190:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Op("++",s[u]));break;case 191:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Op("--",s[u-1],null,!0));break;case 192:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Op("++",s[u-1],null,!0));break;case 193:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Existence(s[u-1]));break;case 194:this.$=r.addLocationDataFn(o[u-2],o[u])(new r.Op("+",s[u-2],s[u]));break;case 195:this.$=r.addLocationDataFn(o[u-2],o[u])(new r.Op("-",s[u-2],s[u]));break;case 196:this.$=r.addLocationDataFn(o[u-2],o[u])(new r.Op(s[u-1],s[u-2],s[u]));break;case 197:this.$=r.addLocationDataFn(o[u-2],o[u])(new r.Op(s[u-1],s[u-2],s[u]));break;case 198:this.$=r.addLocationDataFn(o[u-2],o[u])(new r.Op(s[u-1],s[u-2],s[u]));break;case 199:this.$=r.addLocationDataFn(o[u-2],o[u])(new r.Op(s[u-1],s[u-2],s[u]));break;case 200:this.$=r.addLocationDataFn(o[u-2],o[u])(function(){return s[u-1].charAt(0)==="!"?(new r.Op(s[u-1].slice(1),s[u-2],s[u])).invert():new r.Op(s[u-1],s[u-2],s[u])}());break;case 201:this.$=r.addLocationDataFn(o[u-2],o[u])(new r.Assign(s[u-2],s[u],s[u-1]));break;case 202:this.$=r.addLocationDataFn(o[u-4],o[u])(new r.Assign(s[u-4],s[u-1],s[u-3]));break;case 203:this.$=r.addLocationDataFn(o[u-3],o[u])(new r.Assign(s[u-3],s[u],s[u-2]));break;case 204:this.$=r.addLocationDataFn(o[u-2],o[u])(new r.Extends(s[u-2],s[u]))}},table:[{1:[2,1],3:1,4:2,5:3,7:4,8:5,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[3]},{1:[2,2],6:[1,72]},{1:[2,3],6:[2,3],26:[2,3],102:[2,3]},{1:[2,6],6:[2,6],26:[2,6],102:[2,6],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,7],6:[2,7],26:[2,7],102:[2,7],103:85,104:[1,63],106:[1,64],109:86,110:[1,66],111:67,126:[1,84]},{1:[2,11],6:[2,11],25:[2,11],26:[2,11],49:[2,11],54:[2,11],57:[2,11],62:88,66:[1,90],67:[1,91],68:[1,92],69:[1,93],70:94,71:[1,95],73:[2,11],74:[1,96],78:[2,11],81:87,84:[1,89],85:[2,107],86:[2,11],91:[2,11],93:[2,11],102:[2,11],104:[2,11],105:[2,11],106:[2,11],110:[2,11],118:[2,11],126:[2,11],128:[2,11],129:[2,11],132:[2,11],133:[2,11],134:[2,11],135:[2,11],136:[2,11],137:[2,11]},{1:[2,12],6:[2,12],25:[2,12],26:[2,12],49:[2,12],54:[2,12],57:[2,12],62:98,66:[1,90],67:[1,91],68:[1,92],69:[1,93],70:94,71:[1,95],73:[2,12],74:[1,96],78:[2,12],81:97,84:[1,89],85:[2,107],86:[2,12],91:[2,12],93:[2,12],102:[2,12],104:[2,12],105:[2,12],106:[2,12],110:[2,12],118:[2,12],126:[2,12],128:[2,12],129:[2,12],132:[2,12],133:[2,12],134:[2,12],135:[2,12],136:[2,12],137:[2,12]},{1:[2,13],6:[2,13],25:[2,13],26:[2,13],49:[2,13],54:[2,13],57:[2,13],73:[2,13],78:[2,13],86:[2,13],91:[2,13],93:[2,13],102:[2,13],104:[2,13],105:[2,13],106:[2,13],110:[2,13],118:[2,13],126:[2,13],128:[2,13],129:[2,13],132:[2,13],133:[2,13],134:[2,13],135:[2,13],136:[2,13],137:[2,13]},{1:[2,14],6:[2,14],25:[2,14],26:[2,14],49:[2,14],54:[2,14],57:[2,14],73:[2,14],78:[2,14],86:[2,14],91:[2,14],93:[2,14],102:[2,14],104:[2,14],105:[2,14],106:[2,14],110:[2,14],118:[2,14],126:[2,14],128:[2,14],129:[2,14],132:[2,14],133:[2,14],134:[2,14],135:[2,14],136:[2,14],137:[2,14]},{1:[2,15],6:[2,15],25:[2,15],26:[2,15],49:[2,15],54:[2,15],57:[2,15],73:[2,15],78:[2,15],86:[2,15],91:[2,15],93:[2,15],102:[2,15],104:[2,15],105:[2,15],106:[2,15],110:[2,15],118:[2,15],126:[2,15],128:[2,15],129:[2,15],132:[2,15],133:[2,15],134:[2,15],135:[2,15],136:[2,15],137:[2,15]},{1:[2,16],6:[2,16],25:[2,16],26:[2,16],49:[2,16],54:[2,16],57:[2,16],73:[2,16],78:[2,16],86:[2,16],91:[2,16],93:[2,16],102:[2,16],104:[2,16],105:[2,16],106:[2,16],110:[2,16],118:[2,16],126:[2,16],128:[2,16],129:[2,16],132:[2,16],133:[2,16],134:[2,16],135:[2,16],136:[2,16],137:[2,16]},{1:[2,17],6:[2,17],25:[2,17],26:[2,17],49:[2,17],54:[2,17],57:[2,17],73:[2,17],78:[2,17],86:[2,17],91:[2,17],93:[2,17],102:[2,17],104:[2,17],105:[2,17],106:[2,17],110:[2,17],118:[2,17],126:[2,17],128:[2,17],129:[2,17],132:[2,17],133:[2,17],134:[2,17],135:[2,17],136:[2,17],137:[2,17]},{1:[2,18],6:[2,18],25:[2,18],26:[2,18],49:[2,18],54:[2,18],57:[2,18],73:[2,18],78:[2,18],86:[2,18],91:[2,18],93:[2,18],102:[2,18],104:[2,18],105:[2,18],106:[2,18],110:[2,18],118:[2,18],126:[2,18],128:[2,18],129:[2,18],132:[2,18],133:[2,18],134:[2,18],135:[2,18],136:[2,18],137:[2,18]},{1:[2,19],6:[2,19],25:[2,19],26:[2,19],49:[2,19],54:[2,19],57:[2,19],73:[2,19],78:[2,19],86:[2,19],91:[2,19],93:[2,19],102:[2,19],104:[2,19],105:[2,19],106:[2,19],110:[2,19],118:[2,19],126:[2,19],128:[2,19],129:[2,19],132:[2,19],133:[2,19],134:[2,19],135:[2,19],136:[2,19],137:[2,19]},{1:[2,20],6:[2,20],25:[2,20],26:[2,20],49:[2,20],54:[2,20],57:[2,20],73:[2,20],78:[2,20],86:[2,20],91:[2,20],93:[2,20],102:[2,20],104:[2,20],105:[2,20],106:[2,20],110:[2,20],118:[2,20],126:[2,20],128:[2,20],129:[2,20],132:[2,20],133:[2,20],134:[2,20],135:[2,20],136:[2,20],137:[2,20]},{1:[2,21],6:[2,21],25:[2,21],26:[2,21],49:[2,21],54:[2,21],57:[2,21],73:[2,21],78:[2,21],86:[2,21],91:[2,21],93:[2,21],102:[2,21],104:[2,21],105:[2,21],106:[2,21],110:[2,21],118:[2,21],126:[2,21],128:[2,21],129:[2,21],132:[2,21],133:[2,21],134:[2,21],135:[2,21],136:[2,21],137:[2,21]},{1:[2,22],6:[2,22],25:[2,22],26:[2,22],49:[2,22],54:[2,22],57:[2,22],73:[2,22],78:[2,22],86:[2,22],91:[2,22],93:[2,22],102:[2,22],104:[2,22],105:[2,22],106:[2,22],110:[2,22],118:[2,22],126:[2,22],128:[2,22],129:[2,22],132:[2,22],133:[2,22],134:[2,22],135:[2,22],136:[2,22],137:[2,22]},{1:[2,8],6:[2,8],26:[2,8],102:[2,8],104:[2,8],106:[2,8],110:[2,8],126:[2,8]},{1:[2,9],6:[2,9],26:[2,9],102:[2,9],104:[2,9],106:[2,9],110:[2,9],126:[2,9]},{1:[2,10],6:[2,10],26:[2,10],102:[2,10],104:[2,10],106:[2,10],110:[2,10],126:[2,10]},{1:[2,74],6:[2,74],25:[2,74],26:[2,74],40:[1,99],49:[2,74],54:[2,74],57:[2,74],66:[2,74],67:[2,74],68:[2,74],69:[2,74],71:[2,74],73:[2,74],74:[2,74],78:[2,74],84:[2,74],85:[2,74],86:[2,74],91:[2,74],93:[2,74],102:[2,74],104:[2,74],105:[2,74],106:[2,74],110:[2,74],118:[2,74],126:[2,74],128:[2,74],129:[2,74],132:[2,74],133:[2,74],134:[2,74],135:[2,74],136:[2,74],137:[2,74]},{1:[2,75],6:[2,75],25:[2,75],26:[2,75],49:[2,75],54:[2,75],57:[2,75],66:[2,75],67:[2,75],68:[2,75],69:[2,75],71:[2,75],73:[2,75],74:[2,75],78:[2,75],84:[2,75],85:[2,75],86:[2,75],91:[2,75],93:[2,75],102:[2,75],104:[2,75],105:[2,75],106:[2,75],110:[2,75],118:[2,75],126:[2,75],128:[2,75],129:[2,75],132:[2,75],133:[2,75],134:[2,75],135:[2,75],136:[2,75],137:[2,75]},{1:[2,76],6:[2,76],25:[2,76],26:[2,76],49:[2,76],54:[2,76],57:[2,76],66:[2,76],67:[2,76],68:[2,76],69:[2,76],71:[2,76],73:[2,76],74:[2,76],78:[2,76],84:[2,76],85:[2,76],86:[2,76],91:[2,76],93:[2,76],102:[2,76],104:[2,76],105:[2,76],106:[2,76],110:[2,76],118:[2,76],126:[2,76],128:[2,76],129:[2,76],132:[2,76],133:[2,76],134:[2,76],135:[2,76],136:[2,76],137:[2,76]},{1:[2,77],6:[2,77],25:[2,77],26:[2,77],49:[2,77],54:[2,77],57:[2,77],66:[2,77],67:[2,77],68:[2,77],69:[2,77],71:[2,77],73:[2,77],74:[2,77],78:[2,77],84:[2,77],85:[2,77],86:[2,77],91:[2,77],93:[2,77],102:[2,77],104:[2,77],105:[2,77],106:[2,77],110:[2,77],118:[2,77],126:[2,77],128:[2,77],129:[2,77],132:[2,77],133:[2,77],134:[2,77],135:[2,77],136:[2,77],137:[2,77]},{1:[2,78],6:[2,78],25:[2,78],26:[2,78],49:[2,78],54:[2,78],57:[2,78],66:[2,78],67:[2,78],68:[2,78],69:[2,78],71:[2,78],73:[2,78],74:[2,78],78:[2,78],84:[2,78],85:[2,78],86:[2,78],91:[2,78],93:[2,78],102:[2,78],104:[2,78],105:[2,78],106:[2,78],110:[2,78],118:[2,78],126:[2,78],128:[2,78],129:[2,78],132:[2,78],133:[2,78],134:[2,78],135:[2,78],136:[2,78],137:[2,78]},{1:[2,105],6:[2,105],25:[2,105],26:[2,105],49:[2,105],54:[2,105],57:[2,105],66:[2,105],67:[2,105],68:[2,105],69:[2,105],71:[2,105],73:[2,105],74:[2,105],78:[2,105],82:100,84:[2,105],85:[1,101],86:[2,105],91:[2,105],93:[2,105],102:[2,105],104:[2,105],105:[2,105],106:[2,105],110:[2,105],118:[2,105],126:[2,105],128:[2,105],129:[2,105],132:[2,105],133:[2,105],134:[2,105],135:[2,105],136:[2,105],137:[2,105]},{6:[2,54],25:[2,54],27:105,28:[1,71],44:106,48:102,49:[2,54],54:[2,54],55:103,56:104,58:107,59:108,76:[1,68],89:[1,109],90:[1,110]},{24:111,25:[1,112]},{7:113,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:115,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:116,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{12:118,13:119,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:120,44:61,58:45,59:46,61:117,63:23,64:24,65:25,76:[1,68],83:[1,26],88:[1,56],89:[1,57],90:[1,55],101:[1,54]},{12:118,13:119,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:120,44:61,58:45,59:46,61:121,63:23,64:24,65:25,76:[1,68],83:[1,26],88:[1,56],89:[1,57],90:[1,55],101:[1,54]},{1:[2,71],6:[2,71],25:[2,71],26:[2,71],40:[2,71],49:[2,71],54:[2,71],57:[2,71],66:[2,71],67:[2,71],68:[2,71],69:[2,71],71:[2,71],73:[2,71],74:[2,71],78:[2,71],80:[1,125],84:[2,71],85:[2,71],86:[2,71],91:[2,71],93:[2,71],102:[2,71],104:[2,71],105:[2,71],106:[2,71],110:[2,71],118:[2,71],126:[2,71],128:[2,71],129:[2,71],130:[1,122],131:[1,123],132:[2,71],133:[2,71],134:[2,71],135:[2,71],136:[2,71],137:[2,71],138:[1,124]},{1:[2,182],6:[2,182],25:[2,182],26:[2,182],49:[2,182],54:[2,182],57:[2,182],73:[2,182],78:[2,182],86:[2,182],91:[2,182],93:[2,182],102:[2,182],104:[2,182],105:[2,182],106:[2,182],110:[2,182],118:[2,182],121:[1,126],126:[2,182],128:[2,182],129:[2,182],132:[2,182],133:[2,182],134:[2,182],135:[2,182],136:[2,182],137:[2,182]},{24:127,25:[1,112]},{24:128,25:[1,112]},{1:[2,149],6:[2,149],25:[2,149],26:[2,149],49:[2,149],54:[2,149],57:[2,149],73:[2,149],78:[2,149],86:[2,149],91:[2,149],93:[2,149],102:[2,149],104:[2,149],105:[2,149],106:[2,149],110:[2,149],118:[2,149],126:[2,149],128:[2,149],129:[2,149],132:[2,149],133:[2,149],134:[2,149],135:[2,149],136:[2,149],137:[2,149]},{24:129,25:[1,112]},{7:130,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,131],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,95],6:[2,95],12:118,13:119,24:132,25:[1,112],26:[2,95],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:120,44:61,49:[2,95],54:[2,95],57:[2,95],58:45,59:46,61:134,63:23,64:24,65:25,73:[2,95],76:[1,68],78:[2,95],80:[1,133],83:[1,26],86:[2,95],88:[1,56],89:[1,57],90:[1,55],91:[2,95],93:[2,95],101:[1,54],102:[2,95],104:[2,95],105:[2,95],106:[2,95],110:[2,95],118:[2,95],126:[2,95],128:[2,95],129:[2,95],132:[2,95],133:[2,95],134:[2,95],135:[2,95],136:[2,95],137:[2,95]},{7:135,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,46],6:[2,46],7:136,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,26:[2,46],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],102:[2,46],103:37,104:[2,46],106:[2,46],107:38,108:[1,65],109:39,110:[2,46],111:67,119:[1,40],124:35,125:[1,62],126:[2,46],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,47],6:[2,47],25:[2,47],26:[2,47],54:[2,47],78:[2,47],102:[2,47],104:[2,47],106:[2,47],110:[2,47],126:[2,47]},{1:[2,72],6:[2,72],25:[2,72],26:[2,72],40:[2,72],49:[2,72],54:[2,72],57:[2,72],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,72],74:[2,72],78:[2,72],84:[2,72],85:[2,72],86:[2,72],91:[2,72],93:[2,72],102:[2,72],104:[2,72],105:[2,72],106:[2,72],110:[2,72],118:[2,72],126:[2,72],128:[2,72],129:[2,72],132:[2,72],133:[2,72],134:[2,72],135:[2,72],136:[2,72],137:[2,72]},{1:[2,73],6:[2,73],25:[2,73],26:[2,73],40:[2,73],49:[2,73],54:[2,73],57:[2,73],66:[2,73],67:[2,73],68:[2,73],69:[2,73],71:[2,73],73:[2,73],74:[2,73],78:[2,73],84:[2,73],85:[2,73],86:[2,73],91:[2,73],93:[2,73],102:[2,73],104:[2,73],105:[2,73],106:[2,73],110:[2,73],118:[2,73],126:[2,73],128:[2,73],129:[2,73],132:[2,73],133:[2,73],134:[2,73],135:[2,73],136:[2,73],137:[2,73]},{1:[2,28],6:[2,28],25:[2,28],26:[2,28],49:[2,28],54:[2,28],57:[2,28],66:[2,28],67:[2,28],68:[2,28],69:[2,28],71:[2,28],73:[2,28],74:[2,28],78:[2,28],84:[2,28],85:[2,28],86:[2,28],91:[2,28],93:[2,28],102:[2,28],104:[2,28],105:[2,28],106:[2,28],110:[2,28],118:[2,28],126:[2,28],128:[2,28],129:[2,28],132:[2,28],133:[2,28],134:[2,28],135:[2,28],136:[2,28],137:[2,28]},{1:[2,29],6:[2,29],25:[2,29],26:[2,29],49:[2,29],54:[2,29],57:[2,29],66:[2,29],67:[2,29],68:[2,29],69:[2,29],71:[2,29],73:[2,29],74:[2,29],78:[2,29],84:[2,29],85:[2,29],86:[2,29],91:[2,29],93:[2,29],102:[2,29],104:[2,29],105:[2,29],106:[2,29],110:[2,29],118:[2,29],126:[2,29],128:[2,29],129:[2,29],132:[2,29],133:[2,29],134:[2,29],135:[2,29],136:[2,29],137:[2,29]},{1:[2,30],6:[2,30],25:[2,30],26:[2,30],49:[2,30],54:[2,30],57:[2,30],66:[2,30],67:[2,30],68:[2,30],69:[2,30],71:[2,30],73:[2,30],74:[2,30],78:[2,30],84:[2,30],85:[2,30],86:[2,30],91:[2,30],93:[2,30],102:[2,30],104:[2,30],105:[2,30],106:[2,30],110:[2,30],118:[2,30],126:[2,30],128:[2,30],129:[2,30],132:[2,30],133:[2,30],134:[2,30],135:[2,30],136:[2,30],137:[2,30]},{1:[2,31],6:[2,31],25:[2,31],26:[2,31],49:[2,31],54:[2,31],57:[2,31],66:[2,31],67:[2,31],68:[2,31],69:[2,31],71:[2,31],73:[2,31],74:[2,31],78:[2,31],84:[2,31],85:[2,31],86:[2,31],91:[2,31],93:[2,31],102:[2,31],104:[2,31],105:[2,31],106:[2,31],110:[2,31],118:[2,31],126:[2,31],128:[2,31],129:[2,31],132:[2,31],133:[2,31],134:[2,31],135:[2,31],136:[2,31],137:[2,31]},{1:[2,32],6:[2,32],25:[2,32],26:[2,32],49:[2,32],54:[2,32],57:[2,32],66:[2,32],67:[2,32],68:[2,32],69:[2,32],71:[2,32],73:[2,32],74:[2,32],78:[2,32],84:[2,32],85:[2,32],86:[2,32],91:[2,32],93:[2,32],102:[2,32],104:[2,32],105:[2,32],106:[2,32],110:[2,32],118:[2,32],126:[2,32],128:[2,32],129:[2,32],132:[2,32],133:[2,32],134:[2,32],135:[2,32],136:[2,32],137:[2,32]},{1:[2,33],6:[2,33],25:[2,33],26:[2,33],49:[2,33],54:[2,33],57:[2,33],66:[2,33],67:[2,33],68:[2,33],69:[2,33],71:[2,33],73:[2,33],74:[2,33],78:[2,33],84:[2,33],85:[2,33],86:[2,33],91:[2,33],93:[2,33],102:[2,33],104:[2,33],105:[2,33],106:[2,33],110:[2,33],118:[2,33],126:[2,33],128:[2,33],129:[2,33],132:[2,33],133:[2,33],134:[2,33],135:[2,33],136:[2,33],137:[2,33]},{1:[2,34],6:[2,34],25:[2,34],26:[2,34],49:[2,34],54:[2,34],57:[2,34],66:[2,34],67:[2,34],68:[2,34],69:[2,34],71:[2,34],73:[2,34],74:[2,34],78:[2,34],84:[2,34],85:[2,34],86:[2,34],91:[2,34],93:[2,34],102:[2,34],104:[2,34],105:[2,34],106:[2,34],110:[2,34],118:[2,34],126:[2,34],128:[2,34],129:[2,34],132:[2,34],133:[2,34],134:[2,34],135:[2,34],136:[2,34],137:[2,34]},{4:137,5:3,7:4,8:5,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,138],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:139,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,143],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],87:141,88:[1,56],89:[1,57],90:[1,55],91:[1,140],94:142,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,111],6:[2,111],25:[2,111],26:[2,111],49:[2,111],54:[2,111],57:[2,111],66:[2,111],67:[2,111],68:[2,111],69:[2,111],71:[2,111],73:[2,111],74:[2,111],78:[2,111],84:[2,111],85:[2,111],86:[2,111],91:[2,111],93:[2,111],102:[2,111],104:[2,111],105:[2,111],106:[2,111],110:[2,111],118:[2,111],126:[2,111],128:[2,111],129:[2,111],132:[2,111],133:[2,111],134:[2,111],135:[2,111],136:[2,111],137:[2,111]},{1:[2,112],6:[2,112],25:[2,112],26:[2,112],27:145,28:[1,71],49:[2,112],54:[2,112],57:[2,112],66:[2,112],67:[2,112],68:[2,112],69:[2,112],71:[2,112],73:[2,112],74:[2,112],78:[2,112],84:[2,112],85:[2,112],86:[2,112],91:[2,112],93:[2,112],102:[2,112],104:[2,112],105:[2,112],106:[2,112],110:[2,112],118:[2,112],126:[2,112],128:[2,112],129:[2,112],132:[2,112],133:[2,112],134:[2,112],135:[2,112],136:[2,112],137:[2,112]},{25:[2,50]},{25:[2,51]},{1:[2,67],6:[2,67],25:[2,67],26:[2,67],40:[2,67],49:[2,67],54:[2,67],57:[2,67],66:[2,67],67:[2,67],68:[2,67],69:[2,67],71:[2,67],73:[2,67],74:[2,67],78:[2,67],80:[2,67],84:[2,67],85:[2,67],86:[2,67],91:[2,67],93:[2,67],102:[2,67],104:[2,67],105:[2,67],106:[2,67],110:[2,67],118:[2,67],126:[2,67],128:[2,67],129:[2,67],130:[2,67],131:[2,67],132:[2,67],133:[2,67],134:[2,67],135:[2,67],136:[2,67],137:[2,67],138:[2,67]},{1:[2,70],6:[2,70],25:[2,70],26:[2,70],40:[2,70],49:[2,70],54:[2,70],57:[2,70],66:[2,70],67:[2,70],68:[2,70],69:[2,70],71:[2,70],73:[2,70],74:[2,70],78:[2,70],80:[2,70],84:[2,70],85:[2,70],86:[2,70],91:[2,70],93:[2,70],102:[2,70],104:[2,70],105:[2,70],106:[2,70],110:[2,70],118:[2,70],126:[2,70],128:[2,70],129:[2,70],130:[2,70],131:[2,70],132:[2,70],133:[2,70],134:[2,70],135:[2,70],136:[2,70],137:[2,70],138:[2,70]},{7:146,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:147,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:148,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:150,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:149,25:[1,112],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{27:155,28:[1,71],44:156,58:157,59:158,64:151,76:[1,68],89:[1,109],90:[1,55],113:152,114:[1,153],115:154},{112:159,116:[1,160],117:[1,161]},{6:[2,90],10:165,25:[2,90],27:166,28:[1,71],29:167,30:[1,69],31:[1,70],41:163,42:164,44:168,46:[1,44],54:[2,90],77:162,78:[2,90],89:[1,109]},{1:[2,26],6:[2,26],25:[2,26],26:[2,26],43:[2,26],49:[2,26],54:[2,26],57:[2,26],66:[2,26],67:[2,26],68:[2,26],69:[2,26],71:[2,26],73:[2,26],74:[2,26],78:[2,26],84:[2,26],85:[2,26],86:[2,26],91:[2,26],93:[2,26],102:[2,26],104:[2,26],105:[2,26],106:[2,26],110:[2,26],118:[2,26],126:[2,26],128:[2,26],129:[2,26],132:[2,26],133:[2,26],134:[2,26],135:[2,26],136:[2,26],137:[2,26]},{1:[2,27],6:[2,27],25:[2,27],26:[2,27],43:[2,27],49:[2,27],54:[2,27],57:[2,27],66:[2,27],67:[2,27],68:[2,27],69:[2,27],71:[2,27],73:[2,27],74:[2,27],78:[2,27],84:[2,27],85:[2,27],86:[2,27],91:[2,27],93:[2,27],102:[2,27],104:[2,27],105:[2,27],106:[2,27],110:[2,27],118:[2,27],126:[2,27],128:[2,27],129:[2,27],132:[2,27],133:[2,27],134:[2,27],135:[2,27],136:[2,27],137:[2,27]},{1:[2,25],6:[2,25],25:[2,25],26:[2,25],40:[2,25],43:[2,25],49:[2,25],54:[2,25],57:[2,25],66:[2,25],67:[2,25],68:[2,25],69:[2,25],71:[2,25],73:[2,25],74:[2,25],78:[2,25],80:[2,25],84:[2,25],85:[2,25],86:[2,25],91:[2,25],93:[2,25],102:[2,25],104:[2,25],105:[2,25],106:[2,25],110:[2,25],116:[2,25],117:[2,25],118:[2,25],126:[2,25],128:[2,25],129:[2,25],130:[2,25],131:[2,25],132:[2,25],133:[2,25],134:[2,25],135:[2,25],136:[2,25],137:[2,25],138:[2,25]},{1:[2,5],5:169,6:[2,5],7:4,8:5,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,26:[2,5],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],102:[2,5],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,193],6:[2,193],25:[2,193],26:[2,193],49:[2,193],54:[2,193],57:[2,193],73:[2,193],78:[2,193],86:[2,193],91:[2,193],93:[2,193],102:[2,193],104:[2,193],105:[2,193],106:[2,193],110:[2,193],118:[2,193],126:[2,193],128:[2,193],129:[2,193],132:[2,193],133:[2,193],134:[2,193],135:[2,193],136:[2,193],137:[2,193]},{7:170,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:171,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:172,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:173,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:174,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:175,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:176,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:177,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,148],6:[2,148],25:[2,148],26:[2,148],49:[2,148],54:[2,148],57:[2,148],73:[2,148],78:[2,148],86:[2,148],91:[2,148],93:[2,148],102:[2,148],104:[2,148],105:[2,148],106:[2,148],110:[2,148],118:[2,148],126:[2,148],128:[2,148],129:[2,148],132:[2,148],133:[2,148],134:[2,148],135:[2,148],136:[2,148],137:[2,148]},{1:[2,153],6:[2,153],25:[2,153],26:[2,153],49:[2,153],54:[2,153],57:[2,153],73:[2,153],78:[2,153],86:[2,153],91:[2,153],93:[2,153],102:[2,153],104:[2,153],105:[2,153],106:[2,153],110:[2,153],118:[2,153],126:[2,153],128:[2,153],129:[2,153],132:[2,153],133:[2,153],134:[2,153],135:[2,153],136:[2,153],137:[2,153]},{7:178,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,147],6:[2,147],25:[2,147],26:[2,147],49:[2,147],54:[2,147],57:[2,147],73:[2,147],78:[2,147],86:[2,147],91:[2,147],93:[2,147],102:[2,147],104:[2,147],105:[2,147],106:[2,147],110:[2,147],118:[2,147],126:[2,147],128:[2,147],129:[2,147],132:[2,147],133:[2,147],134:[2,147],135:[2,147],136:[2,147],137:[2,147]},{1:[2,152],6:[2,152],25:[2,152],26:[2,152],49:[2,152],54:[2,152],57:[2,152],73:[2,152],78:[2,152],86:[2,152],91:[2,152],93:[2,152],102:[2,152],104:[2,152],105:[2,152],106:[2,152],110:[2,152],118:[2,152],126:[2,152],128:[2,152],129:[2,152],132:[2,152],133:[2,152],134:[2,152],135:[2,152],136:[2,152],137:[2,152]},{82:179,85:[1,101]},{1:[2,68],6:[2,68],25:[2,68],26:[2,68],40:[2,68],49:[2,68],54:[2,68],57:[2,68],66:[2,68],67:[2,68],68:[2,68],69:[2,68],71:[2,68],73:[2,68],74:[2,68],78:[2,68],80:[2,68],84:[2,68],85:[2,68],86:[2,68],91:[2,68],93:[2,68],102:[2,68],104:[2,68],105:[2,68],106:[2,68],110:[2,68],118:[2,68],126:[2,68],128:[2,68],129:[2,68],130:[2,68],131:[2,68],132:[2,68],133:[2,68],134:[2,68],135:[2,68],136:[2,68],137:[2,68],138:[2,68]},{85:[2,108]},{27:180,28:[1,71]},{27:181,28:[1,71]},{1:[2,83],6:[2,83],25:[2,83],26:[2,83],27:182,28:[1,71],40:[2,83],49:[2,83],54:[2,83],57:[2,83],66:[2,83],67:[2,83],68:[2,83],69:[2,83],71:[2,83],73:[2,83],74:[2,83],78:[2,83],80:[2,83],84:[2,83],85:[2,83],86:[2,83],91:[2,83],93:[2,83],102:[2,83],104:[2,83],105:[2,83],106:[2,83],110:[2,83],118:[2,83],126:[2,83],128:[2,83],129:[2,83],130:[2,83],131:[2,83],132:[2,83],133:[2,83],134:[2,83],135:[2,83],136:[2,83],137:[2,83],138:[2,83]},{27:183,28:[1,71]},{1:[2,84],6:[2,84],25:[2,84],26:[2,84],40:[2,84],49:[2,84],54:[2,84],57:[2,84],66:[2,84],67:[2,84],68:[2,84],69:[2,84],71:[2,84],73:[2,84],74:[2,84],78:[2,84],80:[2,84],84:[2,84],85:[2,84],86:[2,84],91:[2,84],93:[2,84],102:[2,84],104:[2,84],105:[2,84],106:[2,84],110:[2,84],118:[2,84],126:[2,84],128:[2,84],129:[2,84],130:[2,84],131:[2,84],132:[2,84],133:[2,84],134:[2,84],135:[2,84],136:[2,84],137:[2,84],138:[2,84]},{7:185,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],57:[1,189],58:45,59:46,61:34,63:23,64:24,65:25,72:184,75:186,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],92:187,93:[1,188],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{70:190,71:[1,95],74:[1,96]},{82:191,85:[1,101]},{1:[2,69],6:[2,69],25:[2,69],26:[2,69],40:[2,69],49:[2,69],54:[2,69],57:[2,69],66:[2,69],67:[2,69],68:[2,69],69:[2,69],71:[2,69],73:[2,69],74:[2,69],78:[2,69],80:[2,69],84:[2,69],85:[2,69],86:[2,69],91:[2,69],93:[2,69],102:[2,69],104:[2,69],105:[2,69],106:[2,69],110:[2,69],118:[2,69],126:[2,69],128:[2,69],129:[2,69],130:[2,69],131:[2,69],132:[2,69],133:[2,69],134:[2,69],135:[2,69],136:[2,69],137:[2,69],138:[2,69]},{6:[1,193],7:192,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,194],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,106],6:[2,106],25:[2,106],26:[2,106],49:[2,106],54:[2,106],57:[2,106],66:[2,106],67:[2,106],68:[2,106],69:[2,106],71:[2,106],73:[2,106],74:[2,106],78:[2,106],84:[2,106],85:[2,106],86:[2,106],91:[2,106],93:[2,106],102:[2,106],104:[2,106],105:[2,106],106:[2,106],110:[2,106],118:[2,106],126:[2,106],128:[2,106],129:[2,106],132:[2,106],133:[2,106],134:[2,106],135:[2,106],136:[2,106],137:[2,106]},{7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,143],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],86:[1,195],87:196,88:[1,56],89:[1,57],90:[1,55],94:142,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,52],25:[2,52],49:[1,198],53:200,54:[1,199]},{6:[2,55],25:[2,55],26:[2,55],49:[2,55],54:[2,55]},{6:[2,59],25:[2,59],26:[2,59],40:[1,202],49:[2,59],54:[2,59],57:[1,201]},{6:[2,62],25:[2,62],26:[2,62],40:[2,62],49:[2,62],54:[2,62],57:[2,62]},{6:[2,63],25:[2,63],26:[2,63],40:[2,63],49:[2,63],54:[2,63],57:[2,63]},{6:[2,64],25:[2,64],26:[2,64],40:[2,64],49:[2,64],54:[2,64],57:[2,64]},{6:[2,65],25:[2,65],26:[2,65],40:[2,65],49:[2,65],54:[2,65],57:[2,65]},{27:145,28:[1,71]},{7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,143],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],87:141,88:[1,56],89:[1,57],90:[1,55],91:[1,140],94:142,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,49],6:[2,49],25:[2,49],26:[2,49],49:[2,49],54:[2,49],57:[2,49],73:[2,49],78:[2,49],86:[2,49],91:[2,49],93:[2,49],102:[2,49],104:[2,49],105:[2,49],106:[2,49],110:[2,49],118:[2,49],126:[2,49],128:[2,49],129:[2,49],132:[2,49],133:[2,49],134:[2,49],135:[2,49],136:[2,49],137:[2,49]},{4:204,5:3,7:4,8:5,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,26:[1,203],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,186],6:[2,186],25:[2,186],26:[2,186],49:[2,186],54:[2,186],57:[2,186],73:[2,186],78:[2,186],86:[2,186],91:[2,186],93:[2,186],102:[2,186],103:82,104:[2,186],105:[2,186],106:[2,186],109:83,110:[2,186],111:67,118:[2,186],126:[2,186],128:[2,186],129:[2,186],132:[1,73],133:[2,186],134:[2,186],135:[2,186],136:[2,186],137:[2,186]},{103:85,104:[1,63],106:[1,64],109:86,110:[1,66],111:67,126:[1,84]},{1:[2,187],6:[2,187],25:[2,187],26:[2,187],49:[2,187],54:[2,187],57:[2,187],73:[2,187],78:[2,187],86:[2,187],91:[2,187],93:[2,187],102:[2,187],103:82,104:[2,187],105:[2,187],106:[2,187],109:83,110:[2,187],111:67,118:[2,187],126:[2,187],128:[2,187],129:[2,187],132:[1,73],133:[2,187],134:[2,187],135:[2,187],136:[2,187],137:[2,187]},{1:[2,188],6:[2,188],25:[2,188],26:[2,188],49:[2,188],54:[2,188],57:[2,188],73:[2,188],78:[2,188],86:[2,188],91:[2,188],93:[2,188],102:[2,188],103:82,104:[2,188],105:[2,188],106:[2,188],109:83,110:[2,188],111:67,118:[2,188],126:[2,188],128:[2,188],129:[2,188],132:[1,73],133:[2,188],134:[2,188],135:[2,188],136:[2,188],137:[2,188]},{1:[2,189],6:[2,189],25:[2,189],26:[2,189],49:[2,189],54:[2,189],57:[2,189],66:[2,71],67:[2,71],68:[2,71],69:[2,71],71:[2,71],73:[2,189],74:[2,71],78:[2,189],84:[2,71],85:[2,71],86:[2,189],91:[2,189],93:[2,189],102:[2,189],104:[2,189],105:[2,189],106:[2,189],110:[2,189],118:[2,189],126:[2,189],128:[2,189],129:[2,189],132:[2,189],133:[2,189],134:[2,189],135:[2,189],136:[2,189],137:[2,189]},{62:88,66:[1,90],67:[1,91],68:[1,92],69:[1,93],70:94,71:[1,95],74:[1,96],81:87,84:[1,89],85:[2,107]},{62:98,66:[1,90],67:[1,91],68:[1,92],69:[1,93],70:94,71:[1,95],74:[1,96],81:97,84:[1,89],85:[2,107]},{66:[2,74],67:[2,74],68:[2,74],69:[2,74],71:[2,74],74:[2,74],84:[2,74],85:[2,74]},{1:[2,190],6:[2,190],25:[2,190],26:[2,190],49:[2,190],54:[2,190],57:[2,190],66:[2,71],67:[2,71],68:[2,71],69:[2,71],71:[2,71],73:[2,190],74:[2,71],78:[2,190],84:[2,71],85:[2,71],86:[2,190],91:[2,190],93:[2,190],102:[2,190],104:[2,190],105:[2,190],106:[2,190],110:[2,190],118:[2,190],126:[2,190],128:[2,190],129:[2,190],132:[2,190],133:[2,190],134:[2,190],135:[2,190],136:[2,190],137:[2,190]},{1:[2,191],6:[2,191],25:[2,191],26:[2,191],49:[2,191],54:[2,191],57:[2,191],73:[2,191],78:[2,191],86:[2,191],91:[2,191],93:[2,191],102:[2,191],104:[2,191],105:[2,191],106:[2,191],110:[2,191],118:[2,191],126:[2,191],128:[2,191],129:[2,191],132:[2,191],133:[2,191],134:[2,191],135:[2,191],136:[2,191],137:[2,191]},{1:[2,192],6:[2,192],25:[2,192],26:[2,192],49:[2,192],54:[2,192],57:[2,192],73:[2,192],78:[2,192],86:[2,192],91:[2,192],93:[2,192],102:[2,192],104:[2,192],105:[2,192],106:[2,192],110:[2,192],118:[2,192],126:[2,192],128:[2,192],129:[2,192],132:[2,192],133:[2,192],134:[2,192],135:[2,192],136:[2,192],137:[2,192]},{6:[1,207],7:205,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,206],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:208,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{24:209,25:[1,112],125:[1,210]},{1:[2,132],6:[2,132],25:[2,132],26:[2,132],49:[2,132],54:[2,132],57:[2,132],73:[2,132],78:[2,132],86:[2,132],91:[2,132],93:[2,132],97:211,98:[1,212],99:[1,213],102:[2,132],104:[2,132],105:[2,132],106:[2,132],110:[2,132],118:[2,132],126:[2,132],128:[2,132],129:[2,132],132:[2,132],133:[2,132],134:[2,132],135:[2,132],136:[2,132],137:[2,132]},{1:[2,146],6:[2,146],25:[2,146],26:[2,146],49:[2,146],54:[2,146],57:[2,146],73:[2,146],78:[2,146],86:[2,146],91:[2,146],93:[2,146],102:[2,146],104:[2,146],105:[2,146],106:[2,146],110:[2,146],118:[2,146],126:[2,146],128:[2,146],129:[2,146],132:[2,146],133:[2,146],134:[2,146],135:[2,146],136:[2,146],137:[2,146]},{1:[2,154],6:[2,154],25:[2,154],26:[2,154],49:[2,154],54:[2,154],57:[2,154],73:[2,154],78:[2,154],86:[2,154],91:[2,154],93:[2,154],102:[2,154],104:[2,154],105:[2,154],106:[2,154],110:[2,154],118:[2,154],126:[2,154],128:[2,154],129:[2,154],132:[2,154],133:[2,154],134:[2,154],135:[2,154],136:[2,154],137:[2,154]},{25:[1,214],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{120:215,122:216,123:[1,217]},{1:[2,96],6:[2,96],25:[2,96],26:[2,96],49:[2,96],54:[2,96],57:[2,96],73:[2,96],78:[2,96],86:[2,96],91:[2,96],93:[2,96],102:[2,96],104:[2,96],105:[2,96],106:[2,96],110:[2,96],118:[2,96],126:[2,96],128:[2,96],129:[2,96],132:[2,96],133:[2,96],134:[2,96],135:[2,96],136:[2,96],137:[2,96]},{7:218,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,99],6:[2,99],24:219,25:[1,112],26:[2,99],49:[2,99],54:[2,99],57:[2,99],66:[2,71],67:[2,71],68:[2,71],69:[2,71],71:[2,71],73:[2,99],74:[2,71],78:[2,99],80:[1,220],84:[2,71],85:[2,71],86:[2,99],91:[2,99],93:[2,99],102:[2,99],104:[2,99],105:[2,99],106:[2,99],110:[2,99],118:[2,99],126:[2,99],128:[2,99],129:[2,99],132:[2,99],133:[2,99],134:[2,99],135:[2,99],136:[2,99],137:[2,99]},{1:[2,139],6:[2,139],25:[2,139],26:[2,139],49:[2,139],54:[2,139],57:[2,139],73:[2,139],78:[2,139],86:[2,139],91:[2,139],93:[2,139],102:[2,139],103:82,104:[2,139],105:[2,139],106:[2,139],109:83,110:[2,139],111:67,118:[2,139],126:[2,139],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,45],6:[2,45],26:[2,45],102:[2,45],103:82,104:[2,45],106:[2,45],109:83,110:[2,45],111:67,126:[2,45],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[1,72],102:[1,221]},{4:222,5:3,7:4,8:5,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,128],25:[2,128],54:[2,128],57:[1,224],91:[2,128],92:223,93:[1,188],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,114],6:[2,114],25:[2,114],26:[2,114],40:[2,114],49:[2,114],54:[2,114],57:[2,114],66:[2,114],67:[2,114],68:[2,114],69:[2,114],71:[2,114],73:[2,114],74:[2,114],78:[2,114],84:[2,114],85:[2,114],86:[2,114],91:[2,114],93:[2,114],102:[2,114],104:[2,114],105:[2,114],106:[2,114],110:[2,114],116:[2,114],117:[2,114],118:[2,114],126:[2,114],128:[2,114],129:[2,114],132:[2,114],133:[2,114],134:[2,114],135:[2,114],136:[2,114],137:[2,114]},{6:[2,52],25:[2,52],53:225,54:[1,226],91:[2,52]},{6:[2,123],25:[2,123],26:[2,123],54:[2,123],86:[2,123],91:[2,123]},{7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,143],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],87:227,88:[1,56],89:[1,57],90:[1,55],94:142,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,129],25:[2,129],26:[2,129],54:[2,129],86:[2,129],91:[2,129]},{1:[2,113],6:[2,113],25:[2,113],26:[2,113],40:[2,113],43:[2,113],49:[2,113],54:[2,113],57:[2,113],66:[2,113],67:[2,113],68:[2,113],69:[2,113],71:[2,113],73:[2,113],74:[2,113],78:[2,113],80:[2,113],84:[2,113],85:[2,113],86:[2,113],91:[2,113],93:[2,113],102:[2,113],104:[2,113],105:[2,113],106:[2,113],110:[2,113],116:[2,113],117:[2,113],118:[2,113],126:[2,113],128:[2,113],129:[2,113],130:[2,113],131:[2,113],132:[2,113],133:[2,113],134:[2,113],135:[2,113],136:[2,113],137:[2,113],138:[2,113]},{24:228,25:[1,112],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,142],6:[2,142],25:[2,142],26:[2,142],49:[2,142],54:[2,142],57:[2,142],73:[2,142],78:[2,142],86:[2,142],91:[2,142],93:[2,142],102:[2,142],103:82,104:[1,63],105:[1,229],106:[1,64],109:83,110:[1,66],111:67,118:[2,142],126:[2,142],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,144],6:[2,144],25:[2,144],26:[2,144],49:[2,144],54:[2,144],57:[2,144],73:[2,144],78:[2,144],86:[2,144],91:[2,144],93:[2,144],102:[2,144],103:82,104:[1,63],105:[1,230],106:[1,64],109:83,110:[1,66],111:67,118:[2,144],126:[2,144],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,150],6:[2,150],25:[2,150],26:[2,150],49:[2,150],54:[2,150],57:[2,150],73:[2,150],78:[2,150],86:[2,150],91:[2,150],93:[2,150],102:[2,150],104:[2,150],105:[2,150],106:[2,150],110:[2,150],118:[2,150],126:[2,150],128:[2,150],129:[2,150],132:[2,150],133:[2,150],134:[2,150],135:[2,150],136:[2,150],137:[2,150]},{1:[2,151],6:[2,151],25:[2,151],26:[2,151],49:[2,151],54:[2,151],57:[2,151],73:[2,151],78:[2,151],86:[2,151],91:[2,151],93:[2,151],102:[2,151],103:82,104:[1,63],105:[2,151],106:[1,64],109:83,110:[1,66],111:67,118:[2,151],126:[2,151],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,155],6:[2,155],25:[2,155],26:[2,155],49:[2,155],54:[2,155],57:[2,155],73:[2,155],78:[2,155],86:[2,155],91:[2,155],93:[2,155],102:[2,155],104:[2,155],105:[2,155],106:[2,155],110:[2,155],118:[2,155],126:[2,155],128:[2,155],129:[2,155],132:[2,155],133:[2,155],134:[2,155],135:[2,155],136:[2,155],137:[2,155]},{116:[2,157],117:[2,157]},{27:155,28:[1,71],44:156,58:157,59:158,76:[1,68],89:[1,109],90:[1,110],113:231,115:154},{54:[1,232],116:[2,163],117:[2,163]},{54:[2,159],116:[2,159],117:[2,159]},{54:[2,160],116:[2,160],117:[2,160]},{54:[2,161],116:[2,161],117:[2,161]},{54:[2,162],116:[2,162],117:[2,162]},{1:[2,156],6:[2,156],25:[2,156],26:[2,156],49:[2,156],54:[2,156],57:[2,156],73:[2,156],78:[2,156],86:[2,156],91:[2,156],93:[2,156],102:[2,156],104:[2,156],105:[2,156],106:[2,156],110:[2,156],118:[2,156],126:[2,156],128:[2,156],129:[2,156],132:[2,156],133:[2,156],134:[2,156],135:[2,156],136:[2,156],137:[2,156]},{7:233,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:234,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,52],25:[2,52],53:235,54:[1,236],78:[2,52]},{6:[2,91],25:[2,91],26:[2,91],54:[2,91],78:[2,91]},{6:[2,38],25:[2,38],26:[2,38],43:[1,237],54:[2,38],78:[2,38]},{6:[2,41],25:[2,41],26:[2,41],54:[2,41],78:[2,41]},{6:[2,42],25:[2,42],26:[2,42],43:[2,42],54:[2,42],78:[2,42]},{6:[2,43],25:[2,43],26:[2,43],43:[2,43],54:[2,43],78:[2,43]},{6:[2,44],25:[2,44],26:[2,44],43:[2,44],54:[2,44],78:[2,44]},{1:[2,4],6:[2,4],26:[2,4],102:[2,4]},{1:[2,194],6:[2,194],25:[2,194],26:[2,194],49:[2,194],54:[2,194],57:[2,194],73:[2,194],78:[2,194],86:[2,194],91:[2,194],93:[2,194],102:[2,194],103:82,104:[2,194],105:[2,194],106:[2,194],109:83,110:[2,194],111:67,118:[2,194],126:[2,194],128:[2,194],129:[2,194],132:[1,73],133:[1,76],134:[2,194],135:[2,194],136:[2,194],137:[2,194]},{1:[2,195],6:[2,195],25:[2,195],26:[2,195],49:[2,195],54:[2,195],57:[2,195],73:[2,195],78:[2,195],86:[2,195],91:[2,195],93:[2,195],102:[2,195],103:82,104:[2,195],105:[2,195],106:[2,195],109:83,110:[2,195],111:67,118:[2,195],126:[2,195],128:[2,195],129:[2,195],132:[1,73],133:[1,76],134:[2,195],135:[2,195],136:[2,195],137:[2,195]},{1:[2,196],6:[2,196],25:[2,196],26:[2,196],49:[2,196],54:[2,196],57:[2,196],73:[2,196],78:[2,196],86:[2,196],91:[2,196],93:[2,196],102:[2,196],103:82,104:[2,196],105:[2,196],106:[2,196],109:83,110:[2,196],111:67,118:[2,196],126:[2,196],128:[2,196],129:[2,196],132:[1,73],133:[2,196],134:[2,196],135:[2,196],136:[2,196],137:[2,196]},{1:[2,197],6:[2,197],25:[2,197],26:[2,197],49:[2,197],54:[2,197],57:[2,197],73:[2,197],78:[2,197],86:[2,197],91:[2,197],93:[2,197],102:[2,197],103:82,104:[2,197],105:[2,197],106:[2,197],109:83,110:[2,197],111:67,118:[2,197],126:[2,197],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[2,197],135:[2,197],136:[2,197],137:[2,197]},{1:[2,198],6:[2,198],25:[2,198],26:[2,198],49:[2,198],54:[2,198],57:[2,198],73:[2,198],78:[2,198],86:[2,198],91:[2,198],93:[2,198],102:[2,198],103:82,104:[2,198],105:[2,198],106:[2,198],109:83,110:[2,198],111:67,118:[2,198],126:[2,198],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[2,198],136:[2,198],137:[1,80]},{1:[2,199],6:[2,199],25:[2,199],26:[2,199],49:[2,199],54:[2,199],57:[2,199],73:[2,199],78:[2,199],86:[2,199],91:[2,199],93:[2,199],102:[2,199],103:82,104:[2,199],105:[2,199],106:[2,199],109:83,110:[2,199],111:67,118:[2,199],126:[2,199],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[2,199],137:[1,80]},{1:[2,200],6:[2,200],25:[2,200],26:[2,200],49:[2,200],54:[2,200],57:[2,200],73:[2,200],78:[2,200],86:[2,200],91:[2,200],93:[2,200],102:[2,200],103:82,104:[2,200],105:[2,200],106:[2,200],109:83,110:[2,200],111:67,118:[2,200],126:[2,200],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[2,200],136:[2,200],137:[2,200]},{1:[2,185],6:[2,185],25:[2,185],26:[2,185],49:[2,185],54:[2,185],57:[2,185],73:[2,185],78:[2,185],86:[2,185],91:[2,185],93:[2,185],102:[2,185],103:82,104:[1,63],105:[2,185],106:[1,64],109:83,110:[1,66],111:67,118:[2,185],126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,184],6:[2,184],25:[2,184],26:[2,184],49:[2,184],54:[2,184],57:[2,184],73:[2,184],78:[2,184],86:[2,184],91:[2,184],93:[2,184],102:[2,184],103:82,104:[1,63],105:[2,184],106:[1,64],109:83,110:[1,66],111:67,118:[2,184],126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,103],6:[2,103],25:[2,103],26:[2,103],49:[2,103],54:[2,103],57:[2,103],66:[2,103],67:[2,103],68:[2,103],69:[2,103],71:[2,103],73:[2,103],74:[2,103],78:[2,103],84:[2,103],85:[2,103],86:[2,103],91:[2,103],93:[2,103],102:[2,103],104:[2,103],105:[2,103],106:[2,103],110:[2,103],118:[2,103],126:[2,103],128:[2,103],129:[2,103],132:[2,103],133:[2,103],134:[2,103],135:[2,103],136:[2,103],137:[2,103]},{1:[2,79],6:[2,79],25:[2,79],26:[2,79],40:[2,79],49:[2,79],54:[2,79],57:[2,79],66:[2,79],67:[2,79],68:[2,79],69:[2,79],71:[2,79],73:[2,79],74:[2,79],78:[2,79],80:[2,79],84:[2,79],85:[2,79],86:[2,79],91:[2,79],93:[2,79],102:[2,79],104:[2,79],105:[2,79],106:[2,79],110:[2,79],118:[2,79],126:[2,79],128:[2,79],129:[2,79],130:[2,79],131:[2,79],132:[2,79],133:[2,79],134:[2,79],135:[2,79],136:[2,79],137:[2,79],138:[2,79]},{1:[2,80],6:[2,80],25:[2,80],26:[2,80],40:[2,80],49:[2,80],54:[2,80],57:[2,80],66:[2,80],67:[2,80],68:[2,80],69:[2,80],71:[2,80],73:[2,80],74:[2,80],78:[2,80],80:[2,80],84:[2,80],85:[2,80],86:[2,80],91:[2,80],93:[2,80],102:[2,80],104:[2,80],105:[2,80],106:[2,80],110:[2,80],118:[2,80],126:[2,80],128:[2,80],129:[2,80],130:[2,80],131:[2,80],132:[2,80],133:[2,80],134:[2,80],135:[2,80],136:[2,80],137:[2,80],138:[2,80]},{1:[2,81],6:[2,81],25:[2,81],26:[2,81],40:[2,81],49:[2,81],54:[2,81],57:[2,81],66:[2,81],67:[2,81],68:[2,81],69:[2,81],71:[2,81],73:[2,81],74:[2,81],78:[2,81],80:[2,81],84:[2,81],85:[2,81],86:[2,81],91:[2,81],93:[2,81],102:[2,81],104:[2,81],105:[2,81],106:[2,81],110:[2,81],118:[2,81],126:[2,81],128:[2,81],129:[2,81],130:[2,81],131:[2,81],132:[2,81],133:[2,81],134:[2,81],135:[2,81],136:[2,81],137:[2,81],138:[2,81]},{1:[2,82],6:[2,82],25:[2,82],26:[2,82],40:[2,82],49:[2,82],54:[2,82],57:[2,82],66:[2,82],67:[2,82],68:[2,82],69:[2,82],71:[2,82],73:[2,82],74:[2,82],78:[2,82],80:[2,82],84:[2,82],85:[2,82],86:[2,82],91:[2,82],93:[2,82],102:[2,82],104:[2,82],105:[2,82],106:[2,82],110:[2,82],118:[2,82],126:[2,82],128:[2,82],129:[2,82],130:[2,82],131:[2,82],132:[2,82],133:[2,82],134:[2,82],135:[2,82],136:[2,82],137:[2,82],138:[2,82]},{73:[1,238]},{57:[1,189],73:[2,87],92:239,93:[1,188],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{73:[2,88]},{7:240,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,73:[2,122],76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{11:[2,116],28:[2,116],30:[2,116],31:[2,116],33:[2,116],34:[2,116],35:[2,116],36:[2,116],37:[2,116],38:[2,116],45:[2,116],46:[2,116],47:[2,116],51:[2,116],52:[2,116],73:[2,116],76:[2,116],79:[2,116],83:[2,116],88:[2,116],89:[2,116],90:[2,116],96:[2,116],100:[2,116],101:[2,116],104:[2,116],106:[2,116],108:[2,116],110:[2,116],119:[2,116],125:[2,116],127:[2,116],128:[2,116],129:[2,116],130:[2,116],131:[2,116]},{11:[2,117],28:[2,117],30:[2,117],31:[2,117],33:[2,117],34:[2,117],35:[2,117],36:[2,117],37:[2,117],38:[2,117],45:[2,117],46:[2,117],47:[2,117],51:[2,117],52:[2,117],73:[2,117],76:[2,117],79:[2,117],83:[2,117],88:[2,117],89:[2,117],90:[2,117],96:[2,117],100:[2,117],101:[2,117],104:[2,117],106:[2,117],108:[2,117],110:[2,117],119:[2,117],125:[2,117],127:[2,117],128:[2,117],129:[2,117],130:[2,117],131:[2,117]},{1:[2,86],6:[2,86],25:[2,86],26:[2,86],40:[2,86],49:[2,86],54:[2,86],57:[2,86],66:[2,86],67:[2,86],68:[2,86],69:[2,86],71:[2,86],73:[2,86],74:[2,86],78:[2,86],80:[2,86],84:[2,86],85:[2,86],86:[2,86],91:[2,86],93:[2,86],102:[2,86],104:[2,86],105:[2,86],106:[2,86],110:[2,86],118:[2,86],126:[2,86],128:[2,86],129:[2,86],130:[2,86],131:[2,86],132:[2,86],133:[2,86],134:[2,86],135:[2,86],136:[2,86],137:[2,86],138:[2,86]},{1:[2,104],6:[2,104],25:[2,104],26:[2,104],49:[2,104],54:[2,104],57:[2,104],66:[2,104],67:[2,104],68:[2,104],69:[2,104],71:[2,104],73:[2,104],74:[2,104],78:[2,104],84:[2,104],85:[2,104],86:[2,104],91:[2,104],93:[2,104],102:[2,104],104:[2,104],105:[2,104],106:[2,104],110:[2,104],118:[2,104],126:[2,104],128:[2,104],129:[2,104],132:[2,104],133:[2,104],134:[2,104],135:[2,104],136:[2,104],137:[2,104]},{1:[2,35],6:[2,35],25:[2,35],26:[2,35],49:[2,35],54:[2,35],57:[2,35],73:[2,35],78:[2,35],86:[2,35],91:[2,35],93:[2,35],102:[2,35],103:82,104:[2,35],105:[2,35],106:[2,35],109:83,110:[2,35],111:67,118:[2,35],126:[2,35],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{7:241,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:242,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,109],6:[2,109],25:[2,109],26:[2,109],49:[2,109],54:[2,109],57:[2,109],66:[2,109],67:[2,109],68:[2,109],69:[2,109],71:[2,109],73:[2,109],74:[2,109],78:[2,109],84:[2,109],85:[2,109],86:[2,109],91:[2,109],93:[2,109],102:[2,109],104:[2,109],105:[2,109],106:[2,109],110:[2,109],118:[2,109],126:[2,109],128:[2,109],129:[2,109],132:[2,109],133:[2,109],134:[2,109],135:[2,109],136:[2,109],137:[2,109]},{6:[2,52],25:[2,52],53:243,54:[1,226],86:[2,52]},{6:[2,128],25:[2,128],26:[2,128],54:[2,128],57:[1,244],86:[2,128],91:[2,128],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{50:245,51:[1,58],52:[1,59]},{6:[2,53],25:[2,53],26:[2,53],27:105,28:[1,71],44:106,55:246,56:104,58:107,59:108,76:[1,68],89:[1,109],90:[1,110]},{6:[1,247],25:[1,248]},{6:[2,60],25:[2,60],26:[2,60],49:[2,60],54:[2,60]},{7:249,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,23],6:[2,23],25:[2,23],26:[2,23],49:[2,23],54:[2,23],57:[2,23],73:[2,23],78:[2,23],86:[2,23],91:[2,23],93:[2,23],98:[2,23],99:[2,23],102:[2,23],104:[2,23],105:[2,23],106:[2,23],110:[2,23],118:[2,23],121:[2,23],123:[2,23],126:[2,23],128:[2,23],129:[2,23],132:[2,23],133:[2,23],134:[2,23],135:[2,23],136:[2,23],137:[2,23]},{6:[1,72],26:[1,250]},{1:[2,201],6:[2,201],25:[2,201],26:[2,201],49:[2,201],54:[2,201],57:[2,201],73:[2,201],78:[2,201],86:[2,201],91:[2,201],93:[2,201],102:[2,201],103:82,104:[2,201],105:[2,201],106:[2,201],109:83,110:[2,201],111:67,118:[2,201],126:[2,201],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{7:251,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:252,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,204],6:[2,204],25:[2,204],26:[2,204],49:[2,204],54:[2,204],57:[2,204],73:[2,204],78:[2,204],86:[2,204],91:[2,204],93:[2,204],102:[2,204],103:82,104:[2,204],105:[2,204],106:[2,204],109:83,110:[2,204],111:67,118:[2,204],126:[2,204],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,183],6:[2,183],25:[2,183],26:[2,183],49:[2,183],54:[2,183],57:[2,183],73:[2,183],78:[2,183],86:[2,183],91:[2,183],93:[2,183],102:[2,183],104:[2,183],105:[2,183],106:[2,183],110:[2,183],118:[2,183],126:[2,183],128:[2,183],129:[2,183],132:[2,183],133:[2,183],134:[2,183],135:[2,183],136:[2,183],137:[2,183]},{7:253,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,133],6:[2,133],25:[2,133],26:[2,133],49:[2,133],54:[2,133],57:[2,133],73:[2,133],78:[2,133],86:[2,133],91:[2,133],93:[2,133],98:[1,254],102:[2,133],104:[2,133],105:[2,133],106:[2,133],110:[2,133],118:[2,133],126:[2,133],128:[2,133],129:[2,133],132:[2,133],133:[2,133],134:[2,133],135:[2,133],136:[2,133],137:[2,133]},{24:255,25:[1,112]},{24:258,25:[1,112],27:256,28:[1,71],59:257,76:[1,68]},{120:259,122:216,123:[1,217]},{26:[1,260],121:[1,261],122:262,123:[1,217]},{26:[2,176],121:[2,176],123:[2,176]},{7:264,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],95:263,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,97],6:[2,97],24:265,25:[1,112],26:[2,97],49:[2,97],54:[2,97],57:[2,97],73:[2,97],78:[2,97],86:[2,97],91:[2,97],93:[2,97],102:[2,97],103:82,104:[1,63],105:[2,97],106:[1,64],109:83,110:[1,66],111:67,118:[2,97],126:[2,97],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,100],6:[2,100],25:[2,100],26:[2,100],49:[2,100],54:[2,100],57:[2,100],73:[2,100],78:[2,100],86:[2,100],91:[2,100],93:[2,100],102:[2,100],104:[2,100],105:[2,100],106:[2,100],110:[2,100],118:[2,100],126:[2,100],128:[2,100],129:[2,100],132:[2,100],133:[2,100],134:[2,100],135:[2,100],136:[2,100],137:[2,100]},{7:266,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,140],6:[2,140],25:[2,140],26:[2,140],49:[2,140],54:[2,140],57:[2,140],66:[2,140],67:[2,140],68:[2,140],69:[2,140],71:[2,140],73:[2,140],74:[2,140],78:[2,140],84:[2,140],85:[2,140],86:[2,140],91:[2,140],93:[2,140],102:[2,140],104:[2,140],105:[2,140],106:[2,140],110:[2,140],118:[2,140],126:[2,140],128:[2,140],129:[2,140],132:[2,140],133:[2,140],134:[2,140],135:[2,140],136:[2,140],137:[2,140]},{6:[1,72],26:[1,267]},{7:268,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,66],11:[2,117],25:[2,66],28:[2,117],30:[2,117],31:[2,117],33:[2,117],34:[2,117],35:[2,117],36:[2,117],37:[2,117],38:[2,117],45:[2,117],46:[2,117],47:[2,117],51:[2,117],52:[2,117],54:[2,66],76:[2,117],79:[2,117],83:[2,117],88:[2,117],89:[2,117],90:[2,117],91:[2,66],96:[2,117],100:[2,117],101:[2,117],104:[2,117],106:[2,117],108:[2,117],110:[2,117],119:[2,117],125:[2,117],127:[2,117],128:[2,117],129:[2,117],130:[2,117],131:[2,117]},{6:[1,270],25:[1,271],91:[1,269]},{6:[2,53],7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[2,53],26:[2,53],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],86:[2,53],88:[1,56],89:[1,57],90:[1,55],91:[2,53],94:272,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,52],25:[2,52],26:[2,52],53:273,54:[1,226]},{1:[2,180],6:[2,180],25:[2,180],26:[2,180],49:[2,180],54:[2,180],57:[2,180],73:[2,180],78:[2,180],86:[2,180],91:[2,180],93:[2,180],102:[2,180],104:[2,180],105:[2,180],106:[2,180],110:[2,180],118:[2,180],121:[2,180],126:[2,180],128:[2,180],129:[2,180],132:[2,180],133:[2,180],134:[2,180],135:[2,180],136:[2,180],137:[2,180]},{7:274,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:275,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{116:[2,158],117:[2,158]},{27:155,28:[1,71],44:156,58:157,59:158,76:[1,68],89:[1,109],90:[1,110],115:276},{1:[2,165],6:[2,165],25:[2,165],26:[2,165],49:[2,165],54:[2,165],57:[2,165],73:[2,165],78:[2,165],86:[2,165],91:[2,165],93:[2,165],102:[2,165],103:82,104:[2,165],105:[1,277],106:[2,165],109:83,110:[2,165],111:67,118:[1,278],126:[2,165],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,166],6:[2,166],25:[2,166],26:[2,166],49:[2,166],54:[2,166],57:[2,166],73:[2,166],78:[2,166],86:[2,166],91:[2,166],93:[2,166],102:[2,166],103:82,104:[2,166],105:[1,279],106:[2,166],109:83,110:[2,166],111:67,118:[2,166],126:[2,166],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[1,281],25:[1,282],78:[1,280]},{6:[2,53],10:165,25:[2,53],26:[2,53],27:166,28:[1,71],29:167,30:[1,69],31:[1,70],41:283,42:164,44:168,46:[1,44],78:[2,53],89:[1,109]},{7:284,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,285],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,85],6:[2,85],25:[2,85],26:[2,85],40:[2,85],49:[2,85],54:[2,85],57:[2,85],66:[2,85],67:[2,85],68:[2,85],69:[2,85],71:[2,85],73:[2,85],74:[2,85],78:[2,85],80:[2,85],84:[2,85],85:[2,85],86:[2,85],91:[2,85],93:[2,85],102:[2,85],104:[2,85],105:[2,85],106:[2,85],110:[2,85],118:[2,85],126:[2,85],128:[2,85],129:[2,85],130:[2,85],131:[2,85],132:[2,85],133:[2,85],134:[2,85],135:[2,85],136:[2,85],137:[2,85],138:[2,85]},{7:286,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,73:[2,120],76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{73:[2,121],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,36],6:[2,36],25:[2,36],26:[2,36],49:[2,36],54:[2,36],57:[2,36],73:[2,36],78:[2,36],86:[2,36],91:[2,36],93:[2,36],102:[2,36],103:82,104:[2,36],105:[2,36],106:[2,36],109:83,110:[2,36],111:67,118:[2,36],126:[2,36],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{26:[1,287],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[1,270],25:[1,271],86:[1,288]},{6:[2,66],25:[2,66],26:[2,66],54:[2,66],86:[2,66],91:[2,66]},{24:289,25:[1,112]},{6:[2,56],25:[2,56],26:[2,56],49:[2,56],54:[2,56]},{27:105,28:[1,71],44:106,55:290,56:104,58:107,59:108,76:[1,68],89:[1,109],90:[1,110]},{6:[2,54],25:[2,54],26:[2,54],27:105,28:[1,71],44:106,48:291,54:[2,54],55:103,56:104,58:107,59:108,76:[1,68],89:[1,109],90:[1,110]},{6:[2,61],25:[2,61],26:[2,61],49:[2,61],54:[2,61],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,24],6:[2,24],25:[2,24],26:[2,24],49:[2,24],54:[2,24],57:[2,24],73:[2,24],78:[2,24],86:[2,24],91:[2,24],93:[2,24],98:[2,24],99:[2,24],102:[2,24],104:[2,24],105:[2,24],106:[2,24],110:[2,24],118:[2,24],121:[2,24],123:[2,24],126:[2,24],128:[2,24],129:[2,24],132:[2,24],133:[2,24],134:[2,24],135:[2,24],136:[2,24],137:[2,24]},{26:[1,292],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,203],6:[2,203],25:[2,203],26:[2,203],49:[2,203],54:[2,203],57:[2,203],73:[2,203],78:[2,203],86:[2,203],91:[2,203],93:[2,203],102:[2,203],103:82,104:[2,203],105:[2,203],106:[2,203],109:83,110:[2,203],111:67,118:[2,203],126:[2,203],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{24:293,25:[1,112],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{24:294,25:[1,112]},{1:[2,134],6:[2,134],25:[2,134],26:[2,134],49:[2,134],54:[2,134],57:[2,134],73:[2,134],78:[2,134],86:[2,134],91:[2,134],93:[2,134],102:[2,134],104:[2,134],105:[2,134],106:[2,134],110:[2,134],118:[2,134],126:[2,134],128:[2,134],129:[2,134],132:[2,134],133:[2,134],134:[2,134],135:[2,134],136:[2,134],137:[2,134]},{24:295,25:[1,112]},{24:296,25:[1,112]},{1:[2,138],6:[2,138],25:[2,138],26:[2,138],49:[2,138],54:[2,138],57:[2,138],73:[2,138],78:[2,138],86:[2,138],91:[2,138],93:[2,138],98:[2,138],102:[2,138],104:[2,138],105:[2,138],106:[2,138],110:[2,138],118:[2,138],126:[2,138],128:[2,138],129:[2,138],132:[2,138],133:[2,138],134:[2,138],135:[2,138],136:[2,138],137:[2,138]},{26:[1,297],121:[1,298],122:262,123:[1,217]},{1:[2,174],6:[2,174],25:[2,174],26:[2,174],49:[2,174],54:[2,174],57:[2,174],73:[2,174],78:[2,174],86:[2,174],91:[2,174],93:[2,174],102:[2,174],104:[2,174],105:[2,174],106:[2,174],110:[2,174],118:[2,174],126:[2,174],128:[2,174],129:[2,174],132:[2,174],133:[2,174],134:[2,174],135:[2,174],136:[2,174],137:[2,174]},{24:299,25:[1,112]},{26:[2,177],121:[2,177],123:[2,177]},{24:300,25:[1,112],54:[1,301]},{25:[2,130],54:[2,130],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,98],6:[2,98],25:[2,98],26:[2,98],49:[2,98],54:[2,98],57:[2,98],73:[2,98],78:[2,98],86:[2,98],91:[2,98],93:[2,98],102:[2,98],104:[2,98],105:[2,98],106:[2,98],110:[2,98],118:[2,98],126:[2,98],128:[2,98],129:[2,98],132:[2,98],133:[2,98],134:[2,98],135:[2,98],136:[2,98],137:[2,98]},{1:[2,101],6:[2,101],24:302,25:[1,112],26:[2,101],49:[2,101],54:[2,101],57:[2,101],73:[2,101],78:[2,101],86:[2,101],91:[2,101],93:[2,101],102:[2,101],103:82,104:[1,63],105:[2,101],106:[1,64],109:83,110:[1,66],111:67,118:[2,101],126:[2,101],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{102:[1,303]},{91:[1,304],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,115],6:[2,115],25:[2,115],26:[2,115],40:[2,115],49:[2,115],54:[2,115],57:[2,115],66:[2,115],67:[2,115],68:[2,115],69:[2,115],71:[2,115],73:[2,115],74:[2,115],78:[2,115],84:[2,115],85:[2,115],86:[2,115],91:[2,115],93:[2,115],102:[2,115],104:[2,115],105:[2,115],106:[2,115],110:[2,115],116:[2,115],117:[2,115],118:[2,115],126:[2,115],128:[2,115],129:[2,115],132:[2,115],133:[2,115],134:[2,115],135:[2,115],136:[2,115],137:[2,115]},{7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],94:305,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,143],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],87:306,88:[1,56],89:[1,57],90:[1,55],94:142,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,124],25:[2,124],26:[2,124],54:[2,124],86:[2,124],91:[2,124]},{6:[1,270],25:[1,271],26:[1,307]},{1:[2,143],6:[2,143],25:[2,143],26:[2,143],49:[2,143],54:[2,143],57:[2,143],73:[2,143],78:[2,143],86:[2,143],91:[2,143],93:[2,143],102:[2,143],103:82,104:[1,63],105:[2,143],106:[1,64],109:83,110:[1,66],111:67,118:[2,143],126:[2,143],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,145],6:[2,145],25:[2,145],26:[2,145],49:[2,145],54:[2,145],57:[2,145],73:[2,145],78:[2,145],86:[2,145],91:[2,145],93:[2,145],102:[2,145],103:82,104:[1,63],105:[2,145],106:[1,64],109:83,110:[1,66],111:67,118:[2,145],126:[2,145],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{116:[2,164],117:[2,164]},{7:308,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:309,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:310,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,89],6:[2,89],25:[2,89],26:[2,89],40:[2,89],49:[2,89],54:[2,89],57:[2,89],66:[2,89],67:[2,89],68:[2,89],69:[2,89],71:[2,89],73:[2,89],74:[2,89],78:[2,89],84:[2,89],85:[2,89],86:[2,89],91:[2,89],93:[2,89],102:[2,89],104:[2,89],105:[2,89],106:[2,89],110:[2,89],116:[2,89],117:[2,89],118:[2,89],126:[2,89],128:[2,89],129:[2,89],132:[2,89],133:[2,89],134:[2,89],135:[2,89],136:[2,89],137:[2,89]},{10:165,27:166,28:[1,71],29:167,30:[1,69],31:[1,70],41:311,42:164,44:168,46:[1,44],89:[1,109]},{6:[2,90],10:165,25:[2,90],26:[2,90],27:166,28:[1,71],29:167,30:[1,69],31:[1,70],41:163,42:164,44:168,46:[1,44],54:[2,90],77:312,89:[1,109]},{6:[2,92],25:[2,92],26:[2,92],54:[2,92],78:[2,92]},{6:[2,39],25:[2,39],26:[2,39],54:[2,39],78:[2,39],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{7:313,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{73:[2,119],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,37],6:[2,37],25:[2,37],26:[2,37],49:[2,37],54:[2,37],57:[2,37],73:[2,37],78:[2,37],86:[2,37],91:[2,37],93:[2,37],102:[2,37],104:[2,37],105:[2,37],106:[2,37],110:[2,37],118:[2,37],126:[2,37],128:[2,37],129:[2,37],132:[2,37],133:[2,37],134:[2,37],135:[2,37],136:[2,37],137:[2,37]},{1:[2,110],6:[2,110],25:[2,110],26:[2,110],49:[2,110],54:[2,110],57:[2,110],66:[2,110],67:[2,110],68:[2,110],69:[2,110],71:[2,110],73:[2,110],74:[2,110],78:[2,110],84:[2,110],85:[2,110],86:[2,110],91:[2,110],93:[2,110],102:[2,110],104:[2,110],105:[2,110],106:[2,110],110:[2,110],118:[2,110],126:[2,110],128:[2,110],129:[2,110],132:[2,110],133:[2,110],134:[2,110],135:[2,110],136:[2,110],137:[2,110]},{1:[2,48],6:[2,48],25:[2,48],26:[2,48],49:[2,48],54:[2,48],57:[2,48],73:[2,48],78:[2,48],86:[2,48],91:[2,48],93:[2,48],102:[2,48],104:[2,48],105:[2,48],106:[2,48],110:[2,48],118:[2,48],126:[2,48],128:[2,48],129:[2,48],132:[2,48],133:[2,48],134:[2,48],135:[2,48],136:[2,48],137:[2,48]},{6:[2,57],25:[2,57],26:[2,57],49:[2,57],54:[2,57]},{6:[2,52],25:[2,52],26:[2,52],53:314,54:[1,199]},{1:[2,202],6:[2,202],25:[2,202],26:[2,202],49:[2,202],54:[2,202],57:[2,202],73:[2,202],78:[2,202],86:[2,202],91:[2,202],93:[2,202],102:[2,202],104:[2,202],105:[2,202],106:[2,202],110:[2,202],118:[2,202],126:[2,202],128:[2,202],129:[2,202],132:[2,202],133:[2,202],134:[2,202],135:[2,202],136:[2,202],137:[2,202]},{1:[2,181],6:[2,181],25:[2,181],26:[2,181],49:[2,181],54:[2,181],57:[2,181],73:[2,181],78:[2,181],86:[2,181],91:[2,181],93:[2,181],102:[2,181],104:[2,181],105:[2,181],106:[2,181],110:[2,181],118:[2,181],121:[2,181],126:[2,181],128:[2,181],129:[2,181],132:[2,181],133:[2,181],134:[2,181],135:[2,181],136:[2,181],137:[2,181]},{1:[2,135],6:[2,135],25:[2,135],26:[2,135],49:[2,135],54:[2,135],57:[2,135],73:[2,135],78:[2,135],86:[2,135],91:[2,135],93:[2,135],102:[2,135],104:[2,135],105:[2,135],106:[2,135],110:[2,135],118:[2,135],126:[2,135],128:[2,135],129:[2,135],132:[2,135],133:[2,135],134:[2,135],135:[2,135],136:[2,135],137:[2,135]},{1:[2,136],6:[2,136],25:[2,136],26:[2,136],49:[2,136],54:[2,136],57:[2,136],73:[2,136],78:[2,136],86:[2,136],91:[2,136],93:[2,136],98:[2,136],102:[2,136],104:[2,136],105:[2,136],106:[2,136],110:[2,136],118:[2,136],126:[2,136],128:[2,136],129:[2,136],132:[2,136],133:[2,136],134:[2,136],135:[2,136],136:[2,136],137:[2,136]},{1:[2,137],6:[2,137],25:[2,137],26:[2,137],49:[2,137],54:[2,137],57:[2,137],73:[2,137],78:[2,137],86:[2,137],91:[2,137],93:[2,137],98:[2,137],102:[2,137],104:[2,137],105:[2,137],106:[2,137],110:[2,137],118:[2,137],126:[2,137],128:[2,137],129:[2,137],132:[2,137],133:[2,137],134:[2,137],135:[2,137],136:[2,137],137:[2,137]},{1:[2,172],6:[2,172],25:[2,172],26:[2,172],49:[2,172],54:[2,172],57:[2,172],73:[2,172],78:[2,172],86:[2,172],91:[2,172],93:[2,172],102:[2,172],104:[2,172],105:[2,172],106:[2,172],110:[2,172],118:[2,172],126:[2,172],128:[2,172],129:[2,172],132:[2,172],133:[2,172],134:[2,172],135:[2,172],136:[2,172],137:[2,172]},{24:315,25:[1,112]},{26:[1,316]},{6:[1,317],26:[2,178],121:[2,178],123:[2,178]},{7:318,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,102],6:[2,102],25:[2,102],26:[2,102],49:[2,102],54:[2,102],57:[2,102],73:[2,102],78:[2,102],86:[2,102],91:[2,102],93:[2,102],102:[2,102],104:[2,102],105:[2,102],106:[2,102],110:[2,102],118:[2,102],126:[2,102],128:[2,102],129:[2,102],132:[2,102],133:[2,102],134:[2,102],135:[2,102],136:[2,102],137:[2,102]},{1:[2,141],6:[2,141],25:[2,141],26:[2,141],49:[2,141],54:[2,141],57:[2,141],66:[2,141],67:[2,141],68:[2,141],69:[2,141],71:[2,141],73:[2,141],74:[2,141],78:[2,141],84:[2,141],85:[2,141],86:[2,141],91:[2,141],93:[2,141],102:[2,141],104:[2,141],105:[2,141],106:[2,141],110:[2,141],118:[2,141],126:[2,141],128:[2,141],129:[2,141],132:[2,141],133:[2,141],134:[2,141],135:[2,141],136:[2,141],137:[2,141]},{1:[2,118],6:[2,118],25:[2,118],26:[2,118],49:[2,118],54:[2,118],57:[2,118],66:[2,118],67:[2,118],68:[2,118],69:[2,118],71:[2,118],73:[2,118],74:[2,118],78:[2,118],84:[2,118],85:[2,118],86:[2,118],91:[2,118],93:[2,118],102:[2,118],104:[2,118],105:[2,118],106:[2,118],110:[2,118],118:[2,118],126:[2,118],128:[2,118],129:[2,118],132:[2,118],133:[2,118],134:[2,118],135:[2,118],136:[2,118],137:[2,118]},{6:[2,125],25:[2,125],26:[2,125],54:[2,125],86:[2,125],91:[2,125]},{6:[2,52],25:[2,52],26:[2,52],53:319,54:[1,226]},{6:[2,126],25:[2,126],26:[2,126],54:[2,126],86:[2,126],91:[2,126]},{1:[2,167],6:[2,167],25:[2,167],26:[2,167],49:[2,167],54:[2,167],57:[2,167],73:[2,167],78:[2,167],86:[2,167],91:[2,167],93:[2,167],102:[2,167],103:82,104:[2,167],105:[2,167],106:[2,167],109:83,110:[2,167],111:67,118:[1,320],126:[2,167],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,169],6:[2,169],25:[2,169],26:[2,169],49:[2,169],54:[2,169],57:[2,169],73:[2,169],78:[2,169],86:[2,169],91:[2,169],93:[2,169],102:[2,169],103:82,104:[2,169],105:[1,321],106:[2,169],109:83,110:[2,169],111:67,118:[2,169],126:[2,169],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,168],6:[2,168],25:[2,168],26:[2,168],49:[2,168],54:[2,168],57:[2,168],73:[2,168],78:[2,168],86:[2,168],91:[2,168],93:[2,168],102:[2,168],103:82,104:[2,168],105:[2,168],106:[2,168],109:83,110:[2,168],111:67,118:[2,168],126:[2,168],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[2,93],25:[2,93],26:[2,93],54:[2,93],78:[2,93]},{6:[2,52],25:[2,52],26:[2,52],53:322,54:[1,236]},{26:[1,323],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[1,247],25:[1,248],26:[1,324]},{26:[1,325]},{1:[2,175],6:[2,175],25:[2,175],26:[2,175],49:[2,175],54:[2,175],57:[2,175],73:[2,175],78:[2,175],86:[2,175],91:[2,175],93:[2,175],102:[2,175],104:[2,175],105:[2,175],106:[2,175],110:[2,175],118:[2,175],126:[2,175],128:[2,175],129:[2,175],132:[2,175],133:[2,175],134:[2,175],135:[2,175],136:[2,175],137:[2,175]},{26:[2,179],121:[2,179],123:[2,179]},{25:[2,131],54:[2,131],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[1,270],25:[1,271],26:[1,326]},{7:327,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:328,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[1,281],25:[1,282],26:[1,329]},{6:[2,40],25:[2,40],26:[2,40],54:[2,40],78:[2,40]},{6:[2,58],25:[2,58],26:[2,58],49:[2,58],54:[2,58]},{1:[2,173],6:[2,173],25:[2,173],26:[2,173],49:[2,173],54:[2,173],57:[2,173],73:[2,173],78:[2,173],86:[2,173],91:[2,173],93:[2,173],102:[2,173],104:[2,173],105:[2,173],106:[2,173],110:[2,173],118:[2,173],126:[2,173],128:[2,173],129:[2,173],132:[2,173],133:[2,173],134:[2,173],135:[2,173],136:[2,173],137:[2,173]},{6:[2,127],25:[2,127],26:[2,127],54:[2,127],86:[2,127],91:[2,127]},{1:[2,170],6:[2,170],25:[2,170],26:[2,170],49:[2,170],54:[2,170],57:[2,170],73:[2,170],78:[2,170],86:[2,170],91:[2,170],93:[2,170],102:[2,170],103:82,104:[2,170],105:[2,170],106:[2,170],109:83,110:[2,170],111:67,118:[2,170],126:[2,170],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,171],6:[2,171],25:[2,171],26:[2,171],49:[2,171],54:[2,171],57:[2,171],73:[2,171],78:[2,171],86:[2,171],91:[2,171],93:[2,171],102:[2,171],103:82,104:[2,171],105:[2,171],106:[2,171],109:83,110:[2,171],111:67,118:[2,171],126:[2,171],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[2,94],25:[2,94],26:[2,94],54:[2,94],78:[2,94]}],defaultActions:{58:[2,50],59:[2,51],89:[2,108],186:[2,88]},parseError:function(e,t){if(!t.recoverable){var n=new Error(e);throw n.location=t.loc,n}this.trace(e)},parse:function(e){function t(e){i.length=i.length-2*e,s.length=s.length-e,o.length=o.length-e}function n(){var e;return e=r.lexer.lex()||p,typeof e!="number"&&(e=r.symbols_[e]||e),e}var r=this,i=[0],s=[null],o=[],u=this.table,a="",f=0,l=0,c=0,h=2,p=1;this.lexer.setInput(e),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc=="undefined"&&(this.lexer.yylloc={});var d=this.lexer.yylloc;o.push(d);var v=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"?this.parseError=this.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;var m,g,y,b,w,E,S={},x,T,N,C;for(;;){y=i[i.length-1];if(this.defaultActions[y])b=this.defaultActions[y];else{if(m===null||typeof m=="undefined")m=n();b=u[y]&&u[y][m]}if(typeof b=="undefined"||!b.length||!b[0]){var k="";C=[];for(x in u[y])this.terminals_[x]&&x>h&&C.push("'"+this.terminals_[x]+"'");this.lexer.showPosition?k="Expecting "+C.join(", ")+", got '"+(this.terminals_[m]||m)+"'":k="Unexpected "+(m==p?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.lexer.yylloc.first_line!==d.first_line&&(d=this.lexer.yylloc),this.parseError(k,{text:this.lexer.match,token:this.terminals_[m]||m,line:this.lexer.yylineno,loc:d,expected:C})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+y+", token: "+m);switch(b[0]){case 1:i.push(m),s.push(this.lexer.yytext),o.push(this.lexer.yylloc),i.push(b[1]),m=null,g?(m=g,g=null):(l=this.lexer.yyleng,a=this.lexer.yytext,f=this.lexer.yylineno,d=this.lexer.yylloc,c>0&&c--);break;case 2:T=this.productions_[b[1]][1],S.$=s[s.length-T],S._$={first_line:o[o.length-(T||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(T||1)].first_column,last_column:o[o.length-1].last_column},v&&(S._$.range=[o[o.length-(T||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.call(S,a,l,f,this.yy,b[1],s,o);if(typeof E!="undefined")return E;T&&(i=i.slice(0,-1*T*2),s=s.slice(0,-1*T),o=o.slice(0,-1*T)),i.push(this.productions_[b[1]][0]),s.push(S.$),o.push(S._$),N=u[i[i.length-2]][i[i.length-1]],i.push(N);break;case 3:return!0}}return!0}};undefined,r.prototype=i,i.Parser=r,n.exports=new r}),ace.define("ace/mode/coffee/nodes",["require","exports","module","ace/mode/coffee/scope","ace/mode/coffee/lexer","ace/mode/coffee/helpers"],function(e,t,n){var r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w,E,S,x,T,N,C,k,L,A,O,M,_,D,P,H,B,j,F,I,q,R,U,z,W,X,V,$,J,K,Q,G,Y,Z,et,tt,nt,rt,it,st,ot,ut,at,ft,lt,ct,ht,pt,dt,vt,mt,gt,yt,bt,wt={}.hasOwnProperty,Et=function(e,t){function n(){this.constructor=e}for(var r in t)wt.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},St=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1},xt=[].slice;Error.stackTraceLimit=Infinity,U=e("./scope").Scope,mt=e("./lexer"),j=mt.RESERVED,R=mt.STRICT_PROSCRIBED,gt=e("./helpers"),tt=gt.compact,st=gt.flatten,it=gt.extend,ft=gt.merge,nt=gt.del,ht=gt.starts,rt=gt.ends,ut=gt.last,ct=gt.some,et=gt.addLocationDataFn,at=gt.locationDataToString,pt=gt.throwSyntaxError,t.extend=it,t.addLocationDataFn=et,Z=function(){return!0},_=function(){return!1},$=function(){return this},M=function(){return this.negated=!this.negated,this},t.CodeFragment=h=function(){function e(e,t){var n;this.code=""+t,this.locationData=e!=null?e.locationData:void 0,this.type=(e!=null?(n=e.constructor)!=null?n.name:void 0:void 0)||"unknown"}return e.prototype.toString=function(){return""+this.code+(this.locationData?": "+at(this.locationData):"")},e}(),ot=function(e){var t;return function(){var n,r,i;i=[];for(n=0,r=e.length;n<r;n++)t=e[n],i.push(t.code);return i}().join("")},t.Base=o=function(){function e(){}return e.prototype.compile=function(e,t){return ot(this.compileToFragments(e,t))},e.prototype.compileToFragments=function(e,t){var n;return e=it({},e),t&&(e.level=t),n=this.unfoldSoak(e)||this,n.tab=e.indent,e.level===L||!n.isStatement(e)?n.compileNode(e):n.compileClosure(e)},e.prototype.compileClosure=function(e){var t;return(t=this.jumps())&&t.error("cannot use a pure statement in an expression"),e.sharedScope=!0,l.wrap(this).compileNode(e)},e.prototype.cache=function(e,t,n){var r,i;return this.isComplex()?(r=new A(n||e.scope.freeVariable("ref")),i=new s(r,this),t?[i.compileToFragments(e,t),[this.makeCode(r.value)]]:[i,r]):(r=t?this.compileToFragments(e,t):this,[r,r])},e.prototype.cacheToCodeFragments=function(e){return[ot(e[0]),ot(e[1])]},e.prototype.makeReturn=function(e){var t;return t=this.unwrapAll(),e?new a(new A(""+e+".push"),[t]):new I(t)},e.prototype.contains=function(e){var t;return t=void 0,this.traverseChildren(!1,function(n){if(e(n))return t=n,!1}),t},e.prototype.lastNonComment=function(e){var t;t=e.length;while(t--)if(!(e[t]instanceof p))return e[t];return null},e.prototype.toString=function(e,t){var n;return e==null&&(e=""),t==null&&(t=this.constructor.name),n="\n"+e+t,this.soak&&(n+="?"),this.eachChild(function(t){return n+=t.toString(e+V)}),n},e.prototype.eachChild=function(e){var t,n,r,i,s,o,u,a;if(!this.children)return this;u=this.children;for(r=0,s=u.length;r<s;r++){t=u[r];if(this[t]){a=st([this[t]]);for(i=0,o=a.length;i<o;i++){n=a[i];if(e(n)===!1)return this}}}return this},e.prototype.traverseChildren=function(e,t){return this.eachChild(function(n){var r;r=t(n);if(r!==!1)return n.traverseChildren(e,t)})},e.prototype.invert=function(){return new P("!",this)},e.prototype.unwrapAll=function(){var e;e=this;while(e!==(e=e.unwrap()))continue;return e},e.prototype.children=[],e.prototype.isStatement=_,e.prototype.jumps=_,e.prototype.isComplex=Z,e.prototype.isChainable=_,e.prototype.isAssignable=_,e.prototype.unwrap=$,e.prototype.unfoldSoak=_,e.prototype.assigns=_,e.prototype.updateLocationDataIfMissing=function(e){return this.locationData?this:(this.locationData=e,this.eachChild(function(t){return t.updateLocationDataIfMissing(e)}))},e.prototype.error=function(e){return pt(e,this.locationData)},e.prototype.makeCode=function(e){return new h(this,e)},e.prototype.wrapInBraces=function(e){return[].concat(this.makeCode("("),e,this.makeCode(")"))},e.prototype.joinFragmentArrays=function(e,t){var n,r,i,s,o;n=[];for(i=s=0,o=e.length;s<o;i=++s)r=e[i],i&&n.push(this.makeCode(t)),n=n.concat(r);return n},e}(),t.Block=u=function(e){function t(e){this.expressions=tt(st(e||[]))}return Et(t,e),t.prototype.children=["expressions"],t.prototype.push=function(e){return this.expressions.push(e),this},t.prototype.pop=function(){return this.expressions.pop()},t.prototype.unshift=function(e){return this.expressions.unshift(e),this},t.prototype.unwrap=function(){return this.expressions.length===1?this.expressions[0]:this},t.prototype.isEmpty=function(){return!this.expressions.length},t.prototype.isStatement=function(e){var t,n,r,i;i=this.expressions;for(n=0,r=i.length;n<r;n++){t=i[n];if(t.isStatement(e))return!0}return!1},t.prototype.jumps=function(e){var t,n,r,i;i=this.expressions;for(n=0,r=i.length;n<r;n++){t=i[n];if(t.jumps(e))return t}},t.prototype.makeReturn=function(e){var t,n;n=this.expressions.length;while(n--){t=this.expressions[n];if(!(t instanceof p)){this.expressions[n]=t.makeReturn(e),t instanceof I&&!t.expression&&this.expressions.splice(n,1);break}}return this},t.prototype.compileToFragments=function(e,n){return e==null&&(e={}),e.scope?t.__super__.compileToFragments.call(this,e,n):this.compileRoot(e)},t.prototype.compileNode=function(e){var n,r,i,s,o,u,a,f,l;this.tab=e.indent,u=e.level===L,r=[],l=this.expressions;for(s=a=0,f=l.length;a<f;s=++a)o=l[s],o=o.unwrapAll(),o=o.unfoldSoak(e)||o,o instanceof t?r.push(o.compileNode(e)):u?(o.front=!0,i=o.compileToFragments(e),o.isStatement(e)||(i.unshift(this.makeCode(""+this.tab)),i.push(this.makeCode(";"))),r.push(i)):r.push(o.compileToFragments(e,N));return u?this.spaced?[].concat(this.joinFragmentArrays(r,"\n\n"),this.makeCode("\n")):this.joinFragmentArrays(r,"\n"):(r.length?n=this.joinFragmentArrays(r,", "):n=[this.makeCode("void 0")],r.length>1&&e.level>=N?this.wrapInBraces(n):n)},t.prototype.compileRoot=function(e){var t,n,r,i,s,o,u,a,f,l;e.indent=e.bare?"":V,e.level=L,this.spaced=!0,e.scope=new U(null,this,null),l=e.locals||[];for(a=0,f=l.length;a<f;a++)i=l[a],e.scope.parameter(i);return s=[],e.bare||(o=function(){var e,n,i,s;i=this.expressions,s=[];for(r=e=0,n=i.length;e<n;r=++e){t=i[r];if(!(t.unwrap()instanceof p))break;s.push(t)}return s}.call(this),u=this.expressions.slice(o.length),this.expressions=o,o.length&&(s=this.compileNode(ft(e,{indent:""})),s.push(this.makeCode("\n"))),this.expressions=u),n=this.compileWithDeclarations(e),e.bare?n:[].concat(s,this.makeCode("(function() {\n"),n,this.makeCode("\n}).call(this);\n"))},t.prototype.compileWithDeclarations=function(e){var t,n,r,i,s,o,u,a,f,l,c,h,d,v;i=[],o=[],h=this.expressions;for(s=l=0,c=h.length;l<c;s=++l){r=h[s],r=r.unwrap();if(!(r instanceof p||r instanceof A))break}return e=ft(e,{level:L}),s&&(u=this.expressions.splice(s,9e9),d=[this.spaced,!1],f=d[0],this.spaced=d[1],v=[this.compileNode(e),f],i=v[0],this.spaced=v[1],this.expressions=u),o=this.compileNode(e),a=e.scope,a.expressions===this&&(n=e.scope.hasDeclarations(),t=a.hasAssignments,n||t?(s&&i.push(this.makeCode("\n")),i.push(this.makeCode(""+this.tab+"var ")),n&&i.push(this.makeCode(a.declaredVariables().join(", "))),t&&(n&&i.push(this.makeCode(",\n"+(this.tab+V))),i.push(this.makeCode(a.assignedVariables().join(",\n"+(this.tab+V))))),i.push(this.makeCode(";\n"+(this.spaced?"\n":"")))):i.length&&o.length&&i.push(this.makeCode("\n"))),i.concat(o)},t.wrap=function(e){return e.length===1&&e[0]instanceof t?e[0]:new t(e)},t}(o),t.Literal=A=function(e){function t(e){this.value=e}return Et(t,e),t.prototype.makeReturn=function(){return this.isStatement()?this:t.__super__.makeReturn.apply(this,arguments)},t.prototype.isAssignable=function(){return g.test(this.value)},t.prototype.isStatement=function(){var e;return(e=this.value)==="break"||e==="continue"||e==="debugger"},t.prototype.isComplex=_,t.prototype.assigns=function(e){return e===this.value},t.prototype.jumps=function(e){if(this.value==="break"&&!((e!=null?e.loop:void 0)||(e!=null?e.block:void 0)))return this;if(this.value==="continue"&&(e!=null?!e.loop:!void 0))return this},t.prototype.compileNode=function(e){var t,n,r;return n=this.value==="this"?((r=e.scope.method)!=null?r.bound:void 0)?e.scope.method.context:this.value:this.value.reserved?'"'+this.value+'"':this.value,t=this.isStatement()?""+this.tab+n+";":n,[this.makeCode(t)]},t.prototype.toString=function(){return' "'+this.value+'"'},t}(o),t.Undefined=function(e){function t(){return yt=t.__super__.constructor.apply(this,arguments),yt}return Et(t,e),t.prototype.isAssignable=_,t.prototype.isComplex=_,t.prototype.compileNode=function(e){return[this.makeCode(e.level>=x?"(void 0)":"void 0")]},t}(o),t.Null=function(e){function t(){return bt=t.__super__.constructor.apply(this,arguments),bt}return Et(t,e),t.prototype.isAssignable=_,t.prototype.isComplex=_,t.prototype.compileNode=function(){return[this.makeCode("null")]},t}(o),t.Bool=function(e){function t(e){this.val=e}return Et(t,e),t.prototype.isAssignable=_,t.prototype.isComplex=_,t.prototype.compileNode=function(){return[this.makeCode(this.val)]},t}(o),t.Return=I=function(e){function t(e){e&&!e.unwrap().isUndefined&&(this.expression=e)}return Et(t,e),t.prototype.children=["expression"],t.prototype.isStatement=Z,t.prototype.makeReturn=$,t.prototype.jumps=$,t.prototype.compileToFragments=function(e,n){var r,i;return r=(i=this.expression)!=null?i.makeReturn():void 0,!r||r instanceof t?t.__super__.compileToFragments.call(this,e,n):r.compileToFragments(e,n)},t.prototype.compileNode=function(e){var t;return t=[],t.push(this.makeCode(this.tab+("return"+(this.expression?" ":"")))),this.expression&&(t=t.concat(this.expression.compileToFragments(e,k))),t.push(this.makeCode(";")),t},t}(o),t.Value=G=function(e){function t(e,n,r){return!n&&e instanceof t?e:(this.base=e,this.properties=n||[],r&&(this[r]=!0),this)}return Et(t,e),t.prototype.children=["base","properties"],t.prototype.add=function(e){return this.properties=this.properties.concat(e),this},t.prototype.hasProperties=function(){return!!this.properties.length},t.prototype.isArray=function(){return!this.properties.length&&this.base instanceof i},t.prototype.isComplex=function(){return this.hasProperties()||this.base.isComplex()},t.prototype.isAssignable=function(){return this.hasProperties()||this.base.isAssignable()},t.prototype.isSimpleNumber=function(){return this.base instanceof A&&q.test(this.base.value)},t.prototype.isString=function(){return this.base instanceof A&&b.test(this.base.value)},t.prototype.isAtomic=function(){var e,t,n,r;r=this.properties.concat(this.base);for(t=0,n=r.length;t<n;t++){e=r[t];if(e.soak||e instanceof a)return!1}return!0},t.prototype.isStatement=function(e){return!this.properties.length&&this.base.isStatement(e)},t.prototype.assigns=function(e){return!this.properties.length&&this.base.assigns(e)},t.prototype.jumps=function(e){return!this.properties.length&&this.base.jumps(e)},t.prototype.isObject=function(e){return this.properties.length?!1:this.base instanceof D&&(!e||this.base.generated)},t.prototype.isSplice=function(){return ut(this.properties)instanceof z},t.prototype.unwrap=function(){return this.properties.length?this:this.base},t.prototype.cacheReference=function(e){var n,r,i,o;return i=ut(this.properties),this.properties.length<2&&!this.base.isComplex()&&(i!=null?!i.isComplex():!void 0)?[this,this]:(n=new t(this.base,this.properties.slice(0,-1)),n.isComplex()&&(r=new A(e.scope.freeVariable("base")),n=new t(new B(new s(r,n)))),i?(i.isComplex()&&(o=new A(e.scope.freeVariable("name")),i=new S(new s(o,i.index)),o=new S(o)),[n.add(i),new t(r||n.base,[o||i])]):[n,r])},t.prototype.compileNode=function(e){var t,n,r,i,s;this.base.front=this.front,r=this.properties,t=this.base.compileToFragments(e,r.length?x:null),(this.base instanceof B||r.length)&&q.test(ot(t))&&t.push(this.makeCode("."));for(i=0,s=r.length;i<s;i++)n=r[i],t.push.apply(t,n.compileToFragments(e));return t},t.prototype.unfoldSoak=function(e){var n=this;return this.unfoldedSoak!=null?this.unfoldedSoak:this.unfoldedSoak=function(){var r,i,o,u,a,f,l,c,h,p;if(o=n.base.unfoldSoak(e))return(h=o.body.properties).push.apply(h,n.properties),o;p=n.properties;for(i=l=0,c=p.length;l<c;i=++l){u=p[i];if(!u.soak)continue;return u.soak=!1,r=new t(n.base,n.properties.slice(0,i)),f=new t(n.base,n.properties.slice(i)),r.isComplex()&&(a=new A(e.scope.freeVariable("ref")),r=new B(new s(a,r)),f.base=a),new w(new d(r),f,{soak:!0})}return!1}()},t}(o),t.Comment=p=function(e){function t(e){this.comment=e}return Et(t,e),t.prototype.isStatement=Z,t.prototype.makeReturn=$,t.prototype.compileNode=function(e,t){var n;return n="/*"+lt(this.comment,this.tab)+(St.call(this.comment,"\n")>=0?"\n"+this.tab:"")+"*/",(t||e.level)===L&&(n=e.indent+n),[this.makeCode("\n"),this.makeCode(n)]},t}(o),t.Call=a=function(e){function t(e,t,n){this.args=t!=null?t:[],this.soak=n,this.isNew=!1,this.isSuper=e==="super",this.variable=this.isSuper?null:e}return Et(t,e),t.prototype.children=["variable","args"],t.prototype.newInstance=function(){var e,n;return e=((n=this.variable)!=null?n.base:void 0)||this.variable,e instanceof t&&!e.isNew?e.newInstance():this.isNew=!0,this},t.prototype.superReference=function(e){var t,n;return n=e.scope.namedMethod(),(n!=null?n.klass:void 0)?(t=[new r(new A("__super__"))],n["static"]&&t.push(new r(new A("constructor"))),t.push(new r(new A(n.name))),(new G(new A(n.klass),t)).compile(e)):(n!=null?n.ctor:void 0)?""+n.name+".__super__.constructor":this.error("cannot call super outside of an instance method.")},t.prototype.superThis=function(e){var t;return t=e.scope.method,t&&!t.klass&&t.context||"this"},t.prototype.unfoldSoak=function(e){var n,r,i,s,o,u,a,f,l;if(this.soak){if(this.variable){if(r=dt(e,this,"variable"))return r;f=(new G(this.variable)).cacheReference(e),i=f[0],o=f[1]}else i=new A(this.superReference(e)),o=new G(i);return o=new t(o,this.args),o.isNew=this.isNew,i=new A("typeof "+i.compile(e)+' === "function"'),new w(i,new G(o),{soak:!0})}n=this,s=[];for(;;){if(n.variable instanceof t){s.push(n),n=n.variable;continue}if(!(n.variable instanceof G))break;s.push(n);if(!((n=n.variable.base)instanceof t))break}l=s.reverse();for(u=0,a=l.length;u<a;u++)n=l[u],r&&(n.variable instanceof t?n.variable=r:n.variable.base=r),r=dt(e,n,"variable");return r},t.prototype.compileNode=function(e){var t,n,r,i,s,o,u,a,f,l;(f=this.variable)!=null&&(f.front=this.front),i=W.compileSplattedArray(e,this.args,!0);if(i.length)return this.compileSplat(e,i);r=[],l=this.args;for(n=u=0,a=l.length;u<a;n=++u)t=l[n],n&&r.push(this.makeCode(", ")),r.push.apply(r,t.compileToFragments(e,N));return s=[],this.isSuper?(o=this.superReference(e)+(".call("+this.superThis(e)),r.length&&(o+=", "),s.push(this.makeCode(o))):(this.isNew&&s.push(this.makeCode("new ")),s.push.apply(s,this.variable.compileToFragments(e,x)),s.push(this.makeCode("("))),s.push.apply(s,r),s.push(this.makeCode(")")),s},t.prototype.compileSplat=function(e,t){var n,r,i,s,o,u;return this.isSuper?[].concat(this.makeCode(""+this.superReference(e)+".apply("+this.superThis(e)+", "),t,this.makeCode(")")):this.isNew?(s=this.tab+V,[].concat(this.makeCode("(function(func, args, ctor) {\n"+s+"ctor.prototype = func.prototype;\n"+s+"var child = new ctor, result = func.apply(child, args);\n"+s+"return Object(result) === result ? result : child;\n"+this.tab+"})("),this.variable.compileToFragments(e,N),this.makeCode(", "),t,this.makeCode(", function(){})"))):(n=[],r=new G(this.variable),(o=r.properties.pop())&&r.isComplex()?(u=e.scope.freeVariable("ref"),n=n.concat(this.makeCode("("+u+" = "),r.compileToFragments(e,N),this.makeCode(")"),o.compileToFragments(e))):(i=r.compileToFragments(e,x),q.test(ot(i))&&(i=this.wrapInBraces(i)),o?(u=ot(i),i.push.apply(i,o.compileToFragments(e))):u="null",n=n.concat(i)),n=n.concat(this.makeCode(".apply("+u+", "),t,this.makeCode(")")))},t}(o),t.Extends=v=function(e){function t(e,t){this.child=e,this.parent=t}return Et(t,e),t.prototype.children=["child","parent"],t.prototype.compileToFragments=function(e){return(new a(new G(new A(vt("extends"))),[this.child,this.parent])).compileToFragments(e)},t}(o),t.Access=r=function(e){function t(e,t){this.name=e,this.name.asKey=!0,this.soak=t==="soak"}return Et(t,e),t.prototype.children=["name"],t.prototype.compileToFragments=function(e){var t;return t=this.name.compileToFragments(e),g.test(ot(t))?t.unshift(this.makeCode(".")):(t.unshift(this.makeCode("[")),t.push(this.makeCode("]"))),t},t.prototype.isComplex=_,t}(o),t.Index=S=function(e){function t(e){this.index=e}return Et(t,e),t.prototype.children=["index"],t.prototype.compileToFragments=function(e){return[].concat(this.makeCode("["),this.index.compileToFragments(e,k),this.makeCode("]"))},t.prototype.isComplex=function(){return this.index.isComplex()},t}(o),t.Range=F=function(e){function t(e,t,n){this.from=e,this.to=t,this.exclusive=n==="exclusive",this.equals=this.exclusive?"":"="}return Et(t,e),t.prototype.children=["from","to"],t.prototype.compileVariables=function(e){var t,n,r,i,s;e=ft(e,{top:!0}),n=this.cacheToCodeFragments(this.from.cache(e,N)),this.fromC=n[0],this.fromVar=n[1],r=this.cacheToCodeFragments(this.to.cache(e,N)),this.toC=r[0],this.toVar=r[1];if(t=nt(e,"step"))i=this.cacheToCodeFragments(t.cache(e,N)),this.step=i[0],this.stepVar=i[1];s=[this.fromVar.match(q),this.toVar.match(q)],this.fromNum=s[0],this.toNum=s[1];if(this.stepVar)return this.stepNum=this.stepVar.match(q)},t.prototype.compileNode=function(e){var t,n,r,i,s,o,u,a,f,l,c,h,p,d;return this.fromVar||this.compileVariables(e),e.index?(u=this.fromNum&&this.toNum,s=nt(e,"index"),o=nt(e,"name"),f=o&&o!==s,h=""+s+" = "+this.fromC,this.toC!==this.toVar&&(h+=", "+this.toC),this.step!==this.stepVar&&(h+=", "+this.step),p=[""+s+" <"+this.equals,""+s+" >"+this.equals],a=p[0],i=p[1],n=this.stepNum?+this.stepNum>0?""+a+" "+this.toVar:""+i+" "+this.toVar:u?(d=[+this.fromNum,+this.toNum],r=d[0],c=d[1],d,r<=c?""+a+" "+c:""+i+" "+c):(t=this.stepVar?""+this.stepVar+" > 0":""+this.fromVar+" <= "+this.toVar,""+t+" ? "+a+" "+this.toVar+" : "+i+" "+this.toVar),l=this.stepVar?""+s+" += "+this.stepVar:u?f?r<=c?"++"+s:"--"+s:r<=c?""+s+"++":""+s+"--":f?""+t+" ? ++"+s+" : --"+s:""+t+" ? "+s+"++ : "+s+"--",f&&(h=""+o+" = "+h),f&&(l=""+o+" = "+l),[this.makeCode(""+h+"; "+n+"; "+l)]):this.compileArray(e)},t.prototype.compileArray=function(e){var t,n,r,i,s,o,u,a,f,l,c,h,p,d,v;if(this.fromNum&&this.toNum&&Math.abs(this.fromNum-this.toNum)<=20)return f=function(){v=[];for(var e=p=+this.fromNum,t=+this.toNum;p<=t?e<=t:e>=t;p<=t?e++:e--)v.push(e);return v}.apply(this),this.exclusive&&f.pop(),[this.makeCode("["+f.join(", ")+"]")];o=this.tab+V,s=e.scope.freeVariable("i"),l=e.scope.freeVariable("results"),a="\n"+o+l+" = [];",this.fromNum&&this.toNum?(e.index=s,n=ot(this.compileNode(e))):(c=""+s+" = "+this.fromC+(this.toC!==this.toVar?", "+this.toC:""),r=""+this.fromVar+" <= "+this.toVar,n="var "+c+"; "+r+" ? "+s+" <"+this.equals+" "+this.toVar+" : "+s+" >"+this.equals+" "+this.toVar+"; "+r+" ? "+s+"++ : "+s+"--"),u="{ "+l+".push("+s+"); }\n"+o+"return "+l+";\n"+e.indent,i=function(e){return e!=null?e.contains(function(e){return e instanceof A&&e.value==="arguments"&&!e.asKey}):void 0};if(i(this.from)||i(this.to))t=", arguments";return[this.makeCode("(function() {"+a+"\n"+o+"for ("+n+")"+u+"}).apply(this"+(t!=null?t:"")+")")]},t}(o),t.Slice=z=function(e){function t(e){this.range=e,t.__super__.constructor.call(this)}return Et(t,e),t.prototype.children=["range"],t.prototype.compileNode=function(e){var t,n,r,i,s,o,u;u=this.range,s=u.to,r=u.from,i=r&&r.compileToFragments(e,k)||[this.makeCode("0")];if(s){t=s.compileToFragments(e,k),n=ot(t);if(!!this.range.exclusive||+n!==-1)o=", "+(this.range.exclusive?n:q.test(n)?""+(+n+1):(t=s.compileToFragments(e,x),"+"+ot(t)+" + 1 || 9e9"))}return[this.makeCode(".slice("+ot(i)+(o||"")+")")]},t}(o),t.Obj=D=function(e){function t(e,t){this.generated=t!=null?t:!1,this.objects=this.properties=e||[]}return Et(t,e),t.prototype.children=["properties"],t.prototype.compileNode=function(e){var t,n,r,i,o,u,a,f,l,c,h,d,v;l=this.properties;if(!l.length)return[this.makeCode(this.front?"({})":"{}")];if(this.generated)for(c=0,d=l.length;c<d;c++)a=l[c],a instanceof G&&a.error("cannot have an implicit value in an implicit object");r=e.indent+=V,u=this.lastNonComment(this.properties),t=[];for(n=h=0,v=l.length;h<v;n=++h)f=l[n],o=n===l.length-1?"":f===u||f instanceof p?"\n":",\n",i=f instanceof p?"":r,f instanceof s&&f.variable instanceof G&&f.variable.hasProperties()&&f.variable.error("Invalid object key"),f instanceof G&&f["this"]&&(f=new s(f.properties[0].name,f,"object")),f instanceof p||(f instanceof s||(f=new s(f,f,"object")),(f.variable.base||f.variable).asKey=!0),i&&t.push(this.makeCode(i)),t.push.apply(t,f.compileToFragments(e,L)),o&&t.push(this.makeCode(o));return t.unshift(this.makeCode("{"+(l.length&&"\n"))),t.push(this.makeCode(""+(l.length&&"\n"+this.tab)+"}")),this.front?this.wrapInBraces(t):t},t.prototype.assigns=function(e){var t,n,r,i;i=this.properties;for(n=0,r=i.length;n<r;n++){t=i[n];if(t.assigns(e))return!0}return!1},t}(o),t.Arr=i=function(e){function t(e){this.objects=e||[]}return Et(t,e),t.prototype.children=["objects"],t.prototype.compileNode=function(e){var t,n,r,i,s,o,u;if(!this.objects.length)return[this.makeCode("[]")];e.indent+=V,t=W.compileSplattedArray(e,this.objects);if(t.length)return t;t=[],n=function(){var t,n,r,i;r=this.objects,i=[];for(t=0,n=r.length;t<n;t++)s=r[t],i.push(s.compileToFragments(e,N));return i}.call(this);for(i=o=0,u=n.length;o<u;i=++o)r=n[i],i&&t.push(this.makeCode(", ")),t.push.apply(t,r);return ot(t).indexOf("\n")>=0?(t.unshift(this.makeCode("[\n"+e.indent)),t.push(this.makeCode("\n"+this.tab+"]"))):(t.unshift(this.makeCode("[")),t.push(this.makeCode("]"))),t},t.prototype.assigns=function(e){var t,n,r,i;i=this.objects;for(n=0,r=i.length;n<r;n++){t=i[n];if(t.assigns(e))return!0}return!1},t}(o),t.Class=f=function(e){function t(e,t,n){this.variable=e,this.parent=t,this.body=n!=null?n:new u,this.boundFuncs=[],this.body.classBody=!0}return Et(t,e),t.prototype.children=["variable","parent","body"],t.prototype.determineName=function(){var e,t;return this.variable?(e=(t=ut(this.variable.properties))?t instanceof r&&t.name.value:this.variable.base.value,St.call(R,e)>=0&&this.variable.error("class variable name may not be "+e),e&&(e=g.test(e)&&e)):null},t.prototype.setContext=function(e){return this.body.traverseChildren(!1,function(t){if(t.classBody)return!1;if(t instanceof A&&t.value==="this")return t.value=e;if(t instanceof c){t.klass=e;if(t.bound)return t.context=e}})},t.prototype.addBoundFunctions=function(e){var t,n,i,s,o;o=this.boundFuncs;for(i=0,s=o.length;i<s;i++)t=o[i],n=(new G(new A("this"),[new r(t)])).compile(e),this.ctor.body.unshift(new A(""+n+" = "+vt("bind")+"("+n+", this)"))},t.prototype.addProperties=function(e,t,n){var i,o,u,a,f;return f=e.base.properties.slice(0),u=function(){var e;e=[];while(i=f.shift())i instanceof s&&(o=i.variable.base,delete i.context,a=i.value,o.value==="constructor"?(this.ctor&&i.error("cannot define more than one constructor in a class"),a.bound&&i.error("cannot define a constructor as a bound function"),a instanceof c?i=this.ctor=a:(this.externalCtor=n.scope.freeVariable("class"),i=new s(new A(this.externalCtor),a))):i.variable["this"]?(a["static"]=!0,a.bound&&(a.context=t)):(i.variable=new G(new A(t),[new r(new A("prototype")),new r(o)]),a instanceof c&&a.bound&&(this.boundFuncs.push(o),a.bound=!1))),e.push(i);return e}.call(this),tt(u)},t.prototype.walkBody=function(e,n){var r=this;return this.traverseChildren(!1,function(i){var s,o,a,f,l,c,h;s=!0;if(i instanceof t)return!1;if(i instanceof u){h=o=i.expressions;for(a=l=0,c=h.length;l<c;a=++l)f=h[a],f instanceof G&&f.isObject(!0)&&(s=!1,o[a]=r.addProperties(f,e,n));i.expressions=o=st(o)}return s&&!(i instanceof t)})},t.prototype.hoistDirectivePrologue=function(){var e,t,n;t=0,e=this.body.expressions;while((n=e[t])&&n instanceof p||n instanceof G&&n.isString())++t;return this.directives=e.splice(0,t)},t.prototype.ensureConstructor=function(e,t){var n,r,i;return n=!this.ctor,this.ctor||(this.ctor=new c),this.ctor.ctor=this.ctor.name=e,this.ctor.klass=null,this.ctor.noReturn=!0,n?(this.parent&&(i=new A(""+e+".__super__.constructor.apply(this, arguments)")),this.externalCtor&&(i=new A(""+this.externalCtor+".apply(this, arguments)")),i&&(r=new A(t.scope.freeVariable("ref")),this.ctor.body.unshift(new s(r,i))),this.addBoundFunctions(t),i&&(this.ctor.body.push(r),this.ctor.body.makeReturn()),this.body.expressions.unshift(this.ctor)):this.addBoundFunctions(t)},t.prototype.compileNode=function(e){var t,n,r,i,o,u,a;return n=this.determineName(),o=n||"_Class",o.reserved&&(o="_"+o),i=new A(o),this.hoistDirectivePrologue(),this.setContext(o),this.walkBody(o,e),this.ensureConstructor(o,e),this.body.spaced=!0,this.ctor instanceof c||this.body.expressions.unshift(this.ctor),this.body.expressions.push(i),(a=this.body.expressions).unshift.apply(a,this.directives),t=l.wrap(this.body),this.parent&&(this.superClass=new A(e.scope.freeVariable("super",!1)),this.body.expressions.unshift(new v(i,this.superClass)),t.args.push(this.parent),u=t.variable.params||t.variable.base.params,u.push(new H(this.superClass))),r=new B(t,!0),this.variable&&(r=new s(this.variable,r)),r.compileToFragments(e)},t}(o),t.Assign=s=function(e){function t(e,t,n,r){var i,s,o;this.variable=e,this.value=t,this.context=n,this.param=r&&r.param,this.subpattern=r&&r.subpattern,i=(o=s=this.variable.unwrapAll().value,St.call(R,o)>=0),i&&this.context!=="object"&&this.variable.error('variable name may not be "'+s+'"')}return Et(t,e),t.prototype.children=["variable","value"],t.prototype.isStatement=function(e){return(e!=null?e.level:void 0)===L&&this.context!=null&&St.call(this.context,"?")>=0},t.prototype.assigns=function(e){return this[this.context==="object"?"value":"variable"].assigns(e)},t.prototype.unfoldSoak=function(e){return dt(e,this,"variable")},t.prototype.compileNode=function(e){var t,n,r,i,s,o,u,a,f,l,h;if(r=this.variable instanceof G){if(this.variable.isArray()||this.variable.isObject())return this.compilePatternMatch(e);if(this.variable.isSplice())return this.compileSplice(e);if((a=this.context)==="||="||a==="&&="||a==="?=")return this.compileConditional(e)}n=this.variable.compileToFragments(e,N),s=ot(n);if(!this.context){u=this.variable.unwrapAll(),u.isAssignable()||this.variable.error('"'+this.variable.compile(e)+'" cannot be assigned');if(typeof u.hasProperties=="function"?!u.hasProperties():!void 0)this.param?e.scope.add(s,"var"):e.scope.find(s)}return this.value instanceof c&&(i=O.exec(s))&&(i[1]&&(this.value.klass=i[1]),this.value.name=(f=(l=(h=i[2])!=null?h:i[3])!=null?l:i[4])!=null?f:i[5]),o=this.value.compileToFragments(e,N),this.context==="object"?n.concat(this.makeCode(": "),o):(t=n.concat(this.makeCode(" "+(this.context||"=")+" "),o),e.level<=N?t:this.wrapInBraces(t))},t.prototype.compilePatternMatch=function(e){var n,i,s,o,u,a,f,l,c,h,p,d,v,m,y,b,w,E,x,T,k,O,M,_,D,P,H,F;b=e.level===L,E=this.value,p=this.variable.base.objects;if(!(d=p.length))return s=E.compileToFragments(e),e.level>=C?this.wrapInBraces(s):s;f=this.variable.isObject();if(!b||d!==1||(h=p[0])instanceof W){x=E.compileToFragments(e,N),T=ot(x),i=[],y=!1;if(!g.test(T)||this.variable.assigns(T))i.push([this.makeCode(""+(v=e.scope.freeVariable("ref"))+" = ")].concat(xt.call(x))),x=[this.makeCode(v)],T=v;for(u=k=0,O=p.length;k<O;u=++k)h=p[u],a=u,f&&(h instanceof t?(P=h,H=P.variable,a=H.base,h=P.value):h.base instanceof B?(F=(new G(h.unwrapAll())).cacheReference(e),h=F[0],a=F[1]):a=h["this"]?h.properties[0].name:h),!y&&h instanceof W?(c=h.name.unwrap().value,h=h.unwrap(),w=""+d+" <= "+T+".length ? "+vt("slice")+".call("+T+", "+u,(m=d-u-1)?(l=e.scope.freeVariable("i"),w+=", "+l+" = "+T+".length - "+m+") : ("+l+" = "+u+", [])"):w+=") : []",w=new A(w),y=""+l+"++"):(c=h.unwrap().value,h instanceof W&&h.error("multiple splats are disallowed in an assignment"),typeof a=="number"?(a=new A(y||a),n=!1):n=f&&g.test(a.unwrap().value||0),w=new G(new A(T),[new(n?r:S)(a)])),c!=null&&St.call(j,c)>=0&&h.error("assignment to a reserved word: "+h.compile(e)),i.push((new t(h,w,null,{param:this.param,subpattern:!0})).compileToFragments(e,N));return!b&&!this.subpattern&&i.push(x),o=this.joinFragmentArrays(i,", "),e.level<N?o:this.wrapInBraces(o)}return h instanceof t?(M=h,_=M.variable,a=_.base,h=M.value):a=f?h["this"]?h.properties[0].name:h:new A(0),n=g.test(a.unwrap().value||0),E=new G(E),E.properties.push(new(n?r:S)(a)),(D=h.unwrap().value,St.call(j,D)>=0)&&h.error("assignment to a reserved word: "+h.compile(e)),(new t(h,E,null,{param:this.param})).compileToFragments(e,L)},t.prototype.compileConditional=function(e){var n,r,i;return i=this.variable.cacheReference(e),n=i[0],r=i[1],!n.properties.length&&n.base instanceof A&&n.base.value!=="this"&&!e.scope.check(n.base.value)&&this.variable.error('the variable "'+n.base.value+"\" can't be assigned with "+this.context+" because it has not been declared before"),St.call(this.context,"?")>=0&&(e.isExistentialEquals=!0),(new P(this.context.slice(0,-1),n,new t(r,this.value,"="))).compileToFragments(e)},t.prototype.compileSplice=function(e){var t,n,r,i,s,o,u,a,f,l,c,h;return l=this.variable.properties.pop().range,r=l.from,u=l.to,n=l.exclusive,o=this.variable.compile(e),r?(c=this.cacheToCodeFragments(r.cache(e,C)),i=c[0],s=c[1]):i=s="0",u?(r!=null?r.isSimpleNumber():void 0)&&u.isSimpleNumber()?(u=+u.compile(e)- +s,n||(u+=1)):(u=u.compile(e,x)+" - "+s,n||(u+=" + 1")):u="9e9",h=this.value.cache(e,N),a=h[0],f=h[1],t=[].concat(this.makeCode("[].splice.apply("+o+", ["+i+", "+u+"].concat("),a,this.makeCode(")), "),f),e.level>L?this.wrapInBraces(t):t},t}(o),t.Code=c=function(e){function t(e,t,n){this.params=e||[],this.body=t||new u,this.bound=n==="boundfunc",this.bound&&(this.context="_this")}return Et(t,e),t.prototype.children=["params","body"],t.prototype.isStatement=function(){return!!this.ctor},t.prototype.jumps=_,t.prototype.compileNode=function(e){var t,n,r,o,u,a,f,l,c,h,p,d,v,m,g,y,b,E,S,T,N,C,k,L,O,M,_,D,H;e.scope=new U(e.scope,this.body,this),e.scope.shared=nt(e,"sharedScope"),e.indent+=V,delete e.bare,delete e.isExistentialEquals,c=[],r=[],this.eachParamName(function(t){if(!e.scope.check(t))return e.scope.parameter(t)}),O=this.params;for(g=0,S=O.length;g<S;g++){l=O[g];if(!l.splat)continue;M=this.params;for(y=0,T=M.length;y<T;y++)f=M[y].name,f["this"]&&(f=f.properties[0].name),f.value&&e.scope.add(f.value,"var",!0);p=new s(new G(new i(function(){var t,n,r,i;r=this.params,i=[];for(t=0,n=r.length;t<n;t++)f=r[t],i.push(f.asReference(e));return i}.call(this))),new G(new A("arguments")));break}_=this.params;for(b=0,N=_.length;b<N;b++)l=_[b],l.isComplex()?(v=h=l.asReference(e),l.value&&(v=new P("?",h,l.value)),r.push(new s(new G(l.name),v,"=",{param:!0}))):(h=l,l.value&&(a=new A(h.name.value+" == null"),v=new s(new G(l.name),l.value,"="),r.push(new w(a,v)))),p||c.push(h);m=this.body.isEmpty(),p&&r.unshift(p),r.length&&(D=this.body.expressions).unshift.apply(D,r);for(o=E=0,C=c.length;E<C;o=++E)f=c[o],c[o]=f.compileToFragments(e),e.scope.parameter(ot(c[o]));d=[],this.eachParamName(function(e,t){return St.call(d,e)>=0&&t.error("multiple parameters named '"+e+"'"),d.push(e)}),!m&&!this.noReturn&&this.body.makeReturn(),this.bound&&(((H=e.scope.parent.method)!=null?H.bound:void 0)?this.bound=this.context=e.scope.parent.method.context:this["static"]||e.scope.parent.assign("_this","this")),u=e.indent,n="function",this.ctor&&(n+=" "+this.name),n+="(",t=[this.makeCode(n)];for(o=L=0,k=c.length;L<k;o=++L)f=c[o],o&&t.push(this.makeCode(", ")),t.push.apply(t,f);return t.push(this.makeCode(") {")),this.body.isEmpty()||(t=t.concat(this.makeCode("\n"),this.body.compileWithDeclarations(e),this.makeCode("\n"+this.tab))),t.push(this.makeCode("}")),this.ctor?[this.makeCode(this.tab)].concat(xt.call(t)):this.front||e.level>=x?this.wrapInBraces(t):t},t.prototype.eachParamName=function(e){var t,n,r,i,s;i=this.params,s=[];for(n=0,r=i.length;n<r;n++)t=i[n],s.push(t.eachName(e));return s},t.prototype.traverseChildren=function(e,n){if(e)return t.__super__.traverseChildren.call(this,e,n)},t}(o),t.Param=H=function(e){function t(e,t,n){var r;this.name=e,this.value=t,this.splat=n,(r=e=this.name.unwrapAll().value,St.call(R,r)>=0)&&this.name.error('parameter name "'+e+'" is not allowed')}return Et(t,e),t.prototype.children=["name","value"],t.prototype.compileToFragments=function(e){return this.name.compileToFragments(e,N)},t.prototype.asReference=function(e){var t;return this.reference?this.reference:(t=this.name,t["this"]?(t=t.properties[0].name,t.value.reserved&&(t=new A(e.scope.freeVariable(t.value)))):t.isComplex()&&(t=new A(e.scope.freeVariable("arg"))),t=new G(t),this.splat&&(t=new W(t)),this.reference=t)},t.prototype.isComplex=function(){return this.name.isComplex()},t.prototype.eachName=function(e,t){var n,r,i,o,u,a;t==null&&(t=this.name),n=function(t){var n;n=t.properties[0].name;if(!n.value.reserved)return e(n.value,n)};if(t instanceof A)return e(t.value,t);if(t instanceof G)return n(t);a=t.objects;for(o=0,u=a.length;o<u;o++)i=a[o],i instanceof s?this.eachName(e,i.value.unwrap()):i instanceof W?(r=i.name.unwrap(),e(r.value,r)):i instanceof G?i.isArray()||i.isObject()?this.eachName(e,i.base):i["this"]?n(i):e(i.base.value,i.base):i.error("illegal parameter "+i.compile())},t}(o),t.Splat=W=function(e){function t(e){this.name=e.compile?e:new A(e)}return Et(t,e),t.prototype.children=["name"],t.prototype.isAssignable=Z,t.prototype.assigns=function(e){return this.name.assigns(e)},t.prototype.compileToFragments=function(e){return this.name.compileToFragments(e)},t.prototype.unwrap=function(){return this.name},t.compileSplattedArray=function(e,n,r){var i,s,o,u,a,f,l,c,h,p;l=-1;while((c=n[++l])&&!(c instanceof t))continue;if(l>=n.length)return[];if(n.length===1)return c=n[0],a=c.compileToFragments(e,N),r?a:[].concat(c.makeCode(""+vt("slice")+".call("),a,c.makeCode(")"));i=n.slice(l);for(f=h=0,p=i.length;h<p;f=++h)c=i[f],o=c.compileToFragments(e,N),i[f]=c instanceof t?[].concat(c.makeCode(""+vt("slice")+".call("),o,c.makeCode(")")):[].concat(c.makeCode("["),o,c.makeCode("]"));return l===0?(c=n[0],u=c.joinFragmentArrays(i.slice(1),", "),i[0].concat(c.makeCode(".concat("),u,c.makeCode(")"))):(s=function(){var t,r,i,s;i=n.slice(0,l),s=[];for(t=0,r=i.length;t<r;t++)c=i[t],s.push(c.compileToFragments(e,N));return s}(),s=n[0].joinFragmentArrays(s,", "),u=n[l].joinFragmentArrays(i,", "),[].concat(n[0].makeCode("["),s,n[l].makeCode("].concat("),u,ut(n).makeCode(")")))},t}(o),t.While=Y=function(e){function t(e,t){this.condition=(t!=null?t.invert:void 0)?e.invert():e,this.guard=t!=null?t.guard:void 0}return Et(t,e),t.prototype.children=["condition","guard","body"],t.prototype.isStatement=Z,t.prototype.makeReturn=function(e){return e?t.__super__.makeReturn.apply(this,arguments):(this.returns=!this.jumps({loop:!0}),this)},t.prototype.addBody=function(e){return this.body=e,this},t.prototype.jumps=function(){var e,t,n,r;e=this.body.expressions;if(!e.length)return!1;for(n=0,r=e.length;n<r;n++){t=e[n];if(t.jumps({loop:!0}))return t}return!1},t.prototype.compileNode=function(e){var t,n,r,i;return e.indent+=V,i="",n=this.body,n.isEmpty()?n=this.makeCode(""):(this.returns&&(n.makeReturn(r=e.scope.freeVariable("results")),i=""+this.tab+r+" = [];\n"),this.guard&&(n.expressions.length>1?n.expressions.unshift(new w((new B(this.guard)).invert(),new A("continue"))):this.guard&&(n=u.wrap([new w(this.guard,n)]))),n=[].concat(this.makeCode("\n"),n.compileToFragments(e,L),this.makeCode("\n"+this.tab))),t=[].concat(this.makeCode(i+this.tab+"while ("),this.condition.compileToFragments(e,k),this.makeCode(") {"),n,this.makeCode("}")),this.returns&&t.push(this.makeCode("\n"+this.tab+"return "+r+";")),t},t}(o),t.Op=P=function(e){function t(e,t,r,i){if(e==="in")return new E(t,r);if(e==="do")return this.generateDo(t);if(e==="new"){if(t instanceof a&&!t["do"]&&!t.isNew)return t.newInstance();if(t instanceof c&&t.bound||t["do"])t=new B(t)}return this.operator=n[e]||e,this.first=t,this.second=r,this.flip=!!i,this}var n,r;return Et(t,e),n={"==":"===","!=":"!==",of:"in"},r={"!==":"===","===":"!=="},t.prototype.children=["first","second"],t.prototype.isSimpleNumber=_,t.prototype.isUnary=function(){return!this.second},t.prototype.isComplex=function(){var e;return!this.isUnary()||(e=this.operator)!=="+"&&e!=="-"||this.first.isComplex()},t.prototype.isChainable=function(){var e;return(e=this.operator)==="<"||e===">"||e===">="||e==="<="||e==="==="||e==="!=="},t.prototype.invert=function(){var e,n,i,s,o;if(this.isChainable()&&this.first.isChainable()){e=!0,n=this;while(n&&n.operator)e&&(e=n.operator in r),n=n.first;if(!e)return(new B(this)).invert();n=this;while(n&&n.operator)n.invert=!n.invert,n.operator=r[n.operator],n=n.first;return this}return(s=r[this.operator])?(this.operator=s,this.first.unwrap()instanceof t&&this.first.invert(),this):this.second?(new B(this)).invert():this.operator==="!"&&(i=this.first.unwrap())instanceof t&&((o=i.operator)==="!"||o==="in"||o==="instanceof")?i:new t("!",this)},t.prototype.unfoldSoak=function(e){var t;return((t=this.operator)==="++"||t==="--"||t==="delete")&&dt(e,this,"first")},t.prototype.generateDo=function(e){var t,n,r,i,o,u,f,l;i=[],n=e instanceof s&&(o=e.value.unwrap())instanceof c?o:e,l=n.params||[];for(u=0,f=l.length;u<f;u++)r=l[u],r.value?(i.push(r.value),delete r.value):i.push(r);return t=new a(e,i),t["do"]=!0,t},t.prototype.compileNode=function(e){var t,n,r,i;return n=this.isChainable()&&this.first.isChainable(),n||(this.first.front=this.front),this.operator==="delete"&&e.scope.check(this.first.unwrapAll().value)&&this.error("delete operand may not be argument or var"),((r=this.operator)==="--"||r==="++")&&(i=this.first.unwrapAll().value,St.call(R,i)>=0)&&this.error('cannot increment/decrement "'+this.first.unwrapAll().value+'"'),this.isUnary()?this.compileUnary(e):n?this.compileChain(e):this.operator==="?"?this.compileExistence(e):(t=[].concat(this.first.compileToFragments(e,C),this.makeCode(" "+this.operator+" "),this.second.compileToFragments(e,C)),e.level<=C?t:this.wrapInBraces(t))},t.prototype.compileChain=function(e){var t,n,r,i;return i=this.first.second.cache(e),this.first.second=i[0],r=i[1],n=this.first.compileToFragments(e,C),t=n.concat(this.makeCode(" "+(this.invert?"&&":"||")+" "),r.compileToFragments(e),this.makeCode(" "+this.operator+" "),this.second.compileToFragments(e,C)),this.wrapInBraces(t)},t.prototype.compileExistence=function(e){var t,n;return!e.isExistentialEquals&&this.first.isComplex()?(n=new A(e.scope.freeVariable("ref")),t=new B(new s(n,this.first))):(t=this.first,n=t),(new w(new d(t),n,{type:"if"})).addElse(this.second).compileToFragments(e)},t.prototype.compileUnary=function(e){var n,r,i;r=[],n=this.operator,r.push([this.makeCode(n)]);if(n==="!"&&this.first instanceof d)return this.first.negated=!this.first.negated,this.first.compileToFragments(e);if(e.level>=x)return(new B(this)).compileToFragments(e);i=n==="+"||n==="-",(n==="new"||n==="typeof"||n==="delete"||i&&this.first instanceof t&&this.first.operator===n)&&r.push([this.makeCode(" ")]);if(i&&this.first instanceof t||n==="new"&&this.first.isStatement(e))this.first=new B(this.first);return r.push(this.first.compileToFragments(e,C)),this.flip&&r.reverse(),this.joinFragmentArrays(r,"")},t.prototype.toString=function(e){return t.__super__.toString.call(this,e,this.constructor.name+" "+this.operator)},t}(o),t.In=E=function(e){function t(e,t){this.object=e,this.array=t}return Et(t,e),t.prototype.children=["object","array"],t.prototype.invert=M,t.prototype.compileNode=function(e){var t,n,r,i,s;if(this.array instanceof G&&this.array.isArray()){s=this.array.base.objects;for(r=0,i=s.length;r<i;r++){n=s[r];if(n instanceof W){t=!0;break}continue}if(!t)return this.compileOrTest(e)}return this.compileLoopTest(e)},t.prototype.compileOrTest=function(e){var t,n,r,i,s,o,u,a,f,l,c,h;if(this.array.base.objects.length===0)return[this.makeCode(""+!!this.negated)];l=this.object.cache(e,C),o=l[0],s=l[1],c=this.negated?[" !== "," && "]:[" === "," || "],t=c[0],n=c[1],u=[],h=this.array.base.objects;for(r=a=0,f=h.length;a<f;r=++a)i=h[r],r&&u.push(this.makeCode(n)),u=u.concat(r?s:o,this.makeCode(t),i.compileToFragments(e,x));return e.level<C?u:this.wrapInBraces(u)},t.prototype.compileLoopTest=function(e){var t,n,r,i;return i=this.object.cache(e,N),r=i[0],n=i[1],t=[].concat(this.makeCode(vt("indexOf")+".call("),this.array.compileToFragments(e,N),this.makeCode(", "),n,this.makeCode(") "+(this.negated?"< 0":">= 0"))),ot(r)===ot(n)?t:(t=r.concat(this.makeCode(", "),t),e.level<N?t:this.wrapInBraces(t))},t.prototype.toString=function(e){return t.__super__.toString.call(this,e,this.constructor.name+(this.negated?"!":""))},t}(o),t.Try=K=function(e){function t(e,t,n,r){this.attempt=e,this.errorVariable=t,this.recovery=n,this.ensure=r}return Et(t,e),t.prototype.children=["attempt","recovery","ensure"],t.prototype.isStatement=Z,t.prototype.jumps=function(e){var t;return this.attempt.jumps(e)||((t=this.recovery)!=null?t.jumps(e):void 0)},t.prototype.makeReturn=function(e){return this.attempt&&(this.attempt=this.attempt.makeReturn(e)),this.recovery&&(this.recovery=this.recovery.makeReturn(e)),this},t.prototype.compileNode=function(e){var t,n,r,i;return e.indent+=V,i=this.attempt.compileToFragments(e,L),t=this.recovery?(r=new A("_error"),this.errorVariable?this.recovery.unshift(new s(this.errorVariable,r)):void 0,[].concat(this.makeCode(" catch ("),r.compileToFragments(e),this.makeCode(") {\n"),this.recovery.compileToFragments(e,L),this.makeCode("\n"+this.tab+"}"))):!this.ensure&&!this.recovery?[this.makeCode(" catch (_error) {}")]:[],n=this.ensure?[].concat(this.makeCode(" finally {\n"),this.ensure.compileToFragments(e,L),this.makeCode("\n"+this.tab+"}")):[],[].concat(this.makeCode(""+this.tab+"try {\n"),i,this.makeCode("\n"+this.tab+"}"),t,n)},t}(o),t.Throw=J=function(e){function t(e){this.expression=e}return Et(t,e),t.prototype.children=["expression"],t.prototype.isStatement=Z,t.prototype.jumps=_,t.prototype.makeReturn=$,t.prototype.compileNode=function(e){return[].concat(this.makeCode(this.tab+"throw "),this.expression.compileToFragments(e),this.makeCode(";"))},t}(o),t.Existence=d=function(e){function t(e){this.expression=e}return Et(t,e),t.prototype.children=["expression"],t.prototype.invert=M,t.prototype.compileNode=function(e){var t,n,r,i;return this.expression.front=this.front,r=this.expression.compile(e,C),g.test(r)&&!e.scope.check(r)?(i=this.negated?["===","||"]:["!==","&&"],t=i[0],n=i[1],r="typeof "+r+" "+t+' "undefined" '+n+" "+r+" "+t+" null"):r=""+r+" "+(this.negated?"==":"!=")+" null",[this.makeCode(e.level<=T?r:"("+r+")")]},t}(o),t.Parens=B=function(e){function t(e){this.body=e}return Et(t,e),t.prototype.children=["body"],t.prototype.unwrap=function(){return this.body},t.prototype.isComplex=function(){return this.body.isComplex()},t.prototype.compileNode=function(e){var t,n,r;return n=this.body.unwrap(),n instanceof G&&n.isAtomic()?(n.front=this.front,n.compileToFragments(e)):(r=n.compileToFragments(e,k),t=e.level<C&&(n instanceof P||n instanceof a||n instanceof m&&n.returns),t?r:this.wrapInBraces(r))},t}(o),t.For=m=function(e){function t(e,t){var n;this.source=t.source,this.guard=t.guard,this.step=t.step,this.name=t.name,this.index=t.index,this.body=u.wrap([e]),this.own=!!t.own,this.object=!!t.object,this.object&&(n=[this.index,this.name],this.name=n[0],this.index=n[1]),this.index instanceof G&&this.index.error("index cannot be a pattern matching expression"),this.range=this.source instanceof G&&this.source.base instanceof F&&!this.source.properties.length,this.pattern=this.name instanceof G,this.range&&this.index&&this.index.error("indexes do not apply to range loops"),this.range&&this.pattern&&this.name.error("cannot pattern match over range loops"),this.own&&!this.object&&this.index.error("cannot use own with for-in"),this.returns=!1}return Et(t,e),t.prototype.children=["body","source","guard","step"],t.prototype.compileNode=function(e){var t,n,r,i,o,a,f,l,c,h,p,d,v,m,y,b,E,S,x,T,C,k,O,M,_,D,P,H,j,F,R,U,z,W;return t=u.wrap([this.body]),S=(z=ut(t.expressions))!=null?z.jumps():void 0,S&&S instanceof I&&(this.returns=!1),P=this.range?this.source.base:this.source,D=e.scope,T=this.name&&this.name.compile(e,N),m=this.index&&this.index.compile(e,N),T&&!this.pattern&&D.find(T),m&&D.find(m),this.returns&&(_=D.freeVariable("results")),y=this.object&&m||D.freeVariable("i"),b=this.range&&T||m||y,E=b!==y?""+b+" = ":"",this.step&&!this.range&&(W=this.cacheToCodeFragments(this.step.cache(e,N)),H=W[0],F=W[1],j=F.match(q)),this.pattern&&(T=y),U="",p="",f="",d=this.tab+V,this.range?h=P.compileToFragments(ft(e,{index:y,name:T,step:this.step})):(R=this.source.compile(e,N),(T||this.own)&&!g.test(R)&&(f+=""+this.tab+(k=D.freeVariable("ref"))+" = "+R+";\n",R=k),T&&!this.pattern&&(C=""+T+" = "+R+"["+b+"]"),this.object||(H!==F&&(f+=""+this.tab+H+";\n"),this.step&&j&&(c=+j<0)||(x=D.freeVariable("len")),o=""+E+y+" = 0, "+x+" = "+R+".length",a=""+E+y+" = "+R+".length - 1",r=""+y+" < "+x,i=""+y+" >= 0",this.step?(j?c&&(r=i,o=a):(r=""+F+" > 0 ? "+r+" : "+i,o="("+F+" > 0 ? ("+o+") : "+a+")"),v=""+y+" += "+F):v=""+(b!==y?"++"+y:""+y+"++"),h=[this.makeCode(""+o+"; "+r+"; "+E+v)])),this.returns&&(O=""+this.tab+_+" = [];\n",M="\n"+this.tab+"return "+_+";",t.makeReturn(_)),this.guard&&(t.expressions.length>1?t.expressions.unshift(new w((new B(this.guard)).invert(),new A("continue"))):this.guard&&(t=u.wrap([new w(this.guard,t)]))),this.pattern&&t.expressions.unshift(new s(this.name,new A(""+R+"["+b+"]"))),l=[].concat(this.makeCode(f),this.pluckDirectCall(e,t)),C&&(U="\n"+d+C+";"),this.object&&(h=[this.makeCode(""+b+" in "+R)],this.own&&(p="\n"+d+"if (!"+vt("hasProp")+".call("+R+", "+b+")) continue;")),n=t.compileToFragments(ft(e,{indent:d}),L),n&&n.length>0&&(n=[].concat(this.makeCode("\n"),n,this.makeCode("\n"))),[].concat(l,this.makeCode(""+(O||"")+this.tab+"for ("),h,this.makeCode(") {"+p+U),n,this.makeCode(""+this.tab+"}"+(M||"")))},t.prototype.pluckDirectCall=function(e,t){var n,r,i,o,u,f,l,h,p,d,v,m,g,y,b;r=[],d=t.expressions;for(u=h=0,p=d.length;h<p;u=++h){i=d[u],i=i.unwrapAll();if(!(i instanceof a))continue;l=i.variable.unwrapAll();if(!(l instanceof c||l instanceof G&&((v=l.base)!=null?v.unwrapAll():void 0)instanceof c&&l.properties.length===1&&((m=(g=l.properties[0].name)!=null?g.value:void 0)==="call"||m==="apply")))continue;o=((y=l.base)!=null?y.unwrapAll():void 0)||l,f=new A(e.scope.freeVariable("fn")),n=new G(f),l.base&&(b=[n,l],l.base=b[0],n=b[1]),t.expressions[u]=new a(n,i.args),r=r.concat(this.makeCode(this.tab),(new s(f,o)).compileToFragments(e,L),this.makeCode(";\n"))}return r},t}(Y),t.Switch=X=function(e){function t(e,t,n){this.subject=e,this.cases=t,this.otherwise=n}return Et(t,e),t.prototype.children=["subject","cases","otherwise"],t.prototype.isStatement=Z,t.prototype.jumps=function(e){var t,n,r,i,s,o,u;e==null&&(e={block:!0}),s=this.cases;for(r=0,i=s.length;r<i;r++){o=s[r],n=o[0],t=o[1];if(t.jumps(e))return t}return(u=this.otherwise)!=null?u.jumps(e):void 0},t.prototype.makeReturn=function(e){var t,n,r,i,s;i=this.cases;for(n=0,r=i.length;n<r;n++)t=i[n],t[1].makeReturn(e);return e&&(this.otherwise||(this.otherwise=new u([new A("void 0")]))),(s=this.otherwise)!=null&&s.makeReturn(e),this},t.prototype.compileNode=function(e){var t,n,r,i,s,o,u,a,f,l,c,h,p,d,v,m;a=e.indent+V,f=e.indent=a+V,o=[].concat(this.makeCode(this.tab+"switch ("),this.subject?this.subject.compileToFragments(e,k):this.makeCode("false"),this.makeCode(") {\n")),d=this.cases;for(u=l=0,h=d.length;l<h;u=++l){v=d[u],i=v[0],t=v[1],m=st([i]);for(c=0,p=m.length;c<p;c++)r=m[c],this.subject||(r=r.invert()),o=o.concat(this.makeCode(a+"case "),r.compileToFragments(e,k),this.makeCode(":\n"));(n=t.compileToFragments(e,L)).length>0&&(o=o.concat(n,this.makeCode("\n")));if(u===this.cases.length-1&&!this.otherwise)break;s=this.lastNonComment(t.expressions);if(s instanceof I||s instanceof A&&s.jumps()&&s.value!=="debugger")continue;o.push(r.makeCode(f+"break;\n"))}return this.otherwise&&this.otherwise.expressions.length&&o.push.apply(o,[this.makeCode(a+"default:\n")].concat(xt.call(this.otherwise.compileToFragments(e,L)),[this.makeCode("\n")])),o.push(this.makeCode(this.tab+"}")),o},t}(o),t.If=w=function(e){function t(e,t,n){this.body=t,n==null&&(n={}),this.condition=n.type==="unless"?e.invert():e,this.elseBody=null,this.isChain=!1,this.soak=n.soak}return Et(t,e),t.prototype.children=["condition","body","elseBody"],t.prototype.bodyNode=function(){var e;return(e=this.body)!=null?e.unwrap():void 0},t.prototype.elseBodyNode=function(){var e;return(e=this.elseBody)!=null?e.unwrap():void 0},t.prototype.addElse=function(e){return this.isChain?this.elseBodyNode().addElse(e):(this.isChain=e instanceof t,this.elseBody=this.ensureBlock(e),this.elseBody.updateLocationDataIfMissing(e.locationData)),this},t.prototype.isStatement=function(e){var t;return(e!=null?e.level:void 0)===L||this.bodyNode().isStatement(e)||((t=this.elseBodyNode())!=null?t.isStatement(e):void 0)},t.prototype.jumps=function(e){var t;return this.body.jumps(e)||((t=this.elseBody)!=null?t.jumps(e):void 0)},t.prototype.compileNode=function(e){return this.isStatement(e)?this.compileStatement(e):this.compileExpression(e)},t.prototype.makeReturn=function(e){return e&&(this.elseBody||(this.elseBody=new u([new A("void 0")]))),this.body&&(this.body=new u([this.body.makeReturn(e)])),this.elseBody&&(this.elseBody=new u([this.elseBody.makeReturn(e)])),this},t.prototype.ensureBlock=function(e){return e instanceof u?e:new u([e])},t.prototype.compileStatement=function(e){var n,r,i,s,o,u,a;return i=nt(e,"chainChild"),o=nt(e,"isExistentialEquals"),o?(new t(this.condition.invert(),this.elseBodyNode(),{type:"if"})).compileToFragments(e):(a=e.indent+V,s=this.condition.compileToFragments(e,k),r=this.ensureBlock(this.body).compileToFragments(ft(e,{indent:a})),u=[].concat(this.makeCode("if ("),s,this.makeCode(") {\n"),r,this.makeCode("\n"+this.tab+"}")),i||u.unshift(this.makeCode(this.tab)),this.elseBody?(n=u.concat(this.makeCode(" else ")),this.isChain?(e.chainChild=!0,n=n.concat(this.elseBody.unwrap().compileToFragments(e,L))):n=n.concat(this.makeCode("{\n"),this.elseBody.compileToFragments(ft(e,{indent:a}),L),this.makeCode("\n"+this.tab+"}")),n):u)},t.prototype.compileExpression=function(e){var t,n,r,i;return r=this.condition.compileToFragments(e,T),n=this.bodyNode().compileToFragments(e,N),t=this.elseBodyNode()?this.elseBodyNode().compileToFragments(e,N):[this.makeCode("void 0")],i=r.concat(this.makeCode(" ? "),n,this.makeCode(" : "),t),e.level>=T?this.wrapInBraces(i):i},t.prototype.unfoldSoak=function(){return this.soak&&this},t}(o),l={wrap:function(e,t,n){var i,s,o,f,l;if(e.jumps())return e;f=new c([],u.wrap([e])),i=[],s=e.contains(this.isLiteralArguments),s&&e.classBody&&s.error("Class bodies shouldn't reference arguments");if(s||e.contains(this.isLiteralThis))l=new A(s?"apply":"call"),i=[new A("this")],s&&i.push(new A("arguments")),f=new G(f,[new r(l)]);return f.noReturn=n,o=new a(f,i),t?u.wrap([o]):o},isLiteralArguments:function(e){return e instanceof A&&e.value==="arguments"&&!e.asKey},isLiteralThis:function(e){return e instanceof A&&e.value==="this"&&!e.asKey||e instanceof c&&e.bound||e instanceof a&&e.isSuper}},dt=function(e,t,n){var r;if(!(r=t[n].unfoldSoak(e)))return;return t[n]=r.body,r.body=new G(t),r},Q={"extends":function(){return"function(child, parent) { for (var key in parent) { if ("+vt("hasProp")+".call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }"},bind:function(){return"function(fn, me){ return function(){ return fn.apply(me, arguments); }; }"},indexOf:function(){return"[].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }"},hasProp:function(){return"{}.hasOwnProperty"},slice:function(){return"[].slice"}},L=1,k=2,N=3,T=4,C=5,x=6,V="  ",y="[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*",g=RegExp("^"+y+"$"),q=/^[+-]?\d+$/,O=RegExp("^(?:("+y+")\\.prototype(?:\\.("+y+")|\\[(\"(?:[^\\\\\"\\r\\n]|\\\\.)*\"|'(?:[^\\\\'\\r\\n]|\\\\.)*')\\]|\\[(0x[\\da-fA-F]+|\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\]))|("+y+")$"),b=/^['"]/,vt=function(e){var t;return t="__"+e,U.root.assign(t,Q[e]()),t},lt=function(e,t){return e=e.replace(/\n/g,"$&"+t),e.replace(/\s+$/,"")}}),ace.define("ace/mode/coffee/scope",["require","exports","module","ace/mode/coffee/helpers"],function(e,t,n){var r,i,s,o;o=e("./helpers"),i=o.extend,s=o.last,t.Scope=r=function(){function e(t,n,r){this.parent=t,this.expressions=n,this.method=r,this.variables=[{name:"arguments",type:"arguments"}],this.positions={},this.parent||(e.root=this)}return e.root=null,e.prototype.add=function(e,t,n){return this.shared&&!n?this.parent.add(e,t,n):Object.prototype.hasOwnProperty.call(this.positions,e)?this.variables[this.positions[e]].type=t:this.positions[e]=this.variables.push({name:e,type:t})-1},e.prototype.namedMethod=function(){var e;return((e=this.method)!=null?e.name:void 0)||!this.parent?this.method:this.parent.namedMethod()},e.prototype.find=function(e){return this.check(e)?!0:(this.add(e,"var"),!1)},e.prototype.parameter=function(e){if(this.shared&&this.parent.check(e,!0))return;return this.add(e,"param")},e.prototype.check=function(e){var t;return!!(this.type(e)||((t=this.parent)!=null?t.check(e):void 0))},e.prototype.temporary=function(e,t){return e.length>1?"_"+e+(t>1?t-1:""):"_"+(t+parseInt(e,36)).toString(36).replace(/\d/g,"a")},e.prototype.type=function(e){var t,n,r,i;i=this.variables;for(n=0,r=i.length;n<r;n++){t=i[n];if(t.name===e)return t.type}return null},e.prototype.freeVariable=function(e,t){var n,r;t==null&&(t=!0),n=0;while(this.check(r=this.temporary(e,n)))n++;return t&&this.add(r,"var",!0),r},e.prototype.assign=function(e,t){return this.add(e,{value:t,assigned:!0},!0),this.hasAssignments=!0},e.prototype.hasDeclarations=function(){return!!this.declaredVariables().length},e.prototype.declaredVariables=function(){var e,t,n,r,i,s;e=[],t=[],s=this.variables;for(r=0,i=s.length;r<i;r++)n=s[r],n.type==="var"&&(n.name.charAt(0)==="_"?t:e).push(n.name);return e.sort().concat(t.sort())},e.prototype.assignedVariables=function(){var e,t,n,r,i;r=this.variables,i=[];for(t=0,n=r.length;t<n;t++)e=r[t],e.type.assigned&&i.push(""+e.name+" = "+e.type.value);return i},e}()})
\ No newline at end of file
+"no use strict";(function(e){if(typeof e.window!="undefined"&&e.document)return;e.console=function(){var e=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:e})},e.console.error=e.console.warn=e.console.log=e.console.trace=e.console,e.window=e,e.ace=e,e.onerror=function(e,t,n,r,i){console.error("Worker "+(i?i.stack:e))},e.normalizeModule=function(t,n){if(n.indexOf("!")!==-1){var r=n.split("!");return e.normalizeModule(t,r[0])+"!"+e.normalizeModule(t,r[1])}if(n.charAt(0)=="."){var i=t.split("/").slice(0,-1).join("/");n=(i?i+"/":"")+n;while(n.indexOf(".")!==-1&&s!=n){var s=n;n=n.replace(/^\.\//,"").replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return n},e.require=function(t,n){n||(n=t,t=null);if(!n.charAt)throw new Error("worker.js require() accepts only (parentId, id) as arguments");n=e.normalizeModule(t,n);var r=e.require.modules[n];if(r)return r.initialized||(r.initialized=!0,r.exports=r.factory().exports),r.exports;var i=n.split("/");if(!e.require.tlns)return console.log("unable to load "+n);i[0]=e.require.tlns[i[0]]||i[0];var s=i.join("/")+".js";return e.require.id=n,importScripts(s),e.require(t,n)},e.require.modules={},e.require.tlns={},e.define=function(t,n,r){arguments.length==2?(r=n,typeof t!="string"&&(n=t,t=e.require.id)):arguments.length==1&&(r=t,n=[],t=e.require.id),n.length||(n=["require","exports","module"]);if(t.indexOf("text!")===0)return;var i=function(n){return e.require(t,n)};e.require.modules[t]={exports:{},factory:function(){var e=this,t=r.apply(this,n.map(function(t){switch(t){case"require":return i;case"exports":return e.exports;case"module":return e;default:return i(t)}}));return t&&(e.exports=t),e}}},e.define.amd={},e.initBaseUrls=function(e){require.tlns=e},e.initSender=function(){var t=e.require("ace/lib/event_emitter").EventEmitter,n=e.require("ace/lib/oop"),r=function(){};return function(){n.implement(this,t),this.callback=function(e,t){postMessage({type:"call",id:t,data:e})},this.emit=function(e,t){postMessage({type:"event",name:e,data:t})}}.call(r.prototype),new r};var t=e.main=null,n=e.sender=null;e.onmessage=function(r){var i=r.data;if(i.command){if(!t[i.command])throw new Error("Unknown command:"+i.command);t[i.command].apply(t,i.args)}else if(i.init){initBaseUrls(i.tlns),require("ace/lib/es5-shim"),n=e.sender=initSender();var s=require(i.module)[i.classname];t=e.main=new s(n)}else i.event&&n&&n._signal(i.event,i.data)}})(this),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,o=e("./anchor").Anchor,u=function(e){this.$lines=[],e.length===0?this.$lines=[""]:Array.isArray(e)?this._insertLines(0,e):this.insert({row:0,column:0},e)};(function(){r.implement(this,i),this.setValue=function(e){var t=this.getLength();this.remove(new s(0,0,t,this.getLine(t-1).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new o(this,e,t)},"aaa".split(/a/).length===0?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){if(this.$newLineMode===e)return;this.$newLineMode=e,this._signal("changeNewLineMode")},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return e=="\r\n"||e=="\r"||e=="\n"},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){if(e.start.row==e.end.row)return this.getLine(e.start.row).substring(e.start.column,e.end.column);var t=this.getLines(e.start.row,e.end.row);t[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;return e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column)),t.join(this.getNewLineCharacter())},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):e.row<0&&(e.row=0),e},this.insert=function(e,t){if(!t||t.length===0)return e;e=this.$clipPosition(e),this.getLength()<=1&&this.$detectNewLine(t);var n=this.$split(t),r=n.splice(0,1)[0],i=n.length==0?null:n.splice(n.length-1,1)[0];return e=this.insertInLine(e,r),i!==null&&(e=this.insertNewLine(e),e=this._insertLines(e.row,n),e=this.insertInLine(e,i||"")),e},this.insertLines=function(e,t){return e>=this.getLength()?this.insert({row:e,column:0},"\n"+t.join("\n")):this._insertLines(Math.max(e,0),t)},this._insertLines=function(e,t){if(t.length==0)return{row:e,column:0};while(t.length>61440){var n=this._insertLines(e,t.slice(0,61440));t=t.slice(61440),e=n.row}var r=[e,0];r.push.apply(r,t),this.$lines.splice.apply(this.$lines,r);var i=new s(e,0,e+t.length,0),o={action:"insertLines",range:i,lines:t};return this._signal("change",{data:o}),i.end},this.insertNewLine=function(e){e=this.$clipPosition(e);var t=this.$lines[e.row]||"";this.$lines[e.row]=t.substring(0,e.column),this.$lines.splice(e.row+1,0,t.substring(e.column,t.length));var n={row:e.row+1,column:0},r={action:"insertText",range:s.fromPoints(e,n),text:this.getNewLineCharacter()};return this._signal("change",{data:r}),n},this.insertInLine=function(e,t){if(t.length==0)return e;var n=this.$lines[e.row]||"";this.$lines[e.row]=n.substring(0,e.column)+t+n.substring(e.column);var r={row:e.row,column:e.column+t.length},i={action:"insertText",range:s.fromPoints(e,r),text:t};return this._signal("change",{data:i}),r},this.remove=function(e){e instanceof s||(e=s.fromPoints(e.start,e.end)),e.start=this.$clipPosition(e.start),e.end=this.$clipPosition(e.end);if(e.isEmpty())return e.start;var t=e.start.row,n=e.end.row;if(e.isMultiLine()){var r=e.start.column==0?t:t+1,i=n-1;e.end.column>0&&this.removeInLine(n,0,e.end.column),i>=r&&this._removeLines(r,i),r!=t&&(this.removeInLine(t,e.start.column,this.getLine(t).length),this.removeNewLine(e.start.row))}else this.removeInLine(t,e.start.column,e.end.column);return e.start},this.removeInLine=function(e,t,n){if(t==n)return;var r=new s(e,t,e,n),i=this.getLine(e),o=i.substring(t,n),u=i.substring(0,t)+i.substring(n,i.length);this.$lines.splice(e,1,u);var a={action:"removeText",range:r,text:o};return this._signal("change",{data:a}),r.start},this.removeLines=function(e,t){return e<0||t>=this.getLength()?this.remove(new s(e,0,t+1,0)):this._removeLines(e,t)},this._removeLines=function(e,t){var n=new s(e,0,t+1,0),r=this.$lines.splice(e,t-e+1),i={action:"removeLines",range:n,nl:this.getNewLineCharacter(),lines:r};return this._signal("change",{data:i}),r},this.removeNewLine=function(e){var t=this.getLine(e),n=this.getLine(e+1),r=new s(e,t.length,e+1,0),i=t+n;this.$lines.splice(e,2,i);var o={action:"removeText",range:r,text:this.getNewLineCharacter()};this._signal("change",{data:o})},this.replace=function(e,t){e instanceof s||(e=s.fromPoints(e.start,e.end));if(t.length==0&&e.isEmpty())return e.start;if(t==this.getTextRange(e))return e.end;this.remove(e);if(t)var n=this.insert(e.start,t);else n=e.start;return n},this.applyDeltas=function(e){for(var t=0;t<e.length;t++){var n=e[t],r=s.fromPoints(n.range.start,n.range.end);n.action=="insertLines"?this.insertLines(r.start.row,n.lines):n.action=="insertText"?this.insert(r.start,n.text):n.action=="removeLines"?this._removeLines(r.start.row,r.end.row-1):n.action=="removeText"&&this.remove(r)}},this.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--){var n=e[t],r=s.fromPoints(n.range.start,n.range.end);n.action=="insertLines"?this._removeLines(r.start.row,r.end.row-1):n.action=="insertText"?this.remove(r):n.action=="removeLines"?this._insertLines(r.start.row,n.lines):n.action=="removeText"&&this.insert(r.start,n.text)}},this.indexToPosition=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length;for(var i=t||0,s=n.length;i<s;i++){e-=n[i].length+r;if(e<0)return{row:i,column:e+n[i].length+r}}return{row:s-1,column:n[s-1].length}},this.positionToIndex=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=0,s=Math.min(e.row,n.length);for(var o=t||0;o<s;++o)i+=n[o].length+r;return i+e.column}}).call(u.prototype),t.Document=u}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,t,n){var r={},i=function(){this.propagationStopped=!0},s=function(){this.defaultPrevented=!0};r._emit=r._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],r=this._defaultHandlers[e];if(!n.length&&!r)return;if(typeof t!="object"||!t)t={};t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=i),t.preventDefault||(t.preventDefault=s),n=n.slice();for(var o=0;o<n.length;o++){n[o](t,this);if(t.propagationStopped)break}if(r&&!t.defaultPrevented)return r(t,this)},r._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(!n)return;n=n.slice();for(var r=0;r<n.length;r++)n[r](t,this)},r.once=function(e,t){var n=this;t&&this.addEventListener(e,function r(){n.removeEventListener(e,r),t.apply(null,arguments)})},r.setDefaultHandler=function(e,t){var n=this._defaultHandlers;n||(n=this._defaultHandlers={_disabled_:{}});if(n[e]){var r=n[e],i=n._disabled_[e];i||(n._disabled_[e]=i=[]),i.push(r);var s=i.indexOf(t);s!=-1&&i.splice(s,1)}n[e]=t},r.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(!n)return;var r=n._disabled_[e];if(n[e]==t){var i=n[e];r&&this.setDefaultHandler(e,r.pop())}else if(r){var s=r.indexOf(t);s!=-1&&r.splice(s,1)}},r.on=r.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[e];return r||(r=this._eventRegistry[e]=[]),r.indexOf(t)==-1&&r[n?"unshift":"push"](t),t},r.off=r.removeListener=r.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(!n)return;var r=n.indexOf(t);r!==-1&&n.splice(r,1)},r.removeAllListeners=function(e){this._eventRegistry&&(this._eventRegistry[e]=[])},t.EventEmitter=r}),ace.define("ace/range",["require","exports","module"],function(e,t,n){var r=function(e,t){return e.row-t.row||e.column-t.column},i=function(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return this.compare(e,t)==0},this.compareRange=function(e){var t,n=e.end,r=e.start;return t=this.compare(n.row,n.column),t==1?(t=this.compare(r.row,r.column),t==1?2:t==0?1:0):t==-1?-2:(t=this.compare(r.row,r.column),t==-1?-1:t==1?42:0)},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return this.comparePoint(e.start)==0&&this.comparePoint(e.end)==0},this.intersects=function(e){var t=this.compareRange(e);return t==-1||t==0||t==1},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){typeof e=="object"?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){typeof e=="object"?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)||this.isStart(e,t)?!1:!0:!1},this.insideStart=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)?!1:!0:!1},this.insideEnd=function(e,t){return this.compare(e,t)==0?this.isStart(e,t)?!1:!0:!1},this.compare=function(e,t){return!this.isMultiLine()&&e===this.start.row?t<this.start.column?-1:t>this.end.column?1:0:e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else if(this.end.row<e)var n={row:e,column:0};if(this.start.row>t)var r={row:t+1,column:0};else if(this.start.row<e)var r={row:e,column:0};return i.fromPoints(r||this.start,n||this.end)},this.extend=function(e,t){var n=this.compare(e,t);if(n==0)return this;if(n==-1)var r={row:e,column:t};else var s={row:e,column:t};return i.fromPoints(r||this.start,s||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return i.fromPoints(this.start,this.end)},this.collapseRows=function(){return this.end.column==0?new i(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new i(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),n=e.documentToScreenPosition(this.end);return new i(t.row,t.column,n.row,n.column)},this.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t}}).call(i.prototype),i.fromPoints=function(e,t){return new i(e.row,e.column,t.row,t.column)},i.comparePoints=r,i.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=i}),ace.define("ace/worker/mirror",["require","exports","module","ace/document","ace/lib/lang"],function(e,t,n){var r=e("../document").Document,i=e("../lib/lang"),s=t.Mirror=function(e){this.sender=e;var t=this.doc=new r(""),n=this.deferredUpdate=i.delayedCall(this.onUpdate.bind(this)),s=this;e.on("change",function(e){t.applyDeltas(e.data);if(s.$timeout)return n.schedule(s.$timeout);s.onUpdate()})};(function(){this.$timeout=500,this.setTimeout=function(e){this.$timeout=e},this.setValue=function(e){this.doc.setValue(e),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(e){this.sender.callback(this.doc.getValue(),e)},this.onUpdate=function(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(s.prototype)}),ace.define("ace/lib/lang",["require","exports","module"],function(e,t,n){t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){var n="";while(t>0){t&1&&(n+=e);if(t>>=1)e+=e}return n};var r=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(r,"")},t.stringTrimRight=function(e){return e.replace(i,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){var t=[];for(var n=0,r=e.length;n<r;n++)e[n]&&typeof e[n]=="object"?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=function(e){if(typeof e!="object"||!e)return e;var n=e.constructor;if(n===RegExp)return e;var r=n();for(var i in e)typeof e[i]=="object"?r[i]=t.deepCopy(e[i]):r[i]=e[i];return r},t.arrayToMap=function(e){var t={};for(var n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return e.replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,function(e){n.push({offset:arguments[arguments.length-2],length:e.length})}),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},r=function(e){return r.cancel(),t=setTimeout(n,e||0),r};return r.schedule=r,r.call=function(){return this.cancel(),e(),r},r.cancel=function(){return clearTimeout(t),t=null,r},r.isPending=function(){return t},r},t.delayedCall=function(e,t){var n=null,r=function(){n=null,e()},i=function(e){n==null&&(n=setTimeout(r,e||t))};return i.delay=function(e){n&&clearTimeout(n),n=setTimeout(r,e||t)},i.schedule=i,i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){return n},i}}),ace.define("ace/mode/coffee/coffee-script",["require","exports","module","ace/mode/coffee/lexer","ace/mode/coffee/parser","ace/mode/coffee/nodes"],function(e,t,n){var r=e("./lexer").Lexer,i=e("./parser"),s=new r;i.lexer={lex:function(){var e,t;return t=this.tokens[this.pos++],t?(e=t[0],this.yytext=t[1],this.yylloc=t[2],this.yylineno=this.yylloc.first_line):e="",e},setInput:function(e){return this.tokens=e,this.pos=0},upcomingInput:function(){return""}},i.yy=e("./nodes"),t.parse=function(e){return i.parse(s.tokenize(e))}}),ace.define("ace/mode/coffee/lexer",["require","exports","module","ace/mode/coffee/rewriter","ace/mode/coffee/helpers"],function(e,t,n){var r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w,E,S,x,T,N,C,k,L,A,O,M,_,D,P,H,B,j,F,I,q,R,U,z,W,X,V,$,J,K,Q,G,Y,Z,et,tt,nt=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1};et=e("./rewriter"),F=et.Rewriter,w=et.INVERSES,tt=e("./helpers"),V=tt.count,Y=tt.starts,X=tt.compact,K=tt.last,G=tt.repeat,$=tt.invertLiterate,Q=tt.locationDataToString,Z=tt.throwSyntaxError,t.Lexer=k=function(){function e(){}return e.prototype.tokenize=function(e,t){var n,r,i,s;t==null&&(t={}),this.literate=t.literate,this.indent=0,this.baseIndent=0,this.indebt=0,this.outdebt=0,this.indents=[],this.ends=[],this.tokens=[],this.chunkLine=t.line||0,this.chunkColumn=t.column||0,e=this.clean(e),r=0;while(this.chunk=e.slice(r))n=this.identifierToken()||this.commentToken()||this.whitespaceToken()||this.lineToken()||this.heredocToken()||this.stringToken()||this.numberToken()||this.regexToken()||this.jsToken()||this.literalToken(),s=this.getLineAndColumnFromChunk(n),this.chunkLine=s[0],this.chunkColumn=s[1],r+=n;return this.closeIndentation(),(i=this.ends.pop())&&this.error("missing "+i),t.rewrite===!1?this.tokens:(new F).rewrite(this.tokens)},e.prototype.clean=function(e){return e.charCodeAt(0)===r&&(e=e.slice(1)),e=e.replace(/\r/g,"").replace(U,""),W.test(e)&&(e="\n"+e,this.chunkLine--),this.literate&&(e=$(e)),e},e.prototype.identifierToken=function(){var e,t,n,r,i,s,o,l,c,h,p,d,v,m;return(o=y.exec(this.chunk))?(s=o[0],r=o[1],e=o[2],i=r.length,l=void 0,r==="own"&&this.tag()==="FOR"?(this.token("OWN",r),r.length):(n=e||(c=K(this.tokens))&&((d=c[0])==="."||d==="?."||d==="::"||d==="?::"||!c.spaced&&c[0]==="@"),h="IDENTIFIER",!n&&(nt.call(x,r)>=0||nt.call(f,r)>=0)&&(h=r.toUpperCase(),h==="WHEN"&&(v=this.tag(),nt.call(T,v)>=0)?h="LEADING_WHEN":h==="FOR"?this.seenFor=!0:h==="UNLESS"?h="IF":nt.call(z,h)>=0?h="UNARY":nt.call(B,h)>=0&&(h!=="INSTANCEOF"&&this.seenFor?(h="FOR"+h,this.seenFor=!1):(h="RELATION",this.value()==="!"&&(l=this.tokens.pop(),r="!"+r)))),nt.call(S,r)>=0&&(n?(h="IDENTIFIER",r=new String(r),r.reserved=!0):nt.call(j,r)>=0&&this.error('reserved word "'+r+'"')),n||(nt.call(u,r)>=0&&(r=a[r]),h=function(){switch(r){case"!":return"UNARY";case"==":case"!=":return"COMPARE";case"&&":case"||":return"LOGIC";case"true":case"false":return"BOOL";case"break":case"continue":return"STATEMENT";default:return h}}()),p=this.token(h,r,0,i),l&&(m=[l[2].first_line,l[2].first_column],p[2].first_line=m[0],p[2].first_column=m[1]),e&&(t=s.lastIndexOf(":"),this.token(":",":",t,e.length)),s.length)):0},e.prototype.numberToken=function(){var e,t,n,r,i;if(!(n=D.exec(this.chunk)))return 0;r=n[0],/^0[BOX]/.test(r)?this.error("radix prefix '"+r+"' must be lowercase"):/E/.test(r)&&!/^0x/.test(r)?this.error("exponential notation '"+r+"' must be indicated with a lowercase 'e'"):/^0\d*[89]/.test(r)?this.error("decimal literal '"+r+"' must not be prefixed with '0'"):/^0\d+/.test(r)&&this.error("octal literal '"+r+"' must be prefixed with '0o'"),t=r.length;if(i=/^0o([0-7]+)/.exec(r))r="0x"+parseInt(i[1],8).toString(16);if(e=/^0b([01]+)/.exec(r))r="0x"+parseInt(e[1],2).toString(16);return this.token("NUMBER",r,0,t),t},e.prototype.stringToken=function(){var e,t,n,r;switch(t=this.chunk.charAt(0)){case"'":n=q.exec(this.chunk)[0];break;case'"':n=this.balancedString(this.chunk,'"')}return n?(r=this.removeNewlines(n.slice(1,-1)),t==='"'&&0<n.indexOf("#{",1)?this.interpolateString(r,{strOffset:1,lexedLength:n.length}):this.token("STRING",t+this.escapeLines(r)+t,0,n.length),(e=/^(?:\\.|[^\\])*\\(?:0[0-7]|[1-7])/.test(n))&&this.error("octal escape sequences "+n+" are not allowed"),n.length):0},e.prototype.heredocToken=function(){var e,t,n,r;return(n=p.exec(this.chunk))?(t=n[0],r=t.charAt(0),e=this.sanitizeHeredoc(n[2],{quote:r,indent:null}),r==='"'&&0<=e.indexOf("#{")?this.interpolateString(e,{heredoc:!0,strOffset:3,lexedLength:t.length}):this.token("STRING",this.makeString(e,r,!0),0,t.length),t.length):0},e.prototype.commentToken=function(){var e,t,n;return(n=this.chunk.match(l))?(e=n[0],t=n[1],t&&this.token("HERECOMMENT",this.sanitizeHeredoc(t,{herecomment:!0,indent:G(" ",this.indent)}),0,e.length),e.length):0},e.prototype.jsToken=function(){var e,t;return this.chunk.charAt(0)!=="`"||!(e=E.exec(this.chunk))?0:(this.token("JS",(t=e[0]).slice(1,-1),0,t.length),t.length)},e.prototype.regexToken=function(){var e,t,n,r,i,s,o;return this.chunk.charAt(0)!=="/"?0:(n=m.exec(this.chunk))?(t=this.heregexToken(n),t):(r=K(this.tokens),r&&(s=r[0],nt.call(r.spaced?M:_,s)>=0)?0:(n=H.exec(this.chunk))?(o=n,n=o[0],i=o[1],e=o[2],i.slice(0,2)==="/*"&&this.error("regular expressions cannot begin with `*`"),i==="//"&&(i="/(?:)/"),this.token("REGEX",""+i+e,0,n.length),n.length):0)},e.prototype.heregexToken=function(e){var t,n,r,i,s,o,u,a,f,l,c,h,p,d,v,m;i=e[0],t=e[1],n=e[2];if(0>t.indexOf("#{"))return u=this.escapeLines(t.replace(g,"$1$2").replace(/\//g,"\\/"),!0),u.match(/^\*/)&&this.error("regular expressions cannot begin with `*`"),this.token("REGEX","/"+(u||"(?:)")+"/"+n,0,i.length),i.length;this.token("IDENTIFIER","RegExp",0,0),this.token("CALL_START","(",0,0),l=[],d=this.interpolateString(t,{regex:!0});for(h=0,p=d.length;h<p;h++){f=d[h],a=f[0],c=f[1];if(a==="TOKENS")l.push.apply(l,c);else if(a==="NEOSTRING"){if(!(c=c.replace(g,"$1$2")))continue;c=c.replace(/\\/g,"\\\\"),f[0]="STRING",f[1]=this.makeString(c,'"',!0),l.push(f)}else this.error("Unexpected "+a);o=K(this.tokens),s=["+","+"],s[2]=o[2],l.push(s)}return l.pop(),((v=l[0])!=null?v[0]:void 0)!=="STRING"&&(this.token("STRING",'""',0,0),this.token("+","+",0,0)),(m=this.tokens).push.apply(m,l),n&&(r=i.lastIndexOf(n),this.token(",",",",r,0),this.token("STRING",'"'+n+'"',r,n.length)),this.token(")",")",i.length-1,0),i.length},e.prototype.lineToken=function(){var e,t,n,r,i;if(!(n=O.exec(this.chunk)))return 0;t=n[0],this.seenFor=!1,i=t.length-1-t.lastIndexOf("\n"),r=this.unfinished();if(i-this.indebt===this.indent)return r?this.suppressNewlines():this.newlineToken(0),t.length;if(i>this.indent){if(r)return this.indebt=i-this.indent,this.suppressNewlines(),t.length;if(!this.tokens.length)return this.baseIndent=this.indent=i,t.length;e=i-this.indent+this.outdebt,this.token("INDENT",e,t.length-i,i),this.indents.push(e),this.ends.push("OUTDENT"),this.outdebt=this.indebt=0}else i<this.baseIndent?this.error("missing indentation",t.length):(this.indebt=0,this.outdentToken(this.indent-i,r,t.length));return this.indent=i,t.length},e.prototype.outdentToken=function(e,t,n){var r,i;while(e>0)i=this.indents.length-1,this.indents[i]===void 0?e=0:this.indents[i]===this.outdebt?(e-=this.outdebt,this.outdebt=0):this.indents[i]<this.outdebt?(this.outdebt-=this.indents[i],e-=this.indents[i]):(r=this.indents.pop()+this.outdebt,e-=r,this.outdebt=0,this.pair("OUTDENT"),this.token("OUTDENT",r,0,n));r&&(this.outdebt-=e);while(this.value()===";")this.tokens.pop();return this.tag()!=="TERMINATOR"&&!t&&this.token("TERMINATOR","\n",n,0),this},e.prototype.whitespaceToken=function(){var e,t,n;return!(e=W.exec(this.chunk))&&!(t=this.chunk.charAt(0)==="\n")?0:(n=K(this.tokens),n&&(n[e?"spaced":"newLine"]=!0),e?e[0].length:0)},e.prototype.newlineToken=function(e){while(this.value()===";")this.tokens.pop();return this.tag()!=="TERMINATOR"&&this.token("TERMINATOR","\n",e,0),this},e.prototype.suppressNewlines=function(){return this.value()==="\\"&&this.tokens.pop(),this},e.prototype.literalToken=function(){var e,t,n,r,i,u,a,f;(e=P.exec(this.chunk))?(r=e[0],o.test(r)&&this.tagParameters()):r=this.chunk.charAt(0),n=r,t=K(this.tokens);if(r==="="&&t){!t[1].reserved&&(i=t[1],nt.call(S,i)>=0)&&this.error('reserved word "'+this.value()+"\" can't be assigned");if((u=t[1])==="||"||u==="&&")return t[0]="COMPOUND_ASSIGN",t[1]+="=",r.length}if(r===";")this.seenFor=!1,n="TERMINATOR";else if(nt.call(L,r)>=0)n="MATH";else if(nt.call(c,r)>=0)n="COMPARE";else if(nt.call(h,r)>=0)n="COMPOUND_ASSIGN";else if(nt.call(z,r)>=0)n="UNARY";else if(nt.call(I,r)>=0)n="SHIFT";else if(nt.call(C,r)>=0||r==="?"&&(t!=null?t.spaced:void 0))n="LOGIC";else if(t&&!t.spaced)if(r==="("&&(a=t[0],nt.call(s,a)>=0))t[0]==="?"&&(t[0]="FUNC_EXIST"),n="CALL_START";else if(r==="["&&(f=t[0],nt.call(b,f)>=0)){n="INDEX_START";switch(t[0]){case"?":t[0]="INDEX_SOAK"}}switch(r){case"(":case"{":case"[":this.ends.push(w[r]);break;case")":case"}":case"]":this.pair(r)}return this.token(n,r),r.length},e.prototype.sanitizeHeredoc=function(e,t){var n,r,i,s,o;i=t.indent,r=t.herecomment;if(r){d.test(e)&&this.error('block comment cannot contain "*/", starting');if(e.indexOf("\n")<0)return e}else while(s=v.exec(e)){n=s[1];if(i===null||0<(o=n.length)&&o<i.length)i=n}return i&&(e=e.replace(RegExp("\\n"+i,"g"),"\n")),r||(e=e.replace(/^\n/,"")),e},e.prototype.tagParameters=function(){var e,t,n,r;if(this.tag()!==")")return this;t=[],r=this.tokens,e=r.length,r[--e][0]="PARAM_END";while(n=r[--e])switch(n[0]){case")":t.push(n);break;case"(":case"CALL_START":if(!t.length)return n[0]==="("?(n[0]="PARAM_START",this):this;t.pop()}return this},e.prototype.closeIndentation=function(){return this.outdentToken(this.indent)},e.prototype.balancedString=function(e,t){var n,r,i,s,o,u,a,f;n=0,u=[t];for(r=a=1,f=e.length;1<=f?a<f:a>f;r=1<=f?++a:--a){if(n){--n;continue}switch(i=e.charAt(r)){case"\\":++n;continue;case t:u.pop();if(!u.length)return e.slice(0,+r+1||9e9);t=u[u.length-1];continue}t!=="}"||i!=='"'&&i!=="'"?t==="}"&&i==="/"&&(s=m.exec(e.slice(r))||H.exec(e.slice(r)))?n+=s[0].length-1:t==="}"&&i==="{"?u.push(t="}"):t==='"'&&o==="#"&&i==="{"&&u.push(t="}"):u.push(t=i),o=i}return this.error("missing "+u.pop()+", starting")},e.prototype.interpolateString=function(t,n){var r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w,E,S,x,T,N,C,k,L,A,O;n==null&&(n={}),s=n.heredoc,b=n.regex,v=n.offsetInChunk,E=n.strOffset,c=n.lexedLength,v=v||0,E=E||0,c=c||t.length,T=[],m=0,o=-1;while(l=t.charAt(o+=1)){if(l==="\\"){o+=1;continue}if(l!=="#"||t.charAt(o+1)!=="{"||!(i=this.balancedString(t.slice(o+1),"}")))continue;m<o&&T.push(this.makeToken("NEOSTRING",t.slice(m,o),E+m)),u=i.slice(1,-1);if(u.length){L=this.getLineAndColumnFromChunk(E+o+1),h=L[0],r=L[1],d=(new e).tokenize(u,{line:h,column:r,rewrite:!1}),y=d.pop(),((A=d[0])!=null?A[0]:void 0)==="TERMINATOR"&&(y=d.shift());if(f=d.length)f>1&&(d.unshift(this.makeToken("(","(",E+o+1,0)),d.push(this.makeToken(")",")",E+o+1+u.length,0))),T.push(["TOKENS",d])}o+=i.length,m=o+1}o>m&&m<t.length&&T.push(this.makeToken("NEOSTRING",t.slice(m),E+m));if(b)return T;if(!T.length)return this.token("STRING",'""',v,c);T[0][0]!=="NEOSTRING"&&T.unshift(this.makeToken("NEOSTRING","",v)),(a=T.length>1)&&this.token("(","(",v,0);for(o=C=0,k=T.length;C<k;o=++C)x=T[o],S=x[0],N=x[1],o&&(o&&(g=this.token("+","+")),p=S==="TOKENS"?N[0]:x,g[2]={first_line:p[2].first_line,first_column:p[2].first_column,last_line:p[2].first_line,last_column:p[2].first_column}),S==="TOKENS"?(O=this.tokens).push.apply(O,N):S==="NEOSTRING"?(x[0]="STRING",x[1]=this.makeString(N,'"',s),this.tokens.push(x)):this.error("Unexpected "+S);return a&&(w=this.makeToken(")",")",v+c,0),w.stringEnd=!0,this.tokens.push(w)),T},e.prototype.pair=function(e){var t,n;return e!==(n=K(this.ends))?("OUTDENT"!==n&&this.error("unmatched "+e),this.indent-=t=K(this.indents),this.outdentToken(t,!0),this.pair(e)):this.ends.pop()},e.prototype.getLineAndColumnFromChunk=function(e){var t,n,r,i;return e===0?[this.chunkLine,this.chunkColumn]:(e>=this.chunk.length?i=this.chunk:i=this.chunk.slice(0,+(e-1)+1||9e9),n=V(i,"\n"),t=this.chunkColumn,n>0?(r=i.split("\n"),t=K(r).length):t+=i.length,[this.chunkLine+n,t])},e.prototype.makeToken=function(e,t,n,r){var i,s,o,u,a;return n==null&&(n=0),r==null&&(r=t.length),s={},u=this.getLineAndColumnFromChunk(n),s.first_line=u[0],s.first_column=u[1],i=Math.max(0,r-1),a=this.getLineAndColumnFromChunk(n+i),s.last_line=a[0],s.last_column=a[1],o=[e,t,s],o},e.prototype.token=function(e,t,n,r){var i;return i=this.makeToken(e,t,n,r),this.tokens.push(i),i},e.prototype.tag=function(e,t){var n;return(n=K(this.tokens,e))&&(t?n[0]=t:n[0])},e.prototype.value=function(e,t){var n;return(n=K(this.tokens,e))&&(t?n[1]=t:n[1])},e.prototype.unfinished=function(){var e;return N.test(this.chunk)||(e=this.tag())==="\\"||e==="."||e==="?."||e==="?::"||e==="UNARY"||e==="MATH"||e==="+"||e==="-"||e==="SHIFT"||e==="RELATION"||e==="COMPARE"||e==="LOGIC"||e==="THROW"||e==="EXTENDS"},e.prototype.removeNewlines=function(e){return e.replace(/^\s*\n\s*/,"").replace(/([^\\]|\\\\)\s*\n\s*$/,"$1")},e.prototype.escapeLines=function(e,t){return e=e.replace(/\\[^\S\n]*(\n|\\)\s*/g,function(e,t){return t==="\n"?"":e}),t?e.replace(A,"\\n"):e.replace(/\s*\n\s*/g," ")},e.prototype.makeString=function(e,t,n){return e?(e=e.replace(RegExp("\\\\("+t+"|\\\\)","g"),function(e,n){return n===t?n:e}),e=e.replace(RegExp(""+t,"g"),"\\$&"),t+this.escapeLines(e,n)+t):t+t},e.prototype.error=function(e,t){var n,r,i;return t==null&&(t=0),i=this.getLineAndColumnFromChunk(t),r=i[0],n=i[1],Z(e,{first_line:r,first_column:n})},e}(),x=["true","false","null","this","new","delete","typeof","in","instanceof","return","throw","break","continue","debugger","if","else","switch","for","while","do","try","catch","finally","class","extends","super"],f=["undefined","then","unless","until","loop","of","by","when"],a={and:"&&",or:"||",is:"==",isnt:"!=",not:"!",yes:"true",no:"false",on:"true",off:"false"},u=function(){var e;e=[];for(J in a)e.push(J);return e}(),f=f.concat(u),j=["case","default","function","var","void","with","const","let","enum","export","import","native","__hasProp","__extends","__slice","__bind","__indexOf","implements","interface","package","private","protected","public","static","yield"],R=["arguments","eval"],S=x.concat(j).concat(R),t.RESERVED=j.concat(x).concat(f).concat(R),t.STRICT_PROSCRIBED=R,r=65279,y=/^([$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)([^\n\S]*:(?!:))?/,D=/^0b[01]+|^0o[0-7]+|^0x[\da-f]+|^\d*\.?\d+(?:e[+-]?\d+)?/i,p=/^("""|''')((?:\\[\s\S]|[^\\])*?)(?:\n[^\n\S]*)?\1/,P=/^(?:[-=]>|[-+*\/%<>&|^!?=]=|>>>=?|([-+:])\1|([&|<>])\2=?|\?(\.|::)|\.{2,3})/,W=/^[^\n\S]+/,l=/^###([^#][\s\S]*?)(?:###[^\n\S]*|###$)|^(?:\s*#(?!##[^#]).*)+/,o=/^[-=]>/,O=/^(?:\n[^\n\S]*)+/,q=/^'[^\\']*(?:\\[\s\S][^\\']*)*'/,E=/^`[^\\`]*(?:\\.[^\\`]*)*`/,H=/^(\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)([imgy]{0,4})(?!\w)/,m=/^\/{3}((?:\\?[\s\S])+?)\/{3}([imgy]{0,4})(?!\w)/,g=/((?:\\\\)+)|\\(\s|\/)|\s+(?:#.*)?/g,A=/\n/g,v=/\n+([^\n\S]*)/g,d=/\*\//,N=/^\s*(?:,|\??\.(?![.\d])|::)/,U=/\s+$/,h=["-=","+=","/=","*=","%=","||=","&&=","?=","<<=",">>=",">>>=","&=","^=","|="],z=["!","~","NEW","TYPEOF","DELETE","DO"],C=["&&","||","&","|","^"],I=["<<",">>",">>>"],c=["==","!=","<",">","<=",">="],L=["*","/","%"],B=["IN","OF","INSTANCEOF"],i=["TRUE","FALSE"],M=["NUMBER","REGEX","BOOL","NULL","UNDEFINED","++","--"],_=M.concat(")","}","THIS","IDENTIFIER","STRING","]"),s=["IDENTIFIER","STRING","REGEX",")","]","}","?","::","@","THIS","SUPER"],b=s.concat("NUMBER","BOOL","NULL","UNDEFINED"),T=["INDENT","OUTDENT","TERMINATOR"]}),ace.define("ace/mode/coffee/rewriter",["require","exports","module"],function(e,t,n){var r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w,E,S=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1},x=[].slice;m=function(e,t){var n;return n=[e,t],n.generated=!0,n},t.Rewriter=function(){function e(){}return e.prototype.rewrite=function(e){return this.tokens=e,this.removeLeadingNewlines(),this.closeOpenCalls(),this.closeOpenIndexes(),this.normalizeLines(),this.tagPostfixConditionals(),this.addImplicitBracesAndParens(),this.addLocationDataToGeneratedTokens(),this.tokens},e.prototype.scanTokens=function(e){var t,n,r;r=this.tokens,t=0;while(n=r[t])t+=e.call(this,n,t,r);return!0},e.prototype.detectEnd=function(e,t,n){var r,i,s,a,f;s=this.tokens,r=0;while(i=s[e]){if(r===0&&t.call(this,i,e))return n.call(this,i,e);if(!i||r<0)return n.call(this,i,e-1);if(a=i[0],S.call(u,a)>=0)r+=1;else if(f=i[0],S.call(o,f)>=0)r-=1;e+=1}return e-1},e.prototype.removeLeadingNewlines=function(){var e,t,n,r,i;i=this.tokens;for(e=n=0,r=i.length;n<r;e=++n){t=i[e][0];if(t!=="TERMINATOR")break}if(e)return this.tokens.splice(0,e)},e.prototype.closeOpenCalls=function(){var e,t;return t=function(e,t){var n;return(n=e[0])===")"||n==="CALL_END"||e[0]==="OUTDENT"&&this.tag(t-1)===")"},e=function(e,t){return this.tokens[e[0]==="OUTDENT"?t-1:t][0]="CALL_END"},this.scanTokens(function(n,r){return n[0]==="CALL_START"&&this.detectEnd(r+1,t,e),1})},e.prototype.closeOpenIndexes=function(){var e,t;return t=function(e,t){var n;return(n=e[0])==="]"||n==="INDEX_END"},e=function(e,t){return e[0]="INDEX_END"},this.scanTokens(function(n,r){return n[0]==="INDEX_START"&&this.detectEnd(r+1,t,e),1})},e.prototype.matchTags=function(){var e,t,n,r,i,s,o;t=arguments[0],r=2<=arguments.length?x.call(arguments,1):[],e=0;for(n=i=0,s=r.length;0<=s?i<s:i>s;n=0<=s?++i:--i){while(this.tag(t+n+e)==="HERECOMMENT")e+=2;if(r[n]==null)continue;typeof r[n]=="string"&&(r[n]=[r[n]]);if(o=this.tag(t+n+e),S.call(r[n],o)<0)return!1}return!0},e.prototype.looksObjectish=function(e){return this.matchTags(e,"@",null,":")||this.matchTags(e,null,":")},e.prototype.findTagsBackwards=function(e,t){var n,r,i,s,a,f,l;n=[];while(e>=0&&(n.length||(s=this.tag(e),S.call(t,s)<0)&&((a=this.tag(e),S.call(u,a)<0)||this.tokens[e].generated)&&(f=this.tag(e),S.call(p,f)<0)))(r=this.tag(e),S.call(o,r)>=0)&&n.push(this.tag(e)),(i=this.tag(e),S.call(u,i)>=0)&&n.length&&n.pop(),e-=1;return l=this.tag(e),S.call(t,l)>=0},e.prototype.addImplicitBracesAndParens=function(){var e;return e=[],this.scanTokens(function(t,n,r){var s,h,d,v,g,y,b,w,E,x,T,N,C,k,L,A,O,M,_,D,P,H,B,j,F,I,q,R;H=t[0],T=(N=n>0?r[n-1]:[])[0],E=(n<r.length-1?r[n+1]:[])[0],O=function(){return e[e.length-1]},M=n,v=function(e){return n-M+e},g=function(){var e,t;return(e=O())!=null?(t=e[2])!=null?t.ours:void 0:void 0},y=function(){var e;return g()&&((e=O())!=null?e[0]:void 0)==="("},w=function(){var e;return g()&&((e=O())!=null?e[0]:void 0)==="{"},b=function(){var e;return g&&((e=O())!=null?e[0]:void 0)==="CONTROL"},_=function(t){var i;i=t!=null?t:n,e.push(["(",i,{ours:!0}]),r.splice(i,0,m("CALL_START","("));if(t==null)return n+=1},h=function(){return e.pop(),r.splice(n,0,m("CALL_END",")")),n+=1},s=function(){while(y())h()},D=function(t,i){var s;i==null&&(i=!0),s=t!=null?t:n,e.push(["{",s,{sameLine:!0,startsLine:i,ours:!0}]),r.splice(s,0,m("{",m(new String("{"))));if(t==null)return n+=1},d=function(t){return t=t!=null?t:n,e.pop(),r.splice(t,0,m("}","}")),n+=1};if(!y()||H!=="IF"&&H!=="TRY"&&H!=="FINALLY"&&H!=="CATCH"&&H!=="CLASS"&&H!=="SWITCH"){if(H==="INDENT"&&g()){if(T!=="=>"&&T!=="->"&&T!=="["&&T!=="("&&T!==","&&T!=="{"&&T!=="TRY"&&T!=="ELSE"&&T!=="=")while(y())h();return b()&&e.pop(),e.push([H,n]),v(1)}if(S.call(u,H)>=0)return e.push([H,n]),v(1);if(S.call(o,H)>=0){while(g())y()?h():w()?d():e.pop();e.pop()}if((S.call(l,H)>=0&&t.spaced&&!t.stringEnd||H==="?"&&n>0&&!r[n-1].spaced)&&(S.call(a,E)>=0||S.call(c,E)>=0&&((B=r[n+1])!=null?!B.spaced:!void 0)&&((j=r[n+1])!=null?!j.newLine:!void 0)))return H==="?"&&(H=t[0]="FUNC_EXIST"),_(n+1),v(2);if(S.call(l,H)>=0&&this.matchTags(n+1,"INDENT",null,":")&&!this.findTagsBackwards(n,["CLASS","EXTENDS","IF","CATCH","SWITCH","LEADING_WHEN","FOR","WHILE","UNTIL"]))return _(n+1),e.push(["INDENT",n+2]),v(3);if(H===":"){this.tag(n-2)==="@"?C=n-2:C=n-1;while(this.tag(C-2)==="HERECOMMENT")C-=2;P=C===0||(F=this.tag(C-1),S.call(p,F)>=0)||r[C-1].newLine;if(O()){I=O(),A=I[0],L=I[1];if((A==="{"||A==="INDENT"&&this.tag(L-1)==="{")&&(P||this.tag(C-1)===","||this.tag(C-1)==="{"))return v(1)}return D(C,!!P),v(2)}if(y()&&S.call(i,H)>=0){if(T==="OUTDENT")return h(),v(1);if(N.newLine)return s(),v(1)}w()&&S.call(p,H)>=0&&(O()[2].sameLine=!1);if(S.call(f,H)>=0)while(g()){q=O(),A=q[0],L=q[1],R=q[2],k=R.sameLine,P=R.startsLine;if(y()&&T!==",")h();else if(w()&&k&&!P)d();else{if(!w()||H!=="TERMINATOR"||T===","||!!P&&!!this.looksObjectish(n+1))break;d()}}if(H===","&&!this.looksObjectish(n+1)&&w()&&(E!=="TERMINATOR"||!this.looksObjectish(n+2))){x=E==="OUTDENT"?1:0;while(w())d(n+x)}return v(1)}return e.push(["CONTROL",n,{ours:!0}]),v(1)})},e.prototype.addLocationDataToGeneratedTokens=function(){return this.scanTokens(function(e,t,n){var r,i,s,o,u,a;return e[2]?1:!e.generated&&!e.explicit?1:(e[0]==="{"&&(s=(u=n[t+1])!=null?u[2]:void 0)?(i=s.first_line,r=s.first_column):(o=(a=n[t-1])!=null?a[2]:void 0)?(i=o.last_line,r=o.last_column):i=r=0,e[2]={first_line:i,first_column:r,last_line:i,last_column:r},1)})},e.prototype.normalizeLines=function(){var e,t,n,r,o;return o=n=r=null,t=function(e,t){var n,r,u,a;return e[1]!==";"&&(n=e[0],S.call(d,n)>=0)&&!(e[0]==="TERMINATOR"&&(r=this.tag(t+1),S.call(s,r)>=0))&&(e[0]!=="ELSE"||o==="THEN")&&((u=e[0])!=="CATCH"&&u!=="FINALLY"||o!=="->"&&o!=="=>")||(a=e[0],S.call(i,a)>=0)&&this.tokens[t-1].newLine},e=function(e,t){return this.tokens.splice(this.tag(t-1)===","?t-1:t,0,r)},this.scanTokens(function(i,u,a){var f,l,c,h,p,d;l=i[0];if(l==="TERMINATOR"){if(this.tag(u+1)==="ELSE"&&this.tag(u-1)!=="OUTDENT")return a.splice.apply(a,[u,1].concat(x.call(this.indentation()))),1;if(h=this.tag(u+1),S.call(s,h)>=0)return a.splice(u,1),0}if(l==="CATCH")for(f=c=1;c<=2;f=++c){if((p=this.tag(u+f))!=="OUTDENT"&&p!=="TERMINATOR"&&p!=="FINALLY")continue;return a.splice.apply(a,[u+f,0].concat(x.call(this.indentation()))),2+f}return S.call(v,l)>=0&&this.tag(u+1)!=="INDENT"&&(l!=="ELSE"||this.tag(u+1)!=="IF")?(o=l,d=this.indentation(!0),n=d[0],r=d[1],o==="THEN"&&(n.fromThen=!0),a.splice(u+1,0,n),this.detectEnd(u+2,t,e),l==="THEN"&&a.splice(u,1),1):1})},e.prototype.tagPostfixConditionals=function(){var e,t,n;return n=null,t=function(e,t){var n,r;return r=e[0],n=this.tokens[t-1][0],r==="TERMINATOR"||r==="INDENT"&&S.call(v,n)<0},e=function(e,t){if(e[0]!=="INDENT"||e.generated&&!e.fromThen)return n[0]="POST_"+n[0]},this.scanTokens(function(r,i){return r[0]!=="IF"?1:(n=r,this.detectEnd(i+1,t,e),1)})},e.prototype.indentation=function(e){var t,n;return e==null&&(e=!1),t=["INDENT",2],n=["OUTDENT",2],e&&(t.generated=n.generated=!0),e||(t.explicit=n.explicit=!0),[t,n]},e.prototype.generate=m,e.prototype.tag=function(e){var t;return(t=this.tokens[e])!=null?t[0]:void 0},e}(),r=[["(",")"],["[","]"],["{","}"],["INDENT","OUTDENT"],["CALL_START","CALL_END"],["PARAM_START","PARAM_END"],["INDEX_START","INDEX_END"]],t.INVERSES=h={},u=[],o=[];for(b=0,w=r.length;b<w;b++)E=r[b],g=E[0],y=E[1],u.push(h[y]=g),o.push(h[g]=y);s=["CATCH","THEN","ELSE","FINALLY"].concat(o),l=["IDENTIFIER","SUPER",")","CALL_END","]","INDEX_END","@","THIS"],a=["IDENTIFIER","NUMBER","STRING","JS","REGEX","NEW","PARAM_START","CLASS","IF","TRY","SWITCH","THIS","BOOL","NULL","UNDEFINED","UNARY","SUPER","THROW","@","->","=>","[","(","{","--","++"],c=["+","-"],f=["POST_IF","FOR","WHILE","UNTIL","WHEN","BY","LOOP","TERMINATOR"],v=["ELSE","->","=>","TRY","FINALLY","THEN"],d=["TERMINATOR","CATCH","FINALLY","ELSE","OUTDENT","LEADING_WHEN"],p=["TERMINATOR","INDENT","OUTDENT"],i=[".","?.","::","?::"]}),ace.define("ace/mode/coffee/helpers",["require","exports","module"],function(e,t,n){var r,i,s,o,u,a,f;t.starts=function(e,t,n){return t===e.substr(n,t.length)},t.ends=function(e,t,n){var r;return r=t.length,t===e.substr(e.length-r-(n||0),r)},t.repeat=u=function(e,t){var n;n="";while(t>0)t&1&&(n+=e),t>>>=1,e+=e;return n},t.compact=function(e){var t,n,r,i;i=[];for(n=0,r=e.length;n<r;n++)t=e[n],t&&i.push(t);return i},t.count=function(e,t){var n,r;n=r=0;if(!t.length)return 1/0;while(r=1+e.indexOf(t,r))n++;return n},t.merge=function(e,t){return i(i({},e),t)},i=t.extend=function(e,t){var n,r;for(n in t)r=t[n],e[n]=r;return e},t.flatten=s=function(e){var t,n,r,i;n=[];for(r=0,i=e.length;r<i;r++)t=e[r],t instanceof Array?n=n.concat(s(t)):n.push(t);return n},t.del=function(e,t){var n;return n=e[t],delete e[t],n},t.last=o=function(e,t){return e[e.length-(t||0)-1]},t.some=(f=Array.prototype.some)!=null?f:function(e){var t,n,r;for(n=0,r=this.length;n<r;n++){t=this[n];if(e(t))return!0}return!1},t.invertLiterate=function(e){var t,n,r;return r=!0,n=function(){var n,i,s,o;s=e.split("\n"),o=[];for(n=0,i=s.length;n<i;n++)t=s[n],r&&/^([ ]{4}|[ ]{0,3}\t)/.test(t)?o.push(t):(r=/^\s*$/.test(t))?o.push(t):o.push("# "+t);return o}(),n.join("\n")},r=function(e,t){return t?{first_line:e.first_line,first_column:e.first_column,last_line:t.last_line,last_column:t.last_column}:e},t.addLocationDataFn=function(e,t){return function(n){return typeof n=="object"&&!!n.updateLocationDataIfMissing&&n.updateLocationDataIfMissing(r(e,t)),n}},t.locationDataToString=function(e){var t;return"2"in e&&"first_line"in e[2]?t=e[2]:"first_line"in e&&(t=e),t?""+(t.first_line+1)+":"+(t.first_column+1)+"-"+(""+(t.last_line+1)+":"+(t.last_column+1)):"No location data"},t.baseFileName=function(e,t,n){var r,i;return t==null&&(t=!1),n==null&&(n=!1),i=n?/\\|\//:/\//,r=e.split(i),e=r[r.length-1],t&&e.indexOf(".")>=0?(r=e.split("."),r.pop(),r[r.length-1]==="coffee"&&r.length>1&&r.pop(),r.join(".")):e},t.isCoffee=function(e){return/\.((lit)?coffee|coffee\.md)$/.test(e)},t.isLiterate=function(e){return/\.(litcoffee|coffee\.md)$/.test(e)},t.throwSyntaxError=function(e,t){var n;throw t.last_line==null&&(t.last_line=t.first_line),t.last_column==null&&(t.last_column=t.first_column),n=new SyntaxError(e),n.location=t,n.toString=a,n.stack=n.toString(),n},t.updateSyntaxError=function(e,t,n){return e.toString===a&&(e.code||(e.code=t),e.filename||(e.filename=n),e.stack=e.toString()),e},a=function(){var e,t,n,r,i,s,o,a,f,l,c,h,p;if(!this.code||!this.location)return Error.prototype.toString.call(this);h=this.location,o=h.first_line,s=h.first_column,f=h.last_line,a=h.last_column,f==null&&(f=o),a==null&&(a=s),i=this.filename||"[stdin]",e=this.code.split("\n")[o],c=s,r=o===f?a+1:e.length,l=u(" ",c)+u("^",r-c),typeof process!="undefined"&&process!==null&&(n=process.stdout.isTTY&&!process.env.NODE_DISABLE_COLORS);if((p=this.colorful)!=null?p:n)t=function(e){return""+e+""},e=e.slice(0,c)+t(e.slice(c,r))+e.slice(r),l=t(l);return""+i+":"+(o+1)+":"+(s+1)+": error: "+this.message+"\n"+e+"\n"+l}}),ace.define("ace/lib/oop",["require","exports","module"],function(e,t,n){t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}}),ace.define("ace/mode/coffee/parser",["require","exports","module"],function(e,t,n){function r(){this.yy={}}var i={trace:function(){},yy:{},symbols_:{error:2,Root:3,Body:4,Line:5,TERMINATOR:6,Expression:7,Statement:8,Return:9,Comment:10,STATEMENT:11,Value:12,Invocation:13,Code:14,Operation:15,Assign:16,If:17,Try:18,While:19,For:20,Switch:21,Class:22,Throw:23,Block:24,INDENT:25,OUTDENT:26,Identifier:27,IDENTIFIER:28,AlphaNumeric:29,NUMBER:30,STRING:31,Literal:32,JS:33,REGEX:34,DEBUGGER:35,UNDEFINED:36,NULL:37,BOOL:38,Assignable:39,"=":40,AssignObj:41,ObjAssignable:42,":":43,ThisProperty:44,RETURN:45,HERECOMMENT:46,PARAM_START:47,ParamList:48,PARAM_END:49,FuncGlyph:50,"->":51,"=>":52,OptComma:53,",":54,Param:55,ParamVar:56,"...":57,Array:58,Object:59,Splat:60,SimpleAssignable:61,Accessor:62,Parenthetical:63,Range:64,This:65,".":66,"?.":67,"::":68,"?::":69,Index:70,INDEX_START:71,IndexValue:72,INDEX_END:73,INDEX_SOAK:74,Slice:75,"{":76,AssignList:77,"}":78,CLASS:79,EXTENDS:80,OptFuncExist:81,Arguments:82,SUPER:83,FUNC_EXIST:84,CALL_START:85,CALL_END:86,ArgList:87,THIS:88,"@":89,"[":90,"]":91,RangeDots:92,"..":93,Arg:94,SimpleArgs:95,TRY:96,Catch:97,FINALLY:98,CATCH:99,THROW:100,"(":101,")":102,WhileSource:103,WHILE:104,WHEN:105,UNTIL:106,Loop:107,LOOP:108,ForBody:109,FOR:110,ForStart:111,ForSource:112,ForVariables:113,OWN:114,ForValue:115,FORIN:116,FOROF:117,BY:118,SWITCH:119,Whens:120,ELSE:121,When:122,LEADING_WHEN:123,IfBlock:124,IF:125,POST_IF:126,UNARY:127,"-":128,"+":129,"--":130,"++":131,"?":132,MATH:133,SHIFT:134,COMPARE:135,LOGIC:136,RELATION:137,COMPOUND_ASSIGN:138,$accept:0,$end:1},terminals_:{2:"error",6:"TERMINATOR",11:"STATEMENT",25:"INDENT",26:"OUTDENT",28:"IDENTIFIER",30:"NUMBER",31:"STRING",33:"JS",34:"REGEX",35:"DEBUGGER",36:"UNDEFINED",37:"NULL",38:"BOOL",40:"=",43:":",45:"RETURN",46:"HERECOMMENT",47:"PARAM_START",49:"PARAM_END",51:"->",52:"=>",54:",",57:"...",66:".",67:"?.",68:"::",69:"?::",71:"INDEX_START",73:"INDEX_END",74:"INDEX_SOAK",76:"{",78:"}",79:"CLASS",80:"EXTENDS",83:"SUPER",84:"FUNC_EXIST",85:"CALL_START",86:"CALL_END",88:"THIS",89:"@",90:"[",91:"]",93:"..",96:"TRY",98:"FINALLY",99:"CATCH",100:"THROW",101:"(",102:")",104:"WHILE",105:"WHEN",106:"UNTIL",108:"LOOP",110:"FOR",114:"OWN",116:"FORIN",117:"FOROF",118:"BY",119:"SWITCH",121:"ELSE",123:"LEADING_WHEN",125:"IF",126:"POST_IF",127:"UNARY",128:"-",129:"+",130:"--",131:"++",132:"?",133:"MATH",134:"SHIFT",135:"COMPARE",136:"LOGIC",137:"RELATION",138:"COMPOUND_ASSIGN"},productions_:[0,[3,0],[3,1],[4,1],[4,3],[4,2],[5,1],[5,1],[8,1],[8,1],[8,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[24,2],[24,3],[27,1],[29,1],[29,1],[32,1],[32,1],[32,1],[32,1],[32,1],[32,1],[32,1],[16,3],[16,4],[16,5],[41,1],[41,3],[41,5],[41,1],[42,1],[42,1],[42,1],[9,2],[9,1],[10,1],[14,5],[14,2],[50,1],[50,1],[53,0],[53,1],[48,0],[48,1],[48,3],[48,4],[48,6],[55,1],[55,2],[55,3],[56,1],[56,1],[56,1],[56,1],[60,2],[61,1],[61,2],[61,2],[61,1],[39,1],[39,1],[39,1],[12,1],[12,1],[12,1],[12,1],[12,1],[62,2],[62,2],[62,2],[62,2],[62,1],[62,1],[70,3],[70,2],[72,1],[72,1],[59,4],[77,0],[77,1],[77,3],[77,4],[77,6],[22,1],[22,2],[22,3],[22,4],[22,2],[22,3],[22,4],[22,5],[13,3],[13,3],[13,1],[13,2],[81,0],[81,1],[82,2],[82,4],[65,1],[65,1],[44,2],[58,2],[58,4],[92,1],[92,1],[64,5],[75,3],[75,2],[75,2],[75,1],[87,1],[87,3],[87,4],[87,4],[87,6],[94,1],[94,1],[95,1],[95,3],[18,2],[18,3],[18,4],[18,5],[97,3],[97,3],[97,2],[23,2],[63,3],[63,5],[103,2],[103,4],[103,2],[103,4],[19,2],[19,2],[19,2],[19,1],[107,2],[107,2],[20,2],[20,2],[20,2],[109,2],[109,2],[111,2],[111,3],[115,1],[115,1],[115,1],[115,1],[113,1],[113,3],[112,2],[112,2],[112,4],[112,4],[112,4],[112,6],[112,6],[21,5],[21,7],[21,4],[21,6],[120,1],[120,2],[122,3],[122,4],[124,3],[124,5],[17,1],[17,3],[17,3],[17,3],[15,2],[15,2],[15,2],[15,2],[15,2],[15,2],[15,2],[15,2],[15,3],[15,3],[15,3],[15,3],[15,3],[15,3],[15,3],[15,3],[15,5],[15,4],[15,3]],performAction:function(e,t,n,r,i,s,o){var u=s.length-1;switch(i){case 1:return this.$=r.addLocationDataFn(o[u],o[u])(new r.Block);case 2:return this.$=s[u];case 3:this.$=r.addLocationDataFn(o[u],o[u])(r.Block.wrap([s[u]]));break;case 4:this.$=r.addLocationDataFn(o[u-2],o[u])(s[u-2].push(s[u]));break;case 5:this.$=s[u-1];break;case 6:this.$=s[u];break;case 7:this.$=s[u];break;case 8:this.$=s[u];break;case 9:this.$=s[u];break;case 10:this.$=r.addLocationDataFn(o[u],o[u])(new r.Literal(s[u]));break;case 11:this.$=s[u];break;case 12:this.$=s[u];break;case 13:this.$=s[u];break;case 14:this.$=s[u];break;case 15:this.$=s[u];break;case 16:this.$=s[u];break;case 17:this.$=s[u];break;case 18:this.$=s[u];break;case 19:this.$=s[u];break;case 20:this.$=s[u];break;case 21:this.$=s[u];break;case 22:this.$=s[u];break;case 23:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Block);break;case 24:this.$=r.addLocationDataFn(o[u-2],o[u])(s[u-1]);break;case 25:this.$=r.addLocationDataFn(o[u],o[u])(new r.Literal(s[u]));break;case 26:this.$=r.addLocationDataFn(o[u],o[u])(new r.Literal(s[u]));break;case 27:this.$=r.addLocationDataFn(o[u],o[u])(new r.Literal(s[u]));break;case 28:this.$=s[u];break;case 29:this.$=r.addLocationDataFn(o[u],o[u])(new r.Literal(s[u]));break;case 30:this.$=r.addLocationDataFn(o[u],o[u])(new r.Literal(s[u]));break;case 31:this.$=r.addLocationDataFn(o[u],o[u])(new r.Literal(s[u]));break;case 32:this.$=r.addLocationDataFn(o[u],o[u])(new r.Undefined);break;case 33:this.$=r.addLocationDataFn(o[u],o[u])(new r.Null);break;case 34:this.$=r.addLocationDataFn(o[u],o[u])(new r.Bool(s[u]));break;case 35:this.$=r.addLocationDataFn(o[u-2],o[u])(new r.Assign(s[u-2],s[u]));break;case 36:this.$=r.addLocationDataFn(o[u-3],o[u])(new r.Assign(s[u-3],s[u]));break;case 37:this.$=r.addLocationDataFn(o[u-4],o[u])(new r.Assign(s[u-4],s[u-1]));break;case 38:this.$=r.addLocationDataFn(o[u],o[u])(new r.Value(s[u]));break;case 39:this.$=r.addLocationDataFn(o[u-2],o[u])(new r.Assign(r.addLocationDataFn(o[u-2])(new r.Value(s[u-2])),s[u],"object"));break;case 40:this.$=r.addLocationDataFn(o[u-4],o[u])(new r.Assign(r.addLocationDataFn(o[u-4])(new r.Value(s[u-4])),s[u-1],"object"));break;case 41:this.$=s[u];break;case 42:this.$=s[u];break;case 43:this.$=s[u];break;case 44:this.$=s[u];break;case 45:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Return(s[u]));break;case 46:this.$=r.addLocationDataFn(o[u],o[u])(new r.Return);break;case 47:this.$=r.addLocationDataFn(o[u],o[u])(new r.Comment(s[u]));break;case 48:this.$=r.addLocationDataFn(o[u-4],o[u])(new r.Code(s[u-3],s[u],s[u-1]));break;case 49:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Code([],s[u],s[u-1]));break;case 50:this.$=r.addLocationDataFn(o[u],o[u])("func");break;case 51:this.$=r.addLocationDataFn(o[u],o[u])("boundfunc");break;case 52:this.$=s[u];break;case 53:this.$=s[u];break;case 54:this.$=r.addLocationDataFn(o[u],o[u])([]);break;case 55:this.$=r.addLocationDataFn(o[u],o[u])([s[u]]);break;case 56:this.$=r.addLocationDataFn(o[u-2],o[u])(s[u-2].concat(s[u]));break;case 57:this.$=r.addLocationDataFn(o[u-3],o[u])(s[u-3].concat(s[u]));break;case 58:this.$=r.addLocationDataFn(o[u-5],o[u])(s[u-5].concat(s[u-2]));break;case 59:this.$=r.addLocationDataFn(o[u],o[u])(new r.Param(s[u]));break;case 60:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Param(s[u-1],null,!0));break;case 61:this.$=r.addLocationDataFn(o[u-2],o[u])(new r.Param(s[u-2],s[u]));break;case 62:this.$=s[u];break;case 63:this.$=s[u];break;case 64:this.$=s[u];break;case 65:this.$=s[u];break;case 66:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Splat(s[u-1]));break;case 67:this.$=r.addLocationDataFn(o[u],o[u])(new r.Value(s[u]));break;case 68:this.$=r.addLocationDataFn(o[u-1],o[u])(s[u-1].add(s[u]));break;case 69:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Value(s[u-1],[].concat(s[u])));break;case 70:this.$=s[u];break;case 71:this.$=s[u];break;case 72:this.$=r.addLocationDataFn(o[u],o[u])(new r.Value(s[u]));break;case 73:this.$=r.addLocationDataFn(o[u],o[u])(new r.Value(s[u]));break;case 74:this.$=s[u];break;case 75:this.$=r.addLocationDataFn(o[u],o[u])(new r.Value(s[u]));break;case 76:this.$=r.addLocationDataFn(o[u],o[u])(new r.Value(s[u]));break;case 77:this.$=r.addLocationDataFn(o[u],o[u])(new r.Value(s[u]));break;case 78:this.$=s[u];break;case 79:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Access(s[u]));break;case 80:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Access(s[u],"soak"));break;case 81:this.$=r.addLocationDataFn(o[u-1],o[u])([r.addLocationDataFn(o[u-1])(new r.Access(new r.Literal("prototype"))),r.addLocationDataFn(o[u])(new r.Access(s[u]))]);break;case 82:this.$=r.addLocationDataFn(o[u-1],o[u])([r.addLocationDataFn(o[u-1])(new r.Access(new r.Literal("prototype"),"soak")),r.addLocationDataFn(o[u])(new r.Access(s[u]))]);break;case 83:this.$=r.addLocationDataFn(o[u],o[u])(new r.Access(new r.Literal("prototype")));break;case 84:this.$=s[u];break;case 85:this.$=r.addLocationDataFn(o[u-2],o[u])(s[u-1]);break;case 86:this.$=r.addLocationDataFn(o[u-1],o[u])(r.extend(s[u],{soak:!0}));break;case 87:this.$=r.addLocationDataFn(o[u],o[u])(new r.Index(s[u]));break;case 88:this.$=r.addLocationDataFn(o[u],o[u])(new r.Slice(s[u]));break;case 89:this.$=r.addLocationDataFn(o[u-3],o[u])(new r.Obj(s[u-2],s[u-3].generated));break;case 90:this.$=r.addLocationDataFn(o[u],o[u])([]);break;case 91:this.$=r.addLocationDataFn(o[u],o[u])([s[u]]);break;case 92:this.$=r.addLocationDataFn(o[u-2],o[u])(s[u-2].concat(s[u]));break;case 93:this.$=r.addLocationDataFn(o[u-3],o[u])(s[u-3].concat(s[u]));break;case 94:this.$=r.addLocationDataFn(o[u-5],o[u])(s[u-5].concat(s[u-2]));break;case 95:this.$=r.addLocationDataFn(o[u],o[u])(new r.Class);break;case 96:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Class(null,null,s[u]));break;case 97:this.$=r.addLocationDataFn(o[u-2],o[u])(new r.Class(null,s[u]));break;case 98:this.$=r.addLocationDataFn(o[u-3],o[u])(new r.Class(null,s[u-1],s[u]));break;case 99:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Class(s[u]));break;case 100:this.$=r.addLocationDataFn(o[u-2],o[u])(new r.Class(s[u-1],null,s[u]));break;case 101:this.$=r.addLocationDataFn(o[u-3],o[u])(new r.Class(s[u-2],s[u]));break;case 102:this.$=r.addLocationDataFn(o[u-4],o[u])(new r.Class(s[u-3],s[u-1],s[u]));break;case 103:this.$=r.addLocationDataFn(o[u-2],o[u])(new r.Call(s[u-2],s[u],s[u-1]));break;case 104:this.$=r.addLocationDataFn(o[u-2],o[u])(new r.Call(s[u-2],s[u],s[u-1]));break;case 105:this.$=r.addLocationDataFn(o[u],o[u])(new r.Call("super",[new r.Splat(new r.Literal("arguments"))]));break;case 106:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Call("super",s[u]));break;case 107:this.$=r.addLocationDataFn(o[u],o[u])(!1);break;case 108:this.$=r.addLocationDataFn(o[u],o[u])(!0);break;case 109:this.$=r.addLocationDataFn(o[u-1],o[u])([]);break;case 110:this.$=r.addLocationDataFn(o[u-3],o[u])(s[u-2]);break;case 111:this.$=r.addLocationDataFn(o[u],o[u])(new r.Value(new r.Literal("this")));break;case 112:this.$=r.addLocationDataFn(o[u],o[u])(new r.Value(new r.Literal("this")));break;case 113:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Value(r.addLocationDataFn(o[u-1])(new r.Literal("this")),[r.addLocationDataFn(o[u])(new r.Access(s[u]))],"this"));break;case 114:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Arr([]));break;case 115:this.$=r.addLocationDataFn(o[u-3],o[u])(new r.Arr(s[u-2]));break;case 116:this.$=r.addLocationDataFn(o[u],o[u])("inclusive");break;case 117:this.$=r.addLocationDataFn(o[u],o[u])("exclusive");break;case 118:this.$=r.addLocationDataFn(o[u-4],o[u])(new r.Range(s[u-3],s[u-1],s[u-2]));break;case 119:this.$=r.addLocationDataFn(o[u-2],o[u])(new r.Range(s[u-2],s[u],s[u-1]));break;case 120:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Range(s[u-1],null,s[u]));break;case 121:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Range(null,s[u],s[u-1]));break;case 122:this.$=r.addLocationDataFn(o[u],o[u])(new r.Range(null,null,s[u]));break;case 123:this.$=r.addLocationDataFn(o[u],o[u])([s[u]]);break;case 124:this.$=r.addLocationDataFn(o[u-2],o[u])(s[u-2].concat(s[u]));break;case 125:this.$=r.addLocationDataFn(o[u-3],o[u])(s[u-3].concat(s[u]));break;case 126:this.$=r.addLocationDataFn(o[u-3],o[u])(s[u-2]);break;case 127:this.$=r.addLocationDataFn(o[u-5],o[u])(s[u-5].concat(s[u-2]));break;case 128:this.$=s[u];break;case 129:this.$=s[u];break;case 130:this.$=s[u];break;case 131:this.$=r.addLocationDataFn(o[u-2],o[u])([].concat(s[u-2],s[u]));break;case 132:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Try(s[u]));break;case 133:this.$=r.addLocationDataFn(o[u-2],o[u])(new r.Try(s[u-1],s[u][0],s[u][1]));break;case 134:this.$=r.addLocationDataFn(o[u-3],o[u])(new r.Try(s[u-2],null,null,s[u]));break;case 135:this.$=r.addLocationDataFn(o[u-4],o[u])(new r.Try(s[u-3],s[u-2][0],s[u-2][1],s[u]));break;case 136:this.$=r.addLocationDataFn(o[u-2],o[u])([s[u-1],s[u]]);break;case 137:this.$=r.addLocationDataFn(o[u-2],o[u])([r.addLocationDataFn(o[u-1])(new r.Value(s[u-1])),s[u]]);break;case 138:this.$=r.addLocationDataFn(o[u-1],o[u])([null,s[u]]);break;case 139:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Throw(s[u]));break;case 140:this.$=r.addLocationDataFn(o[u-2],o[u])(new r.Parens(s[u-1]));break;case 141:this.$=r.addLocationDataFn(o[u-4],o[u])(new r.Parens(s[u-2]));break;case 142:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.While(s[u]));break;case 143:this.$=r.addLocationDataFn(o[u-3],o[u])(new r.While(s[u-2],{guard:s[u]}));break;case 144:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.While(s[u],{invert:!0}));break;case 145:this.$=r.addLocationDataFn(o[u-3],o[u])(new r.While(s[u-2],{invert:!0,guard:s[u]}));break;case 146:this.$=r.addLocationDataFn(o[u-1],o[u])(s[u-1].addBody(s[u]));break;case 147:this.$=r.addLocationDataFn(o[u-1],o[u])(s[u].addBody(r.addLocationDataFn(o[u-1])(r.Block.wrap([s[u-1]]))));break;case 148:this.$=r.addLocationDataFn(o[u-1],o[u])(s[u].addBody(r.addLocationDataFn(o[u-1])(r.Block.wrap([s[u-1]]))));break;case 149:this.$=r.addLocationDataFn(o[u],o[u])(s[u]);break;case 150:this.$=r.addLocationDataFn(o[u-1],o[u])((new r.While(r.addLocationDataFn(o[u-1])(new r.Literal("true")))).addBody(s[u]));break;case 151:this.$=r.addLocationDataFn(o[u-1],o[u])((new r.While(r.addLocationDataFn(o[u-1])(new r.Literal("true")))).addBody(r.addLocationDataFn(o[u])(r.Block.wrap([s[u]]))));break;case 152:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.For(s[u-1],s[u]));break;case 153:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.For(s[u-1],s[u]));break;case 154:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.For(s[u],s[u-1]));break;case 155:this.$=r.addLocationDataFn(o[u-1],o[u])({source:r.addLocationDataFn(o[u])(new r.Value(s[u]))});break;case 156:this.$=r.addLocationDataFn(o[u-1],o[u])(function(){return s[u].own=s[u-1].own,s[u].name=s[u-1][0],s[u].index=s[u-1][1],s[u]}());break;case 157:this.$=r.addLocationDataFn(o[u-1],o[u])(s[u]);break;case 158:this.$=r.addLocationDataFn(o[u-2],o[u])(function(){return s[u].own=!0,s[u]}());break;case 159:this.$=s[u];break;case 160:this.$=s[u];break;case 161:this.$=r.addLocationDataFn(o[u],o[u])(new r.Value(s[u]));break;case 162:this.$=r.addLocationDataFn(o[u],o[u])(new r.Value(s[u]));break;case 163:this.$=r.addLocationDataFn(o[u],o[u])([s[u]]);break;case 164:this.$=r.addLocationDataFn(o[u-2],o[u])([s[u-2],s[u]]);break;case 165:this.$=r.addLocationDataFn(o[u-1],o[u])({source:s[u]});break;case 166:this.$=r.addLocationDataFn(o[u-1],o[u])({source:s[u],object:!0});break;case 167:this.$=r.addLocationDataFn(o[u-3],o[u])({source:s[u-2],guard:s[u]});break;case 168:this.$=r.addLocationDataFn(o[u-3],o[u])({source:s[u-2],guard:s[u],object:!0});break;case 169:this.$=r.addLocationDataFn(o[u-3],o[u])({source:s[u-2],step:s[u]});break;case 170:this.$=r.addLocationDataFn(o[u-5],o[u])({source:s[u-4],guard:s[u-2],step:s[u]});break;case 171:this.$=r.addLocationDataFn(o[u-5],o[u])({source:s[u-4],step:s[u-2],guard:s[u]});break;case 172:this.$=r.addLocationDataFn(o[u-4],o[u])(new r.Switch(s[u-3],s[u-1]));break;case 173:this.$=r.addLocationDataFn(o[u-6],o[u])(new r.Switch(s[u-5],s[u-3],s[u-1]));break;case 174:this.$=r.addLocationDataFn(o[u-3],o[u])(new r.Switch(null,s[u-1]));break;case 175:this.$=r.addLocationDataFn(o[u-5],o[u])(new r.Switch(null,s[u-3],s[u-1]));break;case 176:this.$=s[u];break;case 177:this.$=r.addLocationDataFn(o[u-1],o[u])(s[u-1].concat(s[u]));break;case 178:this.$=r.addLocationDataFn(o[u-2],o[u])([[s[u-1],s[u]]]);break;case 179:this.$=r.addLocationDataFn(o[u-3],o[u])([[s[u-2],s[u-1]]]);break;case 180:this.$=r.addLocationDataFn(o[u-2],o[u])(new r.If(s[u-1],s[u],{type:s[u-2]}));break;case 181:this.$=r.addLocationDataFn(o[u-4],o[u])(s[u-4].addElse(r.addLocationDataFn(o[u-2],o[u])(new r.If(s[u-1],s[u],{type:s[u-2]}))));break;case 182:this.$=s[u];break;case 183:this.$=r.addLocationDataFn(o[u-2],o[u])(s[u-2].addElse(s[u]));break;case 184:this.$=r.addLocationDataFn(o[u-2],o[u])(new r.If(s[u],r.addLocationDataFn(o[u-2])(r.Block.wrap([s[u-2]])),{type:s[u-1],statement:!0}));break;case 185:this.$=r.addLocationDataFn(o[u-2],o[u])(new r.If(s[u],r.addLocationDataFn(o[u-2])(r.Block.wrap([s[u-2]])),{type:s[u-1],statement:!0}));break;case 186:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Op(s[u-1],s[u]));break;case 187:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Op("-",s[u]));break;case 188:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Op("+",s[u]));break;case 189:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Op("--",s[u]));break;case 190:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Op("++",s[u]));break;case 191:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Op("--",s[u-1],null,!0));break;case 192:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Op("++",s[u-1],null,!0));break;case 193:this.$=r.addLocationDataFn(o[u-1],o[u])(new r.Existence(s[u-1]));break;case 194:this.$=r.addLocationDataFn(o[u-2],o[u])(new r.Op("+",s[u-2],s[u]));break;case 195:this.$=r.addLocationDataFn(o[u-2],o[u])(new r.Op("-",s[u-2],s[u]));break;case 196:this.$=r.addLocationDataFn(o[u-2],o[u])(new r.Op(s[u-1],s[u-2],s[u]));break;case 197:this.$=r.addLocationDataFn(o[u-2],o[u])(new r.Op(s[u-1],s[u-2],s[u]));break;case 198:this.$=r.addLocationDataFn(o[u-2],o[u])(new r.Op(s[u-1],s[u-2],s[u]));break;case 199:this.$=r.addLocationDataFn(o[u-2],o[u])(new r.Op(s[u-1],s[u-2],s[u]));break;case 200:this.$=r.addLocationDataFn(o[u-2],o[u])(function(){return s[u-1].charAt(0)==="!"?(new r.Op(s[u-1].slice(1),s[u-2],s[u])).invert():new r.Op(s[u-1],s[u-2],s[u])}());break;case 201:this.$=r.addLocationDataFn(o[u-2],o[u])(new r.Assign(s[u-2],s[u],s[u-1]));break;case 202:this.$=r.addLocationDataFn(o[u-4],o[u])(new r.Assign(s[u-4],s[u-1],s[u-3]));break;case 203:this.$=r.addLocationDataFn(o[u-3],o[u])(new r.Assign(s[u-3],s[u],s[u-2]));break;case 204:this.$=r.addLocationDataFn(o[u-2],o[u])(new r.Extends(s[u-2],s[u]))}},table:[{1:[2,1],3:1,4:2,5:3,7:4,8:5,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[3]},{1:[2,2],6:[1,72]},{1:[2,3],6:[2,3],26:[2,3],102:[2,3]},{1:[2,6],6:[2,6],26:[2,6],102:[2,6],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,7],6:[2,7],26:[2,7],102:[2,7],103:85,104:[1,63],106:[1,64],109:86,110:[1,66],111:67,126:[1,84]},{1:[2,11],6:[2,11],25:[2,11],26:[2,11],49:[2,11],54:[2,11],57:[2,11],62:88,66:[1,90],67:[1,91],68:[1,92],69:[1,93],70:94,71:[1,95],73:[2,11],74:[1,96],78:[2,11],81:87,84:[1,89],85:[2,107],86:[2,11],91:[2,11],93:[2,11],102:[2,11],104:[2,11],105:[2,11],106:[2,11],110:[2,11],118:[2,11],126:[2,11],128:[2,11],129:[2,11],132:[2,11],133:[2,11],134:[2,11],135:[2,11],136:[2,11],137:[2,11]},{1:[2,12],6:[2,12],25:[2,12],26:[2,12],49:[2,12],54:[2,12],57:[2,12],62:98,66:[1,90],67:[1,91],68:[1,92],69:[1,93],70:94,71:[1,95],73:[2,12],74:[1,96],78:[2,12],81:97,84:[1,89],85:[2,107],86:[2,12],91:[2,12],93:[2,12],102:[2,12],104:[2,12],105:[2,12],106:[2,12],110:[2,12],118:[2,12],126:[2,12],128:[2,12],129:[2,12],132:[2,12],133:[2,12],134:[2,12],135:[2,12],136:[2,12],137:[2,12]},{1:[2,13],6:[2,13],25:[2,13],26:[2,13],49:[2,13],54:[2,13],57:[2,13],73:[2,13],78:[2,13],86:[2,13],91:[2,13],93:[2,13],102:[2,13],104:[2,13],105:[2,13],106:[2,13],110:[2,13],118:[2,13],126:[2,13],128:[2,13],129:[2,13],132:[2,13],133:[2,13],134:[2,13],135:[2,13],136:[2,13],137:[2,13]},{1:[2,14],6:[2,14],25:[2,14],26:[2,14],49:[2,14],54:[2,14],57:[2,14],73:[2,14],78:[2,14],86:[2,14],91:[2,14],93:[2,14],102:[2,14],104:[2,14],105:[2,14],106:[2,14],110:[2,14],118:[2,14],126:[2,14],128:[2,14],129:[2,14],132:[2,14],133:[2,14],134:[2,14],135:[2,14],136:[2,14],137:[2,14]},{1:[2,15],6:[2,15],25:[2,15],26:[2,15],49:[2,15],54:[2,15],57:[2,15],73:[2,15],78:[2,15],86:[2,15],91:[2,15],93:[2,15],102:[2,15],104:[2,15],105:[2,15],106:[2,15],110:[2,15],118:[2,15],126:[2,15],128:[2,15],129:[2,15],132:[2,15],133:[2,15],134:[2,15],135:[2,15],136:[2,15],137:[2,15]},{1:[2,16],6:[2,16],25:[2,16],26:[2,16],49:[2,16],54:[2,16],57:[2,16],73:[2,16],78:[2,16],86:[2,16],91:[2,16],93:[2,16],102:[2,16],104:[2,16],105:[2,16],106:[2,16],110:[2,16],118:[2,16],126:[2,16],128:[2,16],129:[2,16],132:[2,16],133:[2,16],134:[2,16],135:[2,16],136:[2,16],137:[2,16]},{1:[2,17],6:[2,17],25:[2,17],26:[2,17],49:[2,17],54:[2,17],57:[2,17],73:[2,17],78:[2,17],86:[2,17],91:[2,17],93:[2,17],102:[2,17],104:[2,17],105:[2,17],106:[2,17],110:[2,17],118:[2,17],126:[2,17],128:[2,17],129:[2,17],132:[2,17],133:[2,17],134:[2,17],135:[2,17],136:[2,17],137:[2,17]},{1:[2,18],6:[2,18],25:[2,18],26:[2,18],49:[2,18],54:[2,18],57:[2,18],73:[2,18],78:[2,18],86:[2,18],91:[2,18],93:[2,18],102:[2,18],104:[2,18],105:[2,18],106:[2,18],110:[2,18],118:[2,18],126:[2,18],128:[2,18],129:[2,18],132:[2,18],133:[2,18],134:[2,18],135:[2,18],136:[2,18],137:[2,18]},{1:[2,19],6:[2,19],25:[2,19],26:[2,19],49:[2,19],54:[2,19],57:[2,19],73:[2,19],78:[2,19],86:[2,19],91:[2,19],93:[2,19],102:[2,19],104:[2,19],105:[2,19],106:[2,19],110:[2,19],118:[2,19],126:[2,19],128:[2,19],129:[2,19],132:[2,19],133:[2,19],134:[2,19],135:[2,19],136:[2,19],137:[2,19]},{1:[2,20],6:[2,20],25:[2,20],26:[2,20],49:[2,20],54:[2,20],57:[2,20],73:[2,20],78:[2,20],86:[2,20],91:[2,20],93:[2,20],102:[2,20],104:[2,20],105:[2,20],106:[2,20],110:[2,20],118:[2,20],126:[2,20],128:[2,20],129:[2,20],132:[2,20],133:[2,20],134:[2,20],135:[2,20],136:[2,20],137:[2,20]},{1:[2,21],6:[2,21],25:[2,21],26:[2,21],49:[2,21],54:[2,21],57:[2,21],73:[2,21],78:[2,21],86:[2,21],91:[2,21],93:[2,21],102:[2,21],104:[2,21],105:[2,21],106:[2,21],110:[2,21],118:[2,21],126:[2,21],128:[2,21],129:[2,21],132:[2,21],133:[2,21],134:[2,21],135:[2,21],136:[2,21],137:[2,21]},{1:[2,22],6:[2,22],25:[2,22],26:[2,22],49:[2,22],54:[2,22],57:[2,22],73:[2,22],78:[2,22],86:[2,22],91:[2,22],93:[2,22],102:[2,22],104:[2,22],105:[2,22],106:[2,22],110:[2,22],118:[2,22],126:[2,22],128:[2,22],129:[2,22],132:[2,22],133:[2,22],134:[2,22],135:[2,22],136:[2,22],137:[2,22]},{1:[2,8],6:[2,8],26:[2,8],102:[2,8],104:[2,8],106:[2,8],110:[2,8],126:[2,8]},{1:[2,9],6:[2,9],26:[2,9],102:[2,9],104:[2,9],106:[2,9],110:[2,9],126:[2,9]},{1:[2,10],6:[2,10],26:[2,10],102:[2,10],104:[2,10],106:[2,10],110:[2,10],126:[2,10]},{1:[2,74],6:[2,74],25:[2,74],26:[2,74],40:[1,99],49:[2,74],54:[2,74],57:[2,74],66:[2,74],67:[2,74],68:[2,74],69:[2,74],71:[2,74],73:[2,74],74:[2,74],78:[2,74],84:[2,74],85:[2,74],86:[2,74],91:[2,74],93:[2,74],102:[2,74],104:[2,74],105:[2,74],106:[2,74],110:[2,74],118:[2,74],126:[2,74],128:[2,74],129:[2,74],132:[2,74],133:[2,74],134:[2,74],135:[2,74],136:[2,74],137:[2,74]},{1:[2,75],6:[2,75],25:[2,75],26:[2,75],49:[2,75],54:[2,75],57:[2,75],66:[2,75],67:[2,75],68:[2,75],69:[2,75],71:[2,75],73:[2,75],74:[2,75],78:[2,75],84:[2,75],85:[2,75],86:[2,75],91:[2,75],93:[2,75],102:[2,75],104:[2,75],105:[2,75],106:[2,75],110:[2,75],118:[2,75],126:[2,75],128:[2,75],129:[2,75],132:[2,75],133:[2,75],134:[2,75],135:[2,75],136:[2,75],137:[2,75]},{1:[2,76],6:[2,76],25:[2,76],26:[2,76],49:[2,76],54:[2,76],57:[2,76],66:[2,76],67:[2,76],68:[2,76],69:[2,76],71:[2,76],73:[2,76],74:[2,76],78:[2,76],84:[2,76],85:[2,76],86:[2,76],91:[2,76],93:[2,76],102:[2,76],104:[2,76],105:[2,76],106:[2,76],110:[2,76],118:[2,76],126:[2,76],128:[2,76],129:[2,76],132:[2,76],133:[2,76],134:[2,76],135:[2,76],136:[2,76],137:[2,76]},{1:[2,77],6:[2,77],25:[2,77],26:[2,77],49:[2,77],54:[2,77],57:[2,77],66:[2,77],67:[2,77],68:[2,77],69:[2,77],71:[2,77],73:[2,77],74:[2,77],78:[2,77],84:[2,77],85:[2,77],86:[2,77],91:[2,77],93:[2,77],102:[2,77],104:[2,77],105:[2,77],106:[2,77],110:[2,77],118:[2,77],126:[2,77],128:[2,77],129:[2,77],132:[2,77],133:[2,77],134:[2,77],135:[2,77],136:[2,77],137:[2,77]},{1:[2,78],6:[2,78],25:[2,78],26:[2,78],49:[2,78],54:[2,78],57:[2,78],66:[2,78],67:[2,78],68:[2,78],69:[2,78],71:[2,78],73:[2,78],74:[2,78],78:[2,78],84:[2,78],85:[2,78],86:[2,78],91:[2,78],93:[2,78],102:[2,78],104:[2,78],105:[2,78],106:[2,78],110:[2,78],118:[2,78],126:[2,78],128:[2,78],129:[2,78],132:[2,78],133:[2,78],134:[2,78],135:[2,78],136:[2,78],137:[2,78]},{1:[2,105],6:[2,105],25:[2,105],26:[2,105],49:[2,105],54:[2,105],57:[2,105],66:[2,105],67:[2,105],68:[2,105],69:[2,105],71:[2,105],73:[2,105],74:[2,105],78:[2,105],82:100,84:[2,105],85:[1,101],86:[2,105],91:[2,105],93:[2,105],102:[2,105],104:[2,105],105:[2,105],106:[2,105],110:[2,105],118:[2,105],126:[2,105],128:[2,105],129:[2,105],132:[2,105],133:[2,105],134:[2,105],135:[2,105],136:[2,105],137:[2,105]},{6:[2,54],25:[2,54],27:105,28:[1,71],44:106,48:102,49:[2,54],54:[2,54],55:103,56:104,58:107,59:108,76:[1,68],89:[1,109],90:[1,110]},{24:111,25:[1,112]},{7:113,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:115,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:116,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{12:118,13:119,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:120,44:61,58:45,59:46,61:117,63:23,64:24,65:25,76:[1,68],83:[1,26],88:[1,56],89:[1,57],90:[1,55],101:[1,54]},{12:118,13:119,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:120,44:61,58:45,59:46,61:121,63:23,64:24,65:25,76:[1,68],83:[1,26],88:[1,56],89:[1,57],90:[1,55],101:[1,54]},{1:[2,71],6:[2,71],25:[2,71],26:[2,71],40:[2,71],49:[2,71],54:[2,71],57:[2,71],66:[2,71],67:[2,71],68:[2,71],69:[2,71],71:[2,71],73:[2,71],74:[2,71],78:[2,71],80:[1,125],84:[2,71],85:[2,71],86:[2,71],91:[2,71],93:[2,71],102:[2,71],104:[2,71],105:[2,71],106:[2,71],110:[2,71],118:[2,71],126:[2,71],128:[2,71],129:[2,71],130:[1,122],131:[1,123],132:[2,71],133:[2,71],134:[2,71],135:[2,71],136:[2,71],137:[2,71],138:[1,124]},{1:[2,182],6:[2,182],25:[2,182],26:[2,182],49:[2,182],54:[2,182],57:[2,182],73:[2,182],78:[2,182],86:[2,182],91:[2,182],93:[2,182],102:[2,182],104:[2,182],105:[2,182],106:[2,182],110:[2,182],118:[2,182],121:[1,126],126:[2,182],128:[2,182],129:[2,182],132:[2,182],133:[2,182],134:[2,182],135:[2,182],136:[2,182],137:[2,182]},{24:127,25:[1,112]},{24:128,25:[1,112]},{1:[2,149],6:[2,149],25:[2,149],26:[2,149],49:[2,149],54:[2,149],57:[2,149],73:[2,149],78:[2,149],86:[2,149],91:[2,149],93:[2,149],102:[2,149],104:[2,149],105:[2,149],106:[2,149],110:[2,149],118:[2,149],126:[2,149],128:[2,149],129:[2,149],132:[2,149],133:[2,149],134:[2,149],135:[2,149],136:[2,149],137:[2,149]},{24:129,25:[1,112]},{7:130,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,131],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,95],6:[2,95],12:118,13:119,24:132,25:[1,112],26:[2,95],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:120,44:61,49:[2,95],54:[2,95],57:[2,95],58:45,59:46,61:134,63:23,64:24,65:25,73:[2,95],76:[1,68],78:[2,95],80:[1,133],83:[1,26],86:[2,95],88:[1,56],89:[1,57],90:[1,55],91:[2,95],93:[2,95],101:[1,54],102:[2,95],104:[2,95],105:[2,95],106:[2,95],110:[2,95],118:[2,95],126:[2,95],128:[2,95],129:[2,95],132:[2,95],133:[2,95],134:[2,95],135:[2,95],136:[2,95],137:[2,95]},{7:135,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,46],6:[2,46],7:136,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,26:[2,46],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],102:[2,46],103:37,104:[2,46],106:[2,46],107:38,108:[1,65],109:39,110:[2,46],111:67,119:[1,40],124:35,125:[1,62],126:[2,46],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,47],6:[2,47],25:[2,47],26:[2,47],54:[2,47],78:[2,47],102:[2,47],104:[2,47],106:[2,47],110:[2,47],126:[2,47]},{1:[2,72],6:[2,72],25:[2,72],26:[2,72],40:[2,72],49:[2,72],54:[2,72],57:[2,72],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,72],74:[2,72],78:[2,72],84:[2,72],85:[2,72],86:[2,72],91:[2,72],93:[2,72],102:[2,72],104:[2,72],105:[2,72],106:[2,72],110:[2,72],118:[2,72],126:[2,72],128:[2,72],129:[2,72],132:[2,72],133:[2,72],134:[2,72],135:[2,72],136:[2,72],137:[2,72]},{1:[2,73],6:[2,73],25:[2,73],26:[2,73],40:[2,73],49:[2,73],54:[2,73],57:[2,73],66:[2,73],67:[2,73],68:[2,73],69:[2,73],71:[2,73],73:[2,73],74:[2,73],78:[2,73],84:[2,73],85:[2,73],86:[2,73],91:[2,73],93:[2,73],102:[2,73],104:[2,73],105:[2,73],106:[2,73],110:[2,73],118:[2,73],126:[2,73],128:[2,73],129:[2,73],132:[2,73],133:[2,73],134:[2,73],135:[2,73],136:[2,73],137:[2,73]},{1:[2,28],6:[2,28],25:[2,28],26:[2,28],49:[2,28],54:[2,28],57:[2,28],66:[2,28],67:[2,28],68:[2,28],69:[2,28],71:[2,28],73:[2,28],74:[2,28],78:[2,28],84:[2,28],85:[2,28],86:[2,28],91:[2,28],93:[2,28],102:[2,28],104:[2,28],105:[2,28],106:[2,28],110:[2,28],118:[2,28],126:[2,28],128:[2,28],129:[2,28],132:[2,28],133:[2,28],134:[2,28],135:[2,28],136:[2,28],137:[2,28]},{1:[2,29],6:[2,29],25:[2,29],26:[2,29],49:[2,29],54:[2,29],57:[2,29],66:[2,29],67:[2,29],68:[2,29],69:[2,29],71:[2,29],73:[2,29],74:[2,29],78:[2,29],84:[2,29],85:[2,29],86:[2,29],91:[2,29],93:[2,29],102:[2,29],104:[2,29],105:[2,29],106:[2,29],110:[2,29],118:[2,29],126:[2,29],128:[2,29],129:[2,29],132:[2,29],133:[2,29],134:[2,29],135:[2,29],136:[2,29],137:[2,29]},{1:[2,30],6:[2,30],25:[2,30],26:[2,30],49:[2,30],54:[2,30],57:[2,30],66:[2,30],67:[2,30],68:[2,30],69:[2,30],71:[2,30],73:[2,30],74:[2,30],78:[2,30],84:[2,30],85:[2,30],86:[2,30],91:[2,30],93:[2,30],102:[2,30],104:[2,30],105:[2,30],106:[2,30],110:[2,30],118:[2,30],126:[2,30],128:[2,30],129:[2,30],132:[2,30],133:[2,30],134:[2,30],135:[2,30],136:[2,30],137:[2,30]},{1:[2,31],6:[2,31],25:[2,31],26:[2,31],49:[2,31],54:[2,31],57:[2,31],66:[2,31],67:[2,31],68:[2,31],69:[2,31],71:[2,31],73:[2,31],74:[2,31],78:[2,31],84:[2,31],85:[2,31],86:[2,31],91:[2,31],93:[2,31],102:[2,31],104:[2,31],105:[2,31],106:[2,31],110:[2,31],118:[2,31],126:[2,31],128:[2,31],129:[2,31],132:[2,31],133:[2,31],134:[2,31],135:[2,31],136:[2,31],137:[2,31]},{1:[2,32],6:[2,32],25:[2,32],26:[2,32],49:[2,32],54:[2,32],57:[2,32],66:[2,32],67:[2,32],68:[2,32],69:[2,32],71:[2,32],73:[2,32],74:[2,32],78:[2,32],84:[2,32],85:[2,32],86:[2,32],91:[2,32],93:[2,32],102:[2,32],104:[2,32],105:[2,32],106:[2,32],110:[2,32],118:[2,32],126:[2,32],128:[2,32],129:[2,32],132:[2,32],133:[2,32],134:[2,32],135:[2,32],136:[2,32],137:[2,32]},{1:[2,33],6:[2,33],25:[2,33],26:[2,33],49:[2,33],54:[2,33],57:[2,33],66:[2,33],67:[2,33],68:[2,33],69:[2,33],71:[2,33],73:[2,33],74:[2,33],78:[2,33],84:[2,33],85:[2,33],86:[2,33],91:[2,33],93:[2,33],102:[2,33],104:[2,33],105:[2,33],106:[2,33],110:[2,33],118:[2,33],126:[2,33],128:[2,33],129:[2,33],132:[2,33],133:[2,33],134:[2,33],135:[2,33],136:[2,33],137:[2,33]},{1:[2,34],6:[2,34],25:[2,34],26:[2,34],49:[2,34],54:[2,34],57:[2,34],66:[2,34],67:[2,34],68:[2,34],69:[2,34],71:[2,34],73:[2,34],74:[2,34],78:[2,34],84:[2,34],85:[2,34],86:[2,34],91:[2,34],93:[2,34],102:[2,34],104:[2,34],105:[2,34],106:[2,34],110:[2,34],118:[2,34],126:[2,34],128:[2,34],129:[2,34],132:[2,34],133:[2,34],134:[2,34],135:[2,34],136:[2,34],137:[2,34]},{4:137,5:3,7:4,8:5,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,138],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:139,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,143],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],87:141,88:[1,56],89:[1,57],90:[1,55],91:[1,140],94:142,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,111],6:[2,111],25:[2,111],26:[2,111],49:[2,111],54:[2,111],57:[2,111],66:[2,111],67:[2,111],68:[2,111],69:[2,111],71:[2,111],73:[2,111],74:[2,111],78:[2,111],84:[2,111],85:[2,111],86:[2,111],91:[2,111],93:[2,111],102:[2,111],104:[2,111],105:[2,111],106:[2,111],110:[2,111],118:[2,111],126:[2,111],128:[2,111],129:[2,111],132:[2,111],133:[2,111],134:[2,111],135:[2,111],136:[2,111],137:[2,111]},{1:[2,112],6:[2,112],25:[2,112],26:[2,112],27:145,28:[1,71],49:[2,112],54:[2,112],57:[2,112],66:[2,112],67:[2,112],68:[2,112],69:[2,112],71:[2,112],73:[2,112],74:[2,112],78:[2,112],84:[2,112],85:[2,112],86:[2,112],91:[2,112],93:[2,112],102:[2,112],104:[2,112],105:[2,112],106:[2,112],110:[2,112],118:[2,112],126:[2,112],128:[2,112],129:[2,112],132:[2,112],133:[2,112],134:[2,112],135:[2,112],136:[2,112],137:[2,112]},{25:[2,50]},{25:[2,51]},{1:[2,67],6:[2,67],25:[2,67],26:[2,67],40:[2,67],49:[2,67],54:[2,67],57:[2,67],66:[2,67],67:[2,67],68:[2,67],69:[2,67],71:[2,67],73:[2,67],74:[2,67],78:[2,67],80:[2,67],84:[2,67],85:[2,67],86:[2,67],91:[2,67],93:[2,67],102:[2,67],104:[2,67],105:[2,67],106:[2,67],110:[2,67],118:[2,67],126:[2,67],128:[2,67],129:[2,67],130:[2,67],131:[2,67],132:[2,67],133:[2,67],134:[2,67],135:[2,67],136:[2,67],137:[2,67],138:[2,67]},{1:[2,70],6:[2,70],25:[2,70],26:[2,70],40:[2,70],49:[2,70],54:[2,70],57:[2,70],66:[2,70],67:[2,70],68:[2,70],69:[2,70],71:[2,70],73:[2,70],74:[2,70],78:[2,70],80:[2,70],84:[2,70],85:[2,70],86:[2,70],91:[2,70],93:[2,70],102:[2,70],104:[2,70],105:[2,70],106:[2,70],110:[2,70],118:[2,70],126:[2,70],128:[2,70],129:[2,70],130:[2,70],131:[2,70],132:[2,70],133:[2,70],134:[2,70],135:[2,70],136:[2,70],137:[2,70],138:[2,70]},{7:146,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:147,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:148,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:150,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:149,25:[1,112],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{27:155,28:[1,71],44:156,58:157,59:158,64:151,76:[1,68],89:[1,109],90:[1,55],113:152,114:[1,153],115:154},{112:159,116:[1,160],117:[1,161]},{6:[2,90],10:165,25:[2,90],27:166,28:[1,71],29:167,30:[1,69],31:[1,70],41:163,42:164,44:168,46:[1,44],54:[2,90],77:162,78:[2,90],89:[1,109]},{1:[2,26],6:[2,26],25:[2,26],26:[2,26],43:[2,26],49:[2,26],54:[2,26],57:[2,26],66:[2,26],67:[2,26],68:[2,26],69:[2,26],71:[2,26],73:[2,26],74:[2,26],78:[2,26],84:[2,26],85:[2,26],86:[2,26],91:[2,26],93:[2,26],102:[2,26],104:[2,26],105:[2,26],106:[2,26],110:[2,26],118:[2,26],126:[2,26],128:[2,26],129:[2,26],132:[2,26],133:[2,26],134:[2,26],135:[2,26],136:[2,26],137:[2,26]},{1:[2,27],6:[2,27],25:[2,27],26:[2,27],43:[2,27],49:[2,27],54:[2,27],57:[2,27],66:[2,27],67:[2,27],68:[2,27],69:[2,27],71:[2,27],73:[2,27],74:[2,27],78:[2,27],84:[2,27],85:[2,27],86:[2,27],91:[2,27],93:[2,27],102:[2,27],104:[2,27],105:[2,27],106:[2,27],110:[2,27],118:[2,27],126:[2,27],128:[2,27],129:[2,27],132:[2,27],133:[2,27],134:[2,27],135:[2,27],136:[2,27],137:[2,27]},{1:[2,25],6:[2,25],25:[2,25],26:[2,25],40:[2,25],43:[2,25],49:[2,25],54:[2,25],57:[2,25],66:[2,25],67:[2,25],68:[2,25],69:[2,25],71:[2,25],73:[2,25],74:[2,25],78:[2,25],80:[2,25],84:[2,25],85:[2,25],86:[2,25],91:[2,25],93:[2,25],102:[2,25],104:[2,25],105:[2,25],106:[2,25],110:[2,25],116:[2,25],117:[2,25],118:[2,25],126:[2,25],128:[2,25],129:[2,25],130:[2,25],131:[2,25],132:[2,25],133:[2,25],134:[2,25],135:[2,25],136:[2,25],137:[2,25],138:[2,25]},{1:[2,5],5:169,6:[2,5],7:4,8:5,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,26:[2,5],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],102:[2,5],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,193],6:[2,193],25:[2,193],26:[2,193],49:[2,193],54:[2,193],57:[2,193],73:[2,193],78:[2,193],86:[2,193],91:[2,193],93:[2,193],102:[2,193],104:[2,193],105:[2,193],106:[2,193],110:[2,193],118:[2,193],126:[2,193],128:[2,193],129:[2,193],132:[2,193],133:[2,193],134:[2,193],135:[2,193],136:[2,193],137:[2,193]},{7:170,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:171,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:172,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:173,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:174,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:175,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:176,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:177,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,148],6:[2,148],25:[2,148],26:[2,148],49:[2,148],54:[2,148],57:[2,148],73:[2,148],78:[2,148],86:[2,148],91:[2,148],93:[2,148],102:[2,148],104:[2,148],105:[2,148],106:[2,148],110:[2,148],118:[2,148],126:[2,148],128:[2,148],129:[2,148],132:[2,148],133:[2,148],134:[2,148],135:[2,148],136:[2,148],137:[2,148]},{1:[2,153],6:[2,153],25:[2,153],26:[2,153],49:[2,153],54:[2,153],57:[2,153],73:[2,153],78:[2,153],86:[2,153],91:[2,153],93:[2,153],102:[2,153],104:[2,153],105:[2,153],106:[2,153],110:[2,153],118:[2,153],126:[2,153],128:[2,153],129:[2,153],132:[2,153],133:[2,153],134:[2,153],135:[2,153],136:[2,153],137:[2,153]},{7:178,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,147],6:[2,147],25:[2,147],26:[2,147],49:[2,147],54:[2,147],57:[2,147],73:[2,147],78:[2,147],86:[2,147],91:[2,147],93:[2,147],102:[2,147],104:[2,147],105:[2,147],106:[2,147],110:[2,147],118:[2,147],126:[2,147],128:[2,147],129:[2,147],132:[2,147],133:[2,147],134:[2,147],135:[2,147],136:[2,147],137:[2,147]},{1:[2,152],6:[2,152],25:[2,152],26:[2,152],49:[2,152],54:[2,152],57:[2,152],73:[2,152],78:[2,152],86:[2,152],91:[2,152],93:[2,152],102:[2,152],104:[2,152],105:[2,152],106:[2,152],110:[2,152],118:[2,152],126:[2,152],128:[2,152],129:[2,152],132:[2,152],133:[2,152],134:[2,152],135:[2,152],136:[2,152],137:[2,152]},{82:179,85:[1,101]},{1:[2,68],6:[2,68],25:[2,68],26:[2,68],40:[2,68],49:[2,68],54:[2,68],57:[2,68],66:[2,68],67:[2,68],68:[2,68],69:[2,68],71:[2,68],73:[2,68],74:[2,68],78:[2,68],80:[2,68],84:[2,68],85:[2,68],86:[2,68],91:[2,68],93:[2,68],102:[2,68],104:[2,68],105:[2,68],106:[2,68],110:[2,68],118:[2,68],126:[2,68],128:[2,68],129:[2,68],130:[2,68],131:[2,68],132:[2,68],133:[2,68],134:[2,68],135:[2,68],136:[2,68],137:[2,68],138:[2,68]},{85:[2,108]},{27:180,28:[1,71]},{27:181,28:[1,71]},{1:[2,83],6:[2,83],25:[2,83],26:[2,83],27:182,28:[1,71],40:[2,83],49:[2,83],54:[2,83],57:[2,83],66:[2,83],67:[2,83],68:[2,83],69:[2,83],71:[2,83],73:[2,83],74:[2,83],78:[2,83],80:[2,83],84:[2,83],85:[2,83],86:[2,83],91:[2,83],93:[2,83],102:[2,83],104:[2,83],105:[2,83],106:[2,83],110:[2,83],118:[2,83],126:[2,83],128:[2,83],129:[2,83],130:[2,83],131:[2,83],132:[2,83],133:[2,83],134:[2,83],135:[2,83],136:[2,83],137:[2,83],138:[2,83]},{27:183,28:[1,71]},{1:[2,84],6:[2,84],25:[2,84],26:[2,84],40:[2,84],49:[2,84],54:[2,84],57:[2,84],66:[2,84],67:[2,84],68:[2,84],69:[2,84],71:[2,84],73:[2,84],74:[2,84],78:[2,84],80:[2,84],84:[2,84],85:[2,84],86:[2,84],91:[2,84],93:[2,84],102:[2,84],104:[2,84],105:[2,84],106:[2,84],110:[2,84],118:[2,84],126:[2,84],128:[2,84],129:[2,84],130:[2,84],131:[2,84],132:[2,84],133:[2,84],134:[2,84],135:[2,84],136:[2,84],137:[2,84],138:[2,84]},{7:185,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],57:[1,189],58:45,59:46,61:34,63:23,64:24,65:25,72:184,75:186,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],92:187,93:[1,188],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{70:190,71:[1,95],74:[1,96]},{82:191,85:[1,101]},{1:[2,69],6:[2,69],25:[2,69],26:[2,69],40:[2,69],49:[2,69],54:[2,69],57:[2,69],66:[2,69],67:[2,69],68:[2,69],69:[2,69],71:[2,69],73:[2,69],74:[2,69],78:[2,69],80:[2,69],84:[2,69],85:[2,69],86:[2,69],91:[2,69],93:[2,69],102:[2,69],104:[2,69],105:[2,69],106:[2,69],110:[2,69],118:[2,69],126:[2,69],128:[2,69],129:[2,69],130:[2,69],131:[2,69],132:[2,69],133:[2,69],134:[2,69],135:[2,69],136:[2,69],137:[2,69],138:[2,69]},{6:[1,193],7:192,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,194],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,106],6:[2,106],25:[2,106],26:[2,106],49:[2,106],54:[2,106],57:[2,106],66:[2,106],67:[2,106],68:[2,106],69:[2,106],71:[2,106],73:[2,106],74:[2,106],78:[2,106],84:[2,106],85:[2,106],86:[2,106],91:[2,106],93:[2,106],102:[2,106],104:[2,106],105:[2,106],106:[2,106],110:[2,106],118:[2,106],126:[2,106],128:[2,106],129:[2,106],132:[2,106],133:[2,106],134:[2,106],135:[2,106],136:[2,106],137:[2,106]},{7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,143],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],86:[1,195],87:196,88:[1,56],89:[1,57],90:[1,55],94:142,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,52],25:[2,52],49:[1,198],53:200,54:[1,199]},{6:[2,55],25:[2,55],26:[2,55],49:[2,55],54:[2,55]},{6:[2,59],25:[2,59],26:[2,59],40:[1,202],49:[2,59],54:[2,59],57:[1,201]},{6:[2,62],25:[2,62],26:[2,62],40:[2,62],49:[2,62],54:[2,62],57:[2,62]},{6:[2,63],25:[2,63],26:[2,63],40:[2,63],49:[2,63],54:[2,63],57:[2,63]},{6:[2,64],25:[2,64],26:[2,64],40:[2,64],49:[2,64],54:[2,64],57:[2,64]},{6:[2,65],25:[2,65],26:[2,65],40:[2,65],49:[2,65],54:[2,65],57:[2,65]},{27:145,28:[1,71]},{7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,143],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],87:141,88:[1,56],89:[1,57],90:[1,55],91:[1,140],94:142,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,49],6:[2,49],25:[2,49],26:[2,49],49:[2,49],54:[2,49],57:[2,49],73:[2,49],78:[2,49],86:[2,49],91:[2,49],93:[2,49],102:[2,49],104:[2,49],105:[2,49],106:[2,49],110:[2,49],118:[2,49],126:[2,49],128:[2,49],129:[2,49],132:[2,49],133:[2,49],134:[2,49],135:[2,49],136:[2,49],137:[2,49]},{4:204,5:3,7:4,8:5,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,26:[1,203],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,186],6:[2,186],25:[2,186],26:[2,186],49:[2,186],54:[2,186],57:[2,186],73:[2,186],78:[2,186],86:[2,186],91:[2,186],93:[2,186],102:[2,186],103:82,104:[2,186],105:[2,186],106:[2,186],109:83,110:[2,186],111:67,118:[2,186],126:[2,186],128:[2,186],129:[2,186],132:[1,73],133:[2,186],134:[2,186],135:[2,186],136:[2,186],137:[2,186]},{103:85,104:[1,63],106:[1,64],109:86,110:[1,66],111:67,126:[1,84]},{1:[2,187],6:[2,187],25:[2,187],26:[2,187],49:[2,187],54:[2,187],57:[2,187],73:[2,187],78:[2,187],86:[2,187],91:[2,187],93:[2,187],102:[2,187],103:82,104:[2,187],105:[2,187],106:[2,187],109:83,110:[2,187],111:67,118:[2,187],126:[2,187],128:[2,187],129:[2,187],132:[1,73],133:[2,187],134:[2,187],135:[2,187],136:[2,187],137:[2,187]},{1:[2,188],6:[2,188],25:[2,188],26:[2,188],49:[2,188],54:[2,188],57:[2,188],73:[2,188],78:[2,188],86:[2,188],91:[2,188],93:[2,188],102:[2,188],103:82,104:[2,188],105:[2,188],106:[2,188],109:83,110:[2,188],111:67,118:[2,188],126:[2,188],128:[2,188],129:[2,188],132:[1,73],133:[2,188],134:[2,188],135:[2,188],136:[2,188],137:[2,188]},{1:[2,189],6:[2,189],25:[2,189],26:[2,189],49:[2,189],54:[2,189],57:[2,189],66:[2,71],67:[2,71],68:[2,71],69:[2,71],71:[2,71],73:[2,189],74:[2,71],78:[2,189],84:[2,71],85:[2,71],86:[2,189],91:[2,189],93:[2,189],102:[2,189],104:[2,189],105:[2,189],106:[2,189],110:[2,189],118:[2,189],126:[2,189],128:[2,189],129:[2,189],132:[2,189],133:[2,189],134:[2,189],135:[2,189],136:[2,189],137:[2,189]},{62:88,66:[1,90],67:[1,91],68:[1,92],69:[1,93],70:94,71:[1,95],74:[1,96],81:87,84:[1,89],85:[2,107]},{62:98,66:[1,90],67:[1,91],68:[1,92],69:[1,93],70:94,71:[1,95],74:[1,96],81:97,84:[1,89],85:[2,107]},{66:[2,74],67:[2,74],68:[2,74],69:[2,74],71:[2,74],74:[2,74],84:[2,74],85:[2,74]},{1:[2,190],6:[2,190],25:[2,190],26:[2,190],49:[2,190],54:[2,190],57:[2,190],66:[2,71],67:[2,71],68:[2,71],69:[2,71],71:[2,71],73:[2,190],74:[2,71],78:[2,190],84:[2,71],85:[2,71],86:[2,190],91:[2,190],93:[2,190],102:[2,190],104:[2,190],105:[2,190],106:[2,190],110:[2,190],118:[2,190],126:[2,190],128:[2,190],129:[2,190],132:[2,190],133:[2,190],134:[2,190],135:[2,190],136:[2,190],137:[2,190]},{1:[2,191],6:[2,191],25:[2,191],26:[2,191],49:[2,191],54:[2,191],57:[2,191],73:[2,191],78:[2,191],86:[2,191],91:[2,191],93:[2,191],102:[2,191],104:[2,191],105:[2,191],106:[2,191],110:[2,191],118:[2,191],126:[2,191],128:[2,191],129:[2,191],132:[2,191],133:[2,191],134:[2,191],135:[2,191],136:[2,191],137:[2,191]},{1:[2,192],6:[2,192],25:[2,192],26:[2,192],49:[2,192],54:[2,192],57:[2,192],73:[2,192],78:[2,192],86:[2,192],91:[2,192],93:[2,192],102:[2,192],104:[2,192],105:[2,192],106:[2,192],110:[2,192],118:[2,192],126:[2,192],128:[2,192],129:[2,192],132:[2,192],133:[2,192],134:[2,192],135:[2,192],136:[2,192],137:[2,192]},{6:[1,207],7:205,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,206],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:208,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{24:209,25:[1,112],125:[1,210]},{1:[2,132],6:[2,132],25:[2,132],26:[2,132],49:[2,132],54:[2,132],57:[2,132],73:[2,132],78:[2,132],86:[2,132],91:[2,132],93:[2,132],97:211,98:[1,212],99:[1,213],102:[2,132],104:[2,132],105:[2,132],106:[2,132],110:[2,132],118:[2,132],126:[2,132],128:[2,132],129:[2,132],132:[2,132],133:[2,132],134:[2,132],135:[2,132],136:[2,132],137:[2,132]},{1:[2,146],6:[2,146],25:[2,146],26:[2,146],49:[2,146],54:[2,146],57:[2,146],73:[2,146],78:[2,146],86:[2,146],91:[2,146],93:[2,146],102:[2,146],104:[2,146],105:[2,146],106:[2,146],110:[2,146],118:[2,146],126:[2,146],128:[2,146],129:[2,146],132:[2,146],133:[2,146],134:[2,146],135:[2,146],136:[2,146],137:[2,146]},{1:[2,154],6:[2,154],25:[2,154],26:[2,154],49:[2,154],54:[2,154],57:[2,154],73:[2,154],78:[2,154],86:[2,154],91:[2,154],93:[2,154],102:[2,154],104:[2,154],105:[2,154],106:[2,154],110:[2,154],118:[2,154],126:[2,154],128:[2,154],129:[2,154],132:[2,154],133:[2,154],134:[2,154],135:[2,154],136:[2,154],137:[2,154]},{25:[1,214],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{120:215,122:216,123:[1,217]},{1:[2,96],6:[2,96],25:[2,96],26:[2,96],49:[2,96],54:[2,96],57:[2,96],73:[2,96],78:[2,96],86:[2,96],91:[2,96],93:[2,96],102:[2,96],104:[2,96],105:[2,96],106:[2,96],110:[2,96],118:[2,96],126:[2,96],128:[2,96],129:[2,96],132:[2,96],133:[2,96],134:[2,96],135:[2,96],136:[2,96],137:[2,96]},{7:218,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,99],6:[2,99],24:219,25:[1,112],26:[2,99],49:[2,99],54:[2,99],57:[2,99],66:[2,71],67:[2,71],68:[2,71],69:[2,71],71:[2,71],73:[2,99],74:[2,71],78:[2,99],80:[1,220],84:[2,71],85:[2,71],86:[2,99],91:[2,99],93:[2,99],102:[2,99],104:[2,99],105:[2,99],106:[2,99],110:[2,99],118:[2,99],126:[2,99],128:[2,99],129:[2,99],132:[2,99],133:[2,99],134:[2,99],135:[2,99],136:[2,99],137:[2,99]},{1:[2,139],6:[2,139],25:[2,139],26:[2,139],49:[2,139],54:[2,139],57:[2,139],73:[2,139],78:[2,139],86:[2,139],91:[2,139],93:[2,139],102:[2,139],103:82,104:[2,139],105:[2,139],106:[2,139],109:83,110:[2,139],111:67,118:[2,139],126:[2,139],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,45],6:[2,45],26:[2,45],102:[2,45],103:82,104:[2,45],106:[2,45],109:83,110:[2,45],111:67,126:[2,45],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[1,72],102:[1,221]},{4:222,5:3,7:4,8:5,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,128],25:[2,128],54:[2,128],57:[1,224],91:[2,128],92:223,93:[1,188],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,114],6:[2,114],25:[2,114],26:[2,114],40:[2,114],49:[2,114],54:[2,114],57:[2,114],66:[2,114],67:[2,114],68:[2,114],69:[2,114],71:[2,114],73:[2,114],74:[2,114],78:[2,114],84:[2,114],85:[2,114],86:[2,114],91:[2,114],93:[2,114],102:[2,114],104:[2,114],105:[2,114],106:[2,114],110:[2,114],116:[2,114],117:[2,114],118:[2,114],126:[2,114],128:[2,114],129:[2,114],132:[2,114],133:[2,114],134:[2,114],135:[2,114],136:[2,114],137:[2,114]},{6:[2,52],25:[2,52],53:225,54:[1,226],91:[2,52]},{6:[2,123],25:[2,123],26:[2,123],54:[2,123],86:[2,123],91:[2,123]},{7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,143],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],87:227,88:[1,56],89:[1,57],90:[1,55],94:142,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,129],25:[2,129],26:[2,129],54:[2,129],86:[2,129],91:[2,129]},{1:[2,113],6:[2,113],25:[2,113],26:[2,113],40:[2,113],43:[2,113],49:[2,113],54:[2,113],57:[2,113],66:[2,113],67:[2,113],68:[2,113],69:[2,113],71:[2,113],73:[2,113],74:[2,113],78:[2,113],80:[2,113],84:[2,113],85:[2,113],86:[2,113],91:[2,113],93:[2,113],102:[2,113],104:[2,113],105:[2,113],106:[2,113],110:[2,113],116:[2,113],117:[2,113],118:[2,113],126:[2,113],128:[2,113],129:[2,113],130:[2,113],131:[2,113],132:[2,113],133:[2,113],134:[2,113],135:[2,113],136:[2,113],137:[2,113],138:[2,113]},{24:228,25:[1,112],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,142],6:[2,142],25:[2,142],26:[2,142],49:[2,142],54:[2,142],57:[2,142],73:[2,142],78:[2,142],86:[2,142],91:[2,142],93:[2,142],102:[2,142],103:82,104:[1,63],105:[1,229],106:[1,64],109:83,110:[1,66],111:67,118:[2,142],126:[2,142],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,144],6:[2,144],25:[2,144],26:[2,144],49:[2,144],54:[2,144],57:[2,144],73:[2,144],78:[2,144],86:[2,144],91:[2,144],93:[2,144],102:[2,144],103:82,104:[1,63],105:[1,230],106:[1,64],109:83,110:[1,66],111:67,118:[2,144],126:[2,144],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,150],6:[2,150],25:[2,150],26:[2,150],49:[2,150],54:[2,150],57:[2,150],73:[2,150],78:[2,150],86:[2,150],91:[2,150],93:[2,150],102:[2,150],104:[2,150],105:[2,150],106:[2,150],110:[2,150],118:[2,150],126:[2,150],128:[2,150],129:[2,150],132:[2,150],133:[2,150],134:[2,150],135:[2,150],136:[2,150],137:[2,150]},{1:[2,151],6:[2,151],25:[2,151],26:[2,151],49:[2,151],54:[2,151],57:[2,151],73:[2,151],78:[2,151],86:[2,151],91:[2,151],93:[2,151],102:[2,151],103:82,104:[1,63],105:[2,151],106:[1,64],109:83,110:[1,66],111:67,118:[2,151],126:[2,151],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,155],6:[2,155],25:[2,155],26:[2,155],49:[2,155],54:[2,155],57:[2,155],73:[2,155],78:[2,155],86:[2,155],91:[2,155],93:[2,155],102:[2,155],104:[2,155],105:[2,155],106:[2,155],110:[2,155],118:[2,155],126:[2,155],128:[2,155],129:[2,155],132:[2,155],133:[2,155],134:[2,155],135:[2,155],136:[2,155],137:[2,155]},{116:[2,157],117:[2,157]},{27:155,28:[1,71],44:156,58:157,59:158,76:[1,68],89:[1,109],90:[1,110],113:231,115:154},{54:[1,232],116:[2,163],117:[2,163]},{54:[2,159],116:[2,159],117:[2,159]},{54:[2,160],116:[2,160],117:[2,160]},{54:[2,161],116:[2,161],117:[2,161]},{54:[2,162],116:[2,162],117:[2,162]},{1:[2,156],6:[2,156],25:[2,156],26:[2,156],49:[2,156],54:[2,156],57:[2,156],73:[2,156],78:[2,156],86:[2,156],91:[2,156],93:[2,156],102:[2,156],104:[2,156],105:[2,156],106:[2,156],110:[2,156],118:[2,156],126:[2,156],128:[2,156],129:[2,156],132:[2,156],133:[2,156],134:[2,156],135:[2,156],136:[2,156],137:[2,156]},{7:233,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:234,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,52],25:[2,52],53:235,54:[1,236],78:[2,52]},{6:[2,91],25:[2,91],26:[2,91],54:[2,91],78:[2,91]},{6:[2,38],25:[2,38],26:[2,38],43:[1,237],54:[2,38],78:[2,38]},{6:[2,41],25:[2,41],26:[2,41],54:[2,41],78:[2,41]},{6:[2,42],25:[2,42],26:[2,42],43:[2,42],54:[2,42],78:[2,42]},{6:[2,43],25:[2,43],26:[2,43],43:[2,43],54:[2,43],78:[2,43]},{6:[2,44],25:[2,44],26:[2,44],43:[2,44],54:[2,44],78:[2,44]},{1:[2,4],6:[2,4],26:[2,4],102:[2,4]},{1:[2,194],6:[2,194],25:[2,194],26:[2,194],49:[2,194],54:[2,194],57:[2,194],73:[2,194],78:[2,194],86:[2,194],91:[2,194],93:[2,194],102:[2,194],103:82,104:[2,194],105:[2,194],106:[2,194],109:83,110:[2,194],111:67,118:[2,194],126:[2,194],128:[2,194],129:[2,194],132:[1,73],133:[1,76],134:[2,194],135:[2,194],136:[2,194],137:[2,194]},{1:[2,195],6:[2,195],25:[2,195],26:[2,195],49:[2,195],54:[2,195],57:[2,195],73:[2,195],78:[2,195],86:[2,195],91:[2,195],93:[2,195],102:[2,195],103:82,104:[2,195],105:[2,195],106:[2,195],109:83,110:[2,195],111:67,118:[2,195],126:[2,195],128:[2,195],129:[2,195],132:[1,73],133:[1,76],134:[2,195],135:[2,195],136:[2,195],137:[2,195]},{1:[2,196],6:[2,196],25:[2,196],26:[2,196],49:[2,196],54:[2,196],57:[2,196],73:[2,196],78:[2,196],86:[2,196],91:[2,196],93:[2,196],102:[2,196],103:82,104:[2,196],105:[2,196],106:[2,196],109:83,110:[2,196],111:67,118:[2,196],126:[2,196],128:[2,196],129:[2,196],132:[1,73],133:[2,196],134:[2,196],135:[2,196],136:[2,196],137:[2,196]},{1:[2,197],6:[2,197],25:[2,197],26:[2,197],49:[2,197],54:[2,197],57:[2,197],73:[2,197],78:[2,197],86:[2,197],91:[2,197],93:[2,197],102:[2,197],103:82,104:[2,197],105:[2,197],106:[2,197],109:83,110:[2,197],111:67,118:[2,197],126:[2,197],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[2,197],135:[2,197],136:[2,197],137:[2,197]},{1:[2,198],6:[2,198],25:[2,198],26:[2,198],49:[2,198],54:[2,198],57:[2,198],73:[2,198],78:[2,198],86:[2,198],91:[2,198],93:[2,198],102:[2,198],103:82,104:[2,198],105:[2,198],106:[2,198],109:83,110:[2,198],111:67,118:[2,198],126:[2,198],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[2,198],136:[2,198],137:[1,80]},{1:[2,199],6:[2,199],25:[2,199],26:[2,199],49:[2,199],54:[2,199],57:[2,199],73:[2,199],78:[2,199],86:[2,199],91:[2,199],93:[2,199],102:[2,199],103:82,104:[2,199],105:[2,199],106:[2,199],109:83,110:[2,199],111:67,118:[2,199],126:[2,199],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[2,199],137:[1,80]},{1:[2,200],6:[2,200],25:[2,200],26:[2,200],49:[2,200],54:[2,200],57:[2,200],73:[2,200],78:[2,200],86:[2,200],91:[2,200],93:[2,200],102:[2,200],103:82,104:[2,200],105:[2,200],106:[2,200],109:83,110:[2,200],111:67,118:[2,200],126:[2,200],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[2,200],136:[2,200],137:[2,200]},{1:[2,185],6:[2,185],25:[2,185],26:[2,185],49:[2,185],54:[2,185],57:[2,185],73:[2,185],78:[2,185],86:[2,185],91:[2,185],93:[2,185],102:[2,185],103:82,104:[1,63],105:[2,185],106:[1,64],109:83,110:[1,66],111:67,118:[2,185],126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,184],6:[2,184],25:[2,184],26:[2,184],49:[2,184],54:[2,184],57:[2,184],73:[2,184],78:[2,184],86:[2,184],91:[2,184],93:[2,184],102:[2,184],103:82,104:[1,63],105:[2,184],106:[1,64],109:83,110:[1,66],111:67,118:[2,184],126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,103],6:[2,103],25:[2,103],26:[2,103],49:[2,103],54:[2,103],57:[2,103],66:[2,103],67:[2,103],68:[2,103],69:[2,103],71:[2,103],73:[2,103],74:[2,103],78:[2,103],84:[2,103],85:[2,103],86:[2,103],91:[2,103],93:[2,103],102:[2,103],104:[2,103],105:[2,103],106:[2,103],110:[2,103],118:[2,103],126:[2,103],128:[2,103],129:[2,103],132:[2,103],133:[2,103],134:[2,103],135:[2,103],136:[2,103],137:[2,103]},{1:[2,79],6:[2,79],25:[2,79],26:[2,79],40:[2,79],49:[2,79],54:[2,79],57:[2,79],66:[2,79],67:[2,79],68:[2,79],69:[2,79],71:[2,79],73:[2,79],74:[2,79],78:[2,79],80:[2,79],84:[2,79],85:[2,79],86:[2,79],91:[2,79],93:[2,79],102:[2,79],104:[2,79],105:[2,79],106:[2,79],110:[2,79],118:[2,79],126:[2,79],128:[2,79],129:[2,79],130:[2,79],131:[2,79],132:[2,79],133:[2,79],134:[2,79],135:[2,79],136:[2,79],137:[2,79],138:[2,79]},{1:[2,80],6:[2,80],25:[2,80],26:[2,80],40:[2,80],49:[2,80],54:[2,80],57:[2,80],66:[2,80],67:[2,80],68:[2,80],69:[2,80],71:[2,80],73:[2,80],74:[2,80],78:[2,80],80:[2,80],84:[2,80],85:[2,80],86:[2,80],91:[2,80],93:[2,80],102:[2,80],104:[2,80],105:[2,80],106:[2,80],110:[2,80],118:[2,80],126:[2,80],128:[2,80],129:[2,80],130:[2,80],131:[2,80],132:[2,80],133:[2,80],134:[2,80],135:[2,80],136:[2,80],137:[2,80],138:[2,80]},{1:[2,81],6:[2,81],25:[2,81],26:[2,81],40:[2,81],49:[2,81],54:[2,81],57:[2,81],66:[2,81],67:[2,81],68:[2,81],69:[2,81],71:[2,81],73:[2,81],74:[2,81],78:[2,81],80:[2,81],84:[2,81],85:[2,81],86:[2,81],91:[2,81],93:[2,81],102:[2,81],104:[2,81],105:[2,81],106:[2,81],110:[2,81],118:[2,81],126:[2,81],128:[2,81],129:[2,81],130:[2,81],131:[2,81],132:[2,81],133:[2,81],134:[2,81],135:[2,81],136:[2,81],137:[2,81],138:[2,81]},{1:[2,82],6:[2,82],25:[2,82],26:[2,82],40:[2,82],49:[2,82],54:[2,82],57:[2,82],66:[2,82],67:[2,82],68:[2,82],69:[2,82],71:[2,82],73:[2,82],74:[2,82],78:[2,82],80:[2,82],84:[2,82],85:[2,82],86:[2,82],91:[2,82],93:[2,82],102:[2,82],104:[2,82],105:[2,82],106:[2,82],110:[2,82],118:[2,82],126:[2,82],128:[2,82],129:[2,82],130:[2,82],131:[2,82],132:[2,82],133:[2,82],134:[2,82],135:[2,82],136:[2,82],137:[2,82],138:[2,82]},{73:[1,238]},{57:[1,189],73:[2,87],92:239,93:[1,188],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{73:[2,88]},{7:240,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,73:[2,122],76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{11:[2,116],28:[2,116],30:[2,116],31:[2,116],33:[2,116],34:[2,116],35:[2,116],36:[2,116],37:[2,116],38:[2,116],45:[2,116],46:[2,116],47:[2,116],51:[2,116],52:[2,116],73:[2,116],76:[2,116],79:[2,116],83:[2,116],88:[2,116],89:[2,116],90:[2,116],96:[2,116],100:[2,116],101:[2,116],104:[2,116],106:[2,116],108:[2,116],110:[2,116],119:[2,116],125:[2,116],127:[2,116],128:[2,116],129:[2,116],130:[2,116],131:[2,116]},{11:[2,117],28:[2,117],30:[2,117],31:[2,117],33:[2,117],34:[2,117],35:[2,117],36:[2,117],37:[2,117],38:[2,117],45:[2,117],46:[2,117],47:[2,117],51:[2,117],52:[2,117],73:[2,117],76:[2,117],79:[2,117],83:[2,117],88:[2,117],89:[2,117],90:[2,117],96:[2,117],100:[2,117],101:[2,117],104:[2,117],106:[2,117],108:[2,117],110:[2,117],119:[2,117],125:[2,117],127:[2,117],128:[2,117],129:[2,117],130:[2,117],131:[2,117]},{1:[2,86],6:[2,86],25:[2,86],26:[2,86],40:[2,86],49:[2,86],54:[2,86],57:[2,86],66:[2,86],67:[2,86],68:[2,86],69:[2,86],71:[2,86],73:[2,86],74:[2,86],78:[2,86],80:[2,86],84:[2,86],85:[2,86],86:[2,86],91:[2,86],93:[2,86],102:[2,86],104:[2,86],105:[2,86],106:[2,86],110:[2,86],118:[2,86],126:[2,86],128:[2,86],129:[2,86],130:[2,86],131:[2,86],132:[2,86],133:[2,86],134:[2,86],135:[2,86],136:[2,86],137:[2,86],138:[2,86]},{1:[2,104],6:[2,104],25:[2,104],26:[2,104],49:[2,104],54:[2,104],57:[2,104],66:[2,104],67:[2,104],68:[2,104],69:[2,104],71:[2,104],73:[2,104],74:[2,104],78:[2,104],84:[2,104],85:[2,104],86:[2,104],91:[2,104],93:[2,104],102:[2,104],104:[2,104],105:[2,104],106:[2,104],110:[2,104],118:[2,104],126:[2,104],128:[2,104],129:[2,104],132:[2,104],133:[2,104],134:[2,104],135:[2,104],136:[2,104],137:[2,104]},{1:[2,35],6:[2,35],25:[2,35],26:[2,35],49:[2,35],54:[2,35],57:[2,35],73:[2,35],78:[2,35],86:[2,35],91:[2,35],93:[2,35],102:[2,35],103:82,104:[2,35],105:[2,35],106:[2,35],109:83,110:[2,35],111:67,118:[2,35],126:[2,35],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{7:241,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:242,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,109],6:[2,109],25:[2,109],26:[2,109],49:[2,109],54:[2,109],57:[2,109],66:[2,109],67:[2,109],68:[2,109],69:[2,109],71:[2,109],73:[2,109],74:[2,109],78:[2,109],84:[2,109],85:[2,109],86:[2,109],91:[2,109],93:[2,109],102:[2,109],104:[2,109],105:[2,109],106:[2,109],110:[2,109],118:[2,109],126:[2,109],128:[2,109],129:[2,109],132:[2,109],133:[2,109],134:[2,109],135:[2,109],136:[2,109],137:[2,109]},{6:[2,52],25:[2,52],53:243,54:[1,226],86:[2,52]},{6:[2,128],25:[2,128],26:[2,128],54:[2,128],57:[1,244],86:[2,128],91:[2,128],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{50:245,51:[1,58],52:[1,59]},{6:[2,53],25:[2,53],26:[2,53],27:105,28:[1,71],44:106,55:246,56:104,58:107,59:108,76:[1,68],89:[1,109],90:[1,110]},{6:[1,247],25:[1,248]},{6:[2,60],25:[2,60],26:[2,60],49:[2,60],54:[2,60]},{7:249,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,23],6:[2,23],25:[2,23],26:[2,23],49:[2,23],54:[2,23],57:[2,23],73:[2,23],78:[2,23],86:[2,23],91:[2,23],93:[2,23],98:[2,23],99:[2,23],102:[2,23],104:[2,23],105:[2,23],106:[2,23],110:[2,23],118:[2,23],121:[2,23],123:[2,23],126:[2,23],128:[2,23],129:[2,23],132:[2,23],133:[2,23],134:[2,23],135:[2,23],136:[2,23],137:[2,23]},{6:[1,72],26:[1,250]},{1:[2,201],6:[2,201],25:[2,201],26:[2,201],49:[2,201],54:[2,201],57:[2,201],73:[2,201],78:[2,201],86:[2,201],91:[2,201],93:[2,201],102:[2,201],103:82,104:[2,201],105:[2,201],106:[2,201],109:83,110:[2,201],111:67,118:[2,201],126:[2,201],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{7:251,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:252,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,204],6:[2,204],25:[2,204],26:[2,204],49:[2,204],54:[2,204],57:[2,204],73:[2,204],78:[2,204],86:[2,204],91:[2,204],93:[2,204],102:[2,204],103:82,104:[2,204],105:[2,204],106:[2,204],109:83,110:[2,204],111:67,118:[2,204],126:[2,204],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,183],6:[2,183],25:[2,183],26:[2,183],49:[2,183],54:[2,183],57:[2,183],73:[2,183],78:[2,183],86:[2,183],91:[2,183],93:[2,183],102:[2,183],104:[2,183],105:[2,183],106:[2,183],110:[2,183],118:[2,183],126:[2,183],128:[2,183],129:[2,183],132:[2,183],133:[2,183],134:[2,183],135:[2,183],136:[2,183],137:[2,183]},{7:253,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,133],6:[2,133],25:[2,133],26:[2,133],49:[2,133],54:[2,133],57:[2,133],73:[2,133],78:[2,133],86:[2,133],91:[2,133],93:[2,133],98:[1,254],102:[2,133],104:[2,133],105:[2,133],106:[2,133],110:[2,133],118:[2,133],126:[2,133],128:[2,133],129:[2,133],132:[2,133],133:[2,133],134:[2,133],135:[2,133],136:[2,133],137:[2,133]},{24:255,25:[1,112]},{24:258,25:[1,112],27:256,28:[1,71],59:257,76:[1,68]},{120:259,122:216,123:[1,217]},{26:[1,260],121:[1,261],122:262,123:[1,217]},{26:[2,176],121:[2,176],123:[2,176]},{7:264,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],95:263,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,97],6:[2,97],24:265,25:[1,112],26:[2,97],49:[2,97],54:[2,97],57:[2,97],73:[2,97],78:[2,97],86:[2,97],91:[2,97],93:[2,97],102:[2,97],103:82,104:[1,63],105:[2,97],106:[1,64],109:83,110:[1,66],111:67,118:[2,97],126:[2,97],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,100],6:[2,100],25:[2,100],26:[2,100],49:[2,100],54:[2,100],57:[2,100],73:[2,100],78:[2,100],86:[2,100],91:[2,100],93:[2,100],102:[2,100],104:[2,100],105:[2,100],106:[2,100],110:[2,100],118:[2,100],126:[2,100],128:[2,100],129:[2,100],132:[2,100],133:[2,100],134:[2,100],135:[2,100],136:[2,100],137:[2,100]},{7:266,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,140],6:[2,140],25:[2,140],26:[2,140],49:[2,140],54:[2,140],57:[2,140],66:[2,140],67:[2,140],68:[2,140],69:[2,140],71:[2,140],73:[2,140],74:[2,140],78:[2,140],84:[2,140],85:[2,140],86:[2,140],91:[2,140],93:[2,140],102:[2,140],104:[2,140],105:[2,140],106:[2,140],110:[2,140],118:[2,140],126:[2,140],128:[2,140],129:[2,140],132:[2,140],133:[2,140],134:[2,140],135:[2,140],136:[2,140],137:[2,140]},{6:[1,72],26:[1,267]},{7:268,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,66],11:[2,117],25:[2,66],28:[2,117],30:[2,117],31:[2,117],33:[2,117],34:[2,117],35:[2,117],36:[2,117],37:[2,117],38:[2,117],45:[2,117],46:[2,117],47:[2,117],51:[2,117],52:[2,117],54:[2,66],76:[2,117],79:[2,117],83:[2,117],88:[2,117],89:[2,117],90:[2,117],91:[2,66],96:[2,117],100:[2,117],101:[2,117],104:[2,117],106:[2,117],108:[2,117],110:[2,117],119:[2,117],125:[2,117],127:[2,117],128:[2,117],129:[2,117],130:[2,117],131:[2,117]},{6:[1,270],25:[1,271],91:[1,269]},{6:[2,53],7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[2,53],26:[2,53],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],86:[2,53],88:[1,56],89:[1,57],90:[1,55],91:[2,53],94:272,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,52],25:[2,52],26:[2,52],53:273,54:[1,226]},{1:[2,180],6:[2,180],25:[2,180],26:[2,180],49:[2,180],54:[2,180],57:[2,180],73:[2,180],78:[2,180],86:[2,180],91:[2,180],93:[2,180],102:[2,180],104:[2,180],105:[2,180],106:[2,180],110:[2,180],118:[2,180],121:[2,180],126:[2,180],128:[2,180],129:[2,180],132:[2,180],133:[2,180],134:[2,180],135:[2,180],136:[2,180],137:[2,180]},{7:274,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:275,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{116:[2,158],117:[2,158]},{27:155,28:[1,71],44:156,58:157,59:158,76:[1,68],89:[1,109],90:[1,110],115:276},{1:[2,165],6:[2,165],25:[2,165],26:[2,165],49:[2,165],54:[2,165],57:[2,165],73:[2,165],78:[2,165],86:[2,165],91:[2,165],93:[2,165],102:[2,165],103:82,104:[2,165],105:[1,277],106:[2,165],109:83,110:[2,165],111:67,118:[1,278],126:[2,165],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,166],6:[2,166],25:[2,166],26:[2,166],49:[2,166],54:[2,166],57:[2,166],73:[2,166],78:[2,166],86:[2,166],91:[2,166],93:[2,166],102:[2,166],103:82,104:[2,166],105:[1,279],106:[2,166],109:83,110:[2,166],111:67,118:[2,166],126:[2,166],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[1,281],25:[1,282],78:[1,280]},{6:[2,53],10:165,25:[2,53],26:[2,53],27:166,28:[1,71],29:167,30:[1,69],31:[1,70],41:283,42:164,44:168,46:[1,44],78:[2,53],89:[1,109]},{7:284,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,285],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,85],6:[2,85],25:[2,85],26:[2,85],40:[2,85],49:[2,85],54:[2,85],57:[2,85],66:[2,85],67:[2,85],68:[2,85],69:[2,85],71:[2,85],73:[2,85],74:[2,85],78:[2,85],80:[2,85],84:[2,85],85:[2,85],86:[2,85],91:[2,85],93:[2,85],102:[2,85],104:[2,85],105:[2,85],106:[2,85],110:[2,85],118:[2,85],126:[2,85],128:[2,85],129:[2,85],130:[2,85],131:[2,85],132:[2,85],133:[2,85],134:[2,85],135:[2,85],136:[2,85],137:[2,85],138:[2,85]},{7:286,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,73:[2,120],76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{73:[2,121],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,36],6:[2,36],25:[2,36],26:[2,36],49:[2,36],54:[2,36],57:[2,36],73:[2,36],78:[2,36],86:[2,36],91:[2,36],93:[2,36],102:[2,36],103:82,104:[2,36],105:[2,36],106:[2,36],109:83,110:[2,36],111:67,118:[2,36],126:[2,36],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{26:[1,287],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[1,270],25:[1,271],86:[1,288]},{6:[2,66],25:[2,66],26:[2,66],54:[2,66],86:[2,66],91:[2,66]},{24:289,25:[1,112]},{6:[2,56],25:[2,56],26:[2,56],49:[2,56],54:[2,56]},{27:105,28:[1,71],44:106,55:290,56:104,58:107,59:108,76:[1,68],89:[1,109],90:[1,110]},{6:[2,54],25:[2,54],26:[2,54],27:105,28:[1,71],44:106,48:291,54:[2,54],55:103,56:104,58:107,59:108,76:[1,68],89:[1,109],90:[1,110]},{6:[2,61],25:[2,61],26:[2,61],49:[2,61],54:[2,61],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,24],6:[2,24],25:[2,24],26:[2,24],49:[2,24],54:[2,24],57:[2,24],73:[2,24],78:[2,24],86:[2,24],91:[2,24],93:[2,24],98:[2,24],99:[2,24],102:[2,24],104:[2,24],105:[2,24],106:[2,24],110:[2,24],118:[2,24],121:[2,24],123:[2,24],126:[2,24],128:[2,24],129:[2,24],132:[2,24],133:[2,24],134:[2,24],135:[2,24],136:[2,24],137:[2,24]},{26:[1,292],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,203],6:[2,203],25:[2,203],26:[2,203],49:[2,203],54:[2,203],57:[2,203],73:[2,203],78:[2,203],86:[2,203],91:[2,203],93:[2,203],102:[2,203],103:82,104:[2,203],105:[2,203],106:[2,203],109:83,110:[2,203],111:67,118:[2,203],126:[2,203],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{24:293,25:[1,112],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{24:294,25:[1,112]},{1:[2,134],6:[2,134],25:[2,134],26:[2,134],49:[2,134],54:[2,134],57:[2,134],73:[2,134],78:[2,134],86:[2,134],91:[2,134],93:[2,134],102:[2,134],104:[2,134],105:[2,134],106:[2,134],110:[2,134],118:[2,134],126:[2,134],128:[2,134],129:[2,134],132:[2,134],133:[2,134],134:[2,134],135:[2,134],136:[2,134],137:[2,134]},{24:295,25:[1,112]},{24:296,25:[1,112]},{1:[2,138],6:[2,138],25:[2,138],26:[2,138],49:[2,138],54:[2,138],57:[2,138],73:[2,138],78:[2,138],86:[2,138],91:[2,138],93:[2,138],98:[2,138],102:[2,138],104:[2,138],105:[2,138],106:[2,138],110:[2,138],118:[2,138],126:[2,138],128:[2,138],129:[2,138],132:[2,138],133:[2,138],134:[2,138],135:[2,138],136:[2,138],137:[2,138]},{26:[1,297],121:[1,298],122:262,123:[1,217]},{1:[2,174],6:[2,174],25:[2,174],26:[2,174],49:[2,174],54:[2,174],57:[2,174],73:[2,174],78:[2,174],86:[2,174],91:[2,174],93:[2,174],102:[2,174],104:[2,174],105:[2,174],106:[2,174],110:[2,174],118:[2,174],126:[2,174],128:[2,174],129:[2,174],132:[2,174],133:[2,174],134:[2,174],135:[2,174],136:[2,174],137:[2,174]},{24:299,25:[1,112]},{26:[2,177],121:[2,177],123:[2,177]},{24:300,25:[1,112],54:[1,301]},{25:[2,130],54:[2,130],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,98],6:[2,98],25:[2,98],26:[2,98],49:[2,98],54:[2,98],57:[2,98],73:[2,98],78:[2,98],86:[2,98],91:[2,98],93:[2,98],102:[2,98],104:[2,98],105:[2,98],106:[2,98],110:[2,98],118:[2,98],126:[2,98],128:[2,98],129:[2,98],132:[2,98],133:[2,98],134:[2,98],135:[2,98],136:[2,98],137:[2,98]},{1:[2,101],6:[2,101],24:302,25:[1,112],26:[2,101],49:[2,101],54:[2,101],57:[2,101],73:[2,101],78:[2,101],86:[2,101],91:[2,101],93:[2,101],102:[2,101],103:82,104:[1,63],105:[2,101],106:[1,64],109:83,110:[1,66],111:67,118:[2,101],126:[2,101],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{102:[1,303]},{91:[1,304],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,115],6:[2,115],25:[2,115],26:[2,115],40:[2,115],49:[2,115],54:[2,115],57:[2,115],66:[2,115],67:[2,115],68:[2,115],69:[2,115],71:[2,115],73:[2,115],74:[2,115],78:[2,115],84:[2,115],85:[2,115],86:[2,115],91:[2,115],93:[2,115],102:[2,115],104:[2,115],105:[2,115],106:[2,115],110:[2,115],116:[2,115],117:[2,115],118:[2,115],126:[2,115],128:[2,115],129:[2,115],132:[2,115],133:[2,115],134:[2,115],135:[2,115],136:[2,115],137:[2,115]},{7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],94:305,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,143],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],87:306,88:[1,56],89:[1,57],90:[1,55],94:142,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,124],25:[2,124],26:[2,124],54:[2,124],86:[2,124],91:[2,124]},{6:[1,270],25:[1,271],26:[1,307]},{1:[2,143],6:[2,143],25:[2,143],26:[2,143],49:[2,143],54:[2,143],57:[2,143],73:[2,143],78:[2,143],86:[2,143],91:[2,143],93:[2,143],102:[2,143],103:82,104:[1,63],105:[2,143],106:[1,64],109:83,110:[1,66],111:67,118:[2,143],126:[2,143],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,145],6:[2,145],25:[2,145],26:[2,145],49:[2,145],54:[2,145],57:[2,145],73:[2,145],78:[2,145],86:[2,145],91:[2,145],93:[2,145],102:[2,145],103:82,104:[1,63],105:[2,145],106:[1,64],109:83,110:[1,66],111:67,118:[2,145],126:[2,145],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{116:[2,164],117:[2,164]},{7:308,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:309,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:310,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,89],6:[2,89],25:[2,89],26:[2,89],40:[2,89],49:[2,89],54:[2,89],57:[2,89],66:[2,89],67:[2,89],68:[2,89],69:[2,89],71:[2,89],73:[2,89],74:[2,89],78:[2,89],84:[2,89],85:[2,89],86:[2,89],91:[2,89],93:[2,89],102:[2,89],104:[2,89],105:[2,89],106:[2,89],110:[2,89],116:[2,89],117:[2,89],118:[2,89],126:[2,89],128:[2,89],129:[2,89],132:[2,89],133:[2,89],134:[2,89],135:[2,89],136:[2,89],137:[2,89]},{10:165,27:166,28:[1,71],29:167,30:[1,69],31:[1,70],41:311,42:164,44:168,46:[1,44],89:[1,109]},{6:[2,90],10:165,25:[2,90],26:[2,90],27:166,28:[1,71],29:167,30:[1,69],31:[1,70],41:163,42:164,44:168,46:[1,44],54:[2,90],77:312,89:[1,109]},{6:[2,92],25:[2,92],26:[2,92],54:[2,92],78:[2,92]},{6:[2,39],25:[2,39],26:[2,39],54:[2,39],78:[2,39],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{7:313,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{73:[2,119],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,37],6:[2,37],25:[2,37],26:[2,37],49:[2,37],54:[2,37],57:[2,37],73:[2,37],78:[2,37],86:[2,37],91:[2,37],93:[2,37],102:[2,37],104:[2,37],105:[2,37],106:[2,37],110:[2,37],118:[2,37],126:[2,37],128:[2,37],129:[2,37],132:[2,37],133:[2,37],134:[2,37],135:[2,37],136:[2,37],137:[2,37]},{1:[2,110],6:[2,110],25:[2,110],26:[2,110],49:[2,110],54:[2,110],57:[2,110],66:[2,110],67:[2,110],68:[2,110],69:[2,110],71:[2,110],73:[2,110],74:[2,110],78:[2,110],84:[2,110],85:[2,110],86:[2,110],91:[2,110],93:[2,110],102:[2,110],104:[2,110],105:[2,110],106:[2,110],110:[2,110],118:[2,110],126:[2,110],128:[2,110],129:[2,110],132:[2,110],133:[2,110],134:[2,110],135:[2,110],136:[2,110],137:[2,110]},{1:[2,48],6:[2,48],25:[2,48],26:[2,48],49:[2,48],54:[2,48],57:[2,48],73:[2,48],78:[2,48],86:[2,48],91:[2,48],93:[2,48],102:[2,48],104:[2,48],105:[2,48],106:[2,48],110:[2,48],118:[2,48],126:[2,48],128:[2,48],129:[2,48],132:[2,48],133:[2,48],134:[2,48],135:[2,48],136:[2,48],137:[2,48]},{6:[2,57],25:[2,57],26:[2,57],49:[2,57],54:[2,57]},{6:[2,52],25:[2,52],26:[2,52],53:314,54:[1,199]},{1:[2,202],6:[2,202],25:[2,202],26:[2,202],49:[2,202],54:[2,202],57:[2,202],73:[2,202],78:[2,202],86:[2,202],91:[2,202],93:[2,202],102:[2,202],104:[2,202],105:[2,202],106:[2,202],110:[2,202],118:[2,202],126:[2,202],128:[2,202],129:[2,202],132:[2,202],133:[2,202],134:[2,202],135:[2,202],136:[2,202],137:[2,202]},{1:[2,181],6:[2,181],25:[2,181],26:[2,181],49:[2,181],54:[2,181],57:[2,181],73:[2,181],78:[2,181],86:[2,181],91:[2,181],93:[2,181],102:[2,181],104:[2,181],105:[2,181],106:[2,181],110:[2,181],118:[2,181],121:[2,181],126:[2,181],128:[2,181],129:[2,181],132:[2,181],133:[2,181],134:[2,181],135:[2,181],136:[2,181],137:[2,181]},{1:[2,135],6:[2,135],25:[2,135],26:[2,135],49:[2,135],54:[2,135],57:[2,135],73:[2,135],78:[2,135],86:[2,135],91:[2,135],93:[2,135],102:[2,135],104:[2,135],105:[2,135],106:[2,135],110:[2,135],118:[2,135],126:[2,135],128:[2,135],129:[2,135],132:[2,135],133:[2,135],134:[2,135],135:[2,135],136:[2,135],137:[2,135]},{1:[2,136],6:[2,136],25:[2,136],26:[2,136],49:[2,136],54:[2,136],57:[2,136],73:[2,136],78:[2,136],86:[2,136],91:[2,136],93:[2,136],98:[2,136],102:[2,136],104:[2,136],105:[2,136],106:[2,136],110:[2,136],118:[2,136],126:[2,136],128:[2,136],129:[2,136],132:[2,136],133:[2,136],134:[2,136],135:[2,136],136:[2,136],137:[2,136]},{1:[2,137],6:[2,137],25:[2,137],26:[2,137],49:[2,137],54:[2,137],57:[2,137],73:[2,137],78:[2,137],86:[2,137],91:[2,137],93:[2,137],98:[2,137],102:[2,137],104:[2,137],105:[2,137],106:[2,137],110:[2,137],118:[2,137],126:[2,137],128:[2,137],129:[2,137],132:[2,137],133:[2,137],134:[2,137],135:[2,137],136:[2,137],137:[2,137]},{1:[2,172],6:[2,172],25:[2,172],26:[2,172],49:[2,172],54:[2,172],57:[2,172],73:[2,172],78:[2,172],86:[2,172],91:[2,172],93:[2,172],102:[2,172],104:[2,172],105:[2,172],106:[2,172],110:[2,172],118:[2,172],126:[2,172],128:[2,172],129:[2,172],132:[2,172],133:[2,172],134:[2,172],135:[2,172],136:[2,172],137:[2,172]},{24:315,25:[1,112]},{26:[1,316]},{6:[1,317],26:[2,178],121:[2,178],123:[2,178]},{7:318,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,102],6:[2,102],25:[2,102],26:[2,102],49:[2,102],54:[2,102],57:[2,102],73:[2,102],78:[2,102],86:[2,102],91:[2,102],93:[2,102],102:[2,102],104:[2,102],105:[2,102],106:[2,102],110:[2,102],118:[2,102],126:[2,102],128:[2,102],129:[2,102],132:[2,102],133:[2,102],134:[2,102],135:[2,102],136:[2,102],137:[2,102]},{1:[2,141],6:[2,141],25:[2,141],26:[2,141],49:[2,141],54:[2,141],57:[2,141],66:[2,141],67:[2,141],68:[2,141],69:[2,141],71:[2,141],73:[2,141],74:[2,141],78:[2,141],84:[2,141],85:[2,141],86:[2,141],91:[2,141],93:[2,141],102:[2,141],104:[2,141],105:[2,141],106:[2,141],110:[2,141],118:[2,141],126:[2,141],128:[2,141],129:[2,141],132:[2,141],133:[2,141],134:[2,141],135:[2,141],136:[2,141],137:[2,141]},{1:[2,118],6:[2,118],25:[2,118],26:[2,118],49:[2,118],54:[2,118],57:[2,118],66:[2,118],67:[2,118],68:[2,118],69:[2,118],71:[2,118],73:[2,118],74:[2,118],78:[2,118],84:[2,118],85:[2,118],86:[2,118],91:[2,118],93:[2,118],102:[2,118],104:[2,118],105:[2,118],106:[2,118],110:[2,118],118:[2,118],126:[2,118],128:[2,118],129:[2,118],132:[2,118],133:[2,118],134:[2,118],135:[2,118],136:[2,118],137:[2,118]},{6:[2,125],25:[2,125],26:[2,125],54:[2,125],86:[2,125],91:[2,125]},{6:[2,52],25:[2,52],26:[2,52],53:319,54:[1,226]},{6:[2,126],25:[2,126],26:[2,126],54:[2,126],86:[2,126],91:[2,126]},{1:[2,167],6:[2,167],25:[2,167],26:[2,167],49:[2,167],54:[2,167],57:[2,167],73:[2,167],78:[2,167],86:[2,167],91:[2,167],93:[2,167],102:[2,167],103:82,104:[2,167],105:[2,167],106:[2,167],109:83,110:[2,167],111:67,118:[1,320],126:[2,167],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,169],6:[2,169],25:[2,169],26:[2,169],49:[2,169],54:[2,169],57:[2,169],73:[2,169],78:[2,169],86:[2,169],91:[2,169],93:[2,169],102:[2,169],103:82,104:[2,169],105:[1,321],106:[2,169],109:83,110:[2,169],111:67,118:[2,169],126:[2,169],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,168],6:[2,168],25:[2,168],26:[2,168],49:[2,168],54:[2,168],57:[2,168],73:[2,168],78:[2,168],86:[2,168],91:[2,168],93:[2,168],102:[2,168],103:82,104:[2,168],105:[2,168],106:[2,168],109:83,110:[2,168],111:67,118:[2,168],126:[2,168],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[2,93],25:[2,93],26:[2,93],54:[2,93],78:[2,93]},{6:[2,52],25:[2,52],26:[2,52],53:322,54:[1,236]},{26:[1,323],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[1,247],25:[1,248],26:[1,324]},{26:[1,325]},{1:[2,175],6:[2,175],25:[2,175],26:[2,175],49:[2,175],54:[2,175],57:[2,175],73:[2,175],78:[2,175],86:[2,175],91:[2,175],93:[2,175],102:[2,175],104:[2,175],105:[2,175],106:[2,175],110:[2,175],118:[2,175],126:[2,175],128:[2,175],129:[2,175],132:[2,175],133:[2,175],134:[2,175],135:[2,175],136:[2,175],137:[2,175]},{26:[2,179],121:[2,179],123:[2,179]},{25:[2,131],54:[2,131],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[1,270],25:[1,271],26:[1,326]},{7:327,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:328,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[1,281],25:[1,282],26:[1,329]},{6:[2,40],25:[2,40],26:[2,40],54:[2,40],78:[2,40]},{6:[2,58],25:[2,58],26:[2,58],49:[2,58],54:[2,58]},{1:[2,173],6:[2,173],25:[2,173],26:[2,173],49:[2,173],54:[2,173],57:[2,173],73:[2,173],78:[2,173],86:[2,173],91:[2,173],93:[2,173],102:[2,173],104:[2,173],105:[2,173],106:[2,173],110:[2,173],118:[2,173],126:[2,173],128:[2,173],129:[2,173],132:[2,173],133:[2,173],134:[2,173],135:[2,173],136:[2,173],137:[2,173]},{6:[2,127],25:[2,127],26:[2,127],54:[2,127],86:[2,127],91:[2,127]},{1:[2,170],6:[2,170],25:[2,170],26:[2,170],49:[2,170],54:[2,170],57:[2,170],73:[2,170],78:[2,170],86:[2,170],91:[2,170],93:[2,170],102:[2,170],103:82,104:[2,170],105:[2,170],106:[2,170],109:83,110:[2,170],111:67,118:[2,170],126:[2,170],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,171],6:[2,171],25:[2,171],26:[2,171],49:[2,171],54:[2,171],57:[2,171],73:[2,171],78:[2,171],86:[2,171],91:[2,171],93:[2,171],102:[2,171],103:82,104:[2,171],105:[2,171],106:[2,171],109:83,110:[2,171],111:67,118:[2,171],126:[2,171],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[2,94],25:[2,94],26:[2,94],54:[2,94],78:[2,94]}],defaultActions:{58:[2,50],59:[2,51],89:[2,108],186:[2,88]},parseError:function(e,t){if(!t.recoverable){var n=new Error(e);throw n.location=t.loc,n}this.trace(e)},parse:function(e){function t(e){i.length=i.length-2*e,s.length=s.length-e,o.length=o.length-e}function n(){var e;return e=r.lexer.lex()||p,typeof e!="number"&&(e=r.symbols_[e]||e),e}var r=this,i=[0],s=[null],o=[],u=this.table,a="",f=0,l=0,c=0,h=2,p=1;this.lexer.setInput(e),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc=="undefined"&&(this.lexer.yylloc={});var d=this.lexer.yylloc;o.push(d);var v=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"?this.parseError=this.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;var m,g,y,b,w,E,S={},x,T,N,C;for(;;){y=i[i.length-1];if(this.defaultActions[y])b=this.defaultActions[y];else{if(m===null||typeof m=="undefined")m=n();b=u[y]&&u[y][m]}if(typeof b=="undefined"||!b.length||!b[0]){var k="";C=[];for(x in u[y])this.terminals_[x]&&x>h&&C.push("'"+this.terminals_[x]+"'");this.lexer.showPosition?k="Expecting "+C.join(", ")+", got '"+(this.terminals_[m]||m)+"'":k="Unexpected "+(m==p?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.lexer.yylloc.first_line!==d.first_line&&(d=this.lexer.yylloc),this.parseError(k,{text:this.lexer.match,token:this.terminals_[m]||m,line:this.lexer.yylineno,loc:d,expected:C})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+y+", token: "+m);switch(b[0]){case 1:i.push(m),s.push(this.lexer.yytext),o.push(this.lexer.yylloc),i.push(b[1]),m=null,g?(m=g,g=null):(l=this.lexer.yyleng,a=this.lexer.yytext,f=this.lexer.yylineno,d=this.lexer.yylloc,c>0&&c--);break;case 2:T=this.productions_[b[1]][1],S.$=s[s.length-T],S._$={first_line:o[o.length-(T||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(T||1)].first_column,last_column:o[o.length-1].last_column},v&&(S._$.range=[o[o.length-(T||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.call(S,a,l,f,this.yy,b[1],s,o);if(typeof E!="undefined")return E;T&&(i=i.slice(0,-1*T*2),s=s.slice(0,-1*T),o=o.slice(0,-1*T)),i.push(this.productions_[b[1]][0]),s.push(S.$),o.push(S._$),N=u[i[i.length-2]][i[i.length-1]],i.push(N);break;case 3:return!0}}return!0}};undefined,r.prototype=i,i.Parser=r,n.exports=new r}),ace.define("ace/mode/coffee_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/coffee/coffee-script"],function(e,t,n){var r=e("../lib/oop"),i=e("../worker/mirror").Mirror,s=e("../mode/coffee/coffee-script");window.addEventListener=function(){};var o=t.Worker=function(e){i.call(this,e),this.setTimeout(250)};r.inherits(o,i),function(){this.onUpdate=function(){var e=this.doc.getValue();try{s.parse(e).compile()}catch(t){var n=t.location;n&&this.sender.emit("error",{row:n.first_line,column:n.first_column,endRow:n.last_line,endColumn:n.last_column,text:t.message,type:"error"});return}this.sender.emit("ok")}}.call(o.prototype)}),ace.define("ace/mode/coffee/nodes",["require","exports","module","ace/mode/coffee/scope","ace/mode/coffee/lexer","ace/mode/coffee/helpers"],function(e,t,n){var r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w,E,S,x,T,N,C,k,L,A,O,M,_,D,P,H,B,j,F,I,q,R,U,z,W,X,V,$,J,K,Q,G,Y,Z,et,tt,nt,rt,it,st,ot,ut,at,ft,lt,ct,ht,pt,dt,vt,mt,gt,yt,bt,wt,Et,St,xt={}.hasOwnProperty,Tt=function(e,t){function n(){this.constructor=e}for(var r in t)xt.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},Nt=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1},Ct=[].slice;Error.stackTraceLimit=Infinity,W=e("./scope").Scope,Et=e("./lexer"),I=Et.RESERVED,z=Et.STRICT_PROSCRIBED,St=e("./helpers"),rt=St.compact,ut=St.flatten,ot=St.extend,pt=St.merge,it=St.del,gt=St.starts,st=St.ends,ct=St.last,mt=St.some,nt=St.addLocationDataFn,ht=St.locationDataToString,yt=St.throwSyntaxError,t.extend=ot,t.addLocationDataFn=nt,tt=function(){return!0},D=function(){return!1},K=function(){return this},_=function(){return this.negated=!this.negated,this},t.CodeFragment=c=function(){function e(e,t){var n;this.code=""+t,this.locationData=e!=null?e.locationData:void 0,this.type=(e!=null?(n=e.constructor)!=null?n.name:void 0:void 0)||"unknown"}return e.prototype.toString=function(){return""+this.code+(this.locationData?": "+ht(this.locationData):"")},e}(),at=function(e){var t;return function(){var n,r,i;i=[];for(n=0,r=e.length;n<r;n++)t=e[n],i.push(t.code);return i}().join("")},t.Base=o=function(){function e(){}return e.prototype.compile=function(e,t){return at(this.compileToFragments(e,t))},e.prototype.compileToFragments=function(e,t){var n;return e=ot({},e),t&&(e.level=t),n=this.unfoldSoak(e)||this,n.tab=e.indent,e.level===A||!n.isStatement(e)?n.compileNode(e):n.compileClosure(e)},e.prototype.compileClosure=function(e){var t,n,i,s,o;(s=this.jumps())&&s.error("cannot use a pure statement in an expression"),e.sharedScope=!0,i=new l([],u.wrap([this])),t=[];if((n=this.contains(ft))||this.contains(lt))t=[new O("this")],n?(o="apply",t.push(new O("arguments"))):o="call",i=new Z(i,[new r(new O(o))]);return(new a(i,t)).compileNode(e)},e.prototype.cache=function(e,t,n){var r,i;return this.isComplex()?(r=new O(n||e.scope.freeVariable("ref")),i=new s(r,this),t?[i.compileToFragments(e,t),[this.makeCode(r.value)]]:[i,r]):(r=t?this.compileToFragments(e,t):this,[r,r])},e.prototype.cacheToCodeFragments=function(e){return[at(e[0]),at(e[1])]},e.prototype.makeReturn=function(e){var t;return t=this.unwrapAll(),e?new a(new O(""+e+".push"),[t]):new R(t)},e.prototype.contains=function(e){var t;return t=void 0,this.traverseChildren(!1,function(n){if(e(n))return t=n,!1}),t},e.prototype.lastNonComment=function(e){var t;t=e.length;while(t--)if(!(e[t]instanceof h))return e[t];return null},e.prototype.toString=function(e,t){var n;return e==null&&(e=""),t==null&&(t=this.constructor.name),n="\n"+e+t,this.soak&&(n+="?"),this.eachChild(function(t){return n+=t.toString(e+J)}),n},e.prototype.eachChild=function(e){var t,n,r,i,s,o,u,a;if(!this.children)return this;u=this.children;for(r=0,s=u.length;r<s;r++){t=u[r];if(this[t]){a=ut([this[t]]);for(i=0,o=a.length;i<o;i++){n=a[i];if(e(n)===!1)return this}}}return this},e.prototype.traverseChildren=function(e,t){return this.eachChild(function(n){var r;r=t(n);if(r!==!1)return n.traverseChildren(e,t)})},e.prototype.invert=function(){return new B("!",this)},e.prototype.unwrapAll=function(){var e;e=this;while(e!==(e=e.unwrap()))continue;return e},e.prototype.children=[],e.prototype.isStatement=D,e.prototype.jumps=D,e.prototype.isComplex=tt,e.prototype.isChainable=D,e.prototype.isAssignable=D,e.prototype.unwrap=K,e.prototype.unfoldSoak=D,e.prototype.assigns=D,e.prototype.updateLocationDataIfMissing=function(e){return this.locationData?this:(this.locationData=e,this.eachChild(function(t){return t.updateLocationDataIfMissing(e)}))},e.prototype.error=function(e){return yt(e,this.locationData)},e.prototype.makeCode=function(e){return new c(this,e)},e.prototype.wrapInBraces=function(e){return[].concat(this.makeCode("("),e,this.makeCode(")"))},e.prototype.joinFragmentArrays=function(e,t){var n,r,i,s,o;n=[];for(i=s=0,o=e.length;s<o;i=++s)r=e[i],i&&n.push(this.makeCode(t)),n=n.concat(r);return n},e}(),t.Block=u=function(e){function t(e){this.expressions=rt(ut(e||[]))}return Tt(t,e),t.prototype.children=["expressions"],t.prototype.push=function(e){return this.expressions.push(e),this},t.prototype.pop=function(){return this.expressions.pop()},t.prototype.unshift=function(e){return this.expressions.unshift(e),this},t.prototype.unwrap=function(){return this.expressions.length===1?this.expressions[0]:this},t.prototype.isEmpty=function(){return!this.expressions.length},t.prototype.isStatement=function(e){var t,n,r,i;i=this.expressions;for(n=0,r=i.length;n<r;n++){t=i[n];if(t.isStatement(e))return!0}return!1},t.prototype.jumps=function(e){var t,n,r,i,s;s=this.expressions;for(r=0,i=s.length;r<i;r++){t=s[r];if(n=t.jumps(e))return n}},t.prototype.makeReturn=function(e){var t,n;n=this.expressions.length;while(n--){t=this.expressions[n];if(!(t instanceof h)){this.expressions[n]=t.makeReturn(e),t instanceof R&&!t.expression&&this.expressions.splice(n,1);break}}return this},t.prototype.compileToFragments=function(e,n){return e==null&&(e={}),e.scope?t.__super__.compileToFragments.call(this,e,n):this.compileRoot(e)},t.prototype.compileNode=function(e){var n,r,i,s,o,u,a,f,l;this.tab=e.indent,u=e.level===A,r=[],l=this.expressions;for(s=a=0,f=l.length;a<f;s=++a)o=l[s],o=o.unwrapAll(),o=o.unfoldSoak(e)||o,o instanceof t?r.push(o.compileNode(e)):u?(o.front=!0,i=o.compileToFragments(e),o.isStatement(e)||(i.unshift(this.makeCode(""+this.tab)),i.push(this.makeCode(";"))),r.push(i)):r.push(o.compileToFragments(e,C));return u?this.spaced?[].concat(this.joinFragmentArrays(r,"\n\n"),this.makeCode("\n")):this.joinFragmentArrays(r,"\n"):(r.length?n=this.joinFragmentArrays(r,", "):n=[this.makeCode("void 0")],r.length>1&&e.level>=C?this.wrapInBraces(n):n)},t.prototype.compileRoot=function(e){var t,n,r,i,s,o,u,a,f,l;e.indent=e.bare?"":J,e.level=A,this.spaced=!0,e.scope=new W(null,this,null),l=e.locals||[];for(a=0,f=l.length;a<f;a++)i=l[a],e.scope.parameter(i);return s=[],e.bare||(o=function(){var e,n,i,s;i=this.expressions,s=[];for(r=e=0,n=i.length;e<n;r=++e){t=i[r];if(!(t.unwrap()instanceof h))break;s.push(t)}return s}.call(this),u=this.expressions.slice(o.length),this.expressions=o,o.length&&(s=this.compileNode(pt(e,{indent:""})),s.push(this.makeCode("\n"))),this.expressions=u),n=this.compileWithDeclarations(e),e.bare?n:[].concat(s,this.makeCode("(function() {\n"),n,this.makeCode("\n}).call(this);\n"))},t.prototype.compileWithDeclarations=function(e){var t,n,r,i,s,o,u,a,f,l,c,p,d,v;i=[],o=[],p=this.expressions;for(s=l=0,c=p.length;l<c;s=++l){r=p[s],r=r.unwrap();if(!(r instanceof h||r instanceof O))break}return e=pt(e,{level:A}),s&&(u=this.expressions.splice(s,9e9),d=[this.spaced,!1],f=d[0],this.spaced=d[1],v=[this.compileNode(e),f],i=v[0],this.spaced=v[1],this.expressions=u),o=this.compileNode(e),a=e.scope,a.expressions===this&&(n=e.scope.hasDeclarations(),t=a.hasAssignments,n||t?(s&&i.push(this.makeCode("\n")),i.push(this.makeCode(""+this.tab+"var ")),n&&i.push(this.makeCode(a.declaredVariables().join(", "))),t&&(n&&i.push(this.makeCode(",\n"+(this.tab+J))),i.push(this.makeCode(a.assignedVariables().join(",\n"+(this.tab+J))))),i.push(this.makeCode(";\n"+(this.spaced?"\n":"")))):i.length&&o.length&&i.push(this.makeCode("\n"))),i.concat(o)},t.wrap=function(e){return e.length===1&&e[0]instanceof t?e[0]:new t(e)},t}(o),t.Literal=O=function(e){function t(e){this.value=e}return Tt(t,e),t.prototype.makeReturn=function(){return this.isStatement()?this:t.__super__.makeReturn.apply(this,arguments)},t.prototype.isAssignable=function(){return g.test(this.value)},t.prototype.isStatement=function(){var e;return(e=this.value)==="break"||e==="continue"||e==="debugger"},t.prototype.isComplex=D,t.prototype.assigns=function(e){return e===this.value},t.prototype.jumps=function(e){if(this.value==="break"&&!((e!=null?e.loop:void 0)||(e!=null?e.block:void 0)))return this;if(this.value==="continue"&&(e!=null?!e.loop:!void 0))return this},t.prototype.compileNode=function(e){var t,n,r;return n=this.value==="this"?((r=e.scope.method)!=null?r.bound:void 0)?e.scope.method.context:this.value:this.value.reserved?'"'+this.value+'"':this.value,t=this.isStatement()?""+this.tab+n+";":n,[this.makeCode(t)]},t.prototype.toString=function(){return' "'+this.value+'"'},t}(o),t.Undefined=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Tt(t,e),t.prototype.isAssignable=D,t.prototype.isComplex=D,t.prototype.compileNode=function(e){return[this.makeCode(e.level>=T?"(void 0)":"void 0")]},t}(o),t.Null=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return Tt(t,e),t.prototype.isAssignable=D,t.prototype.isComplex=D,t.prototype.compileNode=function(){return[this.makeCode("null")]},t}(o),t.Bool=function(e){function t(e){this.val=e}return Tt(t,e),t.prototype.isAssignable=D,t.prototype.isComplex=D,t.prototype.compileNode=function(){return[this.makeCode(this.val)]},t}(o),t.Return=R=function(e){function t(e){e&&!e.unwrap().isUndefined&&(this.expression=e)}return Tt(t,e),t.prototype.children=["expression"],t.prototype.isStatement=tt,t.prototype.makeReturn=K,t.prototype.jumps=K,t.prototype.compileToFragments=function(e,n){var r,i;return r=(i=this.expression)!=null?i.makeReturn():void 0,!r||r instanceof t?t.__super__.compileToFragments.call(this,e,n):r.compileToFragments(e,n)},t.prototype.compileNode=function(e){var t;return t=[],t.push(this.makeCode(this.tab+("return"+(this.expression?" ":"")))),this.expression&&(t=t.concat(this.expression.compileToFragments(e,L))),t.push(this.makeCode(";")),t},t}(o),t.Value=Z=function(e){function t(e,n,r){return!n&&e instanceof t?e:(this.base=e,this.properties=n||[],r&&(this[r]=!0),this)}return Tt(t,e),t.prototype.children=["base","properties"],t.prototype.add=function(e){return this.properties=this.properties.concat(e),this},t.prototype.hasProperties=function(){return!!this.properties.length},t.prototype.bareLiteral=function(e){return!this.properties.length&&this.base instanceof e},t.prototype.isArray=function(){return this.bareLiteral(i)},t.prototype.isRange=function(){return this.bareLiteral(q)},t.prototype.isComplex=function(){return this.hasProperties()||this.base.isComplex()},t.prototype.isAssignable=function(){return this.hasProperties()||this.base.isAssignable()},t.prototype.isSimpleNumber=function(){return this.bareLiteral(O)&&U.test(this.base.value)},t.prototype.isString=function(){return this.bareLiteral(O)&&w.test(this.base.value)},t.prototype.isRegex=function(){return this.bareLiteral(O)&&b.test(this.base.value)},t.prototype.isAtomic=function(){var e,t,n,r;r=this.properties.concat(this.base);for(t=0,n=r.length;t<n;t++){e=r[t];if(e.soak||e instanceof a)return!1}return!0},t.prototype.isNotCallable=function(){return this.isSimpleNumber()||this.isString()||this.isRegex()||this.isArray()||this.isRange()||this.isSplice()||this.isObject()},t.prototype.isStatement=function(e){return!this.properties.length&&this.base.isStatement(e)},t.prototype.assigns=function(e){return!this.properties.length&&this.base.assigns(e)},t.prototype.jumps=function(e){return!this.properties.length&&this.base.jumps(e)},t.prototype.isObject=function(e){return this.properties.length?!1:this.base instanceof H&&(!e||this.base.generated)},t.prototype.isSplice=function(){return ct(this.properties)instanceof X},t.prototype.looksStatic=function(e){var t;return this.base.value===e&&this.properties.length&&((t=this.properties[0].name)!=null?t.value:void 0)!=="prototype"},t.prototype.unwrap=function(){return this.properties.length?this:this.base},t.prototype.cacheReference=function(e){var n,r,i,o;return i=ct(this.properties),this.properties.length<2&&!this.base.isComplex()&&(i!=null?!i.isComplex():!void 0)?[this,this]:(n=new t(this.base,this.properties.slice(0,-1)),n.isComplex()&&(r=new O(e.scope.freeVariable("base")),n=new t(new F(new s(r,n)))),i?(i.isComplex()&&(o=new O(e.scope.freeVariable("name")),i=new x(new s(o,i.index)),o=new x(o)),[n.add(i),new t(r||n.base,[o||i])]):[n,r])},t.prototype.compileNode=function(e){var t,n,r,i,s;this.base.front=this.front,r=this.properties,t=this.base.compileToFragments(e,r.length?T:null),(this.base instanceof F||r.length)&&U.test(at(t))&&t.push(this.makeCode("."));for(i=0,s=r.length;i<s;i++)n=r[i],t.push.apply(t,n.compileToFragments(e));return t},t.prototype.unfoldSoak=function(e){return this.unfoldedSoak!=null?this.unfoldedSoak:this.unfoldedSoak=function(n){return function(){var r,i,o,u,a,f,l,c,h,d;if(o=n.base.unfoldSoak(e))return(h=o.body.properties).push.apply(h,n.properties),o;d=n.properties;for(i=l=0,c=d.length;l<c;i=++l){u=d[i];if(!u.soak)continue;return u.soak=!1,r=new t(n.base,n.properties.slice(0,i)),f=new t(n.base,n.properties.slice(i)),r.isComplex()&&(a=new O(e.scope.freeVariable("ref")),r=new F(new s(a,r)),f.base=a),new E(new p(r),f,{soak:!0})}return!1}}(this)()},t}(o),t.Comment=h=function(e){function t(e){this.comment=e}return Tt(t,e),t.prototype.isStatement=tt,t.prototype.makeReturn=K,t.prototype.compileNode=function(e,t){var n,r;return r=this.comment.replace(/^(\s*)#/gm,"$1 *"),n="/*"+dt(r,this.tab)+(Nt.call(r,"\n")>=0?"\n"+this.tab:"")+" */",(t||e.level)===A&&(n=e.indent+n),[this.makeCode("\n"),this.makeCode(n)]},t}(o),t.Call=a=function(e){function t(e,t,n){this.args=t!=null?t:[],this.soak=n,this.isNew=!1,this.isSuper=e==="super",this.variable=this.isSuper?null:e,e instanceof Z&&e.isNotCallable()&&e.error("literal is not a function")}return Tt(t,e),t.prototype.children=["variable","args"],t.prototype.newInstance=function(){var e,n;return e=((n=this.variable)!=null?n.base:void 0)||this.variable,e instanceof t&&!e.isNew?e.newInstance():this.isNew=!0,this},t.prototype.superReference=function(e){var t,n;return n=e.scope.namedMethod(),(n!=null?n.klass:void 0)?(t=[new r(new O("__super__"))],n["static"]&&t.push(new r(new O("constructor"))),t.push(new r(new O(n.name))),(new Z(new O(n.klass),t)).compile(e)):(n!=null?n.ctor:void 0)?""+n.name+".__super__.constructor":this.error("cannot call super outside of an instance method.")},t.prototype.superThis=function(e){var t;return t=e.scope.method,t&&!t.klass&&t.context||"this"},t.prototype.unfoldSoak=function(e){var n,r,i,s,o,u,a,f,l;if(this.soak){if(this.variable){if(r=bt(e,this,"variable"))return r;f=(new Z(this.variable)).cacheReference(e),i=f[0],o=f[1]}else i=new O(this.superReference(e)),o=new Z(i);return o=new t(o,this.args),o.isNew=this.isNew,i=new O("typeof "+i.compile(e)+' === "function"'),new E(i,new Z(o),{soak:!0})}n=this,s=[];for(;;){if(n.variable instanceof t){s.push(n),n=n.variable;continue}if(!(n.variable instanceof Z))break;s.push(n);if(!((n=n.variable.base)instanceof t))break}l=s.reverse();for(u=0,a=l.length;u<a;u++)n=l[u],r&&(n.variable instanceof t?n.variable=r:n.variable.base=r),r=bt(e,n,"variable");return r},t.prototype.compileNode=function(e){var t,n,r,i,s,o,u,a,f,l;(f=this.variable)!=null&&(f.front=this.front),i=V.compileSplattedArray(e,this.args,!0);if(i.length)return this.compileSplat(e,i);r=[],l=this.args;for(n=u=0,a=l.length;u<a;n=++u)t=l[n],n&&r.push(this.makeCode(", ")),r.push.apply(r,t.compileToFragments(e,C));return s=[],this.isSuper?(o=this.superReference(e)+(".call("+this.superThis(e)),r.length&&(o+=", "),s.push(this.makeCode(o))):(this.isNew&&s.push(this.makeCode("new ")),s.push.apply(s,this.variable.compileToFragments(e,T)),s.push(this.makeCode("("))),s.push.apply(s,r),s.push(this.makeCode(")")),s},t.prototype.compileSplat=function(e,t){var n,r,i,s,o,u;return this.isSuper?[].concat(this.makeCode(""+this.superReference(e)+".apply("+this.superThis(e)+", "),t,this.makeCode(")")):this.isNew?(s=this.tab+J,[].concat(this.makeCode("(function(func, args, ctor) {\n"+s+"ctor.prototype = func.prototype;\n"+s+"var child = new ctor, result = func.apply(child, args);\n"+s+"return Object(result) === result ? result : child;\n"+this.tab+"})("),this.variable.compileToFragments(e,C),this.makeCode(", "),t,this.makeCode(", function(){})"))):(n=[],r=new Z(this.variable),(o=r.properties.pop())&&r.isComplex()?(u=e.scope.freeVariable("ref"),n=n.concat(this.makeCode("("+u+" = "),r.compileToFragments(e,C),this.makeCode(")"),o.compileToFragments(e))):(i=r.compileToFragments(e,T),U.test(at(i))&&(i=this.wrapInBraces(i)),o?(u=at(i),i.push.apply(i,o.compileToFragments(e))):u="null",n=n.concat(i)),n=n.concat(this.makeCode(".apply("+u+", "),t,this.makeCode(")")))},t}(o),t.Extends=d=function(e){function t(e,t){this.child=e,this.parent=t}return Tt(t,e),t.prototype.children=["child","parent"],t.prototype.compileToFragments=function(e){return(new a(new Z(new O(wt("extends"))),[this.child,this.parent])).compileToFragments(e)},t}(o),t.Access=r=function(e){function t(e,t){this.name=e,this.name.asKey=!0,this.soak=t==="soak"}return Tt(t,e),t.prototype.children=["name"],t.prototype.compileToFragments=function(e){var t;return t=this.name.compileToFragments(e),g.test(at(t))?t.unshift(this.makeCode(".")):(t.unshift(this.makeCode("[")),t.push(this.makeCode("]"))),t},t.prototype.isComplex=D,t}(o),t.Index=x=function(e){function t(e){this.index=e}return Tt(t,e),t.prototype.children=["index"],t.prototype.compileToFragments=function(e){return[].concat(this.makeCode("["),this.index.compileToFragments(e,L),this.makeCode("]"))},t.prototype.isComplex=function(){return this.index.isComplex()},t}(o),t.Range=q=function(e){function t(e,t,n){this.from=e,this.to=t,this.exclusive=n==="exclusive",this.equals=this.exclusive?"":"="}return Tt(t,e),t.prototype.children=["from","to"],t.prototype.compileVariables=function(e){var t,n,r,i,s;e=pt(e,{top:!0}),n=this.cacheToCodeFragments(this.from.cache(e,C)),this.fromC=n[0],this.fromVar=n[1],r=this.cacheToCodeFragments(this.to.cache(e,C)),this.toC=r[0],this.toVar=r[1];if(t=it(e,"step"))i=this.cacheToCodeFragments(t.cache(e,C)),this.step=i[0],this.stepVar=i[1];s=[this.fromVar.match(P),this.toVar.match(P)],this.fromNum=s[0],this.toNum=s[1];if(this.stepVar)return this.stepNum=this.stepVar.match(P)},t.prototype.compileNode=function(e){var t,n,r,i,s,o,u,a,f,l,c,h,p,d;return this.fromVar||this.compileVariables(e),e.index?(u=this.fromNum&&this.toNum,s=it(e,"index"),o=it(e,"name"),f=o&&o!==s,h=""+s+" = "+this.fromC,this.toC!==this.toVar&&(h+=", "+this.toC),this.step!==this.stepVar&&(h+=", "+this.step),p=[""+s+" <"+this.equals,""+s+" >"+this.equals],a=p[0],i=p[1],n=this.stepNum?vt(this.stepNum[0])>0?""+a+" "+this.toVar:""+i+" "+this.toVar:u?(d=[vt(this.fromNum[0]),vt(this.toNum[0])],r=d[0],c=d[1],d,r<=c?""+a+" "+c:""+i+" "+c):(t=this.stepVar?""+this.stepVar+" > 0":""+this.fromVar+" <= "+this.toVar,""+t+" ? "+a+" "+this.toVar+" : "+i+" "+this.toVar),l=this.stepVar?""+s+" += "+this.stepVar:u?f?r<=c?"++"+s:"--"+s:r<=c?""+s+"++":""+s+"--":f?""+t+" ? ++"+s+" : --"+s:""+t+" ? "+s+"++ : "+s+"--",f&&(h=""+o+" = "+h),f&&(l=""+o+" = "+l),[this.makeCode(""+h+"; "+n+"; "+l)]):this.compileArray(e)},t.prototype.compileArray=function(e){var t,n,r,i,s,o,u,a,f,l,c,h,p,d,v;if(this.fromNum&&this.toNum&&Math.abs(this.fromNum-this.toNum)<=20)return f=function(){v=[];for(var e=p=+this.fromNum,t=+this.toNum;p<=t?e<=t:e>=t;p<=t?e++:e--)v.push(e);return v}.apply(this),this.exclusive&&f.pop(),[this.makeCode("["+f.join(", ")+"]")];o=this.tab+J,s=e.scope.freeVariable("i"),l=e.scope.freeVariable("results"),a="\n"+o+l+" = [];",this.fromNum&&this.toNum?(e.index=s,n=at(this.compileNode(e))):(c=""+s+" = "+this.fromC+(this.toC!==this.toVar?", "+this.toC:""),r=""+this.fromVar+" <= "+this.toVar,n="var "+c+"; "+r+" ? "+s+" <"+this.equals+" "+this.toVar+" : "+s+" >"+this.equals+" "+this.toVar+"; "+r+" ? "+s+"++ : "+s+"--"),u="{ "+l+".push("+s+"); }\n"+o+"return "+l+";\n"+e.indent,i=function(e){return e!=null?e.contains(ft):void 0};if(i(this.from)||i(this.to))t=", arguments";return[this.makeCode("(function() {"+a+"\n"+o+"for ("+n+")"+u+"}).apply(this"+(t!=null?t:"")+")")]},t}(o),t.Slice=X=function(e){function t(e){this.range=e,t.__super__.constructor.call(this)}return Tt(t,e),t.prototype.children=["range"],t.prototype.compileNode=function(e){var t,n,r,i,s,o,u;u=this.range,s=u.to,r=u.from,i=r&&r.compileToFragments(e,L)||[this.makeCode("0")];if(s){t=s.compileToFragments(e,L),n=at(t);if(!!this.range.exclusive||+n!==-1)o=", "+(this.range.exclusive?n:U.test(n)?""+(+n+1):(t=s.compileToFragments(e,T),"+"+at(t)+" + 1 || 9e9"))}return[this.makeCode(".slice("+at(i)+(o||"")+")")]},t}(o),t.Obj=H=function(e){function t(e,t){this.generated=t!=null?t:!1,this.objects=this.properties=e||[]}return Tt(t,e),t.prototype.children=["properties"],t.prototype.compileNode=function(e){var t,n,r,i,o,u,a,f,l,c,p,d,v;l=this.properties;if(!l.length)return[this.makeCode(this.front?"({})":"{}")];if(this.generated)for(c=0,d=l.length;c<d;c++)a=l[c],a instanceof Z&&a.error("cannot have an implicit value in an implicit object");r=e.indent+=J,u=this.lastNonComment(this.properties),t=[];for(n=p=0,v=l.length;p<v;n=++p)f=l[n],o=n===l.length-1?"":f===u||f instanceof h?"\n":",\n",i=f instanceof h?"":r,f instanceof s&&f.variable instanceof Z&&f.variable.hasProperties()&&f.variable.error("Invalid object key"),f instanceof Z&&f["this"]&&(f=new s(f.properties[0].name,f,"object")),f instanceof h||(f instanceof s||(f=new s(f,f,"object")),(f.variable.base||f.variable).asKey=!0),i&&t.push(this.makeCode(i)),t.push.apply(t,f.compileToFragments(e,A)),o&&t.push(this.makeCode(o));return t.unshift(this.makeCode("{"+(l.length&&"\n"))),t.push(this.makeCode(""+(l.length&&"\n"+this.tab)+"}")),this.front?this.wrapInBraces(t):t},t.prototype.assigns=function(e){var t,n,r,i;i=this.properties;for(n=0,r=i.length;n<r;n++){t=i[n];if(t.assigns(e))return!0}return!1},t}(o),t.Arr=i=function(e){function t(e){this.objects=e||[]}return Tt(t,e),t.prototype.children=["objects"],t.prototype.compileNode=function(e){var t,n,r,i,s,o,u;if(!this.objects.length)return[this.makeCode("[]")];e.indent+=J,t=V.compileSplattedArray(e,this.objects);if(t.length)return t;t=[],n=function(){var t,n,r,i;r=this.objects,i=[];for(t=0,n=r.length;t<n;t++)s=r[t],i.push(s.compileToFragments(e,C));return i}.call(this);for(i=o=0,u=n.length;o<u;i=++o)r=n[i],i&&t.push(this.makeCode(", ")),t.push.apply(t,r);return at(t).indexOf("\n")>=0?(t.unshift(this.makeCode("[\n"+e.indent)),t.push(this.makeCode("\n"+this.tab+"]"))):(t.unshift(this.makeCode("[")),t.push(this.makeCode("]"))),t},t.prototype.assigns=function(e){var t,n,r,i;i=this.objects;for(n=0,r=i.length;n<r;n++){t=i[n];if(t.assigns(e))return!0}return!1},t}(o),t.Class=f=function(e){function t(e,t,n){this.variable=e,this.parent=t,this.body=n!=null?n:new u,this.boundFuncs=[],this.body.classBody=!0}return Tt(t,e),t.prototype.children=["variable","parent","body"],t.prototype.determineName=function(){var e,t;return this.variable?(e=(t=ct(this.variable.properties))?t instanceof r&&t.name.value:this.variable.base.value,Nt.call(z,e)>=0&&this.variable.error("class variable name may not be "+e),e&&(e=g.test(e)&&e)):null},t.prototype.setContext=function(e){return this.body.traverseChildren(!1,function(t){if(t.classBody)return!1;if(t instanceof O&&t.value==="this")return t.value=e;if(t instanceof l){t.klass=e;if(t.bound)return t.context=e}})},t.prototype.addBoundFunctions=function(e){var t,n,i,s,o;o=this.boundFuncs;for(i=0,s=o.length;i<s;i++)t=o[i],n=(new Z(new O("this"),[new r(t)])).compile(e),this.ctor.body.unshift(new O(""+n+" = "+wt("bind")+"("+n+", this)"))},t.prototype.addProperties=function(e,t,n){var i,o,u,a,f;return f=e.base.properties.slice(0),u=function(){var e;e=[];while(i=f.shift())i instanceof s&&(o=i.variable.base,delete i.context,a=i.value,o.value==="constructor"?(this.ctor&&i.error("cannot define more than one constructor in a class"),a.bound&&i.error("cannot define a constructor as a bound function"),a instanceof l?i=this.ctor=a:(this.externalCtor=n.classScope.freeVariable("class"),i=new s(new O(this.externalCtor),a))):i.variable["this"]?a["static"]=!0:(i.variable=new Z(new O(t),[new r(new O("prototype")),new r(o)]),a instanceof l&&a.bound&&(this.boundFuncs.push(o),a.bound=!1))),e.push(i);return e}.call(this),rt(u)},t.prototype.walkBody=function(e,n){return this.traverseChildren(!1,function(r){return function(i){var o,a,f,l,c,h,p;o=!0;if(i instanceof t)return!1;if(i instanceof u){p=a=i.expressions;for(f=c=0,h=p.length;c<h;f=++c)l=p[f],l instanceof s&&l.variable.looksStatic(e)?l.value["static"]=!0:l instanceof Z&&l.isObject(!0)&&(o=!1,a[f]=r.addProperties(l,e,n));i.expressions=a=ut(a)}return o&&!(i instanceof t)}}(this))},t.prototype.hoistDirectivePrologue=function(){var e,t,n;t=0,e=this.body.expressions;while((n=e[t])&&n instanceof h||n instanceof Z&&n.isString())++t;return this.directives=e.splice(0,t)},t.prototype.ensureConstructor=function(e){return this.ctor||(this.ctor=new l,this.externalCtor?this.ctor.body.push(new O(""+this.externalCtor+".apply(this, arguments)")):this.parent&&this.ctor.body.push(new O(""+e+".__super__.constructor.apply(this, arguments)")),this.ctor.body.makeReturn(),this.body.expressions.unshift(this.ctor)),this.ctor.ctor=this.ctor.name=e,this.ctor.klass=null,this.ctor.noReturn=!0},t.prototype.compileNode=function(e){var t,n,r,i,o,f,c,h,p;return(i=this.body.jumps())&&i.error("Class bodies cannot contain pure statements"),(n=this.body.contains(ft))&&n.error("Class bodies shouldn't reference arguments"),c=this.determineName()||"_Class",c.reserved&&(c="_"+c),f=new O(c),r=new l([],u.wrap([this.body])),t=[],e.classScope=r.makeScope(e.scope),this.hoistDirectivePrologue(),this.setContext(c),this.walkBody(c,e),this.ensureConstructor(c),this.addBoundFunctions(e),this.body.spaced=!0,this.body.expressions.push(f),this.parent&&(h=new O(e.classScope.freeVariable("super",!1)),this.body.expressions.unshift(new d(f,h)),r.params.push(new j(h)),t.push(this.parent)),(p=this.body.expressions).unshift.apply(p,this.directives),o=new F(new a(r,t)),this.variable&&(o=new s(this.variable,o)),o.compileToFragments(e)},t}(o),t.Assign=s=function(e){function t(e,t,n,r){var i,s,o;this.variable=e,this.value=t,this.context=n,this.param=r&&r.param,this.subpattern=r&&r.subpattern,i=(o=s=this.variable.unwrapAll().value,Nt.call(z,o)>=0),i&&this.context!=="object"&&this.variable.error('variable name may not be "'+s+'"')}return Tt(t,e),t.prototype.children=["variable","value"],t.prototype.isStatement=function(e){return(e!=null?e.level:void 0)===A&&this.context!=null&&Nt.call(this.context,"?")>=0},t.prototype.assigns=function(e){return this[this.context==="object"?"value":"variable"].assigns(e)},t.prototype.unfoldSoak=function(e){return bt(e,this,"variable")},t.prototype.compileNode=function(e){var t,n,r,i,s,o,u,a,f,c;if(r=this.variable instanceof Z){if(this.variable.isArray()||this.variable.isObject())return this.compilePatternMatch(e);if(this.variable.isSplice())return this.compileSplice(e);if((a=this.context)==="||="||a==="&&="||a==="?=")return this.compileConditional(e)}n=this.variable.compileToFragments(e,C),s=at(n);if(!this.context){u=this.variable.unwrapAll(),u.isAssignable()||this.variable.error('"'+this.variable.compile(e)+'" cannot be assigned');if(typeof u.hasProperties=="function"?!u.hasProperties():!void 0)this.param?e.scope.add(s,"var"):e.scope.find(s)}return this.value instanceof l&&(i=M.exec(s))&&(i[2]&&(this.value.klass=i[1]),this.value.name=(f=(c=i[3])!=null?c:i[4])!=null?f:i[5]),o=this.value.compileToFragments(e,C),this.context==="object"?n.concat(this.makeCode(": "),o):(t=n.concat(this.makeCode(" "+(this.context||"=")+" "),o),e.level<=C?t:this.wrapInBraces(t))},t.prototype.compilePatternMatch=function(e){var n,i,s,o,u,a,f,l,c,h,p,d,v,m,y,b,w,E,S,T,N,L,M,_,D,P,H,B;b=e.level===A,E=this.value,p=this.variable.base.objects;if(!(d=p.length))return s=E.compileToFragments(e),e.level>=k?this.wrapInBraces(s):s;f=this.variable.isObject();if(!b||d!==1||(h=p[0])instanceof V){S=E.compileToFragments(e,C),T=at(S),i=[],y=!1;if(!g.test(T)||this.variable.assigns(T))i.push([this.makeCode(""+(v=e.scope.freeVariable("ref"))+" = ")].concat(Ct.call(S))),S=[this.makeCode(v)],T=v;for(u=N=0,L=p.length;N<L;u=++N)h=p[u],a=u,f&&(h instanceof t?(P=h,H=P.variable,a=H.base,h=P.value):h.base instanceof F?(B=(new Z(h.unwrapAll())).cacheReference(e),h=B[0],a=B[1]):a=h["this"]?h.properties[0].name:h),!y&&h instanceof V?(c=h.name.unwrap().value,h=h.unwrap(),w=""+d+" <= "+T+".length ? "+wt("slice")+".call("+T+", "+u,(m=d-u-1)?(l=e.scope.freeVariable("i"),w+=", "+l+" = "+T+".length - "+m+") : ("+l+" = "+u+", [])"):w+=") : []",w=new O(w),y=""+l+"++"):(c=h.unwrap().value,h instanceof V&&h.error("multiple splats are disallowed in an assignment"),typeof a=="number"?(a=new O(y||a),n=!1):n=f&&g.test(a.unwrap().value||0),w=new Z(new O(T),[new(n?r:x)(a)])),c!=null&&Nt.call(I,c)>=0&&h.error("assignment to a reserved word: "+h.compile(e)),i.push((new t(h,w,null,{param:this.param,subpattern:!0})).compileToFragments(e,C));return!b&&!this.subpattern&&i.push(S),o=this.joinFragmentArrays(i,", "),e.level<C?o:this.wrapInBraces(o)}return h instanceof t?(M=h,_=M.variable,a=_.base,h=M.value):a=f?h["this"]?h.properties[0].name:h:new O(0),n=g.test(a.unwrap().value||0),E=new Z(E),E.properties.push(new(n?r:x)(a)),(D=h.unwrap().value,Nt.call(I,D)>=0)&&h.error("assignment to a reserved word: "+h.compile(e)),(new t(h,E,null,{param:this.param})).compileToFragments(e,A)},t.prototype.compileConditional=function(e){var n,r,i,s;return s=this.variable.cacheReference(e),r=s[0],i=s[1],!r.properties.length&&r.base instanceof O&&r.base.value!=="this"&&!e.scope.check(r.base.value)&&this.variable.error('the variable "'+r.base.value+"\" can't be assigned with "+this.context+" because it has not been declared before"),Nt.call(this.context,"?")>=0?(e.isExistentialEquals=!0,(new E(new p(r),i,{type:"if"})).addElse(new t(i,this.value,"=")).compileToFragments(e)):(n=(new B(this.context.slice(0,-1),r,new t(i,this.value,"="))).compileToFragments(e),e.level<=C?n:this.wrapInBraces(n))},t.prototype.compileSplice=function(e){var t,n,r,i,s,o,u,a,f,l,c,h;return l=this.variable.properties.pop().range,r=l.from,u=l.to,n=l.exclusive,o=this.variable.compile(e),r?(c=this.cacheToCodeFragments(r.cache(e,k)),i=c[0],s=c[1]):i=s="0",u?r instanceof Z&&r.isSimpleNumber()&&u instanceof Z&&u.isSimpleNumber()?(u=u.compile(e)-s,n||(u+=1)):(u=u.compile(e,T)+" - "+s,n||(u+=" + 1")):u="9e9",h=this.value.cache(e,C),a=h[0],f=h[1],t=[].concat(this.makeCode("[].splice.apply("+o+", ["+i+", "+u+"].concat("),a,this.makeCode(")), "),f),e.level>A?this.wrapInBraces(t):t},t}(o),t.Code=l=function(e){function t(e,t,n){this.params=e||[],this.body=t||new u,this.bound=n==="boundfunc"}return Tt(t,e),t.prototype.children=["params","body"],t.prototype.isStatement=function(){return!!this.ctor},t.prototype.jumps=D,t.prototype.makeScope=function(e){return new W(e,this.body,this)},t.prototype.compileNode=function(e){var n,r,o,f,l,c,h,p,d,v,m,g,y,b,w,S,x,N,C,k,L,A,M,_,D,P,H,F,I,q,R,U,z;this.bound&&((F=e.scope.method)!=null?F.bound:void 0)&&(this.context=e.scope.method.context);if(this.bound&&!this.context)return this.context="_this",w=new t([new j(new O(this.context))],new u([this])),r=new a(w,[new O("this")]),r.updateLocationDataIfMissing(this.locationData),r.compileNode(e);e.scope=it(e,"classScope")||this.makeScope(e.scope),e.scope.shared=it(e,"sharedScope"),e.indent+=J,delete e.bare,delete e.isExistentialEquals,d=[],f=[],I=this.params;for(S=0,k=I.length;S<k;S++)p=I[S],e.scope.parameter(p.asReference(e));q=this.params;for(x=0,L=q.length;x<L;x++){p=q[x];if(!p.splat)continue;R=this.params;for(N=0,A=R.length;N<A;N++)h=R[N].name,h["this"]&&(h=h.properties[0].name),h.value&&e.scope.add(h.value,"var",!0);m=new s(new Z(new i(function(){var t,n,r,i;r=this.params,i=[];for(t=0,n=r.length;t<n;t++)h=r[t],i.push(h.asReference(e));return i}.call(this))),new Z(new O("arguments")));break}U=this.params;for(C=0,M=U.length;C<M;C++)p=U[C],p.isComplex()?(y=v=p.asReference(e),p.value&&(y=new B("?",v,p.value)),f.push(new s(new Z(p.name),y,"=",{param:!0}))):(v=p,p.value&&(c=new O(v.name.value+" == null"),y=new s(new Z(p.name),p.value,"="),f.push(new E(c,y)))),m||d.push(v);b=this.body.isEmpty(),m&&f.unshift(m),f.length&&(z=this.body.expressions).unshift.apply(z,f);for(l=P=0,_=d.length;P<_;l=++P)h=d[l],d[l]=h.compileToFragments(e),e.scope.parameter(at(d[l]));g=[],this.eachParamName(function(e,t){return Nt.call(g,e)>=0&&t.error("multiple parameters named '"+e+"'"),g.push(e)}),!b&&!this.noReturn&&this.body.makeReturn(),o="function",this.ctor&&(o+=" "+this.name),o+="(",n=[this.makeCode(o)];for(l=H=0,D=d.length;H<D;l=++H)h=d[l],l&&n.push(this.makeCode(", ")),n.push.apply(n,h);return n.push(this.makeCode(") {")),this.body.isEmpty()||(n=n.concat(this.makeCode("\n"),this.body.compileWithDeclarations(e),this.makeCode("\n"+this.tab))),n.push(this.makeCode("}")),this.ctor?[this.makeCode(this.tab)].concat(Ct.call(n)):this.front||e.level>=T?this.wrapInBraces(n):n},t.prototype.eachParamName=function(e){var t,n,r,i,s;i=this.params,s=[];for(n=0,r=i.length;n<r;n++)t=i[n],s.push(t.eachName(e));return s},t.prototype.traverseChildren=function(e,n){if(e)return t.__super__.traverseChildren.call(this,e,n)},t}(o),t.Param=j=function(e){function t(e,t,n){var r;this.name=e,this.value=t,this.splat=n,(r=e=this.name.unwrapAll().value,Nt.call(z,r)>=0)&&this.name.error('parameter name "'+e+'" is not allowed')}return Tt(t,e),t.prototype.children=["name","value"],t.prototype.compileToFragments=function(e){return this.name.compileToFragments(e,C)},t.prototype.asReference=function(e){var t;return this.reference?this.reference:(t=this.name,t["this"]?(t=t.properties[0].name,t.value.reserved&&(t=new O(e.scope.freeVariable(t.value)))):t.isComplex()&&(t=new O(e.scope.freeVariable("arg"))),t=new Z(t),this.splat&&(t=new V(t)),t.updateLocationDataIfMissing(this.locationData),this.reference=t)},t.prototype.isComplex=function(){return this.name.isComplex()},t.prototype.eachName=function(e,t){var n,r,i,o,u,a;t==null&&(t=this.name),n=function(t){var n;n=t.properties[0].name;if(!n.value.reserved)return e(n.value,n)};if(t instanceof O)return e(t.value,t);if(t instanceof Z)return n(t);a=t.objects;for(o=0,u=a.length;o<u;o++)i=a[o],i instanceof s?this.eachName(e,i.value.unwrap()):i instanceof V?(r=i.name.unwrap(),e(r.value,r)):i instanceof Z?i.isArray()||i.isObject()?this.eachName(e,i.base):i["this"]?n(i):e(i.base.value,i.base):i.error("illegal parameter "+i.compile())},t}(o),t.Splat=V=function(e){function t(e){this.name=e.compile?e:new O(e)}return Tt(t,e),t.prototype.children=["name"],t.prototype.isAssignable=tt,t.prototype.assigns=function(e){return this.name.assigns(e)},t.prototype.compileToFragments=function(e){return this.name.compileToFragments(e)},t.prototype.unwrap=function(){return this.name},t.compileSplattedArray=function(e,n,r){var i,s,o,u,a,f,l,c,h,p;l=-1;while((c=n[++l])&&!(c instanceof t))continue;if(l>=n.length)return[];if(n.length===1)return c=n[0],a=c.compileToFragments(e,C),r?a:[].concat(c.makeCode(""+wt("slice")+".call("),a,c.makeCode(")"));i=n.slice(l);for(f=h=0,p=i.length;h<p;f=++h)c=i[f],o=c.compileToFragments(e,C),i[f]=c instanceof t?[].concat(c.makeCode(""+wt("slice")+".call("),o,c.makeCode(")")):[].concat(c.makeCode("["),o,c.makeCode("]"));return l===0?(c=n[0],u=c.joinFragmentArrays(i.slice(1),", "),i[0].concat(c.makeCode(".concat("),u,c.makeCode(")"))):(s=function(){var t,r,i,s;i=n.slice(0,l),s=[];for(t=0,r=i.length;t<r;t++)c=i[t],s.push(c.compileToFragments(e,C));return s}(),s=n[0].joinFragmentArrays(s,", "),u=n[l].joinFragmentArrays(i,", "),[].concat(n[0].makeCode("["),s,n[l].makeCode("].concat("),u,ct(n).makeCode(")")))},t}(o),t.While=et=function(e){function t(e,t){this.condition=(t!=null?t.invert:void 0)?e.invert():e,this.guard=t!=null?t.guard:void 0}return Tt(t,e),t.prototype.children=["condition","guard","body"],t.prototype.isStatement=tt,t.prototype.makeReturn=function(e){return e?t.__super__.makeReturn.apply(this,arguments):(this.returns=!this.jumps({loop:!0}),this)},t.prototype.addBody=function(e){return this.body=e,this},t.prototype.jumps=function(){var e,t,n,r,i;e=this.body.expressions;if(!e.length)return!1;for(r=0,i=e.length;r<i;r++){n=e[r];if(t=n.jumps({loop:!0}))return t}return!1},t.prototype.compileNode=function(e){var t,n,r,i;return e.indent+=J,i="",n=this.body,n.isEmpty()?n=this.makeCode(""):(this.returns&&(n.makeReturn(r=e.scope.freeVariable("results")),i=""+this.tab+r+" = [];\n"),this.guard&&(n.expressions.length>1?n.expressions.unshift(new E((new F(this.guard)).invert(),new O("continue"))):this.guard&&(n=u.wrap([new E(this.guard,n)]))),n=[].concat(this.makeCode("\n"),n.compileToFragments(e,A),this.makeCode("\n"+this.tab))),t=[].concat(this.makeCode(i+this.tab+"while ("),this.condition.compileToFragments(e,L),this.makeCode(") {"),n,this.makeCode("}")),this.returns&&t.push(this.makeCode("\n"+this.tab+"return "+r+";")),t},t}(o),t.Op=B=function(e){function t(e,t,r,i){if(e==="in")return new S(t,r);if(e==="do")return this.generateDo(t);if(e==="new"){if(t instanceof a&&!t["do"]&&!t.isNew)return t.newInstance();if(t instanceof l&&t.bound||t["do"])t=new F(t)}return this.operator=n[e]||e,this.first=t,this.second=r,this.flip=!!i,this}var n,r;return Tt(t,e),n={"==":"===","!=":"!==",of:"in"},r={"!==":"===","===":"!=="},t.prototype.children=["first","second"],t.prototype.isSimpleNumber=D,t.prototype.isUnary=function(){return!this.second},t.prototype.isComplex=function(){var e;return!this.isUnary()||(e=this.operator)!=="+"&&e!=="-"||this.first.isComplex()},t.prototype.isChainable=function(){var e;return(e=this.operator)==="<"||e===">"||e===">="||e==="<="||e==="==="||e==="!=="},t.prototype.invert=function(){var e,n,i,s,o;if(this.isChainable()&&this.first.isChainable()){e=!0,n=this;while(n&&n.operator)e&&(e=n.operator in r),n=n.first;if(!e)return(new F(this)).invert();n=this;while(n&&n.operator)n.invert=!n.invert,n.operator=r[n.operator],n=n.first;return this}return(s=r[this.operator])?(this.operator=s,this.first.unwrap()instanceof t&&this.first.invert(),this):this.second?(new F(this)).invert():this.operator==="!"&&(i=this.first.unwrap())instanceof t&&((o=i.operator)==="!"||o==="in"||o==="instanceof")?i:new t("!",this)},t.prototype.unfoldSoak=function(e){var t;return((t=this.operator)==="++"||t==="--"||t==="delete")&&bt(e,this,"first")},t.prototype.generateDo=function(e){var t,n,r,i,o,u,f,c;i=[],n=e instanceof s&&(o=e.value.unwrap())instanceof l?o:e,c=n.params||[];for(u=0,f=c.length;u<f;u++)r=c[u],r.value?(i.push(r.value),delete r.value):i.push(r);return t=new a(e,i),t["do"]=!0,t},t.prototype.compileNode=function(e){var t,n,r,i;return n=this.isChainable()&&this.first.isChainable(),n||(this.first.front=this.front),this.operator==="delete"&&e.scope.check(this.first.unwrapAll().value)&&this.error("delete operand may not be argument or var"),((r=this.operator)==="--"||r==="++")&&(i=this.first.unwrapAll().value,Nt.call(z,i)>=0)&&this.error('cannot increment/decrement "'+this.first.unwrapAll().value+'"'),this.isUnary()?this.compileUnary(e):n?this.compileChain(e):this.operator==="?"?this.compileExistence(e):(t=[].concat(this.first.compileToFragments(e,k),this.makeCode(" "+this.operator+" "),this.second.compileToFragments(e,k)),e.level<=k?t:this.wrapInBraces(t))},t.prototype.compileChain=function(e){var t,n,r,i;return i=this.first.second.cache(e),this.first.second=i[0],r=i[1],n=this.first.compileToFragments(e,k),t=n.concat(this.makeCode(" "+(this.invert?"&&":"||")+" "),r.compileToFragments(e),this.makeCode(" "+this.operator+" "),this.second.compileToFragments(e,k)),this.wrapInBraces(t)},t.prototype.compileExistence=function(e){var t,n;return this.first.isComplex()?(n=new O(e.scope.freeVariable("ref")),t=new F(new s(n,this.first))):(t=this.first,n=t),(new E(new p(t),n,{type:"if"})).addElse(this.second).compileToFragments(e)},t.prototype.compileUnary=function(e){var n,r,i;r=[],n=this.operator,r.push([this.makeCode(n)]);if(n==="!"&&this.first instanceof p)return this.first.negated=!this.first.negated,this.first.compileToFragments(e);if(e.level>=T)return(new F(this)).compileToFragments(e);i=n==="+"||n==="-",(n==="new"||n==="typeof"||n==="delete"||i&&this.first instanceof t&&this.first.operator===n)&&r.push([this.makeCode(" ")]);if(i&&this.first instanceof t||n==="new"&&this.first.isStatement(e))this.first=new F(this.first);return r.push(this.first.compileToFragments(e,k)),this.flip&&r.reverse(),this.joinFragmentArrays(r,"")},t.prototype.toString=function(e){return t.__super__.toString.call(this,e,this.constructor.name+" "+this.operator)},t}(o),t.In=S=function(e){function t(e,t){this.object=e,this.array=t}return Tt(t,e),t.prototype.children=["object","array"],t.prototype.invert=_,t.prototype.compileNode=function(e){var t,n,r,i,s;if(this.array instanceof Z&&this.array.isArray()){s=this.array.base.objects;for(r=0,i=s.length;r<i;r++){n=s[r];if(n instanceof V){t=!0;break}continue}if(!t)return this.compileOrTest(e)}return this.compileLoopTest(e)},t.prototype.compileOrTest=function(e){var t,n,r,i,s,o,u,a,f,l,c,h;if(this.array.base.objects.length===0)return[this.makeCode(""+!!this.negated)];l=this.object.cache(e,k),o=l[0],s=l[1],c=this.negated?[" !== "," && "]:[" === "," || "],t=c[0],n=c[1],u=[],h=this.array.base.objects;for(r=a=0,f=h.length;a<f;r=++a)i=h[r],r&&u.push(this.makeCode(n)),u=u.concat(r?s:o,this.makeCode(t),i.compileToFragments(e,T));return e.level<k?u:this.wrapInBraces(u)},t.prototype.compileLoopTest=function(e){var t,n,r,i;return i=this.object.cache(e,C),r=i[0],n=i[1],t=[].concat(this.makeCode(wt("indexOf")+".call("),this.array.compileToFragments(e,C),this.makeCode(", "),n,this.makeCode(") "+(this.negated?"< 0":">= 0"))),at(r)===at(n)?t:(t=r.concat(this.makeCode(", "),t),e.level<C?t:this.wrapInBraces(t))},t.prototype.toString=function(e){return t.__super__.toString.call(this,e,this.constructor.name+(this.negated?"!":""))},t}(o),t.Try=G=function(e){function t(e,t,n,r){this.attempt=e,this.errorVariable=t,this.recovery=n,this.ensure=r}return Tt(t,e),t.prototype.children=["attempt","recovery","ensure"],t.prototype.isStatement=tt,t.prototype.jumps=function(e){var t;return this.attempt.jumps(e)||((t=this.recovery)!=null?t.jumps(e):void 0)},t.prototype.makeReturn=function(e){return this.attempt&&(this.attempt=this.attempt.makeReturn(e)),this.recovery&&(this.recovery=this.recovery.makeReturn(e)),this},t.prototype.compileNode=function(e){var t,n,r,i;return e.indent+=J,i=this.attempt.compileToFragments(e,A),t=this.recovery?(r=new O("_error"),this.errorVariable?this.recovery.unshift(new s(this.errorVariable,r)):void 0,[].concat(this.makeCode(" catch ("),r.compileToFragments(e),this.makeCode(") {\n"),this.recovery.compileToFragments(e,A),this.makeCode("\n"+this.tab+"}"))):!this.ensure&&!this.recovery?[this.makeCode(" catch (_error) {}")]:[],n=this.ensure?[].concat(this.makeCode(" finally {\n"),this.ensure.compileToFragments(e,A),this.makeCode("\n"+this.tab+"}")):[],[].concat(this.makeCode(""+this.tab+"try {\n"),i,this.makeCode("\n"+this.tab+"}"),t,n)},t}(o),t.Throw=Q=function(e){function t(e){this.expression=e}return Tt(t,e),t.prototype.children=["expression"],t.prototype.isStatement=tt,t.prototype.jumps=D,t.prototype.makeReturn=K,t.prototype.compileNode=function(e){return[].concat(this.makeCode(this.tab+"throw "),this.expression.compileToFragments(e),this.makeCode(";"))},t}(o),t.Existence=p=function(e){function t(e){this.expression=e}return Tt(t,e),t.prototype.children=["expression"],t.prototype.invert=_,t.prototype.compileNode=function(e){var t,n,r,i;return this.expression.front=this.front,r=this.expression.compile(e,k),g.test(r)&&!e.scope.check(r)?(i=this.negated?["===","||"]:["!==","&&"],t=i[0],n=i[1],r="typeof "+r+" "+t+' "undefined" '+n+" "+r+" "+t+" null"):r=""+r+" "+(this.negated?"==":"!=")+" null",[this.makeCode(e.level<=N?r:"("+r+")")]},t}(o),t.Parens=F=function(e){function t(e){this.body=e}return Tt(t,e),t.prototype.children=["body"],t.prototype.unwrap=function(){return this.body},t.prototype.isComplex=function(){return this.body.isComplex()},t.prototype.compileNode=function(e){var t,n,r;return n=this.body.unwrap(),n instanceof Z&&n.isAtomic()?(n.front=this.front,n.compileToFragments(e)):(r=n.compileToFragments(e,L),t=e.level<k&&(n instanceof B||n instanceof a||n instanceof v&&n.returns),t?r:this.wrapInBraces(r))},t}(o),t.For=v=function(e){function t(e,t){var n;this.source=t.source,this.guard=t.guard,this.step=t.step,this.name=t.name,this.index=t.index,this.body=u.wrap([e]),this.own=!!t.own,this.object=!!t.object,this.object&&(n=[this.index,this.name],this.name=n[0],this.index=n[1]),this.index instanceof Z&&this.index.error("index cannot be a pattern matching expression"),this.range=this.source instanceof Z&&this.source.base instanceof q&&!this.source.properties.length,this.pattern=this.name instanceof Z,this.range&&this.index&&this.index.error("indexes do not apply to range loops"),this.range&&this.pattern&&this.name.error("cannot pattern match over range loops"),this.own&&!this.object&&this.name.error("cannot use own with for-in"),this.returns=!1}return Tt(t,e),t.prototype.children=["body","source","guard","step"],t.prototype.compileNode=function(e){var t,n,r,i,o,a,f,l,c,h,p,d,v,m,y,b,w,S,x,T,N,k,L,M,_,D,H,B,j,I,q,U,z,W;return t=u.wrap([this.body]),S=(z=ct(t.expressions))!=null?z.jumps():void 0,S&&S instanceof R&&(this.returns=!1),H=this.range?this.source.base:this.source,D=e.scope,T=this.name&&this.name.compile(e,C),m=this.index&&this.index.compile(e,C),T&&!this.pattern&&D.find(T),m&&D.find(m),this.returns&&(_=D.freeVariable("results")),y=this.object&&m||D.freeVariable("i"),b=this.range&&T||m||y,w=b!==y?""+b+" = ":"",this.step&&!this.range&&(W=this.cacheToCodeFragments(this.step.cache(e,C)),B=W[0],I=W[1],j=I.match(P)),this.pattern&&(T=y),U="",p="",f="",d=this.tab+J,this.range?h=H.compileToFragments(pt(e,{index:y,name:T,step:this.step})):(q=this.source.compile(e,C),(T||this.own)&&!g.test(q)&&(f+=""+this.tab+(k=D.freeVariable("ref"))+" = "+q+";\n",q=k),T&&!this.pattern&&(N=""+T+" = "+q+"["+b+"]"),this.object||(B!==I&&(f+=""+this.tab+B+";\n"),this.step&&j&&(c=vt(j[0])<0)||(x=D.freeVariable("len")),o=""+w+y+" = 0, "+x+" = "+q+".length",a=""+w+y+" = "+q+".length - 1",r=""+y+" < "+x,i=""+y+" >= 0",this.step?(j?c&&(r=i,o=a):(r=""+I+" > 0 ? "+r+" : "+i,o="("+I+" > 0 ? ("+o+") : "+a+")"),v=""+y+" += "+I):v=""+(b!==y?"++"+y:""+y+"++"),h=[this.makeCode(""+o+"; "+r+"; "+w+v)])),this.returns&&(L=""+this.tab+_+" = [];\n",M="\n"+this.tab+"return "+_+";",t.makeReturn(_)),this.guard&&(t.expressions.length>1?t.expressions.unshift(new E((new F(this.guard)).invert(),new O("continue"))):this.guard&&(t=u.wrap([new E(this.guard,t)]))),this.pattern&&t.expressions.unshift(new s(this.name,new O(""+q+"["+b+"]"))),l=[].concat(this.makeCode(f),this.pluckDirectCall(e,t)),N&&(U="\n"+d+N+";"),this.object&&(h=[this.makeCode(""+b+" in "+q)],this.own&&(p="\n"+d+"if (!"+wt("hasProp")+".call("+q+", "+b+")) continue;")),n=t.compileToFragments(pt(e,{indent:d}),A),n&&n.length>0&&(n=[].concat(this.makeCode("\n"),n,this.makeCode("\n"))),[].concat(l,this.makeCode(""+(L||"")+this.tab+"for ("),h,this.makeCode(") {"+p+U),n,this.makeCode(""+this.tab+"}"+(M||"")))},t.prototype.pluckDirectCall=function(e,t){var n,r,i,o,u,f,c,h,p,d,v,m,g,y,b,w;r=[],d=t.expressions;for(u=h=0,p=d.length;h<p;u=++h){i=d[u],i=i.unwrapAll();if(!(i instanceof a))continue;c=(v=i.variable)!=null?v.unwrapAll():void 0;if(!(c instanceof l||c instanceof Z&&((m=c.base)!=null?m.unwrapAll():void 0)instanceof l&&c.properties.length===1&&((g=(y=c.properties[0].name)!=null?y.value:void 0)==="call"||g==="apply")))continue;o=((b=c.base)!=null?b.unwrapAll():void 0)||c,f=new O(e.scope.freeVariable("fn")),n=new Z(f),c.base&&(w=[n,c],c.base=w[0],n=w[1]),t.expressions[u]=new a(n,i.args),r=r.concat(this.makeCode(this.tab),(new s(f,o)).compileToFragments(e,A),this.makeCode(";\n"))}return r},t}(et),t.Switch=$=function(e){function t(e,t,n){this.subject=e,this.cases=t,this.otherwise=n}return Tt(t,e),t.prototype.children=["subject","cases","otherwise"],t.prototype.isStatement=tt,t.prototype.jumps=function(e){var t,n,r,i,s,o,u,a;e==null&&(e={block:!0}),o=this.cases;for(i=0,s=o.length;i<s;i++){u=o[i],n=u[0],t=u[1];if(r=t.jumps(e))return r}return(a=this.otherwise)!=null?a.jumps(e):void 0},t.prototype.makeReturn=function(e){var t,n,r,i,s;i=this.cases;for(n=0,r=i.length;n<r;n++)t=i[n],t[1].makeReturn(e);return e&&(this.otherwise||(this.otherwise=new u([new O("void 0")]))),(s=this.otherwise)!=null&&s.makeReturn(e),this},t.prototype.compileNode=function(e){var t,n,r,i,s,o,u,a,f,l,c,h,p,d,v,m;a=e.indent+J,f=e.indent=a+J,o=[].concat(this.makeCode(this.tab+"switch ("),this.subject?this.subject.compileToFragments(e,L):this.makeCode("false"),this.makeCode(") {\n")),d=this.cases;for(u=l=0,h=d.length;l<h;u=++l){v=d[u],i=v[0],t=v[1],m=ut([i]);for(c=0,p=m.length;c<p;c++)r=m[c],this.subject||(r=r.invert()),o=o.concat(this.makeCode(a+"case "),r.compileToFragments(e,L),this.makeCode(":\n"));(n=t.compileToFragments(e,A)).length>0&&(o=o.concat(n,this.makeCode("\n")));if(u===this.cases.length-1&&!this.otherwise)break;s=this.lastNonComment(t.expressions);if(s instanceof R||s instanceof O&&s.jumps()&&s.value!=="debugger")continue;o.push(r.makeCode(f+"break;\n"))}return this.otherwise&&this.otherwise.expressions.length&&o.push.apply(o,[this.makeCode(a+"default:\n")].concat(Ct.call(this.otherwise.compileToFragments(e,A)),[this.makeCode("\n")])),o.push(this.makeCode(this.tab+"}")),o},t}(o),t.If=E=function(e){function t(e,t,n){this.body=t,n==null&&(n={}),this.condition=n.type==="unless"?e.invert():e,this.elseBody=null,this.isChain=!1,this.soak=n.soak}return Tt(t,e),t.prototype.children=["condition","body","elseBody"],t.prototype.bodyNode=function(){var e;return(e=this.body)!=null?e.unwrap():void 0},t.prototype.elseBodyNode=function(){var e;return(e=this.elseBody)!=null?e.unwrap():void 0},t.prototype.addElse=function(e){return this.isChain?this.elseBodyNode().addElse(e):(this.isChain=e instanceof t,this.elseBody=this.ensureBlock(e),this.elseBody.updateLocationDataIfMissing(e.locationData)),this},t.prototype.isStatement=function(e){var t;return(e!=null?e.level:void 0)===A||this.bodyNode().isStatement(e)||((t=this.elseBodyNode())!=null?t.isStatement(e):void 0)},t.prototype.jumps=function(e){var t;return this.body.jumps(e)||((t=this.elseBody)!=null?t.jumps(e):void 0)},t.prototype.compileNode=function(e){return this.isStatement(e)?this.compileStatement(e):this.compileExpression(e)},t.prototype.makeReturn=function(e){return e&&(this.elseBody||(this.elseBody=new u([new O("void 0")]))),this.body&&(this.body=new u([this.body.makeReturn(e)])),this.elseBody&&(this.elseBody=new u([this.elseBody.makeReturn(e)])),this},t.prototype.ensureBlock=function(e){return e instanceof u?e:new u([e])},t.prototype.compileStatement=function(e){var n,r,i,s,o,u,a;return i=it(e,"chainChild"),o=it(e,"isExistentialEquals"),o?(new t(this.condition.invert(),this.elseBodyNode(),{type:"if"})).compileToFragments(e):(a=e.indent+J,s=this.condition.compileToFragments(e,L),r=this.ensureBlock(this.body).compileToFragments(pt(e,{indent:a})),u=[].concat(this.makeCode("if ("),s,this.makeCode(") {\n"),r,this.makeCode("\n"+this.tab+"}")),i||u.unshift(this.makeCode(this.tab)),this.elseBody?(n=u.concat(this.makeCode(" else ")),this.isChain?(e.chainChild=!0,n=n.concat(this.elseBody.unwrap().compileToFragments(e,A))):n=n.concat(this.makeCode("{\n"),this.elseBody.compileToFragments(pt(e,{indent:a}),A),this.makeCode("\n"+this.tab+"}")),n):u)},t.prototype.compileExpression=function(e){var t,n,r,i;return r=this.condition.compileToFragments(e,N),n=this.bodyNode().compileToFragments(e,C),t=this.elseBodyNode()?this.elseBodyNode().compileToFragments(e,C):[this.makeCode("void 0")],i=r.concat(this.makeCode(" ? "),n,this.makeCode(" : "),t),e.level>=N?this.wrapInBraces(i):i},t.prototype.unfoldSoak=function(){return this.soak&&this},t}(o),Y={"extends":function(){return"function(child, parent) { for (var key in parent) { if ("+wt("hasProp")+".call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }"},bind:function(){return"function(fn, me){ return function(){ return fn.apply(me, arguments); }; }"},indexOf:function(){return"[].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }"},hasProp:function(){return"{}.hasOwnProperty"},slice:function(){return"[].slice"}},A=1,L=2,C=3,N=4,k=5,T=6,J="  ",y="[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*",g=RegExp("^"+y+"$"),U=/^[+-]?\d+$/,m=/^[+-]?0x[\da-f]+/i,P=/^[+-]?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)$/i,M=RegExp("^("+y+")(\\.prototype)?(?:\\.("+y+")|\\[(\"(?:[^\\\\\"\\r\\n]|\\\\.)*\"|'(?:[^\\\\'\\r\\n]|\\\\.)*')\\]|\\[(0x[\\da-fA-F]+|\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\])$"),w=/^['"]/,b=/^\//,wt=function(e){var t;return t="__"+e,W.root.assign(t,Y[e]()),t},dt=function(e,t){return e=e.replace(/\n/g,"$&"+t),e.replace(/\s+$/,"")},vt=function(e){return e==null?0:e.match(m)?parseInt(e,16):parseFloat(e)},ft=function(e){return e instanceof O&&e.value==="arguments"&&!e.asKey},lt=function(e){return e instanceof O&&e.value==="this"&&!e.asKey||e instanceof l&&e.bound||e instanceof a&&e.isSuper},bt=function(e,t,n){var r;if(!(r=t[n].unfoldSoak(e)))return;return t[n]=r.body,r.body=new Z(t),r}}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(e,t,n){function r(){}function i(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(t){}}function s(e){return e=+e,e!==e?e=0:e!==0&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}function o(e){var t=typeof e;return e===null||t==="undefined"||t==="boolean"||t==="number"||t==="string"}function u(e){var t,n,r;if(o(e))return e;n=e.valueOf;if(typeof n=="function"){t=n.call(e);if(o(t))return t}r=e.toString;if(typeof r=="function"){t=r.call(e);if(o(t))return t}throw new TypeError}Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if(typeof t!="function")throw new TypeError("Function.prototype.bind called on incompatible "+t);var n=c.call(arguments,1),i=function(){if(this instanceof i){var r=t.apply(this,n.concat(c.call(arguments)));return Object(r)===r?r:this}return t.apply(e,n.concat(c.call(arguments)))};return t.prototype&&(r.prototype=t.prototype,i.prototype=new r,r.prototype=null),i});var a=Function.prototype.call,f=Array.prototype,l=Object.prototype,c=f.slice,h=a.bind(l.toString),p=a.bind(l.hasOwnProperty),d,v,m,g,y;if(y=p(l,"__defineGetter__"))d=a.bind(l.__defineGetter__),v=a.bind(l.__defineSetter__),m=a.bind(l.__lookupGetter__),g=a.bind(l.__lookupSetter__);if([1,2].splice(0).length!=2)if(!function(){function e(e){var t=new Array(e+2);return t[0]=t[1]=0,t}var t=[],n;t.splice.apply(t,e(20)),t.splice.apply(t,e(26)),n=t.length,t.splice(5,0,"XXX"),n+1==t.length;if(n+1==t.length)return!0}())Array.prototype.splice=function(e,t){var n=this.length;e>0?e>n&&(e=n):e==void 0?e=0:e<0&&(e=Math.max(n+e,0)),e+t<n||(t=n-e);var r=this.slice(e,e+t),i=c.call(arguments,2),s=i.length;if(e===n)s&&this.push.apply(this,i);else{var o=Math.min(t,n-e),u=e+o,a=u+s-o,f=n-u,l=n-o;if(a<u)for(var h=0;h<f;++h)this[a+h]=this[u+h];else if(a>u)for(h=f;h--;)this[a+h]=this[u+h];if(s&&e===l)this.length=l,this.push.apply(this,i);else{this.length=l+s;for(h=0;h<s;++h)this[e+h]=i[h]}}return r};else{var b=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?b.apply(this,[e===void 0?0:e,t===void 0?this.length-e:t].concat(c.call(arguments,2))):[]}}Array.isArray||(Array.isArray=function(e){return h(e)=="[object Array]"});var w=Object("a"),E=w[0]!="a"||!(0 in w);Array.prototype.forEach||(Array.prototype.forEach=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=arguments[1],i=-1,s=n.length>>>0;if(h(e)!="[object Function]")throw new TypeError;while(++i<s)i in n&&e.call(r,n[i],i,t)}),Array.prototype.map||(Array.prototype.map=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=Array(r),s=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var o=0;o<r;o++)o in n&&(i[o]=e.call(s,n[o],o,t));return i}),Array.prototype.filter||(Array.prototype.filter=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=[],s,o=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var u=0;u<r;u++)u in n&&(s=n[u],e.call(o,s,u,t)&&i.push(s));return i}),Array.prototype.every||(Array.prototype.every=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var s=0;s<r;s++)if(s in n&&!e.call(i,n[s],s,t))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var s=0;s<r;s++)if(s in n&&e.call(i,n[s],s,t))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0;if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");if(!r&&arguments.length==1)throw new TypeError("reduce of empty array with no initial value");var i=0,s;if(arguments.length>=2)s=arguments[1];else do{if(i in n){s=n[i++];break}if(++i>=r)throw new TypeError("reduce of empty array with no initial value")}while(!0);for(;i<r;i++)i in n&&(s=e.call(void 0,s,n[i],i,t));return s}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0;if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");if(!r&&arguments.length==1)throw new TypeError("reduceRight of empty array with no initial value");var i,s=r-1;if(arguments.length>=2)i=arguments[1];else do{if(s in n){i=n[s--];break}if(--s<0)throw new TypeError("reduceRight of empty array with no initial value")}while(!0);do s in this&&(i=e.call(void 0,i,n[s],s,t));while(s--);return i});if(!Array.prototype.indexOf||[0,1].indexOf(1,2)!=-1)Array.prototype.indexOf=function(e){var t=E&&h(this)=="[object String]"?this.split(""):F(this),n=t.length>>>0;if(!n)return-1;var r=0;arguments.length>1&&(r=s(arguments[1])),r=r>=0?r:Math.max(0,n+r);for(;r<n;r++)if(r in t&&t[r]===e)return r;return-1};if(!Array.prototype.lastIndexOf||[0,1].lastIndexOf(0,-3)!=-1)Array.prototype.lastIndexOf=function(e){var t=E&&h(this)=="[object String]"?this.split(""):F(this),n=t.length>>>0;if(!n)return-1;var r=n-1;arguments.length>1&&(r=Math.min(r,s(arguments[1]))),r=r>=0?r:n-Math.abs(r);for(;r>=0;r--)if(r in t&&e===t[r])return r;return-1};Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__||(e.constructor?e.constructor.prototype:l)});if(!Object.getOwnPropertyDescriptor){var S="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(e,t){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError(S+e);if(!p(e,t))return;var n,r,i;n={enumerable:!0,configurable:!0};if(y){var s=e.__proto__;e.__proto__=l;var r=m(e,t),i=g(e,t);e.__proto__=s;if(r||i)return r&&(n.get=r),i&&(n.set=i),n}return n.value=e[t],n}}Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){return Object.keys(e)});if(!Object.create){var x;Object.prototype.__proto__===null?x=function(){return{__proto__:null}}:x=function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(e,t){var n;if(e===null)n=x();else{if(typeof e!="object")throw new TypeError("typeof prototype["+typeof e+"] != 'object'");var r=function(){};r.prototype=e,n=new r,n.__proto__=e}return t!==void 0&&Object.defineProperties(n,t),n}}if(Object.defineProperty){var T=i({}),N=typeof document=="undefined"||i(document.createElement("div"));if(!T||!N)var C=Object.defineProperty}if(!Object.defineProperty||C){var k="Property description must be an object: ",L="Object.defineProperty called on non-object: ",A="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(e,t,n){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError(L+e);if(typeof n!="object"&&typeof n!="function"||n===null)throw new TypeError(k+n);if(C)try{return C.call(Object,e,t,n)}catch(r){}if(p(n,"value"))if(y&&(m(e,t)||g(e,t))){var i=e.__proto__;e.__proto__=l,delete e[t],e[t]=n.value,e.__proto__=i}else e[t]=n.value;else{if(!y)throw new TypeError(A);p(n,"get")&&d(e,t,n.get),p(n,"set")&&v(e,t,n.set)}return e}}Object.defineProperties||(Object.defineProperties=function(e,t){for(var n in t)p(t,n)&&Object.defineProperty(e,n,t[n]);return e}),Object.seal||(Object.seal=function(e){return e}),Object.freeze||(Object.freeze=function(e){return e});try{Object.freeze(function(){})}catch(O){Object.freeze=function(e){return function(t){return typeof t=="function"?t:e(t)}}(Object.freeze)}Object.preventExtensions||(Object.preventExtensions=function(e){return e}),Object.isSealed||(Object.isSealed=function(e){return!1}),Object.isFrozen||(Object.isFrozen=function(e){return!1}),Object.isExtensible||(Object.isExtensible=function(e){if(Object(e)===e)throw new TypeError;var t="";while(p(e,t))t+="?";e[t]=!0;var n=p(e,t);return delete e[t],n});if(!Object.keys){var M=!0,_=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],D=_.length;for(var P in{toString:null})M=!1;Object.keys=function I(e){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError("Object.keys called on a non-object");var I=[];for(var t in e)p(e,t)&&I.push(t);if(M)for(var n=0,r=D;n<r;n++){var i=_[n];p(e,i)&&I.push(i)}return I}}Date.now||(Date.now=function(){return(new Date).getTime()});var H="	\n\f\r   ᠎              \u2028\u2029";if(!String.prototype.trim||H.trim()){H="["+H+"]";var B=new RegExp("^"+H+H+"*"),j=new RegExp(H+H+"*$");String.prototype.trim=function(){return String(this).replace(B,"").replace(j,"")}}var F=function(e){if(e==null)throw new TypeError("can't convert "+e+" to object");return Object(e)}}),ace.define("ace/mode/coffee/scope",["require","exports","module","ace/mode/coffee/helpers"],function(e,t,n){var r,i,s,o;o=e("./helpers"),i=o.extend,s=o.last,t.Scope=r=function(){function e(t,n,r){this.parent=t,this.expressions=n,this.method=r,this.variables=[{name:"arguments",type:"arguments"}],this.positions={},this.parent||(e.root=this)}return e.root=null,e.prototype.add=function(e,t,n){return this.shared&&!n?this.parent.add(e,t,n):Object.prototype.hasOwnProperty.call(this.positions,e)?this.variables[this.positions[e]].type=t:this.positions[e]=this.variables.push({name:e,type:t})-1},e.prototype.namedMethod=function(){var e;return((e=this.method)!=null?e.name:void 0)||!this.parent?this.method:this.parent.namedMethod()},e.prototype.find=function(e){return this.check(e)?!0:(this.add(e,"var"),!1)},e.prototype.parameter=function(e){if(this.shared&&this.parent.check(e,!0))return;return this.add(e,"param")},e.prototype.check=function(e){var t;return!!(this.type(e)||((t=this.parent)!=null?t.check(e):void 0))},e.prototype.temporary=function(e,t){return e.length>1?"_"+e+(t>1?t-1:""):"_"+(t+parseInt(e,36)).toString(36).replace(/\d/g,"a")},e.prototype.type=function(e){var t,n,r,i;i=this.variables;for(n=0,r=i.length;n<r;n++){t=i[n];if(t.name===e)return t.type}return null},e.prototype.freeVariable=function(e,t){var n,r;t==null&&(t=!0),n=0;while(this.check(r=this.temporary(e,n)))n++;return t&&this.add(r,"var",!0),r},e.prototype.assign=function(e,t){return this.add(e,{value:t,assigned:!0},!0),this.hasAssignments=!0},e.prototype.hasDeclarations=function(){return!!this.declaredVariables().length},e.prototype.declaredVariables=function(){var e,t,n,r,i,s;e=[],t=[],s=this.variables;for(r=0,i=s.length;r<i;r++)n=s[r],n.type==="var"&&(n.name.charAt(0)==="_"?t:e).push(n.name);return e.sort().concat(t.sort())},e.prototype.assignedVariables=function(){var e,t,n,r,i;r=this.variables,i=[];for(t=0,n=r.length;t<n;t++)e=r[t],e.type.assigned&&i.push(""+e.name+" = "+e.type.value);return i},e}()}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=t.Anchor=function(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),typeof n=="undefined"?this.setPosition(t.row,t.column):this.setPosition(t,n)};(function(){r.implement(this,i),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(e){var t=e.data,n=t.range;if(n.start.row==n.end.row&&n.start.row!=this.row)return;if(n.start.row>this.row)return;if(n.start.row==this.row&&n.start.column>this.column)return;var r=this.row,i=this.column,s=n.start,o=n.end;if(t.action==="insertText")if(s.row===r&&s.column<=i){if(s.column!==i||!this.$insertRight)s.row===o.row?i+=o.column-s.column:(i-=s.column,r+=o.row-s.row)}else s.row!==o.row&&s.row<r&&(r+=o.row-s.row);else t.action==="insertLines"?(s.row!==r||i!==0||!this.$insertRight)&&s.row<=r&&(r+=o.row-s.row):t.action==="removeText"?s.row===r&&s.column<i?o.column>=i?i=s.column:i=Math.max(0,i-(o.column-s.column)):s.row!==o.row&&s.row<r?(o.row===r&&(i=Math.max(0,i-o.column)+s.column),r-=o.row-s.row):o.row===r&&(r-=o.row-s.row,i=Math.max(0,i-o.column)+s.column):t.action=="removeLines"&&s.row<=r&&(o.row<=r?r-=o.row-s.row:(r=s.row,i=0));this.setPosition(r,i,!0)},this.setPosition=function(e,t,n){var r;n?r={row:e,column:t}:r=this.$clipPositionToDocument(e,t);if(this.row==r.row&&this.column==r.column)return;var i={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._signal("change",{old:i,value:r})},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(s.prototype)})
\ No newline at end of file
diff --git a/app/assets/lib/ace/worker-css.js b/app/assets/lib/ace/worker-css.js
new file mode 100644
index 000000000..6cd25316a
--- /dev/null
+++ b/app/assets/lib/ace/worker-css.js
@@ -0,0 +1 @@
+"no use strict";(function(e){if(typeof e.window!="undefined"&&e.document)return;e.console=function(){var e=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:e})},e.console.error=e.console.warn=e.console.log=e.console.trace=e.console,e.window=e,e.ace=e,e.onerror=function(e,t,n,r,i){console.error("Worker "+(i?i.stack:e))},e.normalizeModule=function(t,n){if(n.indexOf("!")!==-1){var r=n.split("!");return e.normalizeModule(t,r[0])+"!"+e.normalizeModule(t,r[1])}if(n.charAt(0)=="."){var i=t.split("/").slice(0,-1).join("/");n=(i?i+"/":"")+n;while(n.indexOf(".")!==-1&&s!=n){var s=n;n=n.replace(/^\.\//,"").replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return n},e.require=function(t,n){n||(n=t,t=null);if(!n.charAt)throw new Error("worker.js require() accepts only (parentId, id) as arguments");n=e.normalizeModule(t,n);var r=e.require.modules[n];if(r)return r.initialized||(r.initialized=!0,r.exports=r.factory().exports),r.exports;var i=n.split("/");if(!e.require.tlns)return console.log("unable to load "+n);i[0]=e.require.tlns[i[0]]||i[0];var s=i.join("/")+".js";return e.require.id=n,importScripts(s),e.require(t,n)},e.require.modules={},e.require.tlns={},e.define=function(t,n,r){arguments.length==2?(r=n,typeof t!="string"&&(n=t,t=e.require.id)):arguments.length==1&&(r=t,n=[],t=e.require.id),n.length||(n=["require","exports","module"]);if(t.indexOf("text!")===0)return;var i=function(n){return e.require(t,n)};e.require.modules[t]={exports:{},factory:function(){var e=this,t=r.apply(this,n.map(function(t){switch(t){case"require":return i;case"exports":return e.exports;case"module":return e;default:return i(t)}}));return t&&(e.exports=t),e}}},e.define.amd={},e.initBaseUrls=function(e){require.tlns=e},e.initSender=function(){var t=e.require("ace/lib/event_emitter").EventEmitter,n=e.require("ace/lib/oop"),r=function(){};return function(){n.implement(this,t),this.callback=function(e,t){postMessage({type:"call",id:t,data:e})},this.emit=function(e,t){postMessage({type:"event",name:e,data:t})}}.call(r.prototype),new r};var t=e.main=null,n=e.sender=null;e.onmessage=function(r){var i=r.data;if(i.command){if(!t[i.command])throw new Error("Unknown command:"+i.command);t[i.command].apply(t,i.args)}else if(i.init){initBaseUrls(i.tlns),require("ace/lib/es5-shim"),n=e.sender=initSender();var s=require(i.module)[i.classname];t=e.main=new s(n)}else i.event&&n&&n._signal(i.event,i.data)}})(this),ace.define("ace/mode/css_worker",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/worker/mirror","ace/mode/css/csslint"],function(e,t,n){var r=e("../lib/oop"),i=e("../lib/lang"),s=e("../worker/mirror").Mirror,o=e("./css/csslint").CSSLint,u=t.Worker=function(e){s.call(this,e),this.setTimeout(400),this.ruleset=null,this.setDisabledRules("ids"),this.setInfoRules("adjoining-classes|qualified-headings|zero-units|gradients|import|outline-none")};r.inherits(u,s),function(){this.setInfoRules=function(e){typeof e=="string"&&(e=e.split("|")),this.infoRules=i.arrayToMap(e),this.doc.getValue()&&this.deferredUpdate.schedule(100)},this.setDisabledRules=function(e){if(!e)this.ruleset=null;else{typeof e=="string"&&(e=e.split("|"));var t={};o.getRules().forEach(function(e){t[e.id]=!0}),e.forEach(function(e){delete t[e]}),this.ruleset=t}this.doc.getValue()&&this.deferredUpdate.schedule(100)},this.onUpdate=function(){var e=this.doc.getValue();if(!e)return this.sender.emit("csslint",[]);var t=this.infoRules,n=o.verify(e,this.ruleset);this.sender.emit("csslint",n.messages.map(function(e){return{row:e.line-1,column:e.col-1,text:e.message,type:t[e.rule.id]?"info":e.type,rule:e.rule.name}}))}}.call(u.prototype)}),ace.define("ace/lib/oop",["require","exports","module"],function(e,t,n){t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}}),ace.define("ace/lib/lang",["require","exports","module"],function(e,t,n){t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){var n="";while(t>0){t&1&&(n+=e);if(t>>=1)e+=e}return n};var r=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(r,"")},t.stringTrimRight=function(e){return e.replace(i,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){var t=[];for(var n=0,r=e.length;n<r;n++)e[n]&&typeof e[n]=="object"?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=function(e){if(typeof e!="object"||!e)return e;var n=e.constructor;if(n===RegExp)return e;var r=n();for(var i in e)typeof e[i]=="object"?r[i]=t.deepCopy(e[i]):r[i]=e[i];return r},t.arrayToMap=function(e){var t={};for(var n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return e.replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,function(e){n.push({offset:arguments[arguments.length-2],length:e.length})}),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},r=function(e){return r.cancel(),t=setTimeout(n,e||0),r};return r.schedule=r,r.call=function(){return this.cancel(),e(),r},r.cancel=function(){return clearTimeout(t),t=null,r},r.isPending=function(){return t},r},t.delayedCall=function(e,t){var n=null,r=function(){n=null,e()},i=function(e){n==null&&(n=setTimeout(r,e||t))};return i.delay=function(e){n&&clearTimeout(n),n=setTimeout(r,e||t)},i.schedule=i,i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){return n},i}}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(e,t,n){function r(){}function i(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(t){}}function s(e){return e=+e,e!==e?e=0:e!==0&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}function o(e){var t=typeof e;return e===null||t==="undefined"||t==="boolean"||t==="number"||t==="string"}function u(e){var t,n,r;if(o(e))return e;n=e.valueOf;if(typeof n=="function"){t=n.call(e);if(o(t))return t}r=e.toString;if(typeof r=="function"){t=r.call(e);if(o(t))return t}throw new TypeError}Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if(typeof t!="function")throw new TypeError("Function.prototype.bind called on incompatible "+t);var n=c.call(arguments,1),i=function(){if(this instanceof i){var r=t.apply(this,n.concat(c.call(arguments)));return Object(r)===r?r:this}return t.apply(e,n.concat(c.call(arguments)))};return t.prototype&&(r.prototype=t.prototype,i.prototype=new r,r.prototype=null),i});var a=Function.prototype.call,f=Array.prototype,l=Object.prototype,c=f.slice,h=a.bind(l.toString),p=a.bind(l.hasOwnProperty),d,v,m,g,y;if(y=p(l,"__defineGetter__"))d=a.bind(l.__defineGetter__),v=a.bind(l.__defineSetter__),m=a.bind(l.__lookupGetter__),g=a.bind(l.__lookupSetter__);if([1,2].splice(0).length!=2)if(!function(){function e(e){var t=new Array(e+2);return t[0]=t[1]=0,t}var t=[],n;t.splice.apply(t,e(20)),t.splice.apply(t,e(26)),n=t.length,t.splice(5,0,"XXX"),n+1==t.length;if(n+1==t.length)return!0}())Array.prototype.splice=function(e,t){var n=this.length;e>0?e>n&&(e=n):e==void 0?e=0:e<0&&(e=Math.max(n+e,0)),e+t<n||(t=n-e);var r=this.slice(e,e+t),i=c.call(arguments,2),s=i.length;if(e===n)s&&this.push.apply(this,i);else{var o=Math.min(t,n-e),u=e+o,a=u+s-o,f=n-u,l=n-o;if(a<u)for(var h=0;h<f;++h)this[a+h]=this[u+h];else if(a>u)for(h=f;h--;)this[a+h]=this[u+h];if(s&&e===l)this.length=l,this.push.apply(this,i);else{this.length=l+s;for(h=0;h<s;++h)this[e+h]=i[h]}}return r};else{var b=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?b.apply(this,[e===void 0?0:e,t===void 0?this.length-e:t].concat(c.call(arguments,2))):[]}}Array.isArray||(Array.isArray=function(e){return h(e)=="[object Array]"});var w=Object("a"),E=w[0]!="a"||!(0 in w);Array.prototype.forEach||(Array.prototype.forEach=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=arguments[1],i=-1,s=n.length>>>0;if(h(e)!="[object Function]")throw new TypeError;while(++i<s)i in n&&e.call(r,n[i],i,t)}),Array.prototype.map||(Array.prototype.map=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=Array(r),s=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var o=0;o<r;o++)o in n&&(i[o]=e.call(s,n[o],o,t));return i}),Array.prototype.filter||(Array.prototype.filter=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=[],s,o=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var u=0;u<r;u++)u in n&&(s=n[u],e.call(o,s,u,t)&&i.push(s));return i}),Array.prototype.every||(Array.prototype.every=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var s=0;s<r;s++)if(s in n&&!e.call(i,n[s],s,t))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var s=0;s<r;s++)if(s in n&&e.call(i,n[s],s,t))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0;if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");if(!r&&arguments.length==1)throw new TypeError("reduce of empty array with no initial value");var i=0,s;if(arguments.length>=2)s=arguments[1];else do{if(i in n){s=n[i++];break}if(++i>=r)throw new TypeError("reduce of empty array with no initial value")}while(!0);for(;i<r;i++)i in n&&(s=e.call(void 0,s,n[i],i,t));return s}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0;if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");if(!r&&arguments.length==1)throw new TypeError("reduceRight of empty array with no initial value");var i,s=r-1;if(arguments.length>=2)i=arguments[1];else do{if(s in n){i=n[s--];break}if(--s<0)throw new TypeError("reduceRight of empty array with no initial value")}while(!0);do s in this&&(i=e.call(void 0,i,n[s],s,t));while(s--);return i});if(!Array.prototype.indexOf||[0,1].indexOf(1,2)!=-1)Array.prototype.indexOf=function(e){var t=E&&h(this)=="[object String]"?this.split(""):F(this),n=t.length>>>0;if(!n)return-1;var r=0;arguments.length>1&&(r=s(arguments[1])),r=r>=0?r:Math.max(0,n+r);for(;r<n;r++)if(r in t&&t[r]===e)return r;return-1};if(!Array.prototype.lastIndexOf||[0,1].lastIndexOf(0,-3)!=-1)Array.prototype.lastIndexOf=function(e){var t=E&&h(this)=="[object String]"?this.split(""):F(this),n=t.length>>>0;if(!n)return-1;var r=n-1;arguments.length>1&&(r=Math.min(r,s(arguments[1]))),r=r>=0?r:n-Math.abs(r);for(;r>=0;r--)if(r in t&&e===t[r])return r;return-1};Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__||(e.constructor?e.constructor.prototype:l)});if(!Object.getOwnPropertyDescriptor){var S="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(e,t){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError(S+e);if(!p(e,t))return;var n,r,i;n={enumerable:!0,configurable:!0};if(y){var s=e.__proto__;e.__proto__=l;var r=m(e,t),i=g(e,t);e.__proto__=s;if(r||i)return r&&(n.get=r),i&&(n.set=i),n}return n.value=e[t],n}}Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){return Object.keys(e)});if(!Object.create){var x;Object.prototype.__proto__===null?x=function(){return{__proto__:null}}:x=function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(e,t){var n;if(e===null)n=x();else{if(typeof e!="object")throw new TypeError("typeof prototype["+typeof e+"] != 'object'");var r=function(){};r.prototype=e,n=new r,n.__proto__=e}return t!==void 0&&Object.defineProperties(n,t),n}}if(Object.defineProperty){var T=i({}),N=typeof document=="undefined"||i(document.createElement("div"));if(!T||!N)var C=Object.defineProperty}if(!Object.defineProperty||C){var k="Property description must be an object: ",L="Object.defineProperty called on non-object: ",A="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(e,t,n){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError(L+e);if(typeof n!="object"&&typeof n!="function"||n===null)throw new TypeError(k+n);if(C)try{return C.call(Object,e,t,n)}catch(r){}if(p(n,"value"))if(y&&(m(e,t)||g(e,t))){var i=e.__proto__;e.__proto__=l,delete e[t],e[t]=n.value,e.__proto__=i}else e[t]=n.value;else{if(!y)throw new TypeError(A);p(n,"get")&&d(e,t,n.get),p(n,"set")&&v(e,t,n.set)}return e}}Object.defineProperties||(Object.defineProperties=function(e,t){for(var n in t)p(t,n)&&Object.defineProperty(e,n,t[n]);return e}),Object.seal||(Object.seal=function(e){return e}),Object.freeze||(Object.freeze=function(e){return e});try{Object.freeze(function(){})}catch(O){Object.freeze=function(e){return function(t){return typeof t=="function"?t:e(t)}}(Object.freeze)}Object.preventExtensions||(Object.preventExtensions=function(e){return e}),Object.isSealed||(Object.isSealed=function(e){return!1}),Object.isFrozen||(Object.isFrozen=function(e){return!1}),Object.isExtensible||(Object.isExtensible=function(e){if(Object(e)===e)throw new TypeError;var t="";while(p(e,t))t+="?";e[t]=!0;var n=p(e,t);return delete e[t],n});if(!Object.keys){var M=!0,_=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],D=_.length;for(var P in{toString:null})M=!1;Object.keys=function I(e){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError("Object.keys called on a non-object");var I=[];for(var t in e)p(e,t)&&I.push(t);if(M)for(var n=0,r=D;n<r;n++){var i=_[n];p(e,i)&&I.push(i)}return I}}Date.now||(Date.now=function(){return(new Date).getTime()});var H="	\n\f\r   ᠎              \u2028\u2029";if(!String.prototype.trim||H.trim()){H="["+H+"]";var B=new RegExp("^"+H+H+"*"),j=new RegExp(H+H+"*$");String.prototype.trim=function(){return String(this).replace(B,"").replace(j,"")}}var F=function(e){if(e==null)throw new TypeError("can't convert "+e+" to object");return Object(e)}}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,o=e("./anchor").Anchor,u=function(e){this.$lines=[],e.length===0?this.$lines=[""]:Array.isArray(e)?this._insertLines(0,e):this.insert({row:0,column:0},e)};(function(){r.implement(this,i),this.setValue=function(e){var t=this.getLength();this.remove(new s(0,0,t,this.getLine(t-1).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new o(this,e,t)},"aaa".split(/a/).length===0?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){if(this.$newLineMode===e)return;this.$newLineMode=e,this._signal("changeNewLineMode")},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return e=="\r\n"||e=="\r"||e=="\n"},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){if(e.start.row==e.end.row)return this.getLine(e.start.row).substring(e.start.column,e.end.column);var t=this.getLines(e.start.row,e.end.row);t[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;return e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column)),t.join(this.getNewLineCharacter())},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):e.row<0&&(e.row=0),e},this.insert=function(e,t){if(!t||t.length===0)return e;e=this.$clipPosition(e),this.getLength()<=1&&this.$detectNewLine(t);var n=this.$split(t),r=n.splice(0,1)[0],i=n.length==0?null:n.splice(n.length-1,1)[0];return e=this.insertInLine(e,r),i!==null&&(e=this.insertNewLine(e),e=this._insertLines(e.row,n),e=this.insertInLine(e,i||"")),e},this.insertLines=function(e,t){return e>=this.getLength()?this.insert({row:e,column:0},"\n"+t.join("\n")):this._insertLines(Math.max(e,0),t)},this._insertLines=function(e,t){if(t.length==0)return{row:e,column:0};while(t.length>61440){var n=this._insertLines(e,t.slice(0,61440));t=t.slice(61440),e=n.row}var r=[e,0];r.push.apply(r,t),this.$lines.splice.apply(this.$lines,r);var i=new s(e,0,e+t.length,0),o={action:"insertLines",range:i,lines:t};return this._signal("change",{data:o}),i.end},this.insertNewLine=function(e){e=this.$clipPosition(e);var t=this.$lines[e.row]||"";this.$lines[e.row]=t.substring(0,e.column),this.$lines.splice(e.row+1,0,t.substring(e.column,t.length));var n={row:e.row+1,column:0},r={action:"insertText",range:s.fromPoints(e,n),text:this.getNewLineCharacter()};return this._signal("change",{data:r}),n},this.insertInLine=function(e,t){if(t.length==0)return e;var n=this.$lines[e.row]||"";this.$lines[e.row]=n.substring(0,e.column)+t+n.substring(e.column);var r={row:e.row,column:e.column+t.length},i={action:"insertText",range:s.fromPoints(e,r),text:t};return this._signal("change",{data:i}),r},this.remove=function(e){e instanceof s||(e=s.fromPoints(e.start,e.end)),e.start=this.$clipPosition(e.start),e.end=this.$clipPosition(e.end);if(e.isEmpty())return e.start;var t=e.start.row,n=e.end.row;if(e.isMultiLine()){var r=e.start.column==0?t:t+1,i=n-1;e.end.column>0&&this.removeInLine(n,0,e.end.column),i>=r&&this._removeLines(r,i),r!=t&&(this.removeInLine(t,e.start.column,this.getLine(t).length),this.removeNewLine(e.start.row))}else this.removeInLine(t,e.start.column,e.end.column);return e.start},this.removeInLine=function(e,t,n){if(t==n)return;var r=new s(e,t,e,n),i=this.getLine(e),o=i.substring(t,n),u=i.substring(0,t)+i.substring(n,i.length);this.$lines.splice(e,1,u);var a={action:"removeText",range:r,text:o};return this._signal("change",{data:a}),r.start},this.removeLines=function(e,t){return e<0||t>=this.getLength()?this.remove(new s(e,0,t+1,0)):this._removeLines(e,t)},this._removeLines=function(e,t){var n=new s(e,0,t+1,0),r=this.$lines.splice(e,t-e+1),i={action:"removeLines",range:n,nl:this.getNewLineCharacter(),lines:r};return this._signal("change",{data:i}),r},this.removeNewLine=function(e){var t=this.getLine(e),n=this.getLine(e+1),r=new s(e,t.length,e+1,0),i=t+n;this.$lines.splice(e,2,i);var o={action:"removeText",range:r,text:this.getNewLineCharacter()};this._signal("change",{data:o})},this.replace=function(e,t){e instanceof s||(e=s.fromPoints(e.start,e.end));if(t.length==0&&e.isEmpty())return e.start;if(t==this.getTextRange(e))return e.end;this.remove(e);if(t)var n=this.insert(e.start,t);else n=e.start;return n},this.applyDeltas=function(e){for(var t=0;t<e.length;t++){var n=e[t],r=s.fromPoints(n.range.start,n.range.end);n.action=="insertLines"?this.insertLines(r.start.row,n.lines):n.action=="insertText"?this.insert(r.start,n.text):n.action=="removeLines"?this._removeLines(r.start.row,r.end.row-1):n.action=="removeText"&&this.remove(r)}},this.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--){var n=e[t],r=s.fromPoints(n.range.start,n.range.end);n.action=="insertLines"?this._removeLines(r.start.row,r.end.row-1):n.action=="insertText"?this.remove(r):n.action=="removeLines"?this._insertLines(r.start.row,n.lines):n.action=="removeText"&&this.insert(r.start,n.text)}},this.indexToPosition=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length;for(var i=t||0,s=n.length;i<s;i++){e-=n[i].length+r;if(e<0)return{row:i,column:e+n[i].length+r}}return{row:s-1,column:n[s-1].length}},this.positionToIndex=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=0,s=Math.min(e.row,n.length);for(var o=t||0;o<s;++o)i+=n[o].length+r;return i+e.column}}).call(u.prototype),t.Document=u}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,t,n){var r={},i=function(){this.propagationStopped=!0},s=function(){this.defaultPrevented=!0};r._emit=r._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],r=this._defaultHandlers[e];if(!n.length&&!r)return;if(typeof t!="object"||!t)t={};t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=i),t.preventDefault||(t.preventDefault=s),n=n.slice();for(var o=0;o<n.length;o++){n[o](t,this);if(t.propagationStopped)break}if(r&&!t.defaultPrevented)return r(t,this)},r._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(!n)return;n=n.slice();for(var r=0;r<n.length;r++)n[r](t,this)},r.once=function(e,t){var n=this;t&&this.addEventListener(e,function r(){n.removeEventListener(e,r),t.apply(null,arguments)})},r.setDefaultHandler=function(e,t){var n=this._defaultHandlers;n||(n=this._defaultHandlers={_disabled_:{}});if(n[e]){var r=n[e],i=n._disabled_[e];i||(n._disabled_[e]=i=[]),i.push(r);var s=i.indexOf(t);s!=-1&&i.splice(s,1)}n[e]=t},r.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(!n)return;var r=n._disabled_[e];if(n[e]==t){var i=n[e];r&&this.setDefaultHandler(e,r.pop())}else if(r){var s=r.indexOf(t);s!=-1&&r.splice(s,1)}},r.on=r.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[e];return r||(r=this._eventRegistry[e]=[]),r.indexOf(t)==-1&&r[n?"unshift":"push"](t),t},r.off=r.removeListener=r.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(!n)return;var r=n.indexOf(t);r!==-1&&n.splice(r,1)},r.removeAllListeners=function(e){this._eventRegistry&&(this._eventRegistry[e]=[])},t.EventEmitter=r}),ace.define("ace/range",["require","exports","module"],function(e,t,n){var r=function(e,t){return e.row-t.row||e.column-t.column},i=function(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return this.compare(e,t)==0},this.compareRange=function(e){var t,n=e.end,r=e.start;return t=this.compare(n.row,n.column),t==1?(t=this.compare(r.row,r.column),t==1?2:t==0?1:0):t==-1?-2:(t=this.compare(r.row,r.column),t==-1?-1:t==1?42:0)},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return this.comparePoint(e.start)==0&&this.comparePoint(e.end)==0},this.intersects=function(e){var t=this.compareRange(e);return t==-1||t==0||t==1},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){typeof e=="object"?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){typeof e=="object"?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)||this.isStart(e,t)?!1:!0:!1},this.insideStart=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)?!1:!0:!1},this.insideEnd=function(e,t){return this.compare(e,t)==0?this.isStart(e,t)?!1:!0:!1},this.compare=function(e,t){return!this.isMultiLine()&&e===this.start.row?t<this.start.column?-1:t>this.end.column?1:0:e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else if(this.end.row<e)var n={row:e,column:0};if(this.start.row>t)var r={row:t+1,column:0};else if(this.start.row<e)var r={row:e,column:0};return i.fromPoints(r||this.start,n||this.end)},this.extend=function(e,t){var n=this.compare(e,t);if(n==0)return this;if(n==-1)var r={row:e,column:t};else var s={row:e,column:t};return i.fromPoints(r||this.start,s||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return i.fromPoints(this.start,this.end)},this.collapseRows=function(){return this.end.column==0?new i(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new i(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),n=e.documentToScreenPosition(this.end);return new i(t.row,t.column,n.row,n.column)},this.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t}}).call(i.prototype),i.fromPoints=function(e,t){return new i(e.row,e.column,t.row,t.column)},i.comparePoints=r,i.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=i}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=t.Anchor=function(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),typeof n=="undefined"?this.setPosition(t.row,t.column):this.setPosition(t,n)};(function(){r.implement(this,i),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(e){var t=e.data,n=t.range;if(n.start.row==n.end.row&&n.start.row!=this.row)return;if(n.start.row>this.row)return;if(n.start.row==this.row&&n.start.column>this.column)return;var r=this.row,i=this.column,s=n.start,o=n.end;if(t.action==="insertText")if(s.row===r&&s.column<=i){if(s.column!==i||!this.$insertRight)s.row===o.row?i+=o.column-s.column:(i-=s.column,r+=o.row-s.row)}else s.row!==o.row&&s.row<r&&(r+=o.row-s.row);else t.action==="insertLines"?(s.row!==r||i!==0||!this.$insertRight)&&s.row<=r&&(r+=o.row-s.row):t.action==="removeText"?s.row===r&&s.column<i?o.column>=i?i=s.column:i=Math.max(0,i-(o.column-s.column)):s.row!==o.row&&s.row<r?(o.row===r&&(i=Math.max(0,i-o.column)+s.column),r-=o.row-s.row):o.row===r&&(r-=o.row-s.row,i=Math.max(0,i-o.column)+s.column):t.action=="removeLines"&&s.row<=r&&(o.row<=r?r-=o.row-s.row:(r=s.row,i=0));this.setPosition(r,i,!0)},this.setPosition=function(e,t,n){var r;n?r={row:e,column:t}:r=this.$clipPositionToDocument(e,t);if(this.row==r.row&&this.column==r.column)return;var i={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._signal("change",{old:i,value:r})},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(s.prototype)}),ace.define("ace/mode/css/csslint",["require","exports","module"],function(require,exports,module){function Reporter(e,t){this.messages=[],this.stats=[],this.lines=e,this.ruleset=t}var parserlib={};(function(){function e(){this._listeners={}}function t(e){this._input=e.replace(/\n\r?/g,"\n"),this._line=1,this._col=1,this._cursor=0}function n(e,t,n){this.col=n,this.line=t,this.message=e}function r(e,t,n,r){this.col=n,this.line=t,this.text=e,this.type=r}function i(e,n){this._reader=e?new t(e.toString()):null,this._token=null,this._tokenData=n,this._lt=[],this._ltIndex=0,this._ltIndexCache=[]}e.prototype={constructor:e,addListener:function(e,t){this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t)},fire:function(e){typeof e=="string"&&(e={type:e}),typeof e.target!="undefined"&&(e.target=this);if(typeof e.type=="undefined")throw new Error("Event object missing 'type' property.");if(this._listeners[e.type]){var t=this._listeners[e.type].concat();for(var n=0,r=t.length;n<r;n++)t[n].call(this,e)}},removeListener:function(e,t){if(this._listeners[e]){var n=this._listeners[e];for(var r=0,i=n.length;r<i;r++)if(n[r]===t){n.splice(r,1);break}}}},t.prototype={constructor:t,getCol:function(){return this._col},getLine:function(){return this._line},eof:function(){return this._cursor==this._input.length},peek:function(e){var t=null;return e=typeof e=="undefined"?1:e,this._cursor<this._input.length&&(t=this._input.charAt(this._cursor+e-1)),t},read:function(){var e=null;return this._cursor<this._input.length&&(this._input.charAt(this._cursor)=="\n"?(this._line++,this._col=1):this._col++,e=this._input.charAt(this._cursor++)),e},mark:function(){this._bookmark={cursor:this._cursor,line:this._line,col:this._col}},reset:function(){this._bookmark&&(this._cursor=this._bookmark.cursor,this._line=this._bookmark.line,this._col=this._bookmark.col,delete this._bookmark)},readTo:function(e){var t="",n;while(t.length<e.length||t.lastIndexOf(e)!=t.length-e.length){n=this.read();if(!n)throw new Error('Expected "'+e+'" at line '+this._line+", col "+this._col+".");t+=n}return t},readWhile:function(e){var t="",n=this.read();while(n!==null&&e(n))t+=n,n=this.read();return t},readMatch:function(e){var t=this._input.substring(this._cursor),n=null;return typeof e=="string"?t.indexOf(e)===0&&(n=this.readCount(e.length)):e instanceof RegExp&&e.test(t)&&(n=this.readCount(RegExp.lastMatch.length)),n},readCount:function(e){var t="";while(e--)t+=this.read();return t}},n.prototype=new Error,r.fromToken=function(e){return new r(e.value,e.startLine,e.startCol)},r.prototype={constructor:r,valueOf:function(){return this.toString()},toString:function(){return this.text}},i.createTokenData=function(e){var t=[],n={},r=e.concat([]),i=0,s=r.length+1;r.UNKNOWN=-1,r.unshift({name:"EOF"});for(;i<s;i++)t.push(r[i].name),r[r[i].name]=i,r[i].text&&(n[r[i].text]=i);return r.name=function(e){return t[e]},r.type=function(e){return n[e]},r},i.prototype={constructor:i,match:function(e,t){e instanceof Array||(e=[e]);var n=this.get(t),r=0,i=e.length;while(r<i)if(n==e[r++])return!0;return this.unget(),!1},mustMatch:function(e,t){var r;e instanceof Array||(e=[e]);if(!this.match.apply(this,arguments))throw r=this.LT(1),new n("Expected "+this._tokenData[e[0]].name+" at line "+r.startLine+", col "+r.startCol+".",r.startLine,r.startCol)},advance:function(e,t){while(this.LA(0)!==0&&!this.match(e,t))this.get();return this.LA(0)},get:function(e){var t=this._tokenData,n=this._reader,r,i=0,s=t.length,o=!1,u,a;if(this._lt.length&&this._ltIndex>=0&&this._ltIndex<this._lt.length){i++,this._token=this._lt[this._ltIndex++],a=t[this._token.type];while(a.channel!==undefined&&e!==a.channel&&this._ltIndex<this._lt.length)this._token=this._lt[this._ltIndex++],a=t[this._token.type],i++;if((a.channel===undefined||e===a.channel)&&this._ltIndex<=this._lt.length)return this._ltIndexCache.push(i),this._token.type}return u=this._getToken(),u.type>-1&&!t[u.type].hide&&(u.channel=t[u.type].channel,this._token=u,this._lt.push(u),this._ltIndexCache.push(this._lt.length-this._ltIndex+i),this._lt.length>5&&this._lt.shift(),this._ltIndexCache.length>5&&this._ltIndexCache.shift(),this._ltIndex=this._lt.length),a=t[u.type],a&&(a.hide||a.channel!==undefined&&e!==a.channel)?this.get(e):u.type},LA:function(e){var t=e,n;if(e>0){if(e>5)throw new Error("Too much lookahead.");while(t)n=this.get(),t--;while(t<e)this.unget(),t++}else if(e<0){if(!this._lt[this._ltIndex+e])throw new Error("Too much lookbehind.");n=this._lt[this._ltIndex+e].type}else n=this._token.type;return n},LT:function(e){return this.LA(e),this._lt[this._ltIndex+e-1]},peek:function(){return this.LA(1)},token:function(){return this._token},tokenName:function(e){return e<0||e>this._tokenData.length?"UNKNOWN_TOKEN":this._tokenData[e].name},tokenType:function(e){return this._tokenData[e]||-1},unget:function(){if(!this._ltIndexCache.length)throw new Error("Too much lookahead.");this._ltIndex-=this._ltIndexCache.pop(),this._token=this._lt[this._ltIndex-1]}},parserlib.util={StringReader:t,SyntaxError:n,SyntaxUnit:r,EventTarget:e,TokenStreamBase:i}})(),function(){function Combinator(e,t,n){SyntaxUnit.call(this,e,t,n,Parser.COMBINATOR_TYPE),this.type="unknown",/^\s+$/.test(e)?this.type="descendant":e==">"?this.type="child":e=="+"?this.type="adjacent-sibling":e=="~"&&(this.type="sibling")}function MediaFeature(e,t){SyntaxUnit.call(this,"("+e+(t!==null?":"+t:"")+")",e.startLine,e.startCol,Parser.MEDIA_FEATURE_TYPE),this.name=e,this.value=t}function MediaQuery(e,t,n,r,i){SyntaxUnit.call(this,(e?e+" ":"")+(t?t:"")+(t&&n.length>0?" and ":"")+n.join(" and "),r,i,Parser.MEDIA_QUERY_TYPE),this.modifier=e,this.mediaType=t,this.features=n}function Parser(e){EventTarget.call(this),this.options=e||{},this._tokenStream=null}function PropertyName(e,t,n,r){SyntaxUnit.call(this,e,n,r,Parser.PROPERTY_NAME_TYPE),this.hack=t}function PropertyValue(e,t,n){SyntaxUnit.call(this,e.join(" "),t,n,Parser.PROPERTY_VALUE_TYPE),this.parts=e}function PropertyValueIterator(e){this._i=0,this._parts=e.parts,this._marks=[],this.value=e}function PropertyValuePart(text,line,col){SyntaxUnit.call(this,text,line,col,Parser.PROPERTY_VALUE_PART_TYPE),this.type="unknown";var temp;if(/^([+\-]?[\d\.]+)([a-z]+)$/i.test(text)){this.type="dimension",this.value=+RegExp.$1,this.units=RegExp.$2;switch(this.units.toLowerCase()){case"em":case"rem":case"ex":case"px":case"cm":case"mm":case"in":case"pt":case"pc":case"ch":case"vh":case"vw":case"vm":this.type="length";break;case"deg":case"rad":case"grad":this.type="angle";break;case"ms":case"s":this.type="time";break;case"hz":case"khz":this.type="frequency";break;case"dpi":case"dpcm":this.type="resolution"}}else/^([+\-]?[\d\.]+)%$/i.test(text)?(this.type="percentage",this.value=+RegExp.$1):/^([+\-]?\d+)$/i.test(text)?(this.type="integer",this.value=+RegExp.$1):/^([+\-]?[\d\.]+)$/i.test(text)?(this.type="number",this.value=+RegExp.$1):/^#([a-f0-9]{3,6})/i.test(text)?(this.type="color",temp=RegExp.$1,temp.length==3?(this.red=parseInt(temp.charAt(0)+temp.charAt(0),16),this.green=parseInt(temp.charAt(1)+temp.charAt(1),16),this.blue=parseInt(temp.charAt(2)+temp.charAt(2),16)):(this.red=parseInt(temp.substring(0,2),16),this.green=parseInt(temp.substring(2,4),16),this.blue=parseInt(temp.substring(4,6),16))):/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i.test(text)?(this.type="color",this.red=+RegExp.$1,this.green=+RegExp.$2,this.blue=+RegExp.$3):/^rgb\(\s*(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*\)/i.test(text)?(this.type="color",this.red=+RegExp.$1*255/100,this.green=+RegExp.$2*255/100,this.blue=+RegExp.$3*255/100):/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d\.]+)\s*\)/i.test(text)?(this.type="color",this.red=+RegExp.$1,this.green=+RegExp.$2,this.blue=+RegExp.$3,this.alpha=+RegExp.$4):/^rgba\(\s*(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*,\s*([\d\.]+)\s*\)/i.test(text)?(this.type="color",this.red=+RegExp.$1*255/100,this.green=+RegExp.$2*255/100,this.blue=+RegExp.$3*255/100,this.alpha=+RegExp.$4):/^hsl\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*\)/i.test(text)?(this.type="color",this.hue=+RegExp.$1,this.saturation=+RegExp.$2/100,this.lightness=+RegExp.$3/100):/^hsla\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*,\s*([\d\.]+)\s*\)/i.test(text)?(this.type="color",this.hue=+RegExp.$1,this.saturation=+RegExp.$2/100,this.lightness=+RegExp.$3/100,this.alpha=+RegExp.$4):/^url\(["']?([^\)"']+)["']?\)/i.test(text)?(this.type="uri",this.uri=RegExp.$1):/^([^\(]+)\(/i.test(text)?(this.type="function",this.name=RegExp.$1,this.value=text):/^["'][^"']*["']/.test(text)?(this.type="string",this.value=eval(text)):Colors[text.toLowerCase()]?(this.type="color",temp=Colors[text.toLowerCase()].substring(1),this.red=parseInt(temp.substring(0,2),16),this.green=parseInt(temp.substring(2,4),16),this.blue=parseInt(temp.substring(4,6),16)):/^[\,\/]$/.test(text)?(this.type="operator",this.value=text):/^[a-z\-\u0080-\uFFFF][a-z0-9\-\u0080-\uFFFF]*$/i.test(text)&&(this.type="identifier",this.value=text)}function Selector(e,t,n){SyntaxUnit.call(this,e.join(" "),t,n,Parser.SELECTOR_TYPE),this.parts=e,this.specificity=Specificity.calculate(this)}function SelectorPart(e,t,n,r,i){SyntaxUnit.call(this,n,r,i,Parser.SELECTOR_PART_TYPE),this.elementName=e,this.modifiers=t}function SelectorSubPart(e,t,n,r){SyntaxUnit.call(this,e,n,r,Parser.SELECTOR_SUB_PART_TYPE),this.type=t,this.args=[]}function Specificity(e,t,n,r){this.a=e,this.b=t,this.c=n,this.d=r}function isHexDigit(e){return e!==null&&h.test(e)}function isDigit(e){return e!==null&&/\d/.test(e)}function isWhitespace(e){return e!==null&&/\s/.test(e)}function isNewLine(e){return e!==null&&nl.test(e)}function isNameStart(e){return e!==null&&/[a-z_\u0080-\uFFFF\\]/i.test(e)}function isNameChar(e){return e!==null&&(isNameStart(e)||/[0-9\-\\]/.test(e))}function isIdentStart(e){return e!==null&&(isNameStart(e)||/\-\\/.test(e))}function mix(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function TokenStream(e){TokenStreamBase.call(this,e,Tokens)}function ValidationError(e,t,n){this.col=n,this.line=t,this.message=e}var EventTarget=parserlib.util.EventTarget,TokenStreamBase=parserlib.util.TokenStreamBase,StringReader=parserlib.util.StringReader,SyntaxError=parserlib.util.SyntaxError,SyntaxUnit=parserlib.util.SyntaxUnit,Colors={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32",activeBorder:"Active window border.",activecaption:"Active window caption.",appworkspace:"Background color of multiple document interface.",background:"Desktop background.",buttonface:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border.",buttonhighlight:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border.",buttonshadow:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border.",buttontext:"Text on push buttons.",captiontext:"Text in caption, size box, and scrollbar arrow box.",graytext:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color.",greytext:"Greyed (disabled) text. This color is set to #000 if the current display driver does not support a solid grey color.",highlight:"Item(s) selected in a control.",highlighttext:"Text of item(s) selected in a control.",inactiveborder:"Inactive window border.",inactivecaption:"Inactive window caption.",inactivecaptiontext:"Color of text in an inactive caption.",infobackground:"Background color for tooltip controls.",infotext:"Text color for tooltip controls.",menu:"Menu background.",menutext:"Text in menus.",scrollbar:"Scroll bar gray area.",threeddarkshadow:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",threedface:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",threedhighlight:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",threedlightshadow:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",threedshadow:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",window:"Window background.",windowframe:"Window frame.",windowtext:"Text in windows."};Combinator.prototype=new SyntaxUnit,Combinator.prototype.constructor=Combinator,MediaFeature.prototype=new SyntaxUnit,MediaFeature.prototype.constructor=MediaFeature,MediaQuery.prototype=new SyntaxUnit,MediaQuery.prototype.constructor=MediaQuery,Parser.DEFAULT_TYPE=0,Parser.COMBINATOR_TYPE=1,Parser.MEDIA_FEATURE_TYPE=2,Parser.MEDIA_QUERY_TYPE=3,Parser.PROPERTY_NAME_TYPE=4,Parser.PROPERTY_VALUE_TYPE=5,Parser.PROPERTY_VALUE_PART_TYPE=6,Parser.SELECTOR_TYPE=7,Parser.SELECTOR_PART_TYPE=8,Parser.SELECTOR_SUB_PART_TYPE=9,Parser.prototype=function(){var e=new EventTarget,t,n={constructor:Parser,DEFAULT_TYPE:0,COMBINATOR_TYPE:1,MEDIA_FEATURE_TYPE:2,MEDIA_QUERY_TYPE:3,PROPERTY_NAME_TYPE:4,PROPERTY_VALUE_TYPE:5,PROPERTY_VALUE_PART_TYPE:6,SELECTOR_TYPE:7,SELECTOR_PART_TYPE:8,SELECTOR_SUB_PART_TYPE:9,_stylesheet:function(){var e=this._tokenStream,t=null,n,r,i;this.fire("startstylesheet"),this._charset(),this._skipCruft();while(e.peek()==Tokens.IMPORT_SYM)this._import(),this._skipCruft();while(e.peek()==Tokens.NAMESPACE_SYM)this._namespace(),this._skipCruft();i=e.peek();while(i>Tokens.EOF){try{switch(i){case Tokens.MEDIA_SYM:this._media(),this._skipCruft();break;case Tokens.PAGE_SYM:this._page(),this._skipCruft();break;case Tokens.FONT_FACE_SYM:this._font_face(),this._skipCruft();break;case Tokens.KEYFRAMES_SYM:this._keyframes(),this._skipCruft();break;case Tokens.VIEWPORT_SYM:this._viewport(),this._skipCruft();break;case Tokens.UNKNOWN_SYM:e.get();if(!!this.options.strict)throw new SyntaxError("Unknown @ rule.",e.LT(0).startLine,e.LT(0).startCol);this.fire({type:"error",error:null,message:"Unknown @ rule: "+e.LT(0).value+".",line:e.LT(0).startLine,col:e.LT(0).startCol}),n=0;while(e.advance([Tokens.LBRACE,Tokens.RBRACE])==Tokens.LBRACE)n++;while(n)e.advance([Tokens.RBRACE]),n--;break;case Tokens.S:this._readWhitespace();break;default:if(!this._ruleset())switch(i){case Tokens.CHARSET_SYM:throw r=e.LT(1),this._charset(!1),new SyntaxError("@charset not allowed here.",r.startLine,r.startCol);case Tokens.IMPORT_SYM:throw r=e.LT(1),this._import(!1),new SyntaxError("@import not allowed here.",r.startLine,r.startCol);case Tokens.NAMESPACE_SYM:throw r=e.LT(1),this._namespace(!1),new SyntaxError("@namespace not allowed here.",r.startLine,r.startCol);default:e.get(),this._unexpectedToken(e.token())}}}catch(s){if(!(s instanceof SyntaxError&&!this.options.strict))throw s;this.fire({type:"error",error:s,message:s.message,line:s.line,col:s.col})}i=e.peek()}i!=Tokens.EOF&&this._unexpectedToken(e.token()),this.fire("endstylesheet")},_charset:function(e){var t=this._tokenStream,n,r,i,s;t.match(Tokens.CHARSET_SYM)&&(i=t.token().startLine,s=t.token().startCol,this._readWhitespace(),t.mustMatch(Tokens.STRING),r=t.token(),n=r.value,this._readWhitespace(),t.mustMatch(Tokens.SEMICOLON),e!==!1&&this.fire({type:"charset",charset:n,line:i,col:s}))},_import:function(e){var t=this._tokenStream,n,r,i,s=[];t.mustMatch(Tokens.IMPORT_SYM),i=t.token(),this._readWhitespace(),t.mustMatch([Tokens.STRING,Tokens.URI]),r=t.token().value.replace(/(?:url\()?["']([^"']+)["']\)?/,"$1"),this._readWhitespace(),s=this._media_query_list(),t.mustMatch(Tokens.SEMICOLON),this._readWhitespace(),e!==!1&&this.fire({type:"import",uri:r,media:s,line:i.startLine,col:i.startCol})},_namespace:function(e){var t=this._tokenStream,n,r,i,s;t.mustMatch(Tokens.NAMESPACE_SYM),n=t.token().startLine,r=t.token().startCol,this._readWhitespace(),t.match(Tokens.IDENT)&&(i=t.token().value,this._readWhitespace()),t.mustMatch([Tokens.STRING,Tokens.URI]),s=t.token().value.replace(/(?:url\()?["']([^"']+)["']\)?/,"$1"),this._readWhitespace(),t.mustMatch(Tokens.SEMICOLON),this._readWhitespace(),e!==!1&&this.fire({type:"namespace",prefix:i,uri:s,line:n,col:r})},_media:function(){var e=this._tokenStream,t,n,r;e.mustMatch(Tokens.MEDIA_SYM),t=e.token().startLine,n=e.token().startCol,this._readWhitespace(),r=this._media_query_list(),e.mustMatch(Tokens.LBRACE),this._readWhitespace(),this.fire({type:"startmedia",media:r,line:t,col:n});for(;;)if(e.peek()==Tokens.PAGE_SYM)this._page();else if(e.peek()==Tokens.FONT_FACE_SYM)this._font_face();else if(!this._ruleset())break;e.mustMatch(Tokens.RBRACE),this._readWhitespace(),this.fire({type:"endmedia",media:r,line:t,col:n})},_media_query_list:function(){var e=this._tokenStream,t=[];this._readWhitespace(),(e.peek()==Tokens.IDENT||e.peek()==Tokens.LPAREN)&&t.push(this._media_query());while(e.match(Tokens.COMMA))this._readWhitespace(),t.push(this._media_query());return t},_media_query:function(){var e=this._tokenStream,t=null,n=null,r=null,i=[];e.match(Tokens.IDENT)&&(n=e.token().value.toLowerCase(),n!="only"&&n!="not"?(e.unget(),n=null):r=e.token()),this._readWhitespace(),e.peek()==Tokens.IDENT?(t=this._media_type(),r===null&&(r=e.token())):e.peek()==Tokens.LPAREN&&(r===null&&(r=e.LT(1)),i.push(this._media_expression()));if(t===null&&i.length===0)return null;this._readWhitespace();while(e.match(Tokens.IDENT))e.token().value.toLowerCase()!="and"&&this._unexpectedToken(e.token()),this._readWhitespace(),i.push(this._media_expression());return new MediaQuery(n,t,i,r.startLine,r.startCol)},_media_type:function(){return this._media_feature()},_media_expression:function(){var e=this._tokenStream,t=null,n,r=null;return e.mustMatch(Tokens.LPAREN),t=this._media_feature(),this._readWhitespace(),e.match(Tokens.COLON)&&(this._readWhitespace(),n=e.LT(1),r=this._expression()),e.mustMatch(Tokens.RPAREN),this._readWhitespace(),new MediaFeature(t,r?new SyntaxUnit(r,n.startLine,n.startCol):null)},_media_feature:function(){var e=this._tokenStream;return e.mustMatch(Tokens.IDENT),SyntaxUnit.fromToken(e.token())},_page:function(){var e=this._tokenStream,t,n,r=null,i=null;e.mustMatch(Tokens.PAGE_SYM),t=e.token().startLine,n=e.token().startCol,this._readWhitespace(),e.match(Tokens.IDENT)&&(r=e.token().value,r.toLowerCase()==="auto"&&this._unexpectedToken(e.token())),e.peek()==Tokens.COLON&&(i=this._pseudo_page()),this._readWhitespace(),this.fire({type:"startpage",id:r,pseudo:i,line:t,col:n}),this._readDeclarations(!0,!0),this.fire({type:"endpage",id:r,pseudo:i,line:t,col:n})},_margin:function(){var e=this._tokenStream,t,n,r=this._margin_sym();return r?(t=e.token().startLine,n=e.token().startCol,this.fire({type:"startpagemargin",margin:r,line:t,col:n}),this._readDeclarations(!0),this.fire({type:"endpagemargin",margin:r,line:t,col:n}),!0):!1},_margin_sym:function(){var e=this._tokenStream;return e.match([Tokens.TOPLEFTCORNER_SYM,Tokens.TOPLEFT_SYM,Tokens.TOPCENTER_SYM,Tokens.TOPRIGHT_SYM,Tokens.TOPRIGHTCORNER_SYM,Tokens.BOTTOMLEFTCORNER_SYM,Tokens.BOTTOMLEFT_SYM,Tokens.BOTTOMCENTER_SYM,Tokens.BOTTOMRIGHT_SYM,Tokens.BOTTOMRIGHTCORNER_SYM,Tokens.LEFTTOP_SYM,Tokens.LEFTMIDDLE_SYM,Tokens.LEFTBOTTOM_SYM,Tokens.RIGHTTOP_SYM,Tokens.RIGHTMIDDLE_SYM,Tokens.RIGHTBOTTOM_SYM])?SyntaxUnit.fromToken(e.token()):null},_pseudo_page:function(){var e=this._tokenStream;return e.mustMatch(Tokens.COLON),e.mustMatch(Tokens.IDENT),e.token().value},_font_face:function(){var e=this._tokenStream,t,n;e.mustMatch(Tokens.FONT_FACE_SYM),t=e.token().startLine,n=e.token().startCol,this._readWhitespace(),this.fire({type:"startfontface",line:t,col:n}),this._readDeclarations(!0),this.fire({type:"endfontface",line:t,col:n})},_viewport:function(){var e=this._tokenStream,t,n;e.mustMatch(Tokens.VIEWPORT_SYM),t=e.token().startLine,n=e.token().startCol,this._readWhitespace(),this.fire({type:"startviewport",line:t,col:n}),this._readDeclarations(!0),this.fire({type:"endviewport",line:t,col:n})},_operator:function(e){var t=this._tokenStream,n=null;if(t.match([Tokens.SLASH,Tokens.COMMA])||e&&t.match([Tokens.PLUS,Tokens.STAR,Tokens.MINUS]))n=t.token(),this._readWhitespace();return n?PropertyValuePart.fromToken(n):null},_combinator:function(){var e=this._tokenStream,t=null,n;return e.match([Tokens.PLUS,Tokens.GREATER,Tokens.TILDE])&&(n=e.token(),t=new Combinator(n.value,n.startLine,n.startCol),this._readWhitespace()),t},_unary_operator:function(){var e=this._tokenStream;return e.match([Tokens.MINUS,Tokens.PLUS])?e.token().value:null},_property:function(){var e=this._tokenStream,t=null,n=null,r,i,s,o;return e.peek()==Tokens.STAR&&this.options.starHack&&(e.get(),i=e.token(),n=i.value,s=i.startLine,o=i.startCol),e.match(Tokens.IDENT)&&(i=e.token(),r=i.value,r.charAt(0)=="_"&&this.options.underscoreHack&&(n="_",r=r.substring(1)),t=new PropertyName(r,n,s||i.startLine,o||i.startCol),this._readWhitespace()),t},_ruleset:function(){var e=this._tokenStream,t,n;try{n=this._selectors_group()}catch(r){if(r instanceof SyntaxError&&!this.options.strict){this.fire({type:"error",error:r,message:r.message,line:r.line,col:r.col}),t=e.advance([Tokens.RBRACE]);if(t!=Tokens.RBRACE)throw r;return!0}throw r}return n&&(this.fire({type:"startrule",selectors:n,line:n[0].line,col:n[0].col}),this._readDeclarations(!0),this.fire({type:"endrule",selectors:n,line:n[0].line,col:n[0].col})),n},_selectors_group:function(){var e=this._tokenStream,t=[],n;n=this._selector();if(n!==null){t.push(n);while(e.match(Tokens.COMMA))this._readWhitespace(),n=this._selector(),n!==null?t.push(n):this._unexpectedToken(e.LT(1))}return t.length?t:null},_selector:function(){var e=this._tokenStream,t=[],n=null,r=null,i=null;n=this._simple_selector_sequence();if(n===null)return null;t.push(n);do{r=this._combinator();if(r!==null)t.push(r),n=this._simple_selector_sequence(),n===null?this._unexpectedToken(e.LT(1)):t.push(n);else{if(!this._readWhitespace())break;i=new Combinator(e.token().value,e.token().startLine,e.token().startCol),r=this._combinator(),n=this._simple_selector_sequence(),n===null?r!==null&&this._unexpectedToken(e.LT(1)):(r!==null?t.push(r):t.push(i),t.push(n))}}while(!0);return new Selector(t,t[0].line,t[0].col)},_simple_selector_sequence:function(){var e=this._tokenStream,t=null,n=[],r="",i=[function(){return e.match(Tokens.HASH)?new SelectorSubPart(e.token().value,"id",e.token().startLine,e.token().startCol):null},this._class,this._attrib,this._pseudo,this._negation],s=0,o=i.length,u=null,a=!1,f,l;f=e.LT(1).startLine,l=e.LT(1).startCol,t=this._type_selector(),t||(t=this._universal()),t!==null&&(r+=t);for(;;){if(e.peek()===Tokens.S)break;while(s<o&&u===null)u=i[s++].call(this);if(u===null){if(r==="")return null;break}s=0,n.push(u),r+=u.toString(),u=null}return r!==""?new SelectorPart(t,n,r,f,l):null},_type_selector:function(){var e=this._tokenStream,t=this._namespace_prefix(),n=this._element_name();return n?(t&&(n.text=t+n.text,n.col-=t.length),n):(t&&(e.unget(),t.length>1&&e.unget()),null)},_class:function(){var e=this._tokenStream,t;return e.match(Tokens.DOT)?(e.mustMatch(Tokens.IDENT),t=e.token(),new SelectorSubPart("."+t.value,"class",t.startLine,t.startCol-1)):null},_element_name:function(){var e=this._tokenStream,t;return e.match(Tokens.IDENT)?(t=e.token(),new SelectorSubPart(t.value,"elementName",t.startLine,t.startCol)):null},_namespace_prefix:function(){var e=this._tokenStream,t="";if(e.LA(1)===Tokens.PIPE||e.LA(2)===Tokens.PIPE)e.match([Tokens.IDENT,Tokens.STAR])&&(t+=e.token().value),e.mustMatch(Tokens.PIPE),t+="|";return t.length?t:null},_universal:function(){var e=this._tokenStream,t="",n;return n=this._namespace_prefix(),n&&(t+=n),e.match(Tokens.STAR)&&(t+="*"),t.length?t:null},_attrib:function(){var e=this._tokenStream,t=null,n,r;return e.match(Tokens.LBRACKET)?(r=e.token(),t=r.value,t+=this._readWhitespace(),n=this._namespace_prefix(),n&&(t+=n),e.mustMatch(Tokens.IDENT),t+=e.token().value,t+=this._readWhitespace(),e.match([Tokens.PREFIXMATCH,Tokens.SUFFIXMATCH,Tokens.SUBSTRINGMATCH,Tokens.EQUALS,Tokens.INCLUDES,Tokens.DASHMATCH])&&(t+=e.token().value,t+=this._readWhitespace(),e.mustMatch([Tokens.IDENT,Tokens.STRING]),t+=e.token().value,t+=this._readWhitespace()),e.mustMatch(Tokens.RBRACKET),new SelectorSubPart(t+"]","attribute",r.startLine,r.startCol)):null},_pseudo:function(){var e=this._tokenStream,t=null,n=":",r,i;return e.match(Tokens.COLON)&&(e.match(Tokens.COLON)&&(n+=":"),e.match(Tokens.IDENT)?(t=e.token().value,r=e.token().startLine,i=e.token().startCol-n.length):e.peek()==Tokens.FUNCTION&&(r=e.LT(1).startLine,i=e.LT(1).startCol-n.length,t=this._functional_pseudo()),t&&(t=new SelectorSubPart(n+t,"pseudo",r,i))),t},_functional_pseudo:function(){var e=this._tokenStream,t=null;return e.match(Tokens.FUNCTION)&&(t=e.token().value,t+=this._readWhitespace(),t+=this._expression(),e.mustMatch(Tokens.RPAREN),t+=")"),t},_expression:function(){var e=this._tokenStream,t="";while(e.match([Tokens.PLUS,Tokens.MINUS,Tokens.DIMENSION,Tokens.NUMBER,Tokens.STRING,Tokens.IDENT,Tokens.LENGTH,Tokens.FREQ,Tokens.ANGLE,Tokens.TIME,Tokens.RESOLUTION,Tokens.SLASH]))t+=e.token().value,t+=this._readWhitespace();return t.length?t:null},_negation:function(){var e=this._tokenStream,t,n,r="",i,s=null;return e.match(Tokens.NOT)&&(r=e.token().value,t=e.token().startLine,n=e.token().startCol,r+=this._readWhitespace(),i=this._negation_arg(),r+=i,r+=this._readWhitespace(),e.match(Tokens.RPAREN),r+=e.token().value,s=new SelectorSubPart(r,"not",t,n),s.args.push(i)),s},_negation_arg:function(){var e=this._tokenStream,t=[this._type_selector,this._universal,function(){return e.match(Tokens.HASH)?new SelectorSubPart(e.token().value,"id",e.token().startLine,e.token().startCol):null},this._class,this._attrib,this._pseudo],n=null,r=0,i=t.length,s,o,u,a;o=e.LT(1).startLine,u=e.LT(1).startCol;while(r<i&&n===null)n=t[r].call(this),r++;return n===null&&this._unexpectedToken(e.LT(1)),n.type=="elementName"?a=new SelectorPart(n,[],n.toString(),o,u):a=new SelectorPart(null,[n],n.toString(),o,u),a},_declaration:function(){var e=this._tokenStream,t=null,n=null,r=null,i=null,s=null,o="";t=this._property();if(t!==null){e.mustMatch(Tokens.COLON),this._readWhitespace(),n=this._expr(),(!n||n.length===0)&&this._unexpectedToken(e.LT(1)),r=this._prio(),o=t.toString();if(this.options.starHack&&t.hack=="*"||this.options.underscoreHack&&t.hack=="_")o=t.text;try{this._validateProperty(o,n)}catch(u){s=u}return this.fire({type:"property",property:t,value:n,important:r,line:t.line,col:t.col,invalid:s}),!0}return!1},_prio:function(){var e=this._tokenStream,t=e.match(Tokens.IMPORTANT_SYM);return this._readWhitespace(),t},_expr:function(e){var t=this._tokenStream,n=[],r=null,i=null;r=this._term();if(r!==null){n.push(r);do{i=this._operator(e),i&&n.push(i),r=this._term();if(r===null)break;n.push(r)}while(!0)}return n.length>0?new PropertyValue(n,n[0].line,n[0].col):null},_term:function(){var e=this._tokenStream,t=null,n=null,r,i,s;return t=this._unary_operator(),t!==null&&(i=e.token().startLine,s=e.token().startCol),e.peek()==Tokens.IE_FUNCTION&&this.options.ieFilters?(n=this._ie_function(),t===null&&(i=e.token().startLine,s=e.token().startCol)):e.match([Tokens.NUMBER,Tokens.PERCENTAGE,Tokens.LENGTH,Tokens.ANGLE,Tokens.TIME,Tokens.FREQ,Tokens.STRING,Tokens.IDENT,Tokens.URI,Tokens.UNICODE_RANGE])?(n=e.token().value,t===null&&(i=e.token().startLine,s=e.token().startCol),this._readWhitespace()):(r=this._hexcolor(),r===null?(t===null&&(i=e.LT(1).startLine,s=e.LT(1).startCol),n===null&&(e.LA(3)==Tokens.EQUALS&&this.options.ieFilters?n=this._ie_function():n=this._function())):(n=r.value,t===null&&(i=r.startLine,s=r.startCol))),n!==null?new PropertyValuePart(t!==null?t+n:n,i,s):null},_function:function(){var e=this._tokenStream,t=null,n=null,r;if(e.match(Tokens.FUNCTION)){t=e.token().value,this._readWhitespace(),n=this._expr(!0),t+=n;if(this.options.ieFilters&&e.peek()==Tokens.EQUALS)do{this._readWhitespace()&&(t+=e.token().value),e.LA(0)==Tokens.COMMA&&(t+=e.token().value),e.match(Tokens.IDENT),t+=e.token().value,e.match(Tokens.EQUALS),t+=e.token().value,r=e.peek();while(r!=Tokens.COMMA&&r!=Tokens.S&&r!=Tokens.RPAREN)e.get(),t+=e.token().value,r=e.peek()}while(e.match([Tokens.COMMA,Tokens.S]));e.match(Tokens.RPAREN),t+=")",this._readWhitespace()}return t},_ie_function:function(){var e=this._tokenStream,t=null,n=null,r;if(e.match([Tokens.IE_FUNCTION,Tokens.FUNCTION])){t=e.token().value;do{this._readWhitespace()&&(t+=e.token().value),e.LA(0)==Tokens.COMMA&&(t+=e.token().value),e.match(Tokens.IDENT),t+=e.token().value,e.match(Tokens.EQUALS),t+=e.token().value,r=e.peek();while(r!=Tokens.COMMA&&r!=Tokens.S&&r!=Tokens.RPAREN)e.get(),t+=e.token().value,r=e.peek()}while(e.match([Tokens.COMMA,Tokens.S]));e.match(Tokens.RPAREN),t+=")",this._readWhitespace()}return t},_hexcolor:function(){var e=this._tokenStream,t=null,n;if(e.match(Tokens.HASH)){t=e.token(),n=t.value;if(!/#[a-f0-9]{3,6}/i.test(n))throw new SyntaxError("Expected a hex color but found '"+n+"' at line "+t.startLine+", col "+t.startCol+".",t.startLine,t.startCol);this._readWhitespace()}return t},_keyframes:function(){var e=this._tokenStream,t,n,r,i="";e.mustMatch(Tokens.KEYFRAMES_SYM),t=e.token(),/^@\-([^\-]+)\-/.test(t.value)&&(i=RegExp.$1),this._readWhitespace(),r=this._keyframe_name(),this._readWhitespace(),e.mustMatch(Tokens.LBRACE),this.fire({type:"startkeyframes",name:r,prefix:i,line:t.startLine,col:t.startCol}),this._readWhitespace(),n=e.peek();while(n==Tokens.IDENT||n==Tokens.PERCENTAGE)this._keyframe_rule(),this._readWhitespace(),n=e.peek();this.fire({type:"endkeyframes",name:r,prefix:i,line:t.startLine,col:t.startCol}),this._readWhitespace(),e.mustMatch(Tokens.RBRACE)},_keyframe_name:function(){var e=this._tokenStream,t;return e.mustMatch([Tokens.IDENT,Tokens.STRING]),SyntaxUnit.fromToken(e.token())},_keyframe_rule:function(){var e=this._tokenStream,t,n=this._key_list();this.fire({type:"startkeyframerule",keys:n,line:n[0].line,col:n[0].col}),this._readDeclarations(!0),this.fire({type:"endkeyframerule",keys:n,line:n[0].line,col:n[0].col})},_key_list:function(){var e=this._tokenStream,t,n,r=[];r.push(this._key()),this._readWhitespace();while(e.match(Tokens.COMMA))this._readWhitespace(),r.push(this._key()),this._readWhitespace();return r},_key:function(){var e=this._tokenStream,t;if(e.match(Tokens.PERCENTAGE))return SyntaxUnit.fromToken(e.token());if(e.match(Tokens.IDENT)){t=e.token();if(/from|to/i.test(t.value))return SyntaxUnit.fromToken(t);e.unget()}this._unexpectedToken(e.LT(1))},_skipCruft:function(){while(this._tokenStream.match([Tokens.S,Tokens.CDO,Tokens.CDC]));},_readDeclarations:function(e,t){var n=this._tokenStream,r;this._readWhitespace(),e&&n.mustMatch(Tokens.LBRACE),this._readWhitespace();try{for(;;){if(!(n.match(Tokens.SEMICOLON)||t&&this._margin())){if(!this._declaration())break;if(!n.match(Tokens.SEMICOLON))break}this._readWhitespace()}n.mustMatch(Tokens.RBRACE),this._readWhitespace()}catch(i){if(!(i instanceof SyntaxError&&!this.options.strict))throw i;this.fire({type:"error",error:i,message:i.message,line:i.line,col:i.col}),r=n.advance([Tokens.SEMICOLON,Tokens.RBRACE]);if(r==Tokens.SEMICOLON)this._readDeclarations(!1,t);else if(r!=Tokens.RBRACE)throw i}},_readWhitespace:function(){var e=this._tokenStream,t="";while(e.match(Tokens.S))t+=e.token().value;return t},_unexpectedToken:function(e){throw new SyntaxError("Unexpected token '"+e.value+"' at line "+e.startLine+", col "+e.startCol+".",e.startLine,e.startCol)},_verifyEnd:function(){this._tokenStream.LA(1)!=Tokens.EOF&&this._unexpectedToken(this._tokenStream.LT(1))},_validateProperty:function(e,t){Validation.validate(e,t)},parse:function(e){this._tokenStream=new TokenStream(e,Tokens),this._stylesheet()},parseStyleSheet:function(e){return this.parse(e)},parseMediaQuery:function(e){this._tokenStream=new TokenStream(e,Tokens);var t=this._media_query();return this._verifyEnd(),t},parsePropertyValue:function(e){this._tokenStream=new TokenStream(e,Tokens),this._readWhitespace();var t=this._expr();return this._readWhitespace(),this._verifyEnd(),t},parseRule:function(e){this._tokenStream=new TokenStream(e,Tokens),this._readWhitespace();var t=this._ruleset();return this._readWhitespace(),this._verifyEnd(),t},parseSelector:function(e){this._tokenStream=new TokenStream(e,Tokens),this._readWhitespace();var t=this._selector();return this._readWhitespace(),this._verifyEnd(),t},parseStyleAttribute:function(e){e+="}",this._tokenStream=new TokenStream(e,Tokens),this._readDeclarations()}};for(t in n)n.hasOwnProperty(t)&&(e[t]=n[t]);return e}();var Properties={"align-items":"flex-start | flex-end | center | baseline | stretch","align-content":"flex-start | flex-end | center | space-between | space-around | stretch","align-self":"auto | flex-start | flex-end | center | baseline | stretch","-webkit-align-items":"flex-start | flex-end | center | baseline | stretch","-webkit-align-content":"flex-start | flex-end | center | space-between | space-around | stretch","-webkit-align-self":"auto | flex-start | flex-end | center | baseline | stretch","alignment-adjust":"auto | baseline | before-edge | text-before-edge | middle | central | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical | <percentage> | <length>","alignment-baseline":"baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical",animation:1,"animation-delay":{multi:"<time>",comma:!0},"animation-direction":{multi:"normal | alternate",comma:!0},"animation-duration":{multi:"<time>",comma:!0},"animation-iteration-count":{multi:"<number> | infinite",comma:!0},"animation-name":{multi:"none | <ident>",comma:!0},"animation-play-state":{multi:"running | paused",comma:!0},"animation-timing-function":1,"-moz-animation-delay":{multi:"<time>",comma:!0},"-moz-animation-direction":{multi:"normal | alternate",comma:!0},"-moz-animation-duration":{multi:"<time>",comma:!0},"-moz-animation-iteration-count":{multi:"<number> | infinite",comma:!0},"-moz-animation-name":{multi:"none | <ident>",comma:!0},"-moz-animation-play-state":{multi:"running | paused",comma:!0},"-ms-animation-delay":{multi:"<time>",comma:!0},"-ms-animation-direction":{multi:"normal | alternate",comma:!0},"-ms-animation-duration":{multi:"<time>",comma:!0},"-ms-animation-iteration-count":{multi:"<number> | infinite",comma:!0},"-ms-animation-name":{multi:"none | <ident>",comma:!0},"-ms-animation-play-state":{multi:"running | paused",comma:!0},"-webkit-animation-delay":{multi:"<time>",comma:!0},"-webkit-animation-direction":{multi:"normal | alternate",comma:!0},"-webkit-animation-duration":{multi:"<time>",comma:!0},"-webkit-animation-iteration-count":{multi:"<number> | infinite",comma:!0},"-webkit-animation-name":{multi:"none | <ident>",comma:!0},"-webkit-animation-play-state":{multi:"running | paused",comma:!0},"-o-animation-delay":{multi:"<time>",comma:!0},"-o-animation-direction":{multi:"normal | alternate",comma:!0},"-o-animation-duration":{multi:"<time>",comma:!0},"-o-animation-iteration-count":{multi:"<number> | infinite",comma:!0},"-o-animation-name":{multi:"none | <ident>",comma:!0},"-o-animation-play-state":{multi:"running | paused",comma:!0},appearance:"icon | window | desktop | workspace | document | tooltip | dialog | button | push-button | hyperlink | radio-button | checkbox | menu-item | tab | menu | menubar | pull-down-menu | pop-up-menu | list-menu | radio-group | checkbox-group | outline-tree | range | field | combo-box | signature | password | normal | none | inherit",azimuth:function(e){var t="<angle> | leftwards | rightwards | inherit",n="left-side | far-left | left | center-left | center | center-right | right | far-right | right-side",r=!1,i=!1,s;ValidationTypes.isAny(e,t)||(ValidationTypes.isAny(e,"behind")&&(r=!0,i=!0),ValidationTypes.isAny(e,n)&&(i=!0,r||ValidationTypes.isAny(e,"behind")));if(e.hasNext())throw s=e.next(),i?new ValidationError("Expected end of value but found '"+s+"'.",s.line,s.col):new ValidationError("Expected (<'azimuth'>) but found '"+s+"'.",s.line,s.col)},"backface-visibility":"visible | hidden",background:1,"background-attachment":{multi:"<attachment>",comma:!0},"background-clip":{multi:"<box>",comma:!0},"background-color":"<color> | inherit","background-image":{multi:"<bg-image>",comma:!0},"background-origin":{multi:"<box>",comma:!0},"background-position":{multi:"<bg-position>",comma:!0},"background-repeat":{multi:"<repeat-style>"},"background-size":{multi:"<bg-size>",comma:!0},"baseline-shift":"baseline | sub | super | <percentage> | <length>",behavior:1,binding:1,bleed:"<length>","bookmark-label":"<content> | <attr> | <string>","bookmark-level":"none | <integer>","bookmark-state":"open | closed","bookmark-target":"none | <uri> | <attr>",border:"<border-width> || <border-style> || <color>","border-bottom":"<border-width> || <border-style> || <color>","border-bottom-color":"<color> | inherit","border-bottom-left-radius":"<x-one-radius>","border-bottom-right-radius":"<x-one-radius>","border-bottom-style":"<border-style>","border-bottom-width":"<border-width>","border-collapse":"collapse | separate | inherit","border-color":{multi:"<color> | inherit",max:4},"border-image":1,"border-image-outset":{multi:"<length> | <number>",max:4},"border-image-repeat":{multi:"stretch | repeat | round",max:2},"border-image-slice":function(e){var t=!1,n="<number> | <percentage>",r=!1,i=0,s=4,o;ValidationTypes.isAny(e,"fill")&&(r=!0,t=!0);while(e.hasNext()&&i<s){t=ValidationTypes.isAny(e,n);if(!t)break;i++}r?t=!0:ValidationTypes.isAny(e,"fill");if(e.hasNext())throw o=e.next(),t?new ValidationError("Expected end of value but found '"+o+"'.",o.line,o.col):new ValidationError("Expected ([<number> | <percentage>]{1,4} && fill?) but found '"+o+"'.",o.line,o.col)},"border-image-source":"<image> | none","border-image-width":{multi:"<length> | <percentage> | <number> | auto",max:4},"border-left":"<border-width> || <border-style> || <color>","border-left-color":"<color> | inherit","border-left-style":"<border-style>","border-left-width":"<border-width>","border-radius":function(e){var t=!1,n="<length> | <percentage> | inherit",r=!1,i=!1,s=0,o=8,u;while(e.hasNext()&&s<o){t=ValidationTypes.isAny(e,n);if(!t){if(!(e.peek()=="/"&&s>0&&!r))break;r=!0,o=s+5,e.next()}s++}if(e.hasNext())throw u=e.next(),t?new ValidationError("Expected end of value but found '"+u+"'.",u.line,u.col):new ValidationError("Expected (<'border-radius'>) but found '"+u+"'.",u.line,u.col)},"border-right":"<border-width> || <border-style> || <color>","border-right-color":"<color> | inherit","border-right-style":"<border-style>","border-right-width":"<border-width>","border-spacing":{multi:"<length> | inherit",max:2},"border-style":{multi:"<border-style>",max:4},"border-top":"<border-width> || <border-style> || <color>","border-top-color":"<color> | inherit","border-top-left-radius":"<x-one-radius>","border-top-right-radius":"<x-one-radius>","border-top-style":"<border-style>","border-top-width":"<border-width>","border-width":{multi:"<border-width>",max:4},bottom:"<margin-width> | inherit","-moz-box-align":"start | end | center | baseline | stretch","-moz-box-decoration-break":"slice |clone","-moz-box-direction":"normal | reverse | inherit","-moz-box-flex":"<number>","-moz-box-flex-group":"<integer>","-moz-box-lines":"single | multiple","-moz-box-ordinal-group":"<integer>","-moz-box-orient":"horizontal | vertical | inline-axis | block-axis | inherit","-moz-box-pack":"start | end | center | justify","-webkit-box-align":"start | end | center | baseline | stretch","-webkit-box-decoration-break":"slice |clone","-webkit-box-direction":"normal | reverse | inherit","-webkit-box-flex":"<number>","-webkit-box-flex-group":"<integer>","-webkit-box-lines":"single | multiple","-webkit-box-ordinal-group":"<integer>","-webkit-box-orient":"horizontal | vertical | inline-axis | block-axis | inherit","-webkit-box-pack":"start | end | center | justify","box-shadow":function(e){var t=!1,n;if(!ValidationTypes.isAny(e,"none"))Validation.multiProperty("<shadow>",e,!0,Infinity);else if(e.hasNext())throw n=e.next(),new ValidationError("Expected end of value but found '"+n+"'.",n.line,n.col)},"box-sizing":"content-box | border-box | inherit","break-after":"auto | always | avoid | left | right | page | column | avoid-page | avoid-column","break-before":"auto | always | avoid | left | right | page | column | avoid-page | avoid-column","break-inside":"auto | avoid | avoid-page | avoid-column","caption-side":"top | bottom | inherit",clear:"none | right | left | both | inherit",clip:1,color:"<color> | inherit","color-profile":1,"column-count":"<integer> | auto","column-fill":"auto | balance","column-gap":"<length> | normal","column-rule":"<border-width> || <border-style> || <color>","column-rule-color":"<color>","column-rule-style":"<border-style>","column-rule-width":"<border-width>","column-span":"none | all","column-width":"<length> | auto",columns:1,content:1,"counter-increment":1,"counter-reset":1,crop:"<shape> | auto",cue:"cue-after | cue-before | inherit","cue-after":1,"cue-before":1,cursor:1,direction:"ltr | rtl | inherit",display:"inline | block | list-item | inline-block | table | inline-table | table-row-group | table-header-group | table-footer-group | table-row | table-column-group | table-column | table-cell | table-caption | grid | inline-grid | none | inherit | -moz-box | -moz-inline-block | -moz-inline-box | -moz-inline-grid | -moz-inline-stack | -moz-inline-table | -moz-grid | -moz-grid-group | -moz-grid-line | -moz-groupbox | -moz-deck | -moz-popup | -moz-stack | -moz-marker | -webkit-box | -webkit-inline-box | -ms-flexbox | -ms-inline-flexbox | flex | -webkit-flex | inline-flex | -webkit-inline-flex","dominant-baseline":1,"drop-initial-after-adjust":"central | middle | after-edge | text-after-edge | ideographic | alphabetic | mathematical | <percentage> | <length>","drop-initial-after-align":"baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical","drop-initial-before-adjust":"before-edge | text-before-edge | central | middle | hanging | mathematical | <percentage> | <length>","drop-initial-before-align":"caps-height | baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical","drop-initial-size":"auto | line | <length> | <percentage>","drop-initial-value":"initial | <integer>",elevation:"<angle> | below | level | above | higher | lower | inherit","empty-cells":"show | hide | inherit",filter:1,fit:"fill | hidden | meet | slice","fit-position":1,flex:"none | [ <flex-grow> <flex-shrink>? || <flex-basis>","flex-basis":"<width>","flex-direction":"row | row-reverse | column | column-reverse","flex-flow":"<flex-direction> || <flex-wrap>","flex-grow":"<number>","flex-shrink":"<number>","flex-wrap":"nowrap | wrap | wrap-reverse","-webkit-flex":"none | [ <flex-grow> <flex-shrink>? || <flex-basis>","-webkit-flex-basis":"<width>","-webkit-flex-direction":"row | row-reverse | column | column-reverse","-webkit-flex-flow":"<flex-direction> || <flex-wrap>","-webkit-flex-grow":"<number>","-webkit-flex-shrink":"<number>","-webkit-flex-wrap":"nowrap | wrap | wrap-reverse","-ms-flex":"[[ <number> <number>? ] || [ <length> || <percentage> || auto ] ] | none","-ms-flex-align":"start | end | center | stretch | baseline","-ms-flex-direction":"row | column | row-reverse | column-reverse | inherit","-ms-flex-order":"<number>","-ms-flex-pack":"start | end | center | justify","-ms-flex-wrap":"nowrap | wrap | wrap-reverse","float":"left | right | none | inherit","float-offset":1,font:1,"font-family":1,"font-size":"<absolute-size> | <relative-size> | <length> | <percentage> | inherit","font-size-adjust":"<number> | none | inherit","font-stretch":"normal | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded | inherit","font-style":"normal | italic | oblique | inherit","font-variant":"normal | small-caps | inherit","font-weight":"normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | inherit","grid-cell-stacking":"columns | rows | layer","grid-column":1,"grid-columns":1,"grid-column-align":"start | end | center | stretch","grid-column-sizing":1,"grid-column-span":"<integer>","grid-flow":"none | rows | columns","grid-layer":"<integer>","grid-row":1,"grid-rows":1,"grid-row-align":"start | end | center | stretch","grid-row-span":"<integer>","grid-row-sizing":1,"hanging-punctuation":1,height:"<margin-width> | inherit","hyphenate-after":"<integer> | auto","hyphenate-before":"<integer> | auto","hyphenate-character":"<string> | auto","hyphenate-lines":"no-limit | <integer>","hyphenate-resource":1,hyphens:"none | manual | auto",icon:1,"image-orientation":"angle | auto","image-rendering":1,"image-resolution":1,"inline-box-align":"initial | last | <integer>","justify-content":"flex-start | flex-end | center | space-between | space-around","-webkit-justify-content":"flex-start | flex-end | center | space-between | space-around",left:"<margin-width> | inherit","letter-spacing":"<length> | normal | inherit","line-height":"<number> | <length> | <percentage> | normal | inherit","line-break":"auto | loose | normal | strict","line-stacking":1,"line-stacking-ruby":"exclude-ruby | include-ruby","line-stacking-shift":"consider-shifts | disregard-shifts","line-stacking-strategy":"inline-line-height | block-line-height | max-height | grid-height","list-style":1,"list-style-image":"<uri> | none | inherit","list-style-position":"inside | outside | inherit","list-style-type":"disc | circle | square | decimal | decimal-leading-zero | lower-roman | upper-roman | lower-greek | lower-latin | upper-latin | armenian | georgian | lower-alpha | upper-alpha | none | inherit",margin:{multi:"<margin-width> | inherit",max:4},"margin-bottom":"<margin-width> | inherit","margin-left":"<margin-width> | inherit","margin-right":"<margin-width> | inherit","margin-top":"<margin-width> | inherit",mark:1,"mark-after":1,"mark-before":1,marks:1,"marquee-direction":1,"marquee-play-count":1,"marquee-speed":1,"marquee-style":1,"max-height":"<length> | <percentage> | none | inherit","max-width":"<length> | <percentage> | none | inherit","min-height":"<length> | <percentage> | inherit","min-width":"<length> | <percentage> | inherit","move-to":1,"nav-down":1,"nav-index":1,"nav-left":1,"nav-right":1,"nav-up":1,opacity:"<number> | inherit",order:"<integer>","-webkit-order":"<integer>",orphans:"<integer> | inherit",outline:1,"outline-color":"<color> | invert | inherit","outline-offset":1,"outline-style":"<border-style> | inherit","outline-width":"<border-width> | inherit",overflow:"visible | hidden | scroll | auto | inherit","overflow-style":1,"overflow-wrap":"normal | break-word","overflow-x":1,"overflow-y":1,padding:{multi:"<padding-width> | inherit",max:4},"padding-bottom":"<padding-width> | inherit","padding-left":"<padding-width> | inherit","padding-right":"<padding-width> | inherit","padding-top":"<padding-width> | inherit",page:1,"page-break-after":"auto | always | avoid | left | right | inherit","page-break-before":"auto | always | avoid | left | right | inherit","page-break-inside":"auto | avoid | inherit","page-policy":1,pause:1,"pause-after":1,"pause-before":1,perspective:1,"perspective-origin":1,phonemes:1,pitch:1,"pitch-range":1,"play-during":1,"pointer-events":"auto | none | visiblePainted | visibleFill | visibleStroke | visible | painted | fill | stroke | all | inherit",position:"static | relative | absolute | fixed | inherit","presentation-level":1,"punctuation-trim":1,quotes:1,"rendering-intent":1,resize:1,rest:1,"rest-after":1,"rest-before":1,richness:1,right:"<margin-width> | inherit",rotation:1,"rotation-point":1,"ruby-align":1,"ruby-overhang":1,"ruby-position":1,"ruby-span":1,size:1,speak:"normal | none | spell-out | inherit","speak-header":"once | always | inherit","speak-numeral":"digits | continuous | inherit","speak-punctuation":"code | none | inherit","speech-rate":1,src:1,stress:1,"string-set":1,"table-layout":"auto | fixed | inherit","tab-size":"<integer> | <length>",target:1,"target-name":1,"target-new":1,"target-position":1,"text-align":"left | right | center | justify | inherit","text-align-last":1,"text-decoration":1,"text-emphasis":1,"text-height":1,"text-indent":"<length> | <percentage> | inherit","text-justify":"auto | none | inter-word | inter-ideograph | inter-cluster | distribute | kashida","text-outline":1,"text-overflow":1,"text-rendering":"auto | optimizeSpeed | optimizeLegibility | geometricPrecision | inherit","text-shadow":1,"text-transform":"capitalize | uppercase | lowercase | none | inherit","text-wrap":"normal | none | avoid",top:"<margin-width> | inherit","-ms-touch-action":"auto | none | pan-x | pan-y","touch-action":"auto | none | pan-x | pan-y",transform:1,"transform-origin":1,"transform-style":1,transition:1,"transition-delay":1,"transition-duration":1,"transition-property":1,"transition-timing-function":1,"unicode-bidi":"normal | embed | isolate | bidi-override | isolate-override | plaintext | inherit","user-modify":"read-only | read-write | write-only | inherit","user-select":"none | text | toggle | element | elements | all | inherit","vertical-align":"auto | use-script | baseline | sub | super | top | text-top | central | middle | bottom | text-bottom | <percentage> | <length>",visibility:"visible | hidden | collapse | inherit","voice-balance":1,"voice-duration":1,"voice-family":1,"voice-pitch":1,"voice-pitch-range":1,"voice-rate":1,"voice-stress":1,"voice-volume":1,volume:1,"white-space":"normal | pre | nowrap | pre-wrap | pre-line | inherit | -pre-wrap | -o-pre-wrap | -moz-pre-wrap | -hp-pre-wrap","white-space-collapse":1,widows:"<integer> | inherit",width:"<length> | <percentage> | auto | inherit","word-break":"normal | keep-all | break-all","word-spacing":"<length> | normal | inherit","word-wrap":"normal | break-word","writing-mode":"horizontal-tb | vertical-rl | vertical-lr | lr-tb | rl-tb | tb-rl | bt-rl | tb-lr | bt-lr | lr-bt | rl-bt | lr | rl | tb | inherit","z-index":"<integer> | auto | inherit",zoom:"<number> | <percentage> | normal"};PropertyName.prototype=new SyntaxUnit,PropertyName.prototype.constructor=PropertyName,PropertyName.prototype.toString=function(){return(this.hack?this.hack:"")+this.text},PropertyValue.prototype=new SyntaxUnit,PropertyValue.prototype.constructor=PropertyValue,PropertyValueIterator.prototype.count=function(){return this._parts.length},PropertyValueIterator.prototype.isFirst=function(){return this._i===0},PropertyValueIterator.prototype.hasNext=function(){return this._i<this._parts.length},PropertyValueIterator.prototype.mark=function(){this._marks.push(this._i)},PropertyValueIterator.prototype.peek=function(e){return this.hasNext()?this._parts[this._i+(e||0)]:null},PropertyValueIterator.prototype.next=function(){return this.hasNext()?this._parts[this._i++]:null},PropertyValueIterator.prototype.previous=function(){return this._i>0?this._parts[--this._i]:null},PropertyValueIterator.prototype.restore=function(){this._marks.length&&(this._i=this._marks.pop())},PropertyValuePart.prototype=new SyntaxUnit,PropertyValuePart.prototype.constructor=PropertyValuePart,PropertyValuePart.fromToken=function(e){return new PropertyValuePart(e.value,e.startLine,e.startCol)};var Pseudos={":first-letter":1,":first-line":1,":before":1,":after":1};Pseudos.ELEMENT=1,Pseudos.CLASS=2,Pseudos.isElement=function(e){return e.indexOf("::")===0||Pseudos[e.toLowerCase()]==Pseudos.ELEMENT},Selector.prototype=new SyntaxUnit,Selector.prototype.constructor=Selector,SelectorPart.prototype=new SyntaxUnit,SelectorPart.prototype.constructor=SelectorPart,SelectorSubPart.prototype=new SyntaxUnit,SelectorSubPart.prototype.constructor=SelectorSubPart,Specificity.prototype={constructor:Specificity,compare:function(e){var t=["a","b","c","d"],n,r;for(n=0,r=t.length;n<r;n++){if(this[t[n]]<e[t[n]])return-1;if(this[t[n]]>e[t[n]])return 1}return 0},valueOf:function(){return this.a*1e3+this.b*100+this.c*10+this.d},toString:function(){return this.a+","+this.b+","+this.c+","+this.d}},Specificity.calculate=function(e){function t(e){var n,r,i,a,f=e.elementName?e.elementName.text:"",l;f&&f.charAt(f.length-1)!="*"&&u++;for(n=0,i=e.modifiers.length;n<i;n++){l=e.modifiers[n];switch(l.type){case"class":case"attribute":o++;break;case"id":s++;break;case"pseudo":Pseudos.isElement(l.text)?u++:o++;break;case"not":for(r=0,a=l.args.length;r<a;r++)t(l.args[r])}}}var n,r,i,s=0,o=0,u=0;for(n=0,r=e.parts.length;n<r;n++)i=e.parts[n],i instanceof SelectorPart&&t(i);return new Specificity(0,s,o,u)};var h=/^[0-9a-fA-F]$/,nonascii=/^[\u0080-\uFFFF]$/,nl=/\n|\r\n|\r|\f/;TokenStream.prototype=mix(new TokenStreamBase,{_getToken:function(e){var t,n=this._reader,r=null,i=n.getLine(),s=n.getCol();t=n.read();while(t){switch(t){case"/":n.peek()=="*"?r=this.commentToken(t,i,s):r=this.charToken(t,i,s);break;case"|":case"~":case"^":case"$":case"*":n.peek()=="="?r=this.comparisonToken(t,i,s):r=this.charToken(t,i,s);break;case'"':case"'":r=this.stringToken(t,i,s);break;case"#":isNameChar(n.peek())?r=this.hashToken(t,i,s):r=this.charToken(t,i,s);break;case".":isDigit(n.peek())?r=this.numberToken(t,i,s):r=this.charToken(t,i,s);break;case"-":n.peek()=="-"?r=this.htmlCommentEndToken(t,i,s):isNameStart(n.peek())?r=this.identOrFunctionToken(t,i,s):r=this.charToken(t,i,s);break;case"!":r=this.importantToken(t,i,s);break;case"@":r=this.atRuleToken(t,i,s);break;case":":r=this.notToken(t,i,s);break;case"<":r=this.htmlCommentStartToken(t,i,s);break;case"U":case"u":if(n.peek()=="+"){r=this.unicodeRangeToken(t,i,s);break};default:isDigit(t)?r=this.numberToken(t,i,s):isWhitespace(t)?r=this.whitespaceToken(t,i,s):isIdentStart(t)?r=this.identOrFunctionToken(t,i,s):r=this.charToken(t,i,s)}break}return!r&&t===null&&(r=this.createToken(Tokens.EOF,null,i,s)),r},createToken:function(e,t,n,r,i){var s=this._reader;return i=i||{},{value:t,type:e,channel:i.channel,hide:i.hide||!1,startLine:n,startCol:r,endLine:s.getLine(),endCol:s.getCol()}},atRuleToken:function(e,t,n){var r=e,i=this._reader,s=Tokens.CHAR,o=!1,u,a;i.mark(),u=this.readName(),r=e+u,s=Tokens.type(r.toLowerCase());if(s==Tokens.CHAR||s==Tokens.UNKNOWN)r.length>1?s=Tokens.UNKNOWN_SYM:(s=Tokens.CHAR,r=e,i.reset());return this.createToken(s,r,t,n)},charToken:function(e,t,n){var r=Tokens.type(e);return r==-1&&(r=Tokens.CHAR),this.createToken(r,e,t,n)},commentToken:function(e,t,n){var r=this._reader,i=this.readComment(e);return this.createToken(Tokens.COMMENT,i,t,n)},comparisonToken:function(e,t,n){var r=this._reader,i=e+r.read(),s=Tokens.type(i)||Tokens.CHAR;return this.createToken(s,i,t,n)},hashToken:function(e,t,n){var r=this._reader,i=this.readName(e);return this.createToken(Tokens.HASH,i,t,n)},htmlCommentStartToken:function(e,t,n){var r=this._reader,i=e;return r.mark(),i+=r.readCount(3),i=="<!--"?this.createToken(Tokens.CDO,i,t,n):(r.reset(),this.charToken(e,t,n))},htmlCommentEndToken:function(e,t,n){var r=this._reader,i=e;return r.mark(),i+=r.readCount(2),i=="-->"?this.createToken(Tokens.CDC,i,t,n):(r.reset(),this.charToken(e,t,n))},identOrFunctionToken:function(e,t,n){var r=this._reader,i=this.readName(e),s=Tokens.IDENT;return r.peek()=="("?(i+=r.read(),i.toLowerCase()=="url("?(s=Tokens.URI,i=this.readURI(i),i.toLowerCase()=="url("&&(s=Tokens.FUNCTION)):s=Tokens.FUNCTION):r.peek()==":"&&i.toLowerCase()=="progid"&&(i+=r.readTo("("),s=Tokens.IE_FUNCTION),this.createToken(s,i,t,n)},importantToken:function(e,t,n){var r=this._reader,i=e,s=Tokens.CHAR,o,u;r.mark(),u=r.read();while(u){if(u=="/"){if(r.peek()!="*")break;o=this.readComment(u);if(o==="")break}else{if(!isWhitespace(u)){if(/i/i.test(u)){o=r.readCount(8),/mportant/i.test(o)&&(i+=u+o,s=Tokens.IMPORTANT_SYM);break}break}i+=u+this.readWhitespace()}u=r.read()}return s==Tokens.CHAR?(r.reset(),this.charToken(e,t,n)):this.createToken(s,i,t,n)},notToken:function(e,t,n){var r=this._reader,i=e;return r.mark(),i+=r.readCount(4),i.toLowerCase()==":not("?this.createToken(Tokens.NOT,i,t,n):(r.reset(),this.charToken(e,t,n))},numberToken:function(e,t,n){var r=this._reader,i=this.readNumber(e),s,o=Tokens.NUMBER,u=r.peek();return isIdentStart(u)?(s=this.readName(r.read()),i+=s,/^em$|^ex$|^px$|^gd$|^rem$|^vw$|^vh$|^vm$|^ch$|^cm$|^mm$|^in$|^pt$|^pc$/i.test(s)?o=Tokens.LENGTH:/^deg|^rad$|^grad$/i.test(s)?o=Tokens.ANGLE:/^ms$|^s$/i.test(s)?o=Tokens.TIME:/^hz$|^khz$/i.test(s)?o=Tokens.FREQ:/^dpi$|^dpcm$/i.test(s)?o=Tokens.RESOLUTION:o=Tokens.DIMENSION):u=="%"&&(i+=r.read(),o=Tokens.PERCENTAGE),this.createToken(o,i,t,n)},stringToken:function(e,t,n){var r=e,i=e,s=this._reader,o=e,u=Tokens.STRING,a=s.read();while(a){i+=a;if(a==r&&o!="\\")break;if(isNewLine(s.peek())&&a!="\\"){u=Tokens.INVALID;break}o=a,a=s.read()}return a===null&&(u=Tokens.INVALID),this.createToken(u,i,t,n)},unicodeRangeToken:function(e,t,n){var r=this._reader,i=e,s,o=Tokens.CHAR;return r.peek()=="+"&&(r.mark(),i+=r.read(),i+=this.readUnicodeRangePart(!0),i.length==2?r.reset():(o=Tokens.UNICODE_RANGE,i.indexOf("?")==-1&&r.peek()=="-"&&(r.mark(),s=r.read(),s+=this.readUnicodeRangePart(!1),s.length==1?r.reset():i+=s))),this.createToken(o,i,t,n)},whitespaceToken:function(e,t,n){var r=this._reader,i=e+this.readWhitespace();return this.createToken(Tokens.S,i,t,n)},readUnicodeRangePart:function(e){var t=this._reader,n="",r=t.peek();while(isHexDigit(r)&&n.length<6)t.read(),n+=r,r=t.peek();if(e)while(r=="?"&&n.length<6)t.read(),n+=r,r=t.peek();return n},readWhitespace:function(){var e=this._reader,t="",n=e.peek();while(isWhitespace(n))e.read(),t+=n,n=e.peek();return t},readNumber:function(e){var t=this._reader,n=e,r=e==".",i=t.peek();while(i){if(isDigit(i))n+=t.read();else{if(i!=".")break;if(r)break;r=!0,n+=t.read()}i=t.peek()}return n},readString:function(){var e=this._reader,t=e.read(),n=t,r=t,i=e.peek();while(i){i=e.read(),n+=i;if(i==t&&r!="\\")break;if(isNewLine(e.peek())&&i!="\\"){n="";break}r=i,i=e.peek()}return i===null&&(n=""),n},readURI:function(e){var t=this._reader,n=e,r="",i=t.peek();t.mark();while(i&&isWhitespace(i))t.read(),i=t.peek();i=="'"||i=='"'?r=this.readString():r=this.readURL(),i=t.peek();while(i&&isWhitespace(i))t.read(),i=t.peek();return r===""||i!=")"?(n=e,t.reset()):n+=r+t.read(),n},readURL:function(){var e=this._reader,t="",n=e.peek();while(/^[!#$%&\\*-~]$/.test(n))t+=e.read(),n=e.peek();return t},readName:function(e){var t=this._reader,n=e||"",r=t.peek();for(;;)if(r=="\\")n+=this.readEscape(t.read()),r=t.peek();else{if(!r||!isNameChar(r))break;n+=t.read(),r=t.peek()}return n},readEscape:function(e){var t=this._reader,n=e||"",r=0,i=t.peek();if(isHexDigit(i))do n+=t.read(),i=t.peek();while(i&&isHexDigit(i)&&++r<6);return n.length==3&&/\s/.test(i)||n.length==7||n.length==1?t.read():i="",n+i},readComment:function(e){var t=this._reader,n=e||"",r=t.read();if(r=="*"){while(r){n+=r;if(n.length>2&&r=="*"&&t.peek()=="/"){n+=t.read();break}r=t.read()}return n}return""}});var Tokens=[{name:"CDO"},{name:"CDC"},{name:"S",whitespace:!0},{name:"COMMENT",comment:!0,hide:!0,channel:"comment"},{name:"INCLUDES",text:"~="},{name:"DASHMATCH",text:"|="},{name:"PREFIXMATCH",text:"^="},{name:"SUFFIXMATCH",text:"$="},{name:"SUBSTRINGMATCH",text:"*="},{name:"STRING"},{name:"IDENT"},{name:"HASH"},{name:"IMPORT_SYM",text:"@import"},{name:"PAGE_SYM",text:"@page"},{name:"MEDIA_SYM",text:"@media"},{name:"FONT_FACE_SYM",text:"@font-face"},{name:"CHARSET_SYM",text:"@charset"},{name:"NAMESPACE_SYM",text:"@namespace"},{name:"VIEWPORT_SYM",text:["@viewport","@-ms-viewport"]},{name:"UNKNOWN_SYM"},{name:"KEYFRAMES_SYM",text:["@keyframes","@-webkit-keyframes","@-moz-keyframes","@-o-keyframes"]},{name:"IMPORTANT_SYM"},{name:"LENGTH"},{name:"ANGLE"},{name:"TIME"},{name:"FREQ"},{name:"DIMENSION"},{name:"PERCENTAGE"},{name:"NUMBER"},{name:"URI"},{name:"FUNCTION"},{name:"UNICODE_RANGE"},{name:"INVALID"},{name:"PLUS",text:"+"},{name:"GREATER",text:">"},{name:"COMMA",text:","},{name:"TILDE",text:"~"},{name:"NOT"},{name:"TOPLEFTCORNER_SYM",text:"@top-left-corner"},{name:"TOPLEFT_SYM",text:"@top-left"},{name:"TOPCENTER_SYM",text:"@top-center"},{name:"TOPRIGHT_SYM",text:"@top-right"},{name:"TOPRIGHTCORNER_SYM",text:"@top-right-corner"},{name:"BOTTOMLEFTCORNER_SYM",text:"@bottom-left-corner"},{name:"BOTTOMLEFT_SYM",text:"@bottom-left"},{name:"BOTTOMCENTER_SYM",text:"@bottom-center"},{name:"BOTTOMRIGHT_SYM",text:"@bottom-right"},{name:"BOTTOMRIGHTCORNER_SYM",text:"@bottom-right-corner"},{name:"LEFTTOP_SYM",text:"@left-top"},{name:"LEFTMIDDLE_SYM",text:"@left-middle"},{name:"LEFTBOTTOM_SYM",text:"@left-bottom"},{name:"RIGHTTOP_SYM",text:"@right-top"},{name:"RIGHTMIDDLE_SYM",text:"@right-middle"},{name:"RIGHTBOTTOM_SYM",text:"@right-bottom"},{name:"RESOLUTION",state:"media"},{name:"IE_FUNCTION"},{name:"CHAR"},{name:"PIPE",text:"|"},{name:"SLASH",text:"/"},{name:"MINUS",text:"-"},{name:"STAR",text:"*"},{name:"LBRACE",text:"{"},{name:"RBRACE",text:"}"},{name:"LBRACKET",text:"["},{name:"RBRACKET",text:"]"},{name:"EQUALS",text:"="},{name:"COLON",text:":"},{name:"SEMICOLON",text:";"},{name:"LPAREN",text:"("},{name:"RPAREN",text:")"},{name:"DOT",text:"."}];(function(){var e=[],t={};Tokens.UNKNOWN=-1,Tokens.unshift({name:"EOF"});for(var n=0,r=Tokens.length;n<r;n++){e.push(Tokens[n].name),Tokens[Tokens[n].name]=n;if(Tokens[n].text)if(Tokens[n].text instanceof Array)for(var i=0;i<Tokens[n].text.length;i++)t[Tokens[n].text[i]]=n;else t[Tokens[n].text]=n}Tokens.name=function(t){return e[t]},Tokens.type=function(e){return t[e]||-1}})();var Validation={validate:function(e,t){var n=e.toString().toLowerCase(),r=t.parts,i=new PropertyValueIterator(t),s=Properties[n],o,u,a,f,l,c,h,p,d,v,m;if(!s){if(n.indexOf("-")!==0)throw new ValidationError("Unknown property '"+e+"'.",e.line,e.col)}else typeof s!="number"&&(typeof s=="string"?s.indexOf("||")>-1?this.groupProperty(s,i):this.singleProperty(s,i,1):s.multi?this.multiProperty(s.multi,i,s.comma,s.max||Infinity):typeof s=="function"&&s(i))},singleProperty:function(e,t,n,r){var i=!1,s=t.value,o=0,u;while(t.hasNext()&&o<n){i=ValidationTypes.isAny(t,e);if(!i)break;o++}if(!i)throw t.hasNext()&&!t.isFirst()?(u=t.peek(),new ValidationError("Expected end of value but found '"+u+"'.",u.line,u.col)):new ValidationError("Expected ("+e+") but found '"+s+"'.",s.line,s.col);if(t.hasNext())throw u=t.next(),new ValidationError("Expected end of value but found '"+u+"'.",u.line,u.col)},multiProperty:function(e,t,n,r){var i=!1,s=t.value,o=0,u=!1,a;while(t.hasNext()&&!i&&o<r){if(!ValidationTypes.isAny(t,e))break;o++;if(!t.hasNext())i=!0;else if(n){if(t.peek()!=",")break;a=t.next()}}if(!i)throw t.hasNext()&&!t.isFirst()?(a=t.peek(),new ValidationError("Expected end of value but found '"+a+"'.",a.line,a.col)):(a=t.previous(),n&&a==","?new ValidationError("Expected end of value but found '"+a+"'.",a.line,a.col):new ValidationError("Expected ("+e+") but found '"+s+"'.",s.line,s.col));if(t.hasNext())throw a=t.next(),new ValidationError("Expected end of value but found '"+a+"'.",a.line,a.col)},groupProperty:function(e,t,n){var r=!1,i=t.value,s=e.split("||").length,o={count:0},u=!1,a,f;while(t.hasNext()&&!r){a=ValidationTypes.isAnyOfGroup(t,e);if(!a)break;if(o[a])break;o[a]=1,o.count++,u=!0;if(o.count==s||!t.hasNext())r=!0}if(!r)throw u&&t.hasNext()?(f=t.peek(),new ValidationError("Expected end of value but found '"+f+"'.",f.line,f.col)):new ValidationError("Expected ("+e+") but found '"+i+"'.",i.line,i.col);if(t.hasNext())throw f=t.next(),new ValidationError("Expected end of value but found '"+f+"'.",f.line,f.col)}};ValidationError.prototype=new Error;var ValidationTypes={isLiteral:function(e,t){var n=e.text.toString().toLowerCase(),r=t.split(" | "),i,s,o=!1;for(i=0,s=r.length;i<s&&!o;i++)n==r[i].toLowerCase()&&(o=!0);return o},isSimple:function(e){return!!this.simple[e]},isComplex:function(e){return!!this.complex[e]},isAny:function(e,t){var n=t.split(" | "),r,i,s=!1;for(r=0,i=n.length;r<i&&!s&&e.hasNext();r++)s=this.isType(e,n[r]);return s},isAnyOfGroup:function(e,t){var n=t.split(" || "),r,i,s=!1;for(r=0,i=n.length;r<i&&!s;r++)s=this.isType(e,n[r]);return s?n[r-1]:!1},isType:function(e,t){var n=e.peek(),r=!1;return t.charAt(0)!="<"?(r=this.isLiteral(n,t),r&&e.next()):this.simple[t]?(r=this.simple[t](n),r&&e.next()):r=this.complex[t](e),r},simple:{"<absolute-size>":function(e){return ValidationTypes.isLiteral(e,"xx-small | x-small | small | medium | large | x-large | xx-large")},"<attachment>":function(e){return ValidationTypes.isLiteral(e,"scroll | fixed | local")},"<attr>":function(e){return e.type=="function"&&e.name=="attr"},"<bg-image>":function(e){return this["<image>"](e)||this["<gradient>"](e)||e=="none"},"<gradient>":function(e){return e.type=="function"&&/^(?:\-(?:ms|moz|o|webkit)\-)?(?:repeating\-)?(?:radial\-|linear\-)?gradient/i.test(e)},"<box>":function(e){return ValidationTypes.isLiteral(e,"padding-box | border-box | content-box")},"<content>":function(e){return e.type=="function"&&e.name=="content"},"<relative-size>":function(e){return ValidationTypes.isLiteral(e,"smaller | larger")},"<ident>":function(e){return e.type=="identifier"},"<length>":function(e){return e.type=="function"&&/^(?:\-(?:ms|moz|o|webkit)\-)?calc/i.test(e)?!0:e.type=="length"||e.type=="number"||e.type=="integer"||e=="0"},"<color>":function(e){return e.type=="color"||e=="transparent"},"<number>":function(e){return e.type=="number"||this["<integer>"](e)},"<integer>":function(e){return e.type=="integer"},"<line>":function(e){return e.type=="integer"},"<angle>":function(e){return e.type=="angle"},"<uri>":function(e){return e.type=="uri"},"<image>":function(e){return this["<uri>"](e)},"<percentage>":function(e){return e.type=="percentage"||e=="0"},"<border-width>":function(e){return this["<length>"](e)||ValidationTypes.isLiteral(e,"thin | medium | thick")},"<border-style>":function(e){return ValidationTypes.isLiteral(e,"none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset")},"<margin-width>":function(e){return this["<length>"](e)||this["<percentage>"](e)||ValidationTypes.isLiteral(e,"auto")},"<padding-width>":function(e){return this["<length>"](e)||this["<percentage>"](e)},"<shape>":function(e){return e.type=="function"&&(e.name=="rect"||e.name=="inset-rect")},"<time>":function(e){return e.type=="time"}},complex:{"<bg-position>":function(e){var t=this,n=!1,r="<percentage> | <length>",i="left | right",s="top | bottom",o=0,u=function(){return e.hasNext()&&e.peek()!=","};while(e.peek(o)&&e.peek(o)!=",")o++;return o<3?ValidationTypes.isAny(e,i+" | center | "+r)?(n=!0,ValidationTypes.isAny(e,s+" | center | "+r)):ValidationTypes.isAny(e,s)&&(n=!0,ValidationTypes.isAny(e,i+" | center")):ValidationTypes.isAny(e,i)?ValidationTypes.isAny(e,s)?(n=!0,ValidationTypes.isAny(e,r)):ValidationTypes.isAny(e,r)&&(ValidationTypes.isAny(e,s)?(n=!0,ValidationTypes.isAny(e,r)):ValidationTypes.isAny(e,"center")&&(n=!0)):ValidationTypes.isAny(e,s)?ValidationTypes.isAny(e,i)?(n=!0,ValidationTypes.isAny(e,r)):ValidationTypes.isAny(e,r)&&(ValidationTypes.isAny(e,i)?(n=!0,ValidationTypes.isAny(e,r)):ValidationTypes.isAny(e,"center")&&(n=!0)):ValidationTypes.isAny(e,"center")&&ValidationTypes.isAny(e,i+" | "+s)&&(n=!0,ValidationTypes.isAny(e,r)),n},"<bg-size>":function(e){var t=this,n=!1,r="<percentage> | <length> | auto",i,s,o;return ValidationTypes.isAny(e,"cover | contain")?n=!0:ValidationTypes.isAny(e,r)&&(n=!0,ValidationTypes.isAny(e,r)),n},"<repeat-style>":function(e){var t=!1,n="repeat | space | round | no-repeat",r;return e.hasNext()&&(r=e.next(),ValidationTypes.isLiteral(r,"repeat-x | repeat-y")?t=!0:ValidationTypes.isLiteral(r,n)&&(t=!0,e.hasNext()&&ValidationTypes.isLiteral(e.peek(),n)&&e.next())),t},"<shadow>":function(e){var t=!1,n=0,r=!1,i=!1,s;if(e.hasNext()){ValidationTypes.isAny(e,"inset")&&(r=!0),ValidationTypes.isAny(e,"<color>")&&(i=!0);while(ValidationTypes.isAny(e,"<length>")&&n<4)n++;e.hasNext()&&(i||ValidationTypes.isAny(e,"<color>"),r||ValidationTypes.isAny(e,"inset")),t=n>=2&&n<=4}return t},"<x-one-radius>":function(e){var t=!1,n="<length> | <percentage> | inherit";return ValidationTypes.isAny(e,n)&&(t=!0,ValidationTypes.isAny(e,n)),t}}};parserlib.css={Colors:Colors,Combinator:Combinator,Parser:Parser,PropertyName:PropertyName,PropertyValue:PropertyValue,PropertyValuePart:PropertyValuePart,MediaFeature:MediaFeature,MediaQuery:MediaQuery,Selector:Selector,SelectorPart:SelectorPart,SelectorSubPart:SelectorSubPart,Specificity:Specificity,TokenStream:TokenStream,Tokens:Tokens,ValidationError:ValidationError}}(),function(){for(var e in parserlib)exports[e]=parserlib[e]}();var CSSLint=function(){function e(e,t){var n,i=e&&e.match(r),s=i&&i[1];return s&&(n={"true":2,"":1,"false":0,2:2,1:1,0:0},s.toLowerCase().split(",").forEach(function(e){var r=e.split(":"),i=r[0]||"",s=r[1]||"";t[i.trim()]=n[s.trim()]})),t}var t=[],n=[],r=/\/\*csslint([^\*]*)\*\//,i=new parserlib.util.EventTarget;return i.version="@VERSION@",i.addRule=function(e){t.push(e),t[e.id]=e},i.clearRules=function(){t=[]},i.getRules=function(){return[].concat(t).sort(function(e,t){return e.id>t.id?1:0})},i.getRuleset=function(){var e={},n=0,r=t.length;while(n<r)e[t[n++].id]=1;return e},i.addFormatter=function(e){n[e.id]=e},i.getFormatter=function(e){return n[e]},i.format=function(e,t,n,r){var i=this.getFormatter(n),s=null;return i&&(s=i.startFormat(),s+=i.formatResults(e,t,r||{}),s+=i.endFormat()),s},i.hasFormat=function(e){return n.hasOwnProperty(e)},i.verify=function(n,i){var s=0,o=t.length,u,a,f,l=new parserlib.css.Parser({starHack:!0,ieFilters:!0,underscoreHack:!0,strict:!1});a=n.replace(/\n\r?/g,"$split$").split("$split$"),i||(i=this.getRuleset()),r.test(n)&&(i=e(n,i)),u=new Reporter(a,i),i.errors=2;for(s in i)i.hasOwnProperty(s)&&i[s]&&t[s]&&t[s].init(l,u);try{l.parse(n)}catch(c){u.error("Fatal error, cannot continue: "+c.message,c.line,c.col,{})}return f={messages:u.messages,stats:u.stats,ruleset:u.ruleset},f.messages.sort(function(e,t){return e.rollup&&!t.rollup?1:!e.rollup&&t.rollup?-1:e.line-t.line}),f},i}();Reporter.prototype={constructor:Reporter,error:function(e,t,n,r){this.messages.push({type:"error",line:t,col:n,message:e,evidence:this.lines[t-1],rule:r||{}})},warn:function(e,t,n,r){this.report(e,t,n,r)},report:function(e,t,n,r){this.messages.push({type:this.ruleset[r.id]==2?"error":"warning",line:t,col:n,message:e,evidence:this.lines[t-1],rule:r})},info:function(e,t,n,r){this.messages.push({type:"info",line:t,col:n,message:e,evidence:this.lines[t-1],rule:r})},rollupError:function(e,t){this.messages.push({type:"error",rollup:!0,message:e,rule:t})},rollupWarn:function(e,t){this.messages.push({type:"warning",rollup:!0,message:e,rule:t})},stat:function(e,t){this.stats[e]=t}},CSSLint._Reporter=Reporter,CSSLint.Util={mix:function(e,t){var n;for(n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return n},indexOf:function(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},forEach:function(e,t){if(e.forEach)return e.forEach(t);for(var n=0,r=e.length;n<r;n++)t(e[n],n,e)}},CSSLint.addRule({id:"adjoining-classes",name:"Disallow adjoining classes",desc:"Don't use adjoining classes.",browsers:"IE6",init:function(e,t){var n=this;e.addListener("startrule",function(r){var i=r.selectors,s,o,u,a,f,l,c;for(f=0;f<i.length;f++){s=i[f];for(l=0;l<s.parts.length;l++){o=s.parts[l];if(o.type==e.SELECTOR_PART_TYPE){a=0;for(c=0;c<o.modifiers.length;c++)u=o.modifiers[c],u.type=="class"&&a++,a>1&&t.report("Don't use adjoining classes.",o.line,o.col,n)}}}})}}),CSSLint.addRule({id:"box-model",name:"Beware of broken box size",desc:"Don't use width or height when using padding or border.",browsers:"All",init:function(e,t){function n(){u={},a=!1}function r(){var e,n;if(!a){if(u.height)for(e in o)o.hasOwnProperty(e)&&u[e]&&(n=u[e].value,(e!="padding"||n.parts.length!==2||n.parts[0].value!==0)&&t.report("Using height with "+e+" can sometimes make elements larger than you expect.",u[e].line,u[e].col,i));if(u.width)for(e in s)s.hasOwnProperty(e)&&u[e]&&(n=u[e].value,(e!="padding"||n.parts.length!==2||n.parts[1].value!==0)&&t.report("Using width with "+e+" can sometimes make elements larger than you expect.",u[e].line,u[e].col,i))}}var i=this,s={border:1,"border-left":1,"border-right":1,padding:1,"padding-left":1,"padding-right":1},o={border:1,"border-bottom":1,"border-top":1,padding:1,"padding-bottom":1,"padding-top":1},u,a=!1;e.addListener("startrule",n),e.addListener("startfontface",n),e.addListener("startpage",n),e.addListener("startpagemargin",n),e.addListener("startkeyframerule",n),e.addListener("property",function(e){var t=e.property.text.toLowerCase();o[t]||s[t]?!/^0\S*$/.test(e.value)&&(t!="border"||e.value!="none")&&(u[t]={line:e.property.line,col:e.property.col,value:e.value}):/^(width|height)/i.test(t)&&/^(length|percentage)/.test(e.value.parts[0].type)?u[t]=1:t=="box-sizing"&&(a=!0)}),e.addListener("endrule",r),e.addListener("endfontface",r),e.addListener("endpage",r),e.addListener("endpagemargin",r),e.addListener("endkeyframerule",r)}}),CSSLint.addRule({id:"box-sizing",name:"Disallow use of box-sizing",desc:"The box-sizing properties isn't supported in IE6 and IE7.",browsers:"IE6, IE7",tags:["Compatibility"],init:function(e,t){var n=this;e.addListener("property",function(e){var r=e.property.text.toLowerCase();r=="box-sizing"&&t.report("The box-sizing property isn't supported in IE6 and IE7.",e.line,e.col,n)})}}),CSSLint.addRule({id:"bulletproof-font-face",name:"Use the bulletproof @font-face syntax",desc:"Use the bulletproof @font-face syntax to avoid 404's in old IE (http://www.fontspring.com/blog/the-new-bulletproof-font-face-syntax).",browsers:"All",init:function(e,t){var n=this,r=0,i=!1,s=!0,o=!1,u,a;e.addListener("startfontface",function(e){i=!0}),e.addListener("property",function(e){if(!i)return;var t=e.property.toString().toLowerCase(),n=e.value.toString();u=e.line,a=e.col;if(t==="src"){var r=/^\s?url\(['"].+\.eot\?.*['"]\)\s*format\(['"]embedded-opentype['"]\).*$/i;!n.match(r)&&s?(o=!0,s=!1):n.match(r)&&!s&&(o=!1)}}),e.addListener("endfontface",function(e){i=!1,o&&t.report("@font-face declaration doesn't follow the fontspring bulletproof syntax.",u,a,n)})}}),CSSLint.addRule({id:"compatible-vendor-prefixes",name:"Require compatible vendor prefixes",desc:"Include all compatible vendor prefixes to reach a wider range of users.",browsers:"All",init:function(e,t){var n=this,r,i,s,o,u,a,f,l=!1,c=Array.prototype.push,h=[];r={animation:"webkit moz","animation-delay":"webkit moz","animation-direction":"webkit moz","animation-duration":"webkit moz","animation-fill-mode":"webkit moz","animation-iteration-count":"webkit moz","animation-name":"webkit moz","animation-play-state":"webkit moz","animation-timing-function":"webkit moz",appearance:"webkit moz","border-end":"webkit moz","border-end-color":"webkit moz","border-end-style":"webkit moz","border-end-width":"webkit moz","border-image":"webkit moz o","border-radius":"webkit","border-start":"webkit moz","border-start-color":"webkit moz","border-start-style":"webkit moz","border-start-width":"webkit moz","box-align":"webkit moz ms","box-direction":"webkit moz ms","box-flex":"webkit moz ms","box-lines":"webkit ms","box-ordinal-group":"webkit moz ms","box-orient":"webkit moz ms","box-pack":"webkit moz ms","box-sizing":"webkit moz","box-shadow":"webkit moz","column-count":"webkit moz ms","column-gap":"webkit moz ms","column-rule":"webkit moz ms","column-rule-color":"webkit moz ms","column-rule-style":"webkit moz ms","column-rule-width":"webkit moz ms","column-width":"webkit moz ms",hyphens:"epub moz","line-break":"webkit ms","margin-end":"webkit moz","margin-start":"webkit moz","marquee-speed":"webkit wap","marquee-style":"webkit wap","padding-end":"webkit moz","padding-start":"webkit moz","tab-size":"moz o","text-size-adjust":"webkit ms",transform:"webkit moz ms o","transform-origin":"webkit moz ms o",transition:"webkit moz o","transition-delay":"webkit moz o","transition-duration":"webkit moz o","transition-property":"webkit moz o","transition-timing-function":"webkit moz o","user-modify":"webkit moz","user-select":"webkit moz ms","word-break":"epub ms","writing-mode":"epub ms"};for(s in r)if(r.hasOwnProperty(s)){o=[],u=r[s].split(" ");for(a=0,f=u.length;a<f;a++)o.push("-"+u[a]+"-"+s);r[s]=o,c.apply(h,o)}e.addListener("startrule",function(){i=[]}),e.addListener("startkeyframes",function(e){l=e.prefix||!0}),e.addListener("endkeyframes",function(e){l=!1}),e.addListener("property",function(e){var t=e.property;CSSLint.Util.indexOf(h,t.text)>-1&&(!l||typeof l!="string"||t.text.indexOf("-"+l+"-")!==0)&&i.push(t)}),e.addListener("endrule",function(e){if(!i.length)return;var s={},o,u,a,f,l,c,h,p,d,v;for(o=0,u=i.length;o<u;o++){a=i[o];for(f in r)r.hasOwnProperty(f)&&(l=r[f],CSSLint.Util.indexOf(l,a.text)>-1&&(s[f]||(s[f]={full:l.slice(0),actual:[],actualNodes:[]}),CSSLint.Util.indexOf(s[f].actual,a.text)===-1&&(s[f].actual.push(a.text),s[f].actualNodes.push(a))))}for(f in s)if(s.hasOwnProperty(f)){c=s[f],h=c.full,p=c.actual;if(h.length>p.length)for(o=0,u=h.length;o<u;o++)d=h[o],CSSLint.Util.indexOf(p,d)===-1&&(v=p.length===1?p[0]:p.length==2?p.join(" and "):p.join(", "),t.report("The property "+d+" is compatible with "+v+" and should be included as well.",c.actualNodes[0].line,c.actualNodes[0].col,n))}})}}),CSSLint.addRule({id:"display-property-grouping",name:"Require properties appropriate for display",desc:"Certain properties shouldn't be used with certain display property values.",browsers:"All",init:function(e,t){function n(e,n,r){u[e]&&(typeof o[e]!="string"||u[e].value.toLowerCase()!=o[e])&&t.report(r||e+" can't be used with display: "+n+".",u[e].line,u[e].col,s)}function r(){u={}}function i(){var e=u.display?u.display.value:null;if(e)switch(e){case"inline":n("height",e),n("width",e),n("margin",e),n("margin-top",e),n("margin-bottom",e),n("float",e,"display:inline has no effect on floated elements (but may be used to fix the IE6 double-margin bug).");break;case"block":n("vertical-align",e);break;case"inline-block":n("float",e);break;default:e.indexOf("table-")===0&&(n("margin",e),n("margin-left",e),n("margin-right",e),n("margin-top",e),n("margin-bottom",e),n("float",e))}}var s=this,o={display:1,"float":"none",height:1,width:1,margin:1,"margin-left":1,"margin-right":1,"margin-bottom":1,"margin-top":1,padding:1,"padding-left":1,"padding-right":1,"padding-bottom":1,"padding-top":1,"vertical-align":1},u;e.addListener("startrule",r),e.addListener("startfontface",r),e.addListener("startkeyframerule",r),e.addListener("startpagemargin",r),e.addListener("startpage",r),e.addListener("property",function(e){var t=e.property.text.toLowerCase();o[t]&&(u[t]={value:e.value.text,line:e.property.line,col:e.property.col})}),e.addListener("endrule",i),e.addListener("endfontface",i),e.addListener("endkeyframerule",i),e.addListener("endpagemargin",i),e.addListener("endpage",i)}}),CSSLint.addRule({id:"duplicate-background-images",name:"Disallow duplicate background images",desc:"Every background-image should be unique. Use a common class for e.g. sprites.",browsers:"All",init:function(e,t){var n=this,r={};e.addListener("property",function(e){var i=e.property.text,s=e.value,o,u;if(i.match(/background/i))for(o=0,u=s.parts.length;o<u;o++)s.parts[o].type=="uri"&&(typeof r[s.parts[o].uri]=="undefined"?r[s.parts[o].uri]=e:t.report("Background image '"+s.parts[o].uri+"' was used multiple times, first declared at line "+r[s.parts[o].uri].line+", col "+r[s.parts[o].uri].col+".",e.line,e.col,n))})}}),CSSLint.addRule({id:"duplicate-properties",name:"Disallow duplicate properties",desc:"Duplicate properties must appear one after the other.",browsers:"All",init:function(e,t){function n(e){i={}}var r=this,i,s;e.addListener("startrule",n),e.addListener("startfontface",n),e.addListener("startpage",n),e.addListener("startpagemargin",n),e.addListener("startkeyframerule",n),e.addListener("property",function(e){var n=e.property,o=n.text.toLowerCase();i[o]&&(s!=o||i[o]==e.value.text)&&t.report("Duplicate property '"+e.property+"' found.",e.line,e.col,r),i[o]=e.value.text,s=o})}}),CSSLint.addRule({id:"empty-rules",name:"Disallow empty rules",desc:"Rules without any properties specified should be removed.",browsers:"All",init:function(e,t){var n=this,r=0;e.addListener("startrule",function(){r=0}),e.addListener("property",function(){r++}),e.addListener("endrule",function(e){var i=e.selectors;r===0&&t.report("Rule is empty.",i[0].line,i[0].col,n)})}}),CSSLint.addRule({id:"errors",name:"Parsing Errors",desc:"This rule looks for recoverable syntax errors.",browsers:"All",init:function(e,t){var n=this;e.addListener("error",function(e){t.error(e.message,e.line,e.col,n)})}}),CSSLint.addRule({id:"fallback-colors",name:"Require fallback colors",desc:"For older browsers that don't support RGBA, HSL, or HSLA, provide a fallback color.",browsers:"IE6,IE7,IE8",init:function(e,t){function n(e){o={},i=null}var r=this,i,s={color:1,background:1,"border-color":1,"border-top-color":1,"border-right-color":1,"border-bottom-color":1,"border-left-color":1,border:1,"border-top":1,"border-right":1,"border-bottom":1,"border-left":1,"background-color":1},o;e.addListener("startrule",n),e.addListener("startfontface",n),e.addListener("startpage",n),e.addListener("startpagemargin",n),e.addListener("startkeyframerule",n),e.addListener("property",function(e){var n=e.property,o=n.text.toLowerCase(),u=e.value.parts,a=0,f="",l=u.length;if(s[o])while(a<l)u[a].type=="color"&&("alpha"in u[a]||"hue"in u[a]?(/([^\)]+)\(/.test(u[a])&&(f=RegExp.$1.toUpperCase()),(!i||i.property.text.toLowerCase()!=o||i.colorType!="compat")&&t.report("Fallback "+o+" (hex or RGB) should precede "+f+" "+o+".",e.line,e.col,r)):e.colorType="compat"),a++;i=e})}}),CSSLint.addRule({id:"floats",name:"Disallow too many floats",desc:"This rule tests if the float property is used too many times",browsers:"All",init:function(e,t){var n=this,r=0;e.addListener("property",function(e){e.property.text.toLowerCase()=="float"&&e.value.text.toLowerCase()!="none"&&r++}),e.addListener("endstylesheet",function(){t.stat("floats",r),r>=10&&t.rollupWarn("Too many floats ("+r+"), you're probably using them for layout. Consider using a grid system instead.",n)})}}),CSSLint.addRule({id:"font-faces",name:"Don't use too many web fonts",desc:"Too many different web fonts in the same stylesheet.",browsers:"All",init:function(e,t){var n=this,r=0;e.addListener("startfontface",function(){r++}),e.addListener("endstylesheet",function(){r>5&&t.rollupWarn("Too many @font-face declarations ("+r+").",n)})}}),CSSLint.addRule({id:"font-sizes",name:"Disallow too many font sizes",desc:"Checks the number of font-size declarations.",browsers:"All",init:function(e,t){var n=this,r=0;e.addListener("property",function(e){e.property=="font-size"&&r++}),e.addListener("endstylesheet",function(){t.stat("font-sizes",r),r>=10&&t.rollupWarn("Too many font-size declarations ("+r+"), abstraction needed.",n)})}}),CSSLint.addRule({id:"gradients",name:"Require all gradient definitions",desc:"When using a vendor-prefixed gradient, make sure to use them all.",browsers:"All",init:function(e,t){var n=this,r;e.addListener("startrule",function(){r={moz:0,webkit:0,oldWebkit:0,o:0}}),e.addListener("property",function(e){/\-(moz|o|webkit)(?:\-(?:linear|radial))\-gradient/i.test(e.value)?r[RegExp.$1]=1:/\-webkit\-gradient/i.test(e.value)&&(r.oldWebkit=1)}),e.addListener("endrule",function(e){var i=[];r.moz||i.push("Firefox 3.6+"),r.webkit||i.push("Webkit (Safari 5+, Chrome)"),r.oldWebkit||i.push("Old Webkit (Safari 4+, Chrome)"),r.o||i.push("Opera 11.1+"),i.length&&i.length<4&&t.report("Missing vendor-prefixed CSS gradients for "+i.join(", ")+".",e.selectors[0].line,e.selectors[0].col,n)})}}),CSSLint.addRule({id:"ids",name:"Disallow IDs in selectors",desc:"Selectors should not contain IDs.",browsers:"All",init:function(e,t){var n=this;e.addListener("startrule",function(r){var i=r.selectors,s,o,u,a,f,l,c;for(f=0;f<i.length;f++){s=i[f],a=0;for(l=0;l<s.parts.length;l++){o=s.parts[l];if(o.type==e.SELECTOR_PART_TYPE)for(c=0;c<o.modifiers.length;c++)u=o.modifiers[c],u.type=="id"&&a++}a==1?t.report("Don't use IDs in selectors.",s.line,s.col,n):a>1&&t.report(a+" IDs in the selector, really?",s.line,s.col,n)}})}}),CSSLint.addRule({id:"import",name:"Disallow @import",desc:"Don't use @import, use <link> instead.",browsers:"All",init:function(e,t){var n=this;e.addListener("import",function(e){t.report("@import prevents parallel downloads, use <link> instead.",e.line,e.col,n)})}}),CSSLint.addRule({id:"important",name:"Disallow !important",desc:"Be careful when using !important declaration",browsers:"All",init:function(e,t){var n=this,r=0;e.addListener("property",function(e){e.important===!0&&(r++,t.report("Use of !important",e.line,e.col,n))}),e.addListener("endstylesheet",function(){t.stat("important",r),r>=10&&t.rollupWarn("Too many !important declarations ("+r+"), try to use less than 10 to avoid specificity issues.",n)})}}),CSSLint.addRule({id:"known-properties",name:"Require use of known properties",desc:"Properties should be known (listed in CSS3 specification) or be a vendor-prefixed property.",browsers:"All",init:function(e,t){var n=this;e.addListener("property",function(e){var r=e.property.text.toLowerCase();e.invalid&&t.report(e.invalid.message,e.line,e.col,n)})}}),CSSLint.addRule({id:"outline-none",name:"Disallow outline: none",desc:"Use of outline: none or outline: 0 should be limited to :focus rules.",browsers:"All",tags:["Accessibility"],init:function(e,t){function n(e){e.selectors?s={line:e.line,col:e.col,selectors:e.selectors,propCount:0,outline:!1}:s=null}function r(e){s&&s.outline&&(s.selectors.toString().toLowerCase().indexOf(":focus")==-1?t.report("Outlines should only be modified using :focus.",s.line,s.col,i):s.propCount==1&&t.report("Outlines shouldn't be hidden unless other visual changes are made.",s.line,s.col,i))}var i=this,s;e.addListener("startrule",n),e.addListener("startfontface",n),e.addListener("startpage",n),e.addListener("startpagemargin",n),e.addListener("startkeyframerule",n),e.addListener("property",function(e){var t=e.property.text.toLowerCase(),n=e.value;s&&(s.propCount++,t=="outline"&&(n=="none"||n=="0")&&(s.outline=!0))}),e.addListener("endrule",r),e.addListener("endfontface",r),e.addListener("endpage",r),e.addListener("endpagemargin",r),e.addListener("endkeyframerule",r)}}),CSSLint.addRule({id:"overqualified-elements",name:"Disallow overqualified elements",desc:"Don't use classes or IDs with elements (a.foo or a#foo).",browsers:"All",init:function(e,t){var n=this,r={};e.addListener("startrule",function(i){var s=i.selectors,o,u,a,f,l,c;for(f=0;f<s.length;f++){o=s[f];for(l=0;l<o.parts.length;l++){u=o.parts[l];if(u.type==e.SELECTOR_PART_TYPE)for(c=0;c<u.modifiers.length;c++)a=u.modifiers[c],u.elementName&&a.type=="id"?t.report("Element ("+u+") is overqualified, just use "+a+" without element name.",u.line,u.col,n):a.type=="class"&&(r[a]||(r[a]=[]),r[a].push({modifier:a,part:u}))}}}),e.addListener("endstylesheet",function(){var e;for(e in r)r.hasOwnProperty(e)&&r[e].length==1&&r[e][0].part.elementName&&t.report("Element ("+r[e][0].part+") is overqualified, just use "+r[e][0].modifier+" without element name.",r[e][0].part.line,r[e][0].part.col,n)})}}),CSSLint.addRule({id:"qualified-headings",name:"Disallow qualified headings",desc:"Headings should not be qualified (namespaced).",browsers:"All",init:function(e,t){var n=this;e.addListener("startrule",function(r){var i=r.selectors,s,o,u,a;for(u=0;u<i.length;u++){s=i[u];for(a=0;a<s.parts.length;a++)o=s.parts[a],o.type==e.SELECTOR_PART_TYPE&&o.elementName&&/h[1-6]/.test(o.elementName.toString())&&a>0&&t.report("Heading ("+o.elementName+") should not be qualified.",o.line,o.col,n)}})}}),CSSLint.addRule({id:"regex-selectors",name:"Disallow selectors that look like regexs",desc:"Selectors that look like regular expressions are slow and should be avoided.",browsers:"All",init:function(e,t){var n=this;e.addListener("startrule",function(r){var i=r.selectors,s,o,u,a,f,l;for(a=0;a<i.length;a++){s=i[a];for(f=0;f<s.parts.length;f++){o=s.parts[f];if(o.type==e.SELECTOR_PART_TYPE)for(l=0;l<o.modifiers.length;l++)u=o.modifiers[l],u.type=="attribute"&&/([\~\|\^\$\*]=)/.test(u)&&t.report("Attribute selectors with "+RegExp.$1+" are slow!",u.line,u.col,n)}}})}}),CSSLint.addRule({id:"rules-count",name:"Rules Count",desc:"Track how many rules there are.",browsers:"All",init:function(e,t){var n=this,r=0;e.addListener("startrule",function(){r++}),e.addListener("endstylesheet",function(){t.stat("rule-count",r)})}}),CSSLint.addRule({id:"selector-max-approaching",name:"Warn when approaching the 4095 selector limit for IE",desc:"Will warn when selector count is >= 3800 selectors.",browsers:"IE",init:function(e,t){var n=this,r=0;e.addListener("startrule",function(e){r+=e.selectors.length}),e.addListener("endstylesheet",function(){r>=3800&&t.report("You have "+r+" selectors. Internet Explorer supports a maximum of 4095 selectors per stylesheet. Consider refactoring.",0,0,n)})}}),CSSLint.addRule({id:"selector-max",name:"Error when past the 4095 selector limit for IE",desc:"Will error when selector count is > 4095.",browsers:"IE",init:function(e,t){var n=this,r=0;e.addListener("startrule",function(e){r+=e.selectors.length}),e.addListener("endstylesheet",function(){r>4095&&t.report("You have "+r+" selectors. Internet Explorer supports a maximum of 4095 selectors per stylesheet. Consider refactoring.",0,0,n)})}}),CSSLint.addRule({id:"shorthand",name:"Require shorthand properties",desc:"Use shorthand properties where possible.",browsers:"All",init:function(e,t){function n(e){f={}}function r(e){var n,r,s,o;for(n in l)if(l.hasOwnProperty(n)){o=0;for(r=0,s=l[n].length;r<s;r++)o+=f[l[n][r]]?1:0;o==l[n].length&&t.report("The properties "+l[n].join(", ")+" can be replaced by "+n+".",e.line,e.col,i)}}var i=this,s,o,u,a={},f,l={margin:["margin-top","margin-bottom","margin-left","margin-right"],padding:["padding-top","padding-bottom","padding-left","padding-right"]};for(s in l)if(l.hasOwnProperty(s))for(o=0,u=l[s].length;o<u;o++)a[l[s][o]]=s;e.addListener("startrule",n),e.addListener("startfontface",n),e.addListener("property",function(e){var t=e.property.toString().toLowerCase(),n=e.value.parts[0].value;a[t]&&(f[t]=1)}),e.addListener("endrule",r),e.addListener("endfontface",r)}}),CSSLint.addRule({id:"star-property-hack",name:"Disallow properties with a star prefix",desc:"Checks for the star property hack (targets IE6/7)",browsers:"All",init:function(e,t){var n=this;e.addListener("property",function(e){var r=e.property;r.hack=="*"&&t.report("Property with star prefix found.",e.property.line,e.property.col,n)})}}),CSSLint.addRule({id:"text-indent",name:"Disallow negative text-indent",desc:"Checks for text indent less than -99px",browsers:"All",init:function(e,t){function n(e){s=!1,o="inherit"}function r(e){s&&o!="ltr"&&t.report("Negative text-indent doesn't work well with RTL. If you use text-indent for image replacement explicitly set direction for that item to ltr.",s.line,s.col,i)}var i=this,s,o;e.addListener("startrule",n),e.addListener("startfontface",n),e.addListener("property",function(e){var t=e.property.toString().toLowerCase(),n=e.value;t=="text-indent"&&n.parts[0].value<-99?s=e.property:t=="direction"&&n=="ltr"&&(o="ltr")}),e.addListener("endrule",r),e.addListener("endfontface",r)}}),CSSLint.addRule({id:"underscore-property-hack",name:"Disallow properties with an underscore prefix",desc:"Checks for the underscore property hack (targets IE6)",browsers:"All",init:function(e,t){var n=this;e.addListener("property",function(e){var r=e.property;r.hack=="_"&&t.report("Property with underscore prefix found.",e.property.line,e.property.col,n)})}}),CSSLint.addRule({id:"unique-headings",name:"Headings should only be defined once",desc:"Headings should be defined only once.",browsers:"All",init:function(e,t){var n=this,r={h1:0,h2:0,h3:0,h4:0,h5:0,h6:0};e.addListener("startrule",function(e){var i=e.selectors,s,o,u,a,f;for(a=0;a<i.length;a++){s=i[a],o=s.parts[s.parts.length-1];if(o.elementName&&/(h[1-6])/i.test(o.elementName.toString())){for(f=0;f<o.modifiers.length;f++)if(o.modifiers[f].type=="pseudo"){u=!0;break}u||(r[RegExp.$1]++,r[RegExp.$1]>1&&t.report("Heading ("+o.elementName+") has already been defined.",o.line,o.col,n))}}}),e.addListener("endstylesheet",function(e){var i,s=[];for(i in r)r.hasOwnProperty(i)&&r[i]>1&&s.push(r[i]+" "+i+"s");s.length&&t.rollupWarn("You have "+s.join(", ")+" defined in this stylesheet.",n)})}}),CSSLint.addRule({id:"universal-selector",name:"Disallow universal selector",desc:"The universal selector (*) is known to be slow.",browsers:"All",init:function(e,t){var n=this;e.addListener("startrule",function(e){var r=e.selectors,i,s,o,u,a,f;for(u=0;u<r.length;u++)i=r[u],s=i.parts[i.parts.length-1],s.elementName=="*"&&t.report(n.desc,s.line,s.col,n)})}}),CSSLint.addRule({id:"unqualified-attributes",name:"Disallow unqualified attribute selectors",desc:"Unqualified attribute selectors are known to be slow.",browsers:"All",init:function(e,t){var n=this;e.addListener("startrule",function(r){var i=r.selectors,s,o,u,a,f,l;for(a=0;a<i.length;a++){s=i[a],o=s.parts[s.parts.length-1];if(o.type==e.SELECTOR_PART_TYPE)for(l=0;l<o.modifiers.length;l++)u=o.modifiers[l],u.type=="attribute"&&(!o.elementName||o.elementName=="*")&&t.report(n.desc,o.line,o.col,n)}})}}),CSSLint.addRule({id:"vendor-prefix",name:"Require standard property with vendor prefix",desc:"When using a vendor-prefixed property, make sure to include the standard one.",browsers:"All",init:function(e,t){function n(){s={},o=1}function r(e){var n,r,o,a,f,l,c=[];for(n in s)u[n]&&c.push({actual:n,needed:u[n]});for(r=0,o=c.length;r<o;r++)f=c[r].needed,l=c[r].actual,s[f]?s[f][0].pos<s[l][0].pos&&t.report("Standard property '"+f+"' should come after vendor-prefixed property '"+l+"'.",s[l][0].name.line,s[l][0].name.col,i):t.report("Missing standard property '"+f+"' to go along with '"+l+"'.",s[l][0].name.line,s[l][0].name.col,i)}var i=this,s,o,u={"-webkit-border-radius":"border-radius","-webkit-border-top-left-radius":"border-top-left-radius","-webkit-border-top-right-radius":"border-top-right-radius","-webkit-border-bottom-left-radius":"border-bottom-left-radius","-webkit-border-bottom-right-radius":"border-bottom-right-radius","-o-border-radius":"border-radius","-o-border-top-left-radius":"border-top-left-radius","-o-border-top-right-radius":"border-top-right-radius","-o-border-bottom-left-radius":"border-bottom-left-radius","-o-border-bottom-right-radius":"border-bottom-right-radius","-moz-border-radius":"border-radius","-moz-border-radius-topleft":"border-top-left-radius","-moz-border-radius-topright":"border-top-right-radius","-moz-border-radius-bottomleft":"border-bottom-left-radius","-moz-border-radius-bottomright":"border-bottom-right-radius","-moz-column-count":"column-count","-webkit-column-count":"column-count","-moz-column-gap":"column-gap","-webkit-column-gap":"column-gap","-moz-column-rule":"column-rule","-webkit-column-rule":"column-rule","-moz-column-rule-style":"column-rule-style","-webkit-column-rule-style":"column-rule-style","-moz-column-rule-color":"column-rule-color","-webkit-column-rule-color":"column-rule-color","-moz-column-rule-width":"column-rule-width","-webkit-column-rule-width":"column-rule-width","-moz-column-width":"column-width","-webkit-column-width":"column-width","-webkit-column-span":"column-span","-webkit-columns":"columns","-moz-box-shadow":"box-shadow","-webkit-box-shadow":"box-shadow","-moz-transform":"transform","-webkit-transform":"transform","-o-transform":"transform","-ms-transform":"transform","-moz-transform-origin":"transform-origin","-webkit-transform-origin":"transform-origin","-o-transform-origin":"transform-origin","-ms-transform-origin":"transform-origin","-moz-box-sizing":"box-sizing","-webkit-box-sizing":"box-sizing","-moz-user-select":"user-select","-khtml-user-select":"user-select","-webkit-user-select":"user-select"};e.addListener("startrule",n),e.addListener("startfontface",n),e.addListener("startpage",n),e.addListener("startpagemargin",n),e.addListener("startkeyframerule",n),e.addListener("property",function(e){var t=e.property.text.toLowerCase();s[t]||(s[t]=[]),s[t].push({name:e.property,value:e.value,pos:o++})}),e.addListener("endrule",r),e.addListener("endfontface",r),e.addListener("endpage",r),e.addListener("endpagemargin",r),e.addListener("endkeyframerule",r)}}),CSSLint.addRule({id:"zero-units",name:"Disallow units for 0 values",desc:"You don't need to specify units when a value is 0.",browsers:"All",init:function(e,t){var n=this;e.addListener("property",function(e){var r=e.value.parts,i=0,s=r.length;while(i<s)(r[i].units||r[i].type=="percentage")&&r[i].value===0&&r[i].type!="time"&&t.report("Values of 0 shouldn't have units specified.",r[i].line,r[i].col,n),i++})}}),function(){var e=function(e){return!e||e.constructor!==String?"":e.replace(/[\"&><]/g,function(e){switch(e){case'"':return"&quot;";case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;"}})};CSSLint.addFormatter({id:"checkstyle-xml",name:"Checkstyle XML format",startFormat:function(){return'<?xml version="1.0" encoding="utf-8"?><checkstyle>'},endFormat:function(){return"</checkstyle>"},readError:function(t,n){return'<file name="'+e(t)+'"><error line="0" column="0" severty="error" message="'+e(n)+'"></error></file>'},formatResults:function(t,n,r){var i=t.messages,s=[],o=function(e){return!!e&&"name"in e?"net.csslint."+e.name.replace(/\s/g,""):""};return i.length>0&&(s.push('<file name="'+n+'">'),CSSLint.Util.forEach(i,function(t,n){t.rollup||s.push('<error line="'+t.line+'" column="'+t.col+'" severity="'+t.type+'"'+' message="'+e(t.message)+'" source="'+o(t.rule)+'"/>')}),s.push("</file>")),s.join("")}})}(),CSSLint.addFormatter({id:"compact",name:"Compact, 'porcelain' format",startFormat:function(){return""},endFormat:function(){return""},formatResults:function(e,t,n){var r=e.messages,i="";n=n||{};var s=function(e){return e.charAt(0).toUpperCase()+e.slice(1)};return r.length===0?n.quiet?"":t+": Lint Free!":(CSSLint.Util.forEach(r,function(e,n){e.rollup?i+=t+": "+s(e.type)+" - "+e.message+"\n":i+=t+": "+"line "+e.line+", col "+e.col+", "+s(e.type)+" - "+e.message+" ("+e.rule.id+")\n"}),i)}}),CSSLint.addFormatter({id:"csslint-xml",name:"CSSLint XML format",startFormat:function(){return'<?xml version="1.0" encoding="utf-8"?><csslint>'},endFormat:function(){return"</csslint>"},formatResults:function(e,t,n){var r=e.messages,i=[],s=function(e){return!e||e.constructor!==String?"":e.replace(/\"/g,"'").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")};return r.length>0&&(i.push('<file name="'+t+'">'),CSSLint.Util.forEach(r,function(e,t){e.rollup?i.push('<issue severity="'+e.type+'" reason="'+s(e.message)+'" evidence="'+s(e.evidence)+'"/>'):i.push('<issue line="'+e.line+'" char="'+e.col+'" severity="'+e.type+'"'+' reason="'+s(e.message)+'" evidence="'+s(e.evidence)+'"/>')}),i.push("</file>")),i.join("")}}),CSSLint.addFormatter({id:"junit-xml",name:"JUNIT XML format",startFormat:function(){return'<?xml version="1.0" encoding="utf-8"?><testsuites>'},endFormat:function(){return"</testsuites>"},formatResults:function(e,t,n){var r=e.messages,i=[],s={error:0,failure:0},o=function(e){return!!e&&"name"in e?"net.csslint."+e.name.replace(/\s/g,""):""},u=function(e){return!e||e.constructor!==String?"":e.replace(/\"/g,"'").replace(/</g,"&lt;").replace(/>/g,"&gt;")};return r.length>0&&(r.forEach(function(e,t){var n=e.type==="warning"?"error":e.type;e.rollup||(i.push('<testcase time="0" name="'+o(e.rule)+'">'),i.push("<"+n+' message="'+u(e.message)+'"><![CDATA['+e.line+":"+e.col+":"+u(e.evidence)+"]]></"+n+">"),i.push("</testcase>"),s[n]+=1)}),i.unshift('<testsuite time="0" tests="'+r.length+'" skipped="0" errors="'+s.error+'" failures="'+s.failure+'" package="net.csslint" name="'+t+'">'),i.push("</testsuite>")),i.join("")}}),CSSLint.addFormatter({id:"lint-xml",name:"Lint XML format",startFormat:function(){return'<?xml version="1.0" encoding="utf-8"?><lint>'},endFormat:function(){return"</lint>"},formatResults:function(e,t,n){var r=e.messages,i=[],s=function(e){return!e||e.constructor!==String?"":e.replace(/\"/g,"'").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")};return r.length>0&&(i.push('<file name="'+t+'">'),CSSLint.Util.forEach(r,function(e,t){e.rollup?i.push('<issue severity="'+e.type+'" reason="'+s(e.message)+'" evidence="'+s(e.evidence)+'"/>'):i.push('<issue line="'+e.line+'" char="'+e.col+'" severity="'+e.type+'"'+' reason="'+s(e.message)+'" evidence="'+s(e.evidence)+'"/>')}),i.push("</file>")),i.join("")}}),CSSLint.addFormatter({id:"text",name:"Plain Text",startFormat:function(){return""},endFormat:function(){return""},formatResults:function(e,t,n){var r=e.messages,i="";n=n||{};if(r.length===0)return n.quiet?"":"\n\ncsslint: No errors in "+t+".";i="\n\ncsslint: There are "+r.length+" problems in "+t+".";var s=t.lastIndexOf("/"),o=t;return s===-1&&(s=t.lastIndexOf("\\")),s>-1&&(o=t.substring(s+1)),CSSLint.Util.forEach(r,function(e,t){i=i+"\n\n"+o,e.rollup?(i+="\n"+(t+1)+": "+e.type,i+="\n"+e.message):(i+="\n"+(t+1)+": "+e.type+" at line "+e.line+", col "+e.col,i+="\n"+e.message,i+="\n"+e.evidence)}),i}}),exports.CSSLint=CSSLint}),ace.define("ace/worker/mirror",["require","exports","module","ace/document","ace/lib/lang"],function(e,t,n){var r=e("../document").Document,i=e("../lib/lang"),s=t.Mirror=function(e){this.sender=e;var t=this.doc=new r(""),n=this.deferredUpdate=i.delayedCall(this.onUpdate.bind(this)),s=this;e.on("change",function(e){t.applyDeltas(e.data);if(s.$timeout)return n.schedule(s.$timeout);s.onUpdate()})};(function(){this.$timeout=500,this.setTimeout=function(e){this.$timeout=e},this.setValue=function(e){this.doc.setValue(e),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(e){this.sender.callback(this.doc.getValue(),e)},this.onUpdate=function(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(s.prototype)})
\ No newline at end of file
diff --git a/app/assets/lib/ace/worker-html.js b/app/assets/lib/ace/worker-html.js
new file mode 100644
index 000000000..7e433cdf1
--- /dev/null
+++ b/app/assets/lib/ace/worker-html.js
@@ -0,0 +1 @@
+"no use strict";(function(e){if(typeof e.window!="undefined"&&e.document)return;e.console=function(){var e=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:e})},e.console.error=e.console.warn=e.console.log=e.console.trace=e.console,e.window=e,e.ace=e,e.onerror=function(e,t,n,r,i){console.error("Worker "+(i?i.stack:e))},e.normalizeModule=function(t,n){if(n.indexOf("!")!==-1){var r=n.split("!");return e.normalizeModule(t,r[0])+"!"+e.normalizeModule(t,r[1])}if(n.charAt(0)=="."){var i=t.split("/").slice(0,-1).join("/");n=(i?i+"/":"")+n;while(n.indexOf(".")!==-1&&s!=n){var s=n;n=n.replace(/^\.\//,"").replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return n},e.require=function(t,n){n||(n=t,t=null);if(!n.charAt)throw new Error("worker.js require() accepts only (parentId, id) as arguments");n=e.normalizeModule(t,n);var r=e.require.modules[n];if(r)return r.initialized||(r.initialized=!0,r.exports=r.factory().exports),r.exports;var i=n.split("/");if(!e.require.tlns)return console.log("unable to load "+n);i[0]=e.require.tlns[i[0]]||i[0];var s=i.join("/")+".js";return e.require.id=n,importScripts(s),e.require(t,n)},e.require.modules={},e.require.tlns={},e.define=function(t,n,r){arguments.length==2?(r=n,typeof t!="string"&&(n=t,t=e.require.id)):arguments.length==1&&(r=t,n=[],t=e.require.id),n.length||(n=["require","exports","module"]);if(t.indexOf("text!")===0)return;var i=function(n){return e.require(t,n)};e.require.modules[t]={exports:{},factory:function(){var e=this,t=r.apply(this,n.map(function(t){switch(t){case"require":return i;case"exports":return e.exports;case"module":return e;default:return i(t)}}));return t&&(e.exports=t),e}}},e.define.amd={},e.initBaseUrls=function(e){require.tlns=e},e.initSender=function(){var t=e.require("ace/lib/event_emitter").EventEmitter,n=e.require("ace/lib/oop"),r=function(){};return function(){n.implement(this,t),this.callback=function(e,t){postMessage({type:"call",id:t,data:e})},this.emit=function(e,t){postMessage({type:"event",name:e,data:t})}}.call(r.prototype),new r};var t=e.main=null,n=e.sender=null;e.onmessage=function(r){var i=r.data;if(i.command){if(!t[i.command])throw new Error("Unknown command:"+i.command);t[i.command].apply(t,i.args)}else if(i.init){initBaseUrls(i.tlns),require("ace/lib/es5-shim"),n=e.sender=initSender();var s=require(i.module)[i.classname];t=e.main=new s(n)}else i.event&&n&&n._signal(i.event,i.data)}})(this),ace.define("ace/mode/html_worker",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/worker/mirror","ace/mode/html/saxparser"],function(e,t,n){var r=e("../lib/oop"),i=e("../lib/lang"),s=e("../worker/mirror").Mirror,o=e("./html/saxparser").SAXParser,u={"expected-doctype-but-got-start-tag":"info","expected-doctype-but-got-chars":"info","non-html-root":"info"},a=t.Worker=function(e){s.call(this,e),this.setTimeout(400),this.context=null};r.inherits(a,s),function(){this.setOptions=function(e){this.context=e.context},this.onUpdate=function(){var e=this.doc.getValue();if(!e)return;var t=new o,n=[],r=function(){};t.contentHandler={startDocument:r,endDocument:r,startElement:r,endElement:r,characters:r},t.errorHandler={error:function(e,t,r){n.push({row:t.line,column:t.column,text:e,type:u[r]||"error"})}},this.context?t.parseFragment(e,this.context):t.parse(e),this.sender.emit("error",n)}}.call(a.prototype)}),ace.define("ace/lib/oop",["require","exports","module"],function(e,t,n){t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}}),ace.define("ace/lib/lang",["require","exports","module"],function(e,t,n){t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){var n="";while(t>0){t&1&&(n+=e);if(t>>=1)e+=e}return n};var r=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(r,"")},t.stringTrimRight=function(e){return e.replace(i,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){var t=[];for(var n=0,r=e.length;n<r;n++)e[n]&&typeof e[n]=="object"?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=function(e){if(typeof e!="object"||!e)return e;var n=e.constructor;if(n===RegExp)return e;var r=n();for(var i in e)typeof e[i]=="object"?r[i]=t.deepCopy(e[i]):r[i]=e[i];return r},t.arrayToMap=function(e){var t={};for(var n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return e.replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,function(e){n.push({offset:arguments[arguments.length-2],length:e.length})}),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},r=function(e){return r.cancel(),t=setTimeout(n,e||0),r};return r.schedule=r,r.call=function(){return this.cancel(),e(),r},r.cancel=function(){return clearTimeout(t),t=null,r},r.isPending=function(){return t},r},t.delayedCall=function(e,t){var n=null,r=function(){n=null,e()},i=function(e){n==null&&(n=setTimeout(r,e||t))};return i.delay=function(e){n&&clearTimeout(n),n=setTimeout(r,e||t)},i.schedule=i,i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){return n},i}}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(e,t,n){function r(){}function i(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(t){}}function s(e){return e=+e,e!==e?e=0:e!==0&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}function o(e){var t=typeof e;return e===null||t==="undefined"||t==="boolean"||t==="number"||t==="string"}function u(e){var t,n,r;if(o(e))return e;n=e.valueOf;if(typeof n=="function"){t=n.call(e);if(o(t))return t}r=e.toString;if(typeof r=="function"){t=r.call(e);if(o(t))return t}throw new TypeError}Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if(typeof t!="function")throw new TypeError("Function.prototype.bind called on incompatible "+t);var n=c.call(arguments,1),i=function(){if(this instanceof i){var r=t.apply(this,n.concat(c.call(arguments)));return Object(r)===r?r:this}return t.apply(e,n.concat(c.call(arguments)))};return t.prototype&&(r.prototype=t.prototype,i.prototype=new r,r.prototype=null),i});var a=Function.prototype.call,f=Array.prototype,l=Object.prototype,c=f.slice,h=a.bind(l.toString),p=a.bind(l.hasOwnProperty),d,v,m,g,y;if(y=p(l,"__defineGetter__"))d=a.bind(l.__defineGetter__),v=a.bind(l.__defineSetter__),m=a.bind(l.__lookupGetter__),g=a.bind(l.__lookupSetter__);if([1,2].splice(0).length!=2)if(!function(){function e(e){var t=new Array(e+2);return t[0]=t[1]=0,t}var t=[],n;t.splice.apply(t,e(20)),t.splice.apply(t,e(26)),n=t.length,t.splice(5,0,"XXX"),n+1==t.length;if(n+1==t.length)return!0}())Array.prototype.splice=function(e,t){var n=this.length;e>0?e>n&&(e=n):e==void 0?e=0:e<0&&(e=Math.max(n+e,0)),e+t<n||(t=n-e);var r=this.slice(e,e+t),i=c.call(arguments,2),s=i.length;if(e===n)s&&this.push.apply(this,i);else{var o=Math.min(t,n-e),u=e+o,a=u+s-o,f=n-u,l=n-o;if(a<u)for(var h=0;h<f;++h)this[a+h]=this[u+h];else if(a>u)for(h=f;h--;)this[a+h]=this[u+h];if(s&&e===l)this.length=l,this.push.apply(this,i);else{this.length=l+s;for(h=0;h<s;++h)this[e+h]=i[h]}}return r};else{var b=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?b.apply(this,[e===void 0?0:e,t===void 0?this.length-e:t].concat(c.call(arguments,2))):[]}}Array.isArray||(Array.isArray=function(e){return h(e)=="[object Array]"});var w=Object("a"),E=w[0]!="a"||!(0 in w);Array.prototype.forEach||(Array.prototype.forEach=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=arguments[1],i=-1,s=n.length>>>0;if(h(e)!="[object Function]")throw new TypeError;while(++i<s)i in n&&e.call(r,n[i],i,t)}),Array.prototype.map||(Array.prototype.map=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=Array(r),s=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var o=0;o<r;o++)o in n&&(i[o]=e.call(s,n[o],o,t));return i}),Array.prototype.filter||(Array.prototype.filter=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=[],s,o=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var u=0;u<r;u++)u in n&&(s=n[u],e.call(o,s,u,t)&&i.push(s));return i}),Array.prototype.every||(Array.prototype.every=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var s=0;s<r;s++)if(s in n&&!e.call(i,n[s],s,t))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var s=0;s<r;s++)if(s in n&&e.call(i,n[s],s,t))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0;if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");if(!r&&arguments.length==1)throw new TypeError("reduce of empty array with no initial value");var i=0,s;if(arguments.length>=2)s=arguments[1];else do{if(i in n){s=n[i++];break}if(++i>=r)throw new TypeError("reduce of empty array with no initial value")}while(!0);for(;i<r;i++)i in n&&(s=e.call(void 0,s,n[i],i,t));return s}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0;if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");if(!r&&arguments.length==1)throw new TypeError("reduceRight of empty array with no initial value");var i,s=r-1;if(arguments.length>=2)i=arguments[1];else do{if(s in n){i=n[s--];break}if(--s<0)throw new TypeError("reduceRight of empty array with no initial value")}while(!0);do s in this&&(i=e.call(void 0,i,n[s],s,t));while(s--);return i});if(!Array.prototype.indexOf||[0,1].indexOf(1,2)!=-1)Array.prototype.indexOf=function(e){var t=E&&h(this)=="[object String]"?this.split(""):F(this),n=t.length>>>0;if(!n)return-1;var r=0;arguments.length>1&&(r=s(arguments[1])),r=r>=0?r:Math.max(0,n+r);for(;r<n;r++)if(r in t&&t[r]===e)return r;return-1};if(!Array.prototype.lastIndexOf||[0,1].lastIndexOf(0,-3)!=-1)Array.prototype.lastIndexOf=function(e){var t=E&&h(this)=="[object String]"?this.split(""):F(this),n=t.length>>>0;if(!n)return-1;var r=n-1;arguments.length>1&&(r=Math.min(r,s(arguments[1]))),r=r>=0?r:n-Math.abs(r);for(;r>=0;r--)if(r in t&&e===t[r])return r;return-1};Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__||(e.constructor?e.constructor.prototype:l)});if(!Object.getOwnPropertyDescriptor){var S="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(e,t){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError(S+e);if(!p(e,t))return;var n,r,i;n={enumerable:!0,configurable:!0};if(y){var s=e.__proto__;e.__proto__=l;var r=m(e,t),i=g(e,t);e.__proto__=s;if(r||i)return r&&(n.get=r),i&&(n.set=i),n}return n.value=e[t],n}}Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){return Object.keys(e)});if(!Object.create){var x;Object.prototype.__proto__===null?x=function(){return{__proto__:null}}:x=function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(e,t){var n;if(e===null)n=x();else{if(typeof e!="object")throw new TypeError("typeof prototype["+typeof e+"] != 'object'");var r=function(){};r.prototype=e,n=new r,n.__proto__=e}return t!==void 0&&Object.defineProperties(n,t),n}}if(Object.defineProperty){var T=i({}),N=typeof document=="undefined"||i(document.createElement("div"));if(!T||!N)var C=Object.defineProperty}if(!Object.defineProperty||C){var k="Property description must be an object: ",L="Object.defineProperty called on non-object: ",A="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(e,t,n){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError(L+e);if(typeof n!="object"&&typeof n!="function"||n===null)throw new TypeError(k+n);if(C)try{return C.call(Object,e,t,n)}catch(r){}if(p(n,"value"))if(y&&(m(e,t)||g(e,t))){var i=e.__proto__;e.__proto__=l,delete e[t],e[t]=n.value,e.__proto__=i}else e[t]=n.value;else{if(!y)throw new TypeError(A);p(n,"get")&&d(e,t,n.get),p(n,"set")&&v(e,t,n.set)}return e}}Object.defineProperties||(Object.defineProperties=function(e,t){for(var n in t)p(t,n)&&Object.defineProperty(e,n,t[n]);return e}),Object.seal||(Object.seal=function(e){return e}),Object.freeze||(Object.freeze=function(e){return e});try{Object.freeze(function(){})}catch(O){Object.freeze=function(e){return function(t){return typeof t=="function"?t:e(t)}}(Object.freeze)}Object.preventExtensions||(Object.preventExtensions=function(e){return e}),Object.isSealed||(Object.isSealed=function(e){return!1}),Object.isFrozen||(Object.isFrozen=function(e){return!1}),Object.isExtensible||(Object.isExtensible=function(e){if(Object(e)===e)throw new TypeError;var t="";while(p(e,t))t+="?";e[t]=!0;var n=p(e,t);return delete e[t],n});if(!Object.keys){var M=!0,_=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],D=_.length;for(var P in{toString:null})M=!1;Object.keys=function I(e){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError("Object.keys called on a non-object");var I=[];for(var t in e)p(e,t)&&I.push(t);if(M)for(var n=0,r=D;n<r;n++){var i=_[n];p(e,i)&&I.push(i)}return I}}Date.now||(Date.now=function(){return(new Date).getTime()});var H="	\n\f\r   ᠎              \u2028\u2029";if(!String.prototype.trim||H.trim()){H="["+H+"]";var B=new RegExp("^"+H+H+"*"),j=new RegExp(H+H+"*$");String.prototype.trim=function(){return String(this).replace(B,"").replace(j,"")}}var F=function(e){if(e==null)throw new TypeError("can't convert "+e+" to object");return Object(e)}}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,o=e("./anchor").Anchor,u=function(e){this.$lines=[],e.length===0?this.$lines=[""]:Array.isArray(e)?this._insertLines(0,e):this.insert({row:0,column:0},e)};(function(){r.implement(this,i),this.setValue=function(e){var t=this.getLength();this.remove(new s(0,0,t,this.getLine(t-1).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new o(this,e,t)},"aaa".split(/a/).length===0?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){if(this.$newLineMode===e)return;this.$newLineMode=e,this._signal("changeNewLineMode")},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return e=="\r\n"||e=="\r"||e=="\n"},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){if(e.start.row==e.end.row)return this.getLine(e.start.row).substring(e.start.column,e.end.column);var t=this.getLines(e.start.row,e.end.row);t[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;return e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column)),t.join(this.getNewLineCharacter())},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):e.row<0&&(e.row=0),e},this.insert=function(e,t){if(!t||t.length===0)return e;e=this.$clipPosition(e),this.getLength()<=1&&this.$detectNewLine(t);var n=this.$split(t),r=n.splice(0,1)[0],i=n.length==0?null:n.splice(n.length-1,1)[0];return e=this.insertInLine(e,r),i!==null&&(e=this.insertNewLine(e),e=this._insertLines(e.row,n),e=this.insertInLine(e,i||"")),e},this.insertLines=function(e,t){return e>=this.getLength()?this.insert({row:e,column:0},"\n"+t.join("\n")):this._insertLines(Math.max(e,0),t)},this._insertLines=function(e,t){if(t.length==0)return{row:e,column:0};while(t.length>61440){var n=this._insertLines(e,t.slice(0,61440));t=t.slice(61440),e=n.row}var r=[e,0];r.push.apply(r,t),this.$lines.splice.apply(this.$lines,r);var i=new s(e,0,e+t.length,0),o={action:"insertLines",range:i,lines:t};return this._signal("change",{data:o}),i.end},this.insertNewLine=function(e){e=this.$clipPosition(e);var t=this.$lines[e.row]||"";this.$lines[e.row]=t.substring(0,e.column),this.$lines.splice(e.row+1,0,t.substring(e.column,t.length));var n={row:e.row+1,column:0},r={action:"insertText",range:s.fromPoints(e,n),text:this.getNewLineCharacter()};return this._signal("change",{data:r}),n},this.insertInLine=function(e,t){if(t.length==0)return e;var n=this.$lines[e.row]||"";this.$lines[e.row]=n.substring(0,e.column)+t+n.substring(e.column);var r={row:e.row,column:e.column+t.length},i={action:"insertText",range:s.fromPoints(e,r),text:t};return this._signal("change",{data:i}),r},this.remove=function(e){e instanceof s||(e=s.fromPoints(e.start,e.end)),e.start=this.$clipPosition(e.start),e.end=this.$clipPosition(e.end);if(e.isEmpty())return e.start;var t=e.start.row,n=e.end.row;if(e.isMultiLine()){var r=e.start.column==0?t:t+1,i=n-1;e.end.column>0&&this.removeInLine(n,0,e.end.column),i>=r&&this._removeLines(r,i),r!=t&&(this.removeInLine(t,e.start.column,this.getLine(t).length),this.removeNewLine(e.start.row))}else this.removeInLine(t,e.start.column,e.end.column);return e.start},this.removeInLine=function(e,t,n){if(t==n)return;var r=new s(e,t,e,n),i=this.getLine(e),o=i.substring(t,n),u=i.substring(0,t)+i.substring(n,i.length);this.$lines.splice(e,1,u);var a={action:"removeText",range:r,text:o};return this._signal("change",{data:a}),r.start},this.removeLines=function(e,t){return e<0||t>=this.getLength()?this.remove(new s(e,0,t+1,0)):this._removeLines(e,t)},this._removeLines=function(e,t){var n=new s(e,0,t+1,0),r=this.$lines.splice(e,t-e+1),i={action:"removeLines",range:n,nl:this.getNewLineCharacter(),lines:r};return this._signal("change",{data:i}),r},this.removeNewLine=function(e){var t=this.getLine(e),n=this.getLine(e+1),r=new s(e,t.length,e+1,0),i=t+n;this.$lines.splice(e,2,i);var o={action:"removeText",range:r,text:this.getNewLineCharacter()};this._signal("change",{data:o})},this.replace=function(e,t){e instanceof s||(e=s.fromPoints(e.start,e.end));if(t.length==0&&e.isEmpty())return e.start;if(t==this.getTextRange(e))return e.end;this.remove(e);if(t)var n=this.insert(e.start,t);else n=e.start;return n},this.applyDeltas=function(e){for(var t=0;t<e.length;t++){var n=e[t],r=s.fromPoints(n.range.start,n.range.end);n.action=="insertLines"?this.insertLines(r.start.row,n.lines):n.action=="insertText"?this.insert(r.start,n.text):n.action=="removeLines"?this._removeLines(r.start.row,r.end.row-1):n.action=="removeText"&&this.remove(r)}},this.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--){var n=e[t],r=s.fromPoints(n.range.start,n.range.end);n.action=="insertLines"?this._removeLines(r.start.row,r.end.row-1):n.action=="insertText"?this.remove(r):n.action=="removeLines"?this._insertLines(r.start.row,n.lines):n.action=="removeText"&&this.insert(r.start,n.text)}},this.indexToPosition=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length;for(var i=t||0,s=n.length;i<s;i++){e-=n[i].length+r;if(e<0)return{row:i,column:e+n[i].length+r}}return{row:s-1,column:n[s-1].length}},this.positionToIndex=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=0,s=Math.min(e.row,n.length);for(var o=t||0;o<s;++o)i+=n[o].length+r;return i+e.column}}).call(u.prototype),t.Document=u}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,t,n){var r={},i=function(){this.propagationStopped=!0},s=function(){this.defaultPrevented=!0};r._emit=r._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],r=this._defaultHandlers[e];if(!n.length&&!r)return;if(typeof t!="object"||!t)t={};t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=i),t.preventDefault||(t.preventDefault=s),n=n.slice();for(var o=0;o<n.length;o++){n[o](t,this);if(t.propagationStopped)break}if(r&&!t.defaultPrevented)return r(t,this)},r._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(!n)return;n=n.slice();for(var r=0;r<n.length;r++)n[r](t,this)},r.once=function(e,t){var n=this;t&&this.addEventListener(e,function r(){n.removeEventListener(e,r),t.apply(null,arguments)})},r.setDefaultHandler=function(e,t){var n=this._defaultHandlers;n||(n=this._defaultHandlers={_disabled_:{}});if(n[e]){var r=n[e],i=n._disabled_[e];i||(n._disabled_[e]=i=[]),i.push(r);var s=i.indexOf(t);s!=-1&&i.splice(s,1)}n[e]=t},r.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(!n)return;var r=n._disabled_[e];if(n[e]==t){var i=n[e];r&&this.setDefaultHandler(e,r.pop())}else if(r){var s=r.indexOf(t);s!=-1&&r.splice(s,1)}},r.on=r.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[e];return r||(r=this._eventRegistry[e]=[]),r.indexOf(t)==-1&&r[n?"unshift":"push"](t),t},r.off=r.removeListener=r.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(!n)return;var r=n.indexOf(t);r!==-1&&n.splice(r,1)},r.removeAllListeners=function(e){this._eventRegistry&&(this._eventRegistry[e]=[])},t.EventEmitter=r}),ace.define("ace/range",["require","exports","module"],function(e,t,n){var r=function(e,t){return e.row-t.row||e.column-t.column},i=function(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return this.compare(e,t)==0},this.compareRange=function(e){var t,n=e.end,r=e.start;return t=this.compare(n.row,n.column),t==1?(t=this.compare(r.row,r.column),t==1?2:t==0?1:0):t==-1?-2:(t=this.compare(r.row,r.column),t==-1?-1:t==1?42:0)},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return this.comparePoint(e.start)==0&&this.comparePoint(e.end)==0},this.intersects=function(e){var t=this.compareRange(e);return t==-1||t==0||t==1},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){typeof e=="object"?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){typeof e=="object"?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)||this.isStart(e,t)?!1:!0:!1},this.insideStart=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)?!1:!0:!1},this.insideEnd=function(e,t){return this.compare(e,t)==0?this.isStart(e,t)?!1:!0:!1},this.compare=function(e,t){return!this.isMultiLine()&&e===this.start.row?t<this.start.column?-1:t>this.end.column?1:0:e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else if(this.end.row<e)var n={row:e,column:0};if(this.start.row>t)var r={row:t+1,column:0};else if(this.start.row<e)var r={row:e,column:0};return i.fromPoints(r||this.start,n||this.end)},this.extend=function(e,t){var n=this.compare(e,t);if(n==0)return this;if(n==-1)var r={row:e,column:t};else var s={row:e,column:t};return i.fromPoints(r||this.start,s||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return i.fromPoints(this.start,this.end)},this.collapseRows=function(){return this.end.column==0?new i(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new i(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),n=e.documentToScreenPosition(this.end);return new i(t.row,t.column,n.row,n.column)},this.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t}}).call(i.prototype),i.fromPoints=function(e,t){return new i(e.row,e.column,t.row,t.column)},i.comparePoints=r,i.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=i}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=t.Anchor=function(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),typeof n=="undefined"?this.setPosition(t.row,t.column):this.setPosition(t,n)};(function(){r.implement(this,i),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(e){var t=e.data,n=t.range;if(n.start.row==n.end.row&&n.start.row!=this.row)return;if(n.start.row>this.row)return;if(n.start.row==this.row&&n.start.column>this.column)return;var r=this.row,i=this.column,s=n.start,o=n.end;if(t.action==="insertText")if(s.row===r&&s.column<=i){if(s.column!==i||!this.$insertRight)s.row===o.row?i+=o.column-s.column:(i-=s.column,r+=o.row-s.row)}else s.row!==o.row&&s.row<r&&(r+=o.row-s.row);else t.action==="insertLines"?(s.row!==r||i!==0||!this.$insertRight)&&s.row<=r&&(r+=o.row-s.row):t.action==="removeText"?s.row===r&&s.column<i?o.column>=i?i=s.column:i=Math.max(0,i-(o.column-s.column)):s.row!==o.row&&s.row<r?(o.row===r&&(i=Math.max(0,i-o.column)+s.column),r-=o.row-s.row):o.row===r&&(r-=o.row-s.row,i=Math.max(0,i-o.column)+s.column):t.action=="removeLines"&&s.row<=r&&(o.row<=r?r-=o.row-s.row:(r=s.row,i=0));this.setPosition(r,i,!0)},this.setPosition=function(e,t,n){var r;n?r={row:e,column:t}:r=this.$clipPositionToDocument(e,t);if(this.row==r.row&&this.column==r.column)return;var i={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._signal("change",{old:i,value:r})},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(s.prototype)}),ace.define("ace/mode/html/saxparser",["require","exports","module"],function(e,t,n){n.exports=function r(t,n,i){function s(u,a){if(!n[u]){if(!t[u]){var f=typeof e=="function"&&e;if(!a&&f)return f(u,!0);if(o)return o(u,!0);throw new Error("Cannot find module '"+u+"'")}var l=n[u]={exports:{}};t[u][0].call(l.exports,function(e){var n=t[u][1][e];return s(n?n:e)},l,l.exports,r,t,n,i)}return n[u].exports}var o=typeof e=="function"&&e;for(var u=0;u<i.length;u++)s(i[u]);return s}({1:[function(e,t,n){function r(e){if(e.namespaceURI==="http://www.w3.org/1999/xhtml")return e.localName==="applet"||e.localName==="caption"||e.localName==="marquee"||e.localName==="object"||e.localName==="table"||e.localName==="td"||e.localName==="th";if(e.namespaceURI==="http://www.w3.org/1998/Math/MathML")return e.localName==="mi"||e.localName==="mo"||e.localName==="mn"||e.localName==="ms"||e.localName==="mtext"||e.localName==="annotation-xml";if(e.namespaceURI==="http://www.w3.org/2000/svg")return e.localName==="foreignObject"||e.localName==="desc"||e.localName==="title"}function i(e){return r(e)||e.namespaceURI==="http://www.w3.org/1999/xhtml"&&e.localName==="ol"||e.namespaceURI==="http://www.w3.org/1999/xhtml"&&e.localName==="ul"}function s(e){return e.namespaceURI==="http://www.w3.org/1999/xhtml"&&e.localName==="table"||e.namespaceURI==="http://www.w3.org/1999/xhtml"&&e.localName==="html"}function o(e){return e.namespaceURI==="http://www.w3.org/1999/xhtml"&&e.localName==="tbody"||e.namespaceURI==="http://www.w3.org/1999/xhtml"&&e.localName==="tfoot"||e.namespaceURI==="http://www.w3.org/1999/xhtml"&&e.localName==="thead"||e.namespaceURI==="http://www.w3.org/1999/xhtml"&&e.localName==="html"}function u(e){return e.namespaceURI==="http://www.w3.org/1999/xhtml"&&e.localName==="tr"||e.namespaceURI==="http://www.w3.org/1999/xhtml"&&e.localName==="html"}function a(e){return r(e)||e.namespaceURI==="http://www.w3.org/1999/xhtml"&&e.localName==="button"}function f(e){return(e.namespaceURI!=="http://www.w3.org/1999/xhtml"||e.localName!=="optgroup")&&(e.namespaceURI!=="http://www.w3.org/1999/xhtml"||e.localName!=="option")}function l(){this.elements=[],this.rootNode=null,this.headElement=null,this.bodyElement=null}l.prototype._inScope=function(e,t){for(var n=this.elements.length-1;n>=0;n--){var r=this.elements[n];if(r.localName===e)return!0;if(t(r))return!1}},l.prototype.push=function(e){this.elements.push(e)},l.prototype.pushHtmlElement=function(e){this.rootNode=e.node,this.push(e)},l.prototype.pushHeadElement=function(e){this.headElement=e.node,this.push(e)},l.prototype.pushBodyElement=function(e){this.bodyElement=e.node,this.push(e)},l.prototype.pop=function(){return this.elements.pop()},l.prototype.remove=function(e){this.elements.splice(this.elements.indexOf(e),1)},l.prototype.popUntilPopped=function(e){var t;do t=this.pop();while(t.localName!=e)},l.prototype.popUntilTableScopeMarker=function(){while(!s(this.top))this.pop()},l.prototype.popUntilTableBodyScopeMarker=function(){while(!o(this.top))this.pop()},l.prototype.popUntilTableRowScopeMarker=function(){while(!u(this.top))this.pop()},l.prototype.item=function(e){return this.elements[e]},l.prototype.contains=function(e){return this.elements.indexOf(e)!==-1},l.prototype.inScope=function(e){return this._inScope(e,r)},l.prototype.inListItemScope=function(e){return this._inScope(e,i)},l.prototype.inTableScope=function(e){return this._inScope(e,s)},l.prototype.inButtonScope=function(e){return this._inScope(e,a)},l.prototype.inSelectScope=function(e){return this._inScope(e,f)},l.prototype.hasNumberedHeaderElementInScope=function(){for(var e=this.elements.length-1;e>=0;e--){var t=this.elements[e];if(t.isNumberedHeader())return!0;if(r(t))return!1}},l.prototype.furthestBlockForFormattingElement=function(e){var t=null;for(var n=this.elements.length-1;n>=0;n--){var r=this.elements[n];if(r.node===e)break;r.isSpecial()&&(t=r)}return t},l.prototype.findIndex=function(e){for(var t=this.elements.length-1;t>=0;t--)if(this.elements[t].localName==e)return t;return-1},l.prototype.remove_openElements_until=function(e){var t=!1,n;while(!t)n=this.elements.pop(),t=e(n);return n},Object.defineProperty(l.prototype,"top",{get:function(){return this.elements[this.elements.length-1]}}),Object.defineProperty(l.prototype,"length",{get:function(){return this.elements.length}}),n.ElementStack=l},{}],2:[function(e,t,n){function r(e){return e>="0"&&e<="9"||e>="a"&&e<="z"||e>="A"&&e<="Z"}function i(e){return e>="0"&&e<="9"||e>="a"&&e<="f"||e>="A"&&e<="F"}function s(e){return e>="0"&&e<="9"}var o=e("html5-entities"),u=e("./InputStream").InputStream,a={};Object.keys(o).forEach(function(e){for(var t=0;t<e.length;t++)a[e.substring(0,t+1)]=!0});var f={};f.consumeEntity=function(e,t,n){var f="",l="",c=e.char();if(c===u.EOF)return!1;l+=c;if(c=="	"||c=="\n"||c==""||c==" "||c=="<"||c=="&")return e.unget(l),!1;if(n===c)return e.unget(l),!1;if(c=="#"){c=e.shift(1);if(c===u.EOF)return t._parseError("expected-numeric-entity-but-got-eof"),e.unget(l),!1;l+=c;var h=10,p=s;if(c=="x"||c=="X"){h=16,p=i,c=e.shift(1);if(c===u.EOF)return t._parseError("expected-numeric-entity-but-got-eof"),e.unget(l),!1;l+=c}if(p(c)){var d="";while(c!==u.EOF&&p(c))d+=c,c=e.char();d=parseInt(d,h);var v=this.replaceEntityNumbers(d);v&&(t._parseError("invalid-numeric-entity-replaced"),d=v);if(d>65535&&d<=1114111){d-=65536;var m=((1047552&d)>>10)+55296,g=(1023&d)+56320;f=String.fromCharCode(m,g)}else f=String.fromCharCode(d);return c!==";"&&(t._parseError("numeric-entity-without-semicolon"),e.unget(c)),f}return e.unget(l),t._parseError("expected-numeric-entity"),!1}if(c>="a"&&c<="z"||c>="A"&&c<="Z"){var y="";while(a[l]){o[l]&&(y=l);if(c==";")break;c=e.char();if(c===u.EOF)break;l+=c}return y?(f=o[y],c===";"||!n||!r(c)&&c!=="="?(l.length>y.length&&e.unget(l.substring(y.length)),c!==";"&&t._parseError("named-entity-without-semicolon"),f):(e.unget(l),!1)):(t._parseError("expected-named-entity"),e.unget(l),!1)}},f.replaceEntityNumbers=function(e){switch(e){case 0:return 65533;case 19:return 16;case 128:return 8364;case 129:return 129;case 130:return 8218;case 131:return 402;case 132:return 8222;case 133:return 8230;case 134:return 8224;case 135:return 8225;case 136:return 710;case 137:return 8240;case 138:return 352;case 139:return 8249;case 140:return 338;case 141:return 141;case 142:return 381;case 143:return 143;case 144:return 144;case 145:return 8216;case 146:return 8217;case 147:return 8220;case 148:return 8221;case 149:return 8226;case 150:return 8211;case 151:return 8212;case 152:return 732;case 153:return 8482;case 154:return 353;case 155:return 8250;case 156:return 339;case 157:return 157;case 158:return 382;case 159:return 376;default:if(e>=55296&&e<=57343||e>1114111)return 65533;if(e>=1&&e<=8||e>=14&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||e==11||e==65534||e==131070||e==3145726||e==196607||e==262142||e==262143||e==327678||e==327679||e==393214||e==393215||e==458750||e==458751||e==524286||e==524287||e==589822||e==589823||e==655358||e==655359||e==720894||e==720895||e==786430||e==786431||e==851966||e==851967||e==917502||e==917503||e==983038||e==983039||e==1048574||e==1048575||e==1114110||e==1114111)return e}},n.EntityParser=f},{"./InputStream":3,"html5-entities":12}],3:[function(e,t,n){function r(){this.data="",this.start=0,this.committed=0,this.eof=!1,this.lastLocation={line:0,column:0}}r.EOF=-1,r.DRAIN=-2,r.prototype={slice:function(){if(this.start>=this.data.length){if(!this.eof)throw r.DRAIN;return r.EOF}return this.data.slice(this.start,this.data.length)},"char":function(){if(!this.eof&&this.start>=this.data.length-1)throw r.DRAIN;if(this.start>=this.data.length)return r.EOF;var e=this.data[this.start++];return e==="\r"&&(e="\n"),e},advance:function(e){this.start+=e;if(this.start>=this.data.length){if(!this.eof)throw r.DRAIN;return r.EOF}this.committed>this.data.length/2&&(this.lastLocation=this.location(),this.data=this.data.slice(this.committed),this.start=this.start-this.committed,this.committed=0)},matchWhile:function(e){if(this.eof&&this.start>=this.data.length)return"";var t=new RegExp("^"+e+"+"),n=t.exec(this.slice());if(n){if(!this.eof&&n[0].length==this.data.length-this.start)throw r.DRAIN;return this.advance(n[0].length),n[0]}return""},matchUntil:function(e){var t,n;n=this.slice();if(n===r.EOF)return"";if(t=(new RegExp(e+(this.eof?"|$":""))).exec(n)){var i=this.data.slice(this.start,this.start+t.index);return this.advance(t.index),i.replace(/\r/g,"\n").replace(/\n{2,}/g,"\n")}throw r.DRAIN},append:function(e){this.data+=e},shift:function(e){if(!this.eof&&this.start+e>=this.data.length)throw r.DRAIN;if(this.eof&&this.start>=this.data.length)return r.EOF;var t=this.data.slice(this.start,this.start+e).toString();return this.advance(Math.min(e,this.data.length-this.start)),t},peek:function(e){if(!this.eof&&this.start+e>=this.data.length)throw r.DRAIN;return this.eof&&this.start>=this.data.length?r.EOF:this.data.slice(this.start,Math.min(this.start+e,this.data.length)).toString()},length:function(){return this.data.length-this.start-1},unget:function(e){if(e===r.EOF)return;this.start-=e.length},undo:function(){this.start=this.committed},commit:function(){this.committed=this.start},location:function(){var e=this.lastLocation.line,t=this.lastLocation.column,n=this.data.slice(0,this.committed),r=n.match(/\n/g),i=r?e+r.length:e,s=r?n.length-n.lastIndexOf("\n")-1:t+n.length;return{line:i,column:s}}},n.InputStream=r},{}],4:[function(e,t,n){function r(e,t,n,r){this.localName=t,this.namespaceURI=e,this.attributes=n,this.node=r}function i(e,t){for(var n=0;n<e.attributes.length;n++)if(e.attributes[n].nodeName==t)return e.attributes[n].nodeValue;return null}var s={"http://www.w3.org/1999/xhtml":["address","applet","area","article","aside","base","basefont","bgsound","blockquote","body","br","button","caption","center","col","colgroup","dd","details","dir","div","dl","dt","embed","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","img","input","isindex","li","link","listing","main","marquee","menu","menuitem","meta","nav","noembed","noframes","noscript","object","ol","p","param","plaintext","pre","script","section","select","source","style","summary","table","tbody","td","textarea","tfoot","th","thead","title","tr","track","ul","wbr","xmp"],"http://www.w3.org/1998/Math/MathML":["mi","mo","mn","ms","mtext","annotation-xml"],"http://www.w3.org/2000/svg":["foreignObject","desc","title"]};r.prototype.isSpecial=function(){return this.namespaceURI in s&&s[this.namespaceURI].indexOf(this.localName)>-1},r.prototype.isFosterParenting=function(){return this.namespaceURI==="http://www.w3.org/1999/xhtml"?this.localName==="table"||this.localName==="tbody"||this.localName==="tfoot"||this.localName==="thead"||this.localName==="tr":!1},r.prototype.isNumberedHeader=function(){return this.namespaceURI==="http://www.w3.org/1999/xhtml"?this.localName==="h1"||this.localName==="h2"||this.localName==="h3"||this.localName==="h4"||this.localName==="h5"||this.localName==="h6":!1},r.prototype.isForeign=function(){return this.namespaceURI!="http://www.w3.org/1999/xhtml"},r.prototype.isHtmlIntegrationPoint=function(){if(this.namespaceURI==="http://www.w3.org/1998/Math/MathML"){if(this.localName!=="annotation-xml")return!1;var e=i(this,"encoding");return e?(e=e.toLowerCase(),e==="text/html"||e==="application/xhtml+xml"):!1}return this.namespaceURI==="http://www.w3.org/2000/svg"?this.localName==="foreignObject"||this.localName==="desc"||this.localName==="title":!1},r.prototype.isMathMLTextIntegrationPoint=function(){return this.namespaceURI==="http://www.w3.org/1998/Math/MathML"?this.localName==="mi"||this.localName==="mo"||this.localName==="mn"||this.localName==="ms"||this.localName==="mtext":!1},n.StackItem=r},{}],5:[function(e,t,n){function r(e){return e===" "||e==="\n"||e==="	"||e==="\r"||e==="\f"}function i(e){return e>="A"&&e<="Z"||e>="a"&&e<="z"}function s(e){this._tokenHandler=e,this._state=s.DATA,this._inputStream=new o,this._currentToken=null,this._temporaryBuffer="",this._additionalAllowedCharacter=""}var o=e("./InputStream").InputStream,u=e("./EntityParser").EntityParser;s.prototype._parseError=function(e,t){this._tokenHandler.parseError(e,t)},s.prototype._emitToken=function(e){if(e.type==="StartTag")for(var t=1;t<e.data.length;t++)e.data[t].nodeName||e.data.splice(t--,1);else e.type==="EndTag"&&(e.selfClosing&&this._parseError("self-closing-flag-on-end-tag"),e.data.length!==0&&this._parseError("attributes-in-end-tag"));this._tokenHandler.processToken(e),e.type==="StartTag"&&e.selfClosing&&!this._tokenHandler.isSelfClosingFlagAcknowledged()&&this._parseError("non-void-element-with-trailing-solidus",{name:e.name})},s.prototype._emitCurrentToken=function(){this._state=s.DATA,this._emitToken(this._currentToken)},s.prototype._currentAttribute=function(){return this._currentToken.data[this._currentToken.data.length-1]},s.prototype.setState=function(e){this._state=e},s.prototype.tokenize=function(e){function t(e){var t=e.char();if(t===o.EOF)return wt._emitToken({type:"EOF",data:null}),!1;if(t==="&")wt.setState(n);else if(t==="<")wt.setState(B);else if(t==="\0")wt._emitToken({type:"Characters",data:t}),e.commit();else{var r=e.matchUntil("&|<|\0");wt._emitToken({type:"Characters",data:t+r}),e.commit()}return!0}function n(e){var n=u.consumeEntity(e,wt);return wt.setState(t),wt._emitToken({type:"Characters",data:n||"&"}),!0}function a(e){var t=e.char();if(t===o.EOF)return wt._emitToken({type:"EOF",data:null}),!1;if(t==="&")wt.setState(f);else if(t==="<")wt.setState(p);else if(t==="\0")wt._parseError("invalid-codepoint"),wt._emitToken({type:"Characters",data:"�"}),e.commit();else{var n=e.matchUntil("&|<|\0");wt._emitToken({type:"Characters",data:t+n}),e.commit()}return!0}function f(e){var t=u.consumeEntity(e,wt);return wt.setState(a),wt._emitToken({type:"Characters",data:t||"&"}),!0}function l(e){var t=e.char();if(t===o.EOF)return wt._emitToken({type:"EOF",data:null}),!1;if(t==="<")wt.setState(m);else if(t==="\0")wt._parseError("invalid-codepoint"),wt._emitToken({type:"Characters",data:"�"}),e.commit();else{var n=e.matchUntil("<|\0");wt._emitToken({type:"Characters",data:t+n})}return!0}function c(e){var t=e.char();if(t===o.EOF)return wt._emitToken({type:"EOF",data:null}),!1;if(t==="\0")wt._parseError("invalid-codepoint"),wt._emitToken({type:"Characters",data:"�"}),e.commit();else{var n=e.matchUntil("\0");wt._emitToken({type:"Characters",data:t+n})}return!0}function h(e){var t=e.char();if(t===o.EOF)return wt._emitToken({type:"EOF",data:null}),!1;if(t==="<")wt.setState(b);else if(t==="\0")wt._parseError("invalid-codepoint"),wt._emitToken({type:"Characters",data:"�"}),e.commit();else{var n=e.matchUntil("<|\0");wt._emitToken({type:"Characters",data:t+n})}return!0}function p(e){var t=e.char();return t==="/"?(this._temporaryBuffer="",wt.setState(d)):(wt._emitToken({type:"Characters",data:"<"}),e.unget(t),wt.setState(a)),!0}function d(e){var t=e.char();return i(t)?(this._temporaryBuffer+=t,wt.setState(v)):(wt._emitToken({type:"Characters",data:"</"}),e.unget(t),wt.setState(a)),!0}function v(e){var n=wt._currentToken&&wt._currentToken.name===this._temporaryBuffer.toLowerCase(),s=e.char();return r(s)&&n?(wt._currentToken={type:"EndTag",name:this._temporaryBuffer,data:[],selfClosing:!1},wt.setState(I)):s==="/"&&n?(wt._currentToken={type:"EndTag",name:this._temporaryBuffer,data:[],selfClosing:!1},wt.setState(J)):s===">"&&n?(wt._currentToken={type:"EndTag",name:this._temporaryBuffer,data:[],selfClosing:!1},wt._emitCurrentToken(),wt.setState(t)):i(s)?(this._temporaryBuffer+=s,e.commit()):(wt._emitToken({type:"Characters",data:"</"+this._temporaryBuffer}),e.unget(s),wt.setState(a)),!0}function m(e){var t=e.char();return t==="/"?(this._temporaryBuffer="",wt.setState(g)):(wt._emitToken({type:"Characters",data:"<"}),e.unget(t),wt.setState(l)),!0}function g(e){var t=e.char();return i(t)?(this._temporaryBuffer+=t,wt.setState(y)):(wt._emitToken({type:"Characters",data:"</"}),e.unget(t),wt.setState(l)),!0}function y(e){var n=wt._currentToken&&wt._currentToken.name===this._temporaryBuffer.toLowerCase(),s=e.char();return r(s)&&n?(wt._currentToken={type:"EndTag",name:this._temporaryBuffer,data:[],selfClosing:!1},wt.setState(I)):s==="/"&&n?(wt._currentToken={type:"EndTag",name:this._temporaryBuffer,data:[],selfClosing:!1},wt.setState(J)):s===">"&&n?(wt._currentToken={type:"EndTag",name:this._temporaryBuffer,data:[],selfClosing:!1},wt._emitCurrentToken(),wt.setState(t)):i(s)?(this._temporaryBuffer+=s,e.commit()):(wt._emitToken({type:"Characters",data:"</"+this._temporaryBuffer}),e.unget(s),wt.setState(l)),!0}function b(e){var t=e.char();return t==="/"?(this._temporaryBuffer="",wt.setState(w)):t==="!"?(wt._emitToken({type:"Characters",data:"<!"}),wt.setState(S)):(wt._emitToken({type:"Characters",data:"<"}),e.unget(t),wt.setState(h)),!0}function w(e){var t=e.char();return i(t)?(this._temporaryBuffer+=t,wt.setState(E)):(wt._emitToken({type:"Characters",data:"</"}),e.unget(t),wt.setState(h)),!0}function E(e){var t=wt._currentToken&&wt._currentToken.name===this._temporaryBuffer.toLowerCase(),n=e.char();return r(n)&&t?(wt._currentToken={type:"EndTag",name:"script",data:[],selfClosing:!1},wt.setState(I)):n==="/"&&t?(wt._currentToken={type:"EndTag",name:"script",data:[],selfClosing:!1},wt.setState(J)):n===">"&&t?(wt._currentToken={type:"EndTag",name:"script",data:[],selfClosing:!1},wt._emitCurrentToken()):i(n)?(this._temporaryBuffer+=n,e.commit()):(wt._emitToken({type:"Characters",data:"</"+this._temporaryBuffer}),e.unget(n),wt.setState(h)),!0}function S(e){var t=e.char();return t==="-"?(wt._emitToken({type:"Characters",data:"-"}),wt.setState(x)):(e.unget(t),wt.setState(h)),!0}function x(e){var t=e.char();return t==="-"?(wt._emitToken({type:"Characters",data:"-"}),wt.setState(C)):(e.unget(t),wt.setState(h)),!0}function T(e){var n=e.char();if(n===o.EOF)e.unget(n),wt.setState(t);else if(n==="-")wt._emitToken({type:"Characters",data:"-"}),wt.setState(N);else if(n==="<")wt.setState(k);else if(n==="\0")wt._parseError("invalid-codepoint"),wt._emitToken({type:"Characters",data:"�"}),e.commit();else{var r=e.matchUntil("<|-|\0");wt._emitToken({type:"Characters",data:n+r})}return!0}function N(e){var n=e.char();return n===o.EOF?(e.unget(n),wt.setState(t)):n==="-"?(wt._emitToken({type:"Characters",data:"-"}),wt.setState(C)):n==="<"?wt.setState(k):n==="\0"?(wt._parseError("invalid-codepoint"),wt._emitToken({type:"Characters",data:"�"}),wt.setState(T)):(wt._emitToken({type:"Characters",data:n}),wt.setState(T)),!0}function C(e){var n=e.char();return n===o.EOF?(wt._parseError("eof-in-script"),e.unget(n),wt.setState(t)):n==="<"?wt.setState(k):n===">"?(wt._emitToken({type:"Characters",data:">"}),wt.setState(h)):n==="\0"?(wt._parseError("invalid-codepoint"),wt._emitToken({type:"Characters",data:"�"}),wt.setState(T)):(wt._emitToken({type:"Characters",data:n}),wt.setState(T)),!0}function k(e){var t=e.char();return t==="/"?(this._temporaryBuffer="",wt.setState(L)):i(t)?(wt._emitToken({type:"Characters",data:"<"+t}),this._temporaryBuffer=t,wt.setState(O)):(wt._emitToken({type:"Characters",data:"<"}),e.unget(t),wt.setState(T)),!0}function L(e){var t=e.char();return i(t)?(this._temporaryBuffer=t,wt.setState(A)):(wt._emitToken({type:"Characters",data:"</"}),e.unget(t),wt.setState(T)),!0}function A(e){var n=wt._currentToken&&wt._currentToken.name===this._temporaryBuffer.toLowerCase(),s=e.char();return r(s)&&n?(wt._currentToken={type:"EndTag",name:"script",data:[],selfClosing:!1},wt.setState(I)):s==="/"&&n?(wt._currentToken={type:"EndTag",name:"script",data:[],selfClosing:!1},wt.setState(J)):s===">"&&n?(wt._currentToken={type:"EndTag",name:"script",data:[],selfClosing:!1},wt.setState(t),wt._emitCurrentToken()):i(s)?(this._temporaryBuffer+=s,e.commit()):(wt._emitToken({type:"Characters",data:"</"+this._temporaryBuffer}),e.unget(s),wt.setState(T)),!0}function O(e){var t=e.char();return r(t)||t==="/"||t===">"?(wt._emitToken({type:"Characters",data:t}),this._temporaryBuffer.toLowerCase()==="script"?wt.setState(M):wt.setState(T)):i(t)?(wt._emitToken({type:"Characters",data:t}),this._temporaryBuffer+=t,e.commit()):(e.unget(t),wt.setState(T)),!0}function M(e){var n=e.char();return n===o.EOF?(wt._parseError("eof-in-script"),e.unget(n),wt.setState(t)):n==="-"?(wt._emitToken({type:"Characters",data:"-"}),wt.setState(_)):n==="<"?(wt._emitToken({type:"Characters",data:"<"}),wt.setState(P)):n==="\0"?(wt._parseError("invalid-codepoint"),wt._emitToken({type:"Characters",data:"�"}),e.commit()):(wt._emitToken({type:"Characters",data:n}),e.commit()),!0}function _(e){var n=e.char();return n===o.EOF?(wt._parseError("eof-in-script"),e.unget(n),wt.setState(t)):n==="-"?(wt._emitToken({type:"Characters",data:"-"}),wt.setState(D)):n==="<"?(wt._emitToken({type:"Characters",data:"<"}),wt.setState(P)):n==="\0"?(wt._parseError("invalid-codepoint"),wt._emitToken({type:"Characters",data:"�"}),wt.setState(M)):(wt._emitToken({type:"Characters",data:n}),wt.setState(M)),!0}function D(e){var n=e.char();return n===o.EOF?(wt._parseError("eof-in-script"),e.unget(n),wt.setState(t)):n==="-"?(wt._emitToken({type:"Characters",data:"-"}),e.commit()):n==="<"?(wt._emitToken({type:"Characters",data:"<"}),wt.setState(P)):n===">"?(wt._emitToken({type:"Characters",data:">"}),wt.setState(h)):n==="\0"?(wt._parseError("invalid-codepoint"),wt._emitToken({type:"Characters",data:"�"}),wt.setState(M)):(wt._emitToken({type:"Characters",data:n}),wt.setState(M)),!0}function P(e){var t=e.char();return t==="/"?(wt._emitToken({type:"Characters",data:"/"}),this._temporaryBuffer="",wt.setState(H)):(e.unget(t),wt.setState(M)),!0}function H(e){var t=e.char();return r(t)||t==="/"||t===">"?(wt._emitToken({type:"Characters",data:t}),this._temporaryBuffer.toLowerCase()==="script"?wt.setState(T):wt.setState(M)):i(t)?(wt._emitToken({type:"Characters",data:t}),this._temporaryBuffer+=t,e.commit()):(e.unget(t),wt.setState(M)),!0}function B(e){var n=e.char();return n===o.EOF?(wt._parseError("bare-less-than-sign-at-eof"),wt._emitToken({type:"Characters",data:"<"}),e.unget(n),wt.setState(t)):i(n)?(wt._currentToken={type:"StartTag",name:n.toLowerCase(),data:[]},wt.setState(F)):n==="!"?wt.setState(Q):n==="/"?wt.setState(j):n===">"?(wt._parseError("expected-tag-name-but-got-right-bracket"),wt._emitToken({type:"Characters",data:"<>"}),wt.setState(t)):n==="?"?(wt._parseError("expected-tag-name-but-got-question-mark"),e.unget(n),wt.setState(K)):(wt._parseError("expected-tag-name"),wt._emitToken({type:"Characters",data:"<"}),e.unget(n),wt.setState(t)),!0}function j(e){var n=e.char();return n===o.EOF?(wt._parseError("expected-closing-tag-but-got-eof"),wt._emitToken({type:"Characters",data:"</"}),e.unget(n),wt.setState(t)):i(n)?(wt._currentToken={type:"EndTag",name:n.toLowerCase(),data:[]},wt.setState(F)):n===">"?(wt._parseError("expected-closing-tag-but-got-right-bracket"),wt.setState(t)):(wt._parseError("expected-closing-tag-but-got-char",{data:n}),e.unget(n),wt.setState(K)),!0}function F(e){var n=e.char();return n===o.EOF?(wt._parseError("eof-in-tag-name"),e.unget(n),wt.setState(t)):r(n)?wt.setState(I):i(n)?wt._currentToken.name+=n.toLowerCase():n===">"?wt._emitCurrentToken():n==="/"?wt.setState(J):n==="\0"?(wt._parseError("invalid-codepoint"),wt._currentToken.name+="�"):wt._currentToken.name+=n,e.commit(),!0}function I(e){var n=e.char();if(n===o.EOF)wt._parseError("expected-attribute-name-but-got-eof"),e.unget(n),wt.setState(t);else{if(r(n))return!0;i(n)?(wt._currentToken.data.push({nodeName:n.toLowerCase(),nodeValue:""}),wt.setState(q)):n===">"?wt._emitCurrentToken():n==="/"?wt.setState(J):n==="'"||n==='"'||n==="="||n==="<"?(wt._parseError("invalid-character-in-attribute-name"),wt._currentToken.data.push({nodeName:n,nodeValue:""}),wt.setState(q)):n==="\0"?(wt._parseError("invalid-codepoint"),wt._currentToken.data.push({nodeName:"�",nodeValue:""})):(wt._currentToken.data.push({nodeName:n,nodeValue:""}),wt.setState(q))}return!0}function q(e){var n=e.char(),s=!0,u=!1;n===o.EOF?(wt._parseError("eof-in-attribute-name"),e.unget(n),wt.setState(t),u=!0):n==="="?wt.setState(U):i(n)?(wt._currentAttribute().nodeName+=n.toLowerCase(),s=!1):n===">"?u=!0:r(n)?wt.setState(R):n==="/"?wt.setState(J):n==="'"||n==='"'?(wt._parseError("invalid-character-in-attribute-name"),wt._currentAttribute().nodeName+=n,s=!1):n==="\0"?(wt._parseError("invalid-codepoint"),wt._currentAttribute().nodeName+="�"):(wt._currentAttribute().nodeName+=n,s=!1);if(s){var a=wt._currentToken.data,f=a[a.length-1];for(var l=a.length-2;l>=0;l--)if(f.nodeName===a[l].nodeName){wt._parseError("duplicate-attribute",{name:f.nodeName}),f.nodeName=null;break}u&&wt._emitCurrentToken()}else e.commit();return!0}function R(e){var n=e.char();if(n===o.EOF)wt._parseError("expected-end-of-tag-but-got-eof"),e.unget(n),wt.setState(t);else{if(r(n))return!0;n==="="?wt.setState(U):n===">"?wt._emitCurrentToken():i(n)?(wt._currentToken.data.push({nodeName:n,nodeValue:""}),wt.setState(q)):n==="/"?wt.setState(J):n==="'"||n==='"'||n==="<"?(wt._parseError("invalid-character-after-attribute-name"),wt._currentToken.data.push({nodeName:n,nodeValue:""}),wt.setState(q)):n==="\0"?(wt._parseError("invalid-codepoint"),wt._currentToken.data.push({nodeName:"�",nodeValue:""})):(wt._currentToken.data.push({nodeName:n,nodeValue:""}),wt.setState(q))}return!0}function U(e){var n=e.char();if(n===o.EOF)wt._parseError("expected-attribute-value-but-got-eof"),e.unget(n),wt.setState(t);else{if(r(n))return!0;n==='"'?wt.setState(z):n==="&"?(wt.setState(X),e.unget(n)):n==="'"?wt.setState(W):n===">"?(wt._parseError("expected-attribute-value-but-got-right-bracket"),wt._emitCurrentToken()):n==="="||n==="<"||n==="`"?(wt._parseError("unexpected-character-in-unquoted-attribute-value"),wt._currentAttribute().nodeValue+=n,wt.setState(X)):n==="\0"?(wt._parseError("invalid-codepoint"),wt._currentAttribute().nodeValue+="�"):(wt._currentAttribute().nodeValue+=n,wt.setState(X))}return!0}function z(e){var n=e.char();if(n===o.EOF)wt._parseError("eof-in-attribute-value-double-quote"),e.unget(n),wt.setState(t);else if(n==='"')wt.setState($);else if(n==="&")this._additionalAllowedCharacter='"',wt.setState(V);else if(n==="\0")wt._parseError("invalid-codepoint"),wt._currentAttribute().nodeValue+="�";else{var r=e.matchUntil('[\0"&]');n+=r,wt._currentAttribute().nodeValue+=n}return!0}function W(e){var n=e.char();return n===o.EOF?(wt._parseError("eof-in-attribute-value-single-quote"),e.unget(n),wt.setState(t)):n==="'"?wt.setState($):n==="&"?(this._additionalAllowedCharacter="'",wt.setState(V)):n==="\0"?(wt._parseError("invalid-codepoint"),wt._currentAttribute().nodeValue+="�"):wt._currentAttribute().nodeValue+=n+e.matchUntil("\0|['&]"),!0}function X(e){var n=e.char();if(n===o.EOF)wt._parseError("eof-after-attribute-value"),e.unget(n),wt.setState(t);else if(r(n))wt.setState(I);else if(n==="&")this._additionalAllowedCharacter=">",wt.setState(V);else if(n===">")wt._emitCurrentToken();else if(n==='"'||n==="'"||n==="="||n==="`"||n==="<")wt._parseError("unexpected-character-in-unquoted-attribute-value"),wt._currentAttribute().nodeValue+=n,e.commit();else if(n==="\0")wt._parseError("invalid-codepoint"),wt._currentAttribute().nodeValue+="�";else{var i=e.matchUntil("\0|[	\n\f \r&<>\"'=`]");i===o.EOF&&(wt._parseError("eof-in-attribute-value-no-quotes"),wt._emitCurrentToken()),e.commit(),wt._currentAttribute().nodeValue+=n+i}return!0}function V(e){var t=u.consumeEntity(e,wt,this._additionalAllowedCharacter);return this._currentAttribute().nodeValue+=t||"&",this._additionalAllowedCharacter==='"'?wt.setState(z):this._additionalAllowedCharacter==="'"?wt.setState(W):this._additionalAllowedCharacter===">"&&wt.setState(X),!0}function $(e){var n=e.char();return n===o.EOF?(wt._parseError("eof-after-attribute-value"),e.unget(n),wt.setState(t)):r(n)?wt.setState(I):n===">"?(wt.setState(t),wt._emitCurrentToken()):n==="/"?wt.setState(J):(wt._parseError("unexpected-character-after-attribute-value"),e.unget(n),wt.setState(I)),!0}function J(e){var n=e.char();return n===o.EOF?(wt._parseError("unexpected-eof-after-solidus-in-tag"),e.unget(n),wt.setState(t)):n===">"?(wt._currentToken.selfClosing=!0,wt.setState(t),wt._emitCurrentToken()):(wt._parseError("unexpected-character-after-solidus-in-tag"),e.unget(n),wt.setState(I)),!0}function K(e){var n=e.matchUntil(">");return n=n.replace(/\u0000/g,"�"),e.char(),wt._emitToken({type:"Comment",data:n}),wt.setState(t),!0}function Q(e){var t=e.shift(2);if(t==="--")wt._currentToken={type:"Comment",data:""},wt.setState(Y);else{var n=e.shift(5);if(n===o.EOF||t===o.EOF)return wt._parseError("expected-dashes-or-doctype"),wt.setState(K),e.unget(t),!0;t+=n,t.toUpperCase()==="DOCTYPE"?(wt._currentToken={type:"Doctype",name:"",publicId:null,systemId:null,forceQuirks:!1},wt.setState(it)):wt._tokenHandler.isCdataSectionAllowed()&&t==="[CDATA["?wt.setState(G):(wt._parseError("expected-dashes-or-doctype"),e.unget(t),wt.setState(K))}return!0}function G(e){var n=e.matchUntil("]]>");return e.shift(3),n&&wt._emitToken({type:"Characters",data:n}),wt.setState(t),!0}function Y(e){var n=e.char();return n===o.EOF?(wt._parseError("eof-in-comment"),wt._emitToken(wt._currentToken),e.unget(n),wt.setState(t)):n==="-"?wt.setState(Z):n===">"?(wt._parseError("incorrect-comment"),wt._emitToken(wt._currentToken),wt.setState(t)):n==="\0"?(wt._parseError("invalid-codepoint"),wt._currentToken.data+="�"):(wt._currentToken.data+=n,wt.setState(et)),!0}function Z(e){var n=e.char();return n===o.EOF?(wt._parseError("eof-in-comment"),wt._emitToken(wt._currentToken),e.unget(n),wt.setState(t)):n==="-"?wt.setState(nt):n===">"?(wt._parseError("incorrect-comment"),wt._emitToken(wt._currentToken),wt.setState(t)):n==="\0"?(wt._parseError("invalid-codepoint"),wt._currentToken.data+="�"):(wt._currentToken.data+="-"+n,wt.setState(et)),!0}function et(e){var n=e.char();return n===o.EOF?(wt._parseError("eof-in-comment"),wt._emitToken(wt._currentToken),e.unget(n),wt.setState(t)):n==="-"?wt.setState(tt):n==="\0"?(wt._parseError("invalid-codepoint"),wt._currentToken.data+="�"):(wt._currentToken.data+=n,e.commit()),!0}function tt(e){var n=e.char();return n===o.EOF?(wt._parseError("eof-in-comment-end-dash"),wt._emitToken(wt._currentToken),e.unget(n),wt.setState(t)):n==="-"?wt.setState(nt):n==="\0"?(wt._parseError("invalid-codepoint"),wt._currentToken.data+="-�",wt.setState(et)):(wt._currentToken.data+="-"+n+e.matchUntil("\0|-"),e.char()),!0}function nt(e){var n=e.char();return n===o.EOF?(wt._parseError("eof-in-comment-double-dash"),wt._emitToken(wt._currentToken),e.unget(n),wt.setState(t)):n===">"?(wt._emitToken(wt._currentToken),wt.setState(t)):n==="!"?(wt._parseError("unexpected-bang-after-double-dash-in-comment"),wt.setState(rt)):n==="-"?(wt._parseError("unexpected-dash-after-double-dash-in-comment"),wt._currentToken.data+=n):n==="\0"?(wt._parseError("invalid-codepoint"),wt._currentToken.data+="--�",wt.setState(et)):(wt._parseError("unexpected-char-in-comment"),wt._currentToken.data+="--"+n,wt.setState(et)),!0}function rt(e){var n=e.char();return n===o.EOF?(wt._parseError("eof-in-comment-end-bang-state"),wt._emitToken(wt._currentToken),e.unget(n),wt.setState(t)):n===">"?(wt._emitToken(wt._currentToken),wt.setState(t)):n==="-"?(wt._currentToken.data+="--!",wt.setState(tt)):(wt._currentToken.data+="--!"+n,wt.setState(et)),!0}function it(e){var n=e.char();return n===o.EOF?(wt._parseError("expected-doctype-name-but-got-eof"),wt._currentToken.forceQuirks=!0,e.unget(n),wt.setState(t),wt._emitCurrentToken()):r(n)?wt.setState(st):(wt._parseError("need-space-after-doctype"),e.unget(n),wt.setState(st)),!0}function st(e){var n=e.char();return n===o.EOF?(wt._parseError("expected-doctype-name-but-got-eof"),wt._currentToken.forceQuirks=!0,e.unget(n),wt.setState(t),wt._emitCurrentToken()):r(n)||(n===">"?(wt._parseError("expected-doctype-name-but-got-right-bracket"),wt._currentToken.forceQuirks=!0,wt.setState(t),wt._emitCurrentToken()):(i(n)&&(n=n.toLowerCase()),wt._currentToken.name=n,wt.setState(ot))),!0}function ot(e){var n=e.char();return n===o.EOF?(wt._currentToken.forceQuirks=!0,e.unget(n),wt._parseError("eof-in-doctype-name"),wt.setState(t),wt._emitCurrentToken()):r(n)?wt.setState(ut):n===">"?(wt.setState(t),wt._emitCurrentToken()):(i(n)&&(n=n.toLowerCase()),wt._currentToken.name+=n,e.commit()),!0}function ut(e){var n=e.char();if(n===o.EOF)wt._currentToken.forceQuirks=!0,e.unget(n),wt._parseError("eof-in-doctype"),wt.setState(t),wt._emitCurrentToken();else if(!r(n))if(n===">")wt.setState(t),wt._emitCurrentToken();else{if(["p","P"].indexOf(n)>-1){var i=[["u","U"],["b","B"],["l","L"],["i","I"],["c","C"]],s=i.every(function(t){return n=e.char(),t.indexOf(n)>-1});if(s)return wt.setState(at),!0}else if(["s","S"].indexOf(n)>-1){var i=[["y","Y"],["s","S"],["t","T"],["e","E"],["m","M"]],s=i.every(function(t){return n=e.char(),t.indexOf(n)>-1});if(s)return wt.setState(dt),!0}e.unget(n),wt._currentToken.forceQuirks=!0,n===o.EOF?(wt._parseError("eof-in-doctype"),e.unget(n),wt.setState(t),wt._emitCurrentToken()):(wt._parseError("expected-space-or-right-bracket-in-doctype",{data:n}),wt.setState(bt))}return!0}function at(e){var n=e.char();return n===o.EOF?(wt._parseError("eof-in-doctype"),wt._currentToken.forceQuirks=!0,e.unget(n),wt.setState(t),wt._emitCurrentToken()):r(n)?wt.setState(ft):n==="'"||n==='"'?(wt._parseError("unexpected-char-in-doctype"),e.unget(n),wt.setState(ft)):(e.unget(n),wt.setState(ft)),!0}function ft(e){var n=e.char();return n===o.EOF?(wt._parseError("eof-in-doctype"),wt._currentToken.forceQuirks=!0,e.unget(n),wt.setState(t),wt._emitCurrentToken()):r(n)||(n==='"'?(wt._currentToken.publicId="",wt.setState(lt)):n==="'"?(wt._currentToken.publicId="",wt.setState(ct)):n===">"?(wt._parseError("unexpected-end-of-doctype"),wt._currentToken.forceQuirks=!0,wt.setState(t),wt._emitCurrentToken()):(wt._parseError("unexpected-char-in-doctype"),wt._currentToken.forceQuirks=!0,wt.setState(bt))),!0}function lt(e){var n=e.char();return n===o.EOF?(wt._parseError("eof-in-doctype"),wt._currentToken.forceQuirks=!0,e.unget(n),wt.setState(t),wt._emitCurrentToken()):n==='"'?wt.setState(ht):n===">"?(wt._parseError("unexpected-end-of-doctype"),wt._currentToken.forceQuirks=!0,wt.setState(t),wt._emitCurrentToken()):wt._currentToken.publicId+=n,!0}function ct(e){var n=e.char();return n===o.EOF?(wt._parseError("eof-in-doctype"),wt._currentToken.forceQuirks=!0,e.unget(n),wt.setState(t),wt._emitCurrentToken()):n==="'"?wt.setState(ht):n===">"?(wt._parseError("unexpected-end-of-doctype"),wt._currentToken.forceQuirks=!0,wt.setState(t),wt._emitCurrentToken()):wt._currentToken.publicId+=n,!0}function ht(e){var n=e.char();return n===o.EOF?(wt._parseError("eof-in-doctype"),wt._currentToken.forceQuirks=!0,wt._emitCurrentToken(),e.unget(n),wt.setState(t)):r(n)?wt.setState(pt):n===">"?(wt.setState(t),wt._emitCurrentToken()):n==='"'?(wt._parseError("unexpected-char-in-doctype"),wt._currentToken.systemId="",wt.setState(mt)):n==="'"?(wt._parseError("unexpected-char-in-doctype"),wt._currentToken.systemId="",wt.setState(gt)):(wt._parseError("unexpected-char-in-doctype"),wt._currentToken.forceQuirks=!0,wt.setState(bt)),!0}function pt(e){var n=e.char();return n===o.EOF?(wt._parseError("eof-in-doctype"),wt._currentToken.forceQuirks=!0,wt._emitCurrentToken(),e.unget(n),wt.setState(t)):r(n)||(n===">"?(wt._emitCurrentToken(),wt.setState(t)):n==='"'?(wt._currentToken.systemId="",wt.setState(mt)):n==="'"?(wt._currentToken.systemId="",wt.setState(gt)):(wt._parseError("unexpected-char-in-doctype"),wt._currentToken.forceQuirks=!0,wt.setState(bt))),!0}function dt(e){var n=e.char();return n===o.EOF?(wt._parseError("eof-in-doctype"),wt._currentToken.forceQuirks=!0,wt._emitCurrentToken(),e.unget(n),wt.setState(t)):r(n)?wt.setState(vt):n==="'"||n==='"'?(wt._parseError("unexpected-char-in-doctype"),e.unget(n),wt.setState(vt)):(e.unget(n),wt.setState(vt)),!0}function vt(e){var n=e.char();return n===o.EOF?(wt._parseError("eof-in-doctype"),wt._currentToken.forceQuirks=!0,wt._emitCurrentToken(),e.unget(n),wt.setState(t)):r(n)||(n==='"'?(wt._currentToken.systemId="",wt.setState(mt)):n==="'"?(wt._currentToken.systemId="",wt.setState(gt)):n===">"?(wt._parseError("unexpected-end-of-doctype"),wt._currentToken.forceQuirks=!0,wt._emitCurrentToken(),wt.setState(t)):(wt._parseError("unexpected-char-in-doctype"),wt._currentToken.forceQuirks=!0,wt.setState(bt))),!0}function mt(e){var n=e.char();return n===o.EOF?(wt._parseError("eof-in-doctype"),wt._currentToken.forceQuirks=!0,wt._emitCurrentToken(),e.unget(n),wt.setState(t)):n==='"'?wt.setState(yt):n===">"?(wt._parseError("unexpected-end-of-doctype"),wt._currentToken.forceQuirks=!0,wt._emitCurrentToken(),wt.setState(t)):wt._currentToken.systemId+=n,!0}function gt(e){var n=e.char();return n===o.EOF?(wt._parseError("eof-in-doctype"),wt._currentToken.forceQuirks=!0,wt._emitCurrentToken(),e.unget(n),wt.setState(t)):n==="'"?wt.setState(yt):n===">"?(wt._parseError("unexpected-end-of-doctype"),wt._currentToken.forceQuirks=!0,wt._emitCurrentToken(),wt.setState(t)):wt._currentToken.systemId+=n,!0}function yt(e){var n=e.char();return n===o.EOF?(wt._parseError("eof-in-doctype"),wt._currentToken.forceQuirks=!0,wt._emitCurrentToken(),e.unget(n),wt.setState(t)):r(n)||(n===">"?(wt._emitCurrentToken(),wt.setState(t)):(wt._parseError("unexpected-char-in-doctype"),wt.setState(bt))),!0}function bt(e){var n=e.char();return n===o.EOF?(e.unget(n),wt._emitCurrentToken(),wt.setState(t)):n===">"&&(wt._emitCurrentToken(),wt.setState(t)),!0}s.DATA=t,s.RCDATA=a,s.RAWTEXT=l,s.SCRIPT_DATA=h,s.PLAINTEXT=c,this._state=s.DATA,this._inputStream.append(e),this._tokenHandler.startTokenization(this),this._inputStream.eof=!0;var wt=this;while(this._state.call(this,this._inputStream));},Object.defineProperty(s.prototype,"lineNumber",{get:function(){return this._inputStream.location().line}}),Object.defineProperty(s.prototype,"columnNumber",{get:function(){return this._inputStream.location().column}}),n.Tokenizer=s},{"./EntityParser":2,"./InputStream":3}],6:[function(e,t,n){function r(e){return e===" "||e==="\n"||e==="	"||e==="\r"||e==="\f"}function i(e){return r(e)||e==="�"}function s(e){for(var t=0;t<e.length;t++){var n=e[t];if(!r(n))return!1}return!0}function o(e){for(var t=0;t<e.length;t++){var n=e[t];if(!i(n))return!1}return!0}function u(e,t){for(var n=0;n<e.attributes.length;n++){var r=e.attributes[n];if(r.nodeName===t)return r}return null}function a(e){this.characters=e,this.current=0,this.end=this.characters.length}function f(){this.tokenizer=null,this.errorHandler=null,this.scriptingEnabled=!1,this.document=null,this.head=null,this.form=null,this.openElements=new m,this.activeFormattingElements=[],this.insertionMode=null,this.insertionModeName="",this.originalInsertionMode="",this.inQuirksMode=!1,this.compatMode="no quirks",this.framesetOk=!0,this.redirectAttachToFosterParent=!1,this.selfClosingFlagAcknowledged=!1,this.context="",this.pendingTableCharacters=[],this.shouldSkipLeadingNewline=!1;var e=this,t=this.insertionModes={};t.base={end_tag_handlers:{"-default":"endTagOther"},start_tag_handlers:{"-default":"startTagOther"},processEOF:function(){e.generateImpliedEndTags(),e.openElements.length>2?e.parseError("expected-closing-tag-but-got-eof"):e.openElements.length==2&&e.openElements.item(1).localName!="body"?e.parseError("expected-closing-tag-but-got-eof"):e.context&&e.openElements.length>1},processComment:function(t){e.insertComment(t,e.currentStackItem().node)},processDoctype:function(t,n,r,i){e.parseError("unexpected-doctype")},processStartTag:function(e,t,n){if(this[this.start_tag_handlers[e]])this[this.start_tag_handlers[e]](e,t,n);else{if(!this[this.start_tag_handlers["-default"]])throw new Error("No handler found for "+e);this[this.start_tag_handlers["-default"]](e,t,n)}},processEndTag:function(e){if(this[this.end_tag_handlers[e]])this[this.end_tag_handlers[e]](e);else{if(!this[this.end_tag_handlers["-default"]])throw new Error("No handler found for "+e);this[this.end_tag_handlers["-default"]](e)}},startTagHtml:function(e,n){t.inBody.startTagHtml(e,n)}},t.initial=Object.create(t.base),t.initial.processEOF=function(){e.parseError("expected-doctype-but-got-eof"),this.anythingElse(),e.insertionMode.processEOF()},t.initial.processComment=function(t){e.insertComment(t,e.document)},t.initial.processDoctype=function(t,n,r,i){function s(e){return n.toLowerCase().indexOf(e)===0}e.insertDoctype(t||"",n||"",r||""),i||t!="html"||n!=null&&(["+//silmaril//dtd html pro v0r11 19970101//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//as//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html strict//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//ietf//dtd html//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//spyglass//dtd html 2.0 extended//","-//sq//dtd html 2.0 hotmetal + extensions//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//","html"].some(s)||["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"].indexOf(n.toLowerCase())>-1||r==null&&["-//w3c//dtd html 4.01 transitional//","-//w3c//dtd html 4.01 frameset//"].some(s))||r!=null&&r.toLowerCase()=="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"?(e.compatMode="quirks",e.parseError("quirky-doctype")):n!=null&&(["-//w3c//dtd xhtml 1.0 transitional//","-//w3c//dtd xhtml 1.0 frameset//"].some(s)||r!=null&&["-//w3c//dtd html 4.01 transitional//","-//w3c//dtd html 4.01 frameset//"].indexOf(n.toLowerCase())>-1)?(e.compatMode="limited quirks",e.parseError("almost-standards-doctype")):n=="-//W3C//DTD HTML 4.0//EN"&&(r==null||r=="http://www.w3.org/TR/REC-html40/strict.dtd")||n=="-//W3C//DTD HTML 4.01//EN"&&(r==null||r=="http://www.w3.org/TR/html4/strict.dtd")||n=="-//W3C//DTD XHTML 1.0 Strict//EN"&&r=="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"||n=="-//W3C//DTD XHTML 1.1//EN"&&r=="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"||(r!=null&&r!="about:legacy-compat"||n!=null)&&e.parseError("unknown-doctype"),e.setInsertionMode("beforeHTML")},t.initial.processCharacters=function(t){t.skipLeadingWhitespace();if(!t.length)return;e.parseError("expected-doctype-but-got-chars"),this.anythingElse(),e.insertionMode.processCharacters(t)},t.initial.processStartTag=function(t,n,r){e.parseError("expected-doctype-but-got-start-tag",{name:t}),this.anythingElse(),e.insertionMode.processStartTag(t,n,r)},t.initial.processEndTag=function(t){e.parseError("expected-doctype-but-got-end-tag",{name:t}),this.anythingElse(),e.insertionMode.processEndTag(t)},t.initial.anythingElse=function(){e.compatMode="quirks",e.setInsertionMode("beforeHTML")},t.beforeHTML=Object.create(t.base),t.beforeHTML.start_tag_handlers={html:"startTagHtml","-default":"startTagOther"},t.beforeHTML.processEOF=function(){this.anythingElse(),e.insertionMode.processEOF()},t.beforeHTML.processComment=function(t){e.insertComment(t,e.document)},t.beforeHTML.processCharacters=function(t){t.skipLeadingWhitespace();if(!t.length)return;this.anythingElse(),e.insertionMode.processCharacters(t)},t.beforeHTML.startTagHtml=function(t,n,r){e.insertHtmlElement(n),e.setInsertionMode("beforeHead")},t.beforeHTML.startTagOther=function(t,n,r){this.anythingElse(),e.insertionMode.processStartTag(t,n,r)},t.beforeHTML.processEndTag=function(t){this.anythingElse(),e.insertionMode.processEndTag(t)},t.beforeHTML.anythingElse=function(){e.insertHtmlElement(),e.setInsertionMode("beforeHead")},t.afterAfterBody=Object.create(t.base),t.afterAfterBody.start_tag_handlers={html:"startTagHtml","-default":"startTagOther"},t.afterAfterBody.processComment=function(t){e.insertComment(t,e.document)},t.afterAfterBody.processDoctype=function(e){t.inBody.processDoctype(e)},t.afterAfterBody.startTagHtml=function(e,n){t.inBody.startTagHtml(e,n)},t.afterAfterBody.startTagOther=function(t,n,r){e.parseError("unexpected-start-tag",{name:t}),e.setInsertionMode("inBody"),e.insertionMode.processStartTag(t,n,r)},t.afterAfterBody.endTagOther=function(t){e.parseError("unexpected-end-tag",{name:t}),e.setInsertionMode("inBody"),e.insertionMode.processEndTag(t)},t.afterAfterBody.processCharacters=function(n){if(!s(n.characters))return e.parseError("unexpected-char-after-body"),e.setInsertionMode("inBody"),e.insertionMode.processCharacters(n);t.inBody.processCharacters(n)},t.afterBody=Object.create(t.base),t.afterBody.end_tag_handlers={html:"endTagHtml","-default":"endTagOther"},t.afterBody.processComment=function(t){e.insertComment(t,e.openElements.rootNode)},t.afterBody.processCharacters=function(n){if(!s(n.characters))return e.parseError("unexpected-char-after-body"),e.setInsertionMode("inBody"),e.insertionMode.processCharacters(n);t.inBody.processCharacters(n)},t.afterBody.processStartTag=function(t,n,r){e.parseError("unexpected-start-tag-after-body",{name:t}),e.setInsertionMode("inBody"),e.insertionMode.processStartTag(t,n,r)},t.afterBody.endTagHtml=function(t){e.context?e.parseError("end-html-in-innerhtml"):e.setInsertionMode("afterAfterBody")},t.afterBody.endTagOther=function(t){e.parseError("unexpected-end-tag-after-body",{name:t}),e.setInsertionMode("inBody"),e.insertionMode.processEndTag(t)},t.afterFrameset=Object.create(t.base),t.afterFrameset.start_tag_handlers={html:"startTagHtml",noframes:"startTagNoframes","-default":"startTagOther"},t.afterFrameset.end_tag_handlers={html:"endTagHtml","-default":"endTagOther"},t.afterFrameset.processCharacters=function(t){var n=t.takeRemaining(),i="";for(var s=0;s<n.length;s++){var o=n[s];r(o)&&(i+=o)}i&&e.insertText(i),i.length<n.length&&e.parseError("expected-eof-but-got-char")},t.afterFrameset.startTagNoframes=function(e,n){t.inHead.processStartTag(e,n)},t.afterFrameset.startTagOther=function(t,n){e.parseError("unexpected-start-tag-after-frameset",{name:t})},t.afterFrameset.endTagHtml=function(t){e.setInsertionMode("afterAfterFrameset")},t.afterFrameset.endTagOther=function(t){e.parseError("unexpected-end-tag-after-frameset",{name:t})},t.beforeHead=Object.create(t.base),t.beforeHead.start_tag_handlers={html:"startTagHtml",head:"startTagHead","-default":"startTagOther"},t.beforeHead.end_tag_handlers={html:"endTagImplyHead",head:"endTagImplyHead",body:"endTagImplyHead",br:"endTagImplyHead","-default":"endTagOther"},t.beforeHead.processEOF=function(){this.startTagHead("head",[]),e.insertionMode.processEOF()},t.beforeHead.processCharacters=function(t){t.skipLeadingWhitespace();if(!t.length)return;this.startTagHead("head",[]),e.insertionMode.processCharacters(t)},t.beforeHead.startTagHead=function(t,n){e.insertHeadElement(n),e.setInsertionMode("inHead")},t.beforeHead.startTagOther=function(t,n,r){this.startTagHead("head",[]),e.insertionMode.processStartTag(t,n,r)},t.beforeHead.endTagImplyHead=function(t){this.startTagHead("head",[]),e.insertionMode.processEndTag(t)},t.beforeHead.endTagOther=function(t){e.parseError("end-tag-after-implied-root",{name:t})},t.inHead=Object.create(t.base),t.inHead.start_tag_handlers={html:"startTagHtml",head:"startTagHead",title:"startTagTitle",script:"startTagScript",style:"startTagNoFramesStyle",noscript:"startTagNoScript",noframes:"startTagNoFramesStyle",base:"startTagBaseBasefontBgsoundLink",basefont:"startTagBaseBasefontBgsoundLink",bgsound:"startTagBaseBasefontBgsoundLink",link:"startTagBaseBasefontBgsoundLink",meta:"startTagMeta","-default":"startTagOther"},t.inHead.end_tag_handlers={head:"endTagHead",html:"endTagHtmlBodyBr",body:"endTagHtmlBodyBr",br:"endTagHtmlBodyBr","-default":"endTagOther"},t.inHead.processEOF=function(){var t=e.currentStackItem().localName;["title","style","script"].indexOf(t)!=-1&&(e.parseError("expected-named-closing-tag-but-got-eof",{name:t}),e.popElement()),this.anythingElse(),e.insertionMode.processEOF()},t.inHead.processCharacters=function(t){var n=t.takeLeadingWhitespace();n&&e.insertText(n);if(!t.length)return;this.anythingElse(),e.insertionMode.processCharacters(t)},t.inHead.startTagHtml=function(e,n){t.inBody.processStartTag(e,n)},t.inHead.startTagHead=function(t,n){e.parseError("two-heads-are-not-better-than-one")},t.inHead.startTagTitle=function(t,n){e.processGenericRCDATAStartTag(t,n)},t.inHead.startTagNoScript=function(t,n){if(e.scriptingEnabled)return e.processGenericRawTextStartTag(t,n);e.insertElement(t,n),e.setInsertionMode("inHeadNoscript")},t.inHead.startTagNoFramesStyle=function(t,n){e.processGenericRawTextStartTag(t,n)},t.inHead.startTagScript=function(t,n){e.insertElement(t,n),e.tokenizer.setState(v.SCRIPT_DATA),e.originalInsertionMode=e.insertionModeName,e.setInsertionMode("text")},t.inHead.startTagBaseBasefontBgsoundLink=function(t,n){e.insertSelfClosingElement(t,n)},t.inHead.startTagMeta=function(t,n){e.insertSelfClosingElement(t,n)},t.inHead.startTagOther=function(t,n,r){this.anythingElse(),e.insertionMode.processStartTag(t,n,r)},t.inHead.endTagHead=function(t){e.openElements.item(e.openElements.length-1).localName=="head"?e.openElements.pop():e.parseError("unexpected-end-tag",{name:"head"}),e.setInsertionMode("afterHead")},t.inHead.endTagHtmlBodyBr=function(t){this.anythingElse(),e.insertionMode.processEndTag(t)},t.inHead.endTagOther=function(t){e.parseError("unexpected-end-tag",{name:t})},t.inHead.anythingElse=function(){this.endTagHead("head")},t.afterHead=Object.create(t.base),t.afterHead.start_tag_handlers={html:"startTagHtml",head:"startTagHead",body:"startTagBody",frameset:"startTagFrameset",base:"startTagFromHead",link:"startTagFromHead",meta:"startTagFromHead",script:"startTagFromHead",style:"startTagFromHead",title:"startTagFromHead","-default":"startTagOther"},t.afterHead.end_tag_handlers={body:"endTagBodyHtmlBr",html:"endTagBodyHtmlBr",br:"endTagBodyHtmlBr","-default":"endTagOther"},t.afterHead.processEOF=function(){this.anythingElse(),e.insertionMode.processEOF()},t.afterHead.processCharacters=function(t){var n=t.takeLeadingWhitespace();n&&e.insertText(n);if(!t.length)return;this.anythingElse(),e.insertionMode.processCharacters(t)},t.afterHead.startTagHtml=function(e,n){t.inBody.processStartTag(e,n)},t.afterHead.startTagBody=function(t,n){e.framesetOk=!1,e.insertBodyElement(n),e.setInsertionMode("inBody")},t.afterHead.startTagFrameset=function(t,n){e.insertElement(t,n),e.setInsertionMode("inFrameset")},t.afterHead.startTagFromHead=function(n,r,i){e.parseError("unexpected-start-tag-out-of-my-head",{name:n}),e.openElements.push(e.head),t.inHead.processStartTag(n,r,i),e.openElements.remove(e.head)},t.afterHead.startTagHead=function(t,n,r){e.parseError("unexpected-start-tag",{name:t})},t.afterHead.startTagOther=function(t,n,r){this.anythingElse(),e.insertionMode.processStartTag(t,n,r)},t.afterHead.endTagBodyHtmlBr=function(t){this.anythingElse(),e.insertionMode.processEndTag(t)},t.afterHead.endTagOther=function(t){e.parseError("unexpected-end-tag",{name:t})},t.afterHead.anythingElse=function(){e.insertBodyElement([]),e.setInsertionMode("inBody"),e.framesetOk=!0},t.inBody=Object.create(t.base),t.inBody.start_tag_handlers={html:"startTagHtml",head:"startTagMisplaced",base:"startTagProcessInHead",basefont:"startTagProcessInHead",bgsound:"startTagProcessInHead",link:"startTagProcessInHead",meta:"startTagProcessInHead",noframes:"startTagProcessInHead",script:"startTagProcessInHead",style:"startTagProcessInHead",title:"startTagProcessInHead",body:"startTagBody",form:"startTagForm",plaintext:"startTagPlaintext",a:"startTagA",button:"startTagButton",xmp:"startTagXmp",table:"startTagTable",hr:"startTagHr",image:"startTagImage",input:"startTagInput",textarea:"startTagTextarea",select:"startTagSelect",isindex:"startTagIsindex",applet:"startTagAppletMarqueeObject",marquee:"startTagAppletMarqueeObject",object:"startTagAppletMarqueeObject",li:"startTagListItem",dd:"startTagListItem",dt:"startTagListItem",address:"startTagCloseP",article:"startTagCloseP",aside:"startTagCloseP",blockquote:"startTagCloseP",center:"startTagCloseP",details:"startTagCloseP",dir:"startTagCloseP",div:"startTagCloseP",dl:"startTagCloseP",fieldset:"startTagCloseP",figcaption:"startTagCloseP",figure:"startTagCloseP",footer:"startTagCloseP",header:"startTagCloseP",hgroup:"startTagCloseP",main:"startTagCloseP",menu:"startTagCloseP",nav:"startTagCloseP",ol:"startTagCloseP",p:"startTagCloseP",section:"startTagCloseP",summary:"startTagCloseP",ul:"startTagCloseP",listing:"startTagPreListing",pre:"startTagPreListing",b:"startTagFormatting",big:"startTagFormatting",code:"startTagFormatting",em:"startTagFormatting",font:"startTagFormatting",i:"startTagFormatting",s:"startTagFormatting",small:"startTagFormatting",strike:"startTagFormatting",strong:"startTagFormatting",tt:"startTagFormatting",u:"startTagFormatting",nobr:"startTagNobr",area:"startTagVoidFormatting",br:"startTagVoidFormatting",embed:"startTagVoidFormatting",img:"startTagVoidFormatting",keygen:"startTagVoidFormatting",wbr:"startTagVoidFormatting",param:"startTagParamSourceTrack",source:"startTagParamSourceTrack",track:"startTagParamSourceTrack",iframe:"startTagIFrame",noembed:"startTagRawText",noscript:"startTagRawText",h1:"startTagHeading",h2:"startTagHeading",h3:"startTagHeading",h4:"startTagHeading",h5:"startTagHeading",h6:"startTagHeading",caption:"startTagMisplaced",col:"startTagMisplaced",colgroup:"startTagMisplaced",frame:"startTagMisplaced",frameset:"startTagFrameset",tbody:"startTagMisplaced",td:"startTagMisplaced",tfoot:"startTagMisplaced",th:"startTagMisplaced",thead:"startTagMisplaced",tr:"startTagMisplaced",option:"startTagOptionOptgroup",optgroup:"startTagOptionOptgroup",math:"startTagMath",svg:"startTagSVG",rt:"startTagRpRt",rp:"startTagRpRt","-default":"startTagOther"},t.inBody.end_tag_handlers={p:"endTagP",body:"endTagBody",html:"endTagHtml",address:"endTagBlock",article:"endTagBlock",aside:"endTagBlock",blockquote:"endTagBlock",button:"endTagBlock",center:"endTagBlock",details:"endTagBlock",dir:"endTagBlock",div:"endTagBlock",dl:"endTagBlock",fieldset:"endTagBlock",figcaption:"endTagBlock",figure:"endTagBlock",footer:"endTagBlock",header:"endTagBlock",hgroup:"endTagBlock",listing:"endTagBlock",main:"endTagBlock",menu:"endTagBlock",nav:"endTagBlock",ol:"endTagBlock",pre:"endTagBlock",section:"endTagBlock",summary:"endTagBlock",ul:"endTagBlock",form:"endTagForm",applet:"endTagAppletMarqueeObject",marquee:"endTagAppletMarqueeObject",object:"endTagAppletMarqueeObject",dd:"endTagListItem",dt:"endTagListItem",li:"endTagListItem",h1:"endTagHeading",h2:"endTagHeading",h3:"endTagHeading",h4:"endTagHeading",h5:"endTagHeading",h6:"endTagHeading",a:"endTagFormatting",b:"endTagFormatting",big:"endTagFormatting",code:"endTagFormatting",em:"endTagFormatting",font:"endTagFormatting",i:"endTagFormatting",nobr:"endTagFormatting",s:"endTagFormatting",small:"endTagFormatting",strike:"endTagFormatting",strong:"endTagFormatting",tt:"endTagFormatting",u:"endTagFormatting",br:"endTagBr","-default":"endTagOther"},t.inBody.processCharacters=function(t){e.shouldSkipLeadingNewline&&(e.shouldSkipLeadingNewline=!1,t.skipAtMostOneLeadingNewline()),e.reconstructActiveFormattingElements();var n=t.takeRemaining();n=n.replace(/\u0000/g,function(t,n){return e.parseError("invalid-codepoint"),""});if(!n)return;e.insertText(n),e.framesetOk&&!o(n)&&(e.framesetOk=!1)},t.inBody.startTagHtml=function(t,n){e.parseError("non-html-root"),e.addAttributesToElement(e.openElements.rootNode,n)},t.inBody.startTagProcessInHead=function(e,n){t.inHead.processStartTag(e,n)},t.inBody.startTagBody=function(t,n){e.parseError("unexpected-start-tag",{name:"body"}),e.openElements.length==1||e.openElements.item(1).localName!="body"?c.ok(e.context):(e.framesetOk=!1,e.addAttributesToElement(e.openElements.bodyElement,n))},t.inBody.startTagFrameset=function(t,n){e.parseError("unexpected-start-tag",{name:"frameset"});if(e.openElements.length==1||e.openElements.item(1).localName!="body")c.ok(e.context);else if(e.framesetOk){e.detachFromParent(e.openElements.bodyElement);while(e.openElements.length>1)e.openElements.pop();e.insertElement(t,n),e.setInsertionMode("inFrameset")}},t.inBody.startTagCloseP=function(t,n){e.openElements.inButtonScope("p")&&this.endTagP("p"),e.insertElement(t,n)},t.inBody.startTagPreListing=function(t,n){e.openElements.inButtonScope("p")&&this.endTagP("p"),e.insertElement(t,n),e.framesetOk=!1,e.shouldSkipLeadingNewline=!0},t.inBody.startTagForm=function(t,n){e.form?e.parseError("unexpected-start-tag",{name:t}):(e.openElements.inButtonScope("p")&&this.endTagP("p"),e.insertElement(t,n),e.form=e.currentStackItem())},t.inBody.startTagRpRt=function(t,n){e.openElements.inScope("ruby")&&(e.generateImpliedEndTags(),e.currentStackItem().localName!="ruby"&&e.parseError("unexpected-start-tag",{name:t})),e.insertElement(t,n)},t.inBody.startTagListItem=function(t,n){var r={li:["li"],dd:["dd","dt"],dt:["dd","dt"]},i=r[t],s=e.openElements;for(var o=s.length-1;o>=0;o--){var u=s.item(o);if(i.indexOf(u.localName)!=-1){e.insertionMode.processEndTag(u.localName);break}if(u.isSpecial()&&u.localName!=="p"&&u.localName!=="address"&&u.localName!=="div")break}e.openElements.inButtonScope("p")&&this.endTagP("p"),e.insertElement(t,n),e.framesetOk=!1},t.inBody.startTagPlaintext=function(t,n){e.openElements.inButtonScope("p")&&this.endTagP("p"),e.insertElement(t,n),e.tokenizer.setState(v.PLAINTEXT)},t.inBody.startTagHeading=function(t,n){e.openElements.inButtonScope("p")&&this.endTagP("p"),e.currentStackItem().isNumberedHeader()&&(e.parseError("unexpected-start-tag",{name:t}),e.popElement()),e.insertElement(t,n)},t.inBody.startTagA=function(t,n){var r=e.elementInActiveFormattingElements("a");r&&(e.parseError("unexpected-start-tag-implies-end-tag",{startName:"a",endName:"a"}),e.adoptionAgencyEndTag("a"),e.openElements.contains(r)&&e.openElements.remove(r),e.removeElementFromActiveFormattingElements(r)),e.reconstructActiveFormattingElements(),e.insertFormattingElement(t,n)},t.inBody.startTagFormatting=function(t,n){e.reconstructActiveFormattingElements(),e.insertFormattingElement(t,n)},t.inBody.startTagNobr=function(t,n){e.reconstructActiveFormattingElements(),e.openElements.inScope("nobr")&&(e.parseError("unexpected-start-tag-implies-end-tag",{startName:"nobr",endName:"nobr"}),this.processEndTag("nobr"),e.reconstructActiveFormattingElements()),e.insertFormattingElement(t,n)},t.inBody.startTagButton=function(t,n){e.openElements.inScope("button")?(e.parseError("unexpected-start-tag-implies-end-tag",{startName:"button",endName:"button"}),this.processEndTag("button"),e.insertionMode.processStartTag(t,n)):(e.framesetOk=!1,e.reconstructActiveFormattingElements(),e.insertElement(t,n))},t.inBody.startTagAppletMarqueeObject=function(t,n){e.reconstructActiveFormattingElements(),e.insertElement(t,n),e.activeFormattingElements.push(y),e.framesetOk=!1},t.inBody.endTagAppletMarqueeObject=function(t){e.openElements.inScope(t)?(e.generateImpliedEndTags(),e.currentStackItem().localName!=t&&e.parseError("end-tag-too-early",{name:t}),e.openElements.popUntilPopped(t),e.clearActiveFormattingElements()):e.parseError("unexpected-end-tag",{name:t})},t.inBody.startTagXmp=function(t,n){e.openElements.inButtonScope("p")&&this.processEndTag("p"),e.reconstructActiveFormattingElements(),e.processGenericRawTextStartTag(t,n),e.framesetOk=!1},t.inBody.startTagTable=function(t,n){e.compatMode!=="quirks"&&e.openElements.inButtonScope("p")&&this.processEndTag("p"),e.insertElement(t,n),e.setInsertionMode("inTable"),e.framesetOk=!1},t.inBody.startTagVoidFormatting=function(t,n){e.reconstructActiveFormattingElements(),e.insertSelfClosingElement(t,n),e.framesetOk=!1},t.inBody.startTagParamSourceTrack=function(t,n){e.insertSelfClosingElement(t,n)},t.inBody.startTagHr=function(t,n){e.openElements.inButtonScope("p")&&this.endTagP("p"),e.insertSelfClosingElement(t,n),e.framesetOk=!1},t.inBody.startTagImage=function(t,n){e.parseError("unexpected-start-tag-treated-as",{originalName:"image",newName:"img"}),this.processStartTag("img",n)},t.inBody.startTagInput=function(t,n){var r=e.framesetOk;this.startTagVoidFormatting(t,n);for(var i in n)if(n[i].nodeName=="type"){n[i].nodeValue.toLowerCase()=="hidden"&&(e.framesetOk=r);break}},t.inBody.startTagIsindex=function(t,n){e.parseError("deprecated-tag",{name:"isindex"}),e.selfClosingFlagAcknowledged=!0;if(e.form)return;var r=[],i=[],s="This is a searchable index. Enter search keywords: ";for(var o in n)switch(n[o].nodeName){case"action":r.push({nodeName:"action",nodeValue:n[o].nodeValue});break;case"prompt":s=n[o].nodeValue;break;case"name":break;default:i.push({nodeName:n[o].nodeName,nodeValue:n[o].nodeValue})}i.push({nodeName:"name",nodeValue:"isindex"}),this.processStartTag("form",r),this.processStartTag("hr"),this.processStartTag("label"),this.processCharacters(new a(s)),this.processStartTag("input",i),this.processEndTag("label"),this.processStartTag("hr"),this.processEndTag("form")},t.inBody.startTagTextarea=function(t,n){e.insertElement(t,n),e.tokenizer.setState(v.RCDATA),e.originalInsertionMode=e.insertionModeName,e.shouldSkipLeadingNewline=!0,e.framesetOk=!1,e.setInsertionMode("text")},t.inBody.startTagIFrame=function(t,n){e.framesetOk=!1,this.startTagRawText(t,n)},t.inBody.startTagRawText=function(t,n){e.processGenericRawTextStartTag(t,n)},t.inBody.startTagSelect=function(t,n){e.reconstructActiveFormattingElements(),e.insertElement(t,n),e.framesetOk=!1;var r=e.insertionModeName;r=="inTable"||r=="inCaption"||r=="inColumnGroup"||r=="inTableBody"||r=="inRow"||r=="inCell"?e.setInsertionMode("inSelectInTable"):e.setInsertionMode("inSelect")},t.inBody.startTagMisplaced=function(t,n){e.parseError("unexpected-start-tag-ignored",{name:t})},t.inBody.endTagMisplaced=function(t){e.parseError("unexpected-end-tag",{name:t})},t.inBody.endTagBr=function(t){e.parseError("unexpected-end-tag-treated-as",{originalName:"br",newName:"br element"}),e.reconstructActiveFormattingElements(),e.insertElement(t,[]),e.popElement()},t.inBody.startTagOptionOptgroup=function(t,n){e.currentStackItem().localName=="option"&&e.popElement(),e.reconstructActiveFormattingElements(),e.insertElement(t,n)},t.inBody.startTagOther=function(t,n){e.reconstructActiveFormattingElements(),e.insertElement(t,n)},t.inBody.endTagOther=function(t){var n;for(var r=e.openElements.length-1;r>0;r--){n=e.openElements.item(r);if(n.localName==t){e.generateImpliedEndTags(t),e.currentStackItem().localName!=t&&e.parseError("unexpected-end-tag",{name:t}),e.openElements.remove_openElements_until(function(e){return e===n});break}if(n.isSpecial()){e.parseError("unexpected-end-tag",{name:t});break}}},t.inBody.startTagMath=function(t,n,r){e.reconstructActiveFormattingElements(),n=e.adjustMathMLAttributes(n),n=e.adjustForeignAttributes(n),e.insertForeignElement(t,n,"http://www.w3.org/1998/Math/MathML",r)},t.inBody.startTagSVG=function(t,n,r){e.reconstructActiveFormattingElements(),n=e.adjustSVGAttributes(n),n=e.adjustForeignAttributes(n),e.insertForeignElement(t,n,"http://www.w3.org/2000/svg",r)},t.inBody.endTagP=function(t){e.openElements.inButtonScope("p")?(e.generateImpliedEndTags("p"),e.currentStackItem().localName!="p"&&e.parseError("unexpected-implied-end-tag",{name:"p"}),e.openElements.popUntilPopped(t)):(e.parseError("unexpected-end-tag",{name:"p"}),this.startTagCloseP("p",[]),this.endTagP("p"))},t.inBody.endTagBody=function(t){if(!e.openElements.inScope("body")){e.parseError("unexpected-end-tag",{name:t});return}e.currentStackItem().localName!="body"&&e.parseError("expected-one-end-tag-but-got-another",{expectedName:e.currentStackItem().localName,gotName:t}),e.setInsertionMode("afterBody")},t.inBody.endTagHtml=function(t){if(!e.openElements.inScope("body")){e.parseError("unexpected-end-tag",{name:t});return}e.currentStackItem().localName!="body"&&e.parseError("expected-one-end-tag-but-got-another",{expectedName:e.currentStackItem().localName,gotName:t}),e.setInsertionMode("afterBody"),e.insertionMode.processEndTag(t)},t.inBody.endTagBlock=function(t){e.openElements.inScope(t)?(e.generateImpliedEndTags(),e.currentStackItem().localName!=t&&e.parseError("end-tag-too-early",{name:t}),e.openElements.popUntilPopped(t)):e.parseError("unexpected-end-tag",{name:t})},t.inBody.endTagForm=function(t){var n=e.form;e.form=null,!n||!e.openElements.inScope(t)?e.parseError("unexpected-end-tag",{name:t}):(e.generateImpliedEndTags(),e.currentStackItem()!=n&&e.parseError("end-tag-too-early-ignored",{name:"form"}),e.openElements.remove(n))},t.inBody.endTagListItem=function(t){e.openElements.inListItemScope(t)?(e.generateImpliedEndTags(t),e.currentStackItem().localName!=t&&e.parseError("end-tag-too-early",{name:t}),e.openElements.popUntilPopped(t)):e.parseError("unexpected-end-tag",{name:t})},t.inBody.endTagHeading=function(t){if(!e.openElements.hasNumberedHeaderElementInScope()){e.parseError("unexpected-end-tag",{name:t});return}e.generateImpliedEndTags(),e.currentStackItem().localName!=t&&e.parseError("end-tag-too-early",{name:t}),e.openElements.remove_openElements_until(function(e){return e.isNumberedHeader()})},t.inBody.endTagFormatting=function(t,n){e.adoptionAgencyEndTag(t)||this.endTagOther(t,n)},t.inCaption=Object.create(t.base),t.inCaption.start_tag_handlers={html:"startTagHtml",caption:"startTagTableElement",col:"startTagTableElement",colgroup:"startTagTableElement",tbody:"startTagTableElement",td:"startTagTableElement",tfoot:"startTagTableElement",thead:"startTagTableElement",tr:"startTagTableElement","-default":"startTagOther"},t.inCaption.end_tag_handlers={caption:"endTagCaption",table:"endTagTable",body:"endTagIgnore",col:"endTagIgnore",colgroup:"endTagIgnore",html:"endTagIgnore",tbody:"endTagIgnore",td:"endTagIgnore",tfood:"endTagIgnore",thead:"endTagIgnore",tr:"endTagIgnore","-default":"endTagOther"},t.inCaption.processCharacters=function(e){t.inBody.processCharacters(e)},t.inCaption.startTagTableElement=function(t,n){e.parseError("unexpected-end-tag",{name:t});var r=!e.openElements.inTableScope("caption");e.insertionMode.processEndTag("caption"),r||e.insertionMode.processStartTag(t,n)},t.inCaption.startTagOther=function(e,n,r){t.inBody.processStartTag(e,n,r)},t.inCaption.endTagCaption=function(t){e.openElements.inTableScope("caption")?(e.generateImpliedEndTags(),e.currentStackItem().localName!="caption"&&e.parseError("expected-one-end-tag-but-got-another",{gotName:"caption",expectedName:e.currentStackItem().localName}),e.openElements.popUntilPopped("caption"),e.clearActiveFormattingElements(),e.setInsertionMode("inTable")):(c.ok(e.context),e.parseError("unexpected-end-tag",{name:t}))},t.inCaption.endTagTable=function(t){e.parseError("unexpected-end-table-in-caption");var n=!e.openElements.inTableScope("caption");e.insertionMode.processEndTag("caption"),n||e.insertionMode.processEndTag(t)},t.inCaption.endTagIgnore=function(t){e.parseError("unexpected-end-tag",{name:t})},t.inCaption.endTagOther=function(e){t.inBody.processEndTag(e)},t.inCell=Object.create(t.base),t.inCell.start_tag_handlers={html:"startTagHtml",caption:"startTagTableOther",col:"startTagTableOther",colgroup:"startTagTableOther",tbody:"startTagTableOther",td:"startTagTableOther",tfoot:"startTagTableOther",th:"startTagTableOther",thead:"startTagTableOther",tr:"startTagTableOther","-default":"startTagOther"},t.inCell.end_tag_handlers={td:"endTagTableCell",th:"endTagTableCell",body:"endTagIgnore",caption:"endTagIgnore",col:"endTagIgnore",colgroup:"endTagIgnore",html:"endTagIgnore",table:"endTagImply",tbody:"endTagImply",tfoot:"endTagImply",thead:"endTagImply",tr:"endTagImply","-default":"endTagOther"},t.inCell.processCharacters=function(e){t.inBody.processCharacters(e)},t.inCell.startTagTableOther=function(t,n,r){e.openElements.inTableScope("td")||e.openElements.inTableScope("th")?(this.closeCell(),e.insertionMode.processStartTag(t,n,r)):e.parseError("unexpected-start-tag",{name:t})},t.inCell.startTagOther=function(e,n,r){t.inBody.processStartTag(e,n,r)},t.inCell.endTagTableCell=function(t){e.openElements.inTableScope(t)?(e.generateImpliedEndTags(t),e.currentStackItem().localName!=t.toLowerCase()?(e.parseError("unexpected-cell-end-tag",{name:t}),e.openElements.popUntilPopped(t)):e.popElement(),e.clearActiveFormattingElements(),e.setInsertionMode("inRow")):e.parseError("unexpected-end-tag",{name:t})},t.inCell.endTagIgnore=function(t){e.parseError("unexpected-end-tag",{name:t})},t.inCell.endTagImply=function(t){e.openElements.inTableScope(t)?(this.closeCell(),e.insertionMode.processEndTag(t)):e.parseError("unexpected-end-tag",{name:t})},t.inCell.endTagOther=function(e){t.inBody.processEndTag(e)},t.inCell.closeCell=function(){e.openElements.inTableScope("td")?this.endTagTableCell("td"):e.openElements.inTableScope("th")&&this.endTagTableCell("th")},t.inColumnGroup=Object.create(t.base),t.inColumnGroup.start_tag_handlers={html:"startTagHtml",col:"startTagCol","-default":"startTagOther"},t.inColumnGroup.end_tag_handlers={colgroup:"endTagColgroup",col:"endTagCol","-default":"endTagOther"},t.inColumnGroup.ignoreEndTagColgroup=function(){return e.currentStackItem().localName=="html"},t.inColumnGroup.processCharacters=function(t){var n=t.takeLeadingWhitespace();n&&e.insertText(n);if(!t.length)return;var r=this.ignoreEndTagColgroup();this.endTagColgroup("colgroup"),r||e.insertionMode.processCharacters(t)},t.inColumnGroup.startTagCol=function(t,n){e.insertSelfClosingElement(t,n)},t.inColumnGroup.startTagOther=function(t,n,r){var i=this.ignoreEndTagColgroup();this.endTagColgroup("colgroup"),i||e.insertionMode.processStartTag(t,n,r)},t.inColumnGroup.endTagColgroup=function(t){this.ignoreEndTagColgroup()?(c.ok(e.context),e.parseError("unexpected-end-tag",{name:t})):(e.popElement(),e.setInsertionMode("inTable"))},t.inColumnGroup.endTagCol=function(t){e.parseError("no-end-tag",{name:"col"})},t.inColumnGroup.endTagOther=function(t){var n=this.ignoreEndTagColgroup();this.endTagColgroup("colgroup"),n||e.insertionMode.processEndTag(t)},t.inForeignContent=Object.create(t.base),t.inForeignContent.processStartTag=function(t,n,r){if(["b","big","blockquote","body","br","center","code","dd","div","dl","dt","em","embed","h1","h2","h3","h4","h5","h6","head","hr","i","img","li","listing","menu","meta","nobr","ol","p","pre","ruby","s","small","span","strong","strike","sub","sup","table","tt","u","ul","var"].indexOf(t)!=-1||t=="font"&&n.some(function(e){return["color","face","size"].indexOf(e.nodeName)>=0})){e.parseError("unexpected-html-element-in-foreign-content",{name:t});while(e.currentStackItem().isForeign()&&!e.currentStackItem().isHtmlIntegrationPoint()&&!e.currentStackItem().isMathMLTextIntegrationPoint())e.openElements.pop();e.insertionMode.processStartTag(t,n,r);return}e.currentStackItem().namespaceURI=="http://www.w3.org/1998/Math/MathML"&&(n=e.adjustMathMLAttributes(n)),e.currentStackItem().namespaceURI=="http://www.w3.org/2000/svg"&&(t=e.adjustSVGTagNameCase(t),n=e.adjustSVGAttributes(n)),n=e.adjustForeignAttributes(n),e.insertForeignElement(t,n,e.currentStackItem().namespaceURI,r)},t.inForeignContent.processEndTag=function(t){var n=e.currentStackItem(),r=e.openElements.length-1;n.localName.toLowerCase()!=t&&e.parseError("unexpected-end-tag",{name:t});for(;;){if(r===0)break;if(n.localName.toLowerCase()==t){while(e.openElements.pop()!=n);break}r-=1,n=e.openElements.item(r);if(n.isForeign())continue;e.insertionMode.processEndTag(t);break}},t.inForeignContent.processCharacters=function(t){var n=t.takeRemaining();n=n.replace(/\u0000/g,function(t,n){return e.parseError("invalid-codepoint"),"�"}),e.framesetOk&&!o(n)&&(e.framesetOk=!1),e.insertText(n)},t.inHeadNoscript=Object.create(t.base),t.inHeadNoscript.start_tag_handlers={html:"startTagHtml",basefont:"startTagBasefontBgsoundLinkMetaNoframesStyle",bgsound:"startTagBasefontBgsoundLinkMetaNoframesStyle",link:"startTagBasefontBgsoundLinkMetaNoframesStyle",meta:"startTagBasefontBgsoundLinkMetaNoframesStyle",noframes:"startTagBasefontBgsoundLinkMetaNoframesStyle",style:"startTagBasefontBgsoundLinkMetaNoframesStyle",head:"startTagHeadNoscript",noscript:"startTagHeadNoscript","-default":"startTagOther"},t.inHeadNoscript.end_tag_handlers={noscript:"endTagNoscript",br:"endTagBr","-default":"endTagOther"},t.inHeadNoscript.processCharacters=function(t){var n=t.takeLeadingWhitespace();n&&e.insertText(n);if(!t.length)return;e.parseError("unexpected-char-in-frameset"),this.anythingElse(),e.insertionMode.processCharacters(t)},t.inHeadNoscript.processComment=function(e){t.inHead.processComment(e)},t.inHeadNoscript.startTagBasefontBgsoundLinkMetaNoframesStyle=function(e,n){t.inHead.processStartTag(e,n)},t.inHeadNoscript.startTagHeadNoscript=function(t,n){e.parseError("unexpected-start-tag-in-frameset",{name:t})},t.inHeadNoscript.startTagOther=function(t,n){e.parseError("unexpected-start-tag-in-frameset",{name:t}),this.anythingElse(),e.insertionMode.processStartTag(t,n)},t.inHeadNoscript.endTagBr=function(t,n){e.parseError("unexpected-end-tag-in-frameset",{name:t}),this.anythingElse(),e.insertionMode.processEndTag(t,n)},t.inHeadNoscript.endTagNoscript=function(t,n){e.popElement(),e.setInsertionMode("inHead")},t.inHeadNoscript.endTagOther=function(t,n){e.parseError("unexpected-end-tag-in-frameset",{name:t})},t.inHeadNoscript.anythingElse=function(){e.popElement(),e.setInsertionMode("inHead")},t.inFrameset=Object.create(t.base),t.inFrameset.start_tag_handlers={html:"startTagHtml",frameset:"startTagFrameset",frame:"startTagFrame",noframes:"startTagNoframes","-default":"startTagOther"},t.inFrameset.end_tag_handlers={frameset:"endTagFrameset",noframes:"endTagNoframes","-default":"endTagOther"},t.inFrameset.processCharacters=function(t){e.parseError("unexpected-char-in-frameset")},t.inFrameset.startTagFrameset=function(t,n){e.insertElement(t,n)},t.inFrameset.startTagFrame=function(t,n){e.insertSelfClosingElement(t,n)},t.inFrameset.startTagNoframes=function(e,n){t.inBody.processStartTag(e,n)},t.inFrameset.startTagOther=function(t,n){e.parseError("unexpected-start-tag-in-frameset",{name:t})},t.inFrameset.endTagFrameset=function(t,n){e.currentStackItem().localName=="html"?e.parseError("unexpected-frameset-in-frameset-innerhtml"):e.popElement(),!e.context&&e.currentStackItem().localName!="frameset"&&e.setInsertionMode("afterFrameset")},t.inFrameset.endTagNoframes=function(e){t.inBody.processEndTag(e)},t.inFrameset.endTagOther=function(t){e.parseError("unexpected-end-tag-in-frameset",{name:t})},t.inTable=Object.create(t.base),t.inTable.start_tag_handlers={html:"startTagHtml",caption:"startTagCaption",colgroup:"startTagColgroup",col:"startTagCol",table:"startTagTable",tbody:"startTagRowGroup",tfoot:"startTagRowGroup",thead:"startTagRowGroup",td:"startTagImplyTbody",th:"startTagImplyTbody",tr:"startTagImplyTbody",style:"startTagStyleScript",script:"startTagStyleScript",input:"startTagInput",form:"startTagForm","-default":"startTagOther"},t.inTable.end_tag_handlers={table:"endTagTable",body:"endTagIgnore",caption:"endTagIgnore",col:"endTagIgnore",colgroup:"endTagIgnore",html:"endTagIgnore",tbody:"endTagIgnore",td:"endTagIgnore",tfoot:"endTagIgnore",th:"endTagIgnore",thead:"endTagIgnore",tr:"endTagIgnore","-default":"endTagOther"},t.inTable.processCharacters=function(n){if(e.currentStackItem().isFosterParenting()){var r=e.insertionModeName;e.setInsertionMode("inTableText"),e.originalInsertionMode=r,e.insertionMode.processCharacters(n)}else e.redirectAttachToFosterParent=!0,t.inBody.processCharacters(n),e.redirectAttachToFosterParent=!1},t.inTable.startTagCaption=function(t,n){e.openElements.popUntilTableScopeMarker(),e.activeFormattingElements.push(y),e.insertElement(t,n),e.setInsertionMode("inCaption")},t.inTable.startTagColgroup=function(t,n){e.openElements.popUntilTableScopeMarker(),e.insertElement(t,n),e.setInsertionMode("inColumnGroup")},t.inTable.startTagCol=function(t,n){this.startTagColgroup("colgroup",[]),e.insertionMode.processStartTag(t,n)},t.inTable.startTagRowGroup=function(t,n){e.openElements.popUntilTableScopeMarker(),e.insertElement(t,n),e.setInsertionMode("inTableBody")},t.inTable.startTagImplyTbody=function(t,n){this.startTagRowGroup("tbody",[]),e.insertionMode.processStartTag(t,n)},t.inTable.startTagTable=function(t,n){e.parseError("unexpected-start-tag-implies-end-tag",{startName:"table",endName:"table"}),e.insertionMode.processEndTag("table"),e.context||e.insertionMode.processStartTag(t,n)},t.inTable.startTagStyleScript=function(e,n){t.inHead.processStartTag(e,n)},t.inTable.startTagInput=function(t,n){for(var r in n)if(n[r].nodeName.toLowerCase()=="type"){if(n[r].nodeValue.toLowerCase()=="hidden"){e.parseError("unexpected-hidden-input-in-table"),e.insertElement(t,n),e.openElements.pop();return}break}this.startTagOther(t,n)},t.inTable.startTagForm=function(t,n){e.parseError("unexpected-form-in-table"),e.form||(e.insertElement(t,n),e.form=e.currentStackItem(),e.openElements.pop())},t.inTable.startTagOther=function(n,r,i){e.parseError("unexpected-start-tag-implies-table-voodoo",{name:n}),e.redirectAttachToFosterParent=!0,t.inBody.processStartTag(n,r,i),e.redirectAttachToFosterParent=!1},t.inTable.endTagTable=function(t){e.openElements.inTableScope(t)?(e.generateImpliedEndTags(),e.currentStackItem().localName!=t&&e.parseError("end-tag-too-early-named",{gotName:"table",expectedName:e.currentStackItem().localName}),e.openElements.popUntilPopped("table"),e.resetInsertionMode()):(c.ok(e.context),e.parseError("unexpected-end-tag",{name:t}))},t.inTable.endTagIgnore=function(t){e.parseError("unexpected-end-tag",{name:t})},t.inTable.endTagOther=function(n){e.parseError("unexpected-end-tag-implies-table-voodoo",{name:n}),e.redirectAttachToFosterParent=!0,t.inBody.processEndTag(n),e.redirectAttachToFosterParent=!1},t.inTableText=Object.create(t.base),t.inTableText.flushCharacters=function(){var t=e.pendingTableCharacters.join("");s(t)?e.insertText(t):(e.redirectAttachToFosterParent=!0,e.reconstructActiveFormattingElements(),e.insertText(t),e.framesetOk=!1,e.redirectAttachToFosterParent=!1),e.pendingTableCharacters=[]},t.inTableText.processComment=function(t){this.flushCharacters(),e.setInsertionMode(e.originalInsertionMode),e.insertionMode.processComment(t)},t.inTableText.processEOF=function(t){this.flushCharacters(),e.setInsertionMode(e.originalInsertionMode),e.insertionMode.processEOF()},t.inTableText.processCharacters=function(t){var n=t.takeRemaining();n=n.replace(/\u0000/g,function(t,n){return e.parseError("invalid-codepoint"),""});if(!n)return;e.pendingTableCharacters.push(n)},t.inTableText.processStartTag=function(t,n,r){this.flushCharacters(),e.setInsertionMode(e.originalInsertionMode),e.insertionMode.processStartTag(t,n,r)},t.inTableText.processEndTag=function(t,n){this.flushCharacters(),e.setInsertionMode(e.originalInsertionMode),e.insertionMode.processEndTag(t,n)},t.inTableBody=Object.create(t.base),t.inTableBody.start_tag_handlers={html:"startTagHtml",tr:"startTagTr",td:"startTagTableCell",th:"startTagTableCell",caption:"startTagTableOther",col:"startTagTableOther",colgroup:"startTagTableOther",tbody:"startTagTableOther",tfoot:"startTagTableOther",thead:"startTagTableOther","-default":"startTagOther"},t.inTableBody.end_tag_handlers={table:"endTagTable",tbody:"endTagTableRowGroup",tfoot:"endTagTableRowGroup",thead:"endTagTableRowGroup",body:"endTagIgnore",caption:"endTagIgnore",col:"endTagIgnore",colgroup:"endTagIgnore",html:"endTagIgnore",td:"endTagIgnore",th:"endTagIgnore",tr:"endTagIgnore","-default":"endTagOther"},t.inTableBody.processCharacters=function(e){t.inTable.processCharacters(e)},t.inTableBody.startTagTr=function(t,n){e.openElements.popUntilTableBodyScopeMarker(),e.insertElement(t,n),e.setInsertionMode("inRow")},t.inTableBody.startTagTableCell=function(t,n){e.parseError("unexpected-cell-in-table-body",{name:t}),this.startTagTr("tr",[]),e.insertionMode.processStartTag(t,n)},t.inTableBody.startTagTableOther=function(t,n){e.openElements.inTableScope("tbody")||e.openElements.inTableScope("thead")||e.openElements.inTableScope("tfoot")?(e.openElements.popUntilTableBodyScopeMarker(),this.endTagTableRowGroup(e.currentStackItem().localName),e.insertionMode.processStartTag(t,n)):e.parseError("unexpected-start-tag",{name:t})},t.inTableBody.startTagOther=function(e,n){t.inTable.processStartTag(e,n)},t.inTableBody.endTagTableRowGroup=function(t){e.openElements.inTableScope(t)?(e.openElements.popUntilTableBodyScopeMarker(),e.popElement(),e.setInsertionMode("inTable")):e.parseError("unexpected-end-tag-in-table-body",{name:t})},t.inTableBody.endTagTable=function(t){e.openElements.inTableScope("tbody")||e.openElements.inTableScope("thead")||e.openElements.inTableScope("tfoot")?(e.openElements.popUntilTableBodyScopeMarker(),this.endTagTableRowGroup(e.currentStackItem().localName),e.insertionMode.processEndTag(t)):e.parseError("unexpected-end-tag",{name:t})},t.inTableBody.endTagIgnore=function(t){e.parseError("unexpected-end-tag-in-table-body",{name:t})},t.inTableBody.endTagOther=function(e){t.inTable.processEndTag(e)},t.inSelect=Object.create(t.base),t.inSelect.start_tag_handlers={html:"startTagHtml",option:"startTagOption",optgroup:"startTagOptgroup",select:"startTagSelect",input:"startTagInput",keygen:"startTagInput",textarea:"startTagInput",script:"startTagScript","-default":"startTagOther"},t.inSelect.end_tag_handlers={option:"endTagOption",optgroup:"endTagOptgroup",select:"endTagSelect",caption:"endTagTableElements",table:"endTagTableElements",tbody:"endTagTableElements",tfoot:"endTagTableElements",thead:"endTagTableElements",tr:"endTagTableElements",td:"endTagTableElements",th:"endTagTableElements","-default":"endTagOther"},t.inSelect.processCharacters=function(t){var n=t.takeRemaining();n=n.replace(/\u0000/g,function(t,n){return e.parseError("invalid-codepoint"),""});if(!n)return;e.insertText(n)},t.inSelect.startTagOption=function(t,n){e.currentStackItem().localName=="option"&&e.popElement(),e.insertElement(t,n)},t.inSelect.startTagOptgroup=function(t,n){e.currentStackItem().localName=="option"&&e.popElement(),e.currentStackItem().localName=="optgroup"&&e.popElement(),e.insertElement(t,n)},t.inSelect.endTagOption=function(t){if(e.currentStackItem().localName!=="option"){e.parseError("unexpected-end-tag-in-select",{name:t});return}e.popElement()},t.inSelect.endTagOptgroup=function(t){e.currentStackItem().localName=="option"&&e.openElements.item(e.openElements.length-2).localName=="optgroup"&&e.popElement(),e.currentStackItem().localName=="optgroup"?e.popElement():e.parseError("unexpected-end-tag-in-select",{name:"optgroup"})},t.inSelect.startTagSelect=function(t){e.parseError("unexpected-select-in-select"),this.endTagSelect("select")},t.inSelect.endTagSelect=function(t){e.openElements.inTableScope("select")?(e.openElements.popUntilPopped("select"),e.resetInsertionMode()):e.parseError("unexpected-end-tag",{name:t})},t.inSelect.startTagInput=function(t,n){e.parseError("unexpected-input-in-select"),e.openElements.inSelectScope("select")&&(this.endTagSelect("select"),e.insertionMode.processStartTag(t,n))},t.inSelect.startTagScript=function(e,n){t.inHead.processStartTag(e,n)},t.inSelect.endTagTableElements=function(t){e.parseError("unexpected-end-tag-in-select",{name:t}),e.openElements.inTableScope(t)&&(this.endTagSelect("select"),e.insertionMode.processEndTag(t))},t.inSelect.startTagOther=function(t,n){e.parseError("unexpected-start-tag-in-select",{name:t})},t.inSelect.endTagOther=function(t){e.parseError("unexpected-end-tag-in-select",{name:t})},t.inSelectInTable=Object.create(t.base),t.inSelectInTable.start_tag_handlers={caption:"startTagTable",table:"startTagTable",tbody:"startTagTable",tfoot:"startTagTable",thead:"startTagTable",tr:"startTagTable",td:"startTagTable",th:"startTagTable","-default":"startTagOther"},t.inSelectInTable.end_tag_handlers={caption:"endTagTable",table:"endTagTable",tbody:"endTagTable",tfoot:"endTagTable",thead:"endTagTable",tr:"endTagTable",td:"endTagTable",th:"endTagTable","-default":"endTagOther"},t.inSelectInTable.processCharacters=function(e){t.inSelect.processCharacters(e)},t.inSelectInTable.startTagTable=function(t,n){e.parseError("unexpected-table-element-start-tag-in-select-in-table",{name:t}),this.endTagOther("select"),e.insertionMode.processStartTag(t,n)},t.inSelectInTable.startTagOther=function(e,n,r){t.inSelect.processStartTag(e,n,r)},t.inSelectInTable.endTagTable=function(t){e.parseError("unexpected-table-element-end-tag-in-select-in-table",{name:t}),e.openElements.inTableScope(t)&&(this.endTagOther("select"),e.insertionMode.processEndTag(t))},t.inSelectInTable.endTagOther=function(e){t.inSelect.processEndTag(e)},t.inRow=Object.create(t.base),t.inRow.start_tag_handlers={html:"startTagHtml",td:"startTagTableCell",th:"startTagTableCell",caption:"startTagTableOther",col:"startTagTableOther",colgroup:"startTagTableOther",tbody:"startTagTableOther",tfoot:"startTagTableOther",thead:"startTagTableOther",tr:"startTagTableOther","-default":"startTagOther"},t.inRow.end_tag_handlers={tr:"endTagTr",table:"endTagTable",tbody:"endTagTableRowGroup",tfoot:"endTagTableRowGroup",thead:"endTagTableRowGroup",body:"endTagIgnore",caption:"endTagIgnore",col:"endTagIgnore",colgroup:"endTagIgnore",html:"endTagIgnore",td:"endTagIgnore",th:"endTagIgnore","-default":"endTagOther"},t.inRow.processCharacters=function(e){t.inTable.processCharacters(e)},t.inRow.startTagTableCell=function(t,n){e.openElements.popUntilTableRowScopeMarker(),e.insertElement(t,n),e.setInsertionMode("inCell"),e.activeFormattingElements.push(y)},t.inRow.startTagTableOther=function(t,n){var r=this.ignoreEndTagTr();this.endTagTr("tr"),r||e.insertionMode.processStartTag(t,n)},t.inRow.startTagOther=function(e,n,r){t.inTable.processStartTag(e,n,r)},t.inRow.endTagTr=function(t){this.ignoreEndTagTr()?(c.ok(e.context),e.parseError("unexpected-end-tag",{name:t})):(e.openElements.popUntilTableRowScopeMarker(),e.popElement(),e.setInsertionMode("inTableBody"))},t.inRow.endTagTable=function(t){var n=this.ignoreEndTagTr();this.endTagTr("tr"),n||e.insertionMode.processEndTag(t)},t.inRow.endTagTableRowGroup=function(t){e.openElements.inTableScope(t)?(this.endTagTr("tr"),e.insertionMode.processEndTag(t)):e.parseError("unexpected-end-tag",{name:t})},t.inRow.endTagIgnore=function(t){e.parseError("unexpected-end-tag-in-table-row",{name:t})},t.inRow.endTagOther=function(e){t.inTable.processEndTag(e)},t.inRow.ignoreEndTagTr=function(){return!e.openElements.inTableScope("tr")},t.afterAfterFrameset=Object.create(t.base),t.afterAfterFrameset.start_tag_handlers={html:"startTagHtml",noframes:"startTagNoFrames","-default":"startTagOther"},t.afterAfterFrameset.processEOF=function(){},t.afterAfterFrameset.processComment=function(t){e.insertComment(t,e.document)},t.afterAfterFrameset.processCharacters=function(t){var n=t.takeRemaining(),i="";for(var s=0;s<n.length;s++){var o=n[s];r(o)&&(i+=o)}i&&(e.reconstructActiveFormattingElements(),e.insertText(i)),i.length<n.length&&e.parseError("expected-eof-but-got-char")},t.afterAfterFrameset.startTagNoFrames=function(e,n){t.inHead.processStartTag(e,n)},t.afterAfterFrameset.startTagOther=function(t,n,r){e.parseError("expected-eof-but-got-start-tag",{name:t})},t.afterAfterFrameset.processEndTag=function(t,n){e.parseError("expected-eof-but-got-end-tag",{name:t})},t.text=Object.create(t.base),t.text.start_tag_handlers={"-default":"startTagOther"},t.text.end_tag_handlers={script:"endTagScript","-default":"endTagOther"},t.text.processCharacters=function(t){e.shouldSkipLeadingNewline&&(e.shouldSkipLeadingNewline=!1,t.skipAtMostOneLeadingNewline());var n=t.takeRemaining();if(!n)return;e.insertText(n)},t.text.processEOF=function(){e.parseError("expected-named-closing-tag-but-got-eof",{name:e.currentStackItem().localName}),e.openElements.pop(),e.setInsertionMode(e.originalInsertionMode),e.insertionMode.processEOF()},t.text.startTagOther=function(e){throw"Tried to process start tag "+e+" in RCDATA/RAWTEXT mode"},t.text.endTagScript=function(t){var n=e.openElements.pop();c.ok(n.localName=="script"),e.setInsertionMode(e.originalInsertionMode)},t.text.endTagOther=function(t){e.openElements.pop(),e.setInsertionMode(e.originalInsertionMode)}}function l(e,t){return e.replace(new RegExp("{[0-9a-z-]+}","gi"),function(e){return t[e.slice(1,-1)]||e})}var c=e("assert"),h=e("./messages.json"),p=e("./constants"),d=e("events").EventEmitter,v=e("./Tokenizer").Tokenizer,m=e("./ElementStack").ElementStack,g=e("./StackItem").StackItem,y={};a.prototype.skipAtMostOneLeadingNewline=function(){this.characters[this.current]==="\n"&&this.current++},a.prototype.skipLeadingWhitespace=function(){while(r(this.characters[this.current]))if(++this.current==this.end)return},a.prototype.skipLeadingNonWhitespace=function(){while(!r(this.characters[this.current]))if(++this.current==this.end)return},a.prototype.takeRemaining=function(){return this.characters.substring(this.current)},a.prototype.takeLeadingWhitespace=function(){var e=this.current;return this.skipLeadingWhitespace(),e===this.current?"":this.characters.substring(e,this.current-e)},Object.defineProperty(a.prototype,"length",{get:function(){return this.end-this.current}}),f.prototype.setInsertionMode=function(e){this.insertionMode=this.insertionModes[e],this.insertionModeName=e},f.prototype.adoptionAgencyEndTag=function(e){function t(e){return e===i}var n=8,r=3,i,s=0;while(s++<n){i=this.elementInActiveFormattingElements(e);if(!i||this.openElements.contains(i)&&!this.openElements.inScope(i.localName))return this.parseError("adoption-agency-1.1",{name:e}),!1;if(!this.openElements.contains(i))return this.parseError("adoption-agency-1.2",{name:e}),this.removeElementFromActiveFormattingElements(i),!0;this.openElements.inScope(i.localName)||this.parseError("adoption-agency-4.4",{name:e}),i!=this.currentStackItem()&&this.parseError("adoption-agency-1.3",{name:e});var o=this.openElements.furthestBlockForFormattingElement(i.node);if(!o)return this.openElements.remove_openElements_until(t),this.removeElementFromActiveFormattingElements(i),!0;var u=this.openElements.elements.indexOf(i),a=this.openElements.item(u-1),f=this.activeFormattingElements.indexOf(i),l=o,c=o,h=this.openElements.elements.indexOf(l),p=0;while(p++<r){h-=1,l=this.openElements.item(h);if(this.activeFormattingElements.indexOf(l)<0){this.openElements.elements.splice(h,1);continue}if(l==i)break;c==o&&(f=this.activeFormattingElements.indexOf(l)+1);var d=this.createElement(l.namespaceURI,l.localName,l.attributes),v=new g(l.namespaceURI,l.localName,l.attributes,d);this.activeFormattingElements[this.activeFormattingElements.indexOf(l)]=v,this.openElements.elements[this.openElements.elements.indexOf(l)]=v,l=v,this.detachFromParent(c.node),this.attachNode(c.node,l.node),c=l}this.detachFromParent(c.node),a.isFosterParenting()?this.insertIntoFosterParent(c.node):this.attachNode(c.node,a.node);var d=this.createElement("http://www.w3.org/1999/xhtml",i.localName,i.attributes),m=new g(i.namespaceURI,i.localName,i.attributes,d);this.reparentChildren(o.node,d),this.attachNode(d,o.node),this.removeElementFromActiveFormattingElements(i),this.activeFormattingElements.splice(Math.min(f,this.activeFormattingElements.length),0,m),this.openElements.remove(i),this.openElements.elements.splice(this.openElements.elements.indexOf(o)+1,0,m)}return!0},f.prototype.start=function(){throw"Not mplemented"},f.prototype.startTokenization=function(e){this.tokenizer=e,this.compatMode="no quirks",this.originalInsertionMode="initial",this.framesetOk=!0,this.openElements=new m,this.activeFormattingElements=[],this.start();if(this.context){switch(this.context){case"title":case"textarea":this.tokenizer.setState(v.RCDATA);break;case"style":case"xmp":case"iframe":case"noembed":case"noframes":this.tokenizer.setState(v.RAWTEXT);break;case"script":this.tokenizer.setState(v.SCRIPT_DATA);break;case"noscript":this.scriptingEnabled&&this.tokenizer.setState(v.RAWTEXT);break;case"plaintext":this.tokenizer.setState(v.PLAINTEXT)}this.insertHtmlElement(),this.resetInsertionMode()}else this.setInsertionMode("initial")},f.prototype.processToken=function(e){this.selfClosingFlagAcknowledged=!1;var t=this.openElements.top||null,n;!t||!t.isForeign()||t.isMathMLTextIntegrationPoint()&&(e.type=="StartTag"&&!(e.name in{mglyph:0,malignmark:0})||e.type==="Characters")||t.namespaceURI=="http://www.w3.org/1998/Math/MathML"&&t.localName=="annotation-xml"&&e.type=="StartTag"&&e.name=="svg"||t.isHtmlIntegrationPoint()&&e.type in{StartTag:0,Characters:0}||e.type=="EOF"?n=this.insertionMode:n=this.insertionModes.inForeignContent;switch(e.type){case"Characters":var r=new a(e.data);n.processCharacters(r);break;case"Comment":n.processComment(e.data);break;case"StartTag":n.processStartTag(e.name,e.data,e.selfClosing);break;case"EndTag":n.processEndTag(e.name);break;case"Doctype":n.processDoctype(e.name,e.publicId,e.systemId,e.forceQuirks);break;case"EOF":n.processEOF()}},f.prototype.isCdataSectionAllowed=function(){return this.openElements.length>0&&this.currentStackItem().isForeign()},f.prototype.isSelfClosingFlagAcknowledged=function(){return this.selfClosingFlagAcknowledged},f.prototype.createElement=function(e,t,n){throw new Error("Not implemented")},f.prototype.attachNode=function(e,t){throw new Error("Not implemented")},f.prototype.attachNodeToFosterParent=function(e,t,n){throw new Error("Not implemented")},f.prototype.detachFromParent=function(e){throw new Error("Not implemented")},f.prototype.addAttributesToElement=function(e,t){throw new Error("Not implemented")},f.prototype.insertHtmlElement=function(e){var t=this.createElement("http://www.w3.org/1999/xhtml","html",e);return this.attachNode(t,this.document),this.openElements.pushHtmlElement(new g("http://www.w3.org/1999/xhtml","html",e,t)),t},f.prototype.insertHeadElement=function(e){var t=this.createElement("http://www.w3.org/1999/xhtml","head",e);return this.head=new g("http://www.w3.org/1999/xhtml","head",e,t),this.attachNode(t,this.openElements.top.node),this.openElements.pushHeadElement(this.head),t},f.prototype.insertBodyElement=function(e){var t=this.createElement("http://www.w3.org/1999/xhtml","body",e);return this.attachNode(t,this.openElements.top.node),this.openElements.pushBodyElement(new g("http://www.w3.org/1999/xhtml","body",e,t)),t},f.prototype.insertIntoFosterParent=function(e){var t=this.openElements.findIndex("table"),n=this.openElements.item(t).node;if(t===0)return this.attachNode(e,n);this.attachNodeToFosterParent(e,n,this.openElements.item(t-1).node)},f.prototype.insertElement=function(e,t,n,r){n||(n="http://www.w3.org/1999/xhtml");var i=this.createElement(n,e,t);this.shouldFosterParent()?this.insertIntoFosterParent(i):this.attachNode(i,this.openElements.top.node),r||this.openElements.push(new g(n,e,t,i))},f.prototype.insertFormattingElement=function(e,t){this.insertElement(e,t,"http://www.w3.org/1999/xhtml"),this.appendElementToActiveFormattingElements(this.currentStackItem())},f.prototype.insertSelfClosingElement=function(e,t){this.selfClosingFlagAcknowledged=!0,this.insertElement(e,t,"http://www.w3.org/1999/xhtml",!0)},f.prototype.insertForeignElement=function(e,t,n,r){r&&(this.selfClosingFlagAcknowledged=!0),this.insertElement(e,t,n,r)},f.prototype.insertComment=function(e,t){throw new Error("Not implemented")},f.prototype.insertDoctype=function(e,t,n){throw new Error("Not implemented")},f.prototype.insertText=function(e){throw new Error("Not implemented")},f.prototype.currentStackItem=function(){return this.openElements.top},f.prototype.popElement=function(){return this.openElements.pop()},f.prototype.shouldFosterParent=function(){return this.redirectAttachToFosterParent&&this.currentStackItem().isFosterParenting()},f.prototype.generateImpliedEndTags=function(e){var t=this.openElements.top.localName;["dd","dt","li","option","optgroup","p","rp","rt"].indexOf(t)!=-1&&t!=e&&(this.popElement(),this.generateImpliedEndTags(e))},f.prototype.reconstructActiveFormattingElements=function(){if(this.activeFormattingElements.length===0)return;var e=this.activeFormattingElements.length-1,t=this.activeFormattingElements[e];if(t==y||this.openElements.contains(t))return;while(t!=y&&!this.openElements.contains(t)){e-=1,t=this.activeFormattingElements[e];if(!t)break}for(;;){e+=1,t=this.activeFormattingElements[e],this.insertElement(t.localName,t.attributes);var n=this.currentStackItem();this.activeFormattingElements[e]=n;if(n==this.activeFormattingElements[this.activeFormattingElements.length-1])break}},f.prototype.ensureNoahsArkCondition=function(e){var t=3;if(this.activeFormattingElements.length<t)return;var n=[],r=e.attributes.length;for(var i=this.activeFormattingElements.length-1;i>=0;i--){var s=this.activeFormattingElements[i];if(s===y)break;if(e.localName!==s.localName||e.namespaceURI!==s.namespaceURI)continue;if(s.attributes.length!=r)continue;n.push(s)}if(n.length<t)return;var o=[],a=e.attributes;for(var i=0;i<a.length;i++){var f=a[i];for(var l=0;l<n.length;l++){var s=n[l],c=u(s,f.nodeName);c&&c.nodeValue===f.nodeValue&&o.push(s)}if(o.length<t)return;n=o,o=[]}for(var i=t-1;i<n.length;i++)this.removeElementFromActiveFormattingElements(n[i])},f.prototype.appendElementToActiveFormattingElements=function(e){this.ensureNoahsArkCondition(e),this.activeFormattingElements.push(e)},f.prototype.removeElementFromActiveFormattingElements=function(e){var t=this.activeFormattingElements.indexOf(e);t>=0&&this.activeFormattingElements.splice(t,1)},f.prototype.elementInActiveFormattingElements=function(e){var t=this.activeFormattingElements;for(var n=t.length-1;n>=0;n--){if(t[n]==y)break;if(t[n].localName==e)return t[n]}return!1},f.prototype.clearActiveFormattingElements=function(){while(this.activeFormattingElements.length!==0&&this.activeFormattingElements.pop()!=y);},f.prototype.reparentChildren=function(e,t){throw new Error("Not implemented")},f.prototype.setFragmentContext=function(e){this.context=e},f.prototype.parseError=function(e,t){if(!this.errorHandler)return;var n=l(h[e],t);this.errorHandler.error(n,this.tokenizer._inputStream.location(),e)},f.prototype.resetInsertionMode=function(){var e=!1,t=null;for(var n=this.openElements.length-1;n>=0;n--){t=this.openElements.item(n),n===0&&(c.ok(this.context),e=!0,t=new g("http://www.w3.org/1999/xhtml",this.context,[],null));if(t.namespaceURI==="http://www.w3.org/1999/xhtml"){if(t.localName==="select")return this.setInsertionMode("inSelect");if(t.localName==="td"||t.localName==="th")return this.setInsertionMode("inCell");if(t.localName==="tr")return this.setInsertionMode("inRow");if(t.localName==="tbody"||t.localName==="thead"||t.localName==="tfoot")return this.setInsertionMode("inTableBody");if(t.localName==="caption")return this.setInsertionMode("inCaption");if(t.localName==="colgroup")return this.setInsertionMode("inColumnGroup");if(t.localName==="table")return this.setInsertionMode("inTable");if(t.localName==="head"&&!e)return this.setInsertionMode("inHead");if(t.localName==="body")return this.setInsertionMode("inBody");if(t.localName==="frameset")return this.setInsertionMode("inFrameset");if(t.localName==="html")return this.openElements.headElement?this.setInsertionMode("afterHead"):this.setInsertionMode("beforeHead")}if(e)return this.setInsertionMode("inBody")}},f.prototype.processGenericRCDATAStartTag=function(e,t){this.insertElement(e,t),this.tokenizer.setState(v.RCDATA),this.originalInsertionMode=this.insertionModeName,this.setInsertionMode("text")},f.prototype.processGenericRawTextStartTag=function(e,t){this.insertElement(e,t),this.tokenizer.setState(v.RAWTEXT),this.originalInsertionMode=this.insertionModeName,this.setInsertionMode("text")},f.prototype.adjustMathMLAttributes=function(e){return e.forEach(function(e){e.namespaceURI="http://www.w3.org/1998/Math/MathML",p.MATHMLAttributeMap[e.nodeName]&&(e.nodeName=p.MATHMLAttributeMap[e.nodeName])}),e},f.prototype.adjustSVGTagNameCase=function(e){return p.SVGTagMap[e]||e},f.prototype.adjustSVGAttributes=function(e){return e.forEach(function(e){e.namespaceURI="http://www.w3.org/2000/svg",p.SVGAttributeMap[e.nodeName]&&(e.nodeName=p.SVGAttributeMap[e.nodeName])}),e},f.prototype.adjustForeignAttributes=function(e){for(var t=0;t<e.length;t++){var n=e[t],r=p.ForeignAttributeMap[n.nodeName];r&&(n.nodeName=r.localName,n.prefix=r.prefix,n.namespaceURI=r.namespaceURI)}return e},n.TreeBuilder=f},{"./ElementStack":1,"./StackItem":4,"./Tokenizer":5,"./constants":7,"./messages.json":8,assert:13,events:16}],7:[function(e,t,n){n.SVGTagMap={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient",textpath:"textPath"},n.MATHMLAttributeMap={definitionurl:"definitionURL"},n.SVGAttributeMap={attributename:"attributeName",attributetype:"attributeType",basefrequency:"baseFrequency",baseprofile:"baseProfile",calcmode:"calcMode",clippathunits:"clipPathUnits",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",diffuseconstant:"diffuseConstant",edgemode:"edgeMode",externalresourcesrequired:"externalResourcesRequired",filterres:"filterRes",filterunits:"filterUnits",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",limitingconeangle:"limitingConeAngle",markerheight:"markerHeight",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textlength:"textLength",viewbox:"viewBox",viewtarget:"viewTarget",xchannelselector:"xChannelSelector",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan"},n.ForeignAttributeMap={"xlink:actuate":{prefix:"xlink",localName:"actuate",namespaceURI:"http://www.w3.org/1999/xlink"},"xlink:arcrole":{prefix:"xlink",localName:"arcrole",namespaceURI:"http://www.w3.org/1999/xlink"},"xlink:href":{prefix:"xlink",localName:"href",namespaceURI:"http://www.w3.org/1999/xlink"},"xlink:role":{prefix:"xlink",localName:"role",namespaceURI:"http://www.w3.org/1999/xlink"},"xlink:show":{prefix:"xlink",localName:"show",namespaceURI:"http://www.w3.org/1999/xlink"},"xlink:title":{prefix:"xlink",localName:"title",namespaceURI:"http://www.w3.org/1999/xlink"},"xlink:type":{prefix:"xlink",localName:"title",namespaceURI:"http://www.w3.org/1999/xlink"},"xml:base":{prefix:"xml",localName:"base",namespaceURI:"http://www.w3.org/XML/1998/namespace"},"xml:lang":{prefix:"xml",localName:"lang",namespaceURI:"http://www.w3.org/XML/1998/namespace"},"xml:space":{prefix:"xml",localName:"space",namespaceURI:"http://www.w3.org/XML/1998/namespace"},xmlns:{prefix:null,localName:"xmlns",namespaceURI:"http://www.w3.org/2000/xmlns/"},"xmlns:xlink":{prefix:"xmlns",localName:"xlink",namespaceURI:"http://www.w3.org/2000/xmlns/"}}},{}],8:[function(e,t,n){t.exports={"null-character":"Null character in input stream, replaced with U+FFFD.","invalid-codepoint":"Invalid codepoint in stream","incorrectly-placed-solidus":"Solidus (/) incorrectly placed in tag.","incorrect-cr-newline-entity":"Incorrect CR newline entity, replaced with LF.","illegal-windows-1252-entity":"Entity used with illegal number (windows-1252 reference).","cant-convert-numeric-entity":"Numeric entity couldn't be converted to character (codepoint U+{charAsInt}).","invalid-numeric-entity-replaced":"Numeric entity represents an illegal codepoint. Expanded to the C1 controls range.","numeric-entity-without-semicolon":"Numeric entity didn't end with ';'.","expected-numeric-entity-but-got-eof":"Numeric entity expected. Got end of file instead.","expected-numeric-entity":"Numeric entity expected but none found.","named-entity-without-semicolon":"Named entity didn't end with ';'.","expected-named-entity":"Named entity expected. Got none.","attributes-in-end-tag":"End tag contains unexpected attributes.","self-closing-flag-on-end-tag":"End tag contains unexpected self-closing flag.","bare-less-than-sign-at-eof":"End of file after <.","expected-tag-name-but-got-right-bracket":"Expected tag name. Got '>' instead.","expected-tag-name-but-got-question-mark":"Expected tag name. Got '?' instead. (HTML doesn't support processing instructions.)","expected-tag-name":"Expected tag name. Got something else instead.","expected-closing-tag-but-got-right-bracket":"Expected closing tag. Got '>' instead. Ignoring '</>'.","expected-closing-tag-but-got-eof":"Expected closing tag. Unexpected end of file.","expected-closing-tag-but-got-char":"Expected closing tag. Unexpected character '{data}' found.","eof-in-tag-name":"Unexpected end of file in the tag name.","expected-attribute-name-but-got-eof":"Unexpected end of file. Expected attribute name instead.","eof-in-attribute-name":"Unexpected end of file in attribute name.","invalid-character-in-attribute-name":"Invalid character in attribute name.","duplicate-attribute":"Dropped duplicate attribute '{name}' on tag.","expected-end-of-tag-but-got-eof":"Unexpected end of file. Expected = or end of tag.","expected-attribute-value-but-got-eof":"Unexpected end of file. Expected attribute value.","expected-attribute-value-but-got-right-bracket":"Expected attribute value. Got '>' instead.","unexpected-character-in-unquoted-attribute-value":"Unexpected character in unquoted attribute","invalid-character-after-attribute-name":"Unexpected character after attribute name.","unexpected-character-after-attribute-value":"Unexpected character after attribute value.","eof-in-attribute-value-double-quote":'Unexpected end of file in attribute value (").',"eof-in-attribute-value-single-quote":"Unexpected end of file in attribute value (').","eof-in-attribute-value-no-quotes":"Unexpected end of file in attribute value.","eof-after-attribute-value":"Unexpected end of file after attribute value.","unexpected-eof-after-solidus-in-tag":"Unexpected end of file in tag. Expected >.","unexpected-character-after-solidus-in-tag":"Unexpected character after / in tag. Expected >.","expected-dashes-or-doctype":"Expected '--' or 'DOCTYPE'. Not found.","unexpected-bang-after-double-dash-in-comment":"Unexpected ! after -- in comment.","incorrect-comment":"Incorrect comment.","eof-in-comment":"Unexpected end of file in comment.","eof-in-comment-end-dash":"Unexpected end of file in comment (-).","unexpected-dash-after-double-dash-in-comment":"Unexpected '-' after '--' found in comment.","eof-in-comment-double-dash":"Unexpected end of file in comment (--).","eof-in-comment-end-bang-state":"Unexpected end of file in comment.","unexpected-char-in-comment":"Unexpected character in comment found.","need-space-after-doctype":"No space after literal string 'DOCTYPE'.","expected-doctype-name-but-got-right-bracket":"Unexpected > character. Expected DOCTYPE name.","expected-doctype-name-but-got-eof":"Unexpected end of file. Expected DOCTYPE name.","eof-in-doctype-name":"Unexpected end of file in DOCTYPE name.","eof-in-doctype":"Unexpected end of file in DOCTYPE.","expected-space-or-right-bracket-in-doctype":"Expected space or '>'. Got '{data}'.","unexpected-end-of-doctype":"Unexpected end of DOCTYPE.","unexpected-char-in-doctype":"Unexpected character in DOCTYPE.","eof-in-bogus-doctype":"Unexpected end of file in bogus doctype.","eof-in-innerhtml":"Unexpected EOF in inner html mode.","unexpected-doctype":"Unexpected DOCTYPE. Ignored.","non-html-root":"html needs to be the first start tag.","expected-doctype-but-got-eof":"Unexpected End of file. Expected DOCTYPE.","unknown-doctype":"Erroneous DOCTYPE. Expected <!DOCTYPE html>.","quirky-doctype":"Quirky doctype. Expected <!DOCTYPE html>.","almost-standards-doctype":"Almost standards mode doctype. Expected <!DOCTYPE html>.","obsolete-doctype":"Obsolete doctype. Expected <!DOCTYPE html>.","expected-doctype-but-got-chars":"Non-space characters found without seeing a doctype first. Expected e.g. <!DOCTYPE html>.","expected-doctype-but-got-start-tag":"Start tag seen without seeing a doctype first. Expected e.g. <!DOCTYPE html>.","expected-doctype-but-got-end-tag":"End tag seen without seeing a doctype first. Expected e.g. <!DOCTYPE html>.","end-tag-after-implied-root":"Unexpected end tag ({name}) after the (implied) root element.","expected-named-closing-tag-but-got-eof":"Unexpected end of file. Expected end tag ({name}).","two-heads-are-not-better-than-one":"Unexpected start tag head in existing head. Ignored.","unexpected-end-tag":"Unexpected end tag ({name}). Ignored.","unexpected-implied-end-tag":"End tag {name} implied, but there were open elements.","unexpected-start-tag-out-of-my-head":"Unexpected start tag ({name}) that can be in head. Moved.","unexpected-start-tag":"Unexpected start tag ({name}).","missing-end-tag":"Missing end tag ({name}).","missing-end-tags":"Missing end tags ({name}).","unexpected-start-tag-implies-end-tag":"Unexpected start tag ({startName}) implies end tag ({endName}).","unexpected-start-tag-treated-as":"Unexpected start tag ({originalName}). Treated as {newName}.","deprecated-tag":"Unexpected start tag {name}. Don't use it!","unexpected-start-tag-ignored":"Unexpected start tag {name}. Ignored.","expected-one-end-tag-but-got-another":"Unexpected end tag ({gotName}). Missing end tag ({expectedName}).","end-tag-too-early":"End tag ({name}) seen too early. Expected other end tag.","end-tag-too-early-named":"Unexpected end tag ({gotName}). Expected end tag ({expectedName}.","end-tag-too-early-ignored":"End tag ({name}) seen too early. Ignored.","adoption-agency-1.1":"End tag ({name}) violates step 1, paragraph 1 of the adoption agency algorithm.","adoption-agency-1.2":"End tag ({name}) violates step 1, paragraph 2 of the adoption agency algorithm.","adoption-agency-1.3":"End tag ({name}) violates step 1, paragraph 3 of the adoption agency algorithm.","adoption-agency-4.4":"End tag ({name}) violates step 4, paragraph 4 of the adoption agency algorithm.","unexpected-end-tag-treated-as":"Unexpected end tag ({originalName}). Treated as {newName}.","no-end-tag":"This element ({name}) has no end tag.","unexpected-implied-end-tag-in-table":"Unexpected implied end tag ({name}) in the table phase.","unexpected-implied-end-tag-in-table-body":"Unexpected implied end tag ({name}) in the table body phase.","unexpected-char-implies-table-voodoo":"Unexpected non-space characters in table context caused voodoo mode.","unexpected-hidden-input-in-table":"Unexpected input with type hidden in table context.","unexpected-form-in-table":"Unexpected form in table context.","unexpected-start-tag-implies-table-voodoo":"Unexpected start tag ({name}) in table context caused voodoo mode.","unexpected-end-tag-implies-table-voodoo":"Unexpected end tag ({name}) in table context caused voodoo mode.","unexpected-cell-in-table-body":"Unexpected table cell start tag ({name}) in the table body phase.","unexpected-cell-end-tag":"Got table cell end tag ({name}) while required end tags are missing.","unexpected-end-tag-in-table-body":"Unexpected end tag ({name}) in the table body phase. Ignored.","unexpected-implied-end-tag-in-table-row":"Unexpected implied end tag ({name}) in the table row phase.","unexpected-end-tag-in-table-row":"Unexpected end tag ({name}) in the table row phase. Ignored.","unexpected-select-in-select":"Unexpected select start tag in the select phase treated as select end tag.","unexpected-input-in-select":"Unexpected input start tag in the select phase.","unexpected-start-tag-in-select":"Unexpected start tag token ({name}) in the select phase. Ignored.","unexpected-end-tag-in-select":"Unexpected end tag ({name}) in the select phase. Ignored.","unexpected-table-element-start-tag-in-select-in-table":"Unexpected table element start tag ({name}) in the select in table phase.","unexpected-table-element-end-tag-in-select-in-table":"Unexpected table element end tag ({name}) in the select in table phase.","unexpected-char-after-body":"Unexpected non-space characters in the after body phase.","unexpected-start-tag-after-body":"Unexpected start tag token ({name}) in the after body phase.","unexpected-end-tag-after-body":"Unexpected end tag token ({name}) in the after body phase.","unexpected-char-in-frameset":"Unepxected characters in the frameset phase. Characters ignored.","unexpected-start-tag-in-frameset":"Unexpected start tag token ({name}) in the frameset phase. Ignored.","unexpected-frameset-in-frameset-innerhtml":"Unexpected end tag token (frameset in the frameset phase (innerHTML).","unexpected-end-tag-in-frameset":"Unexpected end tag token ({name}) in the frameset phase. Ignored.","unexpected-char-after-frameset":"Unexpected non-space characters in the after frameset phase. Ignored.","unexpected-start-tag-after-frameset":"Unexpected start tag ({name}) in the after frameset phase. Ignored.","unexpected-end-tag-after-frameset":"Unexpected end tag ({name}) in the after frameset phase. Ignored.","expected-eof-but-got-char":"Unexpected non-space characters. Expected end of file.","expected-eof-but-got-start-tag":"Unexpected start tag ({name}). Expected end of file.","expected-eof-but-got-end-tag":"Unexpected end tag ({name}). Expected end of file.","unexpected-end-table-in-caption":"Unexpected end table tag in caption. Generates implied end caption.","end-html-in-innerhtml":"Unexpected html end tag in inner html mode.","eof-in-table":"Unexpected end of file. Expected table content.","eof-in-script":"Unexpected end of file. Expected script content.","non-void-element-with-trailing-solidus":"Trailing solidus not allowed on element {name}.","unexpected-html-element-in-foreign-content":'HTML start tag "{name}" in a foreign namespace context.',"unexpected-start-tag-in-table":"Unexpected {name}. Expected table content."}},{}],9:[function(e,t,n){function r(){this.contentHandler=null,this._errorHandler=null,this._treeBuilder=new i,this._tokenizer=new s(this._treeBuilder),this._scriptingEnabled=!1}var i=e("./SAXTreeBuilder").SAXTreeBuilder,s=e("../Tokenizer").Tokenizer,o=e("./TreeParser").TreeParser;r.prototype.parse=function(e){this._tokenizer.tokenize(e);var t=this._treeBuilder.document;t&&(new o(this.contentHandler)).parse(t)},r.prototype.parseFragment=function(e,t){this._treeBuilder.setFragmentContext(t),this._tokenizer.tokenize(e);var n=this._treeBuilder.getFragment();n&&(new o(this.contentHandler)).parse(n)},Object.defineProperty(r.prototype,"scriptingEnabled",{get:function(){return this._scriptingEnabled},set:function(e){this._scriptingEnabled=e,this._treeBuilder.scriptingEnabled=e}}),Object.defineProperty(r.prototype,"errorHandler",{get:function(){return this._errorHandler},set:function(e){this._errorHandler=e,this._treeBuilder.errorHandler=e}}),n.SAXParser=r},{"../Tokenizer":5,"./SAXTreeBuilder":10,"./TreeParser":11}],10:[function(e,t,n){function r(){b.call(this)}function i(e,t){for(var n=0;n<e.attributes.length;n++){var r=e.attributes[n];if(r.nodeName===t)return r.nodeValue}}function s(e){e?(this.columnNumber=e.columnNumber,this.lineNumber=e.lineNumber):(this.columnNumber=-1,this.lineNumber=-1),this.parentNode=null,this.nextSibling=null,this.firstChild=null}function o(e){s.call(this,e),this.lastChild=null,this._endLocator=null}function u(e){o.call(this,e),this.nodeType=w.DOCUMENT}function a(){o.call(this,new Locator),this.nodeType=w.DOCUMENT_FRAGMENT}function f(e,t,n,r,i,s){o.call(this,e),this.uri=t,this.localName=n,this.qName=r,this.attributes=i,this.prefixMappings=s,this.nodeType=w.ELEMENT}function l(e,t){s.call(this,e),this.data=t,this.nodeType=w.CHARACTERS}function c(e,t){s.call(this,e),this.data=t,this.nodeType=w.IGNORABLE_WHITESPACE}function h(e,t){s.call(this,e),this.data=t,this.nodeType=w.COMMENT}function p(e){o.call(this,e),this.nodeType=w.CDATA}function d(e){o.call(this),this.name=e,this.nodeType=w.ENTITY}function v(e){s.call(this),this.name=e,this.nodeType=w.SKIPPED_ENTITY}function m(e,t){s.call(this),this.target=e,this.data=t}function g(e,t,n){o.call(this),this.name=e,this.publicIdentifier=t,this.systemIdentifier=n,this.nodeType=w.DTD}var y=e("util"),b=e("../TreeBuilder").TreeBuilder;y.inherits(r,b),r.prototype.start=function(e){this.document=new u(this.tokenizer)},r.prototype.end=function(){this.document.endLocator=this.tokenizer},r.prototype.insertDoctype=function(e,t,n){var r=new g(this.tokenizer,e,t,n);r.endLocator=this.tokenizer,this.document.appendChild(r)},r.prototype.createElement=function(e,t,n){var r=new f(this.tokenizer,e,t,t,n||[]);return r},r.prototype.insertComment=function(e,t){t||(t=this.currentStackItem());var n=new h(this.tokenizer,e);t.appendChild(n)},r.prototype.appendCharacters=function(e,t){var n=new l(this.tokenizer,t);e.appendChild(n)},r.prototype.insertText=function(e){if(this.redirectAttachToFosterParent&&this.openElements.top.isFosterParenting()){var t=this.openElements.findIndex("table"),n=this.openElements.item(t),r=n.node;if(t===0)return this.appendCharacters(r,e);var i=new l(this.tokenizer,e),s=r.parentNode;if(s){s.insertBetween(i,r.previousSibling,r);return}var o=this.openElements.item(t-1).node;o.appendChild(i);return}this.appendCharacters(this.currentStackItem().node,e)},r.prototype.attachNode=function(e,t){t.appendChild(e)},r.prototype.attachNodeToFosterParent=function(e,t,n){var r=t.parentNode;r?r.insertBetween(e,t.previousSibling,t):n.appendChild(e)},r.prototype.detachFromParent=function(e){e.detach()},r.prototype.reparentChildren=function(e,t){t.appendChildren(e.firstChild)},r.prototype.getFragment=function(){var e=new a;return this.reparentChildren(this.openElements.rootNode,e),e},r.prototype.addAttributesToElement=function(e,t){for(var n=0;n<t.length;n++){var r=t[n];i(e,r.nodeName)||e.attributes.push(r)}};var w={CDATA:1,CHARACTERS:2,COMMENT:3,DOCUMENT:4,DOCUMENT_FRAGMENT:5,DTD:6,ELEMENT:7,ENTITY:8,IGNORABLE_WHITESPACE:9,PROCESSING_INSTRUCTION:10,SKIPPED_ENTITY:11};s.prototype.visit=function(e){throw new Error("Not Implemented")},s.prototype.revisit=function(e){return},s.prototype.detach=function(){this.parentNode!==null&&(this.parentNode.removeChild(this),this.parentNode=null)},Object.defineProperty(s.prototype,"previousSibling",{get:function(){var e=null,t=this.parentNode.firstChild;for(;;){if(this==t)return e;e=t,t=t.nextSibling}}}),o.prototype=Object.create(s.prototype),o.prototype.insertBefore=function(e,t){if(!t)return this.appendChild(e);e.detach(),e.parentNode=this;if(this.firstChild==t)e.nextSibling=t,this.firstChild=e;else{var n=this.firstChild,r=this.firstChild.nextSibling;while(r!=t)n=r,r=r.nextSibling;n.nextSibling=e,e.nextSibling=r}return e},o.prototype.insertBetween=function(e,t,n){return n?(e.detach(),e.parentNode=this,e.nextSibling=n,t?t.nextSibling=e:firstChild=e,e):this.appendChild(e)},o.prototype.appendChild=function(e){return e.detach(),e.parentNode=this,this.firstChild?this.lastChild.nextSibling=e:this.firstChild=e,this.lastChild=e,e},o.prototype.appendChildren=function(e){var t=e.firstChild;if(!t)return;var n=e;this.firstChild?this.lastChild.nextSibling=t:this.firstChild=t,this.lastChild=n.lastChild;do t.parentNode=this;while(t=t.nextSibling);n.firstChild=null,n.lastChild=null},o.prototype.removeChild=function(e){if(this.firstChild==e)this.firstChild=e.nextSibling,this.lastChild==e&&(this.lastChild=null);else{var t=this.firstChild,n=this.firstChild.nextSibling;while(n!=e)t=n,n=n.nextSibling;t.nextSibling=e.nextSibling,this.lastChild==e&&(this.lastChild=t)}return e.parentNode=null,e},Object.defineProperty(o.prototype,"endLocator",{get:function(){return this._endLocator},set:function(e){this._endLocator={lineNumber:e.lineNumber,columnNumber:e.columnNumber}}}),u.prototype=Object.create(o.prototype),u.prototype.visit=function(e){e.startDocument(this)},u.prototype.revisit=function(e){e.endDocument(this.endLocator)},a.prototype=Object.create(o.prototype),a.prototype.visit=function(e){},f.prototype=Object.create(o.prototype),f.prototype.visit=function(e){if(this.prefixMappings)for(var t in prefixMappings){var n=prefixMappings[t];e.startPrefixMapping(n.getPrefix(),n.getUri(),this)}e.startElement(this.uri,this.localName,this.qName,this.attributes,this)},f.prototype.revisit=function(e){e.endElement(this.uri,this.localName,this.qName,this.endLocator);if(this.prefixMappings)for(var t in prefixMappings){var n=prefixMappings[t];e.endPrefixMapping(n.getPrefix(),this.endLocator)}},l.prototype=Object.create(s.prototype),l.prototype.visit=function(e){e.characters(this.data,0,this.data.length,this)},c.prototype=Object.create(s.prototype),c.prototype.visit=function(e){e.ignorableWhitespace(this.data,0,this.data.length,this)},h.prototype=Object.create(s.prototype),h.prototype.visit=function(e){e.comment(this.data,0,this.data.length,this)},p.prototype=Object.create(o.prototype),p.prototype.visit=function(e){e.startCDATA(this)},p.prototype.revisit=function(e){e.endCDATA(this.endLocator)},d.prototype=Object.create(o.prototype),d.prototype.visit=function(e){e.startEntity(this.name,this)},d.prototype.revisit=function(e){e.endEntity(this.name)},v.prototype=Object.create(s.prototype),v.prototype.visit=function(e){e.skippedEntity(this.name,this)},m.prototype=Object.create(s.prototype),m.prototype.visit=function(e){e.processingInstruction(this.target,this.data,this)},m.prototype.getNodeType=function(){return w.PROCESSING_INSTRUCTION},g.prototype=Object.create(o.prototype),g.prototype.visit=function(e){e.startDTD(this.name,this.publicIdentifier,this.systemIdentifier,this)},g.prototype.revisit=function(e){e.endDTD()},n.SAXTreeBuilder=r},{"../TreeBuilder":6,util:20}],11:[function(e,t,n){function r(e,t){this.contentHandler,this.lexicalHandler,this.locatorDelegate;if(!e)throw new IllegalArgumentException("contentHandler was null.");this.contentHandler=e,t?this.lexicalHandler=t:this.lexicalHandler=new i}function i(){}r.prototype.parse=function(e){this.contentHandler.documentLocator=this;var t=e,n;for(;;){t.visit(this);if(n=t.firstChild){t=n;continue}for(;;){t.revisit(this);if(t==e)return;if(n=t.nextSibling){t=n;break}t=t.parentNode}}},r.prototype.characters=function(e,t,n,r){this.locatorDelegate=r,this.contentHandler.characters(e,t,n)},r.prototype.endDocument=function(e){this.locatorDelegate=e,this.contentHandler.endDocument()},r.prototype.endElement=function(e,t,n,r){this.locatorDelegate=r,this.contentHandler.endElement(e,t,n)},r.prototype.endPrefixMapping=function(e,t){this.locatorDelegate=t,this.contentHandler.endPrefixMapping(e)},r.prototype.ignorableWhitespace=function(e,t,n,r){this.locatorDelegate=r,this.contentHandler.ignorableWhitespace(e,t,n)},r.prototype.processingInstruction=function(e,t,n){this.locatorDelegate=n,this.contentHandler.processingInstruction(e,t)},r.prototype.skippedEntity=function(e,t){this.locatorDelegate=t,this.contentHandler.skippedEntity(e)},r.prototype.startDocument=function(e){this.locatorDelegate=e,this.contentHandler.startDocument()},r.prototype.startElement=function(e,t,n,r,i){this.locatorDelegate=i,this.contentHandler.startElement(e,t,n,r)},r.prototype.startPrefixMapping=function(e,t,n){this.locatorDelegate=n,this.contentHandler.startPrefixMapping(e,t)},r.prototype.comment=function(e,t,n,r){this.locatorDelegate=r,this.lexicalHandler.comment(e,t,n)},r.prototype.endCDATA=function(e){this.locatorDelegate=e,this.lexicalHandler.endCDATA()},r.prototype.endDTD=function(e){this.locatorDelegate=e,this.lexicalHandler.endDTD()},r.prototype.endEntity=function(e,t){this.locatorDelegate=t,this.lexicalHandler.endEntity(e)},r.prototype.startCDATA=function(e){this.locatorDelegate=e,this.lexicalHandler.startCDATA()},r.prototype.startDTD=function(e,t,n,r){this.locatorDelegate=r,this.lexicalHandler.startDTD(e,t,n)},r.prototype.startEntity=function(e,t){this.locatorDelegate=t,this.lexicalHandler.startEntity(e)},Object.defineProperty(r.prototype,"columnNumber",{get:function(){return this.locatorDelegate?this.locatorDelegate.columnNumber:-1}}),Object.defineProperty(r.prototype,"lineNumber",{get:function(){return this.locatorDelegate?this.locatorDelegate.lineNumber:-1}}),i.prototype.comment=function(){},i.prototype.endCDATA=function(){},i.prototype.endDTD=function(){},i.prototype.endEntity=function(){},i.prototype.startCDATA=function(){},i.prototype.startDTD=function(){},i.prototype.startEntity=function(){},n.TreeParser=r},{}],12:[function(e,t,n){t.exports={"Aacute;":"Á",Aacute:"Á","aacute;":"á",aacute:"á","Abreve;":"Ă","abreve;":"ă","ac;":"∾","acd;":"∿","acE;":"∾̳","Acirc;":"Â",Acirc:"Â","acirc;":"â",acirc:"â","acute;":"´",acute:"´","Acy;":"А","acy;":"а","AElig;":"Æ",AElig:"Æ","aelig;":"æ",aelig:"æ","af;":"⁡","Afr;":"𝔄","afr;":"𝔞","Agrave;":"À",Agrave:"À","agrave;":"à",agrave:"à","alefsym;":"ℵ","aleph;":"ℵ","Alpha;":"Α","alpha;":"α","Amacr;":"Ā","amacr;":"ā","amalg;":"⨿","amp;":"&",amp:"&","AMP;":"&",AMP:"&","andand;":"⩕","And;":"⩓","and;":"∧","andd;":"⩜","andslope;":"⩘","andv;":"⩚","ang;":"∠","ange;":"⦤","angle;":"∠","angmsdaa;":"⦨","angmsdab;":"⦩","angmsdac;":"⦪","angmsdad;":"⦫","angmsdae;":"⦬","angmsdaf;":"⦭","angmsdag;":"⦮","angmsdah;":"⦯","angmsd;":"∡","angrt;":"∟","angrtvb;":"⊾","angrtvbd;":"⦝","angsph;":"∢","angst;":"Å","angzarr;":"⍼","Aogon;":"Ą","aogon;":"ą","Aopf;":"𝔸","aopf;":"𝕒","apacir;":"⩯","ap;":"≈","apE;":"⩰","ape;":"≊","apid;":"≋","apos;":"'","ApplyFunction;":"⁡","approx;":"≈","approxeq;":"≊","Aring;":"Å",Aring:"Å","aring;":"å",aring:"å","Ascr;":"𝒜","ascr;":"𝒶","Assign;":"≔","ast;":"*","asymp;":"≈","asympeq;":"≍","Atilde;":"Ã",Atilde:"Ã","atilde;":"ã",atilde:"ã","Auml;":"Ä",Auml:"Ä","auml;":"ä",auml:"ä","awconint;":"∳","awint;":"⨑","backcong;":"≌","backepsilon;":"϶","backprime;":"‵","backsim;":"∽","backsimeq;":"⋍","Backslash;":"∖","Barv;":"⫧","barvee;":"⊽","barwed;":"⌅","Barwed;":"⌆","barwedge;":"⌅","bbrk;":"⎵","bbrktbrk;":"⎶","bcong;":"≌","Bcy;":"Б","bcy;":"б","bdquo;":"„","becaus;":"∵","because;":"∵","Because;":"∵","bemptyv;":"⦰","bepsi;":"϶","bernou;":"ℬ","Bernoullis;":"ℬ","Beta;":"Β","beta;":"β","beth;":"ℶ","between;":"≬","Bfr;":"𝔅","bfr;":"𝔟","bigcap;":"⋂","bigcirc;":"◯","bigcup;":"⋃","bigodot;":"⨀","bigoplus;":"⨁","bigotimes;":"⨂","bigsqcup;":"⨆","bigstar;":"★","bigtriangledown;":"▽","bigtriangleup;":"△","biguplus;":"⨄","bigvee;":"⋁","bigwedge;":"⋀","bkarow;":"⤍","blacklozenge;":"⧫","blacksquare;":"▪","blacktriangle;":"▴","blacktriangledown;":"▾","blacktriangleleft;":"◂","blacktriangleright;":"▸","blank;":"␣","blk12;":"▒","blk14;":"░","blk34;":"▓","block;":"█","bne;":"=⃥","bnequiv;":"≡⃥","bNot;":"⫭","bnot;":"⌐","Bopf;":"𝔹","bopf;":"𝕓","bot;":"⊥","bottom;":"⊥","bowtie;":"⋈","boxbox;":"⧉","boxdl;":"┐","boxdL;":"╕","boxDl;":"╖","boxDL;":"╗","boxdr;":"┌","boxdR;":"╒","boxDr;":"╓","boxDR;":"╔","boxh;":"─","boxH;":"═","boxhd;":"┬","boxHd;":"╤","boxhD;":"╥","boxHD;":"╦","boxhu;":"┴","boxHu;":"╧","boxhU;":"╨","boxHU;":"╩","boxminus;":"⊟","boxplus;":"⊞","boxtimes;":"⊠","boxul;":"┘","boxuL;":"╛","boxUl;":"╜","boxUL;":"╝","boxur;":"└","boxuR;":"╘","boxUr;":"╙","boxUR;":"╚","boxv;":"│","boxV;":"║","boxvh;":"┼","boxvH;":"╪","boxVh;":"╫","boxVH;":"╬","boxvl;":"┤","boxvL;":"╡","boxVl;":"╢","boxVL;":"╣","boxvr;":"├","boxvR;":"╞","boxVr;":"╟","boxVR;":"╠","bprime;":"‵","breve;":"˘","Breve;":"˘","brvbar;":"¦",brvbar:"¦","bscr;":"𝒷","Bscr;":"ℬ","bsemi;":"⁏","bsim;":"∽","bsime;":"⋍","bsolb;":"⧅","bsol;":"\\","bsolhsub;":"⟈","bull;":"•","bullet;":"•","bump;":"≎","bumpE;":"⪮","bumpe;":"≏","Bumpeq;":"≎","bumpeq;":"≏","Cacute;":"Ć","cacute;":"ć","capand;":"⩄","capbrcup;":"⩉","capcap;":"⩋","cap;":"∩","Cap;":"⋒","capcup;":"⩇","capdot;":"⩀","CapitalDifferentialD;":"ⅅ","caps;":"∩︀","caret;":"⁁","caron;":"ˇ","Cayleys;":"ℭ","ccaps;":"⩍","Ccaron;":"Č","ccaron;":"č","Ccedil;":"Ç",Ccedil:"Ç","ccedil;":"ç",ccedil:"ç","Ccirc;":"Ĉ","ccirc;":"ĉ","Cconint;":"∰","ccups;":"⩌","ccupssm;":"⩐","Cdot;":"Ċ","cdot;":"ċ","cedil;":"¸",cedil:"¸","Cedilla;":"¸","cemptyv;":"⦲","cent;":"¢",cent:"¢","centerdot;":"·","CenterDot;":"·","cfr;":"𝔠","Cfr;":"ℭ","CHcy;":"Ч","chcy;":"ч","check;":"✓","checkmark;":"✓","Chi;":"Χ","chi;":"χ","circ;":"ˆ","circeq;":"≗","circlearrowleft;":"↺","circlearrowright;":"↻","circledast;":"⊛","circledcirc;":"⊚","circleddash;":"⊝","CircleDot;":"⊙","circledR;":"®","circledS;":"Ⓢ","CircleMinus;":"⊖","CirclePlus;":"⊕","CircleTimes;":"⊗","cir;":"○","cirE;":"⧃","cire;":"≗","cirfnint;":"⨐","cirmid;":"⫯","cirscir;":"⧂","ClockwiseContourIntegral;":"∲","CloseCurlyDoubleQuote;":"”","CloseCurlyQuote;":"’","clubs;":"♣","clubsuit;":"♣","colon;":":","Colon;":"∷","Colone;":"⩴","colone;":"≔","coloneq;":"≔","comma;":",","commat;":"@","comp;":"∁","compfn;":"∘","complement;":"∁","complexes;":"ℂ","cong;":"≅","congdot;":"⩭","Congruent;":"≡","conint;":"∮","Conint;":"∯","ContourIntegral;":"∮","copf;":"𝕔","Copf;":"ℂ","coprod;":"∐","Coproduct;":"∐","copy;":"©",copy:"©","COPY;":"©",COPY:"©","copysr;":"℗","CounterClockwiseContourIntegral;":"∳","crarr;":"↵","cross;":"✗","Cross;":"⨯","Cscr;":"𝒞","cscr;":"𝒸","csub;":"⫏","csube;":"⫑","csup;":"⫐","csupe;":"⫒","ctdot;":"⋯","cudarrl;":"⤸","cudarrr;":"⤵","cuepr;":"⋞","cuesc;":"⋟","cularr;":"↶","cularrp;":"⤽","cupbrcap;":"⩈","cupcap;":"⩆","CupCap;":"≍","cup;":"∪","Cup;":"⋓","cupcup;":"⩊","cupdot;":"⊍","cupor;":"⩅","cups;":"∪︀","curarr;":"↷","curarrm;":"⤼","curlyeqprec;":"⋞","curlyeqsucc;":"⋟","curlyvee;":"⋎","curlywedge;":"⋏","curren;":"¤",curren:"¤","curvearrowleft;":"↶","curvearrowright;":"↷","cuvee;":"⋎","cuwed;":"⋏","cwconint;":"∲","cwint;":"∱","cylcty;":"⌭","dagger;":"†","Dagger;":"‡","daleth;":"ℸ","darr;":"↓","Darr;":"↡","dArr;":"⇓","dash;":"‐","Dashv;":"⫤","dashv;":"⊣","dbkarow;":"⤏","dblac;":"˝","Dcaron;":"Ď","dcaron;":"ď","Dcy;":"Д","dcy;":"д","ddagger;":"‡","ddarr;":"⇊","DD;":"ⅅ","dd;":"ⅆ","DDotrahd;":"⤑","ddotseq;":"⩷","deg;":"°",deg:"°","Del;":"∇","Delta;":"Δ","delta;":"δ","demptyv;":"⦱","dfisht;":"⥿","Dfr;":"𝔇","dfr;":"𝔡","dHar;":"⥥","dharl;":"⇃","dharr;":"⇂","DiacriticalAcute;":"´","DiacriticalDot;":"˙","DiacriticalDoubleAcute;":"˝","DiacriticalGrave;":"`","DiacriticalTilde;":"˜","diam;":"⋄","diamond;":"⋄","Diamond;":"⋄","diamondsuit;":"♦","diams;":"♦","die;":"¨","DifferentialD;":"ⅆ","digamma;":"ϝ","disin;":"⋲","div;":"÷","divide;":"÷",divide:"÷","divideontimes;":"⋇","divonx;":"⋇","DJcy;":"Ђ","djcy;":"ђ","dlcorn;":"⌞","dlcrop;":"⌍","dollar;":"$","Dopf;":"𝔻","dopf;":"𝕕","Dot;":"¨","dot;":"˙","DotDot;":"⃜","doteq;":"≐","doteqdot;":"≑","DotEqual;":"≐","dotminus;":"∸","dotplus;":"∔","dotsquare;":"⊡","doublebarwedge;":"⌆","DoubleContourIntegral;":"∯","DoubleDot;":"¨","DoubleDownArrow;":"⇓","DoubleLeftArrow;":"⇐","DoubleLeftRightArrow;":"⇔","DoubleLeftTee;":"⫤","DoubleLongLeftArrow;":"⟸","DoubleLongLeftRightArrow;":"⟺","DoubleLongRightArrow;":"⟹","DoubleRightArrow;":"⇒","DoubleRightTee;":"⊨","DoubleUpArrow;":"⇑","DoubleUpDownArrow;":"⇕","DoubleVerticalBar;":"∥","DownArrowBar;":"⤓","downarrow;":"↓","DownArrow;":"↓","Downarrow;":"⇓","DownArrowUpArrow;":"⇵","DownBreve;":"̑","downdownarrows;":"⇊","downharpoonleft;":"⇃","downharpoonright;":"⇂","DownLeftRightVector;":"⥐","DownLeftTeeVector;":"⥞","DownLeftVectorBar;":"⥖","DownLeftVector;":"↽","DownRightTeeVector;":"⥟","DownRightVectorBar;":"⥗","DownRightVector;":"⇁","DownTeeArrow;":"↧","DownTee;":"⊤","drbkarow;":"⤐","drcorn;":"⌟","drcrop;":"⌌","Dscr;":"𝒟","dscr;":"𝒹","DScy;":"Ѕ","dscy;":"ѕ","dsol;":"⧶","Dstrok;":"Đ","dstrok;":"đ","dtdot;":"⋱","dtri;":"▿","dtrif;":"▾","duarr;":"⇵","duhar;":"⥯","dwangle;":"⦦","DZcy;":"Џ","dzcy;":"џ","dzigrarr;":"⟿","Eacute;":"É",Eacute:"É","eacute;":"é",eacute:"é","easter;":"⩮","Ecaron;":"Ě","ecaron;":"ě","Ecirc;":"Ê",Ecirc:"Ê","ecirc;":"ê",ecirc:"ê","ecir;":"≖","ecolon;":"≕","Ecy;":"Э","ecy;":"э","eDDot;":"⩷","Edot;":"Ė","edot;":"ė","eDot;":"≑","ee;":"ⅇ","efDot;":"≒","Efr;":"𝔈","efr;":"𝔢","eg;":"⪚","Egrave;":"È",Egrave:"È","egrave;":"è",egrave:"è","egs;":"⪖","egsdot;":"⪘","el;":"⪙","Element;":"∈","elinters;":"⏧","ell;":"ℓ","els;":"⪕","elsdot;":"⪗","Emacr;":"Ē","emacr;":"ē","empty;":"∅","emptyset;":"∅","EmptySmallSquare;":"◻","emptyv;":"∅","EmptyVerySmallSquare;":"▫","emsp13;":" ","emsp14;":" ","emsp;":" ","ENG;":"Ŋ","eng;":"ŋ","ensp;":" ","Eogon;":"Ę","eogon;":"ę","Eopf;":"𝔼","eopf;":"𝕖","epar;":"⋕","eparsl;":"⧣","eplus;":"⩱","epsi;":"ε","Epsilon;":"Ε","epsilon;":"ε","epsiv;":"ϵ","eqcirc;":"≖","eqcolon;":"≕","eqsim;":"≂","eqslantgtr;":"⪖","eqslantless;":"⪕","Equal;":"⩵","equals;":"=","EqualTilde;":"≂","equest;":"≟","Equilibrium;":"⇌","equiv;":"≡","equivDD;":"⩸","eqvparsl;":"⧥","erarr;":"⥱","erDot;":"≓","escr;":"ℯ","Escr;":"ℰ","esdot;":"≐","Esim;":"⩳","esim;":"≂","Eta;":"Η","eta;":"η","ETH;":"Ð",ETH:"Ð","eth;":"ð",eth:"ð","Euml;":"Ë",Euml:"Ë","euml;":"ë",euml:"ë","euro;":"€","excl;":"!","exist;":"∃","Exists;":"∃","expectation;":"ℰ","exponentiale;":"ⅇ","ExponentialE;":"ⅇ","fallingdotseq;":"≒","Fcy;":"Ф","fcy;":"ф","female;":"♀","ffilig;":"ffi","fflig;":"ff","ffllig;":"ffl","Ffr;":"𝔉","ffr;":"𝔣","filig;":"fi","FilledSmallSquare;":"◼","FilledVerySmallSquare;":"▪","fjlig;":"fj","flat;":"♭","fllig;":"fl","fltns;":"▱","fnof;":"ƒ","Fopf;":"𝔽","fopf;":"𝕗","forall;":"∀","ForAll;":"∀","fork;":"⋔","forkv;":"⫙","Fouriertrf;":"ℱ","fpartint;":"⨍","frac12;":"½",frac12:"½","frac13;":"⅓","frac14;":"¼",frac14:"¼","frac15;":"⅕","frac16;":"⅙","frac18;":"⅛","frac23;":"⅔","frac25;":"⅖","frac34;":"¾",frac34:"¾","frac35;":"⅗","frac38;":"⅜","frac45;":"⅘","frac56;":"⅚","frac58;":"⅝","frac78;":"⅞","frasl;":"⁄","frown;":"⌢","fscr;":"𝒻","Fscr;":"ℱ","gacute;":"ǵ","Gamma;":"Γ","gamma;":"γ","Gammad;":"Ϝ","gammad;":"ϝ","gap;":"⪆","Gbreve;":"Ğ","gbreve;":"ğ","Gcedil;":"Ģ","Gcirc;":"Ĝ","gcirc;":"ĝ","Gcy;":"Г","gcy;":"г","Gdot;":"Ġ","gdot;":"ġ","ge;":"≥","gE;":"≧","gEl;":"⪌","gel;":"⋛","geq;":"≥","geqq;":"≧","geqslant;":"⩾","gescc;":"⪩","ges;":"⩾","gesdot;":"⪀","gesdoto;":"⪂","gesdotol;":"⪄","gesl;":"⋛︀","gesles;":"⪔","Gfr;":"𝔊","gfr;":"𝔤","gg;":"≫","Gg;":"⋙","ggg;":"⋙","gimel;":"ℷ","GJcy;":"Ѓ","gjcy;":"ѓ","gla;":"⪥","gl;":"≷","glE;":"⪒","glj;":"⪤","gnap;":"⪊","gnapprox;":"⪊","gne;":"⪈","gnE;":"≩","gneq;":"⪈","gneqq;":"≩","gnsim;":"⋧","Gopf;":"𝔾","gopf;":"𝕘","grave;":"`","GreaterEqual;":"≥","GreaterEqualLess;":"⋛","GreaterFullEqual;":"≧","GreaterGreater;":"⪢","GreaterLess;":"≷","GreaterSlantEqual;":"⩾","GreaterTilde;":"≳","Gscr;":"𝒢","gscr;":"ℊ","gsim;":"≳","gsime;":"⪎","gsiml;":"⪐","gtcc;":"⪧","gtcir;":"⩺","gt;":">",gt:">","GT;":">",GT:">","Gt;":"≫","gtdot;":"⋗","gtlPar;":"⦕","gtquest;":"⩼","gtrapprox;":"⪆","gtrarr;":"⥸","gtrdot;":"⋗","gtreqless;":"⋛","gtreqqless;":"⪌","gtrless;":"≷","gtrsim;":"≳","gvertneqq;":"≩︀","gvnE;":"≩︀","Hacek;":"ˇ","hairsp;":" ","half;":"½","hamilt;":"ℋ","HARDcy;":"Ъ","hardcy;":"ъ","harrcir;":"⥈","harr;":"↔","hArr;":"⇔","harrw;":"↭","Hat;":"^","hbar;":"ℏ","Hcirc;":"Ĥ","hcirc;":"ĥ","hearts;":"♥","heartsuit;":"♥","hellip;":"…","hercon;":"⊹","hfr;":"𝔥","Hfr;":"ℌ","HilbertSpace;":"ℋ","hksearow;":"⤥","hkswarow;":"⤦","hoarr;":"⇿","homtht;":"∻","hookleftarrow;":"↩","hookrightarrow;":"↪","hopf;":"𝕙","Hopf;":"ℍ","horbar;":"―","HorizontalLine;":"─","hscr;":"𝒽","Hscr;":"ℋ","hslash;":"ℏ","Hstrok;":"Ħ","hstrok;":"ħ","HumpDownHump;":"≎","HumpEqual;":"≏","hybull;":"⁃","hyphen;":"‐","Iacute;":"Í",Iacute:"Í","iacute;":"í",iacute:"í","ic;":"⁣","Icirc;":"Î",Icirc:"Î","icirc;":"î",icirc:"î","Icy;":"И","icy;":"и","Idot;":"İ","IEcy;":"Е","iecy;":"е","iexcl;":"¡",iexcl:"¡","iff;":"⇔","ifr;":"𝔦","Ifr;":"ℑ","Igrave;":"Ì",Igrave:"Ì","igrave;":"ì",igrave:"ì","ii;":"ⅈ","iiiint;":"⨌","iiint;":"∭","iinfin;":"⧜","iiota;":"℩","IJlig;":"IJ","ijlig;":"ij","Imacr;":"Ī","imacr;":"ī","image;":"ℑ","ImaginaryI;":"ⅈ","imagline;":"ℐ","imagpart;":"ℑ","imath;":"ı","Im;":"ℑ","imof;":"⊷","imped;":"Ƶ","Implies;":"⇒","incare;":"℅","in;":"∈","infin;":"∞","infintie;":"⧝","inodot;":"ı","intcal;":"⊺","int;":"∫","Int;":"∬","integers;":"ℤ","Integral;":"∫","intercal;":"⊺","Intersection;":"⋂","intlarhk;":"⨗","intprod;":"⨼","InvisibleComma;":"⁣","InvisibleTimes;":"⁢","IOcy;":"Ё","iocy;":"ё","Iogon;":"Į","iogon;":"į","Iopf;":"𝕀","iopf;":"𝕚","Iota;":"Ι","iota;":"ι","iprod;":"⨼","iquest;":"¿",iquest:"¿","iscr;":"𝒾","Iscr;":"ℐ","isin;":"∈","isindot;":"⋵","isinE;":"⋹","isins;":"⋴","isinsv;":"⋳","isinv;":"∈","it;":"⁢","Itilde;":"Ĩ","itilde;":"ĩ","Iukcy;":"І","iukcy;":"і","Iuml;":"Ï",Iuml:"Ï","iuml;":"ï",iuml:"ï","Jcirc;":"Ĵ","jcirc;":"ĵ","Jcy;":"Й","jcy;":"й","Jfr;":"𝔍","jfr;":"𝔧","jmath;":"ȷ","Jopf;":"𝕁","jopf;":"𝕛","Jscr;":"𝒥","jscr;":"𝒿","Jsercy;":"Ј","jsercy;":"ј","Jukcy;":"Є","jukcy;":"є","Kappa;":"Κ","kappa;":"κ","kappav;":"ϰ","Kcedil;":"Ķ","kcedil;":"ķ","Kcy;":"К","kcy;":"к","Kfr;":"𝔎","kfr;":"𝔨","kgreen;":"ĸ","KHcy;":"Х","khcy;":"х","KJcy;":"Ќ","kjcy;":"ќ","Kopf;":"𝕂","kopf;":"𝕜","Kscr;":"𝒦","kscr;":"𝓀","lAarr;":"⇚","Lacute;":"Ĺ","lacute;":"ĺ","laemptyv;":"⦴","lagran;":"ℒ","Lambda;":"Λ","lambda;":"λ","lang;":"⟨","Lang;":"⟪","langd;":"⦑","langle;":"⟨","lap;":"⪅","Laplacetrf;":"ℒ","laquo;":"«",laquo:"«","larrb;":"⇤","larrbfs;":"⤟","larr;":"←","Larr;":"↞","lArr;":"⇐","larrfs;":"⤝","larrhk;":"↩","larrlp;":"↫","larrpl;":"⤹","larrsim;":"⥳","larrtl;":"↢","latail;":"⤙","lAtail;":"⤛","lat;":"⪫","late;":"⪭","lates;":"⪭︀","lbarr;":"⤌","lBarr;":"⤎","lbbrk;":"❲","lbrace;":"{","lbrack;":"[","lbrke;":"⦋","lbrksld;":"⦏","lbrkslu;":"⦍","Lcaron;":"Ľ","lcaron;":"ľ","Lcedil;":"Ļ","lcedil;":"ļ","lceil;":"⌈","lcub;":"{","Lcy;":"Л","lcy;":"л","ldca;":"⤶","ldquo;":"“","ldquor;":"„","ldrdhar;":"⥧","ldrushar;":"⥋","ldsh;":"↲","le;":"≤","lE;":"≦","LeftAngleBracket;":"⟨","LeftArrowBar;":"⇤","leftarrow;":"←","LeftArrow;":"←","Leftarrow;":"⇐","LeftArrowRightArrow;":"⇆","leftarrowtail;":"↢","LeftCeiling;":"⌈","LeftDoubleBracket;":"⟦","LeftDownTeeVector;":"⥡","LeftDownVectorBar;":"⥙","LeftDownVector;":"⇃","LeftFloor;":"⌊","leftharpoondown;":"↽","leftharpoonup;":"↼","leftleftarrows;":"⇇","leftrightarrow;":"↔","LeftRightArrow;":"↔","Leftrightarrow;":"⇔","leftrightarrows;":"⇆","leftrightharpoons;":"⇋","leftrightsquigarrow;":"↭","LeftRightVector;":"⥎","LeftTeeArrow;":"↤","LeftTee;":"⊣","LeftTeeVector;":"⥚","leftthreetimes;":"⋋","LeftTriangleBar;":"⧏","LeftTriangle;":"⊲","LeftTriangleEqual;":"⊴","LeftUpDownVector;":"⥑","LeftUpTeeVector;":"⥠","LeftUpVectorBar;":"⥘","LeftUpVector;":"↿","LeftVectorBar;":"⥒","LeftVector;":"↼","lEg;":"⪋","leg;":"⋚","leq;":"≤","leqq;":"≦","leqslant;":"⩽","lescc;":"⪨","les;":"⩽","lesdot;":"⩿","lesdoto;":"⪁","lesdotor;":"⪃","lesg;":"⋚︀","lesges;":"⪓","lessapprox;":"⪅","lessdot;":"⋖","lesseqgtr;":"⋚","lesseqqgtr;":"⪋","LessEqualGreater;":"⋚","LessFullEqual;":"≦","LessGreater;":"≶","lessgtr;":"≶","LessLess;":"⪡","lesssim;":"≲","LessSlantEqual;":"⩽","LessTilde;":"≲","lfisht;":"⥼","lfloor;":"⌊","Lfr;":"𝔏","lfr;":"𝔩","lg;":"≶","lgE;":"⪑","lHar;":"⥢","lhard;":"↽","lharu;":"↼","lharul;":"⥪","lhblk;":"▄","LJcy;":"Љ","ljcy;":"љ","llarr;":"⇇","ll;":"≪","Ll;":"⋘","llcorner;":"⌞","Lleftarrow;":"⇚","llhard;":"⥫","lltri;":"◺","Lmidot;":"Ŀ","lmidot;":"ŀ","lmoustache;":"⎰","lmoust;":"⎰","lnap;":"⪉","lnapprox;":"⪉","lne;":"⪇","lnE;":"≨","lneq;":"⪇","lneqq;":"≨","lnsim;":"⋦","loang;":"⟬","loarr;":"⇽","lobrk;":"⟦","longleftarrow;":"⟵","LongLeftArrow;":"⟵","Longleftarrow;":"⟸","longleftrightarrow;":"⟷","LongLeftRightArrow;":"⟷","Longleftrightarrow;":"⟺","longmapsto;":"⟼","longrightarrow;":"⟶","LongRightArrow;":"⟶","Longrightarrow;":"⟹","looparrowleft;":"↫","looparrowright;":"↬","lopar;":"⦅","Lopf;":"𝕃","lopf;":"𝕝","loplus;":"⨭","lotimes;":"⨴","lowast;":"∗","lowbar;":"_","LowerLeftArrow;":"↙","LowerRightArrow;":"↘","loz;":"◊","lozenge;":"◊","lozf;":"⧫","lpar;":"(","lparlt;":"⦓","lrarr;":"⇆","lrcorner;":"⌟","lrhar;":"⇋","lrhard;":"⥭","lrm;":"‎","lrtri;":"⊿","lsaquo;":"‹","lscr;":"𝓁","Lscr;":"ℒ","lsh;":"↰","Lsh;":"↰","lsim;":"≲","lsime;":"⪍","lsimg;":"⪏","lsqb;":"[","lsquo;":"‘","lsquor;":"‚","Lstrok;":"Ł","lstrok;":"ł","ltcc;":"⪦","ltcir;":"⩹","lt;":"<",lt:"<","LT;":"<",LT:"<","Lt;":"≪","ltdot;":"⋖","lthree;":"⋋","ltimes;":"⋉","ltlarr;":"⥶","ltquest;":"⩻","ltri;":"◃","ltrie;":"⊴","ltrif;":"◂","ltrPar;":"⦖","lurdshar;":"⥊","luruhar;":"⥦","lvertneqq;":"≨︀","lvnE;":"≨︀","macr;":"¯",macr:"¯","male;":"♂","malt;":"✠","maltese;":"✠","Map;":"⤅","map;":"↦","mapsto;":"↦","mapstodown;":"↧","mapstoleft;":"↤","mapstoup;":"↥","marker;":"▮","mcomma;":"⨩","Mcy;":"М","mcy;":"м","mdash;":"—","mDDot;":"∺","measuredangle;":"∡","MediumSpace;":" ","Mellintrf;":"ℳ","Mfr;":"𝔐","mfr;":"𝔪","mho;":"℧","micro;":"µ",micro:"µ","midast;":"*","midcir;":"⫰","mid;":"∣","middot;":"·",middot:"·","minusb;":"⊟","minus;":"−","minusd;":"∸","minusdu;":"⨪","MinusPlus;":"∓","mlcp;":"⫛","mldr;":"…","mnplus;":"∓","models;":"⊧","Mopf;":"𝕄","mopf;":"𝕞","mp;":"∓","mscr;":"𝓂","Mscr;":"ℳ","mstpos;":"∾","Mu;":"Μ","mu;":"μ","multimap;":"⊸","mumap;":"⊸","nabla;":"∇","Nacute;":"Ń","nacute;":"ń","nang;":"∠⃒","nap;":"≉","napE;":"⩰̸","napid;":"≋̸","napos;":"ʼn","napprox;":"≉","natural;":"♮","naturals;":"ℕ","natur;":"♮","nbsp;":" ",nbsp:" ","nbump;":"≎̸","nbumpe;":"≏̸","ncap;":"⩃","Ncaron;":"Ň","ncaron;":"ň","Ncedil;":"Ņ","ncedil;":"ņ","ncong;":"≇","ncongdot;":"⩭̸","ncup;":"⩂","Ncy;":"Н","ncy;":"н","ndash;":"–","nearhk;":"⤤","nearr;":"↗","neArr;":"⇗","nearrow;":"↗","ne;":"≠","nedot;":"≐̸","NegativeMediumSpace;":"​","NegativeThickSpace;":"​","NegativeThinSpace;":"​","NegativeVeryThinSpace;":"​","nequiv;":"≢","nesear;":"⤨","nesim;":"≂̸","NestedGreaterGreater;":"≫","NestedLessLess;":"≪","NewLine;":"\n","nexist;":"∄","nexists;":"∄","Nfr;":"𝔑","nfr;":"𝔫","ngE;":"≧̸","nge;":"≱","ngeq;":"≱","ngeqq;":"≧̸","ngeqslant;":"⩾̸","nges;":"⩾̸","nGg;":"⋙̸","ngsim;":"≵","nGt;":"≫⃒","ngt;":"≯","ngtr;":"≯","nGtv;":"≫̸","nharr;":"↮","nhArr;":"⇎","nhpar;":"⫲","ni;":"∋","nis;":"⋼","nisd;":"⋺","niv;":"∋","NJcy;":"Њ","njcy;":"њ","nlarr;":"↚","nlArr;":"⇍","nldr;":"‥","nlE;":"≦̸","nle;":"≰","nleftarrow;":"↚","nLeftarrow;":"⇍","nleftrightarrow;":"↮","nLeftrightarrow;":"⇎","nleq;":"≰","nleqq;":"≦̸","nleqslant;":"⩽̸","nles;":"⩽̸","nless;":"≮","nLl;":"⋘̸","nlsim;":"≴","nLt;":"≪⃒","nlt;":"≮","nltri;":"⋪","nltrie;":"⋬","nLtv;":"≪̸","nmid;":"∤","NoBreak;":"⁠","NonBreakingSpace;":" ","nopf;":"𝕟","Nopf;":"ℕ","Not;":"⫬","not;":"¬",not:"¬","NotCongruent;":"≢","NotCupCap;":"≭","NotDoubleVerticalBar;":"∦","NotElement;":"∉","NotEqual;":"≠","NotEqualTilde;":"≂̸","NotExists;":"∄","NotGreater;":"≯","NotGreaterEqual;":"≱","NotGreaterFullEqual;":"≧̸","NotGreaterGreater;":"≫̸","NotGreaterLess;":"≹","NotGreaterSlantEqual;":"⩾̸","NotGreaterTilde;":"≵","NotHumpDownHump;":"≎̸","NotHumpEqual;":"≏̸","notin;":"∉","notindot;":"⋵̸","notinE;":"⋹̸","notinva;":"∉","notinvb;":"⋷","notinvc;":"⋶","NotLeftTriangleBar;":"⧏̸","NotLeftTriangle;":"⋪","NotLeftTriangleEqual;":"⋬","NotLess;":"≮","NotLessEqual;":"≰","NotLessGreater;":"≸","NotLessLess;":"≪̸","NotLessSlantEqual;":"⩽̸","NotLessTilde;":"≴","NotNestedGreaterGreater;":"⪢̸","NotNestedLessLess;":"⪡̸","notni;":"∌","notniva;":"∌","notnivb;":"⋾","notnivc;":"⋽","NotPrecedes;":"⊀","NotPrecedesEqual;":"⪯̸","NotPrecedesSlantEqual;":"⋠","NotReverseElement;":"∌","NotRightTriangleBar;":"⧐̸","NotRightTriangle;":"⋫","NotRightTriangleEqual;":"⋭","NotSquareSubset;":"⊏̸","NotSquareSubsetEqual;":"⋢","NotSquareSuperset;":"⊐̸","NotSquareSupersetEqual;":"⋣","NotSubset;":"⊂⃒","NotSubsetEqual;":"⊈","NotSucceeds;":"⊁","NotSucceedsEqual;":"⪰̸","NotSucceedsSlantEqual;":"⋡","NotSucceedsTilde;":"≿̸","NotSuperset;":"⊃⃒","NotSupersetEqual;":"⊉","NotTilde;":"≁","NotTildeEqual;":"≄","NotTildeFullEqual;":"≇","NotTildeTilde;":"≉","NotVerticalBar;":"∤","nparallel;":"∦","npar;":"∦","nparsl;":"⫽⃥","npart;":"∂̸","npolint;":"⨔","npr;":"⊀","nprcue;":"⋠","nprec;":"⊀","npreceq;":"⪯̸","npre;":"⪯̸","nrarrc;":"⤳̸","nrarr;":"↛","nrArr;":"⇏","nrarrw;":"↝̸","nrightarrow;":"↛","nRightarrow;":"⇏","nrtri;":"⋫","nrtrie;":"⋭","nsc;":"⊁","nsccue;":"⋡","nsce;":"⪰̸","Nscr;":"𝒩","nscr;":"𝓃","nshortmid;":"∤","nshortparallel;":"∦","nsim;":"≁","nsime;":"≄","nsimeq;":"≄","nsmid;":"∤","nspar;":"∦","nsqsube;":"⋢","nsqsupe;":"⋣","nsub;":"⊄","nsubE;":"⫅̸","nsube;":"⊈","nsubset;":"⊂⃒","nsubseteq;":"⊈","nsubseteqq;":"⫅̸","nsucc;":"⊁","nsucceq;":"⪰̸","nsup;":"⊅","nsupE;":"⫆̸","nsupe;":"⊉","nsupset;":"⊃⃒","nsupseteq;":"⊉","nsupseteqq;":"⫆̸","ntgl;":"≹","Ntilde;":"Ñ",Ntilde:"Ñ","ntilde;":"ñ",ntilde:"ñ","ntlg;":"≸","ntriangleleft;":"⋪","ntrianglelefteq;":"⋬","ntriangleright;":"⋫","ntrianglerighteq;":"⋭","Nu;":"Ν","nu;":"ν","num;":"#","numero;":"№","numsp;":" ","nvap;":"≍⃒","nvdash;":"⊬","nvDash;":"⊭","nVdash;":"⊮","nVDash;":"⊯","nvge;":"≥⃒","nvgt;":">⃒","nvHarr;":"⤄","nvinfin;":"⧞","nvlArr;":"⤂","nvle;":"≤⃒","nvlt;":"<⃒","nvltrie;":"⊴⃒","nvrArr;":"⤃","nvrtrie;":"⊵⃒","nvsim;":"∼⃒","nwarhk;":"⤣","nwarr;":"↖","nwArr;":"⇖","nwarrow;":"↖","nwnear;":"⤧","Oacute;":"Ó",Oacute:"Ó","oacute;":"ó",oacute:"ó","oast;":"⊛","Ocirc;":"Ô",Ocirc:"Ô","ocirc;":"ô",ocirc:"ô","ocir;":"⊚","Ocy;":"О","ocy;":"о","odash;":"⊝","Odblac;":"Ő","odblac;":"ő","odiv;":"⨸","odot;":"⊙","odsold;":"⦼","OElig;":"Œ","oelig;":"œ","ofcir;":"⦿","Ofr;":"𝔒","ofr;":"𝔬","ogon;":"˛","Ograve;":"Ò",Ograve:"Ò","ograve;":"ò",ograve:"ò","ogt;":"⧁","ohbar;":"⦵","ohm;":"Ω","oint;":"∮","olarr;":"↺","olcir;":"⦾","olcross;":"⦻","oline;":"‾","olt;":"⧀","Omacr;":"Ō","omacr;":"ō","Omega;":"Ω","omega;":"ω","Omicron;":"Ο","omicron;":"ο","omid;":"⦶","ominus;":"⊖","Oopf;":"𝕆","oopf;":"𝕠","opar;":"⦷","OpenCurlyDoubleQuote;":"“","OpenCurlyQuote;":"‘","operp;":"⦹","oplus;":"⊕","orarr;":"↻","Or;":"⩔","or;":"∨","ord;":"⩝","order;":"ℴ","orderof;":"ℴ","ordf;":"ª",ordf:"ª","ordm;":"º",ordm:"º","origof;":"⊶","oror;":"⩖","orslope;":"⩗","orv;":"⩛","oS;":"Ⓢ","Oscr;":"𝒪","oscr;":"ℴ","Oslash;":"Ø",Oslash:"Ø","oslash;":"ø",oslash:"ø","osol;":"⊘","Otilde;":"Õ",Otilde:"Õ","otilde;":"õ",otilde:"õ","otimesas;":"⨶","Otimes;":"⨷","otimes;":"⊗","Ouml;":"Ö",Ouml:"Ö","ouml;":"ö",ouml:"ö","ovbar;":"⌽","OverBar;":"‾","OverBrace;":"⏞","OverBracket;":"⎴","OverParenthesis;":"⏜","para;":"¶",para:"¶","parallel;":"∥","par;":"∥","parsim;":"⫳","parsl;":"⫽","part;":"∂","PartialD;":"∂","Pcy;":"П","pcy;":"п","percnt;":"%","period;":".","permil;":"‰","perp;":"⊥","pertenk;":"‱","Pfr;":"𝔓","pfr;":"𝔭","Phi;":"Φ","phi;":"φ","phiv;":"ϕ","phmmat;":"ℳ","phone;":"☎","Pi;":"Π","pi;":"π","pitchfork;":"⋔","piv;":"ϖ","planck;":"ℏ","planckh;":"ℎ","plankv;":"ℏ","plusacir;":"⨣","plusb;":"⊞","pluscir;":"⨢","plus;":"+","plusdo;":"∔","plusdu;":"⨥","pluse;":"⩲","PlusMinus;":"±","plusmn;":"±",plusmn:"±","plussim;":"⨦","plustwo;":"⨧","pm;":"±","Poincareplane;":"ℌ","pointint;":"⨕","popf;":"𝕡","Popf;":"ℙ","pound;":"£",pound:"£","prap;":"⪷","Pr;":"⪻","pr;":"≺","prcue;":"≼","precapprox;":"⪷","prec;":"≺","preccurlyeq;":"≼","Precedes;":"≺","PrecedesEqual;":"⪯","PrecedesSlantEqual;":"≼","PrecedesTilde;":"≾","preceq;":"⪯","precnapprox;":"⪹","precneqq;":"⪵","precnsim;":"⋨","pre;":"⪯","prE;":"⪳","precsim;":"≾","prime;":"′","Prime;":"″","primes;":"ℙ","prnap;":"⪹","prnE;":"⪵","prnsim;":"⋨","prod;":"∏","Product;":"∏","profalar;":"⌮","profline;":"⌒","profsurf;":"⌓","prop;":"∝","Proportional;":"∝","Proportion;":"∷","propto;":"∝","prsim;":"≾","prurel;":"⊰","Pscr;":"𝒫","pscr;":"𝓅","Psi;":"Ψ","psi;":"ψ","puncsp;":" ","Qfr;":"𝔔","qfr;":"𝔮","qint;":"⨌","qopf;":"𝕢","Qopf;":"ℚ","qprime;":"⁗","Qscr;":"𝒬","qscr;":"𝓆","quaternions;":"ℍ","quatint;":"⨖","quest;":"?","questeq;":"≟","quot;":'"',quot:'"',"QUOT;":'"',QUOT:'"',"rAarr;":"⇛","race;":"∽̱","Racute;":"Ŕ","racute;":"ŕ","radic;":"√","raemptyv;":"⦳","rang;":"⟩","Rang;":"⟫","rangd;":"⦒","range;":"⦥","rangle;":"⟩","raquo;":"»",raquo:"»","rarrap;":"⥵","rarrb;":"⇥","rarrbfs;":"⤠","rarrc;":"⤳","rarr;":"→","Rarr;":"↠","rArr;":"⇒","rarrfs;":"⤞","rarrhk;":"↪","rarrlp;":"↬","rarrpl;":"⥅","rarrsim;":"⥴","Rarrtl;":"⤖","rarrtl;":"↣","rarrw;":"↝","ratail;":"⤚","rAtail;":"⤜","ratio;":"∶","rationals;":"ℚ","rbarr;":"⤍","rBarr;":"⤏","RBarr;":"⤐","rbbrk;":"❳","rbrace;":"}","rbrack;":"]","rbrke;":"⦌","rbrksld;":"⦎","rbrkslu;":"⦐","Rcaron;":"Ř","rcaron;":"ř","Rcedil;":"Ŗ","rcedil;":"ŗ","rceil;":"⌉","rcub;":"}","Rcy;":"Р","rcy;":"р","rdca;":"⤷","rdldhar;":"⥩","rdquo;":"”","rdquor;":"”","rdsh;":"↳","real;":"ℜ","realine;":"ℛ","realpart;":"ℜ","reals;":"ℝ","Re;":"ℜ","rect;":"▭","reg;":"®",reg:"®","REG;":"®",REG:"®","ReverseElement;":"∋","ReverseEquilibrium;":"⇋","ReverseUpEquilibrium;":"⥯","rfisht;":"⥽","rfloor;":"⌋","rfr;":"𝔯","Rfr;":"ℜ","rHar;":"⥤","rhard;":"⇁","rharu;":"⇀","rharul;":"⥬","Rho;":"Ρ","rho;":"ρ","rhov;":"ϱ","RightAngleBracket;":"⟩","RightArrowBar;":"⇥","rightarrow;":"→","RightArrow;":"→","Rightarrow;":"⇒","RightArrowLeftArrow;":"⇄","rightarrowtail;":"↣","RightCeiling;":"⌉","RightDoubleBracket;":"⟧","RightDownTeeVector;":"⥝","RightDownVectorBar;":"⥕","RightDownVector;":"⇂","RightFloor;":"⌋","rightharpoondown;":"⇁","rightharpoonup;":"⇀","rightleftarrows;":"⇄","rightleftharpoons;":"⇌","rightrightarrows;":"⇉","rightsquigarrow;":"↝","RightTeeArrow;":"↦","RightTee;":"⊢","RightTeeVector;":"⥛","rightthreetimes;":"⋌","RightTriangleBar;":"⧐","RightTriangle;":"⊳","RightTriangleEqual;":"⊵","RightUpDownVector;":"⥏","RightUpTeeVector;":"⥜","RightUpVectorBar;":"⥔","RightUpVector;":"↾","RightVectorBar;":"⥓","RightVector;":"⇀","ring;":"˚","risingdotseq;":"≓","rlarr;":"⇄","rlhar;":"⇌","rlm;":"‏","rmoustache;":"⎱","rmoust;":"⎱","rnmid;":"⫮","roang;":"⟭","roarr;":"⇾","robrk;":"⟧","ropar;":"⦆","ropf;":"𝕣","Ropf;":"ℝ","roplus;":"⨮","rotimes;":"⨵","RoundImplies;":"⥰","rpar;":")","rpargt;":"⦔","rppolint;":"⨒","rrarr;":"⇉","Rrightarrow;":"⇛","rsaquo;":"›","rscr;":"𝓇","Rscr;":"ℛ","rsh;":"↱","Rsh;":"↱","rsqb;":"]","rsquo;":"’","rsquor;":"’","rthree;":"⋌","rtimes;":"⋊","rtri;":"▹","rtrie;":"⊵","rtrif;":"▸","rtriltri;":"⧎","RuleDelayed;":"⧴","ruluhar;":"⥨","rx;":"℞","Sacute;":"Ś","sacute;":"ś","sbquo;":"‚","scap;":"⪸","Scaron;":"Š","scaron;":"š","Sc;":"⪼","sc;":"≻","sccue;":"≽","sce;":"⪰","scE;":"⪴","Scedil;":"Ş","scedil;":"ş","Scirc;":"Ŝ","scirc;":"ŝ","scnap;":"⪺","scnE;":"⪶","scnsim;":"⋩","scpolint;":"⨓","scsim;":"≿","Scy;":"С","scy;":"с","sdotb;":"⊡","sdot;":"⋅","sdote;":"⩦","searhk;":"⤥","searr;":"↘","seArr;":"⇘","searrow;":"↘","sect;":"§",sect:"§","semi;":";","seswar;":"⤩","setminus;":"∖","setmn;":"∖","sext;":"✶","Sfr;":"𝔖","sfr;":"𝔰","sfrown;":"⌢","sharp;":"♯","SHCHcy;":"Щ","shchcy;":"щ","SHcy;":"Ш","shcy;":"ш","ShortDownArrow;":"↓","ShortLeftArrow;":"←","shortmid;":"∣","shortparallel;":"∥","ShortRightArrow;":"→","ShortUpArrow;":"↑","shy;":"­",shy:"­","Sigma;":"Σ","sigma;":"σ","sigmaf;":"ς","sigmav;":"ς","sim;":"∼","simdot;":"⩪","sime;":"≃","simeq;":"≃","simg;":"⪞","simgE;":"⪠","siml;":"⪝","simlE;":"⪟","simne;":"≆","simplus;":"⨤","simrarr;":"⥲","slarr;":"←","SmallCircle;":"∘","smallsetminus;":"∖","smashp;":"⨳","smeparsl;":"⧤","smid;":"∣","smile;":"⌣","smt;":"⪪","smte;":"⪬","smtes;":"⪬︀","SOFTcy;":"Ь","softcy;":"ь","solbar;":"⌿","solb;":"⧄","sol;":"/","Sopf;":"𝕊","sopf;":"𝕤","spades;":"♠","spadesuit;":"♠","spar;":"∥","sqcap;":"⊓","sqcaps;":"⊓︀","sqcup;":"⊔","sqcups;":"⊔︀","Sqrt;":"√","sqsub;":"⊏","sqsube;":"⊑","sqsubset;":"⊏","sqsubseteq;":"⊑","sqsup;":"⊐","sqsupe;":"⊒","sqsupset;":"⊐","sqsupseteq;":"⊒","square;":"□","Square;":"□","SquareIntersection;":"⊓","SquareSubset;":"⊏","SquareSubsetEqual;":"⊑","SquareSuperset;":"⊐","SquareSupersetEqual;":"⊒","SquareUnion;":"⊔","squarf;":"▪","squ;":"□","squf;":"▪","srarr;":"→","Sscr;":"𝒮","sscr;":"𝓈","ssetmn;":"∖","ssmile;":"⌣","sstarf;":"⋆","Star;":"⋆","star;":"☆","starf;":"★","straightepsilon;":"ϵ","straightphi;":"ϕ","strns;":"¯","sub;":"⊂","Sub;":"⋐","subdot;":"⪽","subE;":"⫅","sube;":"⊆","subedot;":"⫃","submult;":"⫁","subnE;":"⫋","subne;":"⊊","subplus;":"⪿","subrarr;":"⥹","subset;":"⊂","Subset;":"⋐","subseteq;":"⊆","subseteqq;":"⫅","SubsetEqual;":"⊆","subsetneq;":"⊊","subsetneqq;":"⫋","subsim;":"⫇","subsub;":"⫕","subsup;":"⫓","succapprox;":"⪸","succ;":"≻","succcurlyeq;":"≽","Succeeds;":"≻","SucceedsEqual;":"⪰","SucceedsSlantEqual;":"≽","SucceedsTilde;":"≿","succeq;":"⪰","succnapprox;":"⪺","succneqq;":"⪶","succnsim;":"⋩","succsim;":"≿","SuchThat;":"∋","sum;":"∑","Sum;":"∑","sung;":"♪","sup1;":"¹",sup1:"¹","sup2;":"²",sup2:"²","sup3;":"³",sup3:"³","sup;":"⊃","Sup;":"⋑","supdot;":"⪾","supdsub;":"⫘","supE;":"⫆","supe;":"⊇","supedot;":"⫄","Superset;":"⊃","SupersetEqual;":"⊇","suphsol;":"⟉","suphsub;":"⫗","suplarr;":"⥻","supmult;":"⫂","supnE;":"⫌","supne;":"⊋","supplus;":"⫀","supset;":"⊃","Supset;":"⋑","supseteq;":"⊇","supseteqq;":"⫆","supsetneq;":"⊋","supsetneqq;":"⫌","supsim;":"⫈","supsub;":"⫔","supsup;":"⫖","swarhk;":"⤦","swarr;":"↙","swArr;":"⇙","swarrow;":"↙","swnwar;":"⤪","szlig;":"ß",szlig:"ß","Tab;":"	","target;":"⌖","Tau;":"Τ","tau;":"τ","tbrk;":"⎴","Tcaron;":"Ť","tcaron;":"ť","Tcedil;":"Ţ","tcedil;":"ţ","Tcy;":"Т","tcy;":"т","tdot;":"⃛","telrec;":"⌕","Tfr;":"𝔗","tfr;":"𝔱","there4;":"∴","therefore;":"∴","Therefore;":"∴","Theta;":"Θ","theta;":"θ","thetasym;":"ϑ","thetav;":"ϑ","thickapprox;":"≈","thicksim;":"∼","ThickSpace;":"  ","ThinSpace;":" ","thinsp;":" ","thkap;":"≈","thksim;":"∼","THORN;":"Þ",THORN:"Þ","thorn;":"þ",thorn:"þ","tilde;":"˜","Tilde;":"∼","TildeEqual;":"≃","TildeFullEqual;":"≅","TildeTilde;":"≈","timesbar;":"⨱","timesb;":"⊠","times;":"×",times:"×","timesd;":"⨰","tint;":"∭","toea;":"⤨","topbot;":"⌶","topcir;":"⫱","top;":"⊤","Topf;":"𝕋","topf;":"𝕥","topfork;":"⫚","tosa;":"⤩","tprime;":"‴","trade;":"™","TRADE;":"™","triangle;":"▵","triangledown;":"▿","triangleleft;":"◃","trianglelefteq;":"⊴","triangleq;":"≜","triangleright;":"▹","trianglerighteq;":"⊵","tridot;":"◬","trie;":"≜","triminus;":"⨺","TripleDot;":"⃛","triplus;":"⨹","trisb;":"⧍","tritime;":"⨻","trpezium;":"⏢","Tscr;":"𝒯","tscr;":"𝓉","TScy;":"Ц","tscy;":"ц","TSHcy;":"Ћ","tshcy;":"ћ","Tstrok;":"Ŧ","tstrok;":"ŧ","twixt;":"≬","twoheadleftarrow;":"↞","twoheadrightarrow;":"↠","Uacute;":"Ú",Uacute:"Ú","uacute;":"ú",uacute:"ú","uarr;":"↑","Uarr;":"↟","uArr;":"⇑","Uarrocir;":"⥉","Ubrcy;":"Ў","ubrcy;":"ў","Ubreve;":"Ŭ","ubreve;":"ŭ","Ucirc;":"Û",Ucirc:"Û","ucirc;":"û",ucirc:"û","Ucy;":"У","ucy;":"у","udarr;":"⇅","Udblac;":"Ű","udblac;":"ű","udhar;":"⥮","ufisht;":"⥾","Ufr;":"𝔘","ufr;":"𝔲","Ugrave;":"Ù",Ugrave:"Ù","ugrave;":"ù",ugrave:"ù","uHar;":"⥣","uharl;":"↿","uharr;":"↾","uhblk;":"▀","ulcorn;":"⌜","ulcorner;":"⌜","ulcrop;":"⌏","ultri;":"◸","Umacr;":"Ū","umacr;":"ū","uml;":"¨",uml:"¨","UnderBar;":"_","UnderBrace;":"⏟","UnderBracket;":"⎵","UnderParenthesis;":"⏝","Union;":"⋃","UnionPlus;":"⊎","Uogon;":"Ų","uogon;":"ų","Uopf;":"𝕌","uopf;":"𝕦","UpArrowBar;":"⤒","uparrow;":"↑","UpArrow;":"↑","Uparrow;":"⇑","UpArrowDownArrow;":"⇅","updownarrow;":"↕","UpDownArrow;":"↕","Updownarrow;":"⇕","UpEquilibrium;":"⥮","upharpoonleft;":"↿","upharpoonright;":"↾","uplus;":"⊎","UpperLeftArrow;":"↖","UpperRightArrow;":"↗","upsi;":"υ","Upsi;":"ϒ","upsih;":"ϒ","Upsilon;":"Υ","upsilon;":"υ","UpTeeArrow;":"↥","UpTee;":"⊥","upuparrows;":"⇈","urcorn;":"⌝","urcorner;":"⌝","urcrop;":"⌎","Uring;":"Ů","uring;":"ů","urtri;":"◹","Uscr;":"𝒰","uscr;":"𝓊","utdot;":"⋰","Utilde;":"Ũ","utilde;":"ũ","utri;":"▵","utrif;":"▴","uuarr;":"⇈","Uuml;":"Ü",Uuml:"Ü","uuml;":"ü",uuml:"ü","uwangle;":"⦧","vangrt;":"⦜","varepsilon;":"ϵ","varkappa;":"ϰ","varnothing;":"∅","varphi;":"ϕ","varpi;":"ϖ","varpropto;":"∝","varr;":"↕","vArr;":"⇕","varrho;":"ϱ","varsigma;":"ς","varsubsetneq;":"⊊︀","varsubsetneqq;":"⫋︀","varsupsetneq;":"⊋︀","varsupsetneqq;":"⫌︀","vartheta;":"ϑ","vartriangleleft;":"⊲","vartriangleright;":"⊳","vBar;":"⫨","Vbar;":"⫫","vBarv;":"⫩","Vcy;":"В","vcy;":"в","vdash;":"⊢","vDash;":"⊨","Vdash;":"⊩","VDash;":"⊫","Vdashl;":"⫦","veebar;":"⊻","vee;":"∨","Vee;":"⋁","veeeq;":"≚","vellip;":"⋮","verbar;":"|","Verbar;":"‖","vert;":"|","Vert;":"‖","VerticalBar;":"∣","VerticalLine;":"|","VerticalSeparator;":"❘","VerticalTilde;":"≀","VeryThinSpace;":" ","Vfr;":"𝔙","vfr;":"𝔳","vltri;":"⊲","vnsub;":"⊂⃒","vnsup;":"⊃⃒","Vopf;":"𝕍","vopf;":"𝕧","vprop;":"∝","vrtri;":"⊳","Vscr;":"𝒱","vscr;":"𝓋","vsubnE;":"⫋︀","vsubne;":"⊊︀","vsupnE;":"⫌︀","vsupne;":"⊋︀","Vvdash;":"⊪","vzigzag;":"⦚","Wcirc;":"Ŵ","wcirc;":"ŵ","wedbar;":"⩟","wedge;":"∧","Wedge;":"⋀","wedgeq;":"≙","weierp;":"℘","Wfr;":"𝔚","wfr;":"𝔴","Wopf;":"𝕎","wopf;":"𝕨","wp;":"℘","wr;":"≀","wreath;":"≀","Wscr;":"𝒲","wscr;":"𝓌","xcap;":"⋂","xcirc;":"◯","xcup;":"⋃","xdtri;":"▽","Xfr;":"𝔛","xfr;":"𝔵","xharr;":"⟷","xhArr;":"⟺","Xi;":"Ξ","xi;":"ξ","xlarr;":"⟵","xlArr;":"⟸","xmap;":"⟼","xnis;":"⋻","xodot;":"⨀","Xopf;":"𝕏","xopf;":"𝕩","xoplus;":"⨁","xotime;":"⨂","xrarr;":"⟶","xrArr;":"⟹","Xscr;":"𝒳","xscr;":"𝓍","xsqcup;":"⨆","xuplus;":"⨄","xutri;":"△","xvee;":"⋁","xwedge;":"⋀","Yacute;":"Ý",Yacute:"Ý","yacute;":"ý",yacute:"ý","YAcy;":"Я","yacy;":"я","Ycirc;":"Ŷ","ycirc;":"ŷ","Ycy;":"Ы","ycy;":"ы","yen;":"¥",yen:"¥","Yfr;":"𝔜","yfr;":"𝔶","YIcy;":"Ї","yicy;":"ї","Yopf;":"𝕐","yopf;":"𝕪","Yscr;":"𝒴","yscr;":"𝓎","YUcy;":"Ю","yucy;":"ю","yuml;":"ÿ",yuml:"ÿ","Yuml;":"Ÿ","Zacute;":"Ź","zacute;":"ź","Zcaron;":"Ž","zcaron;":"ž","Zcy;":"З","zcy;":"з","Zdot;":"Ż","zdot;":"ż","zeetrf;":"ℨ","ZeroWidthSpace;":"​","Zeta;":"Ζ","zeta;":"ζ","zfr;":"𝔷","Zfr;":"ℨ","ZHcy;":"Ж","zhcy;":"ж","zigrarr;":"⇝","zopf;":"𝕫","Zopf;":"ℤ","Zscr;":"𝒵","zscr;":"𝓏","zwj;":"‍","zwnj;":"‌"}},{}],13:[function(e,t,n){function r(e,t){return p.isUndefined(t)?""+t:p.isNumber(t)&&(isNaN(t)||!isFinite(t))?t.toString():p.isFunction(t)||p.isRegExp(t)?t.toString():t}function i(e,t){return p.isString(e)?e.length<t?e:e.slice(0,t):e}function s(e){return i(JSON.stringify(e.actual,r),128)+" "+e.operator+" "+i(JSON.stringify(e.expected,r),128)}function o(e,t,n,r,i){throw new m.AssertionError({message:n,actual:e,expected:t,operator:r,stackStartFunction:i})}function u(e,t){e||o(e,!0,t,"==",m.ok)}function a(e,t){if(e===t)return!0;if(p.isBuffer(e)&&p.isBuffer(t)){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return p.isDate(e)&&p.isDate(t)?e.getTime()===t.getTime():p.isRegExp(e)&&p.isRegExp(t)?e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase:!p.isObject(e)&&!p.isObject(t)?e==t:l(e,t)}function f(e){return Object.prototype.toString.call(e)=="[object Arguments]"}function l(e,t){if(p.isNullOrUndefined(e)||p.isNullOrUndefined(t))return!1;if(e.prototype!==t.prototype)return!1;if(f(e))return f(t)?(e=d.call(e),t=d.call(t),a(e,t)):!1;try{var n=g(e),r=g(t),i,s}catch(o){return!1}if(n.length!=r.length)return!1;n.sort(),r.sort();for(s=n.length-1;s>=0;s--)if(n[s]!=r[s])return!1;for(s=n.length-1;s>=0;s--){i=n[s];if(!a(e[i],t[i]))return!1}return!0}function c(e,t){return!e||!t?!1:Object.prototype.toString.call(t)=="[object RegExp]"?t.test(e):e instanceof t?!0:t.call({},e)===!0?!0:!1}function h(e,t,n,r){var i;p.isString(n)&&(r=n,n=null);try{t()}catch(s){i=s}r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!i&&o(i,n,"Missing expected exception"+r),!e&&c(i,n)&&o(i,n,"Got unwanted exception"+r);if(e&&i&&n&&!c(i,n)||!e&&i)throw i}var p=e("util/"),d=Array.prototype.slice,v=Object.prototype.hasOwnProperty,m=t.exports=u;m.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=s(this),this.generatedMessage=!0);var t=e.stackStartFunction||o;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,i=t.name,u=r.indexOf("\n"+i);if(u>=0){var a=r.indexOf("\n",u+1);r=r.substring(a+1)}this.stack=r}}},p.inherits(m.AssertionError,Error),m.fail=o,m.ok=u,m.equal=function(e,t,n){e!=t&&o(e,t,n,"==",m.equal)},m.notEqual=function(e,t,n){e==t&&o(e,t,n,"!=",m.notEqual)},m.deepEqual=function(e,t,n){a(e,t)||o(e,t,n,"deepEqual",m.deepEqual)},m.notDeepEqual=function(e,t,n){a(e,t)&&o(e,t,n,"notDeepEqual",m.notDeepEqual)},m.strictEqual=function(e,t,n){e!==t&&o(e,t,n,"===",m.strictEqual)},m.notStrictEqual=function(e,t,n){e===t&&o(e,t,n,"!==",m.notStrictEqual)},m.throws=function(e,t,n){h.apply(this,[!0].concat(d.call(arguments)))},m.doesNotThrow=function(e,t){h.apply(this,[!1].concat(d.call(arguments)))},m.ifError=function(e){if(e)throw e};var g=Object.keys||function(e){var t=[];for(var n in e)v.call(e,n)&&t.push(n);return t}},{"util/":15}],14:[function(e,t,n){t.exports=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"}},{}],15:[function(e,t,n){(function(t,r){function i(e,t){var r={seen:[],stylize:o};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),v(t)?r.showHidden=t:t&&n._extend(r,t),E(r.showHidden)&&(r.showHidden=!1),E(r.depth)&&(r.depth=2),E(r.colors)&&(r.colors=!1),E(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=s),a(r,e,r.depth)}function s(e,t){var n=i.styles[t];return n?"["+i.colors[n][0]+"m"+e+"["+i.colors[n][1]+"m":e}function o(e,t){return e}function u(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}function a(e,t,r){if(e.customInspect&&t&&C(t.inspect)&&t.inspect!==n.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(r,e);return b(i)||(i=a(e,i,r)),i}var s=f(e,t);if(s)return s;var o=Object.keys(t),v=u(o);e.showHidden&&(o=Object.getOwnPropertyNames(t));if(N(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return l(t);if(o.length===0){if(C(t)){var m=t.name?": "+t.name:"";return e.stylize("[Function"+m+"]","special")}if(S(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(T(t))return e.stylize(Date.prototype.toString.call(t),"date");if(N(t))return l(t)}var g="",y=!1,w=["{","}"];d(t)&&(y=!0,w=["[","]"]);if(C(t)){var E=t.name?": "+t.name:"";g=" [Function"+E+"]"}S(t)&&(g=" "+RegExp.prototype.toString.call(t)),T(t)&&(g=" "+Date.prototype.toUTCString.call(t)),N(t)&&(g=" "+l(t));if(o.length!==0||!!y&&t.length!=0){if(r<0)return S(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var x;return y?x=c(e,t,r,v,o):x=o.map(function(n){return h(e,t,r,v,n,y)}),e.seen.pop(),p(x,g,w)}return w[0]+g+w[1]}function f(e,t){if(E(t))return e.stylize("undefined","undefined");if(b(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(y(t))return e.stylize(""+t,"number");if(v(t))return e.stylize(""+t,"boolean");if(m(t))return e.stylize("null","null")}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function c(e,t,n,r,i){var s=[];for(var o=0,u=t.length;o<u;++o)M(t,String(o))?s.push(h(e,t,n,r,String(o),!0)):s.push("");return i.forEach(function(i){i.match(/^\d+$/)||s.push(h(e,t,n,r,i,!0))}),s}function h(e,t,n,r,i,s){var o,u,f;f=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]},f.get?f.set?u=e.stylize("[Getter/Setter]","special"):u=e.stylize("[Getter]","special"):f.set&&(u=e.stylize("[Setter]","special")),M(r,i)||(o="["+i+"]"),u||(e.seen.indexOf(f.value)<0?(m(n)?u=a(e,f.value,null):u=a(e,f.value,n-1),u.indexOf("\n")>-1&&(s?u=u.split("\n").map(function(e){return"  "+e}).join("\n").substr(2):u="\n"+u.split("\n").map(function(e){return"   "+e}).join("\n"))):u=e.stylize("[Circular]","special"));if(E(o)){if(s&&i.match(/^\d+$/))return u;o=JSON.stringify(""+i),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+u}function p(e,t,n){var r=0,i=e.reduce(function(e,t){return r++,t.indexOf("\n")>=0&&r++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?n[0]+(t===""?"":t+"\n ")+" "+e.join(",\n  ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function d(e){return Array.isArray(e)}function v(e){return typeof e=="boolean"}function m(e){return e===null}function g(e){return e==null}function y(e){return typeof e=="number"}function b(e){return typeof e=="string"}function w(e){return typeof e=="symbol"}function E(e){return e===void 0}function S(e){return x(e)&&L(e)==="[object RegExp]"}function x(e){return typeof e=="object"&&e!==null}function T(e){return x(e)&&L(e)==="[object Date]"}function N(e){return x(e)&&(L(e)==="[object Error]"||e instanceof Error)}function C(e){return typeof e=="function"}function k(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e=="undefined"}function L(e){return Object.prototype.toString.call(e)}function A(e){return e<10?"0"+e.toString(10):e.toString(10)}function O(){var e=new Date,t=[A(e.getHours()),A(e.getMinutes()),A(e.getSeconds())].join(":");return[e.getDate(),H[e.getMonth()],t].join(" ")}function M(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var _=/%[sdj%]/g;n.format=function(e){if(!b(e)){var t=[];for(var n=0;n<arguments.length;n++)t.push(i(arguments[n]));return t.join(" ")}var n=1,r=arguments,s=r.length,o=String(e).replace(_,function(e){if(e==="%%")return"%";if(n>=s)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"};default:return e}});for(var u=r[n];n<s;u=r[++n])m(u)||!x(u)?o+=" "+u:o+=" "+i(u);return o},n.deprecate=function(e,i){function s(){if(!o){if(t.throwDeprecation)throw new Error(i);t.traceDeprecation?console.trace(i):console.error(i),o=!0}return e.apply(this,arguments)}if(E(r.process))return function(){return n.deprecate(e,i).apply(this,arguments)};if(t.noDeprecation===!0)return e;var o=!1;return s};var D={},P;n.debuglog=function(e){E(P)&&(P=t.env.NODE_DEBUG||""),e=e.toUpperCase();if(!D[e])if((new RegExp("\\b"+e+"\\b","i")).test(P)){var r=t.pid;D[e]=function(){var t=n.format.apply(n,arguments);console.error("%s %d: %s",e,r,t)}}else D[e]=function(){};return D[e]},n.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow","boolean":"yellow","undefined":"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},n.isArray=d,n.isBoolean=v,n.isNull=m,n.isNullOrUndefined=g,n.isNumber=y,n.isString=b,n.isSymbol=w,n.isUndefined=E,n.isRegExp=S,n.isObject=x,n.isDate=T,n.isError=N,n.isFunction=C,n.isPrimitive=k,n.isBuffer=e("./support/isBuffer");var H=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];n.log=function(){console.log("%s - %s",O(),n.format.apply(n,arguments))},n.inherits=e("inherits"),n._extend=function(e,t){if(!t||!x(t))return e;var n=Object.keys(t),r=n.length;while(r--)e[n[r]]=t[n[r]];return e}}).call(this,e("/usr/local/lib/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"),typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":14,"/usr/local/lib/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":18,inherits:17}],16:[function(e,t,n){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||undefined}function i(e){return typeof e=="function"}function s(e){return typeof e=="number"}function o(e){return typeof e=="object"&&e!==null}function u(e){return e===void 0}t.exports=r,r.EventEmitter=r,r.prototype._events=undefined,r.prototype._maxListeners=undefined,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if(!s(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,n,r,s,a,f;this._events||(this._events={});if(e==="error")if(!this._events.error||o(this._events.error)&&!this._events.error.length)throw t=arguments[1],t instanceof Error?t:TypeError('Uncaught, unspecified "error" event.');n=this._events[e];if(u(n))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:r=arguments.length,s=new Array(r-1);for(a=1;a<r;a++)s[a-1]=arguments[a];n.apply(this,s)}else if(o(n)){r=arguments.length,s=new Array(r-1);for(a=1;a<r;a++)s[a-1]=arguments[a];f=n.slice(),r=f.length;for(a=0;a<r;a++)f[a].apply(this,s)}return!0},r.prototype.addListener=function(e,t){var n;if(!i(t))throw TypeError("listener must be a function");this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,i(t.listener)?t.listener:t),this._events[e]?o(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t;if(o(this._events[e])&&!this._events[e].warned){var n;u(this._maxListeners)?n=r.defaultMaxListeners:n=this._maxListeners,n&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),console.trace())}return this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){function n(){this.removeListener(e,n),r||(r=!0,t.apply(this,arguments))}if(!i(t))throw TypeError("listener must be a function");var r=!1;return n.listener=t,this.on(e,n),this},r.prototype.removeListener=function(e,t){var n,r,s,u;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;n=this._events[e],s=n.length,r=-1;if(n===t||i(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(n)){for(u=s;u-->0;)if(n[u]===t||n[u].listener&&n[u].listener===t){r=u;break}if(r<0)return this;n.length===1?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[e]&&delete this._events[e],this;if(arguments.length===0){for(t in this._events){if(t==="removeListener")continue;this.removeAllListeners(t)}return this.removeAllListeners("removeListener"),this._events={},this}n=this._events[e];if(i(n))this.removeListener(e,n);else while(n.length)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){var t;return!this._events||!this._events[e]?t=[]:i(this._events[e])?t=[this._events[e]]:t=this._events[e].slice(),t},r.listenerCount=function(e,t){var n;return!e._events||!e._events[t]?n=0:i(e._events[t])?n=1:n=e._events[t].length,n}},{}],17:[function(e,t,n){typeof Object.create=="function"?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],18:[function(e,t,n){function r(){}var i=t.exports={};i.nextTick=function(){var e=typeof window!="undefined"&&window.setImmediate,t=typeof window!="undefined"&&window.postMessage&&window.addEventListener;if(e)return function(e){return window.setImmediate(e)};if(t){var n=[];return window.addEventListener("message",function(e){var t=e.source;if((t===window||t===null)&&e.data==="process-tick"){e.stopPropagation();if(n.length>0){var r=n.shift();r()}}},!0),function(e){n.push(e),window.postMessage("process-tick","*")}}return function(e){setTimeout(e,0)}}(),i.title="browser",i.browser=!0,i.env={},i.argv=[],i.on=r,i.once=r,i.off=r,i.emit=r,i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")}},{}],19:[function(e,t,n){t.exports=e(14)},{}],20:[function(e,t,n){t.exports=e(15)},{"./support/isBuffer":19,"/usr/local/lib/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":18,inherits:17}]},{},[9])(9)}),ace.define("ace/worker/mirror",["require","exports","module","ace/document","ace/lib/lang"],function(e,t,n){var r=e("../document").Document,i=e("../lib/lang"),s=t.Mirror=function(e){this.sender=e;var t=this.doc=new r(""),n=this.deferredUpdate=i.delayedCall(this.onUpdate.bind(this)),s=this;e.on("change",function(e){t.applyDeltas(e.data);if(s.$timeout)return n.schedule(s.$timeout);s.onUpdate()})};(function(){this.$timeout=500,this.setTimeout=function(e){this.$timeout=e},this.setValue=function(e){this.doc.setValue(e),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(e){this.sender.callback(this.doc.getValue(),e)},this.onUpdate=function(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(s.prototype)})
\ No newline at end of file
diff --git a/app/assets/lib/ace/worker-javascript.js b/app/assets/lib/ace/worker-javascript.js
index ea25ac92f..2f4885208 100644
--- a/app/assets/lib/ace/worker-javascript.js
+++ b/app/assets/lib/ace/worker-javascript.js
@@ -1 +1 @@
-"no use strict";(function(e){if(typeof e.window!="undefined"&&e.document)return;e.console=function(){var e=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:e})},e.console.error=e.console.warn=e.console.log=e.console.trace=e.console,e.window=e,e.ace=e,e.onerror=function(e,t,n,r,i){console.error("Worker "+i.stack)},e.normalizeModule=function(t,n){if(n.indexOf("!")!==-1){var r=n.split("!");return e.normalizeModule(t,r[0])+"!"+e.normalizeModule(t,r[1])}if(n.charAt(0)=="."){var i=t.split("/").slice(0,-1).join("/");n=(i?i+"/":"")+n;while(n.indexOf(".")!==-1&&s!=n){var s=n;n=n.replace(/^\.\//,"").replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return n},e.require=function(t,n){n||(n=t,t=null);if(!n.charAt)throw new Error("worker.js require() accepts only (parentId, id) as arguments");n=e.normalizeModule(t,n);var r=e.require.modules[n];if(r)return r.initialized||(r.initialized=!0,r.exports=r.factory().exports),r.exports;var i=n.split("/");if(!e.require.tlns)return console.log("unable to load "+n);i[0]=e.require.tlns[i[0]]||i[0];var s=i.join("/")+".js";return e.require.id=n,importScripts(s),e.require(t,n)},e.require.modules={},e.require.tlns={},e.define=function(t,n,r){arguments.length==2?(r=n,typeof t!="string"&&(n=t,t=e.require.id)):arguments.length==1&&(r=t,n=[],t=e.require.id),n.length||(n=["require","exports","module"]);if(t.indexOf("text!")===0)return;var i=function(n){return e.require(t,n)};e.require.modules[t]={exports:{},factory:function(){var e=this,t=r.apply(this,n.map(function(t){switch(t){case"require":return i;case"exports":return e.exports;case"module":return e;default:return i(t)}}));return t&&(e.exports=t),e}}},e.define.amd={},e.initBaseUrls=function(e){require.tlns=e},e.initSender=function(){var t=e.require("ace/lib/event_emitter").EventEmitter,n=e.require("ace/lib/oop"),r=function(){};return function(){n.implement(this,t),this.callback=function(e,t){postMessage({type:"call",id:t,data:e})},this.emit=function(e,t){postMessage({type:"event",name:e,data:t})}}.call(r.prototype),new r},e.main=null,e.sender=null,e.onmessage=function(e){var t=e.data;if(t.command){if(!main[t.command])throw new Error("Unknown command:"+t.command);main[t.command].apply(main,t.args)}else if(t.init){initBaseUrls(t.tlns),require("ace/lib/es5-shim"),sender=initSender();var n=require(t.module)[t.classname];main=new n(sender)}else t.event&&sender&&sender._emit(t.event,t.data)}})(this),ace.define("ace/lib/es5-shim",["require","exports","module"],function(e,t,n){function r(){}function i(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(t){}}function s(e){return e=+e,e!==e?e=0:e!==0&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}function o(e){var t=typeof e;return e===null||t==="undefined"||t==="boolean"||t==="number"||t==="string"}function u(e){var t,n,r;if(o(e))return e;n=e.valueOf;if(typeof n=="function"){t=n.call(e);if(o(t))return t}r=e.toString;if(typeof r=="function"){t=r.call(e);if(o(t))return t}throw new TypeError}Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if(typeof t!="function")throw new TypeError("Function.prototype.bind called on incompatible "+t);var n=c.call(arguments,1),i=function(){if(this instanceof i){var r=t.apply(this,n.concat(c.call(arguments)));return Object(r)===r?r:this}return t.apply(e,n.concat(c.call(arguments)))};return t.prototype&&(r.prototype=t.prototype,i.prototype=new r,r.prototype=null),i});var a=Function.prototype.call,f=Array.prototype,l=Object.prototype,c=f.slice,h=a.bind(l.toString),p=a.bind(l.hasOwnProperty),d,v,m,g,y;if(y=p(l,"__defineGetter__"))d=a.bind(l.__defineGetter__),v=a.bind(l.__defineSetter__),m=a.bind(l.__lookupGetter__),g=a.bind(l.__lookupSetter__);if([1,2].splice(0).length!=2)if(!function(){function e(e){var t=new Array(e+2);return t[0]=t[1]=0,t}var t=[],n;t.splice.apply(t,e(20)),t.splice.apply(t,e(26)),n=t.length,t.splice(5,0,"XXX"),n+1==t.length;if(n+1==t.length)return!0}())Array.prototype.splice=function(e,t){var n=this.length;e>0?e>n&&(e=n):e==void 0?e=0:e<0&&(e=Math.max(n+e,0)),e+t<n||(t=n-e);var r=this.slice(e,e+t),i=c.call(arguments,2),s=i.length;if(e===n)s&&this.push.apply(this,i);else{var o=Math.min(t,n-e),u=e+o,a=u+s-o,f=n-u,l=n-o;if(a<u)for(var h=0;h<f;++h)this[a+h]=this[u+h];else if(a>u)for(h=f;h--;)this[a+h]=this[u+h];if(s&&e===l)this.length=l,this.push.apply(this,i);else{this.length=l+s;for(h=0;h<s;++h)this[e+h]=i[h]}}return r};else{var b=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?b.apply(this,[e===void 0?0:e,t===void 0?this.length-e:t].concat(c.call(arguments,2))):[]}}Array.isArray||(Array.isArray=function(e){return h(e)=="[object Array]"});var w=Object("a"),E=w[0]!="a"||!(0 in w);Array.prototype.forEach||(Array.prototype.forEach=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=arguments[1],i=-1,s=n.length>>>0;if(h(e)!="[object Function]")throw new TypeError;while(++i<s)i in n&&e.call(r,n[i],i,t)}),Array.prototype.map||(Array.prototype.map=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=Array(r),s=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var o=0;o<r;o++)o in n&&(i[o]=e.call(s,n[o],o,t));return i}),Array.prototype.filter||(Array.prototype.filter=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=[],s,o=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var u=0;u<r;u++)u in n&&(s=n[u],e.call(o,s,u,t)&&i.push(s));return i}),Array.prototype.every||(Array.prototype.every=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var s=0;s<r;s++)if(s in n&&!e.call(i,n[s],s,t))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var s=0;s<r;s++)if(s in n&&e.call(i,n[s],s,t))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0;if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");if(!r&&arguments.length==1)throw new TypeError("reduce of empty array with no initial value");var i=0,s;if(arguments.length>=2)s=arguments[1];else do{if(i in n){s=n[i++];break}if(++i>=r)throw new TypeError("reduce of empty array with no initial value")}while(!0);for(;i<r;i++)i in n&&(s=e.call(void 0,s,n[i],i,t));return s}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0;if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");if(!r&&arguments.length==1)throw new TypeError("reduceRight of empty array with no initial value");var i,s=r-1;if(arguments.length>=2)i=arguments[1];else do{if(s in n){i=n[s--];break}if(--s<0)throw new TypeError("reduceRight of empty array with no initial value")}while(!0);do s in this&&(i=e.call(void 0,i,n[s],s,t));while(s--);return i});if(!Array.prototype.indexOf||[0,1].indexOf(1,2)!=-1)Array.prototype.indexOf=function(e){var t=E&&h(this)=="[object String]"?this.split(""):F(this),n=t.length>>>0;if(!n)return-1;var r=0;arguments.length>1&&(r=s(arguments[1])),r=r>=0?r:Math.max(0,n+r);for(;r<n;r++)if(r in t&&t[r]===e)return r;return-1};if(!Array.prototype.lastIndexOf||[0,1].lastIndexOf(0,-3)!=-1)Array.prototype.lastIndexOf=function(e){var t=E&&h(this)=="[object String]"?this.split(""):F(this),n=t.length>>>0;if(!n)return-1;var r=n-1;arguments.length>1&&(r=Math.min(r,s(arguments[1]))),r=r>=0?r:n-Math.abs(r);for(;r>=0;r--)if(r in t&&e===t[r])return r;return-1};Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__||(e.constructor?e.constructor.prototype:l)});if(!Object.getOwnPropertyDescriptor){var S="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(e,t){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError(S+e);if(!p(e,t))return;var n,r,i;n={enumerable:!0,configurable:!0};if(y){var s=e.__proto__;e.__proto__=l;var r=m(e,t),i=g(e,t);e.__proto__=s;if(r||i)return r&&(n.get=r),i&&(n.set=i),n}return n.value=e[t],n}}Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){return Object.keys(e)});if(!Object.create){var x;Object.prototype.__proto__===null?x=function(){return{__proto__:null}}:x=function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(e,t){var n;if(e===null)n=x();else{if(typeof e!="object")throw new TypeError("typeof prototype["+typeof e+"] != 'object'");var r=function(){};r.prototype=e,n=new r,n.__proto__=e}return t!==void 0&&Object.defineProperties(n,t),n}}if(Object.defineProperty){var T=i({}),N=typeof document=="undefined"||i(document.createElement("div"));if(!T||!N)var C=Object.defineProperty}if(!Object.defineProperty||C){var k="Property description must be an object: ",L="Object.defineProperty called on non-object: ",A="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(e,t,n){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError(L+e);if(typeof n!="object"&&typeof n!="function"||n===null)throw new TypeError(k+n);if(C)try{return C.call(Object,e,t,n)}catch(r){}if(p(n,"value"))if(y&&(m(e,t)||g(e,t))){var i=e.__proto__;e.__proto__=l,delete e[t],e[t]=n.value,e.__proto__=i}else e[t]=n.value;else{if(!y)throw new TypeError(A);p(n,"get")&&d(e,t,n.get),p(n,"set")&&v(e,t,n.set)}return e}}Object.defineProperties||(Object.defineProperties=function(e,t){for(var n in t)p(t,n)&&Object.defineProperty(e,n,t[n]);return e}),Object.seal||(Object.seal=function(e){return e}),Object.freeze||(Object.freeze=function(e){return e});try{Object.freeze(function(){})}catch(O){Object.freeze=function(e){return function(t){return typeof t=="function"?t:e(t)}}(Object.freeze)}Object.preventExtensions||(Object.preventExtensions=function(e){return e}),Object.isSealed||(Object.isSealed=function(e){return!1}),Object.isFrozen||(Object.isFrozen=function(e){return!1}),Object.isExtensible||(Object.isExtensible=function(e){if(Object(e)===e)throw new TypeError;var t="";while(p(e,t))t+="?";e[t]=!0;var n=p(e,t);return delete e[t],n});if(!Object.keys){var M=!0,_=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],D=_.length;for(var P in{toString:null})M=!1;Object.keys=function I(e){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError("Object.keys called on a non-object");var I=[];for(var t in e)p(e,t)&&I.push(t);if(M)for(var n=0,r=D;n<r;n++){var i=_[n];p(e,i)&&I.push(i)}return I}}Date.now||(Date.now=function(){return(new Date).getTime()});var H="	\n\f\r   ᠎              \u2028\u2029";if(!String.prototype.trim||H.trim()){H="["+H+"]";var B=new RegExp("^"+H+H+"*"),j=new RegExp(H+H+"*$");String.prototype.trim=function(){return String(this).replace(B,"").replace(j,"")}}var F=function(e){if(e==null)throw new TypeError("can't convert "+e+" to object");return Object(e)}}),ace.define("ace/mode/javascript_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/javascript/jshint"],function(require,exports,module){function startRegex(e){return RegExp("^("+e.join("|")+")")}var oop=require("../lib/oop"),Mirror=require("../worker/mirror").Mirror,lint=require("./javascript/jshint").JSHINT,disabledWarningsRe=startRegex(["Bad for in variable '(.+)'.",'Missing "use strict"']),errorsRe=startRegex(["Unexpected","Expected ","Confusing (plus|minus)","\\{a\\} unterminated regular expression","Unclosed ","Unmatched ","Unbegun comment","Bad invocation","Missing space after","Missing operator at"]),infoRe=startRegex(["Expected an assignment","Bad escapement of EOL","Unexpected comma","Unexpected space","Missing radix parameter.","A leading decimal point can","\\['{a}'\\] is better written in dot notation.","'{a}' used out of scope"]),JavaScriptWorker=exports.JavaScriptWorker=function(e){Mirror.call(this,e),this.setTimeout(500),this.setOptions()};oop.inherits(JavaScriptWorker,Mirror),function(){this.setOptions=function(e){this.options=e||{esnext:!0,moz:!0,devel:!0,browser:!0,node:!0,laxcomma:!0,laxbreak:!0,lastsemic:!0,onevar:!1,passfail:!1,maxerr:100,expr:!0,multistr:!0,globalstrict:!0},this.doc.getValue()&&this.deferredUpdate.schedule(100)},this.changeOptions=function(e){oop.mixin(this.options,e),this.doc.getValue()&&this.deferredUpdate.schedule(100)},this.isValidJS=function(str){try{eval("throw 0;"+str)}catch(e){if(e===0)return!0}return!1},this.onUpdate=function(){var e=this.doc.getValue();e=e.replace(/^#!.*\n/,"\n");if(!e){this.sender.emit("jslint",[]);return}var t=[],n=this.isValidJS(e)?"warning":"error";lint(e,this.options);var r=lint.errors,i=!1;for(var s=0;s<r.length;s++){var o=r[s];if(!o)continue;var u=o.raw,a="warning";if(u=="Missing semicolon."){var f=o.evidence.substr(o.character);f=f.charAt(f.search(/\S/)),n=="error"&&f&&/[\w\d{(['"]/.test(f)?(o.reason='Missing ";" before statement',a="error"):a="info"}else{if(disabledWarningsRe.test(u))continue;infoRe.test(u)?a="info":errorsRe.test(u)?(i=!0,a=n):u=="'{a}' is not defined."?a="warning":u=="'{a}' is defined but never used."&&(a="info")}t.push({row:o.line-1,column:o.character-1,text:o.reason,type:a,raw:u}),i}this.sender.emit("jslint",t)}}.call(JavaScriptWorker.prototype)}),ace.define("ace/lib/oop",["require","exports","module"],function(e,t,n){t.inherits=function(){var e=Object.create||function(e,t){var n=function(){};n.prototype=e,object=new n,object.__proto__=e,typeof t!="undefined"&&Object.defineProperties&&Object.defineProperties(object,t)};return function(t,n){t.super_=n,t.prototype=e(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}}(),t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}}),ace.define("ace/worker/mirror",["require","exports","module","ace/document","ace/lib/lang"],function(e,t,n){var r=e("../document").Document,i=e("../lib/lang"),s=t.Mirror=function(e){this.sender=e;var t=this.doc=new r(""),n=this.deferredUpdate=i.delayedCall(this.onUpdate.bind(this)),s=this;e.on("change",function(e){t.applyDeltas(e.data);if(s.$timeout)return n.schedule(s.$timeout);s.onUpdate()})};(function(){this.$timeout=500,this.setTimeout=function(e){this.$timeout=e},this.setValue=function(e){this.doc.setValue(e),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(e){this.sender.callback(this.doc.getValue(),e)},this.onUpdate=function(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(s.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,o=e("./anchor").Anchor,u=function(e){this.$lines=[],e.length==0?this.$lines=[""]:Array.isArray(e)?this._insertLines(0,e):this.insert({row:0,column:0},e)};(function(){r.implement(this,i),this.setValue=function(e){var t=this.getLength();this.remove(new s(0,0,t,this.getLine(t-1).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new o(this,e,t)},"aaa".split(/a/).length==0?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n"},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine}},this.$autoNewLine="\n",this.$newLineMode="auto",this.setNewLineMode=function(e){if(this.$newLineMode===e)return;this.$newLineMode=e},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return e=="\r\n"||e=="\r"||e=="\n"},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){if(e.start.row==e.end.row)return this.getLine(e.start.row).substring(e.start.column,e.end.column);var t=this.getLines(e.start.row,e.end.row);t[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;return e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column)),t.join(this.getNewLineCharacter())},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):e.row<0&&(e.row=0),e},this.insert=function(e,t){if(!t||t.length===0)return e;e=this.$clipPosition(e),this.getLength()<=1&&this.$detectNewLine(t);var n=this.$split(t),r=n.splice(0,1)[0],i=n.length==0?null:n.splice(n.length-1,1)[0];return e=this.insertInLine(e,r),i!==null&&(e=this.insertNewLine(e),e=this._insertLines(e.row,n),e=this.insertInLine(e,i||"")),e},this.insertLines=function(e,t){return e>=this.getLength()?this.insert({row:e,column:0},"\n"+t.join("\n")):this._insertLines(Math.max(e,0),t)},this._insertLines=function(e,t){if(t.length==0)return{row:e,column:0};if(t.length>65535){var n=this._insertLines(e,t.slice(65535));t=t.slice(0,65535)}var r=[e,0];r.push.apply(r,t),this.$lines.splice.apply(this.$lines,r);var i=new s(e,0,e+t.length,0),o={action:"insertLines",range:i,lines:t};return this._emit("change",{data:o}),n||i.end},this.insertNewLine=function(e){e=this.$clipPosition(e);var t=this.$lines[e.row]||"";this.$lines[e.row]=t.substring(0,e.column),this.$lines.splice(e.row+1,0,t.substring(e.column,t.length));var n={row:e.row+1,column:0},r={action:"insertText",range:s.fromPoints(e,n),text:this.getNewLineCharacter()};return this._emit("change",{data:r}),n},this.insertInLine=function(e,t){if(t.length==0)return e;var n=this.$lines[e.row]||"";this.$lines[e.row]=n.substring(0,e.column)+t+n.substring(e.column);var r={row:e.row,column:e.column+t.length},i={action:"insertText",range:s.fromPoints(e,r),text:t};return this._emit("change",{data:i}),r},this.remove=function(e){!e instanceof s&&(e=s.fromPoints(e.start,e.end)),e.start=this.$clipPosition(e.start),e.end=this.$clipPosition(e.end);if(e.isEmpty())return e.start;var t=e.start.row,n=e.end.row;if(e.isMultiLine()){var r=e.start.column==0?t:t+1,i=n-1;e.end.column>0&&this.removeInLine(n,0,e.end.column),i>=r&&this._removeLines(r,i),r!=t&&(this.removeInLine(t,e.start.column,this.getLine(t).length),this.removeNewLine(e.start.row))}else this.removeInLine(t,e.start.column,e.end.column);return e.start},this.removeInLine=function(e,t,n){if(t==n)return;var r=new s(e,t,e,n),i=this.getLine(e),o=i.substring(t,n),u=i.substring(0,t)+i.substring(n,i.length);this.$lines.splice(e,1,u);var a={action:"removeText",range:r,text:o};return this._emit("change",{data:a}),r.start},this.removeLines=function(e,t){return e<0||t>=this.getLength()?this.remove(new s(e,0,t+1,0)):this._removeLines(e,t)},this._removeLines=function(e,t){var n=new s(e,0,t+1,0),r=this.$lines.splice(e,t-e+1),i={action:"removeLines",range:n,nl:this.getNewLineCharacter(),lines:r};return this._emit("change",{data:i}),r},this.removeNewLine=function(e){var t=this.getLine(e),n=this.getLine(e+1),r=new s(e,t.length,e+1,0),i=t+n;this.$lines.splice(e,2,i);var o={action:"removeText",range:r,text:this.getNewLineCharacter()};this._emit("change",{data:o})},this.replace=function(e,t){!e instanceof s&&(e=s.fromPoints(e.start,e.end));if(t.length==0&&e.isEmpty())return e.start;if(t==this.getTextRange(e))return e.end;this.remove(e);if(t)var n=this.insert(e.start,t);else n=e.start;return n},this.applyDeltas=function(e){for(var t=0;t<e.length;t++){var n=e[t],r=s.fromPoints(n.range.start,n.range.end);n.action=="insertLines"?this.insertLines(r.start.row,n.lines):n.action=="insertText"?this.insert(r.start,n.text):n.action=="removeLines"?this._removeLines(r.start.row,r.end.row-1):n.action=="removeText"&&this.remove(r)}},this.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--){var n=e[t],r=s.fromPoints(n.range.start,n.range.end);n.action=="insertLines"?this._removeLines(r.start.row,r.end.row-1):n.action=="insertText"?this.remove(r):n.action=="removeLines"?this._insertLines(r.start.row,n.lines):n.action=="removeText"&&this.insert(r.start,n.text)}},this.indexToPosition=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length;for(var i=t||0,s=n.length;i<s;i++){e-=n[i].length+r;if(e<0)return{row:i,column:e+n[i].length+r}}return{row:s-1,column:n[s-1].length}},this.positionToIndex=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=0,s=Math.min(e.row,n.length);for(var o=t||0;o<s;++o)i+=n[o].length+r;return i+e.column}}).call(u.prototype),t.Document=u}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,t,n){var r={},i=function(){this.propagationStopped=!0},s=function(){this.defaultPrevented=!0};r._emit=r._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],r=this._defaultHandlers[e];if(!n.length&&!r)return;if(typeof t!="object"||!t)t={};t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=i),t.preventDefault||(t.preventDefault=s),n=n.slice();for(var o=0;o<n.length;o++){n[o](t,this);if(t.propagationStopped)break}if(r&&!t.defaultPrevented)return r(t,this)},r._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(!n)return;n=n.slice();for(var r=0;r<n.length;r++)n[r](t,this)},r.once=function(e,t){var n=this;t&&this.addEventListener(e,function r(){n.removeEventListener(e,r),t.apply(null,arguments)})},r.setDefaultHandler=function(e,t){var n=this._defaultHandlers;n||(n=this._defaultHandlers={_disabled_:{}});if(n[e]){var r=n[e],i=n._disabled_[e];i||(n._disabled_[e]=i=[]),i.push(r);var s=i.indexOf(t);s!=-1&&i.splice(s,1)}n[e]=t},r.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(!n)return;var r=n._disabled_[e];if(n[e]==t){var i=n[e];r&&this.setDefaultHandler(e,r.pop())}else if(r){var s=r.indexOf(t);s!=-1&&r.splice(s,1)}},r.on=r.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[e];return r||(r=this._eventRegistry[e]=[]),r.indexOf(t)==-1&&r[n?"unshift":"push"](t),t},r.off=r.removeListener=r.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(!n)return;var r=n.indexOf(t);r!==-1&&n.splice(r,1)},r.removeAllListeners=function(e){this._eventRegistry&&(this._eventRegistry[e]=[])},t.EventEmitter=r}),ace.define("ace/range",["require","exports","module"],function(e,t,n){var r=function(e,t){return e.row-t.row||e.column-t.column},i=function(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return this.compare(e,t)==0},this.compareRange=function(e){var t,n=e.end,r=e.start;return t=this.compare(n.row,n.column),t==1?(t=this.compare(r.row,r.column),t==1?2:t==0?1:0):t==-1?-2:(t=this.compare(r.row,r.column),t==-1?-1:t==1?42:0)},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return this.comparePoint(e.start)==0&&this.comparePoint(e.end)==0},this.intersects=function(e){var t=this.compareRange(e);return t==-1||t==0||t==1},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){typeof e=="object"?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){typeof e=="object"?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)||this.isStart(e,t)?!1:!0:!1},this.insideStart=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)?!1:!0:!1},this.insideEnd=function(e,t){return this.compare(e,t)==0?this.isStart(e,t)?!1:!0:!1},this.compare=function(e,t){return!this.isMultiLine()&&e===this.start.row?t<this.start.column?-1:t>this.end.column?1:0:e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else if(this.end.row<e)var n={row:e,column:0};if(this.start.row>t)var r={row:t+1,column:0};else if(this.start.row<e)var r={row:e,column:0};return i.fromPoints(r||this.start,n||this.end)},this.extend=function(e,t){var n=this.compare(e,t);if(n==0)return this;if(n==-1)var r={row:e,column:t};else var s={row:e,column:t};return i.fromPoints(r||this.start,s||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return i.fromPoints(this.start,this.end)},this.collapseRows=function(){return this.end.column==0?new i(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new i(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),n=e.documentToScreenPosition(this.end);return new i(t.row,t.column,n.row,n.column)},this.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t}}).call(i.prototype),i.fromPoints=function(e,t){return new i(e.row,e.column,t.row,t.column)},i.comparePoints=r,i.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=i}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=t.Anchor=function(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),typeof n=="undefined"?this.setPosition(t.row,t.column):this.setPosition(t,n)};(function(){r.implement(this,i),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(e){var t=e.data,n=t.range;if(n.start.row==n.end.row&&n.start.row!=this.row)return;if(n.start.row>this.row)return;if(n.start.row==this.row&&n.start.column>this.column)return;var r=this.row,i=this.column,s=n.start,o=n.end;if(t.action==="insertText")if(s.row===r&&s.column<=i){if(s.column!==i||!this.$insertRight)s.row===o.row?i+=o.column-s.column:(i-=s.column,r+=o.row-s.row)}else s.row!==o.row&&s.row<r&&(r+=o.row-s.row);else t.action==="insertLines"?s.row<=r&&(r+=o.row-s.row):t.action==="removeText"?s.row===r&&s.column<i?o.column>=i?i=s.column:i=Math.max(0,i-(o.column-s.column)):s.row!==o.row&&s.row<r?(o.row===r&&(i=Math.max(0,i-o.column)+s.column),r-=o.row-s.row):o.row===r&&(r-=o.row-s.row,i=Math.max(0,i-o.column)+s.column):t.action=="removeLines"&&s.row<=r&&(o.row<=r?r-=o.row-s.row:(r=s.row,i=0));this.setPosition(r,i,!0)},this.setPosition=function(e,t,n){var r;n?r={row:e,column:t}:r=this.$clipPositionToDocument(e,t);if(this.row==r.row&&this.column==r.column)return;var i={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._emit("change",{old:i,value:r})},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(s.prototype)}),ace.define("ace/lib/lang",["require","exports","module"],function(e,t,n){t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){var n="";while(t>0){t&1&&(n+=e);if(t>>=1)e+=e}return n};var r=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(r,"")},t.stringTrimRight=function(e){return e.replace(i,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){var t=[];for(var n=0,r=e.length;n<r;n++)e[n]&&typeof e[n]=="object"?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=function(e){if(typeof e!="object"||!e)return e;var n=e.constructor;if(n===RegExp)return e;var r=n();for(var i in e)typeof e[i]=="object"?r[i]=t.deepCopy(e[i]):r[i]=e[i];return r},t.arrayToMap=function(e){var t={};for(var n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return e.replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,function(e){n.push({offset:arguments[arguments.length-2],length:e.length})}),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},r=function(e){return r.cancel(),t=setTimeout(n,e||0),r};return r.schedule=r,r.call=function(){return this.cancel(),e(),r},r.cancel=function(){return clearTimeout(t),t=null,r},r.isPending=function(){return t},r},t.delayedCall=function(e,t){var n=null,r=function(){n=null,e()},i=function(e){n==null&&(n=setTimeout(r,e||t))};return i.delay=function(e){n&&clearTimeout(n),n=setTimeout(r,e||t)},i.schedule=i,i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){return n},i}}),ace.define("ace/mode/javascript/jshint",["require","exports","module"],function(e,t,n){function r(){return e.apply(this,arguments)}e=null,e=function i(t,n,r){function s(u,a){if(!n[u]){if(!t[u]){var f=typeof e=="function"&&e;if(!a&&f)return f(u,!0);if(o)return o(u,!0);throw new Error("Cannot find module '"+u+"'")}var l=n[u]={exports:{}};t[u][0].call(l.exports,function(e){var n=t[u][1][e];return s(n?n:e)},l,l.exports,i,t,n,r)}return n[u].exports}var o=typeof e=="function"&&e;for(var u=0;u<r.length;u++)s(r[u]);return s}({9:[function(e,t,n){function r(){}["log","info","warn","error","time","timeEnd","trace","dir","assert"].forEach(function(e){n[e]=r})},{}],1:[function(e,t,n){(function(){var e=this,r=e._,i={},s=Array.prototype,o=Object.prototype,u=Function.prototype,a=s.push,f=s.slice,l=s.concat,c=o.toString,h=o.hasOwnProperty,p=s.forEach,d=s.map,v=s.reduce,m=s.reduceRight,g=s.filter,y=s.every,b=s.some,w=s.indexOf,E=s.lastIndexOf,S=Array.isArray,x=Object.keys,T=u.bind,N=function(e){if(e instanceof N)return e;if(!(this instanceof N))return new N(e);this._wrapped=e};typeof n!="undefined"?(typeof t!="undefined"&&t.exports&&(n=t.exports=N),n._=N):e._=N,N.VERSION="1.4.4";var C=N.each=N.forEach=function(e,t,n){if(e==null)return;if(p&&e.forEach===p)e.forEach(t,n);else if(e.length===+e.length){for(var r=0,s=e.length;r<s;r++)if(t.call(n,e[r],r,e)===i)return}else for(var o in e)if(N.has(e,o)&&t.call(n,e[o],o,e)===i)return};N.map=N.collect=function(e,t,n){var r=[];return e==null?r:d&&e.map===d?e.map(t,n):(C(e,function(e,i,s){r[r.length]=t.call(n,e,i,s)}),r)};var k="Reduce of empty array with no initial value";N.reduce=N.foldl=N.inject=function(e,t,n,r){var i=arguments.length>2;e==null&&(e=[]);if(v&&e.reduce===v)return r&&(t=N.bind(t,r)),i?e.reduce(t,n):e.reduce(t);C(e,function(e,s,o){i?n=t.call(r,n,e,s,o):(n=e,i=!0)});if(!i)throw new TypeError(k);return n},N.reduceRight=N.foldr=function(e,t,n,r){var i=arguments.length>2;e==null&&(e=[]);if(m&&e.reduceRight===m)return r&&(t=N.bind(t,r)),i?e.reduceRight(t,n):e.reduceRight(t);var s=e.length;if(s!==+s){var o=N.keys(e);s=o.length}C(e,function(u,a,f){a=o?o[--s]:--s,i?n=t.call(r,n,e[a],a,f):(n=e[a],i=!0)});if(!i)throw new TypeError(k);return n},N.find=N.detect=function(e,t,n){var r;return L(e,function(e,i,s){if(t.call(n,e,i,s))return r=e,!0}),r},N.filter=N.select=function(e,t,n){var r=[];return e==null?r:g&&e.filter===g?e.filter(t,n):(C(e,function(e,i,s){t.call(n,e,i,s)&&(r[r.length]=e)}),r)},N.reject=function(e,t,n){return N.filter(e,function(e,r,i){return!t.call(n,e,r,i)},n)},N.every=N.all=function(e,t,n){t||(t=N.identity);var r=!0;return e==null?r:y&&e.every===y?e.every(t,n):(C(e,function(e,s,o){if(!(r=r&&t.call(n,e,s,o)))return i}),!!r)};var L=N.some=N.any=function(e,t,n){t||(t=N.identity);var r=!1;return e==null?r:b&&e.some===b?e.some(t,n):(C(e,function(e,s,o){if(r||(r=t.call(n,e,s,o)))return i}),!!r)};N.contains=N.include=function(e,t){return e==null?!1:w&&e.indexOf===w?e.indexOf(t)!=-1:L(e,function(e){return e===t})},N.invoke=function(e,t){var n=f.call(arguments,2),r=N.isFunction(t);return N.map(e,function(e){return(r?t:e[t]).apply(e,n)})},N.pluck=function(e,t){return N.map(e,function(e){return e[t]})},N.where=function(e,t,n){return N.isEmpty(t)?n?null:[]:N[n?"find":"filter"](e,function(e){for(var n in t)if(t[n]!==e[n])return!1;return!0})},N.findWhere=function(e,t){return N.where(e,t,!0)},N.max=function(e,t,n){if(!t&&N.isArray(e)&&e[0]===+e[0]&&e.length<65535)return Math.max.apply(Math,e);if(!t&&N.isEmpty(e))return-Infinity;var r={computed:-Infinity,value:-Infinity};return C(e,function(e,i,s){var o=t?t.call(n,e,i,s):e;o>=r.computed&&(r={value:e,computed:o})}),r.value},N.min=function(e,t,n){if(!t&&N.isArray(e)&&e[0]===+e[0]&&e.length<65535)return Math.min.apply(Math,e);if(!t&&N.isEmpty(e))return Infinity;var r={computed:Infinity,value:Infinity};return C(e,function(e,i,s){var o=t?t.call(n,e,i,s):e;o<r.computed&&(r={value:e,computed:o})}),r.value},N.shuffle=function(e){var t,n=0,r=[];return C(e,function(e){t=N.random(n++),r[n-1]=r[t],r[t]=e}),r};var A=function(e){return N.isFunction(e)?e:function(t){return t[e]}};N.sortBy=function(e,t,n){var r=A(t);return N.pluck(N.map(e,function(e,t,i){return{value:e,index:t,criteria:r.call(n,e,t,i)}}).sort(function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||n===void 0)return 1;if(n<r||r===void 0)return-1}return e.index<t.index?-1:1}),"value")};var O=function(e,t,n,r){var i={},s=A(t||N.identity);return C(e,function(t,o){var u=s.call(n,t,o,e);r(i,u,t)}),i};N.groupBy=function(e,t,n){return O(e,t,n,function(e,t,n){(N.has(e,t)?e[t]:e[t]=[]).push(n)})},N.countBy=function(e,t,n){return O(e,t,n,function(e,t){N.has(e,t)||(e[t]=0),e[t]++})},N.sortedIndex=function(e,t,n,r){n=n==null?N.identity:A(n);var i=n.call(r,t),s=0,o=e.length;while(s<o){var u=s+o>>>1;n.call(r,e[u])<i?s=u+1:o=u}return s},N.toArray=function(e){return e?N.isArray(e)?f.call(e):e.length===+e.length?N.map(e,N.identity):N.values(e):[]},N.size=function(e){return e==null?0:e.length===+e.length?e.length:N.keys(e).length},N.first=N.head=N.take=function(e,t,n){return e==null?void 0:t!=null&&!n?f.call(e,0,t):e[0]},N.initial=function(e,t,n){return f.call(e,0,e.length-(t==null||n?1:t))},N.last=function(e,t,n){return e==null?void 0:t!=null&&!n?f.call(e,Math.max(e.length-t,0)):e[e.length-1]},N.rest=N.tail=N.drop=function(e,t,n){return f.call(e,t==null||n?1:t)},N.compact=function(e){return N.filter(e,N.identity)};var M=function(e,t,n){return C(e,function(e){N.isArray(e)?t?a.apply(n,e):M(e,t,n):n.push(e)}),n};N.flatten=function(e,t){return M(e,t,[])},N.without=function(e){return N.difference(e,f.call(arguments,1))},N.uniq=N.unique=function(e,t,n,r){N.isFunction(t)&&(r=n,n=t,t=!1);var i=n?N.map(e,n,r):e,s=[],o=[];return C(i,function(n,r){if(t?!r||o[o.length-1]!==n:!N.contains(o,n))o.push(n),s.push(e[r])}),s},N.union=function(){return N.uniq(l.apply(s,arguments))},N.intersection=function(e){var t=f.call(arguments,1);return N.filter(N.uniq(e),function(e){return N.every(t,function(t){return N.indexOf(t,e)>=0})})},N.difference=function(e){var t=l.apply(s,f.call(arguments,1));return N.filter(e,function(e){return!N.contains(t,e)})},N.zip=function(){var e=f.call(arguments),t=N.max(N.pluck(e,"length")),n=new Array(t);for(var r=0;r<t;r++)n[r]=N.pluck(e,""+r);return n},N.object=function(e,t){if(e==null)return{};var n={};for(var r=0,i=e.length;r<i;r++)t?n[e[r]]=t[r]:n[e[r][0]]=e[r][1];return n},N.indexOf=function(e,t,n){if(e==null)return-1;var r=0,i=e.length;if(n){if(typeof n!="number")return r=N.sortedIndex(e,t),e[r]===t?r:-1;r=n<0?Math.max(0,i+n):n}if(w&&e.indexOf===w)return e.indexOf(t,n);for(;r<i;r++)if(e[r]===t)return r;return-1},N.lastIndexOf=function(e,t,n){if(e==null)return-1;var r=n!=null;if(E&&e.lastIndexOf===E)return r?e.lastIndexOf(t,n):e.lastIndexOf(t);var i=r?n:e.length;while(i--)if(e[i]===t)return i;return-1},N.range=function(e,t,n){arguments.length<=1&&(t=e||0,e=0),n=arguments[2]||1;var r=Math.max(Math.ceil((t-e)/n),0),i=0,s=new Array(r);while(i<r)s[i++]=e,e+=n;return s},N.bind=function(e,t){if(e.bind===T&&T)return T.apply(e,f.call(arguments,1));var n=f.call(arguments,2);return function(){return e.apply(t,n.concat(f.call(arguments)))}},N.partial=function(e){var t=f.call(arguments,1);return function(){return e.apply(this,t.concat(f.call(arguments)))}},N.bindAll=function(e){var t=f.call(arguments,1);return t.length===0&&(t=N.functions(e)),C(t,function(t){e[t]=N.bind(e[t],e)}),e},N.memoize=function(e,t){var n={};return t||(t=N.identity),function(){var r=t.apply(this,arguments);return N.has(n,r)?n[r]:n[r]=e.apply(this,arguments)}},N.delay=function(e,t){var n=f.call(arguments,2);return setTimeout(function(){return e.apply(null,n)},t)},N.defer=function(e){return N.delay.apply(N,[e,1].concat(f.call(arguments,1)))},N.throttle=function(e,t){var n,r,i,s,o=0,u=function(){o=new Date,i=null,s=e.apply(n,r)};return function(){var a=new Date,f=t-(a-o);return n=this,r=arguments,f<=0?(clearTimeout(i),i=null,o=a,s=e.apply(n,r)):i||(i=setTimeout(u,f)),s}},N.debounce=function(e,t,n){var r,i;return function(){var s=this,o=arguments,u=function(){r=null,n||(i=e.apply(s,o))},a=n&&!r;return clearTimeout(r),r=setTimeout(u,t),a&&(i=e.apply(s,o)),i}},N.once=function(e){var t=!1,n;return function(){return t?n:(t=!0,n=e.apply(this,arguments),e=null,n)}},N.wrap=function(e,t){return function(){var n=[e];return a.apply(n,arguments),t.apply(this,n)}},N.compose=function(){var e=arguments;return function(){var t=arguments;for(var n=e.length-1;n>=0;n--)t=[e[n].apply(this,t)];return t[0]}},N.after=function(e,t){return e<=0?t():function(){if(--e<1)return t.apply(this,arguments)}},N.keys=x||function(e){if(e!==Object(e))throw new TypeError("Invalid object");var t=[];for(var n in e)N.has(e,n)&&(t[t.length]=n);return t},N.values=function(e){var t=[];for(var n in e)N.has(e,n)&&t.push(e[n]);return t},N.pairs=function(e){var t=[];for(var n in e)N.has(e,n)&&t.push([n,e[n]]);return t},N.invert=function(e){var t={};for(var n in e)N.has(e,n)&&(t[e[n]]=n);return t},N.functions=N.methods=function(e){var t=[];for(var n in e)N.isFunction(e[n])&&t.push(n);return t.sort()},N.extend=function(e){return C(f.call(arguments,1),function(t){if(t)for(var n in t)e[n]=t[n]}),e},N.pick=function(e){var t={},n=l.apply(s,f.call(arguments,1));return C(n,function(n){n in e&&(t[n]=e[n])}),t},N.omit=function(e){var t={},n=l.apply(s,f.call(arguments,1));for(var r in e)N.contains(n,r)||(t[r]=e[r]);return t},N.defaults=function(e){return C(f.call(arguments,1),function(t){if(t)for(var n in t)e[n]==null&&(e[n]=t[n])}),e},N.clone=function(e){return N.isObject(e)?N.isArray(e)?e.slice():N.extend({},e):e},N.tap=function(e,t){return t(e),e};var _=function(e,t,n,r){if(e===t)return e!==0||1/e==1/t;if(e==null||t==null)return e===t;e instanceof N&&(e=e._wrapped),t instanceof N&&(t=t._wrapped);var i=c.call(e);if(i!=c.call(t))return!1;switch(i){case"[object String]":return e==String(t);case"[object Number]":return e!=+e?t!=+t:e==0?1/e==1/t:e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object RegExp]":return e.source==t.source&&e.global==t.global&&e.multiline==t.multiline&&e.ignoreCase==t.ignoreCase}if(typeof e!="object"||typeof t!="object")return!1;var s=n.length;while(s--)if(n[s]==e)return r[s]==t;n.push(e),r.push(t);var o=0,u=!0;if(i=="[object Array]"){o=e.length,u=o==t.length;if(u)while(o--)if(!(u=_(e[o],t[o],n,r)))break}else{var a=e.constructor,f=t.constructor;if(a!==f&&!(N.isFunction(a)&&a instanceof a&&N.isFunction(f)&&f instanceof f))return!1;for(var l in e)if(N.has(e,l)){o++;if(!(u=N.has(t,l)&&_(e[l],t[l],n,r)))break}if(u){for(l in t)if(N.has(t,l)&&!(o--))break;u=!o}}return n.pop(),r.pop(),u};N.isEqual=function(e,t){return _(e,t,[],[])},N.isEmpty=function(e){if(e==null)return!0;if(N.isArray(e)||N.isString(e))return e.length===0;for(var t in e)if(N.has(e,t))return!1;return!0},N.isElement=function(e){return!!e&&e.nodeType===1},N.isArray=S||function(e){return c.call(e)=="[object Array]"},N.isObject=function(e){return e===Object(e)},C(["Arguments","Function","String","Number","Date","RegExp"],function(e){N["is"+e]=function(t){return c.call(t)=="[object "+e+"]"}}),N.isArguments(arguments)||(N.isArguments=function(e){return!!e&&!!N.has(e,"callee")}),typeof /./!="function"&&(N.isFunction=function(e){return typeof e=="function"}),N.isFinite=function(e){return isFinite(e)&&!isNaN(parseFloat(e))},N.isNaN=function(e){return N.isNumber(e)&&e!=+e},N.isBoolean=function(e){return e===!0||e===!1||c.call(e)=="[object Boolean]"},N.isNull=function(e){return e===null},N.isUndefined=function(e){return e===void 0},N.has=function(e,t){return h.call(e,t)},N.noConflict=function(){return e._=r,this},N.identity=function(e){return e},N.times=function(e,t,n){var r=Array(e);for(var i=0;i<e;i++)r[i]=t.call(n,i);return r},N.random=function(e,t){return t==null&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))};var D={escape:{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;"}};D.unescape=N.invert(D.escape);var P={escape:new RegExp("["+N.keys(D.escape).join("")+"]","g"),unescape:new RegExp("("+N.keys(D.unescape).join("|")+")","g")};N.each(["escape","unescape"],function(e){N[e]=function(t){return t==null?"":(""+t).replace(P[e],function(t){return D[e][t]})}}),N.result=function(e,t){if(e==null)return null;var n=e[t];return N.isFunction(n)?n.call(e):n},N.mixin=function(e){C(N.functions(e),function(t){var n=N[t]=e[t];N.prototype[t]=function(){var e=[this._wrapped];return a.apply(e,arguments),I.call(this,n.apply(N,e))}})};var H=0;N.uniqueId=function(e){var t=++H+"";return e?e+t:t},N.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var B=/(.)^/,j={"'":"'","\\":"\\","\r":"r","\n":"n","	":"t","\u2028":"u2028","\u2029":"u2029"},F=/\\|'|\r|\n|\t|\u2028|\u2029/g;N.template=function(e,t,n){var r;n=N.defaults({},n,N.templateSettings);var i=new RegExp([(n.escape||B).source,(n.interpolate||B).source,(n.evaluate||B).source].join("|")+"|$","g"),s=0,o="__p+='";e.replace(i,function(t,n,r,i,u){return o+=e.slice(s,u).replace(F,function(e){return"\\"+j[e]}),n&&(o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'"),r&&(o+="'+\n((__t=("+r+"))==null?'':__t)+\n'"),i&&(o+="';\n"+i+"\n__p+='"),s=u+t.length,t}),o+="';\n",n.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{r=new Function(n.variable||"obj","_",o)}catch(u){throw u.source=o,u}if(t)return r(t,N);var a=function(e){return r.call(this,e,N)};return a.source="function("+(n.variable||"obj")+"){\n"+o+"}",a},N.chain=function(e){return N(e).chain()};var I=function(e){return this._chain?N(e).chain():e};N.mixin(N),C(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=s[e];N.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),(e=="shift"||e=="splice")&&n.length===0&&delete n[0],I.call(this,n)}}),C(["concat","join","slice"],function(e){var t=s[e];N.prototype[e]=function(){return I.call(this,t.apply(this._wrapped,arguments))}}),N.extend(N.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}).call(this)},{}],2:[function(e,t,n){var r=e("underscore"),i={E001:"Bad option: '{a}'.",E002:"Bad option value.",E003:"Expected a JSON value.",E004:"Input is neither a string nor an array of strings.",E005:"Input is empty.",E006:"Unexpected early end of program.",E007:'Missing "use strict" statement.',E008:"Strict violation.",E009:"Option 'validthis' can't be used in a global scope.",E010:"'with' is not allowed in strict mode.",E011:"const '{a}' has already been declared.",E012:"const '{a}' is initialized to 'undefined'.",E013:"Attempting to override '{a}' which is a constant.",E014:"A regular expression literal can be confused with '/='.",E015:"Unclosed regular expression.",E016:"Invalid regular expression.",E017:"Unclosed comment.",E018:"Unbegun comment.",E019:"Unmatched '{a}'.",E020:"Expected '{a}' to match '{b}' from line {c} and instead saw '{d}'.",E021:"Expected '{a}' and instead saw '{b}'.",E022:"Line breaking error '{a}'.",E023:"Missing '{a}'.",E024:"Unexpected '{a}'.",E025:"Missing ':' on a case clause.",E026:"Missing '}' to match '{' from line {a}.",E027:"Missing ']' to match '[' form line {a}.",E028:"Illegal comma.",E029:"Unclosed string.",E030:"Expected an identifier and instead saw '{a}'.",E031:"Bad assignment.",E032:"Expected a small integer or 'false' and instead saw '{a}'.",E033:"Expected an operator and instead saw '{a}'.",E034:"get/set are ES5 features.",E035:"Missing property name.",E036:"Expected to see a statement and instead saw a block.",E037:null,E038:null,E039:"Function declarations are not invocable. Wrap the whole function invocation in parens.",E040:"Each value should have its own case label.",E041:"Unrecoverable syntax error.",E042:"Stopping.",E043:"Too many errors.",E044:"'{a}' is already defined and can't be redefined.",E045:"Invalid for each loop.",E046:"A yield statement shall be within a generator function (with syntax: `function*`)",E047:"A generator function shall contain a yield statement.",E048:"Let declaration not directly within block.",E049:"A {a} cannot be named '{b}'.",E050:"Mozilla requires the yield expression to be parenthesized here.",E051:"Regular parameters cannot come after default parameters."},s={W001:"'hasOwnProperty' is a really bad name.",W002:"Value of '{a}' may be overwritten in IE 8 and earlier.",W003:"'{a}' was used before it was defined.",W004:"'{a}' is already defined.",W005:"A dot following a number can be confused with a decimal point.",W006:"Confusing minuses.",W007:"Confusing pluses.",W008:"A leading decimal point can be confused with a dot: '{a}'.",W009:"The array literal notation [] is preferrable.",W010:"The object literal notation {} is preferrable.",W011:"Unexpected space after '{a}'.",W012:"Unexpected space before '{a}'.",W013:"Missing space after '{a}'.",W014:"Bad line breaking before '{a}'.",W015:"Expected '{a}' to have an indentation at {b} instead at {c}.",W016:"Unexpected use of '{a}'.",W017:"Bad operand.",W018:"Confusing use of '{a}'.",W019:"Use the isNaN function to compare with NaN.",W020:"Read only.",W021:"'{a}' is a function.",W022:"Do not assign to the exception parameter.",W023:"Expected an identifier in an assignment and instead saw a function invocation.",W024:"Expected an identifier and instead saw '{a}' (a reserved word).",W025:"Missing name in function declaration.",W026:"Inner functions should be listed at the top of the outer function.",W027:"Unreachable '{a}' after '{b}'.",W028:"Label '{a}' on {b} statement.",W030:"Expected an assignment or function call and instead saw an expression.",W031:"Do not use 'new' for side effects.",W032:"Unnecessary semicolon.",W033:"Missing semicolon.",W034:'Unnecessary directive "{a}".',W035:"Empty block.",W036:"Unexpected /*member '{a}'.",W037:"'{a}' is a statement label.",W038:"'{a}' used out of scope.",W039:"'{a}' is not allowed.",W040:"Possible strict violation.",W041:"Use '{a}' to compare with '{b}'.",W042:"Avoid EOL escaping.",W043:"Bad escaping of EOL. Use option multistr if needed.",W044:"Bad or unnecessary escaping.",W045:"Bad number '{a}'.",W046:"Don't use extra leading zeros '{a}'.",W047:"A trailing decimal point can be confused with a dot: '{a}'.",W048:"Unexpected control character in regular expression.",W049:"Unexpected escaped character '{a}' in regular expression.",W050:"JavaScript URL.",W051:"Variables should not be deleted.",W052:"Unexpected '{a}'.",W053:"Do not use {a} as a constructor.",W054:"The Function constructor is a form of eval.",W055:"A constructor name should start with an uppercase letter.",W056:"Bad constructor.",W057:"Weird construction. Is 'new' unnecessary?",W058:"Missing '()' invoking a constructor.",W059:"Avoid arguments.{a}.",W060:"document.write can be a form of eval.",W061:"eval can be harmful.",W062:"Wrap an immediate function invocation in parens to assist the reader in understanding that the expression is the result of a function, and not the function itself.",W063:"Math is not a function.",W064:"Missing 'new' prefix when invoking a constructor.",W065:"Missing radix parameter.",W066:"Implied eval. Consider passing a function instead of a string.",W067:"Bad invocation.",W068:"Wrapping non-IIFE function literals in parens is unnecessary.",W069:"['{a}'] is better written in dot notation.",W070:"Extra comma. (it breaks older versions of IE)",W071:"This function has too many statements. ({a})",W072:"This function has too many parameters. ({a})",W073:"Blocks are nested too deeply. ({a})",W074:"This function's cyclomatic complexity is too high. ({a})",W075:"Duplicate key '{a}'.",W076:"Unexpected parameter '{a}' in get {b} function.",W077:"Expected a single parameter in set {a} function.",W078:"Setter is defined without getter.",W079:"Redefinition of '{a}'.",W080:"It's not necessary to initialize '{a}' to 'undefined'.",W081:"Too many var statements.",W082:"Function declarations should not be placed in blocks. Use a function expression or move the statement to the top of the outer function.",W083:"Don't make functions within a loop.",W084:"Assignment in conditional expression",W085:"Don't use 'with'.",W086:"Expected a 'break' statement before '{a}'.",W087:"Forgotten 'debugger' statement?",W088:"Creating global 'for' variable. Should be 'for (var {a} ...'.",W089:"The body of a for in should be wrapped in an if statement to filter unwanted properties from the prototype.",W090:"'{a}' is not a statement label.",W091:"'{a}' is out of scope.",W092:"Wrap the /regexp/ literal in parens to disambiguate the slash operator.",W093:"Did you mean to return a conditional instead of an assignment?",W094:"Unexpected comma.",W095:"Expected a string and instead saw {a}.",W096:"The '{a}' key may produce unexpected results.",W097:'Use the function form of "use strict".',W098:"'{a}' is defined but never used.",W099:"Mixed spaces and tabs.",W100:"This character may get silently deleted by one or more browsers.",W101:"Line is too long.",W102:"Trailing whitespace.",W103:"The '{a}' property is deprecated.",W104:"'{a}' is only available in JavaScript 1.7.",W105:"Unexpected {a} in '{b}'.",W106:"Identifier '{a}' is not in camel case.",W107:"Script URL.",W108:"Strings must use doublequote.",W109:"Strings must use singlequote.",W110:"Mixed double and single quotes.",W112:"Unclosed string.",W113:"Control character in string: {a}.",W114:"Avoid {a}.",W115:"Octal literals are not allowed in strict mode.",W116:"Expected '{a}' and instead saw '{b}'.",W117:"'{a}' is not defined.",W118:"'{a}' is only available in Mozilla JavaScript extensions (use moz option).",W119:"'{a}' is only available in ES6 (use esnext option).",W120:"You might be leaking a variable ({a}) here."},o={I001:"Comma warnings can be turned off with 'laxcomma'.",I002:"Reserved words as properties can be used under the 'es5' option.",I003:"ES5 option is now set per default"};n.errors={},n.warnings={},n.info={},r.each(i,function(e,t){n.errors[t]={code:t,desc:e}}),r.each(s,function(e,t){n.warnings[t]={code:t,desc:e}}),r.each(o,function(e,t){n.info[t]={code:t,desc:e}})},{underscore:1}],3:[function(e,t,n){n.reservedVars={arguments:!1,NaN:!1},n.ecmaIdentifiers={Array:!1,Boolean:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,eval:!1,EvalError:!1,Function:!1,hasOwnProperty:!1,isFinite:!1,isNaN:!1,JSON:!1,Math:!1,Map:!1,Number:!1,Object:!1,parseInt:!1,parseFloat:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,Set:!1,String:!1,SyntaxError:!1,TypeError:!1,URIError:!1,WeakMap:!1},n.browser={ArrayBuffer:!1,ArrayBufferView:!1,Audio:!1,Blob:!1,addEventListener:!1,applicationCache:!1,atob:!1,blur:!1,btoa:!1,clearInterval:!1,clearTimeout:!1,close:!1,closed:!1,CustomEvent:!1,DataView:!1,DOMParser:!1,defaultStatus:!1,document:!1,Element:!1,ElementTimeControl:!1,event:!1,FileReader:!1,Float32Array:!1,Float64Array:!1,FormData:!1,focus:!1,frames:!1,getComputedStyle:!1,HTMLElement:!1,HTMLAnchorElement:!1,HTMLBaseElement:!1,HTMLBlockquoteElement:!1,HTMLBodyElement:!1,HTMLBRElement:!1,HTMLButtonElement:!1,HTMLCanvasElement:!1,HTMLDirectoryElement:!1,HTMLDivElement:!1,HTMLDListElement:!1,HTMLFieldSetElement:!1,HTMLFontElement:!1,HTMLFormElement:!1,HTMLFrameElement:!1,HTMLFrameSetElement:!1,HTMLHeadElement:!1,HTMLHeadingElement:!1,HTMLHRElement:!1,HTMLHtmlElement:!1,HTMLIFrameElement:!1,HTMLImageElement:!1,HTMLInputElement:!1,HTMLIsIndexElement:!1,HTMLLabelElement:!1,HTMLLayerElement:!1,HTMLLegendElement:!1,HTMLLIElement:!1,HTMLLinkElement:!1,HTMLMapElement:!1,HTMLMenuElement:!1,HTMLMetaElement:!1,HTMLModElement:!1,HTMLObjectElement:!1,HTMLOListElement:!1,HTMLOptGroupElement:!1,HTMLOptionElement:!1,HTMLParagraphElement:!1,HTMLParamElement:!1,HTMLPreElement:!1,HTMLQuoteElement:!1,HTMLScriptElement:!1,HTMLSelectElement:!1,HTMLStyleElement:!1,HTMLTableCaptionElement:!1,HTMLTableCellElement:!1,HTMLTableColElement:!1,HTMLTableElement:!1,HTMLTableRowElement:!1,HTMLTableSectionElement:!1,HTMLTextAreaElement:!1,HTMLTitleElement:!1,HTMLUListElement:!1,HTMLVideoElement:!1,history:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Image:!1,length:!1,localStorage:!1,location:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,MouseEvent:!1,moveBy:!1,moveTo:!1,MutationObserver:!1,name:!1,Node:!1,NodeFilter:!1,navigator:!1,onbeforeunload:!0,onblur:!0,onerror:!0,onfocus:!0,onload:!0,onresize:!0,onunload:!0,open:!1,openDatabase:!1,opener:!1,Option:!1,parent:!1,print:!1,removeEventListener:!1,resizeBy:!1,resizeTo:!1,screen:!1,scroll:!1,scrollBy:!1,scrollTo:!1,sessionStorage:!1,setInterval:!1,setTimeout:!1,SharedWorker:!1,status:!1,SVGAElement:!1,SVGAltGlyphDefElement:!1,SVGAltGlyphElement:!1,SVGAltGlyphItemElement:!1,SVGAngle:!1,SVGAnimateColorElement:!1,SVGAnimateElement:!1,SVGAnimateMotionElement:!1,SVGAnimateTransformElement:!1,SVGAnimatedAngle:!1,SVGAnimatedBoolean:!1,SVGAnimatedEnumeration:!1,SVGAnimatedInteger:!1,SVGAnimatedLength:!1,SVGAnimatedLengthList:!1,SVGAnimatedNumber:!1,SVGAnimatedNumberList:!1,SVGAnimatedPathData:!1,SVGAnimatedPoints:!1,SVGAnimatedPreserveAspectRatio:!1,SVGAnimatedRect:!1,SVGAnimatedString:!1,SVGAnimatedTransformList:!1,SVGAnimationElement:!1,SVGCSSRule:!1,SVGCircleElement:!1,SVGClipPathElement:!1,SVGColor:!1,SVGColorProfileElement:!1,SVGColorProfileRule:!1,SVGComponentTransferFunctionElement:!1,SVGCursorElement:!1,SVGDefsElement:!1,SVGDescElement:!1,SVGDocument:!1,SVGElement:!1,SVGElementInstance:!1,SVGElementInstanceList:!1,SVGEllipseElement:!1,SVGExternalResourcesRequired:!1,SVGFEBlendElement:!1,SVGFEColorMatrixElement:!1,SVGFEComponentTransferElement:!1,SVGFECompositeElement:!1,SVGFEConvolveMatrixElement:!1,SVGFEDiffuseLightingElement:!1,SVGFEDisplacementMapElement:!1,SVGFEDistantLightElement:!1,SVGFEFloodElement:!1,SVGFEFuncAElement:!1,SVGFEFuncBElement:!1,SVGFEFuncGElement:!1,SVGFEFuncRElement:!1,SVGFEGaussianBlurElement:!1,SVGFEImageElement:!1,SVGFEMergeElement:!1,SVGFEMergeNodeElement:!1,SVGFEMorphologyElement:!1,SVGFEOffsetElement:!1,SVGFEPointLightElement:!1,SVGFESpecularLightingElement:!1,SVGFESpotLightElement:!1,SVGFETileElement:!1,SVGFETurbulenceElement:!1,SVGFilterElement:!1,SVGFilterPrimitiveStandardAttributes:!1,SVGFitToViewBox:!1,SVGFontElement:!1,SVGFontFaceElement:!1,SVGFontFaceFormatElement:!1,SVGFontFaceNameElement:!1,SVGFontFaceSrcElement:!1,SVGFontFaceUriElement:!1,SVGForeignObjectElement:!1,SVGGElement:!1,SVGGlyphElement:!1,SVGGlyphRefElement:!1,SVGGradientElement:!1,SVGHKernElement:!1,SVGICCColor:!1,SVGImageElement:!1,SVGLangSpace:!1,SVGLength:!1,SVGLengthList:!1,SVGLineElement:!1,SVGLinearGradientElement:!1,SVGLocatable:!1,SVGMPathElement:!1,SVGMarkerElement:!1,SVGMaskElement:!1,SVGMatrix:!1,SVGMetadataElement:!1,SVGMissingGlyphElement:!1,SVGNumber:!1,SVGNumberList:!1,SVGPaint:!1,SVGPathElement:!1,SVGPathSeg:!1,SVGPathSegArcAbs:!1,SVGPathSegArcRel:!1,SVGPathSegClosePath:!1,SVGPathSegCurvetoCubicAbs:!1,SVGPathSegCurvetoCubicRel:!1,SVGPathSegCurvetoCubicSmoothAbs:!1,SVGPathSegCurvetoCubicSmoothRel:!1,SVGPathSegCurvetoQuadraticAbs:!1,SVGPathSegCurvetoQuadraticRel:!1,SVGPathSegCurvetoQuadraticSmoothAbs:!1,SVGPathSegCurvetoQuadraticSmoothRel:!1,SVGPathSegLinetoAbs:!1,SVGPathSegLinetoHorizontalAbs:!1,SVGPathSegLinetoHorizontalRel:!1,SVGPathSegLinetoRel:!1,SVGPathSegLinetoVerticalAbs:!1,SVGPathSegLinetoVerticalRel:!1,SVGPathSegList:!1,SVGPathSegMovetoAbs:!1,SVGPathSegMovetoRel:!1,SVGPatternElement:!1,SVGPoint:!1,SVGPointList:!1,SVGPolygonElement:!1,SVGPolylineElement:!1,SVGPreserveAspectRatio:!1,SVGRadialGradientElement:!1,SVGRect:!1,SVGRectElement:!1,SVGRenderingIntent:!1,SVGSVGElement:!1,SVGScriptElement:!1,SVGSetElement:!1,SVGStopElement:!1,SVGStringList:!1,SVGStylable:!1,SVGStyleElement:!1,SVGSwitchElement:!1,SVGSymbolElement:!1,SVGTRefElement:!1,SVGTSpanElement:!1,SVGTests:!1,SVGTextContentElement:!1,SVGTextElement:!1,SVGTextPathElement:!1,SVGTextPositioningElement:!1,SVGTitleElement:!1,SVGTransform:!1,SVGTransformList:!1,SVGTransformable:!1,SVGURIReference:!1,SVGUnitTypes:!1,SVGUseElement:!1,SVGVKernElement:!1,SVGViewElement:!1,SVGViewSpec:!1,SVGZoomAndPan:!1,TimeEvent:!1,top:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,WebSocket:!1,window:!1,Worker:!1,XMLHttpRequest:!1,XMLSerializer:!1,XPathEvaluator:!1,XPathException:!1,XPathExpression:!1,XPathNamespace:!1,XPathNSResolver:!1,XPathResult:!1},n.devel={alert:!1,confirm:!1,console:!1,Debug:!1,opera:!1,prompt:!1},n.worker={importScripts:!0,postMessage:!0,self:!0},n.nonstandard={escape:!1,unescape:!1},n.couch={require:!1,respond:!1,getRow:!1,emit:!1,send:!1,start:!1,sum:!1,log:!1,exports:!1,module:!1,provides:!1},n.node={__filename:!1,__dirname:!1,Buffer:!1,DataView:!1,console:!1,exports:!0,GLOBAL:!1,global:!1,module:!1,process:!1,require:!1,setTimeout:!1,clearTimeout:!1,setInterval:!1,clearInterval:!1,setImmediate:!1,clearImmediate:!1},n.phantom={phantom:!0,require:!0,WebPage:!0},n.rhino={defineClass:!1,deserialize:!1,gc:!1,help:!1,importPackage:!1,java:!1,load:!1,loadClass:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},n.shelljs={target:!1,echo:!1,exit:!1,cd:!1,pwd:!1,ls:!1,find:!1,cp:!1,rm:!1,mv:!1,mkdir:!1,test:!1,cat:!1,sed:!1,grep:!1,which:!1,dirs:!1,pushd:!1,popd:!1,env:!1,exec:!1,chmod:!1,config:!1,error:!1,tempdir:!1},n.wsh={ActiveXObject:!0,Enumerator:!0,GetObject:!0,ScriptEngine:!0,ScriptEngineBuildVersion:!0,ScriptEngineMajorVersion:!0,ScriptEngineMinorVersion:!0,VBArray:!0,WSH:!0,WScript:!0,XDomainRequest:!0},n.dojo={dojo:!1,dijit:!1,dojox:!1,define:!1,require:!1},n.jquery={$:!1,jQuery:!1},n.mootools={$:!1,$$:!1,Asset:!1,Browser:!1,Chain:!1,Class:!1,Color:!1,Cookie:!1,Core:!1,Document:!1,DomReady:!1,DOMEvent:!1,DOMReady:!1,Drag:!1,Element:!1,Elements:!1,Event:!1,Events:!1,Fx:!1,Group:!1,Hash:!1,HtmlTable:!1,Iframe:!1,IframeShim:!1,InputValidator:!1,instanceOf:!1,Keyboard:!1,Locale:!1,Mask:!1,MooTools:!1,Native:!1,Options:!1,OverText:!1,Request:!1,Scroller:!1,Slick:!1,Slider:!1,Sortables:!1,Spinner:!1,Swiff:!1,Tips:!1,Type:!1,typeOf:!1,URI:!1,Window:!1},n.prototypejs={$:!1,$$:!1,$A:!1,$F:!1,$H:!1,$R:!1,$break:!1,$continue:!1,$w:!1,Abstract:!1,Ajax:!1,Class:!1,Enumerable:!1,Element:!1,Event:!1,Field:!1,Form:!1,Hash:!1,Insertion:!1,ObjectRange:!1,PeriodicalExecuter:!1,Position:!1,Prototype:!1,Selector:!1,Template:!1,Toggle:!1,Try:!1,Autocompleter:!1,Builder:!1,Control:!1,Draggable:!1,Draggables:!1,Droppables:!1,Effect:!1,Sortable:!1,SortableObserver:!1,Sound:!1,Scriptaculous:!1},n.yui={YUI:!1,Y:!1,YUI_config:!1}},{}],n4bKNg:[function(e,t,n){var r=e("underscore"),i=e("events"),s=e("../shared/vars.js"),o=e("../shared/messages.js"),u=e("./lex.js").Lexer,a=e("./reg.js"),f=e("./state.js").state,l=e("./style.js"),c=e("console-browserify"),h=function(){function e(e,t){return e=e.trim(),/^[+-]W\d{3}$/g.test(e)?!0:Ot[e]===undefined&&At[e]===undefined&&t.type!=="jslint"?(E("E001",t,e),!1):!0}function t(e){return Object.prototype.toString.call(e)==="[object String]"}function n(e,t){return e?!e.identifier||e.value!==t?!1:!0:!1}function c(e){if(!e.reserved)return!1;var t=e.meta;if(t&&t.isFutureReservedWord&&f.option.inES5()){if(!t.es5)return!1;if(t.strictOnly&&!f.option.strict&&!f.directive["use strict"])return!1;if(e.isProperty)return!1}return!0}function p(e,t){return e.replace(/\{([^{}]*)\}/g,function(e,n){var r=t[n];return typeof r=="string"||typeof r=="number"?r:e})}function d(e,t){var n;for(n in t)r.has(t,n)&&!r.has(h.blacklist,n)&&(e[n]=t[n])}function v(){Object.keys(h.blacklist).forEach(function(e){delete $t[e]})}function m(){f.option.couch&&d($t,s.couch),f.option.rhino&&d($t,s.rhino),f.option.shelljs&&(d($t,s.shelljs),d($t,s.node)),f.option.phantom&&d($t,s.phantom),f.option.prototypejs&&d($t,s.prototypejs),f.option.node&&d($t,s.node),f.option.devel&&d($t,s.devel),f.option.dojo&&d($t,s.dojo),f.option.browser&&d($t,s.browser),f.option.nonstandard&&d($t,s.nonstandard),f.option.jquery&&d($t,s.jquery),f.option.mootools&&d($t,s.mootools),f.option.worker&&d($t,s.worker),f.option.wsh&&d($t,s.wsh),f.option.globalstrict&&f.option.strict!==!1&&(f.option.strict=!0),f.option.yui&&d($t,s.yui),f.option.inMoz=function(e){return f.option.moz},f.option.inESNext=function(e){return f.option.moz||f.option.esnext},f.option.inES5=function(){return!f.option.es3},f.option.inES3=function(e){return e?!f.option.moz&&!f.option.esnext&&f.option.es3:f.option.es3}}function g(e,t,n){var r=Math.floor(t/f.lines.length*100),i=o.errors[e].desc;throw{name:"JSHintError",line:t,character:n,message:i+" ("+r+"% scanned).",raw:i,code:e}}function y(e,t,n,r){return h.undefs.push([e,t,n,r])}function b(e,t,n,r,i,s){var u,a,l,c;if(/^W\d{3}$/.test(e)){if(f.ignored[e])return;c=o.warnings[e]}else/E\d{3}/.test(e)?c=o.errors[e]:/I\d{3}/.test(e)&&(c=o.info[e]);return t=t||f.tokens.next,t.id==="(end)"&&(t=f.tokens.curr),a=t.line||0,u=t.from||0,l={id:"(error)",raw:c.desc,code:c.code,evidence:f.lines[a-1]||"",line:a,character:u,scope:h.scope,a:n,b:r,c:i,d:s},l.reason=p(c.desc,l),h.errors.push(l),f.option.passfail&&g("E042",a,u),Yt+=1,Yt>=f.option.maxerr&&g("E043",a,u),l}function w(e,t,n,r,i,s,o){return b(e,{line:t,from:n},r,i,s,o)}function E(e,t,n,r,i,s){b(e,t,n,r,i,s)}function S(e,t,n,r,i,s,o){return E(e,{line:t,from:n},r,i,s,o)}function x(e,t){var n;return n={id:"(internal)",elem:e,value:t},h.internals.push(n),n}function T(e,t,n,i){t==="exception"&&r.has(Bt["(context)"],e)&&Bt[e]!==!0&&!f.option.node&&b("W002",f.tokens.next,e),r.has(Bt,e)&&!Bt["(global)"]&&(Bt[e]===!0?f.option.latedef&&(f.option.latedef===!0&&r.contains([Bt[e],t],"unction")||!r.contains([Bt[e],t],"unction"))&&b("W003",f.tokens.next,e):(!f.option.shadow&&t!=="exception"||Bt["(blockscope)"].getlabel(e))&&b("W004",f.tokens.next,e)),Bt["(blockscope)"]&&Bt["(blockscope)"].current.has(e)&&E("E044",f.tokens.next,e),i?Bt["(blockscope)"].current.add(e,t,f.tokens.curr):(Bt[e]=t,n&&(Bt["(tokens)"][e]=n),Bt["(global)"]?(Ft[e]=Bt,r.has(It,e)&&(f.option.latedef&&(f.option.latedef===!0&&r.contains([Bt[e],t],"unction")||!r.contains([Bt[e],t],"unction"))&&b("W003",f.tokens.next,e),delete It[e])):Jt[e]=Bt)}function N(){var t=f.tokens.next,n=t.body.match(/(-\s+)?[^\s,]+(?:\s*:\s*(-\s+)?[^\s,]+)?/g),i={};if(t.type==="globals"){n.forEach(function(e){e=e.split(":");var t=(e[0]||"").trim(),n=(e[1]||"").trim();t.charAt(0)==="-"?(t=t.slice(1),n=!1,h.blacklist[t]=t,v()):i[t]=n==="true"}),d($t,i);for(var s in i)r.has(i,s)&&(Dt[s]=t)}t.type==="exported"&&n.forEach(function(e){Pt[e]=!0}),t.type==="members"&&(Xt=Xt||{},n.forEach(function(e){var t=e.charAt(0),n=e.charAt(e.length-1);t===n&&(t==='"'||t==="'")&&(e=e.substr(1,e.length-2).replace("\\b","\b").replace("\\t","	").replace("\\n","\n").replace("\\v","").replace("\\f","\f").replace("\\r","\r").replace("\\\\","\\").replace('\\"','"')),Xt[e]=!1}));var o=["maxstatements","maxparams","maxdepth","maxcomplexity","maxerr","maxlen","indent"];if(t.type==="jshint"||t.type==="jslint")n.forEach(function(n){n=n.split(":");var r=(n[0]||"").trim(),i=(n[1]||"").trim();if(!e(r,t))return;if(o.indexOf(r)>=0){if(i!=="false"){i=+i;if(typeof i!="number"||!isFinite(i)||i<=0||Math.floor(i)!==i){E("E032",t,n[1].trim());return}r==="indent"&&(f.option["(explicitIndent)"]=!0),f.option[r]=i}else r==="indent"?f.option["(explicitIndent)"]=!1:f.option[r]=!1;return}if(r==="validthis"){Bt["(global)"]?E("E009"):i==="true"||i==="false"?f.option.validthis=i==="true":E("E002",t);return}if(r==="quotmark"){switch(i){case"true":case"false":f.option.quotmark=i==="true";break;case"double":case"single":f.option.quotmark=i;break;default:E("E002",t)}return}if(r==="unused"){switch(i){case"true":f.option.unused=!0;break;case"false":f.option.unused=!1;break;case"vars":case"strict":f.option.unused=i;break;default:E("E002",t)}return}if(r==="latedef"){switch(i){case"true":f.option.latedef=!0;break;case"false":f.option.latedef=!1;break;case"nofunc":f.option.latedef="nofunc";break;default:E("E002",t)}return}var s=/^([+-])(W\d{3})$/g.exec(r);if(s){f.ignored[s[2]]=s[1]==="-";return}var u;if(i==="true"||i==="false"){t.type==="jslint"?(u=_t[r]||r,f.option[u]=i==="true",Mt[u]!==undefined&&(f.option[u]=!f.option[u])):f.option[r]=i==="true",r==="newcap"&&(f.option["(explicitNewcap)"]=!0);return}E("E002",t)}),m()}function C(e){var t=e||0,n=0,r;while(n<=t)r=Ut[n],r||(r=Ut[n]=zt.token()),n+=1;return r}function k(e,t){switch(f.tokens.curr.id){case"(number)":f.tokens.next.id==="."&&b("W005",f.tokens.curr);break;case"-":(f.tokens.next.id==="-"||f.tokens.next.id==="--")&&b("W006");break;case"+":(f.tokens.next.id==="+"||f.tokens.next.id==="++")&&b("W007")}if(f.tokens.curr.type==="(string)"||f.tokens.curr.identifier)Ct=f.tokens.curr.value;e&&f.tokens.next.id!==e&&(t?f.tokens.next.id==="(end)"?E("E019",t,t.id):E("E020",f.tokens.next,e,t.id,t.line,f.tokens.next.value):(f.tokens.next.type!=="(identifier)"||f.tokens.next.value!==e)&&b("W116",f.tokens.next,e,f.tokens.next.value)),f.tokens.prev=f.tokens.curr,f.tokens.curr=f.tokens.next;for(;;){f.tokens.next=Ut.shift()||zt.token(),f.tokens.next||g("E041",f.tokens.curr.line);if(f.tokens.next.id==="(end)"||f.tokens.next.id==="(error)")return;f.tokens.next.check&&f.tokens.next.check();if(f.tokens.next.isSpecial)N();else if(f.tokens.next.id!=="(endline)")break}}function L(e){return e.infix||!e.identifier&&!!e.led}function A(){var e=f.tokens.curr,t=f.tokens.next;return t.id===";"||t.id==="}"||t.id===":"?!0:L(t)===L(e)||e.id==="yield"&&f.option.inMoz(!0)?e.line!==t.line:!1}function O(e,t){var n,r=!1,i=!1,s=!1;!t&&f.tokens.next.value==="let"&&C(0).value==="("&&(f.option.inMoz(!0)||b("W118",f.tokens.next,"let expressions"),s=!0,Bt["(blockscope)"].stack(),k("let"),k("("),f.syntax.let.fud.call(f.syntax.let.fud,!1),k(")")),f.tokens.next.id==="(end)"&&E("E006",f.tokens.curr),k(),t&&(Ct="anonymous",Bt["(verb)"]=f.tokens.curr.value);if(t===!0&&f.tokens.curr.fud)n=f.tokens.curr.fud();else{f.tokens.curr.nud?n=f.tokens.curr.nud():E("E030",f.tokens.curr,f.tokens.curr.id);while(e<f.tokens.next.lbp&&!A())r=f.tokens.curr.value==="Array",i=f.tokens.curr.value==="Object",n&&(n.value||n.first&&n.first.value)&&(n.value!=="new"||n.first&&n.first.value&&n.first.value===".")&&(r=!1,n.value!==f.tokens.curr.value&&(i=!1)),k(),r&&f.tokens.curr.id==="("&&f.tokens.next.id===")"&&b("W009",f.tokens.curr),i&&f.tokens.curr.id==="("&&f.tokens.next.id===")"&&b("W010",f.tokens.curr),n&&f.tokens.curr.led?n=f.tokens.curr.led(n):E("E033",f.tokens.curr,f.tokens.curr.id)}return s&&Bt["(blockscope)"].unstack(),n}function M(e,t){e=e||f.tokens.curr,t=t||f.tokens.next,f.option.white&&e.character!==t.from&&e.line===t.line&&(e.from+=e.character-e.from,b("W011",e,e.value))}function _(e,t){e=e||f.tokens.curr,t=t||f.tokens.next,f.option.white&&(e.character!==t.from||e.line!==t.line)&&b("W012",t,t.value)}function D(e,t){e=e||f.tokens.curr,t=t||f.tokens.next,f.option.white&&!e.comment&&e.line===t.line&&M(e,t)}function P(e,t){if(f.option.white){e=e||f.tokens.curr,t=t||f.tokens.next;if(e.value===";"&&t.value===";")return;e.line===t.line&&e.character===t.from&&(e.from+=e.character-e.from,b("W013",e,e.value))}}function H(e,t){e=e||f.tokens.curr,t=t||f.tokens.next,!f.option.laxbreak&&e.line!==t.line?b("W014",t,t.value):f.option.white&&(e=e||f.tokens.curr,t=t||f.tokens.next,e.character===t.from&&(e.from+=e.character-e.from,b("W013",e,e.value)))}function B(e){if(!f.option.white&&!f.option["(explicitIndent)"])return;if(f.tokens.next.id==="(end)")return;var t=Rt+(e||0);f.tokens.next.from!==t&&b("W015",f.tokens.next,f.tokens.next.value,t,f.tokens.next.from)}function j(e){e=e||f.tokens.curr,e.line!==f.tokens.next.line&&b("E022",e,e.value)}function F(e,t){e.line!==t.line?f.option.laxcomma||(I.first&&(b("I001"),I.first=!1),b("W014",e,t.value)):!e.comment&&e.character!==t.from&&f.option.white&&(e.from+=e.character-e.from,b("W011",e,e.value))}function I(e){e=e||{},e.peek?F(f.tokens.prev,f.tokens.curr):(F(f.tokens.curr,f.tokens.next),k(",")),f.tokens.next.value!=="]"&&f.tokens.next.value!=="}"&&P(f.tokens.curr,f.tokens.next);if(f.tokens.next.identifier&&(!e.property||!f.option.inES5()))switch(f.tokens.next.value){case"break":case"case":case"catch":case"continue":case"default":case"do":case"else":case"finally":case"for":case"if":case"in":case"instanceof":case"return":case"switch":case"throw":case"try":case"var":case"let":case"while":case"with":return E("E024",f.tokens.next,f.tokens.next.value),!1}if(f.tokens.next.type==="(punctuator)")switch(f.tokens.next.value){case"}":case"]":case",":if(e.allowTrailing)return!0;case")":return E("E024",f.tokens.next,f.tokens.next.value),!1}return!0}function q(e,t){var n=f.syntax[e];if(!n||typeof n!="object")f.syntax[e]=n={id:e,lbp:t,value:e};return n}function R(e){return q(e,0)}function U(e,t){var n=R(e);return n.identifier=n.reserved=!0,n.fud=t,n}function z(e,t){var n=U(e,t);return n.block=!0,n}function W(e){var t=e.id.charAt(0);if(t>="a"&&t<="z"||t>="A"&&t<="Z")e.identifier=e.reserved=!0;return e}function X(e,t){var n=q(e,150);return W(n),n.nud=typeof t=="function"?t:function(){this.right=O(150),this.arity="unary";if(this.id==="++"||this.id==="--")f.option.plusplus?b("W016",this,this.id):(!this.right.identifier||c(this.right))&&this.right.id!=="."&&this.right.id!=="["&&b("W017",this);return this},n}function V(e,t){var n=R(e);return n.type=e,n.nud=t,n}function $(e,t){var n=V(e,t);return n.identifier=!0,n.reserved=!0,n}function J(e,t){var n=V(e,t&&t.nud||function(){return this});return t=t||{},t.isFutureReservedWord=!0,n.value=e,n.identifier=!0,n.reserved=!0,n.meta=t,n}function K(e,t){return $(e,function(){return typeof t=="function"&&t(this),this})}function Q(e,t,n,r){var i=q(e,n);return W(i),i.infix=!0,i.led=function(i){return r||(H(f.tokens.prev,f.tokens.curr),P(f.tokens.curr,f.tokens.next)),e==="in"&&i.id==="!"&&b("W018",i,"!"),typeof t=="function"?t(i,this):(this.left=i,this.right=O(n),this)},i}function G(e){var t=q(e,42);return t.led=function(e){return f.option.inESNext()||b("W104",f.tokens.curr,"arrow function syntax (=>)"),H(f.tokens.prev,f.tokens.curr),P(f.tokens.curr,f.tokens.next),this.left=e,this.right=mt(undefined,undefined,!1,e),this},t}function Y(e,t){var r=q(e,100);return r.led=function(e){H(f.tokens.prev,f.tokens.curr),P(f.tokens.curr,f.tokens.next);var r=O(100);return n(e,"NaN")||n(r,"NaN")?b("W019",this):t&&t.apply(this,[e,r]),(!e||!r)&&g("E041",f.tokens.curr.line),e.id==="!"&&b("W018",e,"!"),r.id==="!"&&b("W018",r,"!"),this.left=e,this.right=r,this},r}function Z(e){return e&&(e.type==="(number)"&&+e.value===0||e.type==="(string)"&&e.value===""||e.type==="null"&&!f.option.eqnull||e.type==="true"||e.type==="false"||e.type==="undefined")}function et(e,t,n){var r=Q(e,typeof t=="function"?t:function(e,t){t.left=e;if(e){$t[e.value]===!1&&Jt[e.value]["(global)"]===!0?b("W020",e):e["function"]&&b("W021",e,e.value),Bt[e.value]==="const"&&E("E013",e,e.value);if(e.id===".")return e.left?e.left.value==="arguments"&&!f.directive["use strict"]&&b("E031",t):b("E031",t),t.right=O(10),t;if(e.id==="[")return f.tokens.curr.left.first?f.tokens.curr.left.first.forEach(function(e){Bt[e.value]==="const"&&E("E013",e,e.value)}):e.left?e.left.value==="arguments"&&!f.directive["use strict"]&&b("E031",t):b("E031",t),t.right=O(10),t;if(e.identifier&&!c(e))return Bt[e.value]==="exception"&&b("W022",e),t.right=O(10),t;e===f.syntax["function"]&&b("W023",f.tokens.curr)}E("E031",t)},n);return r.exps=!0,r.assign=!0,r}function tt(e,t,n){var r=q(e,n);return W(r),r.led=typeof t=="function"?t:function(e){return f.option.bitwise&&b("W016",this,this.id),this.left=e,this.right=O(n),this},r}function nt(e){return et(e,function(e,t){f.option.bitwise&&b("W016",t,t.id),P(f.tokens.prev,f.tokens.curr),P(f.tokens.curr,f.tokens.next);if(e)return e.id==="."||e.id==="["||e.identifier&&!c(e)?(O(10),t):(e===f.syntax["function"]&&b("W023",f.tokens.curr),t);E("E031",t)},20)}function rt(e){var t=q(e,150);return t.led=function(e){return f.option.plusplus?b("W016",this,this.id):(!e.identifier||c(e))&&e.id!=="."&&e.id!=="["&&b("W017",this),this.left=e,this},t}function it(e,t){if(!f.tokens.next.identifier)return;k();var n=f.tokens.curr,r=f.tokens.curr.value;return c(n)?t&&f.option.inES5()?r:e&&r==="undefined"?r:(t&&!kt.getCache("displayed:I002")&&(kt.setCache("displayed:I002",!0),b("I002")),b("W024",f.tokens.curr,f.tokens.curr.id),r):r}function st(e,t){var n=it(e,t);if(n)return n;f.tokens.curr.id==="function"&&f.tokens.next.id==="("?b("W025"):E("E030",f.tokens.next,f.tokens.next.value)}function ot(e){var t=0,n;if(f.tokens.next.id!==";"||Vt)return;for(;;){n=C(t);if(n.reach)return;if(n.id!=="(endline)"){if(n.id==="function"){if(!f.option.latedef)break;b("W026",n);break}b("W027",n,n.value,e);break}t+=1}}function ut(e){var t,n=Rt,i,s=Jt,o=f.tokens.next;if(o.id===";"){k(";");return}var u=c(o);u&&o.meta&&o.meta.isFutureReservedWord&&C().id===":"&&(b("W024",o,o.id),u=!1);if(r.has(["[","{"],o.value)&&on().isDestAssign){f.option.inESNext()||b("W104",f.tokens.curr,"destructuring expression"),t=wt(),t.forEach(function(e){y(Bt,"W117",e.token,e.id)}),k("="),Et(t,O(10,!0)),k(";");return}o.identifier&&!u&&C().id===":"&&(k(),k(":"),Jt=Object.create(s),T(o.value,"label"),!f.tokens.next.labelled&&f.tokens.next.value!=="{"&&b("W028",f.tokens.next,o.value,f.tokens.next.value),f.tokens.next.label=o.value,o=f.tokens.next);if(o.id==="{"){lt(!0,!0);return}return e||B(),i=O(0,!0),o.block||(!f.option.expr&&(!i||!i.exps)?b("W030",f.tokens.curr):f.option.nonew&&i&&i.left&&i.id==="("&&i.left.id==="new"&&b("W031",o),f.tokens.next.id!==";"?f.option.asi||(!f.option.lastsemic||f.tokens.next.id!=="}"||f.tokens.next.line!==f.tokens.curr.line)&&w("W033",f.tokens.curr.line,f.tokens.curr.character):(M(f.tokens.curr,f.tokens.next),k(";"),P(f.tokens.curr,f.tokens.next))),Rt=n,Jt=s,i}function at(e){var t=[],n;while(!f.tokens.next.reach&&f.tokens.next.id!=="(end)")f.tokens.next.id===";"?(n=C(),(!n||n.id!=="("&&n.id!=="[")&&b("W032"),k(";")):t.push(ut(e===f.tokens.next.line));return t}function ft(){var e,t,n;for(;;){if(f.tokens.next.id==="(string)"){t=C(0);if(t.id==="(endline)"){e=1;do n=C(e),e+=1;while(n.id==="(endline)");if(n.id!==";"){if(n.id!=="(string)"&&n.id!=="(number)"&&n.id!=="(regexp)"&&n.identifier!==!0&&n.id!=="}")break;b("W033",f.tokens.next)}else t=n}else if(t.id==="}")b("W033",t);else if(t.id!==";")break;B(),k(),f.directive[f.tokens.curr.value]&&b("W034",f.tokens.curr,f.tokens.curr.value),f.tokens.curr.value==="use strict"&&(f.option["(explicitNewcap)"]||(f.option.newcap=!0),f.option.undef=!0),f.directive[f.tokens.curr.value]=!0,t.id===";"&&k(";");continue}break}}function lt(e,t,n,i){var s,o=qt,u=Rt,a,l=Jt,c,h,p;qt=e;if(!e||!f.option.funcscope)Jt=Object.create(Jt);P(f.tokens.curr,f.tokens.next),c=f.tokens.next;var d=Bt["(metrics)"];d.nestedBlockDepth+=1,d.verifyMaxNestedBlockDepthPerFunction();if(f.tokens.next.id==="{"){k("{"),Bt["(blockscope)"].stack(),h=f.tokens.curr.line;if(f.tokens.next.id!=="}"){Rt+=f.option.indent;while(!e&&f.tokens.next.from>Rt)Rt+=f.option.indent;if(n){a={};for(p in f.directive)r.has(f.directive,p)&&(a[p]=f.directive[p]);ft(),f.option.strict&&Bt["(context)"]["(global)"]&&!a["use strict"]&&!f.directive["use strict"]&&b("E007")}s=at(h),d.statementCount+=s.length,n&&(f.directive=a),Rt-=f.option.indent,h!==f.tokens.next.line&&B()}else h!==f.tokens.next.line&&B();k("}",c),Bt["(blockscope)"].unstack(),Rt=u}else if(!e)if(n){a={},t&&!i&&!f.option.inMoz(!0)&&E("W118",f.tokens.curr,"function closure expressions");if(!t)for(p in f.directive)r.has(f.directive,p)&&(a[p]=f.directive[p]);O(10),f.option.strict&&Bt["(context)"]["(global)"]&&!a["use strict"]&&!f.directive["use strict"]&&b("E007")}else E("E021",f.tokens.next,"{",f.tokens.next.value);else Bt["(nolet)"]=!0,(!t||f.option.curly)&&b("W116",f.tokens.next,"{",f.tokens.next.value),Vt=!0,Rt+=f.option.indent,s=[ut(f.tokens.next.line===f.tokens.curr.line)],Rt-=f.option.indent,Vt=!1,delete Bt["(nolet)"];Bt["(verb)"]=null;if(!e||!f.option.funcscope)Jt=l;return qt=o,e&&f.option.noempty&&(!s||s.length===0)&&b("W035"),d.nestedBlockDepth-=1,s}function ct(e){Xt&&typeof Xt[e]!="boolean"&&b("W036",f.tokens.curr,e),typeof Wt[e]=="number"?Wt[e]+=1:Wt[e]=1}function ht(e){var t=e.value,n=e.line,r=It[t];typeof r=="function"&&(r=!1),r?r[r.length-1]!==n&&r.push(n):(r=[n],It[t]=r)}function pt(){var e={};return e.exps=!0,Bt["(comparray)"].stack(),e.right=O(10),k("for"),f.tokens.next.value==="each"&&(k("each"),f.option.inMoz(!0)||b("W118",f.tokens.curr,"for each")),k("("),Bt["(comparray)"].setState("define"),e.left=O(10),k(")"),f.tokens.next.value==="if"&&(k("if"),k("("),Bt["(comparray)"].setState("filter"),e.filter=O(10),k(")")),k("]"),Bt["(comparray)"].unstack(),e}function dt(){var e=it(!1,!0);return e||(f.tokens.next.id==="(string)"?(e=f.tokens.next.value,k()):f.tokens.next.id==="(number)"&&(e=f.tokens.next.value.toString(),k())),e==="hasOwnProperty"&&b("W001"),e}function vt(e){var t,n,i=[],s,o=[],u,a=!1;if(e){if(e instanceof Array){for(var l in e){t=e[l];if(r.contains(["{","["],t.id))for(u in t.left)u=o[u],u.id&&(i.push(u.id),T(u.id,"unused",u.token));else{if(t.value==="..."){f.option.inESNext()||b("W104",t,"spread/rest operator");continue}T(t.value,"unused",t)}}return i}if(e.identifier===!0)return T(e.value,"unused",e),[e]}n=f.tokens.next,k("("),D();if(f.tokens.next.id===")"){k(")");return}for(;;){if(r.contains(["{","["],f.tokens.next.id)){o=wt();for(u in o)u=o[u],u.id&&(i.push(u.id),T(u.id,"unused",u.token))}else f.tokens.next.value==="..."?(f.option.inESNext()||b("W104",f.tokens.next,"spread/rest operator"),k("..."),D(),s=st(!0),i.push(s),T(s,"unused",f.tokens.curr)):(s=st(!0),i.push(s),T(s,"unused",f.tokens.curr));a&&f.tokens.next.id!=="="&&E("E051",f.tokens.current),f.tokens.next.id==="="&&(f.option.inESNext()||b("W119",f.tokens.next,"default parameters"),k("="),a=!0,O(10));if(f.tokens.next.id!==",")return k(")",n),D(f.tokens.prev,f.tokens.curr),i;I()}}function mt(e,t,n,r){var i,s=f.option,o=f.ignored,u=Jt;return f.option=Object.create(f.option),f.ignored=Object.create(f.ignored),Jt=Object.create(Jt),Bt={"(name)":e||'"'+Ct+'"',"(line)":f.tokens.next.line,"(character)":f.tokens.next.character,"(context)":Bt,"(breakage)":0,"(loopage)":0,"(metrics)":gt(f.tokens.next),"(scope)":Jt,"(statement)":t,"(tokens)":{},"(blockscope)":Bt["(blockscope)"],"(comparray)":Bt["(comparray)"]},n&&(Bt["(generator)"]=!0),i=Bt,f.tokens.curr.funct=Bt,jt.push(Bt),e&&T(e,"function"),Bt["(params)"]=vt(r),Bt["(metrics)"].verifyMaxParametersPerFunction(Bt["(params)"]),lt(!1,!0,!0,r?!0:!1),n&&Bt["(generator)"]!=="yielded"&&E("E047",f.tokens.curr),Bt["(metrics)"].verifyMaxStatementsPerFunction(),Bt["(metrics)"].verifyMaxComplexityPerFunction(),Bt["(unusedOption)"]=f.option.unused,Jt=u,f.option=s,f.ignored=o,Bt["(last)"]=f.tokens.curr.line,Bt["(lastcharacter)"]=f.tokens.curr.character,Bt=Bt["(context)"],i}function gt(e){return{statementCount:0,nestedBlockDepth:-1,ComplexityCount:1,verifyMaxStatementsPerFunction:function(){f.option.maxstatements&&this.statementCount>f.option.maxstatements&&b("W071",e,this.statementCount)},verifyMaxParametersPerFunction:function(t){t=t||[],f.option.maxparams&&t.length>f.option.maxparams&&b("W072",e,t.length)},verifyMaxNestedBlockDepthPerFunction:function(){f.option.maxdepth&&this.nestedBlockDepth>0&&this.nestedBlockDepth===f.option.maxdepth+1&&b("W073",null,this.nestedBlockDepth)},verifyMaxComplexityPerFunction:function(){var t=f.option.maxcomplexity,n=this.ComplexityCount;t&&n>t&&b("W074",e,n)}}}function yt(){Bt["(metrics)"].ComplexityCount+=1}function bt(e){var t,n;e&&(t=e.id,n=e.paren,t===","&&(e=e.exprs[e.exprs.length-1])&&(t=e.id,n=n||e.paren));switch(t){case"=":case"+=":case"-=":case"*=":case"%=":case"&=":case"|=":case"^=":case"/=":!n&&!f.option.boss&&b("W084")}}function wt(){var e,t,n=[];f.option.inESNext()||b("W104",f.tokens.curr,"destructuring expression");var i=function(){var e;if(r.contains(["[","{"],f.tokens.next.value)){t=wt();for(var i in t)i=t[i],n.push({id:i.id,token:i.token})}else f.tokens.next.value===","?n.push({id:null,token:f.tokens.curr}):(e=st(),e&&n.push({id:e,token:f.tokens.curr}))};if(f.tokens.next.value==="["){k("["),i();while(f.tokens.next.value!=="]")k(","),i();k("]")}else if(f.tokens.next.value==="{"){k("{"),e=st(),f.tokens.next.value===":"?(k(":"),i()):n.push({id:e,token:f.tokens.curr});while(f.tokens.next.value!=="}")k(","),e=st(),f.tokens.next.value===":"?(k(":"),i()):n.push({id:e,token:f.tokens.curr});k("}")}return n}function Et(e,t){t.first&&r.zip(e,t.first).forEach(function(e){var t=e[0],n=e[1];t&&n?t.first=n:t&&t.first&&!n&&b("W080",t.first,t.first.value)})}function St(e){return f.option.inESNext()||b("W104",f.tokens.curr,"class"),e?(this.name=st(),T(this.name,"unused",f.tokens.curr)):f.tokens.next.identifier&&f.tokens.next.value!=="extends"&&(this.name=st()),xt(this),this}function xt(e){var t=f.directive["use strict"];f.tokens.next.value==="extends"&&(k("extends"),e.heritage=O(10)),f.directive["use strict"]=!0,k("{"),e.body=f.syntax["{"].nud(!0),f.directive["use strict"]=t}function Tt(){var e=on();e.notJson?(!f.option.inESNext()&&e.isDestAssign&&b("W104",f.tokens.curr,"destructuring assignment"),at()):(f.option.laxbreak=!0,f.jsonMode=!0,Nt())}function Nt(){function e(){var e={},t=f.tokens.next;k("{");if(f.tokens.next.id!=="}")for(;;){if(f.tokens.next.id==="(end)")E("E026",f.tokens.next,t.line);else{if(f.tokens.next.id==="}"){b("W094",f.tokens.curr);break}f.tokens.next.id===","?E("E028",f.tokens.next):f.tokens.next.id!=="(string)"&&b("W095",f.tokens.next,f.tokens.next.value)}e[f.tokens.next.value]===!0?b("W075",f.tokens.next,f.tokens.next.value):f.tokens.next.value==="__proto__"&&!f.option.proto||f.tokens.next.value==="__iterator__"&&!f.option.iterator?b("W096",f.tokens.next,f.tokens.next.value):e[f.tokens.next.value]=!0,k(),k(":"),Nt();if(f.tokens.next.id!==",")break;k(",")}k("}")}function t(){var e=f.tokens.next;k("[");if(f.tokens.next.id!=="]")for(;;){if(f.tokens.next.id==="(end)")E("E027",f.tokens.next,e.line);else{if(f.tokens.next.id==="]"){b("W094",f.tokens.curr);break}f.tokens.next.id===","&&E("E028",f.tokens.next)}Nt();if(f.tokens.next.id!==",")break;k(",")}k("]")}switch(f.tokens.next.id){case"{":e();break;case"[":t();break;case"true":case"false":case"null":case"(number)":case"(string)":k();break;case"-":k("-"),f.tokens.curr.character!==f.tokens.next.from&&b("W011",f.tokens.curr),M(f.tokens.curr,f.tokens.next),k("(number)");break;default:E("E003",f.tokens.next)}}var Ct,kt,Lt={"<":!0,"<=":!0,"==":!0,"===":!0,"!==":!0,"!=":!0,">":!0,">=":!0,"+":!0,"-":!0,"*":!0,"/":!0,"%":!0},At={asi:!0,bitwise:!0,boss:!0,browser:!0,camelcase:!0,couch:!0,curly:!0,debug:!0,devel:!0,dojo:!0,eqeqeq:!0,eqnull:!0,es3:!0,es5:!0,esnext:!0,moz:!0,evil:!0,expr:!0,forin:!0,funcscope:!0,gcl:!0,globalstrict:!0,immed:!0,iterator:!0,jquery:!0,lastsemic:!0,laxbreak:!0,laxcomma:!0,loopfunc:!0,mootools:!0,multistr:!0,newcap:!0,noarg:!0,node:!0,noempty:!0,nonew:!0,nonstandard:!0,nomen:!0,onevar:!0,passfail:!0,phantom:!0,plusplus:!0,proto:!0,prototypejs:!0,rhino:!0,shelljs:!0,undef:!0,scripturl:!0,shadow:!0,smarttabs:!0,strict:!0,sub:!0,supernew:!0,trailing:!0,validthis:!0,withstmt:!0,white:!0,worker:!0,wsh:!0,yui:!0,onecase:!0,regexp:!0,regexdash:!0},Ot={maxlen:!1,indent:!1,maxerr:!1,predef:!1,quotmark:!1,scope:!1,maxstatements:!1,maxdepth:!1,maxparams:!1,maxcomplexity:!1,unused:!0,latedef:!1},Mt={bitwise:!0,forin:!0,newcap:!0,nomen:!0,plusplus:!0,regexp:!0,undef:!0,white:!0,eqeqeq:!0,onevar:!0,strict:!0},_t={eqeq:"eqeqeq",vars:"onevar",windows:"wsh",sloppy:"strict"},Dt,Pt,Ht=["closure","exception","global","label","outer","unused","var"],Bt,jt,Ft,It,qt,Rt,Ut,zt,Wt,Xt,Vt,$t,Jt,Kt,Qt,Gt,Yt,Zt=[],en=new i.EventEmitter;V("(number)",function(){return this}),V("(string)",function(){return this}),f.syntax["(identifier)"]={type:"(identifier)",lbp:0,identifier:!0,nud:function(){var e=this.value,t=Jt[e],n;typeof t=="function"?t=undefined:typeof t=="boolean"&&(n=Bt,Bt=jt[0],T(e,"var"),t=Bt,Bt=n);var i;r.has(Bt,"(blockscope)")&&(i=Bt["(blockscope)"].getlabel(e));if(Bt===t||i)switch(i?i[e]["(type)"]:Bt[e]){case"unused":i?i[e]["(type)"]="var":Bt[e]="var";break;case"unction":i?i[e]["(type)"]="function":Bt[e]="function",this["function"]=!0;break;case"function":this["function"]=!0;break;case"label":b("W037",f.tokens.curr,e)}else if(Bt["(global)"])typeof $t[e]!="boolean"&&(Ct!=="typeof"&&Ct!=="delete"||f.tokens.next&&(f.tokens.next.value==="."||f.tokens.next.value==="["))&&(Bt["(comparray)"].check(e)||y(Bt,"W117",f.tokens.curr,e)),ht(f.tokens.curr);else switch(Bt[e]){case"closure":case"function":case"var":case"unused":b("W038",f.tokens.curr,e);break;case"label":b("W037",f.tokens.curr,e);break;case"outer":case"global":break;default:if(t===!0)Bt[e]=!0;else if(t===null)b("W039",f.tokens.curr,e),ht(f.tokens.curr);else if(typeof t!="object")(Ct!=="typeof"&&Ct!=="delete"||f.tokens.next&&(f.tokens.next.value==="."||f.tokens.next.value==="["))&&y(Bt,"W117",f.tokens.curr,e),Bt[e]=!0,ht(f.tokens.curr);else switch(t[e]){case"function":case"unction":this["function"]=!0,t[e]="closure",Bt[e]=t["(global)"]?"global":"outer";break;case"var":case"unused":t[e]="closure",Bt[e]=t["(global)"]?"global":"outer";break;case"closure":Bt[e]=t["(global)"]?"global":"outer";break;case"label":b("W037",f.tokens.curr,e)}}return this},led:function(){E("E033",f.tokens.next,f.tokens.next.value)}},V("(regexp)",function(){return this}),R("(endline)"),R("(begin)"),R("(end)").reach=!0,R("(error)").reach=!0,R("}").reach=!0,R(")"),R("]"),R('"').reach=!0,R("'").reach=!0,R(";"),R(":").reach=!0,R("#"),$("else"),$("case").reach=!0,$("catch"),$("default").reach=!0,$("finally"),K("arguments",function(e){f.directive["use strict"]&&Bt["(global)"]&&b("E008",e)}),K("eval"),K("false"),K("Infinity"),K("null"),K("this",function(e){f.directive["use strict"]&&!f.option.validthis&&(Bt["(statement)"]&&Bt["(name)"].charAt(0)>"Z"||Bt["(global)"])&&b("W040",e)}),K("true"),K("undefined"),et("=","assign",20),et("+=","assignadd",20),et("-=","assignsub",20),et("*=","assignmult",20),et("/=","assigndiv",20).nud=function(){E("E014")},et("%=","assignmod",20),nt("&=","assignbitand",20),nt("|=","assignbitor",20),nt("^=","assignbitxor",20),nt("<<=","assignshiftleft",20),nt(">>=","assignshiftright",20),nt(">>>=","assignshiftrightunsigned",20),Q(",",function(e,t){var n;t.exprs=[e];if(!I({peek:!0}))return t;for(;;){if(!(n=O(10)))break;t.exprs.push(n);if(f.tokens.next.value!==","||!I())break}return t},10,!0),Q("?",function(e,t){return yt(),t.left=e,t.right=O(10),k(":"),t["else"]=O(10),t},30);var tn=40;Q("||",function(e,t){return yt(),t.left=e,t.right=O(tn),t},tn),Q("&&","and",50),tt("|","bitor",70),tt("^","bitxor",80),tt("&","bitand",90),Y("==",function(e,t){var n=f.option.eqnull&&(e.value==="null"||t.value==="null");return!n&&f.option.eqeqeq?b("W116",this,"===","=="):Z(e)?b("W041",this,"===",e.value):Z(t)&&b("W041",this,"===",t.value),this}),Y("==="),Y("!=",function(e,t){var n=f.option.eqnull&&(e.value==="null"||t.value==="null");return!n&&f.option.eqeqeq?b("W116",this,"!==","!="):Z(e)?b("W041",this,"!==",e.value):Z(t)&&b("W041",this,"!==",t.value),this}),Y("!=="),Y("<"),Y(">"),Y("<="),Y(">="),tt("<<","shiftleft",120),tt(">>","shiftright",120),tt(">>>","shiftrightunsigned",120),Q("in","in",120),Q("instanceof","instanceof",120),Q("+",function(e,t){var n=O(130);return e&&n&&e.id==="(string)"&&n.id==="(string)"?(e.value+=n.value,e.character=n.character,!f.option.scripturl&&a.javascriptURL.test(e.value)&&b("W050",e),e):(t.left=e,t.right=n,t)},130),X("+","num"),X("+++",function(){return b("W007"),this.right=O(150),this.arity="unary",this}),Q("+++",function(e){return b("W007"),this.left=e,this.right=O(130),this},130),Q("-","sub",130),X("-","neg"),X("---",function(){return b("W006"),this.right=O(150),this.arity="unary",this}),Q("---",function(e){return b("W006"),this.left=e,this.right=O(130),this},130),Q("*","mult",140),Q("/","div",140),Q("%","mod",140),rt("++","postinc"),X("++","preinc"),f.syntax["++"].exps=!0,rt("--","postdec"),X("--","predec"),f.syntax["--"].exps=!0,X("delete",function(){var e=O(10);return(!e||e.id!=="."&&e.id!=="[")&&b("W051"),this.first=e,this}).exps=!0,X("~",function(){return f.option.bitwise&&b("W052",this,"~"),O(150),this}),X("...",function(){return f.option.inESNext()||b("W104",this,"spread/rest operator"),f.tokens.next.identifier||E("E030",f.tokens.next,f.tokens.next.value),O(150),this}),X("!",function(){return this.right=O(150),this.arity="unary",this.right||g("E041",this.line||0),Lt[this.right.id]===!0&&b("W018",this,"!"),this}),X("typeof","typeof"),X("new",function(){var e=O(155),t;if(e&&e.id!=="function")if(e.identifier){e["new"]=!0;switch(e.value){case"Number":case"String":case"Boolean":case"Math":case"JSON":b("W053",f.tokens.prev,e.value);break;case"Function":f.option.evil||b("W054");break;case"Date":case"RegExp":break;default:e.id!=="function"&&(t=e.value.substr(0,1),f.option.newcap&&(t<"A"||t>"Z")&&!r.has(Ft,e.value)&&b("W055",f.tokens.curr))}}else e.id!=="."&&e.id!=="["&&e.id!=="("&&b("W056",f.tokens.curr);else f.option.supernew||b("W057",this);return M(f.tokens.curr,f.tokens.next),f.tokens.next.id!=="("&&!f.option.supernew&&b("W058",f.tokens.curr,f.tokens.curr.value),this.first=e,this}),f.syntax["new"].exps=!0,X("void").exps=!0,Q(".",function(e,t){M(f.tokens.prev,f.tokens.curr),_();var n=st(!1,!0);return typeof n=="string"&&ct(n),t.left=e,t.right=n,n&&n==="hasOwnProperty"&&f.tokens.next.value==="="&&b("W001"),!e||e.value!=="arguments"||n!=="callee"&&n!=="caller"?!f.option.evil&&e&&e.value==="document"&&(n==="write"||n==="writeln")&&b("W060",e):f.option.noarg?b("W059",e,n):f.directive["use strict"]&&E("E008"),!f.option.evil&&(n==="eval"||n==="execScript")&&b("W061"),t},160,!0),Q("(",function(e,t){f.tokens.prev.id!=="}"&&f.tokens.prev.id!==")"&&_(f.tokens.prev,f.tokens.curr),D(),f.option.immed&&e&&!e.immed&&e.id==="function"&&b("W062");var n=0,r=[];e&&e.type==="(identifier)"&&e.value.match(/^[A-Z]([A-Z0-9_$]*[a-z][A-Za-z0-9_$]*)?$/)&&"Number String Boolean Date Object".indexOf(e.value)===-1&&(e.value==="Math"?b("W063",e):f.option.newcap&&b("W064",e));if(f.tokens.next.id!==")")for(;;){r[r.length]=O(10),n+=1;if(f.tokens.next.id!==",")break;I()}return k(")"),D(f.tokens.prev,f.tokens.curr),typeof e=="object"&&(e.value==="parseInt"&&n===1&&b("W065",f.tokens.curr),f.option.evil||(e.value==="eval"||e.value==="Function"||e.value==="execScript"?(b("W061",e),r[0]&&[0].id==="(string)"&&x(e,r[0].value)):!r[0]||r[0].id!=="(string)"||e.value!=="setTimeout"&&e.value!=="setInterval"?r[0]&&r[0].id==="(string)"&&e.value==="."&&e.left.value==="window"&&(e.right==="setTimeout"||e.right==="setInterval")&&(b("W066",e),x(e,r[0].value)):(b("W066",e),x(e,r[0].value))),!e.identifier&&e.id!=="."&&e.id!=="["&&e.id!=="("&&e.id!=="&&"&&e.id!=="||"&&e.id!=="?"&&b("W067",e)),t.left=e,t},155,!0).exps=!0,X("(",function(){D();var e,t=[],n,r,i=0,s;do n=C(i),i+=1,r=C(i),i+=1;while(n.value!==")"&&r.value!=="=>"&&r.value!==";"&&r.type!=="(end)");f.tokens.next.id==="function"&&(f.tokens.next.immed=!0);var o=[];if(f.tokens.next.id!==")")for(;;){if(r.value==="=>"&&f.tokens.next.value==="{"){e=f.tokens.next,e.left=wt(),t.push(e);for(var u in e.left)o.push(e.left[u].token)}else o.push(O(10));if(f.tokens.next.id!==",")break;I()}k(")",this),D(f.tokens.prev,f.tokens.curr),f.option.immed&&o[0]&&o[0].id==="function"&&f.tokens.next.id!=="("&&(f.tokens.next.id!=="."||C().value!=="call"&&C().value!=="apply")&&b("W068",this);if(f.tokens.next.value==="=>")return o;if(!o.length)return;return o.length>1?(s=Object.create(f.syntax[","]),s.exprs=o):s=o[0],s&&(s.paren=!0),s}),G("=>"),Q("[",function(e,t){_(f.tokens.prev,f.tokens.curr),D();var n=O(10),r;return n&&n.type==="(string)"&&(!f.option.evil&&(n.value==="eval"||n.value==="execScript")&&b("W061",t),ct(n.value),!f.option.sub&&a.identifier.test(n.value)&&(r=f.syntax[n.value],(!r||!c(r))&&b("W069",f.tokens.prev,n.value))),k("]",t),n&&n.value==="hasOwnProperty"&&f.tokens.next.value==="="&&b("W001"),D(f.tokens.prev,f.tokens.curr),t.left=e,t.right=n,t},160,!0),X("[",function(){var e=on(!0);if(e.isCompArray)return f.option.inMoz(!0)||b("W118",f.tokens.curr,"array comprehension"),pt();e.isDestAssign&&!f.option.inESNext()&&b("W104",f.tokens.curr,"destructuring assignment");var t=f.tokens.curr.line!==f.tokens.next.line;this.first=[],t&&(Rt+=f.option.indent,f.tokens.next.from===Rt+f.option.indent&&(Rt+=f.option.indent));while(f.tokens.next.id!=="(end)"){while(f.tokens.next.id===",")f.option.inES5()||b("W070"),k(",");if(f.tokens.next.id==="]")break;t&&f.tokens.curr.line!==f.tokens.next.line&&B(),this.first.push(O(10));if(f.tokens.next.id!==",")break;I({allowTrailing:!0});if(f.tokens.next.id==="]"&&!f.option.inES5(!0)){b("W070",f.tokens.curr);break}}return t&&(Rt-=f.option.indent,B()),k("]",this),this},160),function(e){e.nud=function(e){function t(e,t){h[e]&&r.has(h,e)?b("W075",f.tokens.next,u):h[e]={},h[e].basic=!0,h[e].basictkn=t}function n(e,t){h[e]&&r.has(h,e)?(h[e].basic||h[e].setter)&&b("W075",f.tokens.next,u):h[e]={},h[e].setter=!0,h[e].setterToken=t}function i(e){h[e]&&r.has(h,e)?(h[e].basic||h[e].getter)&&b("W075",f.tokens.next,u):h[e]={},h[e].getter=!0,h[e].getterToken=f.tokens.curr}var s,o,u,a,l,c,h={},p="";s=f.tokens.curr.line!==f.tokens.next.line,s&&(Rt+=f.option.indent,f.tokens.next.from===Rt+f.option.indent&&(Rt+=f.option.indent));for(;;){if(f.tokens.next.id==="}")break;s&&B(),e&&f.tokens.next.value==="static"&&(k("static"),p="static ");if(f.tokens.next.value==="get"&&C().id!==":")k("get"),f.option.inES5(!e)||E("E034"),u=dt(),u||E("E035"),e&&u==="constructor"&&E("E049",f.tokens.next,"class getter method",u),i(p+u),l=f.tokens.next,M(f.tokens.curr,f.tokens.next),o=mt(),a=o["(params)"],a&&b("W076",l,a[0],u),M(f.tokens.curr,f.tokens.next);else if(f.tokens.next.value==="set"&&C().id!==":")k("set"),f.option.inES5(!e)||E("E034"),u=dt(),u||E("E035"),e&&u==="constructor"&&E("E049",f.tokens.next,"class setter method",u),n(p+u,f.tokens.next),l=f.tokens.next,M(f.tokens.curr,f.tokens.next),o=mt(),a=o["(params)"],(!a||a.length!==1)&&b("W077",l,u);else{c=!1,f.tokens.next.value==="*"&&f.tokens.next.type==="(punctuator)"&&(f.option.inESNext()||b("W104",f.tokens.next,"generator functions"),k("*"),c=!0),u=dt(),t(p+u,f.tokens.next);if(typeof u!="string")break;f.tokens.next.value==="("?(f.option.inESNext()||b("W104",f.tokens.curr,"concise methods"),mt(u,undefined,c)):e||(k(":"),P(f.tokens.curr,f.tokens.next),O(10))}e&&u==="prototype"&&E("E049",f.tokens.next,"class method",u),ct(u);if(e){p="";continue}if(f.tokens.next.id!==",")break;I({allowTrailing:!0,property:!0}),f.tokens.next.id===","?b("W070",f.tokens.curr):f.tokens.next.id==="}"&&!f.option.inES5(!0)&&b("W070",f.tokens.curr)}s&&(Rt-=f.option.indent,B()),k("}",this);if(f.option.inES5())for(var d in h)r.has(h,d)&&h[d].setter&&!h[d].getter&&b("W078",h[d].setterToken);return this},e.fud=function(){E("E036",f.tokens.curr)}}(R("{"));var nn=U("const",function(e){var t,n,i;f.option.inESNext()||b("W104",f.tokens.curr,"const"),this.first=[];for(;;){var s=[];P(f.tokens.curr,f.tokens.next),r.contains(["{","["],f.tokens.next.value)?(t=wt(),i=!1):(t=[{id:st(),token:f.tokens.curr}],i=!0);for(var o in t)o=t[o],Bt[o.id]==="const"&&b("E011",null,o.id),Bt["(global)"]&&$t[o.id]===!1&&b("W079",o.token,o.id),o.id&&(T(o.id,"const"),s.push(o.token));if(e)break;this.first=this.first.concat(s),f.tokens.next.id!=="="&&b("E012",f.tokens.curr,f.tokens.curr.value),f.tokens.next.id==="="&&(P(f.tokens.curr,f.tokens.next),k("="),P(f.tokens.curr,f.tokens.next),f.tokens.next.id==="undefined"&&b("W080",f.tokens.prev,f.tokens.prev.value),C(0).id==="="&&f.tokens.next.identifier&&b("W120",f.tokens.next,f.tokens.next.value),n=O(10),i?t[0].first=n:Et(s,n));if(f.tokens.next.id!==",")break;I()}return this});nn.exps=!0;var rn=U("var",function(e){var t,n,i;Bt["(onevar)"]&&f.option.onevar?b("W081"):Bt["(global)"]||(Bt["(onevar)"]=!0),this.first=[];for(;;){var s=[];P(f.tokens.curr,f.tokens.next),r.contains(["{","["],f.tokens.next.value)?(t=wt(),n=!1):(t=[{id:st(),token:f.tokens.curr}],n=!0);for(var o in t)o=t[o],f.option.inESNext()&&Bt[o.id]==="const"&&b("E011",null,o.id),Bt["(global)"]&&$t[o.id]===!1&&b("W079",o.token,o.id),o.id&&(T(o.id,"unused",o.token),s.push(o.token));if(e)break;this.first=this.first.concat(s),f.tokens.next.id==="="&&(P(f.tokens.curr,f.tokens.next),k("="),P(f.tokens.curr,f.tokens.next),f.tokens.next.id==="undefined"&&b("W080",f.tokens.prev,f.tokens.prev.value),C(0).id==="="&&f.tokens.next.identifier&&b("W120",f.tokens.next,f.tokens.next.value),i=O(10),n?t[0].first=i:Et(s,i));if(f.tokens.next.id!==",")break;I()}return this});rn.exps=!0;var sn=U("let",function(e){var t,n,i,s;f.option.inESNext()||b("W104",f.tokens.curr,"let"),f.tokens.next.value==="("?(f.option.inMoz(!0)||b("W118",f.tokens.next,"let block"),k("("),Bt["(blockscope)"].stack(),s=!0):Bt["(nolet)"]&&E("E048",f.tokens.curr),Bt["(onevar)"]&&f.option.onevar?b("W081"):Bt["(global)"]||(Bt["(onevar)"]=!0),this.first=[];for(;;){var o=[];P(f.tokens.curr,f.tokens.next),r.contains(["{","["],f.tokens.next.value)?(t=wt(),n=!1):(t=[{id:st(),token:f.tokens.curr.value}],n=!0);for(var u in t)u=t[u],f.option.inESNext()&&Bt[u.id]==="const"&&b("E011",null,u.id),Bt["(global)"]&&$t[u.id]===!1&&b("W079",u.token,u.id),u.id&&!Bt["(nolet)"]&&(T(u.id,"unused",u.token,!0),o.push(u.token));if(e)break;this.first=this.first.concat(o),f.tokens.next.id==="="&&(P(f.tokens.curr,f.tokens.next),k("="),P(f.tokens.curr,f.tokens.next),f.tokens.next.id==="undefined"&&b("W080",f.tokens.prev,f.tokens.prev.value),C(0).id==="="&&f.tokens.next.identifier&&b("W120",f.tokens.next,f.tokens.next.value),i=O(10),n?t[0].first=i:Et(o,i));if(f.tokens.next.id!==",")break;I()}return s&&(k(")"),lt(!0,!0),this.block=!0,Bt["(blockscope)"].unstack()),this});sn.exps=!0,z("class",function(){return St.call(this,!0)}),z("function",function(){var e=!1;f.tokens.next.value==="*"&&(k("*"),f.option.inESNext(!0)?e=!0:b("W119",f.tokens.curr,"function*")),qt&&b("W082",f.tokens.curr);var t=st();return Bt[t]==="const"&&b("E011",null,t),M(f.tokens.curr,f.tokens.next),T(t,"unction",f.tokens.curr),mt(t,{statement:!0},e),f.tokens.next.id==="("&&f.tokens.next.line===f.tokens.curr.line&&E("E039"),this}),X("function",function(){var e=!1;f.tokens.next.value==="*"&&(f.option.inESNext()||b("W119",f.tokens.curr,"function*"),k("*"),e=!0);var t=it();return t||f.option.gcl?M(f.tokens.curr,f.tokens.next):P(f.tokens.curr,f.tokens.next),mt(t,undefined,e),!f.option.loopfunc&&Bt["(loopage)"]&&b("W083"),this}),z("if",function(){var e=f.tokens.next;return yt(),f.condition=!0,k("("),P(this,e),D(),bt(O(0)),k(")",e),f.condition=!1,D(f.tokens.prev,f.tokens.curr),lt(!0,!0),f.tokens.next.id==="else"&&(P(f.tokens.curr,f.tokens.next),k("else"),f.tokens.next.id==="if"||f.tokens.next.id==="switch"?ut(!0):lt(!0,!0)),this}),z("try",function(){function e(){var e=Jt,t;k("catch"),P(f.tokens.curr,f.tokens.next),k("("),Jt=Object.create(e),t=f.tokens.next.value,f.tokens.next.type!=="(identifier)"&&(t=null,b("E030",f.tokens.next,t)),k(),Bt={"(name)":"(catch)","(line)":f.tokens.next.line,"(character)":f.tokens.next.character,"(context)":Bt,"(breakage)":Bt["(breakage)"],"(loopage)":Bt["(loopage)"],"(scope)":Jt,"(statement)":!1,"(metrics)":gt(f.tokens.next),"(catch)":!0,"(tokens)":{},"(blockscope)":Bt["(blockscope)"],"(comparray)":Bt["(comparray)"]},t&&T(t,"exception"),f.tokens.next.value==="if"&&(f.option.inMoz(!0)||b("W118",f.tokens.curr,"catch filter"),k("if"),O(0)),k(")"),f.tokens.curr.funct=Bt,jt.push(Bt),lt(!1),Jt=e,Bt["(last)"]=f.tokens.curr.line,Bt["(lastcharacter)"]=f.tokens.curr.character,Bt=Bt["(context)"]}var t;lt(!1);while(f.tokens.next.id==="catch")yt(),t&&!f.option.inMoz(!0)&&b("W118",f.tokens.next,"multiple catch blocks"),e(),t=!0;if(f.tokens.next.id==="finally"){k("finally"),lt(!1);return}return t||E("E021",f.tokens.next,"catch",f.tokens.next.value),this}),z("while",function(){var e=f.tokens.next;return Bt["(breakage)"]+=1,Bt["(loopage)"]+=1,yt(),k("("),P(this,e),D(),bt(O(0)),k(")",e),D(f.tokens.prev,f.tokens.curr),lt(!0,!0),Bt["(breakage)"]-=1,Bt["(loopage)"]-=1,this}).labelled=!0,z("with",function(){var e=f.tokens.next;return f.directive["use strict"]?E("E010",f.tokens.curr):f.option.withstmt||b("W085",f.tokens.curr),k("("),P(this,e),D(),O(0),k(")",e),D(f.tokens.prev,f.tokens.curr),lt(!0,!0),this}),z("switch",function(){var e=f.tokens.next,t=!1;Bt["(breakage)"]+=1,k("("),P(this,e),D(),bt(O(0)),k(")",e),D(f.tokens.prev,f.tokens.curr),P(f.tokens.curr,f.tokens.next),e=f.tokens.next,k("{"),P(f.tokens.curr,f.tokens.next),Rt+=f.option.indent,this.cases=[];for(;;)switch(f.tokens.next.id){case"case":switch(Bt["(verb)"]){case"yield":case"break":case"case":case"continue":case"return":case"switch":case"throw":break;default:a.fallsThrough.test(f.lines[f.tokens.next.line-2])||b("W086",f.tokens.curr,"case")}B(-f.option.indent),k("case"),this.cases.push(O(20)),yt(),t=!0,k(":"),Bt["(verb)"]="case";break;case"default":switch(Bt["(verb)"]){case"yield":case"break":case"continue":case"return":case"throw":break;default:this.cases.length&&(a.fallsThrough.test(f.lines[f.tokens.next.line-2])||b("W086",f.tokens.curr,"default"))}B(-f.option.indent),k("default"),t=!0,k(":");break;case"}":Rt-=f.option.indent,B(),k("}",e),Bt["(breakage)"]-=1,Bt["(verb)"]=undefined;return;case"(end)":E("E023",f.tokens.next,"}");return;default:if(t)switch(f.tokens.curr.id){case",":E("E040");return;case":":t=!1,at();break;default:E("E025",f.tokens.curr);return}else{if(f.tokens.curr.id!==":"){E("E021",f.tokens.next,"case",f.tokens.next.value);return}k(":"),E("E024",f.tokens.curr,":"),at()}}}).labelled=!0,U("debugger",function(){return f.option.debug||b("W087"),this}).exps=!0,function(){var e=U("do",function(){Bt["(breakage)"]+=1,Bt["(loopage)"]+=1,yt(),this.first=lt(!0,!0),k("while");var e=f.tokens.next;return P(f.tokens.curr,e),k("("),D(),bt(O(0)),k(")",e),D(f.tokens.prev,f.tokens.curr),Bt["(breakage)"]-=1,Bt["(loopage)"]-=1,this});e.labelled=!0,e.exps=!0}(),z("for",function(){var e,t=f.tokens.next,n=!1,i=null;t.value==="each"&&(i=t,k("each"),f.option.inMoz(!0)||b("W118",f.tokens.curr,"for each")),Bt["(breakage)"]+=1,Bt["(loopage)"]+=1,yt(),k("("),P(this,t),D();var s,o=0,u=["in","of"];do s=C(o),++o;while(!r.contains(u,s.value)&&s.value!==";"&&s.type!=="(end)");if(r.contains(u,s.value)){!f.option.inESNext()&&s.value==="of"&&E("W104",s,"for of");if(f.tokens.next.id==="var")k("var"),f.syntax["var"].fud.call(f.syntax["var"].fud,!0);else if(f.tokens.next.id==="let")k("let"),n=!0,Bt["(blockscope)"].stack(),f.syntax.let.fud.call(f.syntax.let.fud,!0);else{switch(Bt[f.tokens.next.value]){case"unused":Bt[f.tokens.next.value]="var";break;case"var":break;default:Bt["(blockscope)"].getlabel(f.tokens.next.value)||b("W088",f.tokens.next,f.tokens.next.value)}k()}k(s.value),O(20),k(")",t),e=lt(!0,!0),f.option.forin&&e&&(e.length>1||typeof e[0]!="object"||e[0].value!=="if")&&b("W089",this),Bt["(breakage)"]-=1,Bt["(loopage)"]-=1}else{i&&E("E045",i);if(f.tokens.next.id!==";")if(f.tokens.next.id==="var")k("var"),f.syntax["var"].fud.call(f.syntax["var"].fud);else if(f.tokens.next.id==="let")k("let"),n=!0,Bt["(blockscope)"].stack(),f.syntax.let.fud.call(f.syntax.let.fud);else for(;;){O(0,"for");if(f.tokens.next.id!==",")break;I()}j(f.tokens.curr),k(";"),f.tokens.next.id!==";"&&bt(O(0)),j(f.tokens.curr),k(";"),f.tokens.next.id===";"&&E("E021",f.tokens.next,")",";");if(f.tokens.next.id!==")")for(;;){O(0,"for");if(f.tokens.next.id!==",")break;I()}k(")",t),D(f.tokens.prev,f.tokens.curr),lt(!0,!0),Bt["(breakage)"]-=1,Bt["(loopage)"]-=1}return n&&Bt["(blockscope)"].unstack(),this}).labelled=!0,U("break",function(){var e=f.tokens.next.value;return Bt["(breakage)"]===0&&b("W052",f.tokens.next,this.value),f.option.asi||j(this),f.tokens.next.id!==";"&&!f.tokens.next.reach&&f.tokens.curr.line===f.tokens.next.line&&(Bt[e]!=="label"?b("W090",f.tokens.next,e):Jt[e]!==Bt&&b("W091",f.tokens.next,e),this.first=f.tokens.next,k()),ot("break"),this}).exps=!0,U("continue",function(){var e=f.tokens.next.value;return Bt["(breakage)"]===0&&b("W052",f.tokens.next,this.value),f.option.asi||j(this),f.tokens.next.id!==";"&&!f.tokens.next.reach?f.tokens.curr.line===f.tokens.next.line&&(Bt[e]!=="label"?b("W090",f.tokens.next,e):Jt[e]!==Bt&&b("W091",f.tokens.next,e),this.first=f.tokens.next,k()):Bt["(loopage)"]||b("W052",f.tokens.next,this.value),ot("continue"),this}).exps=!0,U("return",function(){return this.line===f.tokens.next.line?(f.tokens.next.id==="(regexp)"&&b("W092"),f.tokens.next.id!==";"&&!f.tokens.next.reach&&(P(f.tokens.curr,f.tokens.next),this.first=O(0),this.first&&this.first.type==="(punctuator)"&&this.first.value==="="&&!f.option.boss&&w("W093",this.first.line,this.first.character))):f.tokens.next.type==="(punctuator)"&&["[","{","+","-"].indexOf(f.tokens.next.value)>-1&&j(this),ot("return"),this}).exps=!0,function(e){e.exps=!0,e.lbp=25}(X("yield",function(){var e=f.tokens.prev;return f.option.inESNext(!0)&&!Bt["(generator)"]?E("E046",f.tokens.curr,"yield"):f.option.inESNext()||b("W104",f.tokens.curr,"yield"),Bt["(generator)"]="yielded",this.line===f.tokens.next.line||!f.option.inMoz(!0)?(f.tokens.next.id==="(regexp)"&&b("W092"),f.tokens.next.id!==";"&&!f.tokens.next.reach&&f.tokens.next.nud&&(H(f.tokens.curr,f.tokens.next),this.first=O(10),this.first.type==="(punctuator)"&&this.first.value==="="&&!f.option.boss&&w("W093",this.first.line,this.first.character)),f.option.inMoz(!0)&&f.tokens.next.id!==")"&&(e.lbp>30||!e.assign&&!A()||e.id==="yield")&&E("E050",this)):f.option.asi||j(this),this})),U("throw",function(){return j(this),P(f.tokens.curr,f.tokens.next),this.first=O(20),ot("throw"),this}).exps=!0,U("import",function(){f.option.inESNext()||b("W119",f.tokens.curr,"import");if(f.tokens.next.identifier)this.name=st(),T(this.name,"unused",f.tokens.curr);else{k("{");for(;;){var e;f.tokens.next.type==="default"?(e="default",k("default")):e=st(),f.tokens.next.value==="as"&&(k("as"),e=st()),T(e,"unused",f.tokens.curr);if(f.tokens.next.value!==","){if(f.tokens.next.value==="}"){k("}");break}E("E024",f.tokens.next,f.tokens.next.value);break}k(",")}}return k("from"),k("(string)"),this}).exps=!0,U("export",function(){f.option.inESNext()||b("W119",f.tokens.curr,"export");if(f.tokens.next.type==="default"){k("default");if(f.tokens.next.id==="function"||f.tokens.next.id==="class")this.block=!0;return this.exportee=O(10),this}if(f.tokens.next.value==="{"){k("{");for(;;){st();if(f.tokens.next.value!==","){if(f.tokens.next.value==="}"){k("}");break}E("E024",f.tokens.next,f.tokens.next.value);break}k(",")}return this}return f.tokens.next.id==="var"?(k("var"),f.syntax["var"].fud.call(f.syntax["var"].fud)):f.tokens.next.id==="let"?(k("let"),f.syntax.let.fud.call(f.syntax.let.fud)):f.tokens.next.id==="const"?(k("const"),f.syntax["const"].fud.call(f.syntax["const"].fud)):f.tokens.next.id==="function"?(this.block=!0,k("function"),f.syntax["function"].fud()):f.tokens.next.id==="class"?(this.block=!0,k("class"),f.syntax["class"].fud()):E("E024",f.tokens.next,f.tokens.next.value),this}).exps=!0,J("abstract"),J("boolean"),J("byte"),J("char"),J("class",{es5:!0,nud:St}),J("double"),J("enum",{es5:!0}),J("export",{es5:!0}),J("extends",{es5:!0}),J("final"),J("float"),J("goto"),J("implements",{es5:!0,strictOnly:!0}),J("import",{es5:!0}),J("int"),J("interface",{es5:!0,strictOnly:!0}),J("long"),J("native"),J("package",{es5:!0,strictOnly:!0}),J("private",{es5:!0,strictOnly:!0}),J("protected",{es5:!0,strictOnly:!0}),J("public",{es5:!0,strictOnly:!0}),J("short"),J("static",{es5:!0,strictOnly:!0}),J("super",{es5:!0}),J("synchronized"),J("throws"),J("transient"),J("volatile");var on=function(){var e,t,n=0,i=0,s={};r.contains(["[","{"],f.tokens.curr.value)&&(i+=1),r.contains(["[","{"],f.tokens.next.value)&&(i+=1),r.contains(["]","}"],f.tokens.next.value)&&(i-=1);do{e=C(n),t=C(n+1),n+=1,r.contains(["[","{"],e.value)?i+=1:r.contains(["]","}"],e.value)&&(i-=1);if(e.identifier&&e.value==="for"&&i===1){s.isCompArray=!0,s.notJson=!0;break}if(r.contains(["}","]"],e.value)&&t.value==="="){s.isDestAssign=!0,s.notJson=!0;break}e.value===";"&&(s.isBlock=!0,s.notJson=!0)}while(i>0&&e.id!=="(end)"&&n<15);return s},un=function(){function e(e){var t=s.variables.filter(function(t){if(t.value===e)return t.undef=!1,e}).length;return t!==0}function t(e){var t=s.variables.filter(function(t){if(t.value===e&&!t.undef)return t.unused===!0&&(t.unused=!1),e}).length;return t===0}var n=function(){this.mode="use",this.variables=[]},i=[],s;return{stack:function(){s=new n,i.push(s)},unstack:function(){s.variables.filter(function(e){e.unused&&b("W098",e.token,e.value),e.undef&&y(e.funct,"W117",e.token,e.value)}),i.splice(i[i.length-1],1),s=i[i.length-1]},setState:function(e){r.contains(["use","define","filter"],e)&&(s.mode=e)},check:function(n){return s&&s.mode==="use"?(s.variables.push({funct:Bt,token:f.tokens.curr,value:n,undef:!0,unused:!1}),!0):s&&s.mode==="define"?(e(n)||s.variables.push({funct:Bt,token:f.tokens.curr,value:n,undef:!1,unused:!0}),!0):s&&s.mode==="filter"?(t(n)&&y(Bt,"W117",f.tokens.curr,n),!0):!1}}},an=function(){function e(){for(var e in t)if(t[e]["(type)"]==="unused"&&f.option.unused){var n=t[e]["(token)"],r=n.line,i=n.character;w("W098",r,i,e)}}var t={},n=[t];return{stack:function(){t={},n.push(t)},unstack:function(){e(),n.splice(n.length-1,1),t=r.last(n)},getlabel:function(e){for(var t=n.length-1;t>=0;--t)if(r.has(n[t],e))return n[t]},current:{has:function(e){return r.has(t,e)},add:function(e,n,r){t[e]={"(type)":n,"(token)":r}}}}},fn=function(n,i,o){function a(e,t){if(!e)return;!Array.isArray(e)&&typeof e=="object"&&(e=Object.keys(e)),e.forEach(t)}var l,c,p,v,y={},E={};f.reset(),i&&i.scope?h.scope=i.scope:(h.errors=[],h.undefs=[],h.internals=[],h.blacklist={},h.scope="(main)"),$t=Object.create(null),d($t,s.ecmaIdentifiers),d($t,s.reservedVars),d($t,o||{}),Dt=Object.create(null),Pt=Object.create(null);if(i){a(i.predef||null,function(e){var t,n;e[0]==="-"?(t=e.slice(1),h.blacklist[t]=t):(n=Object.getOwnPropertyDescriptor(i.predef,e),$t[e]=n?n.value:!1)}),a(i.exported||null,function(e){Pt[e]=!0}),delete i.predef,delete i.exported,v=Object.keys(i);for(p=0;p<v.length;p++)/^-W\d{3}$/g.test(v[p])?E[v[p].slice(1)]=!0:(y[v[p]]=i[v[p]],v[p]==="newcap"&&i[v[p]]===!1&&(y["(explicitNewcap)"]=!0),v[p]==="indent"&&(y["(explicitIndent)"]=i[v[p]]===!1?!1:!0))}f.option=y,f.ignored=E,f.option.indent=f.option.indent||4,f.option.maxerr=f.option.maxerr||50,Rt=1,Ft=Object.create($t),Jt=Ft,Bt={"(global)":!0,"(name)":"(global)","(scope)":Jt,"(breakage)":0,"(loopage)":0,"(tokens)":{},"(metrics)":gt(f.tokens.next),"(blockscope)":an(),"(comparray)":un()},jt=[Bt],Gt=[],Kt=null,Wt={},Xt=null,It={},qt=!1,Ut=[],Yt=0,Qt=[];if(!t(n)&&!Array.isArray(n))return S("E004",0),!1;kt={get isJSON(){return f.jsonMode},getOption:function(e){return f.option[e]||null},getCache:function(e){return f.cache[e]},setCache:function(e,t){f.cache[e]=t},warn:function(e,t){w.apply(null,[e,t.line,t.char].concat(t.data))},on:function(e,t){e.split(" ").forEach(function(e){en.on(e,t)}.bind(this))}},en.removeAllListeners(),(Zt||[]).forEach(function(e){e(kt)}),f.tokens.prev=f.tokens.curr=f.tokens.next=f.syntax["(begin)"],zt=new u(n),zt.on("warning",function(e){w.apply(null,[e.code,e.line,e.character].concat(e.data))}),zt.on("error",function(e){S.apply(null,[e.code,e.line,e.character].concat(e.data))}),zt.on("fatal",function(e){g("E041",e.line,e.from)}),zt.on("Identifier",function(e){en.emit("Identifier",e)}),zt.on("String",function(e){en.emit("String",e)}),zt.on("Number",function(e){en.emit("Number",e)}),zt.start();for(var x in i)r.has(i,x)&&e(x,f.tokens.curr);m(),d($t,o||{}),I.first=!0;try{k();switch(f.tokens.next.id){case"{":case"[":Tt();break;default:ft(),f.directive["use strict"]&&!f.option.globalstrict&&!f.option.node&&b("W097",f.tokens.prev),at()}k(f.tokens.next&&f.tokens.next.value!=="."?"(end)":undefined),Bt["(blockscope)"].unstack();var T=function(e,t){do{if(typeof t[e]=="string")return t[e]==="unused"?t[e]="var":t[e]==="unction"&&(t[e]="closure"),!0;t=t["(context)"]}while(t);return!1},N=function(e,t){if(!It[e])return;var n=[];for(var r=0;r<It[e].length;r+=1)It[e][r]!==t&&n.push(It[e][r]);n.length===0?delete It[e]:It[e]=n},C=function(e,t,n,r){var i=t.line,s=t.character;r===undefined&&(r=f.option.unused),r===!0&&(r="last-param");var o={vars:["var"],"last-param":["var","param"],strict:["var","param","last-param"]};r&&o[r]&&o[r].indexOf(n)!==-1&&w("W098",i,s,e),Qt.push({name:e,line:i,character:s})},L=function(e,t){var n=e[t],i=e["(tokens)"][t];if(t.charAt(0)==="(")return;if(n!=="unused"&&n!=="unction")return;if(e["(params)"]&&e["(params)"].indexOf(t)!==-1)return;if(e["(global)"]&&r.has(Pt,t))return;C(t,i,"var")};for(l=0;l<h.undefs.length;l+=1)c=h.undefs[l].slice(0),T(c[2].value,c[0])?N(c[2].value,c[2].line):f.option.undef&&b.apply(b,c.slice(1));jt.forEach(function(e){if(e["(unusedOption)"]===!1)return;for(var t in e)r.has(e,t)&&L(e,t);if(!e["(params)"])return;var n=e["(params)"].slice(),i=n.pop(),s,o;while(i){s=e[i],o=e["(unusedOption)"]||f.option.unused,o=o===!0?"last-param":o;if(i==="undefined")return;if(s==="unused"||s==="unction")C(i,e["(tokens)"][i],"param",e["(unusedOption)"]);else if(o==="last-param")return;i=n.pop()}});for(var A in Dt)r.has(Dt,A)&&!r.has(Ft,A)&&C(A,Dt[A],"var")}catch(O){if(!O||O.name!=="JSHintError")throw O;var M=f.tokens.next||{};h.errors.push({scope:"(main)",raw:O.raw,code:O.code,reason:O.message,line:O.line||M.line,character:O.character||M.from},null)}if(h.scope==="(main)"){i=i||{};for(l=0;l<h.internals.length;l+=1)c=h.internals[l],i.scope=c.elem,fn(c.value,i,o)}return h.errors.length===0};return fn.addModule=function(e){Zt.push(e)},fn.addModule(l.register),fn.data=function(){var e={functions:[],options:f.option},t=[],n=[],i,s,o,u,a,l;fn.errors.length&&(e.errors=fn.errors),f.jsonMode&&(e.json=!0);for(a in It)r.has(It,a)&&t.push({name:a,line:It[a]});t.length>0&&(e.implieds=t),Gt.length>0&&(e.urls=Gt),l=Object.keys(Jt),l.length>0&&(e.globals=l);for(o=1;o<jt.length;o+=1){s=jt[o],i={};for(u=0;u<Ht.length;u+=1)i[Ht[u]]=[];for(u=0;u<Ht.length;u+=1)i[Ht[u]].length===0&&delete i[Ht[u]];i.name=s["(name)"],i.param=s["(params)"],i.line=s["(line)"],i.character=s["(character)"],i.last=s["(last)"],i.lastcharacter=s["(lastcharacter)"],e.functions.push(i)}Qt.length>0&&(e.unused=Qt),n=[];for(a in Wt)if(typeof Wt[a]=="number"){e.member=Wt;break}return e},fn.jshint=fn,fn}();typeof n=="object"&&n&&(n.JSHINT=h)},{"../shared/messages.js":2,"../shared/vars.js":3,"./lex.js":5,"./reg.js":6,"./state.js":7,"./style.js":8,"console-browserify":9,events:10,underscore:1}],5:[function(e,t,n){function r(){var e=[];return{push:function(t){e.push(t)},check:function(){for(var t=0;t<e.length;++t)e[t]();e.splice(0,e.length)}}}function i(e){var t=e;typeof t=="string"&&(t=t.replace(/\r\n/g,"\n").replace(/\r/g,"\n").split("\n")),t[0]&&t[0].substr(0,2)==="#!"&&(t[0]=""),this.emitter=new o.EventEmitter,this.source=e,this.setLines(t),this.prereg=!0,this.line=0,this.char=1,this.from=1,this.input="";for(var n=0;n<a.option.indent;n+=1)a.tab+=" "}var s=e("underscore"),o=e("events"),u=e("./reg.js"),a=e("./state.js").state,f={Identifier:1,Punctuator:2,NumericLiteral:3,StringLiteral:4,Comment:5,Keyword:6,NullLiteral:7,BooleanLiteral:8,RegExp:9},l=[170,170,181,181,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,880,884,886,887,890,893,902,902,904,906,908,908,910,929,931,1013,1015,1153,1162,1319,1329,1366,1369,1369,1377,1415,1488,1514,1520,1522,1568,1610,1646,1647,1649,1747,1749,1749,1765,1766,1774,1775,1786,1788,1791,1791,1808,1808,1810,1839,1869,1957,1969,1969,1994,2026,2036,2037,2042,2042,2048,2069,2074,2074,2084,2084,2088,2088,2112,2136,2308,2361,2365,2365,2384,2384,2392,2401,2417,2423,2425,2431,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2493,2493,2510,2510,2524,2525,2527,2529,2544,2545,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2649,2652,2654,2654,2674,2676,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2749,2749,2768,2768,2784,2785,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2877,2877,2908,2909,2911,2913,2929,2929,2947,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3024,3024,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3133,3133,3160,3161,3168,3169,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3261,3261,3294,3294,3296,3297,3313,3314,3333,3340,3342,3344,3346,3386,3389,3389,3406,3406,3424,3425,3450,3455,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3585,3632,3634,3635,3648,3654,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3760,3762,3763,3773,3773,3776,3780,3782,3782,3804,3805,3840,3840,3904,3911,3913,3948,3976,3980,4096,4138,4159,4159,4176,4181,4186,4189,4193,4193,4197,4198,4206,4208,4213,4225,4238,4238,4256,4293,4304,4346,4348,4348,4352,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4992,5007,5024,5108,5121,5740,5743,5759,5761,5786,5792,5866,5870,5872,5888,5900,5902,5905,5920,5937,5952,5969,5984,5996,5998,6e3,6016,6067,6103,6103,6108,6108,6176,6263,6272,6312,6314,6314,6320,6389,6400,6428,6480,6509,6512,6516,6528,6571,6593,6599,6656,6678,6688,6740,6823,6823,6917,6963,6981,6987,7043,7072,7086,7087,7104,7141,7168,7203,7245,7247,7258,7293,7401,7404,7406,7409,7424,7615,7680,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8305,8305,8319,8319,8336,8348,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11310,11312,11358,11360,11492,11499,11502,11520,11557,11568,11621,11631,11631,11648,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,11823,11823,12293,12295,12321,12329,12337,12341,12344,12348,12353,12438,12445,12447,12449,12538,12540,12543,12549,12589,12593,12686,12704,12730,12784,12799,13312,13312,19893,19893,19968,19968,40907,40907,40960,42124,42192,42237,42240,42508,42512,42527,42538,42539,42560,42606,42623,42647,42656,42735,42775,42783,42786,42888,42891,42894,42896,42897,42912,42921,43002,43009,43011,43013,43015,43018,43020,43042,43072,43123,43138,43187,43250,43255,43259,43259,43274,43301,43312,43334,43360,43388,43396,43442,43471,43471,43520,43560,43584,43586,43588,43595,43616,43638,43642,43642,43648,43695,43697,43697,43701,43702,43705,43709,43712,43712,43714,43714,43739,43741,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43968,44002,44032,44032,55203,55203,55216,55238,55243,55291,63744,64045,64048,64109,64112,64217,64256,64262,64275,64279,64285,64285,64287,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65136,65140,65142,65276,65313,65338,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500,65536,65547,65549,65574,65576,65594,65596,65597,65599,65613,65616,65629,65664,65786,65856,65908,66176,66204,66208,66256,66304,66334,66352,66378,66432,66461,66464,66499,66504,66511,66513,66517,66560,66717,67584,67589,67592,67592,67594,67637,67639,67640,67644,67644,67647,67669,67840,67861,67872,67897,68096,68096,68112,68115,68117,68119,68121,68147,68192,68220,68352,68405,68416,68437,68448,68466,68608,68680,69635,69687,69763,69807,73728,74606,74752,74850,77824,78894,92160,92728,110592,110593,119808,119892,119894,119964,119966,119967,119970,119970,119973,119974,119977,119980,119982,119993,119995,119995,119997,120003,120005,120069,120071,120074,120077,120084,120086,120092,120094,120121,120123,120126,120128,120132,120134,120134,120138,120144,120146,120485,120488,120512,120514,120538,120540,120570,120572,120596,120598,120628,120630,120654,120656,120686,120688,120712,120714,120744,120746,120770,120772,120779,131072,131072,173782,173782,173824,173824,177972,177972,177984,177984,178205,178205,194560,195101],c=[];for(var h=0;h<128;h++)c[h]=h===36||h>=65&&h<=90||h===95||h>=97&&h<=122;var p=[];for(var h=0;h<128;h++)p[h]=c[h]||h>=48&&h<=57;i.prototype={_lines:[],getLines:function(){return this._lines=a.lines,this._lines},setLines:function(e){this._lines=e,a.lines=this._lines},peek:function(e){return this.input.charAt(e||0)},skip:function(e){e=e||1,this.char+=e,this.input=this.input.slice(e)},on:function(e,t){e.split(" ").forEach(function(e){this.emitter.on(e,t)}.bind(this))},trigger:function(){this.emitter.emit.apply(this.emitter,Array.prototype.slice.call(arguments))},triggerAsync:function(e,t,n,r){n.push(function(){r()&&this.trigger(e,t)}.bind(this))},scanPunctuator:function(){var e=this.peek(),t,n,r;switch(e){case".":if(/^[0-9]$/.test(this.peek(1)))return null;if(this.peek(1)==="."&&this.peek(2)===".")return{type:f.Punctuator,value:"..."};case"(":case")":case";":case",":case"{":case"}":case"[":case"]":case":":case"~":case"?":return{type:f.Punctuator,value:e};case"#":return{type:f.Punctuator,value:e};case"":return null}return t=this.peek(1),n=this.peek(2),r=this.peek(3),e===">"&&t===">"&&n===">"&&r==="="?{type:f.Punctuator,value:">>>="}:e==="="&&t==="="&&n==="="?{type:f.Punctuator,value:"==="}:e==="!"&&t==="="&&n==="="?{type:f.Punctuator,value:"!=="}:e===">"&&t===">"&&n===">"?{type:f.Punctuator,value:">>>"}:e==="<"&&t==="<"&&n==="="?{type:f.Punctuator,value:"<<="}:e===">"&&t===">"&&n==="="?{type:f.Punctuator,value:">>="}:e==="="&&t===">"?{type:f.Punctuator,value:e+t}:e===t&&"+-<>&|".indexOf(e)>=0?{type:f.Punctuator,value:e+t}:"<>=!+-*%&|^".indexOf(e)>=0?t==="="?{type:f.Punctuator,value:e+t}:{type:f.Punctuator,value:e}:e==="/"?t==="="&&/\/=(?!(\S*\/[gim]?))/.test(this.input)?{type:f.Punctuator,value:"/="}:{type:f.Punctuator,value:"/"}:null},scanComments:function(){function e(e,t,n){var r=["jshint","jslint","members","member","globals","global","exported"],i=!1,s=e+t,o="plain";return n=n||{},n.isMultiline&&(s+="*/"),r.forEach(function(n){if(i)return;if(e==="//"&&n!=="jshint")return;t.substr(0,n.length)===n&&(i=!0,e+=n,t=t.substr(n.length)),!i&&t.charAt(0)===" "&&t.substr(1,n.length)===n&&(i=!0,e=e+" "+n,t=t.substr(n.length+1));if(!i)return;switch(n){case"member":o="members";break;case"global":o="globals";break;default:o=n}}),{type:f.Comment,commentType:o,value:s,body:t,isSpecial:i,isMultiline:n.isMultiline||!1,isMalformed:n.isMalformed||!1}}var t=this.peek(),n=this.peek(1),r=this.input.substr(2),i=this.line,s=this.char;if(t==="*"&&n==="/")return this.trigger("error",{code:"E018",line:i,character:s}),this.skip(2),null;if(t!=="/"||n!=="*"&&n!=="/")return null;if(n==="/")return this.skip(this.input.length),e("//",r);var o="";if(n==="*"){this.skip(2);while(this.peek()!=="*"||this.peek(1)!=="/")if(this.peek()===""){o+="\n";if(!this.nextLine())return this.trigger("error",{code:"E017",line:i,character:s}),e("/*",o,{isMultiline:!0,isMalformed:!0})}else o+=this.peek(),this.skip();return this.skip(2),e("/*",o,{isMultiline:!0})}},scanKeyword:function(){var e=/^[a-zA-Z_$][a-zA-Z0-9_$]*/.exec(this.input),t=["if","in","do","var","for","new","try","let","this","else","case","void","with","enum","while","break","catch","throw","const","yield","class","super","return","typeof","delete","switch","export","import","default","finally","extends","function","continue","debugger","instanceof"];return e&&t.indexOf(e[0])>=0?{type:f.Keyword,value:e[0]}:null},scanIdentifier:function(){function e(e){for(var t=0;t<l.length;){if(e<l[t++])return!1;if(e<=l[t++])return!0}return!1}function t(e){return/^[0-9a-fA-F]$/.test(e)}var n="",r=0,i,s,o=function(){r+=1;if(this.peek(r)!=="u")return null;var n=this.peek(r+1),i=this.peek(r+2),s=this.peek(r+3),o=this.peek(r+4),u;return t(n)&&t(i)&&t(s)&&t(o)?(u=parseInt(n+i+s+o,16),e(u)?(r+=5,"\\u"+n+i+s+o):null):null}.bind(this),u=function(){var t=this.peek(r),n=t.charCodeAt(0);return n===92?o():n<128?c[n]?(r+=1,t):null:e(n)?(r+=1,t):null}.bind(this),a=function(){var t=this.peek(r),n=t.charCodeAt(0);return n===92?o():n<128?p[n]?(r+=1,t):null:e(n)?(r+=1,t):null}.bind(this);s=u();if(s===null)return null;n=s;for(;;){s=a();if(s===null)break;n+=s}switch(n){case"true":case"false":i=f.BooleanLiteral;break;case"null":i=f.NullLiteral;break;default:i=f.Identifier}return{type:i,value:n}},scanNumericLiteral:function(){function e(e){return/^[0-9]$/.test(e)}function t(e){return/^[0-7]$/.test(e)}function n(e){return/^[0-9a-fA-F]$/.test(e)}function r(e){return e==="$"||e==="_"||e==="\\"||e>="a"&&e<="z"||e>="A"&&e<="Z"}var i=0,s="",o=this.input.length,u=this.peek(i),a;if(u!=="."&&!e(u))return null;if(u!=="."){s=this.peek(i),i+=1,u=this.peek(i);if(s==="0"){if(u==="x"||u==="X"){i+=1,s+=u;while(i<o){u=this.peek(i);if(!n(u))break;s+=u,i+=1}if(s.length<=2)return{type:f.NumericLiteral,value:s,isMalformed:!0};if(i<o){u=this.peek(i);if(r(u))return null}return{type:f.NumericLiteral,value:s,base:16,isMalformed:!1}}if(t(u)){i+=1,s+=u,a=!1;while(i<o){u=this.peek(i);if(e(u))a=!0;else if(!t(u))break;s+=u,i+=1}if(i<o){u=this.peek(i);if(r(u))return null}return{type:f.NumericLiteral,value:s,base:8,isMalformed:!1}}e(u)&&(i+=1,s+=u)}while(i<o){u=this.peek(i);if(!e(u))break;s+=u,i+=1}}if(u==="."){s+=u,i+=1;while(i<o){u=this.peek(i);if(!e(u))break;s+=u,i+=1}}if(u==="e"||u==="E"){s+=u,i+=1,u=this.peek(i);if(u==="+"||u==="-")s+=this.peek(i),i+=1;u=this.peek(i);if(!e(u))return null;s+=u,i+=1;while(i<o){u=this.peek(i);if(!e(u))break;s+=u,i+=1}}if(i<o){u=this.peek(i);if(r(u))return null}return{type:f.NumericLiteral,value:s,base:10,isMalformed:!isFinite(s)}},scanStringLiteral:function(e){var t=this.peek();if(t!=='"'&&t!=="'")return null;this.triggerAsync("warning",{code:"W108",line:this.line,character:this.char},e,function(){return a.jsonMode&&t!=='"'});var n="",r=this.line,i=this.char,s=!1;this.skip();while(this.peek()!==t){while(this.peek()===""){s?(s=!1,this.triggerAsync("warning",{code:"W043",line:this.line,character:this.char},e,function(){return!a.option.multistr}),this.triggerAsync("warning",{code:"W042",line:this.line,character:this.char},e,function(){return a.jsonMode&&a.option.multistr})):this.trigger("warning",{code:"W112",line:this.line,character:this.char});if(!this.nextLine())return this.trigger("error",{code:"E029",line:r,character:i}),{type:f.StringLiteral,value:n,isUnclosed:!0,quote:t}}s=!1;var o=this.peek(),u=1;o<" "&&this.trigger("warning",{code:"W113",line:this.line,character:this.char,data:["<non-printable>"]});if(o==="\\"){this.skip(),o=this.peek();switch(o){case"'":this.triggerAsync("warning",{code:"W114",line:this.line,character:this.char,data:["\\'"]},e,function(){return a.jsonMode});break;case"b":o="\b";break;case"f":o="\f";break;case"n":o="\n";break;case"r":o="\r";break;case"t":o="	";break;case"0":o="\0";var l=parseInt(this.peek(1),10);this.triggerAsync("warning",{code:"W115",line:this.line,character:this.char},e,function(){return l>=0&&l<=7&&a.directive["use strict"]});break;case"u":o=String.fromCharCode(parseInt(this.input.substr(1,4),16)),u=5;break;case"v":this.triggerAsync("warning",{code:"W114",line:this.line,character:this.char,data:["\\v"]},e,function(){return a.jsonMode}),o="";break;case"x":var c=parseInt(this.input.substr(1,2),16);this.triggerAsync("warning",{code:"W114",line:this.line,character:this.char,data:["\\x-"]},e,function(){return a.jsonMode}),o=String.fromCharCode(c),u=3;break;case"\\":case'"':case"/":break;case"":s=!0,o="";break;case"!":if(n.slice(n.length-2)==="<")break;default:this.trigger("warning",{code:"W044",line:this.line,character:this.char})}}n+=o,this.skip(u)}return this.skip(),{type:f.StringLiteral,value:n,isUnclosed:!1,quote:t}},scanRegExp:function(){var e=0,t=this.input.length,n=this.peek(),r=n,i="",s=[],o=!1,u=!1,a,l=function(){n<" "&&(o=!0,this.trigger("warning",{code:"W048",line:this.line,character:this.char})),n==="<"&&(o=!0,this.trigger("warning",{code:"W049",line:this.line,character:this.char,data:[n]}))}.bind(this);if(!this.prereg||n!=="/")return null;e+=1,a=!1;while(e<t){n=this.peek(e),r+=n,i+=n;if(u){n==="]"&&(this.peek(e-1)!=="\\"||this.peek(e-2)==="\\")&&(u=!1),n==="\\"&&(e+=1,n=this.peek(e),i+=n,r+=n,l()),e+=1;continue}if(n==="\\"){e+=1,n=this.peek(e),i+=n,r+=n,l();if(n==="/"){e+=1;continue}if(n==="["){e+=1;continue}}if(n==="["){u=!0,e+=1;continue}if(n==="/"){i=i.substr(0,i.length-1),a=!0,e+=1;break}e+=1}if(!a)return this.trigger("error",{code:"E015",line:this.line,character:this.from}),void this.trigger("fatal",{line:this.line,from:this.from});while(e<t){n=this.peek(e);if(!/[gim]/.test(n))break;s.push(n),r+=n,e+=1}try{new RegExp(i,s.join(""))}catch(c){o=!0,this.trigger("error",{code:"E016",line:this.line,character:this.char,data:[c.message]})}return{type:f.RegExp,value:r,flags:s,isMalformed:o}},scanMixedSpacesAndTabs:function(){var e,t;return a.option.smarttabs?(t=this.input.match(/(\/\/|^\s?\*)? \t/),e=t&&!t[1]?0:-1):e=this.input.search(/ \t|\t [^\*]/),e},scanUnsafeChars:function(){return this.input.search(u.unsafeChars)},next:function(e){this.from=this.char;var t;if(/\s/.test(this.peek())){t=this.char;while(/\s/.test(this.peek()))this.from+=1,this.skip();this.peek()===""&&!/^\s*$/.test(this.getLines()[this.line-1])&&a.option.trailing&&this.trigger("warning",{code:"W102",line:this.line,character:t})}var n=this.scanComments()||this.scanStringLiteral(e);return n?n:(n=this.scanRegExp()||this.scanPunctuator()||this.scanKeyword()||this.scanIdentifier()||this.scanNumericLiteral(),n?(this.skip(n.value.length),n):null)},nextLine:function(){var e;return this.line>=this.getLines().length?!1:(this.input=this.getLines()[this.line],this.line+=1,this.char=1,this.from=1,e=this.scanMixedSpacesAndTabs(),e>=0&&this.trigger("warning",{code:"W099",line:this.line,character:e+1}),this.input=this.input.replace(/\t/g,a.tab),e=this.scanUnsafeChars(),e>=0&&this.trigger("warning",{code:"W100",line:this.line,character:e}),a.option.maxlen&&a.option.maxlen<this.input.length&&this.trigger("warning",{code:"W101",line:this.line,character:this.input.length}),!0)},start:function(){this.nextLine()},token:function(){function e(e,t){if(!e.reserved)return!1;var n=e.meta;if(n&&n.isFutureReservedWord&&a.option.inES5()){if(!n.es5)return!1;if(n.strictOnly&&!a.option.strict&&!a.directive["use strict"])return!1;if(t)return!1}return!0}var t=r(),n,i=function(n,r,i){var o;n!=="(endline)"&&n!=="(end)"&&(this.prereg=!1);if(n==="(punctuator)"){switch(r){case".":case")":case"~":case"#":case"]":this.prereg=!1;break;default:this.prereg=!0}o=Object.create(a.syntax[r]||a.syntax["(error)"])}if(n==="(identifier)"){if(r==="return"||r==="case"||r==="typeof")this.prereg=!0;s.has(a.syntax,r)&&(o=Object.create(a.syntax[r]||a.syntax["(error)"]),e(o,i&&n==="(identifier)")||(o=null))}return o||(o=Object.create(a.syntax[n])),o.identifier=n==="(identifier)",o.type=o.type||n,o.value=r,o.line=this.line,o.character=this.char,o.from=this.from,i&&o.identifier&&(o.isProperty=i),o.check=t.check,o}.bind(this);for(;;){if(!this.input.length)return i(this.nextLine()?"(endline)":"(end)","");n=this.next(t);if(!n){this.input.length&&(this.trigger("error",{code:"E024",line:this.line,character:this.char,data:[this.peek()]}),this.input="");continue}switch(n.type){case f.StringLiteral:return this.triggerAsync("String",{line:this.line,"char":this.char,from:this.from,value:n.value,quote:n.quote},t,function(){return!0}),i("(string)",n.value);case f.Identifier:this.trigger("Identifier",{line:this.line,"char":this.char,from:this.form,name:n.value,isProperty:a.tokens.curr.id==="."});case f.Keyword:case f.NullLiteral:case f.BooleanLiteral:return i("(identifier)",n.value,a.tokens.curr.id===".");case f.NumericLiteral:return n.isMalformed&&this.trigger("warning",{code:"W045",line:this.line,character:this.char,data:[n.value]}),this.triggerAsync("warning",{code:"W114",line:this.line,character:this.char,data:["0x-"]},t,function(){return n.base===16&&a.jsonMode}),this.triggerAsync("warning",{code:"W115",line:this.line,character:this.char},t,function(){return a.directive["use strict"]&&n.base===8}),this.trigger("Number",{line:this.line,"char":this.char,from:this.from,value:n.value,base:n.base,isMalformed:n.malformed}),i("(number)",n.value);case f.RegExp:return i("(regexp)",n.value);case f.Comment:a.tokens.curr.comment=!0;if(n.isSpecial)return{value:n.value,body:n.body,type:n.commentType,isSpecial:n.isSpecial,line:this.line,character:this.char,from:this.from};break;case"":break;default:return i("(punctuator)",n.value)}}}},n.Lexer=i},{"./reg.js":6,"./state.js":7,events:10,underscore:1}],6:[function(e,t,n){"use string";n.unsafeString=/@cc|<\/?|script|\]\s*\]|<\s*!|&lt/i,n.unsafeChars=/[\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/,n.needEsc=/[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/,n.needEscGlobal=/[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,n.starSlash=/\*\//,n.identifier=/^([a-zA-Z_$][a-zA-Z0-9_$]*)$/,n.javascriptURL=/^(?:javascript|jscript|ecmascript|vbscript|mocha|livescript)\s*:/i,n.fallsThrough=/^\s*\/\*\s*falls?\sthrough\s*\*\/\s*$/},{}],7:[function(e,t,n){var r={syntax:{},reset:function(){this.tokens={prev:null,next:null,curr:null},this.option={},this.ignored={},this.directive={},this.jsonMode=!1,this.jsonWarnings=[],this.lines=[],this.tab="",this.cache={}}};n.state=r},{}],8:[function(e,t,n){n.register=function(e){e.on("Identifier",function(t){if(e.getOption("proto"))return;t.name==="__proto__"&&e.warn("W103",{line:t.line,"char":t.char,data:[t.name]})}),e.on("Identifier",function(t){if(e.getOption("iterator"))return;t.name==="__iterator__"&&e.warn("W104",{line:t.line,"char":t.char,data:[t.name]})}),e.on("Identifier",function(t){if(!e.getOption("nomen"))return;if(t.name==="_")return;if(e.getOption("node")&&/^(__dirname|__filename)$/.test(t.name)&&!t.isProperty)return;/^(_+.*|.*_+)$/.test(t.name)&&e.warn("W105",{line:t.line,"char":t.from,data:["dangling '_'",t.name]})}),e.on("Identifier",function(t){if(!e.getOption("camelcase"))return;t.name.replace(/^_+/,"").indexOf("_")>-1&&!t.name.match(/^[A-Z0-9_]*$/)&&e.warn("W106",{line:t.line,"char":t.from,data:[t.name]})}),e.on("String",function(t){var n=e.getOption("quotmark"),r;if(!n)return;n==="single"&&t.quote!=="'"&&(r="W109"),n==="double"&&t.quote!=='"'&&(r="W108"),n===!0&&(e.getCache("quotmark")||e.setCache("quotmark",t.quote),e.getCache("quotmark")!==t.quote&&(r="W110")),r&&e.warn(r,{line:t.line,"char":t.char})}),e.on("Number",function(t){t.value.charAt(0)==="."&&e.warn("W008",{line:t.line,"char":t.char,data:[t.value]}),t.value.substr(t.value.length-1)==="."&&e.warn("W047",{line:t.line,"char":t.char,data:[t.value]}),/^00+/.test(t.value)&&e.warn("W046",{line:t.line,"char":t.char,data:[t.value]})}),e.on("String",function(t){var n=/^(?:javascript|jscript|ecmascript|vbscript|mocha|livescript)\s*:/i;if(e.getOption("scripturl"))return;n.test(t.value)&&e.warn("W107",{line:t.line,"char":t.char})})}},{}],9:[function(e,t,n){},{}],10:[function(e,t,n){function r(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0;n<e.length;n++)if(t===e[n])return n;return-1}var i=e("__browserify_process");i.EventEmitter||(i.EventEmitter=function(){});var s=n.EventEmitter=i.EventEmitter,o=typeof Array.isArray=="function"?Array.isArray:function(e){return Object.prototype.toString.call(e)==="[object Array]"},u=200;s.prototype.setMaxListeners=function(e){this._events||(this._events={}),this._events.maxListeners=e},s.prototype.emit=function(e){if(e==="error")if(!this._events||!this._events.error||o(this._events.error)&&!this._events.error.length)throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");if(!this._events)return!1;var t=this._events[e];if(!t)return!1;if(typeof t=="function"){switch(arguments.length){case 1:t.call(this);break;case 2:t.call(this,arguments[1]);break;case 3:t.call(this,arguments[1],arguments[2]);break;default:var n=Array.prototype.slice.call(arguments,1);t.apply(this,n)}return!0}if(o(t)){var n=Array.prototype.slice.call(arguments,1),r=t.slice();for(var i=0,s=r.length;i<s;i++)r[i].apply(this,n);return!0}return!1},s.prototype.addListener=function(e,t){if("function"!=typeof t)throw new Error("addListener only takes instances of Function");this._events||(this._events={}),this.emit("newListener",e,t);if(!this._events[e])this._events[e]=t;else if(o(this._events[e])){if(!this._events[e].warned){var n;this._events.maxListeners!==undefined?n=this._events.maxListeners:n=u,n&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),console.trace())}this._events[e].push(t)}else this._events[e]=[this._events[e],t];return this},s.prototype.on=s.prototype.addListener,s.prototype.once=function(e,t){var n=this;return n.on(e,function r(){n.removeListener(e,r),t.apply(this,arguments)}),this},s.prototype.removeListener=function(e,t){if("function"!=typeof t)throw new Error("removeListener only takes instances of Function");if(!this._events||!this._events[e])return this;var n=this._events[e];if(o(n)){var i=r(n,t);if(i<0)return this;n.splice(i,1),n.length==0&&delete this._events[e]}else this._events[e]===t&&delete this._events[e];return this},s.prototype.removeAllListeners=function(e){return arguments.length===0?(this._events={},this):(e&&this._events&&this._events[e]&&(this._events[e]=null),this)},s.prototype.listeners=function(e){return this._events||(this._events={}),this._events[e]||(this._events[e]=[]),o(this._events[e])||(this._events[e]=[this._events[e]]),this._events[e]},s.listenerCount=function(e,t){var n;return!e._events||!e._events[t]?n=0:typeof e._events[t]=="function"?n=1:n=e._events[t].length,n}},{__browserify_process:11}],11:[function(e,t,n){var r=t.exports={};r.nextTick=function(){var e=typeof window!="undefined"&&window.setImmediate,t=typeof window!="undefined"&&window.postMessage&&window.addEventListener;if(e)return function(e){return window.setImmediate(e)};if(t){var n=[];return window.addEventListener("message",function(e){if(e.source===window&&e.data==="process-tick"){e.stopPropagation();if(n.length>0){var t=n.shift();t()}}},!0),function(e){n.push(e),window.postMessage("process-tick","*")}}return function(e){setTimeout(e,0)}}(),r.title="browser",r.browser=!0,r.env={},r.argv=[],r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")}},{}],jshint:[function(e,t,n){t.exports=e("n4bKNg")},{}]},{},["n4bKNg"]),n.exports=r("jshint")})
\ No newline at end of file
+"no use strict";(function(e){if(typeof e.window!="undefined"&&e.document)return;e.console=function(){var e=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:e})},e.console.error=e.console.warn=e.console.log=e.console.trace=e.console,e.window=e,e.ace=e,e.onerror=function(e,t,n,r,i){console.error("Worker "+(i?i.stack:e))},e.normalizeModule=function(t,n){if(n.indexOf("!")!==-1){var r=n.split("!");return e.normalizeModule(t,r[0])+"!"+e.normalizeModule(t,r[1])}if(n.charAt(0)=="."){var i=t.split("/").slice(0,-1).join("/");n=(i?i+"/":"")+n;while(n.indexOf(".")!==-1&&s!=n){var s=n;n=n.replace(/^\.\//,"").replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return n},e.require=function(t,n){n||(n=t,t=null);if(!n.charAt)throw new Error("worker.js require() accepts only (parentId, id) as arguments");n=e.normalizeModule(t,n);var r=e.require.modules[n];if(r)return r.initialized||(r.initialized=!0,r.exports=r.factory().exports),r.exports;var i=n.split("/");if(!e.require.tlns)return console.log("unable to load "+n);i[0]=e.require.tlns[i[0]]||i[0];var s=i.join("/")+".js";return e.require.id=n,importScripts(s),e.require(t,n)},e.require.modules={},e.require.tlns={},e.define=function(t,n,r){arguments.length==2?(r=n,typeof t!="string"&&(n=t,t=e.require.id)):arguments.length==1&&(r=t,n=[],t=e.require.id),n.length||(n=["require","exports","module"]);if(t.indexOf("text!")===0)return;var i=function(n){return e.require(t,n)};e.require.modules[t]={exports:{},factory:function(){var e=this,t=r.apply(this,n.map(function(t){switch(t){case"require":return i;case"exports":return e.exports;case"module":return e;default:return i(t)}}));return t&&(e.exports=t),e}}},e.define.amd={},e.initBaseUrls=function(e){require.tlns=e},e.initSender=function(){var t=e.require("ace/lib/event_emitter").EventEmitter,n=e.require("ace/lib/oop"),r=function(){};return function(){n.implement(this,t),this.callback=function(e,t){postMessage({type:"call",id:t,data:e})},this.emit=function(e,t){postMessage({type:"event",name:e,data:t})}}.call(r.prototype),new r};var t=e.main=null,n=e.sender=null;e.onmessage=function(r){var i=r.data;if(i.command){if(!t[i.command])throw new Error("Unknown command:"+i.command);t[i.command].apply(t,i.args)}else if(i.init){initBaseUrls(i.tlns),require("ace/lib/es5-shim"),n=e.sender=initSender();var s=require(i.module)[i.classname];t=e.main=new s(n)}else i.event&&n&&n._signal(i.event,i.data)}})(this),ace.define("ace/mode/javascript_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/javascript/jshint"],function(require,exports,module){function startRegex(e){return RegExp("^("+e.join("|")+")")}var oop=require("../lib/oop"),Mirror=require("../worker/mirror").Mirror,lint=require("./javascript/jshint").JSHINT,disabledWarningsRe=startRegex(["Bad for in variable '(.+)'.",'Missing "use strict"']),errorsRe=startRegex(["Unexpected","Expected ","Confusing (plus|minus)","\\{a\\} unterminated regular expression","Unclosed ","Unmatched ","Unbegun comment","Bad invocation","Missing space after","Missing operator at"]),infoRe=startRegex(["Expected an assignment","Bad escapement of EOL","Unexpected comma","Unexpected space","Missing radix parameter.","A leading decimal point can","\\['{a}'\\] is better written in dot notation.","'{a}' used out of scope"]),JavaScriptWorker=exports.JavaScriptWorker=function(e){Mirror.call(this,e),this.setTimeout(500),this.setOptions()};oop.inherits(JavaScriptWorker,Mirror),function(){this.setOptions=function(e){this.options=e||{esnext:!0,moz:!0,devel:!0,browser:!0,node:!0,laxcomma:!0,laxbreak:!0,lastsemic:!0,onevar:!1,passfail:!1,maxerr:100,expr:!0,multistr:!0,globalstrict:!0},this.doc.getValue()&&this.deferredUpdate.schedule(100)},this.changeOptions=function(e){oop.mixin(this.options,e),this.doc.getValue()&&this.deferredUpdate.schedule(100)},this.isValidJS=function(str){try{eval("throw 0;"+str)}catch(e){if(e===0)return!0}return!1},this.onUpdate=function(){var e=this.doc.getValue();e=e.replace(/^#!.*\n/,"\n");if(!e){this.sender.emit("jslint",[]);return}var t=[],n=this.isValidJS(e)?"warning":"error";lint(e,this.options);var r=lint.errors,i=!1;for(var s=0;s<r.length;s++){var o=r[s];if(!o)continue;var u=o.raw,a="warning";if(u=="Missing semicolon."){var f=o.evidence.substr(o.character);f=f.charAt(f.search(/\S/)),n=="error"&&f&&/[\w\d{(['"]/.test(f)?(o.reason='Missing ";" before statement',a="error"):a="info"}else{if(disabledWarningsRe.test(u))continue;infoRe.test(u)?a="info":errorsRe.test(u)?(i=!0,a=n):u=="'{a}' is not defined."?a="warning":u=="'{a}' is defined but never used."&&(a="info")}t.push({row:o.line-1,column:o.character-1,text:o.reason,type:a,raw:u}),i}this.sender.emit("jslint",t)}}.call(JavaScriptWorker.prototype)}),ace.define("ace/lib/oop",["require","exports","module"],function(e,t,n){t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}}),ace.define("ace/worker/mirror",["require","exports","module","ace/document","ace/lib/lang"],function(e,t,n){var r=e("../document").Document,i=e("../lib/lang"),s=t.Mirror=function(e){this.sender=e;var t=this.doc=new r(""),n=this.deferredUpdate=i.delayedCall(this.onUpdate.bind(this)),s=this;e.on("change",function(e){t.applyDeltas(e.data);if(s.$timeout)return n.schedule(s.$timeout);s.onUpdate()})};(function(){this.$timeout=500,this.setTimeout=function(e){this.$timeout=e},this.setValue=function(e){this.doc.setValue(e),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(e){this.sender.callback(this.doc.getValue(),e)},this.onUpdate=function(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(s.prototype)}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(e,t,n){function r(){}function i(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(t){}}function s(e){return e=+e,e!==e?e=0:e!==0&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}function o(e){var t=typeof e;return e===null||t==="undefined"||t==="boolean"||t==="number"||t==="string"}function u(e){var t,n,r;if(o(e))return e;n=e.valueOf;if(typeof n=="function"){t=n.call(e);if(o(t))return t}r=e.toString;if(typeof r=="function"){t=r.call(e);if(o(t))return t}throw new TypeError}Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if(typeof t!="function")throw new TypeError("Function.prototype.bind called on incompatible "+t);var n=c.call(arguments,1),i=function(){if(this instanceof i){var r=t.apply(this,n.concat(c.call(arguments)));return Object(r)===r?r:this}return t.apply(e,n.concat(c.call(arguments)))};return t.prototype&&(r.prototype=t.prototype,i.prototype=new r,r.prototype=null),i});var a=Function.prototype.call,f=Array.prototype,l=Object.prototype,c=f.slice,h=a.bind(l.toString),p=a.bind(l.hasOwnProperty),d,v,m,g,y;if(y=p(l,"__defineGetter__"))d=a.bind(l.__defineGetter__),v=a.bind(l.__defineSetter__),m=a.bind(l.__lookupGetter__),g=a.bind(l.__lookupSetter__);if([1,2].splice(0).length!=2)if(!function(){function e(e){var t=new Array(e+2);return t[0]=t[1]=0,t}var t=[],n;t.splice.apply(t,e(20)),t.splice.apply(t,e(26)),n=t.length,t.splice(5,0,"XXX"),n+1==t.length;if(n+1==t.length)return!0}())Array.prototype.splice=function(e,t){var n=this.length;e>0?e>n&&(e=n):e==void 0?e=0:e<0&&(e=Math.max(n+e,0)),e+t<n||(t=n-e);var r=this.slice(e,e+t),i=c.call(arguments,2),s=i.length;if(e===n)s&&this.push.apply(this,i);else{var o=Math.min(t,n-e),u=e+o,a=u+s-o,f=n-u,l=n-o;if(a<u)for(var h=0;h<f;++h)this[a+h]=this[u+h];else if(a>u)for(h=f;h--;)this[a+h]=this[u+h];if(s&&e===l)this.length=l,this.push.apply(this,i);else{this.length=l+s;for(h=0;h<s;++h)this[e+h]=i[h]}}return r};else{var b=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?b.apply(this,[e===void 0?0:e,t===void 0?this.length-e:t].concat(c.call(arguments,2))):[]}}Array.isArray||(Array.isArray=function(e){return h(e)=="[object Array]"});var w=Object("a"),E=w[0]!="a"||!(0 in w);Array.prototype.forEach||(Array.prototype.forEach=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=arguments[1],i=-1,s=n.length>>>0;if(h(e)!="[object Function]")throw new TypeError;while(++i<s)i in n&&e.call(r,n[i],i,t)}),Array.prototype.map||(Array.prototype.map=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=Array(r),s=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var o=0;o<r;o++)o in n&&(i[o]=e.call(s,n[o],o,t));return i}),Array.prototype.filter||(Array.prototype.filter=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=[],s,o=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var u=0;u<r;u++)u in n&&(s=n[u],e.call(o,s,u,t)&&i.push(s));return i}),Array.prototype.every||(Array.prototype.every=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var s=0;s<r;s++)if(s in n&&!e.call(i,n[s],s,t))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var s=0;s<r;s++)if(s in n&&e.call(i,n[s],s,t))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0;if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");if(!r&&arguments.length==1)throw new TypeError("reduce of empty array with no initial value");var i=0,s;if(arguments.length>=2)s=arguments[1];else do{if(i in n){s=n[i++];break}if(++i>=r)throw new TypeError("reduce of empty array with no initial value")}while(!0);for(;i<r;i++)i in n&&(s=e.call(void 0,s,n[i],i,t));return s}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0;if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");if(!r&&arguments.length==1)throw new TypeError("reduceRight of empty array with no initial value");var i,s=r-1;if(arguments.length>=2)i=arguments[1];else do{if(s in n){i=n[s--];break}if(--s<0)throw new TypeError("reduceRight of empty array with no initial value")}while(!0);do s in this&&(i=e.call(void 0,i,n[s],s,t));while(s--);return i});if(!Array.prototype.indexOf||[0,1].indexOf(1,2)!=-1)Array.prototype.indexOf=function(e){var t=E&&h(this)=="[object String]"?this.split(""):F(this),n=t.length>>>0;if(!n)return-1;var r=0;arguments.length>1&&(r=s(arguments[1])),r=r>=0?r:Math.max(0,n+r);for(;r<n;r++)if(r in t&&t[r]===e)return r;return-1};if(!Array.prototype.lastIndexOf||[0,1].lastIndexOf(0,-3)!=-1)Array.prototype.lastIndexOf=function(e){var t=E&&h(this)=="[object String]"?this.split(""):F(this),n=t.length>>>0;if(!n)return-1;var r=n-1;arguments.length>1&&(r=Math.min(r,s(arguments[1]))),r=r>=0?r:n-Math.abs(r);for(;r>=0;r--)if(r in t&&e===t[r])return r;return-1};Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__||(e.constructor?e.constructor.prototype:l)});if(!Object.getOwnPropertyDescriptor){var S="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(e,t){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError(S+e);if(!p(e,t))return;var n,r,i;n={enumerable:!0,configurable:!0};if(y){var s=e.__proto__;e.__proto__=l;var r=m(e,t),i=g(e,t);e.__proto__=s;if(r||i)return r&&(n.get=r),i&&(n.set=i),n}return n.value=e[t],n}}Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){return Object.keys(e)});if(!Object.create){var x;Object.prototype.__proto__===null?x=function(){return{__proto__:null}}:x=function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(e,t){var n;if(e===null)n=x();else{if(typeof e!="object")throw new TypeError("typeof prototype["+typeof e+"] != 'object'");var r=function(){};r.prototype=e,n=new r,n.__proto__=e}return t!==void 0&&Object.defineProperties(n,t),n}}if(Object.defineProperty){var T=i({}),N=typeof document=="undefined"||i(document.createElement("div"));if(!T||!N)var C=Object.defineProperty}if(!Object.defineProperty||C){var k="Property description must be an object: ",L="Object.defineProperty called on non-object: ",A="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(e,t,n){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError(L+e);if(typeof n!="object"&&typeof n!="function"||n===null)throw new TypeError(k+n);if(C)try{return C.call(Object,e,t,n)}catch(r){}if(p(n,"value"))if(y&&(m(e,t)||g(e,t))){var i=e.__proto__;e.__proto__=l,delete e[t],e[t]=n.value,e.__proto__=i}else e[t]=n.value;else{if(!y)throw new TypeError(A);p(n,"get")&&d(e,t,n.get),p(n,"set")&&v(e,t,n.set)}return e}}Object.defineProperties||(Object.defineProperties=function(e,t){for(var n in t)p(t,n)&&Object.defineProperty(e,n,t[n]);return e}),Object.seal||(Object.seal=function(e){return e}),Object.freeze||(Object.freeze=function(e){return e});try{Object.freeze(function(){})}catch(O){Object.freeze=function(e){return function(t){return typeof t=="function"?t:e(t)}}(Object.freeze)}Object.preventExtensions||(Object.preventExtensions=function(e){return e}),Object.isSealed||(Object.isSealed=function(e){return!1}),Object.isFrozen||(Object.isFrozen=function(e){return!1}),Object.isExtensible||(Object.isExtensible=function(e){if(Object(e)===e)throw new TypeError;var t="";while(p(e,t))t+="?";e[t]=!0;var n=p(e,t);return delete e[t],n});if(!Object.keys){var M=!0,_=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],D=_.length;for(var P in{toString:null})M=!1;Object.keys=function I(e){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError("Object.keys called on a non-object");var I=[];for(var t in e)p(e,t)&&I.push(t);if(M)for(var n=0,r=D;n<r;n++){var i=_[n];p(e,i)&&I.push(i)}return I}}Date.now||(Date.now=function(){return(new Date).getTime()});var H="	\n\f\r   ᠎              \u2028\u2029";if(!String.prototype.trim||H.trim()){H="["+H+"]";var B=new RegExp("^"+H+H+"*"),j=new RegExp(H+H+"*$");String.prototype.trim=function(){return String(this).replace(B,"").replace(j,"")}}var F=function(e){if(e==null)throw new TypeError("can't convert "+e+" to object");return Object(e)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,t,n){var r={},i=function(){this.propagationStopped=!0},s=function(){this.defaultPrevented=!0};r._emit=r._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],r=this._defaultHandlers[e];if(!n.length&&!r)return;if(typeof t!="object"||!t)t={};t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=i),t.preventDefault||(t.preventDefault=s),n=n.slice();for(var o=0;o<n.length;o++){n[o](t,this);if(t.propagationStopped)break}if(r&&!t.defaultPrevented)return r(t,this)},r._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(!n)return;n=n.slice();for(var r=0;r<n.length;r++)n[r](t,this)},r.once=function(e,t){var n=this;t&&this.addEventListener(e,function r(){n.removeEventListener(e,r),t.apply(null,arguments)})},r.setDefaultHandler=function(e,t){var n=this._defaultHandlers;n||(n=this._defaultHandlers={_disabled_:{}});if(n[e]){var r=n[e],i=n._disabled_[e];i||(n._disabled_[e]=i=[]),i.push(r);var s=i.indexOf(t);s!=-1&&i.splice(s,1)}n[e]=t},r.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(!n)return;var r=n._disabled_[e];if(n[e]==t){var i=n[e];r&&this.setDefaultHandler(e,r.pop())}else if(r){var s=r.indexOf(t);s!=-1&&r.splice(s,1)}},r.on=r.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[e];return r||(r=this._eventRegistry[e]=[]),r.indexOf(t)==-1&&r[n?"unshift":"push"](t),t},r.off=r.removeListener=r.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(!n)return;var r=n.indexOf(t);r!==-1&&n.splice(r,1)},r.removeAllListeners=function(e){this._eventRegistry&&(this._eventRegistry[e]=[])},t.EventEmitter=r}),ace.define("ace/range",["require","exports","module"],function(e,t,n){var r=function(e,t){return e.row-t.row||e.column-t.column},i=function(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return this.compare(e,t)==0},this.compareRange=function(e){var t,n=e.end,r=e.start;return t=this.compare(n.row,n.column),t==1?(t=this.compare(r.row,r.column),t==1?2:t==0?1:0):t==-1?-2:(t=this.compare(r.row,r.column),t==-1?-1:t==1?42:0)},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return this.comparePoint(e.start)==0&&this.comparePoint(e.end)==0},this.intersects=function(e){var t=this.compareRange(e);return t==-1||t==0||t==1},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){typeof e=="object"?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){typeof e=="object"?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)||this.isStart(e,t)?!1:!0:!1},this.insideStart=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)?!1:!0:!1},this.insideEnd=function(e,t){return this.compare(e,t)==0?this.isStart(e,t)?!1:!0:!1},this.compare=function(e,t){return!this.isMultiLine()&&e===this.start.row?t<this.start.column?-1:t>this.end.column?1:0:e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else if(this.end.row<e)var n={row:e,column:0};if(this.start.row>t)var r={row:t+1,column:0};else if(this.start.row<e)var r={row:e,column:0};return i.fromPoints(r||this.start,n||this.end)},this.extend=function(e,t){var n=this.compare(e,t);if(n==0)return this;if(n==-1)var r={row:e,column:t};else var s={row:e,column:t};return i.fromPoints(r||this.start,s||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return i.fromPoints(this.start,this.end)},this.collapseRows=function(){return this.end.column==0?new i(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new i(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),n=e.documentToScreenPosition(this.end);return new i(t.row,t.column,n.row,n.column)},this.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t}}).call(i.prototype),i.fromPoints=function(e,t){return new i(e.row,e.column,t.row,t.column)},i.comparePoints=r,i.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=i}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=t.Anchor=function(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),typeof n=="undefined"?this.setPosition(t.row,t.column):this.setPosition(t,n)};(function(){r.implement(this,i),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(e){var t=e.data,n=t.range;if(n.start.row==n.end.row&&n.start.row!=this.row)return;if(n.start.row>this.row)return;if(n.start.row==this.row&&n.start.column>this.column)return;var r=this.row,i=this.column,s=n.start,o=n.end;if(t.action==="insertText")if(s.row===r&&s.column<=i){if(s.column!==i||!this.$insertRight)s.row===o.row?i+=o.column-s.column:(i-=s.column,r+=o.row-s.row)}else s.row!==o.row&&s.row<r&&(r+=o.row-s.row);else t.action==="insertLines"?(s.row!==r||i!==0||!this.$insertRight)&&s.row<=r&&(r+=o.row-s.row):t.action==="removeText"?s.row===r&&s.column<i?o.column>=i?i=s.column:i=Math.max(0,i-(o.column-s.column)):s.row!==o.row&&s.row<r?(o.row===r&&(i=Math.max(0,i-o.column)+s.column),r-=o.row-s.row):o.row===r&&(r-=o.row-s.row,i=Math.max(0,i-o.column)+s.column):t.action=="removeLines"&&s.row<=r&&(o.row<=r?r-=o.row-s.row:(r=s.row,i=0));this.setPosition(r,i,!0)},this.setPosition=function(e,t,n){var r;n?r={row:e,column:t}:r=this.$clipPositionToDocument(e,t);if(this.row==r.row&&this.column==r.column)return;var i={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._signal("change",{old:i,value:r})},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(s.prototype)}),ace.define("ace/lib/lang",["require","exports","module"],function(e,t,n){t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){var n="";while(t>0){t&1&&(n+=e);if(t>>=1)e+=e}return n};var r=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(r,"")},t.stringTrimRight=function(e){return e.replace(i,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){var t=[];for(var n=0,r=e.length;n<r;n++)e[n]&&typeof e[n]=="object"?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=function(e){if(typeof e!="object"||!e)return e;var n=e.constructor;if(n===RegExp)return e;var r=n();for(var i in e)typeof e[i]=="object"?r[i]=t.deepCopy(e[i]):r[i]=e[i];return r},t.arrayToMap=function(e){var t={};for(var n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return e.replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,function(e){n.push({offset:arguments[arguments.length-2],length:e.length})}),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},r=function(e){return r.cancel(),t=setTimeout(n,e||0),r};return r.schedule=r,r.call=function(){return this.cancel(),e(),r},r.cancel=function(){return clearTimeout(t),t=null,r},r.isPending=function(){return t},r},t.delayedCall=function(e,t){var n=null,r=function(){n=null,e()},i=function(e){n==null&&(n=setTimeout(r,e||t))};return i.delay=function(e){n&&clearTimeout(n),n=setTimeout(r,e||t)},i.schedule=i,i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){return n},i}}),ace.define("ace/mode/javascript/jshint",["require","exports","module"],function(e,t,n){n.exports=function r(t,n,i){function s(u,a){if(!n[u]){if(!t[u]){var f=typeof e=="function"&&e;if(!a&&f)return f(u,!0);if(o)return o(u,!0);throw new Error("Cannot find module '"+u+"'")}var l=n[u]={exports:{}};t[u][0].call(l.exports,function(e){var n=t[u][1][e];return s(n?n:e)},l,l.exports,r,t,n,i)}return n[u].exports}var o=typeof e=="function"&&e;for(var u=0;u<i.length;u++)s(i[u]);return s}({1:[function(e,t,n){var r=[];for(var i=0;i<128;i++)r[i]=i===36||i>=65&&i<=90||i===95||i>=97&&i<=122;var s=[];for(var i=0;i<128;i++)s[i]=r[i]||i>=48&&i<=57;t.exports={asciiIdentifierStartTable:r,asciiIdentifierPartTable:s}},{}],2:[function(e,t,n){(function(){var e=this,r=e._,i={},s=Array.prototype,o=Object.prototype,u=Function.prototype,a=s.push,f=s.slice,l=s.concat,c=o.toString,h=o.hasOwnProperty,p=s.forEach,d=s.map,v=s.reduce,m=s.reduceRight,g=s.filter,y=s.every,b=s.some,w=s.indexOf,E=s.lastIndexOf,S=Array.isArray,x=Object.keys,T=u.bind,N=function(e){if(e instanceof N)return e;if(!(this instanceof N))return new N(e);this._wrapped=e};typeof n!="undefined"?(typeof t!="undefined"&&t.exports&&(n=t.exports=N),n._=N):e._=N,N.VERSION="1.4.4";var C=N.each=N.forEach=function(e,t,n){if(e==null)return;if(p&&e.forEach===p)e.forEach(t,n);else if(e.length===+e.length){for(var r=0,s=e.length;r<s;r++)if(t.call(n,e[r],r,e)===i)return}else for(var o in e)if(N.has(e,o)&&t.call(n,e[o],o,e)===i)return};N.map=N.collect=function(e,t,n){var r=[];return e==null?r:d&&e.map===d?e.map(t,n):(C(e,function(e,i,s){r[r.length]=t.call(n,e,i,s)}),r)};var k="Reduce of empty array with no initial value";N.reduce=N.foldl=N.inject=function(e,t,n,r){var i=arguments.length>2;e==null&&(e=[]);if(v&&e.reduce===v)return r&&(t=N.bind(t,r)),i?e.reduce(t,n):e.reduce(t);C(e,function(e,s,o){i?n=t.call(r,n,e,s,o):(n=e,i=!0)});if(!i)throw new TypeError(k);return n},N.reduceRight=N.foldr=function(e,t,n,r){var i=arguments.length>2;e==null&&(e=[]);if(m&&e.reduceRight===m)return r&&(t=N.bind(t,r)),i?e.reduceRight(t,n):e.reduceRight(t);var s=e.length;if(s!==+s){var o=N.keys(e);s=o.length}C(e,function(u,a,f){a=o?o[--s]:--s,i?n=t.call(r,n,e[a],a,f):(n=e[a],i=!0)});if(!i)throw new TypeError(k);return n},N.find=N.detect=function(e,t,n){var r;return L(e,function(e,i,s){if(t.call(n,e,i,s))return r=e,!0}),r},N.filter=N.select=function(e,t,n){var r=[];return e==null?r:g&&e.filter===g?e.filter(t,n):(C(e,function(e,i,s){t.call(n,e,i,s)&&(r[r.length]=e)}),r)},N.reject=function(e,t,n){return N.filter(e,function(e,r,i){return!t.call(n,e,r,i)},n)},N.every=N.all=function(e,t,n){t||(t=N.identity);var r=!0;return e==null?r:y&&e.every===y?e.every(t,n):(C(e,function(e,s,o){if(!(r=r&&t.call(n,e,s,o)))return i}),!!r)};var L=N.some=N.any=function(e,t,n){t||(t=N.identity);var r=!1;return e==null?r:b&&e.some===b?e.some(t,n):(C(e,function(e,s,o){if(r||(r=t.call(n,e,s,o)))return i}),!!r)};N.contains=N.include=function(e,t){return e==null?!1:w&&e.indexOf===w?e.indexOf(t)!=-1:L(e,function(e){return e===t})},N.invoke=function(e,t){var n=f.call(arguments,2),r=N.isFunction(t);return N.map(e,function(e){return(r?t:e[t]).apply(e,n)})},N.pluck=function(e,t){return N.map(e,function(e){return e[t]})},N.where=function(e,t,n){return N.isEmpty(t)?n?null:[]:N[n?"find":"filter"](e,function(e){for(var n in t)if(t[n]!==e[n])return!1;return!0})},N.findWhere=function(e,t){return N.where(e,t,!0)},N.max=function(e,t,n){if(!t&&N.isArray(e)&&e[0]===+e[0]&&e.length<65535)return Math.max.apply(Math,e);if(!t&&N.isEmpty(e))return-Infinity;var r={computed:-Infinity,value:-Infinity};return C(e,function(e,i,s){var o=t?t.call(n,e,i,s):e;o>=r.computed&&(r={value:e,computed:o})}),r.value},N.min=function(e,t,n){if(!t&&N.isArray(e)&&e[0]===+e[0]&&e.length<65535)return Math.min.apply(Math,e);if(!t&&N.isEmpty(e))return Infinity;var r={computed:Infinity,value:Infinity};return C(e,function(e,i,s){var o=t?t.call(n,e,i,s):e;o<r.computed&&(r={value:e,computed:o})}),r.value},N.shuffle=function(e){var t,n=0,r=[];return C(e,function(e){t=N.random(n++),r[n-1]=r[t],r[t]=e}),r};var A=function(e){return N.isFunction(e)?e:function(t){return t[e]}};N.sortBy=function(e,t,n){var r=A(t);return N.pluck(N.map(e,function(e,t,i){return{value:e,index:t,criteria:r.call(n,e,t,i)}}).sort(function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||n===void 0)return 1;if(n<r||r===void 0)return-1}return e.index<t.index?-1:1}),"value")};var O=function(e,t,n,r){var i={},s=A(t||N.identity);return C(e,function(t,o){var u=s.call(n,t,o,e);r(i,u,t)}),i};N.groupBy=function(e,t,n){return O(e,t,n,function(e,t,n){(N.has(e,t)?e[t]:e[t]=[]).push(n)})},N.countBy=function(e,t,n){return O(e,t,n,function(e,t){N.has(e,t)||(e[t]=0),e[t]++})},N.sortedIndex=function(e,t,n,r){n=n==null?N.identity:A(n);var i=n.call(r,t),s=0,o=e.length;while(s<o){var u=s+o>>>1;n.call(r,e[u])<i?s=u+1:o=u}return s},N.toArray=function(e){return e?N.isArray(e)?f.call(e):e.length===+e.length?N.map(e,N.identity):N.values(e):[]},N.size=function(e){return e==null?0:e.length===+e.length?e.length:N.keys(e).length},N.first=N.head=N.take=function(e,t,n){return e==null?void 0:t!=null&&!n?f.call(e,0,t):e[0]},N.initial=function(e,t,n){return f.call(e,0,e.length-(t==null||n?1:t))},N.last=function(e,t,n){return e==null?void 0:t!=null&&!n?f.call(e,Math.max(e.length-t,0)):e[e.length-1]},N.rest=N.tail=N.drop=function(e,t,n){return f.call(e,t==null||n?1:t)},N.compact=function(e){return N.filter(e,N.identity)};var M=function(e,t,n){return C(e,function(e){N.isArray(e)?t?a.apply(n,e):M(e,t,n):n.push(e)}),n};N.flatten=function(e,t){return M(e,t,[])},N.without=function(e){return N.difference(e,f.call(arguments,1))},N.uniq=N.unique=function(e,t,n,r){N.isFunction(t)&&(r=n,n=t,t=!1);var i=n?N.map(e,n,r):e,s=[],o=[];return C(i,function(n,r){if(t?!r||o[o.length-1]!==n:!N.contains(o,n))o.push(n),s.push(e[r])}),s},N.union=function(){return N.uniq(l.apply(s,arguments))},N.intersection=function(e){var t=f.call(arguments,1);return N.filter(N.uniq(e),function(e){return N.every(t,function(t){return N.indexOf(t,e)>=0})})},N.difference=function(e){var t=l.apply(s,f.call(arguments,1));return N.filter(e,function(e){return!N.contains(t,e)})},N.zip=function(){var e=f.call(arguments),t=N.max(N.pluck(e,"length")),n=new Array(t);for(var r=0;r<t;r++)n[r]=N.pluck(e,""+r);return n},N.object=function(e,t){if(e==null)return{};var n={};for(var r=0,i=e.length;r<i;r++)t?n[e[r]]=t[r]:n[e[r][0]]=e[r][1];return n},N.indexOf=function(e,t,n){if(e==null)return-1;var r=0,i=e.length;if(n){if(typeof n!="number")return r=N.sortedIndex(e,t),e[r]===t?r:-1;r=n<0?Math.max(0,i+n):n}if(w&&e.indexOf===w)return e.indexOf(t,n);for(;r<i;r++)if(e[r]===t)return r;return-1},N.lastIndexOf=function(e,t,n){if(e==null)return-1;var r=n!=null;if(E&&e.lastIndexOf===E)return r?e.lastIndexOf(t,n):e.lastIndexOf(t);var i=r?n:e.length;while(i--)if(e[i]===t)return i;return-1},N.range=function(e,t,n){arguments.length<=1&&(t=e||0,e=0),n=arguments[2]||1;var r=Math.max(Math.ceil((t-e)/n),0),i=0,s=new Array(r);while(i<r)s[i++]=e,e+=n;return s},N.bind=function(e,t){if(e.bind===T&&T)return T.apply(e,f.call(arguments,1));var n=f.call(arguments,2);return function(){return e.apply(t,n.concat(f.call(arguments)))}},N.partial=function(e){var t=f.call(arguments,1);return function(){return e.apply(this,t.concat(f.call(arguments)))}},N.bindAll=function(e){var t=f.call(arguments,1);return t.length===0&&(t=N.functions(e)),C(t,function(t){e[t]=N.bind(e[t],e)}),e},N.memoize=function(e,t){var n={};return t||(t=N.identity),function(){var r=t.apply(this,arguments);return N.has(n,r)?n[r]:n[r]=e.apply(this,arguments)}},N.delay=function(e,t){var n=f.call(arguments,2);return setTimeout(function(){return e.apply(null,n)},t)},N.defer=function(e){return N.delay.apply(N,[e,1].concat(f.call(arguments,1)))},N.throttle=function(e,t){var n,r,i,s,o=0,u=function(){o=new Date,i=null,s=e.apply(n,r)};return function(){var a=new Date,f=t-(a-o);return n=this,r=arguments,f<=0?(clearTimeout(i),i=null,o=a,s=e.apply(n,r)):i||(i=setTimeout(u,f)),s}},N.debounce=function(e,t,n){var r,i;return function(){var s=this,o=arguments,u=function(){r=null,n||(i=e.apply(s,o))},a=n&&!r;return clearTimeout(r),r=setTimeout(u,t),a&&(i=e.apply(s,o)),i}},N.once=function(e){var t=!1,n;return function(){return t?n:(t=!0,n=e.apply(this,arguments),e=null,n)}},N.wrap=function(e,t){return function(){var n=[e];return a.apply(n,arguments),t.apply(this,n)}},N.compose=function(){var e=arguments;return function(){var t=arguments;for(var n=e.length-1;n>=0;n--)t=[e[n].apply(this,t)];return t[0]}},N.after=function(e,t){return e<=0?t():function(){if(--e<1)return t.apply(this,arguments)}},N.keys=x||function(e){if(e!==Object(e))throw new TypeError("Invalid object");var t=[];for(var n in e)N.has(e,n)&&(t[t.length]=n);return t},N.values=function(e){var t=[];for(var n in e)N.has(e,n)&&t.push(e[n]);return t},N.pairs=function(e){var t=[];for(var n in e)N.has(e,n)&&t.push([n,e[n]]);return t},N.invert=function(e){var t={};for(var n in e)N.has(e,n)&&(t[e[n]]=n);return t},N.functions=N.methods=function(e){var t=[];for(var n in e)N.isFunction(e[n])&&t.push(n);return t.sort()},N.extend=function(e){return C(f.call(arguments,1),function(t){if(t)for(var n in t)e[n]=t[n]}),e},N.pick=function(e){var t={},n=l.apply(s,f.call(arguments,1));return C(n,function(n){n in e&&(t[n]=e[n])}),t},N.omit=function(e){var t={},n=l.apply(s,f.call(arguments,1));for(var r in e)N.contains(n,r)||(t[r]=e[r]);return t},N.defaults=function(e){return C(f.call(arguments,1),function(t){if(t)for(var n in t)e[n]==null&&(e[n]=t[n])}),e},N.clone=function(e){return N.isObject(e)?N.isArray(e)?e.slice():N.extend({},e):e},N.tap=function(e,t){return t(e),e};var _=function(e,t,n,r){if(e===t)return e!==0||1/e==1/t;if(e==null||t==null)return e===t;e instanceof N&&(e=e._wrapped),t instanceof N&&(t=t._wrapped);var i=c.call(e);if(i!=c.call(t))return!1;switch(i){case"[object String]":return e==String(t);case"[object Number]":return e!=+e?t!=+t:e==0?1/e==1/t:e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object RegExp]":return e.source==t.source&&e.global==t.global&&e.multiline==t.multiline&&e.ignoreCase==t.ignoreCase}if(typeof e!="object"||typeof t!="object")return!1;var s=n.length;while(s--)if(n[s]==e)return r[s]==t;n.push(e),r.push(t);var o=0,u=!0;if(i=="[object Array]"){o=e.length,u=o==t.length;if(u)while(o--)if(!(u=_(e[o],t[o],n,r)))break}else{var a=e.constructor,f=t.constructor;if(a!==f&&!(N.isFunction(a)&&a instanceof a&&N.isFunction(f)&&f instanceof f))return!1;for(var l in e)if(N.has(e,l)){o++;if(!(u=N.has(t,l)&&_(e[l],t[l],n,r)))break}if(u){for(l in t)if(N.has(t,l)&&!(o--))break;u=!o}}return n.pop(),r.pop(),u};N.isEqual=function(e,t){return _(e,t,[],[])},N.isEmpty=function(e){if(e==null)return!0;if(N.isArray(e)||N.isString(e))return e.length===0;for(var t in e)if(N.has(e,t))return!1;return!0},N.isElement=function(e){return!!e&&e.nodeType===1},N.isArray=S||function(e){return c.call(e)=="[object Array]"},N.isObject=function(e){return e===Object(e)},C(["Arguments","Function","String","Number","Date","RegExp"],function(e){N["is"+e]=function(t){return c.call(t)=="[object "+e+"]"}}),N.isArguments(arguments)||(N.isArguments=function(e){return!!e&&!!N.has(e,"callee")}),typeof /./!="function"&&(N.isFunction=function(e){return typeof e=="function"}),N.isFinite=function(e){return isFinite(e)&&!isNaN(parseFloat(e))},N.isNaN=function(e){return N.isNumber(e)&&e!=+e},N.isBoolean=function(e){return e===!0||e===!1||c.call(e)=="[object Boolean]"},N.isNull=function(e){return e===null},N.isUndefined=function(e){return e===void 0},N.has=function(e,t){return h.call(e,t)},N.noConflict=function(){return e._=r,this},N.identity=function(e){return e},N.times=function(e,t,n){var r=Array(e);for(var i=0;i<e;i++)r[i]=t.call(n,i);return r},N.random=function(e,t){return t==null&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))};var D={escape:{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;"}};D.unescape=N.invert(D.escape);var P={escape:new RegExp("["+N.keys(D.escape).join("")+"]","g"),unescape:new RegExp("("+N.keys(D.unescape).join("|")+")","g")};N.each(["escape","unescape"],function(e){N[e]=function(t){return t==null?"":(""+t).replace(P[e],function(t){return D[e][t]})}}),N.result=function(e,t){if(e==null)return null;var n=e[t];return N.isFunction(n)?n.call(e):n},N.mixin=function(e){C(N.functions(e),function(t){var n=N[t]=e[t];N.prototype[t]=function(){var e=[this._wrapped];return a.apply(e,arguments),I.call(this,n.apply(N,e))}})};var H=0;N.uniqueId=function(e){var t=++H+"";return e?e+t:t},N.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var B=/(.)^/,j={"'":"'","\\":"\\","\r":"r","\n":"n","	":"t","\u2028":"u2028","\u2029":"u2029"},F=/\\|'|\r|\n|\t|\u2028|\u2029/g;N.template=function(e,t,n){var r;n=N.defaults({},n,N.templateSettings);var i=new RegExp([(n.escape||B).source,(n.interpolate||B).source,(n.evaluate||B).source].join("|")+"|$","g"),s=0,o="__p+='";e.replace(i,function(t,n,r,i,u){return o+=e.slice(s,u).replace(F,function(e){return"\\"+j[e]}),n&&(o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'"),r&&(o+="'+\n((__t=("+r+"))==null?'':__t)+\n'"),i&&(o+="';\n"+i+"\n__p+='"),s=u+t.length,t}),o+="';\n",n.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{r=new Function(n.variable||"obj","_",o)}catch(u){throw u.source=o,u}if(t)return r(t,N);var a=function(e){return r.call(this,e,N)};return a.source="function("+(n.variable||"obj")+"){\n"+o+"}",a},N.chain=function(e){return N(e).chain()};var I=function(e){return this._chain?N(e).chain():e};N.mixin(N),C(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=s[e];N.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),(e=="shift"||e=="splice")&&n.length===0&&delete n[0],I.call(this,n)}}),C(["concat","join","slice"],function(e){var t=s[e];N.prototype[e]=function(){return I.call(this,t.apply(this._wrapped,arguments))}}),N.extend(N.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}).call(this)},{}],3:[function(e,t,n){var r=e("underscore"),i=e("events"),s=e("./vars.js"),o=e("./messages.js"),u=e("./lex.js").Lexer,a=e("./reg.js"),f=e("./state.js").state,l=e("./style.js"),c=function(){function e(e,t){return e=e.trim(),/^[+-]W\d{3}$/g.test(e)?!0:Ot[e]===undefined&&At[e]===undefined&&t.type!=="jslint"&&!Dt[e]?(E("E001",t,e),!1):!0}function t(e){return Object.prototype.toString.call(e)==="[object String]"}function n(e,t){return e?!e.identifier||e.value!==t?!1:!0:!1}function h(e){if(!e.reserved)return!1;var t=e.meta;if(t&&t.isFutureReservedWord&&f.option.inES5()){if(!t.es5)return!1;if(t.strictOnly&&!f.option.strict&&!f.directive["use strict"])return!1;if(e.isProperty)return!1}return!0}function p(e,t){return e.replace(/\{([^{}]*)\}/g,function(e,n){var r=t[n];return typeof r=="string"||typeof r=="number"?r:e})}function d(e,t){Object.keys(t).forEach(function(n){if(c.blacklist.hasOwnProperty(n))return;e[n]=t[n]})}function v(){f.option.esnext&&d(Jt,s.newEcmaIdentifiers),f.option.couch&&d(Jt,s.couch),f.option.rhino&&d(Jt,s.rhino),f.option.shelljs&&(d(Jt,s.shelljs),d(Jt,s.node)),f.option.typed&&d(Jt,s.typed),f.option.phantom&&d(Jt,s.phantom),f.option.prototypejs&&d(Jt,s.prototypejs),f.option.node&&(d(Jt,s.node),d(Jt,s.typed)),f.option.devel&&d(Jt,s.devel),f.option.dojo&&d(Jt,s.dojo),f.option.browser&&(d(Jt,s.browser),d(Jt,s.typed)),f.option.nonstandard&&d(Jt,s.nonstandard),f.option.jquery&&d(Jt,s.jquery),f.option.mootools&&d(Jt,s.mootools),f.option.worker&&d(Jt,s.worker),f.option.wsh&&d(Jt,s.wsh),f.option.globalstrict&&f.option.strict!==!1&&(f.option.strict=!0),f.option.yui&&d(Jt,s.yui),f.option.mocha&&d(Jt,s.mocha),f.option.inMoz=function(e){return f.option.moz},f.option.inESNext=function(e){return f.option.moz||f.option.esnext},f.option.inES5=function(){return!f.option.es3},f.option.inES3=function(e){return e?!f.option.moz&&!f.option.esnext&&f.option.es3:f.option.es3}}function m(e,t,n){var r=Math.floor(t/f.lines.length*100),i=o.errors[e].desc;throw{name:"JSHintError",line:t,character:n,message:i+" ("+r+"% scanned).",raw:i,code:e}}function g(e,t,n,r){return c.undefs.push([e,t,n,r])}function y(){var e=f.ignoredLines;if(r.isEmpty(e))return;c.errors=r.reject(c.errors,function(t){return e[t.line]})}function b(e,t,n,r,i,s){var u,a,l,h;if(/^W\d{3}$/.test(e)){if(f.ignored[e])return;h=o.warnings[e]}else/E\d{3}/.test(e)?h=o.errors[e]:/I\d{3}/.test(e)&&(h=o.info[e]);return t=t||f.tokens.next,t.id==="(end)"&&(t=f.tokens.curr),a=t.line||0,u=t.from||0,l={id:"(error)",raw:h.desc,code:h.code,evidence:f.lines[a-1]||"",line:a,character:u,scope:c.scope,a:n,b:r,c:i,d:s},l.reason=p(h.desc,l),c.errors.push(l),y(),c.errors.length>=f.option.maxerr&&m("E043",a,u),l}function w(e,t,n,r,i,s,o){return b(e,{line:t,from:n},r,i,s,o)}function E(e,t,n,r,i,s){b(e,t,n,r,i,s)}function S(e,t,n,r,i,s,o){return E(e,{line:t,from:n},r,i,s,o)}function x(e,t){var n;return n={id:"(internal)",elem:e,value:t},c.internals.push(n),n}function T(e,t){t=t||{};var n=t.type,i=t.token,s=t.islet;n==="exception"&&r.has(jt["(context)"],e)&&jt[e]!==!0&&!f.option.node&&b("W002",f.tokens.next,e),r.has(jt,e)&&!jt["(global)"]&&(jt[e]===!0?f.option.latedef&&(f.option.latedef===!0&&r.contains([jt[e],n],"unction")||!r.contains([jt[e],n],"unction"))&&b("W003",f.tokens.next,e):((!f.option.shadow||r.contains(["inner","outer"],f.option.shadow))&&n!=="exception"||jt["(blockscope)"].getlabel(e))&&b("W004",f.tokens.next,e)),jt["(context)"]&&r.has(jt["(context)"],e)&&n!=="function"&&f.option.shadow==="outer"&&b("W123",f.tokens.next,e),s?jt["(blockscope)"].current.add(e,n,f.tokens.curr):(jt["(blockscope)"].shadow(e),jt[e]=n,i&&(jt["(tokens)"][e]=i),pt(jt,e,{unused:t.unused||!1}),jt["(global)"]?(It[e]=jt,r.has(qt,e)&&(f.option.latedef&&(f.option.latedef===!0&&r.contains([jt[e],n],"unction")||!r.contains([jt[e],n],"unction"))&&b("W003",f.tokens.next,e),delete qt[e])):Kt[e]=jt)}function N(){var t=f.tokens.next,n=t.body.match(/(-\s+)?[^\s,:]+(?:\s*:\s*(-\s+)?[^\s,]+)?/g),i={};if(t.type==="globals"){n.forEach(function(e){e=e.split(":");var t=(e[0]||"").trim(),n=(e[1]||"").trim();t.charAt(0)==="-"?(t=t.slice(1),n=!1,c.blacklist[t]=t,delete Jt[t]):i[t]=n==="true"}),d(Jt,i);for(var s in i)r.has(i,s)&&(Pt[s]=t)}t.type==="exported"&&n.forEach(function(e){Ht[e]=!0}),t.type==="members"&&(Vt=Vt||{},n.forEach(function(e){var t=e.charAt(0),n=e.charAt(e.length-1);t===n&&(t==='"'||t==="'")&&(e=e.substr(1,e.length-2).replace('\\"','"')),Vt[e]=!1}));var o=["maxstatements","maxparams","maxdepth","maxcomplexity","maxerr","maxlen","indent"];if(t.type==="jshint"||t.type==="jslint")n.forEach(function(n){n=n.split(":");var r=(n[0]||"").trim(),i=(n[1]||"").trim();if(!e(r,t))return;if(o.indexOf(r)>=0){if(i!=="false"){i=+i;if(typeof i!="number"||!isFinite(i)||i<=0||Math.floor(i)!==i){E("E032",t,n[1].trim());return}f.option[r]=i}else f.option[r]=r==="indent"?4:!1;return}if(r==="validthis"){if(jt["(global)"])return void E("E009");if(i!=="true"&&i!=="false")return void E("E002",t);f.option.validthis=i==="true";return}if(r==="quotmark"){switch(i){case"true":case"false":f.option.quotmark=i==="true";break;case"double":case"single":f.option.quotmark=i;break;default:E("E002",t)}return}if(r==="shadow"){switch(i){case"true":f.option.shadow=!0;break;case"outer":f.option.shadow="outer";break;case"false":case"inner":f.option.shadow="inner";break;default:E("E002",t)}return}if(r==="unused"){switch(i){case"true":f.option.unused=!0;break;case"false":f.option.unused=!1;break;case"vars":case"strict":f.option.unused=i;break;default:E("E002",t)}return}if(r==="latedef"){switch(i){case"true":f.option.latedef=!0;break;case"false":f.option.latedef=!1;break;case"nofunc":f.option.latedef="nofunc";break;default:E("E002",t)}return}if(r==="ignore"){switch(i){case"start":f.ignoreLinterErrors=!0;break;case"end":f.ignoreLinterErrors=!1;break;case"line":f.ignoredLines[t.line]=!0,y();break;default:E("E002",t)}return}var s=/^([+-])(W\d{3})$/g.exec(r);if(s){f.ignored[s[2]]=s[1]==="-";return}var u;if(i==="true"||i==="false"){t.type==="jslint"?(u=_t[r]||r,f.option[u]=i==="true",Mt[u]!==undefined&&(f.option[u]=!f.option[u])):f.option[r]=i==="true",r==="newcap"&&(f.option["(explicitNewcap)"]=!0);return}E("E002",t)}),v()}function C(e){var t=e||0,n=0,r;while(n<=t)r=zt[n],r||(r=zt[n]=Wt.token()),n+=1;return r}function k(e,t){switch(f.tokens.curr.id){case"(number)":f.tokens.next.id==="."&&b("W005",f.tokens.curr);break;case"-":(f.tokens.next.id==="-"||f.tokens.next.id==="--")&&b("W006");break;case"+":(f.tokens.next.id==="+"||f.tokens.next.id==="++")&&b("W007")}if(f.tokens.curr.type==="(string)"||f.tokens.curr.identifier)Ct=f.tokens.curr.value;e&&f.tokens.next.id!==e&&(t?f.tokens.next.id==="(end)"?E("E019",t,t.id):E("E020",f.tokens.next,e,t.id,t.line,f.tokens.next.value):(f.tokens.next.type!=="(identifier)"||f.tokens.next.value!==e)&&b("W116",f.tokens.next,e,f.tokens.next.value)),f.tokens.prev=f.tokens.curr,f.tokens.curr=f.tokens.next;for(;;){f.tokens.next=zt.shift()||Wt.token(),f.tokens.next||m("E041",f.tokens.curr.line);if(f.tokens.next.id==="(end)"||f.tokens.next.id==="(error)")return;f.tokens.next.check&&f.tokens.next.check();if(f.tokens.next.isSpecial)N();else if(f.tokens.next.id!=="(endline)")break}}function L(e){return e.infix||!e.identifier&&!!e.led}function A(){var e=f.tokens.curr,t=f.tokens.next;return t.id===";"||t.id==="}"||t.id===":"?!0:L(t)===L(e)||e.id==="yield"&&f.option.inMoz(!0)?e.line!==t.line:!1}function O(e,t){var n,r=!1,i=!1,s=!1;!t&&f.tokens.next.value==="let"&&C(0).value==="("&&(f.option.inMoz(!0)||b("W118",f.tokens.next,"let expressions"),s=!0,jt["(blockscope)"].stack(),k("let"),k("("),f.syntax.let.fud.call(f.syntax.let.fud,!1),k(")")),f.tokens.next.id==="(end)"&&E("E006",f.tokens.curr),f.option.asi&&(f.tokens.curr.id==="["||f.tokens.curr.id==="("||f.tokens.curr.id==="/")&&f.tokens.prev.line<f.tokens.curr.line&&b("W014",f.tokens.curr,f.tokens.curr.id),k(),t&&(Ct="anonymous",jt["(verb)"]=f.tokens.curr.value);if(t===!0&&f.tokens.curr.fud)n=f.tokens.curr.fud();else{f.tokens.curr.nud?n=f.tokens.curr.nud():E("E030",f.tokens.curr,f.tokens.curr.id);while(e<f.tokens.next.lbp&&!A())r=f.tokens.curr.value==="Array",i=f.tokens.curr.value==="Object",n&&(n.value||n.first&&n.first.value)&&(n.value!=="new"||n.first&&n.first.value&&n.first.value===".")&&(r=!1,n.value!==f.tokens.curr.value&&(i=!1)),k(),r&&f.tokens.curr.id==="("&&f.tokens.next.id===")"&&b("W009",f.tokens.curr),i&&f.tokens.curr.id==="("&&f.tokens.next.id===")"&&b("W010",f.tokens.curr),n&&f.tokens.curr.led?n=f.tokens.curr.led(n):E("E033",f.tokens.curr,f.tokens.curr.id)}return s&&jt["(blockscope)"].unstack(),n}function M(e,t){e=e||f.tokens.curr,t=t||f.tokens.next,!f.option.laxbreak&&e.line!==t.line&&b("W014",t,t.value)}function _(e){e=e||f.tokens.curr,e.line!==f.tokens.next.line&&b("E022",e,e.value)}function D(e,t){e.line!==t.line&&(f.option.laxcomma||(P.first&&(b("I001"),P.first=!1),b("W014",e,t.value)))}function P(e){e=e||{},e.peek?D(f.tokens.prev,f.tokens.curr):(D(f.tokens.curr,f.tokens.next),k(","));if(f.tokens.next.identifier&&(!e.property||!f.option.inES5()))switch(f.tokens.next.value){case"break":case"case":case"catch":case"continue":case"default":case"do":case"else":case"finally":case"for":case"if":case"in":case"instanceof":case"return":case"switch":case"throw":case"try":case"var":case"let":case"while":case"with":return E("E024",f.tokens.next,f.tokens.next.value),!1}if(f.tokens.next.type==="(punctuator)")switch(f.tokens.next.value){case"}":case"]":case",":if(e.allowTrailing)return!0;case")":return E("E024",f.tokens.next,f.tokens.next.value),!1}return!0}function H(e,t){var n=f.syntax[e];if(!n||typeof n!="object")f.syntax[e]=n={id:e,lbp:t,value:e};return n}function B(e){return H(e,0)}function j(e,t){var n=B(e);return n.identifier=n.reserved=!0,n.fud=t,n}function F(e,t){var n=j(e,t);return n.block=!0,n}function I(e){var t=e.id.charAt(0);if(t>="a"&&t<="z"||t>="A"&&t<="Z")e.identifier=e.reserved=!0;return e}function q(e,t){var n=H(e,150);return I(n),n.nud=typeof t=="function"?t:function(){this.right=O(150),this.arity="unary";if(this.id==="++"||this.id==="--")f.option.plusplus?b("W016",this,this.id):this.right&&(!this.right.identifier||h(this.right))&&this.right.id!=="."&&this.right.id!=="["&&b("W017",this);return this},n}function R(e,t){var n=B(e);return n.type=e,n.nud=t,n}function U(e,t){var n=R(e,t);return n.identifier=!0,n.reserved=!0,n}function z(e,t){var n=R(e,t&&t.nud||function(){return this});return t=t||{},t.isFutureReservedWord=!0,n.value=e,n.identifier=!0,n.reserved=!0,n.meta=t,n}function W(e,t){return U(e,function(){return typeof t=="function"&&t(this),this})}function X(e,t,n,r){var i=H(e,n);return I(i),i.infix=!0,i.led=function(i){return r||M(f.tokens.prev,f.tokens.curr),e==="in"&&i.id==="!"&&b("W018",i,"!"),typeof t=="function"?t(i,this):(this.left=i,this.right=O(n),this)},i}function V(e){var t=H(e,42);return t.led=function(e){return f.option.inESNext()||b("W104",f.tokens.curr,"arrow function syntax (=>)"),M(f.tokens.prev,f.tokens.curr),this.left=e,this.right=mt(undefined,undefined,!1,e),this},t}function $(e,t){var r=H(e,100);return r.led=function(e){M(f.tokens.prev,f.tokens.curr);var r=O(100);return n(e,"NaN")||n(r,"NaN")?b("W019",this):t&&t.apply(this,[e,r]),(!e||!r)&&m("E041",f.tokens.curr.line),e.id==="!"&&b("W018",e,"!"),r.id==="!"&&b("W018",r,"!"),this.left=e,this.right=r,this},r}function J(e){return e&&(e.type==="(number)"&&+e.value===0||e.type==="(string)"&&e.value===""||e.type==="null"&&!f.option.eqnull||e.type==="true"||e.type==="false"||e.type==="undefined")}function K(e,t){if(f.option.notypeof)return!1;if(!e||!t)return!1;var n=["undefined","object","boolean","number","string","function","xml","object","unknown"];return t.type==="(identifier)"&&t.value==="typeof"&&e.type==="(string)"?!r.contains(n,e.value):!1}function Q(e){function t(e){if(typeof e!="object")return;return e.right==="prototype"?e:t(e.left)}function n(e){while(!e.identifier&&typeof e.left=="object")e=e.left;if(e.identifier&&r.indexOf(e.value)>=0)return e.value}var r=["Array","ArrayBuffer","Boolean","Collator","DataView","Date","DateTimeFormat","Error","EvalError","Float32Array","Float64Array","Function","Infinity","Intl","Int16Array","Int32Array","Int8Array","Iterator","Number","NumberFormat","Object","RangeError","ReferenceError","RegExp","StopIteration","String","SyntaxError","TypeError","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray","URIError"],i=t(e);if(i)return n(i)}function G(e,t,n){var r=X(e,typeof t=="function"?t:function(e,t){t.left=e;if(e){if(f.option.freeze){var n=Q(e);n&&b("W121",e,n)}Jt[e.value]===!1&&Kt[e.value]["(global)"]===!0?b("W020",e):e["function"]&&b("W021",e,e.value),jt[e.value]==="const"&&E("E013",e,e.value);if(e.id===".")return e.left?e.left.value==="arguments"&&!f.directive["use strict"]&&b("E031",t):b("E031",t),t.right=O(10),t;if(e.id==="[")return f.tokens.curr.left.first?f.tokens.curr.left.first.forEach(function(e){e&&jt[e.value]==="const"&&E("E013",e,e.value)}):e.left?e.left.value==="arguments"&&!f.directive["use strict"]&&b("E031",t):b("E031",t),t.right=O(10),t;if(e.identifier&&!h(e))return jt[e.value]==="exception"&&b("W022",e),t.right=O(10),t;e===f.syntax["function"]&&b("W023",f.tokens.curr)}E("E031",t)},n);return r.exps=!0,r.assign=!0,r}function Y(e,t,n){var r=H(e,n);return I(r),r.led=typeof t=="function"?t:function(e){return f.option.bitwise&&b("W016",this,this.id),this.left=e,this.right=O(n),this},r}function Z(e){return G(e,function(e,t){f.option.bitwise&&b("W016",t,t.id);if(e)return e.id==="."||e.id==="["||e.identifier&&!h(e)?(O(10),t):(e===f.syntax["function"]&&b("W023",f.tokens.curr),t);E("E031",t)},20)}function et(e){var t=H(e,150);return t.led=function(e){return f.option.plusplus?b("W016",this,this.id):(!e.identifier||h(e))&&e.id!=="."&&e.id!=="["&&b("W017",this),this.left=e,this},t}function tt(e,t){if(!f.tokens.next.identifier)return;k();var n=f.tokens.curr,r=f.tokens.curr.value;return h(n)?t&&f.option.inES5()?r:e&&r==="undefined"?r:(b("W024",f.tokens.curr,f.tokens.curr.id),r):r}function nt(e,t){var n=tt(e,t);if(n)return n;f.tokens.curr.id==="function"&&f.tokens.next.id==="("?b("W025"):E("E030",f.tokens.next,f.tokens.next.value)}function rt(e){var t=0,n;if(f.tokens.next.id!==";"||$t)return;for(;;){do n=C(t),t+=1;while(n.id!="(end)"&&n.id==="(comment)");if(n.reach)return;if(n.id!=="(endline)"){if(n.id==="function"){f.option.latedef===!0&&b("W026",n);break}b("W027",n,n.value,e);break}}}function it(){var e,t=Ut,n,i=Kt,s=f.tokens.next;if(s.id===";"){k(";");return}var o=h(s);o&&s.meta&&s.meta.isFutureReservedWord&&C().id===":"&&(b("W024",s,s.id),o=!1);if(r.has(["[","{"],s.value)&&on().isDestAssign){f.option.inESNext()||b("W104",f.tokens.curr,"destructuring expression"),e=wt(),e.forEach(function(e){g(jt,"W117",e.token,e.id)}),k("="),Et(e,O(10,!0)),k(";");return}s.identifier&&!o&&C().id===":"&&(k(),k(":"),Kt=Object.create(i),T(s.value,{type:"label"}),!f.tokens.next.labelled&&f.tokens.next.value!=="{"&&b("W028",f.tokens.next,s.value,f.tokens.next.value),f.tokens.next.label=s.value,s=f.tokens.next);if(s.id==="{"){var u=jt["(verb)"]==="case"&&f.tokens.curr.value===":";ut(!0,!0,!1,!1,u);return}return n=O(0,!0),n&&(!n.identifier||n.value!=="function")&&n.type!=="(punctuator)"&&!f.directive["use strict"]&&f.option.globalstrict&&f.option.strict&&b("E007"),s.block||(!f.option.expr&&(!n||!n.exps)?b("W030",f.tokens.curr):f.option.nonew&&n&&n.left&&n.id==="("&&n.left.id==="new"&&b("W031",s),f.tokens.next.id!==";"?f.option.asi||(!f.option.lastsemic||f.tokens.next.id!=="}"||f.tokens.next.line!==f.tokens.curr.line)&&w("W033",f.tokens.curr.line,f.tokens.curr.character):k(";")),Ut=t,Kt=i,n}function st(e){var t=[],n;while(!f.tokens.next.reach&&f.tokens.next.id!=="(end)")f.tokens.next.id===";"?(n=C(),(!n||n.id!=="("&&n.id!=="[")&&b("W032"),k(";")):t.push(it(e===f.tokens.next.line));return t}function ot(){var e,t,n;for(;;){if(f.tokens.next.id==="(string)"){t=C(0);if(t.id==="(endline)"){e=1;do n=C(e),e+=1;while(n.id==="(endline)");if(n.id!==";"){if(n.id!=="(string)"&&n.id!=="(number)"&&n.id!=="(regexp)"&&n.identifier!==!0&&n.id!=="}")break;b("W033",f.tokens.next)}else t=n}else if(t.id==="}")b("W033",t);else if(t.id!==";")break;k(),f.directive[f.tokens.curr.value]&&b("W034",f.tokens.curr,f.tokens.curr.value),f.tokens.curr.value==="use strict"&&(f.option["(explicitNewcap)"]||(f.option.newcap=!0),f.option.undef=!0),f.directive[f.tokens.curr.value]=!0,t.id===";"&&k(";");continue}break}}function ut(e,t,n,i,s){var o,u=Rt,a=Ut,l,c=Kt,h,p,d;Rt=e;if(!e||!f.option.funcscope)Kt=Object.create(Kt);h=f.tokens.next;var v=jt["(metrics)"];v.nestedBlockDepth+=1,v.verifyMaxNestedBlockDepthPerFunction();if(f.tokens.next.id==="{"){k("{"),jt["(blockscope)"].stack(),p=f.tokens.curr.line;if(f.tokens.next.id!=="}"){Ut+=f.option.indent;while(!e&&f.tokens.next.from>Ut)Ut+=f.option.indent;if(n){l={};for(d in f.directive)r.has(f.directive,d)&&(l[d]=f.directive[d]);ot(),f.option.strict&&jt["(context)"]["(global)"]&&!l["use strict"]&&!f.directive["use strict"]&&b("E007")}o=st(p),v.statementCount+=o.length,n&&(f.directive=l),Ut-=f.option.indent}k("}",h),jt["(blockscope)"].unstack(),Ut=a}else if(!e)if(n){l={},t&&!i&&!f.option.inMoz(!0)&&E("W118",f.tokens.curr,"function closure expressions");if(!t)for(d in f.directive)r.has(f.directive,d)&&(l[d]=f.directive[d]);O(10),f.option.strict&&jt["(context)"]["(global)"]&&!l["use strict"]&&!f.directive["use strict"]&&b("E007")}else E("E021",f.tokens.next,"{",f.tokens.next.value);else jt["(nolet)"]=!0,(!t||f.option.curly)&&b("W116",f.tokens.next,"{",f.tokens.next.value),$t=!0,Ut+=f.option.indent,o=[it()],Ut-=f.option.indent,$t=!1,delete jt["(nolet)"];switch(jt["(verb)"]){case"break":case"continue":case"return":case"throw":if(s)break;default:jt["(verb)"]=null}if(!e||!f.option.funcscope)Kt=c;return Rt=u,e&&f.option.noempty&&(!o||o.length===0)&&b("W035"),v.nestedBlockDepth-=1,o}function at(e){Vt&&typeof Vt[e]!="boolean"&&b("W036",f.tokens.curr,e),typeof Xt[e]=="number"?Xt[e]+=1:Xt[e]=1}function ft(e){var t=e.value,n=Object.getOwnPropertyDescriptor(qt,t);n?n.value.push(e.line):qt[t]=[e.line]}function lt(){var e={};e.exps=!0,jt["(comparray)"].stack();var t=!1;return f.tokens.next.value!=="for"&&(t=!0,f.option.inMoz(!0)||b("W116",f.tokens.next,"for",f.tokens.next.value),jt["(comparray)"].setState("use"),e.right=O(10)),k("for"),f.tokens.next.value==="each"&&(k("each"),f.option.inMoz(!0)||b("W118",f.tokens.curr,"for each")),k("("),jt["(comparray)"].setState("define"),e.left=O(130),r.contains(["in","of"],f.tokens.next.value)?k():E("E045",f.tokens.curr),jt["(comparray)"].setState("generate"),O(10),k(")"),f.tokens.next.value==="if"&&(k("if"),k("("),jt["(comparray)"].setState("filter"),e.filter=O(10),k(")")),t||(jt["(comparray)"].setState("use"),e.right=O(10)),k("]"),jt["(comparray)"].unstack(),e}function ct(){var e=tt(!1,!0);return e||(f.tokens.next.id==="(string)"?(e=f.tokens.next.value,k()):f.tokens.next.id==="(number)"&&(e=f.tokens.next.value.toString(),k())),e==="hasOwnProperty"&&b("W001"),e}function ht(e){var t,n,i=[],s,o=[],u,a=!1;if(e){if(Array.isArray(e)){for(var l in e){t=e[l];if(t.value==="..."){f.option.inESNext()||b("W104",t,"spread/rest operator");continue}t.value!==","&&(i.push(t.value),T(t.value,{type:"unused",token:t}))}return i}if(e.identifier===!0)return T(e.value,{type:"unused",token:e}),[e]}n=f.tokens.next,k("(");if(f.tokens.next.id===")"){k(")");return}for(;;){if(r.contains(["{","["],f.tokens.next.id)){o=wt();for(u in o)u=o[u],u.id&&(i.push(u.id),T(u.id,{type:"unused",token:u.token}))}else f.tokens.next.value==="..."?(f.option.inESNext()||b("W104",f.tokens.next,"spread/rest operator"),k("..."),s=nt(!0),i.push(s),T(s,{type:"unused",token:f.tokens.curr})):(s=nt(!0),i.push(s),T(s,{type:"unused",token:f.tokens.curr}));a&&f.tokens.next.id!=="="&&E("E051",f.tokens.current),f.tokens.next.id==="="&&(f.option.inESNext()||b("W119",f.tokens.next,"default parameters"),k("="),a=!0,O(10));if(f.tokens.next.id!==",")return k(")",n),i;P()}}function pt(e,t,n){e["(properties)"][t]||(e["(properties)"][t]={unused:!1}),r.extend(e["(properties)"][t],n)}function dt(e,t,n){return e["(properties)"][t]?e["(properties)"][t][n]||null:null}function vt(e,t,n,i){var s={"(name)":e,"(breakage)":0,"(loopage)":0,"(scope)":n,"(tokens)":{},"(properties)":{},"(catch)":!1,"(global)":!1,"(line)":null,"(character)":null,"(metrics)":null,"(statement)":null,"(context)":null,"(blockscope)":null,"(comparray)":null,"(generator)":null,"(params)":null};return t&&r.extend(s,{"(line)":t.line,"(character)":t.character,"(metrics)":gt(t)}),r.extend(s,i),s["(context)"]&&(s["(blockscope)"]=s["(context)"]["(blockscope)"],s["(comparray)"]=s["(context)"]["(comparray)"]),s}function mt(e,t,n,i){var s,o=f.option,u=f.ignored,a=Kt;return f.option=Object.create(f.option),f.ignored=Object.create(f.ignored),Kt=Object.create(Kt),jt=vt(e||'"'+Ct+'"',f.tokens.next,Kt,{"(statement)":t,"(context)":jt,"(generator)":n?!0:null}),s=jt,f.tokens.curr.funct=jt,Ft.push(jt),e&&T(e,{type:"function"}),jt["(params)"]=ht(i),jt["(metrics)"].verifyMaxParametersPerFunction(jt["(params)"]),c.undefs=r.filter(c.undefs,function(e){return!r.contains(r.union(i),e[2])}),ut(!1,!0,!0,i?!0:!1),!f.option.noyield&&n&&jt["(generator)"]!=="yielded"&&b("W124",f.tokens.curr),jt["(metrics)"].verifyMaxStatementsPerFunction(),jt["(metrics)"].verifyMaxComplexityPerFunction(),jt["(unusedOption)"]=f.option.unused,Kt=a,f.option=o,f.ignored=u,jt["(last)"]=f.tokens.curr.line,jt["(lastcharacter)"]=f.tokens.curr.character,r.map(Object.keys(jt),function(e){if(e[0]==="(")return;jt["(blockscope)"].unshadow(e)}),jt=jt["(context)"],s}function gt(e){return{statementCount:0,nestedBlockDepth:-1,ComplexityCount:1,verifyMaxStatementsPerFunction:function(){f.option.maxstatements&&this.statementCount>f.option.maxstatements&&b("W071",e,this.statementCount)},verifyMaxParametersPerFunction:function(t){t=t||[],f.option.maxparams&&t.length>f.option.maxparams&&b("W072",e,t.length)},verifyMaxNestedBlockDepthPerFunction:function(){f.option.maxdepth&&this.nestedBlockDepth>0&&this.nestedBlockDepth===f.option.maxdepth+1&&b("W073",null,this.nestedBlockDepth)},verifyMaxComplexityPerFunction:function(){var t=f.option.maxcomplexity,n=this.ComplexityCount;t&&n>t&&b("W074",e,n)}}}function yt(){jt["(metrics)"].ComplexityCount+=1}function bt(e){var t,n;e&&(t=e.id,n=e.paren,t===","&&(e=e.exprs[e.exprs.length-1])&&(t=e.id,n=n||e.paren));switch(t){case"=":case"+=":case"-=":case"*=":case"%=":case"&=":case"|=":case"^=":case"/=":!n&&!f.option.boss&&b("W084")}}function wt(){var e,t,n=[];f.option.inESNext()||b("W104",f.tokens.curr,"destructuring expression");var i=function(){var e;if(r.contains(["[","{"],f.tokens.next.value)){t=wt();for(var s in t)s=t[s],n.push({id:s.id,token:s.token})}else f.tokens.next.value===","?n.push({id:null,token:f.tokens.curr}):f.tokens.next.value==="("?(k("("),i(),k(")")):(e=nt(),e&&n.push({id:e,token:f.tokens.curr}))};if(f.tokens.next.value==="["){k("["),i();while(f.tokens.next.value!=="]")k(","),i();k("]")}else if(f.tokens.next.value==="{"){k("{"),e=nt(),f.tokens.next.value===":"?(k(":"),i()):n.push({id:e,token:f.tokens.curr});while(f.tokens.next.value!=="}")k(","),e=nt(),f.tokens.next.value===":"?(k(":"),i()):n.push({id:e,token:f.tokens.curr});k("}")}return n}function Et(e,t){var n=t.first;if(!n)return;r.zip(e,Array.isArray(n)?n:[n]).forEach(function(e){var t=e[0],n=e[1];t&&n?t.first=n:t&&t.first&&!n&&b("W080",t.first,t.first.value)})}function St(e){return f.option.inESNext()||b("W104",f.tokens.curr,"class"),e?(this.name=nt(),T(this.name,{type:"unused",token:f.tokens.curr})):f.tokens.next.identifier&&f.tokens.next.value!=="extends"&&(this.name=nt()),xt(this),this}function xt(e){var t=f.directive["use strict"];f.tokens.next.value==="extends"&&(k("extends"),e.heritage=O(10)),f.directive["use strict"]=!0,k("{"),e.body=f.syntax["{"].nud(!0),f.directive["use strict"]=t}function Tt(){var e=on();e.notJson?(!f.option.inESNext()&&e.isDestAssign&&b("W104",f.tokens.curr,"destructuring assignment"),st()):(f.option.laxbreak=!0,f.jsonMode=!0,Nt())}function Nt(){function e(){var e={},t=f.tokens.next;k("{");if(f.tokens.next.id!=="}")for(;;){if(f.tokens.next.id==="(end)")E("E026",f.tokens.next,t.line);else{if(f.tokens.next.id==="}"){b("W094",f.tokens.curr);break}f.tokens.next.id===","?E("E028",f.tokens.next):f.tokens.next.id!=="(string)"&&b("W095",f.tokens.next,f.tokens.next.value)}e[f.tokens.next.value]===!0?b("W075",f.tokens.next,f.tokens.next.value):f.tokens.next.value==="__proto__"&&!f.option.proto||f.tokens.next.value==="__iterator__"&&!f.option.iterator?b("W096",f.tokens.next,f.tokens.next.value):e[f.tokens.next.value]=!0,k(),k(":"),Nt();if(f.tokens.next.id!==",")break;k(",")}k("}")}function t(){var e=f.tokens.next;k("[");if(f.tokens.next.id!=="]")for(;;){if(f.tokens.next.id==="(end)")E("E027",f.tokens.next,e.line);else{if(f.tokens.next.id==="]"){b("W094",f.tokens.curr);break}f.tokens.next.id===","&&E("E028",f.tokens.next)}Nt();if(f.tokens.next.id!==",")break;k(",")}k("]")}switch(f.tokens.next.id){case"{":e();break;case"[":t();break;case"true":case"false":case"null":case"(number)":case"(string)":k();break;case"-":k("-"),k("(number)");break;default:E("E003",f.tokens.next)}}var Ct,kt,Lt={"<":!0,"<=":!0,"==":!0,"===":!0,"!==":!0,"!=":!0,">":!0,">=":!0,"+":!0,"-":!0,"*":!0,"/":!0,"%":!0},At={asi:!0,bitwise:!0,boss:!0,browser:!0,camelcase:!0,couch:!0,curly:!0,debug:!0,devel:!0,dojo:!0,eqeqeq:!0,eqnull:!0,notypeof:!0,es3:!0,es5:!0,esnext:!0,moz:!0,evil:!0,expr:!0,forin:!0,funcscope:!0,globalstrict:!0,immed:!0,iterator:!0,jquery:!0,lastsemic:!0,laxbreak:!0,laxcomma:!0,loopfunc:!0,mootools:!0,multistr:!0,freeze:!0,newcap:!0,noarg:!0,node:!0,noempty:!0,nonbsp:!0,nonew:!0,nonstandard:!0,phantom:!0,plusplus:!0,proto:!0,prototypejs:!0,rhino:!0,shelljs:!0,typed:!0,undef:!0,scripturl:!0,strict:!0,sub:!0,supernew:!0,validthis:!0,withstmt:!0,worker:!0,wsh:!0,yui:!0,mocha:!0,noyield:!0,onecase:!0,regexp:!0,regexdash:!0},Ot={maxlen:!1,indent:!1,maxerr:!1,predef:!1,globals:!1,quotmark:!1,scope:!1,maxstatements:!1,maxdepth:!1,maxparams:!1,maxcomplexity:!1,shadow:!1,unused:!0,latedef:!1,ignore:!1},Mt={bitwise:!0,forin:!0,newcap:!0,plusplus:!0,regexp:!0,undef:!0,eqeqeq:!0,strict:!0},_t={eqeq:"eqeqeq",windows:"wsh",sloppy:"strict"},Dt={nomen:!0,onevar:!0,passfail:!0,white:!0,gcl:!0,smarttabs:!0,trailing:!0},Pt,Ht,Bt=["closure","exception","global","label","outer","unused","var"],jt,Ft,It,qt,Rt,Ut,zt,Wt,Xt,Vt,$t,Jt,Kt,Qt,Gt,Yt,Zt=[],en=new i.EventEmitter;R("(number)",function(){return this}),R("(string)",function(){return this}),R("(template)",function(){return this}),f.syntax["(identifier)"]={type:"(identifier)",lbp:0,identifier:!0,nud:function(){var e=this.value,t=Kt[e],n,r;typeof t=="function"?t=undefined:!jt["(blockscope)"].current.has(e)&&typeof t=="boolean"&&(n=jt,jt=Ft[0],T(e,{type:"var"}),t=jt,jt=n),r=jt["(blockscope)"].getlabel(e);if(jt===t||r)switch(r?r[e]["(type)"]:jt[e]){case"unused":r?r[e]["(type)"]="var":jt[e]="var";break;case"unction":r?r[e]["(type)"]="function":jt[e]="function",this["function"]=!0;break;case"const":pt(jt,e,{unused:!1});break;case"function":this["function"]=!0;break;case"label":b("W037",f.tokens.curr,e)}else if(jt["(global)"])typeof Jt[e]!="boolean"&&(Ct!=="typeof"&&Ct!=="delete"||f.tokens.next&&(f.tokens.next.value==="."||f.tokens.next.value==="["))&&(jt["(comparray)"].check(e)||g(jt,"W117",f.tokens.curr,e)),ft(f.tokens.curr);else switch(jt[e]){case"closure":case"function":case"var":case"unused":b("W038",f.tokens.curr,e);break;case"label":b("W037",f.tokens.curr,e);break;case"outer":case"global":break;default:if(t===!0)jt[e]=!0;else if(t===null)b("W039",f.tokens.curr,e),ft(f.tokens.curr);else if(typeof t!="object")(Ct!=="typeof"&&Ct!=="delete"||f.tokens.next&&(f.tokens.next.value==="."||f.tokens.next.value==="["))&&g(jt,"W117",f.tokens.curr,e),jt[e]=!0,ft(f.tokens.curr);else switch(t[e]){case"function":case"unction":this["function"]=!0,t[e]="closure",jt[e]=t["(global)"]?"global":"outer";break;case"var":case"unused":t[e]="closure",jt[e]=t["(global)"]?"global":"outer";break;case"const":pt(t,e,{unused:!1});break;case"closure":jt[e]=t["(global)"]?"global":"outer";break;case"label":b("W037",f.tokens.curr,e)}}return this},led:function(){E("E033",f.tokens.next,f.tokens.next.value)}},R("(regexp)",function(){return this}),B("(endline)"),B("(begin)"),B("(end)").reach=!0,B("(error)").reach=!0,B("}").reach=!0,B(")"),B("]"),B('"').reach=!0,B("'").reach=!0,B(";"),B(":").reach=!0,B("#"),U("else"),U("case").reach=!0,U("catch"),U("default").reach=!0,U("finally"),W("arguments",function(e){f.directive["use strict"]&&jt["(global)"]&&b("E008",e)}),W("eval"),W("false"),W("Infinity"),W("null"),W("this",function(e){f.directive["use strict"]&&!f.option.validthis&&(jt["(statement)"]&&jt["(name)"].charAt(0)>"Z"||jt["(global)"])&&b("W040",e)}),W("true"),W("undefined"),G("=","assign",20),G("+=","assignadd",20),G("-=","assignsub",20),G("*=","assignmult",20),G("/=","assigndiv",20).nud=function(){E("E014")},G("%=","assignmod",20),Z("&=","assignbitand",20),Z("|=","assignbitor",20),Z("^=","assignbitxor",20),Z("<<=","assignshiftleft",20),Z(">>=","assignshiftright",20),Z(">>>=","assignshiftrightunsigned",20),X(",",function(e,t){var n;t.exprs=[e];if(!P({peek:!0}))return t;for(;;){if(!(n=O(10)))break;t.exprs.push(n);if(f.tokens.next.value!==","||!P())break}return t},10,!0),X("?",function(e,t){return yt(),t.left=e,t.right=O(10),k(":"),t["else"]=O(10),t},30);var tn=40;X("||",function(e,t){return yt(),t.left=e,t.right=O(tn),t},tn),X("&&","and",50),Y("|","bitor",70),Y("^","bitxor",80),Y("&","bitand",90),$("==",function(e,t){var n=f.option.eqnull&&(e.value==="null"||t.value==="null");switch(!0){case!n&&f.option.eqeqeq:this.from=this.character,b("W116",this,"===","==");break;case J(e):b("W041",this,"===",e.value);break;case J(t):b("W041",this,"===",t.value);break;case K(t,e):b("W122",this,t.value);break;case K(e,t):b("W122",this,e.value)}return this}),$("===",function(e,t){return K(t,e)?b("W122",this,t.value):K(e,t)&&b("W122",this,e.value),this}),$("!=",function(e,t){var n=f.option.eqnull&&(e.value==="null"||t.value==="null");return!n&&f.option.eqeqeq?(this.from=this.character,b("W116",this,"!==","!=")):J(e)?b("W041",this,"!==",e.value):J(t)?b("W041",this,"!==",t.value):K(t,e)?b("W122",this,t.value):K(e,t)&&b("W122",this,e.value),this}),$("!==",function(e,t){return K(t,e)?b("W122",this,t.value):K(e,t)&&b("W122",this,e.value),this}),$("<"),$(">"),$("<="),$(">="),Y("<<","shiftleft",120),Y(">>","shiftright",120),Y(">>>","shiftrightunsigned",120),X("in","in",120),X("instanceof","instanceof",120),X("+",function(e,t){var n=O(130);return e&&n&&e.id==="(string)"&&n.id==="(string)"?(e.value+=n.value,e.character=n.character,!f.option.scripturl&&a.javascriptURL.test(e.value)&&b("W050",e),e):(t.left=e,t.right=n,t)},130),q("+","num"),q("+++",function(){return b("W007"),this.right=O(150),this.arity="unary",this}),X("+++",function(e){return b("W007"),this.left=e,this.right=O(130),this},130),X("-","sub",130),q("-","neg"),q("---",function(){return b("W006"),this.right=O(150),this.arity="unary",this}),X("---",function(e){return b("W006"),this.left=e,this.right=O(130),this},130),X("*","mult",140),X("/","div",140),X("%","mod",140),et("++","postinc"),q("++","preinc"),f.syntax["++"].exps=!0,et("--","postdec"),q("--","predec"),f.syntax["--"].exps=!0,q("delete",function(){var e=O(10);return(!e||e.id!=="."&&e.id!=="[")&&b("W051"),this.first=e,this}).exps=!0,q("~",function(){return f.option.bitwise&&b("W052",this,"~"),O(150),this}),q("...",function(){return f.option.inESNext()||b("W104",this,"spread/rest operator"),f.tokens.next.identifier||E("E030",f.tokens.next,f.tokens.next.value),O(150),this}),q("!",function(){return this.right=O(150),this.arity="unary",this.right||m("E041",this.line||0),Lt[this.right.id]===!0&&b("W018",this,"!"),this}),q("typeof","typeof"),q("new",function(){var e=O(155),t;if(e&&e.id!=="function")if(e.identifier){e["new"]=!0;switch(e.value){case"Number":case"String":case"Boolean":case"Math":case"JSON":b("W053",f.tokens.prev,e.value);break;case"Function":f.option.evil||b("W054");break;case"Date":case"RegExp":case"this":break;default:e.id!=="function"&&(t=e.value.substr(0,1),f.option.newcap&&(t<"A"||t>"Z")&&!r.has(It,e.value)&&b("W055",f.tokens.curr))}}else e.id!=="."&&e.id!=="["&&e.id!=="("&&b("W056",f.tokens.curr);else f.option.supernew||b("W057",this);return f.tokens.next.id!=="("&&!f.option.supernew&&b("W058",f.tokens.curr,f.tokens.curr.value),this.first=e,this}),f.syntax["new"].exps=!0,q("void").exps=!0,X(".",function(e,t){var n=nt(!1,!0);return typeof n=="string"&&at(n),t.left=e,t.right=n,n&&n==="hasOwnProperty"&&f.tokens.next.value==="="&&b("W001"),!e||e.value!=="arguments"||n!=="callee"&&n!=="caller"?!f.option.evil&&e&&e.value==="document"&&(n==="write"||n==="writeln")&&b("W060",e):f.option.noarg?b("W059",e,n):f.directive["use strict"]&&E("E008"),!f.option.evil&&(n==="eval"||n==="execScript")&&b("W061"),t},160,!0),X("(",function(e,t){f.option.immed&&e&&!e.immed&&e.id==="function"&&b("W062");var n=0,r=[];e&&e.type==="(identifier)"&&e.value.match(/^[A-Z]([A-Z0-9_$]*[a-z][A-Za-z0-9_$]*)?$/)&&"Number String Boolean Date Object Error".indexOf(e.value)===-1&&(e.value==="Math"?b("W063",e):f.option.newcap&&b("W064",e));if(f.tokens.next.id!==")")for(;;){r[r.length]=O(10),n+=1;if(f.tokens.next.id!==",")break;P()}return k(")"),typeof e=="object"&&(f.option.inES3()&&e.value==="parseInt"&&n===1&&b("W065",f.tokens.curr),f.option.evil||(e.value==="eval"||e.value==="Function"||e.value==="execScript"?(b("W061",e),r[0]&&[0].id==="(string)"&&x(e,r[0].value)):!r[0]||r[0].id!=="(string)"||e.value!=="setTimeout"&&e.value!=="setInterval"?r[0]&&r[0].id==="(string)"&&e.value==="."&&e.left.value==="window"&&(e.right==="setTimeout"||e.right==="setInterval")&&(b("W066",e),x(e,r[0].value)):(b("W066",e),x(e,r[0].value))),!e.identifier&&e.id!=="."&&e.id!=="["&&e.id!=="("&&e.id!=="&&"&&e.id!=="||"&&e.id!=="?"&&b("W067",e)),t.left=e,t},155,!0).exps=!0,q("(",function(){var e,t=[],n,i,s=0,o,u=1;do n=C(s),n.value==="("?u+=1:n.value===")"&&(u-=1),s+=1,i=C(s);while((u!==0||n.value!==")")&&i.value!=="=>"&&i.value!==";"&&i.type!=="(end)");f.tokens.next.id==="function"&&(f.tokens.next.immed=!0);var a=[];if(f.tokens.next.id!==")")for(;;){if(i.value==="=>"&&r.contains(["{","["],f.tokens.next.value)){e=f.tokens.next,e.left=wt(),t.push(e);for(var l in e.left)a.push(e.left[l].token)}else a.push(O(10));if(f.tokens.next.id!==",")break;P()}k(")",this),f.option.immed&&a[0]&&a[0].id==="function"&&f.tokens.next.id!=="("&&(f.tokens.next.id!=="."||C().value!=="call"&&C().value!=="apply")&&b("W068",this);if(f.tokens.next.value==="=>")return a;if(!a.length)return;return a.length>1?(o=Object.create(f.syntax[","]),o.exprs=a):o=a[0],o&&(o.paren=!0),o}),V("=>"),X("[",function(e,t){var n=O(10),r;return n&&n.type==="(string)"&&(!f.option.evil&&(n.value==="eval"||n.value==="execScript")&&b("W061",t),at(n.value),!f.option.sub&&a.identifier.test(n.value)&&(r=f.syntax[n.value],(!r||!h(r))&&b("W069",f.tokens.prev,n.value))),k("]",t),n&&n.value==="hasOwnProperty"&&f.tokens.next.value==="="&&b("W001"),t.left=e,t.right=n,t},160,!0),q("[",function(){var e=on(!0);if(e.isCompArray)return f.option.inESNext()||b("W119",f.tokens.curr,"array comprehension"),lt();e.isDestAssign&&!f.option.inESNext()&&b("W104",f.tokens.curr,"destructuring assignment");var t=f.tokens.curr.line!==f.tokens.next.line;this.first=[],t&&(Ut+=f.option.indent,f.tokens.next.from===Ut+f.option.indent&&(Ut+=f.option.indent));while(f.tokens.next.id!=="(end)"){while(f.tokens.next.id===",")f.option.inES5()||b("W070"),k(",");if(f.tokens.next.id==="]")break;this.first.push(O(10));if(f.tokens.next.id!==",")break;P({allowTrailing:!0});if(f.tokens.next.id==="]"&&!f.option.inES5(!0)){b("W070",f.tokens.curr);break}}return t&&(Ut-=f.option.indent),k("]",this),this},160),function(e){e.nud=function(e){function t(e,t){h[e]&&r.has(h,e)?b("W075",f.tokens.next,u):h[e]={},h[e].basic=!0,h[e].basictkn=t}function n(e,t){h[e]&&r.has(h,e)?(h[e].basic||h[e].setter)&&b("W075",f.tokens.next,u):h[e]={},h[e].setter=!0,h[e].setterToken=t}function i(e){h[e]&&r.has(h,e)?(h[e].basic||h[e].getter)&&b("W075",f.tokens.next,u):h[e]={},h[e].getter=!0,h[e].getterToken=f.tokens.curr}var s,o,u,a,l,c,h={},p="";s=f.tokens.curr.line!==f.tokens.next.line,s&&(Ut+=f.option.indent,f.tokens.next.from===Ut+f.option.indent&&(Ut+=f.option.indent));for(;;){if(f.tokens.next.id==="}")break;e&&f.tokens.next.value==="static"&&(k("static"),p="static ");if(f.tokens.next.value==="get"&&C().id!==":")k("get"),f.option.inES5(!e)||E("E034"),u=ct(),!u&&!f.option.inESNext()&&E("E035"),e&&u==="constructor"&&E("E049",f.tokens.next,"class getter method",u),u&&i(p+u),l=f.tokens.next,o=mt(),a=o["(params)"],u&&a&&b("W076",l,a[0],u);else if(f.tokens.next.value==="set"&&C().id!==":")k("set"),f.option.inES5(!e)||E("E034"),u=ct(),!u&&!f.option.inESNext()&&E("E035"),e&&u==="constructor"&&E("E049",f.tokens.next,"class setter method",u),u&&n(p+u,f.tokens.next),l=f.tokens.next,o=mt(),a=o["(params)"],u&&(!a||a.length!==1)&&b("W077",l,u);else{c=!1,f.tokens.next.value==="*"&&f.tokens.next.type==="(punctuator)"&&(f.option.inESNext()||b("W104",f.tokens.next,"generator functions"),k("*"),c=!0),u=ct(),t(p+u,f.tokens.next);if(typeof u!="string")break;f.tokens.next.value==="("?(f.option.inESNext()||b("W104",f.tokens.curr,"concise methods"),mt(u,undefined,c)):e||(k(":"),O(10))}e&&u==="prototype"&&E("E049",f.tokens.next,"class method",u),at(u);if(e){p="";continue}if(f.tokens.next.id!==",")break;P({allowTrailing:!0,property:!0}),f.tokens.next.id===","?b("W070",f.tokens.curr):f.tokens.next.id==="}"&&!f.option.inES5(!0)&&b("W070",f.tokens.curr)}s&&(Ut-=f.option.indent),k("}",this);if(f.option.inES5())for(var d in h)r.has(h,d)&&h[d].setter&&!h[d].getter&&b("W078",h[d].setterToken);return this},e.fud=function(){E("E036",f.tokens.curr)}}(B("{"));var nn=j("const",function(e){var t,n,i;f.option.inESNext()||b("W104",f.tokens.curr,"const"),this.first=[];for(;;){var s=[];r.contains(["{","["],f.tokens.next.value)?(t=wt(),i=!1):(t=[{id:nt(),token:f.tokens.curr}],i=!0);for(var o in t)t.hasOwnProperty(o)&&(o=t[o],jt[o.id]==="const"&&b("E011",null,o.id),jt["(global)"]&&Jt[o.id]===!1&&b("W079",o.token,o.id),o.id&&(T(o.id,{token:o.token,type:"const",unused:!0}),s.push(o.token)));if(e)break;this.first=this.first.concat(s),f.tokens.next.id!=="="&&b("E012",f.tokens.curr,f.tokens.curr.value),f.tokens.next.id==="="&&(k("="),f.tokens.next.id==="undefined"&&b("W080",f.tokens.prev,f.tokens.prev.value),C(0).id==="="&&f.tokens.next.identifier&&b("W120",f.tokens.next,f.tokens.next.value),n=O(10),i?t[0].first=n:Et(s,n));if(f.tokens.next.id!==",")break;P()}return this});nn.exps=!0;var rn=j("var",function(e){var t,n,i;this.first=[];for(;;){var s=[];r.contains(["{","["],f.tokens.next.value)?(t=wt(),n=!1):(t=[{id:nt(),token:f.tokens.curr}],n=!0);for(var o in t)t.hasOwnProperty(o)&&(o=t[o],f.option.inESNext()&&jt[o.id]==="const"&&b("E011",null,o.id),jt["(global)"]&&Jt[o.id]===!1&&b("W079",o.token,o.id),o.id&&(T(o.id,{type:"unused",token:o.token}),s.push(o.token)));if(e)break;this.first=this.first.concat(s),f.tokens.next.id==="="&&(k("="),f.tokens.next.id==="undefined"&&b("W080",f.tokens.prev,f.tokens.prev.value),C(0).id==="="&&f.tokens.next.identifier&&b("W120",f.tokens.next,f.tokens.next.value),i=O(10),n?t[0].first=i:Et(s,i));if(f.tokens.next.id!==",")break;P()}return this});rn.exps=!0;var sn=j("let",function(e){var t,n,i,s;f.option.inESNext()||b("W104",f.tokens.curr,"let"),f.tokens.next.value==="("?(f.option.inMoz(!0)||b("W118",f.tokens.next,"let block"),k("("),jt["(blockscope)"].stack(),s=!0):jt["(nolet)"]&&E("E048",f.tokens.curr),this.first=[];for(;;){var o=[];r.contains(["{","["],f.tokens.next.value)?(t=wt(),n=!1):(t=[{id:nt(),token:f.tokens.curr.value}],n=!0);for(var u in t)t.hasOwnProperty(u)&&(u=t[u],f.option.inESNext()&&jt[u.id]==="const"&&b("E011",null,u.id),jt["(global)"]&&Jt[u.id]===!1&&b("W079",u.token,u.id),u.id&&!jt["(nolet)"]&&(T(u.id,{type:"unused",token:u.token,islet:!0}),o.push(u.token)));if(e)break;this.first=this.first.concat(o),f.tokens.next.id==="="&&(k("="),f.tokens.next.id==="undefined"&&b("W080",f.tokens.prev,f.tokens.prev.value),C(0).id==="="&&f.tokens.next.identifier&&b("W120",f.tokens.next,f.tokens.next.value),i=O(10),n?t[0].first=i:Et(o,i));if(f.tokens.next.id!==",")break;P()}return s&&(k(")"),ut(!0,!0),this.block=!0,jt["(blockscope)"].unstack()),this});sn.exps=!0,F("class",function(){return St.call(this,!0)}),F("function",function(){var e=!1;f.tokens.next.value==="*"&&(k("*"),f.option.inESNext(!0)?e=!0:b("W119",f.tokens.curr,"function*")),Rt&&b("W082",f.tokens.curr);var t=nt();return jt[t]==="const"&&b("E011",null,t),T(t,{type:"unction",token:f.tokens.curr}),mt(t,{statement:!0},e),f.tokens.next.id==="("&&f.tokens.next.line===f.tokens.curr.line&&E("E039"),this}),q("function",function(){var e=!1;f.tokens.next.value==="*"&&(f.option.inESNext()||b("W119",f.tokens.curr,"function*"),k("*"),e=!0);var t=tt();return mt(t,undefined,e),!f.option.loopfunc&&jt["(loopage)"]&&b("W083"),this}),F("if",function(){var e=f.tokens.next;return yt(),f.condition=!0,k("("),bt(O(0)),k(")",e),f.condition=!1,ut(!0,!0),f.tokens.next.id==="else"&&(k("else"),f.tokens.next.id==="if"||f.tokens.next.id==="switch"?it(!0):ut(!0,!0)),this}),F("try",function(){function e(){var e=Kt,t;k("catch"),k("("),Kt=Object.create(e),t=f.tokens.next.value,f.tokens.next.type!=="(identifier)"&&(t=null,b("E030",f.tokens.next,t)),k(),jt=vt("(catch)",f.tokens.next,Kt,{"(context)":jt,"(breakage)":jt["(breakage)"],"(loopage)":jt["(loopage)"],"(statement)":!1,"(catch)":!0}),t&&T(t,{type:"exception"}),f.tokens.next.value==="if"&&(f.option.inMoz(!0)||b("W118",f.tokens.curr,"catch filter"),k("if"),O(0)),k(")"),f.tokens.curr.funct=jt,Ft.push(jt),ut(!1),Kt=e,jt["(last)"]=f.tokens.curr.line,jt["(lastcharacter)"]=f.tokens.curr.character,jt=jt["(context)"]}var t;ut(!0);while(f.tokens.next.id==="catch")yt(),t&&!f.option.inMoz(!0)&&b("W118",f.tokens.next,"multiple catch blocks"),e(),t=!0;if(f.tokens.next.id==="finally"){k("finally"),ut(!0);return}return t||E("E021",f.tokens.next,"catch",f.tokens.next.value),this}),F("while",function(){var e=f.tokens.next;return jt["(breakage)"]+=1,jt["(loopage)"]+=1,yt(),k("("),bt(O(0)),k(")",e),ut(!0,!0),jt["(breakage)"]-=1,jt["(loopage)"]-=1,this}).labelled=!0,F("with",function(){var e=f.tokens.next;return f.directive["use strict"]?E("E010",f.tokens.curr):f.option.withstmt||b("W085",f.tokens.curr),k("("),O(0),k(")",e),ut(!0,!0),this}),F("switch",function(){var e=f.tokens.next,t=!1,n=!1;jt["(breakage)"]+=1,k("("),bt(O(0)),k(")",e),e=f.tokens.next,k("{"),f.tokens.next.from===Ut&&(n=!0),n||(Ut+=f.option.indent),this.cases=[];for(;;)switch(f.tokens.next.id){case"case":switch(jt["(verb)"]){case"yield":case"break":case"case":case"continue":case"return":case"switch":case"throw":break;default:a.fallsThrough.test(f.lines[f.tokens.next.line-2])||b("W086",f.tokens.curr,"case")}k("case"),this.cases.push(O(0)),yt(),t=!0,k(":"),jt["(verb)"]="case";break;case"default":switch(jt["(verb)"]){case"yield":case"break":case"continue":case"return":case"throw":break;default:this.cases.length&&(a.fallsThrough.test(f.lines[f.tokens.next.line-2])||b("W086",f.tokens.curr,"default"))}k("default"),t=!0,k(":");break;case"}":n||(Ut-=f.option.indent),k("}",e),jt["(breakage)"]-=1,jt["(verb)"]=undefined;return;case"(end)":E("E023",f.tokens.next,"}");return;default:Ut+=f.option.indent;if(t)switch(f.tokens.curr.id){case",":E("E040");return;case":":t=!1,st();break;default:E("E025",f.tokens.curr);return}else{if(f.tokens.curr.id!==":"){E("E021",f.tokens.next,"case",f.tokens.next.value);return}k(":"),E("E024",f.tokens.curr,":"),st()}Ut-=f.option.indent}}).labelled=!0,j("debugger",function(){return f.option.debug||b("W087",this),this}).exps=!0,function(){var e=j("do",function(){jt["(breakage)"]+=1,jt["(loopage)"]+=1,yt(),this.first=ut(!0,!0),k("while");var e=f.tokens.next;return k("("),bt(O(0)),k(")",e),jt["(breakage)"]-=1,jt["(loopage)"]-=1,this});e.labelled=!0,e.exps=!0}(),F("for",function(){var e,t=f.tokens.next,n=!1,i=null;t.value==="each"&&(i=t,k("each"),f.option.inMoz(!0)||b("W118",f.tokens.curr,"for each")),jt["(breakage)"]+=1,jt["(loopage)"]+=1,yt(),k("(");var s,o=0,u=["in","of"];do s=C(o),++o;while(!r.contains(u,s.value)&&s.value!==";"&&s.type!=="(end)");if(r.contains(u,s.value)){!f.option.inESNext()&&s.value==="of"&&E("W104",s,"for of");if(f.tokens.next.id==="var")k("var"),f.syntax["var"].fud.call(f.syntax["var"].fud,!0);else if(f.tokens.next.id==="let")k("let"),n=!0,jt["(blockscope)"].stack(),f.syntax.let.fud.call(f.syntax.let.fud,!0);else if(!f.tokens.next.identifier)E("E030",f.tokens.next,f.tokens.next.type),k();else{switch(jt[f.tokens.next.value]){case"unused":jt[f.tokens.next.value]="var";break;case"var":break;default:jt["(blockscope)"].getlabel(f.tokens.next.value)||b("W088",f.tokens.next,f.tokens.next.value)}k()}k(s.value),O(20),k(")",t),e=ut(!0,!0),f.option.forin&&e&&(e.length>1||typeof e[0]!="object"||e[0].value!=="if")&&b("W089",this),jt["(breakage)"]-=1,jt["(loopage)"]-=1}else{i&&E("E045",i);if(f.tokens.next.id!==";")if(f.tokens.next.id==="var")k("var"),f.syntax["var"].fud.call(f.syntax["var"].fud);else if(f.tokens.next.id==="let")k("let"),n=!0,jt["(blockscope)"].stack(),f.syntax.let.fud.call(f.syntax.let.fud);else for(;;){O(0,"for");if(f.tokens.next.id!==",")break;P()}_(f.tokens.curr),k(";"),f.tokens.next.id!==";"&&bt(O(0)),_(f.tokens.curr),k(";"),f.tokens.next.id===";"&&E("E021",f.tokens.next,")",";");if(f.tokens.next.id!==")")for(;;){O(0,"for");if(f.tokens.next.id!==",")break;P()}k(")",t),ut(!0,!0),jt["(breakage)"]-=1,jt["(loopage)"]-=1}return n&&jt["(blockscope)"].unstack(),this}).labelled=!0,j("break",function(){var e=f.tokens.next.value;return jt["(breakage)"]===0&&b("W052",f.tokens.next,this.value),f.option.asi||_(this),f.tokens.next.id!==";"&&!f.tokens.next.reach&&f.tokens.curr.line===f.tokens.next.line&&(jt[e]!=="label"?b("W090",f.tokens.next,e):Kt[e]!==jt&&b("W091",f.tokens.next,e),this.first=f.tokens.next,k()),rt("break"),this}).exps=!0,j("continue",function(){var e=f.tokens.next.value;return jt["(breakage)"]===0&&b("W052",f.tokens.next,this.value),f.option.asi||_(this),f.tokens.next.id!==";"&&!f.tokens.next.reach?f.tokens.curr.line===f.tokens.next.line&&(jt[e]!=="label"?b("W090",f.tokens.next,e):Kt[e]!==jt&&b("W091",f.tokens.next,e),this.first=f.tokens.next,k()):jt["(loopage)"]||b("W052",f.tokens.next,this.value),rt("continue"),this}).exps=!0,j("return",function(){return this.line===f.tokens.next.line?f.tokens.next.id!==";"&&!f.tokens.next.reach&&(this.first=O(0),this.first&&this.first.type==="(punctuator)"&&this.first.value==="="&&!this.first.paren&&!f.option.boss&&w("W093",this.first.line,this.first.character)):f.tokens.next.type==="(punctuator)"&&["[","{","+","-"].indexOf(f.tokens.next.value)>-1&&_(this),rt("return"),this}).exps=!0,function(e){e.exps=!0,e.lbp=25}(q("yield",function(){var e=f.tokens.prev;return f.option.inESNext(!0)&&!jt["(generator)"]?("(catch)"!==jt["(name)"]||!jt["(context)"]["(generator)"])&&E("E046",f.tokens.curr,"yield"):f.option.inESNext()||b("W104",f.tokens.curr,"yield"),jt["(generator)"]="yielded",this.line===f.tokens.next.line||!f.option.inMoz(!0)?(f.tokens.next.id!==";"&&!f.tokens.next.reach&&f.tokens.next.nud&&(M(f.tokens.curr,f.tokens.next),this.first=O(10),this.first.type==="(punctuator)"&&this.first.value==="="&&!this.first.paren&&!f.option.boss&&w("W093",this.first.line,this.first.character)),f.option.inMoz(!0)&&f.tokens.next.id!==")"&&(e.lbp>30||!e.assign&&!A()||e.id==="yield")&&E("E050",this)):f.option.asi||_(this),this})),j("throw",function(){return _(this),this.first=O(20),rt("throw"),this}).exps=!0,j("import",function(){f.option.inESNext()||b("W119",f.tokens.curr,"import");if(f.tokens.next.type==="(string)")return k("(string)"),this;if(f.tokens.next.identifier)this.name=nt(),T(this.name,{type:"unused",token:f.tokens.curr});else{k("{");for(;;){if(f.tokens.next.value==="}"){k("}");break}var e;f.tokens.next.type==="default"?(e="default",k("default")):e=nt(),f.tokens.next.value==="as"&&(k("as"),e=nt()),T(e,{type:"unused",token:f.tokens.curr});if(f.tokens.next.value!==","){if(f.tokens.next.value==="}"){k("}");break}E("E024",f.tokens.next,f.tokens.next.value);break}k(",")}}return k("from"),k("(string)"),this}).exps=!0,j("export",function(){f.option.inESNext()||b("W119",f.tokens.curr,"export");if(f.tokens.next.type==="default"){k("default");if(f.tokens.next.id==="function"||f.tokens.next.id==="class")this.block=!0;return this.exportee=O(10),this}if(f.tokens.next.value==="{"){k("{");for(;;){Ht[nt()]=!0;if(f.tokens.next.value!==","){if(f.tokens.next.value==="}"){k("}");break}E("E024",f.tokens.next,f.tokens.next.value);break}k(",")}return this}return f.tokens.next.id==="var"?(k("var"),Ht[f.tokens.next.value]=!0,f.syntax["var"].fud.call(f.syntax["var"].fud)):f.tokens.next.id==="let"?(k("let"),Ht[f.tokens.next.value]=!0,f.syntax.let.fud.call(f.syntax.let.fud)):f.tokens.next.id==="const"?(k("const"),Ht[f.tokens.next.value]=!0,f.syntax["const"].fud.call(f.syntax["const"].fud)):f.tokens.next.id==="function"?(this.block=!0,k("function"),Ht[f.tokens.next.value]=!0,f.syntax["function"].fud()):f.tokens.next.id==="class"?(this.block=!0,k("class"),Ht[f.tokens.next.value]=!0,f.syntax["class"].fud()):E("E024",f.tokens.next,f.tokens.next.value),this}).exps=!0,z("abstract"),z("boolean"),z("byte"),z("char"),z("class",{es5:!0,nud:St}),z("double"),z("enum",{es5:!0}),z("export",{es5:!0}),z("extends",{es5:!0}),z("final"),z("float"),z("goto"),z("implements",{es5:!0,strictOnly:!0}),z("import",{es5:!0}),z("int"),z("interface",{es5:!0,strictOnly:!0}),z("long"),z("native"),z("package",{es5:!0,strictOnly:!0}),z("private",{es5:!0,strictOnly:!0}),z("protected",{es5:!0,strictOnly:!0}),z("public",{es5:!0,strictOnly:!0}),z("short"),z("static",{es5:!0,strictOnly:!0}),z("super",{es5:!0}),z("synchronized"),z("throws"),z("transient"),z("volatile");var on=function(){var e,t,n=-1,i=0,s={};r.contains(["[","{"],f.tokens.curr.value)&&(i+=1);do{e=n===-1?f.tokens.next:C(n),t=C(n+1),n+=1,r.contains(["[","{"],e.value)?i+=1:r.contains(["]","}"],e.value)&&(i-=1);if(e.identifier&&e.value==="for"&&i===1){s.isCompArray=!0,s.notJson=!0;break}if(r.contains(["}","]"],e.value)&&t.value==="="&&i===0){s.isDestAssign=!0,s.notJson=!0;break}e.value===";"&&(s.isBlock=!0,s.notJson=!0)}while(i>0&&e.id!=="(end)"&&n<15);return s},un=function(){function e(e){var t=s.variables.filter(function(t){if(t.value===e)return t.undef=!1,e}).length;return t!==0}function t(e){var t=s.variables.filter(function(t){if(t.value===e&&!t.undef)return t.unused===!0&&(t.unused=!1),e}).length;return t===0}var n=function(){this.mode="use",this.variables=[]},i=[],s;return{stack:function(){s=new n,i.push(s)},unstack:function(){s.variables.filter(function(e){e.unused&&b("W098",e.token,e.value),e.undef&&g(e.funct,"W117",e.token,e.value)}),i.splice(-1,1),s=i[i.length-1]},setState:function(e){r.contains(["use","define","generate","filter"],e)&&(s.mode=e)},check:function(n){if(!s)return;return s&&s.mode==="use"?(t(n)&&s.variables.push({funct:jt,token:f.tokens.curr,value:n,undef:!0,unused:!1}),!0):s&&s.mode==="define"?(e(n)||s.variables.push({funct:jt,token:f.tokens.curr,value:n,undef:!1,unused:!0}),!0):s&&s.mode==="generate"?(g(jt,"W117",f.tokens.curr,n),!0):s&&s.mode==="filter"?(t(n)&&g(jt,"W117",f.tokens.curr,n),!0):!1}}},an=function(){function e(){for(var e in t)if(t[e]["(type)"]==="unused"&&f.option.unused){var n=t[e]["(token)"],r=n.line,i=n.character;w("W098",r,i,e)}}var t={},n=[t];return{stack:function(){t={},n.push(t)},unstack:function(){e(),n.splice(n.length-1,1),t=r.last(n)},getlabel:function(e){for(var t=n.length-1;t>=0;--t)if(r.has(n[t],e)&&!n[t][e]["(shadowed)"])return n[t]},shadow:function(e){for(var t=n.length-1;t>=0;t--)r.has(n[t],e)&&(n[t][e]["(shadowed)"]=!0)},unshadow:function(e){for(var t=n.length-1;t>=0;t--)r.has(n[t],e)&&(n[t][e]["(shadowed)"]=!1)},current:{has:function(e){return r.has(t,e)},add:function(e,n,r){t[e]={"(type)":n,"(token)":r,"(shadowed)":!1}}}}},fn=function(n,i,o){function a(e,t){if(!e)return;!Array.isArray(e)&&typeof e=="object"&&(e=Object.keys(e)),e.forEach(t)}var l,h,p,g,y={},E={};i=r.clone(i),f.reset(),i&&i.scope?c.scope=i.scope:(c.errors=[],c.undefs=[],c.internals=[],c.blacklist={},c.scope="(main)"),Jt=Object.create(null),d(Jt,s.ecmaIdentifiers),d(Jt,s.reservedVars),d(Jt,o||{}),Pt=Object.create(null),Ht=Object.create(null);if(i){a(i.predef||null,function(e){var t,n;e[0]==="-"?(t=e.slice(1),c.blacklist[t]=t):(n=Object.getOwnPropertyDescriptor(i.predef,e),Jt[e]=n?n.value:!1)}),a(i.exported||null,function(e){Ht[e]=!0}),delete i.predef,delete i.exported,g=Object.keys(i);for(p=0;p<g.length;p++)/^-W\d{3}$/g.test(g[p])?E[g[p].slice(1)]=!0:(y[g[p]]=i[g[p]],g[p]==="newcap"&&i[g[p]]===!1&&(y["(explicitNewcap)"]=!0))}f.option=y,f.ignored=E,f.option.indent=f.option.indent||4,f.option.maxerr=f.option.maxerr||50,Ut=1,It=Object.create(Jt),Kt=It,jt=vt("(global)",null,Kt,{"(global)":!0,"(blockscope)":an(),"(comparray)":un(),"(metrics)":gt(f.tokens.next)}),Ft=[jt],Yt=[],Qt=null,Xt={},Vt=null,qt={},Rt=!1,zt=[],Gt=[];if(!t(n)&&!Array.isArray(n))return S("E004",0),!1;kt={get isJSON(){return f.jsonMode},getOption:function(e){return f.option[e]||null},getCache:function(e){return f.cache[e]},setCache:function(e,t){f.cache[e]=t},warn:function(e,t){w.apply(null,[e,t.line,t.char].concat(t.data))},on:function(e,t){e.split(" ").forEach(function(e){en.on(e,t)}.bind(this))}},en.removeAllListeners(),(Zt||[]).forEach(function(e){e(kt)}),f.tokens.prev=f.tokens.curr=f.tokens.next=f.syntax["(begin)"],Wt=new u(n),Wt.on("warning",function(e){w.apply(null,[e.code,e.line,e.character].concat(e.data))}),Wt.on("error",function(e){S.apply(null,[e.code,e.line,e.character].concat(e.data))}),Wt.on("fatal",function(e){m("E041",e.line,e.from)}),Wt.on("Identifier",function(e){en.emit("Identifier",e)}),Wt.on("String",function(e){en.emit("String",e)}),Wt.on("Number",function(e){en.emit("Number",e)}),Wt.start();for(var x in i)r.has(i,x)&&e(x,f.tokens.curr);v(),d(Jt,o||{}),P.first=!0;try{k();switch(f.tokens.next.id){case"{":case"[":Tt();break;default:ot(),f.directive["use strict"]&&!f.option.globalstrict&&!f.option.node&&!f.option.phantom&&b("W097",f.tokens.prev),st()}k(f.tokens.next&&f.tokens.next.value!=="."?"(end)":undefined),jt["(blockscope)"].unstack();var T=function(e,t){do{if(typeof t[e]=="string")return t[e]==="unused"?t[e]="var":t[e]==="unction"&&(t[e]="closure"),!0;t=t["(context)"]}while(t);return!1},N=function(e,t){if(!qt[e])return;var n=[];for(var r=0;r<qt[e].length;r+=1)qt[e][r]!==t&&n.push(qt[e][r]);n.length===0?delete qt[e]:qt[e]=n},C=function(e,t,n,r){var i=t.line,s=t.character;r===undefined&&(r=f.option.unused),r===!0&&(r="last-param");var o={vars:["var"],"last-param":["var","param"],strict:["var","param","last-param"]};r&&o[r]&&o[r].indexOf(n)!==-1&&w("W098",i,s,e),Gt.push({name:e,line:i,character:s})},L=function(e,t){var n=e[t],i=e["(tokens)"][t];if(t.charAt(0)==="(")return;if(n!=="unused"&&n!=="unction"&&n!=="const")return;if(e["(params)"]&&e["(params)"].indexOf(t)!==-1)return;if(e["(global)"]&&r.has(Ht,t))return;if(n==="const"&&!dt(e,t,"unused"))return;C(t,i,"var")};for(l=0;l<c.undefs.length;l+=1)h=c.undefs[l].slice(0),T(h[2].value,h[0])?N(h[2].value,h[2].line):f.option.undef&&b.apply(b,h.slice(1));Ft.forEach(function(e){if(e["(unusedOption)"]===!1)return;for(var t in e)r.has(e,t)&&L(e,t);if(!e["(params)"])return;var n=e["(params)"].slice(),i=n.pop(),s,o;while(i){s=e[i],o=e["(unusedOption)"]||f.option.unused,o=o===!0?"last-param":o;if(i==="undefined")return;if(s==="unused"||s==="unction")C(i,e["(tokens)"][i],"param",e["(unusedOption)"]);else if(o==="last-param")return;i=n.pop()}});for(var A in Pt)r.has(Pt,A)&&!r.has(It,A)&&!r.has(Ht,A)&&C(A,Pt[A],"var")}catch(O){if(!O||O.name!=="JSHintError")throw O;var M=f.tokens.next||{};c.errors.push({scope:"(main)",raw:O.raw,code:O.code,reason:O.message,line:O.line||M.line,character:O.character||M.from},null)}if(c.scope==="(main)"){i=i||{};for(l=0;l<c.internals.length;l+=1)h=c.internals[l],i.scope=h.elem,fn(h.value,i,o)}return c.errors.length===0};return fn.addModule=function(e){Zt.push(e)},fn.addModule(l.register),fn.data=function(){var e={functions:[],options:f.option},t=[],n=[],i,s,o,u,a,l;fn.errors.length&&(e.errors=fn.errors),f.jsonMode&&(e.json=!0);for(a in qt)r.has(qt,a)&&t.push({name:a,line:qt[a]});t.length>0&&(e.implieds=t),Yt.length>0&&(e.urls=Yt),l=Object.keys(Kt),l.length>0&&(e.globals=l);for(o=1;o<Ft.length;o+=1){s=Ft[o],i={};for(u=0;u<Bt.length;u+=1)i[Bt[u]]=[];for(u=0;u<Bt.length;u+=1)i[Bt[u]].length===0&&delete i[Bt[u]];i.name=s["(name)"],i.param=s["(params)"],i.line=s["(line)"],i.character=s["(character)"],i.last=s["(last)"],i.lastcharacter=s["(lastcharacter)"],i.metrics={complexity:s["(metrics)"].ComplexityCount,parameters:(s["(params)"]||[]).length,statements:s["(metrics)"].statementCount},e.functions.push(i)}Gt.length>0&&(e.unused=Gt),n=[];for(a in Xt)if(typeof Xt[a]=="number"){e.member=Xt;break}return e},fn.jshint=fn,fn}();typeof n=="object"&&n&&(n.JSHINT=c)},{"./lex.js":4,"./messages.js":5,"./reg.js":6,"./state.js":7,"./style.js":8,"./vars.js":9,events:10,underscore:2}],4:[function(e,t,n){function r(){var e=[];return{push:function(t){e.push(t)},check:function(){for(var t=0;t<e.length;++t)e[t]();e.splice(0,e.length)}}}function i(e){var t=e;typeof t=="string"&&(t=t.replace(/\r\n/g,"\n").replace(/\r/g,"\n").split("\n")),t[0]&&t[0].substr(0,2)==="#!"&&(t[0].indexOf("node")!==-1&&(a.option.node=!0),t[0]=""),this.emitter=new o.EventEmitter,this.source=e,this.setLines(t),this.prereg=!0,this.line=0,this.char=1,this.from=1,this.input="",this.inComment=!1;for(var n=0;n<a.option.indent;n+=1)a.tab+=" "}var s=e("underscore"),o=e("events"),u=e("./reg.js"),a=e("./state.js").state,f=e("../data/ascii-identifier-data.js"),l=f.asciiIdentifierStartTable,c=f.asciiIdentifierPartTable,h={Identifier:1,Punctuator:2,NumericLiteral:3,StringLiteral:4,Comment:5,Keyword:6,NullLiteral:7,BooleanLiteral:8,RegExp:9,TemplateLiteral:10};i.prototype={_lines:[],getLines:function(){return this._lines=a.lines,this._lines},setLines:function(e){this._lines=e,a.lines=this._lines},peek:function(e){return this.input.charAt(e||0)},skip:function(e){e=e||1,this.char+=e,this.input=this.input.slice(e)},on:function(e,t){e.split(" ").forEach(function(e){this.emitter.on(e,t)}.bind(this))},trigger:function(){this.emitter.emit.apply(this.emitter,Array.prototype.slice.call(arguments))},triggerAsync:function(e,t,n,r){n.push(function(){r()&&this.trigger(e,t)}.bind(this))},scanPunctuator:function(){var e=this.peek(),t,n,r;switch(e){case".":if(/^[0-9]$/.test(this.peek(1)))return null;if(this.peek(1)==="."&&this.peek(2)===".")return{type:h.Punctuator,value:"..."};case"(":case")":case";":case",":case"{":case"}":case"[":case"]":case":":case"~":case"?":return{type:h.Punctuator,value:e};case"#":return{type:h.Punctuator,value:e};case"":return null}return t=this.peek(1),n=this.peek(2),r=this.peek(3),e===">"&&t===">"&&n===">"&&r==="="?{type:h.Punctuator,value:">>>="}:e==="="&&t==="="&&n==="="?{type:h.Punctuator,value:"==="}:e==="!"&&t==="="&&n==="="?{type:h.Punctuator,value:"!=="}:e===">"&&t===">"&&n===">"?{type:h.Punctuator,value:">>>"}:e==="<"&&t==="<"&&n==="="?{type:h.Punctuator,value:"<<="}:e===">"&&t===">"&&n==="="?{type:h.Punctuator,value:">>="}:e==="="&&t===">"?{type:h.Punctuator,value:e+t}:e===t&&"+-<>&|".indexOf(e)>=0?{type:h.Punctuator,value:e+t}:"<>=!+-*%&|^".indexOf(e)>=0?t==="="?{type:h.Punctuator,value:e+t}:{type:h.Punctuator,value:e}:e==="/"?t==="="&&/\/=(?!(\S*\/[gim]?))/.test(this.input)?{type:h.Punctuator,value:"/="}:{type:h.Punctuator,value:"/"}:null},scanComments:function(){function e(e,t,n){var r=["jshint","jslint","members","member","globals","global","exported"],i=!1,s=e+t,o="plain";return n=n||{},n.isMultiline&&(s+="*/"),r.forEach(function(n){if(i)return;if(e==="//"&&n!=="jshint")return;t.substr(0,n.length)===n&&(i=!0,e+=n,t=t.substr(n.length)),!i&&t.charAt(0)===" "&&t.substr(1,n.length)===n&&(i=!0,e=e+" "+n,t=t.substr(n.length+1));if(!i)return;switch(n){case"member":o="members";break;case"global":o="globals";break;default:o=n}}),{type:h.Comment,commentType:o,value:s,body:t,isSpecial:i,isMultiline:n.isMultiline||!1,isMalformed:n.isMalformed||!1}}var t=this.peek(),n=this.peek(1),r=this.input.substr(2),i=this.line,s=this.char;if(t==="*"&&n==="/")return this.trigger("error",{code:"E018",line:i,character:s}),this.skip(2),null;if(t!=="/"||n!=="*"&&n!=="/")return null;if(n==="/")return this.skip(this.input.length),e("//",r);var o="";if(n==="*"){this.inComment=!0,this.skip(2);while(this.peek()!=="*"||this.peek(1)!=="/")if(this.peek()===""){o+="\n";if(!this.nextLine())return this.trigger("error",{code:"E017",line:i,character:s}),this.inComment=!1,e("/*",o,{isMultiline:!0,isMalformed:!0})}else o+=this.peek(),this.skip();return this.skip(2),this.inComment=!1,e("/*",o,{isMultiline:!0})}},scanKeyword:function(){var e=/^[a-zA-Z_$][a-zA-Z0-9_$]*/.exec(this.input),t=["if","in","do","var","for","new","try","let","this","else","case","void","with","enum","while","break","catch","throw","const","yield","class","super","return","typeof","delete","switch","export","import","default","finally","extends","function","continue","debugger","instanceof"];return e&&t.indexOf(e[0])>=0?{type:h.Keyword,value:e[0]}:null},scanIdentifier:function(){function e(e){return e>256}function t(e){return e>256}function n(e){return/^[0-9a-fA-F]$/.test(e)}var r="",i=0,s,o,u=function(){i+=1;if(this.peek(i)!=="u")return null;var e=this.peek(i+1),r=this.peek(i+2),s=this.peek(i+3),o=this.peek(i+4),u;return n(e)&&n(r)&&n(s)&&n(o)?(u=parseInt(e+r+s+o,16),c[u]||t(u)?(i+=5,"\\u"+e+r+s+o):null):null}.bind(this),a=function(){var t=this.peek(i),n=t.charCodeAt(0);return n===92?u():n<128?l[n]?(i+=1,t):null:e(n)?(i+=1,t):null}.bind(this),f=function(){var e=this.peek(i),n=e.charCodeAt(0);return n===92?u():n<128?c[n]?(i+=1,e):null:t(n)?(i+=1,e):null}.bind(this);o=a();if(o===null)return null;r=o;for(;;){o=f();if(o===null)break;r+=o}switch(r){case"true":case"false":s=h.BooleanLiteral;break;case"null":s=h.NullLiteral;break;default:s=h.Identifier}return{type:s,value:r}},scanNumericLiteral:function(){function e(e){return/^[0-9]$/.test(e)}function t(e){return/^[0-7]$/.test(e)}function n(e){return/^[0-9a-fA-F]$/.test(e)}function r(e){return e==="$"||e==="_"||e==="\\"||e>="a"&&e<="z"||e>="A"&&e<="Z"}var i=0,s="",o=this.input.length,u=this.peek(i),a;if(u!=="."&&!e(u))return null;if(u!=="."){s=this.peek(i),i+=1,u=this.peek(i);if(s==="0"){if(u==="x"||u==="X"){i+=1,s+=u;while(i<o){u=this.peek(i);if(!n(u))break;s+=u,i+=1}if(s.length<=2)return{type:h.NumericLiteral,value:s,isMalformed:!0};if(i<o){u=this.peek(i);if(r(u))return null}return{type:h.NumericLiteral,value:s,base:16,isMalformed:!1}}if(t(u)){i+=1,s+=u,a=!1;while(i<o){u=this.peek(i);if(e(u))a=!0;else if(!t(u))break;s+=u,i+=1}if(i<o){u=this.peek(i);if(r(u))return null}return{type:h.NumericLiteral,value:s,base:8,isMalformed:!1}}e(u)&&(i+=1,s+=u)}while(i<o){u=this.peek(i);if(!e(u))break;s+=u,i+=1}}if(u==="."){s+=u,i+=1;while(i<o){u=this.peek(i);if(!e(u))break;s+=u,i+=1}}if(u==="e"||u==="E"){s+=u,i+=1,u=this.peek(i);if(u==="+"||u==="-")s+=this.peek(i),i+=1;u=this.peek(i);if(!e(u))return null;s+=u,i+=1;while(i<o){u=this.peek(i);if(!e(u))break;s+=u,i+=1}}if(i<o){u=this.peek(i);if(r(u))return null}return{type:h.NumericLiteral,value:s,base:10,isMalformed:!isFinite(s)}},scanTemplateLiteral:function(){if(!a.option.esnext||this.peek()!=="`")return null;var e=this.line,t=this.char,n=1,r="";this.skip();while(this.peek()!=="`"){while(this.peek()===""){if(!this.nextLine())return this.trigger("error",{code:"E052",line:e,character:t}),{type:h.TemplateLiteral,value:r,isUnclosed:!0};r+="\n"}var i=this.peek();this.skip(n),r+=i}return this.skip(),{type:h.TemplateLiteral,value:r,isUnclosed:!1}},scanStringLiteral:function(e){var t=this.peek();if(t!=='"'&&t!=="'")return null;this.triggerAsync("warning",{code:"W108",line:this.line,character:this.char},e,function(){return a.jsonMode&&t!=='"'});var n="",r=this.line,i=this.char,s=!1;this.skip();e:while(this.peek()!==t){while(this.peek()===""){s?(s=!1,this.triggerAsync("warning",{code:"W043",line:this.line,character:this.char},e,function(){return!a.option.multistr}),this.triggerAsync("warning",{code:"W042",line:this.line,character:this.char},e,function(){return a.jsonMode&&a.option.multistr})):this.trigger("warning",{code:"W112",line:this.line,character:this.char});if(!this.nextLine())return this.trigger("error",{code:"E029",line:r,character:i}),{type:h.StringLiteral,value:n,isUnclosed:!0,quote:t};if(this.peek()==t)break e}s=!1;var o=this.peek(),u=1;o<" "&&this.trigger("warning",{code:"W113",line:this.line,character:this.char,data:["<non-printable>"]});if(o==="\\"){this.skip(),o=this.peek();switch(o){case"'":this.triggerAsync("warning",{code:"W114",line:this.line,character:this.char,data:["\\'"]},e,function(){return a.jsonMode});break;case"b":o="\\b";break;case"f":o="\\f";break;case"n":o="\\n";break;case"r":o="\\r";break;case"t":o="\\t";break;case"0":o="\\0";var f=parseInt(this.peek(1),10);this.triggerAsync("warning",{code:"W115",line:this.line,character:this.char},e,function(){return f>=0&&f<=7&&a.directive["use strict"]});break;case"u":o=String.fromCharCode(parseInt(this.input.substr(1,4),16)),u=5;break;case"v":this.triggerAsync("warning",{code:"W114",line:this.line,character:this.char,data:["\\v"]},e,function(){return a.jsonMode}),o="";break;case"x":var l=parseInt(this.input.substr(1,2),16);this.triggerAsync("warning",{code:"W114",line:this.line,character:this.char,data:["\\x-"]},e,function(){return a.jsonMode}),o=String.fromCharCode(l),u=3;break;case"\\":o="\\\\";break;case'"':o='\\"';break;case"/":break;case"":s=!0,o="";break;case"!":if(n.slice(n.length-2)==="<")break;default:this.trigger("warning",{code:"W044",line:this.line,character:this.char})}}n+=o,this.skip(u)}return this.skip(),{type:h.StringLiteral,value:n,isUnclosed:!1,quote:t}},scanRegExp:function(){var e=0,t=this.input.length,n=this.peek(),r=n,i="",s=[],o=!1,u=!1,a,f=function(){n<" "&&(o=!0,this.trigger("warning",{code:"W048",line:this.line,character:this.char})),n==="<"&&(o=!0,this.trigger("warning",{code:"W049",line:this.line,character:this.char,data:[n]}))}.bind(this);if(!this.prereg||n!=="/")return null;e+=1,a=!1;while(e<t){n=this.peek(e),r+=n,i+=n;if(u){n==="]"&&(this.peek(e-1)!=="\\"||this.peek(e-2)==="\\")&&(u=!1),n==="\\"&&(e+=1,n=this.peek(e),i+=n,r+=n,f()),e+=1;continue}if(n==="\\"){e+=1,n=this.peek(e),i+=n,r+=n,f();if(n==="/"){e+=1;continue}if(n==="["){e+=1;continue}}if(n==="["){u=!0,e+=1;continue}if(n==="/"){i=i.substr(0,i.length-1),a=!0,e+=1;break}e+=1}if(!a)return this.trigger("error",{code:"E015",line:this.line,character:this.from}),void this.trigger("fatal",{line:this.line,from:this.from});while(e<t){n=this.peek(e);if(!/[gim]/.test(n))break;s.push(n),r+=n,e+=1}try{new RegExp(i,s.join(""))}catch(l){o=!0,this.trigger("error",{code:"E016",line:this.line,character:this.char,data:[l.message]})}return{type:h.RegExp,value:r,flags:s,isMalformed:o}},scanNonBreakingSpaces:function(){return a.option.nonbsp?this.input.search(/(\u00A0)/):-1},scanUnsafeChars:function(){return this.input.search(u.unsafeChars)},next:function(e){this.from=this.char;var t;if(/\s/.test(this.peek())){t=this.char;while(/\s/.test(this.peek()))this.from+=1,this.skip()}var n=this.scanComments()||this.scanStringLiteral(e)||this.scanTemplateLiteral();return n?n:(n=this.scanRegExp()||this.scanPunctuator()||this.scanKeyword()||this.scanIdentifier()||this.scanNumericLiteral(),n?(this.skip(n.value.length),n):null)},nextLine:function(){var e;if(this.line>=this.getLines().length)return!1;this.input=this.getLines()[this.line],this.line+=1,this.char=1,this.from=1;var t=this.input.trim(),n=function(){return s.some(arguments,function(e){return t.indexOf(e)===0})},r=function(){return s.some(arguments,function(e){return t.indexOf(e,t.length-e.length)!==-1})};a.ignoreLinterErrors===!0&&!n("/*","//")&&!r("*/")&&(this.input=""),e=this.scanNonBreakingSpaces(),e>=0&&this.trigger("warning",{code:"W125",line:this.line,character:e+1}),this.input=this.input.replace(/\t/g,a.tab),e=this.scanUnsafeChars(),e>=0&&this.trigger("warning",{code:"W100",line:this.line,character:e});if(a.option.maxlen&&a.option.maxlen<this.input.length){var i=this.inComment||n.call(t,"//")||n.call(t,"/*"),o=!i||!u.maxlenException.test(t);o&&this.trigger("warning",{code:"W101",line:this.line,character:this.input.length})}return!0},start:function(){this.nextLine()},token:function(){function e(e,t){if(!e.reserved)return!1;var n=e.meta;if(n&&n.isFutureReservedWord&&a.option.inES5()){if(!n.es5)return!1;if(n.strictOnly&&!a.option.strict&&!a.directive["use strict"])return!1;if(t)return!1}return!0}var t=r(),n,i=function(n,r,i){var o;n!=="(endline)"&&n!=="(end)"&&(this.prereg=!1);if(n==="(punctuator)"){switch(r){case".":case")":case"~":case"#":case"]":this.prereg=!1;break;default:this.prereg=!0}o=Object.create(a.syntax[r]||a.syntax["(error)"])}if(n==="(identifier)"){if(r==="return"||r==="case"||r==="typeof")this.prereg=!0;s.has(a.syntax,r)&&(o=Object.create(a.syntax[r]||a.syntax["(error)"]),e(o,i&&n==="(identifier)")||(o=null))}return o||(o=Object.create(a.syntax[n])),o.identifier=n==="(identifier)",o.type=o.type||n,o.value=r,o.line=this.line,o.character=this.char,o.from=this.from,i&&o.identifier&&(o.isProperty=i),o.check=t.check,o}.bind(this);for(;;){if(!this.input.length)return i(this.nextLine()?"(endline)":"(end)","");n=this.next(t);if(!n){this.input.length&&(this.trigger("error",{code:"E024",line:this.line,character:this.char,data:[this.peek()]}),this.input="");continue}switch(n.type){case h.StringLiteral:return this.triggerAsync("String",{line:this.line,"char":this.char,from:this.from,value:n.value,quote:n.quote},t,function(){return!0}),i("(string)",n.value);case h.TemplateLiteral:return this.trigger("Template",{line:this.line,"char":this.char,from:this.from,value:n.value}),i("(template)",n.value);case h.Identifier:this.trigger("Identifier",{line:this.line,"char":this.char,from:this.form,name:n.value,isProperty:a.tokens.curr.id==="."});case h.Keyword:case h.NullLiteral:case h.BooleanLiteral:return i("(identifier)",n.value,a.tokens.curr.id===".");case h.NumericLiteral:return n.isMalformed&&this.trigger("warning",{code:"W045",line:this.line,character:this.char,data:[n.value]}),this.triggerAsync("warning",{code:"W114",line:this.line,character:this.char,data:["0x-"]},t,function(){return n.base===16&&a.jsonMode}),this.triggerAsync("warning",{code:"W115",line:this.line,character:this.char},t,function(){return a.directive["use strict"]&&n.base===8}),this.trigger("Number",{line:this.line,"char":this.char,from:this.from,value:n.value,base:n.base,isMalformed:n.malformed}),i("(number)",n.value);case h.RegExp:return i("(regexp)",n.value);case h.Comment:a.tokens.curr.comment=!0;if(n.isSpecial)return{id:"(comment)",value:n.value,body:n.body,type:n.commentType,isSpecial:n.isSpecial,line:this.line,character:this.char,from:this.from};break;case"":break;default:return i("(punctuator)",n.value)}}}},n.Lexer=i},{"../data/ascii-identifier-data.js":1,"./reg.js":6,"./state.js":7,events:10,underscore:2}],5:[function(e,t,n){var r=e("underscore"),i={E001:"Bad option: '{a}'.",E002:"Bad option value.",E003:"Expected a JSON value.",E004:"Input is neither a string nor an array of strings.",E005:"Input is empty.",E006:"Unexpected early end of program.",E007:'Missing "use strict" statement.',E008:"Strict violation.",E009:"Option 'validthis' can't be used in a global scope.",E010:"'with' is not allowed in strict mode.",E011:"const '{a}' has already been declared.",E012:"const '{a}' is initialized to 'undefined'.",E013:"Attempting to override '{a}' which is a constant.",E014:"A regular expression literal can be confused with '/='.",E015:"Unclosed regular expression.",E016:"Invalid regular expression.",E017:"Unclosed comment.",E018:"Unbegun comment.",E019:"Unmatched '{a}'.",E020:"Expected '{a}' to match '{b}' from line {c} and instead saw '{d}'.",E021:"Expected '{a}' and instead saw '{b}'.",E022:"Line breaking error '{a}'.",E023:"Missing '{a}'.",E024:"Unexpected '{a}'.",E025:"Missing ':' on a case clause.",E026:"Missing '}' to match '{' from line {a}.",E027:"Missing ']' to match '[' from line {a}.",E028:"Illegal comma.",E029:"Unclosed string.",E030:"Expected an identifier and instead saw '{a}'.",E031:"Bad assignment.",E032:"Expected a small integer or 'false' and instead saw '{a}'.",E033:"Expected an operator and instead saw '{a}'.",E034:"get/set are ES5 features.",E035:"Missing property name.",E036:"Expected to see a statement and instead saw a block.",E037:null,E038:null,E039:"Function declarations are not invocable. Wrap the whole function invocation in parens.",E040:"Each value should have its own case label.",E041:"Unrecoverable syntax error.",E042:"Stopping.",E043:"Too many errors.",E044:null,E045:"Invalid for each loop.",E046:"A yield statement shall be within a generator function (with syntax: `function*`)",E047:null,E048:"Let declaration not directly within block.",E049:"A {a} cannot be named '{b}'.",E050:"Mozilla requires the yield expression to be parenthesized here.",E051:"Regular parameters cannot come after default parameters.",E052:"Unclosed template literal."},s={W001:"'hasOwnProperty' is a really bad name.",W002:"Value of '{a}' may be overwritten in IE 8 and earlier.",W003:"'{a}' was used before it was defined.",W004:"'{a}' is already defined.",W005:"A dot following a number can be confused with a decimal point.",W006:"Confusing minuses.",W007:"Confusing plusses.",W008:"A leading decimal point can be confused with a dot: '{a}'.",W009:"The array literal notation [] is preferable.",W010:"The object literal notation {} is preferable.",W011:null,W012:null,W013:null,W014:"Bad line breaking before '{a}'.",W015:null,W016:"Unexpected use of '{a}'.",W017:"Bad operand.",W018:"Confusing use of '{a}'.",W019:"Use the isNaN function to compare with NaN.",W020:"Read only.",W021:"'{a}' is a function.",W022:"Do not assign to the exception parameter.",W023:"Expected an identifier in an assignment and instead saw a function invocation.",W024:"Expected an identifier and instead saw '{a}' (a reserved word).",W025:"Missing name in function declaration.",W026:"Inner functions should be listed at the top of the outer function.",W027:"Unreachable '{a}' after '{b}'.",W028:"Label '{a}' on {b} statement.",W030:"Expected an assignment or function call and instead saw an expression.",W031:"Do not use 'new' for side effects.",W032:"Unnecessary semicolon.",W033:"Missing semicolon.",W034:'Unnecessary directive "{a}".',W035:"Empty block.",W036:"Unexpected /*member '{a}'.",W037:"'{a}' is a statement label.",W038:"'{a}' used out of scope.",W039:"'{a}' is not allowed.",W040:"Possible strict violation.",W041:"Use '{a}' to compare with '{b}'.",W042:"Avoid EOL escaping.",W043:"Bad escaping of EOL. Use option multistr if needed.",W044:"Bad or unnecessary escaping.",W045:"Bad number '{a}'.",W046:"Don't use extra leading zeros '{a}'.",W047:"A trailing decimal point can be confused with a dot: '{a}'.",W048:"Unexpected control character in regular expression.",W049:"Unexpected escaped character '{a}' in regular expression.",W050:"JavaScript URL.",W051:"Variables should not be deleted.",W052:"Unexpected '{a}'.",W053:"Do not use {a} as a constructor.",W054:"The Function constructor is a form of eval.",W055:"A constructor name should start with an uppercase letter.",W056:"Bad constructor.",W057:"Weird construction. Is 'new' necessary?",W058:"Missing '()' invoking a constructor.",W059:"Avoid arguments.{a}.",W060:"document.write can be a form of eval.",W061:"eval can be harmful.",W062:"Wrap an immediate function invocation in parens to assist the reader in understanding that the expression is the result of a function, and not the function itself.",W063:"Math is not a function.",W064:"Missing 'new' prefix when invoking a constructor.",W065:"Missing radix parameter.",W066:"Implied eval. Consider passing a function instead of a string.",W067:"Bad invocation.",W068:"Wrapping non-IIFE function literals in parens is unnecessary.",W069:"['{a}'] is better written in dot notation.",W070:"Extra comma. (it breaks older versions of IE)",W071:"This function has too many statements. ({a})",W072:"This function has too many parameters. ({a})",W073:"Blocks are nested too deeply. ({a})",W074:"This function's cyclomatic complexity is too high. ({a})",W075:"Duplicate key '{a}'.",W076:"Unexpected parameter '{a}' in get {b} function.",W077:"Expected a single parameter in set {a} function.",W078:"Setter is defined without getter.",W079:"Redefinition of '{a}'.",W080:"It's not necessary to initialize '{a}' to 'undefined'.",W081:null,W082:"Function declarations should not be placed in blocks. Use a function expression or move the statement to the top of the outer function.",W083:"Don't make functions within a loop.",W084:"Assignment in conditional expression",W085:"Don't use 'with'.",W086:"Expected a 'break' statement before '{a}'.",W087:"Forgotten 'debugger' statement?",W088:"Creating global 'for' variable. Should be 'for (var {a} ...'.",W089:"The body of a for in should be wrapped in an if statement to filter unwanted properties from the prototype.",W090:"'{a}' is not a statement label.",W091:"'{a}' is out of scope.",W093:"Did you mean to return a conditional instead of an assignment?",W094:"Unexpected comma.",W095:"Expected a string and instead saw {a}.",W096:"The '{a}' key may produce unexpected results.",W097:'Use the function form of "use strict".',W098:"'{a}' is defined but never used.",W099:null,W100:"This character may get silently deleted by one or more browsers.",W101:"Line is too long.",W102:null,W103:"The '{a}' property is deprecated.",W104:"'{a}' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz).",W105:"Unexpected {a} in '{b}'.",W106:"Identifier '{a}' is not in camel case.",W107:"Script URL.",W108:"Strings must use doublequote.",W109:"Strings must use singlequote.",W110:"Mixed double and single quotes.",W112:"Unclosed string.",W113:"Control character in string: {a}.",W114:"Avoid {a}.",W115:"Octal literals are not allowed in strict mode.",W116:"Expected '{a}' and instead saw '{b}'.",W117:"'{a}' is not defined.",W118:"'{a}' is only available in Mozilla JavaScript extensions (use moz option).",W119:"'{a}' is only available in ES6 (use esnext option).",W120:"You might be leaking a variable ({a}) here.",W121:"Extending prototype of native object: '{a}'.",W122:"Invalid typeof value '{a}'",W123:"'{a}' is already defined in outer scope.",W124:"A generator function shall contain a yield statement.",W125:"This line contains non-breaking spaces: http://jshint.com/doc/options/#nonbsp"},o={I001:"Comma warnings can be turned off with 'laxcomma'.",I002:null,I003:"ES5 option is now set per default"};n.errors={},n.warnings={},n.info={},r.each(i,function(e,t){n.errors[t]={code:t,desc:e}}),r.each(s,function(e,t){n.warnings[t]={code:t,desc:e}}),r.each(o,function(e,t){n.info[t]={code:t,desc:e}})},{underscore:2}],6:[function(e,t,n){"use string";n.unsafeString=/@cc|<\/?|script|\]\s*\]|<\s*!|&lt/i,n.unsafeChars=/[\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/,n.needEsc=/[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/,n.needEscGlobal=/[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,n.starSlash=/\*\//,n.identifier=/^([a-zA-Z_$][a-zA-Z0-9_$]*)$/,n.javascriptURL=/^(?:javascript|jscript|ecmascript|vbscript|mocha|livescript)\s*:/i,n.fallsThrough=/^\s*\/\*\s*falls?\sthrough\s*\*\/\s*$/,n.maxlenException=/^(?:(?:\/\/|\/\*|\*) ?)?[^ ]+$/},{}],7:[function(e,t,n){var r={syntax:{},reset:function(){this.tokens={prev:null,next:null,curr:null},this.option={},this.ignored={},this.directive={},this.jsonMode=!1,this.jsonWarnings=[],this.lines=[],this.tab="",this.cache={},this.ignoredLines={},this.ignoreLinterErrors=!1}};n.state=r},{}],8:[function(e,t,n){n.register=function(e){e.on("Identifier",function(t){if(e.getOption("proto"))return;t.name==="__proto__"&&e.warn("W103",{line:t.line,"char":t.char,data:[t.name]})}),e.on("Identifier",function(t){if(e.getOption("iterator"))return;t.name==="__iterator__"&&e.warn("W104",{line:t.line,"char":t.char,data:[t.name]})}),e.on("Identifier",function(t){if(!e.getOption("camelcase"))return;t.name.replace(/^_+|_+$/g,"").indexOf("_")>-1&&!t.name.match(/^[A-Z0-9_]*$/)&&e.warn("W106",{line:t.line,"char":t.from,data:[t.name]})}),e.on("String",function(t){var n=e.getOption("quotmark"),r;if(!n)return;n==="single"&&t.quote!=="'"&&(r="W109"),n==="double"&&t.quote!=='"'&&(r="W108"),n===!0&&(e.getCache("quotmark")||e.setCache("quotmark",t.quote),e.getCache("quotmark")!==t.quote&&(r="W110")),r&&e.warn(r,{line:t.line,"char":t.char})}),e.on("Number",function(t){t.value.charAt(0)==="."&&e.warn("W008",{line:t.line,"char":t.char,data:[t.value]}),t.value.substr(t.value.length-1)==="."&&e.warn("W047",{line:t.line,"char":t.char,data:[t.value]}),/^00+/.test(t.value)&&e.warn("W046",{line:t.line,"char":t.char,data:[t.value]})}),e.on("String",function(t){var n=/^(?:javascript|jscript|ecmascript|vbscript|mocha|livescript)\s*:/i;if(e.getOption("scripturl"))return;n.test(t.value)&&e.warn("W107",{line:t.line,"char":t.char})})}},{}],9:[function(e,t,n){n.reservedVars={arguments:!1,NaN:!1},n.ecmaIdentifiers={Array:!1,Boolean:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,eval:!1,EvalError:!1,Function:!1,hasOwnProperty:!1,isFinite:!1,isNaN:!1,JSON:!1,Math:!1,Number:!1,Object:!1,parseInt:!1,parseFloat:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,TypeError:!1,URIError:!1},n.newEcmaIdentifiers={Set:!1,Map:!1,WeakMap:!1,WeakSet:!1,Proxy:!1,Promise:!1},n.browser={Audio:!1,Blob:!1,addEventListener:!1,applicationCache:!1,atob:!1,blur:!1,btoa:!1,CanvasGradient:!1,CanvasPattern:!1,CanvasRenderingContext2D:!1,clearInterval:!1,clearTimeout:!1,close:!1,closed:!1,CustomEvent:!1,DOMParser:!1,defaultStatus:!1,document:!1,Element:!1,ElementTimeControl:!1,event:!1,FileReader:!1,FormData:!1,focus:!1,frames:!1,getComputedStyle:!1,HTMLElement:!1,HTMLAnchorElement:!1,HTMLBaseElement:!1,HTMLBlockquoteElement:!1,HTMLBodyElement:!1,HTMLBRElement:!1,HTMLButtonElement:!1,HTMLCanvasElement:!1,HTMLDirectoryElement:!1,HTMLDivElement:!1,HTMLDListElement:!1,HTMLFieldSetElement:!1,HTMLFontElement:!1,HTMLFormElement:!1,HTMLFrameElement:!1,HTMLFrameSetElement:!1,HTMLHeadElement:!1,HTMLHeadingElement:!1,HTMLHRElement:!1,HTMLHtmlElement:!1,HTMLIFrameElement:!1,HTMLImageElement:!1,HTMLInputElement:!1,HTMLIsIndexElement:!1,HTMLLabelElement:!1,HTMLLayerElement:!1,HTMLLegendElement:!1,HTMLLIElement:!1,HTMLLinkElement:!1,HTMLMapElement:!1,HTMLMenuElement:!1,HTMLMetaElement:!1,HTMLModElement:!1,HTMLObjectElement:!1,HTMLOListElement:!1,HTMLOptGroupElement:!1,HTMLOptionElement:!1,HTMLParagraphElement:!1,HTMLParamElement:!1,HTMLPreElement:!1,HTMLQuoteElement:!1,HTMLScriptElement:!1,HTMLSelectElement:!1,HTMLStyleElement:!1,HTMLTableCaptionElement:!1,HTMLTableCellElement:!1,HTMLTableColElement:!1,HTMLTableElement:!1,HTMLTableRowElement:!1,HTMLTableSectionElement:!1,HTMLTextAreaElement:!1,HTMLTitleElement:!1,HTMLUListElement:!1,HTMLVideoElement:!1,history:!1,Image:!1,length:!1,localStorage:!1,location:!1,matchMedia:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,MouseEvent:!1,moveBy:!1,moveTo:!1,MutationObserver:!1,name:!1,Node:!1,NodeFilter:!1,NodeList:!1,navigator:!1,onbeforeunload:!0,onblur:!0,onerror:!0,onfocus:!0,onload:!0,onresize:!0,onunload:!0,open:!1,openDatabase:!1,opener:!1,Option:!1,parent:!1,print:!1,removeEventListener:!1,resizeBy:!1,resizeTo:!1,screen:!1,scroll:!1,scrollBy:!1,scrollTo:!1,sessionStorage:!1,setInterval:!1,setTimeout:!1,SharedWorker:!1,status:!1,SVGAElement:!1,SVGAltGlyphDefElement:!1,SVGAltGlyphElement:!1,SVGAltGlyphItemElement:!1,SVGAngle:!1,SVGAnimateColorElement:!1,SVGAnimateElement:!1,SVGAnimateMotionElement:!1,SVGAnimateTransformElement:!1,SVGAnimatedAngle:!1,SVGAnimatedBoolean:!1,SVGAnimatedEnumeration:!1,SVGAnimatedInteger:!1,SVGAnimatedLength:!1,SVGAnimatedLengthList:!1,SVGAnimatedNumber:!1,SVGAnimatedNumberList:!1,SVGAnimatedPathData:!1,SVGAnimatedPoints:!1,SVGAnimatedPreserveAspectRatio:!1,SVGAnimatedRect:!1,SVGAnimatedString:!1,SVGAnimatedTransformList:!1,SVGAnimationElement:!1,SVGCSSRule:!1,SVGCircleElement:!1,SVGClipPathElement:!1,SVGColor:!1,SVGColorProfileElement:!1,SVGColorProfileRule:!1,SVGComponentTransferFunctionElement:!1,SVGCursorElement:!1,SVGDefsElement:!1,SVGDescElement:!1,SVGDocument:!1,SVGElement:!1,SVGElementInstance:!1,SVGElementInstanceList:!1,SVGEllipseElement:!1,SVGExternalResourcesRequired:!1,SVGFEBlendElement:!1,SVGFEColorMatrixElement:!1,SVGFEComponentTransferElement:!1,SVGFECompositeElement:!1,SVGFEConvolveMatrixElement:!1,SVGFEDiffuseLightingElement:!1,SVGFEDisplacementMapElement:!1,SVGFEDistantLightElement:!1,SVGFEFloodElement:!1,SVGFEFuncAElement:!1,SVGFEFuncBElement:!1,SVGFEFuncGElement:!1,SVGFEFuncRElement:!1,SVGFEGaussianBlurElement:!1,SVGFEImageElement:!1,SVGFEMergeElement:!1,SVGFEMergeNodeElement:!1,SVGFEMorphologyElement:!1,SVGFEOffsetElement:!1,SVGFEPointLightElement:!1,SVGFESpecularLightingElement:!1,SVGFESpotLightElement:!1,SVGFETileElement:!1,SVGFETurbulenceElement:!1,SVGFilterElement:!1,SVGFilterPrimitiveStandardAttributes:!1,SVGFitToViewBox:!1,SVGFontElement:!1,SVGFontFaceElement:!1,SVGFontFaceFormatElement:!1,SVGFontFaceNameElement:!1,SVGFontFaceSrcElement:!1,SVGFontFaceUriElement:!1,SVGForeignObjectElement:!1,SVGGElement:!1,SVGGlyphElement:!1,SVGGlyphRefElement:!1,SVGGradientElement:!1,SVGHKernElement:!1,SVGICCColor:!1,SVGImageElement:!1,SVGLangSpace:!1,SVGLength:!1,SVGLengthList:!1,SVGLineElement:!1,SVGLinearGradientElement:!1,SVGLocatable:!1,SVGMPathElement:!1,SVGMarkerElement:!1,SVGMaskElement:!1,SVGMatrix:!1,SVGMetadataElement:!1,SVGMissingGlyphElement:!1,SVGNumber:!1,SVGNumberList:!1,SVGPaint:!1,SVGPathElement:!1,SVGPathSeg:!1,SVGPathSegArcAbs:!1,SVGPathSegArcRel:!1,SVGPathSegClosePath:!1,SVGPathSegCurvetoCubicAbs:!1,SVGPathSegCurvetoCubicRel:!1,SVGPathSegCurvetoCubicSmoothAbs:!1,SVGPathSegCurvetoCubicSmoothRel:!1,SVGPathSegCurvetoQuadraticAbs:!1,SVGPathSegCurvetoQuadraticRel:!1,SVGPathSegCurvetoQuadraticSmoothAbs:!1,SVGPathSegCurvetoQuadraticSmoothRel:!1,SVGPathSegLinetoAbs:!1,SVGPathSegLinetoHorizontalAbs:!1,SVGPathSegLinetoHorizontalRel:!1,SVGPathSegLinetoRel:!1,SVGPathSegLinetoVerticalAbs:!1,SVGPathSegLinetoVerticalRel:!1,SVGPathSegList:!1,SVGPathSegMovetoAbs:!1,SVGPathSegMovetoRel:!1,SVGPatternElement:!1,SVGPoint:!1,SVGPointList:!1,SVGPolygonElement:!1,SVGPolylineElement:!1,SVGPreserveAspectRatio:!1,SVGRadialGradientElement:!1,SVGRect:!1,SVGRectElement:!1,SVGRenderingIntent:!1,SVGSVGElement:!1,SVGScriptElement:!1,SVGSetElement:!1,SVGStopElement:!1,SVGStringList:!1,SVGStylable:!1,SVGStyleElement:!1,SVGSwitchElement:!1,SVGSymbolElement:!1,SVGTRefElement:!1,SVGTSpanElement:!1,SVGTests:!1,SVGTextContentElement:!1,SVGTextElement:!1,SVGTextPathElement:!1,SVGTextPositioningElement:!1,SVGTitleElement:!1,SVGTransform:!1,SVGTransformList:!1,SVGTransformable:!1,SVGURIReference:!1,SVGUnitTypes:!1,SVGUseElement:!1,SVGVKernElement:!1,SVGViewElement:!1,SVGViewSpec:!1,SVGZoomAndPan:!1,TimeEvent:!1,top:!1,URL:!1,WebSocket:!1,window:!1,Worker:!1,XMLHttpRequest:!1,XMLSerializer:!1,XPathEvaluator:!1,XPathException:!1,XPathExpression:!1,XPathNamespace:!1,XPathNSResolver:!1,XPathResult:!1},n.devel={alert:!1,confirm:!1,console:!1,Debug:!1,opera:!1,prompt:!1},n.worker={importScripts:!0,postMessage:!0,self:!0},n.nonstandard={escape:!1,unescape:!1},n.couch={require:!1,respond:!1,getRow:!1,emit:!1,send:!1,start:!1,sum:!1,log:!1,exports:!1,module:!1,provides:!1},n.node={__filename:!1,__dirname:!1,GLOBAL:!1,global:!1,module:!1,require:!1,Buffer:!0,console:!0,exports:!0,process:!0,setTimeout:!0,clearTimeout:!0,setInterval:!0,clearInterval:!0,setImmediate:!0,clearImmediate:!0},n.phantom={phantom:!0,require:!0,WebPage:!0,console:!0,exports:!0},n.rhino={defineClass:!1,deserialize:!1,gc:!1,help:!1,importClass:!1,importPackage:!1,java:!1,load:!1,loadClass:!1,Packages:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},n.shelljs={target:!1,echo:!1,exit:!1,cd:!1,pwd:!1,ls:!1,find:!1,cp:!1,rm:!1,mv:!1,mkdir:!1,test:!1,cat:!1,sed:!1,grep:!1,which:!1,dirs:!1,pushd:!1,popd:!1,env:!1,exec:!1,chmod:!1,config:!1,error:!1,tempdir:!1},n.typed={ArrayBuffer:!1,ArrayBufferView:!1,DataView:!1,Float32Array:!1,Float64Array:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1},n.wsh={ActiveXObject:!0,Enumerator:!0,GetObject:!0,ScriptEngine:!0,ScriptEngineBuildVersion:!0,ScriptEngineMajorVersion:!0,ScriptEngineMinorVersion:!0,VBArray:!0,WSH:!0,WScript:!0,XDomainRequest:!0},n.dojo={dojo:!1,dijit:!1,dojox:!1,define:!1,require:!1},n.jquery={$:!1,jQuery:!1},n.mootools={$:!1,$$:!1,Asset:!1,Browser:!1,Chain:!1,Class:!1,Color:!1,Cookie:!1,Core:!1,Document:!1,DomReady:!1,DOMEvent:!1,DOMReady:!1,Drag:!1,Element:!1,Elements:!1,Event:!1,Events:!1,Fx:!1,Group:!1,Hash:!1,HtmlTable:!1,Iframe:!1,IframeShim:!1,InputValidator:!1,instanceOf:!1,Keyboard:!1,Locale:!1,Mask:!1,MooTools:!1,Native:!1,Options:!1,OverText:!1,Request:!1,Scroller:!1,Slick:!1,Slider:!1,Sortables:!1,Spinner:!1,Swiff:!1,Tips:!1,Type:!1,typeOf:!1,URI:!1,Window:!1},n.prototypejs={$:!1,$$:!1,$A:!1,$F:!1,$H:!1,$R:!1,$break:!1,$continue:!1,$w:!1,Abstract:!1,Ajax:!1,Class:!1,Enumerable:!1,Element:!1,Event:!1,Field:!1,Form:!1,Hash:!1,Insertion:!1,ObjectRange:!1,PeriodicalExecuter:!1,Position:!1,Prototype:!1,Selector:!1,Template:!1,Toggle:!1,Try:!1,Autocompleter:!1,Builder:!1,Control:!1,Draggable:!1,Draggables:!1,Droppables:!1,Effect:!1,Sortable:!1,SortableObserver:!1,Sound:!1,Scriptaculous:!1},n.yui={YUI:!1,Y:!1,YUI_config:!1},n.mocha={describe:!1,it:!1,before:!1,after:!1,beforeEach:!1,afterEach:!1,suite:!1,test:!1,setup:!1,teardown:!1}},{}],10:[function(e,t,n){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||undefined}function i(e){return typeof e=="function"}function s(e){return typeof e=="number"}function o(e){return typeof e=="object"&&e!==null}function u(e){return e===void 0}t.exports=r,r.EventEmitter=r,r.prototype._events=undefined,r.prototype._maxListeners=undefined,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if(!s(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,n,r,s,a,f;this._events||(this._events={});if(e==="error")if(!this._events.error||o(this._events.error)&&!this._events.error.length)throw t=arguments[1],t instanceof Error?t:TypeError('Uncaught, unspecified "error" event.');n=this._events[e];if(u(n))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:r=arguments.length,s=new Array(r-1);for(a=1;a<r;a++)s[a-1]=arguments[a];n.apply(this,s)}else if(o(n)){r=arguments.length,s=new Array(r-1);for(a=1;a<r;a++)s[a-1]=arguments[a];f=n.slice(),r=f.length;for(a=0;a<r;a++)f[a].apply(this,s)}return!0},r.prototype.addListener=function(e,t){var n;if(!i(t))throw TypeError("listener must be a function");this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,i(t.listener)?t.listener:t),this._events[e]?o(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t;if(o(this._events[e])&&!this._events[e].warned){var n;u(this._maxListeners)?n=r.defaultMaxListeners:n=this._maxListeners,n&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),console.trace())}return this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){function n(){this.removeListener(e,n),r||(r=!0,t.apply(this,arguments))}if(!i(t))throw TypeError("listener must be a function");var r=!1;return n.listener=t,this.on(e,n),this},r.prototype.removeListener=function(e,t){var n,r,s,u;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;n=this._events[e],s=n.length,r=-1;if(n===t||i(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(n)){for(u=s;u-->0;)if(n[u]===t||n[u].listener&&n[u].listener===t){r=u;break}if(r<0)return this;n.length===1?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[e]&&delete this._events[e],this;if(arguments.length===0){for(t in this._events){if(t==="removeListener")continue;this.removeAllListeners(t)}return this.removeAllListeners("removeListener"),this._events={},this}n=this._events[e];if(i(n))this.removeListener(e,n);else while(n.length)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){var t;return!this._events||!this._events[e]?t=[]:i(this._events[e])?t=[this._events[e]]:t=this._events[e].slice(),t},r.listenerCount=function(e,t){var n;return!e._events||!e._events[t]?n=0:i(e._events[t])?n=1:n=e._events[t].length,n}},{}]},{},[3])(3)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,o=e("./anchor").Anchor,u=function(e){this.$lines=[],e.length===0?this.$lines=[""]:Array.isArray(e)?this._insertLines(0,e):this.insert({row:0,column:0},e)};(function(){r.implement(this,i),this.setValue=function(e){var t=this.getLength();this.remove(new s(0,0,t,this.getLine(t-1).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new o(this,e,t)},"aaa".split(/a/).length===0?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){if(this.$newLineMode===e)return;this.$newLineMode=e,this._signal("changeNewLineMode")},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return e=="\r\n"||e=="\r"||e=="\n"},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){if(e.start.row==e.end.row)return this.getLine(e.start.row).substring(e.start.column,e.end.column);var t=this.getLines(e.start.row,e.end.row);t[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;return e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column)),t.join(this.getNewLineCharacter())},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):e.row<0&&(e.row=0),e},this.insert=function(e,t){if(!t||t.length===0)return e;e=this.$clipPosition(e),this.getLength()<=1&&this.$detectNewLine(t);var n=this.$split(t),r=n.splice(0,1)[0],i=n.length==0?null:n.splice(n.length-1,1)[0];return e=this.insertInLine(e,r),i!==null&&(e=this.insertNewLine(e),e=this._insertLines(e.row,n),e=this.insertInLine(e,i||"")),e},this.insertLines=function(e,t){return e>=this.getLength()?this.insert({row:e,column:0},"\n"+t.join("\n")):this._insertLines(Math.max(e,0),t)},this._insertLines=function(e,t){if(t.length==0)return{row:e,column:0};while(t.length>61440){var n=this._insertLines(e,t.slice(0,61440));t=t.slice(61440),e=n.row}var r=[e,0];r.push.apply(r,t),this.$lines.splice.apply(this.$lines,r);var i=new s(e,0,e+t.length,0),o={action:"insertLines",range:i,lines:t};return this._signal("change",{data:o}),i.end},this.insertNewLine=function(e){e=this.$clipPosition(e);var t=this.$lines[e.row]||"";this.$lines[e.row]=t.substring(0,e.column),this.$lines.splice(e.row+1,0,t.substring(e.column,t.length));var n={row:e.row+1,column:0},r={action:"insertText",range:s.fromPoints(e,n),text:this.getNewLineCharacter()};return this._signal("change",{data:r}),n},this.insertInLine=function(e,t){if(t.length==0)return e;var n=this.$lines[e.row]||"";this.$lines[e.row]=n.substring(0,e.column)+t+n.substring(e.column);var r={row:e.row,column:e.column+t.length},i={action:"insertText",range:s.fromPoints(e,r),text:t};return this._signal("change",{data:i}),r},this.remove=function(e){e instanceof s||(e=s.fromPoints(e.start,e.end)),e.start=this.$clipPosition(e.start),e.end=this.$clipPosition(e.end);if(e.isEmpty())return e.start;var t=e.start.row,n=e.end.row;if(e.isMultiLine()){var r=e.start.column==0?t:t+1,i=n-1;e.end.column>0&&this.removeInLine(n,0,e.end.column),i>=r&&this._removeLines(r,i),r!=t&&(this.removeInLine(t,e.start.column,this.getLine(t).length),this.removeNewLine(e.start.row))}else this.removeInLine(t,e.start.column,e.end.column);return e.start},this.removeInLine=function(e,t,n){if(t==n)return;var r=new s(e,t,e,n),i=this.getLine(e),o=i.substring(t,n),u=i.substring(0,t)+i.substring(n,i.length);this.$lines.splice(e,1,u);var a={action:"removeText",range:r,text:o};return this._signal("change",{data:a}),r.start},this.removeLines=function(e,t){return e<0||t>=this.getLength()?this.remove(new s(e,0,t+1,0)):this._removeLines(e,t)},this._removeLines=function(e,t){var n=new s(e,0,t+1,0),r=this.$lines.splice(e,t-e+1),i={action:"removeLines",range:n,nl:this.getNewLineCharacter(),lines:r};return this._signal("change",{data:i}),r},this.removeNewLine=function(e){var t=this.getLine(e),n=this.getLine(e+1),r=new s(e,t.length,e+1,0),i=t+n;this.$lines.splice(e,2,i);var o={action:"removeText",range:r,text:this.getNewLineCharacter()};this._signal("change",{data:o})},this.replace=function(e,t){e instanceof s||(e=s.fromPoints(e.start,e.end));if(t.length==0&&e.isEmpty())return e.start;if(t==this.getTextRange(e))return e.end;this.remove(e);if(t)var n=this.insert(e.start,t);else n=e.start;return n},this.applyDeltas=function(e){for(var t=0;t<e.length;t++){var n=e[t],r=s.fromPoints(n.range.start,n.range.end);n.action=="insertLines"?this.insertLines(r.start.row,n.lines):n.action=="insertText"?this.insert(r.start,n.text):n.action=="removeLines"?this._removeLines(r.start.row,r.end.row-1):n.action=="removeText"&&this.remove(r)}},this.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--){var n=e[t],r=s.fromPoints(n.range.start,n.range.end);n.action=="insertLines"?this._removeLines(r.start.row,r.end.row-1):n.action=="insertText"?this.remove(r):n.action=="removeLines"?this._insertLines(r.start.row,n.lines):n.action=="removeText"&&this.insert(r.start,n.text)}},this.indexToPosition=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length;for(var i=t||0,s=n.length;i<s;i++){e-=n[i].length+r;if(e<0)return{row:i,column:e+n[i].length+r}}return{row:s-1,column:n[s-1].length}},this.positionToIndex=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=0,s=Math.min(e.row,n.length);for(var o=t||0;o<s;++o)i+=n[o].length+r;return i+e.column}}).call(u.prototype),t.Document=u})
\ No newline at end of file
diff --git a/app/assets/lib/ace/worker-json.js b/app/assets/lib/ace/worker-json.js
new file mode 100644
index 000000000..4c9011b0e
--- /dev/null
+++ b/app/assets/lib/ace/worker-json.js
@@ -0,0 +1 @@
+"no use strict";(function(e){if(typeof e.window!="undefined"&&e.document)return;e.console=function(){var e=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:e})},e.console.error=e.console.warn=e.console.log=e.console.trace=e.console,e.window=e,e.ace=e,e.onerror=function(e,t,n,r,i){console.error("Worker "+(i?i.stack:e))},e.normalizeModule=function(t,n){if(n.indexOf("!")!==-1){var r=n.split("!");return e.normalizeModule(t,r[0])+"!"+e.normalizeModule(t,r[1])}if(n.charAt(0)=="."){var i=t.split("/").slice(0,-1).join("/");n=(i?i+"/":"")+n;while(n.indexOf(".")!==-1&&s!=n){var s=n;n=n.replace(/^\.\//,"").replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return n},e.require=function(t,n){n||(n=t,t=null);if(!n.charAt)throw new Error("worker.js require() accepts only (parentId, id) as arguments");n=e.normalizeModule(t,n);var r=e.require.modules[n];if(r)return r.initialized||(r.initialized=!0,r.exports=r.factory().exports),r.exports;var i=n.split("/");if(!e.require.tlns)return console.log("unable to load "+n);i[0]=e.require.tlns[i[0]]||i[0];var s=i.join("/")+".js";return e.require.id=n,importScripts(s),e.require(t,n)},e.require.modules={},e.require.tlns={},e.define=function(t,n,r){arguments.length==2?(r=n,typeof t!="string"&&(n=t,t=e.require.id)):arguments.length==1&&(r=t,n=[],t=e.require.id),n.length||(n=["require","exports","module"]);if(t.indexOf("text!")===0)return;var i=function(n){return e.require(t,n)};e.require.modules[t]={exports:{},factory:function(){var e=this,t=r.apply(this,n.map(function(t){switch(t){case"require":return i;case"exports":return e.exports;case"module":return e;default:return i(t)}}));return t&&(e.exports=t),e}}},e.define.amd={},e.initBaseUrls=function(e){require.tlns=e},e.initSender=function(){var t=e.require("ace/lib/event_emitter").EventEmitter,n=e.require("ace/lib/oop"),r=function(){};return function(){n.implement(this,t),this.callback=function(e,t){postMessage({type:"call",id:t,data:e})},this.emit=function(e,t){postMessage({type:"event",name:e,data:t})}}.call(r.prototype),new r};var t=e.main=null,n=e.sender=null;e.onmessage=function(r){var i=r.data;if(i.command){if(!t[i.command])throw new Error("Unknown command:"+i.command);t[i.command].apply(t,i.args)}else if(i.init){initBaseUrls(i.tlns),require("ace/lib/es5-shim"),n=e.sender=initSender();var s=require(i.module)[i.classname];t=e.main=new s(n)}else i.event&&n&&n._signal(i.event,i.data)}})(this),ace.define("ace/mode/json_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/json/json_parse"],function(e,t,n){var r=e("../lib/oop"),i=e("../worker/mirror").Mirror,s=e("./json/json_parse"),o=t.JsonWorker=function(e){i.call(this,e),this.setTimeout(200)};r.inherits(o,i),function(){this.onUpdate=function(){var e=this.doc.getValue();try{var t=s(e)}catch(n){var r=this.doc.indexToPosition(n.at-1);this.sender.emit("error",{row:r.row,column:r.column,text:n.message,type:"error"});return}this.sender.emit("ok")}}.call(o.prototype)}),ace.define("ace/lib/oop",["require","exports","module"],function(e,t,n){t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}}),ace.define("ace/worker/mirror",["require","exports","module","ace/document","ace/lib/lang"],function(e,t,n){var r=e("../document").Document,i=e("../lib/lang"),s=t.Mirror=function(e){this.sender=e;var t=this.doc=new r(""),n=this.deferredUpdate=i.delayedCall(this.onUpdate.bind(this)),s=this;e.on("change",function(e){t.applyDeltas(e.data);if(s.$timeout)return n.schedule(s.$timeout);s.onUpdate()})};(function(){this.$timeout=500,this.setTimeout=function(e){this.$timeout=e},this.setValue=function(e){this.doc.setValue(e),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(e){this.sender.callback(this.doc.getValue(),e)},this.onUpdate=function(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(s.prototype)}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(e,t,n){function r(){}function i(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(t){}}function s(e){return e=+e,e!==e?e=0:e!==0&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}function o(e){var t=typeof e;return e===null||t==="undefined"||t==="boolean"||t==="number"||t==="string"}function u(e){var t,n,r;if(o(e))return e;n=e.valueOf;if(typeof n=="function"){t=n.call(e);if(o(t))return t}r=e.toString;if(typeof r=="function"){t=r.call(e);if(o(t))return t}throw new TypeError}Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if(typeof t!="function")throw new TypeError("Function.prototype.bind called on incompatible "+t);var n=c.call(arguments,1),i=function(){if(this instanceof i){var r=t.apply(this,n.concat(c.call(arguments)));return Object(r)===r?r:this}return t.apply(e,n.concat(c.call(arguments)))};return t.prototype&&(r.prototype=t.prototype,i.prototype=new r,r.prototype=null),i});var a=Function.prototype.call,f=Array.prototype,l=Object.prototype,c=f.slice,h=a.bind(l.toString),p=a.bind(l.hasOwnProperty),d,v,m,g,y;if(y=p(l,"__defineGetter__"))d=a.bind(l.__defineGetter__),v=a.bind(l.__defineSetter__),m=a.bind(l.__lookupGetter__),g=a.bind(l.__lookupSetter__);if([1,2].splice(0).length!=2)if(!function(){function e(e){var t=new Array(e+2);return t[0]=t[1]=0,t}var t=[],n;t.splice.apply(t,e(20)),t.splice.apply(t,e(26)),n=t.length,t.splice(5,0,"XXX"),n+1==t.length;if(n+1==t.length)return!0}())Array.prototype.splice=function(e,t){var n=this.length;e>0?e>n&&(e=n):e==void 0?e=0:e<0&&(e=Math.max(n+e,0)),e+t<n||(t=n-e);var r=this.slice(e,e+t),i=c.call(arguments,2),s=i.length;if(e===n)s&&this.push.apply(this,i);else{var o=Math.min(t,n-e),u=e+o,a=u+s-o,f=n-u,l=n-o;if(a<u)for(var h=0;h<f;++h)this[a+h]=this[u+h];else if(a>u)for(h=f;h--;)this[a+h]=this[u+h];if(s&&e===l)this.length=l,this.push.apply(this,i);else{this.length=l+s;for(h=0;h<s;++h)this[e+h]=i[h]}}return r};else{var b=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?b.apply(this,[e===void 0?0:e,t===void 0?this.length-e:t].concat(c.call(arguments,2))):[]}}Array.isArray||(Array.isArray=function(e){return h(e)=="[object Array]"});var w=Object("a"),E=w[0]!="a"||!(0 in w);Array.prototype.forEach||(Array.prototype.forEach=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=arguments[1],i=-1,s=n.length>>>0;if(h(e)!="[object Function]")throw new TypeError;while(++i<s)i in n&&e.call(r,n[i],i,t)}),Array.prototype.map||(Array.prototype.map=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=Array(r),s=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var o=0;o<r;o++)o in n&&(i[o]=e.call(s,n[o],o,t));return i}),Array.prototype.filter||(Array.prototype.filter=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=[],s,o=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var u=0;u<r;u++)u in n&&(s=n[u],e.call(o,s,u,t)&&i.push(s));return i}),Array.prototype.every||(Array.prototype.every=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var s=0;s<r;s++)if(s in n&&!e.call(i,n[s],s,t))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var s=0;s<r;s++)if(s in n&&e.call(i,n[s],s,t))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0;if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");if(!r&&arguments.length==1)throw new TypeError("reduce of empty array with no initial value");var i=0,s;if(arguments.length>=2)s=arguments[1];else do{if(i in n){s=n[i++];break}if(++i>=r)throw new TypeError("reduce of empty array with no initial value")}while(!0);for(;i<r;i++)i in n&&(s=e.call(void 0,s,n[i],i,t));return s}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0;if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");if(!r&&arguments.length==1)throw new TypeError("reduceRight of empty array with no initial value");var i,s=r-1;if(arguments.length>=2)i=arguments[1];else do{if(s in n){i=n[s--];break}if(--s<0)throw new TypeError("reduceRight of empty array with no initial value")}while(!0);do s in this&&(i=e.call(void 0,i,n[s],s,t));while(s--);return i});if(!Array.prototype.indexOf||[0,1].indexOf(1,2)!=-1)Array.prototype.indexOf=function(e){var t=E&&h(this)=="[object String]"?this.split(""):F(this),n=t.length>>>0;if(!n)return-1;var r=0;arguments.length>1&&(r=s(arguments[1])),r=r>=0?r:Math.max(0,n+r);for(;r<n;r++)if(r in t&&t[r]===e)return r;return-1};if(!Array.prototype.lastIndexOf||[0,1].lastIndexOf(0,-3)!=-1)Array.prototype.lastIndexOf=function(e){var t=E&&h(this)=="[object String]"?this.split(""):F(this),n=t.length>>>0;if(!n)return-1;var r=n-1;arguments.length>1&&(r=Math.min(r,s(arguments[1]))),r=r>=0?r:n-Math.abs(r);for(;r>=0;r--)if(r in t&&e===t[r])return r;return-1};Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__||(e.constructor?e.constructor.prototype:l)});if(!Object.getOwnPropertyDescriptor){var S="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(e,t){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError(S+e);if(!p(e,t))return;var n,r,i;n={enumerable:!0,configurable:!0};if(y){var s=e.__proto__;e.__proto__=l;var r=m(e,t),i=g(e,t);e.__proto__=s;if(r||i)return r&&(n.get=r),i&&(n.set=i),n}return n.value=e[t],n}}Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){return Object.keys(e)});if(!Object.create){var x;Object.prototype.__proto__===null?x=function(){return{__proto__:null}}:x=function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(e,t){var n;if(e===null)n=x();else{if(typeof e!="object")throw new TypeError("typeof prototype["+typeof e+"] != 'object'");var r=function(){};r.prototype=e,n=new r,n.__proto__=e}return t!==void 0&&Object.defineProperties(n,t),n}}if(Object.defineProperty){var T=i({}),N=typeof document=="undefined"||i(document.createElement("div"));if(!T||!N)var C=Object.defineProperty}if(!Object.defineProperty||C){var k="Property description must be an object: ",L="Object.defineProperty called on non-object: ",A="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(e,t,n){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError(L+e);if(typeof n!="object"&&typeof n!="function"||n===null)throw new TypeError(k+n);if(C)try{return C.call(Object,e,t,n)}catch(r){}if(p(n,"value"))if(y&&(m(e,t)||g(e,t))){var i=e.__proto__;e.__proto__=l,delete e[t],e[t]=n.value,e.__proto__=i}else e[t]=n.value;else{if(!y)throw new TypeError(A);p(n,"get")&&d(e,t,n.get),p(n,"set")&&v(e,t,n.set)}return e}}Object.defineProperties||(Object.defineProperties=function(e,t){for(var n in t)p(t,n)&&Object.defineProperty(e,n,t[n]);return e}),Object.seal||(Object.seal=function(e){return e}),Object.freeze||(Object.freeze=function(e){return e});try{Object.freeze(function(){})}catch(O){Object.freeze=function(e){return function(t){return typeof t=="function"?t:e(t)}}(Object.freeze)}Object.preventExtensions||(Object.preventExtensions=function(e){return e}),Object.isSealed||(Object.isSealed=function(e){return!1}),Object.isFrozen||(Object.isFrozen=function(e){return!1}),Object.isExtensible||(Object.isExtensible=function(e){if(Object(e)===e)throw new TypeError;var t="";while(p(e,t))t+="?";e[t]=!0;var n=p(e,t);return delete e[t],n});if(!Object.keys){var M=!0,_=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],D=_.length;for(var P in{toString:null})M=!1;Object.keys=function I(e){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError("Object.keys called on a non-object");var I=[];for(var t in e)p(e,t)&&I.push(t);if(M)for(var n=0,r=D;n<r;n++){var i=_[n];p(e,i)&&I.push(i)}return I}}Date.now||(Date.now=function(){return(new Date).getTime()});var H="	\n\f\r   ᠎              \u2028\u2029";if(!String.prototype.trim||H.trim()){H="["+H+"]";var B=new RegExp("^"+H+H+"*"),j=new RegExp(H+H+"*$");String.prototype.trim=function(){return String(this).replace(B,"").replace(j,"")}}var F=function(e){if(e==null)throw new TypeError("can't convert "+e+" to object");return Object(e)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,t,n){var r={},i=function(){this.propagationStopped=!0},s=function(){this.defaultPrevented=!0};r._emit=r._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],r=this._defaultHandlers[e];if(!n.length&&!r)return;if(typeof t!="object"||!t)t={};t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=i),t.preventDefault||(t.preventDefault=s),n=n.slice();for(var o=0;o<n.length;o++){n[o](t,this);if(t.propagationStopped)break}if(r&&!t.defaultPrevented)return r(t,this)},r._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(!n)return;n=n.slice();for(var r=0;r<n.length;r++)n[r](t,this)},r.once=function(e,t){var n=this;t&&this.addEventListener(e,function r(){n.removeEventListener(e,r),t.apply(null,arguments)})},r.setDefaultHandler=function(e,t){var n=this._defaultHandlers;n||(n=this._defaultHandlers={_disabled_:{}});if(n[e]){var r=n[e],i=n._disabled_[e];i||(n._disabled_[e]=i=[]),i.push(r);var s=i.indexOf(t);s!=-1&&i.splice(s,1)}n[e]=t},r.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(!n)return;var r=n._disabled_[e];if(n[e]==t){var i=n[e];r&&this.setDefaultHandler(e,r.pop())}else if(r){var s=r.indexOf(t);s!=-1&&r.splice(s,1)}},r.on=r.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[e];return r||(r=this._eventRegistry[e]=[]),r.indexOf(t)==-1&&r[n?"unshift":"push"](t),t},r.off=r.removeListener=r.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(!n)return;var r=n.indexOf(t);r!==-1&&n.splice(r,1)},r.removeAllListeners=function(e){this._eventRegistry&&(this._eventRegistry[e]=[])},t.EventEmitter=r}),ace.define("ace/range",["require","exports","module"],function(e,t,n){var r=function(e,t){return e.row-t.row||e.column-t.column},i=function(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return this.compare(e,t)==0},this.compareRange=function(e){var t,n=e.end,r=e.start;return t=this.compare(n.row,n.column),t==1?(t=this.compare(r.row,r.column),t==1?2:t==0?1:0):t==-1?-2:(t=this.compare(r.row,r.column),t==-1?-1:t==1?42:0)},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return this.comparePoint(e.start)==0&&this.comparePoint(e.end)==0},this.intersects=function(e){var t=this.compareRange(e);return t==-1||t==0||t==1},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){typeof e=="object"?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){typeof e=="object"?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)||this.isStart(e,t)?!1:!0:!1},this.insideStart=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)?!1:!0:!1},this.insideEnd=function(e,t){return this.compare(e,t)==0?this.isStart(e,t)?!1:!0:!1},this.compare=function(e,t){return!this.isMultiLine()&&e===this.start.row?t<this.start.column?-1:t>this.end.column?1:0:e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else if(this.end.row<e)var n={row:e,column:0};if(this.start.row>t)var r={row:t+1,column:0};else if(this.start.row<e)var r={row:e,column:0};return i.fromPoints(r||this.start,n||this.end)},this.extend=function(e,t){var n=this.compare(e,t);if(n==0)return this;if(n==-1)var r={row:e,column:t};else var s={row:e,column:t};return i.fromPoints(r||this.start,s||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return i.fromPoints(this.start,this.end)},this.collapseRows=function(){return this.end.column==0?new i(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new i(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),n=e.documentToScreenPosition(this.end);return new i(t.row,t.column,n.row,n.column)},this.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t}}).call(i.prototype),i.fromPoints=function(e,t){return new i(e.row,e.column,t.row,t.column)},i.comparePoints=r,i.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=i}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=t.Anchor=function(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),typeof n=="undefined"?this.setPosition(t.row,t.column):this.setPosition(t,n)};(function(){r.implement(this,i),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(e){var t=e.data,n=t.range;if(n.start.row==n.end.row&&n.start.row!=this.row)return;if(n.start.row>this.row)return;if(n.start.row==this.row&&n.start.column>this.column)return;var r=this.row,i=this.column,s=n.start,o=n.end;if(t.action==="insertText")if(s.row===r&&s.column<=i){if(s.column!==i||!this.$insertRight)s.row===o.row?i+=o.column-s.column:(i-=s.column,r+=o.row-s.row)}else s.row!==o.row&&s.row<r&&(r+=o.row-s.row);else t.action==="insertLines"?(s.row!==r||i!==0||!this.$insertRight)&&s.row<=r&&(r+=o.row-s.row):t.action==="removeText"?s.row===r&&s.column<i?o.column>=i?i=s.column:i=Math.max(0,i-(o.column-s.column)):s.row!==o.row&&s.row<r?(o.row===r&&(i=Math.max(0,i-o.column)+s.column),r-=o.row-s.row):o.row===r&&(r-=o.row-s.row,i=Math.max(0,i-o.column)+s.column):t.action=="removeLines"&&s.row<=r&&(o.row<=r?r-=o.row-s.row:(r=s.row,i=0));this.setPosition(r,i,!0)},this.setPosition=function(e,t,n){var r;n?r={row:e,column:t}:r=this.$clipPositionToDocument(e,t);if(this.row==r.row&&this.column==r.column)return;var i={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._signal("change",{old:i,value:r})},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(s.prototype)}),ace.define("ace/lib/lang",["require","exports","module"],function(e,t,n){t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){var n="";while(t>0){t&1&&(n+=e);if(t>>=1)e+=e}return n};var r=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(r,"")},t.stringTrimRight=function(e){return e.replace(i,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){var t=[];for(var n=0,r=e.length;n<r;n++)e[n]&&typeof e[n]=="object"?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=function(e){if(typeof e!="object"||!e)return e;var n=e.constructor;if(n===RegExp)return e;var r=n();for(var i in e)typeof e[i]=="object"?r[i]=t.deepCopy(e[i]):r[i]=e[i];return r},t.arrayToMap=function(e){var t={};for(var n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return e.replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,function(e){n.push({offset:arguments[arguments.length-2],length:e.length})}),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},r=function(e){return r.cancel(),t=setTimeout(n,e||0),r};return r.schedule=r,r.call=function(){return this.cancel(),e(),r},r.cancel=function(){return clearTimeout(t),t=null,r},r.isPending=function(){return t},r},t.delayedCall=function(e,t){var n=null,r=function(){n=null,e()},i=function(e){n==null&&(n=setTimeout(r,e||t))};return i.delay=function(e){n&&clearTimeout(n),n=setTimeout(r,e||t)},i.schedule=i,i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){return n},i}}),ace.define("ace/mode/json/json_parse",["require","exports","module"],function(e,t,n){var r,i,s={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"	"},o,u=function(e){throw{name:"SyntaxError",message:e,at:r,text:o}},a=function(e){return e&&e!==i&&u("Expected '"+e+"' instead of '"+i+"'"),i=o.charAt(r),r+=1,i},f=function(){var e,t="";i==="-"&&(t="-",a("-"));while(i>="0"&&i<="9")t+=i,a();if(i==="."){t+=".";while(a()&&i>="0"&&i<="9")t+=i}if(i==="e"||i==="E"){t+=i,a();if(i==="-"||i==="+")t+=i,a();while(i>="0"&&i<="9")t+=i,a()}e=+t;if(!isNaN(e))return e;u("Bad number")},l=function(){var e,t,n="",r;if(i==='"')while(a()){if(i==='"')return a(),n;if(i==="\\"){a();if(i==="u"){r=0;for(t=0;t<4;t+=1){e=parseInt(a(),16);if(!isFinite(e))break;r=r*16+e}n+=String.fromCharCode(r)}else{if(typeof s[i]!="string")break;n+=s[i]}}else n+=i}u("Bad string")},c=function(){while(i&&i<=" ")a()},h=function(){switch(i){case"t":return a("t"),a("r"),a("u"),a("e"),!0;case"f":return a("f"),a("a"),a("l"),a("s"),a("e"),!1;case"n":return a("n"),a("u"),a("l"),a("l"),null}u("Unexpected '"+i+"'")},p,d=function(){var e=[];if(i==="["){a("["),c();if(i==="]")return a("]"),e;while(i){e.push(p()),c();if(i==="]")return a("]"),e;a(","),c()}}u("Bad array")},v=function(){var e,t={};if(i==="{"){a("{"),c();if(i==="}")return a("}"),t;while(i){e=l(),c(),a(":"),Object.hasOwnProperty.call(t,e)&&u('Duplicate key "'+e+'"'),t[e]=p(),c();if(i==="}")return a("}"),t;a(","),c()}}u("Bad object")};return p=function(){c();switch(i){case"{":return v();case"[":return d();case'"':return l();case"-":return f();default:return i>="0"&&i<="9"?f():h()}},function(e,t){var n;return o=e,r=0,i=" ",n=p(),c(),i&&u("Syntax error"),typeof t=="function"?function s(e,n){var r,i,o=e[n];if(o&&typeof o=="object")for(r in o)Object.hasOwnProperty.call(o,r)&&(i=s(o,r),i!==undefined?o[r]=i:delete o[r]);return t.call(e,n,o)}({"":n},""):n}}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,o=e("./anchor").Anchor,u=function(e){this.$lines=[],e.length===0?this.$lines=[""]:Array.isArray(e)?this._insertLines(0,e):this.insert({row:0,column:0},e)};(function(){r.implement(this,i),this.setValue=function(e){var t=this.getLength();this.remove(new s(0,0,t,this.getLine(t-1).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new o(this,e,t)},"aaa".split(/a/).length===0?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){if(this.$newLineMode===e)return;this.$newLineMode=e,this._signal("changeNewLineMode")},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return e=="\r\n"||e=="\r"||e=="\n"},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){if(e.start.row==e.end.row)return this.getLine(e.start.row).substring(e.start.column,e.end.column);var t=this.getLines(e.start.row,e.end.row);t[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;return e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column)),t.join(this.getNewLineCharacter())},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):e.row<0&&(e.row=0),e},this.insert=function(e,t){if(!t||t.length===0)return e;e=this.$clipPosition(e),this.getLength()<=1&&this.$detectNewLine(t);var n=this.$split(t),r=n.splice(0,1)[0],i=n.length==0?null:n.splice(n.length-1,1)[0];return e=this.insertInLine(e,r),i!==null&&(e=this.insertNewLine(e),e=this._insertLines(e.row,n),e=this.insertInLine(e,i||"")),e},this.insertLines=function(e,t){return e>=this.getLength()?this.insert({row:e,column:0},"\n"+t.join("\n")):this._insertLines(Math.max(e,0),t)},this._insertLines=function(e,t){if(t.length==0)return{row:e,column:0};while(t.length>61440){var n=this._insertLines(e,t.slice(0,61440));t=t.slice(61440),e=n.row}var r=[e,0];r.push.apply(r,t),this.$lines.splice.apply(this.$lines,r);var i=new s(e,0,e+t.length,0),o={action:"insertLines",range:i,lines:t};return this._signal("change",{data:o}),i.end},this.insertNewLine=function(e){e=this.$clipPosition(e);var t=this.$lines[e.row]||"";this.$lines[e.row]=t.substring(0,e.column),this.$lines.splice(e.row+1,0,t.substring(e.column,t.length));var n={row:e.row+1,column:0},r={action:"insertText",range:s.fromPoints(e,n),text:this.getNewLineCharacter()};return this._signal("change",{data:r}),n},this.insertInLine=function(e,t){if(t.length==0)return e;var n=this.$lines[e.row]||"";this.$lines[e.row]=n.substring(0,e.column)+t+n.substring(e.column);var r={row:e.row,column:e.column+t.length},i={action:"insertText",range:s.fromPoints(e,r),text:t};return this._signal("change",{data:i}),r},this.remove=function(e){e instanceof s||(e=s.fromPoints(e.start,e.end)),e.start=this.$clipPosition(e.start),e.end=this.$clipPosition(e.end);if(e.isEmpty())return e.start;var t=e.start.row,n=e.end.row;if(e.isMultiLine()){var r=e.start.column==0?t:t+1,i=n-1;e.end.column>0&&this.removeInLine(n,0,e.end.column),i>=r&&this._removeLines(r,i),r!=t&&(this.removeInLine(t,e.start.column,this.getLine(t).length),this.removeNewLine(e.start.row))}else this.removeInLine(t,e.start.column,e.end.column);return e.start},this.removeInLine=function(e,t,n){if(t==n)return;var r=new s(e,t,e,n),i=this.getLine(e),o=i.substring(t,n),u=i.substring(0,t)+i.substring(n,i.length);this.$lines.splice(e,1,u);var a={action:"removeText",range:r,text:o};return this._signal("change",{data:a}),r.start},this.removeLines=function(e,t){return e<0||t>=this.getLength()?this.remove(new s(e,0,t+1,0)):this._removeLines(e,t)},this._removeLines=function(e,t){var n=new s(e,0,t+1,0),r=this.$lines.splice(e,t-e+1),i={action:"removeLines",range:n,nl:this.getNewLineCharacter(),lines:r};return this._signal("change",{data:i}),r},this.removeNewLine=function(e){var t=this.getLine(e),n=this.getLine(e+1),r=new s(e,t.length,e+1,0),i=t+n;this.$lines.splice(e,2,i);var o={action:"removeText",range:r,text:this.getNewLineCharacter()};this._signal("change",{data:o})},this.replace=function(e,t){e instanceof s||(e=s.fromPoints(e.start,e.end));if(t.length==0&&e.isEmpty())return e.start;if(t==this.getTextRange(e))return e.end;this.remove(e);if(t)var n=this.insert(e.start,t);else n=e.start;return n},this.applyDeltas=function(e){for(var t=0;t<e.length;t++){var n=e[t],r=s.fromPoints(n.range.start,n.range.end);n.action=="insertLines"?this.insertLines(r.start.row,n.lines):n.action=="insertText"?this.insert(r.start,n.text):n.action=="removeLines"?this._removeLines(r.start.row,r.end.row-1):n.action=="removeText"&&this.remove(r)}},this.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--){var n=e[t],r=s.fromPoints(n.range.start,n.range.end);n.action=="insertLines"?this._removeLines(r.start.row,r.end.row-1):n.action=="insertText"?this.remove(r):n.action=="removeLines"?this._insertLines(r.start.row,n.lines):n.action=="removeText"&&this.insert(r.start,n.text)}},this.indexToPosition=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length;for(var i=t||0,s=n.length;i<s;i++){e-=n[i].length+r;if(e<0)return{row:i,column:e+n[i].length+r}}return{row:s-1,column:n[s-1].length}},this.positionToIndex=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=0,s=Math.min(e.row,n.length);for(var o=t||0;o<s;++o)i+=n[o].length+r;return i+e.column}}).call(u.prototype),t.Document=u})
\ No newline at end of file
diff --git a/app/assets/lib/ace/worker-lua.js b/app/assets/lib/ace/worker-lua.js
new file mode 100644
index 000000000..590a379c8
--- /dev/null
+++ b/app/assets/lib/ace/worker-lua.js
@@ -0,0 +1 @@
+"no use strict";(function(e){if(typeof e.window!="undefined"&&e.document)return;e.console=function(){var e=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:e})},e.console.error=e.console.warn=e.console.log=e.console.trace=e.console,e.window=e,e.ace=e,e.onerror=function(e,t,n,r,i){console.error("Worker "+(i?i.stack:e))},e.normalizeModule=function(t,n){if(n.indexOf("!")!==-1){var r=n.split("!");return e.normalizeModule(t,r[0])+"!"+e.normalizeModule(t,r[1])}if(n.charAt(0)=="."){var i=t.split("/").slice(0,-1).join("/");n=(i?i+"/":"")+n;while(n.indexOf(".")!==-1&&s!=n){var s=n;n=n.replace(/^\.\//,"").replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return n},e.require=function(t,n){n||(n=t,t=null);if(!n.charAt)throw new Error("worker.js require() accepts only (parentId, id) as arguments");n=e.normalizeModule(t,n);var r=e.require.modules[n];if(r)return r.initialized||(r.initialized=!0,r.exports=r.factory().exports),r.exports;var i=n.split("/");if(!e.require.tlns)return console.log("unable to load "+n);i[0]=e.require.tlns[i[0]]||i[0];var s=i.join("/")+".js";return e.require.id=n,importScripts(s),e.require(t,n)},e.require.modules={},e.require.tlns={},e.define=function(t,n,r){arguments.length==2?(r=n,typeof t!="string"&&(n=t,t=e.require.id)):arguments.length==1&&(r=t,n=[],t=e.require.id),n.length||(n=["require","exports","module"]);if(t.indexOf("text!")===0)return;var i=function(n){return e.require(t,n)};e.require.modules[t]={exports:{},factory:function(){var e=this,t=r.apply(this,n.map(function(t){switch(t){case"require":return i;case"exports":return e.exports;case"module":return e;default:return i(t)}}));return t&&(e.exports=t),e}}},e.define.amd={},e.initBaseUrls=function(e){require.tlns=e},e.initSender=function(){var t=e.require("ace/lib/event_emitter").EventEmitter,n=e.require("ace/lib/oop"),r=function(){};return function(){n.implement(this,t),this.callback=function(e,t){postMessage({type:"call",id:t,data:e})},this.emit=function(e,t){postMessage({type:"event",name:e,data:t})}}.call(r.prototype),new r};var t=e.main=null,n=e.sender=null;e.onmessage=function(r){var i=r.data;if(i.command){if(!t[i.command])throw new Error("Unknown command:"+i.command);t[i.command].apply(t,i.args)}else if(i.init){initBaseUrls(i.tlns),require("ace/lib/es5-shim"),n=e.sender=initSender();var s=require(i.module)[i.classname];t=e.main=new s(n)}else i.event&&n&&n._signal(i.event,i.data)}})(this),ace.define("ace/mode/lua_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/lua/luaparse"],function(e,t,n){var r=e("../lib/oop"),i=e("../worker/mirror").Mirror,s=e("../mode/lua/luaparse"),o=t.Worker=function(e){i.call(this,e),this.setTimeout(500)};r.inherits(o,i),function(){this.onUpdate=function(){var e=this.doc.getValue();try{s.parse(e)}catch(t){t instanceof SyntaxError&&this.sender.emit("error",{row:t.line-1,column:t.column,text:t.message,type:"error"});return}this.sender.emit("ok")}}.call(o.prototype)}),ace.define("ace/lib/oop",["require","exports","module"],function(e,t,n){t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}}),ace.define("ace/worker/mirror",["require","exports","module","ace/document","ace/lib/lang"],function(e,t,n){var r=e("../document").Document,i=e("../lib/lang"),s=t.Mirror=function(e){this.sender=e;var t=this.doc=new r(""),n=this.deferredUpdate=i.delayedCall(this.onUpdate.bind(this)),s=this;e.on("change",function(e){t.applyDeltas(e.data);if(s.$timeout)return n.schedule(s.$timeout);s.onUpdate()})};(function(){this.$timeout=500,this.setTimeout=function(e){this.$timeout=e},this.setValue=function(e){this.doc.setValue(e),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(e){this.sender.callback(this.doc.getValue(),e)},this.onUpdate=function(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(s.prototype)}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(e,t,n){function r(){}function i(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(t){}}function s(e){return e=+e,e!==e?e=0:e!==0&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}function o(e){var t=typeof e;return e===null||t==="undefined"||t==="boolean"||t==="number"||t==="string"}function u(e){var t,n,r;if(o(e))return e;n=e.valueOf;if(typeof n=="function"){t=n.call(e);if(o(t))return t}r=e.toString;if(typeof r=="function"){t=r.call(e);if(o(t))return t}throw new TypeError}Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if(typeof t!="function")throw new TypeError("Function.prototype.bind called on incompatible "+t);var n=c.call(arguments,1),i=function(){if(this instanceof i){var r=t.apply(this,n.concat(c.call(arguments)));return Object(r)===r?r:this}return t.apply(e,n.concat(c.call(arguments)))};return t.prototype&&(r.prototype=t.prototype,i.prototype=new r,r.prototype=null),i});var a=Function.prototype.call,f=Array.prototype,l=Object.prototype,c=f.slice,h=a.bind(l.toString),p=a.bind(l.hasOwnProperty),d,v,m,g,y;if(y=p(l,"__defineGetter__"))d=a.bind(l.__defineGetter__),v=a.bind(l.__defineSetter__),m=a.bind(l.__lookupGetter__),g=a.bind(l.__lookupSetter__);if([1,2].splice(0).length!=2)if(!function(){function e(e){var t=new Array(e+2);return t[0]=t[1]=0,t}var t=[],n;t.splice.apply(t,e(20)),t.splice.apply(t,e(26)),n=t.length,t.splice(5,0,"XXX"),n+1==t.length;if(n+1==t.length)return!0}())Array.prototype.splice=function(e,t){var n=this.length;e>0?e>n&&(e=n):e==void 0?e=0:e<0&&(e=Math.max(n+e,0)),e+t<n||(t=n-e);var r=this.slice(e,e+t),i=c.call(arguments,2),s=i.length;if(e===n)s&&this.push.apply(this,i);else{var o=Math.min(t,n-e),u=e+o,a=u+s-o,f=n-u,l=n-o;if(a<u)for(var h=0;h<f;++h)this[a+h]=this[u+h];else if(a>u)for(h=f;h--;)this[a+h]=this[u+h];if(s&&e===l)this.length=l,this.push.apply(this,i);else{this.length=l+s;for(h=0;h<s;++h)this[e+h]=i[h]}}return r};else{var b=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?b.apply(this,[e===void 0?0:e,t===void 0?this.length-e:t].concat(c.call(arguments,2))):[]}}Array.isArray||(Array.isArray=function(e){return h(e)=="[object Array]"});var w=Object("a"),E=w[0]!="a"||!(0 in w);Array.prototype.forEach||(Array.prototype.forEach=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=arguments[1],i=-1,s=n.length>>>0;if(h(e)!="[object Function]")throw new TypeError;while(++i<s)i in n&&e.call(r,n[i],i,t)}),Array.prototype.map||(Array.prototype.map=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=Array(r),s=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var o=0;o<r;o++)o in n&&(i[o]=e.call(s,n[o],o,t));return i}),Array.prototype.filter||(Array.prototype.filter=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=[],s,o=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var u=0;u<r;u++)u in n&&(s=n[u],e.call(o,s,u,t)&&i.push(s));return i}),Array.prototype.every||(Array.prototype.every=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var s=0;s<r;s++)if(s in n&&!e.call(i,n[s],s,t))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var s=0;s<r;s++)if(s in n&&e.call(i,n[s],s,t))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0;if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");if(!r&&arguments.length==1)throw new TypeError("reduce of empty array with no initial value");var i=0,s;if(arguments.length>=2)s=arguments[1];else do{if(i in n){s=n[i++];break}if(++i>=r)throw new TypeError("reduce of empty array with no initial value")}while(!0);for(;i<r;i++)i in n&&(s=e.call(void 0,s,n[i],i,t));return s}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0;if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");if(!r&&arguments.length==1)throw new TypeError("reduceRight of empty array with no initial value");var i,s=r-1;if(arguments.length>=2)i=arguments[1];else do{if(s in n){i=n[s--];break}if(--s<0)throw new TypeError("reduceRight of empty array with no initial value")}while(!0);do s in this&&(i=e.call(void 0,i,n[s],s,t));while(s--);return i});if(!Array.prototype.indexOf||[0,1].indexOf(1,2)!=-1)Array.prototype.indexOf=function(e){var t=E&&h(this)=="[object String]"?this.split(""):F(this),n=t.length>>>0;if(!n)return-1;var r=0;arguments.length>1&&(r=s(arguments[1])),r=r>=0?r:Math.max(0,n+r);for(;r<n;r++)if(r in t&&t[r]===e)return r;return-1};if(!Array.prototype.lastIndexOf||[0,1].lastIndexOf(0,-3)!=-1)Array.prototype.lastIndexOf=function(e){var t=E&&h(this)=="[object String]"?this.split(""):F(this),n=t.length>>>0;if(!n)return-1;var r=n-1;arguments.length>1&&(r=Math.min(r,s(arguments[1]))),r=r>=0?r:n-Math.abs(r);for(;r>=0;r--)if(r in t&&e===t[r])return r;return-1};Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__||(e.constructor?e.constructor.prototype:l)});if(!Object.getOwnPropertyDescriptor){var S="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(e,t){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError(S+e);if(!p(e,t))return;var n,r,i;n={enumerable:!0,configurable:!0};if(y){var s=e.__proto__;e.__proto__=l;var r=m(e,t),i=g(e,t);e.__proto__=s;if(r||i)return r&&(n.get=r),i&&(n.set=i),n}return n.value=e[t],n}}Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){return Object.keys(e)});if(!Object.create){var x;Object.prototype.__proto__===null?x=function(){return{__proto__:null}}:x=function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(e,t){var n;if(e===null)n=x();else{if(typeof e!="object")throw new TypeError("typeof prototype["+typeof e+"] != 'object'");var r=function(){};r.prototype=e,n=new r,n.__proto__=e}return t!==void 0&&Object.defineProperties(n,t),n}}if(Object.defineProperty){var T=i({}),N=typeof document=="undefined"||i(document.createElement("div"));if(!T||!N)var C=Object.defineProperty}if(!Object.defineProperty||C){var k="Property description must be an object: ",L="Object.defineProperty called on non-object: ",A="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(e,t,n){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError(L+e);if(typeof n!="object"&&typeof n!="function"||n===null)throw new TypeError(k+n);if(C)try{return C.call(Object,e,t,n)}catch(r){}if(p(n,"value"))if(y&&(m(e,t)||g(e,t))){var i=e.__proto__;e.__proto__=l,delete e[t],e[t]=n.value,e.__proto__=i}else e[t]=n.value;else{if(!y)throw new TypeError(A);p(n,"get")&&d(e,t,n.get),p(n,"set")&&v(e,t,n.set)}return e}}Object.defineProperties||(Object.defineProperties=function(e,t){for(var n in t)p(t,n)&&Object.defineProperty(e,n,t[n]);return e}),Object.seal||(Object.seal=function(e){return e}),Object.freeze||(Object.freeze=function(e){return e});try{Object.freeze(function(){})}catch(O){Object.freeze=function(e){return function(t){return typeof t=="function"?t:e(t)}}(Object.freeze)}Object.preventExtensions||(Object.preventExtensions=function(e){return e}),Object.isSealed||(Object.isSealed=function(e){return!1}),Object.isFrozen||(Object.isFrozen=function(e){return!1}),Object.isExtensible||(Object.isExtensible=function(e){if(Object(e)===e)throw new TypeError;var t="";while(p(e,t))t+="?";e[t]=!0;var n=p(e,t);return delete e[t],n});if(!Object.keys){var M=!0,_=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],D=_.length;for(var P in{toString:null})M=!1;Object.keys=function I(e){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError("Object.keys called on a non-object");var I=[];for(var t in e)p(e,t)&&I.push(t);if(M)for(var n=0,r=D;n<r;n++){var i=_[n];p(e,i)&&I.push(i)}return I}}Date.now||(Date.now=function(){return(new Date).getTime()});var H="	\n\f\r   ᠎              \u2028\u2029";if(!String.prototype.trim||H.trim()){H="["+H+"]";var B=new RegExp("^"+H+H+"*"),j=new RegExp(H+H+"*$");String.prototype.trim=function(){return String(this).replace(B,"").replace(j,"")}}var F=function(e){if(e==null)throw new TypeError("can't convert "+e+" to object");return Object(e)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,t,n){var r={},i=function(){this.propagationStopped=!0},s=function(){this.defaultPrevented=!0};r._emit=r._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],r=this._defaultHandlers[e];if(!n.length&&!r)return;if(typeof t!="object"||!t)t={};t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=i),t.preventDefault||(t.preventDefault=s),n=n.slice();for(var o=0;o<n.length;o++){n[o](t,this);if(t.propagationStopped)break}if(r&&!t.defaultPrevented)return r(t,this)},r._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(!n)return;n=n.slice();for(var r=0;r<n.length;r++)n[r](t,this)},r.once=function(e,t){var n=this;t&&this.addEventListener(e,function r(){n.removeEventListener(e,r),t.apply(null,arguments)})},r.setDefaultHandler=function(e,t){var n=this._defaultHandlers;n||(n=this._defaultHandlers={_disabled_:{}});if(n[e]){var r=n[e],i=n._disabled_[e];i||(n._disabled_[e]=i=[]),i.push(r);var s=i.indexOf(t);s!=-1&&i.splice(s,1)}n[e]=t},r.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(!n)return;var r=n._disabled_[e];if(n[e]==t){var i=n[e];r&&this.setDefaultHandler(e,r.pop())}else if(r){var s=r.indexOf(t);s!=-1&&r.splice(s,1)}},r.on=r.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[e];return r||(r=this._eventRegistry[e]=[]),r.indexOf(t)==-1&&r[n?"unshift":"push"](t),t},r.off=r.removeListener=r.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(!n)return;var r=n.indexOf(t);r!==-1&&n.splice(r,1)},r.removeAllListeners=function(e){this._eventRegistry&&(this._eventRegistry[e]=[])},t.EventEmitter=r}),ace.define("ace/range",["require","exports","module"],function(e,t,n){var r=function(e,t){return e.row-t.row||e.column-t.column},i=function(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return this.compare(e,t)==0},this.compareRange=function(e){var t,n=e.end,r=e.start;return t=this.compare(n.row,n.column),t==1?(t=this.compare(r.row,r.column),t==1?2:t==0?1:0):t==-1?-2:(t=this.compare(r.row,r.column),t==-1?-1:t==1?42:0)},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return this.comparePoint(e.start)==0&&this.comparePoint(e.end)==0},this.intersects=function(e){var t=this.compareRange(e);return t==-1||t==0||t==1},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){typeof e=="object"?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){typeof e=="object"?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)||this.isStart(e,t)?!1:!0:!1},this.insideStart=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)?!1:!0:!1},this.insideEnd=function(e,t){return this.compare(e,t)==0?this.isStart(e,t)?!1:!0:!1},this.compare=function(e,t){return!this.isMultiLine()&&e===this.start.row?t<this.start.column?-1:t>this.end.column?1:0:e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else if(this.end.row<e)var n={row:e,column:0};if(this.start.row>t)var r={row:t+1,column:0};else if(this.start.row<e)var r={row:e,column:0};return i.fromPoints(r||this.start,n||this.end)},this.extend=function(e,t){var n=this.compare(e,t);if(n==0)return this;if(n==-1)var r={row:e,column:t};else var s={row:e,column:t};return i.fromPoints(r||this.start,s||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return i.fromPoints(this.start,this.end)},this.collapseRows=function(){return this.end.column==0?new i(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new i(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),n=e.documentToScreenPosition(this.end);return new i(t.row,t.column,n.row,n.column)},this.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t}}).call(i.prototype),i.fromPoints=function(e,t){return new i(e.row,e.column,t.row,t.column)},i.comparePoints=r,i.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=i}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=t.Anchor=function(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),typeof n=="undefined"?this.setPosition(t.row,t.column):this.setPosition(t,n)};(function(){r.implement(this,i),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(e){var t=e.data,n=t.range;if(n.start.row==n.end.row&&n.start.row!=this.row)return;if(n.start.row>this.row)return;if(n.start.row==this.row&&n.start.column>this.column)return;var r=this.row,i=this.column,s=n.start,o=n.end;if(t.action==="insertText")if(s.row===r&&s.column<=i){if(s.column!==i||!this.$insertRight)s.row===o.row?i+=o.column-s.column:(i-=s.column,r+=o.row-s.row)}else s.row!==o.row&&s.row<r&&(r+=o.row-s.row);else t.action==="insertLines"?(s.row!==r||i!==0||!this.$insertRight)&&s.row<=r&&(r+=o.row-s.row):t.action==="removeText"?s.row===r&&s.column<i?o.column>=i?i=s.column:i=Math.max(0,i-(o.column-s.column)):s.row!==o.row&&s.row<r?(o.row===r&&(i=Math.max(0,i-o.column)+s.column),r-=o.row-s.row):o.row===r&&(r-=o.row-s.row,i=Math.max(0,i-o.column)+s.column):t.action=="removeLines"&&s.row<=r&&(o.row<=r?r-=o.row-s.row:(r=s.row,i=0));this.setPosition(r,i,!0)},this.setPosition=function(e,t,n){var r;n?r={row:e,column:t}:r=this.$clipPositionToDocument(e,t);if(this.row==r.row&&this.column==r.column)return;var i={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._signal("change",{old:i,value:r})},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(s.prototype)}),ace.define("ace/lib/lang",["require","exports","module"],function(e,t,n){t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){var n="";while(t>0){t&1&&(n+=e);if(t>>=1)e+=e}return n};var r=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(r,"")},t.stringTrimRight=function(e){return e.replace(i,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){var t=[];for(var n=0,r=e.length;n<r;n++)e[n]&&typeof e[n]=="object"?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=function(e){if(typeof e!="object"||!e)return e;var n=e.constructor;if(n===RegExp)return e;var r=n();for(var i in e)typeof e[i]=="object"?r[i]=t.deepCopy(e[i]):r[i]=e[i];return r},t.arrayToMap=function(e){var t={};for(var n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return e.replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,function(e){n.push({offset:arguments[arguments.length-2],length:e.length})}),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},r=function(e){return r.cancel(),t=setTimeout(n,e||0),r};return r.schedule=r,r.call=function(){return this.cancel(),e(),r},r.cancel=function(){return clearTimeout(t),t=null,r},r.isPending=function(){return t},r},t.delayedCall=function(e,t){var n=null,r=function(){n=null,e()},i=function(e){n==null&&(n=setTimeout(r,e||t))};return i.delay=function(e){n&&clearTimeout(n),n=setTimeout(r,e||t)},i.schedule=i,i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){return n},i}}),ace.define("ace/mode/lua/luaparse",["require","exports","module"],function(e,t,n){(function(e,n,r){r(t)})(this,"luaparse",function(e){function t(e){if(Jt){var t=$t.pop();t.complete(),bt.locations&&(e.loc=t.loc),bt.ranges&&(e.range=t.range)}return e}function n(e,t,n){for(var r=0,i=e.length;r<i;r++)if(e[r][t]===n)return r;return-1}function r(e){var t=Dt.call(arguments,1);return e=e.replace(/%(\d)/g,function(e,n){return""+t[n-1]||""}),e}function i(){var e=Dt.call(arguments),t={},n,r;for(var i=0,s=e.length;i<s;i++){n=e[i];for(r in n)n.hasOwnProperty(r)&&(t[r]=n[r])}return t}function s(e){var t=r.apply(null,Dt.call(arguments,1)),n,i;throw"undefined"!=typeof e.line?(i=e.range[0]-e.lineStart,n=new SyntaxError(r("[%1:%2] %3",e.line,i,t)),n.line=e.line,n.index=e.range[0],n.column=i):(i=Bt-zt+1,n=new SyntaxError(r("[%1:%2] %3",Ut,i,t)),n.index=Bt,n.line=Ut,n.column=i),n}function o(e,t){s(t,Mt.expectedToken,e,t.value)}function u(e,t){"undefined"==typeof t&&(t=It.value);if("undefined"!=typeof e.type){var n;switch(e.type){case xt:n="string";break;case Tt:n="keyword";break;case Nt:n="identifier";break;case Ct:n="number";break;case kt:n="symbol";break;case Lt:n="boolean";break;case At:return s(e,Mt.unexpected,"symbol","nil",t)}return s(e,Mt.unexpected,n,e.value,t)}return s(e,Mt.unexpected,"symbol",e,t)}function a(){f();while(45===yt.charCodeAt(Bt)&&45===yt.charCodeAt(Bt+1))b(),f();if(Bt>=wt)return{type:St,value:"<eof>",line:Ut,lineStart:zt,range:[Bt,Bt]};var e=yt.charCodeAt(Bt),t=yt.charCodeAt(Bt+1);Rt=Bt;if(L(e))return l();switch(e){case 39:case 34:return p();case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return v();case 46:if(C(t))return v();if(46===t)return 46===yt.charCodeAt(Bt+2)?h():c("..");return c(".");case 61:if(61===t)return c("==");return c("=");case 62:if(61===t)return c(">=");return c(">");case 60:if(61===t)return c("<=");return c("<");case 126:if(61===t)return c("~=");return s({},Mt.expected,"=","~");case 58:if(58===t)return c("::");return c(":");case 91:if(91===t||61===t)return d();return c("[");case 42:case 47:case 94:case 37:case 44:case 123:case 125:case 93:case 40:case 41:case 59:case 35:case 45:case 43:return c(yt.charAt(Bt))}return u(yt.charAt(Bt))}function f(){while(Bt<wt){var e=yt.charCodeAt(Bt);if(T(e))Bt++;else{if(!N(e))break;Ut++,zt=++Bt}}}function l(){var e,t;while(A(yt.charCodeAt(++Bt)));return e=yt.slice(Rt,Bt),O(e)?t=Tt:"true"===e||"false"===e?(t=Lt,e="true"===e):"nil"===e?(t=At,e=null):t=Nt,{type:t,value:e,line:Ut,lineStart:zt,range:[Rt,Bt]}}function c(e){return Bt+=e.length,{type:kt,value:e,line:Ut,lineStart:zt,range:[Rt,Bt]}}function h(){return Bt+=3,{type:Ot,value:"...",line:Ut,lineStart:zt,range:[Rt,Bt]}}function p(){var e=yt.charCodeAt(Bt++),t=Bt,n="",r;while(Bt<wt){r=yt.charCodeAt(Bt++);if(e===r)break;if(92===r)n+=yt.slice(t,Bt-1)+y(),t=Bt;else if(Bt>=wt||N(r))n+=yt.slice(t,Bt-1),s({},Mt.unfinishedString,n+String.fromCharCode(r))}return n+=yt.slice(t,Bt-1),{type:xt,value:n,line:Ut,lineStart:zt,range:[Rt,Bt]}}function d(){var e=w();return!1===e&&s(jt,Mt.expected,"[",jt.value),{type:xt,value:e,line:Ut,lineStart:zt,range:[Rt,Bt]}}function v(){var e=yt.charAt(Bt),t=yt.charAt(Bt+1),n="0"===e&&"xX".indexOf(t||null)>=0?m():g();return{type:Ct,value:n,line:Ut,lineStart:zt,range:[Rt,Bt]}}function m(){var e=0,t=1,n=1,r,i,o,u;u=Bt+=2,k(yt.charCodeAt(Bt))||s({},Mt.malformedNumber,yt.slice(Rt,Bt));while(k(yt.charCodeAt(Bt)))Bt++;r=parseInt(yt.slice(u,Bt),16);if("."===yt.charAt(Bt)){i=++Bt;while(k(yt.charCodeAt(Bt)))Bt++;e=yt.slice(i,Bt),e=i===Bt?0:parseInt(e,16)/Math.pow(16,Bt-i)}if("pP".indexOf(yt.charAt(Bt)||null)>=0){Bt++,"+-".indexOf(yt.charAt(Bt)||null)>=0&&(n="+"===yt.charAt(Bt++)?1:-1),o=Bt,C(yt.charCodeAt(Bt))||s({},Mt.malformedNumber,yt.slice(Rt,Bt));while(C(yt.charCodeAt(Bt)))Bt++;t=yt.slice(o,Bt),t=Math.pow(2,t*n)}return(r+e)*t}function g(){while(C(yt.charCodeAt(Bt)))Bt++;if("."===yt.charAt(Bt)){Bt++;while(C(yt.charCodeAt(Bt)))Bt++}if("eE".indexOf(yt.charAt(Bt)||null)>=0){Bt++,"+-".indexOf(yt.charAt(Bt)||null)>=0&&Bt++,C(yt.charCodeAt(Bt))||s({},Mt.malformedNumber,yt.slice(Rt,Bt));while(C(yt.charCodeAt(Bt)))Bt++}return parseFloat(yt.slice(Rt,Bt))}function y(){var e=Bt;switch(yt.charAt(Bt)){case"n":return Bt++,"\n";case"r":return Bt++,"\r";case"t":return Bt++,"	";case"v":return Bt++,"";case"b":return Bt++,"\b";case"f":return Bt++,"\f";case"z":return Bt++,f(),"";case"x":if(k(yt.charCodeAt(Bt+1))&&k(yt.charCodeAt(Bt+2)))return Bt+=3,"\\"+yt.slice(e,Bt);return"\\"+yt.charAt(Bt++);default:if(C(yt.charCodeAt(Bt))){while(C(yt.charCodeAt(++Bt)));return"\\"+yt.slice(e,Bt)}return yt.charAt(Bt++)}}function b(){Rt=Bt,Bt+=2;var e=yt.charAt(Bt),t="",n=!1,r=Bt,i=zt,s=Ut;"["===e&&(t=w(),!1===t?t=e:n=!0);if(!n){while(Bt<wt){if(N(yt.charCodeAt(Bt)))break;Bt++}bt.comments&&(t=yt.slice(r,Bt))}if(bt.comments){var o=_t.comment(t,yt.slice(Rt,Bt));bt.locations&&(o.loc={start:{line:s,column:Rt-i},end:{line:Ut,column:Bt-zt}}),bt.ranges&&(o.range=[Rt,Bt]),qt.push(o)}}function w(){var e=0,t="",n=!1,r,i;Bt++;while("="===yt.charAt(Bt+e))e++;if("["!==yt.charAt(Bt+e))return!1;Bt+=e+1,N(yt.charCodeAt(Bt))&&(Ut++,zt=Bt++),i=Bt;while(Bt<wt){r=yt.charAt(Bt++),N(r.charCodeAt(0))&&(Ut++,zt=Bt);if("]"===r){n=!0;for(var s=0;s<e;s++)"="!==yt.charAt(Bt+s)&&(n=!1);"]"!==yt.charAt(Bt+e)&&(n=!1)}if(n)break}return t+=yt.slice(i,Bt-1),Bt+=e+1,t}function E(){Ft=jt,jt=It,It=a()}function S(e){return e===jt.value?(E(),!0):!1}function x(e){e===jt.value?E():s(jt,Mt.expected,e,jt.value)}function T(e){return 9===e||32===e||11===e||12===e}function N(e){return 10===e||13===e}function C(e){return e>=48&&e<=57}function k(e){return e>=48&&e<=57||e>=97&&e<=102||e>=65&&e<=70}function L(e){return e>=65&&e<=90||e>=97&&e<=122||95===e}function A(e){return e>=65&&e<=90||e>=97&&e<=122||95===e||e>=48&&e<=57}function O(e){switch(e.length){case 2:return"do"===e||"if"===e||"in"===e||"or"===e;case 3:return"and"===e||"end"===e||"for"===e||"not"===e;case 4:return"else"===e||"goto"===e||"then"===e;case 5:return"break"===e||"local"===e||"until"===e||"while"===e;case 6:return"elseif"===e||"repeat"===e||"return"===e;case 8:return"function"===e}return!1}function M(e){return kt===e.type?"#-".indexOf(e.value)>=0:Tt===e.type?"not"===e.value:!1}function _(e){switch(e.type){case"CallExpression":case"TableCallExpression":case"StringCallExpression":return!0}return!1}function D(e){if(St===e.type)return!0;if(Tt!==e.type)return!1;switch(e.value){case"else":case"elseif":case"end":case"until":return!0;default:return!1}}function P(){Wt.push(Array.apply(null,Wt[Xt++]))}function H(){Wt.pop(),Xt--}function B(e){if(-1!==Ht(Wt[Xt],e))return;Wt[Xt].push(e)}function j(e){B(e.name),F(e,!0)}function F(e,t){!t&&-1===n(Vt,"name",e.name)&&Vt.push(e),e.isLocal=t}function I(e){return-1!==Ht(Wt[Xt],e)}function q(){return new R(jt)}function R(e){bt.locations&&(this.loc={start:{line:e.line,column:e.range[0]-e.lineStart},end:{line:0,column:0}}),bt.ranges&&(this.range=[e.range[0],0])}function U(){Jt&&$t.push(q())}function z(e){Jt&&$t.push(e)}function W(){E(),U();var e=X();return St!==jt.type&&u(jt),Jt&&!e.length&&(Ft=jt),t(_t.chunk(e))}function X(e){var t=[],n;bt.scope&&P();while(!D(jt)){if("return"===jt.value){t.push(V());break}n=V(),n&&t.push(n)}return bt.scope&&H(),t}function V(){U();if(Tt===jt.type)switch(jt.value){case"local":return E(),nt();case"if":return E(),et();case"return":return E(),Z();case"function":E();var e=ot();return st(e);case"while":return E(),G();case"for":return E(),tt();case"repeat":return E(),Y();case"break":return E(),J();case"do":return E(),Q();case"goto":return E(),K()}if(kt===jt.type&&S("::"))return $();Jt&&$t.pop();if(S(";"))return;return rt()}function $(){var e=jt.value,n=it();return bt.scope&&(B("::"+e+"::"),F(n,!0)),x("::"),t(_t.labelStatement(n))}function J(){return t(_t.breakStatement())}function K(){var e=jt.value,n=it();return bt.scope&&(n.isLabel=I("::"+e+"::")),t(_t.gotoStatement(n))}function Q(){var e=X();return x("end"),t(_t.doStatement(e))}function G(){var e=ft();x("do");var n=X();return x("end"),t(_t.whileStatement(e,n))}function Y(){var e=X();x("until");var n=ft();return t(_t.repeatStatement(n,e))}function Z(){var e=[];if("end"!==jt.value){var n=at();null!=n&&e.push(n);while(S(","))n=ft(),e.push(n);S(";")}return t(_t.returnStatement(e))}function et(){var e=[],n,r,i;Jt&&(i=$t[$t.length-1],$t.push(i)),n=ft(),x("then"),r=X(),e.push(t(_t.ifClause(n,r))),Jt&&(i=q());while(S("elseif"))z(i),n=ft(),x("then"),r=X(),e.push(t(_t.elseifClause(n,r))),Jt&&(i=q());return S("else")&&(Jt&&(i=new R(Ft),$t.push(i)),r=X(),e.push(t(_t.elseClause(r)))),x("end"),t(_t.ifStatement(e))}function tt(){var e=it(),n;bt.scope&&j(e);if(S("=")){var r=ft();x(",");var i=ft(),s=S(",")?ft():null;return x("do"),n=X(),x("end"),t(_t.forNumericStatement(e,r,i,s,n))}var o=[e];while(S(","))e=it(),bt.scope&&j(e),o.push(e);x("in");var u=[];do{var a=ft();u.push(a)}while(S(","));return x("do"),n=X(),x("end"),t(_t.forGenericStatement(o,u,n))}function nt(){var e;if(Nt===jt.type){var n=[],r=[];do e=it(),n.push(e);while(S(","));if(S("="))do{var i=ft();r.push(i)}while(S(","));if(bt.scope)for(var s=0,u=n.length;s<u;s++)j(n[s]);return t(_t.localStatement(n,r))}if(S("function"))return e=it(),bt.scope&&j(e),st(e,!0);o("<name>",jt)}function rt(){var e=jt,n,r;Jt&&(r=q()),n=ht();if(null==n)return u(jt);if(",=".indexOf(jt.value)>=0){var i=[n],s=[],a;while(S(","))a=ht(),null==a&&o("<expression>",jt),i.push(a);x("=");do a=ft(),s.push(a);while(S(","));return z(r),t(_t.assignmentStatement(i,s))}return _(n)?(z(r),t(_t.callStatement(n))):u(e)}function it(){U();var e=jt.value;return Nt!==jt.type&&o("<name>",jt),E(),t(_t.identifier(e))}function st(e,n){var r=[];x("(");if(!S(")"))for(;;)if(Nt===jt.type){var i=it();bt.scope&&j(i),r.push(i);if(S(","))continue;if(S(")"))break}else{if(Ot===jt.type){r.push(dt()),x(")");break}o("<name> or '...'",jt)}var s=X();return x("end"),n=n||!1,t(_t.functionStatement(e,r,n,s))}function ot(){var e,n,r;Jt&&(r=q()),e=it(),bt.scope&&F(e,!1);while(S("."))z(r),n=it(),bt.scope&&F(n,!1),e=t(_t.memberExpression(e,".",n));return S(":")&&(z(r),n=it(),bt.scope&&F(n,!1),e=t(_t.memberExpression(e,":",n))),e}function ut(){var e=[],n,r;for(;;){U();if(kt===jt.type&&S("["))n=ft(),x("]"),x("="),r=ft(),e.push(t(_t.tableKey(n,r)));else if(Nt===jt.type)n=ft(),S("=")?(r=ft(),e.push(t(_t.tableKeyString(n,r)))):e.push(t(_t.tableValue(n)));else{if(null==(r=at())){$t.pop();break}e.push(t(_t.tableValue(r)))}if(",;".indexOf(jt.value)>=0){E();continue}if("}"===jt.value)break}return x("}"),t(_t.tableConstructorExpression(e))}function at(){var e=ct(0);return e}function ft(){var e=at();if(null!=e)return e;o("<expression>",jt)}function lt(e){var t=e.charCodeAt(0),n=e.length;if(1===n)switch(t){case 94:return 10;case 42:case 47:case 37:return 7;case 43:case 45:return 6;case 60:case 62:return 3}else if(2===n)switch(t){case 46:return 5;case 60:case 62:case 61:case 126:return 3;case 111:return 1}else if(97===t&&"and"===e)return 2;return 0}function ct(e){var n=jt.value,r,i;Jt&&(i=q());if(M(jt)){U(),E();var s=ct(8);s==null&&o("<expression>",jt),r=t(_t.unaryExpression(n,s))}null==r&&(r=dt(),null==r&&(r=ht()));if(null==r)return null;var u;for(;;){n=jt.value,u=kt===jt.type||Tt===jt.type?lt(n):0;if(u===0||u<=e)break;("^"===n||".."===n)&&u--,E();var a=ct(u);null==a&&o("<expression>",jt),Jt&&$t.push(i),r=t(_t.binaryExpression(n,r,a))}return r}function ht(){var e,n,r,i;Jt&&(r=q());if(Nt===jt.type)n=jt.value,e=it(),bt.scope&&F(e,i=I(n));else{if(!S("("))return null;e=ft(),x(")"),bt.scope&&(i=e.isLocal)}var s,o;for(;;)if(kt===jt.type)switch(jt.value){case"[":z(r),E(),s=ft(),e=t(_t.indexExpression(e,s)),x("]");break;case".":z(r),E(),o=it(),bt.scope&&F(o,i),e=t(_t.memberExpression(e,".",o));break;case":":z(r),E(),o=it(),bt.scope&&F(o,i),e=t(_t.memberExpression(e,":",o)),z(r),e=pt(e);break;case"(":case"{":z(r),e=pt(e);break;default:return e}else{if(xt!==jt.type)break;z(r),e=pt(e)}return e}function pt(e){if(kt===jt.type)switch(jt.value){case"(":E();var n=[],r=at();null!=r&&n.push(r);while(S(","))r=ft(),n.push(r);return x(")"),t(_t.callExpression(e,n));case"{":U(),E();var i=ut();return t(_t.tableCallExpression(e,i))}else if(xt===jt.type)return t(_t.stringCallExpression(e,dt()));o("function arguments",jt)}function dt(){var e=xt|Ct|Lt|At|Ot,n=jt.value,r=jt.type,i;Jt&&(i=q());if(r&e){z(i);var s=yt.slice(jt.range[0],jt.range[1]);return E(),t(_t.literal(r,n,s))}if(Tt===r&&"function"===n)return z(i),E(),st(null);if(S("{"))return z(i),ut()}function vt(t,n){return"undefined"==typeof n&&"object"==typeof t&&(n=t,t=undefined),n||(n={}),yt=t||"",bt=i(Et,n),Bt=0,Ut=1,zt=0,wt=yt.length,Wt=[[]],Xt=0,Vt=[],$t=[],bt.comments&&(qt=[]),bt.wait?e:gt()}function mt(t){return yt+=String(t),wt=yt.length,e}function gt(e){"undefined"!=typeof e&&mt(e),wt=yt.length,Jt=bt.locations||bt.ranges,It=a();var t=W();bt.comments&&(t.comments=qt),bt.scope&&(t.globals=Vt);if($t.length>0)throw new Error("Location tracking failed. This is most likely a bug in luaparse");return t}e.version="0.1.4";var yt,bt,wt,Et=e.defaultOptions={wait:!1,comments:!0,scope:!1,locations:!1,ranges:!1},St=1,xt=2,Tt=4,Nt=8,Ct=16,kt=32,Lt=64,At=128,Ot=256;e.tokenTypes={EOF:St,StringLiteral:xt,Keyword:Tt,Identifier:Nt,NumericLiteral:Ct,Punctuator:kt,BooleanLiteral:Lt,NilLiteral:At,VarargLiteral:Ot};var Mt=e.errors={unexpected:"Unexpected %1 '%2' near '%3'",expected:"'%1' expected near '%2'",expectedToken:"%1 expected near '%2'",unfinishedString:"unfinished string near '%1'",malformedNumber:"malformed number near '%1'"},_t=e.ast={labelStatement:function(e){return{type:"LabelStatement",label:e}},breakStatement:function(){return{type:"BreakStatement"}},gotoStatement:function(e){return{type:"GotoStatement",label:e}},returnStatement:function(e){return{type:"ReturnStatement",arguments:e}},ifStatement:function(e){return{type:"IfStatement",clauses:e}},ifClause:function(e,t){return{type:"IfClause",condition:e,body:t}},elseifClause:function(e,t){return{type:"ElseifClause",condition:e,body:t}},elseClause:function(e){return{type:"ElseClause",body:e}},whileStatement:function(e,t){return{type:"WhileStatement",condition:e,body:t}},doStatement:function(e){return{type:"DoStatement",body:e}},repeatStatement:function(e,t){return{type:"RepeatStatement",condition:e,body:t}},localStatement:function(e,t){return{type:"LocalStatement",variables:e,init:t}},assignmentStatement:function(e,t){return{type:"AssignmentStatement",variables:e,init:t}},callStatement:function(e){return{type:"CallStatement",expression:e}},functionStatement:function(e,t,n,r){return{type:"FunctionDeclaration",identifier:e,isLocal:n,parameters:t,body:r}},forNumericStatement:function(e,t,n,r,i){return{type:"ForNumericStatement",variable:e,start:t,end:n,step:r,body:i}},forGenericStatement:function(e,t,n){return{type:"ForGenericStatement",variables:e,iterators:t,body:n}},chunk:function(e){return{type:"Chunk",body:e}},identifier:function(e){return{type:"Identifier",name:e}},literal:function(e,t,n){return e=e===xt?"StringLiteral":e===Ct?"NumericLiteral":e===Lt?"BooleanLiteral":e===At?"NilLiteral":"VarargLiteral",{type:e,value:t,raw:n}},tableKey:function(e,t){return{type:"TableKey",key:e,value:t}},tableKeyString:function(e,t){return{type:"TableKeyString",key:e,value:t}},tableValue:function(e){return{type:"TableValue",value:e}},tableConstructorExpression:function(e){return{type:"TableConstructorExpression",fields:e}},binaryExpression:function(e,t,n){var r="and"===e||"or"===e?"LogicalExpression":"BinaryExpression";return{type:r,operator:e,left:t,right:n}},unaryExpression:function(e,t){return{type:"UnaryExpression",operator:e,argument:t}},memberExpression:function(e,t,n){return{type:"MemberExpression",indexer:t,identifier:n,base:e}},indexExpression:function(e,t){return{type:"IndexExpression",base:e,index:t}},callExpression:function(e,t){return{type:"CallExpression",base:e,arguments:t}},tableCallExpression:function(e,t){return{type:"TableCallExpression",base:e,arguments:t}},stringCallExpression:function(e,t){return{type:"StringCallExpression",base:e,argument:t}},comment:function(e,t){return{type:"Comment",value:e,raw:t}}},Dt=Array.prototype.slice,Pt=Object.prototype.toString,Ht=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},Bt,jt,Ft,It,qt,Rt,Ut,zt;e.lex=a;var Wt,Xt,Vt,$t=[],Jt;R.prototype.complete=function(){bt.locations&&(this.loc.end.line=Ft.line,this.loc.end.column=Ft.range[1]-Ft.lineStart),bt.ranges&&(this.range[1]=Ft.range[1])},e.parse=vt,e.write=mt,e.end=gt})}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,o=e("./anchor").Anchor,u=function(e){this.$lines=[],e.length===0?this.$lines=[""]:Array.isArray(e)?this._insertLines(0,e):this.insert({row:0,column:0},e)};(function(){r.implement(this,i),this.setValue=function(e){var t=this.getLength();this.remove(new s(0,0,t,this.getLine(t-1).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new o(this,e,t)},"aaa".split(/a/).length===0?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){if(this.$newLineMode===e)return;this.$newLineMode=e,this._signal("changeNewLineMode")},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return e=="\r\n"||e=="\r"||e=="\n"},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){if(e.start.row==e.end.row)return this.getLine(e.start.row).substring(e.start.column,e.end.column);var t=this.getLines(e.start.row,e.end.row);t[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;return e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column)),t.join(this.getNewLineCharacter())},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):e.row<0&&(e.row=0),e},this.insert=function(e,t){if(!t||t.length===0)return e;e=this.$clipPosition(e),this.getLength()<=1&&this.$detectNewLine(t);var n=this.$split(t),r=n.splice(0,1)[0],i=n.length==0?null:n.splice(n.length-1,1)[0];return e=this.insertInLine(e,r),i!==null&&(e=this.insertNewLine(e),e=this._insertLines(e.row,n),e=this.insertInLine(e,i||"")),e},this.insertLines=function(e,t){return e>=this.getLength()?this.insert({row:e,column:0},"\n"+t.join("\n")):this._insertLines(Math.max(e,0),t)},this._insertLines=function(e,t){if(t.length==0)return{row:e,column:0};while(t.length>61440){var n=this._insertLines(e,t.slice(0,61440));t=t.slice(61440),e=n.row}var r=[e,0];r.push.apply(r,t),this.$lines.splice.apply(this.$lines,r);var i=new s(e,0,e+t.length,0),o={action:"insertLines",range:i,lines:t};return this._signal("change",{data:o}),i.end},this.insertNewLine=function(e){e=this.$clipPosition(e);var t=this.$lines[e.row]||"";this.$lines[e.row]=t.substring(0,e.column),this.$lines.splice(e.row+1,0,t.substring(e.column,t.length));var n={row:e.row+1,column:0},r={action:"insertText",range:s.fromPoints(e,n),text:this.getNewLineCharacter()};return this._signal("change",{data:r}),n},this.insertInLine=function(e,t){if(t.length==0)return e;var n=this.$lines[e.row]||"";this.$lines[e.row]=n.substring(0,e.column)+t+n.substring(e.column);var r={row:e.row,column:e.column+t.length},i={action:"insertText",range:s.fromPoints(e,r),text:t};return this._signal("change",{data:i}),r},this.remove=function(e){e instanceof s||(e=s.fromPoints(e.start,e.end)),e.start=this.$clipPosition(e.start),e.end=this.$clipPosition(e.end);if(e.isEmpty())return e.start;var t=e.start.row,n=e.end.row;if(e.isMultiLine()){var r=e.start.column==0?t:t+1,i=n-1;e.end.column>0&&this.removeInLine(n,0,e.end.column),i>=r&&this._removeLines(r,i),r!=t&&(this.removeInLine(t,e.start.column,this.getLine(t).length),this.removeNewLine(e.start.row))}else this.removeInLine(t,e.start.column,e.end.column);return e.start},this.removeInLine=function(e,t,n){if(t==n)return;var r=new s(e,t,e,n),i=this.getLine(e),o=i.substring(t,n),u=i.substring(0,t)+i.substring(n,i.length);this.$lines.splice(e,1,u);var a={action:"removeText",range:r,text:o};return this._signal("change",{data:a}),r.start},this.removeLines=function(e,t){return e<0||t>=this.getLength()?this.remove(new s(e,0,t+1,0)):this._removeLines(e,t)},this._removeLines=function(e,t){var n=new s(e,0,t+1,0),r=this.$lines.splice(e,t-e+1),i={action:"removeLines",range:n,nl:this.getNewLineCharacter(),lines:r};return this._signal("change",{data:i}),r},this.removeNewLine=function(e){var t=this.getLine(e),n=this.getLine(e+1),r=new s(e,t.length,e+1,0),i=t+n;this.$lines.splice(e,2,i);var o={action:"removeText",range:r,text:this.getNewLineCharacter()};this._signal("change",{data:o})},this.replace=function(e,t){e instanceof s||(e=s.fromPoints(e.start,e.end));if(t.length==0&&e.isEmpty())return e.start;if(t==this.getTextRange(e))return e.end;this.remove(e);if(t)var n=this.insert(e.start,t);else n=e.start;return n},this.applyDeltas=function(e){for(var t=0;t<e.length;t++){var n=e[t],r=s.fromPoints(n.range.start,n.range.end);n.action=="insertLines"?this.insertLines(r.start.row,n.lines):n.action=="insertText"?this.insert(r.start,n.text):n.action=="removeLines"?this._removeLines(r.start.row,r.end.row-1):n.action=="removeText"&&this.remove(r)}},this.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--){var n=e[t],r=s.fromPoints(n.range.start,n.range.end);n.action=="insertLines"?this._removeLines(r.start.row,r.end.row-1):n.action=="insertText"?this.remove(r):n.action=="removeLines"?this._insertLines(r.start.row,n.lines):n.action=="removeText"&&this.insert(r.start,n.text)}},this.indexToPosition=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length;for(var i=t||0,s=n.length;i<s;i++){e-=n[i].length+r;if(e<0)return{row:i,column:e+n[i].length+r}}return{row:s-1,column:n[s-1].length}},this.positionToIndex=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=0,s=Math.min(e.row,n.length);for(var o=t||0;o<s;++o)i+=n[o].length+r;return i+e.column}}).call(u.prototype),t.Document=u})
\ No newline at end of file
diff --git a/app/assets/lib/ace/worker-php.js b/app/assets/lib/ace/worker-php.js
new file mode 100644
index 000000000..f3db36c18
--- /dev/null
+++ b/app/assets/lib/ace/worker-php.js
@@ -0,0 +1 @@
+"no use strict";(function(e){if(typeof e.window!="undefined"&&e.document)return;e.console=function(){var e=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:e})},e.console.error=e.console.warn=e.console.log=e.console.trace=e.console,e.window=e,e.ace=e,e.onerror=function(e,t,n,r,i){console.error("Worker "+(i?i.stack:e))},e.normalizeModule=function(t,n){if(n.indexOf("!")!==-1){var r=n.split("!");return e.normalizeModule(t,r[0])+"!"+e.normalizeModule(t,r[1])}if(n.charAt(0)=="."){var i=t.split("/").slice(0,-1).join("/");n=(i?i+"/":"")+n;while(n.indexOf(".")!==-1&&s!=n){var s=n;n=n.replace(/^\.\//,"").replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return n},e.require=function(t,n){n||(n=t,t=null);if(!n.charAt)throw new Error("worker.js require() accepts only (parentId, id) as arguments");n=e.normalizeModule(t,n);var r=e.require.modules[n];if(r)return r.initialized||(r.initialized=!0,r.exports=r.factory().exports),r.exports;var i=n.split("/");if(!e.require.tlns)return console.log("unable to load "+n);i[0]=e.require.tlns[i[0]]||i[0];var s=i.join("/")+".js";return e.require.id=n,importScripts(s),e.require(t,n)},e.require.modules={},e.require.tlns={},e.define=function(t,n,r){arguments.length==2?(r=n,typeof t!="string"&&(n=t,t=e.require.id)):arguments.length==1&&(r=t,n=[],t=e.require.id),n.length||(n=["require","exports","module"]);if(t.indexOf("text!")===0)return;var i=function(n){return e.require(t,n)};e.require.modules[t]={exports:{},factory:function(){var e=this,t=r.apply(this,n.map(function(t){switch(t){case"require":return i;case"exports":return e.exports;case"module":return e;default:return i(t)}}));return t&&(e.exports=t),e}}},e.define.amd={},e.initBaseUrls=function(e){require.tlns=e},e.initSender=function(){var t=e.require("ace/lib/event_emitter").EventEmitter,n=e.require("ace/lib/oop"),r=function(){};return function(){n.implement(this,t),this.callback=function(e,t){postMessage({type:"call",id:t,data:e})},this.emit=function(e,t){postMessage({type:"event",name:e,data:t})}}.call(r.prototype),new r};var t=e.main=null,n=e.sender=null;e.onmessage=function(r){var i=r.data;if(i.command){if(!t[i.command])throw new Error("Unknown command:"+i.command);t[i.command].apply(t,i.args)}else if(i.init){initBaseUrls(i.tlns),require("ace/lib/es5-shim"),n=e.sender=initSender();var s=require(i.module)[i.classname];t=e.main=new s(n)}else i.event&&n&&n._signal(i.event,i.data)}})(this),ace.define("ace/mode/php_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/php/php"],function(e,t,n){var r=e("../lib/oop"),i=e("../worker/mirror").Mirror,s=e("./php/php").PHP,o=t.PhpWorker=function(e){i.call(this,e),this.setTimeout(500)};r.inherits(o,i),function(){this.setOptions=function(e){this.inlinePhp=e&&e.inline},this.onUpdate=function(){var e=this.doc.getValue(),t=[];this.inlinePhp&&(e="<?"+e+"?>");var n=s.Lexer(e,{short_open_tag:1});try{new s.Parser(n)}catch(r){t.push({row:r.line-1,column:null,text:r.message.charAt(0).toUpperCase()+r.message.substring(1),type:"error"})}t.length?this.sender.emit("error",t):this.sender.emit("ok")}}.call(o.prototype)}),ace.define("ace/lib/oop",["require","exports","module"],function(e,t,n){t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}}),ace.define("ace/worker/mirror",["require","exports","module","ace/document","ace/lib/lang"],function(e,t,n){var r=e("../document").Document,i=e("../lib/lang"),s=t.Mirror=function(e){this.sender=e;var t=this.doc=new r(""),n=this.deferredUpdate=i.delayedCall(this.onUpdate.bind(this)),s=this;e.on("change",function(e){t.applyDeltas(e.data);if(s.$timeout)return n.schedule(s.$timeout);s.onUpdate()})};(function(){this.$timeout=500,this.setTimeout=function(e){this.$timeout=e},this.setValue=function(e){this.doc.setValue(e),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(e){this.sender.callback(this.doc.getValue(),e)},this.onUpdate=function(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(s.prototype)}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(e,t,n){function r(){}function i(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(t){}}function s(e){return e=+e,e!==e?e=0:e!==0&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}function o(e){var t=typeof e;return e===null||t==="undefined"||t==="boolean"||t==="number"||t==="string"}function u(e){var t,n,r;if(o(e))return e;n=e.valueOf;if(typeof n=="function"){t=n.call(e);if(o(t))return t}r=e.toString;if(typeof r=="function"){t=r.call(e);if(o(t))return t}throw new TypeError}Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if(typeof t!="function")throw new TypeError("Function.prototype.bind called on incompatible "+t);var n=c.call(arguments,1),i=function(){if(this instanceof i){var r=t.apply(this,n.concat(c.call(arguments)));return Object(r)===r?r:this}return t.apply(e,n.concat(c.call(arguments)))};return t.prototype&&(r.prototype=t.prototype,i.prototype=new r,r.prototype=null),i});var a=Function.prototype.call,f=Array.prototype,l=Object.prototype,c=f.slice,h=a.bind(l.toString),p=a.bind(l.hasOwnProperty),d,v,m,g,y;if(y=p(l,"__defineGetter__"))d=a.bind(l.__defineGetter__),v=a.bind(l.__defineSetter__),m=a.bind(l.__lookupGetter__),g=a.bind(l.__lookupSetter__);if([1,2].splice(0).length!=2)if(!function(){function e(e){var t=new Array(e+2);return t[0]=t[1]=0,t}var t=[],n;t.splice.apply(t,e(20)),t.splice.apply(t,e(26)),n=t.length,t.splice(5,0,"XXX"),n+1==t.length;if(n+1==t.length)return!0}())Array.prototype.splice=function(e,t){var n=this.length;e>0?e>n&&(e=n):e==void 0?e=0:e<0&&(e=Math.max(n+e,0)),e+t<n||(t=n-e);var r=this.slice(e,e+t),i=c.call(arguments,2),s=i.length;if(e===n)s&&this.push.apply(this,i);else{var o=Math.min(t,n-e),u=e+o,a=u+s-o,f=n-u,l=n-o;if(a<u)for(var h=0;h<f;++h)this[a+h]=this[u+h];else if(a>u)for(h=f;h--;)this[a+h]=this[u+h];if(s&&e===l)this.length=l,this.push.apply(this,i);else{this.length=l+s;for(h=0;h<s;++h)this[e+h]=i[h]}}return r};else{var b=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?b.apply(this,[e===void 0?0:e,t===void 0?this.length-e:t].concat(c.call(arguments,2))):[]}}Array.isArray||(Array.isArray=function(e){return h(e)=="[object Array]"});var w=Object("a"),E=w[0]!="a"||!(0 in w);Array.prototype.forEach||(Array.prototype.forEach=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=arguments[1],i=-1,s=n.length>>>0;if(h(e)!="[object Function]")throw new TypeError;while(++i<s)i in n&&e.call(r,n[i],i,t)}),Array.prototype.map||(Array.prototype.map=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=Array(r),s=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var o=0;o<r;o++)o in n&&(i[o]=e.call(s,n[o],o,t));return i}),Array.prototype.filter||(Array.prototype.filter=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=[],s,o=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var u=0;u<r;u++)u in n&&(s=n[u],e.call(o,s,u,t)&&i.push(s));return i}),Array.prototype.every||(Array.prototype.every=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var s=0;s<r;s++)if(s in n&&!e.call(i,n[s],s,t))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var s=0;s<r;s++)if(s in n&&e.call(i,n[s],s,t))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0;if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");if(!r&&arguments.length==1)throw new TypeError("reduce of empty array with no initial value");var i=0,s;if(arguments.length>=2)s=arguments[1];else do{if(i in n){s=n[i++];break}if(++i>=r)throw new TypeError("reduce of empty array with no initial value")}while(!0);for(;i<r;i++)i in n&&(s=e.call(void 0,s,n[i],i,t));return s}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0;if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");if(!r&&arguments.length==1)throw new TypeError("reduceRight of empty array with no initial value");var i,s=r-1;if(arguments.length>=2)i=arguments[1];else do{if(s in n){i=n[s--];break}if(--s<0)throw new TypeError("reduceRight of empty array with no initial value")}while(!0);do s in this&&(i=e.call(void 0,i,n[s],s,t));while(s--);return i});if(!Array.prototype.indexOf||[0,1].indexOf(1,2)!=-1)Array.prototype.indexOf=function(e){var t=E&&h(this)=="[object String]"?this.split(""):F(this),n=t.length>>>0;if(!n)return-1;var r=0;arguments.length>1&&(r=s(arguments[1])),r=r>=0?r:Math.max(0,n+r);for(;r<n;r++)if(r in t&&t[r]===e)return r;return-1};if(!Array.prototype.lastIndexOf||[0,1].lastIndexOf(0,-3)!=-1)Array.prototype.lastIndexOf=function(e){var t=E&&h(this)=="[object String]"?this.split(""):F(this),n=t.length>>>0;if(!n)return-1;var r=n-1;arguments.length>1&&(r=Math.min(r,s(arguments[1]))),r=r>=0?r:n-Math.abs(r);for(;r>=0;r--)if(r in t&&e===t[r])return r;return-1};Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__||(e.constructor?e.constructor.prototype:l)});if(!Object.getOwnPropertyDescriptor){var S="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(e,t){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError(S+e);if(!p(e,t))return;var n,r,i;n={enumerable:!0,configurable:!0};if(y){var s=e.__proto__;e.__proto__=l;var r=m(e,t),i=g(e,t);e.__proto__=s;if(r||i)return r&&(n.get=r),i&&(n.set=i),n}return n.value=e[t],n}}Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){return Object.keys(e)});if(!Object.create){var x;Object.prototype.__proto__===null?x=function(){return{__proto__:null}}:x=function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(e,t){var n;if(e===null)n=x();else{if(typeof e!="object")throw new TypeError("typeof prototype["+typeof e+"] != 'object'");var r=function(){};r.prototype=e,n=new r,n.__proto__=e}return t!==void 0&&Object.defineProperties(n,t),n}}if(Object.defineProperty){var T=i({}),N=typeof document=="undefined"||i(document.createElement("div"));if(!T||!N)var C=Object.defineProperty}if(!Object.defineProperty||C){var k="Property description must be an object: ",L="Object.defineProperty called on non-object: ",A="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(e,t,n){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError(L+e);if(typeof n!="object"&&typeof n!="function"||n===null)throw new TypeError(k+n);if(C)try{return C.call(Object,e,t,n)}catch(r){}if(p(n,"value"))if(y&&(m(e,t)||g(e,t))){var i=e.__proto__;e.__proto__=l,delete e[t],e[t]=n.value,e.__proto__=i}else e[t]=n.value;else{if(!y)throw new TypeError(A);p(n,"get")&&d(e,t,n.get),p(n,"set")&&v(e,t,n.set)}return e}}Object.defineProperties||(Object.defineProperties=function(e,t){for(var n in t)p(t,n)&&Object.defineProperty(e,n,t[n]);return e}),Object.seal||(Object.seal=function(e){return e}),Object.freeze||(Object.freeze=function(e){return e});try{Object.freeze(function(){})}catch(O){Object.freeze=function(e){return function(t){return typeof t=="function"?t:e(t)}}(Object.freeze)}Object.preventExtensions||(Object.preventExtensions=function(e){return e}),Object.isSealed||(Object.isSealed=function(e){return!1}),Object.isFrozen||(Object.isFrozen=function(e){return!1}),Object.isExtensible||(Object.isExtensible=function(e){if(Object(e)===e)throw new TypeError;var t="";while(p(e,t))t+="?";e[t]=!0;var n=p(e,t);return delete e[t],n});if(!Object.keys){var M=!0,_=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],D=_.length;for(var P in{toString:null})M=!1;Object.keys=function I(e){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError("Object.keys called on a non-object");var I=[];for(var t in e)p(e,t)&&I.push(t);if(M)for(var n=0,r=D;n<r;n++){var i=_[n];p(e,i)&&I.push(i)}return I}}Date.now||(Date.now=function(){return(new Date).getTime()});var H="	\n\f\r   ᠎              \u2028\u2029";if(!String.prototype.trim||H.trim()){H="["+H+"]";var B=new RegExp("^"+H+H+"*"),j=new RegExp(H+H+"*$");String.prototype.trim=function(){return String(this).replace(B,"").replace(j,"")}}var F=function(e){if(e==null)throw new TypeError("can't convert "+e+" to object");return Object(e)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,t,n){var r={},i=function(){this.propagationStopped=!0},s=function(){this.defaultPrevented=!0};r._emit=r._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],r=this._defaultHandlers[e];if(!n.length&&!r)return;if(typeof t!="object"||!t)t={};t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=i),t.preventDefault||(t.preventDefault=s),n=n.slice();for(var o=0;o<n.length;o++){n[o](t,this);if(t.propagationStopped)break}if(r&&!t.defaultPrevented)return r(t,this)},r._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(!n)return;n=n.slice();for(var r=0;r<n.length;r++)n[r](t,this)},r.once=function(e,t){var n=this;t&&this.addEventListener(e,function r(){n.removeEventListener(e,r),t.apply(null,arguments)})},r.setDefaultHandler=function(e,t){var n=this._defaultHandlers;n||(n=this._defaultHandlers={_disabled_:{}});if(n[e]){var r=n[e],i=n._disabled_[e];i||(n._disabled_[e]=i=[]),i.push(r);var s=i.indexOf(t);s!=-1&&i.splice(s,1)}n[e]=t},r.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(!n)return;var r=n._disabled_[e];if(n[e]==t){var i=n[e];r&&this.setDefaultHandler(e,r.pop())}else if(r){var s=r.indexOf(t);s!=-1&&r.splice(s,1)}},r.on=r.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[e];return r||(r=this._eventRegistry[e]=[]),r.indexOf(t)==-1&&r[n?"unshift":"push"](t),t},r.off=r.removeListener=r.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(!n)return;var r=n.indexOf(t);r!==-1&&n.splice(r,1)},r.removeAllListeners=function(e){this._eventRegistry&&(this._eventRegistry[e]=[])},t.EventEmitter=r}),ace.define("ace/range",["require","exports","module"],function(e,t,n){var r=function(e,t){return e.row-t.row||e.column-t.column},i=function(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return this.compare(e,t)==0},this.compareRange=function(e){var t,n=e.end,r=e.start;return t=this.compare(n.row,n.column),t==1?(t=this.compare(r.row,r.column),t==1?2:t==0?1:0):t==-1?-2:(t=this.compare(r.row,r.column),t==-1?-1:t==1?42:0)},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return this.comparePoint(e.start)==0&&this.comparePoint(e.end)==0},this.intersects=function(e){var t=this.compareRange(e);return t==-1||t==0||t==1},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){typeof e=="object"?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){typeof e=="object"?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)||this.isStart(e,t)?!1:!0:!1},this.insideStart=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)?!1:!0:!1},this.insideEnd=function(e,t){return this.compare(e,t)==0?this.isStart(e,t)?!1:!0:!1},this.compare=function(e,t){return!this.isMultiLine()&&e===this.start.row?t<this.start.column?-1:t>this.end.column?1:0:e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else if(this.end.row<e)var n={row:e,column:0};if(this.start.row>t)var r={row:t+1,column:0};else if(this.start.row<e)var r={row:e,column:0};return i.fromPoints(r||this.start,n||this.end)},this.extend=function(e,t){var n=this.compare(e,t);if(n==0)return this;if(n==-1)var r={row:e,column:t};else var s={row:e,column:t};return i.fromPoints(r||this.start,s||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return i.fromPoints(this.start,this.end)},this.collapseRows=function(){return this.end.column==0?new i(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new i(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),n=e.documentToScreenPosition(this.end);return new i(t.row,t.column,n.row,n.column)},this.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t}}).call(i.prototype),i.fromPoints=function(e,t){return new i(e.row,e.column,t.row,t.column)},i.comparePoints=r,i.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=i}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=t.Anchor=function(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),typeof n=="undefined"?this.setPosition(t.row,t.column):this.setPosition(t,n)};(function(){r.implement(this,i),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(e){var t=e.data,n=t.range;if(n.start.row==n.end.row&&n.start.row!=this.row)return;if(n.start.row>this.row)return;if(n.start.row==this.row&&n.start.column>this.column)return;var r=this.row,i=this.column,s=n.start,o=n.end;if(t.action==="insertText")if(s.row===r&&s.column<=i){if(s.column!==i||!this.$insertRight)s.row===o.row?i+=o.column-s.column:(i-=s.column,r+=o.row-s.row)}else s.row!==o.row&&s.row<r&&(r+=o.row-s.row);else t.action==="insertLines"?(s.row!==r||i!==0||!this.$insertRight)&&s.row<=r&&(r+=o.row-s.row):t.action==="removeText"?s.row===r&&s.column<i?o.column>=i?i=s.column:i=Math.max(0,i-(o.column-s.column)):s.row!==o.row&&s.row<r?(o.row===r&&(i=Math.max(0,i-o.column)+s.column),r-=o.row-s.row):o.row===r&&(r-=o.row-s.row,i=Math.max(0,i-o.column)+s.column):t.action=="removeLines"&&s.row<=r&&(o.row<=r?r-=o.row-s.row:(r=s.row,i=0));this.setPosition(r,i,!0)},this.setPosition=function(e,t,n){var r;n?r={row:e,column:t}:r=this.$clipPositionToDocument(e,t);if(this.row==r.row&&this.column==r.column)return;var i={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._signal("change",{old:i,value:r})},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(s.prototype)}),ace.define("ace/lib/lang",["require","exports","module"],function(e,t,n){t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){var n="";while(t>0){t&1&&(n+=e);if(t>>=1)e+=e}return n};var r=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(r,"")},t.stringTrimRight=function(e){return e.replace(i,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){var t=[];for(var n=0,r=e.length;n<r;n++)e[n]&&typeof e[n]=="object"?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=function(e){if(typeof e!="object"||!e)return e;var n=e.constructor;if(n===RegExp)return e;var r=n();for(var i in e)typeof e[i]=="object"?r[i]=t.deepCopy(e[i]):r[i]=e[i];return r},t.arrayToMap=function(e){var t={};for(var n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return e.replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,function(e){n.push({offset:arguments[arguments.length-2],length:e.length})}),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},r=function(e){return r.cancel(),t=setTimeout(n,e||0),r};return r.schedule=r,r.call=function(){return this.cancel(),e(),r},r.cancel=function(){return clearTimeout(t),t=null,r},r.isPending=function(){return t},r},t.delayedCall=function(e,t){var n=null,r=function(){n=null,e()},i=function(e){n==null&&(n=setTimeout(r,e||t))};return i.delay=function(e){n&&clearTimeout(n),n=setTimeout(r,e||t)},i.schedule=i,i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){return n},i}}),ace.define("ace/mode/php/php",["require","exports","module"],function(e,t,n){var r={Constants:{}};r.Constants.T_INCLUDE=262,r.Constants.T_INCLUDE_ONCE=261,r.Constants.T_EVAL=260,r.Constants.T_REQUIRE=259,r.Constants.T_REQUIRE_ONCE=258,r.Constants.T_LOGICAL_OR=263,r.Constants.T_LOGICAL_XOR=264,r.Constants.T_LOGICAL_AND=265,r.Constants.T_PRINT=266,r.Constants.T_PLUS_EQUAL=277,r.Constants.T_MINUS_EQUAL=276,r.Constants.T_MUL_EQUAL=275,r.Constants.T_DIV_EQUAL=274,r.Constants.T_CONCAT_EQUAL=273,r.Constants.T_MOD_EQUAL=272,r.Constants.T_AND_EQUAL=271,r.Constants.T_OR_EQUAL=270,r.Constants.T_XOR_EQUAL=269,r.Constants.T_SL_EQUAL=268,r.Constants.T_SR_EQUAL=267,r.Constants.T_BOOLEAN_OR=278,r.Constants.T_BOOLEAN_AND=279,r.Constants.T_IS_EQUAL=283,r.Constants.T_IS_NOT_EQUAL=282,r.Constants.T_IS_IDENTICAL=281,r.Constants.T_IS_NOT_IDENTICAL=280,r.Constants.T_IS_SMALLER_OR_EQUAL=285,r.Constants.T_IS_GREATER_OR_EQUAL=284,r.Constants.T_SL=287,r.Constants.T_SR=286,r.Constants.T_INSTANCEOF=288,r.Constants.T_INC=297,r.Constants.T_DEC=296,r.Constants.T_INT_CAST=295,r.Constants.T_DOUBLE_CAST=294,r.Constants.T_STRING_CAST=293,r.Constants.T_ARRAY_CAST=292,r.Constants.T_OBJECT_CAST=291,r.Constants.T_BOOL_CAST=290,r.Constants.T_UNSET_CAST=289,r.Constants.T_NEW=299,r.Constants.T_CLONE=298,r.Constants.T_EXIT=300,r.Constants.T_IF=301,r.Constants.T_ELSEIF=302,r.Constants.T_ELSE=303,r.Constants.T_ENDIF=304,r.Constants.T_LNUMBER=305,r.Constants.T_DNUMBER=306,r.Constants.T_STRING=307,r.Constants.T_STRING_VARNAME=308,r.Constants.T_VARIABLE=309,r.Constants.T_NUM_STRING=310,r.Constants.T_INLINE_HTML=311,r.Constants.T_CHARACTER=312,r.Constants.T_BAD_CHARACTER=313,r.Constants.T_ENCAPSED_AND_WHITESPACE=314,r.Constants.T_CONSTANT_ENCAPSED_STRING=315,r.Constants.T_ECHO=316,r.Constants.T_DO=317,r.Constants.T_WHILE=318,r.Constants.T_ENDWHILE=319,r.Constants.T_FOR=320,r.Constants.T_ENDFOR=321,r.Constants.T_FOREACH=322,r.Constants.T_ENDFOREACH=323,r.Constants.T_DECLARE=324,r.Constants.T_ENDDECLARE=325,r.Constants.T_AS=326,r.Constants.T_SWITCH=327,r.Constants.T_ENDSWITCH=328,r.Constants.T_CASE=329,r.Constants.T_DEFAULT=330,r.Constants.T_BREAK=331,r.Constants.T_CONTINUE=332,r.Constants.T_GOTO=333,r.Constants.T_FUNCTION=334,r.Constants.T_CONST=335,r.Constants.T_RETURN=336,r.Constants.T_TRY=337,r.Constants.T_CATCH=338,r.Constants.T_THROW=339,r.Constants.T_USE=340,r.Constants.T_GLOBAL=341,r.Constants.T_STATIC=347,r.Constants.T_ABSTRACT=346,r.Constants.T_FINAL=345,r.Constants.T_PRIVATE=344,r.Constants.T_PROTECTED=343,r.Constants.T_PUBLIC=342,r.Constants.T_VAR=348,r.Constants.T_UNSET=349,r.Constants.T_ISSET=350,r.Constants.T_EMPTY=351,r.Constants.T_HALT_COMPILER=352,r.Constants.T_CLASS=353,r.Constants.T_TRAIT=382,r.Constants.T_INTERFACE=354,r.Constants.T_EXTENDS=355,r.Constants.T_IMPLEMENTS=356,r.Constants.T_OBJECT_OPERATOR=357,r.Constants.T_DOUBLE_ARROW=358,r.Constants.T_LIST=359,r.Constants.T_ARRAY=360,r.Constants.T_CLASS_C=361,r.Constants.T_TRAIT_C=381,r.Constants.T_METHOD_C=362,r.Constants.T_FUNC_C=363,r.Constants.T_LINE=364,r.Constants.T_FILE=365,r.Constants.T_COMMENT=366,r.Constants.T_DOC_COMMENT=367,r.Constants.T_OPEN_TAG=368,r.Constants.T_OPEN_TAG_WITH_ECHO=369,r.Constants.T_CLOSE_TAG=370,r.Constants.T_WHITESPACE=371,r.Constants.T_START_HEREDOC=372,r.Constants.T_END_HEREDOC=373,r.Constants.T_DOLLAR_OPEN_CURLY_BRACES=374,r.Constants.T_CURLY_OPEN=375,r.Constants.T_PAAMAYIM_NEKUDOTAYIM=376,r.Constants.T_DOUBLE_COLON=376,r.Constants.T_NAMESPACE=377,r.Constants.T_NS_C=378,r.Constants.T_DIR=379,r.Constants.T_NS_SEPARATOR=380,r.Lexer=function(e,t){var n,i=function(e){if(e.match(/\n/)!==null){var t=e.substring(0,1);e="["+e.split(/\n/).join(t+","+t)+'].join("\\n")'}return e},s,o=t===undefined||/^(on|true|1)$/i.test(t.short_open_tag)?/(\<\?php\s|\<\?|\<\%|\<script language\=('|")?php('|")?\>)/i:/(\<\?php\s|<\?=|\<script language\=('|")?php('|")?\>)/i,u=t===undefined||/^(on|true|1)$/i.test(t.short_open_tag)?/^(\<\?php\s|\<\?|\<\%|\<script language\=('|")?php('|")?\>)/i:/^(\<\?php\s|<\?=|\<script language\=('|")?php('|")?\>)/i,a=[{value:r.Constants.T_NAMESPACE,re:/^namespace(?=\s)/i},{value:r.Constants.T_USE,re:/^use(?=\s)/i},{value:r.Constants.T_ABSTRACT,re:/^abstract(?=\s)/i},{value:r.Constants.T_IMPLEMENTS,re:/^implements(?=\s)/i},{value:r.Constants.T_INTERFACE,re:/^interface(?=\s)/i},{value:r.Constants.T_CONST,re:/^const(?=\s)/i},{value:r.Constants.T_STATIC,re:/^static(?=\s)/i},{value:r.Constants.T_FINAL,re:/^final(?=\s)/i},{value:r.Constants.T_VAR,re:/^var(?=\s)/i},{value:r.Constants.T_GLOBAL,re:/^global(?=\s)/i},{value:r.Constants.T_CLONE,re:/^clone(?=\s)/i},{value:r.Constants.T_THROW,re:/^throw(?=\s)/i},{value:r.Constants.T_EXTENDS,re:/^extends(?=\s)/i},{value:r.Constants.T_AND_EQUAL,re:/^&=/},{value:r.Constants.T_AS,re:/^as(?=\s)/i},{value:r.Constants.T_ARRAY_CAST,re:/^\(array\)/i},{value:r.Constants.T_BOOL_CAST,re:/^\((bool|boolean)\)/i},{value:r.Constants.T_DOUBLE_CAST,re:/^\((real|float|double)\)/i},{value:r.Constants.T_INT_CAST,re:/^\((int|integer)\)/i},{value:r.Constants.T_OBJECT_CAST,re:/^\(object\)/i},{value:r.Constants.T_STRING_CAST,re:/^\(string\)/i},{value:r.Constants.T_UNSET_CAST,re:/^\(unset\)/i},{value:r.Constants.T_TRY,re:/^try(?=\s*{)/i},{value:r.Constants.T_CATCH,re:/^catch(?=\s*\()/i},{value:r.Constants.T_INSTANCEOF,re:/^instanceof(?=\s)/i},{value:r.Constants.T_LOGICAL_OR,re:/^or(?=\s)/i},{value:r.Constants.T_LOGICAL_AND,re:/^and(?=\s)/i},{value:r.Constants.T_LOGICAL_XOR,re:/^xor(?=\s)/i},{value:r.Constants.T_BOOLEAN_AND,re:/^&&/},{value:r.Constants.T_BOOLEAN_OR,re:/^\|\|/},{value:r.Constants.T_CONTINUE,re:/^continue(?=\s|;)/i},{value:r.Constants.T_BREAK,re:/^break(?=\s|;)/i},{value:r.Constants.T_ENDDECLARE,re:/^enddeclare(?=\s|;)/i},{value:r.Constants.T_ENDFOR,re:/^endfor(?=\s|;)/i},{value:r.Constants.T_ENDFOREACH,re:/^endforeach(?=\s|;)/i},{value:r.Constants.T_ENDIF,re:/^endif(?=\s|;)/i},{value:r.Constants.T_ENDSWITCH,re:/^endswitch(?=\s|;)/i},{value:r.Constants.T_ENDWHILE,re:/^endwhile(?=\s|;)/i},{value:r.Constants.T_CASE,re:/^case(?=\s)/i},{value:r.Constants.T_DEFAULT,re:/^default(?=\s|:)/i},{value:r.Constants.T_SWITCH,re:/^switch(?=[ (])/i},{value:r.Constants.T_EXIT,re:/^(exit|die)(?=[ \(;])/i},{value:r.Constants.T_CLOSE_TAG,re:/^(\?\>|\%\>|\<\/script\>)\s?\s?/i,func:function(e){return c=!1,e}},{value:r.Constants.T_DOUBLE_ARROW,re:/^\=\>/},{value:r.Constants.T_DOUBLE_COLON,re:/^\:\:/},{value:r.Constants.T_METHOD_C,re:/^__METHOD__/},{value:r.Constants.T_LINE,re:/^__LINE__/},{value:r.Constants.T_FILE,re:/^__FILE__/},{value:r.Constants.T_FUNC_C,re:/^__FUNCTION__/},{value:r.Constants.T_NS_C,re:/^__NAMESPACE__/},{value:r.Constants.T_TRAIT_C,re:/^__TRAIT__/},{value:r.Constants.T_DIR,re:/^__DIR__/},{value:r.Constants.T_CLASS_C,re:/^__CLASS__/},{value:r.Constants.T_INC,re:/^\+\+/},{value:r.Constants.T_DEC,re:/^\-\-/},{value:r.Constants.T_CONCAT_EQUAL,re:/^\.\=/},{value:r.Constants.T_DIV_EQUAL,re:/^\/\=/},{value:r.Constants.T_XOR_EQUAL,re:/^\^\=/},{value:r.Constants.T_MUL_EQUAL,re:/^\*\=/},{value:r.Constants.T_MOD_EQUAL,re:/^\%\=/},{value:r.Constants.T_SL_EQUAL,re:/^<<=/},{value:r.Constants.T_START_HEREDOC,re:/^<<<[A-Z_0-9]+\s/i,func:function(e){return n=e.substring(3,e.length-1),e}},{value:r.Constants.T_SL,re:/^<</},{value:r.Constants.T_IS_SMALLER_OR_EQUAL,re:/^<=/},{value:r.Constants.T_SR_EQUAL,re:/^>>=/},{value:r.Constants.T_SR,re:/^>>/},{value:r.Constants.T_IS_GREATER_OR_EQUAL,re:/^>=/},{value:r.Constants.T_OR_EQUAL,re:/^\|\=/},{value:r.Constants.T_PLUS_EQUAL,re:/^\+\=/},{value:r.Constants.T_MINUS_EQUAL,re:/^-\=/},{value:r.Constants.T_OBJECT_OPERATOR,re:/^\-\>/i},{value:r.Constants.T_CLASS,re:/^class(?=[\s\{])/i,afterWhitespace:!0},{value:r.Constants.T_TRAIT,re:/^trait(?=[\s]+[A-Za-z])/i},{value:r.Constants.T_PUBLIC,re:/^public(?=[\s])/i},{value:r.Constants.T_PRIVATE,re:/^private(?=[\s])/i},{value:r.Constants.T_PROTECTED,re:/^protected(?=[\s])/i},{value:r.Constants.T_ARRAY,re:/^array(?=\s*?\()/i},{value:r.Constants.T_EMPTY,re:/^empty(?=[ \(])/i},{value:r.Constants.T_ISSET,re:/^isset(?=[ \(])/i},{value:r.Constants.T_UNSET,re:/^unset(?=[ \(])/i},{value:r.Constants.T_RETURN,re:/^return(?=[ "'(;])/i},{value:r.Constants.T_FUNCTION,re:/^function(?=[ "'(;])/i},{value:r.Constants.T_ECHO,re:/^echo(?=[ "'(;])/i},{value:r.Constants.T_LIST,re:/^list(?=\s*?\()/i},{value:r.Constants.T_PRINT,re:/^print(?=[ "'(;])/i},{value:r.Constants.T_INCLUDE,re:/^include(?=[ "'(;])/i},{value:r.Constants.T_INCLUDE_ONCE,re:/^include_once(?=[ "'(;])/i},{value:r.Constants.T_REQUIRE,re:/^require(?=[ "'(;])/i},{value:r.Constants.T_REQUIRE_ONCE,re:/^require_once(?=[ "'(;])/i},{value:r.Constants.T_NEW,re:/^new(?=[ ])/i},{value:r.Constants.T_COMMENT,re:/^\/\*([\S\s]*?)(?:\*\/|$)/},{value:r.Constants.T_COMMENT,re:/^\/\/.*(\s)?/},{value:r.Constants.T_COMMENT,re:/^\#.*(\s)?/},{value:r.Constants.T_ELSEIF,re:/^elseif(?=[\s(])/i},{value:r.Constants.T_GOTO,re:/^goto(?=[\s(])/i},{value:r.Constants.T_ELSE,re:/^else(?=[\s{:])/i},{value:r.Constants.T_IF,re:/^if(?=[\s(])/i},{value:r.Constants.T_DO,re:/^do(?=[ {])/i},{value:r.Constants.T_WHILE,re:/^while(?=[ (])/i},{value:r.Constants.T_FOREACH,re:/^foreach(?=[ (])/i},{value:r.Constants.T_ISSET,re:/^isset(?=[ (])/i},{value:r.Constants.T_IS_IDENTICAL,re:/^===/},{value:r.Constants.T_IS_EQUAL,re:/^==/},{value:r.Constants.T_IS_NOT_IDENTICAL,re:/^\!==/},{value:r.Constants.T_IS_NOT_EQUAL,re:/^(\!=|\<\>)/},{value:r.Constants.T_FOR,re:/^for(?=[ (])/i},{value:r.Constants.T_DNUMBER,re:/^[0-9]*\.[0-9]+([eE][-]?[0-9]*)?/},{value:r.Constants.T_LNUMBER,re:/^(0x[0-9A-F]+|[0-9]+)/i},{value:r.Constants.T_OPEN_TAG_WITH_ECHO,re:/^(\<\?=|\<\%=)/i},{value:r.Constants.T_OPEN_TAG,re:u},{value:r.Constants.T_VARIABLE,re:/^\$[a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*/},{value:r.Constants.T_WHITESPACE,re:/^\s+/},{value:r.Constants.T_CONSTANT_ENCAPSED_STRING,re:/^("(?:[^"\\]|\\[\s\S])*"|'(?:[^'\\]|\\[\s\S])*')/,func:function(e,t){var n=0,i,s=0;if(e.substring(0,1)==="'")return e;var o=e.match(/(?:[^\\]|\\.)*[^\\]\$[a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*/g);if(o!==null){while(e.length>0){i=e.length,o=e.match(/^[\[\]\;\:\?\(\)\!\.\,\>\<\=\+\-\/\*\|\&\@\^\%\"\'\{\}]/),o!==null&&(f.push(o[0]),e=e.substring(1),n>0&&o[0]==="}"&&n--,o[0]==="["&&s++,o[0]==="]"&&s--),o=e.match(/^\$[a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*/);if(o!==null){f.push([parseInt(r.Constants.T_VARIABLE,10),o[0],l]),e=e.substring(o[0].length),o=e.match(/^(\-\>)\s*([a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*)\s*(\()/),o!==null&&(f.push([parseInt(r.Constants.T_OBJECT_OPERATOR,10),o[1],l]),f.push([parseInt(r.Constants.T_STRING,10),o[2],l]),o[3]&&f.push(o[3]),e=e.substring(o[0].length));if(e.match(/^\[/g)!==null)continue}var u;n>0?u=/^([^\\\$"{}\]\(\)\->]|\\.)+/g:u=/^([^\\\$"{]|\\.|{[^\$]|\$(?=[^a-zA-Z_\x7f-\uffff]))+/g;var a,c;while((o=e.match(u))!==null){if(e.length===1)throw new Error(o);a=0,n>0?(c=o[0].match(/^[\[\]\;\:\?\(\)\!\.\,\>\<\=\+\-\/\*\|\&\{\}\@\^\%\$\~]/))?f.push(c[0]):a=r.Constants.T_STRING:a=r.Constants.T_ENCAPSED_AND_WHITESPACE,a&&f.push([parseInt(a,10),o[0].replace(/\n/g,"\\n").replace(/\r/g,""),l]),l+=o[0].split("\n").length-1,e=e.substring(o[0].length)}n>0&&e.match(/^\->/)!==null&&(f.push([parseInt(r.Constants.T_OBJECT_OPERATOR,10),"->",l]),e=e.substring(2)),e.match(/^{\$/)!==null&&(f.push([parseInt(r.Constants.T_CURLY_OPEN,10),"{",l]),e=e.substring(1),n++);if(i===e.length&&(o=e.match(/^(([^\\]|\\.)*?[^\\]\$[a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*)/g))!==null)return}return undefined}return e=e.replace(/\r/g,""),e}},{value:r.Constants.T_NS_SEPARATOR,re:/^\\(?=[a-zA-Z_])/},{value:r.Constants.T_STRING,re:/^[a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*/},{value:-1,re:/^[\[\]\;\:\?\(\)\!\.\,\>\<\=\+\-\/\*\|\&\{\}\@\^\%\"\'\$\~]/}],f=[],l=1,c=!1,h=!0;if(e===null)return f;typeof e!="string"&&(e=e.toString());while(e.length>0&&h===!0)if(c===!0)if(n!==undefined){var p=new RegExp("([\\S\\s]*?)(\\r\\n|\\n|\\r)("+n+")(;|\\r\\n|\\n)","i"),d=e.match(p);d!==null&&(f.push([parseInt(r.Constants.T_ENCAPSED_AND_WHITESPACE,10),d[1].replace(/^\n/g,"").replace(/\\\$/g,"$")+"\n",l]),l+=d[1].split("\n").length,f.push([parseInt(r.Constants.T_END_HEREDOC,10),d[3],l]),e=e.substring(d[1].length+d[2].length+d[3].length),n=undefined);if(d===null)throw Error("sup")}else h=a.some(function(t){if(t.afterWhitespace===!0){var n=f[f.length-1];if(!Array.isArray(n)||n[0]!==r.Constants.T_WHITESPACE&&n[0]!==r.Constants.T_OPEN_TAG&&n[0]!==r.Constants.T_COMMENT)return!1}var i=e.match(t.re);if(i!==null){if(t.value!==-1){var s=i[0];t.func!==undefined&&(s=t.func(s,t)),s!==undefined&&(f.push([parseInt(t.value,10),s,l]),l+=s.split("\n").length-1)}else f.push(i[0]);return e=e.substring(i[0].length),!0}return!1});else{var d=o.exec(e);if(d===null)return f.push([parseInt(r.Constants.T_INLINE_HTML,10),e.replace(/^\n/,""),l]),f;if(d.index>0){var v=e.substring(0,d.index);f.push([parseInt(r.Constants.T_INLINE_HTML,10),v,l]),l+=v.split("\n").length-1,e=e.substring(d.index)}c=!0}return f},r.Parser=function(e,t){var n=this.yybase,i=this.yydefault,s=this.yycheck,o=this.yyaction,u=this.yylen,a=this.yygbase,f=this.yygcheck,l=this.yyp,c=this.yygoto,h=this.yylhs,p=this.terminals,d=this.translate,v=this.yygdefault;this.pos=-1,this.line=1,this.tokenMap=this.createTokenMap(),this.dropTokens={},this.dropTokens[r.Constants.T_WHITESPACE]=1,this.dropTokens[r.Constants.T_OPEN_TAG]=1;var m=[];e.forEach(function(e,t){typeof e=="object"&&e[0]===r.Constants.T_OPEN_TAG_WITH_ECHO?(m.push([r.Constants.T_OPEN_TAG,e[1],e[2]]),m.push([r.Constants.T_ECHO,e[1],e[2]])):m.push(e)}),this.tokens=m;var g=this.TOKEN_NONE;this.startAttributes={startLine:1},this.endAttributes={};var y=[this.startAttributes],b=0,w=[b];this.yyastk=[],this.stackPos=0;var E,S;for(;;){if(n[b]===0)E=i[b];else{g===this.TOKEN_NONE&&(S=this.getNextToken(),g=S>=0&&S<this.TOKEN_MAP_SIZE?d[S]:this.TOKEN_INVALID,y[this.stackPos]=this.startAttributes);if(((E=n[b]+g)>=0&&E<this.YYLAST&&s[E]===g||b<this.YY2TBLSTATE&&(E=n[b+this.YYNLSTATES]+g)>=0&&E<this.YYLAST&&s[E]===g)&&(E=o[E])!==this.YYDEFAULT)if(E>0){++this.stackPos,w[this.stackPos]=b=E,this.yyastk[this.stackPos]=this.tokenValue,y[this.stackPos]=this.startAttributes,g=this.TOKEN_NONE;if(E<this.YYNLSTATES)continue;E-=this.YYNLSTATES}else E=-E;else E=i[b]}for(;;){if(E===0)return this.yyval;if(E===this.YYUNEXPECTED){if(t!==!0){var x=[];for(var T=0;T<this.TOKEN_MAP_SIZE;++T)if((E=n[b]+T)>=0&&E<this.YYLAST&&s[E]==T||b<this.YY2TBLSTATE&&(E=n[b+this.YYNLSTATES]+T)&&E<this.YYLAST&&s[E]==T)if(o[E]!=this.YYUNEXPECTED){if(x.length==4){x=[];break}x.push(this.terminals[T])}var N="";throw x.length&&(N=", expecting "+x.join(" or ")),new r.ParseError("syntax error, unexpected "+p[g]+N,this.startAttributes.startLine)}return this.startAttributes.startLine}for(var C in this.endAttributes)y[this.stackPos-u[E]][C]=this.endAttributes[C];try{this["yyn"+E](y[this.stackPos-u[E]])}catch(k){throw k}this.stackPos-=u[E],E=h[E],(l=a[E]+w[this.stackPos])>=0&&l<this.YYGLAST&&f[l]===E?b=c[l]:b=v[E],++this.stackPos,w[this.stackPos]=b,this.yyastk[this.stackPos]=this.yyval,y[this.stackPos]=this.startAttributes;if(b<this.YYNLSTATES)break;E=b-this.YYNLSTATES}}},r.ParseError=function(e,t){this.message=e,this.line=t},r.Parser.prototype.MODIFIER_PUBLIC=1,r.Parser.prototype.MODIFIER_PROTECTED=2,r.Parser.prototype.MODIFIER_PRIVATE=4,r.Parser.prototype.MODIFIER_STATIC=8,r.Parser.prototype.MODIFIER_ABSTRACT=16,r.Parser.prototype.MODIFIER_FINAL=32,r.Parser.prototype.getNextToken=function(){this.startAttributes={},this.endAttributes={};var e,t;while(this.tokens[++this.pos]!==undefined){e=this.tokens[this.pos];if(typeof e=="string")return this.startAttributes.startLine=this.line,this.endAttributes.endLine=this.line,'b"'===e?(this.tokenValue='b"','"'.charCodeAt(0)):(this.tokenValue=e,e.charCodeAt(0));this.line+=(t=e[1].match(/\n/g))===null?0:t.length;if(r.Constants.T_COMMENT===e[0])Array.isArray(this.startAttributes.comments)||(this.startAttributes.comments=[]),this.startAttributes.comments.push({type:"comment",comment:e[1],line:e[2]});else if(r.Constants.T_DOC_COMMENT===e[0])this.startAttributes.comments.push(new PHPParser_Comment_Doc(e[1],e[2]));else if(this.dropTokens[e[0]]===undefined)return this.tokenValue=e[1],this.startAttributes.startLine=e[2],this.endAttributes.endLine=this.line,this.tokenMap[e[0]]}return this.startAttributes.startLine=this.line,0},r.Parser.prototype.tokenName=function(e){var t=["T_INCLUDE","T_INCLUDE_ONCE","T_EVAL","T_REQUIRE","T_REQUIRE_ONCE","T_LOGICAL_OR","T_LOGICAL_XOR","T_LOGICAL_AND","T_PRINT","T_PLUS_EQUAL","T_MINUS_EQUAL","T_MUL_EQUAL","T_DIV_EQUAL","T_CONCAT_EQUAL","T_MOD_EQUAL","T_AND_EQUAL","T_OR_EQUAL","T_XOR_EQUAL","T_SL_EQUAL","T_SR_EQUAL","T_BOOLEAN_OR","T_BOOLEAN_AND","T_IS_EQUAL","T_IS_NOT_EQUAL","T_IS_IDENTICAL","T_IS_NOT_IDENTICAL","T_IS_SMALLER_OR_EQUAL","T_IS_GREATER_OR_EQUAL","T_SL","T_SR","T_INSTANCEOF","T_INC","T_DEC","T_INT_CAST","T_DOUBLE_CAST","T_STRING_CAST","T_ARRAY_CAST","T_OBJECT_CAST","T_BOOL_CAST","T_UNSET_CAST","T_NEW","T_CLONE","T_EXIT","T_IF","T_ELSEIF","T_ELSE","T_ENDIF","T_LNUMBER","T_DNUMBER","T_STRING","T_STRING_VARNAME","T_VARIABLE","T_NUM_STRING","T_INLINE_HTML","T_CHARACTER","T_BAD_CHARACTER","T_ENCAPSED_AND_WHITESPACE","T_CONSTANT_ENCAPSED_STRING","T_ECHO","T_DO","T_WHILE","T_ENDWHILE","T_FOR","T_ENDFOR","T_FOREACH","T_ENDFOREACH","T_DECLARE","T_ENDDECLARE","T_AS","T_SWITCH","T_ENDSWITCH","T_CASE","T_DEFAULT","T_BREAK","T_CONTINUE","T_GOTO","T_FUNCTION","T_CONST","T_RETURN","T_TRY","T_CATCH","T_THROW","T_USE","T_INSTEADOF","T_GLOBAL","T_STATIC","T_ABSTRACT","T_FINAL","T_PRIVATE","T_PROTECTED","T_PUBLIC","T_VAR","T_UNSET","T_ISSET","T_EMPTY","T_HALT_COMPILER","T_CLASS","T_TRAIT","T_INTERFACE","T_EXTENDS","T_IMPLEMENTS","T_OBJECT_OPERATOR","T_DOUBLE_ARROW","T_LIST","T_ARRAY","T_CALLABLE","T_CLASS_C","T_TRAIT_C","T_METHOD_C","T_FUNC_C","T_LINE","T_FILE","T_COMMENT","T_DOC_COMMENT","T_OPEN_TAG","T_OPEN_TAG_WITH_ECHO","T_CLOSE_TAG","T_WHITESPACE","T_START_HEREDOC","T_END_HEREDOC","T_DOLLAR_OPEN_CURLY_BRACES","T_CURLY_OPEN","T_PAAMAYIM_NEKUDOTAYIM","T_DOUBLE_COLON","T_NAMESPACE","T_NS_C","T_DIR","T_NS_SEPARATOR"],n="UNKNOWN";return t.some(function(t){return r.Constants[t]===e?(n=t,!0):!1}),n},r.Parser.prototype.createTokenMap=function(){var e={},t,n,i=r.Constants.T_PAAMAYIM_NEKUDOTAYIM;for(n=256;n<1e3;++n)i===n?e[n]=this.T_PAAMAYIM_NEKUDOTAYIM:r.Constants.T_OPEN_TAG_WITH_ECHO===n?e[n]=r.Constants.T_ECHO:r.Constants.T_CLOSE_TAG===n?e[n]=59:"UNKNOWN"!==(t=this.tokenName(n))&&(e[n]=this[t]);return e};var i=function(){this.yyval=this.yyastk[this.stackPos-0]};r.Parser.prototype.MakeArray=function(e){return Array.isArray(e)?e:[e]},r.Parser.prototype.parseString=function(e){var t=0;return"b"===e[0]&&(t=1),"'"===e[t]?e=e.replace(["\\\\","\\'"],["\\","'"]):e=this.parseEscapeSequences(e,'"'),e},r.Parser.prototype.parseEscapeSequences=function(e,t){undefined!==t&&(e=e.replace(new RegExp("\\"+t,"g"),t));var n={"\\":"\\",$:"$",n:"\n",r:"\r",t:"	",f:"\f",v:"",e:""};return e.replace(/~\\\\([\\\\$nrtfve]|[xX][0-9a-fA-F]{1,2}|[0-7]{1,3})~/g,function(e){var t=e[1];return n[t]!==undefined?n[t]:"x"===t[0]||"X"===t[0]?chr(hexdec(t)):chr(octdec(t))})},r.Parser.prototype.TOKEN_NONE=-1,r.Parser.prototype.TOKEN_INVALID=149,r.Parser.prototype.TOKEN_MAP_SIZE=384,r.Parser.prototype.YYLAST=913,r.Parser.prototype.YY2TBLSTATE=328,r.Parser.prototype.YYGLAST=415,r.Parser.prototype.YYNLSTATES=544,r.Parser.prototype.YYUNEXPECTED=32767,r.Parser.prototype.YYDEFAULT=-32766,r.Parser.prototype.YYERRTOK=256,r.Parser.prototype.T_INCLUDE=257,r.Parser.prototype.T_INCLUDE_ONCE=258,r.Parser.prototype.T_EVAL=259,r.Parser.prototype.T_REQUIRE=260,r.Parser.prototype.T_REQUIRE_ONCE=261,r.Parser.prototype.T_LOGICAL_OR=262,r.Parser.prototype.T_LOGICAL_XOR=263,r.Parser.prototype.T_LOGICAL_AND=264,r.Parser.prototype.T_PRINT=265,r.Parser.prototype.T_PLUS_EQUAL=266,r.Parser.prototype.T_MINUS_EQUAL=267,r.Parser.prototype.T_MUL_EQUAL=268,r.Parser.prototype.T_DIV_EQUAL=269,r.Parser.prototype.T_CONCAT_EQUAL=270,r.Parser.prototype.T_MOD_EQUAL=271,r.Parser.prototype.T_AND_EQUAL=272,r.Parser.prototype.T_OR_EQUAL=273,r.Parser.prototype.T_XOR_EQUAL=274,r.Parser.prototype.T_SL_EQUAL=275,r.Parser.prototype.T_SR_EQUAL=276,r.Parser.prototype.T_BOOLEAN_OR=277,r.Parser.prototype.T_BOOLEAN_AND=278,r.Parser.prototype.T_IS_EQUAL=279,r.Parser.prototype.T_IS_NOT_EQUAL=280,r.Parser.prototype.T_IS_IDENTICAL=281,r.Parser.prototype.T_IS_NOT_IDENTICAL=282,r.Parser.prototype.T_IS_SMALLER_OR_EQUAL=283,r.Parser.prototype.T_IS_GREATER_OR_EQUAL=284,r.Parser.prototype.T_SL=285,r.Parser.prototype.T_SR=286,r.Parser.prototype.T_INSTANCEOF=287,r.Parser.prototype.T_INC=288,r.Parser.prototype.T_DEC=289,r.Parser.prototype.T_INT_CAST=290,r.Parser.prototype.T_DOUBLE_CAST=291,r.Parser.prototype.T_STRING_CAST=292,r.Parser.prototype.T_ARRAY_CAST=293,r.Parser.prototype.T_OBJECT_CAST=294,r.Parser.prototype.T_BOOL_CAST=295,r.Parser.prototype.T_UNSET_CAST=296,r.Parser.prototype.T_NEW=297,r.Parser.prototype.T_CLONE=298,r.Parser.prototype.T_EXIT=299,r.Parser.prototype.T_IF=300,r.Parser.prototype.T_ELSEIF=301,r.Parser.prototype.T_ELSE=302,r.Parser.prototype.T_ENDIF=303,r.Parser.prototype.T_LNUMBER=304,r.Parser.prototype.T_DNUMBER=305,r.Parser.prototype.T_STRING=306,r.Parser.prototype.T_STRING_VARNAME=307,r.Parser.prototype.T_VARIABLE=308,r.Parser.prototype.T_NUM_STRING=309,r.Parser.prototype.T_INLINE_HTML=310,r.Parser.prototype.T_CHARACTER=311,r.Parser.prototype.T_BAD_CHARACTER=312,r.Parser.prototype.T_ENCAPSED_AND_WHITESPACE=313,r.Parser.prototype.T_CONSTANT_ENCAPSED_STRING=314,r.Parser.prototype.T_ECHO=315,r.Parser.prototype.T_DO=316,r.Parser.prototype.T_WHILE=317,r.Parser.prototype.T_ENDWHILE=318,r.Parser.prototype.T_FOR=319,r.Parser.prototype.T_ENDFOR=320,r.Parser.prototype.T_FOREACH=321,r.Parser.prototype.T_ENDFOREACH=322,r.Parser.prototype.T_DECLARE=323,r.Parser.prototype.T_ENDDECLARE=324,r.Parser.prototype.T_AS=325,r.Parser.prototype.T_SWITCH=326,r.Parser.prototype.T_ENDSWITCH=327,r.Parser.prototype.T_CASE=328,r.Parser.prototype.T_DEFAULT=329,r.Parser.prototype.T_BREAK=330,r.Parser.prototype.T_CONTINUE=331,r.Parser.prototype.T_GOTO=332,r.Parser.prototype.T_FUNCTION=333,r.Parser.prototype.T_CONST=334,r.Parser.prototype.T_RETURN=335,r.Parser.prototype.T_TRY=336,r.Parser.prototype.T_CATCH=337,r.Parser.prototype.T_THROW=338,r.Parser.prototype.T_USE=339,r.Parser.prototype.T_INSTEADOF=340,r.Parser.prototype.T_GLOBAL=341,r.Parser.prototype.T_STATIC=342,r.Parser.prototype.T_ABSTRACT=343,r.Parser.prototype.T_FINAL=344,r.Parser.prototype.T_PRIVATE=345,r.Parser.prototype.T_PROTECTED=346,r.Parser.prototype.T_PUBLIC=347,r.Parser.prototype.T_VAR=348,r.Parser.prototype.T_UNSET=349,r.Parser.prototype.T_ISSET=350,r.Parser.prototype.T_EMPTY=351,r.Parser.prototype.T_HALT_COMPILER=352,r.Parser.prototype.T_CLASS=353,r.Parser.prototype.T_TRAIT=354,r.Parser.prototype.T_INTERFACE=355,r.Parser.prototype.T_EXTENDS=356,r.Parser.prototype.T_IMPLEMENTS=357,r.Parser.prototype.T_OBJECT_OPERATOR=358,r.Parser.prototype.T_DOUBLE_ARROW=359,r.Parser.prototype.T_LIST=360,r.Parser.prototype.T_ARRAY=361,r.Parser.prototype.T_CALLABLE=362,r.Parser.prototype.T_CLASS_C=363,r.Parser.prototype.T_TRAIT_C=364,r.Parser.prototype.T_METHOD_C=365,r.Parser.prototype.T_FUNC_C=366,r.Parser.prototype.T_LINE=367,r.Parser.prototype.T_FILE=368,r.Parser.prototype.T_COMMENT=369,r.Parser.prototype.T_DOC_COMMENT=370,r.Parser.prototype.T_OPEN_TAG=371,r.Parser.prototype.T_OPEN_TAG_WITH_ECHO=372,r.Parser.prototype.T_CLOSE_TAG=373,r.Parser.prototype.T_WHITESPACE=374,r.Parser.prototype.T_START_HEREDOC=375,r.Parser.prototype.T_END_HEREDOC=376,r.Parser.prototype.T_DOLLAR_OPEN_CURLY_BRACES=377,r.Parser.prototype.T_CURLY_OPEN=378,r.Parser.prototype.T_PAAMAYIM_NEKUDOTAYIM=379,r.Parser.prototype.T_NAMESPACE=380,r.Parser.prototype.T_NS_C=381,r.Parser.prototype.T_DIR=382,r.Parser.prototype.T_NS_SEPARATOR=383,r.Parser.prototype.terminals=["$EOF","error","T_INCLUDE","T_INCLUDE_ONCE","T_EVAL","T_REQUIRE","T_REQUIRE_ONCE","','","T_LOGICAL_OR","T_LOGICAL_XOR","T_LOGICAL_AND","T_PRINT","'='","T_PLUS_EQUAL","T_MINUS_EQUAL","T_MUL_EQUAL","T_DIV_EQUAL","T_CONCAT_EQUAL","T_MOD_EQUAL","T_AND_EQUAL","T_OR_EQUAL","T_XOR_EQUAL","T_SL_EQUAL","T_SR_EQUAL","'?'","':'","T_BOOLEAN_OR","T_BOOLEAN_AND","'|'","'^'","'&'","T_IS_EQUAL","T_IS_NOT_EQUAL","T_IS_IDENTICAL","T_IS_NOT_IDENTICAL","'<'","T_IS_SMALLER_OR_EQUAL","'>'","T_IS_GREATER_OR_EQUAL","T_SL","T_SR","'+'","'-'","'.'","'*'","'/'","'%'","'!'","T_INSTANCEOF","'~'","T_INC","T_DEC","T_INT_CAST","T_DOUBLE_CAST","T_STRING_CAST","T_ARRAY_CAST","T_OBJECT_CAST","T_BOOL_CAST","T_UNSET_CAST","'@'","'['","T_NEW","T_CLONE","T_EXIT","T_IF","T_ELSEIF","T_ELSE","T_ENDIF","T_LNUMBER","T_DNUMBER","T_STRING","T_STRING_VARNAME","T_VARIABLE","T_NUM_STRING","T_INLINE_HTML","T_ENCAPSED_AND_WHITESPACE","T_CONSTANT_ENCAPSED_STRING","T_ECHO","T_DO","T_WHILE","T_ENDWHILE","T_FOR","T_ENDFOR","T_FOREACH","T_ENDFOREACH","T_DECLARE","T_ENDDECLARE","T_AS","T_SWITCH","T_ENDSWITCH","T_CASE","T_DEFAULT","T_BREAK","T_CONTINUE","T_GOTO","T_FUNCTION","T_CONST","T_RETURN","T_TRY","T_CATCH","T_THROW","T_USE","T_INSTEADOF","T_GLOBAL","T_STATIC","T_ABSTRACT","T_FINAL","T_PRIVATE","T_PROTECTED","T_PUBLIC","T_VAR","T_UNSET","T_ISSET","T_EMPTY","T_HALT_COMPILER","T_CLASS","T_TRAIT","T_INTERFACE","T_EXTENDS","T_IMPLEMENTS","T_OBJECT_OPERATOR","T_DOUBLE_ARROW","T_LIST","T_ARRAY","T_CALLABLE","T_CLASS_C","T_TRAIT_C","T_METHOD_C","T_FUNC_C","T_LINE","T_FILE","T_START_HEREDOC","T_END_HEREDOC","T_DOLLAR_OPEN_CURLY_BRACES","T_CURLY_OPEN","T_PAAMAYIM_NEKUDOTAYIM","T_NAMESPACE","T_NS_C","T_DIR","T_NS_SEPARATOR","';'","'{'","'}'","'('","')'","'$'","']'","'`'","'\"'","???"],r.Parser.prototype.translate=[0,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,47,148,149,145,46,30,149,143,144,44,41,7,42,43,45,149,149,149,149,149,149,149,149,149,149,25,140,35,12,37,24,59,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,60,149,146,29,149,147,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,141,28,142,49,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,1,2,3,4,5,6,8,9,10,11,13,14,15,16,17,18,19,20,21,22,23,26,27,31,32,33,34,36,38,39,40,48,50,51,52,53,54,55,56,57,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,149,149,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,149,149,149,149,149,149,131,132,133,134,135,136,137,138,139],r.Parser.prototype.yyaction=[61,62,363,63,64,-32766,-32766,-32766,509,65,708,709,710,707,706,705,-32766,-32766,-32766,-32766,-32766,-32766,132,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767,-32766,335,-32766,-32766,-32766,-32766,-32766,66,67,351,663,664,40,68,548,69,232,233,70,71,72,73,74,75,76,77,30,246,78,336,364,-112,0,469,833,834,365,641,890,436,590,41,835,53,27,366,294,367,687,368,921,369,923,922,370,-32766,-32766,-32766,42,43,371,339,126,44,372,337,79,297,349,292,293,-32766,918,-32766,-32766,373,374,375,376,377,391,199,361,338,573,613,378,379,380,381,845,839,840,841,842,836,837,253,-32766,87,88,89,391,843,838,338,597,519,128,80,129,273,332,257,261,47,673,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,799,247,884,108,109,110,226,247,21,-32766,310,-32766,-32766,-32766,642,548,-32766,-32766,-32766,-32766,56,353,-32766,-32766,-32766,55,-32766,-32766,-32766,-32766,-32766,58,-32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766,557,-32766,-32766,518,-32766,548,890,-32766,390,-32766,228,252,-32766,-32766,-32766,-32766,-32766,275,-32766,234,-32766,587,588,-32766,-32766,-32766,-32766,-32766,-32766,-32766,46,236,-32766,-32766,281,-32766,682,348,-32766,390,-32766,346,333,521,-32766,-32766,-32766,271,911,262,237,446,911,-32766,894,59,700,358,135,548,123,538,35,-32766,333,122,-32766,-32766,-32766,271,-32766,124,-32766,692,-32766,-32766,-32766,-32766,700,273,22,-32766,-32766,-32766,-32766,239,-32766,-32766,612,-32766,548,134,-32766,390,-32766,462,354,-32766,-32766,-32766,-32766,-32766,227,-32766,238,-32766,845,542,-32766,856,611,200,-32766,-32766,-32766,259,280,-32766,-32766,201,-32766,855,129,-32766,390,130,202,333,206,-32766,-32766,-32766,271,-32766,-32766,-32766,125,601,-32766,136,299,700,489,28,548,105,106,107,-32766,498,499,-32766,-32766,-32766,207,-32766,133,-32766,525,-32766,-32766,-32766,-32766,663,664,527,-32766,-32766,-32766,-32766,528,-32766,-32766,610,-32766,548,427,-32766,390,-32766,532,539,-32766,-32766,-32766,-32766,-32766,240,-32766,247,-32766,697,543,-32766,554,523,608,-32766,-32766,-32766,686,535,-32766,-32766,54,-32766,57,60,-32766,390,246,-155,278,345,-32766,-32766,-32766,506,347,-152,471,402,403,-32766,405,404,272,493,416,548,318,417,505,-32766,517,548,-32766,-32766,-32766,549,-32766,562,-32766,916,-32766,-32766,-32766,-32766,564,826,848,-32766,-32766,-32766,-32766,694,-32766,-32766,485,-32766,548,487,-32766,390,-32766,504,802,-32766,-32766,-32766,-32766,-32766,279,-32766,911,-32766,502,492,-32766,413,483,269,-32766,-32766,-32766,243,337,-32766,-32766,418,-32766,454,229,-32766,390,274,373,374,344,-32766,-32766,-32766,360,614,-32766,573,613,378,379,-274,548,615,-332,844,-32766,258,51,-32766,-32766,-32766,270,-32766,346,-32766,52,-32766,260,0,-32766,-333,-32766,-32766,-32766,-32766,-32766,-32766,205,-32766,-32766,49,-32766,548,424,-32766,390,-32766,-266,264,-32766,-32766,-32766,-32766,-32766,409,-32766,343,-32766,265,312,-32766,470,513,-275,-32766,-32766,-32766,920,337,-32766,-32766,530,-32766,531,600,-32766,390,592,373,374,578,581,-32766,-32766,644,629,-32766,573,613,378,379,635,548,636,576,627,-32766,625,693,-32766,-32766,-32766,691,-32766,591,-32766,582,-32766,203,204,-32766,584,583,-32766,-32766,-32766,-32766,586,599,-32766,-32766,589,-32766,690,558,-32766,390,197,683,919,86,520,522,-32766,524,833,834,529,533,-32766,534,537,541,835,48,111,112,113,114,115,116,117,118,119,120,121,127,31,633,337,330,634,585,-32766,32,291,337,330,478,373,374,917,291,891,889,875,373,374,553,613,378,379,737,739,887,553,613,378,379,824,451,675,839,840,841,842,836,837,320,895,277,885,23,33,843,838,556,277,337,330,-32766,34,-32766,555,291,36,37,38,373,374,39,45,50,81,82,83,84,553,613,378,379,-32767,-32767,-32767,-32767,103,104,105,106,107,337,85,131,137,337,138,198,224,225,277,373,374,-332,230,373,374,24,337,231,573,613,378,379,573,613,378,379,373,374,235,248,249,250,337,251,0,573,613,378,379,276,329,331,373,374,-32766,337,574,490,792,337,609,573,613,378,379,373,374,25,300,373,374,319,337,795,573,613,378,379,573,613,378,379,373,374,516,355,359,445,482,796,507,573,613,378,379,508,548,337,890,775,791,337,604,803,808,806,698,373,374,888,807,373,374,-32766,-32766,-32766,573,613,378,379,573,613,378,379,873,832,804,872,851,-32766,809,-32766,-32766,-32766,-32766,805,20,26,29,298,480,515,770,778,827,457,0,900,455,774,0,0,0,874,870,886,823,915,852,869,488,0,391,793,0,338,0,0,0,340,0,273],r.Parser.prototype.yycheck=[2,3,4,5,6,8,9,10,70,11,104,105,106,107,108,109,8,9,10,8,9,24,60,26,27,28,29,30,31,32,33,34,24,7,26,27,28,29,30,41,42,7,123,124,7,47,70,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,144,0,75,68,69,70,25,72,70,74,7,76,77,78,79,7,81,142,83,70,85,72,73,88,8,9,10,92,93,94,95,7,97,98,95,100,7,7,103,104,24,142,26,27,105,106,111,112,113,136,7,7,139,114,115,116,117,122,123,132,125,126,127,128,129,130,131,8,8,9,10,136,137,138,139,140,141,25,143,141,145,142,147,148,24,72,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,144,48,72,44,45,46,30,48,144,64,72,8,9,10,140,70,8,9,10,74,60,25,77,78,79,60,81,24,83,26,85,60,24,88,26,27,28,92,93,94,64,140,97,98,70,100,70,72,103,104,74,145,7,77,78,79,111,81,7,83,30,85,140,140,88,8,9,10,92,93,94,133,134,97,98,145,100,140,7,103,104,24,139,96,141,140,141,111,101,75,75,30,70,75,64,70,60,110,121,12,70,141,25,143,74,96,141,77,78,79,101,81,141,83,140,85,140,141,88,110,145,144,92,93,94,64,7,97,98,142,100,70,141,103,104,74,145,141,77,78,79,111,81,7,83,30,85,132,25,88,132,142,12,92,93,94,120,60,97,98,12,100,148,141,103,104,141,12,96,12,140,141,111,101,8,9,10,141,25,64,90,91,110,65,66,70,41,42,43,74,65,66,77,78,79,12,81,25,83,25,85,140,141,88,123,124,25,92,93,94,64,25,97,98,142,100,70,120,103,104,74,25,25,77,78,79,111,81,30,83,48,85,140,141,88,140,141,30,92,93,94,140,141,97,98,60,100,60,60,103,104,61,72,75,70,140,141,111,67,70,87,99,70,70,64,70,72,102,89,70,70,71,70,70,74,70,70,77,78,79,70,81,70,83,70,85,140,141,88,70,144,70,92,93,94,64,70,97,98,72,100,70,72,103,104,74,72,72,77,78,79,111,81,75,83,75,85,89,86,88,79,101,118,92,93,94,87,95,97,98,87,100,87,87,103,104,118,105,106,95,140,141,111,95,115,64,114,115,116,117,135,70,115,120,132,74,120,140,77,78,79,119,81,139,83,140,85,120,-1,88,120,140,141,92,93,94,64,121,97,98,121,100,70,122,103,104,74,135,135,77,78,79,111,81,139,83,139,85,135,135,88,135,135,135,92,93,94,142,95,97,98,140,100,140,140,103,104,140,105,106,140,140,141,111,140,140,64,114,115,116,117,140,70,140,140,140,74,140,140,77,78,79,140,81,140,83,140,85,41,42,88,140,140,141,92,93,94,140,140,97,98,140,100,140,140,103,104,60,140,142,141,141,141,111,141,68,69,141,141,72,141,141,141,76,12,13,14,15,16,17,18,19,20,21,22,23,141,143,142,95,96,142,140,141,143,101,95,96,142,105,106,142,101,142,142,142,105,106,114,115,116,117,50,51,142,114,115,116,117,142,123,142,125,126,127,128,129,130,131,142,136,142,144,143,137,138,142,136,95,96,143,143,145,142,101,143,143,143,105,106,143,143,143,143,143,143,143,114,115,116,117,35,36,37,38,39,40,41,42,43,95,143,143,143,95,143,143,143,143,136,105,106,120,143,105,106,144,95,143,114,115,116,117,114,115,116,117,105,106,143,143,143,143,95,143,-1,114,115,116,117,143,143,143,105,106,143,95,142,80,146,95,142,114,115,116,117,105,106,144,144,105,106,144,95,142,114,115,116,117,114,115,116,117,105,106,82,144,144,144,144,142,84,114,115,116,117,144,70,95,72,144,144,95,142,144,146,144,142,105,106,146,144,105,106,8,9,10,114,115,116,117,114,115,116,117,144,144,144,144,144,24,104,26,27,28,29,144,144,144,144,144,144,144,144,144,144,144,-1,144,144,144,-1,-1,-1,146,146,146,146,146,146,146,146,-1,136,147,-1,139,-1,-1,-1,143,-1,145],r.Parser.prototype.yybase=[0,574,581,623,655,2,718,402,747,659,672,688,743,701,705,483,483,483,483,483,351,356,366,366,367,366,344,-2,-2,-2,200,200,231,231,231,231,231,231,231,231,200,231,451,482,532,316,370,115,146,285,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,44,474,429,476,481,487,488,739,740,741,734,733,416,736,539,541,342,542,543,552,557,559,536,567,737,755,569,735,738,123,123,123,123,123,123,123,123,123,122,11,336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,227,227,173,577,577,577,577,577,577,577,577,577,577,577,79,178,846,8,-3,-3,-3,-3,642,706,706,706,706,157,179,242,431,431,360,431,525,368,767,767,767,767,767,767,767,767,767,767,767,767,350,375,315,315,652,652,-81,-81,-81,-81,251,185,188,184,-62,348,195,195,195,408,392,410,1,192,129,129,129,-24,-24,-24,-24,499,-24,-24,-24,113,108,108,12,161,349,526,271,398,529,438,130,206,265,427,76,414,427,288,295,76,166,44,262,422,141,491,372,494,413,71,92,93,267,135,100,34,415,745,746,742,-38,420,-10,135,147,744,498,107,26,493,144,377,363,369,332,363,400,377,588,377,376,377,360,37,582,376,377,374,376,388,363,364,412,369,377,441,443,390,106,332,377,390,377,400,64,590,591,323,592,589,593,649,608,362,500,399,407,620,625,636,365,354,614,524,425,359,355,423,570,578,357,406,414,394,352,403,531,433,403,653,434,385,417,411,444,310,318,501,425,668,757,380,637,684,403,609,387,87,325,638,382,403,639,403,696,503,615,403,697,384,435,425,352,352,352,700,66,699,583,702,707,704,748,721,749,584,750,358,583,722,751,682,215,613,422,436,389,447,221,257,752,403,403,506,499,403,395,685,397,426,753,392,391,647,683,403,418,754,221,723,587,724,450,568,507,648,509,327,725,353,497,610,454,622,455,461,404,510,373,732,612,247,361,664,463,405,692,641,464,465,511,343,437,335,409,396,665,293,467,468,472,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,0,0,0,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,0,0,0,0,0,0,0,0,0,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,767,767,767,767,767,767,767,767,767,767,767,123,123,123,123,123,123,123,123,0,129,129,129,129,-94,-94,-94,767,767,767,767,767,767,0,0,0,0,0,0,0,0,0,0,0,0,-94,-94,129,129,767,767,-24,-24,-24,-24,-24,108,108,108,-24,108,145,145,145,108,108,108,100,100,0,0,0,0,0,0,0,145,0,0,0,376,0,0,0,145,260,260,221,260,260,135,0,0,425,376,0,364,376,0,0,0,0,0,0,531,0,87,637,241,425,0,0,0,0,0,0,0,425,289,289,306,0,358,0,0,0,306,241,0,0,221],r.Parser.prototype.yydefault=[3,32767,32767,1,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,104,96,110,95,106,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,358,358,122,122,122,122,122,122,122,122,316,32767,32767,32767,32767,32767,32767,32767,32767,32767,173,173,173,32767,348,348,348,348,348,348,348,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,363,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,232,233,235,236,172,125,349,362,171,199,201,250,200,177,182,183,184,185,186,187,188,189,190,191,192,176,229,228,197,313,313,316,32767,32767,32767,32767,32767,32767,32767,32767,198,202,204,203,219,220,217,218,175,221,222,223,224,157,157,157,357,357,32767,357,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,158,32767,211,212,276,276,117,117,117,117,117,32767,32767,32767,32767,284,32767,32767,32767,32767,32767,286,32767,32767,206,207,205,32767,32767,32767,32767,32767,32767,32767,32767,32767,285,32767,32767,32767,32767,32767,32767,32767,32767,334,321,272,32767,32767,32767,265,32767,107,109,32767,32767,32767,32767,302,339,32767,32767,32767,17,32767,32767,32767,370,334,32767,32767,19,32767,32767,32767,32767,227,32767,338,332,32767,32767,32767,32767,32767,32767,63,32767,32767,32767,32767,32767,63,281,63,32767,63,32767,315,287,32767,63,74,32767,72,32767,32767,76,32767,63,93,93,254,315,54,63,254,63,32767,32767,32767,32767,4,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,267,32767,323,32767,337,336,324,32767,265,32767,215,194,266,32767,196,32767,32767,270,273,32767,32767,32767,134,32767,268,180,32767,32767,32767,32767,365,32767,32767,174,32767,32767,32767,130,32767,61,332,32767,32767,355,32767,32767,332,269,208,209,210,32767,121,32767,310,32767,32767,32767,32767,32767,32767,327,32767,333,32767,32767,32767,32767,111,32767,302,32767,32767,32767,75,32767,32767,178,126,32767,32767,364,32767,32767,32767,320,32767,32767,32767,32767,32767,62,32767,32767,77,32767,32767,32767,32767,332,32767,32767,32767,115,32767,169,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,332,32767,32767,32767,32767,32767,32767,32767,4,32767,151,32767,32767,32767,32767,32767,32767,32767,25,25,3,137,3,137,25,101,25,25,137,93,93,25,25,25,144,25,25,25,25,25,25,25,25],r.Parser.prototype.yygoto=[141,141,173,173,173,173,173,173,173,173,141,173,142,143,144,148,153,155,181,175,172,172,172,172,174,174,174,174,174,174,174,168,169,170,171,179,757,758,392,760,781,782,783,784,785,786,787,789,725,145,146,147,149,150,151,152,154,177,178,180,196,208,209,210,211,212,213,214,215,217,218,219,220,244,245,266,267,268,430,431,432,182,183,184,185,186,187,188,189,190,191,192,156,157,158,159,176,160,194,161,162,163,164,195,165,193,139,166,167,452,452,452,452,452,452,452,452,452,452,452,453,453,453,453,453,453,453,453,453,453,453,551,551,551,464,491,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,407,552,552,552,810,810,662,662,662,662,662,594,283,595,510,399,399,567,679,632,849,850,863,660,714,426,222,622,622,622,622,223,617,623,494,395,395,395,395,395,395,395,395,395,395,395,395,395,395,395,395,395,395,465,472,514,904,398,398,425,425,459,425,419,322,421,421,393,396,412,422,428,460,463,473,481,501,5,476,284,327,1,15,2,6,7,550,550,550,8,9,10,668,16,11,17,12,18,13,19,14,704,328,881,881,643,628,626,626,624,626,526,401,652,647,847,847,847,847,847,847,847,847,847,847,847,437,438,441,447,477,479,497,290,910,910,400,400,486,880,880,263,913,910,303,255,723,306,822,821,306,896,896,896,861,304,323,410,913,913,897,316,420,769,658,559,879,671,536,324,466,565,311,311,311,801,241,676,496,439,440,442,444,448,475,631,858,311,285,286,603,495,712,0,406,321,0,0,0,314,0,0,429,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,411],r.Parser.prototype.yygcheck=[15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,35,35,35,35,35,35,35,35,35,35,35,86,86,86,86,86,86,86,86,86,86,86,6,6,6,21,21,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,71,7,7,7,35,35,35,35,35,35,35,29,44,29,35,86,86,12,12,12,12,12,12,12,12,75,40,35,35,35,35,40,35,35,35,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,82,36,36,36,104,82,82,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,13,42,42,42,2,13,2,13,13,5,5,5,13,13,13,54,13,13,13,13,13,13,13,13,67,67,83,83,5,5,5,5,5,5,5,5,5,5,93,93,93,93,93,93,93,93,93,93,93,52,52,52,52,52,52,52,4,105,105,89,89,94,84,84,92,105,105,26,92,71,4,91,91,4,84,84,84,97,30,70,30,105,105,102,27,30,72,50,10,84,55,46,9,30,11,90,90,90,80,30,56,30,85,85,85,85,85,85,43,96,90,44,44,34,77,69,-1,4,90,-1,-1,-1,4,-1,-1,4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,71],r.Parser.prototype.yygbase=[0,0,-286,0,10,239,130,154,0,-10,25,-23,-29,-289,0,-30,0,0,0,0,0,83,0,0,0,0,245,84,-11,142,-28,0,0,0,-13,-88,-42,0,0,0,-344,0,-38,-12,-188,0,23,0,0,0,66,0,247,0,205,24,-18,0,0,0,0,0,0,0,0,0,0,13,0,-15,85,74,70,0,0,148,0,-14,0,0,-6,0,-35,11,47,278,-77,0,0,44,68,43,38,72,94,0,-16,109,0,0,0,0,87,0,170,34,0],r.Parser.prototype.yygdefault=[-32768,362,3,546,382,570,571,572,307,305,560,566,467,4,568,140,295,575,296,500,577,414,579,580,308,309,415,315,216,593,503,313,596,357,602,301,449,383,350,461,221,423,456,630,282,638,540,646,649,450,657,352,433,434,667,672,677,680,334,325,474,684,685,256,689,511,512,703,242,711,317,724,342,788,790,397,408,484,797,326,800,384,385,386,387,435,818,815,289,866,287,443,254,853,468,356,903,862,288,388,389,302,898,341,905,912,458],r.Parser.prototype.yylhs=[0,1,2,2,4,4,3,3,3,3,3,3,3,3,3,8,8,10,10,10,10,9,9,11,13,13,14,14,14,14,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,33,33,34,27,27,30,30,6,7,7,7,37,37,37,38,38,41,41,39,39,42,42,22,22,29,29,32,32,31,31,43,23,23,23,23,44,44,45,45,46,46,20,20,16,16,47,18,18,48,17,17,19,19,36,36,49,49,50,50,51,51,51,51,52,52,53,53,54,54,24,24,55,55,55,25,25,56,56,40,40,57,57,57,57,62,62,63,63,64,64,64,64,65,66,66,61,61,58,58,60,60,68,68,67,67,67,67,67,67,59,59,69,69,26,26,21,21,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,71,77,77,79,79,80,81,81,81,81,81,81,86,86,35,35,35,72,72,87,87,82,82,88,88,88,88,88,73,73,73,76,76,76,78,78,93,93,93,93,93,93,93,93,93,93,93,93,93,93,12,12,12,12,12,12,74,74,74,74,94,94,96,96,95,95,97,97,28,28,28,28,99,99,98,98,98,98,98,100,100,84,84,89,89,83,83,101,101,101,101,90,90,90,90,85,85,91,91,91,70,70,102,102,102,75,75,103,103,104,104,104,104,92,92,92,92,105,105,105,105,105,105,105,106,106,106],r.Parser.prototype.yylen=[1,1,2,0,1,3,1,1,1,1,3,5,4,3,3,3,1,1,3,2,4,3,1,3,2,0,1,1,1,1,3,7,10,5,7,9,5,2,3,2,3,2,3,3,3,3,1,2,5,7,8,10,5,1,5,3,3,2,1,2,8,1,3,0,1,9,7,6,5,1,2,2,0,2,0,2,0,2,1,3,1,4,1,4,1,4,1,3,3,3,4,4,5,0,2,4,3,1,1,1,4,0,2,5,0,2,6,0,2,0,3,1,0,1,3,3,5,0,1,1,1,1,0,1,3,1,2,3,1,1,2,4,3,1,1,3,2,0,3,3,8,3,1,3,0,2,4,5,4,4,3,1,1,1,3,1,1,0,1,1,2,1,1,1,1,1,1,1,3,1,3,3,1,0,1,1,6,3,4,4,1,2,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,5,4,4,4,2,2,4,2,2,2,2,2,2,2,2,2,2,2,1,4,3,3,2,9,10,3,0,4,1,3,2,4,6,8,4,4,4,1,1,1,2,3,1,1,1,1,1,1,0,3,3,4,4,0,2,3,0,1,1,0,3,1,1,1,1,1,1,1,1,1,1,1,3,2,1,1,3,2,2,4,3,1,3,3,3,0,2,0,1,3,1,3,1,1,1,1,1,6,4,3,6,4,4,4,1,3,1,2,1,1,4,1,3,6,4,4,4,4,1,4,0,1,1,3,1,3,1,1,4,0,0,2,3,1,3,1,4,2,2,2,1,2,1,4,3,3,3,6,3,1,1,1],r.Parser.prototype.yyn0=function(){this.yyval=this.yyastk[this.stackPos]},r.Parser.prototype.yyn1=function(e){this.yyval=this.Stmt_Namespace_postprocess(this.yyastk[this.stackPos-0])},r.Parser.prototype.yyn2=function(e){Array.isArray(this.yyastk[this.stackPos-0])?this.yyval=this.yyastk[this.stackPos-1].concat(this.yyastk[this.stackPos-0]):(this.yyastk[this.stackPos-1].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-1])},r.Parser.prototype.yyn3=function(e){this.yyval=[]},r.Parser.prototype.yyn4=function(e){this.yyval=[this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn5=function(e){this.yyastk[this.stackPos-2].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-2]},r.Parser.prototype.yyn6=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn7=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn8=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn9=function(e){this.yyval=this.Node_Stmt_HaltCompiler(e)},r.Parser.prototype.yyn10=function(e){this.yyval=this.Node_Stmt_Namespace(this.Node_Name(this.yyastk[this.stackPos-1],e),null,e)},r.Parser.prototype.yyn11=function(e){this.yyval=this.Node_Stmt_Namespace(this.Node_Name(this.yyastk[this.stackPos-3],e),this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn12=function(e){this.yyval=this.Node_Stmt_Namespace(null,this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn13=function(e){this.yyval=this.Node_Stmt_Use(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn14=function(e){this.yyval=this.Node_Stmt_Const(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn15=function(e){this.yyastk[this.stackPos-2].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-2]},r.Parser.prototype.yyn16=function(e){this.yyval=[this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn17=function(e){this.yyval=this.Node_Stmt_UseUse(this.Node_Name(this.yyastk[this.stackPos-0],e),null,e)},r.Parser.prototype.yyn18=function(e){this.yyval=this.Node_Stmt_UseUse(this.Node_Name(this.yyastk[this.stackPos-2],e),this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn19=function(e){this.yyval=this.Node_Stmt_UseUse(this.Node_Name(this.yyastk[this.stackPos-0],e),null,e)},r.Parser.prototype.yyn20=function(e){this.yyval=this.Node_Stmt_UseUse(this.Node_Name(this.yyastk[this.stackPos-2],e),this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn21=function(e){this.yyastk[this.stackPos-2].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-2]},r.Parser.prototype.yyn22=function(e){this.yyval=[this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn23=function(e){this.yyval=this.Node_Const(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn24=function(e){Array.isArray(this.yyastk[this.stackPos-0])?this.yyval=this.yyastk[this.stackPos-1].concat(this.yyastk[this.stackPos-0]):(this.yyastk[this.stackPos-1].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-1])},r.Parser.prototype.yyn25=function(e){this.yyval=[]},r.Parser.prototype.yyn26=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn27=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn28=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn29=function(e){throw new Error("__halt_compiler() can only be used from the outermost scope")},r.Parser.prototype.yyn30=function(e){this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn31=function(e){this.yyval=this.Node_Stmt_If(this.yyastk[this.stackPos-4],{stmts:Array.isArray(this.yyastk[this.stackPos-2])?this.yyastk[this.stackPos-2]:[this.yyastk[this.stackPos-2]],elseifs:this.yyastk[this.stackPos-1],Else:this.yyastk[this.stackPos-0]},e)},r.Parser.prototype.yyn32=function(e){this.yyval=this.Node_Stmt_If(this.yyastk[this.stackPos-7],{stmts:this.yyastk[this.stackPos-4],elseifs:this.yyastk[this.stackPos-3],"else":this.yyastk[this.stackPos-2]},e)},r.Parser.prototype.yyn33=function(e){this.yyval=this.Node_Stmt_While(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn34=function(e){this.yyval=this.Node_Stmt_Do(this.yyastk[this.stackPos-2],Array.isArray(this.yyastk[this.stackPos-5])?this.yyastk[this.stackPos-5]:[this.yyastk[this.stackPos-5]],e)},r.Parser.prototype.yyn35=function(e){this.yyval=this.Node_Stmt_For({init:this.yyastk[this.stackPos-6],cond:this.yyastk[this.stackPos-4],loop:this.yyastk[this.stackPos-2],stmts:this.yyastk[this.stackPos-0]},e)},r.Parser.prototype.yyn36=function(e){this.yyval=this.Node_Stmt_Switch(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn37=function(e){this.yyval=this.Node_Stmt_Break(null,e)},r.Parser.prototype.yyn38=function(e){this.yyval=this.Node_Stmt_Break(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn39=function(e){this.yyval=this.Node_Stmt_Continue(null,e)},r.Parser.prototype.yyn40=function(e){this.yyval=this.Node_Stmt_Continue(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn41=function(e){this.yyval=this.Node_Stmt_Return(null,e)},r.Parser.prototype.yyn42=function(e){this.yyval=this.Node_Stmt_Return(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn43=function(e){this.yyval=this.Node_Stmt_Global(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn44=function(e){this.yyval=this.Node_Stmt_Static(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn45=function(e){this.yyval=this.Node_Stmt_Echo(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn46=function(e){this.yyval=this.Node_Stmt_InlineHTML(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn47=function(e){this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn48=function(e){this.yyval=this.Node_Stmt_Unset(this.yyastk[this.stackPos-2],e)},r.Parser.prototype.yyn49=function(e){this.yyval=this.Node_Stmt_Foreach(this.yyastk[this.stackPos-4],this.yyastk[this.stackPos-2],{keyVar:null,byRef:!1,stmts:this.yyastk[this.stackPos-0]},e)},r.Parser.prototype.yyn50=function(e){this.yyval=this.Node_Stmt_Foreach(this.yyastk[this.stackPos-5],this.yyastk[this.stackPos-2],{keyVar:null,byRef:!0,stmts:this.yyastk[this.stackPos-0]},e)},r.Parser.prototype.yyn51=function(e){this.yyval=this.Node_Stmt_Foreach(this.yyastk[this.stackPos-7],this.yyastk[this.stackPos-2],{keyVar:this.yyastk[this.stackPos-5],byRef:this.yyastk[this.stackPos-3],stmts:this.yyastk[this.stackPos-0]},e)},r.Parser.prototype.yyn52=function(e){this.yyval=this.Node_Stmt_Declare(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn53=function(e){this.yyval=[]},r.Parser.prototype.yyn54=function(e){this.yyval=this.Node_Stmt_TryCatch(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn55=function(e){this.yyval=this.Node_Stmt_Throw(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn56=function(e){this.yyval=this.Node_Stmt_Goto(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn57=function(e){this.yyval=this.Node_Stmt_Label(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn58=function(e){this.yyval=[this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn59=function(e){this.yyastk[this.stackPos-1].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn60=function(e){this.yyval=this.Node_Stmt_Catch(this.yyastk[this.stackPos-5],this.yyastk[this.stackPos-4].substring(1),this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn61=function(e){this.yyval=[this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn62=function(e){this.yyastk[this.stackPos-2].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-2]},r.Parser.prototype.yyn63=function(e){this.yyval=!1},r.Parser.prototype.yyn64=function(e){this.yyval=!0},r.Parser.prototype.yyn65=function(e){this.yyval=this.Node_Stmt_Function(this.yyastk[this.stackPos-6],{byRef:this.yyastk[this.stackPos-7],params:this.yyastk[this.stackPos-4],stmts:this.yyastk[this.stackPos-1]},e)},r.Parser.prototype.yyn66=function(e){this.yyval=this.Node_Stmt_Class(this.yyastk[this.stackPos-5],{type:this.yyastk[this.stackPos-6],Extends:this.yyastk[this.stackPos-4],Implements:this.yyastk[this.stackPos-3],stmts:this.yyastk[this.stackPos-1]},e)},r.Parser.prototype.yyn67=function(e){this.yyval=this.Node_Stmt_Interface(this.yyastk[this.stackPos-4],{Extends:this.yyastk[this.stackPos-3],stmts:this.yyastk[this.stackPos-1]},e)},r.Parser.prototype.yyn68=function(e){this.yyval=this.Node_Stmt_Trait(this.yyastk[this.stackPos-3],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn69=function(e){this.yyval=0},r.Parser.prototype.yyn70=function(e){this.yyval=this.MODIFIER_ABSTRACT},r.Parser.prototype.yyn71=function(e){this.yyval=this.MODIFIER_FINAL},r.Parser.prototype.yyn72=function(e){this.yyval=null},r.Parser.prototype.yyn73=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn74=function(e){this.yyval=[]},r.Parser.prototype.yyn75=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn76=function(e){this.yyval=[]},r.Parser.prototype.yyn77=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn78=function(e){this.yyval=[this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn79=function(e){this.yyastk[this.stackPos-2].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-2]},r.Parser.prototype.yyn80=function(e){this.yyval=Array.isArray(this.yyastk[this.stackPos-0])?this.yyastk[this.stackPos-0]:[this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn81=function(e){this.yyval=this.yyastk[this.stackPos-2]},r.Parser.prototype.yyn82=function(e){this.yyval=Array.isArray(this.yyastk[this.stackPos-0])?this.yyastk[this.stackPos-0]:[this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn83=function(e){this.yyval=this.yyastk[this.stackPos-2]},r.Parser.prototype.yyn84=function(e){this.yyval=Array.isArray(this.yyastk[this.stackPos-0])?this.yyastk[this.stackPos-0]:[this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn85=function(e){this.yyval=this.yyastk[this.stackPos-2]},r.Parser.prototype.yyn86=function(e){this.yyval=[this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn87=function(e){this.yyastk[this.stackPos-2].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-2]},r.Parser.prototype.yyn88=function(e){this.yyval=this.Node_Stmt_DeclareDeclare(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn89=function(e){this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn90=function(e){this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn91=function(e){this.yyval=this.yyastk[this.stackPos-2]},r.Parser.prototype.yyn92=function(e){this.yyval=this.yyastk[this.stackPos-2]},r.Parser.prototype.yyn93=function(e){this.yyval=[]},r.Parser.prototype.yyn94=function(e){this.yyastk[this.stackPos-1].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn95=function(e){this.yyval=this.Node_Stmt_Case(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn96=function(e){this.yyval=this.Node_Stmt_Case(null,this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn97=function(){this.yyval=this.yyastk[this.stackPos]},r.Parser.prototype.yyn98=function(){this.yyval=this.yyastk[this.stackPos]},r.Parser.prototype.yyn99=function(e){this.yyval=Array.isArray(this.yyastk[this.stackPos-0])?this.yyastk[this.stackPos-0]:[this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn100=function(e){this.yyval=this.yyastk[this.stackPos-2]},r.Parser.prototype.yyn101=function(e){this.yyval=[]},r.Parser.prototype.yyn102=function(e){this.yyastk[this.stackPos-1].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn103=function(e){this.yyval=this.Node_Stmt_ElseIf(this.yyastk[this.stackPos-2],Array.isArray(this.yyastk[this.stackPos-0])?this.yyastk[this.stackPos-0]:[this.yyastk[this.stackPos-0]],e)},r.Parser.prototype.yyn104=function(e){this.yyval=[]},r.Parser.prototype.yyn105=function(e){this.yyastk[this.stackPos-1].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn106=function(e){this.yyval=this.Node_Stmt_ElseIf(this.yyastk[this.stackPos-3],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn107=function(e){this.yyval=null},r.Parser.prototype.yyn108=function(e){this.yyval=this.Node_Stmt_Else(Array.isArray(this.yyastk[this.stackPos-0])?this.yyastk[this.stackPos-0]:[this.yyastk[this.stackPos-0]],e)},r.Parser.prototype.yyn109=function(e){this.yyval=null},r.Parser.prototype.yyn110=function(e){this.yyval=this.Node_Stmt_Else(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn111=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn112=function(e){this.yyval=[]},r.Parser.prototype.yyn113=function(e){this.yyval=[this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn114=function(e){this.yyastk[this.stackPos-2].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-2]},r.Parser.prototype.yyn115=function(e){this.yyval=this.Node_Param(this.yyastk[this.stackPos-0].substring(1),null,this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn116=function(e){this.yyval=this.Node_Param(this.yyastk[this.stackPos-2].substring(1),this.yyastk[this.stackPos-0],this.yyastk[this.stackPos-4],this.yyastk[this.stackPos-3],e)},r.Parser.prototype.yyn117=function(e){this.yyval=null},r.Parser.prototype.yyn118=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn119=function(e){this.yyval="array"},r.Parser.prototype.yyn120=function(e){this.yyval="callable"},r.Parser.prototype.yyn121=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn122=function(e){this.yyval=[]},r.Parser.prototype.yyn123=function(e){this.yyval=[this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn124=function(e){this.yyastk[this.stackPos-2].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-2]},r.Parser.prototype.yyn125=function(e){this.yyval=this.Node_Arg(this.yyastk[this.stackPos-0],!1,e)},r.Parser.prototype.yyn126=function(e){this.yyval=this.Node_Arg(this.yyastk[this.stackPos-0],!0,e)},r.Parser.prototype.yyn127=function(e){this.yyastk[this.stackPos-2].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-2]},r.Parser.prototype.yyn128=function(e){this.yyval=[this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn129=function(e){this.yyval=this.Node_Expr_Variable(this.yyastk[this.stackPos-0].substring(1),e)},r.Parser.prototype.yyn130=function(e){this.yyval=this.Node_Expr_Variable(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn131=function(e){this.yyval=this.Node_Expr_Variable(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn132=function(e){this.yyastk[this.stackPos-2].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-2]},r.Parser.prototype.yyn133=function(e){this.yyval=[this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn134=function(e){this.yyval=this.Node_Stmt_StaticVar(this.yyastk[this.stackPos-0].substring(1),null,e)},r.Parser.prototype.yyn135=function(e){this.yyval=this.Node_Stmt_StaticVar(this.yyastk[this.stackPos-2].substring(1),this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn136=function(e){this.yyastk[this.stackPos-1].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn137=function(e){this.yyval=[]},r.Parser.prototype.yyn138=function(e){this.yyval=this.Node_Stmt_Property(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn139=function(e){this.yyval=this.Node_Stmt_ClassConst(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn140=function(e){this.yyval=this.Node_Stmt_ClassMethod(this.yyastk[this.stackPos-4],{type:this.yyastk[this.stackPos-7],byRef:this.yyastk[this.stackPos-5],params:this.yyastk[this.stackPos-2],stmts:this.yyastk[this.stackPos-0]},e)},r.Parser.prototype.yyn141=function(e){this.yyval=this.Node_Stmt_TraitUse(this.yyastk[this.stackPos-1],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn142=function(e){this.yyval=[]},r.Parser.prototype.yyn143=function(e){this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn144=function(e){this.yyval=[]},r.Parser.prototype.yyn145=function(e){this.yyastk[this.stackPos-1].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn146=function(e){this.yyval=this.Node_Stmt_TraitUseAdaptation_Precedence(this.yyastk[this.stackPos-3][0],this.yyastk[this.stackPos-3][1],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn147=function(e){this.yyval=this.Node_Stmt_TraitUseAdaptation_Alias(this.yyastk[this.stackPos-4][0],this.yyastk[this.stackPos-4][1],this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn148=function(e){this.yyval=this.Node_Stmt_TraitUseAdaptation_Alias(this.yyastk[this.stackPos-3][0],this.yyastk[this.stackPos-3][1],this.yyastk[this.stackPos-1],null,e)},r.Parser.prototype.yyn149=function(e){this.yyval=this.Node_Stmt_TraitUseAdaptation_Alias(this.yyastk[this.stackPos-3][0],this.yyastk[this.stackPos-3][1],null,this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn150=function(e){this.yyval=array(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0])},r.Parser.prototype.yyn151=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn152=function(e){this.yyval=array(null,this.yyastk[this.stackPos-0])},r.Parser.prototype.yyn153=function(e){this.yyval=null},r.Parser.prototype.yyn154=function(e){this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn155=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn156=function(e){this.yyval=this.MODIFIER_PUBLIC},r.Parser.prototype.yyn157=function(e){this.yyval=this.MODIFIER_PUBLIC},r.Parser.prototype.yyn158=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn159=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn160=function(e){this.Stmt_Class_verifyModifier(this.yyastk[this.stackPos-1],this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-1]|this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn161=function(e){this.yyval=this.MODIFIER_PUBLIC},r.Parser.prototype.yyn162=function(e){this.yyval=this.MODIFIER_PROTECTED},r.Parser.prototype.yyn163=function(e){this.yyval=this.MODIFIER_PRIVATE},r.Parser.prototype.yyn164=function(e){this.yyval=this.MODIFIER_STATIC},r.Parser.prototype.yyn165=function(e){this.yyval=this.MODIFIER_ABSTRACT},r.Parser.prototype.yyn166=function(e){this.yyval=this.MODIFIER_FINAL},r.Parser.prototype.yyn167=function(e){this.yyval=[this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn168=function(e){this.yyastk[this.stackPos-2].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-2]},r.Parser.prototype.yyn169=function(e){this.yyval=this.Node_Stmt_PropertyProperty(this.yyastk[this.stackPos-0].substring(1),null,e)},r.Parser.prototype.yyn170=function(e){this.yyval=this.Node_Stmt_PropertyProperty(this.yyastk[this.stackPos-2].substring(1),this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn171=function(e){this.yyastk[this.stackPos-2].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-2]},r.Parser.prototype.yyn172=function(e){this.yyval=[this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn173=function(e){this.yyval=[]},r.Parser.prototype.yyn174=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn175=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn176=function(e){this.yyval=this.Node_Expr_AssignList(this.yyastk[this.stackPos-3],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn177=function(e){this.yyval=this.Node_Expr_Assign(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn178=function(e){this.yyval=this.Node_Expr_AssignRef(this.yyastk[this.stackPos-3],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn179=function(e){this.yyval=this.Node_Expr_AssignRef(this.yyastk[this.stackPos-3],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn180=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn181=function(e){this.yyval=this.Node_Expr_Clone(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn182=function(e){this.yyval=this.Node_Expr_AssignPlus(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn183=function(e){this.yyval=this.Node_Expr_AssignMinus(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn184=function(e){this.yyval=this.Node_Expr_AssignMul(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn185=function(e){this.yyval=this.Node_Expr_AssignDiv(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn186=function(e){this.yyval=this.Node_Expr_AssignConcat(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn187=function(e){this.yyval=this.Node_Expr_AssignMod(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn188=function(e){this.yyval=this.Node_Expr_AssignBitwiseAnd(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn189=function(e){this.yyval=this.Node_Expr_AssignBitwiseOr(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn190=function(e){this.yyval=this.Node_Expr_AssignBitwiseXor(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn191=function(e){this.yyval=this.Node_Expr_AssignShiftLeft(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn192=function(e){this.yyval=this.Node_Expr_AssignShiftRight(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn193=function(e){this.yyval=this.Node_Expr_PostInc(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn194=function(e){this.yyval=this.Node_Expr_PreInc(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn195=function(e){this.yyval=this.Node_Expr_PostDec(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn196=function(e){this.yyval=this.Node_Expr_PreDec(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn197=function(e){this.yyval=this.Node_Expr_BooleanOr(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn198=function(e){this.yyval=this.Node_Expr_BooleanAnd(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn199=function(e){this.yyval=this.Node_Expr_LogicalOr(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn200=function(e){this.yyval=this.Node_Expr_LogicalAnd(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn201=function(e){this.yyval=this.Node_Expr_LogicalXor(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn202=function(e){this.yyval=this.Node_Expr_BitwiseOr(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn203=function(e){this.yyval=this.Node_Expr_BitwiseAnd(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn204=function(e){this.yyval=this.Node_Expr_BitwiseXor(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn205=function(e){this.yyval=this.Node_Expr_Concat(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn206=function(e){this.yyval=this.Node_Expr_Plus(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn207=function(e){this.yyval=this.Node_Expr_Minus(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn208=function(e){this.yyval=this.Node_Expr_Mul(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn209=function(e){this.yyval=this.Node_Expr_Div(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn210=function(e){this.yyval=this.Node_Expr_Mod(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn211=function(e){this.yyval=this.Node_Expr_ShiftLeft(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn212=function(e){this.yyval=this.Node_Expr_ShiftRight(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn213=function(e){this.yyval=this.Node_Expr_UnaryPlus(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn214=function(e){this.yyval=this.Node_Expr_UnaryMinus(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn215=function(e){this.yyval=this.Node_Expr_BooleanNot(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn216=function(e){this.yyval=this.Node_Expr_BitwiseNot(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn217=function(e){this.yyval=this.Node_Expr_Identical(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn218=function(e){this.yyval=this.Node_Expr_NotIdentical(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn219=function(e){this.yyval=this.Node_Expr_Equal(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn220=function(e){this.yyval=this.Node_Expr_NotEqual(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn221=function(e){this.yyval=this.Node_Expr_Smaller(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn222=function(e){this.yyval=this.Node_Expr_SmallerOrEqual(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn223=function(e){this.yyval=this.Node_Expr_Greater(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn224=function(e){this.yyval=this.Node_Expr_GreaterOrEqual(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn225=function(e){this.yyval=this.Node_Expr_Instanceof(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn226=function(e){this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn227=function(e){this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn228=function(e){this.yyval=this.Node_Expr_Ternary(this.yyastk[this.stackPos-4],this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn229=function(e){this.yyval=this.Node_Expr_Ternary(this.yyastk[this.stackPos-3],null,this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn230=function(e){this.yyval=this.Node_Expr_Isset(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn231=function(e){this.yyval=this.Node_Expr_Empty(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn232=function(e){this.yyval=this.Node_Expr_Include(this.yyastk[this.stackPos-0],"Node_Expr_Include",e)},r.Parser.prototype.yyn233=function(e){this.yyval=this.Node_Expr_Include(this.yyastk[this.stackPos-0],"Node_Expr_IncludeOnce",e)},r.Parser.prototype.yyn234=function(e){this.yyval=this.Node_Expr_Eval(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn235=function(e){this.yyval=this.Node_Expr_Include(this.yyastk[this.stackPos-0],"Node_Expr_Require",e)},r.Parser.prototype.yyn236=function(e){this.yyval=this.Node_Expr_Include(this.yyastk[this.stackPos-0],"Node_Expr_RequireOnce",e)},r.Parser.prototype.yyn237=function(e){this.yyval=this.Node_Expr_Cast_Int(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn238=function(e){this.yyval=this.Node_Expr_Cast_Double(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn239=function(e){this.yyval=this.Node_Expr_Cast_String(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn240=function(e){this.yyval=this.Node_Expr_Cast_Array(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn241=function(e){this.yyval=this.Node_Expr_Cast_Object(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn242=function(e){this.yyval=this.Node_Expr_Cast_Bool(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn243=function(e){this.yyval=this.Node_Expr_Cast_Unset(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn244=function(e){this.yyval=this.Node_Expr_Exit(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn245=function(e){this.yyval=this.Node_Expr_ErrorSuppress(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn246=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn247=function(e){this.yyval=this.Node_Expr_Array(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn248=function(e){this.yyval=this.Node_Expr_Array(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn249=function(e){this.yyval=this.Node_Expr_ShellExec(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn250=function(e){this.yyval=this.Node_Expr_Print(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn251=function(e){this.yyval=this.Node_Expr_Closure({"static":!1,byRef:this.yyastk[this.stackPos-7],params:this.yyastk[this.stackPos-5],uses:this.yyastk[this.stackPos-3],stmts:this.yyastk[this.stackPos-1]},e)},r.Parser.prototype.yyn252=function(e){this.yyval=this.Node_Expr_Closure({"static":!0,byRef:this.yyastk[this.stackPos-7],params:this.yyastk[this.stackPos-5],uses:this.yyastk[this.stackPos-3],stmts:this.yyastk[this.stackPos-1]},e)},r.Parser.prototype.yyn253=function(e){this.yyval=this.Node_Expr_New(this.yyastk[this.stackPos-1],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn254=function(e){this.yyval=[]},r.Parser.prototype.yyn255=function(e){this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn256=function(e){this.yyval=[this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn257=function(e){this.yyastk[this.stackPos-2].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-2]},r.Parser.prototype.yyn258=function(e){this.yyval=this.Node_Expr_ClosureUse(this.yyastk[this.stackPos-0].substring(1),this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn259=function(e){this.yyval=this.Node_Expr_FuncCall(this.yyastk[this.stackPos-3],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn260=function(e){this.yyval=this.Node_Expr_StaticCall(this.yyastk[this.stackPos-5],this.yyastk[this.stackPos-3],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn261=function(e){this.yyval=this.Node_Expr_StaticCall(this.yyastk[this.stackPos-7],this.yyastk[this.stackPos-4],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn262=function(e){if(this.yyastk[this.stackPos-3].type==="Node_Expr_StaticPropertyFetch")this.yyval=this.Node_Expr_StaticCall(this.yyastk[this.stackPos-3].Class,this.Node_Expr_Variable(this.yyastk[this.stackPos-3].name,e),this.yyastk[this.stackPos-1],e);else{if(this.yyastk[this.stackPos-3].type!=="Node_Expr_ArrayDimFetch")throw new Exception;var t=this.yyastk[this.stackPos-3];while(t.variable.type==="Node_Expr_ArrayDimFetch")t=t.variable;this.yyval=this.Node_Expr_StaticCall(t.variable.Class,this.yyastk[this.stackPos-3],this.yyastk[this.stackPos-1],e),t.variable=this.Node_Expr_Variable(t.variable.name,e)}},r.Parser.prototype.yyn263=function(e){this.yyval=this.Node_Expr_FuncCall(this.yyastk[this.stackPos-3],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn264=function(e){this.yyval=this.Node_Expr_ArrayDimFetch(this.yyastk[this.stackPos-3],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn265=function(e){this.yyval=this.Node_Name("static",e)},r.Parser.prototype.yyn266=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn267=function(e){this.yyval=this.Node_Name(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn268=function(e){this.yyval=this.Node_Name_FullyQualified(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn269=function(e){this.yyval=this.Node_Name_Relative(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn270=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn271=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn272=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn273=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn274=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn275=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn276=function(){this.yyval=this.yyastk[this.stackPos]},r.Parser.prototype.yyn277=function(e){this.yyval=this.Node_Expr_PropertyFetch(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn278=function(e){this.yyval=this.Node_Expr_PropertyFetch(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn279=function(e){this.yyval=this.Node_Expr_ArrayDimFetch(this.yyastk[this.stackPos-3],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn280=function(e){this.yyval=this.Node_Expr_ArrayDimFetch(this.yyastk[this.stackPos-3],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn281=function(e){this.yyval=null},r.Parser.prototype.yyn282=function(e){this.yyval=null},r.Parser.prototype.yyn283=function(e){this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn284=function(e){this.yyval=[]},r.Parser.prototype.yyn285=function(e){this.yyval=[this.Scalar_String_parseEscapeSequences(this.yyastk[this.stackPos-0],"`")]},r.Parser.prototype.yyn286=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn287=function(e){this.yyval=[]},r.Parser.prototype.yyn288=function(e){this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn289=function(e){this.yyval=this.Node_Scalar_LNumber(this.Scalar_LNumber_parse(this.yyastk[this.stackPos-0]),e)},r.Parser.prototype.yyn290=function(e){this.yyval=this.Node_Scalar_DNumber(this.Scalar_DNumber_parse(this.yyastk[this.stackPos-0]),e)},r.Parser.prototype.yyn291=function(e){this.yyval=this.Scalar_String_create(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn292=function(e){this.yyval={type:"Node_Scalar_LineConst",attributes:e}},r.Parser.prototype.yyn293=function(e){this.yyval={type:"Node_Scalar_FileConst",attributes:e}},r.Parser.prototype.yyn294=function(e){this.yyval={type:"Node_Scalar_DirConst",attributes:e}},r.Parser.prototype.yyn295=function(e){this.yyval={type:"Node_Scalar_ClassConst",attributes:e}},r.Parser.prototype.yyn296=function(e){this.yyval={type:"Node_Scalar_TraitConst",attributes:e}},r.Parser.prototype.yyn297=function(e){this.yyval={type:"Node_Scalar_MethodConst",attributes:e}},r.Parser.prototype.yyn298=function(e){this.yyval={type:"Node_Scalar_FuncConst",attributes:e}},r.Parser.prototype.yyn299=function(e){this.yyval={type:"Node_Scalar_NSConst",attributes:e}},r.Parser.prototype.yyn300=function(e){this.yyval=this.Node_Scalar_String(this.Scalar_String_parseDocString(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-1]),e)},r.Parser.prototype.yyn301=function(e){this.yyval=this.Node_Scalar_String("",e)},r.Parser.prototype.yyn302=function(e){this.yyval=this.Node_Expr_ConstFetch(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn303=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn304=function(e){this.yyval=this.Node_Expr_ClassConstFetch(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn305=function(e){this.yyval=this.Node_Expr_UnaryPlus(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn306=function(e){this.yyval=this.Node_Expr_UnaryMinus(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn307=function(e){this.yyval=this.Node_Expr_Array(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn308=function(e){this.yyval=this.Node_Expr_Array(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn309=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn310=function(e){this.yyval=this.Node_Expr_ClassConstFetch(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn311=function(e){this.yyval=this.Node_Scalar_Encapsed(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn312=function(e){this.yyval=this.Node_Scalar_Encapsed(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn313=function(e){this.yyval=[]},r.Parser.prototype.yyn314=function(e){this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn315=function(){this.yyval=this.yyastk[this.stackPos]},r.Parser.prototype.yyn316=function(){this.yyval=this.yyastk[this.stackPos]},r.Parser.prototype.yyn317=function(e){this.yyastk[this.stackPos-2].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-2]},r.Parser.prototype.yyn318=function(e){this.yyval=[this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn319=function(e){this.yyval=this.Node_Expr_ArrayItem(this.yyastk[this.stackPos-0],this.yyastk[this.stackPos-2],!1,e)},r.Parser.prototype.yyn320=function(e){this.yyval=this.Node_Expr_ArrayItem(this.yyastk[this.stackPos-0],null,!1,e)},r.Parser.prototype.yyn321=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn322=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn323=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn324=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn325=function(e){this.yyval=this.Node_Expr_ArrayDimFetch(this.yyastk[this.stackPos-4],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn326=function(e){this.yyval=this.Node_Expr_ArrayDimFetch(this.yyastk[this.stackPos-3],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn327=function(e){this.yyval=this.Node_Expr_PropertyFetch(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn328=function(e){this.yyval=this.Node_Expr_MethodCall(this.yyastk[this.stackPos-5],this.yyastk[this.stackPos-3],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn329=function(e){this.yyval=this.Node_Expr_FuncCall(this.yyastk[this.stackPos-3],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn330=function(e){this.yyval=this.Node_Expr_ArrayDimFetch(this.yyastk[this.stackPos-3],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn331=function(e){this.yyval=this.Node_Expr_ArrayDimFetch(this.yyastk[this.stackPos-3],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn332=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn333=function(e){this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn334=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn335=function(e){this.yyval=this.Node_Expr_Variable(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn336=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn337=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn338=function(e){this.yyval=this.Node_Expr_StaticPropertyFetch(this.yyastk[this.stackPos-3],this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn339=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn340=function(e){this.yyval=this.Node_Expr_StaticPropertyFetch(this.yyastk[this.stackPos-2],this.yyastk[this.stackPos-0].substring(1),e)},r.Parser.prototype.yyn341=function(e){this.yyval=this.Node_Expr_StaticPropertyFetch(this.yyastk[this.stackPos-5],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn342=function(e){this.yyval=this.Node_Expr_ArrayDimFetch(this.yyastk[this.stackPos-3],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn343=function(e){this.yyval=this.Node_Expr_ArrayDimFetch(this.yyastk[this.stackPos-3],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn344=function(e){this.yyval=this.Node_Expr_ArrayDimFetch(this.yyastk[this.stackPos-3],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn345=function(e){this.yyval=this.Node_Expr_ArrayDimFetch(this.yyastk[this.stackPos-3],this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn346=function(e){this.yyval=this.Node_Expr_Variable(this.yyastk[this.stackPos-0].substring(1),e)},r.Parser.prototype.yyn347=function(e){this.yyval=this.Node_Expr_Variable(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn348=function(e){this.yyval=null},r.Parser.prototype.yyn349=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn350=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn351=function(e){this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn352=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn353=function(e){this.yyastk[this.stackPos-2].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-2]},r.Parser.prototype.yyn354=function(e){this.yyval=[this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn355=function(e){this.yyval=this.yyastk[this.stackPos-0]},r.Parser.prototype.yyn356=function(e){this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn357=function(e){this.yyval=null},r.Parser.prototype.yyn358=function(e){this.yyval=[]},r.Parser.prototype.yyn359=function(e){this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn360=function(e){this.yyastk[this.stackPos-2].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-2]},r.Parser.prototype.yyn361=function(e){this.yyval=[this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn362=function(e){this.yyval=this.Node_Expr_ArrayItem(this.yyastk[this.stackPos-0],this.yyastk[this.stackPos-2],!1,e)},r.Parser.prototype.yyn363=function(e){this.yyval=this.Node_Expr_ArrayItem(this.yyastk[this.stackPos-0],null,!1,e)},r.Parser.prototype.yyn364=function(e){this.yyval=this.Node_Expr_ArrayItem(this.yyastk[this.stackPos-0],this.yyastk[this.stackPos-3],!0,e)},r.Parser.prototype.yyn365=function(e){this.yyval=this.Node_Expr_ArrayItem(this.yyastk[this.stackPos-0],null,!0,e)},r.Parser.prototype.yyn366=function(e){this.yyastk[this.stackPos-1].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn367=function(e){this.yyastk[this.stackPos-1].push(this.yyastk[this.stackPos-0]),this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn368=function(e){this.yyval=[this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn369=function(e){this.yyval=[this.yyastk[this.stackPos-1],this.yyastk[this.stackPos-0]]},r.Parser.prototype.yyn370=function(e){this.yyval=this.Node_Expr_Variable(this.yyastk[this.stackPos-0].substring(1),e)},r.Parser.prototype.yyn371=function(e){this.yyval=this.Node_Expr_ArrayDimFetch(this.Node_Expr_Variable(this.yyastk[this.stackPos-3].substring(1),e),this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn372=function(e){this.yyval=this.Node_Expr_PropertyFetch(this.Node_Expr_Variable(this.yyastk[this.stackPos-2].substring(1),e),this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn373=function(e){this.yyval=this.Node_Expr_Variable(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn374=function(e){this.yyval=this.Node_Expr_Variable(this.yyastk[this.stackPos-1],e)},r.Parser.prototype.yyn375=function(e){this.yyval=this.Node_Expr_ArrayDimFetch(this.Node_Expr_Variable(this.yyastk[this.stackPos-4],e),this.yyastk[this.stackPos-2],e)},r.Parser.prototype.yyn376=function(e){this.yyval=this.yyastk[this.stackPos-1]},r.Parser.prototype.yyn377=function(e){this.yyval=this.Node_Scalar_String(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn378=function(e){this.yyval=this.Node_Scalar_String(this.yyastk[this.stackPos-0],e)},r.Parser.prototype.yyn379=function(e){this.yyval=this.Node_Expr_Variable(this.yyastk[this.stackPos-0].substring(1),e)},r.Parser.prototype.Stmt_Namespace_postprocess=function(e){return e},r.Parser.prototype.Node_Stmt_Echo=function(){return{type:"Node_Stmt_Echo",exprs:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Stmt_If=function(){return{type:"Node_Stmt_If",cond:arguments[0],stmts:arguments[1].stmts,elseifs:arguments[1].elseifs,Else:arguments[1].Else||null,attributes:arguments[2]}},r.Parser.prototype.Node_Stmt_For=function(){return{type:"Node_Stmt_For",init:arguments[0].init,cond:arguments[0].cond,loop:arguments[0].loop,stmts:arguments[0].stmts,attributes:arguments[1]}},r.Parser.prototype.Node_Stmt_Function=function(){return{type:"Node_Stmt_Function",name:arguments[0],byRef:arguments[1].byRef,params:arguments[1].params,stmts:arguments[1].stmts,attributes:arguments[2]}},r.Parser.prototype.Stmt_Class_verifyModifier=function(){},r.Parser.prototype.Node_Stmt_Namespace=function(){return{type:"Node_Stmt_Namespace",name:arguments[0],attributes:arguments[2]}},r.Parser.prototype.Node_Stmt_Use=function(){return{type:"Node_Stmt_Use",name:arguments[0],attributes:arguments[2]}},r.Parser.prototype.Node_Stmt_UseUse=function(){return{type:"Node_Stmt_UseUse",name:arguments[0],as:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Stmt_TraitUseAdaptation_Precedence=function(){return{type:"Node_Stmt_TraitUseAdaptation_Precedence",name:arguments[0],attributes:arguments[2]}},r.Parser.prototype.Node_Stmt_TraitUseAdaptation_Alias=function(){return{type:"Node_Stmt_TraitUseAdaptation_Alias",name:arguments[0],attributes:arguments[2]}},r.Parser.prototype.Node_Stmt_Trait=function(){return{type:"Node_Stmt_Trait",name:arguments[0],attributes:arguments[2]}},r.Parser.prototype.Node_Stmt_TraitUse=function(){return{type:"Node_Stmt_TraitUse",name:arguments[0],attributes:arguments[2]}},r.Parser.prototype.Node_Stmt_Class=function(){return{type:"Node_Stmt_Class",name:arguments[0],Type:arguments[1].type,Extends:arguments[1].Extends,Implements:arguments[1].Implements,stmts:arguments[1].stmts,attributes:arguments[2]}},r.Parser.prototype.Node_Stmt_ClassMethod=function(){return{type:"Node_Stmt_ClassMethod",name:arguments[0],Type:arguments[1].type,byRef:arguments[1].byRef,params:arguments[1].params,stmts:arguments[1].stmts,attributes:arguments[2]}},r.Parser.prototype.Node_Stmt_ClassConst=function(){return{type:"Node_Stmt_ClassConst",consts:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Stmt_Interface=function(){return{type:"Node_Stmt_Interface",name:arguments[0],Extends:arguments[1].Extends,stmts:arguments[1].stmts,attributes:arguments[2]}},r.Parser.prototype.Node_Stmt_Throw=function(){return{type:"Node_Stmt_Throw",expr:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Stmt_Catch=function(){return{type:"Node_Stmt_Catch",Type:arguments[0],variable:arguments[1],stmts:arguments[2],attributes:arguments[3]}},r.Parser.prototype.Node_Stmt_TryCatch=function(){return{type:"Node_Stmt_TryCatch",stmts:arguments[0],catches:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Stmt_Foreach=function(){return{type:"Node_Stmt_Foreach",expr:arguments[0],valueVar:arguments[1],keyVar:arguments[2].keyVar,byRef:arguments[2].byRef,stmts:arguments[2].stmts,attributes:arguments[3]}},r.Parser.prototype.Node_Stmt_While=function(){return{type:"Node_Stmt_While",cond:arguments[0],stmts:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Stmt_Do=function(){return{type:"Node_Stmt_Do",cond:arguments[0],stmts:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Stmt_Break=function(){return{type:"Node_Stmt_Break",num:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Stmt_Continue=function(){return{type:"Node_Stmt_Continue",num:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Stmt_Return=function(){return{type:"Node_Stmt_Return",expr:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Stmt_Case=function(){return{type:"Node_Stmt_Case",cond:arguments[0],stmts:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Stmt_Switch=function(){return{type:"Node_Stmt_Switch",cond:arguments[0],cases:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Stmt_Else=function(){return{type:"Node_Stmt_Else",stmts:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Stmt_ElseIf=function(){return{type:"Node_Stmt_ElseIf",cond:arguments[0],stmts:arguments[1],attributes:arguments[1]}},r.Parser.prototype.Node_Stmt_InlineHTML=function(){return{type:"Node_Stmt_InlineHTML",value:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Stmt_StaticVar=function(){return{type:"Node_Stmt_StaticVar",name:arguments[0],def:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Stmt_Static=function(){return{type:"Node_Stmt_Static",vars:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Stmt_Global=function(){return{type:"Node_Stmt_Global",vars:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Stmt_PropertyProperty=function(){return{type:"Node_Stmt_PropertyProperty",name:arguments[0],def:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Stmt_Property=function(){return{type:"Node_Stmt_Property",Type:arguments[0],props:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Stmt_Unset=function(){return{type:"Node_Stmt_Unset",variables:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_Variable=function(e){return{type:"Node_Expr_Variable",name:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_FuncCall=function(){return{type:"Node_Expr_FuncCall",func:arguments[0],args:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_MethodCall=function(){return{type:"Node_Expr_MethodCall",variable:arguments[0],name:arguments[1],args:arguments[2],attributes:arguments[3]}},r.Parser.prototype.Node_Expr_StaticCall=function(){return{type:"Node_Expr_StaticCall",Class:arguments[0],func:arguments[1],args:arguments[2],attributes:arguments[3]}},r.Parser.prototype.Node_Expr_Ternary=function(){return{type:"Node_Expr_Ternary",cond:arguments[0],If:arguments[1],Else:arguments[2],attributes:arguments[3]}},r.Parser.prototype.Node_Expr_AssignList=function(){return{type:"Node_Expr_AssignList",assignList:arguments[0],expr:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_Assign=function(){return{type:"Node_Expr_Assign",variable:arguments[0],expr:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_AssignConcat=function(){return{type:"Node_Expr_AssignConcat",variable:arguments[0],expr:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_AssignMinus=function(){return{type:"Node_Expr_AssignMinus",variable:arguments[0],expr:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_AssignPlus=function(){return{type:"Node_Expr_AssignPlus",variable:arguments[0],expr:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_AssignDiv=function(){return{type:"Node_Expr_AssignDiv",variable:arguments[0],expr:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_AssignRef=function(){return{type:"Node_Expr_AssignRef",variable:arguments[0],refVar:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_AssignMul=function(){return{type:"Node_Expr_AssignMul",variable:arguments[0],expr:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_AssignMod=function(){return{type:"Node_Expr_AssignMod",variable:arguments[0],expr:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_Plus=function(){return{type:"Node_Expr_Plus",left:arguments[0],right:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_Minus=function(){return{type:"Node_Expr_Minus",left:arguments[0],right:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_Mul=function(){return{type:"Node_Expr_Mul",left:arguments[0],right:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_Div=function(){return{type:"Node_Expr_Div",left:arguments[0],right:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_Mod=function(){return{type:"Node_Expr_Mod",left:arguments[0],right:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_Greater=function(){return{type:"Node_Expr_Greater",left:arguments[0],right:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_Equal=function(){return{type:"Node_Expr_Equal",left:arguments[0],right:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_NotEqual=function(){return{type:"Node_Expr_NotEqual",left:arguments[0],right:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_Identical=function(){return{type:"Node_Expr_Identical",left:arguments[0],right:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_NotIdentical=function(){return{type:"Node_Expr_NotIdentical",left:arguments[0],right:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_GreaterOrEqual=function(){return{type:"Node_Expr_GreaterOrEqual",left:arguments[0],right:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_SmallerOrEqual=function(){return{type:"Node_Expr_SmallerOrEqual",left:arguments[0],right:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_Concat=function(){return{type:"Node_Expr_Concat",left:arguments[0],right:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_Smaller=function(){return{type:"Node_Expr_Smaller",left:arguments[0],right:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_PostInc=function(){return{type:"Node_Expr_PostInc",variable:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_PostDec=function(){return{type:"Node_Expr_PostDec",variable:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_PreInc=function(){return{type:"Node_Expr_PreInc",variable:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_PreDec=function(){return{type:"Node_Expr_PreDec",variable:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_Include=function(){return{expr:arguments[0],type:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_ArrayDimFetch=function(){return{type:"Node_Expr_ArrayDimFetch",variable:arguments[0],dim:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_StaticPropertyFetch=function(){return{type:"Node_Expr_StaticPropertyFetch",Class:arguments[0],name:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_ClassConstFetch=function(){return{type:"Node_Expr_ClassConstFetch",Class:arguments[0],name:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_StaticPropertyFetch=function(){return{type:"Node_Expr_StaticPropertyFetch",Class:arguments[0],name:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_ConstFetch=function(){return{type:"Node_Expr_ConstFetch",name:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_ArrayItem=function(){return{type:"Node_Expr_ArrayItem",value:arguments[0],key:arguments[1],byRef:arguments[2],attributes:arguments[3]}},r.Parser.prototype.Node_Expr_Array=function(){return{type:"Node_Expr_Array",items:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_PropertyFetch=function(){return{type:"Node_Expr_PropertyFetch",variable:arguments[0],name:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_New=function(){return{type:"Node_Expr_New",Class:arguments[0],args:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_Print=function(){return{type:"Node_Expr_Print",expr:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_Exit=function(){return{type:"Node_Expr_Exit",expr:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_Cast_Bool=function(){return{type:"Node_Expr_Cast_Bool",expr:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_Cast_Int=function(){return{type:"Node_Expr_Cast_Int",expr:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_Cast_String=function(){return{type:"Node_Expr_Cast_String",expr:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_Cast_Double=function(){return{type:"Node_Expr_Cast_Double",expr:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_Cast_Array=function(){return{type:"Node_Expr_Cast_Array",expr:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_Cast_Object=function(){return{type:"Node_Expr_Cast_Object",expr:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_ErrorSuppress=function(){return{type:"Node_Expr_ErrorSuppress",expr:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_Isset=function(){return{type:"Node_Expr_Isset",variables:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_UnaryMinus=function(){return{type:"Node_Expr_UnaryMinus",expr:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_UnaryPlus=function(){return{type:"Node_Expr_UnaryPlus",expr:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_Empty=function(){return{type:"Node_Expr_Empty",variable:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_BooleanOr=function(){return{type:"Node_Expr_BooleanOr",left:arguments[0],right:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_LogicalOr=function(){return{type:"Node_Expr_LogicalOr",left:arguments[0],right:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_LogicalAnd=function(){return{type:"Node_Expr_LogicalAnd",left:arguments[0],right:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_LogicalXor=function(){return{type:"Node_Expr_LogicalXor",left:arguments[0],right:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_BitwiseAnd=function(){return{type:"Node_Expr_BitwiseAnd",left:arguments[0],right:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_BitwiseOr=function(){return{type:"Node_Expr_BitwiseOr",left:arguments[0],right:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_BitwiseXor=function(){return{type:"Node_Expr_BitwiseXor",left:arguments[0],right:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_BitwiseNot=function(){return{type:"Node_Expr_BitwiseNot",expr:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_BooleanNot=function(){return{type:"Node_Expr_BooleanNot",expr:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Expr_BooleanAnd=function(){return{type:"Node_Expr_BooleanAnd",left:arguments[0],right:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_Instanceof=function(){return{type:"Node_Expr_Instanceof",left:arguments[0],right:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Expr_Clone=function(){return{type:"Node_Expr_Clone",expr:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Scalar_LNumber_parse=function(e){return e},r.Parser.prototype.Scalar_DNumber_parse=function(e){return e},r.Parser.prototype.Scalar_String_parseDocString=function(){return'"'+arguments[1].replace(/([^"\\]*(?:\\.[^"\\]*)*)"/g,'$1\\"')+'"'},r.Parser.prototype.Node_Scalar_String=function(){return{type:"Node_Scalar_String",value:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Scalar_String_create=function(){return{type:"Node_Scalar_String",value:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Scalar_LNumber=function(){return{type:"Node_Scalar_LNumber",value:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Scalar_DNumber=function(){return{type:"Node_Scalar_DNumber",value:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Scalar_Encapsed=function(){return{type:"Node_Scalar_Encapsed",parts:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Name=function(){return{type:"Node_Name",parts:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Name_FullyQualified=function(){return{type:"Node_Name_FullyQualified",parts:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Name_Relative=function(){return{type:"Node_Name_Relative",parts:arguments[0],attributes:arguments[1]}},r.Parser.prototype.Node_Param=function(){return{type:"Node_Param",name:arguments[0],def:arguments[1],Type:arguments[2],byRef:arguments[3],attributes:arguments[4]}},r.Parser.prototype.Node_Arg=function(){return{type:"Node_Name",value:arguments[0],byRef:arguments[1],attributes:arguments[2]}},r.Parser.prototype.Node_Const=function(){return{type:"Node_Const",name:arguments[0],value:arguments[1],attributes:arguments[2]}},t.PHP=r}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,o=e("./anchor").Anchor,u=function(e){this.$lines=[],e.length===0?this.$lines=[""]:Array.isArray(e)?this._insertLines(0,e):this.insert({row:0,column:0},e)};(function(){r.implement(this,i),this.setValue=function(e){var t=this.getLength();this.remove(new s(0,0,t,this.getLine(t-1).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new o(this,e,t)},"aaa".split(/a/).length===0?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){if(this.$newLineMode===e)return;this.$newLineMode=e,this._signal("changeNewLineMode")},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return e=="\r\n"||e=="\r"||e=="\n"},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){if(e.start.row==e.end.row)return this.getLine(e.start.row).substring(e.start.column,e.end.column);var t=this.getLines(e.start.row,e.end.row);t[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;return e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column)),t.join(this.getNewLineCharacter())},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):e.row<0&&(e.row=0),e},this.insert=function(e,t){if(!t||t.length===0)return e;e=this.$clipPosition(e),this.getLength()<=1&&this.$detectNewLine(t);var n=this.$split(t),r=n.splice(0,1)[0],i=n.length==0?null:n.splice(n.length-1,1)[0];return e=this.insertInLine(e,r),i!==null&&(e=this.insertNewLine(e),e=this._insertLines(e.row,n),e=this.insertInLine(e,i||"")),e},this.insertLines=function(e,t){return e>=this.getLength()?this.insert({row:e,column:0},"\n"+t.join("\n")):this._insertLines(Math.max(e,0),t)},this._insertLines=function(e,t){if(t.length==0)return{row:e,column:0};while(t.length>61440){var n=this._insertLines(e,t.slice(0,61440));t=t.slice(61440),e=n.row}var r=[e,0];r.push.apply(r,t),this.$lines.splice.apply(this.$lines,r);var i=new s(e,0,e+t.length,0),o={action:"insertLines",range:i,lines:t};return this._signal("change",{data:o}),i.end},this.insertNewLine=function(e){e=this.$clipPosition(e);var t=this.$lines[e.row]||"";this.$lines[e.row]=t.substring(0,e.column),this.$lines.splice(e.row+1,0,t.substring(e.column,t.length));var n={row:e.row+1,column:0},r={action:"insertText",range:s.fromPoints(e,n),text:this.getNewLineCharacter()};return this._signal("change",{data:r}),n},this.insertInLine=function(e,t){if(t.length==0)return e;var n=this.$lines[e.row]||"";this.$lines[e.row]=n.substring(0,e.column)+t+n.substring(e.column);var r={row:e.row,column:e.column+t.length},i={action:"insertText",range:s.fromPoints(e,r),text:t};return this._signal("change",{data:i}),r},this.remove=function(e){e instanceof s||(e=s.fromPoints(e.start,e.end)),e.start=this.$clipPosition(e.start),e.end=this.$clipPosition(e.end);if(e.isEmpty())return e.start;var t=e.start.row,n=e.end.row;if(e.isMultiLine()){var r=e.start.column==0?t:t+1,i=n-1;e.end.column>0&&this.removeInLine(n,0,e.end.column),i>=r&&this._removeLines(r,i),r!=t&&(this.removeInLine(t,e.start.column,this.getLine(t).length),this.removeNewLine(e.start.row))}else this.removeInLine(t,e.start.column,e.end.column);return e.start},this.removeInLine=function(e,t,n){if(t==n)return;var r=new s(e,t,e,n),i=this.getLine(e),o=i.substring(t,n),u=i.substring(0,t)+i.substring(n,i.length);this.$lines.splice(e,1,u);var a={action:"removeText",range:r,text:o};return this._signal("change",{data:a}),r.start},this.removeLines=function(e,t){return e<0||t>=this.getLength()?this.remove(new s(e,0,t+1,0)):this._removeLines(e,t)},this._removeLines=function(e,t){var n=new s(e,0,t+1,0),r=this.$lines.splice(e,t-e+1),i={action:"removeLines",range:n,nl:this.getNewLineCharacter(),lines:r};return this._signal("change",{data:i}),r},this.removeNewLine=function(e){var t=this.getLine(e),n=this.getLine(e+1),r=new s(e,t.length,e+1,0),i=t+n;this.$lines.splice(e,2,i);var o={action:"removeText",range:r,text:this.getNewLineCharacter()};this._signal("change",{data:o})},this.replace=function(e,t){e instanceof s||(e=s.fromPoints(e.start,e.end));if(t.length==0&&e.isEmpty())return e.start;if(t==this.getTextRange(e))return e.end;this.remove(e);if(t)var n=this.insert(e.start,t);else n=e.start;return n},this.applyDeltas=function(e){for(var t=0;t<e.length;t++){var n=e[t],r=s.fromPoints(n.range.start,n.range.end);n.action=="insertLines"?this.insertLines(r.start.row,n.lines):n.action=="insertText"?this.insert(r.start,n.text):n.action=="removeLines"?this._removeLines(r.start.row,r.end.row-1):n.action=="removeText"&&this.remove(r)}},this.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--){var n=e[t],r=s.fromPoints(n.range.start,n.range.end);n.action=="insertLines"?this._removeLines(r.start.row,r.end.row-1):n.action=="insertText"?this.remove(r):n.action=="removeLines"?this._insertLines(r.start.row,n.lines):n.action=="removeText"&&this.insert(r.start,n.text)}},this.indexToPosition=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length;for(var i=t||0,s=n.length;i<s;i++){e-=n[i].length+r;if(e<0)return{row:i,column:e+n[i].length+r}}return{row:s-1,column:n[s-1].length}},this.positionToIndex=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=0,s=Math.min(e.row,n.length);for(var o=t||0;o<s;++o)i+=n[o].length+r;return i+e.column}}).call(u.prototype),t.Document=u})
\ No newline at end of file
diff --git a/app/assets/lib/ace/worker-xquery.js b/app/assets/lib/ace/worker-xquery.js
new file mode 100644
index 000000000..be049fe77
--- /dev/null
+++ b/app/assets/lib/ace/worker-xquery.js
@@ -0,0 +1 @@
+"no use strict";(function(e){if(typeof e.window!="undefined"&&e.document)return;e.console=function(){var e=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:e})},e.console.error=e.console.warn=e.console.log=e.console.trace=e.console,e.window=e,e.ace=e,e.onerror=function(e,t,n,r,i){console.error("Worker "+(i?i.stack:e))},e.normalizeModule=function(t,n){if(n.indexOf("!")!==-1){var r=n.split("!");return e.normalizeModule(t,r[0])+"!"+e.normalizeModule(t,r[1])}if(n.charAt(0)=="."){var i=t.split("/").slice(0,-1).join("/");n=(i?i+"/":"")+n;while(n.indexOf(".")!==-1&&s!=n){var s=n;n=n.replace(/^\.\//,"").replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return n},e.require=function(t,n){n||(n=t,t=null);if(!n.charAt)throw new Error("worker.js require() accepts only (parentId, id) as arguments");n=e.normalizeModule(t,n);var r=e.require.modules[n];if(r)return r.initialized||(r.initialized=!0,r.exports=r.factory().exports),r.exports;var i=n.split("/");if(!e.require.tlns)return console.log("unable to load "+n);i[0]=e.require.tlns[i[0]]||i[0];var s=i.join("/")+".js";return e.require.id=n,importScripts(s),e.require(t,n)},e.require.modules={},e.require.tlns={},e.define=function(t,n,r){arguments.length==2?(r=n,typeof t!="string"&&(n=t,t=e.require.id)):arguments.length==1&&(r=t,n=[],t=e.require.id),n.length||(n=["require","exports","module"]);if(t.indexOf("text!")===0)return;var i=function(n){return e.require(t,n)};e.require.modules[t]={exports:{},factory:function(){var e=this,t=r.apply(this,n.map(function(t){switch(t){case"require":return i;case"exports":return e.exports;case"module":return e;default:return i(t)}}));return t&&(e.exports=t),e}}},e.define.amd={},e.initBaseUrls=function(e){require.tlns=e},e.initSender=function(){var t=e.require("ace/lib/event_emitter").EventEmitter,n=e.require("ace/lib/oop"),r=function(){};return function(){n.implement(this,t),this.callback=function(e,t){postMessage({type:"call",id:t,data:e})},this.emit=function(e,t){postMessage({type:"event",name:e,data:t})}}.call(r.prototype),new r};var t=e.main=null,n=e.sender=null;e.onmessage=function(r){var i=r.data;if(i.command){if(!t[i.command])throw new Error("Unknown command:"+i.command);t[i.command].apply(t,i.args)}else if(i.init){initBaseUrls(i.tlns),require("ace/lib/es5-shim"),n=e.sender=initSender();var s=require(i.module)[i.classname];t=e.main=new s(n)}else i.event&&n&&n._signal(i.event,i.data)}})(this),ace.define("ace/mode/xquery_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/xquery/xqlint","ace/mode/xquery/modules"],function(e,t,n){var r=e("../lib/oop"),i=e("../worker/mirror").Mirror,s=e("./xquery/xqlint"),o=s.XQLint,u=e("./xquery/modules").Modules,a=function(e){return function(t){var n=e,r=n[t],i={},s={};return r.functions.forEach(function(e){s[t+"#"+e.name+"#"+e.arity]={params:[]},e.parameters.forEach(function(n){s[t+"#"+e.name+"#"+e.arity].params.push("$"+n.name)})}),r.variables.forEach(function(e){var n=e.name.substring(e.name.indexOf(":")+1);i[t+"#"+n]={type:"VarDecl",annotations:[]}}),{variables:i,functions:s}}},f=t.XQueryWorker=function(e){i.call(this,e),this.setTimeout(200),this.opts={styleCheck:!1},this.availableModuleNamespaces=Object.keys(u),this.moduleResolver=a(u);var t=this;this.sender.on("complete",function(e){if(t.xqlint){var n={line:e.data.pos.row,col:e.data.pos.column},r=t.xqlint.getCompletions(n);t.sender.emit("complete",r)}}),this.sender.on("setAvailableModuleNamespaces",function(e){t.availableModuleNamespaces=e.data}),this.sender.on("setModuleResolver",function(e){t.moduleResolver=a(e.data)})};r.inherits(f,i),function(){this.onUpdate=function(){this.sender.emit("start");var e=this.doc.getValue(),t=s.createStaticContext();this.moduleResolver&&t.setModuleResolver(this.moduleResolver),this.availableModuleNamespaces&&(t.availableModuleNamespaces=this.availableModuleNamespaces);var n={styleCheck:this.styleCheck,staticContext:t};this.xqlint=new o(e,n),this.sender.emit("markers",this.xqlint.getMarkers())}}.call(f.prototype)}),ace.define("ace/lib/oop",["require","exports","module"],function(e,t,n){t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}}),ace.define("ace/worker/mirror",["require","exports","module","ace/document","ace/lib/lang"],function(e,t,n){var r=e("../document").Document,i=e("../lib/lang"),s=t.Mirror=function(e){this.sender=e;var t=this.doc=new r(""),n=this.deferredUpdate=i.delayedCall(this.onUpdate.bind(this)),s=this;e.on("change",function(e){t.applyDeltas(e.data);if(s.$timeout)return n.schedule(s.$timeout);s.onUpdate()})};(function(){this.$timeout=500,this.setTimeout=function(e){this.$timeout=e},this.setValue=function(e){this.doc.setValue(e),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(e){this.sender.callback(this.doc.getValue(),e)},this.onUpdate=function(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(s.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,o=e("./anchor").Anchor,u=function(e){this.$lines=[],e.length===0?this.$lines=[""]:Array.isArray(e)?this._insertLines(0,e):this.insert({row:0,column:0},e)};(function(){r.implement(this,i),this.setValue=function(e){var t=this.getLength();this.remove(new s(0,0,t,this.getLine(t-1).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new o(this,e,t)},"aaa".split(/a/).length===0?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){if(this.$newLineMode===e)return;this.$newLineMode=e,this._signal("changeNewLineMode")},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return e=="\r\n"||e=="\r"||e=="\n"},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){if(e.start.row==e.end.row)return this.getLine(e.start.row).substring(e.start.column,e.end.column);var t=this.getLines(e.start.row,e.end.row);t[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;return e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column)),t.join(this.getNewLineCharacter())},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):e.row<0&&(e.row=0),e},this.insert=function(e,t){if(!t||t.length===0)return e;e=this.$clipPosition(e),this.getLength()<=1&&this.$detectNewLine(t);var n=this.$split(t),r=n.splice(0,1)[0],i=n.length==0?null:n.splice(n.length-1,1)[0];return e=this.insertInLine(e,r),i!==null&&(e=this.insertNewLine(e),e=this._insertLines(e.row,n),e=this.insertInLine(e,i||"")),e},this.insertLines=function(e,t){return e>=this.getLength()?this.insert({row:e,column:0},"\n"+t.join("\n")):this._insertLines(Math.max(e,0),t)},this._insertLines=function(e,t){if(t.length==0)return{row:e,column:0};while(t.length>61440){var n=this._insertLines(e,t.slice(0,61440));t=t.slice(61440),e=n.row}var r=[e,0];r.push.apply(r,t),this.$lines.splice.apply(this.$lines,r);var i=new s(e,0,e+t.length,0),o={action:"insertLines",range:i,lines:t};return this._signal("change",{data:o}),i.end},this.insertNewLine=function(e){e=this.$clipPosition(e);var t=this.$lines[e.row]||"";this.$lines[e.row]=t.substring(0,e.column),this.$lines.splice(e.row+1,0,t.substring(e.column,t.length));var n={row:e.row+1,column:0},r={action:"insertText",range:s.fromPoints(e,n),text:this.getNewLineCharacter()};return this._signal("change",{data:r}),n},this.insertInLine=function(e,t){if(t.length==0)return e;var n=this.$lines[e.row]||"";this.$lines[e.row]=n.substring(0,e.column)+t+n.substring(e.column);var r={row:e.row,column:e.column+t.length},i={action:"insertText",range:s.fromPoints(e,r),text:t};return this._signal("change",{data:i}),r},this.remove=function(e){e instanceof s||(e=s.fromPoints(e.start,e.end)),e.start=this.$clipPosition(e.start),e.end=this.$clipPosition(e.end);if(e.isEmpty())return e.start;var t=e.start.row,n=e.end.row;if(e.isMultiLine()){var r=e.start.column==0?t:t+1,i=n-1;e.end.column>0&&this.removeInLine(n,0,e.end.column),i>=r&&this._removeLines(r,i),r!=t&&(this.removeInLine(t,e.start.column,this.getLine(t).length),this.removeNewLine(e.start.row))}else this.removeInLine(t,e.start.column,e.end.column);return e.start},this.removeInLine=function(e,t,n){if(t==n)return;var r=new s(e,t,e,n),i=this.getLine(e),o=i.substring(t,n),u=i.substring(0,t)+i.substring(n,i.length);this.$lines.splice(e,1,u);var a={action:"removeText",range:r,text:o};return this._signal("change",{data:a}),r.start},this.removeLines=function(e,t){return e<0||t>=this.getLength()?this.remove(new s(e,0,t+1,0)):this._removeLines(e,t)},this._removeLines=function(e,t){var n=new s(e,0,t+1,0),r=this.$lines.splice(e,t-e+1),i={action:"removeLines",range:n,nl:this.getNewLineCharacter(),lines:r};return this._signal("change",{data:i}),r},this.removeNewLine=function(e){var t=this.getLine(e),n=this.getLine(e+1),r=new s(e,t.length,e+1,0),i=t+n;this.$lines.splice(e,2,i);var o={action:"removeText",range:r,text:this.getNewLineCharacter()};this._signal("change",{data:o})},this.replace=function(e,t){e instanceof s||(e=s.fromPoints(e.start,e.end));if(t.length==0&&e.isEmpty())return e.start;if(t==this.getTextRange(e))return e.end;this.remove(e);if(t)var n=this.insert(e.start,t);else n=e.start;return n},this.applyDeltas=function(e){for(var t=0;t<e.length;t++){var n=e[t],r=s.fromPoints(n.range.start,n.range.end);n.action=="insertLines"?this.insertLines(r.start.row,n.lines):n.action=="insertText"?this.insert(r.start,n.text):n.action=="removeLines"?this._removeLines(r.start.row,r.end.row-1):n.action=="removeText"&&this.remove(r)}},this.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--){var n=e[t],r=s.fromPoints(n.range.start,n.range.end);n.action=="insertLines"?this._removeLines(r.start.row,r.end.row-1):n.action=="insertText"?this.remove(r):n.action=="removeLines"?this._insertLines(r.start.row,n.lines):n.action=="removeText"&&this.insert(r.start,n.text)}},this.indexToPosition=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length;for(var i=t||0,s=n.length;i<s;i++){e-=n[i].length+r;if(e<0)return{row:i,column:e+n[i].length+r}}return{row:s-1,column:n[s-1].length}},this.positionToIndex=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=0,s=Math.min(e.row,n.length);for(var o=t||0;o<s;++o)i+=n[o].length+r;return i+e.column}}).call(u.prototype),t.Document=u}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(e,t,n){function r(){}function i(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(t){}}function s(e){return e=+e,e!==e?e=0:e!==0&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}function o(e){var t=typeof e;return e===null||t==="undefined"||t==="boolean"||t==="number"||t==="string"}function u(e){var t,n,r;if(o(e))return e;n=e.valueOf;if(typeof n=="function"){t=n.call(e);if(o(t))return t}r=e.toString;if(typeof r=="function"){t=r.call(e);if(o(t))return t}throw new TypeError}Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if(typeof t!="function")throw new TypeError("Function.prototype.bind called on incompatible "+t);var n=c.call(arguments,1),i=function(){if(this instanceof i){var r=t.apply(this,n.concat(c.call(arguments)));return Object(r)===r?r:this}return t.apply(e,n.concat(c.call(arguments)))};return t.prototype&&(r.prototype=t.prototype,i.prototype=new r,r.prototype=null),i});var a=Function.prototype.call,f=Array.prototype,l=Object.prototype,c=f.slice,h=a.bind(l.toString),p=a.bind(l.hasOwnProperty),d,v,m,g,y;if(y=p(l,"__defineGetter__"))d=a.bind(l.__defineGetter__),v=a.bind(l.__defineSetter__),m=a.bind(l.__lookupGetter__),g=a.bind(l.__lookupSetter__);if([1,2].splice(0).length!=2)if(!function(){function e(e){var t=new Array(e+2);return t[0]=t[1]=0,t}var t=[],n;t.splice.apply(t,e(20)),t.splice.apply(t,e(26)),n=t.length,t.splice(5,0,"XXX"),n+1==t.length;if(n+1==t.length)return!0}())Array.prototype.splice=function(e,t){var n=this.length;e>0?e>n&&(e=n):e==void 0?e=0:e<0&&(e=Math.max(n+e,0)),e+t<n||(t=n-e);var r=this.slice(e,e+t),i=c.call(arguments,2),s=i.length;if(e===n)s&&this.push.apply(this,i);else{var o=Math.min(t,n-e),u=e+o,a=u+s-o,f=n-u,l=n-o;if(a<u)for(var h=0;h<f;++h)this[a+h]=this[u+h];else if(a>u)for(h=f;h--;)this[a+h]=this[u+h];if(s&&e===l)this.length=l,this.push.apply(this,i);else{this.length=l+s;for(h=0;h<s;++h)this[e+h]=i[h]}}return r};else{var b=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?b.apply(this,[e===void 0?0:e,t===void 0?this.length-e:t].concat(c.call(arguments,2))):[]}}Array.isArray||(Array.isArray=function(e){return h(e)=="[object Array]"});var w=Object("a"),E=w[0]!="a"||!(0 in w);Array.prototype.forEach||(Array.prototype.forEach=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=arguments[1],i=-1,s=n.length>>>0;if(h(e)!="[object Function]")throw new TypeError;while(++i<s)i in n&&e.call(r,n[i],i,t)}),Array.prototype.map||(Array.prototype.map=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=Array(r),s=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var o=0;o<r;o++)o in n&&(i[o]=e.call(s,n[o],o,t));return i}),Array.prototype.filter||(Array.prototype.filter=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=[],s,o=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var u=0;u<r;u++)u in n&&(s=n[u],e.call(o,s,u,t)&&i.push(s));return i}),Array.prototype.every||(Array.prototype.every=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var s=0;s<r;s++)if(s in n&&!e.call(i,n[s],s,t))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var s=0;s<r;s++)if(s in n&&e.call(i,n[s],s,t))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0;if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");if(!r&&arguments.length==1)throw new TypeError("reduce of empty array with no initial value");var i=0,s;if(arguments.length>=2)s=arguments[1];else do{if(i in n){s=n[i++];break}if(++i>=r)throw new TypeError("reduce of empty array with no initial value")}while(!0);for(;i<r;i++)i in n&&(s=e.call(void 0,s,n[i],i,t));return s}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0;if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");if(!r&&arguments.length==1)throw new TypeError("reduceRight of empty array with no initial value");var i,s=r-1;if(arguments.length>=2)i=arguments[1];else do{if(s in n){i=n[s--];break}if(--s<0)throw new TypeError("reduceRight of empty array with no initial value")}while(!0);do s in this&&(i=e.call(void 0,i,n[s],s,t));while(s--);return i});if(!Array.prototype.indexOf||[0,1].indexOf(1,2)!=-1)Array.prototype.indexOf=function(e){var t=E&&h(this)=="[object String]"?this.split(""):F(this),n=t.length>>>0;if(!n)return-1;var r=0;arguments.length>1&&(r=s(arguments[1])),r=r>=0?r:Math.max(0,n+r);for(;r<n;r++)if(r in t&&t[r]===e)return r;return-1};if(!Array.prototype.lastIndexOf||[0,1].lastIndexOf(0,-3)!=-1)Array.prototype.lastIndexOf=function(e){var t=E&&h(this)=="[object String]"?this.split(""):F(this),n=t.length>>>0;if(!n)return-1;var r=n-1;arguments.length>1&&(r=Math.min(r,s(arguments[1]))),r=r>=0?r:n-Math.abs(r);for(;r>=0;r--)if(r in t&&e===t[r])return r;return-1};Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__||(e.constructor?e.constructor.prototype:l)});if(!Object.getOwnPropertyDescriptor){var S="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(e,t){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError(S+e);if(!p(e,t))return;var n,r,i;n={enumerable:!0,configurable:!0};if(y){var s=e.__proto__;e.__proto__=l;var r=m(e,t),i=g(e,t);e.__proto__=s;if(r||i)return r&&(n.get=r),i&&(n.set=i),n}return n.value=e[t],n}}Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){return Object.keys(e)});if(!Object.create){var x;Object.prototype.__proto__===null?x=function(){return{__proto__:null}}:x=function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(e,t){var n;if(e===null)n=x();else{if(typeof e!="object")throw new TypeError("typeof prototype["+typeof e+"] != 'object'");var r=function(){};r.prototype=e,n=new r,n.__proto__=e}return t!==void 0&&Object.defineProperties(n,t),n}}if(Object.defineProperty){var T=i({}),N=typeof document=="undefined"||i(document.createElement("div"));if(!T||!N)var C=Object.defineProperty}if(!Object.defineProperty||C){var k="Property description must be an object: ",L="Object.defineProperty called on non-object: ",A="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(e,t,n){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError(L+e);if(typeof n!="object"&&typeof n!="function"||n===null)throw new TypeError(k+n);if(C)try{return C.call(Object,e,t,n)}catch(r){}if(p(n,"value"))if(y&&(m(e,t)||g(e,t))){var i=e.__proto__;e.__proto__=l,delete e[t],e[t]=n.value,e.__proto__=i}else e[t]=n.value;else{if(!y)throw new TypeError(A);p(n,"get")&&d(e,t,n.get),p(n,"set")&&v(e,t,n.set)}return e}}Object.defineProperties||(Object.defineProperties=function(e,t){for(var n in t)p(t,n)&&Object.defineProperty(e,n,t[n]);return e}),Object.seal||(Object.seal=function(e){return e}),Object.freeze||(Object.freeze=function(e){return e});try{Object.freeze(function(){})}catch(O){Object.freeze=function(e){return function(t){return typeof t=="function"?t:e(t)}}(Object.freeze)}Object.preventExtensions||(Object.preventExtensions=function(e){return e}),Object.isSealed||(Object.isSealed=function(e){return!1}),Object.isFrozen||(Object.isFrozen=function(e){return!1}),Object.isExtensible||(Object.isExtensible=function(e){if(Object(e)===e)throw new TypeError;var t="";while(p(e,t))t+="?";e[t]=!0;var n=p(e,t);return delete e[t],n});if(!Object.keys){var M=!0,_=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],D=_.length;for(var P in{toString:null})M=!1;Object.keys=function I(e){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError("Object.keys called on a non-object");var I=[];for(var t in e)p(e,t)&&I.push(t);if(M)for(var n=0,r=D;n<r;n++){var i=_[n];p(e,i)&&I.push(i)}return I}}Date.now||(Date.now=function(){return(new Date).getTime()});var H="	\n\f\r   ᠎              \u2028\u2029";if(!String.prototype.trim||H.trim()){H="["+H+"]";var B=new RegExp("^"+H+H+"*"),j=new RegExp(H+H+"*$");String.prototype.trim=function(){return String(this).replace(B,"").replace(j,"")}}var F=function(e){if(e==null)throw new TypeError("can't convert "+e+" to object");return Object(e)}}),ace.define("ace/range",["require","exports","module"],function(e,t,n){var r=function(e,t){return e.row-t.row||e.column-t.column},i=function(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return this.compare(e,t)==0},this.compareRange=function(e){var t,n=e.end,r=e.start;return t=this.compare(n.row,n.column),t==1?(t=this.compare(r.row,r.column),t==1?2:t==0?1:0):t==-1?-2:(t=this.compare(r.row,r.column),t==-1?-1:t==1?42:0)},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return this.comparePoint(e.start)==0&&this.comparePoint(e.end)==0},this.intersects=function(e){var t=this.compareRange(e);return t==-1||t==0||t==1},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){typeof e=="object"?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){typeof e=="object"?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)||this.isStart(e,t)?!1:!0:!1},this.insideStart=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)?!1:!0:!1},this.insideEnd=function(e,t){return this.compare(e,t)==0?this.isStart(e,t)?!1:!0:!1},this.compare=function(e,t){return!this.isMultiLine()&&e===this.start.row?t<this.start.column?-1:t>this.end.column?1:0:e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else if(this.end.row<e)var n={row:e,column:0};if(this.start.row>t)var r={row:t+1,column:0};else if(this.start.row<e)var r={row:e,column:0};return i.fromPoints(r||this.start,n||this.end)},this.extend=function(e,t){var n=this.compare(e,t);if(n==0)return this;if(n==-1)var r={row:e,column:t};else var s={row:e,column:t};return i.fromPoints(r||this.start,s||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return i.fromPoints(this.start,this.end)},this.collapseRows=function(){return this.end.column==0?new i(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new i(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),n=e.documentToScreenPosition(this.end);return new i(t.row,t.column,n.row,n.column)},this.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t}}).call(i.prototype),i.fromPoints=function(e,t){return new i(e.row,e.column,t.row,t.column)},i.comparePoints=r,i.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=i}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=t.Anchor=function(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),typeof n=="undefined"?this.setPosition(t.row,t.column):this.setPosition(t,n)};(function(){r.implement(this,i),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(e){var t=e.data,n=t.range;if(n.start.row==n.end.row&&n.start.row!=this.row)return;if(n.start.row>this.row)return;if(n.start.row==this.row&&n.start.column>this.column)return;var r=this.row,i=this.column,s=n.start,o=n.end;if(t.action==="insertText")if(s.row===r&&s.column<=i){if(s.column!==i||!this.$insertRight)s.row===o.row?i+=o.column-s.column:(i-=s.column,r+=o.row-s.row)}else s.row!==o.row&&s.row<r&&(r+=o.row-s.row);else t.action==="insertLines"?(s.row!==r||i!==0||!this.$insertRight)&&s.row<=r&&(r+=o.row-s.row):t.action==="removeText"?s.row===r&&s.column<i?o.column>=i?i=s.column:i=Math.max(0,i-(o.column-s.column)):s.row!==o.row&&s.row<r?(o.row===r&&(i=Math.max(0,i-o.column)+s.column),r-=o.row-s.row):o.row===r&&(r-=o.row-s.row,i=Math.max(0,i-o.column)+s.column):t.action=="removeLines"&&s.row<=r&&(o.row<=r?r-=o.row-s.row:(r=s.row,i=0));this.setPosition(r,i,!0)},this.setPosition=function(e,t,n){var r;n?r={row:e,column:t}:r=this.$clipPositionToDocument(e,t);if(this.row==r.row&&this.column==r.column)return;var i={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._signal("change",{old:i,value:r})},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(s.prototype)}),ace.define("ace/lib/lang",["require","exports","module"],function(e,t,n){t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){var n="";while(t>0){t&1&&(n+=e);if(t>>=1)e+=e}return n};var r=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(r,"")},t.stringTrimRight=function(e){return e.replace(i,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){var t=[];for(var n=0,r=e.length;n<r;n++)e[n]&&typeof e[n]=="object"?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=function(e){if(typeof e!="object"||!e)return e;var n=e.constructor;if(n===RegExp)return e;var r=n();for(var i in e)typeof e[i]=="object"?r[i]=t.deepCopy(e[i]):r[i]=e[i];return r},t.arrayToMap=function(e){var t={};for(var n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return e.replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,function(e){n.push({offset:arguments[arguments.length-2],length:e.length})}),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},r=function(e){return r.cancel(),t=setTimeout(n,e||0),r};return r.schedule=r,r.call=function(){return this.cancel(),e(),r},r.cancel=function(){return clearTimeout(t),t=null,r},r.isPending=function(){return t},r},t.delayedCall=function(e,t){var n=null,r=function(){n=null,e()},i=function(e){n==null&&(n=setTimeout(r,e||t))};return i.delay=function(e){n&&clearTimeout(n),n=setTimeout(r,e||t)},i.schedule=i,i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){return n},i}}),ace.define("ace/mode/xquery/xqlint",["require","exports","module"],function(e,t,n){n.exports=function r(t,n,i){function s(u,a){if(!n[u]){if(!t[u]){var f=typeof e=="function"&&e;if(!a&&f)return f(u,!0);if(o)return o(u,!0);throw new Error("Cannot find module '"+u+"'")}var l=n[u]={exports:{}};t[u][0].call(l.exports,function(e){var n=t[u][1][e];return s(n?n:e)},l,l.exports,r,t,n,i)}return n[u].exports}var o=typeof e=="function"&&e;for(var u=0;u<i.length;u++)s(i[u]);return s}({1:[function(e,t,n){var r={},i={};r.prototype=new Error,i.prototype=new Error,n.StaticError=r.prototype.constructor=function(e,t,n){this.getCode=function(){return e},this.getMessage=function(){return t},this.getPos=function(){return n}},n.StaticWarning=i.prototype.constructor=function(e,t,n){this.getCode=function(){return e},this.getMessage=function(){return t},this.getPos=function(){return n}}},{}],2:[function(e,t,n){var r=e("../tree_ops").TreeOps,i=e("./errors"),s=i.StaticWarning;n.ModuleDecl=function(e,t,n){var i="";return{NCName:function(e){i=r.flatten(e)},URILiteral:function(s){s=r.flatten(s),s=s.substring(1,s.length-1),e.apply(function(){t.moduleNamespace=s,t.addNamespace(s,i,n.pos,"moduleDecl")})}}},n.ModuleImport=function(e,t,n){var i="",s;return{NCName:function(e){i=r.flatten(e)},URILiteral:function(o){if(s!==undefined)return;o=r.flatten(o),o=o.substring(1,o.length-1),s=o,e.apply(function(){t.importModule(o,i,n.pos)})}}},n.SchemaImport=function(e,t,n){var i="",s;return{SchemaPrefix:function(t){var n=function(){this.NCName=function(e){i=r.flatten(e)}};e.visitChildren(t,new n)},URILiteral:function(o){if(s!==undefined)return;o=r.flatten(o),o=o.substring(1,o.length-1),s=o,e.apply(function(){t.addNamespace(o,i,n.pos,"schema")})}}},n.DefaultNamespaceDecl=function(e,t,n){var i=!1,o="";return{TOKEN:function(e){i=i?!0:e.value==="function"},URILiteral:function(u){o=r.flatten(u),o=o.substring(1,o.length-1),i?t.defaultFunctionNamespace=o:(e.apply(function(){throw new s("Avoid default element namespace declarations.",n.pos)}),t.defaultElementNamespace=o)}}},n.NamespaceDecl=function(e,t,n){var i="";return{NCName:function(e){i=r.flatten(e)},URILiteral:function(s){s=r.flatten(s),s=s.substring(1,s.length-1),e.apply(function(){t.addNamespace(s,i,n.pos,"declare")})}}},n.VarHandler=function(e,t,n){var i=function(i){var s=r.flatten(i);e.apply(function(){var e=t.resolveQName(s,i.pos);t.addVariable(e,n.name,i.pos)})};return{ExprSingle:function(){return!0},VarValue:function(){return!0},VarDefaultValue:function(){return!0},VarName:i,EQName:i}},n.VarRefHandler=function(e,t,n){return{VarName:function(i){var s=r.flatten(i);e.apply(function(){var e=t.resolveQName(s,n.pos);e.uri!==""&&(t.root.namespaces[e.uri].used=!0),t.addVarRef(e,i.pos)})}}}},{"../tree_ops":10,"./errors":1}],3:[function(e,t,n){n.StaticContext=function(t,n){var r=e("../tree_ops").TreeOps,i=e("./errors"),s=i.StaticError,o=i.StaticWarning,u={sl:0,sc:0,el:0,ec:0},a={},f=function(e){return e.uri+"#"+e.name},l=function(e,t){return f(e)+"#"+t};t||(a["http://jsoniq.org/functions"]={prefix:"jn",pos:u,type:"module",override:!0},a["http://www.w3.org/2005/xpath-functions"]={prefix:"fn",pos:u,type:"module",override:!0},a["http://www.w3.org/2005/xquery-local-functions"]={prefix:"local",pos:u,type:"declare",override:!0},a["http://www.w3.org/2001/XMLSchema-instance"]={prefix:"xsi",pos:u,type:"declare"},a["http://www.w3.org/2001/XMLSchema"]={prefix:"xs",pos:u,type:"declare"},a["http://www.w3.org/XML/1998/namespace"]={prefix:"xml",pos:u,type:"declare"},a["http://zorba.io/annotations"]={prefix:"an",pos:u,type:"declare",override:!0},a["http://www.w3.org/2005/xqt-errors"]={prefix:"err",pos:u,type:"declare",override:!0},a["http://zorba.io/errors"]={prefix:"zerr",pos:u,type:"declare",override:!0});var c={parent:t,children:[],pos:n,setModuleResolver:function(e){return this.root.moduleResolver=e,this},moduleNamespace:"",defaultFunctionNamespace:"",defaultElementNamespace:"",namespaces:a,availableModuleNamespaces:[],importModule:function(e,t,n){this.root.addNamespace(e,t,n,"module");if(this.root.moduleResolver)try{var i=this.root.moduleResolver(e,[]);r.concat(this.variables,i.variables),r.concat(this.functions,i.functions)}catch(o){throw new s("XQST0059",'module "'+e+'" not found: '+o,n)}return this},getAvailableModuleNamespaces:function(){return this.root.availableModuleNamespaces},getPrefixByNamespace:function(e){return this.root.namespaces[e].prefix},addNamespace:function(e,t,n,r){if(t===""&&r==="module")throw new o("W01","Avoid this type of import. Use import module namespace instead");if(e==="")throw new s("XQST0088","empty target namespace in module import or module declaration",n);var i=this.getNamespace(e);if(i&&i.type===r&&r!=="declare"&&!i.override)throw new s("XQST0047",'"'+e+'": duplicate target namespace',n);i=this.getNamespaceByPrefix(t);if(i&&!i.override)throw new s("XQST0033",'"'+t+'": namespace prefix already bound to "'+i.uri+'"',n);i=this.namespaces[e],this.namespaces[e]={prefix:t,pos:n,type:r};if(i)throw new o("W02",'"'+e+'" already bound to the "'+i.prefix+'" prefix',n)},getNamespaces:function(){return this.root.namespaces},getNamespace:function(e){var t=this;while(t){var n=t.namespaces[e];if(n)return n;t=t.parent}},getNamespaceByPrefix:function(e){var t=function(t){var r=n.namespaces[t];if(r.prefix===e)throw r.uri=t,r},n=this;while(n){try{Object.keys(n.namespaces).forEach(t)}catch(r){return r}n=n.parent}},resolveQName:function(e,t){var n={uri:"",prefix:"",name:""},r;if(e.substring(0,2)==="Q{")r=e.indexOf("}"),n.uri=e.substring(2,r),n.name=e.substring(r+1);else{r=e.indexOf(":"),n.prefix=e.substring(0,r);var i=this.getNamespaceByPrefix(n.prefix);if(!i&&n.prefix!=="")throw new s("XPST0081",'"'+n.prefix+'": can not expand prefix of lexical QName to namespace URI',t);i&&(n.uri=i.uri),n.name=e.substring(r+1)}return n},variables:{},varRefs:{},addVariable:function(e,t,n){if(t!=="VarDecl"||this.moduleNamespace===""||this.moduleNamespace===e.uri||e.uri===""&&this.defaultFunctionNamespace===this.moduleNamespace){var r=f(e);if(t==="VarDecl"&&this.variables[r])throw new s("XQST0049",'"'+e.name+'": duplicate variable declaration',n);return this.variables[r]={type:t,pos:n,qname:e},this}throw new s("XQST0048",'"'+e.prefix+":"+e.name+'": Qname not library namespace',n)},getVariables:function(){var e={},t=this,n=function(n){e[n]||(e[n]=t.variables[n])};while(t)Object.keys(t.variables).forEach(n),t=t.parent;return e},getVariable:function(e){var t=f(e),n=this;while(n){if(n.variables[t])return n.variables[t];n=n.parent}},addVarRef:function(e,t){var n=this.getVariable(e);if(!n&&(e.uri===""||this.root.moduleResolver))throw new s("XPST0008",'"'+e.name+'": undeclared variable',t);var r=f(e);this.varRefs[r]=!0},functions:{},getFunctions:function(){return this.root.functions},getFunction:function(e,t){var n=l(e,t),r=this;while(r){if(r.functions[n])return r.functions[n];r=r.parent}},addFunction:function(e,t,n){var r=n.length;if(this.moduleNamespace===""||this.moduleNamespace===e.uri||e.uri===""&&this.defaultFunctionNamespace===this.moduleNamespace){var i=l(e,r);if(this.functions[i])throw new s("XQST0034",'"'+e.name+'": duplicate function declaration',t);return this.functions[i]={pos:t,params:n},this}throw new s("XQST0048",'"'+e.prefix+":"+e.name+'": Qname not library namespace',t)}};return c.root=t?t.root:c,c}},{"../tree_ops":10,"./errors":1}],4:[function(e,t,n){n.Translator=function(t,n){var r=e("./errors"),i=r.StaticError,s=r.StaticWarning,o=e("../tree_ops").TreeOps,u=e("./static_context").StaticContext,a=e("./handlers"),f=function(e,t){var n;return t.length===0?e:(e.children.forEach(function(e){e.name===t[0]&&(n=f(e,t.slice(1)))}),n)},l=[];this.apply=function(e){try{e()}catch(t){if(t instanceof i)c(t);else{if(!(t instanceof s))throw t;h(t.getCode(),t.getMessage(),t.getPos())}}};var c=function(e){l.push({pos:e.getPos(),type:"error",level:"error",message:"["+e.getCode()+"] "+e.getMessage()})},h=function(e,t,n){l.push({pos:n,type:"warning",level:"warning",message:"["+e+"] "+t})};this.getMarkers=function(){return l};var p=this;t.pos=n.pos;var d=t,v=function(e){d=new u(d,e),d.parent.children.push(d)},m=function(e){e!==undefined&&(d.pos.el=e.el,d.pos.ec=e.ec),Object.keys(d.varRefs).forEach(function(e){d.variables[e]||(d.parent.varRefs[e]=!0)}),Object.keys(d.variables).forEach(function(e){!d.varRefs[e]&&d.variables[e].type!=="GroupingVariable"&&h("W03",'Unused variable "$'+d.variables[e].qname.name+'"',d.variables[e].pos)}),d=d.parent};this.visitOnly=function(e,t){e.children.forEach(function(e){t.indexOf(e.name)!==-1&&p.visit(e)})},this.getFirstChild=function(e,t){var n;return e.children.forEach(function(e){e.name===t&&n===undefined&&(n=e)}),n},this.ModuleDecl=function(e){return this.visitChildren(e,a.ModuleDecl(p,t,e)),!0},this.Prolog=function(e){return this.visitOnly(e,["DefaultNamespaceDecl","Setter","NamespaceDecl","Import"]),n.index.forEach(function(e){if(e.name==="VarDecl")e.children.forEach(function(n){n.name==="VarName"&&p.apply(function(){var r=o.flatten(n),i=t.resolveQName(r,n.pos);t.addVariable(i,e.name,n.pos)})});else if(e.name==="FunctionDecl"){var n,r,i=[];e.children.forEach(function(e){e.name==="EQName"?(n=e,r=e.pos):e.name==="ParamList"&&e.children.forEach(function(e){e.name==="Param"&&i.push(o.flatten(e))})}),p.apply(function(){n=o.flatten(n),n=t.resolveQName(n,r),t.addFunction(n,r,i)})}}),this.visitOnly(e,["ContextItemDecl","AnnotatedDecl","OptionDecl"]),!0},this.ModuleImport=function(e){return this.visitChildren(e,a.ModuleImport(p,t,e)),!0},this.SchemaImport=function(e){return this.visitChildren(e,a.SchemaImport(p,t,e)),!0},this.DefaultNamespaceDecl=function(e){return this.visitChildren(e,a.DefaultNamespaceDecl(p,t,e)),!0},this.NamespaceDecl=function(e){return this.visitChildren(e,a.NamespaceDecl(p,t,e)),!0};var g={};this.AnnotatedDecl=function(e){return g=[],this.visitChildren(e,a.NamespaceDecl(p,t,e)),!0},this.Annotation=function(e){return this.visitChildren(e,{EQName:function(e){var t=o.flatten(e);p.apply(function(){var n=d.resolveQName(t,e.pos);g[n.uri+"#"+n.name]=[]})}}),!0},this.VarDecl=function(e){try{var n=p.getFirstChild(e,"VarName"),r=o.flatten(n),i=d.resolveQName(r,n.pos),s=t.getVariable(i);s&&(s.annotations=g)}catch(u){}return this.visitOnly(e,["ExprSingle","VarValue","VarDefaultValue"]),!0},this.FunctionDecl=function(e){var t=f(e,["ReturnType"]);t||h("W05","Untyped return value",e.pos);var n=!1;return e.children.forEach(function(e){if(e.name==="TOKEN"&&e.value==="external")return n=!0,!1}),n||(v(e.pos),this.visitChildren(e),m()),!0},this.VarRef=function(e){return this.visitChildren(e,a.VarRefHandler(p,d,e)),!0},this.Param=function(e){var t=f(e,["TypeDeclaration"]);return t||h("W05","Untyped function parameter",e.pos),this.visitChildren(e,a.VarHandler(p,d,e)),!0},this.InlineFunctionExpr=function(e){return v(e.pos),this.visitChildren(e),m(),!0};var y=[],b=function(e){v(e.pos),y.push(0),p.visitChildren(e);for(var t=1;t<=y[y.length-1];t++)m(e.pos);y.pop(),m()};this.StatementsAndOptionalExpr=function(e){return b(e),!0},this.StatementsAndExpr=function(e){return b(e),!0},this.BlockStatement=function(e){return b(e),!0},this.VarDeclStatement=function(e){v(e.pos),y[y.length-1]++,this.visitChildren(e,a.VarHandler(p,d,e))};var w=[];this.FLWORExpr=function(e){v(e.pos),w.push(0),this.visitChildren(e);for(var t=1;t<=w[w.length-1];t++)m(e.pos);return w.pop(),m(),!0},this.ForBinding=function(e){return this.visitOnly(e,["ExprSingle","VarValue","VarDefaultValue"]),v(e.pos),w[w.length-1]++,this.visitChildren(e,a.VarHandler(p,d,e)),!0},this.LetBinding=function(e){this.visitOnly(e,["ExprSingle","VarValue","VarDefaultValue"]),v(e.pos),w[w.length-1]++,this.visitChildren(e,a.VarHandler(p,d,e))},this.GroupingSpec=function(e){var t=!1;e.children.forEach(function(e){if(e.value===":=")return t=!0,!1});if(t){var n=e.children[0];return this.visitOnly(e,["ExprSingle","VarValue","VarDefaultValue"]),v(e.pos),w[w.length-1]++,this.visitChildren(n,a.VarHandler(p,d,n)),!0}},this.TumblingWindowClause=function(e){return this.visitOnly(e,["ExprSingle"]),v(e.pos),w[w.length-1]++,this.visitChildren(e,a.VarHandler(p,d,e)),this.visitOnly(e,["WindowStartCondition","WindowEndCondition"]),!0},this.WindowVars=function(e){return v(e.pos),w[w.length-1]++,this.visitChildren(e,a.VarHandler(p,d,e)),!0},this.SlidingWindowClause=function(e){return this.visitOnly(e,["ExprSingle","VarValue","VarDefaultValue"]),v(e.pos),w[w.length-1]++,this.visitChildren(e,a.VarHandler(p,d,e)),this.visitOnly(e,["WindowStartCondition","WindowEndCondition"]),!0},this.PositionalVar=function(e){return this.visitChildren(e,a.VarHandler(p,d,e)),!0},this.PositionalVar=function(e){return this.visitChildren(e,a.VarHandler(p,d,e)),!0},this.CurrentItem=function(e){return this.visitChildren(e,a.VarHandler(p,d,e)),!0},this.PreviousItem=function(e){return this.visitChildren(e,a.VarHandler(p,d,e)),!0},this.NextItem=function(e){return this.visitChildren(e,a.VarHandler(p,d,e)),!0},this.CountClause=function(e){return v(e.pos),w[w.length-1]++,this.visitChildren(e,a.VarHandler(p,d,e)),!0},this.CaseClause=function(e){return v(e.pos),this.visitChildren(e,a.VarHandler(p,d,e)),this.visitOnly(e,["ExprSingle"]),m(),!0},this.TransformExpr=function(e){return v(e.pos),this.visitChildren(e),m(),!0},this.TransformSpec=function(e){return this.visitOnly(e,["ExprSingle","VarValue","VarDefaultValue"]),this.visitChildren(e,a.VarHandler(p,d,e)),!0},this.QuantifiedExpr=function(e){return v(e.pos),m(),!0},this.FunctionCall=function(e){try{var n=p.getFirstChild(e,"EQName");n=o.flatten(n);var r=t.resolveQName(n,e.pos);t.namespaces[r.uri].used=!0}catch(i){}},this.visit=function(e){var t=e.name,n=!1;typeof this[t]=="function"&&(n=this[t](e)===!0),n||this.visitChildren(e)},this.visitChildren=function(e,t){for(var n=0;n<e.children.length;n++){var r=e.children[n];t!==undefined&&typeof t[r.name]=="function"?t[r.name](r):this.visit(r)}},this.visit(n),Object.keys(t.variables).forEach(function(e){!t.varRefs[e]&&(t.variables[e].annotations["http://www.w3.org/2005/xpath-functions#private"]||t.moduleNamespace==="")&&t.variables[e].pos&&h("W03",'Unused variable "'+t.variables[e].qname.name+'"',t.variables[e].pos)}),Object.keys(t.namespaces).forEach(function(e){var n=t.namespaces[e];n.used===undefined&&!n.override&&n.type==="module"&&h("W04",'Unused module "'+e+'"',n.pos)})}},{"../tree_ops":10,"./errors":1,"./handlers":2,"./static_context":3}],5:[function(e,t,n){function r(e,t,n){n=n||o;var r=[];for(var i=t-1;i>=0;i--){if(!n.test(e[i]))break;r.push(e[i])}return r.reverse().join("")}function i(e,t){var n=0,r=e.length-1,i=Math.floor((r+n)/2);while(r>n&&i>=0&&e[i].indexOf(t)!==0)t<e[i]?r=i-1:t>e[i]&&(n=i+1),i=Math.floor((r+r)/2);while(i>0&&e[i-1].indexOf(t)===0)i--;return i>=0?i:0}var s=e("../tree_ops").TreeOps,o=/[a-zA-Z_0-9\$]/,u=/[a-zA-Z_0-9\/\.:\-#]/,a="-._A-Za-z0-9:·À-ÖØ-öø-˿̀-ͽͿ-῿‌‍‿⁀⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�",f="["+a+"]",l=new RegExp(f),c={LetBinding:"Let binding",Param:"Function parameter",QuantifiedExpr:"Quantified expression binding",VarDeclStatement:"Local variable",ForBinding:"For binding",TumblingWindowClause:"Tumbling window binding",WindowVars:"Window variable",SlidingWindowClause:"Sliding window binding",PositionalVar:"Positional variable",CurrentItem:"Current item",PreviousItem:"Previous item",NextItem:"Next item",CountClause:"Count binding",GroupingVariable:"Grouping variable",VarDecl:"Module variable"},h=function(e,t){t.sort();var n=i(t,e),r=[];for(var s=n;s<t.length&&t[s].indexOf(e)===0;s++)r.push(t[s]);return r},p=function(e,t,n){var r=e.indexOf(":");if(r===-1){var i=[],s=n.getNamespaces();Object.keys(s).forEach(function(e){s[e].type==="module"&&i.push(s[e].prefix)});var o=h(e,i),u=function(e){return{name:e+":",value:e+":",meta:"prefix"}};return o.map(u)}return[]},d=function(e,t,n){var r=[],i=n.getFunctions(),s="",o="",u=e,a=e.indexOf(":");if(a!==-1){o=e.substring(0,a),u=e.substring(a+1);var f=n.getNamespaceByPrefix(o);f&&(s=n.getNamespaceByPrefix(o).uri)}Object.keys(i).forEach(function(e){var t=i[e],s=e.substring(0,e.indexOf("#")),o=e.substring(e.indexOf("#")+1);o=o.substring(0,o.indexOf("#")),s!==""&&(o=n.getNamespaces()[s].prefix+":"+o),o+="(",o+=t.params.join(", "),o+=")",r.push(o)});var l=h(e,r),c=function(e){return{name:e,value:e,meta:"function"}};return l.map(c)},v=function(e,t,n){var r="",i="",s=e.indexOf(":");s!==-1&&(i=e.substring(0,s),r=n.getNamespaceByPrefix(i).uri);var o=n.getVariables(),u=[],a={};Object.keys(o).forEach(function(e){var t=e.indexOf("#"),r=e.substring(0,t),i=e.substring(t+1);r!==""?(u.push(n.getPrefixByNamespace(r)+":"+i),a[n.getPrefixByNamespace(r)+":"+i]=o[e].type):(u.push(i),a[i]=o[e].type)});var f=h(e,u),l=function(e){return{name:"$"+e,value:"$"+e,meta:c[a[e]]}};return f.map(l)},m=function(e,t,n){var i=r(e,t.col,l),s=e.substring(0,t.col-(i.length===0?0:i.length)),o=s[s.length-1]==="$";return o?v(i,t,n):i!==""?d(i,t,n).concat(p(i,t,n)):v(i,t,n).concat(d(i,t,n)).concat(p(i,t,n))},g=function(e,t,n){var i=r(e,t.col,u),s=h(i,n.getAvailableModuleNamespaces()),o=function(e){return{name:e,value:e,meta:"module"}};return s.map(o)};n.complete=function(e,t,n,r){var i=e.split("\n")[r.line],o=s.findNode(t,r),u=s.findNode(n,r);return u=u?u:n,o&&o.name==="URILiteral"&&o.getParent&&o.getParent.name==="ModuleImport"?g(i,r,u):m(i,r,u)}},{"../tree_ops":10}],6:[function(e,t,n){n.StyleChecker=function(e,t){var n="    ",r=[];this.getMarkers=function(){return r},this.WS=function(e){var t=e.value.split("\n");return t.forEach(function(i,s){var o=s===0,u=s===t.length-1;/\r$/.test(i)&&r.push({pos:{sl:e.pos.sl+s,el:e.pos.sl+s,sc:i.length-1,ec:i.length},type:"warning",level:"warning",message:"[SW01] Detected CRLF"});var a=i.match(/\t+/);a!==null&&r.push({pos:{sl:e.pos.sl+s,el:e.pos.sl+s,sc:a.index,ec:a.index+a[0].length},type:"warning",level:"warning",message:"[SW02] Tabs detected"});if(!o&&u){a=i.match(/^\ +/);if(a!==null){var f=a[0].length%n.length;f!==0&&r.push({pos:{sl:e.pos.sl+s,el:e.pos.sl+s,sc:a.index,ec:a.index+a[0].length},type:"warning",level:"warning",message:"[SW03] Unexcepted indentation of "+a[0].length})}}}),!0},this.visit=function(e,t){var n=e.name,r=!1;typeof this[n]=="function"&&(r=this[n](e,t)===!0),r||this.visitChildren(e)},this.visitChildren=function(e,t){for(var n=0;n<e.children.length;n++){var r=e.children[n];t!==undefined&&typeof t[r.name]=="function"?t[r.name](r):this.visit(r)}},t.split("\n").forEach(function(e,t){var n=e.match(/\ +$/);n&&r.push({pos:{sl:t,el:t,sc:n.index,ec:n.index+n[0].length},type:"warning",level:"warning",message:"[SW04] Trailing whitespace"})}),this.visit(e)}},{}],7:[function(e,t,n){n.JSONParseTreeHandler=function(e){function t(e){return{name:e,children:[],getParent:null,pos:{sl:0,sc:0,el:0,ec:0}}}function n(e){var n=t(e);u===null?(u=n,u.index=[],a=n):(n.getParent=a,a.children.push(n),a=a.children[a.children.length-1])}function r(){if(a.children.length>0){var e=a.children[0],t=null;for(var n=a.children.length-1;n>=0;n--){t=a.children[n];if(t.pos.el!==0||t.pos.ec!==0)break}a.pos.sl=e.pos.sl,a.pos.sc=e.pos.sc,a.pos.el=t.pos.el,a.pos.ec=t.pos.ec}a.name==="FunctionName"&&(a.name="EQName"),a.name==="EQName"&&a.value===undefined&&(a.value=a.children[0].value,a.children.pop()),s.indexOf(a.name)!==-1&&u.index.push(a),a.getParent!==null&&(a=a.getParent);if(a.children.length>0){var r=a.children[a.children.length-1];r.children.length===1&&o.indexOf(r.name)!==-1&&(a.children[a.children.length-1]=r.children[0])}}function i(e,t,n){var r=n-l;a.value=f.substring(0,r),f=f.substring(r),l=n;var i=h,s=c,o=i+a.value.split("\n").length-1,u=a.value.lastIndexOf("\n"),p=u===-1?s+a.value.length:a.value.substring(u+1).length;h=o,c=p,a.pos.sl=i,a.pos.sc=s,a.pos.el=o,a.pos.ec=p}var s=["VarDecl","FunctionDecl"],o=["OrExpr","AndExpr","ComparisonExpr","StringConcatExpr","RangeExpr","UnionExpr","IntersectExceptExpr","InstanceofExpr","TreatExpr","CastableExpr","CastExpr","UnaryExpr","ValueExpr","FTContainsExpr","SimpleMapExpr","PathExpr","RelativePathExpr","PostfixExpr","StepExpr"],u=null,a=null,f=e,l=0,c=0,h=0;this.closeParseTree=function(){while(a.getParent!==null)r();r()},this.peek=function(){return a},this.getParseTree=function(){return u},this.reset=function(){},this.startNonterminal=function(e,t){n(e,t)},this.endNonterminal=function(){r()},this.terminal=function(e,t,s){e=e.substring(0,1)==="'"&&e.substring(e.length-1)==="'"?"TOKEN":e,n(e,t),i(a,t,s),r()},this.whitespace=function(e,t){var s="WS";n(s,e),i(a,e,t),r()}}},{}],8:[function(e,t,n){var r=n.JSONiqParser=function i(e,t){function n(e,t){sc=t,uc=e,ac=e.length,r(0,0,0)}function r(e,t,n){Vl=t,$l=t,Jl=e,Kl=t,Ql=n,Gl=0,lc=n,tc=-1,oc={},sc.reset(uc)}function s(){sc.startNonterminal("Module",$l);switch(Jl){case 170:jl(169);break;default:Xl=Jl}(Xl==64682||Xl==137898)&&o(),Bl(279);switch(Jl){case 185:jl(144);break;default:Xl=Jl}switch(Xl){case 95929:Pl(),u();break;default:Pl(),Qa()}sc.endNonterminal("Module",$l)}function o(){sc.startNonterminal("VersionDecl",$l),Ml(170),Bl(118);switch(Jl){case 126:Ml(126),Bl(17),Ml(11);break;default:Ml(269),Bl(17),Ml(11),Bl(111),Jl==126&&(Ml(126),Bl(17),Ml(11))}Bl(29),Pl(),l(),sc.endNonterminal("VersionDecl",$l)}function u(){sc.startNonterminal("LibraryModule",$l),a(),Bl(140),Pl(),f(),sc.endNonterminal("LibraryModule",$l)}function a(){sc.startNonterminal("ModuleDecl",$l),Ml(185),Bl(64),Ml(187),Bl(241),Pl(),Ja(),Bl(30),Ml(61),Bl(15),Ml(7),Bl(29),Pl(),l(),sc.endNonterminal("ModuleDecl",$l)}function f(){sc.startNonterminal("Prolog",$l);for(;;){Bl(279);switch(Jl){case 109:jl(208);break;case 155:jl(170);break;default:Xl=Jl}if(Xl!=43117&&Xl!=44141&&Xl!=50797&&Xl!=53869&&Xl!=54893&&Xl!=56429&&Xl!=73325&&Xl!=94875&&Xl!=95853&&Xl!=106093&&Xl!=115821&&Xl!=117403)break;switch(Jl){case 109:jl(199);break;default:Xl=Jl}if(Xl==56429){Xl=Ul(0,$l);if(Xl==0){var e=Vl,t=$l,n=Jl,r=Kl,i=Ql,s=Gl,o=Yl,u=Zl;try{M(),Xl=-1}catch(a){Xl=-2}Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Rl(0,$l,Xl)}}switch(Xl){case-1:Pl(),O();break;case 95853:Pl(),A();break;case 155:Pl(),N();break;case 73325:Pl(),_();break;default:Pl(),c()}Bl(29),Pl(),l()}for(;;){Bl(279);switch(Jl){case 109:jl(201);break;default:Xl=Jl}if(Xl!=17005&&Xl!=49261&&Xl!=52333&&Xl!=75373&&Xl!=80493&&Xl!=83565&&Xl!=104045&&Xl!=134765&&Xl!=137325)break;switch(Jl){case 109:jl(197);break;default:Xl=Jl}switch(Xl){case 52333:Pl(),q();break;case 104045:Pl(),K();break;default:Pl(),D()}Bl(29),Pl(),l()}sc.endNonterminal("Prolog",$l)}function l(){sc.startNonterminal("Separator",$l),Ml(54),sc.endNonterminal("Separator",$l)}function c(){sc.startNonterminal("Setter",$l);switch(Jl){case 109:jl(195);break;default:Xl=Jl}if(Xl==56429){Xl=Ul(1,$l);if(Xl==0){var e=Vl,t=$l,n=Jl,r=Kl,i=Ql,s=Gl,o=Yl,u=Zl;try{d(),Xl=-2}catch(a){try{Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),b(),Xl=-6}catch(f){Xl=-9}}Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Rl(1,$l,Xl)}}switch(Xl){case 44141:h();break;case-2:p();break;case 43117:v();break;case 50797:m();break;case 106093:g();break;case-6:y();break;case 115821:Bo();break;case 53869:w();break;default:x()}sc.endNonterminal("Setter",$l)}function h(){sc.startNonterminal("BoundarySpaceDecl",$l),Ml(109),Bl(36),Ml(86),Bl(135);switch(Jl){case 218:Ml(218);break;default:Ml(246)}sc.endNonterminal("BoundarySpaceDecl",$l)}function p(){sc.startNonterminal("DefaultCollationDecl",$l),Ml(109),Bl(49),Ml(110),Bl(41),Ml(95),Bl(15),Ml(7),sc.endNonterminal("DefaultCollationDecl",$l)}function d(){_l(109),Bl(49),_l(110),Bl(41),_l(95),Bl(15),_l(7)}function v(){sc.startNonterminal("BaseURIDecl",$l),Ml(109),Bl(35),Ml(84),Bl(15),Ml(7),sc.endNonterminal("BaseURIDecl",$l)}function m(){sc.startNonterminal("ConstructionDecl",$l),Ml(109),Bl(44),Ml(99),Bl(135);switch(Jl){case 246:Ml(246);break;default:Ml(218)}sc.endNonterminal("ConstructionDecl",$l)}function g(){sc.startNonterminal("OrderingModeDecl",$l),Ml(109),Bl(71),Ml(207),Bl(133);switch(Jl){case 206:Ml(206);break;default:Ml(262)}sc.endNonterminal("OrderingModeDecl",$l)}function y(){sc.startNonterminal("EmptyOrderDecl",$l),Ml(109),Bl(49),Ml(110),Bl(70),Ml(205),Bl(52),Ml(124),Bl(123);switch(Jl){case 149:Ml(149);break;default:Ml(176)}sc.endNonterminal("EmptyOrderDecl",$l)}function b(){_l(109),Bl(49),_l(110),Bl(70),_l(205),Bl(52),_l(124),Bl(123);switch(Jl){case 149:_l(149);break;default:_l(176)}}function w(){sc.startNonterminal("CopyNamespacesDecl",$l),Ml(109),Bl(47),Ml(105),Bl(130),Pl(),E(),Bl(25),Ml(42),Bl(125),Pl(),S(),sc.endNonterminal("CopyNamespacesDecl",$l)}function E(){sc.startNonterminal("PreserveMode",$l);switch(Jl){case 218:Ml(218);break;default:Ml(193)}sc.endNonterminal("PreserveMode",$l)}function S(){sc.startNonterminal("InheritMode",$l);switch(Jl){case 159:Ml(159);break;default:Ml(192)}sc.endNonterminal("InheritMode",$l)}function x(){sc.startNonterminal("DecimalFormatDecl",$l),Ml(109),Bl(116);switch(Jl){case 107:Ml(107),Bl(247),Pl(),Wa();break;default:Ml(110),Bl(48),Ml(107)}for(;;){Bl(203);if(Jl==54)break;Pl(),T(),Bl(30),Ml(61),Bl(17),Ml(11)}sc.endNonterminal("DecimalFormatDecl",$l)}function T(){sc.startNonterminal("DFPropertyName",$l);switch(Jl){case 108:Ml(108);break;case 151:Ml(151);break;case 158:Ml(158);break;case 182:Ml(182);break;case 68:Ml(68);break;case 213:Ml(213);break;case 212:Ml(212);break;case 280:Ml(280);break;case 117:Ml(117);break;default:Ml(211)}sc.endNonterminal("DFPropertyName",$l)}function N(){sc.startNonterminal("Import",$l);switch(Jl){case 155:jl(128);break;default:Xl=Jl}switch(Xl){case 117403:C();break;default:L()}sc.endNonterminal("Import",$l)}function C(){sc.startNonterminal("SchemaImport",$l),Ml(155),Bl(75),Ml(229),Bl(139),Jl!=7&&(Pl(),k()),Bl(15),Ml(7),Bl(110);if(Jl==82){Ml(82),Bl(15),Ml(7);for(;;){Bl(105);if(Jl!=42)break;Ml(42),Bl(15),Ml(7)}}sc.endNonterminal("SchemaImport",$l)}function k(){sc.startNonterminal("SchemaPrefix",$l);switch(Jl){case 187:Ml(187),Bl(241),Pl(),Ja(),Bl(30),Ml(61);break;default:Ml(110),Bl(50),Ml(122),Bl(64),Ml(187)}sc.endNonterminal("SchemaPrefix",$l)}function L(){sc.startNonterminal("ModuleImport",$l),Ml(155),Bl(63),Ml(185),Bl(92),Jl==187&&(Ml(187),Bl(241),Pl(),Ja(),Bl(30),Ml(61)),Bl(15),Ml(7),Bl(110);if(Jl==82){Ml(82),Bl(15),Ml(7);for(;;){Bl(105);if(Jl!=42)break;Ml(42),Bl(15),Ml(7)}}sc.endNonterminal("ModuleImport",$l)}function A(){sc.startNonterminal("NamespaceDecl",$l),Ml(109),Bl(64),Ml(187),Bl(241),Pl(),Ja(),Bl(30),Ml(61),Bl(15),Ml(7),sc.endNonterminal("NamespaceDecl",$l)}function O(){sc.startNonterminal("DefaultNamespaceDecl",$l),Ml(109),Bl(49),Ml(110),Bl(117);switch(Jl){case 122:Ml(122);break;default:Ml(147)}Bl(64),Ml(187),Bl(15),Ml(7),sc.endNonterminal("DefaultNamespaceDecl",$l)}function M(){_l(109),Bl(49),_l(110),Bl(117);switch(Jl){case 122:_l(122);break;default:_l(147)}Bl(64),_l(187),Bl(15),_l(7)}function _(){sc.startNonterminal("FTOptionDecl",$l),Ml(109),Bl(55),Ml(143),Bl(83),Pl(),$u(),sc.endNonterminal("FTOptionDecl",$l)}function D(){sc.startNonterminal("AnnotatedDecl",$l),Ml(109);for(;;){Bl(193);if(Jl!=33&&Jl!=263)break;switch(Jl){case 263:Pl(),P();break;default:Pl(),H()}}switch(Jl){case 268:Pl(),j();break;case 147:Pl(),Al();break;case 96:Pl(),xa();break;case 157:Pl(),_a();break;default:Pl(),Da()}sc.endNonterminal("AnnotatedDecl",$l)}function P(){sc.startNonterminal("CompatibilityAnnotation",$l),Ml(263),sc.endNonterminal("CompatibilityAnnotation",$l)}function H(){sc.startNonterminal("Annotation",$l),Ml(33),Bl(247),Pl(),Wa(),Bl(194);if(Jl==35){Ml(35),Bl(191),Pl(),ci();for(;;){Bl(103);if(Jl!=42)break;Ml(42),Bl(191),Pl(),ci()}Ml(38)}sc.endNonterminal("Annotation",$l)}function B(){_l(33),Bl(247),Xa(),Bl(194);if(Jl==35){_l(35),Bl(191),hi();for(;;){Bl(103);if(Jl!=42)break;_l(42),Bl(191),hi()}_l(38)}}function j(){sc.startNonterminal("VarDecl",$l),Ml(268),Bl(21),Ml(31),Bl(247),Pl(),Ei(),Bl(156),Jl==80&&(Pl(),xs()),Bl(108);switch(Jl){case 53:Ml(53),Bl(268),Pl(),F();break;default:Ml(134),Bl(106),Jl==53&&(Ml(53),Bl(268),Pl(),I())}sc.endNonterminal("VarDecl",$l)}function F(){sc.startNonterminal("VarValue",$l),Rf(),sc.endNonterminal("VarValue",$l)}function I(){sc.startNonterminal("VarDefaultValue",$l),Rf(),sc.endNonterminal("VarDefaultValue",$l)}function q(){sc.startNonterminal("ContextItemDecl",$l),Ml(109),Bl(46),Ml(102),Bl(58),Ml(167),Bl(156),Jl==80&&(Ml(80),Bl(255),Pl(),As()),Bl(108);switch(Jl){case 53:Ml(53),Bl(268),Pl(),F();break;default:Ml(134),Bl(106),Jl==53&&(Ml(53),Bl(268),Pl(),I())}sc.endNonterminal("ContextItemDecl",$l)}function R(){sc.startNonterminal("ParamList",$l),z();for(;;){Bl(103);if(Jl!=42)break;Ml(42),Bl(21),Pl(),z()}sc.endNonterminal("ParamList",$l)}function U(){W();for(;;){Bl(103);if(Jl!=42)break;_l(42),Bl(21),W()}}function z(){sc.startNonterminal("Param",$l),Ml(31),Bl(247),Pl(),Wa(),Bl(152),Jl==80&&(Pl(),xs()),sc.endNonterminal("Param",$l)}function W(){_l(31),Bl(247),Xa(),Bl(152),Jl==80&&Ts()}function X(){sc.startNonterminal("FunctionBody",$l),$(),sc.endNonterminal("FunctionBody",$l)}function V(){J()}function $(){sc.startNonterminal("EnclosedExpr",$l),Ml(281),Bl(268),Pl(),Q(),Ml(287),sc.endNonterminal("EnclosedExpr",$l)}function J(){_l(281),Bl(268),G(),_l(287)}function K(){sc.startNonterminal("OptionDecl",$l),Ml(109),Bl(69),Ml(203),Bl(247),Pl(),Wa(),Bl(17),Ml(11),sc.endNonterminal("OptionDecl",$l)}function Q(){sc.startNonterminal("Expr",$l),Rf();for(;;){if(Jl!=42)break;Ml(42),Bl(268),Pl(),Rf()}sc.endNonterminal("Expr",$l)}function G(){Uf();for(;;){if(Jl!=42)break;_l(42),Bl(268),Uf()}}function Y(){sc.startNonterminal("FLWORExpr",$l),et();for(;;){Bl(200);if(Jl==224||Jl==233)break;Pl(),nt()}Pl(),nn(),sc.endNonterminal("FLWORExpr",$l)}function Z(){tt();for(;;){Bl(200);if(Jl==224||Jl==233)break;rt()}rn()}function et(){sc.startNonterminal("InitialClause",$l);switch(Jl){case 139:case 142:jl(150);break;default:Xl=Jl}switch(Xl){case 16011:case 16014:it();break;case 177:dt();break;default:yt()}sc.endNonterminal("InitialClause",$l)}function tt(){switch(Jl){case 139:case 142:jl(150);break;default:Xl=Jl}switch(Xl){case 16011:case 16014:st();break;case 177:vt();break;default:bt()}}function nt(){sc.startNonterminal("IntermediateClause",$l);switch(Jl){case 272:Ft();break;case 150:qt();break;case 205:case 241:Jt();break;case 106:Bt();break;default:et()}sc.endNonterminal("IntermediateClause",$l)}function rt(){switch(Jl){case 272:It();break;case 150:Rt();break;case 205:case 241:Kt();break;case 106:jt();break;default:tt()}}function it(){sc.startNonterminal("ForClause",$l);switch(Jl){case 139:Ml(139);break;default:Ml(142)}Bl(21),Pl(),ot();for(;;){if(Jl!=42)break;Ml(42),Bl(21),Pl(),ot()}sc.endNonterminal("ForClause",$l)}function st(){switch(Jl){case 139:_l(139);break;default:_l(142)}Bl(21),ut();for(;;){if(Jl!=42)break;_l(42),Bl(21),ut()}}function ot(){sc.startNonterminal("ForBinding",$l),Ml(31),Bl(247),Pl(),Ei(),Bl(183),Jl==80&&(Pl(),xs()),Bl(174),Jl==73&&(Pl(),at()),Bl(159),Jl==82&&(Pl(),lt()),Bl(124),Jl==232&&(Pl(),ht()),Bl(56),Ml(156),Bl(268),Pl(),Rf(),sc.endNonterminal("ForBinding",$l)}function ut(){_l(31),Bl(247),Si(),Bl(183),Jl==80&&Ts(),Bl(174),Jl==73&&ft(),Bl(159),Jl==82&&ct(),Bl(124),Jl==232&&pt(),Bl(56),_l(156),Bl(268),Uf()}function at(){sc.startNonterminal("AllowingEmpty",$l),Ml(73),Bl(52),Ml(124),sc.endNonterminal("AllowingEmpty",$l)}function ft(){_l(73),Bl(52),_l(124)}function lt(){sc.startNonterminal("PositionalVar",$l),Ml(82),Bl(21),Ml(31),Bl(247),Pl(),Ei(),sc.endNonterminal("PositionalVar",$l)}function ct(){_l(82),Bl(21),_l(31),Bl(247),Si()}function ht(){sc.startNonterminal("FTScoreVar",$l),Ml(232),Bl(21),Ml(31),Bl(247),Pl(),Ei(),sc.endNonterminal("FTScoreVar",$l)}function pt(){_l(232),Bl(21),_l(31),Bl(247),Si()}function dt(){sc.startNonterminal("LetClause",$l),Ml(177),Bl(98),Pl(),mt();for(;;){if(Jl!=42)break;Ml(42),Bl(98),Pl(),mt()}sc.endNonterminal("LetClause",$l)}function vt(){_l(177),Bl(98),gt();for(;;){if(Jl!=42)break;_l(42),Bl(98),gt()}}function mt(){sc.startNonterminal("LetBinding",$l);switch(Jl){case 31:Ml(31),Bl(247),Pl(),Ei(),Bl(107),Jl==80&&(Pl(),xs());break;default:ht()}Bl(28),Ml(53),Bl(268),Pl(),Rf(),sc.endNonterminal("LetBinding",$l)}function gt(){switch(Jl){case 31:_l(31),Bl(247),Si(),Bl(107),Jl==80&&Ts();break;default:pt()}Bl(28),_l(53),Bl(268),Uf()}function yt(){sc.startNonterminal("WindowClause",$l);switch(Jl){case 139:Ml(139);break;default:Ml(142)}Bl(137);switch(Jl){case 257:Pl(),wt();break;default:Pl(),St()}sc.endNonterminal("WindowClause",$l)}function bt(){switch(Jl){case 139:_l(139);break;default:_l(142)}Bl(137);switch(Jl){case 257:Et();break;default:xt()}}function wt(){sc.startNonterminal("TumblingWindowClause",$l),Ml(257),Bl(87),Ml(275),Bl(21),Ml(31),Bl(247),Pl(),Ei(),Bl(112),Jl==80&&(Pl(),xs()),Bl(56),Ml(156),Bl(268),Pl(),Rf(),Pl(),Tt();if(Jl==127||Jl==202)Pl(),Ct();sc.endNonterminal("TumblingWindowClause",$l)}function Et(){_l(257),Bl(87),_l(275),Bl(21),_l(31),Bl(247),Si(),Bl(112),Jl==80&&Ts(),Bl(56),_l(156),Bl(268),Uf(),Nt(),(Jl==127||Jl==202)&&kt()}function St(){sc.startNonterminal("SlidingWindowClause",$l),Ml(239),Bl(87),Ml(275),Bl(21),Ml(31),Bl(247),Pl(),Ei(),Bl(112),Jl==80&&(Pl(),xs()),Bl(56),Ml(156),Bl(268),Pl(),Rf(),Pl(),Tt(),Pl(),Ct(),sc.endNonterminal("SlidingWindowClause",$l)}function xt(){_l(239),Bl(87),_l(275),Bl(21),_l(31),Bl(247),Si(),Bl(112),Jl==80&&Ts(),Bl(56),_l(156),Bl(268),Uf(),Nt(),kt()}function Tt(){sc.startNonterminal("WindowStartCondition",$l),Ml(242),Bl(182),Pl(),Lt(),Bl(85),Ml(271),Bl(268),Pl(),Rf(),sc.endNonterminal("WindowStartCondition",$l)}function Nt(){_l(242),Bl(182),At(),Bl(85),_l(271),Bl(268),Uf()}function Ct(){sc.startNonterminal("WindowEndCondition",$l),Jl==202&&Ml(202),Bl(53),Ml(127),Bl(182),Pl(),Lt(),Bl(85),Ml(271),Bl(268),Pl(),Rf(),sc.endNonterminal("WindowEndCondition",$l)}function kt(){Jl==202&&_l(202),Bl(53),_l(127),Bl(182),At(),Bl(85),_l(271),Bl(268),Uf()}function Lt(){sc.startNonterminal("WindowVars",$l),Jl==31&&(Ml(31),Bl(247),Pl(),Ot()),Bl(175),Jl==82&&(Pl(),lt()),Bl(162),Jl==219&&(Ml(219),Bl(21),Ml(31),Bl(247),Pl(),_t()),Bl(129),Jl==190&&(Ml(190),Bl(21),Ml(31),Bl(247),Pl(),Pt()),sc.endNonterminal("WindowVars",$l)}function At(){Jl==31&&(_l(31),Bl(247),Mt()),Bl(175),Jl==82&&ct(),Bl(162),Jl==219&&(_l(219),Bl(21),_l(31),Bl(247),Dt()),Bl(129),Jl==190&&(_l(190),Bl(21),_l(31),Bl(247),Ht())}function Ot(){sc.startNonterminal("CurrentItem",$l),Wa(),sc.endNonterminal("CurrentItem",$l)}function Mt(){Xa()}function _t(){sc.startNonterminal("PreviousItem",$l),Wa(),sc.endNonterminal("PreviousItem",$l)}function Dt(){Xa()}function Pt(){sc.startNonterminal("NextItem",$l),Wa(),sc.endNonterminal("NextItem",$l)}function Ht(){Xa()}function Bt(){sc.startNonterminal("CountClause",$l),Ml(106),Bl(21),Ml(31),Bl(247),Pl(),Ei(),sc.endNonterminal("CountClause",$l)}function jt(){_l(106),Bl(21),_l(31),Bl(247),Si()}function Ft(){sc.startNonterminal("WhereClause",$l),Ml(272),Bl(268),Pl(),Rf(),sc.endNonterminal("WhereClause",$l)}function It(){_l(272),Bl(268),Uf()}function qt(){sc.startNonterminal("GroupByClause",$l),Ml(150),Bl(37),Ml(88),Bl(268),Pl(),Ut(),sc.endNonterminal("GroupByClause",$l)}function Rt(){_l(150),Bl(37),_l(88),Bl(268),zt()}function Ut(){sc.startNonterminal("GroupingSpecList",$l),Wt();for(;;){Bl(202);if(Jl!=42)break;Ml(42),Bl(268),Pl(),Wt()}sc.endNonterminal("GroupingSpecList",$l)}function zt(){Xt();for(;;){Bl(202);if(Jl!=42)break;_l(42),Bl(268),Xt()}}function Wt(){sc.startNonterminal("GroupingSpec",$l);switch(Jl){case 31:jl(247);break;default:Xl=Jl}if(Xl==3103||Xl==36383||Xl==37407||Xl==37919||Xl==38431||Xl==38943||Xl==39967||Xl==40479||Xl==40991||Xl==41503||Xl==42015||Xl==42527||Xl==43039||Xl==43551||Xl==44063||Xl==44575||Xl==45599||Xl==46111||Xl==46623||Xl==47135||Xl==48159||Xl==48671||Xl==49695||Xl==50207||Xl==50719||Xl==52255||Xl==52767||Xl==53279||Xl==53791||Xl==54303||Xl==54815||Xl==55839||Xl==56351||Xl==56863||Xl==57375||Xl==57887||Xl==58399||Xl==60959||Xl==61471||Xl==61983||Xl==62495||Xl==63007||Xl==63519||Xl==64031||Xl==64543||Xl==65055||Xl==66079||Xl==66591||Xl==67615||Xl==68127||Xl==68639||Xl==69151||Xl==69663||Xl==70175||Xl==70687||Xl==71199||Xl==72735||Xl==73247||Xl==75295||Xl==75807||Xl==76831||Xl==77855||Xl==78367||Xl==78879||Xl==79391||Xl==79903||Xl==80415||Xl==82463||Xl==82975||Xl==83487||Xl==83999||Xl==84511||Xl==85023||Xl==85535||Xl==86047||Xl==86559||Xl==87071||Xl==88607||Xl==89119||Xl==89631||Xl==90655||Xl==91679||Xl==92703||Xl==93727||Xl==94239||Xl==94751||Xl==95775||Xl==96287||Xl==96799||Xl==99359||Xl==99871||Xl==100895||Xl==101407||Xl==103455||Xl==103967||Xl==104479||Xl==104991||Xl==105503||Xl==106015||Xl==107551||Xl==110623||Xl==111135||Xl==112671||Xl==113695||Xl==114207||Xl==114719||Xl==115231||Xl==115743||Xl==116767||Xl==117279||Xl==117791||Xl==118303||Xl==118815||Xl==119327||Xl==119839||Xl==122399||Xl==122911||Xl==123423||Xl==123935||Xl==125471||Xl==126495||Xl==127007||Xl==127519||Xl==129567||Xl==130079||Xl==130591||Xl==131103||Xl==131615||Xl==132127||Xl==132639||Xl==133151||Xl==134175||Xl==134687||Xl==136223||Xl==136735||Xl==137247||Xl==137759||Xl==139295||Xl==139807||Xl==141343){Xl=Ul(2,$l);if(Xl==0){var e=Vl,t=$l,n=Jl,r=Kl,i=Ql,s=Gl,o=Yl,u=Zl;try{$t(),Bl(207);if(Jl==53||Jl==80)Jl==80&&Ts(),Bl(28),_l(53),Bl(268),Uf();Jl==95&&(_l(95),Bl(15),_l(7)),Xl=-1}catch(a){Xl=-2}Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Rl(2,$l,Xl)}}switch(Xl){case-1:Vt(),Bl(207);if(Jl==53||Jl==80)Jl==80&&(Pl(),xs()),Bl(28),Ml(53),Bl(268),Pl(),Rf();Jl==95&&(Ml(95),Bl(15),Ml(7));break;default:Rf()}sc.endNonterminal("GroupingSpec",$l)}function Xt(){switch(Jl){case 31:jl(247);break;default:Xl=Jl}if(Xl==3103||Xl==36383||Xl==37407||Xl==37919||Xl==38431||Xl==38943||Xl==39967||Xl==40479||Xl==40991||Xl==41503||Xl==42015||Xl==42527||Xl==43039||Xl==43551||Xl==44063||Xl==44575||Xl==45599||Xl==46111||Xl==46623||Xl==47135||Xl==48159||Xl==48671||Xl==49695||Xl==50207||Xl==50719||Xl==52255||Xl==52767||Xl==53279||Xl==53791||Xl==54303||Xl==54815||Xl==55839||Xl==56351||Xl==56863||Xl==57375||Xl==57887||Xl==58399||Xl==60959||Xl==61471||Xl==61983||Xl==62495||Xl==63007||Xl==63519||Xl==64031||Xl==64543||Xl==65055||Xl==66079||Xl==66591||Xl==67615||Xl==68127||Xl==68639||Xl==69151||Xl==69663||Xl==70175||Xl==70687||Xl==71199||Xl==72735||Xl==73247||Xl==75295||Xl==75807||Xl==76831||Xl==77855||Xl==78367||Xl==78879||Xl==79391||Xl==79903||Xl==80415||Xl==82463||Xl==82975||Xl==83487||Xl==83999||Xl==84511||Xl==85023||Xl==85535||Xl==86047||Xl==86559||Xl==87071||Xl==88607||Xl==89119||Xl==89631||Xl==90655||Xl==91679||Xl==92703||Xl==93727||Xl==94239||Xl==94751||Xl==95775||Xl==96287||Xl==96799||Xl==99359||Xl==99871||Xl==100895||Xl==101407||Xl==103455||Xl==103967||Xl==104479||Xl==104991||Xl==105503||Xl==106015||Xl==107551||Xl==110623||Xl==111135||Xl==112671||Xl==113695||Xl==114207||Xl==114719||Xl==115231||Xl==115743||Xl==116767||Xl==117279||Xl==117791||Xl==118303||Xl==118815||Xl==119327||Xl==119839||Xl==122399||Xl==122911||Xl==123423||Xl==123935||Xl==125471||Xl==126495||Xl==127007||Xl==127519||Xl==129567||Xl==130079||Xl==130591||Xl==131103||Xl==131615||Xl==132127||Xl==132639||Xl==133151||Xl==134175||Xl==134687||Xl==136223||Xl==136735||Xl==137247||Xl==137759||Xl==139295||Xl==139807||Xl==141343){Xl=Ul(2,$l);if(Xl==0){var e=Vl,t=$l,n=Jl,r=Kl,i=Ql,s=Gl,o=Yl,u=Zl;try{$t(),Bl(207);if(Jl==53||Jl==80)Jl==80&&Ts(),Bl(28),_l(53),Bl(268),Uf();Jl==95&&(_l(95),Bl(15),_l(7)),Rl(2,t,-1),Xl=-3}catch(a){Xl=-2,Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Rl(2,t,-2)}}}switch(Xl){case-1:$t(),Bl(207);if(Jl==53||Jl==80)Jl==80&&Ts(),Bl(28),_l(53),Bl(268),Uf();Jl==95&&(_l(95),Bl(15),_l(7));break;case-3:break;default:Uf()}}function Vt(){sc.startNonterminal("GroupingVariable",$l),Ml(31),Bl(247),Pl(),Ei(),sc.endNonterminal("GroupingVariable",$l)}function $t(){_l(31),Bl(247),Si()}function Jt(){sc.startNonterminal("OrderByClause",$l);switch(Jl){case 205:Ml(205),Bl(37),Ml(88);break;default:Ml(241),Bl(70),Ml(205),Bl(37),Ml(88)}Bl(268),Pl(),Qt(),sc.endNonterminal("OrderByClause",$l)}function Kt(){switch(Jl){case 205:_l(205),Bl(37),_l(88);break;default:_l(241),Bl(70),_l(205),Bl(37),_l(88)}Bl(268),Gt()}function Qt(){sc.startNonterminal("OrderSpecList",$l),Yt();for(;;){Bl(202);if(Jl!=42)break;Ml(42),Bl(268),Pl(),Yt()}sc.endNonterminal("OrderSpecList",$l)}function Gt(){Zt();for(;;){Bl(202);if(Jl!=42)break;_l(42),Bl(268),Zt()}}function Yt(){sc.startNonterminal("OrderSpec",$l),Rf(),Pl(),en(),sc.endNonterminal("OrderSpec",$l)}function Zt(){Uf(),tn()}function en(){sc.startNonterminal("OrderModifier",$l);if(Jl==81||Jl==114)switch(Jl){case 81:Ml(81);break;default:Ml(114)}Bl(206);if(Jl==124){Ml(124),Bl(123);switch(Jl){case 149:Ml(149);break;default:Ml(176)}}Bl(205),Jl==95&&(Ml(95),Bl(15),Ml(7)),sc.endNonterminal("OrderModifier",$l)}function tn(){if(Jl==81||Jl==114)switch(Jl){case 81:_l(81);break;default:_l(114)}Bl(206);if(Jl==124){_l(124),Bl(123);switch(Jl){case 149:_l(149);break;default:_l(176)}}Bl(205),Jl==95&&(_l(95),Bl(15),_l(7))}function nn(){sc.startNonterminal("ReturnClause",$l);switch(Jl){case 224:Ml(224);break;default:Ml(233)}Bl(268),Pl(),Rf(),sc.endNonterminal("ReturnClause",$l)}function rn(){switch(Jl){case 224:_l(224);break;default:_l(233)}Bl(268),Uf()}function sn(){sc.startNonterminal("QuantifiedExpr",$l);switch(Jl){case 240:Ml(240);break;default:Ml(130)}Bl(21),Ml(31),Bl(247),Pl(),Ei(),Bl(112),Jl==80&&(Pl(),xs()),Bl(56),Ml(156),Bl(268),Pl(),Rf();for(;;){if(Jl!=42)break;Ml(42),Bl(21),Ml(31),Bl(247),Pl(),Ei(),Bl(112),Jl==80&&(Pl(),xs()),Bl(56),Ml(156),Bl(268),Pl(),Rf()}Ml(228),Bl(268),Pl(),Rf(),sc.endNonterminal("QuantifiedExpr",$l)}function on(){switch(Jl){case 240:_l(240);break;default:_l(130)}Bl(21),_l(31),Bl(247),Si(),Bl(112),Jl==80&&Ts(),Bl(56),_l(156),Bl(268),Uf();for(;;){if(Jl!=42)break;_l(42),Bl(21),_l(31),Bl(247),Si(),Bl(112),Jl==80&&Ts(),Bl(56),_l(156),Bl(268),Uf()}_l(228),Bl(268),Uf()}function un(){sc.startNonterminal("SwitchExpr",$l),Ml(248),Bl(22),Ml(35),Bl(268),Pl(),Q(),Ml(38);for(;;){Bl(38),Pl(),fn();if(Jl!=89)break}Ml(110),Bl(136);switch(Jl){case 224:Ml(224);break;default:Ml(233)}Bl(268),Pl(),Rf(),sc.endNonterminal("SwitchExpr",$l)}function an(){_l(248),Bl(22),_l(35),Bl(268),G(),_l(38);for(;;){Bl(38),ln();if(Jl!=89)break}_l(110),Bl(136);switch(Jl){case 224:_l(224);break;default:_l(233)}Bl(268),Uf()}function fn(){sc.startNonterminal("SwitchCaseClause",$l);for(;;){Ml(89),Bl(268),Pl(),cn();if(Jl!=89)break}switch(Jl){case 224:Ml(224);break;default:Ml(233)}Bl(268),Pl(),Rf(),sc.endNonterminal("SwitchCaseClause",$l)}function ln(){for(;;){_l(89),Bl(268),hn();if(Jl!=89)break}switch(Jl){case 224:_l(224);break;default:_l(233)}Bl(268),Uf()}function cn(){sc.startNonterminal("SwitchCaseOperand",$l),Rf(),sc.endNonterminal("SwitchCaseOperand",$l)}function hn(){Uf()}function pn(){sc.startNonterminal("TypeswitchExpr",$l),Ml(259),Bl(22),Ml(35),Bl(268),Pl(),Q(),Ml(38);for(;;){Bl(38),Pl(),vn();if(Jl!=89)break}Ml(110),Bl(149),Jl==31&&(Ml(31),Bl(247),Pl(),Ei()),Bl(136);switch(Jl){case 224:Ml(224);break;default:Ml(233)}Bl(268),Pl(),Rf(),sc.endNonterminal("TypeswitchExpr",$l)}function dn(){_l(259),Bl(22),_l(35),Bl(268),G(),_l(38);for(;;){Bl(38),mn();if(Jl!=89)break}_l(110),Bl(149),Jl==31&&(_l(31),Bl(247),Si()),Bl(136);switch(Jl){case 224:_l(224);break;default:_l(233)}Bl(268),Uf()}function vn(){sc.startNonterminal("CaseClause",$l),Ml(89),Bl(259),Jl==31&&(Ml(31),Bl(247),Pl(),Ei(),Bl(33),Ml(80)),Bl(255),Pl(),gn();switch(Jl){case 224:Ml(224);break;default:Ml(233)}Bl(268),Pl(),Rf(),sc.endNonterminal("CaseClause",$l)}function mn(){_l(89),Bl(259),Jl==31&&(_l(31),Bl(247),Si(),Bl(33),_l(80)),Bl(255),yn();switch(Jl){case 224:_l(224);break;default:_l(233)}Bl(268),Uf()}function gn(){sc.startNonterminal("SequenceTypeUnion",$l),Ns();for(;;){Bl(163);if(Jl!=284)break;Ml(284),Bl(255),Pl(),Ns()}sc.endNonterminal("SequenceTypeUnion",$l)}function yn(){Cs();for(;;){Bl(163);if(Jl!=284)break;_l(284),Bl(255),Cs()}}function bn(){sc.startNonterminal("IfExpr",$l),Ml(154),Bl(22),Ml(35),Bl(268),Pl(),Q(),Ml(38),Bl(79),Ml(250),Bl(268),Pl(),Rf(),Ml(123),Bl(268),Pl(),Rf(),sc.endNonterminal("IfExpr",$l)}function wn(){_l(154),Bl(22),_l(35),Bl(268),G(),_l(38),Bl(79),_l(250),Bl(268),Uf(),_l(123),Bl(268),Uf()}function En(){sc.startNonterminal("TryCatchExpr",$l),xn();for(;;){Bl(39),Pl(),kn(),Bl(209);if(Jl!=92)break}sc.endNonterminal("TryCatchExpr",$l)}function Sn(){Tn();for(;;){Bl(39),Ln(),Bl(209);if(Jl!=92)break}}function xn(){sc.startNonterminal("TryClause",$l),Ml(256),Bl(89),Ml(281),Bl(268),Pl(),Nn(),Ml(287),sc.endNonterminal("TryClause",$l)}function Tn(){_l(256),Bl(89),_l(281),Bl(268),Cn(),_l(287)}function Nn(){sc.startNonterminal("TryTargetExpr",$l),Q(),sc.endNonterminal("TryTargetExpr",$l)}function Cn(){G()}function kn(){sc.startNonterminal("CatchClause",$l),Ml(92),Bl(250),Pl(),An(),Ml(281),Bl(268),Pl(),Q(),Ml(287),sc.endNonterminal("CatchClause",$l)}function Ln(){_l(92),Bl(250),On(),_l(281),Bl(268),G(),_l(287)}function An(){sc.startNonterminal("CatchErrorList",$l),Kr();for(;;){Bl(138);if(Jl!=284)break;Ml(284),Bl(250),Pl(),Kr()}sc.endNonterminal("CatchErrorList",$l)}function On(){Qr();for(;;){Bl(138);if(Jl!=284)break;_l(284),Bl(250),Qr()}}function Mn(){sc.startNonterminal("OrExpr",$l),Dn();for(;;){if(Jl!=204)break;Ml(204),Bl(268),Pl(),Dn()}sc.endNonterminal("OrExpr",$l)}function _n(){Pn();for(;;){if(Jl!=204)break;_l(204),Bl(268),Pn()}}function Dn(){sc.startNonterminal("AndExpr",$l),Hn();for(;;){if(Jl!=76)break;Ml(76),Bl(268),Pl(),Hn()}sc.endNonterminal("AndExpr",$l)}function Pn(){Bn();for(;;){if(Jl!=76)break;_l(76),Bl(268),Bn()}}function Hn(){sc.startNonterminal("NotExpr",$l);for(;;){Bl(268);if(Jl!=196)break;Ml(196)}Pl(),jn(),sc.endNonterminal("NotExpr",$l)}function Bn(){for(;;){Bl(268);if(Jl!=196)break;_l(196)}Fn()}function jn(){sc.startNonterminal("ComparisonExpr",$l),In();if(Jl==27||Jl==55||Jl==58||Jl==59||Jl==61||Jl==62||Jl==63||Jl==64||Jl==129||Jl==148||Jl==152||Jl==166||Jl==175||Jl==181||Jl==189){switch(Jl){case 129:case 148:case 152:case 175:case 181:case 189:Pl(),vr();break;case 58:case 64:case 166:Pl(),gr();break;default:Pl(),pr()}Bl(267),Pl(),In()}sc.endNonterminal("ComparisonExpr",$l)}function Fn(){qn();if(Jl==27||Jl==55||Jl==58||Jl==59||Jl==61||Jl==62||Jl==63||Jl==64||Jl==129||Jl==148||Jl==152||Jl==166||Jl==175||Jl==181||Jl==189){switch(Jl){case 129:case 148:case 152:case 175:case 181:case 189:mr();break;case 58:case 64:case 166:yr();break;default:dr()}Bl(267),qn()}}function In(){sc.startNonterminal("FTContainsExpr",$l),Rn(),Jl==100&&(Ml(100),Bl(78),Ml(249),Bl(178),Pl(),ru(),Jl==277&&(Pl(),Ea())),sc.endNonterminal("FTContainsExpr",$l)}function qn(){Un(),Jl==100&&(_l(100),Bl(78),_l(249),Bl(178),iu(),Jl==277&&Sa())}function Rn(){sc.startNonterminal("StringConcatExpr",$l),zn();for(;;){if(Jl!=285)break;Ml(285),Bl(267),Pl(),zn()}sc.endNonterminal("StringConcatExpr",$l)}function Un(){Wn();for(;;){if(Jl!=285)break;_l(285),Bl(267),Wn()}}function zn(){sc.startNonterminal("RangeExpr",$l),Xn(),Jl==253&&(Ml(253),Bl(267),Pl(),Xn()),sc.endNonterminal("RangeExpr",$l)}function Wn(){Vn(),Jl==253&&(_l(253),Bl(267),Vn())}function Xn(){sc.startNonterminal("AdditiveExpr",$l),$n();for(;;){if(Jl!=41&&Jl!=43)break;switch(Jl){case 41:Ml(41);break;default:Ml(43)}Bl(267),Pl(),$n()}sc.endNonterminal("AdditiveExpr",$l)}function Vn(){Jn();for(;;){if(Jl!=41&&Jl!=43)break;switch(Jl){case 41:_l(41);break;default:_l(43)}Bl(267),Jn()}}function $n(){sc.startNonterminal("MultiplicativeExpr",$l),Kn();for(;;){if(Jl!=39&&Jl!=119&&Jl!=153&&Jl!=183)break;switch(Jl){case 39:Ml(39);break;case 119:Ml(119);break;case 153:Ml(153);break;default:Ml(183)}Bl(267),Pl(),Kn()}sc.endNonterminal("MultiplicativeExpr",$l)}function Jn(){Qn();for(;;){if(Jl!=39&&Jl!=119&&Jl!=153&&Jl!=183)break;switch(Jl){case 39:_l(39);break;case 119:_l(119);break;case 153:_l(153);break;default:_l(183)}Bl(267),Qn()}}function Kn(){sc.startNonterminal("UnionExpr",$l),Gn();for(;;){if(Jl!=260&&Jl!=284)break;switch(Jl){case 260:Ml(260);break;default:Ml(284)}Bl(267),Pl(),Gn()}sc.endNonterminal("UnionExpr",$l)}function Qn(){Yn();for(;;){if(Jl!=260&&Jl!=284)break;switch(Jl){case 260:_l(260);break;default:_l(284)}Bl(267),Yn()}}function Gn(){sc.startNonterminal("IntersectExceptExpr",$l),Zn();for(;;){Bl(223);if(Jl!=132&&Jl!=164)break;switch(Jl){case 164:Ml(164);break;default:Ml(132)}Bl(267),Pl(),Zn()}sc.endNonterminal("IntersectExceptExpr",$l)}function Yn(){er();for(;;){Bl(223);if(Jl!=132&&Jl!=164)break;switch(Jl){case 164:_l(164);break;default:_l(132)}Bl(267),er()}}function Zn(){sc.startNonterminal("InstanceofExpr",$l),tr(),Bl(224),Jl==162&&(Ml(162),Bl(67),Ml(200),Bl(255),Pl(),Ns()),sc.endNonterminal("InstanceofExpr",$l)}function er(){nr(),Bl(224),Jl==162&&(_l(162),Bl(67),_l(200),Bl(255),Cs())}function tr(){sc.startNonterminal("TreatExpr",$l),rr(),Bl(225),Jl==254&&(Ml(254),Bl(33),Ml(80),Bl(255),Pl(),Ns()),sc.endNonterminal("TreatExpr",$l)}function nr(){ir(),Bl(225),Jl==254&&(_l(254),Bl(33),_l(80),Bl(255),Cs())}function rr(){sc.startNonterminal("CastableExpr",$l),sr(),Bl(226),Jl==91&&(Ml(91),Bl(33),Ml(80),Bl(247),Pl(),Es()),sc.endNonterminal("CastableExpr",$l)}function ir(){or(),Bl(226),Jl==91&&(_l(91),Bl(33),_l(80),Bl(247),Ss())}function sr(){sc.startNonterminal("CastExpr",$l),ur(),Bl(228),Jl==90&&(Ml(90),Bl(33),Ml(80),Bl(247),Pl(),Es()),sc.endNonterminal("CastExpr",$l)}function or(){ar(),Bl(228),Jl==90&&(_l(90),Bl(33),_l(80),Bl(247),Ss())}function ur(){sc.startNonterminal("UnaryExpr",$l);for(;;){Bl(267);if(Jl!=41&&Jl!=43)break;switch(Jl){case 43:Ml(43);break;default:Ml(41)}}Pl(),fr(),sc.endNonterminal("UnaryExpr",$l)}function ar(){for(;;){Bl(267);if(Jl!=41&&Jl!=43)break;switch(Jl){case 43:_l(43);break;default:_l(41)}}lr()}function fr(){sc.startNonterminal("ValueExpr",$l);switch(Jl){case 266:jl(189);break;default:Xl=Jl}switch(Xl){case 89354:case 125706:case 132362:case 144138:br();break;case 36:xr();break;default:cr()}sc.endNonterminal("ValueExpr",$l)}function lr(){switch(Jl){case 266:jl(189);break;default:Xl=Jl}switch(Xl){case 89354:case 125706:case 132362:case 144138:wr();break;case 36:Tr();break;default:hr()}}function cr(){sc.startNonterminal("SimpleMapExpr",$l),kr();for(;;){if(Jl!=26)break;Ml(26),Bl(264),Pl(),kr()}sc.endNonterminal("SimpleMapExpr",$l)}function hr(){Lr();for(;;){if(Jl!=26)break;_l(26),Bl(264),Lr()}}function pr(){sc.startNonterminal("GeneralComp",$l);switch(Jl){case 61:Ml(61);break;case 27:Ml(27);break;case 55:Ml(55);break;case 59:Ml(59);break;case 62:Ml(62);break;default:Ml(63)}sc.endNonterminal("GeneralComp",$l)}function dr(){switch(Jl){case 61:_l(61);break;case 27:_l(27);break;case 55:_l(55);break;case 59:_l(59);break;case 62:_l(62);break;default:_l(63)}}function vr(){sc.startNonterminal("ValueComp",$l);switch(Jl){case 129:Ml(129);break;case 189:Ml(189);break;case 181:Ml(181);break;case 175:Ml(175);break;case 152:Ml(152);break;default:Ml(148)}sc.endNonterminal("ValueComp",$l)}function mr(){switch(Jl){case 129:_l(129);break;case 189:_l(189);break;case 181:_l(181);break;case 175:_l(175);break;case 152:_l(152);break;default:_l(148)}}function gr(){sc.startNonterminal("NodeComp",$l);switch(Jl){case 166:Ml(166);break;case 58:Ml(58);break;default:Ml(64)}sc.endNonterminal("NodeComp",$l)}function yr(){switch(Jl){case 166:_l(166);break;case 58:_l(58);break;default:_l(64)}}function br(){sc.startNonterminal("ValidateExpr",$l),Ml(266),Bl(176);if(Jl!=281)switch(Jl){case 258:Ml(258),Bl(247),Pl(),Co();break;default:Pl(),Er()}Bl(89),Ml(281),Bl(268),Pl(),Q(),Ml(287),sc.endNonterminal("ValidateExpr",$l)}function wr(){_l(266),Bl(176);if(Jl!=281)switch(Jl){case 258:_l(258),Bl(247),ko();break;default:Sr()}Bl(89),_l(281),Bl(268),G(),_l(287)}function Er(){sc.startNonterminal("ValidationMode",$l);switch(Jl){case 174:Ml(174);break;default:Ml(245)}sc.endNonterminal("ValidationMode",$l)}function Sr(){switch(Jl){case 174:_l(174);break;default:_l(245)}}function xr(){sc.startNonterminal("ExtensionExpr",$l);for(;;){Pl(),Nr(),Bl(102);if(Jl!=36)break}Ml(281),Bl(276),Jl!=287&&(Pl(),Q()),Ml(287),sc.endNonterminal("ExtensionExpr",$l)}function Tr(){for(;;){Cr(),Bl(102);if(Jl!=36)break}_l(281),Bl(276),Jl!=287&&G(),_l(287)}function Nr(){sc.startNonterminal("Pragma",$l),Ml(36),Fl(244),Jl==21&&Ml(21),Wa(),Fl(10),Jl==21&&(Ml(21),Fl(0),Ml(1)),Fl(5),Ml(30),sc.endNonterminal("Pragma",$l)}function Cr(){_l(36),Fl(244),Jl==21&&_l(21),Xa(),Fl(10),Jl==21&&(_l(21),Fl(0),_l(1)),Fl(5),_l(30)}function kr(){sc.startNonterminal("PathExpr",$l);switch(Jl){case 47:Ml(47),Bl(290);switch(Jl){case 25:case 26:case 27:case 38:case 39:case 41:case 42:case 43:case 50:case 54:case 58:case 59:case 61:case 62:case 63:case 64:case 70:case 88:case 100:case 209:case 237:case 252:case 279:case 284:case 285:case 286:case 287:break;default:Pl(),Ar()}break;case 48:Ml(48),Bl(261),Pl(),Ar();break;default:Ar()}sc.endNonterminal("PathExpr",$l)}function Lr(){switch(Jl){case 47:_l(47),Bl(290);switch(Jl){case 25:case 26:case 27:case 38:case 39:case 41:case 42:case 43:case 50:case 54:case 58:case 59:case 61:case 62:case 63:case 64:case 70:case 88:case 100:case 209:case 237:case 252:case 279:case 284:case 285:case 286:case 287:break;default:Or()}break;case 48:_l(48),Bl(261),Or();break;default:Or()}}function Ar(){sc.startNonterminal("RelativePathExpr",$l),Gr();for(;;){switch(Jl){case 26:jl(266);break;default:Xl=Jl}if(Xl!=25&&Xl!=27&&Xl!=38&&Xl!=39&&Xl!=41&&Xl!=42&&Xl!=43&&Xl!=47&&Xl!=48&&Xl!=50&&Xl!=54&&Xl!=55&&Xl!=58&&Xl!=59&&Xl!=61&&Xl!=62&&Xl!=63&&Xl!=64&&Xl!=70&&Xl!=71&&Xl!=76&&Xl!=80&&Xl!=81&&Xl!=82&&Xl!=85&&Xl!=88&&Xl!=89&&Xl!=90&&Xl!=91&&Xl!=95&&Xl!=100&&Xl!=106&&Xl!=110&&Xl!=114&&Xl!=119&&Xl!=123&&Xl!=124&&Xl!=127&&Xl!=129&&Xl!=132&&Xl!=139&&Xl!=142&&Xl!=148&&Xl!=150&&Xl!=152&&Xl!=153&&Xl!=162&&Xl!=164&&Xl!=165&&Xl!=166&&Xl!=175&&Xl!=177&&Xl!=181&&Xl!=183&&Xl!=184&&Xl!=189&&Xl!=202&&Xl!=204&&Xl!=205&&Xl!=209&&Xl!=224&&Xl!=228&&Xl!=233&&Xl!=237&&Xl!=241&&Xl!=242&&Xl!=252&&Xl!=253&&Xl!=254&&Xl!=260&&Xl!=272&&Xl!=276&&Xl!=279&&Xl!=284&&Xl!=285&&Xl!=286&&Xl!=287&&Xl!=2586&&Xl!=23578&&Xl!=24090&&Xl!=24602&&Xl!=34330){Xl=Ul(3,$l);if(Xl==0){var e=Vl,t=$l,n=Jl,r=Kl,i=Ql,s=Gl,o=Yl,u=Zl;try{switch(Jl){case 47:_l(47);break;case 48:_l(48);break;default:_l(26)}Bl(265),_r(),Xl=-1}catch(a){Xl=-2}Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Rl(3,$l,Xl)}}if(Xl!=-1&&Xl!=47&&Xl!=48&&Xl!=2586&&Xl!=23578&&Xl!=34330)break;switch(Jl){case 47:Ml(47);break;case 48:Ml(48);break;default:Ml(26)}Bl(265),Pl(),Mr()}sc.endNonterminal("RelativePathExpr",$l)}function Or(){Yr();for(;;){switch(Jl){case 26:jl(266);break;default:Xl=Jl}if(Xl!=25&&Xl!=27&&Xl!=38&&Xl!=39&&Xl!=41&&Xl!=42&&Xl!=43&&Xl!=47&&Xl!=48&&Xl!=50&&Xl!=54&&Xl!=55&&Xl!=58&&Xl!=59&&Xl!=61&&Xl!=62&&Xl!=63&&Xl!=64&&Xl!=70&&Xl!=71&&Xl!=76&&Xl!=80&&Xl!=81&&Xl!=82&&Xl!=85&&Xl!=88&&Xl!=89&&Xl!=90&&Xl!=91&&Xl!=95&&Xl!=100&&Xl!=106&&Xl!=110&&Xl!=114&&Xl!=119&&Xl!=123&&Xl!=124&&Xl!=127&&Xl!=129&&Xl!=132&&Xl!=139&&Xl!=142&&Xl!=148&&Xl!=150&&Xl!=152&&Xl!=153&&Xl!=162&&Xl!=164&&Xl!=165&&Xl!=166&&Xl!=175&&Xl!=177&&Xl!=181&&Xl!=183&&Xl!=184&&Xl!=189&&Xl!=202&&Xl!=204&&Xl!=205&&Xl!=209&&Xl!=224&&Xl!=228&&Xl!=233&&Xl!=237&&Xl!=241&&Xl!=242&&Xl!=252&&Xl!=253&&Xl!=254&&Xl!=260&&Xl!=272&&Xl!=276&&Xl!=279&&Xl!=284&&Xl!=285&&Xl!=286&&Xl!=287&&Xl!=2586&&Xl!=23578&&Xl!=24090&&Xl!=24602&&Xl!=34330){Xl=Ul(3,$l);if(Xl==0){var e=Vl,t=$l,n=Jl,r=Kl,i=Ql,s=Gl,o=Yl,u=Zl;try{switch(Jl){case 47:_l(47);break;case 48:_l(48);break;default:_l(26)}Bl(265),_r(),Rl(3,t,-1);continue}catch(a){Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Rl(3,t,-2);break}}}if(Xl!=-1&&Xl!=47&&Xl!=48&&Xl!=2586&&Xl!=23578&&Xl!=34330)break;switch(Jl){case 47:_l(47);break;case 48:_l(48);break;default:_l(26)}Bl(265),_r()}}function Mr(){sc.startNonterminal("StepExpr",$l);switch(Jl){case 83:jl(289);break;case 122:jl(288);break;case 187:case 220:jl(286);break;case 135:case 197:case 255:jl(238);break;case 97:case 120:case 206:case 249:case 262:jl(240);break;case 79:case 125:case 154:case 167:case 169:case 247:case 248:case 259:jl(231);break;case 74:case 75:case 94:case 112:case 113:case 137:case 138:case 210:case 216:case 217:case 234:jl(239);break;case 6:case 71:case 73:case 76:case 78:case 80:case 81:case 82:case 84:case 85:case 86:case 87:case 89:case 90:case 91:case 92:case 95:case 98:case 99:case 102:case 103:case 104:case 105:case 106:case 107:case 109:case 110:case 111:case 114:case 119:case 121:case 123:case 124:case 126:case 127:case 129:case 130:case 132:case 133:case 134:case 136:case 139:case 142:case 143:case 147:case 148:case 150:case 152:case 153:case 155:case 156:case 157:case 161:case 162:case 163:case 164:case 165:case 166:case 168:case 170:case 173:case 174:case 175:case 177:case 179:case 181:case 183:case 184:case 185:case 188:case 189:case 194:case 195:case 198:case 202:case 203:case 204:case 205:case 207:case 222:case 223:case 224:case 225:case 226:case 228:case 229:case 230:case 231:case 232:case 233:case 239:case 240:case 241:case 242:case 245:case 253:case 254:case 256:case 257:case 258:case 260:case 263:case 266:case 267:case 268:case 269:case 272:case 273:case 276:jl(235);break;default:Xl=Jl}if(Xl==12935||Xl==12997||Xl==13055||Xl==13447||Xl==13509||Xl==13567||Xl==13959||Xl==14021||Xl==14079||Xl==19591||Xl==19653||Xl==19711||Xl==20103||Xl==20165||Xl==20223||Xl==21127||Xl==21189||Xl==21247||Xl==21639||Xl==21701||Xl==21759||Xl==22151||Xl==22213||Xl==22271||Xl==24199||Xl==24261||Xl==24319||Xl==24711||Xl==24773||Xl==24831||Xl==25735||Xl==25797||Xl==25855||Xl==27783||Xl==27845||Xl==27903||Xl==28295||Xl==28357||Xl==28415||Xl==29831||Xl==29893||Xl==29951||Xl==30343||Xl==30405||Xl==30463||Xl==31367||Xl==31429||Xl==31487||Xl==31879||Xl==31941||Xl==31999||Xl==32391||Xl==32453||Xl==32511||Xl==32903||Xl==32965||Xl==33023||Xl==35463||Xl==35525||Xl==35583||Xl==35975||Xl==36037||Xl==36095||Xl==36435||Xl==36474||Xl==36487||Xl==36539||Xl==36549||Xl==36572||Xl==36607||Xl==38995||Xl==39034||Xl==39047||Xl==39099||Xl==39109||Xl==39132||Xl==39167||Xl==41043||Xl==41082||Xl==41095||Xl==41147||Xl==41157||Xl==41180||Xl==41215||Xl==41555||Xl==41594||Xl==41607||Xl==41659||Xl==41669||Xl==41692||Xl==41727||Xl==42067||Xl==42106||Xl==42119||Xl==42171||Xl==42181||Xl==42204||Xl==42239||Xl==43603||Xl==43642||Xl==43655||Xl==43707||Xl==43717||Xl==43740||Xl==43775||Xl==45191||Xl==45253||Xl==45311||Xl==45651||Xl==45690||Xl==45703||Xl==45755||Xl==45765||Xl==45788||Xl==45823||Xl==46163||Xl==46202||Xl==46215||Xl==46267||Xl==46277||Xl==46300||Xl==46335||Xl==46675||Xl==46714||Xl==46727||Xl==46779||Xl==46789||Xl==46812||Xl==46847||Xl==48723||Xl==48762||Xl==48775||Xl==48827||Xl==48837||Xl==48860||Xl==48895||Xl==51335||Xl==51397||Xl==51455||Xl==54355||Xl==54394||Xl==54407||Xl==54459||Xl==54469||Xl==54492||Xl==54527||Xl==56403||Xl==56442||Xl==56455||Xl==56507||Xl==56517||Xl==56540||Xl==56575||Xl==58451||Xl==58490||Xl==58503||Xl==58555||Xl==58565||Xl==58588||Xl==58623||Xl==61011||Xl==61050||Xl==61063||Xl==61115||Xl==61125||Xl==61148||Xl==61183||Xl==63059||Xl==63098||Xl==63111||Xl==63163||Xl==63173||Xl==63196||Xl==63231||Xl==63571||Xl==63610||Xl==63623||Xl==63675||Xl==63685||Xl==63708||Xl==63743||Xl==65107||Xl==65146||Xl==65159||Xl==65211||Xl==65221||Xl==65244||Xl==65279||Xl==66131||Xl==66170||Xl==66183||Xl==66235||Xl==66245||Xl==66268||Xl==66303||Xl==67667||Xl==67706||Xl==67719||Xl==67771||Xl==67781||Xl==67804||Xl==67839||Xl==71251||Xl==71290||Xl==71303||Xl==71355||Xl==71365||Xl==71388||Xl==71423||Xl==72787||Xl==72826||Xl==72839||Xl==72891||Xl==72901||Xl==72924||Xl==72959||Xl==75859||Xl==75898||Xl==75911||Xl==75963||Xl==75973||Xl==75996||Xl==76031||Xl==76883||Xl==76922||Xl==76935||Xl==76987||Xl==76997||Xl==77020||Xl==77055||Xl==77907||Xl==77946||Xl==77959||Xl==78011||Xl==78021||Xl==78044||Xl==78079||Xl==78419||Xl==78458||Xl==78471||Xl==78523||Xl==78533||Xl==78556||Xl==78591||Xl==83027||Xl==83066||Xl==83079||Xl==83131||Xl==83141||Xl==83164||Xl==83199||Xl==84051||Xl==84090||Xl==84103||Xl==84155||Xl==84165||Xl==84188||Xl==84223||Xl==84563||Xl==84602||Xl==84615||Xl==84667||Xl==84677||Xl==84700||Xl==84735||Xl==85075||Xl==85114||Xl==85127||Xl==85179||Xl==85189||Xl==85212||Xl==85247||Xl==89683||Xl==89722||Xl==89735||Xl==89787||Xl==89797||Xl==89820||Xl==89855||Xl==90707||Xl==90746||Xl==90759||Xl==90811||Xl==90821||Xl==90844||Xl==90879||Xl==92755||Xl==92794||Xl==92807||Xl==92859||Xl==92869||Xl==92892||Xl==92927||Xl==93779||Xl==93818||Xl==93831||Xl==93883||Xl==93893||Xl==93916||Xl==93951||Xl==94291||Xl==94330||Xl==94343||Xl==94395||Xl==94405||Xl==94428||Xl==94463||Xl==96851||Xl==96890||Xl==96903||Xl==96955||Xl==96965||Xl==96988||Xl==97023||Xl==103507||Xl==103546||Xl==103559||Xl==103611||Xl==103621||Xl==103644||Xl==103679||Xl==104531||Xl==104570||Xl==104583||Xl==104635||Xl==104645||Xl==104668||Xl==104703||Xl==105043||Xl==105082||Xl==105095||Xl==105147||Xl==105157||Xl==105180||Xl==105215||Xl==107143||Xl==107205||Xl==107263||Xl==114771||Xl==114810||Xl==114823||Xl==114875||Xl==114885||Xl==114908||Xl==114943||Xl==116819||Xl==116858||Xl==116871||Xl==116923||Xl==116933||Xl==116956||Xl==116991||Xl==119379||Xl==119418||Xl==119431||Xl==119483||Xl==119493||Xl==119516||Xl==119551||Xl==121479||Xl==121541||Xl==121599||Xl==123475||Xl==123514||Xl==123527||Xl==123579||Xl==123589||Xl==123612||Xl==123647||Xl==123987||Xl==124026||Xl==124039||Xl==124091||Xl==124101||Xl==124124||Xl==124159||Xl==129159||Xl==129221||Xl==129279||Xl==129619||Xl==129658||Xl==129671||Xl==129723||Xl==129733||Xl==129756||Xl==129791||Xl==130131||Xl==130170||Xl==130183||Xl==130235||Xl==130245||Xl==130268||Xl==130303||Xl==133203||Xl==133242||Xl==133255||Xl==133307||Xl==133317||Xl==133340||Xl==133375||Xl==139347||Xl==139386||Xl==139399||Xl==139451||Xl==139461||Xl==139484||Xl==139519||Xl==141395||Xl==141434||Xl==141447||Xl==141499||Xl==141509||Xl==141532||Xl==141567||Xl==142983||Xl==143045||Xl==143103||Xl==145543||Xl==145605||Xl==145663||Xl==146055||Xl==146117||Xl==146175||Xl==146567||Xl==146629||Xl==146687||Xl==147079||Xl==147141||Xl==147199){Xl=Ul(4,$l);if(Xl==0){var e=Vl,t=$l,n=Jl,r=Kl,i=Ql,s=Gl,o=Yl,u=Zl;try{Yr(),Xl=-1}catch(a){Xl=-2}Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Rl(4,$l,Xl)}}switch(Xl){case-1:case 8:case 9:case 10:case 11:case 31:case 32:case 33:case 35:case 55:case 56:case 60:case 69:case 281:case 283:case 3155:case 3194:case 9915:case 9948:case 14854:case 14919:case 14921:case 14922:case 14923:case 14924:case 14926:case 14927:case 14928:case 14929:case 14930:case 14931:case 14932:case 14933:case 14934:case 14935:case 14937:case 14938:case 14939:case 14940:case 14942:case 14943:case 14945:case 14946:case 14947:case 14950:case 14951:case 14952:case 14953:case 14954:case 14955:case 14957:case 14958:case 14959:case 14960:case 14961:case 14962:case 14967:case 14968:case 14969:case 14970:case 14971:case 14972:case 14973:case 14974:case 14975:case 14977:case 14978:case 14980:case 14981:case 14982:case 14983:case 14984:case 14985:case 14986:case 14987:case 14990:case 14991:case 14995:case 14996:case 14998:case 15e3:case 15001:case 15002:case 15003:case 15004:case 15005:case 15009:case 15010:case 15011:case 15012:case 15013:case 15014:case 15015:case 15016:case 15017:case 15018:case 15021:case 15022:case 15023:case 15025:case 15027:case 15029:case 15031:case 15032:case 15033:case 15035:case 15036:case 15037:case 15042:case 15043:case 15045:case 15046:case 15050:case 15051:case 15052:case 15053:case 15054:case 15055:case 15058:case 15064:case 15065:case 15068:case 15070:case 15071:case 15072:case 15073:case 15074:case 15076:case 15077:case 15078:case 15079:case 15080:case 15081:case 15082:case 15087:case 15088:case 15089:case 15090:case 15093:case 15095:case 15096:case 15097:case 15101:case 15102:case 15103:case 15104:case 15105:case 15106:case 15107:case 15108:case 15110:case 15111:case 15114:case 15115:case 15116:case 15117:case 15120:case 15121:case 15124:case 17926:case 17991:case 17993:case 17994:case 17995:case 17996:case 17998:case 18e3:case 18001:case 18002:case 18004:case 18005:case 18006:case 18007:case 18009:case 18010:case 18011:case 18012:case 18014:case 18015:case 18018:case 18019:case 18022:case 18023:case 18024:case 18025:case 18026:case 18027:case 18029:case 18030:case 18031:case 18032:case 18033:case 18034:case 18039:case 18040:case 18043:case 18044:case 18046:case 18047:case 18049:case 18050:case 18052:case 18053:case 18054:case 18055:case 18056:case 18057:case 18058:case 18059:case 18062:case 18063:case 18067:case 18068:case 18070:case 18072:case 18073:case 18075:case 18076:case 18077:case 18081:case 18082:case 18083:case 18084:case 18085:case 18086:case 18088:case 18090:case 18093:case 18094:case 18095:case 18097:case 18099:case 18101:case 18103:case 18104:case 18105:case 18107:case 18109:case 18115:case 18117:case 18118:case 18122:case 18123:case 18124:case 18125:case 18126:case 18127:case 18130:case 18136:case 18137:case 18142:case 18143:case 18144:case 18145:case 18146:case 18148:case 18149:case 18152:case 18153:case 18154:case 18159:case 18160:case 18161:case 18162:case 18165:case 18173:case 18174:case 18175:case 18176:case 18177:case 18178:case 18180:case 18182:case 18183:case 18186:case 18187:case 18188:case 18189:case 18192:case 18193:case 18196:case 23175:case 23237:case 23295:case 37459:case 37498:case 37563:case 37596:case 37971:case 38010:case 38075:case 38108:case 38483:case 38522:case 38587:case 38620:case 40019:case 40058:case 40123:case 40156:case 40531:case 40570:case 42579:case 42618:case 42683:case 42716:case 43091:case 43130:case 43195:case 43228:case 44115:case 44154:case 44219:case 44252:case 44627:case 44666:case 44731:case 44764:case 47187:case 47226:case 47291:case 47324:case 48211:case 48250:case 48315:case 48348:case 49747:case 49786:case 49851:case 49884:case 50259:case 50298:case 50363:case 50396:case 50771:case 50810:case 50875:case 50908:case 52307:case 52346:case 52411:case 52444:case 52819:case 52858:case 52923:case 52956:case 53331:case 53370:case 53435:case 53468:case 53843:case 53882:case 53947:case 53980:case 54867:case 54906:case 54971:case 55004:case 55891:case 55930:case 55995:case 56028:case 56915:case 56954:case 57019:case 57052:case 57427:case 57466:case 57531:case 57564:case 57939:case 57978:case 58043:case 58076:case 61523:case 61562:case 61627:case 61660:case 62035:case 62074:case 62139:case 62172:case 62547:case 62586:case 62651:case 62684:case 64083:case 64122:case 64187:case 64220:case 64595:case 64634:case 64699:case 64732:case 66643:case 66682:case 66747:case 66780:case 68179:case 68218:case 68283:case 68316:case 68691:case 68730:case 68795:case 68828:case 69203:case 69242:case 69307:case 69340:case 69715:case 69754:case 69819:case 69852:case 70227:case 70266:case 70331:case 70364:case 70739:case 70778:case 70843:case 70876:case 73299:case 73338:case 73403:case 73436:case 75347:case 75386:case 75451:case 75484:case 78931:case 78970:case 79035:case 79068:case 79443:case 79482:case 79547:case 79580:case 79955:case 79994:case 80059:case 80092:case 80467:case 80506:case 80571:case 80604:case 82515:case 82554:case 82619:case 82652:case 83539:case 83578:case 83643:case 83676:case 85587:case 85626:case 85691:case 85724:case 86099:case 86138:case 86203:case 86236:case 86611:case 86650:case 87123:case 87162:case 87227:case 87260:case 88659:case 88698:case 88763:case 88796:case 89171:case 89210:case 89275:case 89308:case 91731:case 91770:case 91835:case 91868:case 94803:case 94842:case 94907:case 94940:case 95827:case 95866:case 95931:case 95964:case 96339:case 96378:case 96443:case 96476:case 99411:case 99450:case 99515:case 99548:case 99923:case 99962:case 100027:case 100060:case 100947:case 100986:case 101051:case 101084:case 101459:case 101498:case 101563:case 101596:case 104019:case 104058:case 104123:case 104156:case 105555:case 105594:case 105659:case 105692:case 106067:case 106106:case 106171:case 106204:case 107603:case 107642:case 107707:case 107740:case 110675:case 110714:case 110779:case 110812:case 111187:case 111226:case 111291:case 111324:case 112723:case 112762:case 112827:case 112860:case 113747:case 113786:case 113851:case 113884:case 114259:case 114298:case 114363:case 114396:case 115283:case 115322:case 115387:case 115420:case 115795:case 115834:case 115899:case 115932:case 117331:case 117370:case 117435:case 117468:case 117843:case 117882:case 117947:case 117980:case 118355:case 118394:case 118459:case 118492:case 118867:case 118906:case 118971:case 119004:case 119891:case 119930:case 119995:case 120028:case 122451:case 122490:case 122555:case 122588:case 122963:case 123002:case 123067:case 123100:case 125523:case 125562:case 125627:case 125660:case 126547:case 126586:case 127059:case 127098:case 127163:case 127196:case 127571:case 127610:case 127675:case 127708:case 130643:case 130682:case 130747:case 130780:case 131155:case 131194:case 131259:case 131292:case 131667:case 131706:case 131771:case 131804:case 132179:case 132218:case 132283:case 132316:case 132691:case 132730:case 132795:case 132828:case 134227:case 134266:case 134331:case 134364:case 134739:case 134778:case 134843:case 134876:case 136275:case 136314:case 136379:case 136412:case 136787:case 136826:case 136891:case 136924:case 137299:case 137338:case 137403:case 137436:case 137811:case 137850:case 137915:case 137948:case 139859:case 139898:case 139963:case 139996:case 143955:case 143969:case 143992:case 143994:case 144059:case 144078:case 144092:case 144121:case 144134:Gr();break;default:Dr()}sc.endNonterminal("StepExpr",$l)}function _r(){switch(Jl){case 83:jl(289);break;case 122:jl(288);break;case 187:case 220:jl(286);break;case 135:case 197:case 255:jl(238);break;case 97:case 120:case 206:case 249:case 262:jl(240);break;case 79:case 125:case 154:case 167:case 169:case 247:case 248:case 259:jl(231);break;case 74:case 75:case 94:case 112:case 113:case 137:case 138:case 210:case 216:case 217:case 234:jl(239);break;case 6:case 71:case 73:case 76:case 78:case 80:case 81:case 82:case 84:case 85:case 86:case 87:case 89:case 90:case 91:case 92:case 95:case 98:case 99:case 102:case 103:case 104:case 105:case 106:case 107:case 109:case 110:case 111:case 114:case 119:case 121:case 123:case 124:case 126:case 127:case 129:case 130:case 132:case 133:case 134:case 136:case 139:case 142:case 143:case 147:case 148:case 150:case 152:case 153:case 155:case 156:case 157:case 161:case 162:case 163:case 164:case 165:case 166:case 168:case 170:case 173:case 174:case 175:case 177:case 179:case 181:case 183:case 184:case 185:case 188:case 189:case 194:case 195:case 198:case 202:case 203:case 204:case 205:case 207:case 222:case 223:case 224:case 225:case 226:case 228:case 229:case 230:case 231:case 232:case 233:case 239:case 240:case 241:case 242:case 245:case 253:case 254:case 256:case 257:case 258:case 260:case 263:case 266:case 267:case 268:case 269:case 272:case 273:case 276:jl(235);break;default:Xl=Jl}if(Xl==12935||Xl==12997||Xl==13055||Xl==13447||Xl==13509||Xl==13567||Xl==13959||Xl==14021||Xl==14079||Xl==19591||Xl==19653||Xl==19711||Xl==20103||Xl==20165||Xl==20223||Xl==21127||Xl==21189||Xl==21247||Xl==21639||Xl==21701||Xl==21759||Xl==22151||Xl==22213||Xl==22271||Xl==24199||Xl==24261||Xl==24319||Xl==24711||Xl==24773||Xl==24831||Xl==25735||Xl==25797||Xl==25855||Xl==27783||Xl==27845||Xl==27903||Xl==28295||Xl==28357||Xl==28415||Xl==29831||Xl==29893||Xl==29951||Xl==30343||Xl==30405||Xl==30463||Xl==31367||Xl==31429||Xl==31487||Xl==31879||Xl==31941||Xl==31999||Xl==32391||Xl==32453||Xl==32511||Xl==32903||Xl==32965||Xl==33023||Xl==35463||Xl==35525||Xl==35583||Xl==35975||Xl==36037||Xl==36095||Xl==36435||Xl==36474||Xl==36487||Xl==36539||Xl==36549||Xl==36572||Xl==36607||Xl==38995||Xl==39034||Xl==39047||Xl==39099||Xl==39109||Xl==39132||Xl==39167||Xl==41043||Xl==41082||Xl==41095||Xl==41147||Xl==41157||Xl==41180||Xl==41215||Xl==41555||Xl==41594||Xl==41607||Xl==41659||Xl==41669||Xl==41692||Xl==41727||Xl==42067||Xl==42106||Xl==42119||Xl==42171||Xl==42181||Xl==42204||Xl==42239||Xl==43603||Xl==43642||Xl==43655||Xl==43707||Xl==43717||Xl==43740||Xl==43775||Xl==45191||Xl==45253||Xl==45311||Xl==45651||Xl==45690||Xl==45703||Xl==45755||Xl==45765||Xl==45788||Xl==45823||Xl==46163||Xl==46202||Xl==46215||Xl==46267||Xl==46277||Xl==46300||Xl==46335||Xl==46675||Xl==46714||Xl==46727||Xl==46779||Xl==46789||Xl==46812||Xl==46847||Xl==48723||Xl==48762||Xl==48775||Xl==48827||Xl==48837||Xl==48860||Xl==48895||Xl==51335||Xl==51397||Xl==51455||Xl==54355||Xl==54394||Xl==54407||Xl==54459||Xl==54469||Xl==54492||Xl==54527||Xl==56403||Xl==56442||Xl==56455||Xl==56507||Xl==56517||Xl==56540||Xl==56575||Xl==58451||Xl==58490||Xl==58503||Xl==58555||Xl==58565||Xl==58588||Xl==58623||Xl==61011||Xl==61050||Xl==61063||Xl==61115||Xl==61125||Xl==61148||Xl==61183||Xl==63059||Xl==63098||Xl==63111||Xl==63163||Xl==63173||Xl==63196||Xl==63231||Xl==63571||Xl==63610||Xl==63623||Xl==63675||Xl==63685||Xl==63708||Xl==63743||Xl==65107||Xl==65146||Xl==65159||Xl==65211||Xl==65221||Xl==65244||Xl==65279||Xl==66131||Xl==66170||Xl==66183||Xl==66235||Xl==66245||Xl==66268||Xl==66303||Xl==67667||Xl==67706||Xl==67719||Xl==67771||Xl==67781||Xl==67804||Xl==67839||Xl==71251||Xl==71290||Xl==71303||Xl==71355||Xl==71365||Xl==71388||Xl==71423||Xl==72787||Xl==72826||Xl==72839||Xl==72891||Xl==72901||Xl==72924||Xl==72959||Xl==75859||Xl==75898||Xl==75911||Xl==75963||Xl==75973||Xl==75996||Xl==76031||Xl==76883||Xl==76922||Xl==76935||Xl==76987||Xl==76997||Xl==77020||Xl==77055||Xl==77907||Xl==77946||Xl==77959||Xl==78011||Xl==78021||Xl==78044||Xl==78079||Xl==78419||Xl==78458||Xl==78471||Xl==78523||Xl==78533||Xl==78556||Xl==78591||Xl==83027||Xl==83066||Xl==83079||Xl==83131||Xl==83141||Xl==83164||Xl==83199||Xl==84051||Xl==84090||Xl==84103||Xl==84155||Xl==84165||Xl==84188||Xl==84223||Xl==84563||Xl==84602||Xl==84615||Xl==84667||Xl==84677||Xl==84700||Xl==84735||Xl==85075||Xl==85114||Xl==85127||Xl==85179||Xl==85189||Xl==85212||Xl==85247||Xl==89683||Xl==89722||Xl==89735||Xl==89787||Xl==89797||Xl==89820||Xl==89855||Xl==90707||Xl==90746||Xl==90759||Xl==90811||Xl==90821||Xl==90844||Xl==90879||Xl==92755||Xl==92794||Xl==92807||Xl==92859||Xl==92869||Xl==92892||Xl==92927||Xl==93779||Xl==93818||Xl==93831||Xl==93883||Xl==93893||Xl==93916||Xl==93951||Xl==94291||Xl==94330||Xl==94343||Xl==94395||Xl==94405||Xl==94428||Xl==94463||Xl==96851||Xl==96890||Xl==96903||Xl==96955||Xl==96965||Xl==96988||Xl==97023||Xl==103507||Xl==103546||Xl==103559||Xl==103611||Xl==103621||Xl==103644||Xl==103679||Xl==104531||Xl==104570||Xl==104583||Xl==104635||Xl==104645||Xl==104668||Xl==104703||Xl==105043||Xl==105082||Xl==105095||Xl==105147||Xl==105157||Xl==105180||Xl==105215||Xl==107143||Xl==107205||Xl==107263||Xl==114771||Xl==114810||Xl==114823||Xl==114875||Xl==114885||Xl==114908||Xl==114943||Xl==116819||Xl==116858||Xl==116871||Xl==116923||Xl==116933||Xl==116956||Xl==116991||Xl==119379||Xl==119418||Xl==119431||Xl==119483||Xl==119493||Xl==119516||Xl==119551||Xl==121479||Xl==121541||Xl==121599||Xl==123475||Xl==123514||Xl==123527||Xl==123579||Xl==123589||Xl==123612||Xl==123647||Xl==123987||Xl==124026||Xl==124039||Xl==124091||Xl==124101||Xl==124124||Xl==124159||Xl==129159||Xl==129221||Xl==129279||Xl==129619||Xl==129658||Xl==129671||Xl==129723||Xl==129733||Xl==129756||Xl==129791||Xl==130131||Xl==130170||Xl==130183||Xl==130235||Xl==130245||Xl==130268||Xl==130303||Xl==133203||Xl==133242||Xl==133255||Xl==133307||Xl==133317||Xl==133340||Xl==133375||Xl==139347||Xl==139386||Xl==139399||Xl==139451||Xl==139461||Xl==139484||Xl==139519||Xl==141395||Xl==141434||Xl==141447||Xl==141499||Xl==141509||Xl==141532||Xl==141567||Xl==142983||Xl==143045||Xl==143103||Xl==145543||Xl==145605||Xl==145663||Xl==146055||Xl==146117||Xl==146175||Xl==146567||Xl==146629||Xl==146687||Xl==147079||Xl==147141||Xl==147199){Xl=Ul(4,$l);if(Xl==0){var e=Vl,t=$l,n=Jl,r=Kl,i=Ql,s=Gl,o=Yl,u=Zl;try{Yr(),Rl(4,t,-1),Xl=-3}catch(a){Xl=-2,Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Rl(4,t,-2)}}}switch(Xl){case-1:case 8:case 9:case 10:case 11:case 31:case 32:case 33:case 35:case 55:case 56:case 60:case 69:case 281:case 283:case 3155:case 3194:case 9915:case 9948:case 14854:case 14919:case 14921:case 14922:case 14923:case 14924:case 14926:case 14927:case 14928:case 14929:case 14930:case 14931:case 14932:case 14933:case 14934:case 14935:case 14937:case 14938:case 14939:case 14940:case 14942:case 14943:case 14945:case 14946:case 14947:case 14950:case 14951:case 14952:case 14953:case 14954:case 14955:case 14957:case 14958:case 14959:case 14960:case 14961:case 14962:case 14967:case 14968:case 14969:case 14970:case 14971:case 14972:case 14973:case 14974:case 14975:case 14977:case 14978:case 14980:case 14981:case 14982:case 14983:case 14984:case 14985:case 14986:case 14987:case 14990:case 14991:case 14995:case 14996:case 14998:case 15e3:case 15001:case 15002:case 15003:case 15004:case 15005:case 15009:case 15010:case 15011:case 15012:case 15013:case 15014:case 15015:case 15016:case 15017:case 15018:case 15021:case 15022:case 15023:case 15025:case 15027:case 15029:case 15031:case 15032:case 15033:case 15035:case 15036:case 15037:case 15042:case 15043:case 15045:case 15046:case 15050:case 15051:case 15052:case 15053:case 15054:case 15055:case 15058:case 15064:case 15065:case 15068:case 15070:case 15071:case 15072:case 15073:case 15074:case 15076:case 15077:case 15078:case 15079:case 15080:case 15081:case 15082:case 15087:case 15088:case 15089:case 15090:case 15093:case 15095:case 15096:case 15097:case 15101:case 15102:case 15103:case 15104:case 15105:case 15106:case 15107:case 15108:case 15110:case 15111:case 15114:case 15115:case 15116:case 15117:case 15120:case 15121:case 15124:case 17926:case 17991:case 17993:case 17994:case 17995:case 17996:case 17998:case 18e3:case 18001:case 18002:case 18004:case 18005:case 18006:case 18007:case 18009:case 18010:case 18011:case 18012:case 18014:case 18015:case 18018:case 18019:case 18022:case 18023:case 18024:case 18025:case 18026:case 18027:case 18029:case 18030:case 18031:case 18032:case 18033:case 18034:case 18039:case 18040:case 18043:case 18044:case 18046:case 18047:case 18049:case 18050:case 18052:case 18053:case 18054:case 18055:case 18056:case 18057:case 18058:case 18059:case 18062:case 18063:case 18067:case 18068:case 18070:case 18072:case 18073:case 18075:case 18076:case 18077:case 18081:case 18082:case 18083:case 18084:case 18085:case 18086:case 18088:case 18090:case 18093:case 18094:case 18095:case 18097:case 18099:case 18101:case 18103:case 18104:case 18105:case 18107:case 18109:case 18115:case 18117:case 18118:case 18122:case 18123:case 18124:case 18125:case 18126:case 18127:case 18130:case 18136:case 18137:case 18142:case 18143:case 18144:case 18145:case 18146:case 18148:case 18149:case 18152:case 18153:case 18154:case 18159:case 18160:case 18161:case 18162:case 18165:case 18173:case 18174:case 18175:case 18176:case 18177:case 18178:case 18180:case 18182:case 18183:case 18186:case 18187:case 18188:case 18189:case 18192:case 18193:case 18196:case 23175:case 23237:case 23295:case 37459:case 37498:case 37563:case 37596:case 37971:case 38010:case 38075:case 38108:case 38483:case 38522:case 38587:case 38620:case 40019:case 40058:case 40123:case 40156:case 40531:case 40570:case 42579:case 42618:case 42683:case 42716:case 43091:case 43130:case 43195:case 43228:case 44115:case 44154:case 44219:case 44252:case 44627:case 44666:case 44731:case 44764:case 47187:case 47226:case 47291:case 47324:case 48211:case 48250:case 48315:case 48348:case 49747:case 49786:case 49851:case 49884:case 50259:case 50298:case 50363:case 50396:case 50771:case 50810:case 50875:case 50908:case 52307:case 52346:case 52411:case 52444:case 52819:case 52858:case 52923:case 52956:case 53331:case 53370:case 53435:case 53468:case 53843:case 53882:case 53947:case 53980:case 54867:case 54906:case 54971:case 55004:case 55891:case 55930:case 55995:case 56028:case 56915:case 56954:case 57019:case 57052:case 57427:case 57466:case 57531:case 57564:case 57939:case 57978:case 58043:case 58076:case 61523:case 61562:case 61627:case 61660:case 62035:case 62074:case 62139:case 62172:case 62547:case 62586:case 62651:case 62684:case 64083:case 64122:case 64187:case 64220:case 64595:case 64634:case 64699:case 64732:case 66643:case 66682:case 66747:case 66780:case 68179:case 68218:case 68283:case 68316:case 68691:case 68730:case 68795:case 68828:case 69203:case 69242:case 69307:case 69340:case 69715:case 69754:case 69819:case 69852:case 70227:case 70266:case 70331:case 70364:case 70739:case 70778:case 70843:case 70876:case 73299:case 73338:case 73403:case 73436:case 75347:case 75386:case 75451:case 75484:case 78931:case 78970:case 79035:case 79068:case 79443:case 79482:case 79547:case 79580:case 79955:case 79994:case 80059:case 80092:case 80467:case 80506:case 80571:case 80604:case 82515:case 82554:case 82619:case 82652:case 83539:case 83578:case 83643:case 83676:case 85587:case 85626:case 85691:case 85724:case 86099:case 86138:case 86203:case 86236:case 86611:case 86650:case 87123:case 87162:case 87227:case 87260:case 88659:case 88698:case 88763:case 88796:case 89171:case 89210:case 89275:case 89308:case 91731:case 91770:case 91835:case 91868:case 94803:case 94842:case 94907:case 94940:case 95827:case 95866:case 95931:case 95964:case 96339:case 96378:case 96443:case 96476:case 99411:case 99450:case 99515:case 99548:case 99923:case 99962:case 100027:case 100060:case 100947:case 100986:case 101051:case 101084:case 101459:case 101498:case 101563:case 101596:case 104019:case 104058:case 104123:case 104156:case 105555:case 105594:case 105659:case 105692:case 106067:case 106106:case 106171:case 106204:case 107603:case 107642:case 107707:case 107740:case 110675:case 110714:case 110779:case 110812:case 111187:case 111226:case 111291:case 111324:case 112723:case 112762:case 112827:case 112860:case 113747:case 113786:case 113851:case 113884:case 114259:case 114298:case 114363:case 114396:case 115283:case 115322:case 115387:case 115420:case 115795:case 115834:case 115899:case 115932:case 117331:case 117370:case 117435:case 117468:case 117843:case 117882:case 117947:case 117980:case 118355:case 118394:case 118459:case 118492:case 118867:case 118906:case 118971:case 119004:case 119891:case 119930:case 119995:case 120028:case 122451:case 122490:case 122555:case 122588:case 122963:case 123002:case 123067:case 123100:case 125523:case 125562:case 125627:case 125660:case 126547:case 126586:case 127059:case 127098:case 127163:case 127196:case 127571:case 127610:case 127675:case 127708:case 130643:case 130682:case 130747:case 130780:case 131155:case 131194:case 131259:case 131292:case 131667:case 131706:case 131771:case 131804:case 132179:case 132218:case 132283:case 132316:case 132691:case 132730:case 132795:case 132828:case 134227:case 134266:case 134331:case 134364:case 134739:case 134778:case 134843:case 134876:case 136275:case 136314:case 136379:case 136412:case 136787:case 136826:case 136891:case 136924:case 137299:case 137338:case 137403:case 137436:case 137811:case 137850:case 137915:case 137948:case 139859:case 139898:case 139963:case 139996:case 143955:case 143969:case 143992:case 143994:case 144059:case 144078:case 144092:case 144121:case 144134:Yr();break;case-3:break;default:Pr()}}function Dr(){sc.startNonterminal("AxisStep",$l);switch(Jl){case 74:case 75:case 210:case 216:case 217:jl(233);break;default:Xl=Jl}switch(Xl){case 46:case 26698:case 26699:case 26834:case 26840:case 26841:Rr();break;default:Hr()}Bl(229),Pl(),ui(),sc.endNonterminal("AxisStep",$l)}function Pr(){switch(Jl){case 74:case 75:case 210:case 216:case 217:jl(233);break;default:Xl=Jl}switch(Xl){case 46:case 26698:case 26699:case 26834:case 26840:case 26841:Ur();break;default:Br()}Bl(229),ai()}function Hr(){sc.startNonterminal("ForwardStep",$l);switch(Jl){case 83:jl(237);break;case 94:case 112:case 113:case 137:case 138:case 234:jl(233);break;default:Xl=Jl}switch(Xl){case 26707:case 26718:case 26736:case 26737:case 26761:case 26762:case 26858:jr(),Bl(250),Pl(),$r();break;default:Ir()}sc.endNonterminal("ForwardStep",$l)}function Br(){switch(Jl){case 83:jl(237);break;case 94:case 112:case 113:case 137:case 138:case 234:jl(233);break;default:Xl=Jl}switch(Xl){case 26707:case 26718:case 26736:case 26737:case 26761:case 26762:case 26858:Fr(),Bl(250),Jr();break;default:qr()}}function jr(){sc.startNonterminal("ForwardAxis",$l);switch(Jl){case 94:Ml(94),Bl(27),Ml(52);break;case 112:Ml(112),Bl(27),Ml(52);break;case 83:Ml(83),Bl(27),Ml(52);break;case 234:Ml(234),Bl(27),Ml(52);break;case 113:Ml(113),Bl(27),Ml(52);break;case 138:Ml(138),Bl(27),Ml(52);break;default:Ml(137),Bl(27),Ml(52)}sc.endNonterminal("ForwardAxis",$l)}function Fr(){switch(Jl){case 94:_l(94),Bl(27),_l(52);break;case 112:_l(112),Bl(27),_l(52);break;case 83:_l(83),Bl(27),_l(52);break;case 234:_l(234),Bl(27),_l(52);break;case 113:_l(113),Bl(27),_l(52);break;case 138:_l(138),Bl(27),_l(52);break;default:_l(137),Bl(27),_l(52)}}function Ir(){sc.startNonterminal("AbbrevForwardStep",$l),Jl==67&&Ml(67),Bl(250),Pl(),$r(),sc.endNonterminal("AbbrevForwardStep",$l)}function qr(){Jl==67&&_l(67),Bl(250),Jr()}function Rr(){sc.startNonterminal("ReverseStep",$l);switch(Jl){case 46:Xr();break;default:zr(),Bl(250),Pl(),$r()}sc.endNonterminal("ReverseStep",$l)}function Ur(){switch(Jl){case 46:Vr();break;default:Wr(),Bl(250),Jr()}}function zr(){sc.startNonterminal("ReverseAxis",$l);switch(Jl){case 210:Ml(210),Bl(27),Ml(52);break;case 74:Ml(74),Bl(27),Ml(52);break;case 217:Ml(217),Bl(27),Ml(52);break;case 216:Ml(216),Bl(27),Ml(52);break;default:Ml(75),Bl(27),Ml(52)}sc.endNonterminal("ReverseAxis",$l)}function Wr(){switch(Jl){case 210:_l(210),Bl(27),_l(52);break;case 74:_l(74),Bl(27),_l(52);break;case 217:_l(217),Bl(27),_l(52);break;case 216:_l(216),Bl(27),_l(52);break;default:_l(75),Bl(27),_l(52)}}function Xr(){sc.startNonterminal("AbbrevReverseStep",$l),Ml(46),sc.endNonterminal("AbbrevReverseStep",$l)}function Vr(){_l(46)}function $r(){sc.startNonterminal("NodeTest",$l);switch(Jl){case 83:case 97:case 121:case 122:case 188:case 194:case 220:case 230:case 231:case 249:jl(232);break;default:Xl=Jl}switch(Xl){case 18003:case 18017:case 18041:case 18042:case 18108:case 18114:case 18140:case 18150:case 18151:case 18169:zs();break;default:Kr()}sc.endNonterminal("NodeTest",$l)}function Jr(){switch(Jl){case 83:case 97:case 121:case 122:case 188:case 194:case 220:case 230:case 231:case 249:jl(232);break;default:Xl=Jl}switch(Xl){case 18003:case 18017:case 18041:case 18042:case 18108:case 18114:case 18140:case 18150:case 18151:case 18169:Ws();break;default:Qr()}}function Kr(){sc.startNonterminal("NameTest",$l);switch(Jl){case 5:Ml(5);break;default:Wa()}sc.endNonterminal("NameTest",$l)}function Qr(){switch(Jl){case 5:_l(5);break;default:Xa()}}function Gr(){sc.startNonterminal("PostfixExpr",$l),vl();for(;;){Bl(236);if(Jl!=35&&Jl!=45&&Jl!=69)break;switch(Jl){case 69:jl(274);break;default:Xl=Jl}if(Xl==35397){Xl=Ul(5,$l);if(Xl==0){var e=Vl,t=$l,n=Jl,r=Kl,i=Ql,s=Gl,o=Yl,u=Zl;try{li(),Xl=-1}catch(a){Xl=-4}Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Rl(5,$l,Xl)}}switch(Xl){case 35:Pl(),si();break;case 45:Pl(),Zr();break;case-4:Pl(),ti();break;case 35909:Pl(),ri();break;default:Pl(),fi()}}sc.endNonterminal("PostfixExpr",$l)}function Yr(){ml();for(;;){Bl(236);if(Jl!=35&&Jl!=45&&Jl!=69)break;switch(Jl){case 69:jl(274);break;default:Xl=Jl}if(Xl==35397){Xl=Ul(5,$l);if(Xl==0){var e=Vl,t=$l,n=Jl,r=Kl,i=Ql,s=Gl,o=Yl,u=Zl;try{li(),Rl(5,t,-1),Xl=-6}catch(a){Xl=-4,Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Rl(5,t,-4)}}}switch(Xl){case 35:oi();break;case 45:ei();break;case-4:ni();break;case 35909:ii();break;case-6:break;default:li()}}}function Zr(){sc.startNonterminal("ObjectLookup",$l),Ml(45),Bl(252);switch(Jl){case 11:Ml(11);break;case 35:Pl(),xi();break;case 31:Pl(),bi();break;case 32:Pl(),Ni();break;default:Pl(),Ja()}sc.endNonterminal("ObjectLookup",$l)}function ei(){_l(45),Bl(252);switch(Jl){case 11:_l(11);break;case 35:Ti();break;case 31:wi();break;case 32:Ci();break;default:Ka()}}function ti(){sc.startNonterminal("ArrayLookup",$l),Ml(69),Bl(31),Ml(69),Bl(268),Pl(),Q(),Ml(70),Bl(32),Ml(70),sc.endNonterminal("ArrayLookup",$l)}function ni(){_l(69),Bl(31),_l(69),Bl(268),G(),_l(70),Bl(32),_l(70)}function ri(){sc.startNonterminal("ArrayUnboxing",$l),Ml(69),Bl(32),Ml(70),sc.endNonterminal("ArrayUnboxing",$l)}function ii(){_l(69),Bl(32),_l(70)}function si(){sc.startNonterminal("ArgumentList",$l),Ml(35),Bl(281);if(Jl!=38){Pl(),Di();for(;;){Bl(103);if(Jl!=42)break;Ml(42),Bl(273),Pl(),Di()}}Ml(38),sc.endNonterminal("ArgumentList",$l)}function oi(){_l(35),Bl(281);if(Jl!=38){Pi();for(;;){Bl(103);if(Jl!=42)break;_l(42),Bl(273),Pi()}}_l(38)}function ui(){sc.startNonterminal("PredicateList",$l);for(;;){Bl(229);if(Jl!=69)break;Pl(),fi()}sc.endNonterminal("PredicateList",$l)}function ai(){for(;;){Bl(229);if(Jl!=69)break;li()}}function fi(){sc.startNonterminal("Predicate",$l),Ml(69),Bl(268),Pl(),Q(),Ml(70),sc.endNonterminal("Predicate",$l)}function li(){_l(69),Bl(268),G(),_l(70)}function ci(){sc.startNonterminal("Literal",$l);switch(Jl){case 11:Ml(11);break;case 135:case 255:pi();break;case 197:vi();break;default:gi()}sc.endNonterminal("Literal",$l)}function hi(){switch(Jl){case 11:_l(11);break;case 135:case 255:di();break;case 197:mi();break;default:yi()}}function pi(){sc.startNonterminal("BooleanLiteral",$l);switch(Jl){case 255:Ml(255);break;default:Ml(135)}sc.endNonterminal("BooleanLiteral",$l)}function di(){switch(Jl){case 255:_l(255);break;default:_l(135)}}function vi(){sc.startNonterminal("NullLiteral",$l),Ml(197),sc.endNonterminal("NullLiteral",$l)}function mi(){_l(197)}function gi(){sc.startNonterminal("NumericLiteral",$l);switch(Jl){case 8:Ml(8);break;case 9:Ml(9);break;default:Ml(10)}sc.endNonterminal("NumericLiteral",$l)}function yi(){switch(Jl){case 8:_l(8);break;case 9:_l(9);break;default:_l(10)}}function bi(){sc.startNonterminal("VarRef",$l),Ml(31),Bl(247),Pl(),Ei(),sc.endNonterminal("VarRef",$l)}function wi(){_l(31),Bl(247),Si()}function Ei(){sc.startNonterminal("VarName",$l),Wa(),sc.endNonterminal("VarName",$l)}function Si(){Xa()}function xi(){sc.startNonterminal("ParenthesizedExpr",$l),Ml(35),Bl(271),Jl!=38&&(Pl(),Q()),Ml(38),sc.endNonterminal("ParenthesizedExpr",$l)}function Ti(){_l(35),Bl(271),Jl!=38&&G(),_l(38)}function Ni(){sc.startNonterminal("ContextItemExpr",$l),Ml(32),sc.endNonterminal("ContextItemExpr",$l)}function Ci(){_l(32)}function ki(){sc.startNonterminal("OrderedExpr",$l),Ml(206),Bl(89),Ml(281),Bl(268),Pl(),Q(),Ml(287),sc.endNonterminal("OrderedExpr",$l)}function Li(){_l(206),Bl(89),_l(281),Bl(268),G(),_l(287)}function Ai(){sc.startNonterminal("UnorderedExpr",$l),Ml(262),Bl(89),Ml(281),Bl(268),Pl(),Q(),Ml(287),sc.endNonterminal("UnorderedExpr",$l)}function Oi(){_l(262),Bl(89),_l(281),Bl(268),G(),_l(287)}function Mi(){sc.startNonterminal("FunctionCall",$l),Va(),Bl(22),Pl(),si(),sc.endNonterminal("FunctionCall",$l)}function _i(){$a(),Bl(22),oi()}function Di(){sc.startNonterminal("Argument",$l);switch(Jl){case 65:Hi();break;default:Rf()}sc.endNonterminal("Argument",$l)}function Pi(){switch(Jl){case 65:Bi();break;default:Uf()}}function Hi(){sc.startNonterminal("ArgumentPlaceholder",$l),Ml(65),sc.endNonterminal("ArgumentPlaceholder",$l)}function Bi(){_l(65)}function ji(){sc.startNonterminal("Constructor",$l);switch(Jl){case 55:case 56:case 60:Ii();break;default:rs()}sc.endNonterminal("Constructor",$l)}function Fi(){switch(Jl){case 55:case 56:case 60:qi();break;default:is()}}function Ii(){sc.startNonterminal("DirectConstructor",$l);switch(Jl){case 55:Ri();break;case 56:Zi();break;default:ts()}sc.endNonterminal("DirectConstructor",$l)}function qi(){switch(Jl){case 55:Ui();break;case 56:es();break;default:ns()}}function Ri(){sc.startNonterminal("DirElemConstructor",$l),Ml(55),Fl(4),Ml(20),zi();switch(Jl){case 49:Ml(49);break;default:Ml(62);for(;;){Fl(196);if(Jl==57)break;Gi()}Ml(57),Fl(4),Ml(20),Fl(12),Jl==21&&Ml(21),Fl(8),Ml(62)}sc.endNonterminal("DirElemConstructor",$l)}function Ui(){_l(55),Fl(4),_l(20),Wi();switch(Jl){case 49:_l(49);break;default:_l(62);for(;;){Fl(196);if(Jl==57)break;Yi()}_l(57),Fl(4),_l(20),Fl(12),Jl==21&&_l(21),Fl(8),_l(62)}}function zi(){sc.startNonterminal("DirAttributeList",$l);for(;;){Fl(19);if(Jl!=21)break;Ml(21),Fl(93),Jl==20&&(Ml(20),Fl(11),Jl==21&&Ml(21),Fl(7),Ml(61),Fl(18),Jl==21&&Ml(21),Xi())}sc.endNonterminal("DirAttributeList",$l)}function Wi(){for(;;){Fl(19);if(Jl!=21)break;_l(21),Fl(93),Jl==20&&(_l(20),Fl(11),Jl==21&&_l(21),Fl(7),_l(61),Fl(18),Jl==21&&_l(21),Vi())}}function Xi(){sc.startNonterminal("DirAttributeValue",$l),Fl(14);switch(Jl){case 28:Ml(28);for(;;){Fl(186);if(Jl==28)break;switch(Jl){case 13:Ml(13);break;default:$i()}}Ml(28);break;default:Ml(34);for(;;){Fl(187);if(Jl==34)break;switch(Jl){case 14:Ml(14);break;default:Ki()}}Ml(34)}sc.endNonterminal("DirAttributeValue",$l)}function Vi(){Fl(14);switch(Jl){case 28:_l(28);for(;;){Fl(186);if(Jl==28)break;switch(Jl){case 13:_l(13);break;default:Ji()}}_l(28);break;default:_l(34);for(;;){Fl(187);if(Jl==34)break;switch(Jl){case 14:_l(14);break;default:Qi()}}_l(34)}}function $i(){sc.startNonterminal("QuotAttrValueContent",$l);switch(Jl){case 16:Ml(16);break;default:tl()}sc.endNonterminal("QuotAttrValueContent",$l)}function Ji(){switch(Jl){case 16:_l(16);break;default:nl()}}function Ki(){sc.startNonterminal("AposAttrValueContent",$l);switch(Jl){case 17:Ml(17);break;default:tl()}sc.endNonterminal("AposAttrValueContent",$l)}function Qi(){switch(Jl){case 17:_l(17);break;default:nl()}}function Gi(){sc.startNonterminal("DirElemContent",$l);switch(Jl){case 55:case 56:case 60:Ii();break;case 4:Ml(4);break;case 15:Ml(15);break;default:tl()}sc.endNonterminal("DirElemContent",$l)}function Yi(){switch(Jl){case 55:case 56:case 60:qi();break;case 4:_l(4);break;case 15:_l(15);break;default:nl()}}function Zi(){sc.startNonterminal("DirCommentConstructor",$l),Ml(56),Fl(1),Ml(2),Fl(6),Ml(44),sc.endNonterminal("DirCommentConstructor",$l)}function es(){_l(56),Fl(1),_l(2),Fl(6),_l(44)}function ts(){sc.startNonterminal("DirPIConstructor",$l),Ml(60),Fl(3),Ml(18),Fl(13),Jl==21&&(Ml(21),Fl(2),Ml(3)),Fl(9),Ml(66),sc.endNonterminal("DirPIConstructor",$l)}function ns(){_l(60),Fl(3),_l(18),Fl(13),Jl==21&&(_l(21),Fl(2),_l(3)),Fl(9),_l(66)}function rs(){sc.startNonterminal("ComputedConstructor",$l);switch(Jl){case 120:sl();break;case 122:ss();break;case 83:ul();break;case 187:us();break;case 249:pl();break;case 97:cl();break;default:fl()}sc.endNonterminal("ComputedConstructor",$l)}function is(){switch(Jl){case 120:ol();break;case 122:os();break;case 83:al();break;case 187:as();break;case 249:dl();break;case 97:hl();break;default:ll()}}function ss(){sc.startNonterminal("CompElemConstructor",$l),Ml(122),Bl(251);switch(Jl){case 281:Ml(281),Bl(268),Pl(),Q(),Ml(287);break;default:Pl(),Wa()}Bl(89),Ml(281),Bl(282),Jl!=287&&(Pl(),rl()),Ml(287),sc.endNonterminal("CompElemConstructor",$l)}function os(){_l(122),Bl(251);switch(Jl){case 281:_l(281),Bl(268),G(),_l(287);break;default:Xa()}Bl(89),_l(281),Bl(282),Jl!=287&&il(),_l(287)}function us(){sc.startNonterminal("CompNamespaceConstructor",$l),Ml(187),Bl(243);switch(Jl){case 281:Ml(281),Bl(268),Pl(),cs(),Ml(287);break;default:Pl(),fs()}Bl(89),Ml(281),Bl(268),Pl(),ps(),Ml(287),sc.endNonterminal("CompNamespaceConstructor",$l)}function as(){_l(187),Bl(243);switch(Jl){case 281:_l(281),Bl(268),hs(),_l(287);break;default:ls()}Bl(89),_l(281),Bl(268),ds(),_l(287)}function fs(){sc.startNonterminal("Prefix",$l),Ja(),sc.endNonterminal("Prefix",$l)}function ls(){Ka()}function cs(){sc.startNonterminal("PrefixExpr",$l),Q(),sc.endNonterminal("PrefixExpr",$l)}function hs(){G()}function ps(){sc.startNonterminal("URIExpr",$l),Q(),sc.endNonterminal("URIExpr",$l)}function ds(){G()}function vs(){sc.startNonterminal("FunctionItemExpr",$l);switch(Jl){case 147:jl(94);break;default:Xl=Jl}switch(Xl){case 33:case 18067:bs();break;default:gs()}sc.endNonterminal("FunctionItemExpr",$l)}function ms(){switch(Jl){case 147:jl(94);break;default:Xl=Jl}switch(Xl){case 33:case 18067:ws();break;default:ys()}}function gs(){sc.startNonterminal("NamedFunctionRef",$l),Wa(),Bl(20),Ml(29),Bl(16),Ml(8),sc.endNonterminal("NamedFunctionRef",$l)}function ys(){Xa(),Bl(20),_l(29),Bl(16),_l(8)}function bs(){sc.startNonterminal("InlineFunctionExpr",$l);for(;;){Bl(99);if(Jl!=33)break;Pl(),H()}Ml(147),Bl(22),Ml(35),Bl(97),Jl==31&&(Pl(),R()),Ml(38),Bl(113),Jl==80&&(Ml(80),Bl(255),Pl(),Ns()),Bl(89),Pl(),X(),sc.endNonterminal("InlineFunctionExpr",$l)}function ws(){for(;;){Bl(99);if(Jl!=33)break;B()}_l(147),Bl(22),_l(35),Bl(97),Jl==31&&U(),_l(38),Bl(113),Jl==80&&(_l(80),Bl(255),Cs()),Bl(89),V()}function Es(){sc.startNonterminal("SingleType",$l),To(),Bl(227),Jl==65&&Ml(65),sc.endNonterminal("SingleType",$l)}function Ss(){No(),Bl(227),Jl==65&&_l(65)}function xs(){sc.startNonterminal("TypeDeclaration",$l),Ml(80),Bl(255),Pl(),Ns(),sc.endNonterminal("TypeDeclaration",$l)}function Ts(){_l(80),Bl(255),Cs()}function Ns(){sc.startNonterminal("SequenceType",$l);switch(Jl){case 35:jl(260);break;case 125:jl(234);break;default:Xl=Jl}switch(Xl){case 18045:case 19491:Jl==125&&Ml(125),Bl(22),Ml(35),Bl(23),Ml(38);break;default:As(),Bl(230);switch(Jl){case 40:case 41:case 65:Pl(),ks();break;default:}}sc.endNonterminal("SequenceType",$l)}function Cs(){switch(Jl){case 35:jl(260);break;case 125:jl(234);break;default:Xl=Jl}switch(Xl){case 18045:case 19491:Jl==125&&_l(125),Bl(22),_l(35),Bl(23),_l(38);break;default:Os(),Bl(230);switch(Jl){case 40:case 41:case 65:Ls();break;default:}}}function ks(){sc.startNonterminal("OccurrenceIndicator",$l);switch(Jl){case 65:Ml(65);break;case 40:Ml(40);break;default:Ml(41)}sc.endNonterminal("OccurrenceIndicator",$l)}function Ls(){switch(Jl){case 65:_l(65);break;case 40:_l(40);break;default:_l(41)}}function As(){sc.startNonterminal("ItemType",$l);switch(Jl){case 79:case 83:case 97:case 121:case 122:case 147:case 167:case 169:case 188:case 194:case 198:case 220:case 230:case 231:case 247:case 249:jl(234);break;default:Xl=Jl}if(Xl==12879||Xl==12969||Xl==12998||Xl==13047||Xl==13903||Xl==13993||Xl==14022||Xl==14071||Xl==19535||Xl==19625||Xl==19654||Xl==19703||Xl==20047||Xl==20137||Xl==20166||Xl==20215||Xl==20559||Xl==20649||Xl==20678||Xl==20727||Xl==21071||Xl==21161||Xl==21190||Xl==21239||Xl==21583||Xl==21673||Xl==21702||Xl==21751||Xl==22095||Xl==22185||Xl==22214||Xl==22263||Xl==25679||Xl==25769||Xl==25798||Xl==25847||Xl==27215||Xl==27305||Xl==27334||Xl==27383||Xl==27727||Xl==27817||Xl==27846||Xl==27895||Xl==28239||Xl==28329||Xl==28358||Xl==28407||Xl==29775||Xl==29865||Xl==29894||Xl==29943||Xl==30287||Xl==30377||Xl==30406||Xl==30455||Xl==31311||Xl==31401||Xl==31430||Xl==31479||Xl==31823||Xl==31913||Xl==31942||Xl==31991||Xl==32335||Xl==32425||Xl==32454||Xl==32503||Xl==32847||Xl==32937||Xl==32966||Xl==33015||Xl==33359||Xl==33449||Xl==33478||Xl==33527||Xl==35919||Xl==36009||Xl==36038||Xl==36087||Xl==36431||Xl==36521||Xl==36550||Xl==36599||Xl==37455||Xl==37545||Xl==37574||Xl==37623||Xl==38991||Xl==39081||Xl==39110||Xl==39159||Xl==41039||Xl==41129||Xl==41158||Xl==41207||Xl==41551||Xl==41641||Xl==41670||Xl==41719||Xl==42063||Xl==42153||Xl==42182||Xl==42231||Xl==43599||Xl==43689||Xl==43718||Xl==43767||Xl==45647||Xl==45737||Xl==45766||Xl==45815||Xl==48719||Xl==48809||Xl==48838||Xl==48887||Xl==51279||Xl==51369||Xl==51398||Xl==51447||Xl==54351||Xl==54441||Xl==54470||Xl==54519||Xl==56399||Xl==56489||Xl==56518||Xl==56567||Xl==58447||Xl==58537||Xl==58566||Xl==58615||Xl==61007||Xl==61097||Xl==61126||Xl==61175||Xl==63055||Xl==63145||Xl==63174||Xl==63223||Xl==63567||Xl==63657||Xl==63686||Xl==63735||Xl==65103||Xl==65193||Xl==65222||Xl==65271||Xl==66127||Xl==66217||Xl==66246||Xl==66295||Xl==67663||Xl==67753||Xl==67782||Xl==67831||Xl==68687||Xl==68777||Xl==68806||Xl==68855||Xl==71247||Xl==71337||Xl==71366||Xl==71415||Xl==72783||Xl==72873||Xl==72902||Xl==72951||Xl==75855||Xl==75945||Xl==75974||Xl==76023||Xl==76879||Xl==76969||Xl==76998||Xl==77047||Xl==77903||Xl==77993||Xl==78022||Xl==78071||Xl==78415||Xl==78505||Xl==78534||Xl==78583||Xl==79951||Xl==80041||Xl==80070||Xl==80119||Xl==83023||Xl==83113||Xl==83142||Xl==83191||Xl==84047||Xl==84137||Xl==84166||Xl==84215||Xl==84559||Xl==84649||Xl==84678||Xl==84727||Xl==85071||Xl==85161||Xl==85190||Xl==85239||Xl==89679||Xl==89769||Xl==89798||Xl==89847||Xl==90703||Xl==90793||Xl==90822||Xl==90871||Xl==92751||Xl==92841||Xl==92870||Xl==92919||Xl==93775||Xl==93865||Xl==93894||Xl==93943||Xl==94287||Xl==94377||Xl==94406||Xl==94455||Xl==96847||Xl==96937||Xl==96966||Xl==97015||Xl==103503||Xl==103593||Xl==103622||Xl==103671||Xl==104527||Xl==104617||Xl==104646||Xl==104695||Xl==105039||Xl==105129||Xl==105158||Xl==105207||Xl==107087||Xl==107177||Xl==107206||Xl==107255||Xl==114767||Xl==114857||Xl==114886||Xl==114935||Xl==116815||Xl==116905||Xl==116934||Xl==116983||Xl==118863||Xl==118953||Xl==118982||Xl==119031||Xl==119375||Xl==119465||Xl==119494||Xl==119543||Xl==121423||Xl==121513||Xl==121542||Xl==121591||Xl==123471||Xl==123561||Xl==123590||Xl==123639||Xl==123983||Xl==124073||Xl==124102||Xl==124151||Xl==129103||Xl==129193||Xl==129222||Xl==129271||Xl==129615||Xl==129705||Xl==129734||Xl==129783||Xl==133199||Xl==133289||Xl==133318||Xl==133367||Xl==139343||Xl==139433||Xl==139462||Xl==139511||Xl==141391||Xl==141481||Xl==141510||Xl==141559||Xl==142927||Xl==143017||Xl==143046||Xl==143095||Xl==143951||Xl==144041||Xl==144070||Xl==144119||Xl==145487||Xl==145577||Xl==145606||Xl==145655||Xl==145999||Xl==146089||Xl==146118||Xl==146167||Xl==146511||Xl==146601||Xl==146630||Xl==146679||Xl==147023||Xl==147113||Xl==147142||Xl==147191){Xl=Ul(6,$l);if(Xl==0){var e=Vl,t=$l,n=Jl,r=Kl,i=Ql,s=Gl,o=Yl,u=Zl;try{Us(),Xl=-4}catch(a){try{Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),_s(),Xl=-6}catch(f){Xl=-7}}Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Rl(6,$l,Xl)}}switch(Xl){case 18003:case 18017:case 18041:case 18042:case 18108:case 18114:case 18140:case 18150:case 18151:case 18169:zs();break;case 18087:Ml(167),Bl(22),Ml(35),Bl(23),Ml(38);break;case 33:case 18067:Lo();break;case 35:Po();break;case-6:case 17999:case 18089:case 18118:Ms();break;case-7:case 18167:Ds();break;default:Rs()}sc.endNonterminal("ItemType",$l)}function Os(){switch(Jl){case 79:case 83:case 97:case 121:case 122:case 147:case 167:case 169:case 188:case 194:case 198:case 220:case 230:case 231:case 247:case 249:jl(234);break;default:Xl=Jl}if(Xl==12879||Xl==12969||Xl==12998||Xl==13047||Xl==13903||Xl==13993||Xl==14022||Xl==14071||Xl==19535||Xl==19625||Xl==19654||Xl==19703||Xl==20047||Xl==20137||Xl==20166||Xl==20215||Xl==20559||Xl==20649||Xl==20678||Xl==20727||Xl==21071||Xl==21161||Xl==21190||Xl==21239||Xl==21583||Xl==21673||Xl==21702||Xl==21751||Xl==22095||Xl==22185||Xl==22214||Xl==22263||Xl==25679||Xl==25769||Xl==25798||Xl==25847||Xl==27215||Xl==27305||Xl==27334||Xl==27383||Xl==27727||Xl==27817||Xl==27846||Xl==27895||Xl==28239||Xl==28329||Xl==28358||Xl==28407||Xl==29775||Xl==29865||Xl==29894||Xl==29943||Xl==30287||Xl==30377||Xl==30406||Xl==30455||Xl==31311||Xl==31401||Xl==31430||Xl==31479||Xl==31823||Xl==31913||Xl==31942||Xl==31991||Xl==32335||Xl==32425||Xl==32454||Xl==32503||Xl==32847||Xl==32937||Xl==32966||Xl==33015||Xl==33359||Xl==33449||Xl==33478||Xl==33527||Xl==35919||Xl==36009||Xl==36038||Xl==36087||Xl==36431||Xl==36521||Xl==36550||Xl==36599||Xl==37455||Xl==37545||Xl==37574||Xl==37623||Xl==38991||Xl==39081||Xl==39110||Xl==39159||Xl==41039||Xl==41129||Xl==41158||Xl==41207||Xl==41551||Xl==41641||Xl==41670||Xl==41719||Xl==42063||Xl==42153||Xl==42182||Xl==42231||Xl==43599||Xl==43689||Xl==43718||Xl==43767||Xl==45647||Xl==45737||Xl==45766||Xl==45815||Xl==48719||Xl==48809||Xl==48838||Xl==48887||Xl==51279||Xl==51369||Xl==51398||Xl==51447||Xl==54351||Xl==54441||Xl==54470||Xl==54519||Xl==56399||Xl==56489||Xl==56518||Xl==56567||Xl==58447||Xl==58537||Xl==58566||Xl==58615||Xl==61007||Xl==61097||Xl==61126||Xl==61175||Xl==63055||Xl==63145||Xl==63174||Xl==63223||Xl==63567||Xl==63657||Xl==63686||Xl==63735||Xl==65103||Xl==65193||Xl==65222||Xl==65271||Xl==66127||Xl==66217||Xl==66246||Xl==66295||Xl==67663||Xl==67753||Xl==67782||Xl==67831||Xl==68687||Xl==68777||Xl==68806||Xl==68855||Xl==71247||Xl==71337||Xl==71366||Xl==71415||Xl==72783||Xl==72873||Xl==72902||Xl==72951||Xl==75855||Xl==75945||Xl==75974||Xl==76023||Xl==76879||Xl==76969||Xl==76998||Xl==77047||Xl==77903||Xl==77993||Xl==78022||Xl==78071||Xl==78415||Xl==78505||Xl==78534||Xl==78583||Xl==79951||Xl==80041||Xl==80070||Xl==80119||Xl==83023||Xl==83113||Xl==83142||Xl==83191||Xl==84047||Xl==84137||Xl==84166||Xl==84215||Xl==84559||Xl==84649||Xl==84678||Xl==84727||Xl==85071||Xl==85161||Xl==85190||Xl==85239||Xl==89679||Xl==89769||Xl==89798||Xl==89847||Xl==90703||Xl==90793||Xl==90822||Xl==90871||Xl==92751||Xl==92841||Xl==92870||Xl==92919||Xl==93775||Xl==93865||Xl==93894||Xl==93943||Xl==94287||Xl==94377||Xl==94406||Xl==94455||Xl==96847||Xl==96937||Xl==96966||Xl==97015||Xl==103503||Xl==103593||Xl==103622||Xl==103671||Xl==104527||Xl==104617||Xl==104646||Xl==104695||Xl==105039||Xl==105129||Xl==105158||Xl==105207||Xl==107087||Xl==107177||Xl==107206||Xl==107255||Xl==114767||Xl==114857||Xl==114886||Xl==114935||Xl==116815||Xl==116905||Xl==116934||Xl==116983||Xl==118863||Xl==118953||Xl==118982||Xl==119031||Xl==119375||Xl==119465||Xl==119494||Xl==119543||Xl==121423||Xl==121513||Xl==121542||Xl==121591||Xl==123471||Xl==123561||Xl==123590||Xl==123639||Xl==123983||Xl==124073||Xl==124102||Xl==124151||Xl==129103||Xl==129193||Xl==129222||Xl==129271||Xl==129615||Xl==129705||Xl==129734||Xl==129783||Xl==133199||Xl==133289||Xl==133318||Xl==133367||Xl==139343||Xl==139433||Xl==139462||Xl==139511||Xl==141391||Xl==141481||Xl==141510||Xl==141559||Xl==142927||Xl==143017||Xl==143046||Xl==143095||Xl==143951||Xl==144041||Xl==144070||Xl==144119||Xl==145487||Xl==145577||Xl==145606||Xl==145655||Xl==145999||Xl==146089||Xl==146118||Xl==146167||Xl==146511||Xl==146601||Xl==146630||Xl==146679||Xl==147023||Xl==147113||Xl==147142||Xl==147191){Xl=Ul(6,$l);if(Xl==0){var e=Vl,t=$l,n=Jl,r=Kl,i=Ql,s=Gl,o=Yl,u=Zl;try{Us(),Rl(6,t,-4),Xl=-8}catch(a){try{Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),_s(),Rl(6,t,-6),Xl=-8}catch(f){Xl=-7,Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Rl(6,t,-7)}}}}switch(Xl){case 18003:case 18017:case 18041:case 18042:case 18108:case 18114:case 18140:case 18150:case 18151:case 18169:Ws();break;case 18087:_l(167),Bl(22),_l(35),Bl(23),_l(38);break;case 33:case 18067:Ao();break;case 35:Ho();break;case-6:case 17999:case 18089:case 18118:_s();break;case-7:case 18167:Ps();break;case-8:break;default:Us()}}function Ms(){sc.startNonterminal("JSONTest",$l);switch(Jl){case 169:Hs();break;case 198:js();break;default:Is()}sc.endNonterminal("JSONTest",$l)}function _s(){switch(Jl){case 169:Bs();break;case 198:Fs();break;default:qs()}}function Ds(){sc.startNonterminal("StructuredItemTest",$l),Ml(247),Bl(234),Jl==35&&(Ml(35),Bl(23),Ml(38)),sc.endNonterminal("StructuredItemTest",$l)}function Ps(){_l(247),Bl(234),Jl==35&&(_l(35),Bl(23),_l(38))}function Hs(){sc.startNonterminal("JSONItemTest",$l),Ml(169),Bl(234),Jl==35&&(Ml(35),Bl(23),Ml(38)),sc.endNonterminal("JSONItemTest",$l)}function Bs(){_l(169),Bl(234),Jl==35&&(_l(35),Bl(23),_l(38))}function js(){sc.startNonterminal("JSONObjectTest",$l),Ml(198),Bl(234),Jl==35&&(Ml(35),Bl(23),Ml(38)),sc.endNonterminal("JSONObjectTest",$l)}function Fs(){_l(198),Bl(234),Jl==35&&(_l(35),Bl(23),_l(38))}function Is(){sc.startNonterminal("JSONArrayTest",$l),Ml(79),Bl(234),Jl==35&&(Ml(35),Bl(23),Ml(38)),sc.endNonterminal("JSONArrayTest",$l)}function qs(){_l(79),Bl(234),Jl==35&&(_l(35),Bl(23),_l(38))}function Rs(){sc.startNonterminal("AtomicOrUnionType",$l),Wa(),sc.endNonterminal("AtomicOrUnionType",$l)}function Us(){Xa()}function zs(){sc.startNonterminal("KindTest",$l);switch(Jl){case 121:$s();break;case 122:co();break;case 83:ro();break;case 231:mo();break;case 230:uo();break;case 220:to();break;case 97:Gs();break;case 249:Ks();break;case 188:Zs();break;default:Xs()}sc.endNonterminal("KindTest",$l)}function Ws(){switch(Jl){case 121:Js();break;case 122:ho();break;case 83:io();break;case 231:go();break;case 230:ao();break;case 220:no();break;case 97:Ys();break;case 249:Qs();break;case 188:eo();break;default:Vs()}}function Xs(){sc.startNonterminal("AnyKindTest",$l),Ml(194),Bl(22),Ml(35),Bl(23),Ml(38),sc.endNonterminal("AnyKindTest",$l)}function Vs(){_l(194),Bl(22),_l(35),Bl(23),_l(38)}function $s(){sc.startNonterminal("DocumentTest",$l),Ml(121),Bl(22),Ml(35),Bl(153);if(Jl!=38)switch(Jl){case 122:Pl(),co();break;default:Pl(),mo()}Bl(23),Ml(38),sc.endNonterminal("DocumentTest",$l)}function Js(){_l(121),Bl(22),_l(35),Bl(153);if(Jl!=38)switch(Jl){case 122:ho();break;default:go()}Bl(23),_l(38)}function Ks(){sc.startNonterminal("TextTest",$l),Ml(249),Bl(22),Ml(35),Bl(23),Ml(38),sc.endNonterminal("TextTest",$l)}function Qs(){_l(249),Bl(22),_l(35),Bl(23),_l(38)}function Gs(){sc.startNonterminal("CommentTest",$l),Ml(97),Bl(22),Ml(35),Bl(23),Ml(38),sc.endNonterminal("CommentTest",$l)}function Ys(){_l(97),Bl(22),_l(35),Bl(23),_l(38)}function Zs(){sc.startNonterminal("NamespaceNodeTest",$l),Ml(188),Bl(22),Ml(35),Bl(23),Ml(38),sc.endNonterminal("NamespaceNodeTest",$l)}function eo(){_l(188),Bl(22),_l(35),Bl(23),_l(38)}function to(){sc.startNonterminal("PITest",$l),Ml(220),Bl(22),Ml(35),Bl(245);if(Jl!=38)switch(Jl){case 11:Ml(11);break;default:Pl(),Ja()}Bl(23),Ml(38),sc.endNonterminal("PITest",$l)}function no(){_l(220),Bl(22),_l(35),Bl(245);if(Jl!=38)switch(Jl){case 11:_l(11);break;default:Ka()}Bl(23),_l(38)}function ro(){sc.startNonterminal("AttributeTest",$l),Ml(83),Bl(22),Ml(35),Bl(256),Jl!=38&&(Pl(),so(),Bl(103),Jl==42&&(Ml(42),Bl(247),Pl(),Co())),Bl(23),Ml(38),sc.endNonterminal("AttributeTest",$l)}function io(){_l(83),Bl(22),_l(35),Bl(256),Jl!=38&&(oo(),Bl(103),Jl==42&&(_l(42),Bl(247),ko())),Bl(23),_l(38)}function so(){sc.startNonterminal("AttribNameOrWildcard",$l);switch(Jl){case 39:Ml(39);break;default:wo()}sc.endNonterminal("AttribNameOrWildcard",$l)}function oo(){switch(Jl){case 39:_l(39);break;default:Eo()}}function uo(){sc.startNonterminal("SchemaAttributeTest",$l),Ml(230),Bl(22),Ml(35),Bl(247),Pl(),fo(),Bl(23),Ml(38),sc.endNonterminal("SchemaAttributeTest",$l)}function ao(){_l(230),Bl(22),_l(35),Bl(247),lo(),Bl(23),_l(38)}function fo(){sc.startNonterminal("AttributeDeclaration",$l),wo(),sc.endNonterminal("AttributeDeclaration",$l)}function lo(){Eo()}function co(){sc.startNonterminal("ElementTest",$l),Ml(122),Bl(22),Ml(35),Bl(256),Jl!=38&&(Pl(),po(),Bl(103),Jl==42&&(Ml(42),Bl(247),Pl(),Co(),Bl(104),Jl==65&&Ml(65))),Bl(23),Ml(38),sc.endNonterminal("ElementTest",$l)}function ho(){_l(122),Bl(22),_l(35),Bl(256),Jl!=38&&(vo(),Bl(103),Jl==42&&(_l(42),Bl(247),ko(),Bl(104),Jl==65&&_l(65))),Bl(23),_l(38)}function po(){sc.startNonterminal("ElementNameOrWildcard",$l);switch(Jl){case 39:Ml(39);break;default:So()}sc.endNonterminal("ElementNameOrWildcard",$l)}function vo(){switch(Jl){case 39:_l(39);break;default:xo()}}function mo(){sc.startNonterminal("SchemaElementTest",$l),Ml(231),Bl(22),Ml(35),Bl(247),Pl(),yo(),Bl(23),Ml(38),sc.endNonterminal("SchemaElementTest",$l)}function go(){_l(231),Bl(22),_l(35),Bl(247),bo(),Bl(23),_l(38)}function yo(){sc.startNonterminal("ElementDeclaration",$l),So(),sc.endNonterminal("ElementDeclaration",$l)}function bo(){xo()}function wo(){sc.startNonterminal("AttributeName",$l),Wa(),sc.endNonterminal("AttributeName",$l)}function Eo(){Xa()}function So(){sc.startNonterminal("ElementName",$l),Wa(),sc.endNonterminal("ElementName",$l)}function xo(){Xa()}function To(){sc.startNonterminal("SimpleTypeName",$l),Co(),sc.endNonterminal("SimpleTypeName",$l)}function No(){ko()}function Co(){sc.startNonterminal("TypeName",$l),Wa(),sc.endNonterminal("TypeName",$l)}function ko(){Xa()}function Lo(){sc.startNonterminal("FunctionTest",$l);for(;;){Bl(99);if(Jl!=33)break;Pl(),H()}switch(Jl){case 147:jl(22);break;default:Xl=Jl}Xl=Ul(7,$l);if(Xl==0){var e=Vl,t=$l,n=Jl,r=Kl,i=Ql,s=Gl,o=Yl,u=Zl;try{Mo(),Xl=-1}catch(a){Xl=-2}Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Rl(7,$l,Xl)}switch(Xl){case-1:Pl(),Oo();break;default:Pl(),_o()}sc.endNonterminal("FunctionTest",$l)}function Ao(){for(;;){Bl(99);if(Jl!=33)break;B()}switch(Jl){case 147:jl(22);break;default:Xl=Jl}Xl=Ul(7,$l);if(Xl==0){var e=Vl,t=$l,n=Jl,r=Kl,i=Ql,s=Gl,o=Yl,u=Zl;try{Mo(),Rl(7,t,-1),Xl=-3}catch(a){Xl=-2,Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Rl(7,t,-2)}}switch(Xl){case-1:Mo();break;case-3:break;default:Do()}}function Oo(){sc.startNonterminal("AnyFunctionTest",$l),Ml(147),Bl(22),Ml(35),Bl(24),Ml(39),Bl(23),Ml(38),sc.endNonterminal("AnyFunctionTest",$l)}function Mo(){_l(147),Bl(22),_l(35),Bl(24),_l(39),Bl(23),_l(38)}function _o(){sc.startNonterminal("TypedFunctionTest",$l),Ml(147),Bl(22),Ml(35),Bl(260);if(Jl!=38){Pl(),Ns();for(;;){Bl(103);if(Jl!=42)break;Ml(42),Bl(255),Pl(),Ns()}}Ml(38),Bl(33),Ml(80),Bl(255),Pl(),Ns(),sc.endNonterminal("TypedFunctionTest",$l)}function Do(){_l(147),Bl(22),_l(35),Bl(260);if(Jl!=38){Cs();for(;;){Bl(103);if(Jl!=42)break;_l(42),Bl(255),Cs()}}_l(38),Bl(33),_l(80),Bl(255),Cs()}function Po(){sc.startNonterminal("ParenthesizedItemType",$l),Ml(35),Bl(255),Pl(),As(),Bl(23),Ml(38),sc.endNonterminal("ParenthesizedItemType",$l)}function Ho(){_l(35),Bl(255),Os(),Bl(23),_l(38)}function Bo(){sc.startNonterminal("RevalidationDecl",$l),Ml(109),Bl(74),Ml(226),Bl(161);switch(Jl){case 245:Ml(245);break;case 174:Ml(174);break;default:Ml(238)}sc.endNonterminal("RevalidationDecl",$l)}function jo(){sc.startNonterminal("InsertExprTargetChoice",$l);switch(Jl){case 71:Ml(71);break;case 85:Ml(85);break;default:if(Jl==80){Ml(80),Bl(121);switch(Jl){case 136:Ml(136);break;default:Ml(173)}}Bl(57),Ml(165)}sc.endNonterminal("InsertExprTargetChoice",$l)}function Fo(){switch(Jl){case 71:_l(71);break;case 85:_l(85);break;default:if(Jl==80){_l(80),Bl(121);switch(Jl){case 136:_l(136);break;default:_l(173)}}Bl(57),_l(165)}}function Io(){sc.startNonterminal("InsertExpr",$l),Ml(161),Bl(131);switch(Jl){case 194:Ml(194);break;default:Ml(195)}Bl(268),Pl(),$o(),Pl(),jo(),Bl(268),Pl(),Ko(),sc.endNonterminal("InsertExpr",$l)}function qo(){_l(161),Bl(131);switch(Jl){case 194:_l(194);break;default:_l(195)}Bl(268),Jo(),Fo(),Bl(268),Qo()}function Ro(){sc.startNonterminal("DeleteExpr",$l),Ml(111),Bl(131);switch(Jl){case 194:Ml(194);break;default:Ml(195)}Bl(268),Pl(),Ko(),sc.endNonterminal("DeleteExpr",$l)}function Uo(){_l(111),Bl(131);switch(Jl){case 194:_l(194);break;default:_l(195)}Bl(268),Qo()}function zo(){sc.startNonterminal("ReplaceExpr",$l),Ml(223),Bl(132),Jl==267&&(Ml(267),Bl(67),Ml(200)),Bl(65),Ml(194),Bl(268),Pl(),Ko(),Ml(276),Bl(268),Pl(),Rf(),sc.endNonterminal("ReplaceExpr",$l)}function Wo(){_l(223),Bl(132),Jl==267&&(_l(267),Bl(67),_l(200)),Bl(65),_l(194),Bl(268),Qo(),_l(276),Bl(268),Uf()}function Xo(){sc.startNonterminal("RenameExpr",$l),Ml(222),Bl(65),Ml(194),Bl(268),Pl(),Ko(),Ml(80),Bl(268),Pl(),Go(),sc.endNonterminal("RenameExpr",$l)}function Vo(){_l(222),Bl(65),_l(194),Bl(268),Qo(),_l(80),Bl(268),Yo()}function $o(){sc.startNonterminal("SourceExpr",$l),Rf(),sc.endNonterminal("SourceExpr",$l)}function Jo(){Uf()}function Ko(){sc.startNonterminal("TargetExpr",$l),Rf(),sc.endNonterminal("TargetExpr",$l)}function Qo(){Uf()}function Go(){sc.startNonterminal("NewNameExpr",$l),Rf(),sc.endNonterminal("NewNameExpr",$l)}function Yo(){Uf()}function Zo(){sc.startNonterminal("TransformExpr",$l),Ml(104),Bl(21),Pl(),tu();for(;;){if(Jl!=42)break;Ml(42),Bl(21),Pl(),tu()}Ml(184),Bl(268),Pl(),Rf(),Ml(224),Bl(268),Pl(),Rf(),sc.endNonterminal("TransformExpr",$l)}function eu(){_l(104),Bl(21),nu();for(;;){if(Jl!=42)break;_l(42),Bl(21),nu()}_l(184),Bl(268),Uf(),_l(224),Bl(268),Uf()}function tu(){sc.startNonterminal("TransformSpec",$l),Ml(31),Bl(247),Pl(),Ei(),Bl(28),Ml(53),Bl(268),Pl(),Rf(),sc.endNonterminal("TransformSpec",$l)}function nu(){_l(31),Bl(247),Si(),Bl(28),_l(53),Bl(268),Uf()}function ru(){sc.startNonterminal("FTSelection",$l),uu();for(;;){Bl(213);switch(Jl){case 82:jl(160);break;default:Xl=Jl}if(Xl!=116&&Xl!=118&&Xl!=128&&Xl!=206&&Xl!=227&&Xl!=275&&Xl!=65106&&Xl!=123986)break;Pl(),Mu()}sc.endNonterminal("FTSelection",$l)}function iu(){au();for(;;){Bl(213);switch(Jl){case 82:jl(160);break;default:Xl=Jl}if(Xl!=116&&Xl!=118&&Xl!=128&&Xl!=206&&Xl!=227&&Xl!=275&&Xl!=65106&&Xl!=123986)break;_u()}}function su(){sc.startNonterminal("FTWeight",$l),Ml(270),Bl(89),Ml(281),Bl(268),Pl(),Q(),Ml(287),sc.endNonterminal("FTWeight",$l)}function ou(){_l(270),Bl(89),_l(281),Bl(268),G(),_l(287)}function uu(){sc.startNonterminal("FTOr",$l),fu();for(;;){if(Jl!=146)break;Ml(146),Bl(178),Pl(),fu()}sc.endNonterminal("FTOr",$l)}function au(){lu();for(;;){if(Jl!=146)break;_l(146),Bl(178),lu()}}function fu(){sc.startNonterminal("FTAnd",$l),cu();for(;;){if(Jl!=144)break;Ml(144),Bl(178),Pl(),cu()}sc.endNonterminal("FTAnd",$l)}function lu(){hu();for(;;){if(Jl!=144)break;_l(144),Bl(178),hu()}}function cu(){sc.startNonterminal("FTMildNot",$l),pu();for(;;){Bl(214);if(Jl!=196)break;Ml(196),Bl(56),Ml(156),Bl(178),Pl(),pu()}sc.endNonterminal("FTMildNot",$l)}function hu(){du();for(;;){Bl(214);if(Jl!=196)break;_l(196),Bl(56),_l(156),Bl(178),du()}}function pu(){sc.startNonterminal("FTUnaryNot",$l),Jl==145&&Ml(145),Bl(165),Pl(),vu(),sc.endNonterminal("FTUnaryNot",$l)}function du(){Jl==145&&_l(145),Bl(165),mu()}function vu(){sc.startNonterminal("FTPrimaryWithOptions",$l),gu(),Bl(215),Jl==265&&(Pl(),$u()),Jl==270&&(Pl(),su()),sc.endNonterminal("FTPrimaryWithOptions",$l)}function mu(){yu(),Bl(215),Jl==265&&Ju(),Jl==270&&ou()}function gu(){sc.startNonterminal("FTPrimary",$l);switch(Jl){case 35:Ml(35),Bl(178),Pl(),ru(),Ml(38);break;case 36:xu();break;default:bu(),Bl(217),Jl==199&&(Pl(),ku())}sc.endNonterminal("FTPrimary",$l)}function yu(){switch(Jl){case 35:_l(35),Bl(178),iu(),_l(38);break;case 36:Tu();break;default:wu(),Bl(217),Jl==199&&Lu()}}function bu(){sc.startNonterminal("FTWords",$l),Eu(),Bl(222);if(Jl==72||Jl==77||Jl==214)Pl(),Nu();sc.endNonterminal("FTWords",$l)}function wu(){Su(),Bl(222),(Jl==72||Jl==77||Jl==214)&&Cu()}function Eu(){sc.startNonterminal("FTWordsValue",$l);switch(Jl){case 11:Ml(11);break;default:Ml(281),Bl(268),Pl(),Q(),Ml(287)}sc.endNonterminal("FTWordsValue",$l)}function Su(){switch(Jl){case 11:_l(11);break;default:_l(281),Bl(268),G(),_l(287)}}function xu(){sc.startNonterminal("FTExtensionSelection",$l);for(;;){Pl(),Nr(),Bl(102);if(Jl!=36)break}Ml(281),Bl(185),Jl!=287&&(Pl(),ru()),Ml(287),sc.endNonterminal("FTExtensionSelection",$l)}function Tu(){for(;;){Cr(),Bl(102);if(Jl!=36)break}_l(281),Bl(185),Jl!=287&&iu(),_l(287)}function Nu(){sc.startNonterminal("FTAnyallOption",$l);switch(Jl){case 77:Ml(77),Bl(220),Jl==278&&Ml(278);break;case 72:Ml(72),Bl(221),Jl==279&&Ml(279);break;default:Ml(214)}sc.endNonterminal("FTAnyallOption",$l)}function Cu(){switch(Jl){case 77:_l(77),Bl(220),Jl==278&&_l(278);break;case 72:_l(72),Bl(221),Jl==279&&_l(279);break;default:_l(214)}}function ku(){sc.startNonterminal("FTTimes",$l),Ml(199),Bl(158),Pl(),Au(),Ml(252),sc.endNonterminal("FTTimes",$l)}function Lu(){_l(199),Bl(158),Ou(),_l(252)}function Au(){sc.startNonterminal("FTRange",$l);switch(Jl){case 131:Ml(131),Bl(267),Pl(),Xn();break;case 82:Ml(82),Bl(127);switch(Jl){case 176:Ml(176),Bl(267),Pl(),Xn();break;default:Ml(186),Bl(267),Pl(),Xn()}break;default:Ml(142),Bl(267),Pl(),Xn(),Ml(253),Bl(267),Pl(),Xn()}sc.endNonterminal("FTRange",$l)}function Ou(){switch(Jl){case 131:_l(131),Bl(267),Vn();break;case 82:_l(82),Bl(127);switch(Jl){case 176:_l(176),Bl(267),Vn();break;default:_l(186),Bl(267),Vn()}break;default:_l(142),Bl(267),Vn(),_l(253),Bl(267),Vn()}}function Mu(){sc.startNonterminal("FTPosFilter",$l);switch(Jl){case 206:Du();break;case 275:Hu();break;case 118:ju();break;case 116:case 227:Ru();break;default:Xu()}sc.endNonterminal("FTPosFilter",$l)}function _u(){switch(Jl){case 206:Pu();break;case 275:Bu();break;case 118:Fu();break;case 116:case 227:Uu();break;default:Vu()}}function Du(){sc.startNonterminal("FTOrder",$l),Ml(206),sc.endNonterminal("FTOrder",$l)}function Pu(){_l(206)}function Hu(){sc.startNonterminal("FTWindow",$l),Ml(275),Bl(267),Pl(),Xn(),Pl(),Iu(),sc.endNonterminal("FTWindow",$l)}function Bu(){_l(275),Bl(267),Vn(),qu()}function ju(){sc.startNonterminal("FTDistance",$l),Ml(118),Bl(158),Pl(),Au(),Pl(),Iu(),sc.endNonterminal("FTDistance",$l)}function Fu(){_l(118),Bl(158),Ou(),qu()}function Iu(){sc.startNonterminal("FTUnit",$l);switch(Jl){case 279:Ml(279);break;case 237:Ml(237);break;default:Ml(209)}sc.endNonterminal("FTUnit",$l)}function qu(){switch(Jl){case 279:_l(279);break;case 237:_l(237);break;default:_l(209)}}function Ru(){sc.startNonterminal("FTScope",$l);switch(Jl){case 227:Ml(227);break;default:Ml(116)}Bl(134),Pl(),zu(),sc.endNonterminal("FTScope",$l)}function Uu(){switch(Jl){case 227:_l(227);break;default:_l(116)}Bl(134),Wu()}function zu(){sc.startNonterminal("FTBigUnit",$l);switch(Jl){case 236:Ml(236);break;default:Ml(208)}sc.endNonterminal("FTBigUnit",$l)}function Wu(){switch(Jl){case 236:_l(236);break;default:_l(208)}}function Xu(){sc.startNonterminal("FTContent",$l);switch(Jl){case 82:Ml(82),Bl(119);switch(Jl){case 242:Ml(242);break;default:Ml(127)}break;default:Ml(128),Bl(45),Ml(101)}sc.endNonterminal("FTContent",$l)}function Vu(){switch(Jl){case 82:_l(82),Bl(119);switch(Jl){case 242:_l(242);break;default:_l(127)}break;default:_l(128),Bl(45),_l(101)}}function $u(){sc.startNonterminal("FTMatchOptions",$l);for(;;){Ml(265),Bl(204),Pl(),Ku(),Bl(215);if(Jl!=265)break}sc.endNonterminal("FTMatchOptions",$l)}function Ju(){for(;;){_l(265),Bl(204),Qu(),Bl(215);if(Jl!=265)break}}function Ku(){sc.startNonterminal("FTMatchOption",$l);switch(Jl){case 191:jl(177);break;default:Xl=Jl}switch(Xl){case 172:va();break;case 274:case 140479:ga();break;case 251:case 128703:ra();break;case 243:case 124607:ta();break;case 115:Zu();break;case 244:case 125119:fa();break;case 203:ba();break;default:Gu()}sc.endNonterminal("FTMatchOption",$l)}function Qu(){switch(Jl){case 191:jl(177);break;default:Xl=Jl}switch(Xl){case 172:ma();break;case 274:case 140479:ya();break;case 251:case 128703:ia();break;case 243:case 124607:na();break;case 115:ea();break;case 244:case 125119:la();break;case 203:wa();break;default:Yu()}}function Gu(){sc.startNonterminal("FTCaseOption",$l);switch(Jl){case 89:Ml(89),Bl(126);switch(Jl){case 160:Ml(160);break;default:Ml(235)}break;case 180:Ml(180);break;default:Ml(264)}sc.endNonterminal("FTCaseOption",$l)}function Yu(){switch(Jl){case 89:_l(89),Bl(126);switch(Jl){case 160:_l(160);break;default:_l(235)}break;case 180:_l(180);break;default:_l(264)}}function Zu(){sc.startNonterminal("FTDiacriticsOption",$l),Ml(115),Bl(126);switch(Jl){case 160:Ml(160);break;default:Ml(235)}sc.endNonterminal("FTDiacriticsOption",$l)}function ea(){_l(115),Bl(126);switch(Jl){case 160:_l(160);break;default:_l(235)}}function ta(){sc.startNonterminal("FTStemOption",$l);switch(Jl){case 243:Ml(243);break;default:Ml(191),Bl(76),Ml(243)}sc.endNonterminal("FTStemOption",$l)}function na(){switch(Jl){case 243:_l(243);break;default:_l(191),Bl(76),_l(243)}}function ra(){sc.startNonterminal("FTThesaurusOption",$l);switch(Jl){case 251:Ml(251),Bl(151);switch(Jl){case 82:Pl(),sa();break;case 110:Ml(110);break;default:Ml(35),Bl(114);switch(Jl){case 82:Pl(),sa();break;default:Ml(110)}for(;;){Bl(103);if(Jl!=42)break;Ml(42),Bl(34),Pl(),sa()}Ml(38)}break;default:Ml(191),Bl(80),Ml(251)}sc.endNonterminal("FTThesaurusOption",$l)}function ia(){switch(Jl){case 251:_l(251),Bl(151);switch(Jl){case 82:oa();break;case 110:_l(110);break;default:_l(35),Bl(114);switch(Jl){case 82:oa();break;default:_l(110)}for(;;){Bl(103);if(Jl!=42)break;_l(42),Bl(34),oa()}_l(38)}break;default:_l(191),Bl(80),_l(251)}}function sa(){sc.startNonterminal("FTThesaurusID",$l),Ml(82),Bl(15),Ml(7),Bl(218),Jl==221&&(Ml(221),Bl(17),Ml(11)),Bl(216);switch(Jl){case 82:jl(184);break;case 142:jl(164);break;default:Xl=Jl}if(Xl==131||Xl==4238||Xl==90194||Xl==95314)Pl(),ua(),Bl(61),Ml(178);sc.endNonterminal("FTThesaurusID",$l)}function oa(){_l(82),Bl(15),_l(7),Bl(218),Jl==221&&(_l(221),Bl(17),_l(11)),Bl(216);switch(Jl){case 82:jl(184);break;case 142:jl(164);break;default:Xl=Jl}if(Xl==131||Xl==4238||Xl==90194||Xl==95314)aa(),Bl(61),_l(178)}function ua(){sc.startNonterminal("FTLiteralRange",$l);switch(Jl){case 131:Ml(131),Bl(16),Ml(8);break;case 82:Ml(82),Bl(127);switch(Jl){case 176:Ml(176),Bl(16),Ml(8);break;default:Ml(186),Bl(16),Ml(8)}break;default:Ml(142),Bl(16),Ml(8),Bl(81),Ml(253),Bl(16),Ml(8)}sc.endNonterminal("FTLiteralRange",$l)}function aa(){switch(Jl){case 131:_l(131),Bl(16),_l(8);break;case 82:_l(82),Bl(127);switch(Jl){case 176:_l(176),Bl(16),_l(8);break;default:_l(186),Bl(16),_l(8)}break;default:_l(142),Bl(16),_l(8),Bl(81),_l(253),Bl(16),_l(8)}}function fa(){sc.startNonterminal("FTStopWordOption",$l);switch(Jl){case 244:Ml(244),Bl(88),Ml(279),Bl(151);switch(Jl){case 110:Ml(110);for(;;){Bl(219);if(Jl!=132&&Jl!=260)break;Pl(),pa()}break;default:Pl(),ca();for(;;){Bl(219);if(Jl!=132&&Jl!=260)break;Pl(),pa()}}break;default:Ml(191),Bl(77),Ml(244),Bl(88),Ml(279)}sc.endNonterminal("FTStopWordOption",$l)}function la(){switch(Jl){case 244:_l(244),Bl(88),_l(279),Bl(151);switch(Jl){case 110:_l(110);for(;;){Bl(219);if(Jl!=132&&Jl!=260)break;da()}break;default:ha();for(;;){Bl(219);if(Jl!=132&&Jl!=260)break;da()}}break;default:_l(191),Bl(77),_l(244),Bl(88),_l(279)}}function ca(){sc.startNonterminal("FTStopWords",$l);switch(Jl){case 82:Ml(82),Bl(15),Ml(7);break;default:Ml(35),Bl(17),Ml(11);for(;;){Bl(103);if(Jl!=42)break;Ml(42),Bl(17),Ml(11)}Ml(38)}sc.endNonterminal("FTStopWords",$l)}function ha(){switch(Jl){case 82:_l(82),Bl(15),_l(7);break;default:_l(35),Bl(17),_l(11);for(;;){Bl(103);if(Jl!=42)break;_l(42),Bl(17),_l(11)}_l(38)}}function pa(){sc.startNonterminal("FTStopWordsInclExcl",$l);switch(Jl){case 260:Ml(260);break;default:Ml(132)}Bl(101),Pl(),ca(),sc.endNonterminal("FTStopWordsInclExcl",$l)}function da(){switch(Jl){case 260:_l(260);break;default:_l(132)}Bl(101),ha()}function va(){sc.startNonterminal("FTLanguageOption",$l),Ml(172),Bl(17),Ml(11),sc.endNonterminal("FTLanguageOption",$l)}function ma(){_l(172),Bl(17),_l(11)}function ga(){sc.startNonterminal("FTWildCardOption",$l);switch(Jl){case 274:Ml(274);break;default:Ml(191),Bl(86),Ml(274)}sc.endNonterminal("FTWildCardOption",$l)}function ya(){switch(Jl){case 274:_l(274);break;default:_l(191),Bl(86),_l(274)}}function ba(){sc.startNonterminal("FTExtensionOption",$l),Ml(203),Bl(247),Pl(),Wa(),Bl(17),Ml(11),sc.endNonterminal("FTExtensionOption",$l)}function wa(){_l(203),Bl(247),Xa(),Bl(17),_l(11)}function Ea(){sc.startNonterminal("FTIgnoreOption",$l),Ml(277),Bl(45),Ml(101),Bl(267),Pl(),Kn(),sc.endNonterminal("FTIgnoreOption",$l)}function Sa(){_l(277),Bl(45),_l(101),Bl(267),Qn()}function xa(){sc.startNonterminal("CollectionDecl",$l),Ml(96),Bl(247),Pl(),Wa(),Bl(109),Jl==80&&(Pl(),Ta()),sc.endNonterminal("CollectionDecl",$l)}function Ta(){sc.startNonterminal("CollectionTypeDecl",$l),Ml(80),Bl(198),Pl(),zs(),Bl(172),Jl!=54&&(Pl(),ks()),sc.endNonterminal("CollectionTypeDecl",$l)}function Na(){sc.startNonterminal("IndexName",$l),Wa(),sc.endNonterminal("IndexName",$l)}function Ca(){sc.startNonterminal("IndexDomainExpr",$l),kr(),sc.endNonterminal("IndexDomainExpr",$l)}function ka(){sc.startNonterminal("IndexKeySpec",$l),La(),Jl==80&&(Pl(),Aa()),Bl(155),Jl==95&&(Pl(),Ma()),sc.endNonterminal("IndexKeySpec",$l)}function La(){sc.startNonterminal("IndexKeyExpr",$l),kr(),sc.endNonterminal("IndexKeyExpr",$l)}function Aa(){sc.startNonterminal("IndexKeyTypeDecl",$l),Ml(80),Bl(247),Pl(),Oa(),Bl(190);if(Jl==40||Jl==41||Jl==65)Pl(),ks();sc.endNonterminal("IndexKeyTypeDecl",$l)}function Oa(){sc.startNonterminal("AtomicType",$l),Wa(),sc.endNonterminal("AtomicType",$l)}function Ma(){sc.startNonterminal("IndexKeyCollation",$l),Ml(95),Bl(15),Ml(7),sc.endNonterminal("IndexKeyCollation",$l)}function _a(){sc.startNonterminal("IndexDecl",$l),Ml(157),Bl(247),Pl(),Na(),Bl(68),Ml(201),Bl(66),Ml(195),Bl(264),Pl(),Ca(),Ml(88),Bl(264),Pl(),ka();for(;;){Bl(105);if(Jl!=42)break;Ml(42),Bl(264),Pl(),ka()}sc.endNonterminal("IndexDecl",$l)}function Da(){sc.startNonterminal("ICDecl",$l),Ml(163),Bl(43),Ml(98),Bl(247),Pl(),Wa(),Bl(122);switch(Jl){case 201:Pl(),Pa();break;default:Pl(),Fa()}sc.endNonterminal("ICDecl",$l)}function Pa(){sc.startNonterminal("ICCollection",$l),Ml(201),Bl(42),Ml(96),Bl(247),Pl(),Wa(),Bl(148);switch(Jl){case 31:Pl(),Ha();break;case 194:Pl(),Ba();break;default:Pl(),ja()}sc.endNonterminal("ICCollection",$l)}function Ha(){sc.startNonterminal("ICCollSequence",$l),bi(),Bl(40),Ml(93),Bl(268),Pl(),Rf(),sc.endNonterminal("ICCollSequence",$l)}function Ba(){sc.startNonterminal("ICCollSequenceUnique",$l),Ml(194),Bl(21),Pl(),bi(),Bl(40),Ml(93),Bl(82),Ml(261),Bl(60),Ml(171),Bl(264),Pl(),kr(),sc.endNonterminal("ICCollSequenceUnique",$l)}function ja(){sc.startNonterminal("ICCollNode",$l),Ml(140),Bl(65),Ml(194),Bl(21),Pl(),bi(),Bl(40),Ml(93),Bl(268),Pl(),Rf(),sc.endNonterminal("ICCollNode",$l)}function Fa(){sc.startNonterminal("ICForeignKey",$l),Ml(141),Bl(60),Ml(171),Bl(54),Pl(),Ia(),Pl(),qa(),sc.endNonterminal("ICForeignKey",$l)}function Ia(){sc.startNonterminal("ICForeignKeySource",$l),Ml(142),Bl(42),Pl(),Ra(),sc.endNonterminal("ICForeignKeySource",$l)}function qa(){sc.startNonterminal("ICForeignKeyTarget",$l),Ml(253),Bl(42),Pl(),Ra(),sc.endNonterminal("ICForeignKeyTarget",$l)}function Ra(){sc.startNonterminal("ICForeignKeyValues",$l),Ml(96),Bl(247),Pl(),Wa(),Bl(65),Ml(194),Bl(21),Pl(),bi(),Bl(60),Ml(171),Bl(264),Pl(),kr(),sc.endNonterminal("ICForeignKeyValues",$l)}function Ua(){_l(37);for(;;){Fl(91);if(Jl==51)break;switch(Jl){case 24:_l(24);break;default:Ua()}}_l(51)}function za(){switch(Jl){case 22:_l(22);break;default:Ua()}}function Wa(){sc.startNonterminal("EQName",$l),Fl(242);switch(Jl){case 83:Ml(83);break;case 97:Ml(97);break;case 121:Ml(121);break;case 122:Ml(122);break;case 125:Ml(125);break;case 147:Ml(147);break;case 154:Ml(154);break;case 167:Ml(167);break;case 188:Ml(188);break;case 194:Ml(194);break;case 220:Ml(220);break;case 230:Ml(230);break;case 231:Ml(231);break;case 248:Ml(248);break;case 249:Ml(249);break;case 259:Ml(259);break;case 79:Ml(79);break;case 169:Ml(169);break;case 247:Ml(247);break;default:Va()}sc.endNonterminal("EQName",$l)}function Xa(){Fl(242);switch(Jl){case 83:_l(83);break;case 97:_l(97);break;case 121:_l(121);break;case 122:_l(122);break;case 125:_l(125);break;case 147:_l(147);break;case 154:_l(154);break;case 167:_l(167);break;case 188:_l(188);break;case 194:_l(194);break;case 220:_l(220);break;case 230:_l(230);break;case 231:_l(231);break;case 248:_l(248);break;case 249:_l(249);break;case 259:_l(259);break;case 79:_l(79);break;case 169:_l(169);break;case 247:_l(247);break;default:$a()}}function Va(){sc.startNonterminal("FunctionName",$l);switch(Jl){case 6:Ml(6);break;case 71:Ml(71);break;case 74:Ml(74);break;case 75:Ml(75);break;case 76:Ml(76);break;case 80:Ml(80);break;case 81:Ml(81);break;case 85:Ml(85);break;case 89:Ml(89);break;case 90:Ml(90);break;case 91:Ml(91);break;case 94:Ml(94);break;case 95:Ml(95);break;case 104:Ml(104);break;case 106:Ml(106);break;case 109:Ml(109);break;case 110:Ml(110);break;case 111:Ml(111);break;case 112:Ml(112);break;case 113:Ml(113);break;case 114:Ml(114);break;case 119:Ml(119);break;case 120:Ml(120);break;case 123:Ml(123);break;case 124:Ml(124);break;case 127:Ml(127);break;case 129:Ml(129);break;case 130:Ml(130);break;case 132:Ml(132);break;case 136:Ml(136);break;case 137:Ml(137);break;case 138:Ml(138);break;case 139:Ml(139);break;case 148:Ml(148);break;case 150:Ml(150);break;case 152:Ml(152);break;case 153:Ml(153);break;case 155:Ml(155);break;case 161:Ml(161);break;case 162:Ml(162);break;case 164:Ml(164);break;case 165:Ml(165);break;case 166:Ml(166);break;case 173:Ml(173);break;case 175:Ml(175);break;case 177:Ml(177);break;case 181:Ml(181);break;case 183:Ml(183);break;case 184:Ml(184);break;case 185:Ml(185);break;case 187:Ml(187);break;case 189:Ml(189);break;case 202:Ml(202);break;case 204:Ml(204);break;case 205:Ml(205);break;case 206:Ml(206);break;case 210:Ml(210);break;case 216:Ml(216);break;case 217:Ml(217);break;case 222:Ml(222);break;case 223:Ml(223);break;case 224:Ml(224);break;case 228:Ml(228);break;case 234:Ml(234);break;case 240:Ml(240);break;case 241:Ml(241);break;case 242:Ml(242);break;case 253:Ml(253);break;case 254:Ml(254);break;case 256:Ml(256);break;case 260:Ml(260);break;case 262:Ml(262);break;case 266:Ml(266);break;case 272:Ml(272);break;case 276:Ml(276);break;case 170:Ml(170);break;case 73:Ml(73);break;case 82:Ml(82);break;case 84:Ml(84);break;case 86:Ml(86);break;case 87:Ml(87);break;case 92:Ml(92);break;case 99:Ml(99);break;case 102:Ml(102);break;case 103:Ml(103);break;case 105:Ml(105);break;case 107:Ml(107);break;case 126:Ml(126);break;case 133:Ml(133);break;case 134:Ml(134);break;case 143:Ml(143);break;case 156:Ml(156);break;case 157:Ml(157);break;case 163:Ml(163);break;case 174:Ml(174);break;case 195:Ml(195);break;case 203:Ml(203);break;case 207:Ml(207);break;case 226:Ml(226);break;case 229:Ml(229);break;case 232:Ml(232);break;case 239:Ml(239);break;case 245:Ml(245);break;case 257:Ml(257);break;case 258:Ml(258);break;case 263:Ml(263);break;case 267:Ml(267);break;case 268:Ml(268);break;case 269:Ml(269);break;case 273:Ml(273);break;case 98:Ml(98);break;case 179:Ml(179);break;case 225:Ml(225);break;case 78:Ml(78);break;case 135:Ml(135);break;case 142:Ml(142);break;case 197:Ml(197);break;case 168:Ml(168);break;case 198:Ml(198);break;case 233:Ml(233);break;default:Ml(255)}sc.endNonterminal("FunctionName",$l)}function $a(){switch(Jl){case 6:_l(6);break;case 71:_l(71);break;case 74:_l(74);break;case 75:_l(75);break;case 76:_l(76);break;case 80:_l(80);break;case 81:_l(81);break;case 85:_l(85);break;case 89:_l(89);break;case 90:_l(90);break;case 91:_l(91);break;case 94:_l(94);break;case 95:_l(95);break;case 104:_l(104);break;case 106:_l(106);break;case 109:_l(109);break;case 110:_l(110);break;case 111:_l(111);break;case 112:_l(112);break;case 113:_l(113);break;case 114:_l(114);break;case 119:_l(119);break;case 120:_l(120);break;case 123:_l(123);break;case 124:_l(124);break;case 127:_l(127);break;case 129:_l(129);break;case 130:_l(130);break;case 132:_l(132);break;case 136:_l(136);break;case 137:_l(137);break;case 138:_l(138);break;case 139:_l(139);break;case 148:_l(148);break;case 150:_l(150);break;case 152:_l(152);break;case 153:_l(153);break;case 155:_l(155);break;case 161:_l(161);break;case 162:_l(162);break;case 164:_l(164);break;case 165:_l(165);break;case 166:_l(166);break;case 173:_l(173);break;case 175:_l(175);break;case 177:_l(177);break;case 181:_l(181);break;case 183:_l(183);break;case 184:_l(184);break;case 185:_l(185);break;case 187:_l(187);break;case 189:_l(189);break;case 202:_l(202);break;case 204:_l(204);break;case 205:_l(205);break;case 206:_l(206);break;case 210:_l(210);break;case 216:_l(216);break;case 217:_l(217);break;case 222:_l(222);break;case 223:_l(223);break;case 224:_l(224);break;case 228:_l(228);break;case 234:_l(234);break;case 240:_l(240);break;case 241:_l(241);break;case 242:_l(242);break;case 253:_l(253);break;case 254:_l(254);break;case 256:_l(256);break;case 260:_l(260);break;case 262:_l(262);break;case 266:_l(266);break;case 272:_l(272);break;case 276:_l(276);break;case 170:_l(170);break;case 73:_l(73);break;case 82:_l(82);break;case 84:_l(84);break;case 86:_l(86);break;case 87:_l(87);break;case 92:_l(92);break;case 99:_l(99);break;case 102:_l(102);break;case 103:_l(103);break;case 105:_l(105);break;case 107:_l(107);break;case 126:_l(126);break;case 133:_l(133);break;case 134:_l(134);break;case 143:_l(143);break;case 156:_l(156);break;case 157:_l(157);break;case 163:_l(163);break;case 174:_l(174);break;case 195:_l(195);break;case 203:_l(203);break;case 207:_l(207);break;case 226:_l(226);break;case 229:_l(229);break;case 232:_l(232);break;case 239:_l(239);break;case 245:_l(245);break;case 257:_l(257);break;case 258:_l(258);break;case 263:_l(263);break;case 267:_l(267);break;case 268:_l(268);break;case 269:_l(269);break;case 273:_l(273);break;case 98:_l(98);break;case 179:_l(179);break;case 225:_l(225);break;case 78:_l(78);break;case 135:_l(135);break;case 142:_l(142);break;case 197:_l(197);break;case 168:_l(168);break;case 198:_l(198);break;case 233:_l(233);break;default:_l(255)}}function Ja(){sc.startNonterminal("NCName",$l);switch(Jl){case 19:Ml(19);break;case 71:Ml(71);break;case 76:Ml(76);break;case 80:Ml(80);break;case 81:Ml(81);break;case 85:Ml(85);break;case 89:Ml(89);break;case 90:Ml(90);break;case 91:Ml(91);break;case 95:Ml(95);break;case 106:Ml(106);break;case 110:Ml(110);break;case 114:Ml(114);break;case 119:Ml(119);break;case 123:Ml(123);break;case 124:Ml(124);break;case 127:Ml(127);break;case 129:Ml(129);break;case 132:Ml(132);break;case 139:Ml(139);break;case 148:Ml(148);break;case 150:Ml(150);break;case 152:Ml(152);break;case 153:Ml(153);break;case 162:Ml(162);break;case 164:Ml(164);break;case 165:Ml(165);break;case 166:Ml(166);break;case 175:Ml(175);break;case 177:Ml(177);break;case 181:Ml(181);break;case 183:Ml(183);break;case 184:Ml(184);break;case 189:Ml(189);break;case 202:Ml(202);break;case 204:Ml(204);break;case 205:Ml(205);break;case 224:Ml(224);break;case 228:Ml(228);break;case 241:Ml(241);break;case 242:Ml(242);break;case 253:Ml(253);break;case 254:Ml(254);break;case 260:Ml(260);break;case 272:Ml(272);break;case 276:Ml(276);break;case 74:Ml(74);break;case 75:Ml(75);break;case 83:Ml(83);break;case 94:Ml(94);break;case 97:Ml(97);break;case 104:Ml(104);break;case 109:Ml(109);break;case 111:Ml(111);break;case 112:Ml(112);break;case 113:Ml(113);break;case 120:Ml(120);break;case 121:Ml(121);break;case 122:Ml(122);break;case 125:Ml(125);break;case 130:Ml(130);break;case 136:Ml(136);break;case 137:Ml(137);break;case 138:Ml(138);break;case 147:Ml(147);break;case 154:Ml(154);break;case 155:Ml(155);break;case 161:Ml(161);break;case 167:Ml(167);break;case 173:Ml(173);break;case 185:Ml(185);break;case 187:Ml(187);break;case 188:Ml(188);break;case 194:Ml(194);break;case 206:Ml(206);break;case 210:Ml(210);break;case 216:Ml(216);break;case 217:Ml(217);break;case 220:Ml(220);break;case 222:Ml(222);break;case 223:Ml(223);break;case 230:Ml(230);break;case 231:Ml(231);break;case 234:Ml(234);break;case 240:Ml(240);break;case 248:Ml(248);break;case 249:Ml(249);break;case 256:Ml(256);break;case 259:Ml(259);break;case 262:Ml(262);break;case 266:Ml(266);break;case 268:Ml(268);break;case 170:Ml(170);break;case 73:Ml(73);break;case 82:Ml(82);break;case 84:Ml(84);break;case 86:Ml(86);break;case 87:Ml(87);break;case 92:Ml(92);break;case 99:Ml(99);break;case 102:Ml(102);break;case 103:Ml(103);break;case 105:Ml(105);break;case 107:Ml(107);break;case 126:Ml(126);break;case 133:Ml(133);break;case 134:Ml(134);break;case 143:Ml(143);break;case 156:Ml(156);break;case 157:Ml(157);break;case 163:Ml(163);break;case 174:Ml(174);break;case 195:Ml(195);break;case 203:Ml(203);break;case 207:Ml(207);break;case 226:Ml(226);break;case 229:Ml(229);break;case 232:Ml(232);break;case 239:Ml(239);break;case 245:Ml(245);break;case 257:Ml(257);break;case 258:Ml(258);break;case 263:Ml(263);break;case 267:Ml(267);break;case 269:Ml(269);break;case 273:Ml(273);break;case 98:Ml(98);break;case 179:Ml(179);break;case 225:Ml(225);break;case 78:Ml(78);break;case 135:Ml(135);break;case 142:Ml(142);break;case 197:Ml(197);break;case 168:Ml(168);break;case 198:Ml(198);break;case 233:Ml(233);break;default:Ml(255)}sc.endNonterminal("NCName",$l)}function Ka(){switch(Jl){case 19:_l(19);break;case 71:_l(71);break;case 76:_l(76);break;case 80:_l(80);break;case 81:_l(81);break;case 85:_l(85);break;case 89:_l(89);break;case 90:_l(90);break;case 91:_l(91);break;case 95:_l(95);break;case 106:_l(106);break;case 110:_l(110);break;case 114:_l(114);break;case 119:_l(119);break;case 123:_l(123);break;case 124:_l(124);break;case 127:_l(127);break;case 129:_l(129);break;case 132:_l(132);break;case 139:_l(139);break;case 148:_l(148);break;case 150:_l(150);break;case 152:_l(152);break;case 153:_l(153);break;case 162:_l(162);break;case 164:_l(164);break;case 165:_l(165);break;case 166:_l(166);break;case 175:_l(175);break;case 177:_l(177);break;case 181:_l(181);break;case 183:_l(183);break;case 184:_l(184);break;case 189:_l(189);break;case 202:_l(202);break;case 204:_l(204);break;case 205:_l(205);break;case 224:_l(224);break;case 228:_l(228);break;case 241:_l(241);break;case 242:_l(242);break;case 253:_l(253);break;case 254:_l(254);break;case 260:_l(260);break;case 272:_l(272);break;case 276:_l(276);break;case 74:_l(74);break;case 75:_l(75);break;case 83:_l(83);break;case 94:_l(94);break;case 97:_l(97);break;case 104:_l(104);break;case 109:_l(109);break;case 111:_l(111);break;case 112:_l(112);break;case 113:_l(113);break;case 120:_l(120);break;case 121:_l(121);break;case 122:_l(122);break;case 125:_l(125);break;case 130:_l(130);break;case 136:_l(136);break;case 137:_l(137);break;case 138:_l(138);break;case 147:_l(147);break;case 154:_l(154);break;case 155:_l(155);break;case 161:_l(161);break;case 167:_l(167);break;case 173:_l(173);break;case 185:_l(185);break;case 187:_l(187);break;case 188:_l(188);break;case 194:_l(194);break;case 206:_l(206);break;case 210:_l(210);break;case 216:_l(216);break;case 217:_l(217);break;case 220:_l(220);break;case 222:_l(222);break;case 223:_l(223);break;case 230:_l(230);break;case 231:_l(231);break;case 234:_l(234);break;case 240:_l(240);break;case 248:_l(248);break;case 249:_l(249);break;case 256:_l(256);break;case 259:_l(259);break;case 262:_l(262);break;case 266:_l(266);break;case 268:_l(268);break;case 170:_l(170);break;case 73:_l(73);break;case 82:_l(82);break;case 84:_l(84);break;case 86:_l(86);break;case 87:_l(87);break;case 92:_l(92);break;case 99:_l(99);break;case 102:_l(102);break;case 103:_l(103);break;case 105:_l(105);break;case 107:_l(107);break;case 126:_l(126);break;case 133:_l(133);break;case 134:_l(134);break;case 143:_l(143);break;case 156:_l(156);break;case 157:_l(157);break;case 163:_l(163);break;case 174:_l(174);break;case 195:_l(195);break;case 203:_l(203);break;case 207:_l(207);break;case 226:_l(226);break;case 229:_l(229);break;case 232:_l(232);break;case 239:_l(239);break;case 245:_l(245);break;case 257:_l(257);break;case 258:_l(258);break;case 263:_l(263);break;case 267:_l(267);break;case 269:_l(269);break;case 273:_l(273);break;case 98:_l(98);break;case 179:_l(179);break;case 225:_l(225);break;case 78:_l(78);break;case 135:_l(135);break;case 142:_l(142);break;case 197:_l(197);break;case 168:_l(168);break;case 198:_l(198);break;case 233:_l(233);break;default:_l(255)}}function Qa(){sc.startNonterminal("MainModule",$l),f(),Pl(),Ga(),sc.endNonterminal("MainModule",$l)}function Ga(){sc.startNonterminal("Program",$l),nf(),sc.endNonterminal("Program",$l)}function Ya(){sc.startNonterminal("Statements",$l);for(;;){Bl(285);switch(Jl){case 35:jl(271);break;case 36:Il(244);break;case 47:jl(287);break;case 48:jl(261);break;case 55:Il(4);break;case 56:Il(1);break;case 60:Il(3);break;case 69:jl(274);break;case 78:jl(270);break;case 133:jl(145);break;case 161:jl(277);break;case 177:jl(167);break;case 187:jl(248);break;case 196:jl(268);break;case 220:jl(246);break;case 223:jl(171);break;case 266:jl(189);break;case 281:jl(284);break;case 283:jl(275);break;case 31:case 33:jl(247);break;case 41:case 43:jl(267);break;case 83:case 122:jl(254);break;case 87:case 103:jl(143);break;case 97:case 249:jl(96);break;case 111:case 222:jl(262);break;case 139:case 142:jl(180);break;case 135:case 197:case 255:jl(212);break;case 104:case 130:case 240:case 268:jl(141);break;case 120:case 206:case 256:case 262:jl(146);break;case 8:case 9:case 10:case 11:case 32:jl(211);break;case 79:case 121:case 125:case 167:case 169:case 188:case 194:case 230:case 231:case 247:jl(20);break;case 6:case 71:case 73:case 74:case 75:case 76:case 80:case 81:case 82:case 84:case 85:case 86:case 89:case 90:case 91:case 92:case 94:case 95:case 98:case 99:case 102:case 105:case 106:case 107:case 109:case 110:case 112:case 113:case 114:case 119:case 123:case 124:case 126:case 127:case 129:case 132:case 134:case 136:case 137:case 138:case 143:case 147:case 148:case 150:case 152:case 153:case 154:case 155:case 156:case 157:case 162:case 163:case 164:case 165:case 166:case 168:case 170:case 173:case 174:case 175:case 179:case 181:case 183:case 184:case 185:case 189:case 195:case 198:case 202:case 203:case 204:case 205:case 207:case 210:case 216:case 217:case 224:case 225:case 226:case 228:case 229:case 232:case 233:case 234:case 239:case 241:case 242:case 245:case 248:case 253:case 254:case 257:case 258:case 259:case 260:case 263:case 267:case 269:case 272:case 273:case 276:jl(94);break;default:Xl=Jl}if(Xl!=25&&Xl!=54&&Xl!=287&&Xl!=12808&&Xl!=12809&&Xl!=12810&&Xl!=12811&&Xl!=12832&&Xl!=12847&&Xl!=12935&&Xl!=12997&&Xl!=13055&&Xl!=16140&&Xl!=21512&&Xl!=21513&&Xl!=21514&&Xl!=21515&&Xl!=21536&&Xl!=21551&&Xl!=21639&&Xl!=21701&&Xl!=21759&&Xl!=27656&&Xl!=27657&&Xl!=27658&&Xl!=27659&&Xl!=27680&&Xl!=27695&&Xl!=27783&&Xl!=27845&&Xl!=27903&&Xl!=91735&&Xl!=91751&&Xl!=115333&&Xl!=146952&&Xl!=146953&&Xl!=146954&&Xl!=146955&&Xl!=146976&&Xl!=146991&&Xl!=147079&&Xl!=147141&&Xl!=147199){Xl=Ul(8,$l);if(Xl==0){var e=Vl,t=$l,n=Jl,r=Kl,i=Ql,s=Gl,o=Yl,u=Zl;try{of(),Xl=-1}catch(a){Xl=-2}Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Rl(8,$l,Xl)}}if(Xl!=-1&&Xl!=54&&Xl!=16140&&Xl!=27656&&Xl!=27657&&Xl!=27658&&Xl!=27659&&Xl!=27680&&Xl!=27695&&Xl!=27783&&Xl!=27845&&Xl!=27903&&Xl!=91735&&Xl!=91751&&Xl!=115333)break;Pl(),sf()}sc.endNonterminal("Statements",$l)}function Za(){for(;;){Bl(285);switch(Jl){case 35:jl(271);break;case 36:Il(244);break;case 47:jl(287);break;case 48:jl(261);break;case 55:Il(4);break;case 56:Il(1);break;case 60:Il(3);break;case 69:jl(274);break;case 78:jl(270);break;case 133:jl(145);break;case 161:jl(277);break;case 177:jl(167);break;case 187:jl(248);break;case 196:jl(268);break;case 220:jl(246);break;case 223:jl(171);break;case 266:jl(189);break;case 281:jl(284);break;case 283:jl(275);break;case 31:case 33:jl(247);break;case 41:case 43:jl(267);break;case 83:case 122:jl(254);break;case 87:case 103:jl(143);break;case 97:case 249:jl(96);break;case 111:case 222:jl(262);break;case 139:case 142:jl(180);break;case 135:case 197:case 255:jl(212);break;case 104:case 130:case 240:case 268:jl(141);break;case 120:case 206:case 256:case 262:jl(146);break;case 8:case 9:case 10:case 11:case 32:jl(211);break;case 79:case 121:case 125:case 167:case 169:case 188:case 194:case 230:case 231:case 247:jl(20);break;case 6:case 71:case 73:case 74:case 75:case 76:case 80:case 81:case 82:case 84:case 85:case 86:case 89:case 90:case 91:case 92:case 94:case 95:case 98:case 99:case 102:case 105:case 106:case 107:case 109:case 110:case 112:case 113:case 114:case 119:case 123:case 124:case 126:case 127:case 129:case 132:case 134:case 136:case 137:case 138:case 143:case 147:case 148:case 150:case 152:case 153:case 154:case 155:case 156:case 157:case 162:case 163:case 164:case 165:case 166:case 168:case 170:case 173:case 174:case 175:case 179:case 181:case 183:case 184:case 185:case 189:case 195:case 198:case 202:case 203:case 204:case 205:case 207:case 210:case 216:case 217:case 224:case 225:case 226:case 228:case 229:case 232:case 233:case 234:case 239:case 241:case 242:case 245:case 248:case 253:case 254:case 257:case 258:case 259:case 260:case 263:case 267:case 269:case 272:case 273:case 276:jl(94);break;default:Xl=Jl}if(Xl!=25&&Xl!=54&&Xl!=287&&Xl!=12808&&Xl!=12809&&Xl!=12810&&Xl!=12811&&Xl!=12832&&Xl!=12847&&Xl!=12935&&Xl!=12997&&Xl!=13055&&Xl!=16140&&Xl!=21512&&Xl!=21513&&Xl!=21514&&Xl!=21515&&Xl!=21536&&Xl!=21551&&Xl!=21639&&Xl!=21701&&Xl!=21759&&Xl!=27656&&Xl!=27657&&Xl!=27658&&Xl!=27659&&Xl!=27680&&Xl!=27695&&Xl!=27783&&Xl!=27845&&Xl!=27903&&Xl!=91735&&Xl!=91751&&Xl!=115333&&Xl!=146952&&Xl!=146953&&Xl!=146954&&Xl!=146955&&Xl!=146976&&Xl!=146991&&Xl!=147079&&Xl!=147141&&Xl!=147199){Xl=Ul(8,$l);if(Xl==0){var e=Vl,t=$l,n=Jl,r=Kl,i=Ql,s=Gl,o=Yl,u=Zl;try{of(),Rl(8,t,-1);continue}catch(a){Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Rl(8,t,-2);break}}}if(Xl!=-1&&Xl!=54&&Xl!=16140&&Xl!=27656&&Xl!=27657&&Xl!=27658&&Xl!=27659&&Xl!=27680&&Xl!=27695&&Xl!=27783&&Xl!=27845&&Xl!=27903&&Xl!=91735&&Xl!=91751&&Xl!=115333)break;of()}}function ef(){sc.startNonterminal("StatementsAndExpr",$l),Ya(),Pl(),Q(),sc.endNonterminal("StatementsAndExpr",$l)}function tf(){Za(),G()}function nf(){sc.startNonterminal("StatementsAndOptionalExpr",$l),Ya(),Jl!=25&&Jl!=287&&(Pl(),Q()),sc.endNonterminal("StatementsAndOptionalExpr",$l)}function rf(){Za(),Jl!=25&&Jl!=287&&G()}function sf(){sc.startNonterminal("Statement",$l);switch(Jl){case 133:jl(145);break;case 177:jl(167);break;case 256:jl(146);break;case 268:jl(141);break;case 281:jl(284);break;case 31:case 33:jl(247);break;case 87:case 103:jl(143);break;case 139:case 142:jl(180);break;case 154:case 248:case 259:case 273:jl(94);break;default:Xl=Jl}if(Xl!=6&&Xl!=8&&Xl!=9&&Xl!=10&&Xl!=11&&Xl!=32&&Xl!=35&&Xl!=36&&Xl!=41&&Xl!=43&&Xl!=47&&Xl!=48&&Xl!=54&&Xl!=55&&Xl!=56&&Xl!=60&&Xl!=69&&Xl!=71&&Xl!=73&&Xl!=74&&Xl!=75&&Xl!=76&&Xl!=78&&Xl!=79&&Xl!=80&&Xl!=81&&Xl!=82&&Xl!=83&&Xl!=84&&Xl!=85&&Xl!=86&&Xl!=89&&Xl!=90&&Xl!=91&&Xl!=92&&Xl!=94&&Xl!=95&&Xl!=97&&Xl!=98&&Xl!=99&&Xl!=102&&Xl!=104&&Xl!=105&&Xl!=106&&Xl!=107&&Xl!=109&&Xl!=110&&Xl!=111&&Xl!=112&&Xl!=113&&Xl!=114&&Xl!=119&&Xl!=120&&Xl!=121&&Xl!=122&&Xl!=123&&Xl!=124&&Xl!=125&&Xl!=126&&Xl!=127&&Xl!=129&&Xl!=130&&Xl!=132&&Xl!=134&&Xl!=135&&Xl!=136&&Xl!=137&&Xl!=138&&Xl!=143&&Xl!=147&&Xl!=148&&Xl!=150&&Xl!=152&&Xl!=153&&Xl!=155&&Xl!=156&&Xl!=157&&Xl!=161&&Xl!=162&&Xl!=163&&Xl!=164&&Xl!=165&&Xl!=166&&Xl!=167&&Xl!=168&&Xl!=169&&Xl!=170&&Xl!=173&&Xl!=174&&Xl!=175&&Xl!=179&&Xl!=181&&Xl!=183&&Xl!=184&&Xl!=185&&Xl!=187&&Xl!=188&&Xl!=189&&Xl!=194&&Xl!=195&&Xl!=196&&Xl!=197&&Xl!=198&&Xl!=202&&Xl!=203&&Xl!=204&&Xl!=205&&Xl!=206&&Xl!=207&&Xl!=210&&Xl!=216&&Xl!=217&&Xl!=220&&Xl!=222&&Xl!=223&&Xl!=224&&Xl!=225&&Xl!=226&&Xl!=228&&Xl!=229&&Xl!=230&&Xl!=231&&Xl!=232&&Xl!=233&&Xl!=234&&Xl!=239&&Xl!=240&&Xl!=241&&Xl!=242&&Xl!=245&&Xl!=247&&Xl!=249&&Xl!=253&&Xl!=254&&Xl!=255&&Xl!=257&&Xl!=258&&Xl!=260&&Xl!=262&&Xl!=263&&Xl!=266&&Xl!=267&&Xl!=269&&Xl!=272&&Xl!=276&&Xl!=283&&Xl!=10009&&Xl!=14935&&Xl!=14951&&Xl!=14981&&Xl!=14987&&Xl!=14990&&Xl!=15002&&Xl!=15025&&Xl!=15096&&Xl!=15104&&Xl!=15107&&Xl!=15116&&Xl!=15121&&Xl!=16011&&Xl!=16014&&Xl!=16049&&Xl!=16140&&Xl!=18007&&Xl!=18023&&Xl!=18053&&Xl!=18059&&Xl!=18062&&Xl!=18074&&Xl!=18097&&Xl!=18168&&Xl!=18176&&Xl!=18179&&Xl!=18188&&Xl!=91735&&Xl!=91751&&Xl!=115333&&Xl!=118961&&Xl!=122507&&Xl!=122510&&Xl!=131723&&Xl!=131726&&Xl!=144128&&Xl!=147225){Xl=Ul(9,$l);if(Xl==0){var e=Vl,t=$l,n=Jl,r=Kl,i=Ql,s=Gl,o=Yl,u=Zl;try{af(),Xl=-1}catch(a){try{Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),lf(),Xl=-2}catch(f){try{Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),hf(),Xl=-3}catch(l){try{Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Bf(),Xl=-12}catch(c){Xl=-13}}}}Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Rl(9,$l,Xl)}}switch(Xl){case-2:ff();break;case-3:cf();break;case 91735:pf();break;case 91751:vf();break;case 115333:gf();break;case 16011:case 16014:case 16049:case 118961:case 122507:case 122510:case 131723:case 131726:bf();break;case 18074:xf();break;case 18168:Nf();break;case 144128:Af();break;case 18179:Mf();break;case-12:case 16140:Hf();break;case-13:jf();break;case 54:If();break;default:uf()}sc.endNonterminal("Statement",$l)}function of(){switch(Jl){case 133:jl(145);break;case 177:jl(167);break;case 256:jl(146);break;case 268:jl(141);break;case 281:jl(284);break;case 31:case 33:jl(247);break;case 87:case 103:jl(143);break;case 139:case 142:jl(180);break;case 154:case 248:case 259:case 273:jl(94);break;default:Xl=Jl}if(Xl!=6&&Xl!=8&&Xl!=9&&Xl!=10&&Xl!=11&&Xl!=32&&Xl!=35&&Xl!=36&&Xl!=41&&Xl!=43&&Xl!=47&&Xl!=48&&Xl!=54&&Xl!=55&&Xl!=56&&Xl!=60&&Xl!=69&&Xl!=71&&Xl!=73&&Xl!=74&&Xl!=75&&Xl!=76&&Xl!=78&&Xl!=79&&Xl!=80&&Xl!=81&&Xl!=82&&Xl!=83&&Xl!=84&&Xl!=85&&Xl!=86&&Xl!=89&&Xl!=90&&Xl!=91&&Xl!=92&&Xl!=94&&Xl!=95&&Xl!=97&&Xl!=98&&Xl!=99&&Xl!=102&&Xl!=104&&Xl!=105&&Xl!=106&&Xl!=107&&Xl!=109&&Xl!=110&&Xl!=111&&Xl!=112&&Xl!=113&&Xl!=114&&Xl!=119&&Xl!=120&&Xl!=121&&Xl!=122&&Xl!=123&&Xl!=124&&Xl!=125&&Xl!=126&&Xl!=127&&Xl!=129&&Xl!=130&&Xl!=132&&Xl!=134&&Xl!=135&&Xl!=136&&Xl!=137&&Xl!=138&&Xl!=143&&Xl!=147&&Xl!=148&&Xl!=150&&Xl!=152&&Xl!=153&&Xl!=155&&Xl!=156&&Xl!=157&&Xl!=161&&Xl!=162&&Xl!=163&&Xl!=164&&Xl!=165&&Xl!=166&&Xl!=167&&Xl!=168&&Xl!=169&&Xl!=170&&Xl!=173&&Xl!=174&&Xl!=175&&Xl!=179&&Xl!=181&&Xl!=183&&Xl!=184&&Xl!=185&&Xl!=187&&Xl!=188&&Xl!=189&&Xl!=194&&Xl!=195&&Xl!=196&&Xl!=197&&Xl!=198&&Xl!=202&&Xl!=203&&Xl!=204&&Xl!=205&&Xl!=206&&Xl!=207&&Xl!=210&&Xl!=216&&Xl!=217&&Xl!=220&&Xl!=222&&Xl!=223&&Xl!=224&&Xl!=225&&Xl!=226&&Xl!=228&&Xl!=229&&Xl!=230&&Xl!=231&&Xl!=232&&Xl!=233&&Xl!=234&&Xl!=239&&Xl!=240&&Xl!=241&&Xl!=242&&Xl!=245&&Xl!=247&&Xl!=249&&Xl!=253&&Xl!=254&&Xl!=255&&Xl!=257&&Xl!=258&&Xl!=260&&Xl!=262&&Xl!=263&&Xl!=266&&Xl!=267&&Xl!=269&&Xl!=272&&Xl!=276&&Xl!=283&&Xl!=10009&&Xl!=14935&&Xl!=14951&&Xl!=14981&&Xl!=14987&&Xl!=14990&&Xl!=15002&&Xl!=15025&&Xl!=15096&&Xl!=15104&&Xl!=15107&&Xl!=15116&&Xl!=15121&&Xl!=16011&&Xl!=16014&&Xl!=16049&&Xl!=16140&&Xl!=18007&&Xl!=18023&&Xl!=18053&&Xl!=18059&&Xl!=18062&&Xl!=18074&&Xl!=18097&&Xl!=18168&&Xl!=18176&&Xl!=18179&&Xl!=18188&&Xl!=91735&&Xl!=91751&&Xl!=115333&&Xl!=118961&&Xl!=122507&&Xl!=122510&&Xl!=131723&&Xl!=131726&&Xl!=144128&&Xl!=147225){Xl=Ul(9,$l);if(Xl==0){var e=Vl,t=$l,n=Jl,r=Kl,i=Ql,s=Gl,o=Yl,u=Zl;try{af(),Rl(9,t,-1),Xl=-15}catch(a){try{Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),lf(),Rl(9,t,-2),Xl=-15}catch(f){try{Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),hf(),Rl(9,t,-3),Xl=-15}catch(l){try{Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Bf(),Rl(9,t,-12),Xl=-15}catch(c){Xl=-13,Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Rl(9,t,-13)}}}}}}switch(Xl){case-2:lf();break;case-3:hf();break;case 91735:df();break;case 91751:mf();break;case 115333:yf();break;case 16011:case 16014:case 16049:case 118961:case 122507:case 122510:case 131723:case 131726:wf();break;case 18074:Tf();break;case 18168:Cf();break;case 144128:Of();break;case 18179:_f();break;case-12:case 16140:Bf();break;case-13:Ff();break;case 54:qf();break;case-15:break;default:af()}}function uf(){sc.startNonterminal("ApplyStatement",$l),zf(),Ml(54),sc.endNonterminal("ApplyStatement",$l)}function af(){Wf(),_l(54)}function ff(){sc.startNonterminal("AssignStatement",$l),Ml(31),Bl(247),Pl(),Ei(),Bl(28),Ml(53),Bl(268),Pl(),Rf(),Ml(54),sc.endNonterminal("AssignStatement",$l)}function lf(){_l(31),Bl(247),Si(),Bl(28),_l(53),Bl(268),Uf(),_l(54)}function cf(){sc.startNonterminal("BlockStatement",$l),Ml(281),Bl(272),Pl(),sf(),Bl(282),Pl(),Ya(),Ml(287),sc.endNonterminal("BlockStatement",$l)}function hf(){_l(281),Bl(272),of(),Bl(282),Za(),_l(287)}function pf(){sc.startNonterminal("BreakStatement",$l),Ml(87),Bl(62),Ml(179),Bl(29),Ml(54),sc.endNonterminal("BreakStatement",$l)}function df(){_l(87),Bl(62),_l(179),Bl(29),_l(54)}function vf(){sc.startNonterminal("ContinueStatement",$l),Ml(103),Bl(62),Ml(179),Bl(29),Ml(54),sc.endNonterminal("ContinueStatement",$l)}function mf(){_l(103),Bl(62),_l(179),Bl(29),_l(54)}function gf(){sc.startNonterminal("ExitStatement",$l),Ml(133),Bl(73),Ml(225),Bl(268),Pl(),Rf(),Ml(54),sc.endNonterminal("ExitStatement",$l)}function yf(){_l(133),Bl(73),_l(225),Bl(268),Uf(),_l(54)}function bf(){sc.startNonterminal("FLWORStatement",$l),et();for(;;){Bl(200);if(Jl==224||Jl==233)break;Pl(),nt()}Pl(),Ef(),sc.endNonterminal("FLWORStatement",$l)}function wf(){tt();for(;;){Bl(200);if(Jl==224||Jl==233)break;rt()}Sf()}function Ef(){sc.startNonterminal("ReturnStatement",$l);switch(Jl){case 224:Ml(224);break;default:Ml(233)}Bl(272),Pl(),sf(),sc.endNonterminal("ReturnStatement",$l)}function Sf(){switch(Jl){case 224:_l(224);break;default:_l(233)}Bl(272),of()}function xf(){sc.startNonterminal("IfStatement",$l),Ml(154),Bl(22),Ml(35),Bl(268),Pl(),Q(),Ml(38),Bl(79),Ml(250),Bl(272),Pl(),sf(),Bl(51),Ml(123),Bl(272),Pl(),sf(),sc.endNonterminal("IfStatement",$l)}function Tf(){_l(154),Bl(22),_l(35),Bl(268),G(),_l(38),Bl(79),_l(250),Bl(272),of(),Bl(51),_l(123),Bl(272),of()}function Nf(){sc.startNonterminal("SwitchStatement",$l),Ml(248),Bl(22),Ml(35),Bl(268),Pl(),Q(),Ml(38);for(;;){Bl(38),Pl(),kf(),Bl(115);if(Jl!=89)break}Ml(110),Bl(136);switch(Jl){case 224:Ml(224);break;default:Ml(233)}Bl(272),Pl(),sf(),sc.endNonterminal("SwitchStatement",$l)}function Cf(){_l(248),Bl(22),_l(35),Bl(268),G(),_l(38);for(;;){Bl(38),Lf(),Bl(115);if(Jl!=89)break}_l(110),Bl(136);switch(Jl){case 224:_l(224);break;default:_l(233)}Bl(272),of()}function kf(){sc.startNonterminal("SwitchCaseStatement",$l);for(;;){Ml(89),Bl(268),Pl(),cn();if(Jl!=89)break}switch(Jl){case 224:Ml(224);break;default:Ml(233)}Bl(272),Pl(),sf(),sc.endNonterminal("SwitchCaseStatement",$l)}function Lf(){for(;;){_l(89),Bl(268),hn();if(Jl!=89)break}switch(Jl){case 224:_l(224);break;default:_l(233)}Bl(272),of()}function Af(){sc.startNonterminal("TryCatchStatement",$l),Ml(256),Bl(89),Pl(),cf();for(;;){Bl(39),Ml(92),Bl(250),Pl(),An(),Pl(),cf(),Bl(285);switch(Jl){case 92:jl(257);break;default:Xl=Jl}if(Xl!=2652&&Xl!=3164&&Xl!=36444&&Xl!=37468&&Xl!=37980&&Xl!=38492&&Xl!=39004&&Xl!=40028&&Xl!=40540&&Xl!=41052&&Xl!=41564&&Xl!=42076&&Xl!=42588&&Xl!=43100&&Xl!=43612&&Xl!=44124&&Xl!=44636&&Xl!=45660&&Xl!=46172&&Xl!=46684&&Xl!=47196&&Xl!=48220&&Xl!=48732&&Xl!=49756&&Xl!=50268&&Xl!=50780&&Xl!=52316&&Xl!=52828&&Xl!=53340&&Xl!=53852&&Xl!=54364&&Xl!=54876&&Xl!=55900&&Xl!=56412&&Xl!=56924&&Xl!=57436&&Xl!=57948&&Xl!=58460&&Xl!=61020&&Xl!=61532&&Xl!=62044&&Xl!=62556&&Xl!=63068&&Xl!=63580&&Xl!=64092&&Xl!=64604&&Xl!=65116&&Xl!=66140&&Xl!=66652&&Xl!=67676&&Xl!=68188&&Xl!=68700&&Xl!=69212&&Xl!=69724&&Xl!=70236&&Xl!=70748&&Xl!=71260&&Xl!=72796&&Xl!=73308&&Xl!=75356&&Xl!=75868&&Xl!=76892&&Xl!=77916&&Xl!=78428&&Xl!=78940&&Xl!=79452&&Xl!=79964&&Xl!=80476&&Xl!=82524&&Xl!=83036&&Xl!=83548&&Xl!=84060&&Xl!=84572&&Xl!=85084&&Xl!=85596&&Xl!=86108&&Xl!=86620&&Xl!=87132&&Xl!=88668&&Xl!=89180&&Xl!=89692&&Xl!=90716&&Xl!=91740&&Xl!=92764&&Xl!=93788&&Xl!=94300&&Xl!=94812&&Xl!=95836&&Xl!=96348&&Xl!=96860&&Xl!=99420&&Xl!=99932&&Xl!=100956&&Xl!=101468&&Xl!=103516&&Xl!=104028&&Xl!=104540&&Xl!=105052&&Xl!=105564&&Xl!=106076&&Xl!=107612&&Xl!=110684&&Xl!=111196&&Xl!=112732&&Xl!=113756&&Xl!=114268&&Xl!=114780&&Xl!=115292&&Xl!=115804&&Xl!=116828&&Xl!=117340&&Xl!=117852&&Xl!=118364&&Xl!=118876&&Xl!=119388&&Xl!=119900&&Xl!=122460&&Xl!=122972&&Xl!=123484&&Xl!=123996&&Xl!=125532&&Xl!=126556&&Xl!=127068&&Xl!=127580&&Xl!=129628&&Xl!=130140&&Xl!=130652&&Xl!=131164&&Xl!=131676&&Xl!=132188&&Xl!=132700&&Xl!=133212&&Xl!=134236&&Xl!=134748&&Xl!=136284&&Xl!=136796&&Xl!=137308&&Xl!=137820&&Xl!=139356&&Xl!=139868&&Xl!=141404)break}sc.endNonterminal("TryCatchStatement",$l)}function Of(){_l(256),Bl(89),hf();for(;;){Bl(39),_l(92),Bl(250),On(),hf(),Bl(285);switch(Jl){case 92:jl(257);break;default:Xl=Jl}if(Xl!=2652&&Xl!=3164&&Xl!=36444&&Xl!=37468&&Xl!=37980&&Xl!=38492&&Xl!=39004&&Xl!=40028&&Xl!=40540&&Xl!=41052&&Xl!=41564&&Xl!=42076&&Xl!=42588&&Xl!=43100&&Xl!=43612&&Xl!=44124&&Xl!=44636&&Xl!=45660&&Xl!=46172&&Xl!=46684&&Xl!=47196&&Xl!=48220&&Xl!=48732&&Xl!=49756&&Xl!=50268&&Xl!=50780&&Xl!=52316&&Xl!=52828&&Xl!=53340&&Xl!=53852&&Xl!=54364&&Xl!=54876&&Xl!=55900&&Xl!=56412&&Xl!=56924&&Xl!=57436&&Xl!=57948&&Xl!=58460&&Xl!=61020&&Xl!=61532&&Xl!=62044&&Xl!=62556&&Xl!=63068&&Xl!=63580&&Xl!=64092&&Xl!=64604&&Xl!=65116&&Xl!=66140&&Xl!=66652&&Xl!=67676&&Xl!=68188&&Xl!=68700&&Xl!=69212&&Xl!=69724&&Xl!=70236&&Xl!=70748&&Xl!=71260&&Xl!=72796&&Xl!=73308&&Xl!=75356&&Xl!=75868&&Xl!=76892&&Xl!=77916&&Xl!=78428&&Xl!=78940&&Xl!=79452&&Xl!=79964&&Xl!=80476&&Xl!=82524&&Xl!=83036&&Xl!=83548&&Xl!=84060&&Xl!=84572&&Xl!=85084&&Xl!=85596&&Xl!=86108&&Xl!=86620&&Xl!=87132&&Xl!=88668&&Xl!=89180&&Xl!=89692&&Xl!=90716&&Xl!=91740&&Xl!=92764&&Xl!=93788&&Xl!=94300&&Xl!=94812&&Xl!=95836&&Xl!=96348&&Xl!=96860&&Xl!=99420&&Xl!=99932&&Xl!=100956&&Xl!=101468&&Xl!=103516&&Xl!=104028&&Xl!=104540&&Xl!=105052&&Xl!=105564&&Xl!=106076&&Xl!=107612&&Xl!=110684&&Xl!=111196&&Xl!=112732&&Xl!=113756&&Xl!=114268&&Xl!=114780&&Xl!=115292&&Xl!=115804&&Xl!=116828&&Xl!=117340&&Xl!=117852&&Xl!=118364&&Xl!=118876&&Xl!=119388&&Xl!=119900&&Xl!=122460&&Xl!=122972&&Xl!=123484&&Xl!=123996&&Xl!=125532&&Xl!=126556&&Xl!=127068&&Xl!=127580&&Xl!=129628&&Xl!=130140&&Xl!=130652&&Xl!=131164&&Xl!=131676&&Xl!=132188&&Xl!=132700&&Xl!=133212&&Xl!=134236&&Xl!=134748&&Xl!=136284&&Xl!=136796&&Xl!=137308&&Xl!=137820&&Xl!=139356&&Xl!=139868&&Xl!=141404)break}}function Mf(){sc.startNonterminal("TypeswitchStatement",$l),Ml(259),Bl(22),Ml(35),Bl(268),Pl(),Q(),Ml(38);for(;;){Bl(38),Pl(),Df(),Bl(115);if(Jl!=89)break}Ml(110),Bl(149),Jl==31&&(Ml(31),Bl(247),Pl(),Ei()),Bl(136);switch(Jl){case 224:Ml(224);break;default:Ml(233)}Bl(272),Pl(),sf(),sc.endNonterminal("TypeswitchStatement",$l)}function _f(){_l(259),Bl(22),_l(35),Bl(268),G(),_l(38);for(;;){Bl(38),Pf(),Bl(115);if(Jl!=89)break}_l(110),Bl(149),Jl==31&&(_l(31),Bl(247),Si()),Bl(136);switch(Jl){case 224:_l(224);break;default:_l(233)}Bl(272),of()}function Df(){sc.startNonterminal("CaseStatement",$l),Ml(89),Bl(259),Jl==31&&(Ml(31),Bl(247),Pl(),Ei(),Bl(33),Ml(80)),Bl(255),Pl(),Ns(),Bl(136);switch(Jl){case 224:Ml(224);break;default:Ml(233)}Bl(272),Pl(),sf(),sc.endNonterminal("CaseStatement",$l)}function Pf(){_l(89),Bl(259),Jl==31&&(_l(31),Bl(247),Si(),Bl(33),_l(80)),Bl(255),Cs(),Bl(136);switch(Jl){case 224:_l(224);break;default:_l(233)}Bl(272),of()}function Hf(){sc.startNonterminal("VarDeclStatement",$l);for(;;){Bl(100);if(Jl!=33)break;Pl(),H()}Ml(268),Bl(21),Ml(31),Bl(247),Pl(),Ei(),Bl(173),Jl==80&&(Pl(),xs()),Bl(154),Jl==53&&(Ml(53),Bl(268),Pl(),Rf());for(;;){if(Jl!=42)break;Ml(42),Bl(21),Ml(31),Bl(247),Pl(),Ei(),Bl(173),Jl==80&&(Pl(),xs()),Bl(154),Jl==53&&(Ml(53),Bl(268),Pl(),Rf())}Ml(54),sc.endNonterminal("VarDeclStatement",$l)}function Bf(){for(;;){Bl(100);if(Jl!=33)break;B()}_l(268),Bl(21),_l(31),Bl(247),Si(),Bl(173),Jl==80&&Ts(),Bl(154),Jl==53&&(_l(53),Bl(268),Uf());for(;;){if(Jl!=42)break;_l(42),Bl(21),_l(31),Bl(247),Si(),Bl(173),Jl==80&&Ts(),Bl(154),Jl==53&&(_l(53),Bl(268),Uf())}_l(54)}function jf(){sc.startNonterminal("WhileStatement",$l),Ml(273),Bl(22),Ml(35),Bl(268),Pl(),Q(),Ml(38),Bl(272),Pl(),sf(),sc.endNonterminal("WhileStatement",$l)}function Ff(){_l(273),Bl(22),_l(35),Bl(268),G(),_l(38),Bl(272),of()}function If(){sc.startNonterminal("VoidStatement",$l),Ml(54),sc.endNonterminal("VoidStatement",$l)}function qf(){_l(54)}function Rf(){sc.startNonterminal("ExprSingle",$l);switch(Jl){case 177:jl(167);break;case 256:jl(146);break;case 139:case 142:jl(180);break;case 154:case 248:case 259:jl(94);break;default:Xl=Jl}switch(Xl){case 16011:case 16014:case 16049:case 118961:case 122507:case 122510:case 131723:case 131726:Y();break;case 18074:bn();break;case 18168:un();break;case 144128:En();break;case 18179:pn();break;default:zf()}sc.endNonterminal("ExprSingle",$l)}function Uf(){switch(Jl){case 177:jl(167);break;case 256:jl(146);break;case 139:case 142:jl(180);break;case 154:case 248:case 259:jl(94);break;default:Xl=Jl}switch(Xl){case 16011:case 16014:case 16049:case 118961:case 122507:case 122510:case 131723:case 131726:Z();break;case 18074:wn();break;case 18168:an();break;case 144128:Sn();break;case 18179:dn();break;default:Wf()}}function zf(){sc.startNonterminal("ExprSimple",$l);switch(Jl){case 78:jl(270);break;case 161:jl(277);break;case 223:jl(171);break;case 111:case 222:jl(262);break;case 104:case 130:case 240:jl(141);break;default:Xl=Jl}if(Xl==17998||Xl==18031||Xl==18081||Xl==18142||Xl==99439||Xl==99489||Xl==99550||Xl==99951||Xl==100001||Xl==136927){Xl=Ul(10,$l);if(Xl==0){var e=Vl,t=$l,n=Jl,r=Kl,i=Ql,s=Gl,o=Yl,u=Zl;try{_n(),Xl=-2}catch(a){try{Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),qo(),Xl=-3}catch(f){try{Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Uo(),Xl=-4}catch(l){try{Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Vo(),Xl=-5}catch(c){try{Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Wo(),Xl=-6}catch(h){try{Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Vf(),Xl=-8}catch(p){try{Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Jf(),Xl=-9}catch(d){try{Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Qf(),Xl=-10}catch(v){try{Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Yf(),Xl=-11}catch(m){Xl=-12}}}}}}}}}Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Rl(10,$l,Xl)}}switch(Xl){case 16002:case 16112:sn();break;case-3:Io();break;case-4:Ro();break;case-5:Xo();break;case-6:case 99551:zo();break;case 15976:Zo();break;case-8:case 3183:case 4207:case 4719:case 5231:case 5743:case 15983:case 16495:case 17007:case 28271:case 28783:case 30831:case 35439:case 36463:case 37487:case 37999:case 38511:case 39023:case 40047:case 40559:case 41071:case 41583:case 42095:case 42607:case 43119:case 43631:case 44143:case 44655:case 45679:case 46191:case 46703:case 47215:case 48239:case 48751:case 49775:case 50287:case 50799:case 52335:case 52847:case 53359:case 53871:case 54383:case 54895:case 55919:case 56431:case 56943:case 57455:case 57967:case 58479:case 61039:case 61551:case 62063:case 62575:case 63087:case 63599:case 64111:case 64623:case 65135:case 66159:case 66671:case 67695:case 68207:case 68719:case 69231:case 69743:case 70255:case 70767:case 71279:case 72815:case 73327:case 75375:case 75887:case 76911:case 77935:case 78447:case 78959:case 79471:case 79983:case 80495:case 82543:case 83055:case 83567:case 84079:case 84591:case 85103:case 85615:case 86127:case 86639:case 87151:case 88687:case 89199:case 89711:case 90735:case 91759:case 92783:case 93807:case 94319:case 94831:case 95855:case 96367:case 96879:case 100975:case 101487:case 103535:case 104047:case 104559:case 105071:case 105583:case 106095:case 107631:case 110703:case 111215:case 112751:case 113775:case 114287:case 114799:case 115311:case 115823:case 116847:case 117359:case 117871:case 118383:case 118895:case 119407:case 119919:case 122479:case 122991:case 123503:case 124015:case 125551:case 126575:case 127087:case 127599:case 129647:case 130159:case 130671:case 131183:case 131695:case 132207:case 132719:case 133231:case 134255:case 134767:case 136303:case 136815:case 137327:case 137839:case 139375:case 139887:case 141423:case 143983:case 145007:Xf();break;case-9:case 3233:case 4257:case 4769:case 5281:case 5793:case 9889:case 16033:case 16545:case 17057:case 18593:case 21153:case 22177:case 24225:case 24737:case 28321:case 28833:case 30881:case 35489:case 36513:case 37537:case 38049:case 38561:case 39073:case 40097:case 40609:case 41121:case 41633:case 42145:case 42657:case 43169:case 43681:case 44193:case 44705:case 45729:case 46241:case 46753:case 47265:case 48289:case 48801:case 49825:case 50337:case 50849:case 52385:case 52897:case 53409:case 53921:case 54433:case 54945:case 55969:case 56481:case 56993:case 57505:case 58017:case 58529:case 61089:case 61601:case 62113:case 62625:case 63137:case 63649:case 64161:case 64673:case 65185:case 66209:case 66721:case 67745:case 68257:case 68769:case 69281:case 69793:case 70305:case 70817:case 71329:case 72865:case 73377:case 75425:case 75937:case 76961:case 77985:case 78497:case 79009:case 79521:case 80033:case 80545:case 82593:case 83105:case 83617:case 84129:case 84641:case 85153:case 85665:case 86177:case 86689:case 87201:case 88737:case 89249:case 89761:case 90785:case 91809:case 92833:case 93857:case 94369:case 94881:case 95905:case 96417:case 96929:case 100513:case 101025:case 101537:case 103585:case 104097:case 104609:case 105121:case 105633:case 106145:case 107681:case 110753:case 111265:case 112801:case 113825:case 114337:case 114849:case 115361:case 115873:case 116897:case 117409:case 117921:case 118433:case 118945:case 119457:case 119969:case 122529:case 123041:case 123553:case 124065:case 125601:case 126625:case 127137:case 127649:case 129697:case 130209:case 130721:case 131233:case 131745:case 132257:case 132769:case 133281:case 134305:case 134817:case 136353:case 136865:case 137377:case 137889:case 139425:case 139937:case 141473:case 144033:case 145057:$f();break;case-10:case 3294:case 4318:case 4830:case 5342:case 5854:case 16094:case 16606:case 17118:case 28382:case 28894:case 30942:case 35550:case 36574:case 37598:case 38110:case 38622:case 39134:case 40158:case 40670:case 41182:case 41694:case 42206:case 42718:case 43230:case 43742:case 44254:case 44766:case 45790:case 46302:case 46814:case 47326:case 48350:case 48862:case 49886:case 50398:case 50910:case 52446:case 52958:case 53470:case 53982:case 54494:case 55006:case 56030:case 56542:case 57054:case 57566:case 58078:case 58590:case 61150:case 61662:case 62174:case 62686:case 63198:case 63710:case 64222:case 64734:case 65246:case 66270:case 66782:case 67806:case 68318:case 68830:case 69342:case 69854:case 70366:case 70878:case 71390:case 72926:case 73438:case 75486:case 75998:case 77022:case 78046:case 78558:case 79070:case 79582:case 80094:case 80606:case 82654:case 83166:case 83678:case 84190:case 84702:case 85214:case 85726:case 86238:case 86750:case 87262:case 88798:case 89310:case 89822:case 90846:case 91870:case 92894:case 93918:case 94430:case 94942:case 95966:case 96478:case 96990:case 100062:case 101086:case 101598:case 103646:case 104158:case 104670:case 105182:case 105694:case 106206:case 107742:case 110814:case 111326:case 112862:case 113886:case 114398:case 114910:case 115422:case 115934:case 116958:case 117470:case 117982:case 118494:case 119006:case 119518:case 120030:case 122590:case 123102:case 123614:case 124126:case 125662:case 126686:case 127198:case 127710:case 129758:case 130270:case 130782:case 131294:case 131806:case 132318:case 132830:case 133342:case 134366:case 134878:case 136414:case 136926:case 137438:case 137950:case 139486:case 139998:case 141534:case 144094:case 145118:Kf();break;case-11:Gf();break;case-12:case 3150:case 4174:case 4686:case 5198:case 5710:case 15950:case 16462:case 16974:case 18510:case 21070:case 22094:case 24142:case 24654:case 28238:case 28750:case 30798:case 35406:case 36430:case 37454:case 37966:case 38478:case 38990:case 40014:case 40526:case 41038:case 41550:case 42062:case 42574:case 43086:case 43598:case 44110:case 44622:case 45646:case 46158:case 46670:case 47182:case 48206:case 48718:case 49742:case 50254:case 50766:case 52302:case 52814:case 53326:case 53838:case 54350:case 54862:case 55886:case 56398:case 56910:case 57422:case 57934:case 58446:case 61006:case 61518:case 62030:case 62542:case 63054:case 63566:case 64078:case 64590:case 65102:case 66126:case 66638:case 67662:case 68174:case 68686:case 69198:case 69710:case 70222:case 70734:case 71246:case 72782:case 73294:case 75342:case 75854:case 76878:case 77902:case 78414:case 78926:case 79438:case 79950:case 80462:case 82510:case 83022:case 83534:case 84046:case 84558:case 85070:case 85582:case 86094:case 86606:case 87118:case 88654:case 89166:case 89678:case 90702:case 91726:case 92750:case 93774:case 94286:case 94798:case 95822:case 96334:case 96846:case 99406:case 99918:case 100430:case 100942:case 101454:case 103502:case 104014:case 104526:case 105038:case 105550:case 106062:case 107598:case 110670:case 111182:case 112718:case 113742:case 114254:case 114766:case 115278:case 115790:case 116814:case 117326:case 117838:case 118350:case 118862:case 119374:case 119886:case 122446:case 122958:case 123470:case 123982:case 125518:case 126542:case 127054:case 127566:case 129614:case 130126:case 130638:case 131150:case 131662:case 132174:case 132686:case 133198:case 134222:case 134734:case 136270:case 136782:case 137294:case 137806:case 139342:case 139854:case 141390:case 143950:case 144974:Zf();break;default:Mn()}sc.endNonterminal("ExprSimple",$l)}function Wf(){switch(Jl){case 78:jl(270);break;case 161:jl(277);break;case 223:jl(171);break;case 111:case 222:jl(262);break;case 104:case 130:case 240:jl(141);break;default:Xl=Jl}if(Xl==17998||Xl==18031||Xl==18081||Xl==18142||Xl==99439||Xl==99489||Xl==99550||Xl==99951||Xl==100001||Xl==136927){Xl=Ul(10,$l);if(Xl==0){var e=Vl,t=$l,n=Jl,r=Kl,i=Ql,s=Gl,o=Yl,u=Zl;try{_n(),Rl(10,t,-2),Xl=-13}catch(a){try{Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),qo(),Rl(10,t,-3),Xl=-13}catch(f){try{Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Uo(),Rl(10,t,-4),Xl=-13}catch(l){try{Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Vo(),Rl(10,t,-5),Xl=-13}catch(c){try{Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Wo(),Rl(10,t,-6),Xl=-13}catch(h){try{Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Vf(),Rl(10,t,-8),Xl=-13}catch(p){try{Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Jf(),Rl(10,t,-9),Xl=-13}catch(d){try{Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Qf(),Rl(10,t,-10),Xl=-13}catch(v){try{Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Yf(),Rl(10,t,-11),Xl=-13}catch(m){Xl=-12,Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Rl(10,t,-12)}}}}}}}}}}}switch(Xl){case 16002:case 16112:on();break;case-3:qo();break;case-4:Uo();break;case-5:Vo();break;case-6:case 99551:Wo();break;case 15976:eu();break;case-8:case 3183:case 4207:case 4719:case 5231:case 5743:case 15983:case 16495:case 17007:case 28271:case 28783:case 30831:case 35439:case 36463:case 37487:case 37999:case 38511:case 39023:case 40047:case 40559:case 41071:case 41583:case 42095:case 42607:case 43119:case 43631:case 44143:case 44655:case 45679:case 46191:case 46703:case 47215:case 48239:case 48751:case 49775:case 50287:case 50799:case 52335:case 52847:case 53359:case 53871:case 54383:case 54895:case 55919:case 56431:case 56943:case 57455:case 57967:case 58479:case 61039:case 61551:case 62063:case 62575:case 63087:case 63599:case 64111:case 64623:case 65135:case 66159:case 66671:case 67695:case 68207:case 68719:case 69231:case 69743:case 70255:case 70767:case 71279:case 72815:case 73327:case 75375:case 75887:case 76911:case 77935:case 78447:case 78959:case 79471:case 79983:case 80495:case 82543:case 83055:case 83567:case 84079:case 84591:case 85103:case 85615:case 86127:case 86639:case 87151:case 88687:case 89199:case 89711:case 90735:case 91759:case 92783:case 93807:case 94319:case 94831:case 95855:case 96367:case 96879:case 100975:case 101487:case 103535:case 104047:case 104559:case 105071:case 105583:case 106095:case 107631:case 110703:case 111215:case 112751:case 113775:case 114287:case 114799:case 115311:case 115823:case 116847:case 117359:case 117871:case 118383:case 118895:case 119407:case 119919:case 122479:case 122991:case 123503:case 124015:case 125551:case 126575:case 127087:case 127599:case 129647:case 130159:case 130671:case 131183:case 131695:case 132207:case 132719:case 133231:case 134255:case 134767:case 136303:case 136815:case 137327:case 137839:case 139375:case 139887:case 141423:case 143983:case 145007:Vf();break;case-9:case 3233:case 4257:case 4769:case 5281:case 5793:case 9889:case 16033:case 16545:case 17057:case 18593:case 21153:case 22177:case 24225:case 24737:case 28321:case 28833:case 30881:case 35489:case 36513:case 37537:case 38049:case 38561:case 39073:case 40097:case 40609:case 41121:case 41633:case 42145:case 42657:case 43169:case 43681:case 44193:case 44705:case 45729:case 46241:case 46753:case 47265:case 48289:case 48801:case 49825:case 50337:case 50849:case 52385:case 52897:case 53409:case 53921:case 54433:case 54945:case 55969:case 56481:case 56993:case 57505:case 58017:case 58529:case 61089:case 61601:case 62113:case 62625:case 63137:case 63649:case 64161:case 64673:case 65185:case 66209:case 66721:case 67745:case 68257:case 68769:case 69281:case 69793:case 70305:case 70817:case 71329:case 72865:case 73377:case 75425:case 75937:case 76961:case 77985:case 78497:case 79009:case 79521:case 80033:case 80545:case 82593:case 83105:case 83617:case 84129:case 84641:case 85153:case 85665:case 86177:case 86689:case 87201:case 88737:case 89249:case 89761:case 90785:case 91809:case 92833:case 93857:case 94369:case 94881:case 95905:case 96417:case 96929:case 100513:case 101025:case 101537:case 103585:case 104097:case 104609:case 105121:case 105633:case 106145:case 107681:case 110753:case 111265:case 112801:case 113825:case 114337:case 114849:case 115361:case 115873:case 116897:case 117409:case 117921:case 118433:case 118945:case 119457:case 119969:case 122529:case 123041:case 123553:case 124065:case 125601:case 126625:case 127137:case 127649:case 129697:case 130209:case 130721:case 131233:case 131745:case 132257:case 132769:case 133281:case 134305:case 134817:case 136353:case 136865:case 137377:case 137889:case 139425:case 139937:case 141473:case 144033:case 145057:Jf();break;case-10:case 3294:case 4318:case 4830:case 5342:case 5854:case 16094:case 16606:case 17118:case 28382:case 28894:case 30942:case 35550:case 36574:case 37598:case 38110:case 38622:case 39134:case 40158:case 40670:case 41182:case 41694:case 42206:case 42718:case 43230:case 43742:case 44254:case 44766:case 45790:case 46302:case 46814:case 47326:case 48350:case 48862:case 49886:case 50398:case 50910:case 52446:case 52958:case 53470:case 53982:case 54494:case 55006:case 56030:case 56542:case 57054:case 57566:case 58078:case 58590:case 61150:case 61662:case 62174:case 62686:case 63198:case 63710:case 64222:case 64734:case 65246:case 66270:case 66782:case 67806:case 68318:case 68830:case 69342:case 69854:case 70366:case 70878:case 71390:case 72926:case 73438:case 75486:case 75998:case 77022:case 78046:case 78558:case 79070:case 79582:case 80094:case 80606:case 82654:case 83166:case 83678:case 84190:case 84702:case 85214:case 85726:case 86238:case 86750:case 87262:case 88798:case 89310:case 89822:case 90846:case 91870:case 92894:case 93918:case 94430:case 94942:case 95966:case 96478:case 96990:case 100062:case 101086:case 101598:case 103646:case 104158:case 104670:case 105182:case 105694:case 106206:case 107742:case 110814:case 111326:case 112862:case 113886:case 114398:case 114910:case 115422:case 115934:case 116958:case 117470:case 117982:case 118494:case 119006:case 119518:case 120030:case 122590:case 123102:case 123614:case 124126:case 125662:case 126686:case 127198:case 127710:case 129758:case 130270:case 130782:case 131294:case 131806:case 132318:case 132830:case 133342:case 134366:case 134878:case 136414:case 136926:case 137438:case 137950:case 139486:case 139998:case 141534:case 144094:case 145118:Qf();break;case-11:Yf();break;case-12:case 3150:case 4174:case 4686:case 5198:case 5710:case 15950:case 16462:case 16974:case 18510:case 21070:case 22094:case 24142:case 24654:case 28238:case 28750:case 30798:case 35406:case 36430:case 37454:case 37966:case 38478:case 38990:case 40014:case 40526:case 41038:case 41550:case 42062:case 42574:case 43086:case 43598:case 44110:case 44622:case 45646:case 46158:case 46670:case 47182:case 48206:case 48718:case 49742:case 50254:case 50766:case 52302:case 52814:case 53326:case 53838:case 54350:case 54862:case 55886:case 56398:case 56910:case 57422:case 57934:case 58446:case 61006:case 61518:case 62030:case 62542:case 63054:case 63566:case 64078:case 64590:case 65102:case 66126:case 66638:case 67662:case 68174:case 68686:case 69198:case 69710:case 70222:case 70734:case 71246:case 72782:case 73294:case 75342:case 75854:case 76878:case 77902:case 78414:case 78926:case 79438:case 79950:case 80462:case 82510:case 83022:case 83534:case 84046:case 84558:case 85070:case 85582:case 86094:case 86606:case 87118:case 88654:case 89166:case 89678:case 90702:case 91726:case 92750:case 93774:case 94286:case 94798:case 95822:case 96334:case 96846:case 99406:case 99918:case 100430:case 100942:case 101454:case 103502:case 104014:case 104526:case 105038:case 105550:case 106062:case 107598:case 110670:case 111182:case 112718:case 113742:case 114254:case 114766:case 115278:case 115790:case 116814:case 117326:case 117838:case 118350:case 118862:case 119374:case 119886:case 122446:case 122958:case 123470:case 123982:case 125518:case 126542:case 127054:case 127566:case 129614:case 130126:case 130638:case 131150:case 131662:case 132174:case 132686:case 133198:case 134222:case 134734:case 136270:case 136782:case 137294:case 137806:case 139342:case 139854:case 141390:case 143950:case 144974:el();break;case-13:break;default:_n()}}function Xf(){sc.startNonterminal("JSONDeleteExpr",$l),Ml(111),Bl(261);switch(Jl){case 168:jl(262);break;default:Xl=Jl}if(Xl==18088){Xl=Ul(11,$l);if(Xl==0){var e=Vl,t=$l,n=Jl,r=Kl,i=Ql,s=Gl,o=Yl,u=Zl;try{_l(168),Xl=-1}catch(a){Xl=-2}Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Rl(11,$l,Xl)}}(Xl==-1||Xl==3240||Xl==4264||Xl==4776||Xl==5288||Xl==5800||Xl==16040||Xl==16552||Xl==17064||Xl==28328||Xl==28840||Xl==30888||Xl==35496||Xl==36520||Xl==37544||Xl==38056||Xl==38568||Xl==39080||Xl==40104||Xl==40616||Xl==41128||Xl==41640||Xl==42152||Xl==42664||Xl==43176||Xl==43688||Xl==44200||Xl==44712||Xl==45736||Xl==46248||Xl==46760||Xl==47272||Xl==48296||Xl==48808||Xl==49832||Xl==50344||Xl==50856||Xl==52392||Xl==52904||Xl==53416||Xl==53928||Xl==54440||Xl==54952||Xl==55976||Xl==56488||Xl==57e3||Xl==57512||Xl==58024||Xl==58536||Xl==61096||Xl==61608||Xl==62120||Xl==62632||Xl==63144||Xl==63656||Xl==64168||Xl==64680||Xl==65192||Xl==66216||Xl==66728||Xl==67752||Xl==68264||Xl==68776||Xl==69288||Xl==69800||Xl==70312||Xl==70824||Xl==71336||Xl==72872||Xl==73384||Xl==75432||Xl==75944||Xl==76968||Xl==77992||Xl==78504||Xl==79016||Xl==79528||Xl==80040||Xl==80552||Xl==82600||Xl==83112||Xl==83624||Xl==84136||Xl==84648||Xl==85160||Xl==85672||Xl==86184||Xl==86696||Xl==87208||Xl==88744||Xl==89256||Xl==89768||Xl==90792||Xl==91816||Xl==92840||Xl==93864||Xl==94376||Xl==94888||Xl==95912||Xl==96424||Xl==96936||Xl==99496||Xl==100008||Xl==101032||Xl==101544||Xl==103592||Xl==104104||Xl==104616||Xl==105128||Xl==105640||Xl==106152||Xl==107688||Xl==110760||Xl==111272||Xl==112808||Xl==113832||Xl==114344||Xl==114856||Xl==115368||Xl==115880||Xl==116904||Xl==117416||Xl==117928||Xl==118440||Xl==118952||Xl==119464||Xl==119976||Xl==122536||Xl==123048||Xl==123560||Xl==124072||Xl==125608||Xl==126632||Xl==127144||Xl==127656||Xl==129704||Xl==130216||Xl==130728||Xl==131240||Xl==131752||Xl==132264||Xl==132776||Xl==133288||Xl==134312||Xl==134824||Xl==136360||Xl==136872||Xl==137384||Xl==137896||Xl==139432||Xl==139944||Xl==141480||Xl==144040||Xl==145064)&&Ml(168),Bl(261),Pl(),Gr(),sc.endNonterminal("JSONDeleteExpr",$l)}function Vf(){_l(111),Bl(261);switch(Jl){case 168:jl(262);break;default:Xl=Jl}if(Xl==18088){Xl=Ul(11,$l);if(Xl==0){var e=Vl,t=$l,n=Jl,r=Kl,i=Ql,s=Gl,o=Yl,u=Zl;try{_l(168),Rl(11,t,-1)}catch(a){Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Rl(11,t,-2)}Xl=-2}}(Xl==-1||Xl==3240||Xl==4264||Xl==4776||Xl==5288||Xl==5800||Xl==16040||Xl==16552||Xl==17064||Xl==28328||Xl==28840||Xl==30888||Xl==35496||Xl==36520||Xl==37544||Xl==38056||Xl==38568||Xl==39080||Xl==40104||Xl==40616||Xl==41128||Xl==41640||Xl==42152||Xl==42664||Xl==43176||Xl==43688||Xl==44200||Xl==44712||Xl==45736||Xl==46248||Xl==46760||Xl==47272||Xl==48296||Xl==48808||Xl==49832||Xl==50344||Xl==50856||Xl==52392||Xl==52904||Xl==53416||Xl==53928||Xl==54440||Xl==54952||Xl==55976||Xl==56488||Xl==57e3||Xl==57512||Xl==58024||Xl==58536||Xl==61096||Xl==61608||Xl==62120||Xl==62632||Xl==63144||Xl==63656||Xl==64168||Xl==64680||Xl==65192||Xl==66216||Xl==66728||Xl==67752||Xl==68264||Xl==68776||Xl==69288||Xl==69800||Xl==70312||Xl==70824||Xl==71336||Xl==72872||Xl==73384||Xl==75432||Xl==75944||Xl==76968||Xl==77992||Xl==78504||Xl==79016||Xl==79528||Xl==80040||Xl==80552||Xl==82600||Xl==83112||Xl==83624||Xl==84136||Xl==84648||Xl==85160||Xl==85672||Xl==86184||Xl==86696||Xl==87208||Xl==88744||Xl==89256||Xl==89768||Xl==90792||Xl==91816||Xl==92840||Xl==93864||Xl==94376||Xl==94888||Xl==95912||Xl==96424||Xl==96936||Xl==99496||Xl==100008||Xl==101032||Xl==101544||Xl==103592||Xl==104104||Xl==104616||Xl==105128||Xl==105640||Xl==106152||Xl==107688||Xl==110760||Xl==111272||Xl==112808||Xl==113832||Xl==114344||Xl==114856||Xl==115368||Xl==115880||Xl==116904||Xl==117416||Xl==117928||Xl==118440||Xl==118952||Xl==119464||Xl==119976||Xl==122536||Xl==123048||Xl==123560||Xl==124072||Xl==125608||Xl==126632||Xl==127144||Xl==127656||Xl==129704||Xl==130216||Xl==130728||Xl==131240||Xl==131752||Xl==132264||Xl==132776||Xl==133288||Xl==134312||Xl==134824||Xl==136360||Xl==136872||Xl==137384||Xl==137896||Xl==139432||Xl==139944||Xl==141480||Xl==144040||Xl==145064)&&_l(168),Bl(261),Yr()}function $f(){sc.startNonterminal("JSONInsertExpr",$l);switch(Jl){case 161:jl(269);break;default:Xl=Jl}if(Xl!=9889){Xl=Ul(12,$l);if(Xl==0){var e=Vl,t=$l,n=Jl,r=Kl,i=Ql,s=Gl,o=Yl,u=Zl;try{_l(161),Bl(268);switch(Jl){case 168:jl(270);break;default:Xl=Jl}if(Xl==18088){Xl=Ul(13,$l);if(Xl==0){var a=Vl,f=$l,l=Jl,c=Kl,h=Ql,p=Gl,d=Yl,v=Zl;try{_l(168),Rl(13,f,-1)}catch(m){Vl=a,$l=f,Jl=l,Jl==0?lc=f:(Kl=c,Ql=h,Gl=p,Gl==0?lc=h:(Yl=d,Zl=v,lc=v)),Rl(13,f,-2)}Xl=-2}}(Xl==-1||Xl==3240||Xl==4264||Xl==4776||Xl==5288||Xl==5800||Xl==16040||Xl==16552||Xl==17064||Xl==18600||Xl==21160||Xl==22184||Xl==24232||Xl==24744||Xl==28328||Xl==28840||Xl==30888||Xl==35496||Xl==36520||Xl==37544||Xl==38056||Xl==38568||Xl==39080||Xl==40104||Xl==40616||Xl==41128||Xl==41640||Xl==42152||Xl==42664||Xl==43176||Xl==43688||Xl==44200||Xl==44712||Xl==45736||Xl==46248||Xl==46760||Xl==47272||Xl==48296||Xl==48808||Xl==49832||Xl==50344||Xl==50856||Xl==52392||Xl==52904||Xl==53416||Xl==53928||Xl==54440||Xl==54952||Xl==55976||Xl==56488||Xl==57e3||Xl==57512||Xl==58024||Xl==58536||Xl==61096||Xl==61608||Xl==62120||Xl==62632||Xl==63144||Xl==63656||Xl==64168||Xl==64680||Xl==65192||Xl==66216||Xl==66728||Xl==67752||Xl==68264||Xl==68776||Xl==69288||Xl==69800||Xl==70312||Xl==70824||Xl==71336||Xl==72872||Xl==73384||Xl==75432||Xl==75944||Xl==76968||Xl==77992||Xl==78504||Xl==79016||Xl==79528||Xl==80040||Xl==80552||Xl==82600||Xl==83112||Xl==83624||Xl==84136||Xl==84648||Xl==85160||Xl==85672||Xl==86184||Xl==86696||Xl==87208||Xl==88744||Xl==89256||Xl==89768||Xl==90792||Xl==91816||Xl==92840||Xl==93864||Xl==94376||Xl==94888||Xl==95912||Xl==96424||Xl==96936||Xl==99496||Xl==100008||Xl==100520||Xl==101032||Xl==101544||Xl==103592||Xl==104104||Xl==104616||Xl==105128||Xl==105640||Xl==106152||Xl==107688||Xl==110760||Xl==111272||Xl==112808||Xl==113832||Xl==114344||Xl==114856||Xl==115368||Xl==115880||Xl==116904||Xl==117416||Xl==117928||Xl==118440||Xl==118952||Xl==119464||Xl==119976||Xl==122536||Xl==123048||Xl==123560||Xl==124072||Xl==125608||Xl==126632||Xl==127144||Xl==127656||Xl==129704||Xl==130216||Xl==130728||Xl==131240||Xl==131752||Xl==132264||Xl==132776||Xl==133288||Xl==134312||Xl==134824||Xl==136360||Xl==136872||Xl==137384||Xl==137896||Xl==139432||Xl==139944||Xl==141480||Xl==144040||Xl==145064)&&_l(168),Bl(268),Uf(),_l(165),Bl(268),Uf();switch(Jl){case 82:jl(72);break;default:Xl=Jl}if(Xl==110162){Xl=Ul(14,$l);if(Xl==0){var a=Vl,f=$l,l=Jl,c=Kl,h=Ql,p=Gl,d=Yl,v=Zl;try{_l(82),Bl(72),_l(215),Bl(268),Uf(),Rl(14,f,-1)}catch(m){Vl=a,$l=f,Jl=l,Jl==0?lc=f:(Kl=c,Ql=h,Gl=p,Gl==0?lc=h:(Yl=d,Zl=v,lc=v)),Rl(14,f,-2)}Xl=-2}}Xl==-1&&(_l(82),Bl(72),_l(215),Bl(268),Uf()),Xl=-1}catch(g){Xl=-2}Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Rl(12,$l,Xl)}}switch(Xl){case-1:Ml(161),Bl(268);switch(Jl){case 168:jl(270);break;default:Xl=Jl}if(Xl==18088){Xl=Ul(13,$l);if(Xl==0){var a=Vl,f=$l,l=Jl,c=Kl,h=Ql,p=Gl,d=Yl,v=Zl;try{_l(168),Xl=-1}catch(m){Xl=-2}Vl=a,$l=f,Jl=l,Jl==0?lc=f:(Kl=c,Ql=h,Gl=p,Gl==0?lc=h:(Yl=d,Zl=v,lc=v)),Rl(13,$l,Xl)}}(Xl==-1||Xl==3240||Xl==4264||Xl==4776||Xl==5288||Xl==5800||Xl==16040||Xl==16552||Xl==17064||Xl==18600||Xl==21160||Xl==22184||Xl==24232||Xl==24744||Xl==28328||Xl==28840||Xl==30888||Xl==35496||Xl==36520||Xl==37544||Xl==38056||Xl==38568||Xl==39080||Xl==40104||Xl==40616||Xl==41128||Xl==41640||Xl==42152||Xl==42664||Xl==43176||Xl==43688||Xl==44200||Xl==44712||Xl==45736||Xl==46248||Xl==46760||Xl==47272||Xl==48296||Xl==48808||Xl==49832||Xl==50344||Xl==50856||Xl==52392||Xl==52904||Xl==53416||Xl==53928||Xl==54440||Xl==54952||Xl==55976||Xl==56488||Xl==57e3||Xl==57512||Xl==58024||Xl==58536||Xl==61096||Xl==61608||Xl==62120||Xl==62632||Xl==63144||Xl==63656||Xl==64168||Xl==64680||Xl==65192||Xl==66216||Xl==66728||Xl==67752||Xl==68264||Xl==68776||Xl==69288||Xl==69800||Xl==70312||Xl==70824||Xl==71336||Xl==72872||Xl==73384||Xl==75432||Xl==75944||Xl==76968||Xl==77992||Xl==78504||Xl==79016||Xl==79528||Xl==80040||Xl==80552||Xl==82600||Xl==83112||Xl==83624||Xl==84136||Xl==84648||Xl==85160||Xl==85672||Xl==86184||Xl==86696||Xl==87208||Xl==88744||Xl==89256||Xl==89768||Xl==90792||Xl==91816||Xl==92840||Xl==93864||Xl==94376||Xl==94888||Xl==95912||Xl==96424||Xl==96936||Xl==99496||Xl==100008||Xl==100520||Xl==101032||Xl==101544||Xl==103592||Xl==104104||Xl==104616||Xl==105128||Xl==105640||Xl==106152||Xl==107688||Xl==110760||Xl==111272||Xl==112808||Xl==113832||Xl==114344||Xl==114856||Xl==115368||Xl==115880||Xl==116904||Xl==117416||Xl==117928||Xl==118440||Xl==118952||Xl==119464||Xl==119976||Xl==122536||Xl==123048||Xl==123560||Xl==124072||Xl==125608||Xl==126632||Xl==127144||Xl==127656||Xl==129704||Xl==130216||Xl==130728||Xl==131240||Xl==131752||Xl==132264||Xl==132776||Xl==133288||Xl==134312||Xl==134824||Xl==136360||Xl==136872||Xl==137384||Xl==137896||Xl==139432||Xl==139944||Xl==141480||Xl==144040||Xl==145064)&&Ml(168),Bl(268),Pl(),Rf(),Ml(165),Bl(268),Pl(),Rf();switch(Jl){case 82:jl(72);break;default:Xl=Jl}if(Xl==110162){Xl=Ul(14,$l);if(Xl==0){var a=Vl,f=$l,l=Jl,c=Kl,h=Ql,p=Gl,d=Yl,v=Zl;try{_l(82),Bl(72),_l(215),Bl(268),Uf(),Xl=-1}catch(m){Xl=-2}Vl=a,$l=f,Jl=l,Jl==0?lc=f:(Kl=c,Ql=h,Gl=p,Gl==0?lc=h:(Yl=d,Zl=v,lc=v)),Rl(14,$l,Xl)}}Xl==-1&&(Ml(82),Bl(72),Ml(215),Bl(268),Pl(),Rf());break;default:Ml(161),Bl(269);switch(Jl){case 168:jl(283);break;default:Xl=Jl}if(Xl==18088){Xl=Ul(15,$l);if(Xl==0){var a=Vl,f=$l,l=Jl,c=Kl,h=Ql,p=Gl,d=Yl,v=Zl;try{_l(168),Xl=-1}catch(m){Xl=-2}Vl=a,$l=f,Jl=l,Jl==0?lc=f:(Kl=c,Ql=h,Gl=p,Gl==0?lc=h:(Yl=d,Zl=v,lc=v)),Rl(15,$l,Xl)}}(Xl==-1||Xl==3240||Xl==4264||Xl==4776||Xl==5288||Xl==5800||Xl==9896||Xl==16040||Xl==16552||Xl==17064||Xl==18600||Xl==21160||Xl==22184||Xl==24232||Xl==24744||Xl==28328||Xl==28840||Xl==30888||Xl==35496||Xl==36520||Xl==37544||Xl==38056||Xl==38568||Xl==39080||Xl==40104||Xl==40616||Xl==41128||Xl==41640||Xl==42152||Xl==42664||Xl==43176||Xl==43688||Xl==44200||Xl==44712||Xl==45736||Xl==46248||Xl==46760||Xl==47272||Xl==48296||Xl==48808||Xl==49832||Xl==50344||Xl==50856||Xl==52392||Xl==52904||Xl==53416||Xl==53928||Xl==54440||Xl==54952||Xl==55976||Xl==56488||Xl==57e3||Xl==57512||Xl==58024||Xl==58536||Xl==61096||Xl==61608||Xl==62120||Xl==62632||Xl==63144||Xl==63656||Xl==64168||Xl==64680||Xl==65192||Xl==66216||Xl==66728||Xl==67752||Xl==68264||Xl==68776||Xl==69288||Xl==69800||Xl==70312||Xl==70824||Xl==71336||Xl==72872||Xl==73384||Xl==75432||Xl==75944||Xl==76968||Xl==77992||Xl==78504||Xl==79016||Xl==79528||Xl==80040||Xl==80552||Xl==82600||Xl==83112||Xl==83624||Xl==84136||Xl==84648||Xl==85160||Xl==85672||Xl==86184||Xl==86696||Xl==87208||Xl==88744||Xl==89256||Xl==89768||Xl==90792||Xl==91816||Xl==92840||Xl==93864||Xl==94376||Xl==94888||Xl==95912||Xl==96424||Xl==96936||Xl==99496||Xl==100008||Xl==100520||Xl==101032||Xl==101544||Xl==103592||Xl==104104||Xl==104616||Xl==105128||Xl==105640||Xl==106152||Xl==107688||Xl==110760||Xl==111272||Xl==112808||Xl==113832||Xl==114344||Xl==114856||Xl==115368||Xl==115880||Xl==116904||Xl==117416||Xl==117928||Xl==118440||Xl==118952||Xl==119464||Xl==119976||Xl==122536||Xl==123048||Xl==123560||Xl==124072||Xl==125608||Xl==126632||Xl==127144||Xl==127656||Xl==129704||Xl==130216||Xl==130728||Xl==131240||Xl==131752||Xl==132264||Xl==132776||Xl==133288||Xl==134312||Xl==134824||Xl==136360||Xl==136872||Xl==137384||Xl==137896||Xl==139432||Xl==139944||Xl==141480||Xl==144040||Xl==145064)&&Ml(168),Bl(269),Pl(),El(),Ml(165),Bl(268),Pl(),Rf()}sc.endNonterminal("JSONInsertExpr",$l)}function Jf(){switch(Jl){case 161:jl(269);break;default:Xl=Jl}if(Xl!=9889){Xl=Ul(12,$l);if(Xl==0){var e=Vl,t=$l,n=Jl,r=Kl,i=Ql,s=Gl,o=Yl,u=Zl;try{_l(161),Bl(268);switch(Jl){case 168:jl(270);break;default:Xl=Jl}if(Xl==18088){Xl=Ul(13,$l);if(Xl==0){var a=Vl,f=$l,l=Jl,c=Kl,h=Ql,p=Gl,d=Yl,v=Zl;try{_l(168),Rl(13,f,-1)}catch(m){Vl=a,$l=f,Jl=l,Jl==0?lc=f:(Kl=c,Ql=h,Gl=p,Gl==0?lc=h:(Yl=d,Zl=v,lc=v)),Rl(13,f,-2)}Xl=-2}}(Xl==-1||Xl==3240||Xl==4264||Xl==4776||Xl==5288||Xl==5800||Xl==16040||Xl==16552||Xl==17064||Xl==18600||Xl==21160||Xl==22184||Xl==24232||Xl==24744||Xl==28328||Xl==28840||Xl==30888||Xl==35496||Xl==36520||Xl==37544||Xl==38056||Xl==38568||Xl==39080||Xl==40104||Xl==40616||Xl==41128||Xl==41640||Xl==42152||Xl==42664||Xl==43176||Xl==43688||Xl==44200||Xl==44712||Xl==45736||Xl==46248||Xl==46760||Xl==47272||Xl==48296||Xl==48808||Xl==49832||Xl==50344||Xl==50856||Xl==52392||Xl==52904||Xl==53416||Xl==53928||Xl==54440||Xl==54952||Xl==55976||Xl==56488||Xl==57e3||Xl==57512||Xl==58024||Xl==58536||Xl==61096||Xl==61608||Xl==62120||Xl==62632||Xl==63144||Xl==63656||Xl==64168||Xl==64680||Xl==65192||Xl==66216||Xl==66728||Xl==67752||Xl==68264||Xl==68776||Xl==69288||Xl==69800||Xl==70312||Xl==70824||Xl==71336||Xl==72872||Xl==73384||Xl==75432||Xl==75944||Xl==76968||Xl==77992||Xl==78504||Xl==79016||Xl==79528||Xl==80040||Xl==80552||Xl==82600||Xl==83112||Xl==83624||Xl==84136||Xl==84648||Xl==85160||Xl==85672||Xl==86184||Xl==86696||Xl==87208||Xl==88744||Xl==89256||Xl==89768||Xl==90792||Xl==91816||Xl==92840||Xl==93864||Xl==94376||Xl==94888||Xl==95912||Xl==96424||Xl==96936||Xl==99496||Xl==100008||Xl==100520||Xl==101032||Xl==101544||Xl==103592||Xl==104104||Xl==104616||Xl==105128||Xl==105640||Xl==106152||Xl==107688||Xl==110760||Xl==111272||Xl==112808||Xl==113832||Xl==114344||Xl==114856||Xl==115368||Xl==115880||Xl==116904||Xl==117416||Xl==117928||Xl==118440||Xl==118952||Xl==119464||Xl==119976||Xl==122536||Xl==123048||Xl==123560||Xl==124072||Xl==125608||Xl==126632||Xl==127144||Xl==127656||Xl==129704||Xl==130216||Xl==130728||Xl==131240||Xl==131752||Xl==132264||Xl==132776||Xl==133288||Xl==134312||Xl==134824||Xl==136360||Xl==136872||Xl==137384||Xl==137896||Xl==139432||Xl==139944||Xl==141480||Xl==144040||Xl==145064)&&_l(168),Bl(268),Uf(),_l(165),Bl(268),Uf();switch(Jl){case 82:jl(72);break;default:Xl=Jl}if(Xl==110162){Xl=Ul(14,$l);if(Xl==0){var a=Vl,f=$l,l=Jl,c=Kl,h=Ql,p=Gl,d=Yl,v=Zl;try{_l(82),Bl(72),_l(215),Bl(268),Uf(),Rl(14,f,-1)}catch(m){Vl=a,$l=f,Jl=l,Jl==0?lc=f:(Kl=c,Ql=h,Gl=p,Gl==0?lc=h:(Yl=d,Zl=v,lc=v)),Rl(14,f,-2)}Xl=-2}}Xl==-1&&(_l(82),Bl(72),_l(215),Bl(268),Uf()),Rl(12,t,-1),Xl=-3}catch(g){Xl=-2,Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Rl(12,t,-2)}}}switch(Xl){case-1:_l(161),Bl(268);switch(Jl){case 168:jl(270);break;default:Xl=Jl}if(Xl==18088){Xl=Ul(13,$l);if(Xl==0){var a=Vl,f=$l,l=Jl,c=Kl,h=Ql,p=Gl,d=Yl,v=Zl;try{_l(168),Rl(13,f,-1)}catch(m){Vl=a,$l=f,Jl=l,Jl==0?lc=f:(Kl=c,Ql=h,Gl=p,Gl==0?lc=h:(Yl=d,Zl=v,lc=v)),Rl(13,f,-2)}Xl=-2}}(Xl==-1||Xl==3240||Xl==4264||Xl==4776||Xl==5288||Xl==5800||Xl==16040||Xl==16552||Xl==17064||Xl==18600||Xl==21160||Xl==22184||Xl==24232||Xl==24744||Xl==28328||Xl==28840||Xl==30888||Xl==35496||Xl==36520||Xl==37544||Xl==38056||Xl==38568||Xl==39080||Xl==40104||Xl==40616||Xl==41128||Xl==41640||Xl==42152||Xl==42664||Xl==43176||Xl==43688||Xl==44200||Xl==44712||Xl==45736||Xl==46248||Xl==46760||Xl==47272||Xl==48296||Xl==48808||Xl==49832||Xl==50344||Xl==50856||Xl==52392||Xl==52904||Xl==53416||Xl==53928||Xl==54440||Xl==54952||Xl==55976||Xl==56488||Xl==57e3||Xl==57512||Xl==58024||Xl==58536||Xl==61096||Xl==61608||Xl==62120||Xl==62632||Xl==63144||Xl==63656||Xl==64168||Xl==64680||Xl==65192||Xl==66216||Xl==66728||Xl==67752||Xl==68264||Xl==68776||Xl==69288||Xl==69800||Xl==70312||Xl==70824||Xl==71336||Xl==72872||Xl==73384||Xl==75432||Xl==75944||Xl==76968||Xl==77992||Xl==78504||Xl==79016||Xl==79528||Xl==80040||Xl==80552||Xl==82600||Xl==83112||Xl==83624||Xl==84136||Xl==84648||Xl==85160||Xl==85672||Xl==86184||Xl==86696||Xl==87208||Xl==88744||Xl==89256||Xl==89768||Xl==90792||Xl==91816||Xl==92840||Xl==93864||Xl==94376||Xl==94888||Xl==95912||Xl==96424||Xl==96936||Xl==99496||Xl==100008||Xl==100520||Xl==101032||Xl==101544||Xl==103592||Xl==104104||Xl==104616||Xl==105128||Xl==105640||Xl==106152||Xl==107688||Xl==110760||Xl==111272||Xl==112808||Xl==113832||Xl==114344||Xl==114856||Xl==115368||Xl==115880||Xl==116904||Xl==117416||Xl==117928||Xl==118440||Xl==118952||Xl==119464||Xl==119976||Xl==122536||Xl==123048||Xl==123560||Xl==124072||Xl==125608||Xl==126632||Xl==127144||Xl==127656||Xl==129704||Xl==130216||Xl==130728||Xl==131240||Xl==131752||Xl==132264||Xl==132776||Xl==133288||Xl==134312||Xl==134824||Xl==136360||Xl==136872||Xl==137384||Xl==137896||Xl==139432||Xl==139944||Xl==141480||Xl==144040||Xl==145064)&&_l(168),Bl(268),Uf(),_l(165),Bl(268),Uf();switch(Jl){case 82:jl(72);break;default:Xl=Jl}if(Xl==110162){Xl=Ul(14,$l);if(Xl==0){var a=Vl,f=$l,l=Jl,c=Kl,h=Ql,p=Gl,d=Yl,v=Zl;try{_l(82),Bl(72),_l(215),Bl(268),Uf(),Rl(14,f,-1)}catch(m){Vl=a,$l=f,Jl=l,Jl==0?lc=f:(Kl=c,Ql=h,Gl=p,Gl==0?lc=h:(Yl=d,Zl=v,lc=v)),Rl(14,f,-2)}Xl=-2}}Xl==-1&&(_l(82),Bl(72),_l(215),Bl(268),Uf());break;case-3:break;default:_l(161),Bl(269);switch(Jl){case 168:jl(283);break;default:Xl=Jl}if(Xl==18088){Xl=Ul(15,$l);if(Xl==0){var a=Vl,f=$l,l=Jl,c=Kl,h=Ql,p=Gl,d=Yl,v=Zl;try{_l(168),Rl(15,f,-1)}catch(m){Vl=a,$l=f,Jl=l,Jl==0?lc=f:(Kl=c,Ql=h,Gl=p,Gl==0?lc=h:(Yl=d,Zl=v,lc=v)),Rl(15,f,-2)}Xl=-2}}(Xl==-1||Xl==3240||Xl==4264||Xl==4776||Xl==5288||Xl==5800||Xl==9896||Xl==16040||Xl==16552||Xl==17064||Xl==18600||Xl==21160||Xl==22184||Xl==24232||Xl==24744||Xl==28328||Xl==28840||Xl==30888||Xl==35496||Xl==36520||Xl==37544||Xl==38056||Xl==38568||Xl==39080||Xl==40104||Xl==40616||Xl==41128||Xl==41640||Xl==42152||Xl==42664||Xl==43176||Xl==43688||Xl==44200||Xl==44712||Xl==45736||Xl==46248||Xl==46760||Xl==47272||Xl==48296||Xl==48808||Xl==49832||Xl==50344||Xl==50856||Xl==52392||Xl==52904||Xl==53416||Xl==53928||Xl==54440||Xl==54952||Xl==55976||Xl==56488||Xl==57e3||Xl==57512||Xl==58024||Xl==58536||Xl==61096||Xl==61608||Xl==62120||Xl==62632||Xl==63144||Xl==63656||Xl==64168||Xl==64680||Xl==65192||Xl==66216||Xl==66728||Xl==67752||Xl==68264||Xl==68776||Xl==69288||Xl==69800||Xl==70312||Xl==70824||Xl==71336||Xl==72872||Xl==73384||Xl==75432||Xl==75944||Xl==76968||Xl==77992||Xl==78504||Xl==79016||Xl==79528||Xl==80040||Xl==80552||Xl==82600||Xl==83112||Xl==83624||Xl==84136||Xl==84648||Xl==85160||Xl==85672||Xl==86184||Xl==86696||Xl==87208||Xl==88744||Xl==89256||Xl==89768||Xl==90792||Xl==91816||Xl==92840||Xl==93864||Xl==94376||Xl==94888||Xl==95912||Xl==96424||Xl==96936||Xl==99496||Xl==100008||Xl==100520||Xl==101032||Xl==101544||Xl==103592||Xl==104104||Xl==104616||Xl==105128||Xl==105640||Xl==106152||Xl==107688||Xl==110760||Xl==111272||Xl==112808||Xl==113832||Xl==114344||Xl==114856||Xl==115368||Xl==115880||Xl==116904||Xl==117416||Xl==117928||Xl==118440||Xl==118952||Xl==119464||Xl==119976||Xl==122536||Xl==123048||Xl==123560||Xl==124072||Xl==125608||Xl==126632||Xl==127144||Xl==127656||Xl==129704||Xl==130216||Xl==130728||Xl==131240||Xl==131752||Xl==132264||Xl==132776||Xl==133288||Xl==134312||Xl==134824||Xl==136360||Xl==136872||Xl==137384||Xl==137896||Xl==139432||Xl==139944||Xl==141480||Xl==144040||Xl==145064)&&_l(168),Bl(269),Sl(),_l(165),Bl(268),Uf()}}function Kf(){sc.startNonterminal("JSONRenameExpr",$l),Ml(222),Bl(261);switch(Jl){case 168:jl(262);break;default:Xl=Jl}if(Xl==18088){Xl=Ul(16,$l);if(Xl==0){var e=Vl,t=$l,n=Jl,r=Kl,i=Ql,s=Gl,o=Yl,u=Zl;try{_l(168),Xl=-1}catch(a){Xl=-2}Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Rl(16,$l,Xl)}}(Xl==-1||Xl==3240||Xl==4264||Xl==4776||Xl==5288||Xl==5800||Xl==16040||Xl==16552||Xl==17064||Xl==28328||Xl==28840||Xl==30888||Xl==35496||Xl==36520||Xl==37544||Xl==38056||Xl==38568||Xl==39080||Xl==40104||Xl==40616||Xl==41128||Xl==41640||Xl==42152||Xl==42664||Xl==43176||Xl==43688||Xl==44200||Xl==44712||Xl==45736||Xl==46248||Xl==46760||Xl==47272||Xl==48296||Xl==48808||Xl==49832||Xl==50344||Xl==50856||Xl==52392||Xl==52904||Xl==53416||Xl==53928||Xl==54440||Xl==54952||Xl==55976||Xl==56488||Xl==57e3||Xl==57512||Xl==58024||Xl==58536||Xl==61096||Xl==61608||Xl==62120||Xl==62632||Xl==63144||Xl==63656||Xl==64168||Xl==64680||Xl==65192||Xl==66216||Xl==66728||Xl==67752||Xl==68264||Xl==68776||Xl==69288||Xl==69800||Xl==70312||Xl==70824||Xl==71336||Xl==72872||Xl==73384||Xl==75432||Xl==75944||Xl==76968||Xl==77992||Xl==78504||Xl==79016||Xl==79528||Xl==80040||Xl==80552||Xl==82600||Xl==83112||Xl==83624||Xl==84136||Xl==84648||Xl==85160||Xl==85672||Xl==86184||Xl==86696||Xl==87208||Xl==88744||Xl==89256||Xl==89768||Xl==90792||Xl==91816||Xl==92840||Xl==93864||Xl==94376||Xl==94888||Xl==95912||Xl==96424||Xl==96936||Xl==99496||Xl==100008||Xl==101032||Xl==101544||Xl==103592||Xl==104104||Xl==104616||Xl==105128||Xl==105640||Xl==106152||Xl==107688||Xl==110760||Xl==111272||Xl==112808||Xl==113832||Xl==114344||Xl==114856||Xl==115368||Xl==115880||Xl==116904||Xl==117416||Xl==117928||Xl==118440||Xl==118952||Xl==119464||Xl==119976||Xl==122536||Xl==123048||Xl==123560||Xl==124072||Xl==125608||Xl==126632||Xl==127144||Xl==127656||Xl==129704||Xl==130216||Xl==130728||Xl==131240||Xl==131752||Xl==132264||Xl==132776||Xl==133288||Xl==134312||Xl==134824||Xl==136360||Xl==136872||Xl==137384||Xl==137896||Xl==139432||Xl==139944||Xl==141480||Xl==144040||Xl==145064)&&Ml(168),Bl(261),Pl(),Gr(),Ml(80),Bl(268),Pl(),Rf(),sc.endNonterminal("JSONRenameExpr",$l)}function Qf(){_l(222),Bl(261);switch(Jl){case 168:jl(262);break;default:Xl=Jl}if(Xl==18088){Xl=Ul(16,$l);if(Xl==0){var e=Vl,t=$l,n=Jl,r=Kl,i=Ql,s=Gl,o=Yl,u=Zl;try{_l(168),Rl(16,t,-1)}catch(a){Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Rl(16,t,-2)}Xl=-2}}(Xl==-1||Xl==3240||Xl==4264||Xl==4776||Xl==5288||Xl==5800||Xl==16040||Xl==16552||Xl==17064||Xl==28328||Xl==28840||Xl==30888||Xl==35496||Xl==36520||Xl==37544||Xl==38056||Xl==38568||Xl==39080||Xl==40104||Xl==40616||Xl==41128||Xl==41640||Xl==42152||Xl==42664||Xl==43176||Xl==43688||Xl==44200||Xl==44712||Xl==45736||Xl==46248||Xl==46760||Xl==47272||Xl==48296||Xl==48808||Xl==49832||Xl==50344||Xl==50856||Xl==52392||Xl==52904||Xl==53416||Xl==53928||Xl==54440||Xl==54952||Xl==55976||Xl==56488||Xl==57e3||Xl==57512||Xl==58024||Xl==58536||Xl==61096||Xl==61608||Xl==62120||Xl==62632||Xl==63144||Xl==63656||Xl==64168||Xl==64680||Xl==65192||Xl==66216||Xl==66728||Xl==67752||Xl==68264||Xl==68776||Xl==69288||Xl==69800||Xl==70312||Xl==70824||Xl==71336||Xl==72872||Xl==73384||Xl==75432||Xl==75944||Xl==76968||Xl==77992||Xl==78504||Xl==79016||Xl==79528||Xl==80040||Xl==80552||Xl==82600||Xl==83112||Xl==83624||Xl==84136||Xl==84648||Xl==85160||Xl==85672||Xl==86184||Xl==86696||Xl==87208||Xl==88744||Xl==89256||Xl==89768||Xl==90792||Xl==91816||Xl==92840||Xl==93864||Xl==94376||Xl==94888||Xl==95912||Xl==96424||Xl==96936||Xl==99496||Xl==100008||Xl==101032||Xl==101544||Xl==103592||Xl==104104||Xl==104616||Xl==105128||Xl==105640||Xl==106152||Xl==107688||Xl==110760||Xl==111272||Xl==112808||Xl==113832||Xl==114344||Xl==114856||Xl==115368||Xl==115880||Xl==116904||Xl==117416||Xl==117928||Xl==118440||Xl==118952||Xl==119464||Xl==119976||Xl==122536||Xl==123048||Xl==123560||Xl==124072||Xl==125608||Xl==126632||Xl==127144||Xl==127656||Xl==129704||Xl==130216||Xl==130728||Xl==131240||Xl==131752||Xl==132264||Xl==132776||Xl==133288||Xl==134312||Xl==134824||Xl==136360||Xl==136872||Xl==137384||Xl==137896||Xl==139432||Xl==139944||Xl==141480||Xl==144040||Xl==145064)&&_l(168),Bl(261),Yr(),_l(80),Bl(268),Uf()}function Gf(){sc.startNonterminal("JSONReplaceExpr",$l),Ml(223),Bl(84),Ml(267),Bl(67),Ml(200),Bl(59),Ml(168),Bl(261),Pl(),Gr(),Ml(276),Bl(268),Pl(),Rf(),sc.endNonterminal("JSONReplaceExpr",$l)}function Yf(){_l(223),Bl(84),_l(267),Bl(67),_l(200),Bl(59),_l(168),Bl(261),Yr(),_l(276),Bl(268),Uf()}function Zf(){sc.startNonterminal("JSONAppendExpr",$l),Ml(78),Bl(268);switch(Jl){case 168:jl(270);break;default:Xl=Jl}if(Xl==18088){Xl=Ul(17,$l);if(Xl==0){var e=Vl,t=$l,n=Jl,r=Kl,i=Ql,s=Gl,o=Yl,u=Zl;try{_l(168),Xl=-1}catch(a){Xl=-2}Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Rl(17,$l,Xl)}}(Xl==-1||Xl==3240||Xl==4264||Xl==4776||Xl==5288||Xl==5800||Xl==16040||Xl==16552||Xl==17064||Xl==18600||Xl==21160||Xl==22184||Xl==24232||Xl==24744||Xl==28328||Xl==28840||Xl==30888||Xl==35496||Xl==36520||Xl==37544||Xl==38056||Xl==38568||Xl==39080||Xl==40104||Xl==40616||Xl==41128||Xl==41640||Xl==42152||Xl==42664||Xl==43176||Xl==43688||Xl==44200||Xl==44712||Xl==45736||Xl==46248||Xl==46760||Xl==47272||Xl==48296||Xl==48808||Xl==49832||Xl==50344||Xl==50856||Xl==52392||Xl==52904||Xl==53416||Xl==53928||Xl==54440||Xl==54952||Xl==55976||Xl==56488||Xl==57e3||Xl==57512||Xl==58024||Xl==58536||Xl==61096||Xl==61608||Xl==62120||Xl==62632||Xl==63144||Xl==63656||Xl==64168||Xl==64680||Xl==65192||Xl==66216||Xl==66728||Xl==67752||Xl==68264||Xl==68776||Xl==69288||Xl==69800||Xl==70312||Xl==70824||Xl==71336||Xl==72872||Xl==73384||Xl==75432||Xl==75944||Xl==76968||Xl==77992||Xl==78504||Xl==79016||Xl==79528||Xl==80040||Xl==80552||Xl==82600||Xl==83112||Xl==83624||Xl==84136||Xl==84648||Xl==85160||Xl==85672||Xl==86184||Xl==86696||Xl==87208||Xl==88744||Xl==89256||Xl==89768||Xl==90792||Xl==91816||Xl==92840||Xl==93864||Xl==94376||Xl==94888||Xl==95912||Xl==96424||Xl==96936||Xl==99496||Xl==100008||Xl==100520||Xl==101032||Xl==101544||Xl==103592||Xl==104104||Xl==104616||Xl==105128||Xl==105640||Xl==106152||Xl==107688||Xl==110760||Xl==111272||Xl==112808||Xl==113832||Xl==114344||Xl==114856||Xl==115368||Xl==115880||Xl==116904||Xl==117416||Xl==117928||Xl==118440||Xl==118952||Xl==119464||Xl==119976||Xl==122536||Xl==123048||Xl==123560||Xl==124072||Xl==125608||Xl==126632||Xl==127144||Xl==127656||Xl==129704||Xl==130216||Xl==130728||Xl==131240||Xl==131752||Xl==132264||Xl==132776||Xl==133288||Xl==134312||Xl==134824||Xl==136360||Xl==136872||Xl==137384||Xl==137896||Xl==139432||Xl==139944||Xl==141480||Xl==144040||Xl==145064)&&Ml(168),Bl(268),Pl(),Rf(),Ml(165),Bl(268),Pl(),Rf(),sc.endNonterminal("JSONAppendExpr",$l)}function el(){_l(78),Bl(268);switch(Jl){case 168:jl(270);break;default:Xl=Jl}if(Xl==18088){Xl=Ul(17,$l);if(Xl==0){var e=Vl,t=$l,n=Jl,r=Kl,i=Ql,s=Gl,o=Yl,u=Zl;try{_l(168),Rl(17,t,-1)}catch(a){Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Rl(17,t,-2)}Xl=-2}}(Xl==-1||Xl==3240||Xl==4264||Xl==4776||Xl==5288||Xl==5800||Xl==16040||Xl==16552||Xl==17064||Xl==18600||Xl==21160||Xl==22184||Xl==24232||Xl==24744||Xl==28328||Xl==28840||Xl==30888||Xl==35496||Xl==36520||Xl==37544||Xl==38056||Xl==38568||Xl==39080||Xl==40104||Xl==40616||Xl==41128||Xl==41640||Xl==42152||Xl==42664||Xl==43176||Xl==43688||Xl==44200||Xl==44712||Xl==45736||Xl==46248||Xl==46760||Xl==47272||Xl==48296||Xl==48808||Xl==49832||Xl==50344||Xl==50856||Xl==52392||Xl==52904||Xl==53416||Xl==53928||Xl==54440||Xl==54952||Xl==55976||Xl==56488||Xl==57e3||Xl==57512||Xl==58024||Xl==58536||Xl==61096||Xl==61608||Xl==62120||Xl==62632||Xl==63144||Xl==63656||Xl==64168||Xl==64680||Xl==65192||Xl==66216||Xl==66728||Xl==67752||Xl==68264||Xl==68776||Xl==69288||Xl==69800||Xl==70312||Xl==70824||Xl==71336||Xl==72872||Xl==73384||Xl==75432||Xl==75944||Xl==76968||Xl==77992||Xl==78504||Xl==79016||Xl==79528||Xl==80040||Xl==80552||Xl==82600||Xl==83112||Xl==83624||Xl==84136||Xl==84648||Xl==85160||Xl==85672||Xl==86184||Xl==86696||Xl==87208||Xl==88744||Xl==89256||Xl==89768||Xl==90792||Xl==91816||Xl==92840||Xl==93864||Xl==94376||Xl==94888||Xl==95912||Xl==96424||Xl==96936||Xl==99496||Xl==100008||Xl==100520||Xl==101032||Xl==101544||Xl==103592||Xl==104104||Xl==104616||Xl==105128||Xl==105640||Xl==106152||Xl==107688||Xl==110760||Xl==111272||Xl==112808||Xl==113832||Xl==114344||Xl==114856||Xl==115368||Xl==115880||Xl==116904||Xl==117416||Xl==117928||Xl==118440||Xl==118952||Xl==119464||Xl==119976||Xl==122536||Xl==123048||Xl==123560||Xl==124072||Xl==125608||Xl==126632||Xl==127144||Xl==127656||Xl==129704||Xl==130216||Xl==130728||Xl==131240||Xl==131752||Xl==132264||Xl==132776||Xl==133288||Xl==134312||Xl==134824||Xl==136360||Xl==136872||Xl==137384||Xl==137896||Xl==139432||Xl==139944||Xl==141480||Xl==144040||Xl==145064)&&_l(168),Bl(268),Uf(),_l(165),Bl(268),Uf()}function tl(){sc.startNonterminal("CommonContent",$l);switch(Jl){case 12:Ml(12);break;case 23:Ml(23);break;case 282:Ml(282);break;case 288:Ml(288);break;default:kl()}sc.endNonterminal("CommonContent",$l)}function nl(){switch(Jl){case 12:_l(12);break;case 23:_l(23);break;case 282:_l(282);break;case 288:_l(288);break;default:Ll()}}function rl(){sc.startNonterminal("ContentExpr",$l),ef(),sc.endNonterminal("ContentExpr",$l)}function il(){tf()}function sl(){sc.startNonterminal("CompDocConstructor",$l),Ml(120),Bl(89),Pl(),kl(),sc.endNonterminal("CompDocConstructor",$l)}function ol(){_l(120),Bl(89),Ll()}function ul(){sc.startNonterminal("CompAttrConstructor",$l),Ml(83),Bl(251);switch(Jl){case 281:Ml(281),Bl(268),Pl(),Q(),Ml(287);break;default:Pl(),Wa()}Bl(89);switch(Jl){case 281:jl(282);break;default:Xl=Jl}if(Xl==147225){Xl=Ul(18,$l);if(Xl==0){var e=Vl,t=$l,n=Jl,r=Kl,i=Ql,s=Gl,o=Yl,u=Zl;try{_l(281),Bl(90),_l(287),Xl=-1}catch(a){Xl=-2}Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Rl(18,$l,Xl)}}switch(Xl){case-1:Ml(281),Bl(90),Ml(287);break;default:Pl(),kl()}sc.endNonterminal("CompAttrConstructor",$l)}function al(){_l(83),Bl(251);switch(Jl){case 281:_l(281),Bl(268),G(),_l(287);break;default:Xa()}Bl(89);switch(Jl){case 281:jl(282);break;default:Xl=Jl}if(Xl==147225){Xl=Ul(18,$l);if(Xl==0){var e=Vl,t=$l,n=Jl,r=Kl,i=Ql,s=Gl,o=Yl,u=Zl;try{_l(281),Bl(90),_l(287),Rl(18,t,-1),Xl=-3}catch(a){Xl=-2,Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Rl(18,t,-2)}}}switch(Xl){case-1:_l(281),Bl(90),_l(287);break;case-3:break;default:Ll()}}function fl(){sc.startNonterminal("CompPIConstructor",$l),Ml(220),Bl(243);switch(Jl){case 281:Ml(281),Bl(268),Pl(),Q(),Ml(287);break;default:Pl(),Ja()}Bl(89);switch(Jl){case 281:jl(282);break;default:Xl=Jl}if(Xl==147225){Xl=Ul(19,$l);if(Xl==0){var e=Vl,t=$l,n=Jl,r=Kl,i=Ql,s=Gl,o=Yl,u=Zl;try{_l(281),Bl(90),_l(287),Xl=-1}catch(a){Xl=-2}Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Rl(19,$l,Xl)}}switch(Xl){case-1:Ml(281),Bl(90),Ml(287);break;default:Pl(),kl()}sc.endNonterminal("CompPIConstructor",$l)}function ll(){_l(220),Bl(243);switch(Jl){case 281:_l(281),Bl(268),G(),_l(287);break;default:Ka()}Bl(89);switch(Jl){case 281:jl(282);break;default:Xl=Jl}if(Xl==147225){Xl=Ul(19,$l);if(Xl==0){var e=Vl,t=$l,n=Jl,r=Kl,i=Ql,s=Gl,o=Yl,u=Zl;try{_l(281),Bl(90),_l(287),Rl(19,t,-1),Xl=-3}catch(a){Xl=-2,Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Rl(19,t,-2)}}}switch(Xl){case-1:_l(281),Bl(90),_l(287);break;case-3:break;default:Ll()}}function cl(){sc.startNonterminal("CompCommentConstructor",$l),Ml(97),Bl(89),Pl(),kl(),sc.endNonterminal("CompCommentConstructor",$l)}function hl(){_l(97),Bl(89),Ll()}function pl(){sc.startNonterminal("CompTextConstructor",$l),Ml(249),Bl(89),Pl(),kl(),sc.endNonterminal("CompTextConstructor",$l)}function dl(){_l(249),Bl(89),Ll()}function vl(){sc.startNonterminal("PrimaryExpr",$l);switch(Jl){case 187:jl(248);break;case 220:jl(246);break;case 281:jl(284);break;case 83:case 122:jl(254);break;case 97:case 249:jl(96);break;case 120:case 206:case 262:jl(146);break;case 135:case 197:case 255:jl(238);break;case 6:case 71:case 73:case 74:case 75:case 76:case 78:case 80:case 81:case 82:case 84:case 85:case 86:case 87:case 89:case 90:case 91:case 92:case 94:case 95:case 98:case 99:case 102:case 103:case 104:case 105:case 106:case 107:case 109:case 110:case 111:case 112:case 113:case 114:case 119:case 123:case 124:case 126:case 127:case 129:case 130:case 132:case 133:case 134:case 136:case 137:case 138:case 139:case 142:case 143:case 148:case 150:case 152:case 153:case 155:case 156:case 157:case 161:case 162:case 163:case 164:case 165:case 166:case 168:case 170:case 173:case 174:case 175:case 177:case 179:case 181:case 183:case 184:case 185:case 189:case 195:case 198:case 202:case 203:case 204:case 205:case 207:case 210:case 216:case 217:case 222:case 223:case 224:case 225:case 226:case 228:case 229:case 232:case 233:case 234:case 239:case 240:case 241:case 242:case 245:case 253:case 254:case 256:case 257:case 258:case 260:case 263:case 266:case 267:case 268:case 269:case 272:case 273:case 276:jl(94);break;default:Xl=Jl}if(Xl==3353||Xl==4377||Xl==4889||Xl==5401||Xl==5913||Xl==16153||Xl==16665||Xl==17177||Xl==18055||Xl==18117||Xl==18175||Xl==18201||Xl==18713||Xl==21273||Xl==22297||Xl==24345||Xl==24857||Xl==28441||Xl==28953||Xl==31001||Xl==35609||Xl==36633||Xl==37657||Xl==38169||Xl==38681||Xl==39193||Xl==40217||Xl==40729||Xl==41241||Xl==41753||Xl==42265||Xl==42777||Xl==43289||Xl==43801||Xl==44313||Xl==44825||Xl==45849||Xl==46361||Xl==46873||Xl==47385||Xl==48409||Xl==48921||Xl==49945||Xl==50457||Xl==50969||Xl==52505||Xl==53017||Xl==53529||Xl==54041||Xl==54553||Xl==55065||Xl==56089||Xl==56601||Xl==57113||Xl==57625||Xl==58137||Xl==58649||Xl==61209||Xl==61721||Xl==62233||Xl==62745||Xl==63257||Xl==63769||Xl==64281||Xl==64793||Xl==65305||Xl==66329||Xl==66841||Xl==67865||Xl==68377||Xl==68889||Xl==69401||Xl==69913||Xl==70425||Xl==70937||Xl==71449||Xl==72985||Xl==73497||Xl==75545||Xl==76057||Xl==77081||Xl==78105||Xl==78617||Xl==79129||Xl==79641||Xl==80153||Xl==80665||Xl==82713||Xl==83225||Xl==83737||Xl==84249||Xl==84761||Xl==85273||Xl==85785||Xl==86297||Xl==86809||Xl==87321||Xl==88857||Xl==89369||Xl==89881||Xl==90905||Xl==91929||Xl==92953||Xl==93977||Xl==94489||Xl==95001||Xl==96025||Xl==96537||Xl==97049||Xl==99609||Xl==100121||Xl==100633||Xl==101145||Xl==101657||Xl==103705||Xl==104217||Xl==104729||Xl==105241||Xl==105753||Xl==106265||Xl==107801||Xl==110873||Xl==111385||Xl==112921||Xl==113945||Xl==114457||Xl==114969||Xl==115481||Xl==115993||Xl==117017||Xl==117529||Xl==118041||Xl==118553||Xl==119065||Xl==119577||Xl==120089||Xl==122649||Xl==123161||Xl==123673||Xl==124185||Xl==125721||Xl==126745||Xl==127257||Xl==127769||Xl==129817||Xl==130329||Xl==130841||Xl==131353||Xl==131865||Xl==132377||Xl==132889||Xl==133401||Xl==134425||Xl==134937||Xl==136473||Xl==136985||Xl==137497||Xl==138009||Xl==139545||Xl==140057||Xl==141593||Xl==144153||Xl==145177||Xl==147225){Xl=Ul(20,$l);if(Xl==0){var e=Vl,t=$l,n=Jl,r=Kl,i=Ql,s=Gl,o=Yl,u=Zl;try{hi(),Xl=-1}catch(a){try{Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),_i(),Xl=-5}catch(f){try{Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Ll(),Xl=-10}catch(l){Xl=-11}}}Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Rl(20,$l,Xl)}}switch(Xl){case-1:case 8:case 9:case 10:case 11:case 12935:case 12997:case 13055:case 13447:case 13509:case 13567:case 13959:case 14021:case 14079:case 19591:case 19653:case 19711:case 20103:case 20165:case 20223:case 21127:case 21189:case 21247:case 21639:case 21701:case 21759:case 22151:case 22213:case 22271:case 23175:case 23237:case 23295:case 24199:case 24261:case 24319:case 24711:case 24773:case 24831:case 25735:case 25797:case 25855:case 27783:case 27845:case 27903:case 28295:case 28357:case 28415:case 29831:case 29893:case 29951:case 30343:case 30405:case 30463:case 31367:case 31429:case 31487:case 31879:case 31941:case 31999:case 32391:case 32453:case 32511:case 32903:case 32965:case 33023:case 35463:case 35525:case 35583:case 35975:case 36037:case 36095:case 36487:case 36549:case 36607:case 39047:case 39109:case 39167:case 41095:case 41157:case 41215:case 41607:case 41669:case 41727:case 42119:case 42181:case 42239:case 43655:case 43717:case 43775:case 45191:case 45253:case 45311:case 45703:case 45765:case 45823:case 46215:case 46277:case 46335:case 46727:case 46789:case 46847:case 48775:case 48837:case 48895:case 51335:case 51397:case 51455:case 54407:case 54469:case 54527:case 56455:case 56517:case 56575:case 58503:case 58565:case 58623:case 61063:case 61125:case 61183:case 63111:case 63173:case 63231:case 63623:case 63685:case 63743:case 65159:case 65221:case 65279:case 66183:case 66245:case 66303:case 67719:case 67781:case 67839:case 71303:case 71365:case 71423:case 72839:case 72901:case 72959:case 75911:case 75973:case 76031:case 76935:case 76997:case 77055:case 77959:case 78021:case 78079:case 78471:case 78533:case 78591:case 83079:case 83141:case 83199:case 84103:case 84165:case 84223:case 84615:case 84677:case 84735:case 85127:case 85189:case 85247:case 89735:case 89797:case 89855:case 90759:case 90821:case 90879:case 92807:case 92869:case 92927:case 93831:case 93893:case 93951:case 94343:case 94405:case 94463:case 96903:case 96965:case 97023:case 103559:case 103621:case 103679:case 104583:case 104645:case 104703:case 105095:case 105157:case 105215:case 107143:case 107205:case 107263:case 114823:case 114885:case 114943:case 116871:case 116933:case 116991:case 119431:case 119493:case 119551:case 121479:case 121541:case 121599:case 123527:case 123589:case 123647:case 124039:case 124101:case 124159:case 129159:case 129221:case 129279:case 129671:case 129733:case 129791:case 130183:case 130245:case 130303:case 133255:case 133317:case 133375:case 139399:case 139461:case 139519:case 141447:case 141509:case 141567:case 142983:case 143045:case 143103:case 145543:case 145605:case 145663:case 146055:case 146117:case 146175:case 146567:case 146629:case 146687:case 147079:case 147141:case 147199:ci();break;case 31:bi();break;case 35:xi();break;case 32:Ni();break;case-5:case 17926:case 17991:case 17993:case 17994:case 17995:case 17996:case 17998:case 18e3:case 18001:case 18002:case 18004:case 18005:case 18006:case 18007:case 18009:case 18010:case 18011:case 18012:case 18014:case 18015:case 18018:case 18019:case 18022:case 18023:case 18024:case 18025:case 18026:case 18027:case 18029:case 18030:case 18031:case 18032:case 18033:case 18034:case 18039:case 18040:case 18043:case 18044:case 18046:case 18047:case 18049:case 18050:case 18052:case 18053:case 18054:case 18056:case 18057:case 18058:case 18059:case 18062:case 18063:case 18068:case 18070:case 18072:case 18073:case 18075:case 18076:case 18077:case 18081:case 18082:case 18083:case 18084:case 18085:case 18086:case 18088:case 18090:case 18093:case 18094:case 18095:case 18097:case 18099:case 18101:case 18103:case 18104:case 18105:case 18107:case 18109:case 18115:case 18118:case 18122:case 18123:case 18124:case 18125:case 18126:case 18127:case 18130:case 18136:case 18137:case 18142:case 18143:case 18144:case 18145:case 18146:case 18148:case 18149:case 18152:case 18153:case 18154:case 18159:case 18160:case 18161:case 18162:case 18165:case 18173:case 18174:case 18176:case 18177:case 18178:case 18180:case 18182:case 18183:case 18186:case 18187:case 18188:case 18189:case 18192:case 18193:case 18196:Mi();break;case 144078:ki();break;case 144134:Ai();break;case 33:case 79:case 121:case 125:case 147:case 154:case 167:case 169:case 188:case 194:case 230:case 231:case 247:case 248:case 259:case 14854:case 14919:case 14921:case 14922:case 14923:case 14924:case 14926:case 14928:case 14929:case 14930:case 14931:case 14932:case 14933:case 14934:case 14935:case 14937:case 14938:case 14939:case 14940:case 14942:case 14943:case 14945:case 14946:case 14947:case 14950:case 14951:case 14952:case 14953:case 14954:case 14955:case 14957:case 14958:case 14959:case 14960:case 14961:case 14962:case 14967:case 14968:case 14970:case 14971:case 14972:case 14974:case 14975:case 14977:case 14978:case 14980:case 14981:case 14982:case 14983:case 14984:case 14985:case 14986:case 14987:case 14990:case 14991:case 14996:case 14998:case 15e3:case 15001:case 15003:case 15004:case 15005:case 15009:case 15010:case 15011:case 15012:case 15013:case 15014:case 15016:case 15018:case 15021:case 15022:case 15023:case 15025:case 15027:case 15029:case 15031:case 15032:case 15033:case 15035:case 15037:case 15043:case 15045:case 15046:case 15050:case 15051:case 15052:case 15053:case 15054:case 15055:case 15058:case 15064:case 15065:case 15068:case 15070:case 15071:case 15072:case 15073:case 15074:case 15076:case 15077:case 15080:case 15081:case 15082:case 15087:case 15088:case 15089:case 15090:case 15093:case 15097:case 15101:case 15102:case 15103:case 15104:case 15105:case 15106:case 15108:case 15110:case 15111:case 15114:case 15115:case 15116:case 15117:case 15120:case 15121:case 15124:vs();break;case-10:case 27929:kl();break;case-11:case 10009:bl();break;case 69:Nl();break;case 283:gl();break;default:ji()}sc.endNonterminal("PrimaryExpr",$l)}function ml(){switch(Jl){case 187:jl(248);break;case 220:jl(246);break;case 281:jl(284);break;case 83:case 122:jl(254);break;case 97:case 249:jl(96);break;case 120:case 206:case 262:jl(146);break;case 135:case 197:case 255:jl(238);break;case 6:case 71:case 73:case 74:case 75:case 76:case 78:case 80:case 81:case 82:case 84:case 85:case 86:case 87:case 89:case 90:case 91:case 92:case 94:case 95:case 98:case 99:case 102:case 103:case 104:case 105:case 106:case 107:case 109:case 110:case 111:case 112:case 113:case 114:case 119:case 123:case 124:case 126:case 127:case 129:case 130:case 132:case 133:case 134:case 136:case 137:case 138:case 139:case 142:case 143:case 148:case 150:case 152:case 153:case 155:case 156:case 157:case 161:case 162:case 163:case 164:case 165:case 166:case 168:case 170:case 173:case 174:case 175:case 177:case 179:case 181:case 183:case 184:case 185:case 189:case 195:case 198:case 202:case 203:case 204:case 205:case 207:case 210:case 216:case 217:case 222:case 223:case 224:case 225:case 226:case 228:case 229:case 232:case 233:case 234:case 239:case 240:case 241:case 242:case 245:case 253:case 254:case 256:case 257:case 258:case 260:case 263:case 266:case 267:case 268:case 269:case 272:case 273:case 276:jl(94);break;default:Xl=Jl}if(Xl==3353||Xl==4377||Xl==4889||Xl==5401||Xl==5913||Xl==16153||Xl==16665||Xl==17177||Xl==18055||Xl==18117||Xl==18175||Xl==18201||Xl==18713||Xl==21273||Xl==22297||Xl==24345||Xl==24857||Xl==28441||Xl==28953||Xl==31001||Xl==35609||Xl==36633||Xl==37657||Xl==38169||Xl==38681||Xl==39193||Xl==40217||Xl==40729||Xl==41241||Xl==41753||Xl==42265||Xl==42777||Xl==43289||Xl==43801||Xl==44313||Xl==44825||Xl==45849||Xl==46361||Xl==46873||Xl==47385||Xl==48409||Xl==48921||Xl==49945||Xl==50457||Xl==50969||Xl==52505||Xl==53017||Xl==53529||Xl==54041||Xl==54553||Xl==55065||Xl==56089||Xl==56601||Xl==57113||Xl==57625||Xl==58137||Xl==58649||Xl==61209||Xl==61721||Xl==62233||Xl==62745||Xl==63257||Xl==63769||Xl==64281||Xl==64793||Xl==65305||Xl==66329||Xl==66841||Xl==67865||Xl==68377||Xl==68889||Xl==69401||Xl==69913||Xl==70425||Xl==70937||Xl==71449||Xl==72985||Xl==73497||Xl==75545||Xl==76057||Xl==77081||Xl==78105||Xl==78617||Xl==79129||Xl==79641||Xl==80153||Xl==80665||Xl==82713||Xl==83225||Xl==83737||Xl==84249||Xl==84761||Xl==85273||Xl==85785||Xl==86297||Xl==86809||Xl==87321||Xl==88857||Xl==89369||Xl==89881||Xl==90905||Xl==91929||Xl==92953||Xl==93977||Xl==94489||Xl==95001||Xl==96025||Xl==96537||Xl==97049||Xl==99609||Xl==100121||Xl==100633||Xl==101145||Xl==101657||Xl==103705||Xl==104217||Xl==104729||Xl==105241||Xl==105753||Xl==106265||Xl==107801||Xl==110873||Xl==111385||Xl==112921||Xl==113945||Xl==114457||Xl==114969||Xl==115481||Xl==115993||Xl==117017||Xl==117529||Xl==118041||Xl==118553||Xl==119065||Xl==119577||Xl==120089||Xl==122649||Xl==123161||Xl==123673||Xl==124185||Xl==125721||Xl==126745||Xl==127257||Xl==127769||Xl==129817||Xl==130329||Xl==130841||Xl==131353||Xl==131865||Xl==132377||Xl==132889||Xl==133401||Xl==134425||Xl==134937||Xl==136473||Xl==136985||Xl==137497||Xl==138009||Xl==139545||Xl==140057||Xl==141593||Xl==144153||Xl==145177||Xl==147225){Xl=Ul(20,$l);if(Xl==0){var e=Vl,t=$l,n=Jl,r=Kl,i=Ql,s=Gl,o=Yl,u=Zl;try{hi(),Rl(20,t,-1),Xl=-14}catch(a){try{Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),_i(),Rl(20,t,-5),Xl=-14}catch(f){try{Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Ll(),Rl(20,t,-10),Xl=-14}catch(l){Xl=-11,Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Rl(20,t,-11)}}}}}switch(Xl){case-1:case 8:case 9:case 10:case 11:case 12935:case 12997:case 13055:case 13447:case 13509:case 13567:case 13959:case 14021:case 14079:case 19591:case 19653:case 19711:case 20103:case 20165:case 20223:case 21127:case 21189:case 21247:case 21639:case 21701:case 21759:case 22151:case 22213:case 22271:case 23175:case 23237:case 23295:case 24199:case 24261:case 24319:case 24711:case 24773:case 24831:case 25735:case 25797:case 25855:case 27783:case 27845:case 27903:case 28295:case 28357:case 28415:case 29831:case 29893:case 29951:case 30343:case 30405:case 30463:case 31367:case 31429:case 31487:case 31879:case 31941:case 31999:case 32391:case 32453:case 32511:case 32903:case 32965:case 33023:case 35463:case 35525:case 35583:case 35975:case 36037:case 36095:case 36487:case 36549:case 36607:case 39047:case 39109:case 39167:case 41095:case 41157:case 41215:case 41607:case 41669:case 41727:case 42119:case 42181:case 42239:case 43655:case 43717:case 43775:case 45191:case 45253:case 45311:case 45703:case 45765:case 45823:case 46215:case 46277:case 46335:case 46727:case 46789:case 46847:case 48775:case 48837:case 48895:case 51335:case 51397:case 51455:case 54407:case 54469:case 54527:case 56455:case 56517:case 56575:case 58503:case 58565:case 58623:case 61063:case 61125:case 61183:case 63111:case 63173:case 63231:case 63623:case 63685:case 63743:case 65159:case 65221:case 65279:case 66183:case 66245:case 66303:case 67719:case 67781:case 67839:case 71303:case 71365:case 71423:case 72839:case 72901:case 72959:case 75911:case 75973:case 76031:case 76935:case 76997:case 77055:case 77959:case 78021:case 78079:case 78471:case 78533:case 78591:case 83079:case 83141:case 83199:case 84103:case 84165:case 84223:case 84615:case 84677:case 84735:case 85127:case 85189:case 85247:case 89735:case 89797:case 89855:case 90759:case 90821:case 90879:case 92807:case 92869:case 92927:case 93831:case 93893:case 93951:case 94343:case 94405:case 94463:case 96903:case 96965:case 97023:case 103559:case 103621:case 103679:case 104583:case 104645:case 104703:case 105095:case 105157:case 105215:case 107143:case 107205:case 107263:case 114823:case 114885:case 114943:case 116871:case 116933:case 116991:case 119431:case 119493:case 119551:case 121479:case 121541:case 121599:case 123527:case 123589:case 123647:case 124039:case 124101:case 124159:case 129159:case 129221:case 129279:case 129671:case 129733:case 129791:case 130183:case 130245:case 130303:case 133255:case 133317:case 133375:case 139399:case 139461:case 139519:case 141447:case 141509:case 141567:case 142983:case 143045:case 143103:case 145543:case 145605:case 145663:case 146055:case 146117:case 146175:case 146567:case 146629:case 146687:case 147079:case 147141:case 147199:hi();break;case 31:wi();break;case 35:Ti();break;case 32:Ci();break;case-5:case 17926:case 17991:case 17993:case 17994:case 17995:case 17996:case 17998:case 18e3:case 18001:case 18002:case 18004:case 18005:case 18006:case 18007:case 18009:case 18010:case 18011:case 18012:case 18014:case 18015:case 18018:case 18019:case 18022:case 18023:case 18024:case 18025:case 18026:case 18027:case 18029:case 18030:case 18031:case 18032:case 18033:case 18034:case 18039:case 18040:case 18043:case 18044:case 18046:case 18047:case 18049:case 18050:case 18052:case 18053:case 18054:case 18056:case 18057:case 18058:case 18059:case 18062:case 18063:case 18068:case 18070:case 18072:case 18073:case 18075:case 18076:case 18077:case 18081:case 18082:case 18083:case 18084:case 18085:case 18086:case 18088:case 18090:case 18093:case 18094:case 18095:case 18097:case 18099:case 18101:case 18103:case 18104:case 18105:case 18107:case 18109:case 18115:case 18118:case 18122:case 18123:case 18124:case 18125:case 18126:case 18127:case 18130:case 18136:case 18137:case 18142:case 18143:case 18144:case 18145:case 18146:case 18148:case 18149:case 18152:case 18153:case 18154:case 18159:case 18160:case 18161:case 18162:case 18165:case 18173:case 18174:case 18176:case 18177:case 18178:case 18180:case 18182:case 18183:case 18186:case 18187:case 18188:case 18189:case 18192:case 18193:case 18196:_i();break;case 144078:Li();break;case 144134:Oi();break;case 33:case 79:case 121:case 125:case 147:case 154:case 167:case 169:case 188:case 194:case 230:case 231:case 247:case 248:case 259:case 14854:case 14919:case 14921:case 14922:case 14923:case 14924:case 14926:case 14928:case 14929:case 14930:case 14931:case 14932:case 14933:case 14934:case 14935:case 14937:case 14938:case 14939:case 14940:case 14942:case 14943:case 14945:case 14946:case 14947:case 14950:case 14951:case 14952:case 14953:case 14954:case 14955:case 14957:case 14958:case 14959:case 14960:case 14961:case 14962:case 14967:case 14968:case 14970:case 14971:case 14972:case 14974:case 14975:case 14977:case 14978:case 14980:case 14981:case 14982:case 14983:case 14984:case 14985:case 14986:case 14987:case 14990:case 14991:case 14996:case 14998:case 15e3:case 15001:case 15003:case 15004:case 15005:case 15009:case 15010:case 15011:case 15012:case 15013:case 15014:case 15016:case 15018:case 15021:case 15022:case 15023:case 15025:case 15027:case 15029:case 15031:case 15032:case 15033:case 15035:case 15037:case 15043:case 15045:case 15046:case 15050:case 15051:case 15052:case 15053:case 15054:case 15055:case 15058:case 15064:case 15065:case 15068:case 15070:case 15071:case 15072:case 15073:case 15074:case 15076:case 15077:case 15080:case 15081:case 15082:case 15087:case 15088:case 15089:case 15090:case 15093:case 15097:case 15101:case 15102:case 15103:case 15104:case 15105:case 15106:case 15108:case 15110:case 15111:case 15114:case 15115:case 15116:case 15117:case 15120:case 15121:case 15124:ms();break;case-10:case 27929:Ll();break;case-11:case 10009:wl();break;case 69:Cl();break;case 283:yl();break;case-14:break;default:Fi()}}function gl(){sc.startNonterminal("JSONSimpleObjectUnion",$l),Ml(283),Bl(275),Jl!=286&&(Pl(),Q()),Ml(286),sc.endNonterminal("JSONSimpleObjectUnion",$l)}function yl(){_l(283),Bl(275),Jl!=286&&G(),_l(286)}function bl(){sc.startNonterminal("ObjectConstructor",$l),Ml(281),Bl(278),Jl!=287&&(Pl(),El()),Ml(287),sc.endNonterminal("ObjectConstructor",$l)}function wl(){_l(281),Bl(278),Jl!=287&&Sl(),_l(287)}function El(){sc.startNonterminal("PairConstructorList",$l),xl();for(;;){if(Jl!=42)break;Ml(42),Bl(269),Pl(),xl()}sc.endNonterminal("PairConstructorList",$l)}function Sl(){Tl();for(;;){if(Jl!=42)break;_l(42),Bl(269),Tl()}}function xl(){sc.startNonterminal("PairConstructor",$l);switch(Jl){case 78:jl(280);break;case 161:jl(283);break;case 177:jl(179);break;case 187:jl(253);break;case 220:jl(249);break;case 223:jl(181);break;case 266:jl(192);break;case 83:case 122:jl(258);break;case 97:case 249:jl(147);break;case 111:case 222:jl(263);break;case 139:case 142:jl(188);break;case 104:case 130:case 240:jl(166);break;case 135:case 197:case 255:jl(210);break;case 120:case 206:case 256:case 262:jl(168);break;case 121:case 125:case 167:case 188:case 194:case 230:case 231:jl(95);break;case 71:case 73:case 74:case 75:case 76:case 80:case 81:case 82:case 84:case 85:case 86:case 87:case 89:case 90:case 91:case 92:case 94:case 95:case 98:case 99:case 102:case 103:case 105:case 106:case 107:case 109:case 110:case 112:case 113:case 114:case 119:case 123:case 124:case 126:case 127:case 129:case 132:case 133:case 134:case 136:case 137:case 138:case 143:case 147:case 148:case 150:case 152:case 153:case 154:case 155:case 156:case 157:case 162:case 163:case 164:case 165:case 166:case 168:case 170:case 173:case 174:case 175:case 179:case 181:case 183:case 184:case 185:case 189:case 195:case 198:case 202:case 203:case 204:case 205:case 207:case 210:case 216:case 217:case 224:case 225:case 226:case 228:case 229:case 232:case 233:case 234:case 239:case 241:case 242:case 245:case 248:case 253:case 254:case 257:case 258:case 259:case 260:case 263:case 267:case 268:case 269:case 272:case 273:case 276:jl(142);break;default:Xl=Jl}if(Xl==25735||Xl==25797||Xl==25855){Xl=Ul(21,$l);if(Xl==0){var e=Vl,t=$l,n=Jl,r=Kl,i=Ql,s=Gl,o=Yl,u=Zl;try{Uf(),Xl=-1}catch(a){Xl=-2}Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Rl(21,$l,Xl)}}switch(Xl){case-2:case 19:case 25671:case 25673:case 25674:case 25675:case 25676:case 25678:case 25680:case 25681:case 25682:case 25683:case 25684:case 25685:case 25686:case 25687:case 25689:case 25690:case 25691:case 25692:case 25694:case 25695:case 25697:case 25698:case 25699:case 25702:case 25703:case 25704:case 25705:case 25706:case 25707:case 25709:case 25710:case 25711:case 25712:case 25713:case 25714:case 25719:case 25720:case 25721:case 25722:case 25723:case 25724:case 25725:case 25726:case 25727:case 25729:case 25730:case 25732:case 25733:case 25734:case 25736:case 25737:case 25738:case 25739:case 25742:case 25743:case 25747:case 25748:case 25750:case 25752:case 25753:case 25754:case 25755:case 25756:case 25757:case 25761:case 25762:case 25763:case 25764:case 25765:case 25766:case 25767:case 25768:case 25770:case 25773:case 25774:case 25775:case 25777:case 25779:case 25781:case 25783:case 25784:case 25785:case 25787:case 25788:case 25789:case 25794:case 25795:case 25798:case 25802:case 25803:case 25804:case 25805:case 25806:case 25807:case 25810:case 25816:case 25817:case 25820:case 25822:case 25823:case 25824:case 25825:case 25826:case 25828:case 25829:case 25830:case 25831:case 25832:case 25833:case 25834:case 25839:case 25840:case 25841:case 25842:case 25845:case 25848:case 25849:case 25853:case 25854:case 25856:case 25857:case 25858:case 25859:case 25860:case 25862:case 25863:case 25866:case 25867:case 25868:case 25869:case 25872:case 25873:case 25876:Ja();break;default:Rf()}Bl(26),Ml(50),Bl(268),Pl(),Rf(),sc.endNonterminal("PairConstructor",$l)}function Tl(){switch(Jl){case 78:jl(280);break;case 161:jl(283);break;case 177:jl(179);break;case 187:jl(253);break;case 220:jl(249);break;case 223:jl(181);break;case 266:jl(192);break;case 83:case 122:jl(258);break;case 97:case 249:jl(147);break;case 111:case 222:jl(263);break;case 139:case 142:jl(188);break;case 104:case 130:case 240:jl(166);break;case 135:case 197:case 255:jl(210);break;case 120:case 206:case 256:case 262:jl(168);break;case 121:case 125:case 167:case 188:case 194:case 230:case 231:jl(95);break;case 71:case 73:case 74:case 75:case 76:case 80:case 81:case 82:case 84:case 85:case 86:case 87:case 89:case 90:case 91:case 92:case 94:case 95:case 98:case 99:case 102:case 103:case 105:case 106:case 107:case 109:case 110:case 112:case 113:case 114:case 119:case 123:case 124:case 126:case 127:case 129:case 132:case 133:case 134:case 136:case 137:case 138:case 143:case 147:case 148:case 150:case 152:case 153:case 154:case 155:case 156:case 157:case 162:case 163:case 164:case 165:case 166:case 168:case 170:case 173:case 174:case 175:case 179:case 181:case 183:case 184:case 185:case 189:case 195:case 198:case 202:case 203:case 204:case 205:case 207:case 210:case 216:case 217:case 224:case 225:case 226:case 228:case 229:case 232:case 233:case 234:case 239:case 241:case 242:case 245:case 248:case 253:case 254:case 257:case 258:case 259:case 260:case 263:case 267:case 268:case 269:case 272:case 273:case 276:jl(142);break;default:Xl=Jl}if(Xl==25735||Xl==25797||Xl==25855){Xl=Ul(21,$l);if(Xl==0){var e=Vl,t=$l,n=Jl,r=Kl,i=Ql,s=Gl,o=Yl,u=Zl;try{Uf(),Rl(21,t,-1),Xl=-3}catch(a){Xl=-2,Vl=e,$l=t,Jl=n,Jl==0?lc=t:(Kl=r,Ql=i,Gl=s,Gl==0?lc=i:(Yl=o,Zl=u,lc=u)),Rl(21,t,-2)}}}switch(Xl){case-2:case 19:case 25671:case 25673:case 25674:case 25675:case 25676:case 25678:case 25680:case 25681:case 25682:case 25683:case 25684:case 25685:case 25686:case 25687:case 25689:case 25690:case 25691:case 25692:case 25694:case 25695:case 25697:case 25698:case 25699:case 25702:case 25703:case 25704:case 25705:case 25706:case 25707:case 25709:case 25710:case 25711:case 25712:case 25713:case 25714:case 25719:case 25720:case 25721:case 25722:case 25723:case 25724:case 25725:case 25726:case 25727:case 25729:case 25730:case 25732:case 25733:case 25734:case 25736:case 25737:case 25738:case 25739:case 25742:case 25743:case 25747:case 25748:case 25750:case 25752:case 25753:case 25754:case 25755:case 25756:case 25757:case 25761:case 25762:case 25763:case 25764:case 25765:case 25766:case 25767:case 25768:case 25770:case 25773:case 25774:case 25775:case 25777:case 25779:case 25781:case 25783:case 25784:case 25785:case 25787:case 25788:case 25789:case 25794:case 25795:case 25798:case 25802:case 25803:case 25804:case 25805:case 25806:case 25807:case 25810:case 25816:case 25817:case 25820:case 25822:case 25823:case 25824:case 25825:case 25826:case 25828:case 25829:case 25830:case 25831:case 25832:case 25833:case 25834:case 25839:case 25840:case 25841:case 25842:case 25845:case 25848:case 25849:case 25853:case 25854:case 25856:case 25857:case 25858:case 25859:case 25860:case 25862:case 25863:case 25866:case 25867:case 25868:case 25869:case 25872:case 25873:case 25876:Ka();break;case-3:break;default:Uf()}Bl(26),_l(50),Bl(268),Uf()}function Nl(){sc.startNonterminal("ArrayConstructor",$l),Ml(69),Bl(274),Jl!=70&&(Pl(),Q()),Ml(70),sc.endNonterminal("ArrayConstructor",$l)}function Cl(){_l(69),Bl(274),Jl!=70&&G(),_l(70)}function kl(){sc.startNonterminal("BlockExpr",$l),Ml(281),Bl(282),Pl(),nf(),Ml(287),sc.endNonterminal("BlockExpr",$l)}function Ll(){_l(281),Bl(282),rf(),_l(287)}function Al(){sc.startNonterminal("FunctionDecl",$l),Ml(147),Bl(247),Pl(),Wa(),Bl(22),Ml(35),Bl(97),Jl==31&&(Pl(),R()),Ml(38),Bl(157),Jl==80&&(Pl(),Ol()),Bl(120);switch(Jl){case 281:Ml(281),Bl(282),Pl(),nf(),Ml(287);break;default:Ml(134)}sc.endNonterminal("FunctionDecl",$l)}function Ol(){sc.startNonterminal("ReturnType",$l),Ml(80),Bl(255),Pl(),Ns(),sc.endNonterminal("ReturnType",$l)}function Ml(e){Jl==e?(Pl(),sc.terminal(i.TOKEN[Jl],Kl,Ql>ac?ac:Ql),Vl=Kl,$l=Ql,Jl=Gl,Jl!=0&&(Kl=Yl,Ql=Zl,Gl=0)):ql(Kl,Ql,0,Jl,e)}function _l(e){Jl==e?(Vl=Kl,$l=Ql,Jl=Gl,Jl!=0&&(Kl=Yl,Ql=Zl,Gl=0)):ql(Kl,Ql,0,Jl,e)}function Dl(e){var t=Vl,n=$l,r=Jl,i=Kl,s=Ql;Jl=e,Kl=fc,Ql=lc,Gl=0,za(),Vl=t,$l=n,Jl=r,Jl!=0&&(Kl=i,Ql=s)}function Pl(){$l!=Kl&&(Vl=$l,$l=Kl,sc.whitespace(Vl,$l))}function Hl(e){var t;for(;;){t=zl(e);if(t!=22){if(t!=37)break;Dl(t)}}return t}function Bl(e){Jl==0&&(Jl=Hl(e),Kl=fc,Ql=lc)}function jl(e){Gl==0&&(Gl=Hl(e),Yl=fc,Zl=lc),Xl=Gl<<9|Jl}function Fl(e){Jl==0&&(Jl=zl(e),Kl=fc,Ql=lc)}function Il(e){Gl==0&&(Gl=zl(e),Yl=fc,Zl=lc),Xl=Gl<<9|Jl}function ql(e,t,n,r,i){throw t>tc&&(ec=e,tc=t,nc=n,rc=r,ic=i),new Wl.ParseException(ec,tc,nc,rc,ic)}function Rl(e,t,n){oc[(t<<5)+e]=n}function Ul(e,t){var n=oc[(t<<5)+e];return typeof n!="undefined"?n:0}function zl(e){var t=!1;fc=lc;var n=lc,r=i.INITIAL[e],s=0;for(var o=r&8191;o!=0;){var u,a=n<ac?uc.charCodeAt(n):0;++n;if(a<128)u=i.MAP0[a];else if(a<55296){var f=a>>4;u=i.MAP1[(a&15)+i.MAP1[(f&31)+i.MAP1[f>>5]]]}else{if(a<56320){var f=n<ac?uc.charCodeAt(n):0;f>=56320&&f<57344&&(++n,a=((a&1023)<<10)+(f&1023)+65536,t=!0)}var l=0,c=5;for(var h=3;;h=c+l>>1){if(i.MAP2[h]>a)c=h-1;else{if(!(i.MAP2[6+h]<a)){u=i.MAP2[12+h];break}l=h+1}if(l>c){u=0;break}}}s=o;var p=(u<<13)+o-1;o=i.TRANSITION[(p&31)+i.TRANSITION[p>>5]],o>8191&&(r=o,o&=8191,lc=n)}r>>=13;if(r==0){lc=n-1;var f=lc<ac?uc.charCodeAt(lc):0;return f>=56320&&f<57344&&--lc,ql(fc,lc,s,-1,-1)}if(t)for(var d=r>>9;d>0;--d){--lc;var f=lc<ac?uc.charCodeAt(lc):0;f>=56320&&f<57344&&--lc}else lc-=r>>9;return(r&511)-1}n(e,t);var Wl=this;this.ParseException=function(e,t,n,r,i){var s=e,o=t,u=n,a=r,f=i;this.getBegin=function(){return s},this.getEnd=function(){return o},this.getState=function(){return u},this.getExpected=function(){return f},this.getOffending=function(){return a},this.getMessage=function(){return a<0?"lexical analysis failed":"syntax error"}},this.getInput=function(){return uc},this.getOffendingToken=function(e){var t=e.getOffending();return t>=0?i.TOKEN[t]:null},this.getExpectedTokenSet=function(e){var t;return e.getExpected()<0?t=i.getTokenSet(-e.getState()):t=[i.TOKEN[e.getExpected()]],t},this.getErrorMessage=function(e){var t=this.getExpectedTokenSet(e),n=this.getOffendingToken(e),r=uc.substring(0,e.getBegin()),i=r.split("\n"),s=i.length,o=i[s-1].length+1,u=e.getEnd()-e.getBegin();return e.getMessage()+(n==null?"":", found "+n)+"\nwhile expecting "+(t.length==1?t[0]:"["+t.join(", ")+"]")+"\n"+(u==0||n!=null?"":"after successfully scanning "+u+" characters beginning ")+"at line "+s+", column "+o+":\n..."+uc.substring(e.getBegin(),Math.min(uc.length,e.getBegin()+64))+"..."},this.parse_XQuery=function(){sc.startNonterminal("XQuery",$l),Bl(279),Pl(),s(),Ml(25),sc.endNonterminal("XQuery",$l)};var Xl,Vl,$l,Jl,Kl,Ql,Gl,Yl,Zl,ec,tc,nc,rc,ic,sc,oc,uc,ac,fc,lc};r.getTokenSet=function(e){var t=[],n=e<0?-e:INITIAL[e]&8191;for(var i=0;i<289;i+=32){var s=i,o=(i>>5)*4323+n-1,u=o>>2,a=u>>2,f=r.EXPECTED[(o&3)+r.EXPECTED[(u&3)+r.EXPECTED[(a&7)+r.EXPECTED[a>>3]]]];for(;f!=0;f>>>=1,++s)(f&1)!=0&&t.push(r.TOKEN[s])}return t},r.MAP0=[71,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,17,17,17,17,17,17,17,17,17,18,19,20,21,22,23,24,25,26,27,28,29,26,30,30,30,30,30,31,32,33,30,30,34,30,30,35,30,30,30,36,30,30,37,38,39,40,30,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,40,40],r.MAP1=[108,124,214,214,214,214,214,214,214,214,214,214,214,214,214,214,156,181,181,181,181,181,214,215,213,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,247,261,277,293,309,355,371,387,423,423,423,415,339,331,339,331,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,440,440,440,440,440,440,440,324,339,339,339,339,339,339,339,339,401,423,423,424,422,423,423,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,338,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,423,71,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,17,17,17,17,17,17,17,17,17,18,19,20,21,22,23,24,25,26,27,28,29,26,30,30,30,30,30,31,32,33,30,30,30,30,30,30,30,30,30,30,30,30,30,30,40,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,34,30,30,35,30,30,30,36,30,30,37,38,39,40,30,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,40,40,40,40,40,40,40,40,40,40,40,40,30,30,40,40,40,40,40,40,40,70,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70],r.MAP2=[57344,63744,64976,65008,65536,983040,63743,64975,65007,65533,983039,1114111,40,30,40,30,30,40],r.INITIAL=[1,24578,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291],r.TRANSITION=[61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,18432,18517,18522,18517,18517,18484,18512,18452,18517,18554,61967,59516,61967,74619,61967,61967,55527,19522,55520,19508,18606,18665,61967,70169,30458,18726,18778,19038,18896,18928,18960,18916,18992,48655,19036,19070,19146,19231,58583,74082,19266,19356,74753,19443,19917,18745,27106,74847,18746,27107,30883,74757,19492,19559,36556,19613,19681,19750,24509,29432,20022,19387,19791,30215,19854,61068,30211,19850,19886,20015,20054,19411,21982,20146,20198,19175,20445,20283,20364,30300,20403,20371,30307,20410,20442,20477,20310,20555,20624,28313,28345,20693,20725,20757,20722,20810,28340,20888,19581,20981,21038,18850,21154,21201,21169,18833,18864,18694,21298,21330,21509,21408,21531,21479,21563,21595,21655,21713,21687,21745,21777,19818,21809,20837,55524,20506,21868,20523,21954,22014,22046,22136,22208,22240,22272,22302,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,22337,61967,31390,61967,61967,73090,22372,22399,61674,22448,61967,59516,61967,41832,61967,61967,55527,19522,30374,20913,18606,18665,61967,70169,30458,18726,18778,19038,18896,18928,18960,18916,18992,48655,19036,19070,19146,19231,58583,74082,19266,19356,74753,19443,19917,18745,27106,74847,18746,27107,30883,74757,19492,19559,36556,19613,19681,19750,24509,29432,20022,19387,19791,30215,19854,61068,30211,19850,19886,20015,20054,19411,21982,20146,20198,19175,20445,20283,20364,30300,20403,20371,30307,20410,20442,20477,20310,20555,20624,28313,28345,20693,20725,20757,20722,20810,28340,20888,19581,20981,21038,18850,21154,21201,21169,18833,18864,18694,21298,21330,21509,21408,21531,21479,21563,21595,21655,21713,21687,21745,21777,19818,21809,20837,55524,20506,21868,20523,21954,22014,22046,22136,22208,22240,22272,22302,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,22538,61967,70056,61967,34633,62349,22589,41847,62466,62378,61967,59516,61967,22626,61967,61967,55527,19522,55520,41710,22665,18665,61967,70169,30458,18726,18778,19038,18896,18928,18960,18916,18992,48655,19036,19070,19146,19231,58583,74082,19266,19356,74753,19443,19917,18745,27106,74847,18746,27107,30883,74757,19492,19559,36556,19613,19681,19750,24509,29432,20022,19387,19791,30215,19854,61068,30211,19850,19886,20015,20054,19411,21982,20146,20198,19175,20445,20283,20364,30300,20403,20371,30307,20410,20442,20477,20310,20555,20624,28313,28345,20693,20725,20757,20722,20810,28340,20888,19581,20981,21038,18850,21154,21201,21169,18833,18864,18694,21298,21330,21509,21408,21531,21479,21563,21595,21655,21713,21687,21745,21777,19818,21809,20837,55524,20506,21868,20523,21954,22014,22046,22136,22208,22240,22272,22302,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,22724,61967,35451,61966,61947,33649,33678,20228,20251,22777,61967,20166,61967,22829,61967,61967,55527,19522,55520,38980,22868,18665,61967,70169,30458,18726,18778,19038,18896,18928,18960,18916,18992,48655,19036,19070,19146,19231,58583,74082,19266,19356,74753,19443,21069,18745,27106,18633,18746,27107,30883,74757,19492,19559,36556,19613,19681,19750,24509,29432,20022,19387,19791,30215,19854,61068,30211,19850,19886,20015,20054,19411,21982,20146,20198,19175,20445,20283,20364,30300,20403,20371,30307,20410,20442,20477,20310,20555,20624,28313,28345,20693,20725,20757,20722,20810,28340,20888,19581,20981,21038,18850,21154,21201,21169,18833,18864,18694,21298,21330,21509,21408,21531,21479,21563,21595,21655,21713,21687,21745,21777,19818,21809,20837,55524,20506,21868,20523,21954,22014,22046,22136,22208,22240,22272,22302,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,22927,61967,31390,22996,58037,23031,22589,71908,23095,23127,61967,59516,61967,74619,61967,61967,55527,19522,33749,19508,18606,18665,61967,70169,30458,18726,18778,19038,18896,18928,18960,18916,18992,48655,19036,19070,19146,19231,58583,74082,19266,19356,74753,19443,19917,18745,27106,74847,18746,27107,30883,74757,19492,19559,36556,19613,19681,19750,24509,29432,20022,19387,19791,30215,19854,61068,30211,19850,19886,20015,20054,19411,21982,20146,20198,19175,20445,20283,20364,30300,20403,20371,30307,20410,20442,20477,20310,20555,20624,28313,28345,20693,20725,20757,20722,20810,28340,20888,19581,20981,21038,18850,21154,21201,21169,18833,18864,18694,21298,21330,21509,21408,21531,21479,21563,21595,21655,21713,21687,21745,21777,19818,21809,20837,55524,20506,21868,20523,21954,22014,22046,22136,22208,22240,22272,22302,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,22337,61967,31390,23195,61967,73090,23262,33056,23232,23311,61967,59516,61967,74619,61967,61967,55527,19522,55520,19508,18606,18665,61967,70169,30458,18726,18778,19038,18896,18928,18960,18916,18992,48655,19036,19070,19146,19231,58583,74082,19266,19356,74753,19443,19917,18745,27106,74847,18746,27107,30883,74757,19492,19559,36556,19613,19681,19750,24509,29432,20022,19387,19791,30215,19854,61068,30211,19850,19886,20015,20054,19411,21982,20146,20198,19175,20445,20283,20364,30300,20403,20371,30307,20410,20442,20477,20310,20555,20624,28313,28345,20693,20725,20757,20722,20810,28340,20888,19581,20981,21038,18850,21154,21201,21169,18833,18864,18694,21298,21330,21509,21408,21531,21479,21563,21595,21655,21713,21687,21745,21777,19818,21809,20837,55524,20506,21868,20523,21954,22014,22046,22136,22208,22240,22272,22302,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,22337,61967,31390,61967,61967,63256,23363,61967,61967,23400,61967,59516,61967,74619,61967,61967,55527,19522,55520,19508,18606,18665,61967,70169,30458,18726,18778,19038,23468,18928,23545,18916,18992,48655,19036,19070,19146,19231,58583,74082,19266,19356,74753,19443,19917,18745,27106,74847,18746,27107,30883,74757,19492,19559,36556,19613,19681,19750,24509,29432,20022,19387,19791,30215,19854,61068,30211,19850,19886,20015,20054,19411,21982,20146,20198,19175,20445,20283,20364,30300,20403,20371,30307,20410,20442,20477,20310,20555,20624,28313,28345,20693,20725,20757,20722,20810,28340,20888,19581,20981,21038,18850,21154,21201,21169,18833,18864,18694,21298,21330,21509,21408,21531,21479,21563,21595,21655,21713,21687,21745,21777,19818,21809,20837,55524,20506,21868,20523,21954,22014,22046,22136,22208,22240,22272,22302,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,23577,61967,72464,61967,57684,23628,22589,72719,23725,23657,61967,59516,61967,23757,61967,61967,55527,19522,55520,19460,23796,18665,61967,70169,30458,18726,18778,19038,18896,18928,18960,18916,18992,48655,19036,19070,19146,19231,58583,74082,19266,19356,74753,19443,19917,18745,27106,74847,18746,27107,30883,74757,19492,19559,36556,19613,19681,19750,24509,29432,20022,19387,19791,30215,19854,61068,30211,19850,19886,20015,20054,19411,21982,20146,20198,19175,20445,20283,20364,30300,20403,20371,30307,20410,20442,20477,20310,20555,20624,28313,28345,20693,20725,20757,20722,20810,28340,20888,19581,20981,21038,18850,21154,21201,21169,18833,18864,18694,21298,21330,21509,21408,21531,21479,21563,21595,21655,21713,21687,21745,21777,19818,21809,20837,55524,20506,21868,20523,21954,22014,22046,22136,22208,22240,22272,22302,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,23855,23948,23953,23941,24006,23911,23985,23879,24038,24068,61967,26764,61967,74619,61967,61967,55527,19522,55520,19508,18606,24136,61967,70169,30458,18726,18778,19038,18896,18928,18960,18916,18992,48655,19036,19070,19146,19231,58583,74082,19266,19356,74753,19443,19917,18745,27106,74847,18746,27107,30883,74757,19492,19559,36556,19613,19681,19750,24509,29432,20022,19387,19791,30215,19854,61068,30211,19850,19886,20015,20054,19411,21982,20146,20198,19175,20445,20283,20364,30300,20403,20371,30307,20410,20442,20477,20310,20555,20624,28313,28345,20693,20725,20757,20722,20810,28340,20888,19581,20981,21038,18850,21154,21201,21169,18833,18864,18694,21298,21330,21509,21408,21531,21479,21563,21595,21655,21713,21687,21745,21777,19818,21809,20837,55524,20506,21868,20523,21954,22014,22046,22136,22208,22240,22272,22302,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,24234,61967,31390,24372,69698,73090,24290,24311,24343,24413,61967,22488,61967,74619,61967,61967,55527,19522,55520,19508,18606,24481,61967,70169,30458,18726,18778,19038,18896,18928,18960,18916,18992,48655,19036,19070,19146,19231,58583,74082,19266,19356,74753,19443,19917,18745,27106,74847,18746,27107,30883,74757,19492,19559,36556,19613,19681,19750,24509,29432,20022,19387,19791,30215,19854,61068,30211,19850,19886,20015,20054,19411,21982,20146,20198,19175,20445,20283,20364,30300,20403,20371,30307,20410,20442,20477,20310,20555,20624,28313,28345,20693,20725,20757,20722,20810,28340,20888,19581,20981,21038,18850,21154,21201,21169,18833,18864,18694,21298,21330,21509,21408,21531,21479,21563,21595,21655,21713,21687,21745,21777,19818,21809,20837,55524,20506,21868,20523,21954,22014,22046,22136,22208,22240,22272,22302,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,24541,61967,31390,61967,61967,67560,24598,24727,24629,24659,61967,59516,61967,74619,61967,61967,55527,19522,55520,19508,18606,18665,61967,70169,30458,18726,18778,19038,18896,18928,24786,18916,18992,48655,19036,19070,19146,19231,58583,74082,19266,19356,74753,19443,19917,18745,27106,74847,18746,27107,30883,74757,19492,19559,36556,19613,19681,19750,24509,29432,20022,19387,19791,30215,19854,61068,30211,19850,19886,20015,20054,19411,21982,20146,20198,19175,20445,20283,20364,30300,20403,20371,30307,20410,20442,20477,20310,20555,20624,28313,28345,20693,20725,20757,20722,20810,28340,20888,19581,20981,21038,18850,21154,21201,21169,18833,18864,18694,21298,21330,21509,21408,21531,21479,21563,21595,21655,21713,21687,21745,21777,19818,21809,20837,55524,20506,21868,20523,21954,22014,22046,22136,22208,22240,22272,22302,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,22337,61967,31390,61967,61967,20332,24818,47893,47878,24849,61967,59516,61967,74619,61967,61967,55527,19522,55520,19508,18606,18665,61967,72704,30458,18726,18778,19038,18896,18928,18960,18916,18992,48655,19036,19070,19146,19231,58583,74082,19266,19356,74753,19443,19917,18745,27106,74847,18746,27107,30883,74757,19492,19559,36556,19613,19681,19750,24509,29432,20022,19387,19791,30215,19854,61068,30211,19850,19886,20015,20054,19411,21982,20146,20198,19175,20445,20283,20364,30300,20403,20371,30307,20410,20442,20477,20310,20555,20624,28313,28345,20693,20725,20757,20722,20810,28340,20888,19581,20981,21038,18850,21154,21201,21169,18833,18864,18694,21298,21330,21509,21408,21531,21479,21563,21595,21655,21713,21687,21745,21777,19818,21809,20837,55524,20506,21868,20523,21954,22014,22046,22136,22208,22240,22272,22302,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,24917,61967,31390,22166,69121,24929,24961,24980,63830,25029,61967,59516,61967,74619,61967,61967,55527,19522,55520,19508,18606,18665,61967,70169,30458,18726,18778,19038,18896,18928,18960,18916,18992,48655,19036,19070,19146,19231,58583,74082,19266,19356,74753,19443,19917,18745,27106,74847,18746,27107,30883,74757,19492,19559,36556,19613,19681,19750,24509,29432,20022,19387,19791,30215,19854,61068,30211,19850,19886,20015,20054,19411,21982,20146,20198,19175,20445,20283,20364,30300,20403,20371,30307,20410,20442,20477,20310,20555,20624,28313,28345,20693,20725,20757,20722,20810,28340,20888,19581,20981,21038,18850,21154,21201,21169,18833,18864,18694,21298,21330,21509,21408,21531,21479,21563,21595,21655,21713,21687,21745,21777,19818,21809,20837,55524,20506,21868,20523,21954,22014,22046,22136,22208,22240,22272,22302,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,25081,61967,31390,61967,61967,73090,25120,40456,40441,25151,61967,59516,61967,74619,61967,61967,25386,70359,33542,44063,60878,74169,48358,73876,61967,61967,25392,25221,46058,56008,34317,59395,45145,35889,25258,33586,67359,61967,61967,74289,32691,73613,59141,59141,65487,52984,52984,69268,45145,45145,42027,45179,45179,49730,34227,61967,61967,39423,61967,38058,59141,59141,42868,32848,52984,42485,53795,45145,38847,36411,45179,49739,61967,61967,31653,31517,54964,59141,46635,69258,52984,19712,25297,53636,36994,45179,49738,61967,35077,73614,59141,39309,52984,49561,45145,34410,45179,30090,25332,29726,25380,25434,58426,41951,25472,71032,68673,61967,25509,25555,25602,33496,25669,25747,56815,25790,25835,25867,25928,42600,26414,25960,26021,26093,26145,25698,41957,45600,50560,49862,61516,69e3,26222,26197,25989,26254,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,22337,61967,31390,61967,61967,73577,26289,22949,26342,26374,61967,59516,61967,57530,61967,61967,55527,19522,60302,19508,18606,18665,61967,70169,30458,18726,18778,19038,18896,18928,18960,18916,18992,48655,19036,19070,19146,19231,58583,74082,19266,19356,74753,19443,19917,18745,27106,74847,18746,27107,30883,74757,19492,19559,36556,19613,19681,19750,24509,29432,20022,19387,19791,30215,19854,61068,30211,19850,19886,20015,20054,19411,21982,20146,20198,19175,20445,20283,20364,30300,20403,20371,30307,20410,20442,20477,20310,20555,20624,28313,28345,20693,20725,20757,20722,20810,28340,20888,19581,20981,21038,18850,21154,21201,21169,18833,18864,18694,21298,21330,21509,21408,21531,21479,21563,21595,21655,21713,21687,21745,21777,19818,21809,20837,55524,20506,21868,20523,21954,22014,22046,22136,22208,22240,22272,22302,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,26446,61967,45837,61967,61967,73090,26514,26567,72558,26616,61967,59516,61967,43846,55593,61967,55527,19522,55520,41710,22665,18665,61967,70169,30458,18726,18778,19038,18896,18928,18960,18916,18992,48655,19036,19070,19146,19231,58583,74082,19266,19356,74753,19443,19917,18745,27106,74847,18746,27107,30883,74757,19492,19559,36556,19613,19681,19750,24509,29432,20022,19387,19791,30215,19854,61068,30211,19850,19886,20015,20054,19411,21982,20146,20198,19175,20445,20283,20364,30300,20403,20371,30307,20410,20442,20477,20310,20555,20624,28313,28345,20693,20725,20757,20722,20810,28340,20888,19581,20981,21038,18850,21154,21201,21169,18833,18864,18694,21298,21330,21509,21408,21531,21479,21563,21595,21655,21713,21687,21745,21777,19818,21809,20837,55524,20506,21868,20523,21954,22014,22046,22136,22208,22240,22272,22302,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,26668,61967,31390,61967,61967,26680,22589,61967,26712,26744,61967,59516,61967,26814,61967,61967,25386,70359,27859,44063,61967,74169,61967,44524,61967,61967,25392,59141,46058,52984,34317,45145,45145,36983,45179,33586,26853,61967,61967,53249,61967,73613,59141,59141,65487,52984,52984,69268,45145,45145,42027,45179,45179,45058,26893,61967,61967,23063,61967,25397,59141,59141,26933,52984,52984,42016,45145,45145,47967,45179,45179,58891,61967,61967,61967,31517,59141,59141,26972,52984,52984,27017,45145,53636,45179,45179,64222,61967,61967,73614,59141,73537,52984,39346,45145,45146,45179,45179,56820,61967,31518,59141,50203,41951,45145,50986,45368,61967,32088,59141,50201,41956,53634,45179,56815,39725,25715,41958,47966,35266,25709,53833,34510,33390,47959,25698,41957,55454,33401,34463,61516,69e3,26222,26197,25989,26254,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,27055,61967,74626,39880,35594,36017,36045,36071,27139,27245,61967,29891,61967,74619,61967,61967,55527,29290,28935,28860,18606,27299,61967,70169,30458,18726,18778,19038,27395,27918,27454,29597,27486,59308,29378,28584,19146,19231,58583,74082,19266,19356,74753,19443,20085,28657,28641,27422,28779,28920,29492,29536,29518,28283,36556,19613,19681,19750,24509,29432,20022,19387,27518,29659,27577,20114,28406,28720,27638,28527,27732,27795,21982,20146,20198,19175,20445,20283,27891,27950,27982,59281,28751,28253,27763,28014,28075,20555,20624,28313,28345,28129,28191,28223,28377,28438,28497,28559,18808,20981,21038,18850,28616,27606,28689,29351,27669,18694,21298,21330,28811,28892,28967,28999,29031,21595,29063,29121,29095,29153,29185,27545,29217,29276,28841,28043,29322,29410,29464,28465,29568,29629,29691,28159,74475,29723,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,29758,61967,31390,19098,24381,27267,29803,29822,29771,29871,61967,59516,61967,74619,61967,61967,55527,19522,55520,19508,18606,18665,61967,70169,30458,18726,18778,19038,18896,18928,18960,18916,18992,48655,19036,19070,19146,19231,58583,33022,19266,19356,74753,19443,19917,18745,27106,74847,18746,27107,30883,74757,19492,29923,29951,19613,19681,29983,24509,29432,20022,19387,19791,30215,19854,61068,30211,19850,19886,20015,20054,30024,21982,20146,20198,19175,20445,20283,30122,30300,20403,30275,30307,20410,20442,20477,20310,20555,20624,28313,28345,30181,20725,30247,20722,20810,28340,20888,19581,20981,21038,18850,21154,21201,21169,18833,18864,18694,21298,21330,21509,21408,21531,21479,21563,21595,21655,21713,21687,21745,21777,19818,21809,20837,55524,20506,21868,20523,21954,22014,22046,22136,22208,22240,22272,22302,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,22337,61967,31390,61967,61967,61967,30339,30357,30406,30438,61967,59516,61967,74619,31473,61967,55527,19522,55520,30909,18606,18665,61967,70169,30458,18726,18778,19038,18896,18928,18960,18916,18992,48655,19036,19070,19146,19231,58583,74082,19266,19356,74753,19443,19917,18745,27106,74847,18746,27107,30883,74757,19492,19559,36556,19613,19681,19750,24509,29432,20022,19387,19791,30215,19854,61068,30211,19850,19886,20015,20054,19411,21982,20146,20198,19175,20445,20283,20364,30300,20403,20371,30307,20410,20442,20477,20310,20555,20624,28313,28345,20693,20725,20757,20722,20810,28340,20888,19581,20981,21038,18850,21154,21201,21169,18833,18864,18694,21298,21330,21509,21408,21531,21479,21563,21595,21655,21713,21687,21745,21777,19818,21809,20837,55524,20506,21868,20523,21954,22014,22046,22136,22208,22240,22272,22302,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,30490,61967,31390,61967,61967,73090,30561,30579,71270,30628,61967,59516,61967,74619,45464,61967,55527,19522,55520,21356,18606,18665,61967,70169,30458,18726,18778,19038,18896,18928,18960,18916,18992,48655,19036,19070,19146,19231,58583,74082,19266,19356,74753,19443,19917,18745,27106,74847,18746,27107,30883,74757,19492,19559,36556,19613,19681,19750,24509,29432,20022,19387,19791,30215,19854,61068,30211,19850,19886,20015,20054,19411,21982,20146,20198,19175,20445,20283,20364,30300,20403,20371,30307,20410,20442,20477,20310,20555,20624,28313,28345,20693,20725,20757,20722,20810,28340,20888,19581,20981,21038,18850,21154,21201,21169,18833,18864,18694,21298,21330,21509,21408,21531,21479,21563,21595,21655,21713,21687,21745,21777,19818,21809,20837,55524,20506,21868,20523,21954,22014,22046,22136,22208,22240,22272,22302,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,30683,61967,57342,61967,61967,73090,30735,30753,72498,30802,61967,59516,61967,74619,34645,61967,55527,19522,55520,19199,18606,18665,61967,70169,30458,18726,18778,19038,18896,18928,18960,18916,18992,48655,19036,19070,19146,19231,58583,74082,19266,19356,74753,19443,19917,18745,27106,74847,18746,27107,30883,74757,19492,19559,36556,19613,19681,19750,24509,29432,20022,19387,19791,30215,19854,61068,30211,19850,19886,20015,20054,19411,21982,20146,20198,19175,20445,20283,20364,30300,20403,20371,30307,20410,20442,20477,20310,20555,20624,28313,28345,20693,20725,20757,20722,20810,28340,20888,19581,20981,21038,18850,21154,21201,21169,18833,18864,18694,21298,21330,21509,21408,21531,21479,21563,21595,21655,21713,21687,21745,21777,19818,30855,20837,55524,20506,21868,20523,21954,22014,22046,22136,22208,22240,22272,22302,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,30961,61967,31390,70791,61967,28097,22589,31007,32778,31050,61967,59516,61967,45974,61967,61967,55527,19522,36762,32200,18606,18665,61967,70169,30458,18726,18778,19038,18896,18928,18960,18916,18992,48655,19036,19070,19146,19231,58583,74082,19266,19356,74753,19443,19917,18745,27106,74847,18746,27107,30883,74757,19492,19559,36556,19613,19681,19750,24509,29432,20022,19387,19791,30215,19854,61068,30211,19850,19886,20015,20054,19411,21982,20146,20198,19175,20445,20283,20364,30300,20403,20371,30307,20410,20442,20477,20310,20555,20624,28313,28345,20693,20725,20757,20722,20810,28340,20888,19581,20981,21038,18850,21154,21201,21169,18833,18864,18694,21298,21330,21509,21408,21531,21479,21563,21595,21655,21713,21687,21745,21777,19818,21809,20837,55524,20506,21868,20523,21954,22014,22046,22136,22208,22240,22272,22302,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,22337,61967,31390,61967,61967,73090,22589,61967,21436,31117,61967,59516,61967,74619,61967,61967,55527,19522,55520,19508,18606,18665,61967,70169,30458,18726,18778,19038,18896,18928,18960,18916,18992,48655,19036,19070,19146,19231,58583,74082,19266,19356,74753,19443,19917,18745,27106,74847,18746,27107,30883,74757,19492,19559,36556,19613,19681,19750,24509,29432,20022,19387,19791,30215,19854,61068,30211,19850,19886,20015,20054,19411,21982,20146,20198,19175,20445,20283,20364,30300,20403,20371,30307,20410,20442,20477,20310,20555,20624,28313,28345,20693,20725,20757,20722,20810,28340,20888,19581,20981,21038,18850,21154,21201,21169,18833,18864,18694,21298,21330,21509,21408,21531,21479,21563,21595,21655,21713,21687,21745,21777,19818,21809,20837,55524,20506,21868,20523,21954,22014,22046,22136,22208,22240,22272,22302,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,31184,61967,45328,61967,61967,73090,22589,25523,31221,45429,61967,59516,61967,61967,61967,61967,25386,70359,33542,44780,61967,74169,61967,61967,61967,61967,25392,59141,67753,52984,44877,45145,45145,36983,45179,33586,31305,61967,61967,23060,61967,73613,59141,59141,65487,52984,52984,69268,45145,45145,42027,45179,45179,50599,31344,61967,61967,23063,61967,25397,59141,59141,35138,52984,52984,35822,45145,45145,47967,45179,45179,58891,61967,61967,31384,31517,59141,59141,34770,52984,52984,31422,45145,53636,45179,45179,64222,61967,61967,73614,59141,73537,52984,39346,45145,45146,45179,45179,56820,49285,31518,59141,50203,41951,45145,50986,45368,61967,32088,59141,50201,41956,53634,45179,56815,39725,25715,41958,47966,35266,25709,53833,34510,33390,47959,25698,41957,55454,33401,34463,61516,69e3,26222,26197,25989,26254,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,31184,61967,45328,61967,61967,73090,22589,25523,31221,45429,61967,59516,61967,61967,61967,61967,25386,70359,33542,44780,61967,74169,61967,61967,61967,61967,25392,59141,67753,52984,44877,45145,45145,36983,45179,33586,31305,61967,61967,23060,61967,73613,59141,59141,65487,52984,52984,69268,45145,45145,42027,45179,45179,50599,31344,61967,61967,23063,61967,25397,59141,59141,35138,52984,52984,35822,45145,45145,47967,45179,45179,58891,61967,61967,61967,31517,59141,59141,34770,52984,52984,31422,45145,53636,45179,45179,64222,61967,61967,73614,59141,73537,52984,39346,45145,45146,45179,45179,56820,61967,31518,59141,50203,41951,45145,50986,45368,61967,32088,59141,50201,41956,53634,45179,56815,39725,25715,41958,47966,35266,25709,53833,34510,33390,47959,25698,41957,55454,33401,34463,61516,69e3,26222,26197,25989,26254,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,31184,61967,45328,61967,61967,73090,22589,25523,31221,45429,61967,59516,61967,61967,61967,61967,25386,70359,33542,44780,61967,74169,61967,61967,61967,61967,25392,59141,67753,52984,44877,45145,45145,36983,45179,33586,31305,61967,61967,27084,61967,73613,59141,59141,65487,52984,52984,69268,45145,45145,42027,45179,45179,50599,31344,61967,61967,23063,61967,25397,59141,59141,35138,52984,52984,35822,45145,45145,47967,45179,45179,58891,61967,61967,61967,31517,59141,59141,34770,52984,52984,31422,45145,53636,45179,45179,64222,61967,61967,73614,59141,73537,52984,39346,45145,45146,45179,45179,56820,61967,31518,59141,50203,41951,45145,50986,45368,61967,32088,59141,50201,41956,53634,45179,56815,39725,25715,41958,47966,35266,25709,53833,34510,33390,47959,25698,41957,55454,33401,34463,61516,69e3,26222,26197,25989,26254,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,31184,61967,45328,61967,61967,73090,22589,25523,31221,45429,61967,59516,61967,61967,61967,61967,25386,70359,33542,44780,61967,74169,61967,61967,61967,61967,25392,59141,67753,52984,44877,45145,45145,36983,45179,33586,31305,61967,61967,23060,61967,73613,59141,59141,65487,52984,52984,69268,45145,45145,42027,45179,45179,50599,31344,61967,61967,31460,61967,25397,59141,59141,35138,52984,52984,35822,45145,45145,47967,45179,45179,58891,61967,61967,61967,31517,59141,59141,34770,52984,52984,31422,45145,53636,45179,45179,64222,61967,61967,73614,59141,73537,52984,39346,45145,45146,45179,45179,56820,61967,31518,59141,50203,41951,45145,50986,45368,61967,32088,59141,50201,41956,53634,45179,56815,39725,25715,41958,47966,35266,25709,53833,34510,33390,47959,25698,41957,55454,33401,34463,61516,69e3,26222,26197,25989,26254,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,31184,61967,45328,61967,61967,73090,22589,25523,31221,45429,61967,59516,61967,44659,61967,61967,25386,70359,33542,44780,61967,74169,61967,44652,61967,61967,25392,59141,67753,52984,44877,45145,45145,36983,45179,33586,31305,61967,61967,23060,61967,73613,59141,59141,65487,52984,52984,69268,45145,45145,42027,45179,45179,50599,31344,61967,61967,23063,61967,25397,59141,59141,35138,52984,52984,35822,45145,45145,47967,45179,45179,58891,61967,61967,61967,31517,59141,59141,34770,52984,52984,31422,45145,53636,45179,45179,64222,61967,61967,73614,59141,73537,52984,39346,45145,45146,45179,45179,56820,61967,31518,59141,50203,41951,45145,50986,45368,61967,32088,59141,50201,41956,53634,45179,56815,39725,25715,41958,47966,35266,25709,53833,34510,33390,47959,25698,41957,55454,33401,34463,61516,69e3,26222,26197,25989,26254,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,31184,61967,45328,61967,61967,73090,22589,25523,31221,45429,61967,59516,61967,61967,61967,61967,25386,70359,33542,44780,61967,74169,61967,61967,61967,61967,25392,59141,67753,52984,44877,45145,45145,36983,45179,33586,67359,61967,61967,61967,61967,73613,59141,59141,65487,52984,52984,69268,45145,45145,42027,45179,45179,49730,61967,61967,61967,61967,61967,25397,59141,59141,35138,52984,52984,35822,45145,45145,47967,45179,45179,49739,61967,61967,61967,31517,59141,59141,46635,52984,52984,19712,45145,53636,45179,45179,49738,61967,61967,73614,59141,61284,52984,59178,45145,45146,45179,45179,56820,61967,31518,59141,50203,41951,45145,50986,45368,61967,32088,59141,50201,41956,53634,45179,56815,39725,25715,41958,47966,35266,25709,53833,34510,33390,47959,25698,41957,55454,33401,34463,61516,69e3,26222,26197,25989,26254,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,31184,61967,45328,61967,61967,73090,22589,25523,31221,45429,61967,59516,61967,61967,61967,61967,25386,70359,33542,71110,61967,74169,61967,61967,61967,61967,25392,59141,67753,52984,44877,45145,45145,36983,45179,33586,67359,61967,61967,61967,61967,73613,59141,59141,65487,52984,52984,69268,45145,45145,42027,45179,45179,49730,61967,61967,61967,61967,61967,25397,59141,59141,35138,52984,52984,35822,45145,45145,47967,45179,45179,49739,61967,61967,61967,31517,59141,59141,46635,52984,52984,19712,45145,53636,45179,45179,49738,61967,61967,73614,59141,61284,52984,59178,45145,45146,45179,45179,56820,61967,31518,59141,50203,41951,45145,50986,45368,61967,32088,59141,50201,41956,53634,45179,56815,39725,25715,41958,47966,35266,25709,53833,34510,33390,47959,25698,41957,55454,33401,34463,61516,69e3,26222,26197,25989,26254,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,31184,61967,45328,61967,61967,73090,22589,25523,31221,61383,61967,59516,61967,61967,61967,61967,25386,70359,33542,44780,61967,74169,61967,61967,61967,61967,25392,59141,67753,52984,44877,45145,45145,36983,45179,33586,67359,61967,61967,61967,61967,73613,59141,59141,65487,52984,52984,69268,45145,45145,42027,45179,45179,49730,61967,61967,61967,61967,61967,25397,59141,59141,35138,52984,52984,35822,45145,45145,47967,45179,45179,49739,61967,61967,61967,31517,59141,59141,46635,52984,52984,19712,45145,53636,45179,45179,49738,61967,61967,73614,59141,61284,52984,59178,45145,45146,45179,45179,56820,61967,31518,59141,50203,41951,45145,50986,45368,61967,32088,59141,50201,41956,53634,45179,56815,39725,25715,41958,47966,35266,25709,53833,34510,33390,47959,25698,41957,55454,33401,34463,61516,69e3,26222,26197,25989,26254,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,31184,61967,45328,61967,61967,73090,31505,25523,31221,45429,61967,59516,61967,61967,61967,61967,25386,70359,33542,44780,61967,74169,61967,61967,31550,61967,25392,59141,67753,52984,44877,45145,45145,36983,45179,33586,67359,61967,61967,61967,61967,73613,59141,59141,65487,52984,52984,69268,45145,45145,42027,45179,45179,49730,61967,61967,61967,61967,61967,25397,59141,59141,35138,52984,52984,35822,45145,45145,47967,45179,45179,49739,61967,61967,61967,31517,59141,59141,46635,52984,52984,19712,45145,53636,45179,45179,49738,61967,61967,73614,59141,61284,52984,59178,45145,45146,45179,45179,56820,61967,31518,59141,50203,41951,45145,50986,45368,61967,32088,59141,50201,41956,53634,45179,56815,39725,25715,41958,47966,35266,25709,53833,34510,33390,47959,25698,41957,55454,33401,34463,61516,69e3,26222,26197,25989,26254,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,31184,61967,45328,61967,61967,73090,22589,60964,31586,31617,61967,59516,61967,61967,61967,61967,25386,70359,33542,44780,61967,74169,61967,61967,61967,61967,25392,59141,67753,52984,44877,45145,45145,36983,45179,33586,67359,61967,61967,61967,61967,73613,59141,59141,65487,52984,52984,69268,45145,45145,42027,45179,45179,49730,61967,61967,61967,61967,61967,25397,59141,59141,35138,52984,52984,35822,45145,45145,47967,45179,45179,49739,61967,61967,61967,31517,59141,59141,46635,52984,52984,19712,45145,53636,45179,45179,49738,61967,61967,73614,59141,61284,52984,59178,45145,45146,45179,45179,56820,61967,31518,59141,50203,41951,45145,50986,45368,61967,32088,59141,50201,41956,53634,45179,56815,39725,25715,41958,47966,35266,25709,53833,34510,33390,47959,25698,41957,55454,33401,34463,61516,69e3,26222,26197,25989,26254,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,31184,61967,45328,61967,61967,73090,22589,25523,31221,45429,61967,59516,61967,61967,61967,61967,25386,70359,33542,44780,61967,74169,61967,61967,61967,61967,25392,59141,67753,52984,44877,45145,45145,36983,45179,33586,67359,61967,61967,61967,61967,73613,59141,59141,65487,52984,52984,69268,45145,45145,42027,45179,45179,49730,61967,61967,61967,61967,61967,25397,59141,59141,35138,52984,52984,35822,45145,45145,47967,45179,45179,49739,61967,61967,61967,31517,59141,59141,46635,52984,52984,19712,45145,53636,45179,45179,49738,61967,26782,73614,59141,61284,52984,59178,45145,45146,45179,45179,56820,61967,31518,59141,50203,41951,45145,50986,45368,61967,32088,59141,50201,41956,53634,45179,56815,39725,25715,41958,47966,35266,25709,53833,34510,33390,47959,25698,41957,55454,33401,34463,61516,69e3,26222,26197,25989,26254,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,31685,61967,45328,61967,61967,73090,22589,25523,31221,45429,61967,59516,61967,61967,61967,61967,25386,70359,33542,44780,61967,74169,61967,61967,61967,61967,25392,59141,67753,52984,44877,45145,45145,36983,45179,33586,67359,61967,61967,61967,61967,73613,59141,59141,65487,52984,52984,69268,45145,45145,42027,45179,45179,49730,61967,61967,61967,61967,61967,25397,59141,59141,35138,52984,52984,35822,45145,45145,47967,45179,45179,49739,61967,61967,61967,31517,59141,59141,46635,52984,52984,19712,45145,53636,45179,45179,49738,61967,61967,73614,59141,61284,52984,59178,45145,45146,45179,45179,56820,61967,31518,59141,50203,41951,45145,50986,45368,61967,32088,59141,50201,41956,53634,45179,56815,39725,25715,41958,47966,35266,25709,53833,34510,33390,47959,25698,41957,55454,33401,34463,61516,69e3,26222,26197,25989,26254,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,31722,61967,31390,61967,61967,73090,31797,31748,31850,31879,61967,59516,61967,74619,61967,61967,55527,19522,55520,19508,18606,18665,61967,72035,30458,18726,18778,19038,18896,18928,18960,18916,18992,48655,19036,19070,19146,19231,58583,74082,19266,19356,74753,19443,19917,18745,27106,74847,18746,27107,30883,74757,19492,19559,36556,19613,19681,19750,24509,29432,20022,19387,19791,30215,19854,61068,30211,19850,19886,20015,20054,19411,21982,20146,20198,19175,20445,20283,20364,30300,20403,20371,30307,20410,20442,20477,20310,20555,20624,28313,28345,20693,20725,20757,20722,20810,28340,20888,19581,20981,21038,18850,21154,21201,21169,18833,18864,18694,31966,21330,21509,21408,21531,21479,21563,21595,21655,21713,21687,21745,21777,19818,21809,20837,55524,20506,21868,20523,21954,22014,22046,22136,22208,22240,22272,22302,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,22337,61967,31390,61967,61967,73090,22589,61967,61967,31998,61967,59516,61967,74619,61967,61967,55527,19522,55520,41710,22665,18665,61967,70169,30458,18726,18778,19038,18896,18928,18960,18916,18992,48655,19036,19070,19146,19231,58583,74082,19266,19356,74753,19443,19917,18745,27106,74847,18746,27107,30883,74757,19492,19559,36556,19613,19681,19750,24509,29432,20022,19387,19791,30215,19854,61068,30211,19850,19886,20015,20054,19411,21982,20146,20198,19175,20445,20283,20364,30300,20403,20371,30307,20410,20442,20477,20310,20555,20624,28313,28345,20693,20725,20757,20722,20810,28340,20888,19581,20981,21038,18850,21154,21201,21169,18833,18864,18694,21298,21330,21509,21408,21531,21479,21563,21595,21655,21713,21687,21745,21777,19818,21809,20837,55524,20506,21868,20523,21954,22014,22046,22136,22208,22240,22272,22302,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,22337,32087,31390,61967,61967,73090,32050,32071,20592,32120,61967,59516,61967,74619,61967,61967,55527,19522,55520,19508,18606,18665,61967,70169,30458,18726,18778,19038,18896,18928,18960,18916,18992,48655,19036,19070,19146,19231,58583,74082,19266,19356,74753,19443,19917,18745,27106,74847,18746,27107,30883,74757,19492,19559,36556,19613,19681,19750,24509,29432,20022,19387,19791,30215,19854,61068,30211,19850,19886,20015,20054,19411,21982,20146,20198,19175,20445,20283,20364,30300,20403,20371,30307,20410,20442,20477,20310,20555,20624,28313,28345,20693,20725,20757,20722,20810,28340,20888,19581,20981,21038,18850,21154,21201,21169,18833,18864,18694,21298,21330,21509,21408,21531,21479,21563,32172,21655,21713,21687,32267,21777,19818,32299,20837,55524,20506,21868,20523,21954,22014,22046,22136,22208,22240,22272,22302,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,22337,61967,31390,61967,61967,73090,22589,61967,61967,31117,61967,59516,61967,74619,61967,61967,55527,19522,55520,19508,18606,18665,61967,70169,30458,18726,18778,19038,18896,18928,18960,18916,18992,48655,19036,19070,19146,19231,58583,74082,19266,19356,74753,19443,19917,18745,27106,74847,18746,27107,30883,74757,19492,19559,36556,19613,19681,19750,24509,29432,20022,19387,19791,30215,19854,61068,30211,19850,19886,20015,20054,19411,21982,20146,20198,19175,20445,20283,20364,30300,20403,20371,30307,20410,20442,20477,20310,20555,20624,28313,28345,20693,20725,20757,20722,20810,28340,20888,19581,20981,21038,18850,21154,21201,21169,18833,18864,18694,21298,21330,21509,21408,21531,21479,21563,21595,21655,21713,21687,21745,21777,19818,21809,20837,55524,20506,21868,20523,21954,22014,22046,22136,22208,22240,22272,22302,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,31184,32359,45328,32394,57696,65386,32464,32495,32603,32525,62034,70632,30651,32635,32733,19295,32810,32880,32912,32991,33054,74169,33088,33130,33163,45989,25392,59141,33241,52984,56024,45145,31428,36983,45179,70338,33310,32220,58099,27328,61967,33367,33433,25402,66092,33481,37911,33910,33528,47097,61157,33574,61753,33618,33731,31765,68742,23063,34945,33781,41368,33852,38560,52078,55949,33942,34017,27845,43023,34098,50430,34177,62248,57537,24258,43351,68443,56707,34259,34314,58276,34349,45145,34442,34495,72106,34542,34611,34677,34744,34815,73537,31252,34847,37261,34977,51083,35015,35053,31690,31518,35109,47283,58827,70275,61805,56796,61967,32088,59141,50201,41956,53634,45179,56815,39725,25715,41958,47966,35266,25709,53833,52125,35177,35243,41332,35298,35365,33401,59626,61516,69e3,26222,26197,25989,26254,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,31184,35445,45328,61967,61967,73090,35483,35510,35542,35574,61967,59516,61967,61967,61967,61967,52163,48269,57216,35626,43781,74169,61967,61967,61967,61967,25392,59141,67753,52984,44877,45145,45145,36983,45179,33586,31305,61967,62286,23060,35725,73613,59141,59141,35797,52984,52984,35865,45145,45145,35932,45179,45179,35986,31344,61967,61967,23063,61967,25397,59141,59141,35138,52984,52984,35822,45145,45145,47967,45179,45179,58891,61967,36103,63318,36136,36230,59141,36264,52984,65801,36356,45145,56526,36406,45179,43758,61967,61967,73614,59141,73537,52984,39346,45145,45146,45179,45179,56820,61967,31518,59141,50203,41951,45145,50986,45368,61967,32088,59141,50201,41956,53634,45179,56815,39725,25715,41958,47966,35266,25709,53833,34510,33390,47959,51661,67812,57941,33401,34463,61516,69e3,26222,26197,25989,26254,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,31184,32555,45328,23279,73166,19759,36443,36474,36505,36536,61967,36588,43861,44539,61967,19114,23147,36656,71728,67332,56205,74169,36716,22176,36794,36860,61640,59141,37718,36917,44877,36960,45145,37285,37026,33586,37060,26257,59568,24165,65366,73613,59968,37108,65487,55372,37167,69268,48100,37236,42027,37317,51793,50599,31344,60141,48701,23063,61967,25397,36232,55772,35138,52984,37349,35822,45145,61129,47967,45179,37426,58891,37499,31352,26821,31517,59141,52867,34770,52984,65140,31422,45145,37532,45179,54511,64222,61967,37577,58139,70018,73537,39632,39346,19718,45146,72426,45179,37613,60044,26466,37665,72228,37750,37787,43916,37853,61967,26636,59141,37904,47945,63759,45179,37943,39725,25715,41958,47966,35266,25709,53833,34510,33390,47959,46610,37980,38036,33401,34463,61516,69e3,26222,38090,38162,26254,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,31184,20574,45328,40138,52640,73090,38225,38256,38355,38286,61967,59516,61967,61967,43783,43782,21897,47178,42577,38387,54918,38446,38323,74131,48917,73999,38531,47646,35413,41239,38592,38624,38676,54441,43934,47786,31305,33098,65307,23060,61967,32432,59141,59141,38728,52984,52984,38807,45145,45145,38879,45179,45179,38933,39012,37500,60946,23063,26901,68795,39058,45875,68127,39093,53596,39131,70917,45145,39189,51783,45179,39260,61967,61967,20661,34712,59141,55880,62878,52984,39341,39378,25477,34983,45179,73008,64222,55507,39422,66949,46044,39455,58464,39514,67447,49193,71504,47769,46339,61967,31518,59141,50203,41951,45145,50986,45368,35693,32088,59141,39625,59730,36324,45179,39664,39725,25715,52935,49718,39701,25709,53833,42807,67039,39770,59825,42895,63165,33401,34463,61516,69e3,26222,26197,25989,26254,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,31184,36624,45328,74527,70800,39828,39925,39956,40038,39986,40262,40070,40102,40232,40170,40202,40294,40326,40358,40390,24566,30703,43994,40488,40534,52510,26061,68036,51395,40569,51336,64180,42132,40638,40717,40782,40835,40894,40926,40999,54209,41068,41100,62097,41179,41211,56932,41271,41400,48763,41502,41574,41631,41663,41742,52524,31899,41801,34206,41879,70010,41911,41990,42059,68924,42102,66773,71709,41302,42222,71091,42269,48816,36745,65446,54064,55792,42347,55288,42379,42460,42517,42632,50968,42664,51055,42716,31312,50294,26394,59852,33883,68540,64439,48450,44990,55438,42792,39669,67971,68098,42839,42962,42994,43118,43206,43294,43383,43461,43514,43571,43622,38775,43727,37872,26048,59986,48995,50587,43815,45229,43893,43966,59711,44044,44095,71632,44151,44223,44306,61516,44366,44439,26197,25989,26254,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,31184,51178,45328,44497,25348,62514,44571,44602,44698,44632,64126,59516,61967,61967,43339,43324,26535,44730,34877,44812,42739,74169,42756,61967,21098,23677,57958,59141,55717,44874,44877,73292,45145,60675,45179,33586,31305,61967,61967,23060,61967,44909,59141,59141,44946,52984,52984,45022,45145,45145,45090,45179,45180,50599,31344,61967,61967,23063,64117,25397,72876,59141,35138,72356,52984,35822,45145,45144,47967,45179,45178,58891,61967,61967,61967,45212,59141,61245,34770,52984,35200,31422,45145,45277,45179,59465,64222,61967,61967,73614,59141,73537,52984,39346,45145,45146,45179,45179,56820,61967,31518,59141,50203,41951,45145,50986,45368,45322,32088,33808,52287,37755,53634,45360,56815,39725,25715,41958,47966,35266,25709,53833,34510,33390,47959,25698,41957,55454,33401,34463,61516,45400,45496,45554,45632,26254,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,31184,61967,45328,22633,61967,73090,45695,45716,45748,45779,61967,59516,61967,58581,61967,61967,25386,70359,33542,35954,59106,74169,61967,61967,45831,61967,25392,59141,67753,52984,44877,45145,45145,36983,45179,33586,67359,61967,61967,61967,36815,55188,59141,59141,71414,52984,52984,55959,45145,45145,42027,45179,45179,49730,61967,31934,74576,68206,61967,45869,63370,59141,35138,36928,52984,35822,63942,45145,47967,53519,45179,34924,61967,63249,61967,31517,59141,59141,46635,52984,52984,19712,45145,53636,45179,45179,49738,61967,66882,45907,59141,47029,52984,49058,45145,27213,45179,48216,45943,42315,46021,71814,46090,46163,60837,46218,46315,19972,21122,46371,46469,46528,46580,65851,56815,46680,46730,56489,46791,46846,25709,53833,34510,33390,47959,25698,41957,55454,33401,34463,61516,69e3,46927,46902,25989,26254,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,31184,61967,45328,61967,61967,73090,22589,25523,31221,46759,61967,46959,61967,23764,29839,23331,47009,47061,47129,72801,61967,50682,51133,63558,61967,61967,25392,59141,47210,52984,26113,45145,65189,36983,45179,47262,67359,61967,61967,61967,54284,65706,59141,59141,49630,52984,52984,35211,45145,45145,55054,45179,45179,37467,24679,61967,61967,61967,23200,68018,59141,59141,36165,52984,52984,36289,45145,45145,35333,45179,45179,49739,61967,73744,61967,31517,59141,53759,46635,52984,26985,19712,45145,35319,45179,71373,49738,61967,48906,73614,59141,61284,52984,59178,45145,45146,45179,45179,56820,61967,31518,59141,50203,41951,45145,50986,45368,70672,40537,59141,50201,41956,53634,45179,65296,50129,68862,67432,45046,47315,25709,53833,34510,33390,47959,25698,41957,55454,33401,34463,61516,69e3,26222,26197,25989,26254,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,31184,68217,45328,74693,74678,30929,47371,47403,47485,47433,61967,33699,61967,22340,47517,43262,47623,47678,47738,64840,61967,32571,70485,47818,61967,47854,39738,49620,47925,47999,41147,38696,48070,48148,48204,48248,40417,49398,57662,48301,48335,59688,37703,52883,48407,62897,33278,48482,63058,66341,60365,69403,41599,48554,61967,61967,48631,48687,61967,63187,52035,68814,46400,64057,58479,48733,72392,46437,47706,63796,25758,48795,64755,48848,48880,48949,63657,37135,49042,34282,49090,30521,49165,49244,55096,49317,49371,49430,40121,49513,49593,49662,49771,69630,49831,38004,49942,43174,49974,44666,50017,50049,64416,70861,70987,41427,60737,24104,27348,59141,50201,41956,53634,45179,69465,46870,44119,60815,44761,50105,50184,53833,42237,47591,50235,50335,41957,55454,33401,34463,50378,50476,26222,26197,50529,26254,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,31184,73792,45328,61967,61967,73090,22589,44012,50631,50662,61967,59516,61967,61967,61967,61967,25386,70359,33542,44780,61967,74169,61967,61967,61967,61967,25392,72319,67753,52984,50714,45145,48116,36983,59064,33586,67359,61967,61967,61967,61967,73613,59141,59141,65487,52984,52984,69268,45145,45145,42027,45179,45179,49730,61967,61967,61967,61967,61967,25397,59141,59141,35138,52984,52984,35822,45145,45145,47967,45179,45179,49739,61967,61967,61967,31517,59141,59141,46635,52984,52984,19712,45145,53636,45179,45179,49738,61967,61967,73614,59141,61284,52984,59178,45145,45146,45179,45179,56820,61967,31518,59141,50203,41951,45145,50986,45368,61967,32088,59141,50201,41956,53634,45179,56815,39725,25715,41958,47966,35266,25709,53833,34510,33390,47959,25698,41957,55454,33401,34463,61516,69e3,26222,26197,25989,26254,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,31184,31554,45328,61967,61967,73090,22589,25523,31221,45429,61967,59516,19983,61967,61967,61967,25386,70359,33542,44780,61967,74169,61967,61967,61967,61967,25392,59141,67753,52984,44877,45145,45145,36983,45179,33586,67359,61967,61967,61967,61967,73613,59141,59141,65487,52984,52984,69268,45145,45145,42027,45179,45179,49730,36607,61967,61967,61967,61967,73483,59141,59141,41129,52984,52984,38753,45145,45145,56129,45179,45179,49739,61967,61967,61967,31517,59141,59141,46635,52984,52984,19712,45145,53636,45179,45179,49738,61967,61967,73614,59141,61284,52984,59178,45145,45146,45179,45179,56820,61967,31518,59141,50203,41951,45145,50986,45368,61967,32088,59141,50201,41956,53634,45179,56815,39725,25715,41958,47966,35266,25709,53833,34510,33390,47959,25698,41957,55454,33401,34463,61516,69e3,26222,26197,25989,26254,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,31184,19234,45328,50303,66566,50746,50775,50796,50828,50859,62276,59516,20856,58581,20933,23823,26310,50911,51025,68602,51165,30975,41036,51210,60514,32701,51265,51368,51427,51481,51527,51559,59764,43148,51632,51693,60460,61967,74328,24433,61967,73613,44334,46283,68455,49799,46131,36198,25896,66788,62981,51755,43695,65598,61967,51825,43086,48599,61967,25397,25440,69836,35138,63904,37394,35822,45145,51871,47967,45179,51903,49739,34571,31189,61967,31517,41354,59141,46635,51935,52984,61099,45145,53636,42190,45179,49738,51972,34579,35749,52025,63478,52067,52202,27199,27023,52110,71340,37948,61967,52157,46270,40803,41951,37808,44274,45368,32362,32088,59141,52195,49116,65552,35021,56815,39725,25715,41958,47966,35266,25709,53833,34510,33390,47959,25698,41957,55454,52234,65968,57194,52266,52364,52339,25989,26254,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,31184,61968,45328,67360,52396,38499,52429,52460,52556,52490,62403,59516,48375,61967,62398,24754,37633,66396,52588,52672,61967,52766,25088,36885,61967,30596,52827,53355,52915,52982,53018,65538,46548,53050,53187,53120,53219,53295,61967,52734,61967,73613,35392,53344,65487,37373,53387,69268,39157,42921,42027,53429,53512,49730,40967,31637,22594,25049,61967,46698,59141,53551,70734,53594,46117,37193,53628,66323,47967,53668,41452,49739,61967,61967,61967,31517,59141,59141,46635,52984,52984,19712,45145,53636,45179,45179,49738,61967,61967,73614,59141,61284,52984,59178,45145,45146,45179,45179,53706,61967,31518,53753,67413,41951,53791,69776,45368,61967,32088,59141,50201,53827,38831,58320,56815,39725,25715,41958,47966,34066,50346,65910,45112,49886,53865,25698,41957,55454,33401,34463,45245,53921,26222,26197,25989,26254,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,31184,61967,53974,22305,54043,54096,54128,54159,54241,54189,72930,39856,54273,21006,22797,54316,54348,54410,54543,54605,62497,61005,50879,47545,56426,37076,54683,54738,67753,54770,55310,42428,35833,46186,68665,54819,64899,54881,61967,72837,61967,67016,54950,58717,65487,54996,25625,69268,55042,71226,42027,55086,55128,49730,61967,61967,61463,26861,55168,55220,59141,55262,58644,52984,55342,48432,45145,21256,55421,45179,59455,55486,55559,55625,38475,55680,55749,55857,43539,55925,55991,27700,56056,56115,54472,56161,68353,73974,52795,49481,37685,56237,59357,56309,62684,56366,53088,54573,56398,61967,74387,50152,56458,49693,38644,56083,56558,56627,70421,56666,59905,56739,44254,56771,49271,56852,56902,54787,45290,46814,26482,56964,61612,67127,57019,69570,58223,39570,33401,34463,61516,57051,57083,26197,57163,26254,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,31184,61967,57248,63325,57336,73090,57374,57405,57467,57435,57499,19324,57569,20778,57635,57728,57805,57878,57910,57990,73755,58069,23693,22104,54004,32235,25392,58171,58255,60004,49910,61322,73267,58308,58352,58405,38414,61967,58511,58571,66547,58615,58693,58762,40685,58804,58923,43590,58964,59018,68269,39228,59058,39796,59096,60104,61967,61967,24202,25397,66700,59140,35138,33261,59174,35822,48522,47089,47967,73355,59210,49739,61967,59250,61967,31517,59141,59141,59340,52984,51940,59389,45145,40606,45179,45179,52618,42295,61967,51839,55230,63869,65149,72175,30529,45146,59427,45179,59497,61967,45911,63422,34145,44407,34395,56987,45368,59566,32088,59141,50201,41956,53634,45179,56577,47339,73498,67679,58870,53889,70446,59600,59658,39593,59796,25698,41957,55454,33401,34463,61516,59884,64496,26197,59937,26254,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,31184,61967,32327,61967,60036,60076,60173,60204,60235,60267,22836,59516,61967,34700,40956,61967,27363,60334,58986,60433,56595,74169,22999,49460,32413,61967,43482,50073,51289,60546,51449,60601,60652,60707,60387,60788,60869,60910,31137,60996,61967,73613,59141,55809,65487,52984,67662,69268,45145,66019,42027,45179,39215,49730,61037,61967,20949,24449,31919,25397,61231,59141,32841,64341,52984,40595,58849,45145,47967,34903,45179,49739,55579,61967,68732,31517,59141,61277,67644,70519,52984,61316,21266,53636,45179,37454,49738,61967,61967,73614,59141,61284,52984,59178,45145,45146,45179,45179,56820,60130,65237,59141,50203,41951,45145,50986,55136,61967,32088,59141,50201,41956,53634,45179,56815,39725,25715,41958,47966,67868,61354,31273,61435,61505,47959,25698,41957,55454,33401,34463,61516,69e3,26222,26197,25989,26254,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,31184,61967,45328,61967,61967,73090,22589,25523,31221,45429,61967,59516,61967,61548,42760,41769,45799,69947,61582,38901,61672,74169,61967,61967,61967,61967,25392,59141,67753,52984,44877,45145,45145,36983,45179,33586,67359,53721,61967,61967,61967,73613,59141,59141,73207,52984,52984,53397,45145,45145,42027,45179,45179,49730,61967,61967,61967,61967,61967,25397,59141,59141,35138,52984,52984,35822,45145,45145,47967,45179,45179,49739,61967,61967,61967,31517,59141,61706,46635,35145,52984,19712,71458,53636,45179,61745,49738,61967,61967,73614,59141,61284,52984,59178,45145,45146,45179,45179,56820,61967,31518,59141,50203,41951,45145,50986,45368,61967,32088,64983,50497,41956,61785,54498,56815,39725,25715,41958,47966,35266,25709,53833,34510,33390,47959,25698,41957,55454,33401,34463,61516,69e3,26222,26197,25989,26254,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,31184,61967,22692,61967,33191,33209,61837,61864,61896,61927,22745,62820,19946,40862,64737,62e3,62066,62154,62186,62218,43781,54011,62318,62435,54906,73915,62546,62583,62645,58446,39482,50942,39390,45584,62716,62748,67359,72280,62801,40502,62780,47568,62852,59141,62943,63013,52984,63103,70927,25300,63135,35900,37028,63219,61967,66641,32664,61967,63288,63357,63402,63469,49543,51313,63510,63038,69345,51585,64202,49339,32943,49739,63554,32018,63590,39286,63644,63689,62122,63723,52984,27170,73307,53636,43679,63791,53480,25171,63828,66889,63862,33820,63901,58932,63936,59026,63974,25265,56820,64014,57603,59141,64050,48038,71305,53178,33985,73658,32088,59141,50201,41956,53634,45179,56815,39725,25715,41958,47966,48172,71172,51723,64089,33390,47959,46247,64158,64254,33401,34463,61516,64313,64390,64471,25989,26254,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,31184,61967,63612,64557,64528,64589,64618,64650,64681,64713,60478,32760,33131,61967,43406,44842,43429,64787,39544,64872,64944,33335,48584,61967,53263,54635,65031,52850,25570,65112,44877,34377,65181,67214,41470,33586,58017,24695,65221,45449,24088,73613,69860,59141,58730,57131,52984,55010,67270,45145,49010,65269,45179,40750,61967,65339,24869,65418,43075,65478,25226,67619,41941,52986,52307,62670,45145,65519,65584,45179,65630,65679,52722,19637,20650,68e3,59141,65749,46635,73129,65795,19712,66033,53636,45179,65833,49738,73050,69509,73614,64999,65883,68939,46496,63071,42154,69414,53075,56820,22506,57757,59141,50203,41951,45145,50986,59218,60287,67507,63691,50201,42409,51600,50993,56188,21836,65763,58661,49212,51108,57773,65942,50266,33390,47959,40667,66e3,66065,66124,66189,66277,66373,26222,26197,25989,26254,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,31184,61967,21376,61967,23495,23513,66428,66459,66490,66522,38306,66614,40006,22557,30149,35656,66673,66742,66820,66852,66921,22075,66991,51233,67071,57278,57304,54706,67159,68149,54849,67191,67246,34043,67302,67392,67479,74237,67539,61967,58539,67592,67711,56694,66220,67785,56265,71202,56340,38119,50408,67844,67900,67941,30770,55648,68068,68181,59534,56870,67739,33449,62613,48020,57846,66245,68249,42930,68301,68333,63982,68385,69687,51993,61967,68417,68487,71788,74412,47230,68519,30055,42548,43651,68572,68634,42684,68705,54651,68774,68846,58772,68894,73433,66303,68971,53459,69053,56820,69153,64912,38193,69234,69300,69326,69377,69446,69497,67100,45663,53942,53151,71012,69541,43050,29244,69602,60569,72779,69662,25709,53833,34510,33390,47959,25698,64358,65647,69730,69808,69892,69924,26222,26197,69979,26254,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,31184,61967,53312,61967,70050,73090,70088,70119,70215,70149,61967,22468,60496,41027,24192,61967,66959,70247,70307,70391,70478,74169,61967,31818,60928,48303,35765,59141,64281,70517,25637,48506,45145,70551,45179,70576,69110,70608,39026,49985,70664,61403,55893,70704,63437,51495,70832,70893,52950,70959,64818,40734,71064,71142,61473,66582,61967,61967,71268,62551,59141,59141,54378,52984,52984,63748,71302,45145,47967,71337,45179,58373,19649,61967,61967,32140,59141,59141,48974,52984,52984,27826,45145,53636,71372,45179,26165,61967,58119,56634,71405,61713,44397,34783,71446,38130,71490,41542,71536,61967,31518,59141,50203,41951,45145,50986,45368,61967,32088,59141,50201,41956,53634,45179,56815,39725,71601,55389,37545,35266,25709,53833,34510,33390,47959,25698,41957,32959,71687,71760,61516,69e3,71871,71846,25989,26254,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,31184,61967,31085,71952,71903,22895,71940,46977,71984,72015,61967,59516,61967,61967,61967,61967,65717,44465,72067,44780,36104,30823,61967,61967,61967,72138,25803,59142,67753,72171,65080,59747,37204,71655,45179,72207,67359,61967,61967,72276,61550,73613,59141,72312,65487,52984,72351,69268,45145,72388,42027,45179,72424,49730,61967,61967,61967,61967,61967,25397,59141,59141,35138,52984,52984,35822,45145,45145,47967,45179,45179,49739,61967,61967,61967,31517,59141,59141,46635,52984,52984,19712,45145,53636,45179,45179,49738,52397,61967,73614,59141,61284,52984,59178,45145,45146,45179,45179,56820,72458,31518,59141,50203,41951,45145,50986,45368,61967,32088,59141,50201,41956,53634,45179,60756,39725,25715,41958,47966,35266,25709,53833,34510,33390,47959,25698,41957,55454,33401,34463,61516,69e3,26222,26197,25989,26254,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,31184,61967,22964,61967,72496,72530,72590,72621,72652,72684,61967,59516,61967,61967,61967,61967,25386,72751,60620,69083,61967,74169,61967,61967,31070,61967,25392,59141,67753,52984,44877,45145,45145,36983,45179,33586,67359,61967,61967,61967,61967,73613,59141,59141,65487,52984,52984,69268,45145,45145,42027,45179,45179,49730,61967,61967,61967,72833,61967,72869,59141,59141,44181,52984,52984,62968,45145,45145,30076,45179,45179,49739,23368,61967,61967,31517,73394,39061,46635,72244,42070,19712,36314,49133,53674,45179,72908,61967,61967,73614,59141,61284,52984,59178,45145,45146,45179,45179,56820,61967,31518,59141,50203,41951,45145,50986,45368,61967,32088,59141,50201,41956,53634,45179,56815,39725,25715,41958,47966,35266,25709,53833,34510,33390,47959,25698,41957,55454,33401,34463,61516,69e3,26222,26197,25989,26254,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,31685,61967,45328,61967,61967,73090,22589,25523,31221,45429,61967,18574,70183,61967,47822,26584,47453,45522,72962,44780,61967,23596,23420,73040,61967,61967,25392,23163,58202,26940,62911,45145,36684,36983,50444,47157,73082,61967,61967,61967,61967,73613,59141,59141,65487,52984,52984,69268,45145,45145,42027,45179,45179,49730,61967,61967,61967,35683,61967,25397,55825,59141,73122,46648,52984,46426,71236,45145,47967,67909,45179,49739,73161,61967,61967,31517,73198,59141,21922,52984,52984,21232,45145,53636,61185,45179,49738,61967,61967,73614,59141,61284,52984,59178,45145,45146,45179,45179,56820,61967,31518,59141,50203,41951,45145,50986,45368,61967,32088,59141,50201,41956,53634,45179,56815,39725,25715,41958,47966,35266,25709,53833,34510,33390,47959,25698,41957,55454,33401,34463,61516,69e3,26222,26197,25989,26254,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,31184,61967,45328,61967,61967,73090,22589,25523,31221,70763,61967,59516,37581,61967,61967,61967,64966,73239,36374,43234,59108,74169,61967,61967,61967,64018,25392,59141,65058,52984,63522,45145,45145,73339,45179,34124,52699,61967,61967,61967,31152,73613,55703,53562,65487,36186,56277,69268,66146,37821,42027,72097,60401,49730,19527,61967,61967,61967,61967,25397,73387,59141,57834,73426,52984,44971,56515,45145,42174,72992,45179,49739,61967,61967,61967,73465,59141,73530,46635,39099,52984,19712,66157,53636,45179,41533,49738,61967,57590,73614,59141,61284,52984,59178,45145,45146,45179,45179,73569,72139,44914,59141,57109,44191,45145,33969,45368,61967,73609,66710,69021,41956,69756,61199,56815,39725,25715,41958,47966,35266,25709,53833,34510,33390,47959,25698,41957,55454,33401,34463,61516,69e3,26222,26197,25989,26254,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,31184,61967,45328,61967,61967,73090,73646,25523,31221,45429,61967,59516,61967,61967,61967,61967,25386,70359,33542,44780,61967,74169,61967,61967,61967,61967,25392,59141,67753,52984,44877,45145,45145,36983,45179,33586,67359,61967,61967,61967,61967,73613,59141,59141,65487,52984,52984,69268,45145,45145,42027,45179,45179,49730,61967,61967,61967,61967,61967,25397,59141,59141,35138,52984,52984,35822,45145,45145,47967,45179,45179,49739,61967,61967,61967,31517,59141,59141,46635,52984,52984,19712,45145,53636,45179,45179,49738,61967,61967,73614,59141,61284,52984,59178,45145,45146,45179,45179,56820,61967,31518,59141,50203,41951,45145,50986,45368,61967,32088,59141,50201,41956,53634,45179,56815,39725,25715,41958,47966,35266,25709,53833,34510,33390,47959,25698,41957,55454,33401,34463,61516,69e3,26222,26197,25989,26254,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,22337,61967,31018,73719,69179,73690,73787,69202,73824,73856,61967,59516,61967,73908,61967,61967,55527,21623,36828,19508,18606,18665,61967,70169,30458,18726,18778,19038,73947,18928,19004,18916,18992,48655,19036,19070,19146,19231,58583,74082,19266,19356,74753,19443,19917,18745,27106,74847,18746,27107,30883,74757,19492,19559,36556,19613,19681,19750,24509,29432,20022,19387,19791,30215,19854,61068,30211,19850,19886,20015,20054,19411,21982,20146,20198,19175,20445,20283,20364,30300,20403,20371,30307,20410,20442,20477,20310,20555,20624,28313,28345,20693,20725,20757,20722,20810,28340,20888,19581,20981,21038,18850,21154,21201,21169,18833,18864,18694,21298,21330,21509,21408,21531,21479,21563,21595,21655,21713,21687,21745,21777,19818,21809,20837,55524,20506,21868,20523,21954,22014,22046,22136,22208,22240,22272,22302,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,22337,61967,31390,61967,71562,71569,74031,74114,24997,74062,61967,59516,61967,74619,61967,74163,38964,19522,24885,19508,18606,18665,61967,70169,30458,18726,18778,19038,18896,18928,18960,18916,18992,48655,19036,19070,19146,19231,58583,74082,19266,19356,74753,19443,19917,18745,27106,74847,18746,27107,30883,74757,19492,19559,36556,19613,19681,19750,24509,29432,20022,19387,19791,30215,19854,61068,30211,19850,19886,20015,20054,19411,21982,20146,20198,19175,20445,20283,20364,30300,20403,20371,30307,20410,20442,20477,20310,20555,20624,28313,28345,20693,20725,20757,20722,20810,28340,20888,19581,20981,21038,18850,21154,21201,21169,18833,18864,18694,21298,21330,21509,21408,21531,21479,21563,21595,21655,21713,21687,21745,21777,19818,21809,20837,55524,20506,21868,20523,21954,22014,22046,22136,22208,22240,22272,22302,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,22337,61967,29992,61967,61967,21447,74201,74220,22416,74269,61967,59516,61967,74321,23436,61967,41694,19522,55520,19508,18606,18665,61967,70169,30458,18726,18778,19038,74360,18928,74444,18916,18992,48655,19036,19070,19146,19231,58583,74082,19266,19356,74753,19443,19917,18745,27106,74847,18746,27107,30883,74757,19492,19559,36556,19613,19681,19750,24509,29432,20022,19387,19791,30215,19854,61068,30211,19850,19886,20015,20054,19411,21982,20146,20198,19175,20445,20283,20364,30300,20403,20371,30307,20410,20442,20477,20310,20555,20624,28313,28345,20693,20725,20757,20722,20810,28340,20888,19581,20981,21038,18850,21154,21201,21169,18833,18864,18694,21298,21330,21509,21408,21531,21479,21563,21595,21655,21713,21687,21745,21777,19818,21809,20837,55524,20506,21868,20523,21954,22014,22046,22136,22208,22240,22272,22302,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,22337,61967,31390,61967,61967,73090,22589,61967,61967,74507,61967,59516,61967,61967,61967,61967,25386,70359,33542,44063,61967,74169,61967,61967,61967,61967,25392,59141,46058,52984,34317,45145,45145,36983,45179,33586,67359,61967,61967,61967,61967,73613,59141,59141,65487,52984,52984,69268,45145,45145,42027,45179,45179,49730,61967,61967,61967,61967,61967,25397,59141,59141,35138,52984,52984,35822,45145,45145,47967,45179,45179,49739,61967,61967,61967,31517,59141,59141,46635,52984,52984,19712,45145,53636,45179,45179,49738,61967,61967,73614,59141,61284,52984,59178,45145,45146,45179,45179,56820,61967,31518,59141,50203,41951,45145,50986,45368,61967,32088,59141,50201,41956,53634,45179,56815,39725,25715,41958,47966,35266,25709,53833,34510,33390,47959,25698,41957,55454,33401,34463,61516,69e3,26222,26197,25989,26254,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,62021,61967,25189,74559,39893,74608,61967,61967,61967,74619,61967,61967,55527,19522,55520,19508,18606,74658,61967,70169,30458,18726,18778,19038,73947,18928,19004,18916,18992,48655,19036,19070,19146,19231,58583,74082,19266,19356,74753,19443,19917,18745,27106,74847,18746,27107,30883,74757,19492,19559,36556,19613,19681,19750,24509,29432,20022,19387,19791,30215,19854,61068,30211,19850,19886,20015,20054,19411,21982,20146,20198,19175,20445,20283,20364,30300,20403,20371,30307,20410,20442,20477,20310,20555,20624,28313,28345,20693,20725,20757,20722,20810,28340,20888,19581,20981,21038,18850,21154,21201,21169,18833,18864,18694,21298,21330,21509,21408,21531,21479,21563,74725,21655,21713,21687,74789,21777,19818,74821,20837,55524,20506,21868,20523,21954,22014,22046,22136,22208,22240,22272,22302,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,61967,1,24578,3,0,0,0,0,0,0,0,180525,180525,180525,180525,0,188718,188718,188718,180525,180525,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,0,188718,180525,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,139264,147456,188718,188718,188718,188718,131072,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,188718,368,188718,180525,188718,188718,188718,188718,188718,1,24578,3,0,0,4366336,0,0,0,180525,188718,303,304,0,4268032,307,308,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,368,368,368,0,0,0,0,705,0,0,0,0,0,0,0,0,0,0,0,0,4857856,4874240,0,0,4923392,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5480448,0,0,0,0,0,0,0,0,0,0,6299648,0,0,0,0,0,0,0,0,0,0,0,0,2088,0,0,0,4825088,0,0,0,0,0,0,0,0,0,5840896,5849088,0,0,0,0,0,0,0,0,0,0,0,0,6275072,0,0,0,0,0,0,0,368,368,0,0,0,0,0,0,0,0,5898240,5963776,0,0,6193152,0,0,5406720,6397952,5300224,5234688,5423104,0,0,0,0,5988352,0,0,6135808,6307840,0,5996544,4800512,0,5259264,0,5414912,5447680,0,0,5562368,5636096,5685248,0,5750784,5873664,0,0,0,0,5636096,5873664,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5177344,0,0,0,0,0,5242880,0,0,0,0,0,0,0,5341184,0,0,5873664,0,0,0,0,0,0,0,5480448,4358144,4358144,4358144,4358144,4857856,4874240,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,5259264,4358144,4358144,4358144,915,915,915,0,0,0,0,0,0,5029888,5038080,0,0,5103616,5201920,0,0,0,0,0,0,0,0,0,0,0,0,0,6406144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4997120,4358144,4358144,5038080,4358144,4358144,4358144,5095424,5103616,4358144,4358144,5201920,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,5890048,4358144,4358144,4358144,6029312,4358144,4358144,4358144,4358144,6160384,4358144,4358144,4358144,4358144,4358144,4358144,4358144,6406144,4358144,4358144,4358144,0,0,0,4890624,0,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,6275072,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,0,916,0,0,0,0,0,4857856,4874240,0,0,0,0,0,0,0,0,0,0,0,0,0,5259264,0,0,0,0,0,0,0,0,5414912,0,5447680,0,5464064,0,5480448,5562368,0,0,0,5636096,0,5685248,0,0,5750784,0,0,0,0,0,5873664,0,0,0,0,0,0,0,0,0,0,0,6275072,0,0,0,0,0,0,0,0,0,0,0,992,0,5464064,0,5480448,5562368,0,0,0,5636096,0,5685248,0,0,5750784,0,0,0,0,0,5873664,0,0,0,0,0,0,0,0,0,0,0,6275072,0,0,0,0,0,0,0,0,0,0,0,0,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,5414912,4358144,5447680,4358144,5464064,4358144,5480448,5562368,4358144,4358144,4358144,5636096,4358144,5685248,4358144,4358144,5750784,4358144,4358144,4358144,4358144,4358144,5873664,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,6275072,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4923392,4358144,4358144,4358144,4358144,4358144,0,4923392,0,0,0,0,0,0,0,0,0,450560,450560,0,0,450560,450560,450560,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,825,0,0,0,0,0,0,0,0,0,0,0,4366336,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5242880,0,0,0,0,0,0,0,0,6283264,6332416,0,0,0,5881856,0,5382144,0,0,0,0,0,0,6266880,4784128,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,0,0,0,0,0,0,0,0,0,368640,0,0,0,0,0,5603328,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,340,341,0,0,0,4759552,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4825088,0,0,5177344,0,0,0,0,0,0,0,649,0,0,0,0,0,0,820,0,0,0,0,0,0,0,0,0,0,0,0,0,649,0,0,0,0,0,0,0,692,0,0,0,0,0,0,699,368,368,368,0,0,0,0,0,0,0,0,0,0,0,712,0,0,0,5701632,0,0,0,0,0,0,0,0,0,0,5808128,0,0,0,0,4792320,4833280,0,0,5701632,0,0,0,0,0,4358144,4358144,4358144,4825088,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,6119424,4358144,6168576,4358144,4358144,4358144,4358144,6242304,4358144,6291456,4358144,6316032,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,6463488,4358144,4358144,4358144,4358144,4358144,0,0,0,0,0,0,0,0,0,0,0,0,0,4956160,4964352,0,5341184,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,5627904,5652480,4358144,5701632,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,0,0,0,0,0,0,0,0,0,0,303,0,304,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,5627904,5652480,4358144,5701632,4358144,4358144,5808128,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2314,0,0,0,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,6299648,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,0,0,0,0,0,0,0,0,0,5029888,5038080,0,0,5103616,5201920,0,0,0,0,0,0,0,0,0,0,0,0,0,6406144,5570560,5578752,0,5668864,0,0,5791744,0,0,0,0,0,0,0,0,0,6201344,6242304,6250496,0,0,0,0,6422528,0,0,0,0,0,0,0,0,0,0,0,2813,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2800,0,0,0,0,0,0,0,0,0,0,0,5619712,0,0,0,0,0,0,0,5726208,5758976,0,0,5791744,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6152192,0,0,0,0,0,0,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60689,57917,57917,0,0,6316032,0,0,0,0,5816320,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,139264,147456,0,0,320,0,4358144,4358144,6463488,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4931584,4939776,0,0,0,0,0,0,5054464,0,0,0,0,0,0,0,0,0,0,6324224,0,0,5005312,0,0,0,512e4,5136384,0,0,0,0,0,0,0,0,0,0,6324224,4358144,4358144,0,0,0,5791744,5816320,0,5857280,0,0,0,0,0,0,0,0,0,0,0,0,0,6119424,0,6168576,0,0,0,0,0,6242304,0,6291456,0,6316032,0,0,0,6316032,0,0,0,0,0,0,0,0,0,6463488,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4931584,4939776,4358144,4358144,4358144,4358144,4358144,4358144,5054464,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,6299648,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,0,0,0,0,0,4825088,0,0,0,0,0,0,0,722,0,724,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,741,0,0,0,0,0,0,0,0,0,0,3669,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,739,0,0,0,0,0,0,0,4358144,4358144,4358144,4358144,4358144,4358144,4358144,5210112,4358144,4358144,4358144,4358144,5292032,4358144,4358144,4358144,4358144,5365760,4358144,4358144,4358144,5455872,4358144,4358144,4358144,4358144,4358144,5554176,5570560,5578752,5619712,5668864,4358144,4358144,4358144,5791744,5816320,4358144,5857280,4358144,4358144,4358144,5791744,5816320,4358144,5857280,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,6119424,4358144,6168576,4358144,4358144,4358144,4358144,4358144,6242304,4358144,6291456,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,6299648,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,0,0,915,915,915,4826003,915,915,915,915,915,915,6464403,0,0,0,0,991,991,991,991,991,991,991,991,991,991,991,4932575,4940767,991,991,991,991,991,991,5055455,991,0,0,0,0,6184960,5316608,0,0,5644288,0,0,0,0,0,0,0,0,0,0,6217728,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,368,368,368,0,0,0,303104,0,0,0,0,0,0,0,0,0,0,5390336,5308416,5488640,0,0,0,0,0,0,0,0,0,5070848,5431296,0,6430720,0,5160960,0,0,0,0,0,0,0,0,0,0,0,4784128,0,0,0,0,0,0,0,245760,0,0,0,245760,0,0,245760,245760,245760,0,0,0,0,0,245760,0,245760,245760,0,0,0,245760,245760,0,0,0,0,0,0,245760,0,0,0,0,0,0,245760,0,0,245760,0,0,245760,0,0,245760,0,4358144,4358144,4358144,4358144,4358144,4358144,4358144,5799936,4358144,4358144,5881856,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,6103040,4358144,4358144,4358144,6184960,4358144,4358144,6283264,4358144,4358144,6332416,4358144,4358144,4358144,6389760,4358144,4358144,6430720,6438912,4358144,4358144,4358144,6266880,6488064,0,0,0,6266880,6488064,0,0,0,0,0,0,0,0,0,0,0,0,344064,0,0,0,0,0,0,0,0,0,0,0,0,0,139264,147456,0,0,344064,0,4358144,4358144,6389760,4358144,4358144,6430720,6438912,0,0,0,0,0,0,4784128,0,0,0,4849664,0,0,0,0,0,4915200,0,4956160,4972544,0,0,0,0,0,0,5070848,0,0,0,0,0,0,0,5881856,0,0,0,0,0,0,0,0,0,6103040,0,0,0,6184960,0,0,0,6283264,0,0,6332416,0,0,0,6389760,0,0,6430720,6438912,4784128,4358144,4358144,4358144,4849664,4358144,4358144,4358144,4358144,4358144,4915200,4358144,4956160,4972544,4358144,4358144,4358144,4358144,4358144,4358144,5070848,4358144,4358144,4358144,4358144,4358144,4358144,4358144,5218304,4358144,5267456,4358144,4358144,5308416,5316608,4358144,4358144,4358144,5431296,4358144,5488640,4358144,4358144,5488640,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,5799936,4358144,4358144,5881856,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,6103040,4358144,4358144,4358144,6184960,4358144,4358144,4358144,0,5013504,0,0,6053888,0,0,0,0,0,0,0,0,6012928,4358144,4358144,5013504,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,6053888,4358144,4358144,4358144,0,0,0,0,5193728,0,0,0,0,0,0,4358144,4358144,4358144,4358144,4358144,0,0,0,0,0,5660672,5718016,0,5865472,0,0,0,0,6078464,0,0,6340608,0,6455296,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,327,328,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,581632,0,0,0,0,0,0,0,0,0,0,0,581632,0,0,0,0,0,6037504,6111232,0,0,0,5472256,0,0,0,6209536,0,0,0,0,0,0,0,0,0,0,0,6176768,0,0,0,0,0,0,0,0,0,0,2840,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2850,0,0,0,0,0,2855,0,5824512,5865472,4358144,4358144,5922816,4358144,4358144,6021120,4358144,6037504,4358144,4358144,6078464,6111232,4358144,6176768,6209536,6234112,4358144,4358144,4358144,4358144,4358144,4358144,4358144,0,0,0,0,4841472,0,0,0,4898816,0,0,0,0,0,0,0,0,0,0,0,5111808,0,0,0,0,0,5283840,0,0,0,0,5472256,5521408,0,0,0,0,5595136,5709824,5718016,0,5824512,5865472,0,0,5922816,0,0,6021120,0,6037504,0,0,6078464,6111232,0,6176768,6209536,0,6234112,0,0,0,0,0,0,0,0,0,0,0,0,647,757,0,759,0,761,762,676,0,0,766,767,0,0,0,0,0,0,0,0,0,5595136,5709824,5718016,0,5824512,5865472,0,0,5922816,0,0,6021120,0,6037504,0,0,6078464,6111232,0,6176768,6209536,0,6234112,0,0,0,0,0,0,0,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,731,0,0,0,0,0,0,0,0,0,742,0,0,0,0,742,4358144,4358144,5595136,5709824,5718016,4358144,5824512,5865472,4358144,4358144,5922816,4358144,4358144,6021120,4358144,6037504,4358144,4358144,6078464,6111232,4358144,6176768,6209536,4358144,6234112,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,1066,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,662,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2356,0,0,0,0,0,0,0,0,0,0,0,5357568,0,5505024,0,0,0,0,0,5890048,0,0,0,6160384,0,5095424,5349376,0,5275648,0,0,0,0,0,0,4997120,0,0,0,0,0,0,0,0,0,0,755,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,776,0,0,0,5947392,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6471680,0,0,0,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4997120,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,6299648,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,0,1988,0,0,0,4825088,0,0,0,0,0,0,0,1287,0,0,0,0,0,0,0,0,0,0,0,0,0,1299,0,1177,0,0,0,0,0,0,0,0,0,0,0,3689,0,0,0,0,0,0,0,3696,0,0,0,0,0,0,0,0,0,0,0,529,4358144,4358144,4358144,4358144,6406144,0,0,0,0,0,0,0,0,4997120,0,0,5038080,0,0,0,5095424,5103616,0,0,5201920,0,0,0,0,0,0,0,0,0,0,0,5890048,0,0,0,6029312,0,0,0,0,6160384,0,0,0,0,0,5890048,0,0,0,6029312,0,0,0,0,6160384,0,0,0,0,0,0,0,6406144,0,0,0,0,0,0,0,0,4997120,0,0,0,0,0,0,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60363,57917,57917,57917,57917,57917,57917,57917,57917,57917,59997,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60389,57917,57917,57917,57917,57917,57917,57917,57917,0,6356992,0,0,0,0,0,0,0,0,5496832,0,0,0,0,0,5611520,0,0,0,0,0,4947968,5021696,5529600,0,0,5169152,0,0,0,4800512,4808704,4358144,4358144,4890624,4358144,4947968,4358144,4358144,4358144,5046272,4358144,4358144,4358144,4358144,5185536,4358144,5234688,5300224,4358144,4358144,5406720,5529600,4358144,4358144,4358144,5898240,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,491520,0,0,0,0,0,0,0,0,0,0,0,0,0,0,357,358,359,360,0,0,0,0,0,0,0,0,0,368,0,297,0,0,0,0,5898240,0,0,0,0,0,0,0,0,6307840,0,0,6356992,6381568,6397952,4800512,4808704,0,0,4890624,0,4947968,0,0,0,5046272,0,0,0,0,0,0,0,0,0,557056,557056,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2359296,420,420,0,0,0,0,4358144,4947968,4358144,4358144,4358144,5046272,4358144,4358144,4358144,4358144,5185536,4358144,5234688,5300224,4358144,4358144,5406720,5529600,4358144,4358144,4358144,4358144,5898240,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,6307840,4358144,4358144,6356992,6381568,6397952,4800512,4808704,0,0,4890624,0,4947968,0,0,0,5046272,0,0,0,0,5185536,0,5234688,5300224,0,0,5406720,5529600,0,0,0,0,5898240,0,0,0,0,0,0,0,0,6307840,0,0,6356992,6381568,6397952,4800512,4808704,4358144,4358144,4890624,4358144,4358144,6356992,6381568,6397952,5021696,4358144,4358144,5021696,0,0,0,4980736,0,0,0,0,0,5373952,5734400,6045696,0,6258688,6447104,0,0,6127616,0,6348800,5906432,0,5537792,3681,4882432,0,0,0,0,0,0,0,0,5939200,0,0,5677056,6365184,4866048,0,6070272,5545984,5152768,0,0,6144e3,4358144,4866048,4882432,4358144,4980736,4358144,4358144,4358144,4358144,4358144,0,916,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,992,0,0,4358144,4358144,4358144,4358144,5324800,5373952,5537792,5545984,5734400,5971968,4358144,6045696,4358144,6070272,4358144,4358144,4358144,6348800,0,4866048,4882432,0,4980736,0,0,0,0,0,0,0,0,5324800,5586944,5734400,5971968,0,6045696,0,6070272,0,0,0,0,6348800,4358144,4866048,4882432,4358144,4980736,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,5324800,5373952,5537792,5545984,5586944,5734400,5971968,0,6045696,0,6070272,0,0,0,0,6348800,0,4866048,4882432,0,4980736,0,0,0,0,0,0,0,0,5324800,5373952,5537792,5545984,4358144,6045696,4358144,6070272,4358144,4358144,4358144,4358144,6348800,4358144,6144e3,0,6144e3,0,4988928,5005312,0,0,0,0,5775360,0,0,0,3681,0,0,0,0,0,0,5693440,0,6496256,5144576,5136384,0,5914624,4358144,4358144,5005312,4358144,4358144,4358144,512e4,5136384,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,6324224,0,0,5005312,0,0,0,512e4,5136384,5005312,4358144,4358144,4358144,512e4,5136384,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,6324224,5914624,5914624,0,0,0,0,0,5513216,5783552,0,3681,0,0,0,0,0,0,3839,0,0,0,0,3843,0,0,0,0,0,0,0,0,3846,0,529,529,529,3848,529,529,529,3851,529,0,0,5013504,0,0,0,0,0,0,0,0,0,6053888,0,0,0,0,0,5013504,0,0,0,0,0,0,0,0,0,6053888,0,0,0,0,0,0,0,806,0,0,0,0,0,0,806,0,529,529,529,529,529,529,529,529,874,529,529,529,529,529,529,529,0,0,0,0,0,0,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60296,57894,5193728,4358144,4358144,4358144,4358144,4358144,4358144,4358144,0,0,0,0,0,5193728,0,0,0,0,0,0,0,0,0,0,0,0,0,5193728,0,0,0,0,0,0,0,0,0,5218304,0,0,0,0,5799936,0,5881856,0,0,0,0,0,0,0,0,6373376,6389760,0,0,6488064,6103040,0,0,0,0,0,4358144,4358144,4358144,4358144,4358144,5193728,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4907008,0,5079040,6094848,5742592,0,0,0,0,0,4358144,4907008,4358144,5079040,4358144,5226496,4358144,5742592,4358144,4358144,4358144,6094848,0,4907008,0,5079040,0,5226496,0,5742592,0,0,0,6094848,0,0,4907008,0,5079040,0,5226496,0,5742592,0,0,0,0,0,0,0,1194,0,0,0,1198,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,368,368,0,0,0,0,0,0,0,1202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1275,0,0,0,1279,6094848,0,4358144,4907008,4358144,5079040,4358144,5226496,4358144,5742592,4358144,4358144,4358144,6094848,4358144,5062656,0,0,0,0,0,4358144,5062656,4358144,4358144,4358144,4358144,4358144,0,5062656,0,0,0,0,0,0,0,352256,0,352256,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1273,0,0,0,0,0,0,0,0,0,6225920,0,5062656,0,0,0,0,0,6225920,4358144,5062656,4358144,4358144,4358144,4358144,4358144,6225920,0,6086656,0,0,0,4816896,4358144,4358144,4358144,4358144,6086656,4816896,0,0,0,0,6086656,4816896,0,0,0,0,6086656,4816896,4358144,4358144,4358144,4358144,6086656,0,5087232,0,5931008,4358144,5332992,5980160,4358144,0,5332992,5980160,0,0,5332992,5980160,0,4358144,5332992,5980160,4358144,0,5439488,5128192,4358144,5128192,0,5128192,0,5128192,4358144,0,4358144,0,0,4358144,0,4358144,0,0,4358144,0,4358144,0,0,4358144,6004736,6004736,6004736,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,386,0,0,1,24578,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,774,0,0,0,0,0,0,131072,0,0,0,0,0,0,0,0,0,0,0,0,0,221654,221654,221654,470,470,470,470,470,470,470,470,470,470,470,221654,470,221654,221654,221654,470,221654,221654,221654,221654,221654,221654,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2359296,0,2359296,0,0,0,2359296,0,2359296,2359296,2359296,2359296,221654,221654,221654,1,24578,3,0,0,4366336,0,0,0,0,0,303,304,0,4268032,307,308,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,368,368,368,0,703,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,368,368,425984,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3455,0,0,0,0,0,0,0,0,0,0,0,0,0,1,24578,3,0,0,0,0,0,0,0,0,0,0,0,237568,303,0,307,237568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,760,0,0,0,0,0,0,0,0,0,770,0,0,0,0,0,0,0,0,0,131072,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2364,0,0,0,114688,0,0,0,0,0,4268032,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,383,0,0,0,0,307,0,0,4857856,4874240,0,0,4923392,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5480448,0,0,0,0,0,0,0,0,0,352,353,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,368,0,297,0,0,4210980,24578,3,0,0,298,0,0,0,0,298,0,0,0,0,0,0,0,0,0,245760,0,0,0,0,0,0,0,0,0,0,0,0,665,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,681,682,0,0,245760,245760,0,4210980,24578,3,0,0,4366336,0,0,0,0,0,303,304,0,4268032,307,308,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,664,0,794,0,0,0,0,0,0,0,798,0,0,0,0,807,0,0,746,0,0,0,0,4268032,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,680,0,0,0,0,0,1160,0,4857856,4874240,0,0,4923392,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5480448,0,0,0,0,0,0,0,0,0,378,0,363,0,0,0,0,0,0,0,0,0,363,0,0,0,0,139264,147456,0,0,0,0,1,24578,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,262144,0,0,0,0,0,0,0,0,0,0,0,0,376832,0,376832,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,364,365,366,367,0,0,368,0,297,0,0,0,262144,262144,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1244,0,0,0,0,0,0,262144,0,262144,262144,0,0,0,0,0,0,0,0,0,0,0,262144,262144,0,262144,0,0,0,139264,147456,262144,0,0,0,0,0,0,0,1829,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,262144,0,262739,262739,262739,262739,262739,262739,262739,262739,262739,262739,262739,262739,262739,262739,262739,262739,262739,262739,262739,262739,262739,262739,262739,262739,262739,0,262739,0,0,262739,1,24578,3,0,0,4366336,0,0,0,0,0,303,304,0,4268032,307,308,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,702,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,1390,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,0,0,0,278528,278528,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2417,0,0,0,0,0,0,278528,278528,278528,278528,278528,278528,278528,278528,278528,278528,278528,278528,278528,278528,278528,278528,278528,278528,278528,278528,278528,278528,278528,278528,278528,278528,278528,0,278528,278528,0,131072,278528,0,0,0,278528,0,0,0,0,0,0,278528,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,317,0,0,0,0,0,0,0,0,0,0,0,0,0,0,278528,1,24578,3,0,0,4366336,0,0,0,0,0,303,304,0,4268032,307,308,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,771,0,0,771,0,0,0,0,0,771,771,0,830,0,0,0,0,0,0,0,0,418,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2803,0,0,0,0,0,0,1,24578,3,0,0,4366336,0,0,0,0,0,303,639,0,4268032,307,642,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1230,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2351104,0,0,0,0,0,0,0,0,0,0,0,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,6275072,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,0,1433,0,0,0,0,0,4857856,4874240,0,0,0,0,0,0,0,0,0,402,0,0,0,0,0,0,0,0,0,0,0,0,402,0,0,0,0,0,0,0,0,0,0,0,413,359,0,0,402,0,0,0,0,0,139264,147456,402,413,0,426,0,5750784,0,0,0,0,0,5873664,0,0,0,0,0,0,0,0,0,0,0,6275072,0,0,0,0,0,0,0,0,0,0,0,1528,1,24578,3,0,0,0,0,0,0,0,0,0,0,0,286720,304,0,308,286720,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1203,0,0,0,0,0,0,0,0,0,0,368,368,0,0,0,0,0,0,0,0,308,0,0,0,0,0,0,0,0,0,0,0,0,308,0,0,0,0,0,0,308,139264,287141,0,0,0,308,1,24578,3,0,0,4366336,0,0,0,0,0,303,66176,0,4268032,307,98947,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1317,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,0,308,0,0,0,0,122880,0,4268032,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,771,0,0,0,0,307,0,308,4857856,4874240,0,0,4923392,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5480448,0,0,0,0,0,0,0,0,0,662,0,0,0,0,0,0,0,0,0,662,0,0,662,0,0,0,828,0,0,0,662,0,1,24578,3,0,0,0,0,0,0,0,0,0,0,0,0,305,305,305,0,0,305,305,295217,305,305,305,305,305,305,305,305,305,295217,305,295217,295217,295217,295217,295217,295217,295217,305,0,305,0,305,305,305,295217,305,305,305,295217,295217,305,295217,305,305,305,305,305,295286,295217,295217,295217,295217,295217,295217,305,305,305,305,305,305,295286,295217,295217,295217,305,305,305,295286,139264,147456,295217,295217,305,305,305,305,305,295217,374,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,369,305,0,295217,305,295217,305,295217,305,131072,305,305,305,305,295217,305,305,305,305,305,305,295217,305,295217,295217,295217,305,305,305,305,305,305,305,305,305,305,305,305,305,295217,295217,295217,295217,295217,295217,305,305,305,305,295217,305,305,305,305,305,305,305,305,305,295217,305,295217,295217,295217,295217,295217,295217,295217,295217,295286,295286,295286,295286,295286,295286,295286,295286,295286,295286,295286,295286,295286,295286,295286,295286,295286,295286,295286,295217,295217,295217,1,24578,3,0,0,4366336,0,0,0,0,0,303,304,0,4268032,307,308,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1749,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3673,3674,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5840896,5849088,0,0,0,0,0,0,0,0,0,0,0,0,6275072,0,0,0,0,0,0,0,4399804,4399804,0,0,0,0,0,0,0,1829,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1842,0,0,0,0,0,0,0,0,0,703,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2415,0,0,0,0,0,0,1,24578,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,319488,0,0,0,0,0,0,0,0,0,0,0,2841,0,0,0,0,2843,0,0,0,0,0,0,0,0,0,2852,0,0,0,0,0,0,0,0,0,131072,0,0,0,0,0,0,0,0,0,0,0,0,319488,0,0,0,319488,319488,319488,319488,319488,319488,319488,319488,319488,319488,319488,319488,319488,319488,319488,319488,319488,0,0,0,0,319488,0,0,0,0,0,0,0,0,0,0,319488,0,0,0,319488,0,0,0,0,0,0,0,0,0,0,319488,0,0,0,0,0,0,0,0,0,319488,0,0,0,0,319488,0,0,0,0,0,319488,319488,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,450560,450560,0,0,0,0,319488,319488,319488,0,24578,3,0,0,4366336,253952,0,0,0,0,303,304,0,4268032,307,308,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1832,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2382,0,0,0,0,2387,0,0,0,0,0,0,0,0,0,0,0,5840896,5849088,0,0,0,0,0,0,0,0,0,0,0,0,6275072,0,0,0,0,0,0,0,368,0,0,0,0,0,0,0,0,0,5857280,0,6463488,4939776,0,0,5455872,0,0,0,0,0,0,0,0,6062080,6463488,0,5398528,0,0,0,6479872,1,24578,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,327680,0,0,0,0,0,0,0,0,0,0,1168,0,0,0,0,0,0,0,0,0,1178,0,0,0,0,0,0,0,1185,0,0,0,0,0,0,0,131072,0,0,0,0,0,0,0,0,0,0,0,0,0,327680,327680,327680,0,0,0,0,0,0,0,0,0,0,327680,49724,0,0,0,0,0,0,0,49724,49724,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,327680,327680,327680,1,24578,3,0,0,4366336,0,0,0,0,0,303,304,0,4268032,307,308,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2302,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1780,0,0,0,0,0,0,0,0,0,0,0,327680,327680,327680,327680,327680,327680,335872,327680,327680,327680,335872,327680,327680,327680,327680,327680,327680,0,0,0,0,0,0,0,0,0,49724,0,0,0,0,0,0,0,0,0,663,0,0,0,0,0,0,0,0,0,663,0,0,663,0,0,0,0,0,0,0,663,0,0,5750784,0,0,0,0,0,5873664,0,0,0,0,0,0,0,0,0,0,0,6275072,0,0,0,0,0,0,0,0,0,0,49152,992,0,0,0,0,131072,0,0,0,0,0,0,0,0,0,0,0,0,0,344064,344064,344064,0,0,0,0,0,0,0,0,0,0,344064,344064,344064,1,24578,3,0,0,4366336,0,0,0,0,0,303,304,0,4268032,307,308,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2319,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2326528,0,0,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,1,24578,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,352256,0,0,0,0,0,0,0,0,0,0,0,0,139264,147456,0,0,352256,0,0,0,0,0,131072,0,0,0,0,0,352256,0,0,352256,352256,352256,0,352256,0,352256,352256,352256,352256,352256,352256,352256,352256,352256,352256,352256,352256,352256,352256,352256,352256,352256,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,469,0,0,0,0,0,0,0,0,0,0,2335239,2335206,352256,352256,352256,1,24578,3,0,0,4366336,0,0,0,0,0,303,304,0,4268032,307,308,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2377,0,0,2380,0,0,0,0,2385,0,0,0,0,0,2391,0,0,1,293,3,0,0,0,299,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1242,0,0,0,0,0,0,0,0,131072,0,0,0,0,0,0,0,0,0,0,0,0,0,360448,360448,360448,0,0,0,0,0,0,0,0,0,0,360448,360448,360448,1,0,3,155943,155943,297,0,637,0,0,0,303,304,0,4268032,307,308,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3162,0,3163,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212992,0,212992,212992,212992,212992,212992,212992,212992,212992,212992,212992,212992,212992,212992,529,529,529,529,1379,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,2471,2472,529,529,529,57944,57944,57944,57944,57944,57944,59007,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60756,57944,57944,57944,57944,57917,57917,60373,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59507,529,529,529,57894,57894,57894,0,0,0,0,0,0,0,0,0,3430,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,405,0,0,0,0,0,0,0,0,0,333,0,0,3469,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,1958,529,529,1961,529,529,529,529,529,3500,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,2470,529,529,529,529,529,57917,57917,57917,57917,60926,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60395,57917,57917,0,0,0,0,3683,0,0,0,0,3688,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,529,57894,529,57894,529,529,57894,529,529,57917,57894,529,529,57894,57894,3704,529,529,529,3707,529,529,529,529,529,529,529,529,529,3715,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,58776,916,57894,57894,57894,57894,57894,57894,57894,58786,57894,57894,57894,58790,529,529,529,529,529,529,529,57894,61075,57894,57894,57894,61078,57894,57894,57894,57894,57894,57894,57894,57894,57894,61086,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59386,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,58858,57894,57894,57894,57894,57894,57894,57894,57894,50679,58776,992,61115,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57944,61133,57944,57944,57944,0,0,0,0,0,0,0,0,0,0,0,0,0,0,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,61136,57944,57944,57944,57944,57944,57944,57944,57944,57944,61144,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60091,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,3681,0,0,3835,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,529,529,529,529,529,529,529,529,529,529,529,529,529,529,1363,529,529,529,529,529,529,529,529,529,529,529,3857,529,529,529,3858,3859,529,529,529,529,529,529,529,529,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,61219,57894,57894,57894,57894,61220,61221,57894,57894,57894,57894,57894,57894,57894,57894,57894,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,61238,57917,57917,57917,57917,57917,57917,59450,59451,57917,57917,57917,57917,59458,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59473,57917,57917,57917,61239,61240,57917,57917,57917,57917,57917,57917,57917,57917,57917,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,61257,57944,57944,57944,57944,61258,61259,57894,57894,57894,57894,57894,61311,57894,57894,57894,61315,57894,57917,57917,57917,57917,57917,57917,61321,57917,57917,57917,57917,57917,57917,61327,57917,57917,57917,61331,57917,57944,57944,57944,57944,0,0,529,529,57894,57894,57917,57917,57944,57944,0,529,57894,57917,57944,0,529,57894,57917,57944,0,529,57894,57917,57944,0,529,57944,57944,57944,57944,61337,57944,57944,57944,57944,57944,57944,61343,57944,57944,57944,61347,57944,529,57894,0,0,0,0,0,0,0,0,3681,0,0,0,0,0,3838,0,0,3841,0,0,0,0,0,0,0,0,0,0,0,0,0,529,529,529,529,529,529,529,529,529,1350,529,529,529,529,529,529,1365,529,529,529,1370,529,0,0,0,0,4018,529,529,529,529,529,529,529,529,529,529,529,529,529,529,61377,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,58848,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,50679,58776,992,57894,57894,57894,61393,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,61409,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,529,529,529,529,57894,57894,57894,57894,57894,0,0,0,0,0,0,0,3148,0,0,57894,57894,57894,57894,57894,57917,57917,57917,57917,57917,57917,57944,57944,57944,57944,57944,57944,0,0,0,0,529,529,529,529,57894,57894,57894,57894,57917,57917,57917,57917,57917,57917,57917,57917,57944,57944,57944,57944,57944,57944,57944,57944,0,0,0,0,0,529,529,529,529,529,529,57894,57894,57917,57944,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1789,0,0,0,0,0,0,131072,0,0,0,0,0,0,0,0,0,0,0,0,0,376832,376832,376832,0,0,0,0,0,0,0,0,0,0,0,0,742,662,0,0,529,844,529,529,529,859,529,529,529,529,529,529,529,529,529,529,0,0,0,0,0,422,422,422,422,598,598,422,422,422,422,422,422,422,422,422,422,422,422,422,422,422,422,422,422,422,0,422,0,0,422,1,24578,3,0,0,4366336,0,0,0,0,0,303,304,0,4268032,307,308,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3216,3217,0,0,0,0,0,0,0,0,0,529,529,529,529,529,529,3946,529,529,529,529,529,529,3952,529,529,529,529,57894,57894,57894,57894,57894,57894,61305,57894,1,24578,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,309,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3482,0,0,0,0,0,0,529,529,529,529,529,529,529,529,529,529,529,3950,529,529,529,529,529,529,57894,57894,57894,57894,57894,57894,57894,57894,0,0,0,0,131072,0,0,0,0,0,0,0,0,0,0,0,0,0,393687,393687,393687,0,0,0,0,0,0,0,0,0,0,0,0,788,0,0,0,529,843,529,529,529,529,529,529,875,529,529,529,529,529,529,529,0,0,0,0,0,393687,0,393687,393687,393687,0,393687,393687,393687,393687,393687,393687,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,737,0,0,803,0,0,0,0,0,0,0,803,0,393687,393687,0,1,24578,3,0,0,4366336,0,0,0,0,0,303,304,0,4268032,307,308,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3693,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,529,1,24578,3,0,0,0,0,0,0,0,0,0,0,0,0,0,306,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,139264,147456,0,0,0,423,0,0,0,0,0,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,0,423,0,0,423,1,24578,3,155943,155943,297,0,0,0,0,0,303,304,0,306,307,308,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4399804,4399804,4399804,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3191,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,750,423,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2853,2854,0,0,0,1153,1727,1728,0,0,0,1734,1735,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2388,0,0,0,0,0,2295,0,0,0,0,2297,1735,2298,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2416,0,0,0,0,0,529,529,529,2504,0,0,0,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,58829,57894,57894,57894,57894,529,529,529,529,529,529,529,2504,2938,0,0,0,0,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60341,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,2593,3005,0,0,0,0,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60710,57917,57944,1,24578,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,417792,310,311,0,0,0,0,0,0,0,1829,0,0,0,0,0,0,0,0,0,0,0,0,0,1837,0,0,0,0,0,0,0,0,0,0,0,0,5627904,5652480,0,5701632,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,417792,0,0,0,0,417792,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,417792,0,0,417792,0,0,417792,0,0,0,0,0,0,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60362,57917,57917,57917,57917,57917,60367,57917,57917,57917,57917,57917,57917,60669,57917,57917,57917,57917,57917,57917,60677,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60703,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57944,417792,418102,417792,1,24578,3,0,0,4366972,0,0,0,0,0,303,304,311296,4268032,307,308,0,434176,0,0,0,0,0,0,0,0,0,0,0,0,450560,450560,0,0,0,0,0,0,0,0,0,0,0,0,139264,147456,0,0,450560,0,0,0,0,0,0,5840896,5849088,0,0,0,0,0,0,0,0,0,0,0,0,6275072,0,0,0,0,0,0,0,0,4399805,0,0,0,0,0,0,0,1829,0,0,0,0,0,0,0,0,0,0,0,1836,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,529,846,529,529,529,529,529,529,529,529,529,529,529,892,529,529,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,6275072,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,0,916,915,915,915,915,915,4858771,4875155,915,915,915,915,915,915,915,915,915,915,6300563,915,915,915,915,915,915,915,915,915,915,915,0,0,991,991,991,4826079,991,991,991,991,915,5751699,915,915,915,915,915,5874579,915,915,915,915,915,915,915,915,915,915,915,6275987,915,915,915,915,915,915,915,915,915,0,0,992,991,5465055,991,5481439,5563359,991,991,991,5637087,991,5686239,991,991,5751775,991,991,991,991,991,5874655,991,991,991,991,991,991,991,991,991,991,991,6276063,4358144,4358144,6463488,0,0,0,0,915,915,915,915,915,915,915,915,915,915,915,4932499,4940691,915,915,915,915,915,915,5055379,915,915,915,915,915,915,915,915,915,915,6325139,991,991,5006303,991,991,991,5120991,5137375,991,991,991,991,991,991,991,991,991,991,6325215,4359059,4359059,5817235,915,5858195,915,915,915,915,915,915,915,915,915,915,915,915,915,6120339,915,6169491,915,915,915,915,915,6243219,915,6292371,915,6316947,915,915,915,915,5890963,915,915,915,6030227,915,915,915,915,6161299,915,915,915,915,915,915,915,6407059,991,991,991,991,991,991,991,991,4998111,991,6317023,991,991,991,991,991,991,991,991,991,6464479,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4932499,4940691,4359059,4359059,4359059,4359059,4359059,4359059,5055379,4359059,4359059,4359059,4359059,4359059,4359059,5890963,4359059,4359059,4359059,6030227,4359059,4359059,4359059,4359059,6161299,4359059,4359059,4359059,4359059,4359059,4359059,4359059,6407059,4358144,4358144,4358144,915,915,915,4890624,0,0,0,0,0,0,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60361,57917,57917,60364,60365,57917,57917,57917,57917,57917,60370,4359059,4359059,4359059,5792659,5817235,4359059,5858195,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,6120339,4359059,6169491,4359059,4359059,4359059,4359059,4359059,6243219,4359059,6292371,4359059,4359059,4359059,4916115,4359059,4957075,4973459,4359059,4359059,4359059,4359059,4359059,4359059,5071763,4359059,4359059,4359059,4359059,4359059,4359059,4359059,5219219,4359059,5268371,4359059,4359059,5309331,5317523,4359059,4359059,4359059,5432211,6316947,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,6464403,4358144,4358144,4358144,4358144,4358144,915,915,915,915,915,0,0,0,0,0,0,0,0,4956160,4964352,0,0,0,0,0,0,57917,57917,57917,57917,57917,57917,57917,60356,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60001,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,0,0,0,750,57894,57944,57944,57944,57944,57944,57944,57944,57944,57944,4358144,4358144,6389760,4358144,4358144,6430720,6438912,0,0,0,0,0,0,4785043,915,915,915,4850579,915,915,915,915,915,4916115,915,4957075,4973459,915,915,915,915,915,915,915,915,5260179,915,915,915,915,915,915,915,915,5415827,915,5448595,915,5464979,915,5481363,5563283,915,915,915,5637011,915,5686163,915,915,5071763,915,915,915,915,915,915,915,5219219,915,5268371,915,915,5309331,5317523,915,915,915,5432211,915,5489555,915,915,915,915,915,915,915,915,915,5800851,915,915,5882771,915,915,915,915,915,915,915,915,915,6103955,915,915,915,6185875,915,915,915,6284179,915,915,6333331,915,915,915,6390675,915,915,6431635,6439827,4359059,5489555,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,5800851,4359059,4359059,5882771,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,6103955,4359059,4359059,4359059,6185875,4359059,4359059,4359059,0,5013504,0,0,6053888,0,0,0,0,0,0,0,0,6012928,4358144,4358144,5013504,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,6053888,4358144,4358144,6284179,4359059,4359059,6333331,4359059,4359059,4359059,6390675,4359059,4359059,6431635,6439827,4358144,4358144,4358144,6266880,6488064,915,915,915,6267795,6488979,0,0,0,0,0,0,0,0,0,0,0,0,540672,0,0,0,0,0,0,0,0,0,0,0,0,0,139264,147456,0,0,540672,0,5824512,5865472,4358144,4358144,5922816,4358144,4358144,6021120,4358144,6037504,4358144,4358144,6078464,6111232,4358144,6176768,6209536,6234112,4358144,4358144,4358144,4358144,4358144,4358144,4358144,0,0,915,915,4842387,915,915,915,915,6087571,4817887,991,991,991,991,6087647,4817811,4359059,4359059,4359059,4359059,6087571,0,5087232,0,5931008,4358144,5332992,5980160,4358144,915,5333907,5981075,915,991,5333983,5981151,915,4899731,915,915,915,915,915,915,915,915,915,915,915,5112723,915,915,915,915,915,5284755,915,915,915,915,5473171,5522323,915,915,915,915,5596051,5710739,5718931,915,5825427,5866387,915,915,5923731,915,915,6022035,915,6038419,915,915,6079379,6112147,915,6177683,6210451,915,6235027,915,915,915,915,915,915,915,0,0,991,991,991,991,991,6104031,991,991,991,6185951,991,991,991,6284255,991,991,6333407,991,991,991,6390751,991,991,6431711,6439903,4785043,4359059,4359059,4359059,4850579,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,6300563,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4358144,4358144,4358144,4358144,4358144,915,915,915,915,915,0,0,0,0,0,0,0,4898816,0,5709824,0,0,0,5283840,0,0,0,0,5251072,0,6414336,5832704,0,5955584,0,0,4358144,4358144,4841472,4358144,4358144,4358144,4898816,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,5111808,4358144,4358144,4358144,4358144,4358144,5283840,4358144,4358144,4358144,4358144,5472256,5521408,4358144,4358144,4358144,5595136,5709824,5718016,4358144,4842463,991,991,991,4899807,991,991,991,991,991,991,991,991,991,991,991,5112799,991,991,991,991,991,5284831,991,991,991,991,5473247,5522399,991,991,991,991,991,991,991,5211103,991,991,991,991,5293023,991,991,991,991,5366751,991,991,991,5456863,991,991,991,991,991,5555167,5571551,5579743,5620703,5669855,991,5596127,5710815,5719007,991,5825503,5866463,991,991,5923807,991,991,6022111,991,6038495,991,991,6079455,6112223,991,6177759,6210527,991,6235103,991,991,991,991,991,991,991,4359059,4359059,4359059,4359059,4359059,5194643,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4907008,0,5079040,6094848,5742592,0,0,0,0,0,4358144,4907008,4358144,5079040,4359059,4842387,4359059,4359059,4359059,4899731,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,5112723,4359059,4359059,4359059,4359059,4359059,5284755,4359059,4359059,4359059,4359059,5473171,5522323,4359059,4359059,4359059,4359059,4359059,4359059,4359059,5211027,4359059,4359059,4359059,4359059,5292947,4359059,4359059,4359059,4359059,5366675,4359059,4359059,4359059,5456787,4359059,4359059,4359059,4359059,4359059,5555091,5571475,5579667,5620627,5669779,4359059,4359059,5596051,5710739,5718931,4359059,5825427,5866387,4359059,4359059,5923731,4359059,4359059,6022035,4359059,6038419,4359059,4359059,6079379,6112147,4359059,6177683,6210451,4359059,6235027,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,6275987,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4923392,4358144,4358144,4358144,4358144,4358144,915,4924307,915,915,915,915,4358144,4358144,4358144,4358144,6406144,915,915,915,915,915,915,915,915,4998035,915,915,5038995,915,915,915,5096339,5104531,915,915,5202835,915,915,915,915,915,915,915,915,915,915,915,915,5628819,5653395,915,5702547,915,915,915,915,915,915,915,915,915,915,915,915,915,915,915,915,915,5178259,915,915,915,915,915,5243795,915,915,915,915,915,915,915,5342099,991,5039071,991,991,991,5096415,5104607,991,991,5202911,991,991,991,991,991,991,991,991,991,991,991,5891039,991,991,991,6030303,991,991,991,991,6161375,991,991,991,5792735,5817311,991,5858271,991,991,991,991,991,991,991,991,991,991,991,991,991,6120415,991,6169567,991,991,991,991,991,6243295,991,6292447,991,991,5219295,991,5268447,991,991,5309407,5317599,991,991,991,5432287,991,5489631,991,991,991,991,991,991,991,991,991,5800927,991,991,5882847,991,991,991,991,991,991,991,991,991,991,991,991,991,991,991,991,5178335,991,991,991,991,991,5243871,991,991,991,991,991,991,991,5342175,991,4358144,6307840,4358144,4358144,6356992,6381568,6397952,4801427,4809619,915,915,4891539,915,4948883,915,915,915,5047187,915,915,915,915,5186451,915,5235603,5301139,915,915,5407635,5530515,915,915,915,991,991,991,991,991,991,991,991,991,991,991,991,991,991,991,991,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4358144,4358144,4358144,4358144,4358144,4358144,0,915,915,915,915,915,915,0,0,0,0,0,0,915,915,5899155,915,915,915,915,915,915,915,915,6308755,915,915,6357907,6382483,6398867,4801503,4809695,991,991,4891615,991,4948959,991,991,991,5047263,991,991,991,991,991,991,991,991,991,991,991,5628895,5653471,991,5702623,991,991,991,991,991,991,991,991,991,991,991,991,991,991,991,991,991,991,0,0,0,0,915,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,5186527,991,5235679,5301215,991,991,5407711,5530591,991,991,991,991,5899231,991,991,991,991,991,991,991,991,6308831,991,991,6357983,6382559,6398943,4801427,4809619,4359059,4359059,4891539,4359059,4948883,4359059,4359059,4359059,5047187,4359059,4359059,4359059,4359059,5186451,4359059,5235603,5301139,4359059,4359059,5407635,5530515,4359059,4359059,4359059,4359059,5899155,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,6308755,4359059,4359059,6357907,6382483,6398867,5021696,4358144,4358144,5022611,915,915,0,4980736,0,0,0,0,0,5373952,5734400,6045696,0,6258688,6447104,0,0,6127616,0,6348800,5906432,0,5537792,4358144,4358144,4358144,4358144,5324800,5373952,5537792,5545984,5734400,5971968,4358144,6045696,4358144,6070272,4358144,4358144,4358144,6348800,915,4866963,4883347,915,4981651,915,915,915,915,915,915,915,915,5325715,5587935,5735391,5972959,991,6046687,991,6071263,991,991,991,991,6349791,4359059,4866963,4883347,4359059,4981651,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,5325715,5374867,5538707,5546899,5587859,5735315,5972883,915,6046611,915,6071187,915,915,915,915,6349715,991,4867039,4883423,991,4981727,991,991,991,991,991,991,991,991,5325791,5374943,5538783,5546975,4359059,6046611,4359059,6071187,4359059,4359059,4359059,4359059,6349715,4358144,6144e3,915,6144915,0,4988928,5005312,0,0,0,0,5775360,0,0,0,3681,0,0,0,0,0,0,5693440,0,6496256,5144576,5136384,0,5914624,4358144,4358144,5005312,4358144,4358144,4358144,512e4,5136384,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,6324224,915,915,5006227,915,915,915,5120915,5137299,5006227,4359059,4359059,4359059,5120915,5137299,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,6325139,5914624,5915539,0,0,0,0,0,5513216,5783552,0,3681,0,0,0,0,3837,0,0,0,0,0,3842,0,0,0,0,0,0,0,0,0,0,0,529,529,529,529,529,3849,529,529,529,0,0,0,0,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,915,915,915,915,915,915,915,915,915,915,915,915,915,915,915,915,915,915,915,915,915,915,990,991,991,991,991,915,915,5014419,915,915,915,915,915,915,915,915,915,6054803,915,915,915,991,991,5014495,991,991,991,991,991,991,991,991,991,6054879,991,991,991,991,991,991,6407135,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4998035,4359059,4359059,5038995,4359059,4359059,4359059,5096339,5104531,4359059,4359059,5202835,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,5415827,4359059,5448595,4359059,5464979,4359059,5481363,5563283,4359059,4359059,4359059,5637011,4359059,5686163,4359059,4359059,5751699,4359059,4359059,4359059,4359059,4359059,5874579,4359059,4359059,4359059,5014419,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,6054803,4359059,4359059,4359059,0,0,0,0,5193728,0,0,0,0,0,0,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4931584,4939776,4358144,4358144,4358144,4358144,4358144,4358144,5054464,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,5193728,4358144,4358144,4358144,4358144,4358144,4358144,4358144,915,915,915,915,915,5194643,915,915,915,915,915,915,915,915,991,991,991,991,991,5194719,991,991,991,991,991,991,991,991,991,6300639,991,991,991,991,991,991,991,991,991,991,991,5809043,4359059,4359059,4359059,4826003,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,5628819,5653395,4359059,5702547,4359059,4359059,5809043,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,5178259,4359059,4359059,4359059,4359059,4359059,5243795,4359059,4359059,4359059,4359059,4359059,4359059,4359059,5342099,4359059,4359059,4359059,4358144,5226496,4358144,5742592,4358144,4358144,4358144,6094848,915,4907923,915,5079955,915,5227411,915,5743507,915,915,915,6095763,915,991,4907999,991,5080031,991,5227487,991,5743583,991,991,991,991,991,4858847,4875231,991,991,991,991,991,991,991,991,991,991,991,991,991,5260255,991,991,991,991,991,991,991,991,5415903,991,5448671,6095839,991,4359059,4907923,4359059,5079955,4359059,5227411,4359059,5743507,4359059,4359059,4359059,6095763,4359059,5062656,0,0,0,0,0,4358144,5062656,4358144,4358144,4358144,4358144,4358144,915,5063571,915,915,915,5211027,915,915,915,915,5292947,915,915,915,915,5366675,915,915,915,5456787,915,915,915,915,915,5555091,5571475,5579667,5620627,5669779,915,915,915,5792659,915,915,915,6226835,991,5063647,991,991,991,991,991,6226911,4359059,5063571,4359059,4359059,4359059,4359059,4359059,6226835,0,6086656,0,0,0,4816896,4358144,4358144,4358144,4358144,6086656,4817811,6005651,6005727,6005651,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3465,0,0,1,24578,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,450560,0,0,0,0,0,0,450560,0,0,450560,0,450560,450560,450560,450560,0,0,0,0,131072,0,0,0,0,0,0,450560,0,0,0,0,0,450560,0,450560,450560,450560,450560,450560,450560,450560,450560,450560,450560,450560,450560,450560,450560,450560,450560,450560,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,771,0,0,0,0,0,0,0,0,0,0,0,0,450560,450560,450560,1,24578,3,0,0,4366336,0,0,0,0,0,303,304,0,4268032,307,308,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4399805,311296,4399805,0,0,0,311296,0,0,0,0,0,0,0,0,0,0,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,6299648,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,0,0,0,0,0,0,304,0,0,308,0,0,0,308,0,0,0,4931584,0,0,0,0,0,0,0,0,0,0,0,0,5210112,0,5365760,0,5554176,0,0,6316032,0,196608,0,0,5816320,6291456,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2359296,368,0,0,0,0,6316032,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,6463488,4358144,4358144,4358144,4358144,4358144,0,0,0,0,0,0,304,0,0,308,0,0,0,4956160,4964352,0,0,0,0,0,0,57917,57917,60352,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60360,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57944,60027,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60751,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,4358144,4358144,6389760,4358144,4358144,6430720,6438912,916,0,0,0,916,0,4784128,0,0,0,4849664,0,0,0,0,0,4915200,0,4956160,4972544,0,0,0,0,0,0,0,0,0,666,0,645,0,0,0,0,0,0,796,0,0,0,0,0,0,0,0,0,0,805,0,810,5824512,5865472,4358144,4358144,5922816,4358144,4358144,6021120,4358144,6037504,4358144,4358144,6078464,6111232,4358144,6176768,6209536,6234112,4358144,4358144,4358144,4358144,4358144,4358144,4358144,916,0,0,0,4841472,0,0,0,0,0,0,0,5210112,0,0,0,0,5292032,0,0,0,0,5365760,0,0,0,5455872,0,0,0,0,0,5554176,5570560,5578752,5619712,5668864,0,0,0,5791744,5718016,0,5824512,5865472,0,0,5922816,0,0,6021120,0,6037504,0,0,6078464,6111232,0,6176768,6209536,0,6234112,0,0,0,0,0,0,0,992,0,0,0,992,0,4784128,0,0,0,4849664,0,0,0,0,0,4915200,0,4956160,4972544,0,0,0,0,0,0,5070848,0,0,0,0,0,0,0,5218304,0,5267456,0,0,5308416,5316608,0,0,0,5431296,0,5488640,0,0,0,0,0,0,0,0,0,5799936,0,0,5881856,0,0,0,0,0,0,0,0,459183,0,0,0,0,0,0,0,0,0,0,0,0,0,459224,459224,459224,459224,459224,459224,459224,459224,459224,459224,459224,459224,459224,459224,459224,459224,459224,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1066,0,0,0,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,0,0,0,0,0,459348,459348,459348,459348,459348,459348,459348,459348,459348,459348,459348,459348,459348,459348,459348,459348,459348,459348,459348,459348,459348,459348,459348,459348,459348,459224,459380,459224,459224,459380,1,24578,3,0,0,4366336,0,0,0,0,0,303,304,0,4268032,307,308,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5767168,0,0,0,0,4857856,0,0,0,0,0,0,0,0,0,0,0,1,24578,3,0,0,0,0,507904,0,0,0,507904,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,507904,0,0,0,0,0,0,57917,60351,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60688,57917,57917,57917,57917,57917,0,0,0,0,131072,0,0,0,0,0,0,0,0,0,0,0,0,0,507904,507904,507904,507904,507904,507904,507904,507904,507904,507904,507904,507904,507904,507904,507904,507904,507904,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1321,0,0,0,0,0,0,0,0,0,0,0,0,507904,507904,507904,1,24578,3,0,0,4366336,0,0,0,0,0,303,304,0,4268032,307,308,0,0,442368,0,0,0,0,0,0,0,0,0,0,0,726,0,0,0,0,0,0,0,0,0,0,0,738,0,0,0,0,0,0,0,0,1,24578,3,0,0,0,0,0,516096,0,0,0,516096,0,0,0,0,0,0,516096,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1201,0,0,1204,1205,0,0,0,0,1209,0,0,0,368,368,0,0,0,0,0,0,0,131072,0,0,0,0,0,0,0,0,0,0,0,0,0,516569,516569,516569,516569,516569,516569,516569,516569,516569,516569,516569,516569,516569,516569,516569,516569,516569,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2306,2307,0,0,0,0,0,0,0,0,0,0,0,516569,516569,516569,1,24578,0,0,0,4366336,0,0,548864,0,0,303,304,0,4268032,307,308,409600,0,0,0,0,0,0,0,0,0,0,0,0,1199,0,0,0,0,0,0,0,0,0,0,0,0,0,0,368,368,0,0,0,5005312,4358144,4358144,4358144,512e4,5136384,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,6324224,5914624,5914624,0,0,0,0,0,5513216,5783552,0,40960,0,0,0,0,0,0,0,0,0,6299648,0,0,0,0,0,0,0,0,0,0,0,5808128,4358144,4358144,4358144,4825088,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,483328,0,0,0,0,0,0,0,0,0,0,0,0,0,0,335,0,0,0,0,0,0,0,0,335,0,0,139264,147456,0,0,0,0,1,24578,4227366,0,0,0,0,0,0,300,0,0,0,300,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1208,0,1210,0,0,368,368,0,0,0,0,0,0,540672,0,0,540672,0,0,0,540672,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2310144,0,368,0,0,0,0,0,0,0,1,24578,4227366,0,0,4366336,0,0,0,0,0,303,304,0,4268032,307,308,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1294,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,363,0,0,0,0,0,0,368,0,297,0,0,0,0,0,1,24578,3,0,0,4366336,0,0,0,0,0,303,304,0,4268032,307,308,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1806,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1866,0,0,0,0,0,0,0,0,0,0,1,24578,3,155943,297,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2829,0,0,0,57894,57917,57894,57894,57894,57894,57894,57894,57894,57917,57917,57894,57894,57944,57894,57894,57894,57894,57894,57894,57894,57944,57944,57894,57894,57894,57894,57944,57944,57894,529,57894,57894,57894,57894,57894,57894,60623,57894,57894,60627,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60636,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57917,61317,57917,57917,61319,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57944,61333,1153,1727,0,0,0,0,1734,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3172,0,0,0,0,2295,0,0,0,0,2297,0,2298,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2827,0,0,0,0,0,0,0,0,0,0,2835,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,368,0,0,0,0,0,3005,0,0,0,0,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,58948,57917,57917,57917,0,0,0,0,1829,0,0,0,0,0,0,0,2374,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,483328,0,0,0,0,0,0,0,0,0,0,0,0,131072,0,0,0,0,0,0,445,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,529,529,529,529,529,529,529,529,529,529,0,0,0,1283,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,339,0,0,0,57895,57918,57895,57895,57895,57895,57895,57895,57895,57918,57918,57895,57895,57945,57895,57895,57895,57895,57895,57895,57895,57945,57945,57895,57895,57895,57895,57945,57945,57895,529,57895,57895,57895,1,24578,3,155943,155943,297,0,0,0,0,0,303,304,0,0,307,308,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2326,2327,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2846,0,0,0,0,0,0,0,0,0,0,0,1,24578,3,155944,297,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3464,0,0,0,1,24578,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,573440,0,573440,573440,573440,0,573440,573440,573440,573440,573440,573440,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2328,0,0,0,0,0,0,0,0,0,2337,0,0,0,0,0,0,131072,0,0,0,0,0,0,0,0,0,0,0,0,0,573440,573440,573440,0,0,0,0,0,0,0,0,0,0,0,0,1260,0,0,0,0,1265,0,0,0,0,0,0,0,0,0,0,0,1277,0,0,0,0,0,0,0,573440,573440,573440,573440,573440,573440,573440,573440,573440,573440,573440,573440,573440,573440,573440,573440,573440,573440,573440,573440,573440,573440,573440,573440,573440,573440,573440,1,24578,3,0,0,4366336,0,0,0,0,0,303,304,0,4268032,307,308,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2351,0,0,0,0,2355,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2406,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2330,0,0,0,0,0,0,0,0,0,0,0,6356992,3681,0,0,0,0,0,0,0,5496832,0,0,0,0,0,5611520,0,0,0,0,0,4947968,5021696,5529600,0,0,5169152,0,0,0,4800512,0,0,0,1,24578,3,0,0,4366336,0,0,0,0,0,638,304,0,4268032,641,308,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2816,0,0,2819,0,0,0,0,0,0,2825,0,0,0,0,0,0,0,0,0,0,0,131072,0,0,0,0,0,0,0,0,0,0,0,0,581632,0,0,0,581632,581632,581632,581632,581632,581632,581632,581632,581632,581632,581632,581632,581632,581632,581632,581632,581632,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,529,581632,581632,581632,1,24578,3,0,0,4366336,0,0,0,0,0,303,304,0,4268032,307,308,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2868,0,0,0,0,0,0,0,0,529,529,529,529,529,529,2880,529,529,3833,4882432,0,0,0,0,0,0,0,0,5939200,0,0,5677056,6365184,4866048,0,6070272,5545984,5152768,0,0,6144e3,4358144,4866048,4882432,4358144,4980736,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,499712,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1774,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1324,0,0,0,0,0,0,0,0,0,0,4358144,6045696,4358144,6070272,4358144,4358144,4358144,4358144,6348800,4358144,6144e3,0,6144e3,0,4988928,5005312,0,0,0,0,5775360,0,0,0,3932,0,0,0,0,0,0,5693440,5005312,4358144,4358144,4358144,512e4,5136384,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,6324224,5914624,5914624,0,0,0,0,0,5513216,5783552,0,3932,0,0,0,0,0,0,0,0,351,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,368,0,297,0,0,0,312,313,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3679,0,0,0,0,0,0,0,313,0,0,0,0,0,312,0,312,313,0,312,312,313,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1295,0,1175,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1888,0,0,0,0,0,0,0,0,0,0,529,529,529,529,529,0,0,0,0,131072,0,433,0,0,0,0,0,0,0,0,312,0,460,474,474,474,487,487,487,487,487,487,487,487,487,507,487,487,487,487,487,487,525,487,487,487,525,487,487,487,487,487,487,530,57896,530,57896,530,530,57896,530,530,57919,57896,530,530,57896,57896,57896,1,24578,3,155943,155943,297,0,0,0,0,0,303,304,0,0,307,308,0,0,0,0,0,646,0,0,649,650,0,0,0,0,0,0,317,318,319,320,321,322,323,324,325,326,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1206,1207,0,0,0,0,0,368,368,0,0,0,57896,57919,57896,57896,57896,57896,57896,57896,57896,57919,57919,57896,57896,57946,57896,57896,57896,57896,57896,57896,57896,57946,57946,57896,57896,57896,57896,57946,57946,57896,530,57896,0,747,0,0,0,0,0,752,0,0,0,0,646,0,0,0,0,0,0,763,0,0,0,0,0,0,0,0,772,0,0,0,0,0,0,0,2346,0,0,0,0,0,2350,0,0,2352,0,0,0,0,2357,0,0,0,0,2362,0,0,0,0,0,0,0,0,0,1854,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1328,0,1330,0,0,1169,0,0,778,0,0,782,0,0,0,0,0,0,0,0,791,0,0,0,0,795,0,0,0,0,0,0,0,799,0,0,0,0,0,0,0,0,0,694,0,0,0,0,0,368,368,368,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,540672,0,0,0,0,0,0,0,540672,0,0,0,0,0,0,0,0,835,795,0,0,0,0,0,839,840,0,0,0,0,795,529,529,849,853,529,529,865,529,529,529,881,529,886,529,894,529,529,529,0,2507,0,0,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59899,57894,57894,57894,57894,57894,57894,897,529,529,911,529,57894,57894,57894,58268,58272,57894,57894,58284,57894,57894,57894,58300,57894,58305,57894,58313,57894,58316,57894,57894,58330,57894,0,57917,57917,57917,58344,58348,57917,57917,58360,57917,57917,57917,58376,57917,58381,57917,58389,57917,58392,57917,57917,58406,57917,0,0,0,0,58305,57944,57944,57944,58419,58423,57944,57944,58435,57944,57944,57944,57944,57944,57944,57944,57944,60079,57944,57944,57944,57944,57944,60085,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,0,0,0,0,0,0,0,4153,0,0,0,529,529,529,529,529,57944,57944,58451,57944,58456,57944,58464,57944,58467,57944,57944,58481,57944,849,853,1143,897,529,529,0,58272,58268,58493,58316,57894,57894,155943,1153,0,0,1156,0,0,0,0,0,0,196608,0,0,0,106496,0,0,4284416,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5341184,0,5652480,0,1161,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,278528,0,0,0,0,1219,0,0,0,0,1224,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1785,1786,1787,0,0,0,0,1247,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,644,0,1281,0,0,0,0,0,0,0,0,0,0,1292,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1304,0,0,0,0,0,0,0,0,399,0,0,0,0,0,0,0,0,352,0,0,0,399,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,139264,147456,0,0,0,0,529,529,529,529,529,1414,529,529,529,529,529,529,529,529,529,529,529,529,58776,916,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59889,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59389,57894,57894,57894,57894,57894,59396,57894,57894,57894,57894,57894,57894,57894,57894,59405,57894,1153,1727,0,0,0,0,1734,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1754,0,0,0,0,0,0,0,0,0,0,1197,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,368,368,0,0,0,0,0,1875,0,0,0,0,0,0,0,0,0,0,0,0,1887,0,0,0,1889,0,0,1890,0,0,0,0,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,529,529,529,529,529,1903,529,529,529,529,529,529,529,529,529,1916,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,2489,529,529,529,2492,529,529,529,529,529,2497,529,529,529,529,57894,57894,57894,57894,59346,57894,57894,57894,57894,57894,57894,57894,57894,57894,59359,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57917,61104,57917,57917,57917,61107,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59446,57917,57917,57917,57917,57917,57917,57917,57917,57917,59459,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,0,0,0,0,57894,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59542,57944,57944,57944,57944,57944,57944,57944,57944,57944,59555,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,529,529,529,529,529,57894,57894,57894,57894,57894,57894,57944,57944,57944,57944,57944,57944,59614,57944,57944,57944,57944,57944,57944,59620,57944,57944,57944,57944,57944,57944,529,2285,529,529,529,57894,59634,57894,57894,57894,2294,0,0,0,0,0,0,245760,245760,245760,245760,245760,245760,0,0,0,0,0,0,0,245760,245760,245760,0,0,0,0,139264,147456,245760,245760,0,0,0,131072,0,0,0,0,245760,0,0,0,0,0,0,245760,0,245760,0,245760,0,0,0,0,0,0,0,0,0,0,0,0,697,698,0,368,368,368,0,0,0,0,0,0,0,0,0,710,0,0,0,0,2295,0,0,0,0,2297,0,2298,0,0,0,0,0,0,0,0,0,2304,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,270336,0,0,0,0,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,0,0,0,0,2404,529,529,529,529,529,529,529,529,529,529,529,2434,529,529,2437,529,529,529,529,529,529,2445,529,529,529,529,529,529,529,529,529,529,529,3712,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,3265,529,529,529,529,0,0,57894,57894,57894,57894,57894,529,529,529,529,529,529,2480,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,2500,529,529,529,529,529,529,529,529,3257,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,2938,0,57894,57894,57894,57894,57894,57894,57894,57894,59418,57894,57894,57894,57894,57894,57894,59424,57894,57894,57894,57894,57894,57894,50679,2089,57917,57917,57917,57917,57917,59440,57917,57917,57894,57894,59933,57894,57894,57894,57894,0,0,0,0,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59954,57917,57917,59957,57917,57917,57917,57917,57917,57917,57917,57944,57944,57944,57944,57944,60961,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60991,57944,57944,57944,57944,57944,57944,57944,529,529,529,57894,57894,57894,0,0,57917,59965,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59985,57917,57917,57917,57917,57917,57917,57917,57917,58965,0,58966,58967,57944,57944,57944,57944,57944,58974,57944,57944,57944,57944,58980,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,529,57894,57894,0,0,0,0,0,0,0,0,0,0,3931,3681,0,0,0,0,0,0,0,57944,60048,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60068,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59049,57944,57944,57944,57944,57944,57944,57944,57944,529,529,529,529,529,529,57894,57894,57894,57894,57894,57894,57894,60879,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60892,57894,57894,57944,57944,57944,57944,57944,57944,60105,57944,57944,57944,57944,2765,529,529,529,529,60114,57894,57894,57894,57894,2775,2295,0,2776,2298,0,0,2778,0,0,0,0,0,0,0,2401,0,0,0,0,0,0,0,0,0,0,0,0,2411,0,0,0,0,0,0,0,0,0,0,0,0,2300,0,0,0,0,0,0,0,0,0,0,2310,0,0,0,0,0,0,0,0,529,2935,529,529,529,529,529,0,2938,0,0,0,0,57894,57894,57894,57894,57894,57894,57894,57894,57894,60291,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60307,57894,57894,57894,57894,57894,57894,57894,60312,57894,57894,57894,57894,57894,57894,57894,60318,57894,57894,57894,57894,57894,57894,57894,60299,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,0,0,992,0,3005,0,0,0,0,57917,57917,57917,57917,57917,57917,57917,57917,57917,60358,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60366,57917,57917,57917,57917,57917,57917,57917,58881,57917,57917,57917,58885,57917,57917,58896,57917,57917,58900,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60934,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60702,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57944,57917,57917,57917,57917,60402,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60413,57917,57917,57917,57917,57917,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,0,0,0,0,0,0,0,0,0,0,529,529,529,529,57944,57944,60423,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60431,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,57894,0,0,0,0,0,0,0,0,3681,0,0,0,0,57944,57944,57944,57944,57944,57944,60478,57944,57944,57944,57944,57944,529,529,529,529,529,57894,57894,57894,57894,57894,303,307,0,0,0,0,3147,0,0,0,0,0,0,0,2787,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3198,0,0,0,0,3203,3151,0,0,0,0,0,0,3156,0,0,0,0,0,0,0,0,0,0,0,0,0,3166,0,0,0,0,0,0,0,0,0,0,0,303,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,532480,0,0,0,0,0,0,0,0,0,3179,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3195,0,0,0,0,0,0,0,0,0,0,0,756,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,529,529,529,2877,2878,529,529,529,529,0,0,0,0,3208,3209,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3221,0,529,529,529,529,529,529,529,0,2938,0,0,0,0,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60655,57894,57894,57894,57894,57894,57894,57894,57894,0,0,57917,57917,529,529,529,529,529,3232,529,529,3236,529,529,529,529,529,529,529,529,529,529,3245,529,529,529,529,529,529,529,529,529,529,529,3252,57894,60644,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,3005,0,57917,57917,57917,57917,57917,58370,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,0,0,0,0,57894,57944,57944,58412,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60057,57944,57944,57944,57944,57944,57944,60062,57944,60064,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,2766,529,529,529,57894,60115,57894,57894,57894,0,0,0,0,0,0,0,0,0,0,0,0,2404,2405,0,0,2407,0,0,0,0,2412,0,0,0,0,0,0,0,0,0,0,57917,57917,57917,57917,60693,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57944,57944,57944,60418,57944,60419,57944,57944,57944,57944,57944,57944,60742,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,61158,57944,57944,529,3418,529,57894,60765,57894,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3436,0,0,0,0,0,0,0,0,0,0,0,3185,0,0,0,0,0,0,0,0,0,0,0,0,3197,0,0,0,0,0,0,0,529,529,529,529,529,529,529,3501,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,3518,529,3520,529,529,529,0,0,0,0,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60319,57894,57894,57894,57894,4014,0,4016,0,529,4019,529,4021,529,529,529,529,529,529,529,529,529,529,529,57894,61378,57894,61380,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60334,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59431,50679,0,57917,57917,57917,57917,57917,57917,57917,57917,57894,57894,57894,57917,61394,57917,61396,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57944,61410,57944,61412,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,529,57894,57894,0,0,0,0,0,0,0,0,0,0,0,3681,0,0,0,0,0,0,0,57894,57894,57894,57894,61452,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57917,57917,57917,57917,61466,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60408,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60038,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,61480,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,0,0,0,0,0,0,0,0,4154,0,4156,529,529,529,529,529,529,529,529,529,529,1909,529,529,529,529,529,529,529,529,529,1920,529,529,529,529,529,529,529,529,529,529,529,529,529,1425,529,529,529,529,58776,916,57894,57894,58781,57894,57894,57894,57894,57894,57894,57894,57894,57894,0,0,0,314,315,316,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,368,0,0,245760,245760,0,0,0,429,131072,0,0,429,0,0,0,0,0,0,0,0,429,461,0,0,0,461,461,461,461,461,461,461,461,461,461,461,524,461,524,524,524,461,524,524,524,524,524,524,531,57897,531,57897,531,531,57897,531,531,57920,57897,531,531,57897,57897,57897,57920,57897,57897,57897,57897,57897,57897,57897,57920,57920,57897,57897,57947,57897,57897,57897,57897,57897,57897,57897,57947,57947,57897,57897,57897,57897,57947,57947,57897,622,57897,57974,57974,57974,1,24578,3,155943,155943,297,0,0,0,0,0,303,304,0,0,307,308,0,0,0,0,0,0,0,0,0,0,0,0,0,0,417792,0,0,0,0,417792,0,0,0,0,0,0,311,0,311,0,0,0,57944,57944,57944,57944,57944,58460,57944,57944,57944,57944,57944,57944,57944,529,529,529,529,529,529,0,57894,57894,57894,57894,57894,57894,155943,1153,0,303,0,0,0,0,0,0,645,0,0,0,805,0,810,0,796,0,822,0,0,0,0,0,0,0,0,0,645,0,0,0,0,0,0,0,0,0,2371,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3677,0,0,0,0,0,0,1846,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1846,0,0,0,0,0,0,0,0,0,0,0,3213,0,0,0,0,0,0,0,0,0,0,0,0,0,0,529,529,529,529,529,529,529,529,1349,529,529,529,1358,529,529,529,529,529,529,529,529,529,529,529,529,529,529,1969,529,529,529,529,529,529,1976,529,529,529,529,529,529,529,529,529,529,58776,0,57894,57894,57894,57894,57894,57894,57894,0,0,0,0,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,58938,57917,57917,57917,57917,57917,57917,57917,57917,57917,57894,57894,57894,57894,59412,57894,57894,57894,57894,57894,57894,59420,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,50679,0,57917,57917,57917,57917,57917,57917,57917,57917,57917,1269,57894,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59563,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57917,57917,57917,59512,57917,57917,57917,57917,57917,57917,59520,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57894,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,529,529,529,529,529,0,57894,57894,57894,57894,57894,57894,155943,1153,0,0,1157,0,57944,57944,59608,57944,57944,57944,57944,57944,57944,59616,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,529,529,529,529,57894,57894,57894,57894,57894,2294,0,0,0,0,0,0,417792,0,417792,0,0,0,0,311,0,0,0,0,0,417792,0,417792,0,0,0,0,139264,147456,417792,0,0,0,131072,0,0,0,0,0,0,0,0,0,0,311,0,417792,417792,0,0,417792,417792,417792,417792,417792,417792,417792,417792,417792,417792,417792,418103,417792,417792,418102,418103,417792,417792,418102,417792,418102,417792,0,0,0,0,0,0,0,0,417792,0,0,0,417792,0,0,2805,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1188,0,0,0,2860,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,529,529,529,529,529,2879,529,529,529,0,0,0,0,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59866,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59355,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59430,57894,50679,2090,57917,57917,57917,57917,57917,57917,57917,57917,529,2883,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,2473,529,529,529,529,2936,529,529,529,0,2938,0,0,0,0,57894,57894,57894,57894,57894,57894,60288,57894,57894,57894,57894,60292,57894,57894,57894,57894,57894,57894,57894,0,0,0,0,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59955,57917,57917,57917,57917,57917,57917,57917,57917,57917,60377,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,61132,57917,57917,57917,57944,57944,57944,57944,57944,0,3005,0,0,0,0,57917,57917,57917,57917,57917,57917,60355,57917,57917,57917,57917,60359,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,58403,57917,57917,57917,0,0,0,0,57894,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60424,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60071,57944,57944,0,321,321,430,131072,432,434,430,439,432,439,0,317,456,456,456,457,462,475,475,475,488,488,488,488,488,488,488,488,488,488,509,509,522,522,523,523,509,523,523,523,509,523,523,523,523,523,523,532,57898,532,57898,532,532,57898,532,532,57921,57898,532,532,57898,57898,57921,57898,57898,57898,57898,57898,57898,57898,57921,57921,57898,57898,57948,57898,57898,57898,57898,57898,57898,57898,57948,57948,57898,57898,57898,57898,57948,57948,57898,623,57973,57973,57973,1,24578,3,155943,155943,297,0,0,0,0,0,303,304,0,0,307,308,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4931584,0,0,0,0,0,0,0,0,0,0,0,0,5210112,0,5365760,0,5554176,0,686,0,0,0,0,0,0,0,0,0,0,0,0,0,368,368,368,702,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2303,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,329,330,331,332,0,0,0,0,0,0,0,0,0,0,898,529,529,529,529,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,58317,57894,57894,57894,57894,0,57917,57917,57917,57917,57917,57917,57917,58924,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,58951,57917,0,1217,1176,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1243,0,0,0,0,0,0,0,2810,0,0,0,0,0,2815,0,2817,2818,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,499712,0,0,0,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,0,0,0,0,1284,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1298,0,0,0,0,0,0,0,0,0,0,0,0,1858,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4358144,4359060,4358144,4358144,4358144,4358144,4358144,4358144,4358144,0,0,1310,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1327,0,0,0,0,0,0,0,0,0,0,1257,0,0,0,0,0,0,0,0,0,0,0,0,0,1272,0,1274,0,0,0,0,0,57894,57894,58798,57894,58803,57894,57894,58807,57894,57894,58810,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59897,57894,57894,57894,57894,57894,57894,57894,57894,57894,57917,57917,58875,57917,57917,58879,57917,57917,57917,57917,57917,57917,57917,57917,58893,57917,58898,57917,57917,58902,57917,57917,58905,57917,57917,57917,57917,57917,57917,57917,57917,57917,0,57894,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60438,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,58999,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59603,57944,1153,1727,0,0,0,0,1734,0,0,0,0,0,0,0,1744,1745,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1211,0,0,0,0,0,0,0,0,0,1308,0,529,529,529,1933,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,1956,1957,529,529,529,529,529,529,529,529,529,529,2916,529,529,529,529,529,529,2923,529,529,529,529,529,529,529,529,529,529,2931,529,529,529,57894,57894,59376,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59399,59400,57894,57894,57894,57894,57894,57894,57894,0,2595,0,0,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,58941,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59476,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59499,59500,57917,57917,57917,57917,57917,57917,57917,57917,57917,60672,57917,57917,60676,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60685,57917,57917,57917,57917,57917,57917,57917,57917,57917,0,57894,57944,57944,58969,57944,57944,58973,57944,57944,57944,57944,57944,57944,57944,57944,58987,57944,58992,57944,57944,58996,57944,57944,57944,57944,59545,57944,57944,57944,57944,57944,57944,57944,57944,57944,59557,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59572,57894,59905,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59918,57894,57894,57894,57894,57894,59922,59923,59924,57894,57894,57894,57894,57894,57894,57894,57894,57894,59352,57894,57894,57894,57894,57894,57894,57894,57894,57894,59363,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59914,57894,57894,57894,57894,57894,57894,57894,59920,57894,57894,57894,57894,57894,57894,57894,59926,57894,57894,57894,57894,57944,57944,57944,57944,57944,60077,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60090,57944,57944,57944,57944,57944,60094,60095,60096,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60454,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59627,529,529,529,529,529,57894,57894,57894,57894,57894,0,0,2780,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2339,60398,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,61256,57944,57944,57944,57944,57944,57944,57944,0,0,0,3180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,743,0,0,0,529,529,3419,57894,57894,60766,0,0,0,0,0,3428,0,0,0,0,0,0,0,3432,0,0,0,0,0,0,0,0,0,0,0,0,0,663,0,0,529,529,529,529,529,860,529,529,876,529,529,529,529,529,529,529,3497,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,3512,3513,529,529,529,529,529,529,529,529,529,529,529,529,529,529,3241,529,529,3244,529,529,529,529,529,529,529,529,529,529,529,529,529,529,1914,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,58776,916,57894,57894,58780,57894,57894,58784,57894,57894,57894,57894,57894,57894,57894,60896,57894,60898,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,61112,57917,57917,60923,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60938,57917,60940,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60932,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59495,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57944,57944,57944,60980,57944,60982,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,529,529,57894,57894,57894,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3832,0,529,529,3729,529,529,529,529,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59401,57894,57894,59404,57894,57894,61160,57944,57944,57944,57944,529,529,529,57894,57894,57894,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3442,0,0,57894,61450,57894,61451,57894,57894,57894,61455,57894,57894,57894,57894,57894,57894,57894,57894,57917,61464,57917,61465,57917,57917,57917,61469,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60696,57917,57917,57917,60699,57917,60701,57917,57917,57917,57917,57917,57917,57917,57917,60706,57917,57917,57917,57917,57917,57944,57944,61478,57944,61479,57944,57944,57944,61483,57944,57944,57944,57944,57944,57944,57944,57944,0,0,0,0,0,0,0,0,0,0,0,529,529,529,529,529,529,2430,529,529,529,529,529,529,529,529,529,529,529,2442,529,529,529,529,529,529,529,529,57894,57894,57894,57894,57894,57917,57917,57917,57917,57917,57917,57944,57944,57944,57944,57944,57944,4294,0,0,0,529,529,529,4297,57894,57894,57894,61643,57917,57917,57917,57917,57917,57917,59482,57917,57917,57917,59487,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60704,57917,57917,57917,57917,57917,57917,57917,57917,57944,61645,57944,57944,57944,61647,0,0,529,529,57894,57894,57917,57917,57944,57944,0,529,57894,57917,57944,0,529,57894,57917,57944,0,529,57894,57917,57944,0,529,529,529,529,529,529,529,529,3503,529,529,529,529,529,529,529,529,3511,529,529,529,529,529,529,529,529,529,529,529,529,529,3523,0,0,0,377,131072,0,435,377,0,0,0,446,452,0,0,0,377,463,476,476,476,489,489,489,489,489,489,489,489,489,489,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,533,57899,533,57899,533,533,57899,533,533,57922,57899,533,533,57899,57899,57899,1,24578,3,155943,155943,297,0,0,0,0,0,303,304,0,0,307,308,0,0,0,0,0,0,0,0,0,0,0,0,0,666,0,0,669,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1233,1234,0,0,0,0,0,0,0,0,0,0,0,0,57899,57922,57899,57899,57899,57899,57899,57899,57899,57922,57922,57899,57899,57949,57899,57899,57899,57899,57899,57899,57899,57949,57949,57899,57899,57899,57899,57949,57949,57899,533,57899,58444,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,529,529,529,529,529,0,57894,57894,57894,57894,57894,57894,155943,1153,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1759,1760,0,1190,0,1192,1193,0,0,0,1195,1196,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,368,368,0,0,0,0,0,0,0,2837,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2849,0,0,0,0,0,0,0,0,0,0,342,0,0,0,0,0,0,0,0,0,0,0,0,0,389,0,139264,147456,0,0,0,0,1334,1195,0,0,0,0,0,0,0,0,529,529,1343,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,1369,529,529,529,0,0,0,0,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59865,57894,57894,59868,57894,57894,57894,57894,57894,57894,59876,57894,57894,57894,57894,58834,57894,57894,57894,57894,58839,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,58864,57894,57894,57894,57894,50679,58776,992,57917,57917,58876,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,58903,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60933,57917,60935,57917,57917,57917,57917,57917,57917,57917,60942,57917,57917,60944,57917,57917,57917,57917,57917,57917,57917,57917,58918,57917,57917,57917,57917,57917,57917,57917,58927,57917,57917,58929,57917,57917,57917,57917,58934,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,58887,57917,57917,57917,57917,57917,57917,57917,57917,57917,58906,57917,57917,57917,57917,57917,57917,57917,57917,57917,529,529,529,1967,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,58776,0,57894,57894,57894,57894,57894,57894,57894,0,0,0,0,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59953,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,61122,57917,57917,57917,57917,57917,57917,57917,57917,61130,57917,57917,57917,57917,57917,57917,57944,57944,57944,61135,57944,57894,57894,59410,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,50679,0,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,61121,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57944,57944,57944,57944,57944,57944,57944,60033,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60045,57944,57917,59510,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57894,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,529,529,529,529,529,0,57894,57894,57894,57894,57894,57894,155943,1153,0,0,1158,0,59606,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,529,529,529,2288,57894,57894,57894,57894,59637,2294,0,0,0,0,0,0,2342912,0,0,0,0,0,0,0,0,0,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,0,0,0,0,0,0,0,0,0,0,0,1155,0,2295,0,0,0,0,2297,0,2298,0,0,0,0,0,2301,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1814,0,0,0,0,0,0,0,0,0,529,529,2452,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,2932,529,529,57894,57894,57894,57894,57894,59883,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60320,57894,57894,57894,59931,57894,57894,57894,57894,57894,57894,0,0,0,0,57917,57917,57917,57917,57917,57917,57917,57917,57917,59952,57917,57917,57917,57917,59956,57917,57917,57917,57917,57917,57917,57917,57917,59452,57917,57917,57917,57917,57917,57917,57917,57917,57917,59463,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59474,57917,57917,60018,57917,60020,57917,57917,57917,57917,57917,57917,57944,57944,57944,57944,57944,57944,57944,57944,57944,60035,57944,57944,57944,57944,60039,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59584,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59562,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59571,57944,57944,57944,60101,57944,60103,57944,57944,57944,57944,57944,57944,529,529,529,529,529,57894,57894,57894,57894,57894,2775,2295,0,2776,2298,0,0,0,0,0,0,0,0,0,0,2865,0,0,0,0,0,0,0,0,0,2873,0,0,529,529,529,529,529,529,529,529,529,529,529,529,3261,529,529,529,529,529,529,529,529,529,529,529,529,0,0,57894,57894,57894,57894,57894,57894,57894,57894,57894,60328,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,3005,0,57917,57917,0,3005,0,0,0,0,57917,57917,57917,60353,57917,60354,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,58935,57917,57917,57917,57917,57917,57917,57917,58949,57917,57917,57917,3177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2393,529,529,3253,529,529,529,529,529,529,529,3259,529,529,529,529,529,529,529,529,529,529,529,529,529,529,2938,0,57894,57894,57894,57894,57894,57894,57894,57894,58840,57894,57894,57894,57894,57894,57894,57894,58854,57894,57894,57894,57894,57894,57894,57894,57894,58866,58867,57894,57894,50679,58776,992,57894,57894,57894,57894,60645,57894,57894,57894,57894,57894,57894,57894,60651,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,3005,0,57917,57917,57917,57917,57917,58373,58375,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,0,0,0,0,57894,57944,57944,58417,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,61487,57944,57944,61489,57944,0,0,0,0,0,0,0,0,0,0,0,529,529,529,529,529,4023,529,529,529,4027,529,529,529,529,529,57894,57894,57894,57894,57894,61382,57894,57894,57894,61386,57894,57894,57894,529,529,529,3730,529,529,529,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60640,57894,57894,57894,57894,57894,57944,61161,57944,57944,57944,529,529,529,57894,57894,57894,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3441,0,0,0,57944,57944,57944,57944,57944,57944,61264,57944,57944,529,529,57894,57894,0,0,0,0,0,0,0,0,0,0,0,3681,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,529,529,529,529,529,529,529,529,529,529,529,1353,529,529,529,529,529,529,529,529,529,1372,57894,57894,57894,57917,57917,57917,57917,57917,57917,61399,57917,57917,57917,57917,57917,57917,57917,57917,57917,57944,57944,57944,57944,57944,57944,61415,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59618,57944,57944,57944,57944,57944,57944,57944,57944,529,529,529,529,529,57894,57894,57894,57894,57894,0,0,332,0,0,0,0,0,0,0,0,376,0,0,0,0,0,0,0,0,0,0,0,0,0,0,332,0,139264,147456,0,0,0,0,0,0,0,0,693,0,0,0,0,0,0,368,368,368,0,0,0,0,0,706,0,0,0,0,0,0,0,0,0,0,311,311,311,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212992,0,0,0,0,0,212992,212992,212992,0,0,0,0,131072,0,329,0,0,0,0,0,0,0,331,0,0,464,477,477,477,490,490,490,500,490,500,503,490,490,490,511,511,511,511,511,511,526,511,511,511,526,511,511,511,511,511,511,534,57900,534,57900,534,534,57900,534,534,57923,57900,534,534,57900,57900,57900,1,24578,3,155943,155943,297,0,0,0,0,0,303,304,0,0,307,308,0,0,0,0,0,0,0,0,0,0,0,0,0,728,0,0,0,0,0,0,0,0,0,0,740,0,645,740,0,744,745,645,57900,57923,57900,57900,57900,57900,57900,57900,57900,57923,57923,57900,57900,57950,57900,57900,57900,57900,57900,57900,57900,57950,57950,57900,57900,57900,57900,57950,57950,57900,534,57900,685,0,0,0,689,0,0,0,0,0,0,0,0,0,0,368,368,368,0,0,0,0,0,0,707,708,0,0,0,0,0,714,0,0,0,718,0,720,0,0,0,0,0,0,727,0,729,730,0,0,733,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3189,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,328,328,377,0,0,0,0,0,0,0,0,0,0,0,0,779,780,0,0,0,0,0,0,0,0,0,790,0,792,0,0,0,730,0,0,0,0,0,0,0,0,0,0,804,0,809,0,812,0,0,0,0,0,0,792,0,804,0,818,0,730,0,0,812,824,0,0,826,0,0,824,824,0,0,0,792,0,0,0,0,0,0,751,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,769,730,0,0,773,0,0,0,0,0,0,659,660,0,0,0,0,0,0,0,0,0,0,671,672,0,0,0,0,0,0,0,0,0,0,0,684,0,0,0,836,0,0,0,0,0,0,0,790,0,0,0,836,529,529,850,529,856,529,529,871,529,529,882,529,887,529,529,896,899,904,529,912,529,57894,57894,57894,58269,57894,58275,57894,57894,58290,57894,57894,58301,57894,58306,57894,57894,58315,58318,58323,57894,58331,57894,0,57917,57917,57917,58345,57917,58351,57917,57917,58366,57917,57917,58377,57917,58382,57917,57917,58391,58394,58399,57917,58407,57917,0,0,0,0,58306,57944,57944,57944,58420,57944,58426,57944,57944,58441,57944,57944,58452,57944,58457,57944,57944,58466,58469,58474,57944,58482,57944,850,529,529,1144,904,529,0,57894,58269,57894,58494,58323,57894,155943,1153,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1753,0,0,0,0,0,0,0,0,0,0,0,360448,360448,360448,360448,360448,360448,360448,360448,360448,360448,360448,360448,360448,360448,360448,360448,360448,360448,360448,360448,360448,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1251,0,0,1201,0,0,0,0,0,751,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1838,0,0,0,0,0,0,0,0,0,0,0,1282,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3702,0,529,57894,57894,57894,57894,57894,58804,57894,57894,57894,58809,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,58826,57894,57894,57894,57894,57894,57894,57894,0,2596,0,0,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60415,57917,57917,57944,57944,57944,57944,57944,57944,57944,58952,57917,57917,57917,57917,57917,57917,58963,57917,0,57894,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,58978,57944,57944,57944,57944,57944,57944,58993,57944,57944,57944,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4092,529,529,529,529,529,529,529,529,529,529,529,529,529,529,1978,529,529,529,529,529,529,529,529,58776,0,57894,59337,57894,57894,57894,57894,57894,58998,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59015,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59558,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59624,57944,57944,57944,1910,529,529,529,529,59353,57894,57894,57894,57894,0,0,59031,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59047,57944,57944,57944,57944,57944,57944,59058,57944,529,529,529,529,529,529,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60890,57894,57894,57894,57894,1153,1727,0,0,0,0,1734,0,0,0,0,1741,0,1743,0,0,0,0,0,0,0,0,0,0,0,0,1756,0,0,0,0,0,0,0,0,0,754,0,0,0,0,0,0,0,0,0,0,764,0,0,665,768,0,0,0,0,0,775,0,0,0,0,1763,0,0,1766,1767,1768,0,1770,1771,0,0,0,1775,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1791,0,0,0,0,0,1797,0,0,1800,0,1802,0,0,0,0,0,1808,1809,0,0,0,0,0,1815,0,0,0,0,1820,1821,0,0,0,0,0,0,785,0,0,0,680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2311,0,0,0,0,0,0,0,0,0,0,0,1827,0,0,1829,0,0,0,0,0,0,0,0,1833,1834,1835,0,0,0,0,0,0,1841,0,1843,0,0,0,0,0,0,0,0,753,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1240,0,0,0,0,0,0,1874,0,0,0,0,0,0,1880,1881,0,0,0,0,0,0,0,0,0,0,0,1874,0,0,0,1892,1743,1743,1894,529,1896,529,1897,1898,529,1900,529,529,529,1904,529,529,529,529,529,529,529,529,529,1917,529,529,529,529,1921,529,529,529,529,1925,529,1927,529,529,529,0,0,0,0,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59864,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,58851,57894,57894,58855,57894,57894,57894,57894,57894,58862,57894,57894,57894,58869,57894,50679,58776,992,1963,529,1965,529,1968,529,529,529,529,529,1975,529,529,1977,529,529,529,529,529,529,529,529,529,58776,0,59336,57894,59338,57894,59339,57894,59341,57894,59343,57894,57894,57894,59347,57894,57894,57894,57894,57894,57894,57894,57894,57894,59360,57894,57894,57894,57894,59364,57894,57894,57894,57894,59368,57894,59370,57894,57894,57894,57894,57894,57894,57894,58808,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,58823,57894,57894,57894,57894,57894,57894,57894,58832,57894,59408,57894,59411,57894,57894,57894,57894,57894,59419,57894,57894,59421,57894,57894,57894,57894,57894,57894,57894,57894,57894,50679,0,59436,57917,59438,57917,59439,57917,59441,57917,57917,57917,57917,57917,60021,57917,57917,60024,60025,57917,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60041,57944,60043,57944,57944,57944,0,0,0,4083,0,0,0,0,0,0,0,4090,0,0,529,529,529,529,4095,529,529,529,529,529,529,529,529,529,529,529,529,529,2892,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,2465,529,529,529,529,529,529,529,529,529,529,529,529,529,59443,57917,57917,57917,59447,57917,57917,57917,57917,57917,57917,57917,57917,57917,59460,57917,57917,57917,57917,59464,57917,57917,57917,57917,59468,57917,59470,57917,57917,57917,57917,57917,57917,57917,57944,57944,57944,57944,60960,57944,57944,57944,57944,60964,57944,57944,57944,57944,57944,57944,57944,60970,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60083,57944,57944,57944,57944,60088,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59013,57944,57944,57944,59017,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59508,57917,59511,57917,57917,57917,57917,57917,59519,57917,57917,59521,57917,57917,57917,57917,57917,57917,57917,57917,57917,57894,59532,57944,59534,57944,59535,57944,59537,57944,59539,57944,57944,57944,57944,57944,57944,57944,57944,60452,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60753,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59543,57944,57944,57944,57944,57944,57944,57944,57944,57944,59556,57944,57944,57944,57944,59560,57944,57944,57944,57944,59564,57944,59566,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59585,57944,57944,57944,57944,57944,57944,59592,57944,57944,57944,57944,57944,57944,57944,57944,59601,57944,57944,57944,57944,57944,57944,59576,59577,59579,57944,57944,57944,57944,57944,57944,57944,59587,59588,57944,57944,59590,57944,57944,59593,59594,57944,57944,57944,57944,57944,57944,57944,59602,57944,59604,57944,59607,57944,57944,57944,57944,57944,59615,57944,57944,59617,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,1955,529,2287,529,57894,59398,57894,59636,57894,2294,0,0,0,0,0,0,2351104,0,0,0,0,0,0,0,0,0,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,0,0,0,0,0,0,0,0,0,0,303,0,0,2295,0,0,0,0,2297,0,2298,0,0,0,0,0,0,0,0,0,0,2305,0,0,2308,2309,0,0,0,2313,0,0,0,0,0,0,0,0,0,802,0,0,0,0,0,0,0,0,0,802,0,0,802,0,0,0,0,0,0,0,802,0,0,0,0,0,1829,0,2370,0,0,0,0,0,0,0,2376,0,0,2379,0,0,0,0,2384,0,0,0,0,0,2390,0,2392,0,0,0,0,0,0,4268032,0,0,0,0,0,0,0,758,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,307,0,0,0,0,0,0,307,0,0,0,0,0,2422,0,0,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,2438,529,2440,529,529,529,529,529,529,2448,529,2450,529,529,529,2477,2478,529,529,529,529,529,529,2485,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,2499,529,529,529,0,0,0,0,57894,57894,59856,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,2502,2503,529,0,0,0,0,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59869,57894,59871,57894,57894,57894,57894,57894,57894,57894,2593,0,0,0,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57894,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59879,57894,59881,57894,57894,57894,57894,57894,57894,57894,59887,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60343,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59932,57894,57894,59935,59936,57894,0,0,0,0,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59958,57917,59960,57917,57917,57917,57917,57917,58921,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,58936,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60697,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57944,57944,57944,57944,60030,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60433,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60051,57944,60053,57944,57944,57944,57944,57944,57944,57944,60059,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,57894,0,0,0,0,0,0,0,0,3681,0,0,4012,4013,57944,57944,57944,57944,57944,60104,57944,57944,60107,60108,57944,2440,529,2767,529,529,59871,57894,60116,57894,57894,2775,2295,0,2776,2298,0,0,0,0,0,0,0,0,0,0,3158,0,0,0,0,0,0,0,0,3164,0,0,0,0,0,0,0,0,0,0,0,0,0,3453,0,0,0,0,0,3456,0,3458,0,0,0,0,0,0,0,0,3466,0,529,529,529,529,529,2911,529,529,529,529,2915,529,529,529,2920,529,529,529,529,529,529,529,529,2928,529,529,529,529,529,529,529,2933,57894,57894,57894,57894,57894,60302,57894,60304,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60321,57894,57894,57894,57894,57894,57894,57894,61098,57894,57894,57894,57894,57894,57894,57894,57894,57894,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,58890,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,58914,57917,57917,57917,57894,57894,60325,57894,57894,57894,60330,57894,57894,57894,57894,57894,57894,57894,57894,60338,57894,57894,57894,57894,57894,57894,57894,57894,60344,57894,57894,57894,57894,57894,57894,57894,0,0,0,0,57917,57917,57917,57917,57917,57917,57917,59950,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59962,57917,0,3005,0,0,0,0,57917,57917,57917,57917,57917,57917,57917,57917,60357,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60369,57917,57917,57917,57917,57917,60375,57917,57917,57917,57917,60378,57917,57917,60380,57917,60381,57917,57917,57917,57917,57917,57917,57917,57917,57917,60390,57917,57917,60394,57917,57917,57917,57917,57917,58369,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,0,0,0,0,57894,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,529,57894,57894,0,0,0,0,0,0,0,0,0,0,0,3681,0,0,3935,0,0,0,0,60371,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60388,57917,57917,57917,57917,60392,57917,57917,57917,60397,57944,60422,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60434,57944,60436,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,529,529,529,529,57894,57894,57894,57894,57894,0,0,0,0,0,3146,0,0,3149,3150,57944,57944,57944,57944,60476,57944,57944,57944,57944,57944,57944,57944,529,529,529,529,529,57894,57894,57894,57894,57894,303,307,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1177,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,802,0,0,0,60740,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60747,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,57894,0,0,0,0,0,0,0,0,3681,4010,0,0,0,529,529,3498,529,529,529,529,529,529,529,3504,529,529,529,529,529,3510,529,529,529,529,529,529,529,529,529,529,3519,3521,529,529,529,0,0,0,0,57894,57894,57894,57894,57894,57894,57894,59861,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59873,57894,57894,57894,57894,57894,57894,57894,57894,57894,61457,57894,57894,57894,57894,57894,57894,57917,57917,57917,57917,57917,57917,57917,57917,57917,61471,57917,57917,57917,57917,57917,57917,57917,57917,59485,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60010,57917,57917,57917,57917,60014,57917,57917,3524,529,3526,3527,529,57894,57894,57894,57894,57894,57894,60878,57894,57894,57894,57894,57894,60882,57894,57894,57894,57894,57894,57894,57894,60888,57894,57894,57894,57894,57894,60894,57894,57894,60897,57894,57894,57894,57894,57894,57894,57894,57894,60904,60906,57894,57894,57894,57894,60910,57894,60912,60913,57894,57917,57917,57917,57917,57917,57917,60920,57917,57917,57917,57917,57917,57917,60022,57917,57917,57917,57917,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60037,57944,57944,60040,57944,57944,57944,57944,57944,529,529,529,57894,57894,57894,0,0,0,3824,0,0,0,0,0,0,0,0,0,3829,0,0,0,0,0,0,0,0,0,0,2403,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2360,0,0,0,0,0,0,0,57917,57917,60924,57917,57917,57917,57917,57917,57917,57917,60930,57917,57917,57917,57917,57917,60936,57917,57917,60939,57917,57917,57917,57917,57917,57917,57917,57917,60946,60948,57917,57917,57917,57917,57917,58960,57917,57917,57917,0,57894,57944,58968,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,58982,58989,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60745,57944,57944,57944,60748,57944,60750,57944,57944,57944,57944,57944,57944,57944,57944,60755,57944,57944,57944,57944,57944,57917,57917,60952,57917,60954,60955,57917,57944,57944,57944,57944,57944,57944,60962,57944,57944,57944,57944,57944,60966,57944,57944,57944,57944,57944,57944,57944,60972,57944,57944,57944,57944,57944,57944,57944,57944,57944,58478,57944,57944,57944,1141,529,529,529,908,529,0,57894,58492,57894,57894,58327,57894,155943,1153,0,0,0,0,0,0,0,0,816,0,0,0,0,0,0,821,0,0,821,0,0,0,0,0,821,821,0,0,0,801,0,0,57944,60978,57944,57944,60981,57944,57944,57944,57944,57944,57944,57944,57944,60988,60990,57944,57944,57944,57944,60994,57944,60996,60997,57944,529,529,3656,57894,57894,61003,0,0,0,0,0,0,788,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,788,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,529,529,529,529,529,529,529,529,2882,0,0,0,0,3665,0,0,3668,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3675,0,0,0,0,0,0,0,0,0,0,0,789,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,808,0,0,0,0,789,0,808,0,529,847,529,529,529,529,529,529,878,880,529,529,529,529,529,529,0,0,0,3682,0,3684,0,0,0,0,0,0,0,3691,0,0,0,3694,3695,0,0,0,0,0,0,0,0,0,0,0,0,529,529,529,1344,529,529,529,529,529,529,529,529,1357,529,529,529,529,1367,529,529,529,529,529,529,3706,529,529,529,529,529,529,529,3711,529,529,529,529,529,529,529,529,529,529,529,529,529,3721,529,529,529,529,529,529,529,0,0,0,0,0,0,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60294,57894,57894,60297,529,529,529,529,529,529,529,57894,57894,57894,61077,57894,57894,57894,57894,57894,57894,57894,61082,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59422,57894,57894,57894,57894,57894,57894,57894,57894,50679,0,57917,59437,57917,57917,57917,57917,57917,57917,57894,61093,57894,57894,57894,57894,57894,57894,57894,57894,61101,57894,57894,57894,57894,57894,57894,57917,57917,57917,61106,57917,57917,57917,57917,57917,57917,57917,61111,57917,57917,57917,57917,57917,57917,60403,57917,57917,57917,60406,60407,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57944,57944,60417,57944,57944,57944,57944,57944,57944,57944,57944,57944,60427,57944,57944,57944,57944,57944,60432,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59589,57944,57944,57944,57944,57944,57944,57944,57944,59598,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,61140,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,61151,57944,57944,57944,57944,57944,57944,57944,57944,61159,57944,57944,57944,57944,57944,57944,57944,57944,60479,57944,57944,57944,529,529,529,529,529,57894,57894,57894,57894,57894,303,307,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,806,0,57944,57944,57944,57944,57944,61263,57944,57944,57944,529,529,57894,57894,0,0,0,0,0,0,0,0,3929,3930,0,3681,0,0,0,0,0,3938,0,0,0,0,0,0,4268032,0,0,0,0,0,0,0,475136,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,736,0,0,0,0,0,0,0,0,0,0,57894,61307,57894,57894,57894,57894,57894,57894,57894,57894,57894,57917,57917,57917,57917,57917,57917,57917,57917,57917,61323,57917,57917,57917,57917,57917,57917,57917,57917,57917,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60965,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59012,57944,57944,57944,57944,57944,57944,57944,59021,57944,57944,59023,57944,57944,57944,57944,59029,57944,57944,57944,57944,57944,57944,57944,57944,61339,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,57894,0,0,0,0,0,0,0,4009,3681,0,0,0,0,0,0,0,0,1223,0,0,0,0,0,0,0,0,1232,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,538,57904,538,57904,538,538,57904,538,538,57927,57904,538,538,57904,57904,57894,61391,57894,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,61407,57917,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,529,529,529,529,529,0,57894,57894,57894,57894,57894,57894,155943,0,0,0,0,0,57944,61423,57944,0,0,0,0,0,0,4085,0,0,0,0,0,0,0,529,529,529,529,529,529,4097,529,529,529,529,529,529,529,529,529,529,529,529,3861,529,529,529,529,529,57894,57894,57894,57894,57894,57894,61212,57894,57894,57894,57894,57894,57894,57894,57944,57944,57944,57944,57944,57944,61482,57944,57944,57944,57944,57944,57944,57944,57944,57944,4147,4148,0,0,0,4151,0,0,0,0,0,4157,4158,4159,529,529,529,0,0,0,0,57894,59855,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57917,57917,57917,57917,57917,60919,57917,57917,57917,57917,529,4162,529,4164,529,529,529,529,61513,61514,61515,57894,57894,57894,61518,57894,61520,57894,57894,57894,57894,61525,61526,61527,61528,57917,57917,57917,61531,57917,61533,57917,57917,57917,57917,57917,61118,57917,57917,57917,57917,57917,57917,57917,57917,61124,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60974,57944,57944,57917,57917,57917,61538,61539,61540,61541,57944,57944,57944,61544,57944,61546,57944,57944,57944,57944,61551,0,0,0,0,0,0,0,0,0,0,529,529,529,529,529,529,529,529,1907,1908,529,529,529,529,1915,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,1930,57917,57917,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,0,0,4246,0,0,0,529,529,4251,529,529,529,4255,57894,57894,61601,57894,57894,57894,57894,57894,57894,60624,57894,60626,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57917,57917,57917,57917,57917,57917,57917,60921,57917,57917,57894,57894,61605,57894,57917,57917,61607,57917,57917,57917,61611,57917,57944,57944,61613,57944,57944,57944,61617,57944,0,0,0,0,0,529,529,529,529,529,529,57894,57894,57894,57894,57894,57894,58282,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,0,57917,57917,57917,57917,0,0,0,372,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,372,0,0,0,380,382,0,0,0,0,0,0,0,0,0,1255,0,0,0,750,1262,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,765,0,0,0,0,0,0,0,0,0,0,0,372,372,0,131072,372,0,334,440,372,440,0,0,440,440,440,458,440,0,0,0,440,497,497,497,497,497,497,497,497,497,440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,535,57901,535,57901,535,535,57901,535,535,57924,57901,535,535,57901,57901,57901,1,24578,3,155943,155943,297,0,0,0,0,0,303,304,0,0,307,308,0,0,0,0,0,0,0,0,0,0,0,0,0,751,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3463,0,0,0,0,57901,57924,57901,57901,57901,57901,57901,57901,57901,57924,57924,57901,57901,57951,57901,57901,57901,57901,57901,57901,57901,57951,57951,57901,57901,57901,57901,57951,57951,57901,535,57901,529,529,529,529,529,57894,57894,58261,57894,57894,57894,57894,57894,57894,58294,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,0,57917,57917,58337,57917,57917,57917,57917,57917,61242,57917,57917,57917,57917,57917,57917,57944,57944,57944,57944,57944,57944,61250,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,529,529,529,529,529,0,57894,57894,57894,57894,57894,57894,155943,1153,0,0,0,0,58445,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,529,529,529,529,529,0,57894,57894,57894,57894,57894,57894,155943,1153,0,303,0,0,0,0,0,0,789,0,0,0,0,808,0,0,0,0,0,0,0,0,0,0,0,694,0,0,789,0,0,0,0,808,57894,57894,58799,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,50679,58776,992,0,0,0,0,1877,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,529,529,529,529,529,3493,529,529,529,529,529,529,1966,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,58776,0,57894,57894,57894,57894,57894,57894,57894,0,0,0,0,57917,57917,57917,57917,59947,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60698,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57944,57894,59409,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,50679,0,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,61246,57917,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,529,529,529,529,57894,57894,57894,57894,57894,2294,1728,59509,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57894,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,61346,57944,57944,529,57894,0,0,0,4007,0,0,0,0,3681,0,0,0,0,59990,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57944,60073,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59605,0,0,2859,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,529,529,529,529,529,529,529,529,529,3948,529,529,529,529,529,529,529,529,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,61572,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60401,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,61255,57944,57944,57944,57944,57944,57944,57944,57944,0,0,0,0,0,3666,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,368,0,297,0,0,57944,57944,57944,57944,57944,57944,57944,61141,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,529,529,57894,57894,57894,0,0,57917,57917,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,0,0,0,0,0,0,4250,529,529,529,529,529,529,61600,57894,57894,57894,1,24578,3,155943,155943,297,0,0,0,0,0,303,304,0,0,307,308,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1831,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,229376,0,491520,524288,0,0,0,0,0,0,0,57894,57894,57894,57894,61606,57917,57917,57917,57917,57917,57917,57917,61612,57944,57944,57944,57944,57944,57944,57944,0,0,0,0,0,529,529,529,529,529,529,57894,57894,57894,57894,57894,57894,58283,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,0,57917,57917,57917,57917,57894,57894,57894,57894,57894,57917,57917,57917,57917,57917,57917,57944,57944,57944,57944,57944,57944,0,0,0,0,4296,529,529,529,61642,57894,57894,57894,61644,57917,57917,57917,57917,57917,58961,58962,57917,57917,0,57894,57944,57944,57944,57944,58972,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,0,0,0,0,0,0,0,0,0,0,0,529,529,529,529,4161,57917,61646,57944,57944,57944,0,0,529,529,57894,57894,57917,57917,57944,57944,0,529,57894,57917,57944,0,529,57894,57917,57944,0,529,57894,57917,57944,0,529,529,529,529,529,529,529,529,3710,529,529,529,529,529,529,529,529,529,529,529,529,529,529,3720,529,529,529,529,529,3725,529,3727,0,0,0,0,131072,0,0,0,441,0,441,447,0,441,441,441,0,441,478,478,478,491,491,491,491,491,491,491,491,491,491,491,491,491,491,491,491,491,536,57902,536,57902,536,536,57902,536,536,57925,57902,536,536,57902,57902,57902,57925,57902,57902,57902,57902,57902,57902,57902,57925,57925,57902,57902,57952,57902,57902,57902,57902,57902,57902,57902,57952,57952,57902,57902,57902,57902,57952,57952,57902,536,57902,57902,57902,1,24578,3,155943,155943,297,0,0,0,0,0,303,304,0,0,307,308,0,0,0,0,0,0,0,0,0,0,0,0,0,802,0,0,529,529,529,529,529,862,529,529,529,529,529,529,529,529,529,529,0,0,0,0,0,1285,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,368,0,309,0,0,0,2421,0,0,0,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,2496,529,2498,529,529,529,0,0,0,3207,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,529,529,529,529,529,529,529,3495,529,529,529,529,529,57894,57894,57894,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3433,0,0,0,3437,0,0,0,0,0,3443,0,0,0,0,0,0,4268032,0,0,0,0,0,0,0,499712,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1323,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3471,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3488,529,529,529,529,529,529,529,529,529,529,529,529,529,3240,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,0,916,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,529,3525,529,529,529,60872,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60889,57894,57894,57894,57894,57894,57894,57894,57894,59911,57894,57894,57894,57894,59916,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59393,57894,57894,57894,57894,57894,57894,57894,57894,59402,57894,57894,57894,57894,57894,57894,57894,57894,57894,60899,57894,57894,57894,57894,57894,57894,57894,57894,57894,60908,57894,57894,60911,57894,57894,57894,60914,57917,57917,57917,57917,57917,57917,57917,57917,57917,0,57894,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,58984,57944,57944,57944,57944,57944,57944,57944,60950,57917,57917,60953,57917,57917,57917,60956,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60973,57944,57944,57944,0,0,0,0,0,0,0,0,0,0,4089,0,4091,0,529,529,529,529,529,4096,529,529,529,529,529,529,529,529,529,529,529,529,3506,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,1950,529,529,529,529,529,529,529,529,1959,529,529,529,57944,57944,57944,57944,57944,57944,57944,60983,57944,57944,57944,57944,57944,57944,57944,57944,57944,60992,57944,57944,60995,57944,57944,57944,529,529,529,57894,57894,57894,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3439,0,0,0,0,0,529,3705,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,3717,529,529,529,529,529,529,529,3722,529,3724,529,529,529,0,0,0,0,57894,57894,57894,57894,57894,57894,59860,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59872,57894,57894,57894,57894,57894,57894,57894,2594,0,0,0,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60008,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,529,529,529,529,529,529,529,57894,57894,61076,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,61088,57894,57894,57894,57894,57894,57894,57894,57894,60648,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,0,2597,57917,57917,57894,57894,57894,61094,57894,61096,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57917,57917,61105,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,58928,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,58947,57917,57917,57917,57917,57917,57917,57917,57917,61117,57917,57917,57917,57917,57917,57917,57917,57917,61123,57917,61125,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57944,57944,61134,57944,57944,57944,4081,0,4082,0,0,0,0,0,0,0,0,0,0,0,529,4093,529,4094,529,529,529,4098,529,529,529,529,529,529,529,0,0,0,0,0,0,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,3681,0,0,0,3836,0,0,0,0,0,0,0,0,0,0,0,3844,0,0,0,0,0,0,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,2444,529,529,529,529,2449,529,529,3854,529,529,529,529,529,529,529,529,3860,529,529,529,529,529,529,529,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,61216,57894,57894,57894,1,24578,3,155943,155943,297,0,0,0,0,0,303,304,0,0,307,308,0,0,0,0,0,0,0,0,0,0,651,0,57917,57917,57917,61241,57917,57917,57917,57917,57917,57917,57917,57917,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,61254,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,529,57894,57894,0,0,0,0,0,0,0,0,0,0,0,3681,0,3934,0,0,0,0,0,61260,57944,57944,57944,57944,57944,57944,57944,57944,529,529,57894,57894,0,0,0,0,0,0,0,0,0,0,0,3681,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,529,529,529,529,529,529,3850,529,529,57894,61627,61628,57894,57894,57917,57917,61631,61632,57917,57917,57944,57944,61635,61636,57944,57944,0,0,0,0,529,529,529,529,57894,57894,57894,57894,57917,57917,57917,57917,57917,57917,57917,57917,57944,57944,57944,57944,57944,57944,57944,57944,0,0,0,0,0,529,529,4279,4280,529,529,57894,0,0,0,0,0,690,691,0,0,0,0,696,0,0,0,368,368,368,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,548,57914,548,57914,548,548,57914,548,548,57937,57914,548,548,57914,57914,0,0,0,0,0,771,0,0,0,0,0,0,0,0,0,0,529,529,529,854,529,529,529,529,529,529,529,529,529,529,529,529,529,529,3262,529,529,529,529,529,529,529,529,529,529,0,0,57894,57894,57894,57894,57894,529,529,529,529,913,57894,57894,57894,57894,58273,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,58332,0,57917,57917,57917,57917,57917,57917,57917,59995,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59501,57917,57917,59504,57917,57917,57917,58349,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,58408,0,0,0,0,57894,57944,57944,57944,57944,58424,57944,57944,57944,57944,57944,57944,57944,57944,57944,59046,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,529,529,529,529,529,57894,57894,57894,57894,57894,57894,57894,57894,57894,58293,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,0,57917,57917,57917,57917,529,1409,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,58776,916,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60308,57894,57894,57894,57894,60311,57894,57894,60313,57894,60314,57894,57894,57894,57894,57894,57894,57894,57894,57894,57944,57944,57944,59038,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,529,529,529,529,529,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60885,57894,57894,57894,57894,57894,57894,57894,57894,57894,57944,57944,57944,57944,57944,57944,57944,61265,57944,529,529,57894,57894,0,0,0,0,0,0,0,0,0,0,0,3681,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3847,529,529,529,529,529,529,529,3852,0,427,427,0,131072,427,0,0,0,427,0,448,0,0,0,0,427,336,479,479,479,492,492,492,492,492,492,492,492,492,492,512,520,520,520,520,520,520,527,520,520,520,527,520,520,520,520,520,520,537,57903,537,57903,537,537,57903,537,537,57926,57903,537,537,57903,57903,57903,1,24578,3,155943,155943,297,0,0,0,0,0,303,304,0,0,307,308,0,0,0,0,0,0,0,0,0,0,0,0,0,841,0,0,529,529,529,529,529,864,529,529,529,529,529,529,529,529,529,529,57903,57926,57903,57903,57903,57903,57903,57903,57903,57926,57926,57903,57903,57953,57903,57903,57903,57903,57903,57903,57903,57953,57953,57903,57903,57903,57903,57953,57953,57903,537,57903,777,0,0,781,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,797,0,0,0,0,0,0,0,801,0,0,0,0,0,0,0,0,1254,0,0,0,0,0,0,0,0,0,0,0,1172,0,1174,0,0,0,0,0,0,0,0,0,0,0,1884,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,529,529,529,529,529,529,529,529,4026,529,4028,4029,529,4031,529,57894,57894,57894,57894,57894,57894,57894,57894,61385,57894,61387,61388,57894,0,0,0,0,837,797,0,0,837,0,0,0,0,0,0,0,529,529,529,529,857,529,866,529,529,529,529,529,529,529,529,529,529,529,529,1384,529,529,529,529,529,529,529,1393,529,529,1395,529,529,529,529,1400,529,529,529,529,529,529,529,914,57894,57894,57894,57894,57894,58276,57894,58285,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,58333,0,57917,57917,57917,57917,57917,57917,57917,60023,57917,57917,57917,57944,57944,57944,57944,57944,57944,60032,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60044,57944,57944,57917,58352,57917,58361,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,58409,0,0,0,0,57894,57944,57944,57944,57944,57944,58427,57944,58436,57944,57944,57944,57944,57944,57944,57944,57944,60743,57944,57944,57944,57944,57944,57944,57944,60749,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59054,57944,57944,57944,57944,529,529,529,529,529,529,57894,57894,57894,57894,57894,57894,0,0,1249,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,803,0,0,0,0,0,0,0,0,1311,0,0,0,0,0,0,0,0,1316,0,0,0,0,0,0,0,0,1326,0,0,0,0,0,0,0,0,0,0,0,344064,344064,344064,344064,344064,344064,344064,344064,344064,344064,344064,344064,344064,344064,344064,344064,344064,344064,344064,344064,344064,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,529,529,529,1412,529,529,1416,529,529,529,529,529,1423,529,529,529,1430,529,58776,916,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,61102,57894,57894,57894,57894,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,58792,57894,57894,57894,57894,57894,57894,57894,57894,57894,58811,57894,57894,57894,57894,57894,57894,57894,57894,57894,58821,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59888,57894,57894,57894,59891,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60907,57894,57894,57894,57894,57894,57894,57894,57917,60915,57917,57917,57917,57917,57917,57917,57917,57917,58916,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,58946,57917,57917,58950,57917,57917,57917,57917,57917,59449,57917,57917,57917,57917,57917,57917,57917,57917,57917,59461,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,58931,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,58957,57917,57917,57917,58964,57917,0,57894,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,58981,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,529,57894,57894,0,0,0,0,0,3927,0,0,0,0,0,3681,0,0,0,3936,0,0,0,57944,59e3,57944,57944,57944,57944,57944,57944,57944,57944,57944,59010,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60752,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59041,57944,57944,59045,57944,57944,57944,57944,57944,59052,57944,57944,57944,59059,57944,529,529,529,529,529,529,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,58309,57894,57894,57894,57894,57894,57894,57894,0,57917,57917,57917,57917,0,1824,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1277,0,0,0,0,1848,1849,0,1851,0,0,0,0,0,0,0,0,0,0,0,0,0,1865,0,1867,0,0,0,0,0,0,0,0,0,0,0,1226,0,0,0,0,1231,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,734,0,0,0,0,0,0,0,0,0,0,0,0,529,529,529,529,529,529,1971,529,529,529,529,529,529,529,529,529,529,1981,1983,529,529,529,529,58776,0,57894,57894,57894,57894,57894,57894,57894,0,0,0,0,57917,57917,57917,59946,57917,59948,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60678,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60691,57894,57894,57894,57894,57894,59414,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59425,59427,57894,57894,57894,57894,50679,0,57917,57917,57917,57917,57917,57917,57917,57917,57917,58883,57917,57917,57917,58892,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59978,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57944,57944,57944,59610,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59621,59623,57944,57944,57944,57944,529,529,529,529,529,57894,57894,57894,57894,57894,0,0,0,0,0,0,1221,0,0,0,0,0,1227,0,1229,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2383,0,0,0,0,0,0,0,0,0,0,2340,0,0,0,2343,0,0,0,0,0,2349,0,0,0,0,0,0,0,0,0,0,0,0,2359,0,0,0,0,0,0,0,0,0,0,0,4358144,4358144,4358144,4358144,4358144,4857856,4874240,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,5259264,2367,0,0,0,0,0,0,0,0,0,0,0,0,2375,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2358,0,0,0,0,0,0,0,0,2366,57894,57894,57894,59934,57894,57894,57894,0,0,0,0,57917,57917,57917,57917,57917,57917,59949,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59961,57917,57917,57917,57917,57917,59480,59481,59483,57917,57917,57917,57917,57917,57917,57917,59491,59492,57917,59494,57917,57917,59497,59498,57917,57917,57917,57917,57917,57917,57917,59506,57917,57944,57944,57944,57944,57944,57944,57944,60106,57944,57944,57944,2441,529,529,529,529,59872,57894,57894,57894,57894,0,0,0,0,0,0,0,0,0,0,0,0,2791,0,0,0,0,0,0,0,0,0,0,0,2801,0,0,0,0,0,0,0,0,0,2807,0,0,0,0,0,0,2811,0,0,0,0,0,0,0,0,0,0,0,0,0,2824,0,0,0,0,0,0,0,2832,0,0,0,0,2834,0,0,0,0,0,0,0,0,0,0,0,0,0,2844,2845,0,0,2848,0,0,2851,0,0,0,0,0,0,0,0,0,0,3184,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1301,0,0,0,0,1306,0,0,0,0,0,0,2861,0,0,0,0,0,0,0,0,0,0,0,0,0,2871,0,0,0,0,529,2875,529,529,529,529,529,529,529,0,0,0,0,0,0,57894,57894,57894,57894,57894,57894,57894,60289,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,61225,57894,57894,57894,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59528,57917,57917,57917,57894,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,2934,529,529,529,529,529,529,0,0,0,0,0,0,57894,60284,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60654,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,0,0,57917,57917,57894,57894,60326,57894,57894,57894,57894,57894,57894,60333,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60342,57894,57894,57894,60345,57894,57894,57894,57894,57894,57894,57894,57894,57894,61100,57894,57894,57894,57894,57894,57894,57894,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60410,57917,57917,57917,57917,57917,57917,57917,57917,57917,57944,57944,57944,57944,57944,57944,57944,57917,57917,57917,60374,57917,57917,57917,57917,57917,57917,57917,60379,57917,57917,57917,57917,57917,57917,57917,60385,57917,57917,57917,57917,57917,57917,57917,60393,57917,57917,57917,57917,57917,57917,57917,60694,57917,57917,57917,57917,57917,57917,57917,60700,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57944,57944,57944,61248,57944,57944,57944,61251,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57917,57917,60400,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60409,57917,57917,57917,60412,57917,57917,57917,57917,57917,57917,57944,60416,57944,57944,57944,57944,57944,529,529,529,57894,57894,57894,0,0,3823,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3459,0,0,0,0,0,0,0,0,0,57944,57944,57944,57944,57944,57944,60450,57944,57944,57944,57944,57944,57944,57944,60458,57944,57944,57944,57944,57944,57944,60465,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60058,57944,57944,57944,57944,57944,57944,57944,57944,60065,57944,60067,57944,60070,57944,57944,57944,57944,57944,57944,60474,57944,57944,57944,60477,57944,57944,57944,57944,57944,57944,3137,529,529,529,529,60484,57894,57894,57894,57894,0,0,0,0,3145,0,0,0,0,0,0,0,0,0,1769,0,0,1772,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1790,0,0,0,0,0,3155,0,0,0,0,0,0,3159,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3173,3174,0,0,0,0,0,0,1253,0,0,0,1258,0,0,0,0,0,0,0,0,0,1175,0,0,0,0,0,0,0,0,0,0,0,0,3214,0,0,0,0,0,0,0,0,0,0,0,0,0,3223,529,529,529,529,529,0,3205,0,0,0,0,3210,0,0,0,3212,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,529,529,529,3225,529,529,529,0,0,0,0,59854,57894,57894,57894,57894,57894,57894,57894,59862,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60653,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,0,0,57917,57917,529,529,529,3230,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,3246,3247,529,529,529,529,3250,529,529,529,529,529,529,529,529,529,1382,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,1987,58776,0,57894,57894,57894,57894,57894,57894,57894,529,529,529,529,529,3255,529,529,529,3258,529,3260,529,529,529,529,529,529,529,3264,529,529,529,529,529,0,0,57894,57894,57894,60616,57894,57894,57894,57894,57894,57894,60900,57894,57894,60902,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57917,57917,60916,57917,57917,57917,57917,57917,57917,57917,57917,57917,61245,57917,57917,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,529,529,529,529,57894,57894,57894,57894,57894,0,0,0,0,0,0,0,0,0,0,0,57894,57894,57894,57894,60621,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60637,60638,57894,57894,57894,57894,60641,57894,57894,57894,57894,57894,57894,57894,59350,59351,57894,57894,57894,57894,59358,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59373,57894,57917,60665,57917,57917,57917,57917,57917,60670,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60686,60687,57917,57917,57917,57917,60690,57917,57917,57917,57917,57944,57944,57944,57944,61543,57944,57944,57944,57944,57944,57944,57944,57944,57944,0,0,0,0,0,0,0,0,0,0,529,529,529,529,4022,529,529,529,529,529,529,529,529,529,529,57894,57894,57894,57894,61381,57894,57894,57894,57894,57894,57894,57894,57894,57894,58842,57894,57894,58849,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,58863,57894,57894,57894,57894,57894,50679,58776,992,57944,57944,60714,57944,57944,57944,57944,57944,60719,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60735,60736,57944,57944,57944,57944,60739,529,529,529,57894,57894,57894,3423,0,0,3426,3427,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1840,0,0,0,0,0,1845,0,3468,0,0,0,0,3472,0,0,0,0,3477,0,0,0,0,0,0,0,0,0,0,0,529,529,529,529,3492,529,529,529,529,3496,529,529,529,529,529,529,529,3502,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,3516,529,529,529,529,529,529,529,529,529,529,529,1383,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,1405,57944,57944,61261,57944,57944,57944,57944,57944,57944,529,529,57894,57894,0,0,0,0,0,0,0,0,0,0,0,3681,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3845,0,0,529,529,529,529,529,529,529,529,529,529,529,529,529,3507,529,3509,529,529,529,529,529,529,3515,529,529,3517,529,529,529,529,529,529,0,0,0,0,3940,0,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,61390,57894,61392,57917,57917,57917,57917,57917,57917,57917,57917,61401,57917,61403,61404,57917,61406,57917,61408,57944,57944,57944,57944,57944,57944,57944,57944,61417,57944,61419,61420,57944,57944,57944,57944,57944,57944,57944,57944,61340,57944,61342,57944,57944,57944,57944,57944,57944,529,57894,0,0,0,0,0,0,0,0,3681,0,0,0,0,0,0,0,0,3183,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,381,0,384,0,0,0,384,61422,57944,61424,0,0,0,0,0,0,0,0,0,0,0,0,0,0,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,3955,529,57894,57894,57894,57894,57894,57894,57894,57894,529,529,4217,529,4218,529,529,529,57894,57894,57894,57894,57894,57894,61568,57894,61569,57894,57894,57894,57894,57917,57917,57917,57917,57917,57917,61576,57917,61577,57917,57917,57917,57917,57917,59516,59517,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57894,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60084,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59018,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57917,57917,57944,57944,57944,57944,57944,57944,61584,57944,61585,57944,57944,57944,57944,0,0,0,0,0,0,529,529,529,529,529,529,529,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,61087,57894,57894,57894,57894,57894,57894,57894,57894,57917,57944,57944,57944,57944,0,0,529,529,57894,57894,57917,57917,57944,57944,4309,4310,61655,61656,61657,0,529,57894,57917,57944,0,529,57894,57917,57944,0,529,529,529,529,529,529,529,529,57894,57894,57894,57894,61517,57894,57894,57894,57894,57894,57894,57894,57894,57894,57917,57917,57917,57917,61530,57917,57917,57917,57917,57917,57917,57917,57917,61244,57917,57917,57917,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,529,529,529,529,57894,57894,57894,57894,57894,2294,0,57904,57927,57904,57904,57904,57904,57904,57904,57904,57927,57927,57904,57904,57954,57904,57904,57904,57904,57904,57904,57904,57954,57954,57904,57904,57904,57904,57954,57954,57904,538,57904,57904,57904,1,24578,3,155943,155943,297,0,0,0,0,0,303,304,0,0,307,308,0,0,0,0,0,0,0,0,0,0,0,0,0,1200,0,0,0,0,0,0,0,0,0,0,0,0,0,368,368,0,0,0,57894,57894,57894,57894,58836,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,50679,58776,992,0,408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,408,0,0,0,0,0,0,0,384,0,139264,147456,0,408,0,0,0,131072,0,0,0,442,0,442,0,453,442,442,442,0,442,480,480,480,493,493,493,493,493,493,493,493,493,493,493,493,493,493,493,493,493,539,57905,539,57905,539,539,57905,539,539,57928,57905,539,539,57905,57905,57905,57928,57905,57905,57905,57905,57905,57905,57905,57928,57928,57905,57905,57955,57905,57905,57905,57905,57905,57905,57905,57955,57955,57905,57905,57905,57905,57955,57955,57905,539,57905,57905,57905,1,24578,3,155943,155943,297,0,0,0,0,0,303,304,0,0,307,308,0,0,0,0,0,0,0,0,0,0,0,0,0,1228,0,0,0,0,0,0,0,0,1237,0,0,0,0,0,0,0,0,0,900,529,529,529,529,57894,57894,58262,57894,57894,57894,58278,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,58319,57894,57894,57894,57894,0,57917,57917,58338,57917,57917,57917,57917,58878,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,58909,58911,57917,57917,57917,57917,57917,57917,57917,57917,60405,57917,57917,57917,57917,57917,57917,57917,57917,60411,57917,57917,57917,57917,57917,57917,57917,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,61156,57944,57944,57944,57944,57917,57917,58354,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,58395,57917,57917,57917,57917,0,0,0,0,57894,57944,57944,58413,57944,57944,57944,58429,57944,57944,57944,57944,57944,57944,57944,57944,57944,60453,57944,57944,57944,57944,60457,57944,57944,57944,60462,57944,57944,57944,57944,57944,57944,57944,57944,60470,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60721,57944,57944,60725,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60734,57944,57944,57944,57944,57944,57944,57944,57944,57944,3922,529,61267,57894,0,0,0,0,0,0,0,0,0,0,0,3681,0,0,0,0,0,0,0,0,0,0,1225,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1246,0,1162,0,0,0,0,0,0,0,0,0,1169,1170,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,333,334,0,0,0,0,0,0,0,0,0,0,0,0,0,1252,0,0,0,0,0,0,0,0,0,1263,1264,0,0,0,0,0,1170,0,0,0,0,0,0,0,0,0,0,0,1259,0,0,0,0,0,0,1267,0,0,0,0,1271,0,0,0,0,0,0,0,0,0,0,0,1240,0,0,0,0,0,0,529,1341,529,529,529,529,529,529,529,529,529,529,1354,1361,529,529,529,529,529,529,529,529,529,529,529,1422,529,529,529,529,529,529,58776,916,57894,57894,57894,58782,57894,57894,57894,57894,57894,57894,57894,57894,57894,59886,57894,57894,57894,57894,57894,57894,57894,57894,59893,57894,59895,57894,59898,57894,57894,57894,57894,57894,57894,57894,57894,57894,58841,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,58857,57894,57894,57894,57894,57894,57894,58868,57894,50679,58776,992,1374,529,1376,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,1396,529,1398,529,529,529,529,529,529,529,529,529,1418,529,529,529,529,529,529,1429,529,58776,916,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,58789,57894,529,529,1411,529,529,529,529,529,529,529,529,529,529,529,1426,529,529,529,58776,916,57894,58779,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,58844,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,58861,57894,57894,57894,57894,57894,57894,50679,58776,992,57894,58793,58800,57894,57894,57894,57894,57894,57894,57894,57894,58813,57894,58815,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59362,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,58835,57894,58837,57894,57894,57894,57894,57894,57894,57894,58850,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,58865,57894,57894,57894,50679,58776,992,57917,58874,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,58888,58895,57917,57917,57917,57917,57917,57917,57917,57917,58908,57917,58910,57917,57917,57917,57917,57917,57917,57917,57917,59996,57917,57917,57917,57917,57917,60002,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,61127,57917,57917,57917,57917,57917,57917,57917,57917,57917,57944,57944,57944,57944,57944,57944,57944,59002,57944,59004,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59025,57944,59027,57944,57944,57944,0,0,0,0,0,0,0,0,0,4088,0,0,0,0,529,529,529,529,529,529,529,529,4099,529,4101,529,529,4103,529,57944,57944,57944,57944,59040,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59055,57944,57944,57944,529,1354,529,1411,529,529,58793,57894,57894,58850,57894,57894,57894,57894,57894,57894,57894,61313,57894,57894,57894,61316,57917,57917,57917,57917,61320,57917,57917,57917,57917,57917,57917,57917,57917,57917,61329,57917,57917,57917,61332,57944,57944,57944,57944,57944,59546,59547,57944,57944,57944,57944,59554,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59569,57944,57944,57944,57944,57944,57944,57944,57944,57944,60055,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59595,59596,57944,57944,57944,57944,57944,57944,57944,57944,0,0,2316,0,2317,0,0,0,0,0,0,0,0,2325,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3220,0,0,0,529,3224,529,529,529,529,57917,59991,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60003,57917,57917,57917,57917,57917,57917,57917,60009,57917,57917,57917,57917,57917,57917,57917,60015,57944,60074,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60086,57944,57944,57944,57944,57944,57944,57944,60092,57944,57944,57944,57944,57944,57944,57944,60098,57894,57894,57894,57894,60301,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60348,57894,57894,0,3152,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3165,0,0,0,0,0,0,0,0,0,0,0,0,2814,0,0,0,0,0,0,0,0,2822,0,0,0,2826,0,0,0,2830,0,0,529,529,3229,529,529,529,529,529,529,3237,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,2468,529,529,529,529,529,529,529,529,529,57894,57894,57894,60620,57894,57894,57894,57894,57894,57894,60628,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59896,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57944,57944,57944,57944,57944,57944,57944,60718,57944,57944,57944,57944,57944,57944,60726,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,57894,4004,0,4006,0,0,0,0,0,3681,0,0,0,0,0,0,3470,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,529,529,529,529,529,529,529,529,529,529,529,529,529,890,529,529,3728,529,529,529,529,529,529,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60661,57894,0,0,57917,57917,529,529,4163,529,4165,529,529,529,57894,57894,57894,57894,57894,57894,57894,61519,57894,61521,57894,57894,57894,57894,57917,57917,57917,57917,57917,57917,57917,61532,57917,61534,57917,57917,61581,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,0,0,0,0,0,0,529,529,529,529,529,529,529,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,61083,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59915,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59927,57894,57894,57894,61626,57894,57894,57894,57894,57917,61630,57917,57917,57917,57917,57944,61634,57944,57944,57944,57944,0,0,0,0,529,529,529,529,57894,57894,57894,57894,57917,57917,57917,57917,57917,57917,57917,57917,57944,57944,57944,57944,57944,57944,57944,57944,0,0,0,0,0,529,4278,529,529,529,529,57894,342,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3176,0,0,0,0,131072,0,0,0,0,0,0,449,0,0,0,0,0,465,481,481,481,465,465,465,465,465,465,465,465,465,465,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,540,57906,540,57906,540,540,57906,540,540,57929,57906,540,540,57906,57906,57906,1,24578,3,155943,156283,297,0,0,0,0,0,303,304,0,0,307,308,0,0,0,0,0,0,0,0,0,0,0,0,0,1315,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2331,0,0,0,0,2335,0,0,0,0,57906,57929,57906,57906,57906,57906,57906,57906,57906,57929,57929,57906,57906,57956,57906,57906,57906,57906,57906,57906,57906,57956,57956,57906,57906,57906,57906,57956,57956,57906,540,57906,57917,57917,58355,57917,57917,58371,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,0,0,0,0,57894,57944,57944,57944,57944,57944,57944,58430,57944,57944,57944,57944,57944,57944,57944,57944,57944,60480,57944,57944,529,529,529,529,529,57894,57894,57894,57894,57894,0,0,0,0,0,0,0,0,0,0,0,328,403,0,0,0,0,0,0,0,0,0,0,328,0,0,0,0,0,0,0,0,58446,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,529,529,529,529,529,0,57894,57894,57894,57894,57894,57894,155943,1153,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1752,0,0,0,0,0,0,0,0,0,0,0,2790,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1839,0,0,0,0,0,0,0,0,0,0,1191,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,368,368,0,0,0,0,0,0,0,3182,0,0,0,0,0,0,0,3188,0,3190,0,0,0,3194,0,0,0,0,0,3199,0,0,3202,0,0,0,0,0,1337,0,0,0,0,0,529,529,529,529,529,529,529,529,529,529,529,529,1355,529,529,529,529,529,529,529,529,529,529,529,529,1385,529,529,529,1389,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,2921,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,1946,529,529,529,529,529,1953,529,529,529,529,529,529,529,529,1962,529,529,529,529,1413,529,529,529,529,529,1421,529,529,529,529,529,529,529,58776,916,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,61226,57894,57894,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59462,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57894,58794,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59903,59904,58833,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,58852,57894,57894,57894,57894,57894,58860,57894,57894,57894,57894,57894,57894,57894,50679,58776,992,57917,58955,57917,57917,57917,57917,57917,57917,57917,0,57894,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,58983,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60746,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60730,57944,57944,60733,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59042,57944,57944,57944,57944,57944,59050,57944,57944,57944,57944,57944,57944,57944,529,1355,529,529,1720,529,58794,57894,57894,57894,59069,57894,57894,57894,57894,57894,57894,61097,57894,61099,57894,57894,57894,57894,57894,57894,57894,57894,57917,57917,57917,57917,57917,57917,57917,57917,57917,61110,57917,57917,57917,57917,57917,57917,57917,57944,60957,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59022,57944,57944,57944,57944,57944,57944,57944,57944,1153,0,0,1730,0,0,0,0,1737,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1755,0,0,0,1758,0,0,0,0,0,0,1255,1829,0,0,0,0,1262,1262,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1166,1300,0,0,0,0,0,0,1307,0,1761,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1776,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,361,362,0,0,0,0,0,0,0,368,0,297,0,0,529,1931,529,529,529,529,529,529,529,529,1942,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,1394,529,529,529,529,529,529,529,529,529,529,59374,57894,57894,57894,57894,57894,57894,57894,57894,59385,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,50679,2091,57917,57917,57917,57917,57917,57917,57917,57917,57944,57944,57944,57944,57944,57944,59548,57944,57944,57944,57944,57944,57944,57944,57944,57944,59559,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59570,57944,57944,57944,57944,57944,57944,57944,57944,57944,60720,57944,60723,57944,57944,57944,57944,60728,57944,57944,57944,60731,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,3138,529,529,529,57894,60485,57894,57894,57894,0,0,3143,3144,0,0,0,0,0,0,57944,57944,57944,57944,57944,57944,59581,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60069,57944,57944,57944,57944,57944,529,529,529,529,529,2479,529,529,529,529,2484,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,1952,529,529,529,529,529,529,529,529,529,529,57894,59880,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59929,57894,59964,57917,57917,57917,57917,59969,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57944,57944,57944,57944,57944,57944,57944,60047,57944,57944,57944,57944,60052,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60442,57944,57944,57944,529,529,529,57894,57894,57894,0,0,0,0,0,0,0,0,3429,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1781,0,0,0,0,0,0,0,0,0,0,529,529,529,3499,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,2930,529,529,529,529,529,57917,57917,57917,60925,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59988,57917,57917,61092,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57944,57944,57894,57894,57894,57917,57917,57917,57917,61397,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57944,57944,57944,57944,61413,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,529,57894,57894,0,0,0,3925,0,0,3928,0,0,0,0,3681,3933,0,0,0,0,0,0,57917,61580,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,61588,0,0,0,0,0,0,529,529,529,529,529,529,529,57894,57894,57894,57894,57894,57894,57894,57894,57894,61081,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,61091,343,344,345,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,368,343,297,0,0,0,0,0,0,1286,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1212,368,368,0,0,1215,0,390,391,393,344,0,0,0,0,0,0,343,0,0,0,0,343,0,0,0,344,0,0,0,0,0,0,0,0,0,0,0,0,2867,2817,0,0,0,0,0,2872,0,0,0,529,529,529,529,529,529,529,2881,529,0,0,390,0,0,0,0,0,0,0,0,344,0,0,0,390,0,0,0,0,0,344,390,0,0,0,139264,147456,0,0,0,425,0,0,0,0,131072,0,436,343,0,0,0,0,454,0,0,0,343,0,482,482,482,482,498,498,498,498,498,498,498,498,498,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,541,57907,541,57907,541,541,57907,541,541,57930,57907,541,541,57907,57907,57907,1,24578,3,155943,155943,297,0,0,0,0,0,303,304,0,0,307,308,0,0,0,0,0,0,0,0,0,0,0,0,0,1859,1860,0,1861,1862,0,0,0,0,0,0,0,0,0,0,0,1871,0,0,57907,57930,57907,57907,57907,57907,57907,57907,57907,57930,57930,57907,57943,57957,57943,57943,57943,57943,57943,57943,57943,57957,57957,57943,57943,57943,57943,57957,57957,57943,541,57907,715,0,717,0,0,0,0,0,0,0,725,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1868,0,0,0,0,0,0,0,0,0,0,0,815,0,798,0,0,817,0,668,0,794,0,0,0,0,0,817,794,0,817,815,0,0,829,0,0,0,664,832,0,794,0,0,0,0,0,838,0,0,0,0,798,664,842,0,529,845,529,529,529,861,529,529,877,529,529,529,529,891,529,529,529,0,0,0,2509,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59877,57894,529,529,909,529,529,57894,57894,58263,57894,57894,57894,58280,57894,57894,58296,57894,57894,57894,57894,58310,57894,57894,57894,57894,58328,57894,57894,0,57917,57917,58339,57917,57917,57917,57917,58959,57917,57917,57917,57917,0,58834,57944,57944,58970,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,58997,57944,57944,57944,57944,57944,57944,57944,57944,60426,57944,57944,60429,60430,57944,57944,57944,57944,57944,60435,57944,60437,57944,57944,57944,57944,60441,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,61145,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60463,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57917,57917,58356,57917,57917,58372,57917,57917,57917,57917,58386,57917,57917,57917,57917,58404,57917,57917,0,0,0,0,57894,57944,57944,58414,57944,57944,57944,58431,57944,57944,57944,57944,57944,57944,57944,57944,57944,60744,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60754,57944,57944,60757,57944,57944,60760,58447,57944,57944,57944,57944,58461,57944,57944,57944,57944,58479,57944,57944,529,529,529,529,529,529,0,57894,57894,57894,57894,57894,57894,155943,1153,0,303,0,0,0,0,0,0,1312,0,0,0,0,0,0,0,0,1318,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3193,0,0,0,0,0,0,0,3200,0,0,0,0,0,0,1336,0,0,0,0,0,0,529,529,529,529,529,529,529,529,529,529,529,529,1356,529,529,529,529,529,529,529,529,529,529,529,529,1386,529,529,529,529,1391,529,529,529,529,529,529,529,529,529,1399,529,529,529,1406,529,529,529,529,529,1380,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,1404,57894,58795,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,58819,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,61236,57917,57917,57917,57917,57917,57944,59033,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,1717,529,1719,529,529,59066,57894,57894,59068,57894,57894,57894,57894,57894,57894,58838,57894,57894,57894,58845,58847,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,58870,50679,58776,992,0,1762,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1779,0,0,1782,0,1784,0,0,0,0,0,0,0,0,0,0,1290,1291,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1181,0,0,0,0,0,0,0,0,529,529,529,529,1902,529,529,529,529,529,529,529,529,1913,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,2897,529,529,529,529,529,529,529,529,529,529,529,529,529,57894,57894,57894,59345,57894,57894,57894,57894,57894,57894,57894,57894,59356,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59428,57894,57894,57894,50679,0,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59445,57917,57917,57917,57917,57917,57917,57917,57917,59456,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59531,57894,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59541,57944,57944,57944,57944,57944,57944,57944,57944,59552,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60439,57944,57944,57944,57944,57944,57944,57944,60444,57944,57944,57944,57944,57944,57944,57944,57944,59582,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,3655,529,57894,61002,57894,0,0,0,0,0,0,0,2399,0,0,0,0,0,0,0,0,0,0,0,0,0,2410,0,0,0,0,0,0,0,0,0,0,0,0,0,1885,0,0,0,0,0,0,0,0,0,0,0,0,0,529,529,529,529,529,0,0,0,0,0,529,529,529,2427,2428,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,3248,529,529,529,529,529,529,529,529,529,529,529,2476,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,2495,529,529,529,529,529,529,529,0,2938,0,0,0,0,57894,57894,57894,57894,57894,57894,57894,57894,60290,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,58843,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,50679,58776,992,57894,57894,57894,57894,57894,59908,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59928,57894,57894,57894,57894,57894,57894,59349,57894,57894,57894,57894,57894,57894,57894,57894,57894,59361,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,61237,57917,57917,57917,57917,57917,60017,57917,57917,57917,57917,57917,57917,57917,57917,57917,57944,57944,57944,60029,57944,60031,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60727,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,0,0,0,0,0,0,0,0,0,0,0,529,529,529,529,529,57944,60100,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,529,529,529,529,57894,57894,57894,57894,57894,0,0,0,0,0,0,0,0,0,0,0,0,3160,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,0,0,0,2783,0,2785,0,0,2788,0,0,0,0,0,0,2793,0,0,0,2796,0,0,0,0,0,0,0,0,0,0,0,0,0,2792,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,401408,0,0,0,0,0,0,0,0,0,0,2806,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2820,0,2821,0,2823,0,0,0,0,0,0,0,0,0,0,0,2323,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2336,0,0,0,2857,0,0,0,0,0,2863,0,0,0,0,2866,0,0,0,0,0,0,0,0,0,2874,0,529,529,529,529,529,529,529,529,529,529,529,529,1912,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,58776,916,57894,57894,57894,57894,57894,57894,57894,57894,58787,57894,57894,57894,529,529,529,529,529,2885,529,529,2888,2889,529,529,529,529,529,2894,529,2896,529,529,529,529,2900,529,529,529,529,529,529,529,529,529,529,529,529,2486,529,529,529,529,529,2490,2491,529,529,529,529,529,529,529,529,529,529,529,529,529,529,2893,529,2895,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,1945,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,2463,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,2906,529,529,529,529,529,529,529,529,2914,529,529,529,529,529,529,2922,529,529,529,529,529,2927,529,529,529,529,529,529,529,529,529,529,529,529,2918,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,1919,529,529,529,529,529,529,529,529,529,529,529,529,60298,57894,57894,57894,57894,57894,60303,57894,60305,57894,57894,57894,57894,60309,57894,57894,57894,57894,57894,57894,57894,57894,57894,60315,57894,57894,57894,57894,57894,57894,57894,57894,57894,59912,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,50679,2090,57917,57917,57917,57917,57917,57917,57917,57917,57894,60324,57894,57894,57894,57894,57894,57894,60332,57894,57894,57894,57894,57894,60337,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,58818,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,58853,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,50679,58776,992,57917,60372,57917,57917,57917,57917,60376,57917,57917,57917,57917,57917,57917,57917,57917,57917,60382,57917,57917,57917,57917,57917,57917,57917,57917,57917,60391,57917,57917,57917,57917,57917,57917,57917,57944,57944,60958,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60975,57944,57917,60399,57917,57917,57917,57917,57917,60404,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60036,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60447,57944,57944,57944,57944,57944,57944,57944,57944,57944,60456,57944,57944,57944,57944,57944,57944,60464,57944,57944,57944,57944,57944,60469,57944,57944,57944,57944,57944,529,529,3819,57894,57894,61165,3822,0,0,0,0,3826,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1176,0,0,0,0,0,0,0,0,0,0,0,0,0,529,529,529,3254,529,529,529,529,529,529,529,529,529,529,529,529,529,529,3263,529,529,3266,529,529,3269,0,0,60614,57894,57894,57894,57894,57894,57894,57894,59382,57894,57894,57894,59387,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59395,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60646,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60656,57894,57894,60659,57894,57894,60662,0,0,60663,57917,57917,57917,57917,59448,57917,57917,57917,57917,59454,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59465,57917,57917,57917,57917,59469,57917,57917,57917,57917,57917,57917,57917,57917,60695,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60705,57917,57917,60708,57917,57917,60711,60712,3417,529,529,60764,57894,57894,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3434,3435,0,0,0,0,3440,0,0,0,0,0,0,0,0,1288,0,0,0,0,1293,0,0,0,0,1296,0,0,0,0,0,0,0,0,0,0,0,0,1308,529,529,529,529,529,57894,57894,60874,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60891,57894,60893,57894,57894,57894,57894,57894,57894,61222,57894,57894,57894,57894,57894,57894,57894,57894,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,61235,57917,57917,57917,57917,57917,57917,57917,57917,59971,57917,59973,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60414,57917,57917,57917,57944,57944,57944,57944,57944,57944,60420,60977,57944,57944,57944,57944,57944,57944,57944,60984,57944,57944,60986,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,529,529,57894,57894,57894,0,0,0,0,0,0,3827,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1175,0,0,0,0,1180,0,0,0,0,0,0,0,0,0,3661,0,3663,0,0,0,3667,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,529,529,529,529,3226,529,529,529,529,529,529,529,3708,3709,529,529,529,529,3713,3714,529,529,529,529,529,3718,529,529,529,529,529,529,529,3723,529,529,529,529,529,529,529,529,1939,529,529,529,1944,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,2925,529,529,529,529,529,529,529,529,529,529,529,529,57894,57894,57894,57894,61095,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57917,57917,57917,57917,57917,57917,57917,61108,61109,57917,57917,57917,57917,61113,61114,57944,57944,61137,61138,57944,57944,57944,57944,61142,61143,57944,57944,57944,57944,57944,61147,57944,57944,57944,57944,57944,57944,57944,57944,61153,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60987,57944,60989,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,529,529,57894,57894,57894,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3681,0,3834,0,0,0,0,0,3840,0,0,0,0,0,0,0,0,0,0,0,0,0,0,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,2439,529,529,2443,529,529,529,2447,529,529,529,529,529,3855,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,61217,57894,57894,57894,57894,57894,57894,59380,59381,59383,57894,57894,57894,57894,57894,57894,57894,59391,59392,57894,59394,57894,57894,59397,59398,57894,57894,57894,57894,57894,57894,57894,59406,57894,57894,57894,61309,57894,57894,57894,57894,57894,57894,57894,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,61325,57917,57917,57917,57917,57917,57917,57917,57944,57944,57944,57944,57944,57944,57944,60963,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60976,57894,57894,57894,57917,57917,61395,57917,57917,57917,57917,61400,57917,57917,57917,57917,61405,57917,57917,57917,57944,57944,61411,57944,57944,57944,57944,61416,57944,57944,57944,57944,61421,57917,57917,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,0,0,0,0,0,0,529,529,529,4252,4253,529,529,57894,57894,57894,61602,61603,57894,57894,57894,57917,57917,57917,61608,61609,57917,57917,57917,57944,57944,57944,61614,61615,57944,57944,57944,0,0,0,0,0,529,529,529,529,529,529,57894,57894,57894,57894,57894,60877,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59353,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59371,59372,57894,57894,57917,57944,57944,57944,57944,0,0,529,529,57894,57894,57917,57917,57944,57944,0,529,57894,57917,57944,0,529,57894,57917,57944,4319,4320,61665,61666,61667,0,529,529,529,529,529,529,529,529,61565,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,61573,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,58385,57917,57917,57917,57917,57917,57917,57917,0,0,0,0,57894,57944,57944,57944,57944,57944,57944,57944,57944,57944,0,0,0,346,347,348,349,350,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,368,0,297,0,0,0,0,0,0,1313,0,0,0,0,0,0,0,0,0,1319,1280,0,1303,1322,0,1325,0,0,1239,0,0,0,0,0,1333,0,0,1216,1333,1340,529,529,529,529,1346,529,529,529,529,1352,529,529,529,529,529,529,529,529,529,529,1373,0,0,0,0,0,394,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,368,0,516096,0,0,0,0,0,350,131072,348,0,350,349,348,349,0,348,349,349,349,459,466,483,483,483,494,494,494,494,501,494,494,501,501,501,514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,514,542,57908,542,57908,542,542,57908,542,542,57931,57908,542,542,57908,57908,57908,1,24578,3,155943,155943,297,0,0,0,0,0,303,304,0,0,307,308,0,0,0,0,0,0,647,0,0,0,0,652,57908,57931,57908,57908,57908,57908,57908,57908,57908,57931,57931,57908,57908,57958,57908,57908,57908,57908,57908,57908,57908,57958,57958,57908,57908,57908,57908,57958,57958,57908,542,57908,653,654,655,656,657,658,0,0,0,0,0,0,0,0,0,0,0,0,0,0,673,674,0,676,677,0,0,0,0,0,683,0,0,0,0,0,0,4268782,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2828,0,0,0,0,0,716,0,0,719,0,721,0,723,0,0,0,0,0,0,0,0,0,0,0,735,0,0,0,0,0,0,0,0,0,0,0,0,3186,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,529,3489,529,529,529,529,529,529,529,529,0,0,0,0,783,784,0,786,787,0,0,0,0,786,0,0,793,0,0,0,0,0,0,0,0,0,800,0,0,0,0,0,0,0,0,0,1801,0,0,0,0,0,0,0,0,0,0,0,1813,0,0,0,0,0,0,0,0,0,0,0,304,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,313,312,0,0,0,312,312,313,313,811,0,0,692,0,0,0,786,0,0,0,0,0,0,0,0,767,823,0,0,0,0,0,0,827,699,0,0,831,0,0,0,0,0,0,0,3474,3475,0,0,0,0,3480,0,0,0,0,0,0,0,0,529,529,529,529,529,529,529,529,529,529,3949,529,3951,529,529,529,529,529,57894,57894,57894,57894,57894,57894,57894,57894,833,0,0,0,692,699,0,0,692,831,831,0,0,0,0,0,529,529,851,855,858,529,867,529,529,529,883,885,888,529,529,529,0,0,0,0,57894,57894,57894,57894,59858,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59921,57894,57894,57894,57894,59925,57894,57894,57894,57894,57894,59930,901,905,529,529,529,57894,57894,57894,58270,58274,58277,57894,58286,57894,57894,57894,58302,58304,58307,57894,57894,57894,58320,58324,57894,57894,57894,0,57917,57917,57917,58346,58350,58353,57917,58362,57917,57917,57917,58378,58380,58383,57917,57917,57917,58396,58400,57917,57917,57917,0,0,0,0,58411,57944,57944,57944,58421,58425,58428,57944,58437,57944,57944,57944,57944,57944,57944,57944,57944,61484,57944,61486,57944,57944,61488,57944,57944,0,0,0,0,0,0,0,0,0,0,0,529,529,529,529,529,529,529,1348,529,529,529,529,529,1360,529,529,529,529,529,529,529,529,57944,57944,58453,58455,58458,57944,57944,57944,58471,58475,57944,57944,57944,851,1142,529,901,905,1146,0,58491,58270,57894,58320,58324,58496,155943,1153,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1748,1749,0,0,0,0,0,0,0,0,0,0,0,0,0,262144,0,0,0,0,0,0,262144,262144,262144,0,0,0,0,0,0,0,0,0,1189,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1202,0,0,0,0,0,0,0,0,0,0,0,368,368,1213,0,0,0,0,0,0,1798,0,0,0,0,0,0,0,0,0,0,0,0,1811,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3187,0,0,0,0,3192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3215,0,0,3218,0,0,0,0,0,0,0,3222,529,529,529,529,529,529,529,529,529,1378,529,529,529,1381,529,529,529,529,529,529,529,1388,529,529,1392,529,529,529,529,529,529,529,529,529,529,529,1403,529,529,529,529,529,529,529,1417,529,529,529,529,529,529,529,529,529,529,58776,916,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,61459,57894,57894,61461,57894,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,61473,57917,57917,61475,57917,529,1410,529,529,529,529,529,529,529,529,529,529,1424,529,529,529,529,529,58776,916,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60335,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60346,57894,57894,57894,57894,57894,57917,57917,57917,58958,57917,57917,57917,57917,57917,0,57894,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,61150,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59006,57944,57944,57944,59009,57944,57944,57944,57944,57944,57944,57944,59016,57944,57944,59020,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,529,529,529,529,57894,57894,57894,57894,57894,0,0,0,0,0,0,2777,0,0,0,0,59032,57944,57944,59039,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59053,57944,57944,57944,57944,57944,529,529,529,529,529,529,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60884,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,58814,58816,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60631,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59919,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,1792,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1819,0,0,0,0,0,0,0,0,1853,0,0,0,0,0,0,1751,0,0,0,0,0,0,0,0,0,0,1869,1870,0,0,0,1873,0,0,0,1826,0,1828,0,0,0,1830,0,748,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5627904,0,0,0,1876,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1760,0,0,0,0,0,0,529,1895,529,529,529,0,0,0,0,57894,57894,57894,59857,57894,59859,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57917,57917,57917,61229,57917,57917,57917,61232,57917,57917,57917,57917,57917,57917,57917,57917,57917,529,529,529,1901,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,1923,529,529,529,529,529,529,529,529,529,529,529,1943,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,1984,529,529,529,58776,0,57894,57894,57894,57894,57894,57894,57894,529,529,1932,529,529,529,1936,529,529,1941,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,3267,529,529,0,0,57894,57894,57894,57894,57894,57894,57894,59344,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59366,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60903,57894,60905,57894,57894,57894,57894,57894,57894,57894,57894,57894,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59974,57917,57917,57917,57917,57917,57917,59979,57917,59981,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,61247,57944,57944,57944,57944,57944,57944,57944,61252,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,529,529,529,529,57894,57894,57894,57894,57894,2775,2295,0,2776,2298,0,0,0,0,0,0,57894,59375,57894,57894,57894,59379,57894,57894,59384,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60658,57894,57894,57894,57894,0,0,57917,57917,57917,59444,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59466,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,58387,57917,57917,57917,57917,58405,57917,57917,0,0,0,0,57894,57944,57944,58415,57944,57944,57944,57944,57944,57944,59475,57917,57917,57917,59479,57917,57917,59484,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60707,57917,57917,57917,57917,57944,57944,57944,59575,57944,57944,59580,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59026,57944,57944,57944,57944,0,0,2296,0,1157,0,0,0,0,2299,0,1162,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1187,0,2474,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,1407,57894,57894,57894,59906,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,0,0,57917,57917,57944,57944,57944,57944,57944,57944,57944,60078,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,3654,529,529,61001,57894,57894,0,0,0,0,0,2808,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2831,0,0,0,0,0,0,4785119,991,991,991,4850655,991,991,991,991,991,4916191,991,4957151,4973535,991,991,991,991,991,991,5071839,991,991,991,991,991,991,991,991,991,0,915,4359059,4359059,4359059,4359059,4359059,4858771,4875155,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,4359059,5260179,529,529,529,529,2937,529,529,0,0,0,2939,0,1990,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60632,57894,57894,60635,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,0,0,0,3006,0,2090,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,58913,57917,57917,57917,57917,60713,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60737,57944,57944,57944,57944,57944,57944,57944,57944,57944,60080,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60466,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,529,529,57894,57894,57894,0,0,3425,0,0,0,0,0,0,0,0,0,3431,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,368,368,368,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2409,0,0,0,0,0,0,0,0,0,0,0,2419,0,0,3662,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1822,0,61306,57894,57894,57894,57894,57894,61312,57894,57894,57894,57894,57917,57917,57917,61318,57917,57917,57917,57917,61322,57917,57917,57917,57917,57917,61328,57917,57917,57917,57917,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,0,0,0,0,0,0,0,0,4212,0,529,529,529,529,57944,61334,57944,57944,57944,57944,61338,57944,57944,57944,57944,57944,61344,57944,57944,57944,57944,529,57894,0,0,0,0,0,0,0,0,3681,0,4011,0,0,0,0,0,0,1879,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1865,0,0,0,0,0,529,529,529,529,529,529,529,529,529,529,529,529,529,529,4032,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,61103,57894,57894,57894,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,58897,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,58930,57917,58932,57917,57917,57917,57917,57917,57917,57917,58945,57917,57917,57917,57917,57917,57917,57894,57894,57894,57917,57917,57917,57917,57917,61398,57917,57917,57917,61402,57917,57917,57917,57917,57917,57917,57944,57944,57944,57944,57944,61414,57944,57944,57944,61418,57944,57944,57944,0,0,0,0,0,0,0,4086,0,0,0,0,0,0,529,529,529,529,529,529,529,529,529,4100,529,529,529,529,529,529,529,529,529,529,3238,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,3251,529,529,529,529,57917,57917,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,0,0,0,4247,0,4249,529,529,529,529,529,529,529,57894,57894,57894,57894,57894,57894,57894,61079,61080,57894,57894,57894,57894,61084,61085,57894,57894,57894,57894,57894,61089,57894,57894,57894,57894,57917,57944,57944,57944,57944,0,0,529,529,57894,57894,57917,57917,57944,57944,0,529,57894,57917,57944,4314,4315,61660,61661,61662,0,529,57894,57917,57944,0,529,529,529,529,529,529,529,1906,529,529,529,529,529,529,529,529,529,1918,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,3863,529,529,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,58817,57894,57894,57894,58820,57894,57894,57894,57894,57894,57894,57894,58827,57894,57894,58831,57894,57894,0,0,392,0,0,0,396,392,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3462,0,0,0,0,0,351,0,410,0,0,0,0,0,0,0,0,0,0,0,0,410,0,0,0,0,0,0,410,0,351,0,139264,147456,0,0,0,0,0,0,0,0,2320,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2333,0,0,0,0,0,0,0,0,0,0,3451,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2332,0,0,0,0,0,0,0,0,0,0,0,131072,0,437,0,0,0,0,450,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,508,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,543,57909,543,57909,543,543,57909,543,543,57932,57909,543,543,57909,57909,57932,57909,57909,57909,57909,57909,57909,57909,57932,57932,57909,57909,57959,57909,57909,57909,57909,57909,57909,57909,57959,57959,57909,57909,57909,57909,57959,57959,57909,624,57909,57975,57975,57975,1,24578,3,155943,155943,297,0,0,0,0,0,303,304,0,0,307,308,0,0,0,0,0,0,0,0,0,0,0,0,0,3671,3672,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,385024,0,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,529,529,910,529,529,57894,57894,58264,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,58311,57894,57894,57894,57894,58329,57894,57894,0,57917,57917,58340,57917,57917,57917,57917,59514,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59525,59527,57917,57917,57917,57917,57894,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59011,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59591,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,58462,57944,57944,57944,57944,58480,57944,57944,529,529,529,529,529,529,0,57894,57894,57894,57894,57894,57894,155943,1153,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1746,1747,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,670,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1169,1170,0,0,0,0,0,0,1302,0,0,0,0,0,0,57894,58796,57894,57894,57894,57894,58806,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,58822,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,61224,57894,57894,57894,57894,57917,57917,57917,57917,57917,61230,57917,57917,57917,61234,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,58877,57917,57917,57917,57917,57917,57917,57917,57917,57917,58891,57917,57917,57917,57917,58901,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,58398,57917,57917,57917,57917,0,0,0,0,57894,57944,57944,57944,57944,57944,57944,57944,57944,57944,57917,57917,58917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,58939,57917,57917,57917,57917,57917,57917,57917,57917,57917,0,57894,57944,57944,57944,57944,57944,57944,57944,57944,58976,57944,57944,57944,57944,57944,58988,57944,57944,57944,57944,57944,57944,57917,57917,58956,57917,57917,57917,57917,57917,57917,0,57894,57944,57944,57944,58971,57944,57944,57944,57944,57944,57944,57944,57944,57944,58985,57944,57944,57944,57944,58995,57944,57944,57944,57944,57944,57944,57944,57944,57944,60985,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,529,529,57894,57894,57894,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3830,0,3831,0,0,0,0,57944,59034,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59051,57944,57944,57944,57944,57944,57944,529,1357,529,529,529,529,58796,57894,57894,57894,57894,57894,57894,57894,57894,61223,57894,57894,57894,57894,57894,57894,57917,57917,57917,57917,57917,57917,61231,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60931,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60941,57917,57917,57917,57917,57917,57917,57917,57917,57917,1153,0,0,1731,0,0,0,0,1738,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1183,0,0,0,0,0,0,0,0,0,0,1764,0,0,0,0,0,0,0,0,0,0,0,0,1777,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1277,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2353,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,529,57895,529,57895,529,529,57895,529,529,57918,57895,529,529,57895,57895,1823,0,0,0,0,0,0,0,1259,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1211,0,368,368,0,1214,0,0,1732,0,0,0,0,0,0,1739,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2315,0,0,0,0,0,0,6463488,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4931584,4939776,0,0,0,0,0,0,5054464,0,0,0,0,0,0,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60368,57917,57917,57917,57917,57917,59994,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60007,57917,57917,57917,57917,57917,60011,60012,60013,57917,57917,57917,57917,57917,57917,57917,59518,57917,57917,57917,57917,57917,57917,59524,57917,57917,57917,57917,57917,57917,57894,57944,57944,57944,57944,57944,59536,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60428,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,61148,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,529,529,529,2454,529,529,529,529,529,529,2459,529,2461,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,2924,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,2912,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,0,0,57894,57894,57894,57894,57894,0,0,2597,0,0,0,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,58912,57917,57917,57917,58915,57917,3939,0,0,0,0,0,529,3942,529,529,3944,529,529,529,529,529,529,529,529,529,529,529,529,529,57894,61301,57894,57894,61303,57894,57894,57894,1,24578,3,155943,156283,297,0,0,0,0,0,303,304,0,0,307,308,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1886,0,0,0,0,0,0,0,0,0,0,0,0,529,529,529,529,529,57944,57944,61335,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,57894,0,0,0,0,0,0,0,0,3681,0,0,0,0,0,0,0,0,2347,2348,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2312,0,0,0,0,0,0,0,4015,0,4017,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,0,749,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1872,0,57917,57917,58357,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,0,0,0,0,57894,57944,57944,57944,57944,57944,57944,58432,57944,57944,57944,57944,57944,57944,57944,57944,57944,61341,57944,57944,57944,57944,57944,57944,57944,529,57894,0,4005,0,0,4008,0,0,0,3681,0,0,0,0,0,0,0,0,1310,0,529,529,1342,529,1345,529,529,529,529,529,529,529,529,1359,529,1364,529,529,1368,529,529,1371,0,1163,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,221654,221654,529,529,529,2909,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,0,0,57894,57894,57894,57894,60617,57944,57944,57944,57944,57944,57944,57944,60451,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59597,57944,57944,59600,57944,57944,57944,57944,57917,61116,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60969,57944,57944,57944,57944,57944,57944,57944,0,0,0,353,131072,0,0,353,399,0,399,0,0,399,399,399,353,399,0,0,0,399,399,399,399,399,502,399,399,399,399,399,399,399,399,399,399,399,399,399,399,399,399,399,544,57910,544,57910,544,544,57910,544,544,57933,57910,544,544,57910,57910,57910,57933,57910,57910,57910,57910,57910,57910,57910,57933,57933,57910,57910,57960,57910,57910,57910,57910,57910,57910,57910,57960,57960,57910,57910,57910,57910,57960,57960,57910,544,57910,57910,57910,1,24578,3,155943,155943,297,0,0,0,0,0,303,304,0,0,307,308,0,0,0,0,0,0,0,0,0,0,0,0,0,245760,245760,245760,245760,245760,245760,245760,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,342,0,0,813,814,0,0,0,0,0,0,768,0,0,819,0,0,665,0,0,0,819,0,0,0,0,0,0,0,0,0,0,0,0,212992,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,675,0,0,0,0,0,0,0,0,0,0,834,0,0,0,0,0,0,814,0,0,0,0,0,0,0,529,529,852,529,529,529,868,872,529,529,529,529,529,893,895,529,529,529,529,529,529,529,1937,1938,1940,529,529,529,529,529,529,529,1948,1949,529,1951,529,529,1954,1955,529,529,529,529,529,529,529,0,0,0,0,0,0,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60295,57894,57894,529,906,529,529,529,57894,57894,58265,58271,57894,57894,57894,58287,58291,57894,57894,57894,57894,57894,58312,58314,57894,57894,58325,57894,57894,57894,0,57917,57917,58341,58347,57917,57917,57917,58363,58367,57917,57917,57917,57917,57917,58388,58390,57917,57917,58401,57917,57917,57917,0,0,0,0,57894,57944,57944,58416,58422,57944,57944,57944,58438,58442,57944,57944,57944,57944,57944,58463,58465,57944,57944,58476,57944,57944,57944,852,529,895,529,906,529,0,57894,58271,58314,57894,58325,57894,155943,1153,0,303,0,0,0,0,0,0,2786,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2798,0,0,0,0,0,2802,0,0,0,0,0,0,0,0,661,662,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1817,0,0,0,0,0,0,0,0,0,1218,0,1220,0,1222,0,0,0,0,0,0,0,0,0,0,0,0,0,1236,0,1238,0,0,0,0,0,0,1245,0,0,0,0,0,307,0,0,0,0,0,0,0,0,0,0,0,0,307,0,0,0,0,0,0,307,237985,147456,0,0,0,307,1,24578,3,0,0,4366336,0,0,0,0,0,65536,304,0,4268032,98304,308,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,663,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1250,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1278,0,0,0,0,0,307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,0,307,0,0,0,0,0,0,0,0,0,0,0,0,1171,1172,1173,1174,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,415,0,0,0,0,0,0,415,139264,147456,0,0,0,424,0,0,1335,0,0,0,0,0,0,0,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,2446,529,529,529,529,529,1375,1377,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,1401,529,529,529,0,0,2508,0,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59870,57894,57894,59874,57894,57894,57894,59878,529,529,529,529,529,1415,529,529,529,529,529,529,529,529,1427,1428,529,529,58776,916,57894,57894,57894,57894,58783,57894,57894,57894,57894,57894,57894,57894,0,0,0,0,57917,57917,59945,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60681,57917,57917,60684,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57944,57944,57944,59003,59005,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59030,57944,57944,57944,57944,57944,57944,57944,59044,57944,57944,57944,57944,57944,57944,57944,57944,59056,59057,57944,57944,529,529,1718,529,529,1721,57894,57894,59067,57894,57894,59070,0,1847,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1794,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1810,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,368,368,368,0,0,0,0,0,0,0,0,0,0,0,0,713,0,529,1899,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,1924,529,529,529,529,529,529,529,0,2938,0,0,0,0,57894,57894,57894,60286,57894,60287,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59357,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,58856,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,50679,58776,992,529,1964,529,529,529,1970,529,529,529,529,529,529,529,529,529,1979,529,529,529,529,1985,529,529,58776,0,57894,57894,57894,57894,57894,57894,57894,0,0,0,0,57917,59944,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59530,57917,57894,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59342,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59367,57894,57894,57894,57894,57894,57894,57894,0,0,0,0,59943,57917,57917,57917,57917,57917,57917,57917,59951,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59457,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60683,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59407,57894,57894,57894,59413,57894,57894,57894,57894,57894,57894,57894,57894,57894,59423,57894,57894,57894,57894,59429,57894,57894,50679,0,57917,57917,57917,57917,57917,57917,57917,59442,57917,57917,57917,59513,57917,57917,57917,57917,57917,57917,57917,57917,57917,59523,57917,57917,57917,57917,59529,57917,57917,57894,57944,57944,57944,57944,57944,57944,57944,59538,57944,57944,57944,57944,57944,57944,57944,57944,57944,61485,57944,57944,57944,57944,57944,57944,0,0,0,0,0,0,0,0,0,0,0,529,529,529,529,529,2429,529,529,529,529,529,529,529,529,529,529,529,2441,529,529,529,529,529,529,529,529,529,57944,57944,59609,57944,57944,57944,57944,57944,57944,57944,57944,57944,59619,57944,57944,57944,57944,59625,57944,57944,529,529,529,529,529,57894,57894,57894,57894,57894,0,0,0,0,0,0,2809,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,418,418,0,0,0,0,2394,0,2396,2397,2398,0,2400,0,0,0,0,0,0,0,0,0,0,2408,0,0,0,0,2413,2414,0,0,0,0,0,2418,0,0,0,0,0,0,2836,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,347,0,0,0,0,0,0,0,0,0,0,2424,529,529,529,529,529,529,2431,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,2466,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,2455,529,529,529,529,529,529,529,529,2462,529,2464,529,2467,529,529,529,529,529,529,529,529,529,529,529,529,529,529,3508,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,1982,529,529,529,529,529,58776,0,57894,57894,57894,57894,57894,57894,57894,529,2475,529,529,529,529,529,2481,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,3268,529,0,0,57894,57894,57894,57894,57894,57894,57894,57894,57894,59907,57894,57894,57894,57894,57894,59913,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,58859,57894,57894,57894,57894,57894,57894,57894,57894,50679,58776,992,0,2781,2782,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1276,0,0,0,0,0,0,2833,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2847,0,0,0,0,0,0,0,0,0,0,0,354,355,356,0,0,0,0,0,0,0,0,0,0,0,0,0,368,0,297,0,0,529,529,529,529,529,529,2886,529,529,529,529,529,2891,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,2898,529,529,529,529,529,529,529,2903,529,529,529,529,529,2907,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,3726,529,57894,57894,57894,60300,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60316,57894,57894,57894,57894,57894,57894,57894,0,0,0,2598,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,61131,57917,57917,57917,57917,57944,57944,57944,57944,57944,57944,57944,57944,57944,60448,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60072,57944,57944,0,3178,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,352256,352256,529,3228,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,0,0,57894,60615,57894,57894,57894,60618,57894,60619,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59902,57894,57894,57917,57917,57917,60667,57917,60668,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59986,57917,57917,57917,57917,57917,57944,57944,57944,57944,60716,57944,60717,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60093,57944,57944,57944,57944,60097,57944,57944,0,0,0,3445,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1331,0,0,0,529,529,529,529,529,57894,60873,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59900,57894,57894,57894,57894,57894,57894,57944,57944,57944,61336,57944,57944,57944,57944,57944,57944,57944,57944,57944,61345,57944,57944,57944,529,57894,0,0,0,0,0,0,0,0,3681,0,0,0,0,0,0,0,0,2402,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,678,0,0,0,0,0,0,57894,57894,57894,57894,57894,61453,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57917,57917,57917,57917,57917,61467,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,58884,57917,57917,57917,57917,57917,57917,58899,57917,57917,57917,58904,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60026,57944,57944,57944,57944,57944,57944,57944,60034,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,529,529,529,529,57894,57894,57894,57894,57894,303,307,0,0,0,0,0,0,0,0,57944,57944,57944,57944,57944,61481,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,0,0,0,0,0,0,0,0,0,4155,0,529,529,529,529,529,529,529,529,529,1419,529,529,529,529,529,529,529,529,58776,916,57894,57894,57894,57894,57894,57894,57894,57894,57894,58788,57894,57894,57917,57917,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,0,4245,0,0,0,0,529,529,529,529,529,4254,529,57894,57894,57894,57894,57894,57894,57894,59885,57894,57894,57894,57894,57894,57894,59890,57894,59892,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,61462,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,61476,57894,61604,57894,57894,57917,57917,57917,57917,57917,61610,57917,57917,57944,57944,57944,57944,57944,61616,57944,57944,0,0,4275,0,4277,529,529,529,529,529,529,57894,57894,57894,57894,60876,57894,57894,57894,57894,60880,57894,57894,57894,57894,57894,57894,57894,60886,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60649,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,3005,0,57917,57917,57894,57894,57894,57894,57894,57917,57917,57917,57917,57917,57917,57944,57944,57944,57944,57944,57944,0,0,4295,0,529,529,529,529,57894,57894,57894,57894,57917,57917,57917,57917,57917,57917,57917,57917,57944,57944,57944,57944,57944,57944,57944,57944,0,0,0,4276,0,529,529,529,529,529,529,57894,354,0,0,0,0,0,397,398,400,401,0,0,0,0,0,0,0,0,0,0,0,400,401,0,0,406,0,0,0,0,0,371,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,379,0,0,0,0,371,0,388,0,379,409,0,400,401,0,0,371,0,0,354,0,0,0,371,0,412,414,0,371,401,0,0,371,379,0,139264,147456,401,412,0,0,0,131072,0,438,0,443,0,443,0,414,443,443,443,0,467,0,0,0,495,495,495,495,495,495,495,495,495,495,516,516,516,516,516,516,516,528,516,516,516,528,516,516,516,516,516,516,545,57911,545,57911,545,545,57911,545,545,57934,57911,545,545,57911,57911,57934,57911,57911,57911,57911,57911,57911,57911,57934,57934,57911,57911,57961,57911,57911,57911,57911,57911,57911,57911,57961,57961,57911,57911,57911,57911,57961,57961,57911,625,57911,57976,57976,57976,1,24578,3,155943,155943,297,0,0,0,0,0,303,304,0,0,307,308,0,0,0,644,0,0,0,0,0,0,0,0,0,0,682,0,0,0,0,0,0,681,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2794,2795,0,2797,0,2799,0,0,0,0,0,0,0,0,2804,529,529,529,529,529,57894,57894,58266,57894,57894,57894,57894,57894,57894,58297,58299,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,0,57917,57917,58342,57917,57917,57917,57917,59515,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59526,57917,57917,57917,57917,57917,57894,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,58484,529,529,529,529,1145,914,0,57894,57894,57894,57894,58495,58333,155943,1153,0,0,0,0,58448,58450,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,529,529,529,529,529,0,57894,57894,57894,57894,57894,57894,155943,1153,0,0,0,0,0,0,0,0,0,0,0,1742,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,529,529,529,3491,529,529,529,529,529,529,0,0,0,0,0,1164,0,0,1166,0,0,0,0,0,0,0,0,0,0,0,0,1179,0,0,0,0,0,0,0,0,0,0,0,648,0,0,0,0,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,3716,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,3243,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,0,0,0,0,0,1312,1338,1339,0,1312,529,529,529,529,529,529,1347,529,529,529,1351,529,529,1362,529,529,1366,529,529,529,529,529,529,529,529,529,1420,529,529,529,529,529,529,529,529,58776,916,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,58846,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,50679,58776,992,57894,57894,58801,57894,57894,58805,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,58824,57894,57894,57894,58828,57894,57894,57894,57894,57894,57894,57894,60331,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60639,57894,57894,57894,57894,57894,57894,57894,57894,57917,57917,57917,58919,57917,57917,57917,58923,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,58943,57917,57917,57917,57917,57917,57917,57917,0,1793,0,1795,0,0,0,1799,0,0,0,1803,0,0,0,1807,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3486,0,529,529,529,529,529,529,529,529,529,529,57944,57944,57944,57944,57944,57944,57944,59549,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59567,59568,57944,57944,57944,57944,57944,529,3818,529,57894,61164,57894,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1816,0,0,0,0,0,0,0,0,0,0,0,0,2318,0,2319,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2334,0,0,0,0,0,0,0,0,0,1855,0,1857,0,0,0,0,0,0,0,1864,0,0,0,0,0,0,0,0,0,0,0,0,0,312,411,313,0,0,0,0,0,0,313,416,0,0,139264,147456,0,0,0,0,0,0,0,0,0,1259,0,0,0,0,0,0,0,0,0,0,2378,0,0,0,0,0,0,0,0,0,0,2389,0,0,0,0,0,0,0,0,2838,0,0,0,0,0,2842,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2856,2420,0,0,2423,0,529,529,2426,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,58776,0,57894,57894,57894,57894,57894,57894,57894,57917,57917,59992,59993,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60004,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,58889,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,61129,57917,57917,57917,57917,57917,57917,57917,57944,57944,57944,57944,57944,60016,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57944,57944,60028,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59626,57944,529,529,529,529,529,57894,57894,57894,57894,57894,0,0,57944,57944,60075,60076,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60087,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,61490,0,0,4149,4150,0,0,0,0,0,0,0,529,529,529,4160,529,60099,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,529,529,2768,2769,57894,57894,57894,60117,60118,0,0,1732,0,0,1739,0,0,0,0,0,0,0,0,0,1882,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,529,529,529,529,529,863,529,529,529,529,529,529,529,529,529,529,529,529,2908,529,529,529,529,529,529,529,529,529,529,2919,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,57894,57894,57894,61210,57894,57894,57894,61213,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60329,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60347,57894,57894,57894,57944,57944,57944,57944,57944,60449,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60461,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,61146,57944,57944,57944,57944,57944,57944,57944,57944,61152,57944,61154,57944,57944,57944,57944,57944,57944,529,529,529,529,529,529,3256,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,0,2508,57894,57894,57894,57894,57894,57894,57894,57894,61314,57894,57894,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,61330,57917,57917,57944,57944,57894,57894,61308,57894,61310,57894,57894,57894,57894,57894,57894,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,61324,57917,61326,57917,57917,57917,57917,57917,57917,57944,57944,57944,57944,57944,57944,57944,61545,57944,61547,57944,57944,57944,57944,0,0,0,0,0,0,0,0,0,0,4214,529,529,529,61449,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,61463,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59488,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60384,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60396,57917,61477,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,0,0,0,0,0,0,4152,0,0,0,0,529,529,529,529,529,529,529,529,529,1974,529,529,529,529,529,529,1980,529,529,529,529,529,529,58776,1989,57894,57894,57894,57894,57894,59340,57894,529,529,529,529,529,4166,529,529,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,61522,57894,57894,57894,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59455,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60387,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,61535,57917,57917,57917,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,61548,57944,57944,57944,0,4208,0,0,0,0,0,0,0,0,529,529,4215,529,529,529,529,529,529,529,1972,1973,529,529,529,529,529,529,529,529,529,529,529,529,529,529,58776,0,57894,57894,57894,57894,57894,57894,57894,0,0,2597,0,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59959,57917,57917,59963,4216,529,529,529,529,529,529,529,57894,57894,61566,57894,61567,57894,57894,57894,57894,57894,57894,57894,57894,57917,57917,61574,57917,61575,57917,57917,57917,57917,57917,57917,57917,57917,60671,57917,60674,57917,57917,57917,57917,60679,57917,57917,57917,60682,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,6e4,57917,57917,57917,57917,60005,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59489,57917,57917,57917,57917,57917,59496,57917,57917,57917,57917,57917,57917,57917,57917,59505,57917,57917,57917,57917,57944,57944,61582,57944,61583,57944,57944,57944,57944,57944,57944,57944,57944,0,0,0,0,0,0,529,529,529,529,529,529,529,57894,57894,57894,57894,57894,57894,58279,57894,57894,58295,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,0,57917,57917,57917,57917,413,0,0,0,131072,0,357,0,0,0,0,0,359,0,0,0,0,0,484,484,484,0,0,0,0,0,0,0,0,0,0,517,521,521,521,521,521,517,521,521,521,517,521,521,521,521,521,521,546,57912,546,57912,546,546,57912,546,546,57935,57912,546,546,57912,57912,57935,57912,57912,57912,57912,57912,57912,57912,57935,57935,57912,57912,57962,57912,57912,57912,57912,57912,57912,57912,57962,57962,57912,57912,57912,57912,57962,57962,57912,626,57912,57977,57977,57977,1,24578,3,155943,155943,297,0,0,0,0,0,303,304,0,0,307,308,0,0,0,0,645,0,0,0,0,0,0,0,0,0,0,1856,0,0,0,0,0,0,0,1863,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,341,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2329,0,0,0,0,0,0,0,0,0,0,0,0,0,687,688,0,0,0,0,0,0,0,0,0,0,0,368,368,368,0,0,0,0,0,0,0,0,709,0,0,0,0,0,0,0,0,0,2321,2322,0,2324,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2338,0,0,0,0,796,0,0,0,0,0,0,0,0,645,0,0,796,529,848,529,529,529,529,869,873,879,529,884,529,529,529,529,529,529,529,529,529,2458,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,3719,529,529,529,529,529,529,529,529,529,902,529,529,529,529,57894,57894,58267,57894,57894,57894,57894,58288,58292,58298,57894,58303,57894,57894,57894,57894,57894,58321,57894,57894,57894,57894,0,57917,57917,58343,57917,57917,57917,57917,59968,57917,59970,57917,57917,57917,57917,57917,57917,57917,59976,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59493,57917,57917,57917,57917,57917,57917,57917,57917,59502,57917,57917,57917,57917,57917,57917,57917,57917,58364,58368,58374,57917,58379,57917,57917,57917,57917,57917,58397,57917,57917,57917,57917,0,0,0,0,57894,57944,57944,58418,57944,57944,57944,57944,58439,58443,58449,57944,58454,57944,57944,57944,57944,57944,58472,57944,57944,57944,57944,529,529,529,902,529,529,0,57894,57894,57894,58321,57894,57894,155943,1153,0,303,0,0,0,0,0,0,3181,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,529,529,529,529,529,3227,307,0,0,0,0,0,0,0,0,1167,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1184,0,0,0,0,0,0,0,0,3211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,529,529,529,529,529,529,870,529,529,529,529,529,889,529,529,529,1216,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1239,0,0,0,0,0,0,0,0,0,0,1883,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,529,529,529,529,529,529,4024,529,529,529,529,529,529,529,529,57894,57894,57894,57894,57894,57894,61383,57894,57894,57894,57894,57894,57894,1280,0,0,0,0,0,0,0,0,1289,0,0,0,0,0,0,0,0,0,1297,0,0,1167,0,0,0,1303,0,1305,0,0,0,0,0,0,0,3686,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3699,3700,0,0,0,0,529,529,4020,529,529,529,529,4025,529,529,529,529,4030,529,529,57894,57894,61379,57894,57894,57894,57894,61384,57894,57894,57894,57894,61389,1408,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,1431,58776,916,58778,57894,57894,57894,57894,57894,58785,57894,57894,57894,57894,58791,58873,57917,57917,57917,57917,57917,58880,57917,57917,57917,57917,58886,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,58907,57917,57917,57917,57917,57917,57917,57917,57917,57917,0,57894,57944,57944,57944,57944,57944,57944,57944,58975,57944,57944,57944,58979,57944,57944,58990,57944,57944,58994,57944,57944,57944,57917,57917,57917,58920,57917,57917,57917,57917,58925,57917,57917,57917,57917,57917,57917,57917,57917,57917,58933,57917,57917,57917,58940,58942,57917,57917,57917,57917,57917,57917,57917,57917,57917,59453,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59471,59472,57917,57917,57917,57944,59001,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59014,57944,57944,57944,57944,59019,57944,57944,57944,57944,57944,59024,57944,57944,57944,59028,57944,57944,57944,57944,57944,57944,57944,57944,58468,57944,57944,57944,57944,529,529,529,898,529,529,0,57894,57894,57894,58317,57894,57894,155943,1153,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,389,57944,59035,59037,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59060,529,529,529,529,529,529,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60883,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,61227,57894,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60680,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,1153,0,0,0,1732,0,0,0,0,1739,0,0,0,0,0,0,0,0,0,0,1750,1751,0,0,0,0,0,1757,0,0,0,0,0,0,0,0,3687,0,0,0,3690,0,0,0,0,0,0,0,0,3698,0,0,0,0,0,0,3701,0,3703,529,0,0,0,0,1796,0,0,0,0,0,0,0,1804,1805,0,0,0,0,0,0,1812,0,0,0,0,0,0,0,0,0,0,0,0,335872,0,0,0,0,0,0,0,0,0,0,0,0,0,139264,147456,0,0,335872,0,0,0,0,0,0,1878,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1891,0,1893,1869,529,529,529,529,529,529,529,529,529,2483,529,529,529,529,529,529,529,529,529,529,529,529,529,529,2494,529,529,529,529,529,529,529,0,0,2508,0,0,0,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59388,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,61228,57917,57917,57917,57917,57917,57917,57917,61233,57917,57917,57917,57917,57917,57917,57917,57917,529,529,529,529,529,529,1905,529,529,529,529,1911,529,529,529,529,529,529,529,529,529,529,1922,529,529,529,529,1926,529,529,529,529,529,529,529,529,2457,529,529,529,2460,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,58776,916,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59348,57894,57894,57894,57894,59354,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59365,57894,57894,57894,57894,59369,57894,57894,57894,57894,57894,57894,57894,57894,61456,57894,61458,57894,57894,61460,57894,57894,57917,57917,57917,57917,57917,57917,57917,57917,61470,57917,61472,57917,57917,61474,57917,57917,57944,57944,59544,57944,57944,57944,57944,59550,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59561,57944,57944,57944,57944,59565,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,529,57894,57894,3924,0,0,0,3926,0,0,0,0,0,0,3681,0,0,0,0,3937,0,0,57944,57944,57944,57944,59578,57944,57944,57944,59583,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60066,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59612,59613,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,2284,529,2286,529,529,59633,57894,59635,57894,57894,0,0,0,0,0,0,3448,3449,0,3450,0,3452,0,0,0,0,3454,0,0,0,0,0,0,0,0,0,0,0,3454,0,0,0,0,0,0,0,2864,0,0,0,0,0,0,0,0,0,2870,0,0,0,0,0,529,529,529,529,529,529,529,529,529,529,529,529,2435,529,529,529,529,529,529,529,529,529,529,529,529,529,529,1387,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,1402,529,0,2341,2342,0,0,2344,2345,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2365,0,0,0,0,0,0,3473,0,0,0,0,3478,3479,0,3481,0,0,3484,0,0,0,3487,529,529,529,529,529,529,3494,529,529,529,0,0,0,0,57894,57894,57894,57894,57894,57894,57894,57894,57894,59863,57894,57894,57894,57894,59867,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,58812,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,58825,57894,57894,57894,57894,58830,57894,57894,57894,0,0,0,2369,0,0,0,0,0,0,0,2373,0,0,0,0,0,0,0,2381,0,0,0,0,2386,0,0,0,0,0,0,0,0,0,0,2372,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,335,336,337,0,0,0,0,0,57917,57917,57917,59967,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59977,57917,57917,57917,59980,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59522,57917,57917,57917,57917,57917,57917,57917,57917,57894,57944,59533,57944,57944,57944,57944,57944,57944,57944,59540,57917,57917,57917,60019,57917,57917,57917,57917,57917,57917,57917,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60042,57944,57944,60046,57944,57944,57944,60050,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60060,57944,57944,57944,60063,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,529,3139,529,529,57894,57894,60486,57894,57894,0,0,0,0,0,0,0,0,0,0,57944,57944,57944,60102,57944,57944,57944,57944,57944,57944,57944,529,529,529,529,529,57894,57894,57894,57894,57894,0,0,0,0,0,0,0,0,0,0,2779,0,0,0,0,0,2862,0,0,0,0,0,0,0,0,0,0,2869,0,0,0,0,0,0,529,529,2876,529,529,529,529,529,529,529,529,529,529,529,2890,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,1986,529,58776,1990,57894,57894,57894,57894,57894,57894,57894,529,529,529,529,2884,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,2899,529,529,529,529,2902,529,529,2904,529,2905,60323,57894,57894,60327,57894,57894,57894,57894,57894,57894,57894,57894,57894,60336,57894,57894,57894,60339,60340,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60629,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60642,57894,57894,57894,57944,57944,57944,57944,57944,57944,57944,60425,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60440,57944,57944,57944,57944,60443,57944,57944,57944,57944,57944,57944,57944,57944,58470,57944,57944,57944,57944,529,529,529,900,529,529,0,57894,57894,57894,58319,57894,57894,295,1153,0,0,1157,0,60445,57944,60446,57944,57944,57944,57944,57944,57944,57944,57944,57944,60455,57944,57944,60459,57944,57944,57944,57944,57944,57944,57944,57944,57944,60468,57944,57944,57944,60471,60472,57944,57944,57944,57944,57944,57944,57944,59008,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,529,529,57894,57894,57894,0,3660,0,0,3153,3154,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3171,0,0,0,0,0,0,0,0,0,2839,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2361,0,2363,0,0,0,0,3204,0,3206,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3219,0,0,0,0,0,0,529,529,529,529,529,529,529,529,2432,529,529,529,529,2436,529,529,529,529,529,529,529,529,529,529,529,529,529,529,2487,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,2501,529,529,529,529,3231,529,3234,529,529,529,529,3239,529,529,529,3242,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,3864,529,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60622,57894,60625,57894,57894,57894,57894,60630,57894,57894,57894,60633,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60643,57894,57894,57894,57894,57894,57894,59909,59910,57894,57894,57894,57894,57894,57894,59917,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60634,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60692,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60709,57917,57917,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,0,0,0,0,0,0,529,529,529,529,529,529,529,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,61090,57894,57944,60741,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60758,57944,57944,57944,57944,57944,57944,57944,57944,58473,57944,57944,57944,57944,529,529,529,903,529,529,0,57894,57894,57894,58322,57894,57894,155943,1153,0,0,0,0,1733,0,0,0,0,1740,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,352256,0,352256,352256,0,0,0,0,0,3444,0,0,3446,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3457,0,0,3460,0,3461,0,0,0,0,0,0,0,0,0,0,2310144,0,0,0,0,0,0,0,2310144,2310144,0,0,0,0,0,0,0,0,0,2310144,0,0,0,2310144,0,0,0,0,0,2310144,0,0,2310144,0,0,2310144,0,2310144,2310144,0,2310144,0,2310144,2310144,0,529,529,529,529,529,57894,57894,57894,60875,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60887,57894,57894,57894,57894,57894,57894,57894,57894,57894,60306,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,50679,0,57917,57917,57917,57917,57917,57917,57917,57917,60895,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60909,57894,57894,57894,57894,57894,57917,57917,57917,60917,57917,57917,57917,57917,57917,57917,57917,57917,60929,57917,57917,57917,57917,57917,57917,57917,57917,60937,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59975,57917,57917,57917,57917,57917,57917,57917,57917,59982,57917,59984,57917,59987,57917,57917,57917,57917,57917,57917,60951,57917,57917,57917,57917,57917,57944,57944,57944,60959,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60971,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59553,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60732,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60979,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60993,57944,57944,57944,57944,57944,529,529,529,57894,57894,57894,0,0,0,0,3825,0,0,0,0,0,3828,0,0,0,0,0,0,0,0,0,0,0,0,0,3664,0,0,0,0,0,0,0,3670,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3196,0,0,0,0,0,3201,0,0,57944,57944,57944,57944,61139,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,61149,57944,57944,57944,57944,57944,57944,61155,57944,61157,57944,57944,57944,0,0,0,0,0,4084,0,0,4087,0,0,0,0,0,529,529,529,529,529,529,529,529,529,529,529,4102,529,529,4104,3853,529,529,529,529,529,529,529,529,529,529,529,529,529,3862,529,529,529,57894,57894,57894,57894,57894,61211,57894,57894,57894,61215,57894,57894,57894,57894,57894,57894,57894,60647,57894,57894,57894,60650,57894,60652,57894,57894,57894,57894,57894,57894,57894,57894,60657,57894,57894,57894,57894,57894,0,0,57917,57917,57944,57944,57944,57944,61262,57944,57944,57944,57944,529,529,57894,57894,0,0,0,0,0,0,0,0,0,0,0,3681,0,0,0,0,0,0,0,0,0,0,2789,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,319488,319488,0,0,0,0,0,0,529,529,529,529,529,529,529,4168,57894,57894,57894,61516,57894,57894,57894,57894,57894,57894,57894,57894,61524,57894,57917,57917,57917,61529,57917,57917,57917,57917,57917,57917,57917,57917,61119,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60967,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57917,57917,61537,57917,57944,57944,57944,61542,57944,57944,57944,57944,57944,57944,57944,57944,61550,57944,0,0,0,0,0,4209,4210,4211,0,4213,529,529,529,529,529,529,529,529,2482,529,529,529,529,529,529,529,2488,529,529,529,529,529,529,2493,529,529,529,529,529,529,529,529,529,529,529,1910,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,1928,1929,529,529,529,529,529,529,4219,4220,529,57894,57894,57894,57894,57894,57894,57894,57894,57894,61570,61571,57894,57894,57917,57917,57917,57917,57917,57917,57917,57917,57917,61578,61579,57917,57917,57944,57944,57944,57944,57944,57944,57944,57944,57944,61586,61587,57944,57944,0,0,0,0,4248,0,529,529,529,529,529,529,529,57894,57894,57894,57894,57894,57894,58281,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,0,57917,57917,57917,57917,57917,57944,57944,57944,57944,4304,0,529,4305,57894,61650,57917,61651,57944,61652,0,529,57894,57917,57944,0,529,57894,57917,57944,0,529,57894,57917,57944,0,529,529,529,529,529,529,529,2456,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,3249,529,529,529,529,529,529,0,0,0,0,0,395,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,368,303,0,0,0,0,428,428,0,131072,428,0,0,0,428,0,0,455,0,0,0,428,0,485,485,485,0,0,362,362,362,362,504,362,362,362,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,547,57913,547,57913,547,547,57913,547,547,57936,57913,547,547,57913,57913,57913,1,24578,3,155943,155943,297,0,0,0,0,0,303,304,0,0,307,308,0,0,0,0,0,0,0,0,0,0,0,0,0,4276224,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,737,0,0,0,0,0,0,0,0,0,57913,57936,57913,57913,57913,57913,57913,57913,57913,57936,57936,57913,57913,57963,57913,57913,57913,57913,57913,57913,57913,57963,57963,57913,57913,57913,57913,57963,57963,57913,547,57913,529,907,529,529,529,57894,57894,57894,57894,57894,57894,57894,58289,57894,57894,57894,57894,57894,58308,57894,57894,57894,57894,58326,57894,57894,57894,0,57917,57917,57917,57917,57917,57917,57917,60927,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60945,57917,60947,57917,57917,57917,57917,57917,58365,57917,57917,57917,57917,57917,58384,57917,57917,57917,57917,58402,57917,57917,57917,0,0,0,0,58308,57944,57944,57944,57944,57944,57944,57944,58440,57944,57944,57944,57944,57944,57944,57944,59043,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,529,529,529,529,529,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,0,57917,57917,57917,57917,57944,57944,57944,57944,58459,57944,57944,57944,57944,58477,57944,57944,57944,529,529,529,529,907,529,0,57894,57894,57894,57894,58326,57894,155943,1153,0,1154,0,0,0,0,0,0,3685,0,0,0,0,0,0,0,0,0,0,0,0,0,3697,0,0,0,0,0,0,0,0,0,0,529,529,529,3943,529,529,529,529,3947,529,529,529,529,529,3953,529,529,529,57894,57894,57894,61302,57894,57894,57894,57894,1159,0,0,0,0,0,1165,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1241,0,0,0,0,0,57894,58797,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60322,57894,58953,57917,57917,57917,57917,57917,57917,57917,57917,0,57894,57944,57944,57944,57944,57944,57944,57944,57944,57944,58977,57944,57944,57944,58986,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59048,57944,57944,57944,57944,57944,57944,57944,57944,529,1358,529,529,529,529,58797,57894,57894,57894,57894,57894,0,0,0,0,0,1765,0,0,0,0,0,0,0,1773,0,0,0,0,0,0,0,0,0,1783,0,0,0,0,0,0,0,0,0,0,695,0,0,0,0,368,368,368,0,0,704,0,0,0,0,0,0,0,711,0,0,0,0,0,0,0,0,1850,0,1852,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3678,0,0,0,0,0,529,529,529,529,1934,529,529,529,529,529,529,529,529,529,529,529,1947,529,529,529,529,529,529,529,529,529,529,529,529,1960,529,529,529,0,2506,0,0,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59875,57894,57894,57894,1,24578,3,155943,155943,297,0,0,0,0,0,303,304,0,0,307,308,0,0,0,0,0,0,0,648,0,0,0,0,0,0,0,0,540672,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,329,0,0,375,375,407,0,57894,57894,57894,59377,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59390,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59403,57894,57894,57894,57894,57894,57894,57894,60901,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57917,57917,57917,57917,60918,57917,57917,57917,57917,60922,57894,57894,57894,57894,57894,59415,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59426,57894,57894,57894,57894,57894,50679,0,57917,57917,57917,57917,57917,57917,57917,57917,57917,59972,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59467,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59477,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59490,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59503,57917,57917,57917,57917,57917,57917,57917,60928,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60943,57917,57917,57917,57917,57917,57917,57917,57917,57917,61120,57917,57917,57917,57917,57917,57917,61126,57917,61128,57917,57917,57917,57917,57917,57917,57917,57917,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60968,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59573,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59586,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59599,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60081,60082,57944,57944,57944,57944,57944,57944,60089,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,529,529,529,529,529,0,57894,57894,57894,57894,57894,57894,295,1153,0,0,0,0,57944,57944,57944,59611,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,59622,57944,57944,57944,57944,57944,529,529,529,529,529,57894,57894,57894,57894,57894,0,0,0,0,0,0,3941,529,529,529,529,3945,529,529,529,529,529,529,529,529,529,3954,529,529,61300,57894,57894,57894,57894,61304,57894,57894,57894,57894,57894,57894,59416,59417,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,50679,0,57917,57917,57917,57917,57917,57917,57917,57917,57917,59486,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59983,57917,57917,57917,57917,57917,57917,57917,57917,0,2395,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,507904,507904,57917,57917,59966,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60949,57944,57944,60049,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60759,57944,60421,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60473,529,529,529,529,529,3233,529,3235,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,58776,1990,57894,57894,57894,57894,57894,57894,57894,57917,57917,60666,57917,57917,57917,57917,57917,57917,60673,57917,60675,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60386,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57944,57944,57944,60715,57944,57944,57944,57944,57944,57944,60722,57944,60724,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60729,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,529,529,57894,57894,57894,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3438,0,0,0,0,0,0,0,0,0,0,2334720,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,139264,147456,0,0,0,0,529,529,529,3856,529,529,529,529,529,529,529,529,529,529,529,529,529,529,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,61218,57894,57894,57894,57894,57894,57894,61454,57894,57894,57894,57894,57894,57894,57894,57894,57894,57917,57917,57917,57917,57917,57917,61468,57917,57917,57917,57917,57917,57917,57917,57917,57917,0,57894,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,58991,57944,57944,57944,57944,57944,529,529,529,529,529,529,4167,529,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,61523,57894,57894,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59998,59999,57917,57917,57917,57917,57917,57917,60006,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,58393,57917,57917,57917,57917,0,0,0,0,57894,57944,57944,57944,57944,57944,57944,57944,57944,57944,57917,61536,57917,57917,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,61549,57944,57944,0,0,0,0,0,0,0,0,0,0,529,529,529,529,529,529,529,529,2913,529,529,2917,529,529,529,529,529,529,529,529,529,2926,529,529,529,2929,529,529,529,529,529,529,529,529,529,529,529,3505,529,529,529,529,529,529,529,529,529,3514,529,529,529,529,529,529,529,529,3522,529,57894,57894,57894,61629,57894,57917,57917,57917,57917,61633,57917,57944,57944,57944,57944,61637,57944,0,0,0,0,529,529,529,529,57894,57894,57894,57894,57917,57917,57917,57917,57917,57917,57917,57917,57944,57944,57944,57944,57944,57944,57944,57944,4274,0,0,0,0,529,529,529,529,4281,529,57894,0,0,0,0,363,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,262739,0,0,0,0,373,373,0,131072,373,0,0,0,373,0,0,0,0,0,0,373,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,378,0,0,0,0,0,0,0,0,0,57914,57937,57914,57914,57914,57914,57914,57914,57914,57937,57937,57914,57914,57964,57914,57914,57914,57914,57914,57914,57914,57964,57964,57914,57914,57914,57914,57964,57964,57914,548,57914,57914,57914,1,24578,3,155943,155943,297,0,0,0,0,0,303,304,0,0,307,308,0,0,0,0,0,0,0,0,0,0,0,0,0,4276224,0,0,0,0,0,0,0,1270,0,0,0,0,0,0,0,0,0,0,57917,57917,58358,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,0,0,0,0,57894,57944,57944,57944,57944,57944,57944,58433,57944,57944,57944,57944,57944,57944,57944,57944,59551,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60467,57944,57944,57944,57944,57944,57944,57944,57944,1309,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3467,57894,57894,57894,58802,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,0,0,57917,60664,57944,59036,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,529,529,529,529,529,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60881,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60310,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,0,0,1825,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1788,0,0,0,529,529,529,529,529,1935,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,1397,529,529,529,529,529,529,57894,57894,57894,57894,59378,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,59901,57894,57894,57894,57917,57917,57917,59478,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,59989,57917,57917,57944,59574,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60738,57944,0,0,0,0,0,3447,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,368,304,0,0,0,0,364,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,516569,516569,0,0,364,0,0,0,0,0,0,0,0,0,0,0,0,364,0,365,0,0,0,0,364,0,0,0,139264,147456,0,0,0,0,0,0,0,0,393687,0,393687,393687,393687,393687,393687,393687,393687,393687,393687,393687,393687,393687,393687,393687,393687,393687,393687,393687,393687,393687,393687,0,0,0,0,0,131072,0,0,0,444,0,444,0,365,444,444,444,0,468,0,0,0,496,496,499,499,499,499,499,505,506,499,518,518,518,518,518,518,518,518,518,518,518,518,518,518,518,518,518,549,57915,549,57915,549,549,57915,549,549,57938,57915,549,549,57915,57915,57938,57915,57915,57915,57915,57915,57915,57915,57938,57938,57915,57915,57965,57915,57915,57915,57915,57915,57915,57915,57965,57965,57915,57915,57915,57915,57965,57965,57915,627,57915,57978,57978,57978,1,24578,3,155943,155943,297,0,0,0,0,0,303,304,0,0,307,308,0,0,0,0,0,0,0,0,0,0,0,0,0,4276224,1261,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,308,0,0,0,0,0,0,308,0,0,0,903,529,529,529,529,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,58322,57894,57894,57894,57894,0,57917,57917,57917,57917,57917,57917,57917,61243,57917,57917,57917,57917,57944,57944,57944,57944,57944,61249,57944,57944,57944,61253,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,58483,529,854,529,529,529,913,0,58273,57894,57894,57894,57894,58332,155943,1153,0,0,0,0,0,2368,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1844,0,0,0,0,0,0,0,0,529,2425,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,2469,529,529,529,529,529,529,57944,57944,60475,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,529,529,529,529,57894,57894,57894,57894,57894,0,0,0,0,0,0,0,0,0,0,0,664,0,0,667,668,0,0,0,0,0,0,0,0,0,0,679,0,0,0,0,0,57917,57917,58359,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,0,0,0,0,57894,57944,57944,57944,57944,57944,57944,58434,57944,57944,57944,57944,57944,57944,57944,57944,60054,57944,60056,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60460,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,0,1248,0,0,0,0,0,0,0,1256,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3170,0,0,0,0,3175,0,1153,0,1729,0,0,0,0,1736,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,139264,147456,0,0,0,0,529,529,529,2505,0,0,0,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60317,57894,57894,57894,57894,57894,57894,0,0,0,0,2784,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,320,0,0,0,0,529,529,529,529,529,529,529,2887,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,58776,1991,57894,57894,57894,57894,57894,57894,57894,529,908,529,529,529,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,58327,57894,57894,57894,0,57917,57917,57917,57917,57917,57917,58922,57917,57917,58926,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,58937,57917,57917,58944,57917,57917,57917,57917,57917,57917,57917,57917,58882,57917,57917,57917,57917,57917,58894,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,60383,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,57917,58954,57917,57917,57917,57917,57917,57917,57917,57917,0,57894,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,60061,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,57944,529,2451,529,2453,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,2901,529,529,529,529,529,529,57894,57894,57894,57894,59882,57894,59884,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60660,57894,57894,0,0,57917,57917,0,2858,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,529,529,529,529,529,529,529,529,529,2433,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,61209,57894,57894,57894,57894,57894,57894,57894,61214,57894,57894,57894,57894,57894,529,529,529,529,2910,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,2938,0,57894,57894,57894,57894,57894,529,529,529,57894,57894,57894,0,3424,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,139264,147456,0,0,0,422,3680,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,529,529,529,529,529,529,0,0,0,0,131072,0,0,0,0,0,0,451,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3676,0,0,0,0,0,0,0,0,0,0,0,0,0,2310144,0,0,2310144,0,0,0,0,0,0,0,2310144,0,2310144,0,0,0,0,0,0,2310144,2310563,2310563,0,2310144,0,0,0,0,0,2310144,0,0,0,0,0,0,0,0,0,0,2310144,0,0,0,0,0,0,2310144,0,0,0,0,0,0,0,0,0,0,2812,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1182,0,0,0,0,1186,0,0,2310144,0,0,0,2310563,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,338,0,0,0,0,0,0,2310144,0,0,2310741,2310741,2310741,2310741,2310741,2310741,2310741,2310741,2310741,2310741,2310741,2310741,2310741,2310741,2310741,2310741,2310741,2310741,2310741,2310741,2310741,2310741,2310741,2310741,2310741,2310144,2310741,2310144,2310144,2310741,1,24578,3,0,0,4366336,0,0,0,0,0,303,304,0,4268032,307,308,0,0,0,0,0,0,0,0,0,0,0,0,0,4276224,1261,0,0,0,0,0,0,1269,0,0,0,0,0,0,0,0,0,0,0,0,2318336,0,0,0,4268032,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1329,0,0,1332,0,0,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,6275072,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,0,0,0,0,0,0,0,4857856,4874240,0,0,0,0,0,0,0,0,0,3157,0,0,0,0,3161,0,0,0,0,0,0,0,3167,3168,3169,0,0,0,0,0,0,0,0,0,0,1314,0,0,0,0,0,1181,0,1320,0,0,0,0,0,0,0,0,0,1306,0,0,0,0,0,0,0,131072,0,0,0,0,0,0,0,0,0,0,0,0,469,2335206,2335206,2335206,469,469,469,469,469,469,469,469,469,469,2335239,2335239,2335239,1,24578,3,0,0,4366336,0,0,0,0,0,303,304,0,4268032,307,308,0,0,0,0,0,0,0,0,0,0,0,0,0,4284416,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5341184,0,5652480,2335239,2335239,2335239,2335239,2335239,2335239,2335239,2335239,2335239,2335239,2335239,2335239,2335239,2335239,2335239,2335239,2335239,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1266,1268,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2342912,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,368,368,0,0,0,0,0,0,0,420,0,0,0,0,0,0,0,0,0,0,0,0,2359296,0,2359296,2359296,2359296,2359296,2359296,2359296,2359296,2359296,2359296,2359296,2359296,2359296,2359296,2359296,2359296,2359296,2359296,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1778,0,0,0,0,0,0,0,0,0,0,0,0,0,2359296,2359296,2359296,1,24578,3,0,0,4366336,0,0,0,0,0,303,304,0,4268032,307,308,0,0,0,0,0,0,0,0,0,0,0,0,0,4284416,0,0,0,0,0,0,466944,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2367488,0,0,4268032,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1818,0,0,0,0,0,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,6275072,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,0,915,0,0,0,0,0,4857856,4874240,0,0,0,0,0,0,0,0,0,3476,0,0,0,0,0,0,3483,0,0,3485,0,0,529,529,3490,529,529,529,529,529,529,529,0,0,0,0,0,0,57894,57894,60285,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,57894,60293,57894,57894,57894,57894,0,5750784,0,0,0,0,0,5873664,0,0,0,0,0,0,0,0,0,0,0,6275072,0,0,0,0,0,0,0,0,0,0,0,991,4359059,5333907,5981075,4359059,0,5439488,5128192,4358144,5129107,915,5129183,991,5129107,4359059,0,4358144,915,991,4359059,0,4358144,915,991,4359059,0,4358144,915,991,4359059,6004736,6004736,0,0,0,1,24578,3,155943,155943,297,0,0,0,0,0,303,304,0,0,307,308,0,0,0,0,0,0,0,0,0,0,0,0,375,0,0,376,0,0,0,0,0,329,376,332,375,0,0,0,0,0,0,0,212992,212992,212992,212992,212992,212992,212992,212992,212992,212992,212992,212992,212992,212992,212992,212992,212992,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2354,0,0,0,0,0,0,0,0,0,0,0,0,0,212992,212992,212992,0,0,0,0,0,4366336,0,0,0,0,0,0,0,0,4268032,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,370,0,0,0,417792,0,0,0,0,0,5840896,5849088,0,0,0,0,0,0,0,0,0,0,0,0,6275072,0,0,0,0,0,0,0,0,0,0,0,0,404,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,335,0,0,0,0,0,0,0,0,0,0,0,335,385,387,0,0,4882432,0,0,0,0,0,0,0,0,5939200,0,0,5677056,6365184,4866048,0,6070272,5545984,5152768,0,0,6144e3,4358144,4866048,4882432,4358144,4980736,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,5177344,4358144,4358144,4358144,4358144,4358144,5242880,4358144,4358144,4358144,4358144,4358144,4358144,4358144,5341184,4358144,4358144,4358144,4358144,6045696,4358144,6070272,4358144,4358144,4358144,4358144,6348800,4358144,6144e3,0,6144e3,0,4988928,5005312,0,0,0,0,5775360,0,0,0,0,0,0,0,0,0,0,5693440,5005312,4358144,4358144,4358144,512e4,5136384,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,4358144,6324224,5914624,5914624,0,0,0,0,0,5513216,5783552,0,0,0,0,0,0,0,0,0,0,6299648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4825088,0,0,0,0],r.EXPECTED=[338,346,354,643,1667,362,993,370,376,384,457,464,421,392,905,405,418,429,683,461,437,445,472,410,480,1434,488,507,515,523,531,539,547,555,563,571,579,1039,664,971,598,598,597,883,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,589,1845,606,614,622,637,1159,672,2252,451,1636,691,654,706,1194,715,729,944,1366,737,1224,1357,1868,759,772,790,805,858,811,1898,1255,819,827,835,2141,1209,843,1935,851,873,891,899,1712,913,930,938,1362,952,960,968,979,981,1412,989,1001,1447,1016,1329,764,1024,1032,1051,1059,1067,1075,1083,1090,1098,1575,1106,1114,1122,1130,2068,1145,777,1153,1179,1167,2093,1514,1175,1187,2238,719,721,1697,1520,1517,1785,1202,1427,1558,1217,1232,1891,1240,1248,1263,1271,1279,1287,1461,1800,1307,1315,1323,1337,1345,797,742,1374,1382,585,1397,751,1352,1405,1297,1299,1929,1420,1763,1997,1442,1455,1469,2231,1477,1485,2046,2224,1493,1500,1508,598,2283,1528,2209,1536,1544,1008,1552,1682,2187,1137,1566,2138,1583,1598,1606,1043,1571,1614,1622,1630,1719,1644,1652,782,1660,1675,1690,1705,1727,1815,1735,1743,1751,1759,1771,1779,1793,1808,1823,1831,499,1839,1853,1861,2089,1876,397,629,1884,494,679,1906,1914,659,1590,1922,1990,698,1943,2040,1951,2108,1959,2156,1967,1975,1983,922,2005,2013,2025,2033,2054,2062,865,649,2076,2084,880,2101,2173,2116,2017,747,1389,2124,2132,1293,2149,2164,2181,2195,2203,2217,2246,2260,2268,2276,598,598,598,598,2169,598,920,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,709,2291,2295,2302,2302,2302,2297,2301,2302,2308,2306,2319,2312,2316,2323,2326,2330,2334,2338,2342,2346,2352,2352,3896,2351,2405,2352,2352,3897,2352,2352,5138,3782,3361,2526,2416,2416,2416,2475,2531,2531,2396,2516,2516,2516,2516,2524,2403,2352,2352,2352,2352,2352,2410,3782,2516,2516,2516,2427,2431,2352,2352,2352,2352,5037,4578,4790,4660,3361,3361,3361,3361,2415,2416,2416,2416,2417,2531,2531,2531,2495,2416,2416,2529,2531,2531,2531,2531,2531,2374,2516,2516,2496,2516,2516,2516,2516,2516,2376,3402,2416,2416,2531,2531,2531,2531,2531,2450,2516,2516,2516,2516,2517,2442,2352,2352,2352,4920,2761,2766,2352,2352,2352,4992,3361,3361,3361,3361,2414,2416,2416,2416,2416,2416,2421,2352,5036,2352,2829,3361,3361,3361,2488,2516,2516,2516,2516,2384,2352,2352,3158,2531,2531,2497,2516,2516,2382,2352,2352,2352,5037,4615,2352,2352,2352,4519,2352,2352,2352,3029,5036,4991,3361,3361,2414,2416,2416,2494,2531,2496,2516,2516,2454,2352,3882,4993,3361,2526,2527,2531,2532,2516,2464,3880,2830,2473,2528,2423,2516,2479,2486,2415,2530,2498,2506,3360,2416,2531,2516,4992,2473,2448,2515,2484,2473,2493,2503,3399,2513,2399,2521,2536,2540,2544,2548,2552,2556,2557,2557,2558,2562,2566,2557,2572,2568,2576,2580,2584,2588,2592,2596,2600,2604,2611,2352,2352,2352,2618,2352,2352,2352,5085,2352,2352,2352,2352,3168,2637,3849,2352,2353,2352,2352,2352,2352,2352,2352,2352,2352,4089,2663,2666,2669,2673,2677,2681,3991,2689,2352,2352,2352,2352,2352,2695,2703,3159,2709,2713,2352,2717,2721,2460,2352,2352,4582,4588,5123,4592,4599,3130,4274,3674,2723,2728,3992,2690,2352,2352,2358,2352,2352,2364,2352,2352,2352,4714,3949,2352,2352,2352,4537,2784,2352,2352,2352,2507,4646,2352,2352,2352,2630,2352,4452,2352,2352,2743,2747,2352,2352,2352,4538,2751,2352,2352,4614,4609,2352,2352,2352,2352,3782,2352,2352,4993,2776,2352,2352,2352,2352,3913,2780,2352,2352,4687,2352,2352,2352,3242,4732,2352,4610,2788,2352,2352,2352,2352,2352,2347,4696,2802,3554,2807,2352,2352,2352,2352,2352,4602,3509,2352,2352,2352,4661,2819,2352,2352,2352,2352,2352,2818,3617,2352,2834,4661,2847,2352,2352,2352,3002,3779,2352,2352,2352,3014,2352,2352,2352,2352,4081,3811,2352,3819,5010,2352,2352,2352,4784,2352,2352,2352,3140,2352,2352,3813,3183,5009,2352,2352,2352,4783,2352,2352,2352,3480,3485,2352,2352,2352,3839,2352,2352,2352,4464,3070,2352,2352,4771,3227,2866,2870,2352,2352,4742,4158,2352,2352,2352,4743,2791,2876,2352,3093,2870,2352,3797,4905,2352,2792,2352,2352,4904,2352,4478,4703,4241,2457,2457,2457,4703,4106,4242,4242,4242,4681,2902,4476,4241,4726,4243,4105,4477,4170,4167,4169,2906,2917,2936,2938,2942,2942,2945,2352,3221,2952,2974,2980,5136,2984,2352,2992,3405,2352,2352,4823,2352,4772,3955,4903,2352,2352,4965,2352,2352,2352,4713,4974,2986,4283,2352,3222,4906,2352,4040,2352,2352,5014,2352,2352,2352,2352,2352,3688,2352,2352,3e3,4196,3006,3010,3019,3570,4123,2918,3024,2352,2352,2352,3589,3034,2352,2352,2438,2352,2352,2352,3359,3361,2352,4683,3045,3181,3050,2352,2768,2352,2366,2352,2352,2352,2352,2352,2352,4373,4847,4756,2352,4862,3758,3020,2352,2352,3056,4228,2352,2352,2352,2352,3061,4906,2352,2352,2352,2352,2818,4906,2352,3784,3057,2352,2352,2352,4116,3069,2697,3074,2352,2386,2352,3796,4431,4865,3235,2352,4111,3080,2352,2352,2352,2352,2352,2354,2352,2352,3088,2352,2352,2352,2352,2352,3087,3092,2352,2352,3148,3119,2877,3125,2352,2352,2352,2352,2829,3361,3361,3361,3999,3129,2352,2352,2352,2877,3125,2352,2406,4093,3924,5109,4416,3439,3510,3769,2638,2352,4999,4455,3150,2882,3136,2640,4755,3145,4428,2970,3154,2352,3163,3167,2352,2970,3154,2352,2444,3173,2352,2625,2352,3698,2352,2352,2352,2352,2352,4355,2352,2352,3815,2639,4216,2607,3179,3187,2352,3460,3174,2352,3192,2352,3459,3188,3156,3204,4491,3211,4155,2352,3219,4153,4157,3255,3226,4670,3232,4156,3239,3256,4154,3548,3247,3271,3317,3317,3260,3264,3268,3275,3279,3283,3316,3313,3301,3305,3306,3310,3321,3325,3327,4192,3331,3292,3335,3353,4027,5129,3970,3365,3369,3373,3377,3381,3381,3382,2352,2352,4073,2352,4991,3386,3432,3500,3446,3396,3412,4095,3419,3423,4351,2827,3356,2724,3431,2825,2352,2654,4038,4028,4176,2837,3440,4940,4241,3028,4201,3452,3458,3464,5074,3473,3481,2352,2352,2352,4735,3490,2352,2352,2731,4325,3781,2434,2736,2352,2457,3540,4293,4512,2352,2352,3504,3509,3505,2352,2352,2352,2352,2352,3872,2352,3745,3388,3498,4300,4267,3532,4189,4302,3539,4505,4512,2352,2796,2352,2352,2352,2352,2732,4457,3587,3561,4970,3803,2352,3541,3595,2352,2798,4906,4953,2922,2927,4595,2932,3026,2352,2352,4310,2352,2352,3822,2352,2854,4228,2352,2352,2352,2976,2859,2352,4310,2352,2352,3534,2352,2352,3605,4907,3824,2352,3534,2352,4159,2352,4990,2352,4324,4304,2352,4322,2352,3614,2352,2896,2352,3253,4476,4240,2352,2459,4811,3106,2891,2352,3468,3108,2633,3107,3440,3440,3440,4811,3467,3108,3108,3108,3621,3439,3466,3440,4812,2892,3440,4968,4983,4985,3628,3629,3624,3633,2352,2352,2871,5105,2352,2352,2352,2352,4868,3860,2352,2352,2352,2988,3663,3667,2352,4081,3672,2352,4765,4769,3295,4825,3678,3686,3825,3693,3702,3706,3727,3634,3710,3715,3725,3731,2352,2352,2877,3141,2352,2352,2352,3135,4082,3673,2352,3736,2352,2632,3740,3749,3688,3753,3762,3766,2352,3297,3773,2352,2898,4680,3829,3882,2352,2352,2352,3913,2855,2352,2352,2352,3065,2352,2352,2352,2352,2823,2352,2352,2352,4081,3672,2352,4767,2691,2352,3289,3789,3689,2975,3801,2352,2352,5068,3895,2352,3013,5017,2352,2352,2352,2352,3013,2352,5101,2352,2352,2352,2352,2352,3807,3836,2352,2352,2352,2352,2352,4869,2352,3097,3221,3105,2639,2352,3001,3112,3888,3859,2352,2352,2352,2352,3865,2352,3130,3601,2352,2352,2352,3594,2352,2830,3361,3361,2489,2416,2416,2448,4261,3876,2352,2352,3083,2352,2352,2352,4e3,2352,2352,2352,5034,3927,3895,2352,2352,3785,3887,2352,2352,3041,2352,3433,2352,4556,2388,3926,3894,2352,2352,3925,3901,3250,3682,3912,2352,2352,3918,2352,3924,3454,4178,3792,2352,3931,2352,3902,3895,2352,4142,3348,3959,4654,4030,2655,4055,3965,3965,4653,4653,4030,4030,4030,4031,3964,4652,3965,4654,3969,3965,4030,2352,2352,3523,3527,2352,2352,2352,2352,3574,2352,2352,2352,2352,3831,3996,4004,4008,4012,4016,4017,4021,4025,4044,4050,4054,4914,4060,4064,3528,4080,4071,2913,4562,4078,4086,2352,2352,4515,4099,4103,2352,2352,2954,4110,2352,2352,3600,2352,2352,4159,3583,4235,4120,2352,2352,2352,3476,2352,2352,2352,4354,2352,2352,2352,2352,3347,2352,4991,4748,4134,2352,2480,2352,2352,2352,4139,2352,3207,4651,2352,2352,2352,2508,4647,4149,2352,2352,2621,2352,2367,4163,4174,4182,4186,4946,4200,2352,2352,2762,4135,2352,4354,2352,3349,4195,2352,4205,3861,4215,4029,4221,3175,4248,2352,2352,4637,4228,2352,2352,2352,2352,4226,2352,2352,3616,3469,3880,4697,2737,2772,4227,3227,4233,4379,2406,2911,4260,4239,4247,2352,2352,4252,2352,2352,2352,4465,4906,3743,2685,2909,4259,4222,4265,2352,3361,2489,2371,2531,2380,2499,2392,4271,2352,2352,4271,2352,2352,4280,2352,3493,2352,2352,2352,2352,3494,3732,2352,5045,3228,2684,2862,4584,4708,2352,3552,3582,3558,4255,4720,2352,3565,3920,2352,2352,4126,2352,2803,3348,2352,3590,2352,2352,2352,2352,3039,2352,2352,5150,2849,2352,2352,2352,4636,4125,4805,2705,4287,4291,5162,2352,5163,4330,2928,4314,4320,4490,4337,4337,4367,4329,2928,2928,2928,4056,4549,4336,4348,3855,4549,4550,4032,4334,4548,4341,4546,4345,4359,4363,4366,2352,2352,2352,3888,3870,2352,2352,2352,4371,4377,4145,4383,3195,4387,4391,4395,4399,4402,4406,4409,4410,4414,2352,2352,3832,2352,2352,2352,2352,3581,2352,4420,4425,4207,4211,4435,5117,2352,3638,3642,3646,3650,3654,3658,3662,4443,2840,4449,5144,4462,4469,3775,2352,3696,2352,4297,2843,4308,4489,4549,4475,3046,4482,2352,2352,2352,4421,4486,4495,4499,4437,4503,3130,4152,4509,3942,4523,2352,2352,2352,3030,4524,2352,2352,3908,2644,2352,4229,2652,2659,2352,4528,4532,4536,2352,2352,4543,4554,4209,3198,2923,4560,3131,3286,2850,2352,3711,4906,2352,2352,4772,3035,2365,2352,4570,2352,2352,2352,2352,2352,4574,3286,4791,2352,2352,2352,2626,4607,2352,3718,2352,3533,3609,2352,3535,2352,2881,4456,2886,2890,3408,2352,2888,4614,4609,4619,2352,2810,5061,4628,4635,4641,3215,4624,2352,2352,2352,2509,3155,4658,2352,2812,4665,4674,3130,3519,2352,3843,2352,3853,3681,3878,2352,2352,2958,4754,2352,2963,3756,2967,4276,4165,4701,4707,3794,2352,3888,4712,4730,4734,4739,4747,3157,4756,2352,4752,5019,4780,5006,2352,4788,3668,4763,4471,4799,3426,3721,4622,4622,4631,3392,4803,4809,4809,4816,4908,2647,4820,4830,4908,3846,2648,4837,2467,2469,4843,3391,2352,3883,4678,2352,2352,2352,3243,2352,3866,2352,2352,2352,3568,2654,2753,4217,4851,4855,4859,4873,4877,4881,4885,4888,4892,4896,4900,2352,2352,2352,2352,3784,3015,2352,2352,4912,3001,3339,3343,4918,4924,3200,4642,4930,4934,2352,2994,4458,4938,3577,2352,3888,4718,2352,3784,4724,2352,2352,3918,2352,3937,3946,3783,3953,2996,4944,2352,2352,3610,4950,2738,4316,3914,5055,4959,3948,2360,4682,2352,2352,4074,2352,4439,3437,3560,3444,4980,4989,2352,2352,3596,4997,3337,3341,3914,3933,4926,3214,5003,2352,2352,2352,4566,2352,2352,2352,2352,3514,3518,2352,2352,5023,2352,2352,2352,2352,2352,5027,2352,3889,2352,2352,4761,2352,3888,4776,3610,5041,3390,5049,5054,5059,5065,5072,5078,2352,2352,5082,2739,3960,5089,4690,5098,2352,2352,2352,2352,3984,2352,2352,4130,2352,2352,2352,2352,2352,2699,2352,2352,3977,4065,2352,2352,2352,2872,5113,2352,3890,4795,3392,3720,3169,2959,4763,3052,3448,4976,3121,2814,2352,2352,2352,4668,2352,2352,2352,2352,5031,5115,2352,2352,3414,5043,2352,2352,4066,5094,2352,2352,4445,4115,4839,2352,2352,2614,2352,4694,2352,2352,2352,5093,2352,5121,4833,2353,4961,2352,2352,3415,2352,2352,4514,2975,2352,4036,3433,5107,3115,2352,2352,4692,2352,2352,5091,2352,3912,3486,3895,4046,2352,2948,2352,3168,3906,2352,3254,4144,2352,3168,3545,2352,2352,2352,2352,2352,4603,5127,5133,4925,2352,2352,4067,2352,2352,4539,2752,2352,2352,2352,2757,3101,2352,4066,5142,2352,3100,3907,3426,5148,2352,5156,2352,5154,2352,5160,2753,3427,3076,2753,2352,3940,4826,4955,2352,3974,2352,2352,4757,3981,5050,3988,5167,5172,6366,6369,5182,5208,5230,5230,5224,6372,5193,5230,5230,5230,5230,6374,5201,5230,5230,5231,5190,5204,5207,5219,5215,5229,5223,5228,5230,5212,6374,5230,5235,5248,5249,5249,5245,5238,5253,5241,5257,5264,5271,5267,5260,5275,5281,5278,5285,5283,5287,5291,5168,5172,7462,5302,5325,5325,5325,5175,5323,5325,5325,5325,5325,5324,5325,5308,5314,5325,6062,5325,7497,5325,6243,5325,5325,5325,5327,5330,6892,6892,6893,5447,5432,5434,5434,5460,5365,5344,5359,5434,5434,5371,5375,5325,5325,5173,5325,6242,7516,5366,6892,5397,5405,5447,5447,5531,5434,5325,5364,5371,7023,7464,7466,5325,5325,5325,5328,5325,7029,5412,6059,5365,5371,6892,6892,6892,6892,5447,6892,6894,5447,5447,5447,5449,5434,5365,5373,5439,5406,7465,5304,5325,5174,5892,6415,5325,7032,5325,6064,5373,5464,5325,5325,5294,6251,6892,5445,5447,5447,5459,5434,5434,5370,5374,5325,5325,7202,5325,5325,5325,5882,5434,5434,5476,5376,5696,6140,5696,7271,5325,5365,5365,6892,6892,6892,6895,5534,5325,6061,5325,5325,5451,5325,5325,5365,5365,5365,5373,6892,6892,6892,5446,5447,5447,5447,5448,5434,5434,5434,5370,5449,5434,5434,5435,5325,5325,5325,5336,5340,7226,6892,5447,5447,5434,5434,5434,5434,5365,6892,5446,5448,5434,5365,5372,6892,6892,6892,5444,5447,5447,5447,5447,5434,5452,5364,5373,5446,5459,5362,5478,5450,5482,5486,5485,5484,5483,5325,5490,6205,7342,5501,5524,5494,5498,5580,5580,5580,5580,7344,5512,5518,5528,5548,5552,5580,5580,5580,5556,5562,5560,5566,5651,5575,5579,5555,5587,5584,5601,5608,5521,5615,5612,5626,5630,5630,5632,5634,5638,5642,5646,5504,5650,5514,5604,5655,5659,5663,5667,5665,5673,5669,5677,5681,5325,6422,5325,6607,6913,7034,6219,5975,5325,5325,7251,6734,7034,6607,5695,5325,5325,7252,6735,5702,5325,5325,5325,5337,5325,7143,5352,5325,5325,5325,6872,6065,5325,5325,5325,5346,5325,5325,6766,5593,7349,5325,5325,7306,5325,5325,5317,5743,5325,5325,5326,5325,6971,5774,5751,5325,5758,6647,5986,5778,5783,5782,5787,5791,5792,5796,5797,5801,5805,5806,5817,5810,5812,5816,5812,5811,5821,5824,5325,5325,7322,5325,5325,5401,5721,5325,5325,5325,5350,5830,5835,5325,5325,5326,5686,5690,6503,5543,6605,5325,5325,5327,6468,5842,5325,5325,5704,5900,5325,5325,5846,5853,5325,5325,5178,5874,6652,5884,5325,5325,5325,5354,7479,5885,5310,5325,5325,7355,5325,5325,6420,5900,5325,5325,5325,5376,5330,5907,5177,5325,5919,5946,5926,5934,5177,5927,5935,5325,5325,5325,5377,5945,5941,5928,5936,5950,5325,5325,5325,5382,6265,5720,5325,5325,5348,5325,5325,7351,6426,7166,5965,5971,5928,5983,7315,5991,5185,5392,7316,5973,5186,5393,5990,5928,5983,5325,5325,7355,6024,6030,6678,5719,5325,5325,5349,6043,5898,5325,5325,5325,5469,7460,5995,5393,5325,5325,7374,6244,5325,5325,6825,5352,7313,5990,5928,5996,5177,6e3,5721,5325,5325,5355,6434,5325,5325,5363,5365,5365,6915,6004,6243,5325,5325,7472,5325,5325,7478,5325,5327,5333,7488,5972,5929,5392,5325,5325,5325,7199,6915,5967,5973,5930,5393,5991,5929,5392,5325,5327,5838,6218,6242,5325,5325,6023,6029,5325,5325,5325,5746,5734,6030,5325,5325,5325,5753,6744,5325,5325,5325,5754,5325,6221,5325,7194,6018,5325,5325,5325,5767,5325,7193,6035,5325,5325,5379,7486,7202,5325,5325,7201,5325,6418,6416,5325,5328,6927,6218,5325,5325,6427,6819,6418,5325,5325,5325,5901,7500,5325,5176,5325,5325,5347,5325,5325,5325,5915,6056,6075,6079,6082,6084,6084,6088,6088,6090,6092,6092,6092,6092,6092,6093,6097,5325,5329,7488,6838,6758,5177,5325,5325,5383,6857,6312,5325,5325,5325,5952,5325,7097,6101,5766,7112,7161,6117,5325,5330,5295,6252,6061,6140,5325,5325,5325,5966,6107,5325,5325,6109,5826,6110,5325,7174,5325,5325,5425,6244,7172,6122,5325,5325,5455,7485,7492,5325,5325,6425,5325,5325,5325,5979,6102,5767,5325,6127,5325,6606,7110,5325,5330,5732,5736,7532,5325,6132,5325,6139,5325,6679,6155,6161,5325,5325,5507,5325,5325,5325,6245,7179,6162,5325,5325,5325,6004,5903,6157,5325,5325,5569,6701,5886,5325,5325,5325,6008,6757,6504,5325,5325,5618,6423,5330,6172,6187,6178,5393,5760,6173,6188,6715,5761,6174,6189,6716,7012,5325,5325,5325,6017,5690,6970,5325,5325,5622,5325,6183,6193,6715,5325,5330,6720,6908,5325,7e3,6184,6194,6202,6202,5325,5325,5325,6023,5325,6210,6209,5325,5330,6985,7033,5325,6228,5325,5325,5325,6060,5325,5325,6103,5768,6127,5325,5330,6985,7539,6677,6840,5325,5325,5622,7353,5297,6185,6258,5173,6259,5325,5325,5325,6061,6876,5754,6251,6193,6197,5325,5753,6250,6186,6196,5325,6102,6421,5325,6605,5325,6913,6063,6679,5325,6195,5173,5325,5325,5325,6062,5325,5325,5176,5325,6900,5296,6253,6196,5325,5325,5325,6065,7306,6257,6198,5325,5325,5325,6168,6263,6840,5325,5325,5683,5687,5691,5325,6269,6281,6198,5325,5325,5848,6271,6283,5325,5331,7234,6916,6236,5325,5325,6814,5173,6063,5683,7243,5325,5335,5339,7225,5325,6606,6913,6291,5325,6061,5325,5348,7242,6274,5325,5325,5684,5688,6758,7361,5325,5325,5325,6219,6220,7122,6421,6604,6914,6062,5325,6679,6065,6279,6275,5325,5337,7257,6585,5325,5325,7123,6422,5377,5325,7488,6837,5325,5325,5325,5848,6272,7361,7359,5325,5325,6148,7122,6421,5325,6149,7361,5325,5377,7358,7362,5325,6147,7362,5325,5377,7358,7362,5325,7356,7123,6422,7356,7360,5325,5346,5325,5379,5325,6971,6220,6220,6220,5325,5350,5325,5325,5977,6661,7359,5325,5325,7244,6421,7355,6151,5325,5325,6150,5325,5325,7357,7361,5325,7355,7359,5325,5325,6147,7362,5325,6287,7355,6222,7042,5325,7042,5325,6420,5325,6221,6420,6220,6851,6851,5325,5325,5697,5325,5332,5325,5325,6068,5856,5325,6134,6971,5325,5325,5325,6220,6606,6297,6504,5325,5353,6432,5325,5364,5365,5365,5365,5365,7486,6221,6915,6307,6322,6331,6328,6335,6338,6344,6340,6348,6350,6350,6348,6354,6359,6359,6359,6359,6355,5697,7351,6441,5177,5325,5325,5698,5325,5325,5325,6163,6840,5507,5325,5364,5365,6892,5440,7466,5325,5325,7173,5325,5325,7195,5177,5325,6387,5325,5325,5745,6986,6426,5325,7140,5325,6409,6455,5325,6449,5325,5376,5325,5325,5325,6433,5325,5325,5325,6241,5325,6439,6443,5325,5325,5766,5325,5325,5325,6222,6915,6038,5325,5325,5698,5330,6644,5325,5325,5329,5325,5377,6447,5325,5325,5325,6269,6281,5325,6453,5325,5325,5768,5325,5325,5325,6607,7154,6713,7103,5325,5384,5388,5392,5325,6942,5863,7155,6714,6714,5325,5325,5325,6315,5864,5400,6179,5325,5384,6858,6162,5325,5325,6241,6378,5325,6220,5325,5325,7329,7333,7152,5868,5868,5325,5325,5325,6421,5325,7330,7334,5865,5869,5325,5325,5325,6424,6065,7331,7335,5866,5870,5325,5325,5325,6428,6442,5325,5325,5325,6508,6607,5325,6840,5508,5325,5325,5325,6389,7331,6474,5867,7362,5325,5325,6148,5325,6212,5325,5325,5859,6013,6479,5176,5325,5325,5878,5380,5325,6063,5325,6483,5325,5427,5325,5325,6145,5325,6633,6489,6494,5325,5454,7484,6244,6214,5325,5325,6604,5698,6299,5698,6299,5325,5325,5902,6156,6162,6389,6500,5325,5325,5325,6522,6061,6509,6244,5325,5325,6212,5325,6604,6461,6607,5325,5325,5325,6523,5325,6514,5325,5325,5958,5325,6607,5325,6872,5325,5767,5767,5767,5767,6870,5766,5325,5768,6870,6871,5325,5325,5325,6612,6519,5325,7123,6231,5325,6527,5325,6234,6531,6537,6545,7221,6549,6553,6553,6555,6559,6559,6559,6559,6564,6563,6566,6570,6571,6571,6571,6571,6565,6575,5325,5325,5325,6632,5571,5428,5325,5325,5325,6657,7487,5325,6222,6837,5325,6289,5325,5922,6803,5177,5325,6877,5325,5325,5921,7362,5325,7392,5325,5472,5325,5325,6470,5325,7362,5325,5325,6865,5325,6884,5325,6885,6602,5325,5325,5325,6678,5325,6613,6603,5325,5508,5325,5325,5953,5325,5325,5325,6618,5325,6923,6600,5325,6614,5325,5325,5325,6869,5325,6425,5727,6383,5379,5325,7488,6219,6220,5325,5325,6459,7351,5325,6837,5325,6628,5325,6638,5895,5325,5537,5325,6607,6167,6914,6651,5325,5325,6224,5325,6656,6656,5325,5685,5689,6749,6665,7390,5325,5325,6006,7129,6672,6667,5325,5325,6063,5325,5325,5325,5330,6903,5325,6838,6420,6291,6065,6064,5325,6424,5325,5325,5325,6022,6223,6676,5325,5325,6063,5327,6069,6694,6688,6910,6700,6244,5325,5325,6063,6064,5683,7243,6424,6217,6382,5325,5696,6490,5325,5325,5325,6582,6290,6877,5325,6065,6634,6510,5870,6705,6684,6908,5325,5696,6623,5391,5325,6215,5327,5325,5696,7307,5325,5708,5399,5719,5378,5325,6971,5325,7488,6606,6721,6909,5325,5325,5325,6899,5325,6901,6905,6909,5325,6904,6908,5325,5325,6135,5325,6288,5325,5324,5922,5325,5325,6064,5325,5325,5325,5335,6907,5325,5325,5325,6900,7305,6841,6906,6910,5325,5325,5325,6877,5324,5326,5325,5325,5325,6903,6726,5325,5325,5325,6911,5331,6316,5325,5325,5325,6915,5325,6903,6910,5325,5325,6211,5472,5325,6242,5325,5325,5325,6902,6906,5325,6725,5325,5325,6217,5325,6242,5325,5329,5378,5325,5325,5325,7170,5325,7487,6837,5325,6291,5325,5325,5325,5325,7387,5325,5325,6221,6244,7487,5325,5325,5325,6918,7487,5325,5325,7486,5325,7487,5325,5325,7487,6220,6065,6730,6734,5325,5745,5733,5737,5325,6739,6748,5325,5747,5735,5739,6871,6244,5325,6067,5325,5325,6485,5401,6243,6065,7269,5325,5754,5298,6186,6259,7036,6324,6754,6762,6770,5413,6774,6778,6782,6787,6787,6787,6783,6791,6791,6791,6793,6795,6795,6795,6795,6799,6802,5325,5325,6244,5325,5325,6971,5325,5325,5915,5326,5325,6807,6217,5325,5325,6310,5325,5325,7370,5325,5325,6314,6318,6832,5325,5325,6813,6118,5325,5325,5325,6971,6607,6061,7277,5325,6839,6123,6222,5325,5325,5325,6983,6987,5325,6818,5325,5325,6363,5325,5325,5325,6533,6820,5325,5325,5325,6992,5571,6830,5325,6831,5325,5765,5544,5772,5837,6809,5325,5325,6398,5325,5325,6836,6846,6837,6141,6222,5325,5325,6416,6840,5325,6863,5325,5325,5325,6999,6859,5325,5325,5325,7013,6541,6839,6222,5325,5825,5325,5325,5471,5325,5325,5381,5385,5389,5393,5382,5386,5390,5177,5325,6889,5387,5391,5325,5848,6317,5325,5325,5325,6914,5325,6292,5325,6876,5325,5325,5325,7241,6273,7362,5325,5325,5325,6212,6808,6218,5325,5325,6417,5325,6417,5325,5325,6416,5325,6242,5325,7036,5325,5325,6971,6838,6420,7486,5325,5325,7458,5976,5325,5766,5325,5877,5379,6219,5325,6221,6219,5325,5325,5325,7098,6496,5325,5325,5325,7020,7253,6140,5325,5325,6419,5325,7089,7232,6916,7095,6928,5325,5325,5325,7123,6424,5325,6604,5975,5325,5325,7452,5389,5393,5325,5325,5325,5725,5325,6222,5325,5325,6420,5379,5974,5325,5325,5325,7201,5325,5325,7201,5325,6915,6849,5325,5325,6620,6624,5392,5325,5878,5380,6540,5325,6244,5325,7488,5325,6840,5325,7504,5325,5325,6460,7352,5325,6134,6934,5325,5883,5325,5325,5330,7267,5325,6133,6933,5325,5886,5325,5888,5325,7487,6604,6291,5325,7503,5325,5325,6465,5325,6938,5325,6219,6221,5325,6916,6039,5325,5325,5831,6214,6605,7503,5325,5325,6509,5325,6219,6222,5330,5325,5325,6066,6971,6948,5325,5325,6515,5325,5325,5325,6606,6947,5325,5325,5914,5325,7487,6605,7121,6971,5325,5325,7121,5913,7487,6605,5913,6404,6605,5914,5914,5325,5325,7121,5325,6413,5325,5383,5387,5391,5325,5914,6952,7487,6405,6954,6954,6954,6954,6971,5325,5325,7488,6958,6964,5325,5325,6521,6593,5325,7351,5325,5325,6591,6140,6976,7036,6420,5196,5325,6980,5197,6991,7351,6996,7004,7010,7017,7040,7046,7050,7062,7053,7056,7058,7066,7076,7076,7075,7068,7070,7071,7080,7080,7080,7080,7081,7085,5325,5325,6604,7526,5325,7374,6960,7362,5325,5325,7351,5325,6911,6062,6679,5325,5330,7350,6060,6238,5325,5325,5175,5325,5325,6605,5376,5325,6435,5325,5325,6608,5385,7104,5325,5327,5325,5910,5325,6420,5325,6604,5325,5325,5325,5453,5325,7120,5325,5325,6622,5390,5177,5325,7127,5325,5325,6631,7306,6007,5325,5325,5325,7203,5325,5325,5325,7134,5325,7159,7352,5325,6913,5325,5915,5325,5325,7121,6420,6417,5325,6420,7091,5325,7301,5976,6240,6921,6220,5325,5325,6646,5325,5347,5325,7165,5327,6484,5325,5325,5849,6732,6140,5325,7178,6641,7186,7179,7399,7187,5325,5325,5325,6246,7180,7400,6162,5325,5325,6589,6587,5325,5325,5325,7312,5940,5927,6900,6958,7191,5325,5915,5913,5325,5913,5325,5325,7121,7353,6911,5325,5325,6765,6401,6922,6221,5325,5325,6824,5325,5335,7207,7182,5714,5336,7208,5711,5715,5337,7209,5712,5393,5338,7181,5713,5177,7373,6959,6244,5325,6971,7458,7354,6912,5325,6416,7296,5976,5325,5176,5325,5960,6052,5325,6919,6220,5325,5921,7332,6475,5868,7213,5596,5714,5325,5325,5325,7314,5334,5338,7214,5597,5714,6842,6841,6971,5325,5954,5325,5325,6842,5325,6418,6420,7091,5325,5954,5325,7320,7026,5325,5325,5325,7452,5389,7218,5325,5325,5325,7456,5340,5597,7285,5325,5325,7284,5325,5325,5325,7488,5325,5325,6841,6971,7199,5325,5325,5325,7313,6417,5325,7230,5325,5961,5325,5326,7242,5325,7026,5325,5325,7238,7263,7248,5325,5325,6838,5325,5325,5325,5887,5334,7262,7258,5324,7354,5325,5325,6984,7538,5325,5325,7006,5976,6420,7275,6917,5325,5325,6839,5325,6921,5325,5325,5325,7503,7291,5325,5325,5325,7520,7509,7281,5325,5325,5325,6839,5507,7290,6140,5325,5325,6840,5325,7289,6735,5325,6841,6424,5325,5325,5330,6943,7267,5325,6416,5325,5978,6671,6666,7362,7295,5325,5325,5376,6971,6631,7300,5325,5325,6841,5325,5325,5325,5959,5325,6632,7307,5325,5325,5325,6841,6216,6381,5173,5325,5325,5958,6606,5325,7305,5325,5325,6048,6915,5325,5697,5325,6012,5973,6030,5325,6632,6918,5325,5325,6841,6971,5325,6425,5325,6068,6918,5953,6140,5325,7311,5952,6918,5325,5325,6853,5325,5953,6140,5325,5325,6871,5325,5767,5953,6140,6918,5376,5325,6577,6140,5325,6017,5325,5325,5379,5325,5325,5325,7306,6916,5698,5332,5325,6917,6578,5697,5325,5325,6876,6293,5696,5325,5698,5696,7326,5325,7350,7339,7350,5325,6213,5467,7137,5325,7146,5331,5325,7123,7380,6103,5768,5325,6128,5325,6606,5325,5330,6706,6710,6909,7149,6211,7348,7367,5420,7378,7384,5423,5320,7396,7404,7407,7410,7414,7417,7419,7417,7423,7424,7429,7428,7424,7433,7434,7434,7435,7441,7439,7445,7449,5325,6022,6028,5177,5325,5325,5325,5696,6918,6523,6595,5325,7033,5325,6972,6915,5325,5325,5325,6878,5325,6215,5325,5621,7352,5325,5325,5325,7527,5540,7363,7470,5325,5325,7476,7483,5325,5325,5325,6882,6062,7493,5325,5325,5325,6882,6915,6595,6420,6841,5325,6047,5325,5325,5380,5325,6877,5325,7354,5325,6826,5325,5729,7508,7514,5325,6060,5325,6870,5173,5325,7509,6291,5325,5325,6917,5325,5326,7521,7510,5325,6060,5766,5325,5766,5325,6872,6870,5325,5325,5325,6604,5365,5365,6594,6421,6425,5325,5325,6102,7525,5351,6840,5325,6062,6841,5325,6013,7460,6031,5325,5326,5731,6393,7532,5325,5325,5325,6967,6416,5728,5732,6394,7533,5729,6391,5738,6291,5730,6392,7531,5325,6063,6062,5325,5325,5325,5334,6595,6422,6426,5325,5325,5325,6932,5177,5333,5325,6066,5325,5325,6915,5325,5325,6216,5325,5325,6877,7351,5325,6913,5325,6677,5325,6061,5325,6069,6683,6688,7525,6742,5325,5325,6941,5862,7532,6870,5325,6140,5590,6596,6423,5325,6070,6695,6689,5325,6215,5325,5325,6983,7537,5325,5325,5325,6063,6826,5352,5325,6071,6696,6690,5734,5738,5325,5325,7035,5325,5325,7488,5738,5325,6140,6872,5325,5325,6920,6750,6912,6423,5325,5325,7090,6214,5325,6912,7033,5325,6303,5325,5698,5333,6917,5325,6114,5325,5325,5410,5417,6987,5325,5325,5325,7102,7108,6877,7352,5325,5325,7114,5388,5325,7115,5325,5325,7116,5325,7114,5325,5325,5325,7130,6971,5325,2,4,8,262144,262144,1048576,1073741824,0,0,0,2147483648,0,0,0,-1979711488,4194560,4196352,270532608,2097152,4194304,8388608,234881024,268435456,37748736,-1606418432,541065216,541065216,-2143289344,-2143289344,4194304,513,32768,0,0,-2143289344,-2143289344,-2143289344,4194304,4194304,4196352,-1606418432,541065216,-2143289344,4194304,4194304,-2143289088,4196352,-1606418432,-1606418432,541065216,4194304,4198144,4194304,4196352,276901888,8540160,8425488,4194304,4194304,4194304,16777216,4194304,541065216,4194304,4194304,4194304,4194304,4194432,541065216,37748736,742391808,239075328,239075328,171966464,775946240,4718592,64,4718592,171966464,239075328,171966464,775946240,171966464,171966464,171966464,171966464,239075328,239075328,775946240,775946240,2097216,4720640,541589504,4194368,-2143285440,-1606414528,-1606414528,541589504,541589504,4194400,4194368,541065312,541065280,-2143289280,-2142763008,541589504,541065280,4194368,-2143285440,-2143285408,-2143285408,-2143285440,-2143285440,-2143285440,-2143285440,-2142761152,-1606414528,-2143285440,-2143285440,-1605890240,-2142761152,-2109731008,776470528,-1908404416,775946304,775946304,-1908404416,2,4,8,64,128,512,1024,2048,0,256,2048,2048,2048,2048,8192,8392704,0,0,-570425344,32505856,16384,1536,1792,0,2147483648,65536,65536,4224,65536,16777216,16777216,0,0,0,0,1,0,0,0,2,0,0,0,3,4,16,224,256,512,32768,96,96,0,0,0,1073741824,0,0,16384,0,0,0,118,577408,22020096,0,1536,64,524352,0,0,524288,524288,524288,524288,0,524352,524288,524288,524288,64,64,64,0,0,0,8,0,0,0,12,32,64,1024,2048,57344,262144,50331648,268435456,1073741824,2147483648,0,0,64,64,262144,1048576,4194304,16777216,33554432,268435456,0,128,128,128,128,0,8388608,4096,4096,4096,4096,29696,4096,1536,1024,0,-2113929216,100663296,100663296,4224,0,0,262144,33554432,134217728,0,0,96,64,524352,524352,524352,524352,0,64,64,128,128,128,64,64,64,96,96,96,96,524352,524352,0,0,0,15,208,15360,96,524352,524352,524352,524288,64,64,128,2048,64,0,0,32768,50331648,268435456,0,0,524352,524288,524288,64,64,96,524288,64,96,524352,0,524288,64,96,0,4096,536870912,1073741824,1056,262176,1048608,2097184,4194336,536870944,32,32,4,1073872896,32,0,32,0,0,8388608,1073741824,0,1073872896,40,262176,32,32,41,96,32,34,34,32,32,32,40,96,160,40,48,1120,96,0,64,524352,524288,64,0,0,2101248,0,0,3751936,0,0,5242880,0,0,4195360,6291488,2097184,2097184,4194336,4194336,4194336,32,56,262184,40,262184,40,262184,40,40,40,4195104,40,40,262176,32,128,256,2048,262144,524288,96,6292512,4195360,2097184,6292512,32,32,32,32,56,0,4,262184,32,32,32,512,2048,262144,0,65536,65536,131072,262144,2097152,8388608,40,4196128,32,262184,32,42,224,34,42,32,327155712,1056,1056,2098208,42,1056,4194336,32,262144,524288,0,0,16777216,0,0,4457568,-326784344,-322851160,-322851160,-322698144,-322698144,-322698144,-322698144,-322695456,-322695456,-322695456,-322695456,-322597152,-320598176,-322597152,-322597144,-321548576,-320598168,-322597144,-322588952,-321548568,-322588952,-321548568,-322597144,96,32,32,40,1120,40,262176,42,106,293601323,293601323,293863467,293699627,293617707,293716011,293702203,293702203,293702203,293702203,293702267,297896507,293964347,297896507,293702203,293702203,297896507,293964347,297896507,-322597144,-37744981,-322597144,-321548568,-37482773,0,0,1,4,8,32,64,512,2048,16384,67108864,0,48,0,0,0,64,0,0,0,318767104,0,0,1,4096,0,32,64,65536,393216,10485760,16777216,33554432,1073741824,2147483648,0,33554432,268435456,536870912,2147483648,0,0,0,262144,65536,0,0,1,2,12,16,64,128,1024,2048,4096,8192,65536,131072,0,262144,262144,0,0,2,8,16,64,262656,262144,0,0,2,12,64,262144,328192,0,0,2,204,768,-2147483646,0,0,0,1024,0,0,524288,5242880,0,0,2,65536,201330721,201330721,201330721,-2111369023,-2111360575,-2111369023,-2111369023,-2111369023,-2111369023,-1977151295,-1977151293,-1910042431,-1893265183,-2111368509,-1893265183,-1893265183,-1893265183,-553689472,-553656704,-553689472,-553656704,-553689472,-553689472,-553656704,-553656704,-553689472,-553689472,-553656704,-553656704,-553656704,-553656704,-553656672,-553656664,-553656672,-553656672,-553656672,-553656672,-553656670,-553656608,-553656672,-553656672,-553656672,-553656664,-536912159,-553656671,-536879391,-536879391,0,0,0,1040,1040,262656,0,0,0,1536,0,328192,0,0,2,67108864,0,0,458880,2097152,-1845493760,462976,-2113929216,0,0,4,8,256,471424,0,-2113929216,0,0,67108864,0,0,134217728,128,256,3584,16384,32768,524288,4194304,33554432,134217728,536870912,0,0,-1912602624,18874368,463488,0,0,134217728,4096,0,0,104e4,15728640,-570425344,0,0,0,2014,0,0,0,128,196608,2097152,8388608,536870912,0,0,201326592,0,0,0,1998,518144,8388608,0,256,12288,0,0,486539264,0,0,33554432,268435456,0,0,167772160,234881024,0,0,4,16,0,196608,786432,1048576,2097152,4194304,8388608,134217728,268435456,4194304,8388608,503316480,1073741824,2147483648,0,7168,16384,32768,196608,786432,0,128,512,7168,16384,2147483648,16777216,0,0,4,64,128,8388608,0,512,0,0,1,1,0,234881024,128,512,3072,16384,32768,4096,16384,131072,524288,1048576,2097152,0,0,0,62,64,128,234881024,268435456,1073741824,2147483648,-2147418112,5242880,-1842937664,16384,32768,131072,524288,1048576,8388608,33554432,201326592,268435456,1073741824,0,1048576,4194304,268435456,131072,2097152,0,0,7,27756528,-503316480,0,0,512,3072,16384,131072,1048576,4194304,2147483648,0,0,0,512,3072,131072,524288,1048576,524288,1048576,4194304,134217728,2147483648,0,0,524288,4194304,2147483648,0,0,536870912,0,0,16384,18432,67108864,1073741824,16384,8192,0,0,8192,18952,0,65,100663298,18952,1024,65,1024,1024,0,0,0,16,0,0,0,4,0,0,0,6,56,128,2101248,524288,1024,268436480,1024,19017,-1744550912,8388624,8388624,-1739308032,-1739308032,-1739308032,-1739308032,-1736162288,-1736162288,-1736162288,-1736162288,-7868466,-7868466,-7868466,-7868466,-7868450,-7868450,-7868450,-7868450,-7868450,65,0,2,33554432,0,0,1024,5521408,-1744830464,0,0,-1744830464,0,0,1040,8667136,-1744830464,0,0,0,9216,-67108864,0,0,0,13312,0,4096,2097152,0,0,278528,0,0,0,16384,32768,0,16,8388608,0,0,0,12288,5242880,2147483648,0,0,8,512,2048,131072,536870912,0,518144,8388608,50331648,201326592,805306368,-1073741824,805306368,-1073741824,0,0,0,18432,72,0,0,0,24576,204,768,1024,10240,16384,32768,50331648,67108864,134217728,805306368,0,768,1024,2048,8192,16384,32768,458752,8388608,50331648,67108864,16384,32768,458752,50331648,67108864,536870912,1073741824,0,0,134217728,805306368,1073741824,0,0,536870912,1073741824,0,208,0,0,0,32768,0,0,0,65536,0,0,0,131072,0,0,0,48,25165824,16384,67108864,268435456,0,0,1073741824,16384,0,0,16384,2097152,0,1572864,0,0,0,134217728,0,0,0,7,16,64,128,512,2048,8192,16384,458752,16384,458752,50331648,67108864,805306368,1073741824,16,0,0,1048576,4194304,33554432,4,8,128,512,2048,196608,262144,33554432,536870912,0,8,512,2048,196608,262144,50331648,536870912,1073741824,512,0,0,4096,1048576,0,0,0,393216,0,64,256,8192,2097152,2147483648,0,64,64,16392,268435456,0,537395200,537395200,0,0,1073741824,18432,0,0,8,16,512,402653184,0,0,0,537395200,0,32768,0,2048,0,4212736,4212736,4212736,537395200,4212736,1082130432,537427968,4212736,51380242,51380242,22038531,22366211,22366211,22366211,55592978,22366219,22366211,22366219,22366227,55592978,55592978,55592978,55592978,324028498,55592978,55592978,1062785014,1062785014,1062785014,0,1062785014,1062785014,1062785014,1062785014,16384,32768,268435456,0,0,1075838976,2097152,2097152,268435456,4194432,3145728,541065216,541065216,541065216,541065216,4096,0,8,0,1,0,67108864,1073741824,0,0,557056,0,0,16,64,128,3072,4096,8192,65536,18,17825792,33554432,0,1,67174400,33554432,268435456,0,268435456,0,346112,0,0,11,0,82,301989888,0,0,0,2048,0,0,0,4096,0,0,8192,0,0,0,44,64576,577408,22020096,1040187392,0,0,0,393744,0,256,0,8192,2097152,0,2147483648,0,0,327680,0,0,18,33554432,80,268435456,0,0,19,0,0,524288,0,64,0,2097152,0,16,33554432,0,2,0,65536,201326592,2147483648,256,1536,16384,32768,524288,0,256,8192,2097152,1,0,0,65536,262144,1048576,256,1536,32768,524288,0,4194304,134217728,536870912,0,4194304,131072,1536,32768,524288,134217728,268435456,2147483648,0,0,0,64,1536,32768,524288,4194304,0,1536,32768,0,0,16384,1073741824,0,0,32,512,2048,32768,0,1073741824,0,67174400,8,8,0,0,60,64576,8,268435456,134217728,131072,128,536870912,0,0,8,131072,4194304,-2146430976,16908320,547389524,547389524,547389524,555909216,555909216,555909216,555909216,564297840,564297844,564297844,564297844,564297844,564297844,1001055742,1001055742,1001056254,1001055742,1001056254,1001056254,1001055742,1001055742,1001056254,1001056254,1001056254,1001056254,1001056254,1001056254,0,0,64,128,8388608,0,84,2129920,8388608,16777216,0,0,9728,268435456,0,0,2048,32768,262144,524288,8388608,0,0,1280,2809856,58720256,939524096,0,0,0,524288,0,0,0,28,0,254,1792,2809856,58720256,939524096,0,939524096,0,0,64,2048,16384,32768,262144,50331648,4096,1048576,2147483648,0,2,4,16,64,128,256,0,20,64,32768,65536,2490368,16777216,33554432,0,0,16,33554432,2147483648,163840,0,0,0,1007232,52,0,0,0,104e4,64,128,1280,24576,163840,524288,2097152,58720256,402653184,536870912,128,1792,24576,163840,524288,25165824,0,0,0,1048576,4194304,0,56,128,1280,8192,524288,16384,131072,524288,58720256,402653184,0,56,128,1792,8192,16384,131072,256,262144,524288,33554432,134217728,2,4,24,32,128,1792,8192,524288,16777216,33554432,67108864,134217728,805306368,1073741824,2147483648,4,8,16,1024,16777216,4,8,16,402653184,0,8,256,512,2048,8192,32768,8388608,0,0,67108866,12,4,16384,0,0,4194304,2147483648,0,65536,67108864,0,0,0,131584,268435460,32768,8192,2048,16384,67108864,134217728,268435456,8192,3670016,2048,8192,0,65536,0,65536,8192,8192,34816,9216,29712,29712,29712,29840,536900624,29712,29840,29840,4224144,144384,144384,144384,-754647956,144384,144384,144384,144384,-754647956,-754647956,-754647956,-754647956,-754647940,-754647940,-754647940,-754647940,-754516884,-754647956,-754516884,-754516884,0,0,0,1052672,2,67108864,12,16384,0,65536,34816,0,0,0,1114112,44,64576,319029248,-1073741824,0,0,60,0,0,0,2097152,0,0,319160320,0,0,0,3670016,28672,0,0,0,4194304,0,0,0,8192,268435456,16,0,128,536870912,4194304,131072,0,131072,0,0,131072,1024,2048,61440,262144,318767104,-1073741824,318767104,-1073741824,0,0,112,25165824,28,0,0,0,8388608,0,0,393216,0,0,0,16777216,2147483648,0,24576,0,0,116,0,0,12,16,32,64,64,64,64,32,96,96,1,0,0,2,4,8,16,512,1024,16777216,33554432,402653184,0,0,0,262144,0,0,0,128,0,0,0,192,0,0,0,254,2,67108864,16384,0,65536,16384,32768,50331648,268435456,2147483648,0,0,50331648,268435456,0,2,4,112,128,256,0,524288,536870912,0,0,0,33554432,268435456,268435456,268435456,268435456,32,524288,1048576,33554432,67108864,134217728,67108864,134217728,536870912,0,2,4,134217728,268435456,0,0,0,29696,0,256,0,2048,256,262144,2113536,0,2,8,64,128,1024,4096,0,256,0,0,32,128,0,2097152,135790592,0,2,12,192,768,256,32768,0,0,128,131072,256,262144,0,0,220,0,0,0,32768,2097152,0,2,16,1048576,128,128,128,0,2097152,0,0,8388608,8388608,4096,0,0,0,32,0,0,2147483648,2097152,0,0,512,131072,4,0,0,33554624,4,131585,0,131585,4,393745,1610612736,1610612736,393753,393753,393753,393753,0,135790592,131585,131585,805708305,805708305,1879450129,1879450129,-483948553,-475559945,-483948553,-483948553,-475559945,1879450129,1879450129,1879450129,1879450129,805708561,-475559945,-475559945,-475559945,-475559945,-215504905,-475559945,-207116297,-207116297,-207116297,0,4096,4194304,1,512,32768,0,2113536,0,0,520,0,65,401936,805306368,0,0,0,393752,0,1879048192,0,0,1024,585,0,0,8,64,0,0,402192,0,0,0,33554432,0,0,7,19367920,-503316480,0,0,0,50331648,0,19376112,-234881024,0,2,301989888,0,3,22020096,0,1,285212672,0,0,33554432,33554432,8192,0,2048,16384,32768,524288,1048576,4194304,16777216,27764720,-234881024,0,0,1024,278528,24,0,0,0,167772160,8704,268435456,0,0,1998,59238400,-67108864,0,7,16,480,1536,32768,65536,393216,2097152,33554432,536870912,-1073741824,0,0,67108864,134217728,0,0,2048,131072,524288,4194304,8192,268435456,0,0,2048,4194304,0,0,16,224,256,1536,32768,65536,256,512,1024,32768,65536,192,0,0,131072,131072,131072,134217736,32768,131072,262144,2097152,16777216,4096,1,512,32768,0,0,513,32768,0,192,131072,0,4,8,512,2048,0,0,131072,2097152,16777216,0,4,8,2048,8192,32768,512,32768,131072,2097152,8388608,4,16,224,512,32768,4,524288,134217728,0,8388608,0,64,0,4096,32768,0,0,29824,536870912,16,192,32768,8388608,16777216,1073741824,0,0,2,4,16,192,32768,0,4096,0,128,0,16384,64,128,0,0,16384,16,64,128,8388608,0,0,4,0,0,128,512,3072,4096,16384,32768,4,128,0,0,32768,8388608,8388608,33554432,2147483648,0,4,16,32,64,128,256,1536,2048,16384,4096,0,33554432,0,4,32,32,524320,32,33554436,262144,33554432,0,0,0,256,0,0,0,512,2048,131072,33554432,536870912,0,0,0,528,2,2048,32768,0,4,268435456,0,2,4,32,524288,2,33554436,0,0,32768,268435456,33554436,4224,4224,0,8,16,402653184,536870912,0,0,96,2260992,262400,65536,65536,65536,10878976,16777216,33554432,536870912,4224,-1072627712,805306384,-1342177264,-1070006272,-1070006272,-1069989376,-1069989376,-1069989376,-1069989360,-1065795072,-1061600768,-1069989376,-258932720,-258932720,-258932720,-258932720,-225378288,-258932720,-225378288,1260767,1260767,34815199,1260767,1260767,34815199,34815199,1260767,34815199,1260767,169032927,169032927,169032927,169032927,1242774751,169032927,169032927,-1978450721,169032927,-1978450721,169032927,-1978450721,-1978450721,-225231649,-1173144353,-225231649,-225231649,-91013921,0,8,64,2048,16,536870912,0,0,524288,1048576,2097152,4194304,128,128,2048,2048,2048,0,7946240,12140544,0,0,524288,3145728,0,9502720,1610612736,0,0,0,32505856,208,15360,1245184,0,0,0,268435456,0,0,0,15,9633792,0,0,3670016,0,0,16384,0,67108864,0,0,536870912,131072,0,80,128,7168,8192,196608,1048576,196608,1048576,0,0,524288,134217728,1,2,12,80,128,0,3145728,0,0,0,3735552,8192,65536,131072,1048576,0,0,128,1024,4096,8192,0,0],r.TOKEN=["(0)","PragmaContents","DirCommentContents","DirPIContents","CDataSection","Wildcard","EQName","URILiteral","IntegerLiteral","DecimalLiteral","DoubleLiteral","StringLiteral","PredefinedEntityRef","'\"\"'","EscapeApos","ElementContentChar","QuotAttrContentChar","AposAttrContentChar","PITarget","NCName","QName","S","S","CharRef","CommentContents","EOF","'!'","'!='","'\"'","'#'","'#)'","'$'","'$$'","'%'","''''","'('","'(#'","'(:'","')'","'*'","'*'","'+'","','","'-'","'-->'","'.'","'..'","'/'","'//'","'/>'","':'","':)'","'::'","':='","';'","'<'","'<!--'","'</'","'<<'","'<='","'<?'","'='","'>'","'>='","'>>'","'?'","'?>'","'@'","'NaN'","'['","']'","'after'","'all'","'allowing'","'ancestor'","'ancestor-or-self'","'and'","'any'","'append'","'array'","'as'","'ascending'","'at'","'attribute'","'base-uri'","'before'","'boundary-space'","'break'","'by'","'case'","'cast'","'castable'","'catch'","'check'","'child'","'collation'","'collection'","'comment'","'constraint'","'construction'","'contains'","'content'","'context'","'continue'","'copy'","'copy-namespaces'","'count'","'decimal-format'","'decimal-separator'","'declare'","'default'","'delete'","'descendant'","'descendant-or-self'","'descending'","'diacritics'","'different'","'digit'","'distance'","'div'","'document'","'document-node'","'element'","'else'","'empty'","'empty-sequence'","'encoding'","'end'","'entire'","'eq'","'every'","'exactly'","'except'","'exit'","'external'","'false'","'first'","'following'","'following-sibling'","'for'","'foreach'","'foreign'","'from'","'ft-option'","'ftand'","'ftnot'","'ftor'","'function'","'ge'","'greatest'","'group'","'grouping-separator'","'gt'","'idiv'","'if'","'import'","'in'","'index'","'infinity'","'inherit'","'insensitive'","'insert'","'instance'","'integrity'","'intersect'","'into'","'is'","'item'","'json'","'json-item'","'jsoniq'","'key'","'language'","'last'","'lax'","'le'","'least'","'let'","'levels'","'loop'","'lowercase'","'lt'","'minus-sign'","'mod'","'modify'","'module'","'most'","'namespace'","'namespace-node'","'ne'","'next'","'no'","'no-inherit'","'no-preserve'","'node'","'nodes'","'not'","'null'","'object'","'occurs'","'of'","'on'","'only'","'option'","'or'","'order'","'ordered'","'ordering'","'paragraph'","'paragraphs'","'parent'","'pattern-separator'","'per-mille'","'percent'","'phrase'","'position'","'preceding'","'preceding-sibling'","'preserve'","'previous'","'processing-instruction'","'relationship'","'rename'","'replace'","'return'","'returning'","'revalidation'","'same'","'satisfies'","'schema'","'schema-attribute'","'schema-element'","'score'","'select'","'self'","'sensitive'","'sentence'","'sentences'","'skip'","'sliding'","'some'","'stable'","'start'","'stemming'","'stop'","'strict'","'strip'","'structured-item'","'switch'","'text'","'then'","'thesaurus'","'times'","'to'","'treat'","'true'","'try'","'tumbling'","'type'","'typeswitch'","'union'","'unique'","'unordered'","'updating'","'uppercase'","'using'","'validate'","'value'","'variable'","'version'","'weight'","'when'","'where'","'while'","'wildcards'","'window'","'with'","'without'","'word'","'words'","'zero-digit'","'{'","'{{'","'{|'","'|'","'||'","'|}'","'}'","'}}'"]},{}],9:[function(e,t,n){var r=n.XQueryParser=function i(e,t){function n(e,t){$l=t,Kl=e,Ql=e.length,r(0,0,0)}function r(e,t,n){Pl=t,Hl=t,Bl=e,jl=t,Fl=n,Il=0,Yl=n,zl=-1,Jl={},$l.reset(Kl)}function s(){$l.startNonterminal("Module",Hl);switch(Bl){case 274:Nl(199);break;default:Dl=Bl}(Dl==64274||Dl==134930)&&o(),Tl(275);switch(Bl){case 182:Nl(194);break;default:Dl=Bl}switch(Dl){case 94390:Sl(),u();break;default:Sl(),Fa()}$l.endNonterminal("Module",Hl)}function o(){$l.startNonterminal("VersionDecl",Hl),bl(274),Tl(116);switch(Bl){case 125:bl(125),Tl(17),bl(11);break;default:bl(263),Tl(17),bl(11),Tl(109),Bl==125&&(bl(125),Tl(17),bl(11))}Tl(28),Sl(),l(),$l.endNonterminal("VersionDecl",Hl)}function u(){$l.startNonterminal("LibraryModule",Hl),a(),Tl(138),Sl(),f(),$l.endNonterminal("LibraryModule",Hl)}function a(){$l.startNonterminal("ModuleDecl",Hl),bl(182),Tl(61),bl(184),Tl(249),Sl(),Ba(),Tl(29),bl(60),Tl(15),bl(7),Tl(28),Sl(),l(),$l.endNonterminal("ModuleDecl",Hl)}function f(){$l.startNonterminal("Prolog",Hl);for(;;){Tl(275);switch(Bl){case 108:Nl(214);break;case 153:Nl(202);break;default:Dl=Bl}if(Dl!=42604&&Dl!=43628&&Dl!=50284&&Dl!=53356&&Dl!=54380&&Dl!=55916&&Dl!=72300&&Dl!=93337&&Dl!=94316&&Dl!=104044&&Dl!=113772&&Dl!=115353)break;switch(Bl){case 108:Nl(179);break;default:Dl=Bl}if(Dl==55916){Dl=Ol(0,Hl);if(Dl==0){var e=Pl,t=Hl,n=Bl,r=jl,i=Fl,s=Il,o=ql,u=Rl;try{M(),Dl=-1}catch(a){Dl=-2}Pl=e,Hl=t,Bl=n,Bl==0?Yl=t:(jl=r,Fl=i,Il=s,Il==0?Yl=i:(ql=o,Rl=u,Yl=u)),Al(0,Hl,Dl)}}switch(Dl){case-1:Sl(),O();break;case 94316:Sl(),A();break;case 153:Sl(),N();break;case 72300:Sl(),_();break;default:Sl(),c()}Tl(28),Sl(),l()}for(;;){Tl(275);switch(Bl){case 108:Nl(211);break;default:Dl=Bl}if(Dl!=16492&&Dl!=48748&&Dl!=51820&&Dl!=74348&&Dl!=79468&&Dl!=82540&&Dl!=101996&&Dl!=131692&&Dl!=134252)break;switch(Bl){case 108:Nl(175);break;default:Dl=Bl}switch(Dl){case 51820:Sl(),q();break;case 101996:Sl(),K();break;default:Sl(),D()}Tl(28),Sl(),l()}$l.endNonterminal("Prolog",Hl)}function l(){$l.startNonterminal("Separator",Hl),bl(53),$l.endNonterminal("Separator",Hl)}function c(){$l.startNonterminal("Setter",Hl);switch(Bl){case 108:Nl(172);break;default:Dl=Bl}if(Dl==55916){Dl=Ol(1,Hl);if(Dl==0){var e=Pl,t=Hl,n=Bl,r=jl,i=Fl,s=Il,o=ql,u=Rl;try{d(),Dl=-2}catch(a){try{Pl=e,Hl=t,Bl=n,Bl==0?Yl=t:(jl=r,Fl=i,Il=s,Il==0?Yl=i:(ql=o,Rl=u,Yl=u)),b(),Dl=-6}catch(f){Dl=-9}}Pl=e,Hl=t,Bl=n,Bl==0?Yl=t:(jl=r,Fl=i,Il=s,Il==0?Yl=i:(ql=o,Rl=u,Yl=u)),Al(1,Hl,Dl)}}switch(Dl){case 43628:h();break;case-2:p();break;case 42604:v();break;case 50284:m();break;case 104044:g();break;case-6:y();break;case 113772:To();break;case 53356:w();break;default:x()}$l.endNonterminal("Setter",Hl)}function h(){$l.startNonterminal("BoundarySpaceDecl",Hl),bl(108),Tl(33),bl(85),Tl(133);switch(Bl){case 214:bl(214);break;default:bl(241)}$l.endNonterminal("BoundarySpaceDecl",Hl)}function p(){$l.startNonterminal("DefaultCollationDecl",Hl),bl(108),Tl(46),bl(109),Tl(38),bl(94),Tl(15),bl(7),$l.endNonterminal("DefaultCollationDecl",Hl)}function d(){wl(108),Tl(46),wl(109),Tl(38),wl(94),Tl(15),wl(7)}function v(){$l.startNonterminal("BaseURIDecl",Hl),bl(108),Tl(32),bl(83),Tl(15),bl(7),$l.endNonterminal("BaseURIDecl",Hl)}function m(){$l.startNonterminal("ConstructionDecl",Hl),bl(108),Tl(41),bl(98),Tl(133);switch(Bl){case 241:bl(241);break;default:bl(214)}$l.endNonterminal("ConstructionDecl",Hl)}function g(){$l.startNonterminal("OrderingModeDecl",Hl),bl(108),Tl(68),bl(203),Tl(131);switch(Bl){case 202:bl(202);break;default:bl(256)}$l.endNonterminal("OrderingModeDecl",Hl)}function y(){$l.startNonterminal("EmptyOrderDecl",Hl),bl(108),Tl(46),bl(109),Tl(67),bl(201),Tl(49),bl(123),Tl(121);switch(Bl){case 147:bl(147);break;default:bl(173)}$l.endNonterminal("EmptyOrderDecl",Hl)}function b(){wl(108),Tl(46),wl(109),Tl(67),wl(201),Tl(49),wl(123),Tl(121);switch(Bl){case 147:wl(147);break;default:wl(173)}}function w(){$l.startNonterminal("CopyNamespacesDecl",Hl),bl(108),Tl(44),bl(104),Tl(128),Sl(),E(),Tl(25),bl(41),Tl(123),Sl(),S(),$l.endNonterminal("CopyNamespacesDecl",Hl)}function E(){$l.startNonterminal("PreserveMode",Hl);switch(Bl){case 214:bl(214);break;default:bl(190)}$l.endNonterminal("PreserveMode",Hl)}function S(){$l.startNonterminal("InheritMode",Hl);switch(Bl){case 157:bl(157);break;default:bl(189)}$l.endNonterminal("InheritMode",Hl)}function x(){$l.startNonterminal("DecimalFormatDecl",Hl),bl(108),Tl(114);switch(Bl){case 106:bl(106),Tl(255),Sl(),_a();break;default:bl(109),Tl(45),bl(106)}for(;;){Tl(181);if(Bl==53)break;Sl(),T(),Tl(29),bl(60),Tl(17),bl(11)}$l.endNonterminal("DecimalFormatDecl",Hl)}function T(){$l.startNonterminal("DFPropertyName",Hl);switch(Bl){case 107:bl(107);break;case 149:bl(149);break;case 156:bl(156);break;case 179:bl(179);break;case 67:bl(67);break;case 209:bl(209);break;case 208:bl(208);break;case 275:bl(275);break;case 116:bl(116);break;default:bl(207)}$l.endNonterminal("DFPropertyName",Hl)}function N(){$l.startNonterminal("Import",Hl);switch(Bl){case 153:Nl(126);break;default:Dl=Bl}switch(Dl){case 115353:C();break;default:L()}$l.endNonterminal("Import",Hl)}function C(){$l.startNonterminal("SchemaImport",Hl),bl(153),Tl(73),bl(225),Tl(137),Bl!=7&&(Sl(),k()),Tl(15),bl(7),Tl(108);if(Bl==81){bl(81),Tl(15),bl(7);for(;;){Tl(103);if(Bl!=41)break;bl(41),Tl(15),bl(7)}}$l.endNonterminal("SchemaImport",Hl)}function k(){$l.startNonterminal("SchemaPrefix",Hl);switch(Bl){case 184:bl(184),Tl(249),Sl(),Ba(),Tl(29),bl(60);break;default:bl(109),Tl(47),bl(121),Tl(61),bl(184)}$l.endNonterminal("SchemaPrefix",Hl)}function L(){$l.startNonterminal("ModuleImport",Hl),bl(153),Tl(60),bl(182),Tl(90),Bl==184&&(bl(184),Tl(249),Sl(),Ba(),Tl(29),bl(60)),Tl(15),bl(7),Tl(108);if(Bl==81){bl(81),Tl(15),bl(7);for(;;){Tl(103);if(Bl!=41)break;bl(41),Tl(15),bl(7)}}$l.endNonterminal("ModuleImport",Hl)}function A(){$l.startNonterminal("NamespaceDecl",Hl),bl(108),Tl(61),bl(184),Tl(249),Sl(),Ba(),Tl(29),bl(60),Tl(15),bl(7),$l.endNonterminal("NamespaceDecl",Hl)}function O(){$l.startNonterminal("DefaultNamespaceDecl",Hl),bl(108),Tl(46),bl(109),Tl(115);switch(Bl){case 121:bl(121);break;default:bl(145)}Tl(61),bl(184),Tl(15),bl(7),$l.endNonterminal("DefaultNamespaceDecl",Hl)}function M(){wl(108),Tl(46),wl(109),Tl(115);switch(Bl){case 121:wl(121);break;default:wl(145)}Tl(61),wl(184),Tl(15),wl(7)}function _(){$l.startNonterminal("FTOptionDecl",Hl),bl(108),Tl(52),bl(141),Tl(81),Sl(),Hu(),$l.endNonterminal("FTOptionDecl",Hl)}function D(){$l.startNonterminal("AnnotatedDecl",Hl),bl(108);for(;;){Tl(170);if(Bl!=32&&Bl!=257)break;switch(Bl){case 257:Sl(),P();break;default:Sl(),H()}}switch(Bl){case 262:Sl(),j();break;case 145:Sl(),gl();break;case 95:Sl(),ca();break;case 155:Sl(),wa();break;default:Sl(),Ea()}$l.endNonterminal("AnnotatedDecl",Hl)}function P(){$l.startNonterminal("CompatibilityAnnotation",Hl),bl(257),$l.endNonterminal("CompatibilityAnnotation",Hl)}function H(){$l.startNonterminal("Annotation",Hl),bl(32),Tl(255),Sl(),_a(),Tl(171);if(Bl==34){bl(34),Tl(154),Sl(),ri();for(;;){Tl(101);if(Bl!=41)break;bl(41),Tl(154),Sl(),ri()}bl(37)}$l.endNonterminal("Annotation",Hl)}function B(){wl(32),Tl(255),Da(),Tl(171);if(Bl==34){wl(34),Tl(154),ii();for(;;){Tl(101);if(Bl!=41)break;wl(41),Tl(154),ii()}wl(37)}}function j(){$l.startNonterminal("VarDecl",Hl),bl(262),Tl(21),bl(31),Tl(255),Sl(),fi(),Tl(147),Bl==79&&(Sl(),cs()),Tl(106);switch(Bl){case 52:bl(52),Tl(267),Sl(),F();break;default:bl(133),Tl(104),Bl==52&&(bl(52),Tl(267),Sl(),I())}$l.endNonterminal("VarDecl",Hl)}function F(){$l.startNonterminal("VarValue",Hl),Af(),$l.endNonterminal("VarValue",Hl)}function I(){$l.startNonterminal("VarDefaultValue",Hl),Af(),$l.endNonterminal("VarDefaultValue",Hl)}function q(){$l.startNonterminal("ContextItemDecl",Hl),bl(108),Tl(43),bl(101),Tl(55),bl(165),Tl(147),Bl==79&&(bl(79),Tl(260),Sl(),gs()),Tl(106);switch(Bl){case 52:bl(52),Tl(267),Sl(),F();break;default:bl(133),Tl(104),Bl==52&&(bl(52),Tl(267),Sl(),I())}$l.endNonterminal("ContextItemDecl",Hl)}function R(){$l.startNonterminal("ParamList",Hl),z();for(;;){Tl(101);if(Bl!=41)break;bl(41),Tl(21),Sl(),z()}$l.endNonterminal("ParamList",Hl)}function U(){W();for(;;){Tl(101);if(Bl!=41)break;wl(41),Tl(21),W()}}function z(){$l.startNonterminal("Param",Hl),bl(31),Tl(255),Sl(),_a(),Tl(143),Bl==79&&(Sl(),cs()),$l.endNonterminal("Param",Hl)}function W(){wl(31),Tl(255),Da(),Tl(143),Bl==79&&hs()}function X(){$l.startNonterminal("FunctionBody",Hl),$(),$l.endNonterminal("FunctionBody",Hl)}function V(){J()}function $(){$l.startNonterminal("EnclosedExpr",Hl),bl(276),Tl(267),Sl(),Q(),bl(282),$l.endNonterminal("EnclosedExpr",Hl)}function J(){wl(276),Tl(267),G(),wl(282)}function K(){$l.startNonterminal("OptionDecl",Hl),bl(108),Tl(66),bl(199),Tl(255),Sl(),_a(),Tl(17),bl(11),$l.endNonterminal("OptionDecl",Hl)}function Q(){$l.startNonterminal("Expr",Hl),Af();for(;;){if(Bl!=41)break;bl(41),Tl(267),Sl(),Af()}$l.endNonterminal("Expr",Hl)}function G(){Of();for(;;){if(Bl!=41)break;wl(41),Tl(267),Of()}}function Y(){$l.startNonterminal("FLWORExpr",Hl),et();for(;;){Tl(173);if(Bl==220)break;Sl(),nt()}Sl(),nn(),$l.endNonterminal("FLWORExpr",Hl)}function Z(){tt();for(;;){Tl(173);if(Bl==220)break;rt()}rn()}function et(){$l.startNonterminal("InitialClause",Hl);switch(Bl){case 137:Nl(141);break;default:Dl=Bl}switch(Dl){case 16009:it();break;case 174:dt();break;default:yt()}$l.endNonterminal("InitialClause",Hl)}function tt(){switch(Bl){case 137:Nl(141);break;default:Dl=Bl}switch(Dl){case 16009:st();break;case 174:vt();break;default:bt()}}function nt(){$l.startNonterminal("IntermediateClause",Hl);switch(Bl){case 137:case 174:et();break;case 266:Ft();break;case 148:qt();break;case 105:Bt();break;default:Jt()}$l.endNonterminal("IntermediateClause",Hl)}function rt(){switch(Bl){case 137:case 174:tt();break;case 266:It();break;case 148:Rt();break;case 105:jt();break;default:Kt()}}function it(){$l.startNonterminal("ForClause",Hl),bl(137),Tl(21),Sl(),ot();for(;;){if(Bl!=41)break;bl(41),Tl(21),Sl(),ot()}$l.endNonterminal("ForClause",Hl)}function st(){wl(137),Tl(21),ut();for(;;){if(Bl!=41)break;wl(41),Tl(21),ut()}}function ot(){$l.startNonterminal("ForBinding",Hl),bl(31),Tl(255),Sl(),fi(),Tl(164),Bl==79&&(Sl(),cs()),Tl(158),Bl==72&&(Sl(),at()),Tl(150),Bl==81&&(Sl(),lt()),Tl(122),Bl==228&&(Sl(),ht()),Tl(53),bl(154),Tl(267),Sl(),Af(),$l.endNonterminal("ForBinding",Hl)}function ut(){wl(31),Tl(255),li(),Tl(164),Bl==79&&hs(),Tl(158),Bl==72&&ft(),Tl(150),Bl==81&&ct(),Tl(122),Bl==228&&pt(),Tl(53),wl(154),Tl(267),Of()}function at(){$l.startNonterminal("AllowingEmpty",Hl),bl(72),Tl(49),bl(123),$l.endNonterminal("AllowingEmpty",Hl)}function ft(){wl(72),Tl(49),wl(123)}function lt(){$l.startNonterminal("PositionalVar",Hl),bl(81),Tl(21),bl(31),Tl(255),Sl(),fi(),$l.endNonterminal("PositionalVar",Hl)}function ct(){wl(81),Tl(21),wl(31),Tl(255),li()}function ht(){$l.startNonterminal("FTScoreVar",Hl),bl(228),Tl(21),bl(31),Tl(255),Sl(),fi(),$l.endNonterminal("FTScoreVar",Hl)}function pt(){wl(228),Tl(21),wl(31),Tl(255),li()}function dt(){$l.startNonterminal("LetClause",Hl),bl(174),Tl(96),Sl(),mt();for(;;){if(Bl!=41)break;bl(41),Tl(96),Sl(),mt()}$l.endNonterminal("LetClause",Hl)}function vt(){wl(174),Tl(96),gt();for(;;){if(Bl!=41)break;wl(41),Tl(96),gt()}}function mt(){$l.startNonterminal("LetBinding",Hl);switch(Bl){case 31:bl(31),Tl(255),Sl(),fi(),Tl(105),Bl==79&&(Sl(),cs());break;default:ht()}Tl(27),bl(52),Tl(267),Sl(),Af(),$l.endNonterminal("LetBinding",Hl)}function gt(){switch(Bl){case 31:wl(31),Tl(255),li(),Tl(105),Bl==79&&hs();break;default:pt()}Tl(27),wl(52),Tl(267),Of()}function yt(){$l.startNonterminal("WindowClause",Hl),bl(137),Tl(135);switch(Bl){case 251:Sl(),wt();break;default:Sl(),St()}$l.endNonterminal("WindowClause",Hl)}function bt(){wl(137),Tl(135);switch(Bl){case 251:Et();break;default:xt()}}function wt(){$l.startNonterminal("TumblingWindowClause",Hl),bl(251),Tl(85),bl(269),Tl(21),bl(31),Tl(255),Sl(),fi(),Tl(110),Bl==79&&(Sl(),cs()),Tl(53),bl(154),Tl(267),Sl(),Af(),Sl(),Tt();if(Bl==126||Bl==198)Sl(),Ct();$l.endNonterminal("TumblingWindowClause",Hl)}function Et(){wl(251),Tl(85),wl(269),Tl(21),wl(31),Tl(255),li(),Tl(110),Bl==79&&hs(),Tl(53),wl(154),Tl(267),Of(),Nt(),(Bl==126||Bl==198)&&kt()}function St(){$l.startNonterminal("SlidingWindowClause",Hl),bl(234),Tl(85),bl(269),Tl(21),bl(31),Tl(255),Sl(),fi(),Tl(110),Bl==79&&(Sl(),cs()),Tl(53),bl(154),Tl(267),Sl(),Af(),Sl(),Tt(),Sl(),Ct(),$l.endNonterminal("SlidingWindowClause",Hl)}function xt(){wl(234),Tl(85),wl(269),Tl(21),wl(31),Tl(255),li(),Tl(110),Bl==79&&hs(),Tl(53),wl(154),Tl(267),Of(),Nt(),kt()}function Tt(){$l.startNonterminal("WindowStartCondition",Hl),bl(237),Tl(163),Sl(),Lt(),Tl(83),bl(265),Tl(267),Sl(),Af(),$l.endNonterminal("WindowStartCondition",Hl)}function Nt(){wl(237),Tl(163),At(),Tl(83),wl(265),Tl(267),Of()}function Ct(){$l.startNonterminal("WindowEndCondition",Hl),Bl==198&&bl(198),Tl(50),bl(126),Tl(163),Sl(),Lt(),Tl(83),bl(265),Tl(267),Sl(),Af(),$l.endNonterminal("WindowEndCondition",Hl)}function kt(){Bl==198&&wl(198),Tl(50),wl(126),Tl(163),At(),Tl(83),wl(265),Tl(267),Of()}function Lt(){$l.startNonterminal("WindowVars",Hl),Bl==31&&(bl(31),Tl(255),Sl(),Ot()),Tl(159),Bl==81&&(Sl(),lt()),Tl(153),Bl==215&&(bl(215),Tl(21),bl(31),Tl(255),Sl(),_t()),Tl(127),Bl==187&&(bl(187),Tl(21),bl(31),Tl(255),Sl(),Pt()),$l.endNonterminal("WindowVars",Hl)}function At(){Bl==31&&(wl(31),Tl(255),Mt()),Tl(159),Bl==81&&ct(),Tl(153),Bl==215&&(wl(215),Tl(21),wl(31),Tl(255),Dt()),Tl(127),Bl==187&&(wl(187),Tl(21),wl(31),Tl(255),Ht())}function Ot(){$l.startNonterminal("CurrentItem",Hl),_a(),$l.endNonterminal("CurrentItem",Hl)}function Mt(){Da()}function _t(){$l.startNonterminal("PreviousItem",Hl),_a(),$l.endNonterminal("PreviousItem",Hl)}function Dt(){Da()}function Pt(){$l.startNonterminal("NextItem",Hl),_a(),$l.endNonterminal("NextItem",Hl)}function Ht(){Da()}function Bt(){$l.startNonterminal("CountClause",Hl),bl(105),Tl(21),bl(31),Tl(255),Sl(),fi(),$l.endNonterminal("CountClause",Hl)}function jt(){wl(105),Tl(21),wl(31),Tl(255),li()}function Ft(){$l.startNonterminal("WhereClause",Hl),bl(266),Tl(267),Sl(),Af(),$l.endNonterminal("WhereClause",Hl)}function It(){wl(266),Tl(267),Of()}function qt(){$l.startNonterminal("GroupByClause",Hl),bl(148),Tl(34),bl(87),Tl(267),Sl(),Ut(),$l.endNonterminal("GroupByClause",Hl)}function Rt(){wl(148),Tl(34),wl(87),Tl(267),zt()}function Ut(){$l.startNonterminal("GroupingSpecList",Hl),Wt();for(;;){Tl(176);if(Bl!=41)break;bl(41),Tl(267),Sl(),Wt()}$l.endNonterminal("GroupingSpecList",Hl)}function zt(){Xt();for(;;){Tl(176);if(Bl!=41)break;wl(41),Tl(267),Xt()}}function Wt(){$l.startNonterminal("GroupingSpec",Hl);switch(Bl){case 31:Nl(255);break;default:Dl=Bl}if(Dl==3103||Dl==35871||Dl==36895||Dl==37407||Dl==37919||Dl==38431||Dl==39455||Dl==39967||Dl==40479||Dl==40991||Dl==41503||Dl==42015||Dl==42527||Dl==43039||Dl==43551||Dl==44063||Dl==45087||Dl==45599||Dl==46111||Dl==46623||Dl==47647||Dl==48159||Dl==49183||Dl==49695||Dl==50207||Dl==51743||Dl==52255||Dl==52767||Dl==53279||Dl==53791||Dl==54303||Dl==55327||Dl==55839||Dl==56351||Dl==56863||Dl==57375||Dl==57887||Dl==60447||Dl==60959||Dl==61471||Dl==61983||Dl==62495||Dl==63007||Dl==63519||Dl==64031||Dl==64543||Dl==65567||Dl==66079||Dl==67103||Dl==67615||Dl==68127||Dl==68639||Dl==69151||Dl==69663||Dl==70175||Dl==72223||Dl==74271||Dl==74783||Dl==75807||Dl==76831||Dl==77343||Dl==77855||Dl==78367||Dl==78879||Dl==79391||Dl==81439||Dl==81951||Dl==82463||Dl==82975||Dl==83487||Dl==83999||Dl==84511||Dl==85023||Dl==85535||Dl==87071||Dl==87583||Dl==88095||Dl==89119||Dl==90143||Dl==91167||Dl==92191||Dl==92703||Dl==93215||Dl==94239||Dl==94751||Dl==95263||Dl==97823||Dl==98335||Dl==99359||Dl==101407||Dl==101919||Dl==102431||Dl==102943||Dl==103455||Dl==103967||Dl==105503||Dl==108575||Dl==109087||Dl==110623||Dl==111647||Dl==112159||Dl==112671||Dl==113183||Dl==113695||Dl==114719||Dl==115231||Dl==115743||Dl==116255||Dl==116767||Dl==117279||Dl==119839||Dl==120351||Dl==120863||Dl==121375||Dl==122911||Dl==123935||Dl==124447||Dl==124959||Dl==127007||Dl==127519||Dl==128031||Dl==128543||Dl==129055||Dl==129567||Dl==130079||Dl==131103||Dl==131615||Dl==133151||Dl==133663||Dl==134175||Dl==134687||Dl==136223||Dl==136735||Dl==138271||Dl==140319){Dl=Ol(2,Hl);if(Dl==0){var e=Pl,t=Hl,n=Bl,r=jl,i=Fl,s=Il,o=ql,u=Rl;try{$t(),Tl(183);if(Bl==52||Bl==79)Bl==79&&hs(),Tl(27),wl(52),Tl(267),Of();Bl==94&&(wl(94),Tl(15),wl(7)),Dl=-1}catch(a){Dl=-2}Pl=e,Hl=t,Bl=n,Bl==0?Yl=t:(jl=r,Fl=i,Il=s,Il==0?Yl=i:(ql=o,Rl=u,Yl=u)),Al(2,Hl,Dl)}}switch(Dl){case-1:Vt(),Tl(183);if(Bl==52||Bl==79)Bl==79&&(Sl(),cs()),Tl(27),bl(52),Tl(267),Sl(),Af();Bl==94&&(bl(94),Tl(15),bl(7));break;default:Af()}$l.endNonterminal("GroupingSpec",Hl)}function Xt(){switch(Bl){case 31:Nl(255);break;default:Dl=Bl}if(Dl==3103||Dl==35871||Dl==36895||Dl==37407||Dl==37919||Dl==38431||Dl==39455||Dl==39967||Dl==40479||Dl==40991||Dl==41503||Dl==42015||Dl==42527||Dl==43039||Dl==43551||Dl==44063||Dl==45087||Dl==45599||Dl==46111||Dl==46623||Dl==47647||Dl==48159||Dl==49183||Dl==49695||Dl==50207||Dl==51743||Dl==52255||Dl==52767||Dl==53279||Dl==53791||Dl==54303||Dl==55327||Dl==55839||Dl==56351||Dl==56863||Dl==57375||Dl==57887||Dl==60447||Dl==60959||Dl==61471||Dl==61983||Dl==62495||Dl==63007||Dl==63519||Dl==64031||Dl==64543||Dl==65567||Dl==66079||Dl==67103||Dl==67615||Dl==68127||Dl==68639||Dl==69151||Dl==69663||Dl==70175||Dl==72223||Dl==74271||Dl==74783||Dl==75807||Dl==76831||Dl==77343||Dl==77855||Dl==78367||Dl==78879||Dl==79391||Dl==81439||Dl==81951||Dl==82463||Dl==82975||Dl==83487||Dl==83999||Dl==84511||Dl==85023||Dl==85535||Dl==87071||Dl==87583||Dl==88095||Dl==89119||Dl==90143||Dl==91167||Dl==92191||Dl==92703||Dl==93215||Dl==94239||Dl==94751||Dl==95263||Dl==97823||Dl==98335||Dl==99359||Dl==101407||Dl==101919||Dl==102431||Dl==102943||Dl==103455||Dl==103967||Dl==105503||Dl==108575||Dl==109087||Dl==110623||Dl==111647||Dl==112159||Dl==112671||Dl==113183||Dl==113695||Dl==114719||Dl==115231||Dl==115743||Dl==116255||Dl==116767||Dl==117279||Dl==119839||Dl==120351||Dl==120863||Dl==121375||Dl==122911||Dl==123935||Dl==124447||Dl==124959||Dl==127007||Dl==127519||Dl==128031||Dl==128543||Dl==129055||Dl==129567||Dl==130079||Dl==131103||Dl==131615||Dl==133151||Dl==133663||Dl==134175||Dl==134687||Dl==136223||Dl==136735||Dl==138271||Dl==140319){Dl=Ol(2,Hl);if(Dl==0){var e=Pl,t=Hl,n=Bl,r=jl,i=Fl,s=Il,o=ql,u=Rl;try{$t(),Tl(183);if(Bl==52||Bl==79)Bl==79&&hs(),Tl(27),wl(52),Tl(267),Of();Bl==94&&(wl(94),Tl(15),wl(7)),Al(2,t,-1),Dl=-3}catch(a){Dl=-2,Pl=e,Hl=t,Bl=n,Bl==0?Yl=t:(jl=r,Fl=i,Il=s,Il==0?Yl=i:(ql=o,Rl=u,Yl=u)),Al(2,t,-2)}}}switch(Dl){case-1:$t(),Tl(183);if(Bl==52||Bl==79)Bl==79&&hs(),Tl(27),wl(52),Tl(267),Of();Bl==94&&(wl(94),Tl(15),wl(7));break;case-3:break;default:Of()}}function Vt(){$l.startNonterminal("GroupingVariable",Hl),bl(31),Tl(255),Sl(),fi(),$l.endNonterminal("GroupingVariable",Hl)}function $t(){wl(31),Tl(255),li()}function Jt(){$l.startNonterminal("OrderByClause",Hl);switch(Bl){case 201:bl(201),Tl(34),bl(87);break;default:bl(236),Tl(67),bl(201),Tl(34),bl(87)}Tl(267),Sl(),Qt(),$l.endNonterminal("OrderByClause",Hl)}function Kt(){switch(Bl){case 201:wl(201),Tl(34),wl(87);break;default:wl(236),Tl(67),wl(201),Tl(34),wl(87)}Tl(267),Gt()}function Qt(){$l.startNonterminal("OrderSpecList",Hl),Yt();for(;;){Tl(176);if(Bl!=41)break;bl(41),Tl(267),Sl(),Yt()}$l.endNonterminal("OrderSpecList",Hl)}function Gt(){Zt();for(;;){Tl(176);if(Bl!=41)break;wl(41),Tl(267),Zt()}}function Yt(){$l.startNonterminal("OrderSpec",Hl),Af(),Sl(),en(),$l.endNonterminal("OrderSpec",Hl)}function Zt(){Of(),tn()}function en(){$l.startNonterminal("OrderModifier",Hl);if(Bl==80||Bl==113)switch(Bl){case 80:bl(80);break;default:bl(113)}Tl(180);if(Bl==123){bl(123),Tl(121);switch(Bl){case 147:bl(147);break;default:bl(173)}}Tl(177),Bl==94&&(bl(94),Tl(15),bl(7)),$l.endNonterminal("OrderModifier",Hl)}function tn(){if(Bl==80||Bl==113)switch(Bl){case 80:wl(80);break;default:wl(113)}Tl(180);if(Bl==123){wl(123),Tl(121);switch(Bl){case 147:wl(147);break;default:wl(173)}}Tl(177),Bl==94&&(wl(94),Tl(15),wl(7))}function nn(){$l.startNonterminal("ReturnClause",Hl),bl(220),Tl(267),Sl(),Af(),$l.endNonterminal("ReturnClause",Hl)}function rn(){wl(220),Tl(267),Of()}function sn(){$l.startNonterminal("QuantifiedExpr",Hl);switch(Bl){case 235:bl(235);break;default:bl(129)}Tl(21),bl(31),Tl(255),Sl(),fi(),Tl(110),Bl==79&&(Sl(),cs()),Tl(53),bl(154),Tl(267),Sl(),Af();for(;;){if(Bl!=41)break;bl(41),Tl(21),bl(31),Tl(255),Sl(),fi(),Tl(110),Bl==79&&(Sl(),cs()),Tl(53),bl(154),Tl(267),Sl(),Af()}bl(224),Tl(267),Sl(),Af(),$l.endNonterminal("QuantifiedExpr",Hl)}function on(){switch(Bl){case 235:wl(235);break;default:wl(129)}Tl(21),wl(31),Tl(255),li(),Tl(110),Bl==79&&hs(),Tl(53),wl(154),Tl(267),Of();for(;;){if(Bl!=41)break;wl(41),Tl(21),wl(31),Tl(255),li(),Tl(110),Bl==79&&hs(),Tl(53),wl(154),Tl(267),Of()}wl(224),Tl(267),Of()}function un(){$l.startNonterminal("SwitchExpr",Hl),bl(243),Tl(22),bl(34),Tl(267),Sl(),Q(),bl(37);for(;;){Tl(35),Sl(),fn();if(Bl!=88)break}bl(109),Tl(70),bl(220),Tl(267),Sl(),Af(),$l.endNonterminal("SwitchExpr",Hl)}function an(){wl(243),Tl(22),wl(34),Tl(267),G(),wl(37);for(;;){Tl(35),ln();if(Bl!=88)break}wl(109),Tl(70),wl(220),Tl(267),Of()}function fn(){$l.startNonterminal("SwitchCaseClause",Hl);for(;;){bl(88),Tl(267),Sl(),cn();if(Bl!=88)break}bl(220),Tl(267),Sl(),Af(),$l.endNonterminal("SwitchCaseClause",Hl)}function ln(){for(;;){wl(88),Tl(267),hn();if(Bl!=88)break}wl(220),Tl(267),Of()}function cn(){$l.startNonterminal("SwitchCaseOperand",Hl),Af(),$l.endNonterminal("SwitchCaseOperand",Hl)}function hn(){Of()}function pn(){$l.startNonterminal("TypeswitchExpr",Hl),bl(253),Tl(22),bl(34),Tl(267),Sl(),Q(),bl(37);for(;;){Tl(35),Sl(),vn();if(Bl!=88)break}bl(109),Tl(95),Bl==31&&(bl(31),Tl(255),Sl(),fi()),Tl(70),bl(220),Tl(267),Sl(),Af(),$l.endNonterminal("TypeswitchExpr",Hl)}function dn(){wl(253),Tl(22),wl(34),Tl(267),G(),wl(37);for(;;){Tl(35),mn();if(Bl!=88)break}wl(109),Tl(95),Bl==31&&(wl(31),Tl(255),li()),Tl(70),wl(220),Tl(267),Of()}function vn(){$l.startNonterminal("CaseClause",Hl),bl(88),Tl(262),Bl==31&&(bl(31),Tl(255),Sl(),fi(),Tl(30),bl(79)),Tl(260),Sl(),gn(),bl(220),Tl(267),Sl(),Af(),$l.endNonterminal("CaseClause",Hl)}function mn(){wl(88),Tl(262),Bl==31&&(wl(31),Tl(255),li(),Tl(30),wl(79)),Tl(260),yn(),wl(220),Tl(267),Of()}function gn(){$l.startNonterminal("SequenceTypeUnion",Hl),ps();for(;;){Tl(134);if(Bl!=279)break;bl(279),Tl(260),Sl(),ps()}$l.endNonterminal("SequenceTypeUnion",Hl)}function yn(){ds();for(;;){Tl(134);if(Bl!=279)break;wl(279),Tl(260),ds()}}function bn(){$l.startNonterminal("IfExpr",Hl),bl(152),Tl(22),bl(34),Tl(267),Sl(),Q(),bl(37),Tl(77),bl(245),Tl(267),Sl(),Af(),bl(122),Tl(267),Sl(),Af(),$l.endNonterminal("IfExpr",Hl)}function wn(){wl(152),Tl(22),wl(34),Tl(267),G(),wl(37),Tl(77),wl(245),Tl(267),Of(),wl(122),Tl(267),Of()}function En(){$l.startNonterminal("TryCatchExpr",Hl),xn();for(;;){Tl(36),Sl(),kn(),Tl(184);if(Bl!=91)break}$l.endNonterminal("TryCatchExpr",Hl)}function Sn(){Tn();for(;;){Tl(36),Ln(),Tl(184);if(Bl!=91)break}}function xn(){$l.startNonterminal("TryClause",Hl),bl(250),Tl(87),bl(276),Tl(267),Sl(),Nn(),bl(282),$l.endNonterminal("TryClause",Hl)}function Tn(){wl(250),Tl(87),wl(276),Tl(267),Cn(),wl(282)}function Nn(){$l.startNonterminal("TryTargetExpr",Hl),Q(),$l.endNonterminal("TryTargetExpr",Hl)}function Cn(){G()}function kn(){$l.startNonterminal("CatchClause",Hl),bl(91),Tl(257),Sl(),An(),bl(276),Tl(267),Sl(),Q(),bl(282),$l.endNonterminal("CatchClause",Hl)}function Ln(){wl(91),Tl(257),On(),wl(276),Tl(267),G(),wl(282)}function An(){$l.startNonterminal("CatchErrorList",Hl),$r();for(;;){Tl(136);if(Bl!=279)break;bl(279),Tl(257),Sl(),$r()}$l.endNonterminal("CatchErrorList",Hl)}function On(){Jr();for(;;){Tl(136);if(Bl!=279)break;wl(279),Tl(257),Jr()}}function Mn(){$l.startNonterminal("OrExpr",Hl),Dn();for(;;){if(Bl!=200)break;bl(200),Tl(267),Sl(),Dn()}$l.endNonterminal("OrExpr",Hl)}function _n(){Pn();for(;;){if(Bl!=200)break;wl(200),Tl(267),Pn()}}function Dn(){$l.startNonterminal("AndExpr",Hl),Hn();for(;;){if(Bl!=75)break;bl(75),Tl(267),Sl(),Hn()}$l.endNonterminal("AndExpr",Hl)}function Pn(){Bn();for(;;){if(Bl!=75)break;wl(75),Tl(267),Bn()}}function Hn(){$l.startNonterminal("ComparisonExpr",Hl),jn();if(Bl==27||Bl==54||Bl==57||Bl==58||Bl==60||Bl==61||Bl==62||Bl==63||Bl==128||Bl==146||Bl==150||Bl==164||Bl==172||Bl==178||Bl==186){switch(Bl){case 128:case 146:case 150:case 172:case 178:case 186:Sl(),pr();break;case 57:case 63:case 164:Sl(),vr();break;default:Sl(),cr()}Tl(267),Sl(),jn()}$l.endNonterminal("ComparisonExpr",Hl)}function Bn(){Fn();if(Bl==27||Bl==54||Bl==57||Bl==58||Bl==60||Bl==61||Bl==62||Bl==63||Bl==128||Bl==146||Bl==150||Bl==164||Bl==172||Bl==178||Bl==186){switch(Bl){case 128:case 146:case 150:case 172:case 178:case 186:dr();break;case 57:case 63:case 164:mr();break;default:hr()}Tl(267),Fn()}}function jn(){$l.startNonterminal("FTContainsExpr",Hl),In(),Bl==99&&(bl(99),Tl(76),bl(244),Tl(162),Sl(),Xo(),Bl==271&&(Sl(),fa())),$l.endNonterminal("FTContainsExpr",Hl)}function Fn(){qn(),Bl==99&&(wl(99),Tl(76),wl(244),Tl(162),Vo(),Bl==271&&la())}function In(){$l.startNonterminal("StringConcatExpr",Hl),Rn();for(;;){if(Bl!=280)break;bl(280),Tl(267),Sl(),Rn()}$l.endNonterminal("StringConcatExpr",Hl)}function qn(){Un();for(;;){if(Bl!=280)break;wl(280),Tl(267),Un()}}function Rn(){$l.startNonterminal("RangeExpr",Hl),zn(),Bl==248&&(bl(248),Tl(267),Sl(),zn()),$l.endNonterminal("RangeExpr",Hl)}function Un(){Wn(),Bl==248&&(wl(248),Tl(267),Wn())}function zn(){$l.startNonterminal("AdditiveExpr",Hl),Xn();for(;;){if(Bl!=40&&Bl!=42)break;switch(Bl){case 40:bl(40);break;default:bl(42)}Tl(267),Sl(),Xn()}$l.endNonterminal("AdditiveExpr",Hl)}function Wn(){Vn();for(;;){if(Bl!=40&&Bl!=42)break;switch(Bl){case 40:wl(40);break;default:wl(42)}Tl(267),Vn()}}function Xn(){$l.startNonterminal("MultiplicativeExpr",Hl),$n();for(;;){if(Bl!=38&&Bl!=118&&Bl!=151&&Bl!=180)break;switch(Bl){case 38:bl(38);break;case 118:bl(118);break;case 151:bl(151);break;default:bl(180)}Tl(267),Sl(),$n()}$l.endNonterminal("MultiplicativeExpr",Hl)}function Vn(){Jn();for(;;){if(Bl!=38&&Bl!=118&&Bl!=151&&Bl!=180)break;switch(Bl){case 38:wl(38);break;case 118:wl(118);break;case 151:wl(151);break;default:wl(180)}Tl(267),Jn()}}function $n(){$l.startNonterminal("UnionExpr",Hl),Kn();for(;;){if(Bl!=254&&Bl!=279)break;switch(Bl){case 254:bl(254);break;default:bl(279)}Tl(267),Sl(),Kn()}$l.endNonterminal("UnionExpr",Hl)}function Jn(){Qn();for(;;){if(Bl!=254&&Bl!=279)break;switch(Bl){case 254:wl(254);break;default:wl(279)}Tl(267),Qn()}}function Kn(){$l.startNonterminal("IntersectExceptExpr",Hl),Gn();for(;;){Tl(223);if(Bl!=131&&Bl!=162)break;switch(Bl){case 162:bl(162);break;default:bl(131)}Tl(267),Sl(),Gn()}$l.endNonterminal("IntersectExceptExpr",Hl)}function Qn(){Yn();for(;;){Tl(223);if(Bl!=131&&Bl!=162)break;switch(Bl){case 162:wl(162);break;default:wl(131)}Tl(267),Yn()}}function Gn(){$l.startNonterminal("InstanceofExpr",Hl),Zn(),Tl(224),Bl==160&&(bl(160),Tl(64),bl(196),Tl(260),Sl(),ps()),$l.endNonterminal("InstanceofExpr",Hl)}function Yn(){er(),Tl(224),Bl==160&&(wl(160),Tl(64),wl(196),Tl(260),ds())}function Zn(){$l.startNonterminal("TreatExpr",Hl),tr(),Tl(225),Bl==249&&(bl(249),Tl(30),bl(79),Tl(260),Sl(),ps()),$l.endNonterminal("TreatExpr",Hl)}function er(){nr(),Tl(225),Bl==249&&(wl(249),Tl(30),wl(79),Tl(260),ds())}function tr(){$l.startNonterminal("CastableExpr",Hl),rr(),Tl(226),Bl==90&&(bl(90),Tl(30),bl(79),Tl(255),Sl(),fs()),$l.endNonterminal("CastableExpr",Hl)}function nr(){ir(),Tl(226),Bl==90&&(wl(90),Tl(30),wl(79),Tl(255),ls())}function rr(){$l.startNonterminal("CastExpr",Hl),sr(),Tl(228),Bl==89&&(bl(89),Tl(30),bl(79),Tl(255),Sl(),fs()),$l.endNonterminal("CastExpr",Hl)}function ir(){or(),Tl(228),Bl==89&&(wl(89),Tl(30),wl(79),Tl(255),ls())}function sr(){$l.startNonterminal("UnaryExpr",Hl);for(;;){Tl(267);if(Bl!=40&&Bl!=42)break;switch(Bl){case 42:bl(42);break;default:bl(40)}}Sl(),ur(),$l.endNonterminal("UnaryExpr",Hl)}function or(){for(;;){Tl(267);if(Bl!=40&&Bl!=42)break;switch(Bl){case 42:wl(42);break;default:wl(40)}}ar()}function ur(){$l.startNonterminal("ValueExpr",Hl);switch(Bl){case 260:Nl(248);break;default:Dl=Bl}switch(Dl){case 87812:case 123140:case 129284:case 141572:gr();break;case 35:Er();break;default:fr()}$l.endNonterminal("ValueExpr",Hl)}function ar(){switch(Bl){case 260:Nl(248);break;default:Dl=Bl}switch(Dl){case 87812:case 123140:case 129284:case 141572:yr();break;case 35:Sr();break;default:lr()}}function fr(){$l.startNonterminal("SimpleMapExpr",Hl),Nr();for(;;){if(Bl!=26)break;bl(26),Tl(266),Sl(),Nr()}$l.endNonterminal("SimpleMapExpr",Hl)}function lr(){Cr();for(;;){if(Bl!=26)break;wl(26),Tl(266),Cr()}}function cr(){$l.startNonterminal("GeneralComp",Hl);switch(Bl){case 60:bl(60);break;case 27:bl(27);break;case 54:bl(54);break;case 58:bl(58);break;case 61:bl(61);break;default:bl(62)}$l.endNonterminal("GeneralComp",Hl)}function hr(){switch(Bl){case 60:wl(60);break;case 27:wl(27);break;case 54:wl(54);break;case 58:wl(58);break;case 61:wl(61);break;default:wl(62)}}function pr(){$l.startNonterminal("ValueComp",Hl);switch(Bl){case 128:bl(128);break;case 186:bl(186);break;case 178:bl(178);break;case 172:bl(172);break;case 150:bl(150);break;default:bl(146)}$l.endNonterminal("ValueComp",Hl)}function dr(){switch(Bl){case 128:wl(128);break;case 186:wl(186);break;case 178:wl(178);break;case 172:wl(172);break;case 150:wl(150);break;default:wl(146)}}function vr(){$l.startNonterminal("NodeComp",Hl);switch(Bl){case 164:bl(164);break;case 57:bl(57);break;default:bl(63)}$l.endNonterminal("NodeComp",Hl)}function mr(){switch(Bl){case 164:wl(164);break;case 57:wl(57);break;default:wl(63)}}function gr(){$l.startNonterminal("ValidateExpr",Hl),bl(260),Tl(160);if(Bl!=276)switch(Bl){case 252:bl(252),Tl(255),Sl(),po();break;default:Sl(),br()}Tl(87),bl(276),Tl(267),Sl(),Q(),bl(282),$l.endNonterminal("ValidateExpr",Hl)}function yr(){wl(260),Tl(160);if(Bl!=276)switch(Bl){case 252:wl(252),Tl(255),vo();break;default:wr()}Tl(87),wl(276),Tl(267),G(),wl(282)}function br(){$l.startNonterminal("ValidationMode",Hl);switch(Bl){case 171:bl(171);break;default:bl(240)}$l.endNonterminal("ValidationMode",Hl)}function wr(){switch(Bl){case 171:wl(171);break;default:wl(240)}}function Er(){$l.startNonterminal("ExtensionExpr",Hl);for(;;){Sl(),xr(),Tl(100);if(Bl!=35)break}bl(276),Tl(274),Bl!=282&&(Sl(),Q()),bl(282),$l.endNonterminal("ExtensionExpr",Hl)}function Sr(){for(;;){Tr(),Tl(100);if(Bl!=35)break}wl(276),Tl(274),Bl!=282&&G(),wl(282)}function xr(){$l.startNonterminal("Pragma",Hl),bl(35),Cl(252),Bl==21&&bl(21),_a(),Cl(10),Bl==21&&(bl(21),Cl(0),bl(1)),Cl(5),bl(30),$l.endNonterminal("Pragma",Hl)}function Tr(){wl(35),Cl(252),Bl==21&&wl(21),Da(),Cl(10),Bl==21&&(wl(21),Cl(0),wl(1)),Cl(5),wl(30)}function Nr(){$l.startNonterminal("PathExpr",Hl);switch(Bl){case 46:bl(46),Tl(286);switch(Bl){case 25:case 26:case 27:case 37:case 38:case 40:case 41:case 42:case 49:case 53:case 57:case 58:case 60:case 61:case 62:case 63:case 69:case 87:case 99:case 205:case 232:case 247:case 273:case 279:case 280:case 281:case 282:break;default:Sl(),kr()}break;case 47:bl(47),Tl(265),Sl(),kr();break;default:kr()}$l.endNonterminal("PathExpr",Hl)}function Cr(){switch(Bl){case 46:wl(46),Tl(286);switch(Bl){case 25:case 26:case 27:case 37:case 38:case 40:case 41:case 42:case 49:case 53:case 57:case 58:case 60:case 61:case 62:case 63:case 69:case 87:case 99:case 205:case 232:case 247:case 273:case 279:case 280:case 281:case 282:break;default:Lr()}break;case 47:wl(47),Tl(265),Lr();break;default:Lr()}}function kr(){$l.startNonterminal("RelativePathExpr",Hl),Ar();for(;;){switch(Bl){case 26:Nl(266);break;default:Dl=Bl}if(Dl!=25&&Dl!=27&&Dl!=37&&Dl!=38&&Dl!=40&&Dl!=41&&Dl!=42&&Dl!=46&&Dl!=47&&Dl!=49&&Dl!=53&&Dl!=54&&Dl!=57&&Dl!=58&&Dl!=60&&Dl!=61&&Dl!=62&&Dl!=63&&Dl!=69&&Dl!=70&&Dl!=75&&Dl!=79&&Dl!=80&&Dl!=81&&Dl!=84&&Dl!=87&&Dl!=88&&Dl!=89&&Dl!=90&&Dl!=94&&Dl!=99&&Dl!=105&&Dl!=109&&Dl!=113&&Dl!=118&&Dl!=122&&Dl!=123&&Dl!=126&&Dl!=128&&Dl!=131&&Dl!=137&&Dl!=146&&Dl!=148&&Dl!=150&&Dl!=151&&Dl!=160&&Dl!=162&&Dl!=163&&Dl!=164&&Dl!=172&&Dl!=174&&Dl!=178&&Dl!=180&&Dl!=181&&Dl!=186&&Dl!=198&&Dl!=200&&Dl!=201&&Dl!=205&&Dl!=220&&Dl!=224&&Dl!=232&&Dl!=236&&Dl!=237&&Dl!=247&&Dl!=248&&Dl!=249&&Dl!=254&&Dl!=266&&Dl!=270&&Dl!=273&&Dl!=279&&Dl!=280&&Dl!=281&&Dl!=282&&Dl!=23578&&Dl!=24090){Dl=Ol(3,Hl);if(Dl==0){var e=Pl,t=Hl,n=Bl,r=jl,i=Fl,s=Il,o=ql,u=Rl;try{switch(Bl){case 46:wl(46);break;case 47:wl(47);break;default:wl(26)}Tl(265),Or(),Dl=-1}catch(a){Dl=-2}Pl=e,Hl=t,Bl=n,Bl==0?Yl=t:(jl=r,Fl=i,Il=s,Il==0?Yl=i:(ql=o,Rl=u,Yl=u)),Al(3,Hl,Dl)}}if(Dl!=-1&&Dl!=46&&Dl!=47)break;switch(Bl){case 46:bl(46);break;case 47:bl(47);break;default:bl(26)}Tl(265),Sl(),Ar()}$l.endNonterminal("RelativePathExpr",Hl)}function Lr(){Or();for(;;){switch(Bl){case 26:Nl(266);break;default:Dl=Bl}if(Dl!=25&&Dl!=27&&Dl!=37&&Dl!=38&&Dl!=40&&Dl!=41&&Dl!=42&&Dl!=46&&Dl!=47&&Dl!=49&&Dl!=53&&Dl!=54&&Dl!=57&&Dl!=58&&Dl!=60&&Dl!=61&&Dl!=62&&Dl!=63&&Dl!=69&&Dl!=70&&Dl!=75&&Dl!=79&&Dl!=80&&Dl!=81&&Dl!=84&&Dl!=87&&Dl!=88&&Dl!=89&&Dl!=90&&Dl!=94&&Dl!=99&&Dl!=105&&Dl!=109&&Dl!=113&&Dl!=118&&Dl!=122&&Dl!=123&&Dl!=126&&Dl!=128&&Dl!=131&&Dl!=137&&Dl!=146&&Dl!=148&&Dl!=150&&Dl!=151&&Dl!=160&&Dl!=162&&Dl!=163&&Dl!=164&&Dl!=172&&Dl!=174&&Dl!=178&&Dl!=180&&Dl!=181&&Dl!=186&&Dl!=198&&Dl!=200&&Dl!=201&&Dl!=205&&Dl!=220&&Dl!=224&&Dl!=232&&Dl!=236&&Dl!=237&&Dl!=247&&Dl!=248&&Dl!=249&&Dl!=254&&Dl!=266&&Dl!=270&&Dl!=273&&Dl!=279&&Dl!=280&&Dl!=281&&Dl!=282&&Dl!=23578&&Dl!=24090){Dl=Ol(3,Hl);if(Dl==0){var e=Pl,t=Hl,n=Bl,r=jl,i=Fl,s=Il,o=ql,u=Rl;try{switch(Bl){case 46:wl(46);break;case 47:wl(47);break;default:wl(26)}Tl(265),Or(),Al(3,t,-1);continue}catch(a){Pl=e,Hl=t,Bl=n,Bl==0?Yl=t:(jl=r,Fl=i,Il=s,Il==0?Yl=i:(ql=o,Rl=u,Yl=u)),Al(3,t,-2);break}}}if(Dl!=-1&&Dl!=46&&Dl!=47)break;switch(Bl){case 46:wl(46);break;case 47:wl(47);break;default:wl(26)}Tl(265),Or()}}function Ar(){$l.startNonterminal("StepExpr",Hl);switch(Bl){case 82:Nl(285);break;case 121:Nl(283);break;case 184:case 216:Nl(282);break;case 96:case 119:case 202:case 244:case 256:Nl(247);break;case 78:case 124:case 152:case 165:case 167:case 242:case 243:case 253:Nl(240);break;case 73:case 74:case 93:case 111:case 112:case 135:case 136:case 206:case 212:case 213:case 229:Nl(246);break;case 6:case 70:case 72:case 75:case 77:case 79:case 80:case 81:case 83:case 84:case 85:case 86:case 88:case 89:case 90:case 91:case 94:case 97:case 98:case 101:case 102:case 103:case 104:case 105:case 106:case 108:case 109:case 110:case 113:case 118:case 120:case 122:case 123:case 125:case 126:case 128:case 129:case 131:case 132:case 133:case 134:case 137:case 141:case 145:case 146:case 148:case 150:case 151:case 153:case 154:case 155:case 159:case 160:case 161:case 162:case 163:case 164:case 166:case 170:case 171:case 172:case 174:case 176:case 178:case 180:case 181:case 182:case 185:case 186:case 191:case 192:case 194:case 198:case 199:case 200:case 201:case 203:case 218:case 219:case 220:case 221:case 222:case 224:case 225:case 226:case 227:case 228:case 234:case 235:case 236:case 237:case 240:case 248:case 249:case 250:case 251:case 252:case 254:case 257:case 260:case 261:case 262:case 263:case 266:case 267:case 270:case 274:Nl(244);break;default:Dl=Bl}if(Dl==35922||Dl==35961||Dl==36024||Dl==36056||Dl==38482||Dl==38521||Dl==38584||Dl==38616||Dl==40530||Dl==40569||Dl==40632||Dl==40664||Dl==41042||Dl==41081||Dl==41144||Dl==41176||Dl==41554||Dl==41593||Dl==41656||Dl==41688||Dl==43090||Dl==43129||Dl==43192||Dl==43224||Dl==45138||Dl==45177||Dl==45240||Dl==45272||Dl==45650||Dl==45689||Dl==45752||Dl==45784||Dl==46162||Dl==46201||Dl==46264||Dl==46296||Dl==48210||Dl==48249||Dl==48312||Dl==48344||Dl==53842||Dl==53881||Dl==53944||Dl==53976||Dl==55890||Dl==55929||Dl==55992||Dl==56024||Dl==57938||Dl==57977||Dl==58040||Dl==58072||Dl==60498||Dl==60537||Dl==60600||Dl==60632||Dl==62546||Dl==62585||Dl==62648||Dl==62680||Dl==63058||Dl==63097||Dl==63160||Dl==63192||Dl==64594||Dl==64633||Dl==64696||Dl==64728||Dl==65618||Dl==65657||Dl==65720||Dl==65752||Dl==67154||Dl==67193||Dl==67256||Dl==67288||Dl==70226||Dl==70265||Dl==70328||Dl==70360||Dl==74834||Dl==74873||Dl==74936||Dl==74968||Dl==75858||Dl==75897||Dl==75960||Dl==75992||Dl==76882||Dl==76921||Dl==76984||Dl==77016||Dl==77394||Dl==77433||Dl==77496||Dl==77528||Dl==82002||Dl==82041||Dl==82104||Dl==82136||Dl==83026||Dl==83065||Dl==83128||Dl==83160||Dl==83538||Dl==83577||Dl==83640||Dl==83672||Dl==84050||Dl==84089||Dl==84152||Dl==84184||Dl==88146||Dl==88185||Dl==88248||Dl==88280||Dl==89170||Dl==89209||Dl==89272||Dl==89304||Dl==91218||Dl==91257||Dl==91320||Dl==91352||Dl==92242||Dl==92281||Dl==92344||Dl==92376||Dl==92754||Dl==92793||Dl==92856||Dl==92888||Dl==95314||Dl==95353||Dl==95416||Dl==95448||Dl==101458||Dl==101497||Dl==101560||Dl==101592||Dl==102482||Dl==102521||Dl==102584||Dl==102616||Dl==102994||Dl==103033||Dl==103096||Dl==103128||Dl==112722||Dl==112761||Dl==112824||Dl==112856||Dl==114770||Dl==114809||Dl==114872||Dl==114904||Dl==120914||Dl==120953||Dl==121016||Dl==121048||Dl==121426||Dl==121465||Dl==121528||Dl==121560||Dl==127058||Dl==127097||Dl==127160||Dl==127192||Dl==127570||Dl==127609||Dl==127672||Dl==127704||Dl==130130||Dl==130169||Dl==130232||Dl==130264||Dl==136274||Dl==136313||Dl==136376||Dl==136408||Dl==138322||Dl==138361||Dl==138424||Dl==138456){Dl=Ol(4,Hl);if(Dl==0){var e=Pl,t=Hl,n=Bl,r=jl,i=Fl,s=Il,o=ql,u=Rl;try{Qr(),Dl=-1}catch(a){Dl=-2}Pl=e,Hl=t,Bl=n,Bl==0?Yl=t:(jl=r,Fl=i,Il=s,Il==0?Yl=i:(ql=o,Rl=u,Yl=u)),Al(4,Hl,Dl)}}switch(Dl){case-1:case 8:case 9:case 10:case 11:case 31:case 32:case 34:case 44:case 54:case 55:case 59:case 68:case 276:case 278:case 3154:case 3193:case 9912:case 9944:case 14854:case 14918:case 14920:case 14921:case 14922:case 14923:case 14925:case 14926:case 14927:case 14928:case 14929:case 14930:case 14931:case 14932:case 14933:case 14934:case 14936:case 14937:case 14938:case 14939:case 14941:case 14942:case 14944:case 14945:case 14946:case 14949:case 14950:case 14951:case 14952:case 14953:case 14954:case 14956:case 14957:case 14958:case 14959:case 14960:case 14961:case 14966:case 14967:case 14968:case 14969:case 14970:case 14971:case 14972:case 14973:case 14974:case 14976:case 14977:case 14979:case 14980:case 14981:case 14982:case 14983:case 14984:case 14985:case 14989:case 14993:case 14994:case 14996:case 14998:case 14999:case 15e3:case 15001:case 15002:case 15003:case 15007:case 15008:case 15009:case 15010:case 15011:case 15012:case 15013:case 15014:case 15015:case 15018:case 15019:case 15020:case 15022:case 15024:case 15026:case 15028:case 15029:case 15030:case 15032:case 15033:case 15034:case 15039:case 15040:case 15042:case 15046:case 15047:case 15048:case 15049:case 15050:case 15051:case 15054:case 15060:case 15061:case 15064:case 15066:case 15067:case 15068:case 15069:case 15070:case 15072:case 15073:case 15074:case 15075:case 15076:case 15077:case 15082:case 15083:case 15084:case 15085:case 15088:case 15090:case 15091:case 15092:case 15096:case 15097:case 15098:case 15099:case 15100:case 15101:case 15102:case 15104:case 15105:case 15108:case 15109:case 15110:case 15111:case 15114:case 15115:case 15118:case 15122:case 17414:case 17478:case 17480:case 17481:case 17482:case 17483:case 17485:case 17487:case 17488:case 17489:case 17491:case 17492:case 17493:case 17494:case 17496:case 17497:case 17498:case 17499:case 17501:case 17502:case 17505:case 17506:case 17509:case 17510:case 17511:case 17512:case 17513:case 17514:case 17516:case 17517:case 17518:case 17519:case 17520:case 17521:case 17526:case 17527:case 17530:case 17531:case 17533:case 17534:case 17536:case 17537:case 17539:case 17540:case 17541:case 17542:case 17543:case 17544:case 17545:case 17549:case 17553:case 17554:case 17556:case 17558:case 17559:case 17561:case 17562:case 17563:case 17567:case 17568:case 17569:case 17570:case 17571:case 17572:case 17574:case 17578:case 17579:case 17580:case 17582:case 17584:case 17586:case 17588:case 17589:case 17590:case 17592:case 17594:case 17600:case 17602:case 17606:case 17607:case 17608:case 17609:case 17610:case 17611:case 17614:case 17620:case 17621:case 17626:case 17627:case 17628:case 17629:case 17630:case 17632:case 17633:case 17636:case 17637:case 17642:case 17643:case 17644:case 17645:case 17648:case 17656:case 17657:case 17658:case 17659:case 17660:case 17662:case 17664:case 17665:case 17668:case 17669:case 17670:case 17671:case 17674:case 17675:case 17678:case 17682:case 36946:case 36985:case 37048:case 37080:case 37458:case 37497:case 37560:case 37592:case 37970:case 38009:case 38072:case 38104:case 39506:case 39545:case 39608:case 39640:case 40018:case 40057:case 42066:case 42105:case 42168:case 42200:case 42578:case 42617:case 42680:case 42712:case 43602:case 43641:case 43704:case 43736:case 44114:case 44153:case 44216:case 44248:case 46674:case 46713:case 46776:case 46808:case 47698:case 47737:case 47800:case 47832:case 49234:case 49273:case 49336:case 49368:case 49746:case 49785:case 49848:case 49880:case 50258:case 50297:case 50360:case 50392:case 51794:case 51833:case 51896:case 51928:case 52306:case 52345:case 52408:case 52440:case 52818:case 52857:case 52920:case 52952:case 53330:case 53369:case 53432:case 53464:case 54354:case 54393:case 54456:case 54488:case 55378:case 55417:case 55480:case 55512:case 56402:case 56441:case 56504:case 56536:case 56914:case 56953:case 57016:case 57048:case 57426:case 57465:case 57528:case 57560:case 61010:case 61049:case 61112:case 61144:case 61522:case 61561:case 61624:case 61656:case 62034:case 62073:case 62136:case 62168:case 63570:case 63609:case 63672:case 63704:case 64082:case 64121:case 64184:case 64216:case 66130:case 66169:case 66232:case 66264:case 67666:case 67705:case 67768:case 67800:case 68178:case 68217:case 68280:case 68312:case 68690:case 68729:case 68792:case 68824:case 69202:case 69241:case 69304:case 69336:case 69714:case 69753:case 69816:case 69848:case 72274:case 72313:case 72376:case 72408:case 74322:case 74361:case 74424:case 74456:case 77906:case 77945:case 78008:case 78040:case 78418:case 78457:case 78520:case 78552:case 78930:case 78969:case 79032:case 79064:case 79442:case 79481:case 79544:case 79576:case 81490:case 81529:case 81592:case 81624:case 82514:case 82553:case 82616:case 82648:case 84562:case 84601:case 84664:case 84696:case 85074:case 85113:case 85176:case 85208:case 85586:case 85625:case 87122:case 87161:case 87224:case 87256:case 87634:case 87673:case 87736:case 87768:case 90194:case 90233:case 90296:case 90328:case 93266:case 93305:case 93368:case 93400:case 94290:case 94329:case 94392:case 94424:case 94802:case 94841:case 94904:case 94936:case 97874:case 97913:case 97976:case 98008:case 98386:case 98425:case 98488:case 98520:case 99410:case 99449:case 99512:case 99544:case 101970:case 102009:case 102072:case 102104:case 103506:case 103545:case 103608:case 103640:case 104018:case 104057:case 104120:case 104152:case 105554:case 105593:case 105656:case 105688:case 108626:case 108665:case 108728:case 108760:case 109138:case 109177:case 109240:case 109272:case 110674:case 110713:case 110776:case 110808:case 111698:case 111737:case 111800:case 111832:case 112210:case 112249:case 112312:case 112344:case 113234:case 113273:case 113336:case 113368:case 113746:case 113785:case 113848:case 113880:case 115282:case 115321:case 115384:case 115416:case 115794:case 115833:case 115896:case 115928:case 116306:case 116345:case 116408:case 116440:case 116818:case 116857:case 116920:case 116952:case 117330:case 117369:case 117432:case 117464:case 119890:case 119929:case 119992:case 120024:case 120402:case 120441:case 120504:case 120536:case 122962:case 123001:case 123064:case 123096:case 123986:case 124025:case 124498:case 124537:case 124600:case 124632:case 125010:case 125049:case 125112:case 125144:case 128082:case 128121:case 128184:case 128216:case 128594:case 128633:case 128696:case 128728:case 129106:case 129145:case 129208:case 129240:case 129618:case 129657:case 129720:case 129752:case 131154:case 131193:case 131256:case 131288:case 131666:case 131705:case 131768:case 131800:case 133202:case 133241:case 133304:case 133336:case 133714:case 133753:case 133816:case 133848:case 134226:case 134265:case 134328:case 134360:case 134738:case 134777:case 134840:case 134872:case 136786:case 136825:case 136888:case 136920:case 140370:case 140409:case 140472:case 140504:case 141394:case 141408:case 141431:case 141433:case 141496:case 141514:case 141528:case 141556:case 141568:Kr();break;default:Mr()}$l.endNonterminal("StepExpr",Hl)}function Or(){switch(Bl){case 82:Nl(285);break;case 121:Nl(283);break;case 184:case 216:Nl(282);break;case 96:case 119:case 202:case 244:case 256:Nl(247);break;case 78:case 124:case 152:case 165:case 167:case 242:case 243:case 253:Nl(240);break;case 73:case 74:case 93:case 111:case 112:case 135:case 136:case 206:case 212:case 213:case 229:Nl(246);break;case 6:case 70:case 72:case 75:case 77:case 79:case 80:case 81:case 83:case 84:case 85:case 86:case 88:case 89:case 90:case 91:case 94:case 97:case 98:case 101:case 102:case 103:case 104:case 105:case 106:case 108:case 109:case 110:case 113:case 118:case 120:case 122:case 123:case 125:case 126:case 128:case 129:case 131:case 132:case 133:case 134:case 137:case 141:case 145:case 146:case 148:case 150:case 151:case 153:case 154:case 155:case 159:case 160:case 161:case 162:case 163:case 164:case 166:case 170:case 171:case 172:case 174:case 176:case 178:case 180:case 181:case 182:case 185:case 186:case 191:case 192:case 194:case 198:case 199:case 200:case 201:case 203:case 218:case 219:case 220:case 221:case 222:case 224:case 225:case 226:case 227:case 228:case 234:case 235:case 236:case 237:case 240:case 248:case 249:case 250:case 251:case 252:case 254:case 257:case 260:case 261:case 262:case 263:case 266:case 267:case 270:case 274:Nl(244);break;default:Dl=Bl}if(Dl==35922||Dl==35961||Dl==36024||Dl==36056||Dl==38482||Dl==38521||Dl==38584||Dl==38616||Dl==40530||Dl==40569||Dl==40632||Dl==40664||Dl==41042||Dl==41081||Dl==41144||Dl==41176||Dl==41554||Dl==41593||Dl==41656||Dl==41688||Dl==43090||Dl==43129||Dl==43192||Dl==43224||Dl==45138||Dl==45177||Dl==45240||Dl==45272||Dl==45650||Dl==45689||Dl==45752||Dl==45784||Dl==46162||Dl==46201||Dl==46264||Dl==46296||Dl==48210||Dl==48249||Dl==48312||Dl==48344||Dl==53842||Dl==53881||Dl==53944||Dl==53976||Dl==55890||Dl==55929||Dl==55992||Dl==56024||Dl==57938||Dl==57977||Dl==58040||Dl==58072||Dl==60498||Dl==60537||Dl==60600||Dl==60632||Dl==62546||Dl==62585||Dl==62648||Dl==62680||Dl==63058||Dl==63097||Dl==63160||Dl==63192||Dl==64594||Dl==64633||Dl==64696||Dl==64728||Dl==65618||Dl==65657||Dl==65720||Dl==65752||Dl==67154||Dl==67193||Dl==67256||Dl==67288||Dl==70226||Dl==70265||Dl==70328||Dl==70360||Dl==74834||Dl==74873||Dl==74936||Dl==74968||Dl==75858||Dl==75897||Dl==75960||Dl==75992||Dl==76882||Dl==76921||Dl==76984||Dl==77016||Dl==77394||Dl==77433||Dl==77496||Dl==77528||Dl==82002||Dl==82041||Dl==82104||Dl==82136||Dl==83026||Dl==83065||Dl==83128||Dl==83160||Dl==83538||Dl==83577||Dl==83640||Dl==83672||Dl==84050||Dl==84089||Dl==84152||Dl==84184||Dl==88146||Dl==88185||Dl==88248||Dl==88280||Dl==89170||Dl==89209||Dl==89272||Dl==89304||Dl==91218||Dl==91257||Dl==91320||Dl==91352||Dl==92242||Dl==92281||Dl==92344||Dl==92376||Dl==92754||Dl==92793||Dl==92856||Dl==92888||Dl==95314||Dl==95353||Dl==95416||Dl==95448||Dl==101458||Dl==101497||Dl==101560||Dl==101592||Dl==102482||Dl==102521||Dl==102584||Dl==102616||Dl==102994||Dl==103033||Dl==103096||Dl==103128||Dl==112722||Dl==112761||Dl==112824||Dl==112856||Dl==114770||Dl==114809||Dl==114872||Dl==114904||Dl==120914||Dl==120953||Dl==121016||Dl==121048||Dl==121426||Dl==121465||Dl==121528||Dl==121560||Dl==127058||Dl==127097||Dl==127160||Dl==127192||Dl==127570||Dl==127609||Dl==127672||Dl==127704||Dl==130130||Dl==130169||Dl==130232||Dl==130264||Dl==136274||Dl==136313||Dl==136376||Dl==136408||Dl==138322||Dl==138361||Dl==138424||Dl==138456){Dl=Ol(4,Hl);if(Dl==0){var e=Pl,t=Hl,n=Bl,r=jl,i=Fl,s=Il,o=ql,u=Rl;try{Qr(),Al(4,t,-1),Dl=-3}catch(a){Dl=-2,Pl=e,Hl=t,Bl=n,Bl==0?Yl=t:(jl=r,Fl=i,Il=s,Il==0?Yl=i:(ql=o,Rl=u,Yl=u)),Al(4,t,-2)}}}switch(Dl){case-1:case 8:case 9:case 10:case 11:case 31:case 32:case 34:case 44:case 54:case 55:case 59:case 68:case 276:case 278:case 3154:case 3193:case 9912:case 9944:case 14854:case 14918:case 14920:case 14921:case 14922:case 14923:case 14925:case 14926:case 14927:case 14928:case 14929:case 14930:case 14931:case 14932:case 14933:case 14934:case 14936:case 14937:case 14938:case 14939:case 14941:case 14942:case 14944:case 14945:case 14946:case 14949:case 14950:case 14951:case 14952:case 14953:case 14954:case 14956:case 14957:case 14958:case 14959:case 14960:case 14961:case 14966:case 14967:case 14968:case 14969:case 14970:case 14971:case 14972:case 14973:case 14974:case 14976:case 14977:case 14979:case 14980:case 14981:case 14982:case 14983:case 14984:case 14985:case 14989:case 14993:case 14994:case 14996:case 14998:case 14999:case 15e3:case 15001:case 15002:case 15003:case 15007:case 15008:case 15009:case 15010:case 15011:case 15012:case 15013:case 15014:case 15015:case 15018:case 15019:case 15020:case 15022:case 15024:case 15026:case 15028:case 15029:case 15030:case 15032:case 15033:case 15034:case 15039:case 15040:case 15042:case 15046:case 15047:case 15048:case 15049:case 15050:case 15051:case 15054:case 15060:case 15061:case 15064:case 15066:case 15067:case 15068:case 15069:case 15070:case 15072:case 15073:case 15074:case 15075:case 15076:case 15077:case 15082:case 15083:case 15084:case 15085:case 15088:case 15090:case 15091:case 15092:case 15096:case 15097:case 15098:case 15099:case 15100:case 15101:case 15102:case 15104:case 15105:case 15108:case 15109:case 15110:case 15111:case 15114:case 15115:case 15118:case 15122:case 17414:case 17478:case 17480:case 17481:case 17482:case 17483:case 17485:case 17487:case 17488:case 17489:case 17491:case 17492:case 17493:case 17494:case 17496:case 17497:case 17498:case 17499:case 17501:case 17502:case 17505:case 17506:case 17509:case 17510:case 17511:case 17512:case 17513:case 17514:case 17516:case 17517:case 17518:case 17519:case 17520:case 17521:case 17526:case 17527:case 17530:case 17531:case 17533:case 17534:case 17536:case 17537:case 17539:case 17540:case 17541:case 17542:case 17543:case 17544:case 17545:case 17549:case 17553:case 17554:case 17556:case 17558:case 17559:case 17561:case 17562:case 17563:case 17567:case 17568:case 17569:case 17570:case 17571:case 17572:case 17574:case 17578:case 17579:case 17580:case 17582:case 17584:case 17586:case 17588:case 17589:case 17590:case 17592:case 17594:case 17600:case 17602:case 17606:case 17607:case 17608:case 17609:case 17610:case 17611:case 17614:case 17620:case 17621:case 17626:case 17627:case 17628:case 17629:case 17630:case 17632:case 17633:case 17636:case 17637:case 17642:case 17643:case 17644:case 17645:case 17648:case 17656:case 17657:case 17658:case 17659:case 17660:case 17662:case 17664:case 17665:case 17668:case 17669:case 17670:case 17671:case 17674:case 17675:case 17678:case 17682:case 36946:case 36985:case 37048:case 37080:case 37458:case 37497:case 37560:case 37592:case 37970:case 38009:case 38072:case 38104:case 39506:case 39545:case 39608:case 39640:case 40018:case 40057:case 42066:case 42105:case 42168:case 42200:case 42578:case 42617:case 42680:case 42712:case 43602:case 43641:case 43704:case 43736:case 44114:case 44153:case 44216:case 44248:case 46674:case 46713:case 46776:case 46808:case 47698:case 47737:case 47800:case 47832:case 49234:case 49273:case 49336:case 49368:case 49746:case 49785:case 49848:case 49880:case 50258:case 50297:case 50360:case 50392:case 51794:case 51833:case 51896:case 51928:case 52306:case 52345:case 52408:case 52440:case 52818:case 52857:case 52920:case 52952:case 53330:case 53369:case 53432:case 53464:case 54354:case 54393:case 54456:case 54488:case 55378:case 55417:case 55480:case 55512:case 56402:case 56441:case 56504:case 56536:case 56914:case 56953:case 57016:case 57048:case 57426:case 57465:case 57528:case 57560:case 61010:case 61049:case 61112:case 61144:case 61522:case 61561:case 61624:case 61656:case 62034:case 62073:case 62136:case 62168:case 63570:case 63609:case 63672:case 63704:case 64082:case 64121:case 64184:case 64216:case 66130:case 66169:case 66232:case 66264:case 67666:case 67705:case 67768:case 67800:case 68178:case 68217:case 68280:case 68312:case 68690:case 68729:case 68792:case 68824:case 69202:case 69241:case 69304:case 69336:case 69714:case 69753:case 69816:case 69848:case 72274:case 72313:case 72376:case 72408:case 74322:case 74361:case 74424:case 74456:case 77906:case 77945:case 78008:case 78040:case 78418:case 78457:case 78520:case 78552:case 78930:case 78969:case 79032:case 79064:case 79442:case 79481:case 79544:case 79576:case 81490:case 81529:case 81592:case 81624:case 82514:case 82553:case 82616:case 82648:case 84562:case 84601:case 84664:case 84696:case 85074:case 85113:case 85176:case 85208:case 85586:case 85625:case 87122:case 87161:case 87224:case 87256:case 87634:case 87673:case 87736:case 87768:case 90194:case 90233:case 90296:case 90328:case 93266:case 93305:case 93368:case 93400:case 94290:case 94329:case 94392:case 94424:case 94802:case 94841:case 94904:case 94936:case 97874:case 97913:case 97976:case 98008:case 98386:case 98425:case 98488:case 98520:case 99410:case 99449:case 99512:case 99544:case 101970:case 102009:case 102072:case 102104:case 103506:case 103545:case 103608:case 103640:case 104018:case 104057:case 104120:case 104152:case 105554:case 105593:case 105656:case 105688:case 108626:case 108665:case 108728:case 108760:case 109138:case 109177:case 109240:case 109272:case 110674:case 110713:case 110776:case 110808:case 111698:case 111737:case 111800:case 111832:case 112210:case 112249:case 112312:case 112344:case 113234:case 113273:case 113336:case 113368:case 113746:case 113785:case 113848:case 113880:case 115282:case 115321:case 115384:case 115416:case 115794:case 115833:case 115896:case 115928:case 116306:case 116345:case 116408:case 116440:case 116818:case 116857:case 116920:case 116952:case 117330:case 117369:case 117432:case 117464:case 119890:case 119929:case 119992:case 120024:case 120402:case 120441:case 120504:case 120536:case 122962:case 123001:case 123064:case 123096:case 123986:case 124025:case 124498:case 124537:case 124600:case 124632:case 125010:case 125049:case 125112:case 125144:case 128082:case 128121:case 128184:case 128216:case 128594:case 128633:case 128696:case 128728:case 129106:case 129145:case 129208:case 129240:case 129618:case 129657:case 129720:case 129752:case 131154:case 131193:case 131256:case 131288:case 131666:case 131705:case 131768:case 131800:case 133202:case 133241:case 133304:case 133336:case 133714:case 133753:case 133816:case 133848:case 134226:case 134265:case 134328:case 134360:case 134738:case 134777:case 134840:case 134872:case 136786:case 136825:case 136888:case 136920:case 140370:case 140409:case 140472:case 140504:case 141394:case 141408:case 141431:case 141433:case 141496:case 141514:case 141528:case 141556:case 141568:Qr();break;case-3:break;default:_r()}}function Mr(){$l.startNonterminal("AxisStep",Hl);switch(Bl){case 73:case 74:case 206:case 212:case 213:Nl(242);break;default:Dl=Bl}switch(Dl){case 45:case 26185:case 26186:case 26318:case 26324:case 26325:Ir();break;default:Dr()}Tl(238),Sl(),Zr(),$l.endNonterminal("AxisStep",Hl)}function _r(){switch(Bl){case 73:case 74:case 206:case 212:case 213:Nl(242);break;default:Dl=Bl}switch(Dl){case 45:case 26185:case 26186:case 26318:case 26324:case 26325:qr();break;default:Pr()}Tl(238),ei()}function Dr(){$l.startNonterminal("ForwardStep",Hl);switch(Bl){case 82:Nl(245);break;case 93:case 111:case 112:case 135:case 136:case 229:Nl(242);break;default:Dl=Bl}switch(Dl){case 26194:case 26205:case 26223:case 26224:case 26247:case 26248:case 26341:Hr(),Tl(257),Sl(),Xr();break;default:jr()}$l.endNonterminal("ForwardStep",Hl)}function Pr(){switch(Bl){case 82:Nl(245);break;case 93:case 111:case 112:case 135:case 136:case 229:Nl(242);break;default:Dl=Bl}switch(Dl){case 26194:case 26205:case 26223:case 26224:case 26247:case 26248:case 26341:Br(),Tl(257),Vr();break;default:Fr()}}function Hr(){$l.startNonterminal("ForwardAxis",Hl);switch(Bl){case 93:bl(93),Tl(26),bl(51);break;case 111:bl(111),Tl(26),bl(51);break;case 82:bl(82),Tl(26),bl(51);break;case 229:bl(229),Tl(26),bl(51);break;case 112:bl(112),Tl(26),bl(51);break;case 136:bl(136),Tl(26),bl(51);break;default:bl(135),Tl(26),bl(51)}$l.endNonterminal("ForwardAxis",Hl)}function Br(){switch(Bl){case 93:wl(93),Tl(26),wl(51);break;case 111:wl(111),Tl(26),wl(51);break;case 82:wl(82),Tl(26),wl(51);break;case 229:wl(229),Tl(26),wl(51);break;case 112:wl(112),Tl(26),wl(51);break;case 136:wl(136),Tl(26),wl(51);break;default:wl(135),Tl(26),wl(51)}}function jr(){$l.startNonterminal("AbbrevForwardStep",Hl),Bl==66&&bl(66),Tl(257),Sl(),Xr(),$l.endNonterminal("AbbrevForwardStep",Hl)}function Fr(){Bl==66&&wl(66),Tl(257),Vr()}function Ir(){$l.startNonterminal("ReverseStep",Hl);switch(Bl){case 45:zr();break;default:Rr(),Tl(257),Sl(),Xr()}$l.endNonterminal("ReverseStep",Hl)}function qr(){switch(Bl){case 45:Wr();break;default:Ur(),Tl(257),Vr()}}function Rr(){$l.startNonterminal("ReverseAxis",Hl);switch(Bl){case 206:bl(206),Tl(26),bl(51);break;case 73:bl(73),Tl(26),bl(51);break;case 213:bl(213),Tl(26),bl(51);break;case 212:bl(212),Tl(26),bl(51);break;default:bl(74),Tl(26),bl(51)}$l.endNonterminal("ReverseAxis",Hl)}function Ur(){switch(Bl){case 206:wl(206),Tl(26),wl(51);break;case 73:wl(73),Tl(26),wl(51);break;case 213:wl(213),Tl(26),wl(51);break;case 212:wl(212),Tl(26),wl(51);break;default:wl(74),Tl(26),wl(51)}}function zr(){$l.startNonterminal("AbbrevReverseStep",Hl),bl(45),$l.endNonterminal("AbbrevReverseStep",Hl)}function Wr(){wl(45)}function Xr(){$l.startNonterminal("NodeTest",Hl);switch(Bl){case 82:case 96:case 120:case 121:case 185:case 191:case 216:case 226:case 227:case 244:Nl(241);break;default:Dl=Bl}switch(Dl){case 17490:case 17504:case 17528:case 17529:case 17593:case 17599:case 17624:case 17634:case 17635:case 17652:Ms();break;default:$r()}$l.endNonterminal("NodeTest",Hl)}function Vr(){switch(Bl){case 82:case 96:case 120:case 121:case 185:case 191:case 216:case 226:case 227:case 244:Nl(241);break;default:Dl=Bl}switch(Dl){case 17490:case 17504:case 17528:case 17529:case 17593:case 17599:case 17624:case 17634:case 17635:case 17652:_s();break;default:Jr()}}function $r(){$l.startNonterminal("NameTest",Hl);switch(Bl){case 5:bl(5);break;default:_a()}$l.endNonterminal("NameTest",Hl)}function Jr(){switch(Bl){case 5:wl(5);break;default:Da()}}function Kr(){$l.startNonterminal("PostfixExpr",Hl),rl();for(;;){Tl(241);if(Bl!=34&&Bl!=68)break;switch(Bl){case 68:Sl(),ti();break;default:Sl(),Gr()}}$l.endNonterminal("PostfixExpr",Hl)}function Qr(){il();for(;;){Tl(241);if(Bl!=34&&Bl!=68)break;switch(Bl){case 68:ni();break;default:Yr()}}}function Gr(){$l.startNonterminal("ArgumentList",Hl),bl(34),Tl(276);if(Bl!=37){Sl(),Ei();for(;;){Tl(101);if(Bl!=41)break;bl(41),Tl(271),Sl(),Ei()}}bl(37),$l.endNonterminal("ArgumentList",Hl)}function Yr(){wl(34),Tl(276);if(Bl!=37){Si();for(;;){Tl(101);if(Bl!=41)break;wl(41),Tl(271),Si()}}wl(37)}function Zr(){$l.startNonterminal("PredicateList",Hl);for(;;){Tl(238);if(Bl!=68)break;Sl(),ti()}$l.endNonterminal("PredicateList",Hl)}function ei(){for(;;){Tl(238);if(Bl!=68)break;ni()}}function ti(){$l.startNonterminal("Predicate",Hl),bl(68),Tl(267),Sl(),Q(),bl(69),$l.endNonterminal("Predicate",Hl)}function ni(){wl(68),Tl(267),G(),wl(69)}function ri(){$l.startNonterminal("Literal",Hl);switch(Bl){case 11:bl(11);break;default:si()}$l.endNonterminal("Literal",Hl)}function ii(){switch(Bl){case 11:wl(11);break;default:oi()}}function si(){$l.startNonterminal("NumericLiteral",Hl);switch(Bl){case 8:bl(8);break;case 9:bl(9);break;default:bl(10)}$l.endNonterminal("NumericLiteral",Hl)}function oi(){switch(Bl){case 8:wl(8);break;case 9:wl(9);break;default:wl(10)}}function ui(){$l.startNonterminal("VarRef",Hl),bl(31),Tl(255),Sl(),fi(),$l.endNonterminal("VarRef",Hl)}function ai(){wl(31),Tl(255),li()}function fi(){$l.startNonterminal("VarName",Hl),_a(),$l.endNonterminal("VarName",Hl)}function li(){Da()}function ci(){$l.startNonterminal("ParenthesizedExpr",Hl),bl(34),Tl(269),Bl!=37&&(Sl(),Q()),bl(37),$l.endNonterminal("ParenthesizedExpr",Hl)}function hi(){wl(34),Tl(269),Bl!=37&&G(),wl(37)}function pi(){$l.startNonterminal("ContextItemExpr",Hl),bl(44),$l.endNonterminal("ContextItemExpr",Hl)}function di(){wl(44)}function vi(){$l.startNonterminal("OrderedExpr",Hl),bl(202),Tl(87),bl(276),Tl(267),Sl(),Q(),bl(282),$l.endNonterminal("OrderedExpr",Hl)}function mi(){wl(202),Tl(87),wl(276),Tl(267),G(),wl(282)}function gi(){$l.startNonterminal("UnorderedExpr",Hl),bl(256),Tl(87),bl(276),Tl(267),Sl(),Q(),bl(282),$l.endNonterminal("UnorderedExpr",Hl)}function yi(){wl(256),Tl(87),wl(276),Tl(267),G(),wl(282)}function bi(){$l.startNonterminal("FunctionCall",Hl),Pa(),Tl(22),Sl(),Gr(),$l.endNonterminal("FunctionCall",Hl)}function wi(){Ha(),Tl(22),Yr()}function Ei(){$l.startNonterminal("Argument",Hl);switch(Bl){case 64:xi();break;default:Af()}$l.endNonterminal("Argument",Hl)}function Si(){switch(Bl){case 64:Ti();break;default:Of()}}function xi(){$l.startNonterminal("ArgumentPlaceholder",Hl),bl(64),$l.endNonterminal("ArgumentPlaceholder",Hl)}function Ti(){wl(64)}function Ni(){$l.startNonterminal("Constructor",Hl);switch(Bl){case 54:case 55:case 59:ki();break;default:Xi()}$l.endNonterminal("Constructor",Hl)}function Ci(){switch(Bl){case 54:case 55:case 59:Li();break;default:Vi()}}function ki(){$l.startNonterminal("DirectConstructor",Hl);switch(Bl){case 54:Ai();break;case 55:Ri();break;default:zi()}$l.endNonterminal("DirectConstructor",Hl)}function Li(){switch(Bl){case 54:Oi();break;case 55:Ui();break;default:Wi()}}function Ai(){$l.startNonterminal("DirElemConstructor",Hl),bl(54),Cl(4),bl(20),Mi();switch(Bl){case 48:bl(48);break;default:bl(61);for(;;){Cl(174);if(Bl==56)break;Ii()}bl(56),Cl(4),bl(20),Cl(12),Bl==21&&bl(21),Cl(8),bl(61)}$l.endNonterminal("DirElemConstructor",Hl)}function Oi(){wl(54),Cl(4),wl(20),_i();switch(Bl){case 48:wl(48);break;default:wl(61);for(;;){Cl(174);if(Bl==56)break;qi()}wl(56),Cl(4),wl(20),Cl(12),Bl==21&&wl(21),Cl(8),wl(61)}}function Mi(){$l.startNonterminal("DirAttributeList",Hl);for(;;){Cl(19);if(Bl!=21)break;bl(21),Cl(91),Bl==20&&(bl(20),Cl(11),Bl==21&&bl(21),Cl(7),bl(60),Cl(18),Bl==21&&bl(21),Di())}$l.endNonterminal("DirAttributeList",Hl)}function _i(){for(;;){Cl(19);if(Bl!=21)break;wl(21),Cl(91),Bl==20&&(wl(20),Cl(11),Bl==21&&wl(21),Cl(7),wl(60),Cl(18),Bl==21&&wl(21),Pi())}}function Di(){$l.startNonterminal("DirAttributeValue",Hl),Cl(14);switch(Bl){case 28:bl(28);for(;;){Cl(167);if(Bl==28)break;switch(Bl){case 13:bl(13);break;default:Hi()}}bl(28);break;default:bl(33);for(;;){Cl(168);if(Bl==33)break;switch(Bl){case 14:bl(14);break;default:ji()}}bl(33)}$l.endNonterminal("DirAttributeValue",Hl)}function Pi(){Cl(14);switch(Bl){case 28:wl(28);for(;;){Cl(167);if(Bl==28)break;switch(Bl){case 13:wl(13);break;default:Bi()}}wl(28);break;default:wl(33);for(;;){Cl(168);if(Bl==33)break;switch(Bl){case 14:wl(14);break;default:Fi()}}wl(33)}}function Hi(){$l.startNonterminal("QuotAttrValueContent",Hl);switch(Bl){case 16:bl(16);break;default:zf()}$l.endNonterminal("QuotAttrValueContent",Hl)}function Bi(){switch(Bl){case 16:wl(16);break;default:Wf()}}function ji(){$l.startNonterminal("AposAttrValueContent",Hl);switch(Bl){case 17:bl(17);break;default:zf()}$l.endNonterminal("AposAttrValueContent",Hl)}function Fi(){switch(Bl){case 17:wl(17);break;default:Wf()}}function Ii(){$l.startNonterminal("DirElemContent",Hl);switch(Bl){case 54:case 55:case 59:ki();break;case 4:bl(4);break;case 15:bl(15);break;default:zf()}$l.endNonterminal("DirElemContent",Hl)}function qi(){switch(Bl){case 54:case 55:case 59:Li();break;case 4:wl(4);break;case 15:wl(15);break;default:Wf()}}function Ri(){$l.startNonterminal("DirCommentConstructor",Hl),bl(55),Cl(1),bl(2),Cl(6),bl(43),$l.endNonterminal("DirCommentConstructor",Hl)}function Ui(){wl(55),Cl(1),wl(2),Cl(6),wl(43)}function zi(){$l.startNonterminal("DirPIConstructor",Hl),bl(59),Cl(3),bl(18),Cl(13),Bl==21&&(bl(21),Cl(2),bl(3)),Cl(9),bl(65),$l.endNonterminal("DirPIConstructor",Hl)}function Wi(){wl(59),Cl(3),wl(18),Cl(13),Bl==21&&(wl(21),Cl(2),wl(3)),Cl(9),wl(65)}function Xi(){$l.startNonterminal("ComputedConstructor",Hl);switch(Bl){case 119:$f();break;case 121:$i();break;case 82:Kf();break;case 184:Ki();break;case 244:tl();break;case 96:Zf();break;default:Gf()}$l.endNonterminal("ComputedConstructor",Hl)}function Vi(){switch(Bl){case 119:Jf();break;case 121:Ji();break;case 82:Qf();break;case 184:Qi();break;case 244:nl();break;case 96:el();break;default:Yf()}}function $i(){$l.startNonterminal("CompElemConstructor",Hl),bl(121),Tl(258);switch(Bl){case 276:bl(276),Tl(267),Sl(),Q(),bl(282);break;default:Sl(),_a()}Tl(87),bl(276),Tl(277),Bl!=282&&(Sl(),Xf()),bl(282),$l.endNonterminal("CompElemConstructor",Hl)}function Ji(){wl(121),Tl(258);switch(Bl){case 276:wl(276),Tl(267),G(),wl(282);break;default:Da()}Tl(87),wl(276),Tl(277),Bl!=282&&Vf(),wl(282)}function Ki(){$l.startNonterminal("CompNamespaceConstructor",Hl),bl(184),Tl(251);switch(Bl){case 276:bl(276),Tl(267),Sl(),Zi(),bl(282);break;default:Sl(),Gi()}Tl(87),bl(276),Tl(267),Sl(),ts(),bl(282),$l.endNonterminal("CompNamespaceConstructor",Hl)}function Qi(){wl(184),Tl(251);switch(Bl){case 276:wl(276),Tl(267),es(),wl(282);break;default:Yi()}Tl(87),wl(276),Tl(267),ns(),wl(282)}function Gi(){$l.startNonterminal("Prefix",Hl),Ba(),$l.endNonterminal("Prefix",Hl)}function Yi(){ja()}function Zi(){$l.startNonterminal("PrefixExpr",Hl),Q(),$l.endNonterminal("PrefixExpr",Hl)}function es(){G()}function ts(){$l.startNonterminal("URIExpr",Hl),Q(),$l.endNonterminal("URIExpr",Hl)}function ns(){G()}function rs(){$l.startNonterminal("FunctionItemExpr",Hl);switch(Bl){case 145:Nl(92);break;default:Dl=Bl}switch(Dl){case 32:case 17553:us();break;default:ss()}$l.endNonterminal("FunctionItemExpr",Hl)}function is(){switch(Bl){case 145:Nl(92);break;default:Dl=Bl}switch(Dl){case 32:case 17553:as();break;default:os()}}function ss(){$l.startNonterminal("NamedFunctionRef",Hl),_a(),Tl(20),bl(29),Tl(16),bl(8),$l.endNonterminal("NamedFunctionRef",Hl)}function os(){Da(),Tl(20),wl(29),Tl(16),wl(8)}function us(){$l.startNonterminal("InlineFunctionExpr",Hl);for(;;){Tl(97);if(Bl!=32)break;Sl(),H()}bl(145),Tl(22),bl(34),Tl(94),Bl==31&&(Sl(),R()),bl(37),Tl(111),Bl==79&&(bl(79),Tl(260),Sl(),ps()),Tl(87),Sl(),X(),$l.endNonterminal("InlineFunctionExpr",Hl)}function as(){for(;;){Tl(97);if(Bl!=32)break;B()}wl(145),Tl(22),wl(34),Tl(94),Bl==31&&U(),wl(37),Tl(111),Bl==79&&(wl(79),Tl(260),ds()),Tl(87),V()}function fs(){$l.startNonterminal("SingleType",Hl),co(),Tl(227),Bl==64&&bl(64),$l.endNonterminal("SingleType",Hl)}function ls(){ho(),Tl(227),Bl==64&&wl(64)}function cs(){$l.startNonterminal("TypeDeclaration",Hl),bl(79),Tl(260),Sl(),ps(),$l.endNonterminal("TypeDeclaration",Hl)}function hs(){wl(79),Tl(260),ds()}function ps(){$l.startNonterminal("SequenceType",Hl);switch(Bl){case 124:Nl(243);break;default:Dl=Bl}switch(Dl){case 17532:bl(124),Tl(22),bl(34),Tl(23),bl(37);break;default:gs(),Tl(239);switch(Bl){case 39:case 40:case 64:Sl(),vs();break;default:}}$l.endNonterminal("SequenceType",Hl)}function ds(){switch(Bl){case 124:Nl(243);break;default:Dl=Bl}switch(Dl){case 17532:wl(124),Tl(22),wl(34),Tl(23),wl(37);break;default:ys(),Tl(239);switch(Bl){case 39:case 40:case 64:ms();break;default:}}}function vs(){$l.startNonterminal("OccurrenceIndicator",Hl);switch(Bl){case 64:bl(64);break;case 39:bl(39);break;default:bl(40)}$l.endNonterminal("OccurrenceIndicator",Hl)}function ms(){switch(Bl){case 64:wl(64);break;case 39:wl(39);break;default:wl(40)}}function gs(){$l.startNonterminal("ItemType",Hl);switch(Bl){case 78:case 82:case 96:case 120:case 121:case 145:case 165:case 167:case 185:case 191:case 194:case 216:case 226:case 227:case 242:case 244:Nl(243);break;default:Dl=Bl}switch(Dl){case 17490:case 17504:case 17528:case 17529:case 17593:case 17599:case 17624:case 17634:case 17635:case 17652:Ms();break;case 17573:bl(165),Tl(22),bl(34),Tl(23),bl(37);break;case 32:case 17553:mo();break;case 34:So();break;case 17486:case 17575:case 17602:bs();break;case 17650:Es();break;default:As()}$l.endNonterminal("ItemType",Hl)}function ys(){switch(Bl){case 78:case 82:case 96:case 120:case 121:case 145:case 165:case 167:case 185:case 191:case 194:case 216:case 226:case 227:case 242:case 244:Nl(243);break;default:Dl=Bl}switch(Dl){case 17490:case 17504:case 17528:case 17529:case 17593:case 17599:case 17624:case 17634:case 17635:case 17652:_s();break;case 17573:wl(165),Tl(22),wl(34),Tl(23),wl(37);break;case 32:case 17553:go();break;case 34:xo();break;case 17486:case 17575:case 17602:ws();break;case 17650:Ss();break;default:Os()}}function bs(){$l.startNonterminal("JSONTest",Hl);switch(Bl){case 167:xs();break;case 194:Ns();break;default:ks()}$l.endNonterminal("JSONTest",Hl)}function ws(){switch(Bl){case 167:Ts();break;case 194:Cs();break;default:Ls()}}function Es(){$l.startNonterminal("StructuredItemTest",Hl),bl(242),Tl(22),bl(34),Tl(23),bl(37),$l.endNonterminal("StructuredItemTest",Hl)}function Ss(){wl(242),Tl(22),wl(34),Tl(23),wl(37)}function xs(){$l.startNonterminal("JSONItemTest",Hl),bl(167),Tl(22),bl(34),Tl(23),bl(37),$l.endNonterminal("JSONItemTest",Hl)}function Ts(){wl(167),Tl(22),wl(34),Tl(23),wl(37)}function Ns(){$l.startNonterminal("JSONObjectTest",Hl),bl(194),Tl(22),bl(34),Tl(23),bl(37),$l.endNonterminal("JSONObjectTest",Hl)}function Cs(){wl(194),Tl(22),wl(34),Tl(23),wl(37)}function ks(){$l.startNonterminal("JSONArrayTest",Hl),bl(78),Tl(22),bl(34),Tl(23),bl(37),$l.endNonterminal("JSONArrayTest",Hl)}function Ls(){wl(78),Tl(22),wl(34),Tl(23),wl(37)}function As(){$l.startNonterminal("AtomicOrUnionType",Hl),_a(),$l.endNonterminal("AtomicOrUnionType",Hl)}function Os(){Da()}function Ms(){$l.startNonterminal("KindTest",Hl);switch(Bl){case 120:Hs();break;case 121:Zs();break;case 82:Xs();break;case 227:ro();break;case 226:Ks();break;case 216:zs();break;case 96:Is();break;case 244:js();break;case 185:Rs();break;default:Ds()}$l.endNonterminal("KindTest",Hl)}function _s(){switch(Bl){case 120:Bs();break;case 121:eo();break;case 82:Vs();break;case 227:io();break;case 226:Qs();break;case 216:Ws();break;case 96:qs();break;case 244:Fs();break;case 185:Us();break;default:Ps()}}function Ds(){$l.startNonterminal("AnyKindTest",Hl),bl(191),Tl(22),bl(34),Tl(23),bl(37),$l.endNonterminal("AnyKindTest",Hl)}function Ps(){wl(191),Tl(22),wl(34),Tl(23),wl(37)}function Hs(){$l.startNonterminal("DocumentTest",Hl),bl(120),Tl(22),bl(34),Tl(144);if(Bl!=37)switch(Bl){case 121:Sl(),Zs();break;default:Sl(),ro()}Tl(23),bl(37),$l.endNonterminal("DocumentTest",Hl)}function Bs(){wl(120),Tl(22),wl(34),Tl(144);if(Bl!=37)switch(Bl){case 121:eo();break;default:io()}Tl(23),wl(37)}function js(){$l.startNonterminal("TextTest",Hl),bl(244),Tl(22),bl(34),Tl(23),bl(37),$l.endNonterminal("TextTest",Hl)}function Fs(){wl(244),Tl(22),wl(34),Tl(23),wl(37)}function Is(){$l.startNonterminal("CommentTest",Hl),bl(96),Tl(22),bl(34),Tl(23),bl(37),$l.endNonterminal("CommentTest",Hl)}function qs(){wl(96),Tl(22),wl(34),Tl(23),wl(37)}function Rs(){$l.startNonterminal("NamespaceNodeTest",Hl),bl(185),Tl(22),bl(34),Tl(23),bl(37),$l.endNonterminal("NamespaceNodeTest",Hl)}function Us(){wl(185),Tl(22),wl(34),Tl(23),wl(37)}function zs(){$l.startNonterminal("PITest",Hl),bl(216),Tl(22),bl(34),Tl(253);if(Bl!=37)switch(Bl){case 11:bl(11);break;default:Sl(),Ba()}Tl(23),bl(37),$l.endNonterminal("PITest",Hl)}function Ws(){wl(216),Tl(22),wl(34),Tl(253);if(Bl!=37)switch(Bl){case 11:wl(11);break;default:ja()}Tl(23),wl(37)}function Xs(){$l.startNonterminal("AttributeTest",Hl),bl(82),Tl(22),bl(34),Tl(261),Bl!=37&&(Sl(),$s(),Tl(101),Bl==41&&(bl(41),Tl(255),Sl(),po())),Tl(23),bl(37),$l.endNonterminal("AttributeTest",Hl)}function Vs(){wl(82),Tl(22),wl(34),Tl(261),Bl!=37&&(Js(),Tl(101),Bl==41&&(wl(41),Tl(255),vo())),Tl(23),wl(37)}function $s(){$l.startNonterminal("AttribNameOrWildcard",Hl);switch(Bl){case 38:bl(38);break;default:uo()}$l.endNonterminal("AttribNameOrWildcard",Hl)}function Js(){switch(Bl){case 38:wl(38);break;default:ao()}}function Ks(){$l.startNonterminal("SchemaAttributeTest",Hl),bl(226),Tl(22),bl(34),Tl(255),Sl(),Gs(),Tl(23),bl(37),$l.endNonterminal("SchemaAttributeTest",Hl)}function Qs(){wl(226),Tl(22),wl(34),Tl(255),Ys(),Tl(23),wl(37)}function Gs(){$l.startNonterminal("AttributeDeclaration",Hl),uo(),$l.endNonterminal("AttributeDeclaration",Hl)}function Ys(){ao()}function Zs(){$l.startNonterminal("ElementTest",Hl),bl(121),Tl(22),bl(34),Tl(261),Bl!=37&&(Sl(),to(),Tl(101),Bl==41&&(bl(41),Tl(255),Sl(),po(),Tl(102),Bl==64&&bl(64))),Tl(23),bl(37),$l.endNonterminal("ElementTest",Hl)}function eo(){wl(121),Tl(22),wl(34),Tl(261),Bl!=37&&(no(),Tl(101),Bl==41&&(wl(41),Tl(255),vo(),Tl(102),Bl==64&&wl(64))),Tl(23),wl(37)}function to(){$l.startNonterminal("ElementNameOrWildcard",Hl);switch(Bl){case 38:bl(38);break;default:fo()}$l.endNonterminal("ElementNameOrWildcard",Hl)}function no(){switch(Bl){case 38:wl(38);break;default:lo()}}function ro(){$l.startNonterminal("SchemaElementTest",Hl),bl(227),Tl(22),bl(34),Tl(255),Sl(),so(),Tl(23),bl(37),$l.endNonterminal("SchemaElementTest",Hl)}function io(){wl(227),Tl(22),wl(34),Tl(255),oo(),Tl(23),wl(37)}function so(){$l.startNonterminal("ElementDeclaration",Hl),fo(),$l.endNonterminal("ElementDeclaration",Hl)}function oo(){lo()}function uo(){$l.startNonterminal("AttributeName",Hl),_a(),$l.endNonterminal("AttributeName",Hl)}function ao(){Da()}function fo(){$l.startNonterminal("ElementName",Hl),_a(),$l.endNonterminal("ElementName",Hl)}function lo(){Da()}function co(){$l.startNonterminal("SimpleTypeName",Hl),po(),$l.endNonterminal("SimpleTypeName",Hl)}function ho(){vo()}function po(){$l.startNonterminal("TypeName",Hl),_a(),$l.endNonterminal("TypeName",Hl)}function vo(){Da()}function mo(){$l.startNonterminal("FunctionTest",Hl);for(;;){Tl(97);if(Bl!=32)break;Sl(),H()}switch(Bl){case 145:Nl(22);break;default:Dl=Bl}Dl=Ol(5,Hl);if(Dl==0){var e=Pl,t=Hl,n=Bl,r=jl,i=Fl,s=Il,o=ql,u=Rl;try{bo(),Dl=-1}catch(a){Dl=-2}Pl=e,Hl=t,Bl=n,Bl==0?Yl=t:(jl=r,Fl=i,Il=s,Il==0?Yl=i:(ql=o,Rl=u,Yl=u)),Al(5,Hl,Dl)}switch(Dl){case-1:Sl(),yo();break;default:Sl(),wo()}$l.endNonterminal("FunctionTest",Hl)}function go(){for(;;){Tl(97);if(Bl!=32)break;B()}switch(Bl){case 145:Nl(22);break;default:Dl=Bl}Dl=Ol(5,Hl);if(Dl==0){var e=Pl,t=Hl,n=Bl,r=jl,i=Fl,s=Il,o=ql,u=Rl;try{bo(),Al(5,t,-1),Dl=-3}catch(a){Dl=-2,Pl=e,Hl=t,Bl=n,Bl==0?Yl=t:(jl=r,Fl=i,Il=s,Il==0?Yl=i:(ql=o,Rl=u,Yl=u)),Al(5,t,-2)}}switch(Dl){case-1:bo();break;case-3:break;default:Eo()}}function yo(){$l.startNonterminal("AnyFunctionTest",Hl),bl(145),Tl(22),bl(34),Tl(24),bl(38),Tl(23),bl(37),$l.endNonterminal("AnyFunctionTest",Hl)}function bo(){wl(145),Tl(22),wl(34),Tl(24),wl(38),Tl(23),wl(37)}function wo(){$l.startNonterminal("TypedFunctionTest",Hl),bl(145),Tl(22),bl(34),Tl(263);if(Bl!=37){Sl(),ps();for(;;){Tl(101);if(Bl!=41)break;bl(41),Tl(260),Sl(),ps()}}bl(37),Tl(30),bl(79),Tl(260),Sl(),ps(),$l.endNonterminal("TypedFunctionTest",Hl)}function Eo(){wl(145),Tl(22),wl(34),Tl(263);if(Bl!=37){ds();for(;;){Tl(101);if(Bl!=41)break;wl(41),Tl(260),ds()}}wl(37),Tl(30),wl(79),Tl(260),ds()}function So(){$l.startNonterminal("ParenthesizedItemType",Hl),bl(34),Tl(260),Sl(),gs(),Tl(23),bl(37),$l.endNonterminal("ParenthesizedItemType",Hl)}function xo(){wl(34),Tl(260),ys(),Tl(23),wl(37)}function To(){$l.startNonterminal("RevalidationDecl",Hl),bl(108),Tl(72),bl(222),Tl(152);switch(Bl){case 240:bl(240);break;case 171:bl(171);break;default:bl(233)}$l.endNonterminal("RevalidationDecl",Hl)}function No(){$l.startNonterminal("InsertExprTargetChoice",Hl);switch(Bl){case 70:bl(70);break;case 84:bl(84);break;default:if(Bl==79){bl(79),Tl(119);switch(Bl){case 134:bl(134);break;default:bl(170)}}Tl(54),bl(163)}$l.endNonterminal("InsertExprTargetChoice",Hl)}function Co(){switch(Bl){case 70:wl(70);break;case 84:wl(84);break;default:if(Bl==79){wl(79),Tl(119);switch(Bl){case 134:wl(134);break;default:wl(170)}}Tl(54),wl(163)}}function ko(){$l.startNonterminal("InsertExpr",Hl),bl(159),Tl(129);switch(Bl){case 191:bl(191);break;default:bl(192)}Tl(267),Sl(),Ho(),Sl(),No(),Tl(267),Sl(),jo(),$l.endNonterminal("InsertExpr",Hl)}function Lo(){wl(159),Tl(129);switch(Bl){case 191:wl(191);break;default:wl(192)}Tl(267),Bo(),Co(),Tl(267),Fo()}function Ao(){$l.startNonterminal("DeleteExpr",Hl),bl(110),Tl(129);switch(Bl){case 191:bl(191);break;default:bl(192)}Tl(267),Sl(),jo(),$l.endNonterminal("DeleteExpr",Hl)}function Oo(){wl(110),Tl(129);switch(Bl){case 191:wl(191);break;default:wl(192)}Tl(267),Fo()}function Mo(){$l.startNonterminal("ReplaceExpr",Hl),bl(219),Tl(130),Bl==261&&(bl(261),Tl(64),bl(196)),Tl(62),bl(191),Tl(267),Sl(),jo(),bl(270),Tl(267),Sl(),Af(),$l.endNonterminal("ReplaceExpr",Hl)}function _o(){wl(219),Tl(130),Bl==261&&(wl(261),Tl(64),wl(196)),Tl(62),wl(191),Tl(267),Fo(),wl(270),Tl(267),Of()}function Do(){$l.startNonterminal("RenameExpr",Hl),bl(218),Tl(62),bl(191),Tl(267),Sl(),jo(),bl(79),Tl(267),Sl(),Io(),$l.endNonterminal("RenameExpr",Hl)}function Po(){wl(218),Tl(62),wl(191),Tl(267),Fo(),wl(79),Tl(267),qo()}function Ho(){$l.startNonterminal("SourceExpr",Hl),Af(),$l.endNonterminal("SourceExpr",Hl)}function Bo(){Of()}function jo(){$l.startNonterminal("TargetExpr",Hl),Af(),$l.endNonterminal("TargetExpr",Hl)}function Fo(){Of()}function Io(){$l.startNonterminal("NewNameExpr",Hl),Af(),$l.endNonterminal("NewNameExpr",Hl)}function qo(){Of()}function Ro(){$l.startNonterminal("TransformExpr",Hl),bl(103),Tl(21),Sl(),zo();for(;;){if(Bl!=41)break;bl(41),Tl(21),Sl(),zo()}bl(181),Tl(267),Sl(),Af(),bl(220),Tl(267),Sl(),Af(),$l.endNonterminal("TransformExpr",Hl)}function Uo(){wl(103),Tl(21),Wo();for(;;){if(Bl!=41)break;wl(41),Tl(21),Wo()}wl(181),Tl(267),Of(),wl(220),Tl(267),Of()}function zo(){$l.startNonterminal("TransformSpec",Hl),bl(31),Tl(255),Sl(),fi(),Tl(27),bl(52),Tl(267),Sl(),Af(),$l.endNonterminal("TransformSpec",Hl)}function Wo(){wl(31),Tl(255),li(),Tl(27),wl(52),Tl(267),Of()}function Xo(){$l.startNonterminal("FTSelection",Hl),Ko();for(;;){Tl(212);switch(Bl){case 81:Nl(151);break;default:Dl=Bl}if(Dl!=115&&Dl!=117&&Dl!=127&&Dl!=202&&Dl!=223&&Dl!=269&&Dl!=64593&&Dl!=121425)break;Sl(),bu()}$l.endNonterminal("FTSelection",Hl)}function Vo(){Qo();for(;;){Tl(212);switch(Bl){case 81:Nl(151);break;default:Dl=Bl}if(Dl!=115&&Dl!=117&&Dl!=127&&Dl!=202&&Dl!=223&&Dl!=269&&Dl!=64593&&Dl!=121425)break;wu()}}function $o(){$l.startNonterminal("FTWeight",Hl),bl(264),Tl(87),bl(276),Tl(267),Sl(),Q(),bl(282),$l.endNonterminal("FTWeight",Hl)}function Jo(){wl(264),Tl(87),wl(276),Tl(267),G(),wl(282)}function Ko(){$l.startNonterminal("FTOr",Hl),Go();for(;;){if(Bl!=144)break;bl(144),Tl(162),Sl(),Go()}$l.endNonterminal("FTOr",Hl)}function Qo(){Yo();for(;;){if(Bl!=144)break;wl(144),Tl(162),Yo()}}function Go(){$l.startNonterminal("FTAnd",Hl),Zo();for(;;){if(Bl!=142)break;bl(142),Tl(162),Sl(),Zo()}$l.endNonterminal("FTAnd",Hl)}function Yo(){eu();for(;;){if(Bl!=142)break;wl(142),Tl(162),eu()}}function Zo(){$l.startNonterminal("FTMildNot",Hl),tu();for(;;){Tl(213);if(Bl!=193)break;bl(193),Tl(53),bl(154),Tl(162),Sl(),tu()}$l.endNonterminal("FTMildNot",Hl)}function eu(){nu();for(;;){Tl(213);if(Bl!=193)break;wl(193),Tl(53),wl(154),Tl(162),nu()}}function tu(){$l.startNonterminal("FTUnaryNot",Hl),Bl==143&&bl(143),Tl(155),Sl(),ru(),$l.endNonterminal("FTUnaryNot",Hl)}function nu(){Bl==143&&wl(143),Tl(155),iu()}function ru(){$l.startNonterminal("FTPrimaryWithOptions",Hl),su(),Tl(215),Bl==259&&(Sl(),Hu()),Bl==264&&(Sl(),$o()),$l.endNonterminal("FTPrimaryWithOptions",Hl)}function iu(){ou(),Tl(215),Bl==259&&Bu(),Bl==264&&Jo()}function su(){$l.startNonterminal("FTPrimary",Hl);switch(Bl){case 34:bl(34),Tl(162),Sl(),Xo(),bl(37);break;case 35:cu();break;default:uu(),Tl(216),Bl==195&&(Sl(),vu())}$l.endNonterminal("FTPrimary",Hl)}function ou(){switch(Bl){case 34:wl(34),Tl(162),Vo(),wl(37);break;case 35:hu();break;default:au(),Tl(216),Bl==195&&mu()}}function uu(){$l.startNonterminal("FTWords",Hl),fu(),Tl(222);if(Bl==71||Bl==76||Bl==210)Sl(),pu();$l.endNonterminal("FTWords",Hl)}function au(){lu(),Tl(222),(Bl==71||Bl==76||Bl==210)&&du()}function fu(){$l.startNonterminal("FTWordsValue",Hl);switch(Bl){case 11:bl(11);break;default:bl(276),Tl(267),Sl(),Q(),bl(282)}$l.endNonterminal("FTWordsValue",Hl)}function lu(){switch(Bl){case 11:wl(11);break;default:wl(276),Tl(267),G(),wl(282)}}function cu(){$l.startNonterminal("FTExtensionSelection",Hl);for(;;){Sl(),xr(),Tl(100);if(Bl!=35)break}bl(276),Tl(166),Bl!=282&&(Sl(),Xo()),bl(282),$l.endNonterminal("FTExtensionSelection",Hl)}function hu(){for(;;){Tr(),Tl(100);if(Bl!=35)break}wl(276),Tl(166),Bl!=282&&Vo(),wl(282)}function pu(){$l.startNonterminal("FTAnyallOption",Hl);switch(Bl){case 76:bl(76),Tl(219),Bl==272&&bl(272);break;case 71:bl(71),Tl(220),Bl==273&&bl(273);break;default:bl(210)}$l.endNonterminal("FTAnyallOption",Hl)}function du(){switch(Bl){case 76:wl(76),Tl(219),Bl==272&&wl(272);break;case 71:wl(71),Tl(220),Bl==273&&wl(273);break;default:wl(210)}}function vu(){$l.startNonterminal("FTTimes",Hl),bl(195),Tl(149),Sl(),gu(),bl(247),$l.endNonterminal("FTTimes",Hl)}function mu(){wl(195),Tl(149),yu(),wl(247)}function gu(){$l.startNonterminal("FTRange",Hl);switch(Bl){case 130:bl(130),Tl(267),Sl(),zn();break;case 81:bl(81),Tl(125);switch(Bl){case 173:bl(173),Tl(267),Sl(),zn();break;default:bl(183),Tl(267),Sl(),zn()}break;default:bl(140),Tl(267),Sl(),zn(),bl(248),Tl(267),Sl(),zn()}$l.endNonterminal("FTRange",Hl)}function yu(){switch(Bl){case 130:wl(130),Tl(267),Wn();break;case 81:wl(81),Tl(125);switch(Bl){case 173:wl(173),Tl(267),Wn();break;default:wl(183),Tl(267),Wn()}break;default:wl(140),Tl(267),Wn(),wl(248),Tl(267),Wn()}}function bu(){$l.startNonterminal("FTPosFilter",Hl);switch(Bl){case 202:Eu();break;case 269:xu();break;case 117:Nu();break;case 115:case 223:Au();break;default:Du()}$l.endNonterminal("FTPosFilter",Hl)}function wu(){switch(Bl){case 202:Su();break;case 269:Tu();break;case 117:Cu();break;case 115:case 223:Ou();break;default:Pu()}}function Eu(){$l.startNonterminal("FTOrder",Hl),bl(202),$l.endNonterminal("FTOrder",Hl)}function Su(){wl(202)}function xu(){$l.startNonterminal("FTWindow",Hl),bl(269),Tl(267),Sl(),zn(),Sl(),ku(),$l.endNonterminal("FTWindow",Hl)}function Tu(){wl(269),Tl(267),Wn(),Lu()}function Nu(){$l.startNonterminal("FTDistance",Hl),bl(117),Tl(149),Sl(),gu(),Sl(),ku(),$l.endNonterminal("FTDistance",Hl)}function Cu(){wl(117),Tl(149),yu(),Lu()}function ku(){$l.startNonterminal("FTUnit",Hl);switch(Bl){case 273:bl(273);break;case 232:bl(232);break;default:bl(205)}$l.endNonterminal("FTUnit",Hl)}function Lu(){switch(Bl){case 273:wl(273);break;case 232:wl(232);break;default:wl(205)}}function Au(){$l.startNonterminal("FTScope",Hl);switch(Bl){case 223:bl(223);break;default:bl(115)}Tl(132),Sl(),Mu(),$l.endNonterminal("FTScope",Hl)}function Ou(){switch(Bl){case 223:wl(223);break;default:wl(115)}Tl(132),_u()}function Mu(){$l.startNonterminal("FTBigUnit",Hl);switch(Bl){case 231:bl(231);break;default:bl(204)}$l.endNonterminal("FTBigUnit",Hl)}function _u(){switch(Bl){case 231:wl(231);break;default:wl(204)}}function Du(){$l.startNonterminal("FTContent",Hl);switch(Bl){case 81:bl(81),Tl(117);switch(Bl){case 237:bl(237);break;default:bl(126)}break;default:bl(127),Tl(42),bl(100)}$l.endNonterminal("FTContent",Hl)}function Pu(){switch(Bl){case 81:wl(81),Tl(117);switch(Bl){case 237:wl(237);break;default:wl(126)}break;default:wl(127),Tl(42),wl(100)}}function Hu(){$l.startNonterminal("FTMatchOptions",Hl);for(;;){bl(259),Tl(182),Sl(),ju(),Tl(215);if(Bl!=259)break}$l.endNonterminal("FTMatchOptions",Hl)}function Bu(){for(;;){wl(259),Tl(182),Fu(),Tl(215);if(Bl!=259)break}}function ju(){$l.startNonterminal("FTMatchOption",Hl);switch(Bl){case 188:Nl(161);break;default:Dl=Bl}switch(Dl){case 169:ra();break;case 268:case 137404:sa();break;case 246:case 126140:Xu();break;case 238:case 122044:zu();break;case 114:Ru();break;case 239:case 122556:Gu();break;case 199:ua();break;default:Iu()}$l.endNonterminal("FTMatchOption",Hl)}function Fu(){switch(Bl){case 188:Nl(161);break;default:Dl=Bl}switch(Dl){case 169:ia();break;case 268:case 137404:oa();break;case 246:case 126140:Vu();break;case 238:case 122044:Wu();break;case 114:Uu();break;case 239:case 122556:Yu();break;case 199:aa();break;default:qu()}}function Iu(){$l.startNonterminal("FTCaseOption",Hl);switch(Bl){case 88:bl(88),Tl(124);switch(Bl){case 158:bl(158);break;default:bl(230)}break;case 177:bl(177);break;default:bl(258)}$l.endNonterminal("FTCaseOption",Hl)}function qu(){switch(Bl){case 88:wl(88),Tl(124);switch(Bl){case 158:wl(158);break;default:wl(230)}break;case 177:wl(177);break;default:wl(258)}}function Ru(){$l.startNonterminal("FTDiacriticsOption",Hl),bl(114),Tl(124);switch(Bl){case 158:bl(158);break;default:bl(230)}$l.endNonterminal("FTDiacriticsOption",Hl)}function Uu(){wl(114),Tl(124);switch(Bl){case 158:wl(158);break;default:wl(230)}}function zu(){$l.startNonterminal("FTStemOption",Hl);switch(Bl){case 238:bl(238);break;default:bl(188),Tl(74),bl(238)}$l.endNonterminal("FTStemOption",Hl)}function Wu(){switch(Bl){case 238:wl(238);break;default:wl(188),Tl(74),wl(238)}}function Xu(){$l.startNonterminal("FTThesaurusOption",Hl);switch(Bl){case 246:bl(246),Tl(142);switch(Bl){case 81:Sl(),$u();break;case 109:bl(109);break;default:bl(34),Tl(112);switch(Bl){case 81:Sl(),$u();break;default:bl(109)}for(;;){Tl(101);if(Bl!=41)break;bl(41),Tl(31),Sl(),$u()}bl(37)}break;default:bl(188),Tl(78),bl(246)}$l.endNonterminal("FTThesaurusOption",Hl)}function Vu(){switch(Bl){case 246:wl(246),Tl(142);switch(Bl){case 81:Ju();break;case 109:wl(109);break;default:wl(34),Tl(112);switch(Bl){case 81:Ju();break;default:wl(109)}for(;;){Tl(101);if(Bl!=41)break;wl(41),Tl(31),Ju()}wl(37)}break;default:wl(188),Tl(78),wl(246)}}function $u(){$l.startNonterminal("FTThesaurusID",Hl),bl(81),Tl(15),bl(7),Tl(221),Bl==217&&(bl(217),Tl(17),bl(11)),Tl(217);switch(Bl){case 81:Nl(165);break;default:Dl=Bl}if(Dl==130||Dl==140||Dl==88657||Dl==93777)Sl(),Ku(),Tl(58),bl(175);$l.endNonterminal("FTThesaurusID",Hl)}function Ju(){wl(81),Tl(15),wl(7),Tl(221),Bl==217&&(wl(217),Tl(17),wl(11)),Tl(217);switch(Bl){case 81:Nl(165);break;default:Dl=Bl}if(Dl==130||Dl==140||Dl==88657||Dl==93777)Qu(),Tl(58),wl(175)}function Ku(){$l.startNonterminal("FTLiteralRange",Hl);switch(Bl){case 130:bl(130),Tl(16),bl(8);break;case 81:bl(81),Tl(125);switch(Bl){case 173:bl(173),Tl(16),bl(8);break;default:bl(183),Tl(16),bl(8)}break;default:bl(140),Tl(16),bl(8),Tl(79),bl(248),Tl(16),bl(8)}$l.endNonterminal("FTLiteralRange",Hl)}function Qu(){switch(Bl){case 130:wl(130),Tl(16),wl(8);break;case 81:wl(81),Tl(125);switch(Bl){case 173:wl(173),Tl(16),wl(8);break;default:wl(183),Tl(16),wl(8)}break;default:wl(140),Tl(16),wl(8),Tl(79),wl(248),Tl(16),wl(8)}}function Gu(){$l.startNonterminal("FTStopWordOption",Hl);switch(Bl){case 239:bl(239),Tl(86),bl(273),Tl(142);switch(Bl){case 109:bl(109);for(;;){Tl(218);if(Bl!=131&&Bl!=254)break;Sl(),ta()}break;default:Sl(),Zu();for(;;){Tl(218);if(Bl!=131&&Bl!=254)break;Sl(),ta()}}break;default:bl(188),Tl(75),bl(239),Tl(86),bl(273)}$l.endNonterminal("FTStopWordOption",Hl)}function Yu(){switch(Bl){case 239:wl(239),Tl(86),wl(273),Tl(142);switch(Bl){case 109:wl(109);for(;;){Tl(218);if(Bl!=131&&Bl!=254)break;na()}break;default:ea();for(;;){Tl(218);if(Bl!=131&&Bl!=254)break;na()}}break;default:wl(188),Tl(75),wl(239),Tl(86),wl(273)}}function Zu(){$l.startNonterminal("FTStopWords",Hl);switch(Bl){case 81:bl(81),Tl(15),bl(7);break;default:bl(34),Tl(17),bl(11);for(;;){Tl(101);if(Bl!=41)break;bl(41),Tl(17),bl(11)}bl(37)}$l.endNonterminal("FTStopWords",Hl)}function ea(){switch(Bl){case 81:wl(81),Tl(15),wl(7);break;default:wl(34),Tl(17),wl(11);for(;;){Tl(101);if(Bl!=41)break;wl(41),Tl(17),wl(11)}wl(37)}}function ta(){$l.startNonterminal("FTStopWordsInclExcl",Hl);switch(Bl){case 254:bl(254);break;default:bl(131)}Tl(99),Sl(),Zu(),$l.endNonterminal("FTStopWordsInclExcl",Hl)}function na(){switch(Bl){case 254:wl(254);break;default:wl(131)}Tl(99),ea()}function ra(){$l.startNonterminal("FTLanguageOption",Hl),bl(169),Tl(17),bl(11),$l.endNonterminal("FTLanguageOption",Hl)}function ia(){wl(169),Tl(17),wl(11)}function sa(){$l.startNonterminal("FTWildCardOption",Hl);switch(Bl){case 268:bl(268);break;default:bl(188),Tl(84),bl(268)}$l.endNonterminal("FTWildCardOption",Hl)}function oa(){switch(Bl){case 268:wl(268);break;default:wl(188),Tl(84),wl(268)}}function ua(){$l.startNonterminal("FTExtensionOption",Hl),bl(199),Tl(255),Sl(),_a(),Tl(17),bl(11),$l.endNonterminal("FTExtensionOption",Hl)}function aa(){wl(199),Tl(255),Da(),Tl(17),wl(11)}function fa(){$l.startNonterminal("FTIgnoreOption",Hl),bl(271),Tl(42),bl(100),Tl(267),Sl(),$n(),$l.endNonterminal("FTIgnoreOption",Hl)}function la(){wl(271),Tl(42),wl(100),Tl(267),Jn()}function ca(){$l.startNonterminal("CollectionDecl",Hl),bl(95),Tl(255),Sl(),_a(),Tl(107),Bl==79&&(Sl(),ha()),$l.endNonterminal("CollectionDecl",Hl)}function ha(){$l.startNonterminal("CollectionTypeDecl",Hl),bl(79),Tl(178),Sl(),Ms(),Tl(156),Bl!=53&&(Sl(),vs()),$l.endNonterminal("CollectionTypeDecl",Hl)}function pa(){$l.startNonterminal("IndexName",Hl),_a(),$l.endNonterminal("IndexName",Hl)}function da(){$l.startNonterminal("IndexDomainExpr",Hl),Nr(),$l.endNonterminal("IndexDomainExpr",Hl)}function va(){$l.startNonterminal("IndexKeySpec",Hl),ma(),Bl==79&&(Sl(),ga()),Tl(146),Bl==94&&(Sl(),ba()),$l.endNonterminal("IndexKeySpec",Hl)}function ma(){$l.startNonterminal("IndexKeyExpr",Hl),Nr(),$l.endNonterminal("IndexKeyExpr",Hl)}function ga(){$l.startNonterminal("IndexKeyTypeDecl",Hl),bl(79),Tl(255),Sl(),ya(),Tl(169);if(Bl==39||Bl==40||Bl==64)Sl(),vs();$l.endNonterminal("IndexKeyTypeDecl",Hl)}function ya(){$l.startNonterminal("AtomicType",Hl),_a(),$l.endNonterminal("AtomicType",Hl)}function ba(){$l.startNonterminal("IndexKeyCollation",Hl),bl(94),Tl(15),bl(7),$l.endNonterminal("IndexKeyCollation",Hl)}function wa(){$l.startNonterminal("IndexDecl",Hl),bl(155),Tl(255),Sl(),pa(),Tl(65),bl(197),Tl(63),bl(192),Tl(266),Sl(),da(),bl(87),Tl(266),Sl(),va();for(;;){Tl(103);if(Bl!=41)break;bl(41),Tl(266),Sl(),va()}$l.endNonterminal("IndexDecl",Hl)}function Ea(){$l.startNonterminal("ICDecl",Hl),bl(161),Tl(40),bl(97),Tl(255),Sl(),_a(),Tl(120);switch(Bl){case 197:Sl(),Sa();break;default:Sl(),Ca()}$l.endNonterminal("ICDecl",Hl)}function Sa(){$l.startNonterminal("ICCollection",Hl),bl(197),Tl(39),bl(95),Tl(255),Sl(),_a(),Tl(140);switch(Bl){case 31:Sl(),xa();break;case 191:Sl(),Ta();break;default:Sl(),Na()}$l.endNonterminal("ICCollection",Hl)}function xa(){$l.startNonterminal("ICCollSequence",Hl),ui(),Tl(37),bl(92),Tl(267),Sl(),Af(),$l.endNonterminal("ICCollSequence",Hl)}function Ta(){$l.startNonterminal("ICCollSequenceUnique",Hl),bl(191),Tl(21),Sl(),ui(),Tl(37),bl(92),Tl(80),bl(255),Tl(57),bl(168),Tl(266),Sl(),Nr(),$l.endNonterminal("ICCollSequenceUnique",Hl)}function Na(){$l.startNonterminal("ICCollNode",Hl),bl(138),Tl(62),bl(191),Tl(21),Sl(),ui(),Tl(37),bl(92),Tl(267),Sl(),Af(),$l.endNonterminal("ICCollNode",Hl)}function Ca(){$l.startNonterminal("ICForeignKey",Hl),bl(139),Tl(57),bl(168),Tl(51),Sl(),ka(),Sl(),La(),$l.endNonterminal("ICForeignKey",Hl)}function ka(){$l.startNonterminal("ICForeignKeySource",Hl),bl(140),Tl(39),Sl(),Aa(),$l.endNonterminal("ICForeignKeySource",Hl)}function La(){$l.startNonterminal("ICForeignKeyTarget",Hl),bl(248),Tl(39),Sl(),Aa(),$l.endNonterminal("ICForeignKeyTarget",Hl)}function Aa(){$l.startNonterminal("ICForeignKeyValues",Hl),bl(95),Tl(255),Sl(),_a(),Tl(62),bl(191),Tl(21),Sl(),ui(),Tl(57),bl(168),Tl(266),Sl(),Nr(),$l.endNonterminal("ICForeignKeyValues",Hl)}function Oa(){wl(36);for(;;){Cl(89);if(Bl==50)break;switch(Bl){case 24:wl(24);break;default:Oa()}}wl(50)}function Ma(){switch(Bl){case 22:wl(22);break;default:Oa()}}function _a(){$l.startNonterminal("EQName",Hl),Cl(250);switch(Bl){case 82:bl(82);break;case 96:bl(96);break;case 120:bl(120);break;case 121:bl(121);break;case 124:bl(124);break;case 145:bl(145);break;case 152:bl(152);break;case 165:bl(165);break;case 185:bl(185);break;case 191:bl(191);break;case 216:bl(216);break;case 226:bl(226);break;case 227:bl(227);break;case 243:bl(243);break;case 244:bl(244);break;case 253:bl(253);break;case 78:bl(78);break;case 167:bl(167);break;case 242:bl(242);break;default:Pa()}$l.endNonterminal("EQName",Hl)}function Da(){Cl(250);switch(Bl){case 82:wl(82);break;case 96:wl(96);break;case 120:wl(120);break;case 121:wl(121);break;case 124:wl(124);break;case 145:wl(145);break;case 152:wl(152);break;case 165:wl(165);break;case 185:wl(185);break;case 191:wl(191);break;case 216:wl(216);break;case 226:wl(226);break;case 227:wl(227);break;case 243:wl(243);break;case 244:wl(244);break;case 253:wl(253);break;case 78:wl(78);break;case 167:wl(167);break;case 242:wl(242);break;default:Ha()}}function Pa(){$l.startNonterminal("FunctionName",Hl);switch(Bl){case 6:bl(6);break;case 70:bl(70);break;case 73:bl(73);break;case 74:bl(74);break;case 75:bl(75);break;case 79:bl(79);break;case 80:bl(80);break;case 84:bl(84);break;case 88:bl(88);break;case 89:bl(89);break;case 90:bl(90);break;case 93:bl(93);break;case 94:bl(94);break;case 103:bl(103);break;case 105:bl(105);break;case 108:bl(108);break;case 109:bl(109);break;case 110:bl(110);break;case 111:bl(111);break;case 112:bl(112);break;case 113:bl(113);break;case 118:bl(118);break;case 119:bl(119);break;case 122:bl(122);break;case 123:bl(123);break;case 126:bl(126);break;case 128:bl(128);break;case 129:bl(129);break;case 131:bl(131);break;case 134:bl(134);break;case 135:bl(135);break;case 136:bl(136);break;case 137:bl(137);break;case 146:bl(146);break;case 148:bl(148);break;case 150:bl(150);break;case 151:bl(151);break;case 153:bl(153);break;case 159:bl(159);break;case 160:bl(160);break;case 162:bl(162);break;case 163:bl(163);break;case 164:bl(164);break;case 170:bl(170);break;case 172:bl(172);break;case 174:bl(174);break;case 178:bl(178);break;case 180:bl(180);break;case 181:bl(181);break;case 182:bl(182);break;case 184:bl(184);break;case 186:bl(186);break;case 198:bl(198);break;case 200:bl(200);break;case 201:bl(201);break;case 202:bl(202);break;case 206:bl(206);break;case 212:bl(212);break;case 213:bl(213);break;case 218:bl(218);break;case 219:bl(219);break;case 220:bl(220);break;case 224:bl(224);break;case 229:bl(229);break;case 235:bl(235);break;case 236:bl(236);break;case 237:bl(237);break;case 248:bl(248);break;case 249:bl(249);break;case 250:bl(250);break;case 254:bl(254);break;case 256:bl(256);break;case 260:bl(260);break;case 266:bl(266);break;case 270:bl(270);break;case 274:bl(274);break;case 72:bl(72);break;case 81:bl(81);break;case 83:bl(83);break;case 85:bl(85);break;case 86:bl(86);break;case 91:bl(91);break;case 98:bl(98);break;case 101:bl(101);break;case 102:bl(102);break;case 104:bl(104);break;case 106:bl(106);break;case 125:bl(125);break;case 132:bl(132);break;case 133:bl(133);break;case 141:bl(141);break;case 154:bl(154);break;case 155:bl(155);break;case 161:bl(161);break;case 171:bl(171);break;case 192:bl(192);break;case 199:bl(199);break;case 203:bl(203);break;case 222:bl(222);break;case 225:bl(225);break;case 228:bl(228);break;case 234:bl(234);break;case 240:bl(240);break;case 251:bl(251);break;case 252:bl(252);break;case 257:bl(257);break;case 261:bl(261);break;case 262:bl(262);break;case 263:bl(263);break;case 267:bl(267);break;case 97:bl(97);break;case 176:bl(176);break;case 221:bl(221);break;case 77:bl(77);break;case 166:bl(166);break;default:bl(194)}$l.endNonterminal("FunctionName",Hl)}function Ha(){switch(Bl){case 6:wl(6);break;case 70:wl(70);break;case 73:wl(73);break;case 74:wl(74);break;case 75:wl(75);break;case 79:wl(79);break;case 80:wl(80);break;case 84:wl(84);break;case 88:wl(88);break;case 89:wl(89);break;case 90:wl(90);break;case 93:wl(93);break;case 94:wl(94);break;case 103:wl(103);break;case 105:wl(105);break;case 108:wl(108);break;case 109:wl(109);break;case 110:wl(110);break;case 111:wl(111);break;case 112:wl(112);break;case 113:wl(113);break;case 118:wl(118);break;case 119:wl(119);break;case 122:wl(122);break;case 123:wl(123);break;case 126:wl(126);break;case 128:wl(128);break;case 129:wl(129);break;case 131:wl(131);break;case 134:wl(134);break;case 135:wl(135);break;case 136:wl(136);break;case 137:wl(137);break;case 146:wl(146);break;case 148:wl(148);break;case 150:wl(150);break;case 151:wl(151);break;case 153:wl(153);break;case 159:wl(159);break;case 160:wl(160);break;case 162:wl(162);break;case 163:wl(163);break;case 164:wl(164);break;case 170:wl(170);break;case 172:wl(172);break;case 174:wl(174);break;case 178:wl(178);break;case 180:wl(180);break;case 181:wl(181);break;case 182:wl(182);break;case 184:wl(184);break;case 186:wl(186);break;case 198:wl(198);break;case 200:wl(200);break;case 201:wl(201);break;case 202:wl(202);break;case 206:wl(206);break;case 212:wl(212);break;case 213:wl(213);break;case 218:wl(218);break;case 219:wl(219);break;case 220:wl(220);break;case 224:wl(224);break;case 229:wl(229);break;case 235:wl(235);break;case 236:wl(236);break;case 237:wl(237);break;case 248:wl(248);break;case 249:wl(249);break;case 250:wl(250);break;case 254:wl(254);break;case 256:wl(256);break;case 260:wl(260);break;case 266:wl(266);break;case 270:wl(270);break;case 274:wl(274);break;case 72:wl(72);break;case 81:wl(81);break;case 83:wl(83);break;case 85:wl(85);break;case 86:wl(86);break;case 91:wl(91);break;case 98:wl(98);break;case 101:wl(101);break;case 102:wl(102);break;case 104:wl(104);break;case 106:wl(106);break;case 125:wl(125);break;case 132:wl(132);break;case 133:wl(133);break;case 141:wl(141);break;case 154:wl(154);break;case 155:wl(155);break;case 161:wl(161);break;case 171:wl(171);break;case 192:wl(192);break;case 199:wl(199);break;case 203:wl(203);break;case 222:wl(222);break;case 225:wl(225);break;case 228:wl(228);break;case 234:wl(234);break;case 240:wl(240);break;case 251:wl(251);break;case 252:wl(252);break;case 257:wl(257);break;case 261:wl(261);break;case 262:wl(262);break;case 263:wl(263);break;case 267:wl(267);break;case 97:wl(97);break;case 176:wl(176);break;case 221:wl(221);break;case 77:wl(77);break;case 166:wl(166);break;default:wl(194)}}function Ba(){$l.startNonterminal("NCName",Hl);switch(Bl){case 19:bl(19);break;case 70:bl(70);break;case 75:bl(75);break;case 79:bl(79);break;case 80:bl(80);break;case 84:bl(84);break;case 88:bl(88);break;case 89:bl(89);break;case 90:bl(90);break;case 94:bl(94);break;case 105:bl(105);break;case 109:bl(109);break;case 113:bl(113);break;case 118:bl(118);break;case 122:bl(122);break;case 123:bl(123);break;case 126:bl(126);break;case 128:bl(128);break;case 131:bl(131);break;case 137:bl(137);break;case 146:bl(146);break;case 148:bl(148);break;case 150:bl(150);break;case 151:bl(151);break;case 160:bl(160);break;case 162:bl(162);break;case 163:bl(163);break;case 164:bl(164);break;case 172:bl(172);break;case 174:bl(174);break;case 178:bl(178);break;case 180:bl(180);break;case 181:bl(181);break;case 186:bl(186);break;case 198:bl(198);break;case 200:bl(200);break;case 201:bl(201);break;case 220:bl(220);break;case 224:bl(224);break;case 236:bl(236);break;case 237:bl(237);break;case 248:bl(248);break;case 249:bl(249);break;case 254:bl(254);break;case 266:bl(266);break;case 270:bl(270);break;case 73:bl(73);break;case 74:bl(74);break;case 82:bl(82);break;case 93:bl(93);break;case 96:bl(96);break;case 103:bl(103);break;case 108:bl(108);break;case 110:bl(110);break;case 111:bl(111);break;case 112:bl(112);break;case 119:bl(119);break;case 120:bl(120);break;case 121:bl(121);break;case 124:bl(124);break;case 129:bl(129);break;case 134:bl(134);break;case 135:bl(135);break;case 136:bl(136);break;case 145:bl(145);break;case 152:bl(152);break;case 153:bl(153);break;case 159:bl(159);break;case 165:bl(165);break;case 170:bl(170);break;case 182:bl(182);break;case 184:bl(184);break;case 185:bl(185);break;case 191:bl(191);break;case 202:bl(202);break;case 206:bl(206);break;case 212:bl(212);break;case 213:bl(213);break;case 216:bl(216);break;case 218:bl(218);break;case 219:bl(219);break;case 226:bl(226);break;case 227:bl(227);break;case 229:bl(229);break;case 235:bl(235);break;case 243:bl(243);break;case 244:bl(244);break;case 250:bl(250);break;case 253:bl(253);break;case 256:bl(256);break;case 260:bl(260);break;case 262:bl(262);break;case 274:bl(274);break;case 72:bl(72);break;case 81:bl(81);break;case 83:bl(83);break;case 85:bl(85);break;case 86:bl(86);break;case 91:bl(91);break;case 98:bl(98);break;case 101:bl(101);break;case 102:bl(102);break;case 104:bl(104);break;case 106:bl(106);break;case 125:bl(125);break;case 132:bl(132);break;case 133:bl(133);break;case 141:bl(141);break;case 154:bl(154);break;case 155:bl(155);break;case 161:bl(161);break;case 171:bl(171);break;case 192:bl(192);break;case 199:bl(199);break;case 203:bl(203);break;case 222:bl(222);break;case 225:bl(225);break;case 228:bl(228);break;case 234:bl(234);break;case 240:bl(240);break;case 251:bl(251);break;case 252:bl(252);break;case 257:bl(257);break;case 261:bl(261);break;case 263:bl(263);break;case 267:bl(267);break;case 97:bl(97);break;case 176:bl(176);break;case 221:bl(221);break;case 77:bl(77);break;case 166:bl(166);break;default:bl(194)}$l.endNonterminal("NCName",Hl)}function ja(){switch(Bl){case 19:wl(19);break;case 70:wl(70);break;case 75:wl(75);break;case 79:wl(79);break;case 80:wl(80);break;case 84:wl(84);break;case 88:wl(88);break;case 89:wl(89);break;case 90:wl(90);break;case 94:wl(94);break;case 105:wl(105);break;case 109:wl(109);break;case 113:wl(113);break;case 118:wl(118);break;case 122:wl(122);break;case 123:wl(123);break;case 126:wl(126);break;case 128:wl(128);break;case 131:wl(131);break;case 137:wl(137);break;case 146:wl(146);break;case 148:wl(148);break;case 150:wl(150);break;case 151:wl(151);break;case 160:wl(160);break;case 162:wl(162);break;case 163:wl(163);break;case 164:wl(164);break;case 172:wl(172);break;case 174:wl(174);break;case 178:wl(178);break;case 180:wl(180);break;case 181:wl(181);break;case 186:wl(186);break;case 198:wl(198);break;case 200:wl(200);break;case 201:wl(201);break;case 220:wl(220);break;case 224:wl(224);break;case 236:wl(236);break;case 237:wl(237);break;case 248:wl(248);break;case 249:wl(249);break;case 254:wl(254);break;case 266:wl(266);break;case 270:wl(270);break;case 73:wl(73);break;case 74:wl(74);break;case 82:wl(82);break;case 93:wl(93);break;case 96:wl(96);break;case 103:wl(103);break;case 108:wl(108);break;case 110:wl(110);break;case 111:wl(111);break;case 112:wl(112);break;case 119:wl(119);break;case 120:wl(120);break;case 121:wl(121);break;case 124:wl(124);break;case 129:wl(129);break;case 134:wl(134);break;case 135:wl(135);break;case 136:wl(136);break;case 145:wl(145);break;case 152:wl(152);break;case 153:wl(153);break;case 159:wl(159);break;case 165:wl(165);break;case 170:wl(170);break;case 182:wl(182);break;case 184:wl(184);break;case 185:wl(185);break;case 191:wl(191);break;case 202:wl(202);break;case 206:wl(206);break;case 212:wl(212);break;case 213:wl(213);break;case 216:wl(216);break;case 218:wl(218);break;case 219:wl(219);break;case 226:wl(226);break;case 227:wl(227);break;case 229:wl(229);break;case 235:wl(235);break;case 243:wl(243);break;case 244:wl(244);break;case 250:wl(250);break;case 253:wl(253);break;case 256:wl(256);break;case 260:wl(260);break;case 262:wl(262);break;case 274:wl(274);break;case 72:wl(72);break;case 81:wl(81);break;case 83:wl(83);break;case 85:wl(85);break;case 86:wl(86);break;case 91:wl(91);break;case 98:wl(98);break;case 101:wl(101);break;case 102:wl(102);break;case 104:wl(104);break;case 106:wl(106);break;case 125:wl(125);break;case 132:wl(132);break;case 133:wl(133);break;case 141:wl(141);break;case 154:wl(154);break;case 155:wl(155);break;case 161:wl(161);break;case 171:wl(171);break;case 192:wl(192);break;case 199:wl(199);break;case 203:wl(203);break;case 222:wl(222);break;case 225:wl(225);break;case 228:wl(228);break;case 234:wl(234);break;case 240:wl(240);break;case 251:wl(251);break;case 252:wl(252);break;case 257:wl(257);break;case 261:wl(261);break;case 263:wl(263);break;case 267:wl(267);break;case 97:wl(97);break;case 176:wl(176);break;case 221:wl(221);break;case 77:wl(77);break;case 166:wl(166);break;default:wl(194)}}function Fa(){$l.startNonterminal("MainModule",Hl),f(),Sl(),Ia(),$l.endNonterminal("MainModule",Hl)}function Ia(){$l.startNonterminal("Program",Hl),Wa(),$l.endNonterminal("Program",Hl)}function qa(){$l.startNonterminal("Statements",Hl);for(;;){Tl(278);switch(Bl){case 34:Nl(269);break;case 35:kl(252);break;case 46:Nl(284);break;case 47:Nl(265);break;case 54:kl(4);break;case 55:kl(1);break;case 59:kl(3);break;case 66:Nl(257);break;case 68:Nl(272);break;case 77:Nl(200);break;case 82:Nl(281);break;case 121:Nl(280);break;case 132:Nl(203);break;case 137:Nl(208);break;case 174:Nl(205);break;case 218:Nl(206);break;case 219:Nl(207);break;case 260:Nl(210);break;case 276:Nl(277);break;case 278:Nl(273);break;case 5:case 45:Nl(186);break;case 31:case 32:Nl(255);break;case 40:case 42:Nl(267);break;case 86:case 102:Nl(201);break;case 110:case 159:Nl(209);break;case 184:case 216:Nl(268);break;case 103:case 129:case 235:case 262:Nl(197);break;case 8:case 9:case 10:case 11:case 44:Nl(192);break;case 78:case 124:case 165:case 167:case 242:Nl(191);break;case 96:case 119:case 202:case 244:case 250:case 256:Nl(204);break;case 73:case 74:case 93:case 111:case 112:case 135:case 136:case 206:case 212:case 213:case 229:Nl(198);break;case 6:case 70:case 72:case 75:case 79:case 80:case 81:case 83:case 84:case 85:case 88:case 89:case 90:case 91:case 94:case 97:case 98:case 101:case 104:case 105:case 106:case 108:case 109:case 113:case 118:case 120:case 122:case 123:case 125:case 126:case 128:case 131:case 133:case 134:case 141:case 145:case 146:case 148:case 150:case 151:case 152:case 153:case 154:case 155:case 160:case 161:case 162:case 163:case 164:case 166:case 170:case 171:case 172:case 176:case 178:case 180:case 181:case 182:case 185:case 186:case 191:case 192:case 194:case 198:case 199:case 200:case 201:case 203:case 220:case 221:case 222:case 224:case 225:case 226:case 227:case 228:case 234:case 236:case 237:case 240:case 243:case 248:case 249:case 251:case 252:case 253:case 254:case 257:case 261:case 263:case 266:case 267:case 270:case 274:Nl(195);break;default:Dl=Bl}if(Dl!=25&&Dl!=53&&Dl!=282&&Dl!=12805&&Dl!=12806&&Dl!=12808&&Dl!=12809&&Dl!=12810&&Dl!=12811&&Dl!=12844&&Dl!=12845&&Dl!=12846&&Dl!=12870&&Dl!=12872&&Dl!=12873&&Dl!=12874&&Dl!=12875&&Dl!=12877&&Dl!=12878&&Dl!=12879&&Dl!=12880&&Dl!=12881&&Dl!=12882&&Dl!=12883&&Dl!=12884&&Dl!=12885&&Dl!=12886&&Dl!=12888&&Dl!=12889&&Dl!=12890&&Dl!=12891&&Dl!=12893&&Dl!=12894&&Dl!=12896&&Dl!=12897&&Dl!=12898&&Dl!=12901&&Dl!=12902&&Dl!=12903&&Dl!=12904&&Dl!=12905&&Dl!=12906&&Dl!=12908&&Dl!=12909&&Dl!=12910&&Dl!=12911&&Dl!=12912&&Dl!=12913&&Dl!=12918&&Dl!=12919&&Dl!=12920&&Dl!=12921&&Dl!=12922&&Dl!=12923&&Dl!=12924&&Dl!=12925&&Dl!=12926&&Dl!=12928&&Dl!=12929&&Dl!=12931&&Dl!=12932&&Dl!=12933&&Dl!=12934&&Dl!=12935&&Dl!=12936&&Dl!=12937&&Dl!=12941&&Dl!=12945&&Dl!=12946&&Dl!=12948&&Dl!=12950&&Dl!=12951&&Dl!=12952&&Dl!=12953&&Dl!=12954&&Dl!=12955&&Dl!=12959&&Dl!=12960&&Dl!=12961&&Dl!=12962&&Dl!=12963&&Dl!=12964&&Dl!=12965&&Dl!=12966&&Dl!=12967&&Dl!=12970&&Dl!=12971&&Dl!=12972&&Dl!=12974&&Dl!=12976&&Dl!=12978&&Dl!=12980&&Dl!=12981&&Dl!=12982&&Dl!=12984&&Dl!=12985&&Dl!=12986&&Dl!=12991&&Dl!=12992&&Dl!=12994&&Dl!=12998&&Dl!=12999&&Dl!=13e3&&Dl!=13001&&Dl!=13002&&Dl!=13003&&Dl!=13006&&Dl!=13012&&Dl!=13013&&Dl!=13016&&Dl!=13018&&Dl!=13019&&Dl!=13020&&Dl!=13021&&Dl!=13022&&Dl!=13024&&Dl!=13025&&Dl!=13026&&Dl!=13027&&Dl!=13028&&Dl!=13029&&Dl!=13034&&Dl!=13035&&Dl!=13036&&Dl!=13037&&Dl!=13040&&Dl!=13042&&Dl!=13043&&Dl!=13044&&Dl!=13048&&Dl!=13049&&Dl!=13050&&Dl!=13051&&Dl!=13052&&Dl!=13053&&Dl!=13054&&Dl!=13056&&Dl!=13057&&Dl!=13060&&Dl!=13061&&Dl!=13062&&Dl!=13063&&Dl!=13066&&Dl!=13067&&Dl!=13070&&Dl!=13074&&Dl!=16134&&Dl!=20997&&Dl!=20998&&Dl!=21e3&&Dl!=21001&&Dl!=21002&&Dl!=21003&&Dl!=21036&&Dl!=21037&&Dl!=21038&&Dl!=21062&&Dl!=21064&&Dl!=21065&&Dl!=21066&&Dl!=21067&&Dl!=21069&&Dl!=21070&&Dl!=21071&&Dl!=21072&&Dl!=21073&&Dl!=21074&&Dl!=21075&&Dl!=21076&&Dl!=21077&&Dl!=21078&&Dl!=21080&&Dl!=21081&&Dl!=21082&&Dl!=21083&&Dl!=21085&&Dl!=21086&&Dl!=21088&&Dl!=21089&&Dl!=21090&&Dl!=21093&&Dl!=21094&&Dl!=21095&&Dl!=21096&&Dl!=21097&&Dl!=21098&&Dl!=21100&&Dl!=21101&&Dl!=21102&&Dl!=21103&&Dl!=21104&&Dl!=21105&&Dl!=21110&&Dl!=21111&&Dl!=21112&&Dl!=21113&&Dl!=21114&&Dl!=21115&&Dl!=21116&&Dl!=21117&&Dl!=21118&&Dl!=21120&&Dl!=21121&&Dl!=21123&&Dl!=21124&&Dl!=21125&&Dl!=21126&&Dl!=21127&&Dl!=21128&&Dl!=21129&&Dl!=21133&&Dl!=21137&&Dl!=21138&&Dl!=21140&&Dl!=21142&&Dl!=21143&&Dl!=21144&&Dl!=21145&&Dl!=21146&&Dl!=21147&&Dl!=21151&&Dl!=21152&&Dl!=21153&&Dl!=21154&&Dl!=21155&&Dl!=21156&&Dl!=21157&&Dl!=21158&&Dl!=21159&&Dl!=21162&&Dl!=21163&&Dl!=21164&&Dl!=21166&&Dl!=21168&&Dl!=21170&&Dl!=21172&&Dl!=21173&&Dl!=21174&&Dl!=21176&&Dl!=21177&&Dl!=21178&&Dl!=21183&&Dl!=21184&&Dl!=21186&&Dl!=21190&&Dl!=21191&&Dl!=21192&&Dl!=21193&&Dl!=21194&&Dl!=21195&&Dl!=21198&&Dl!=21204&&Dl!=21205&&Dl!=21208&&Dl!=21210&&Dl!=21211&&Dl!=21212&&Dl!=21213&&Dl!=21214&&Dl!=21216&&Dl!=21217&&Dl!=21218&&Dl!=21219&&Dl!=21220&&Dl!=21221&&Dl!=21226&&Dl!=21227&&Dl!=21228&&Dl!=21229&&Dl!=21232&&Dl!=21234&&Dl!=21235&&Dl!=21236&&Dl!=21240&&Dl!=21241&&Dl!=21242&&Dl!=21243&&Dl!=21244&&Dl!=21245&&Dl!=21246&&Dl!=21248&&Dl!=21249&&Dl!=21252&&Dl!=21253&&Dl!=21254&&Dl!=21255&&Dl!=21258&&Dl!=21259&&Dl!=21262&&Dl!=21266&&Dl!=27141&&Dl!=27142&&Dl!=27144&&Dl!=27145&&Dl!=27146&&Dl!=27147&&Dl!=27180&&Dl!=27181&&Dl!=27182&&Dl!=27206&&Dl!=27208&&Dl!=27209&&Dl!=27210&&Dl!=27211&&Dl!=27213&&Dl!=27214&&Dl!=27215&&Dl!=27216&&Dl!=27217&&Dl!=27218&&Dl!=27219&&Dl!=27220&&Dl!=27221&&Dl!=27222&&Dl!=27224&&Dl!=27225&&Dl!=27226&&Dl!=27227&&Dl!=27229&&Dl!=27230&&Dl!=27232&&Dl!=27233&&Dl!=27234&&Dl!=27237&&Dl!=27238&&Dl!=27239&&Dl!=27240&&Dl!=27241&&Dl!=27242&&Dl!=27244&&Dl!=27245&&Dl!=27246&&Dl!=27247&&Dl!=27248&&Dl!=27249&&Dl!=27254&&Dl!=27255&&Dl!=27256&&Dl!=27257&&Dl!=27258&&Dl!=27259&&Dl!=27260&&Dl!=27261&&Dl!=27262&&Dl!=27264&&Dl!=27265&&Dl!=27267&&Dl!=27268&&Dl!=27269&&Dl!=27270&&Dl!=27271&&Dl!=27272&&Dl!=27273&&Dl!=27277&&Dl!=27281&&Dl!=27282&&Dl!=27284&&Dl!=27286&&Dl!=27287&&Dl!=27288&&Dl!=27289&&Dl!=27290&&Dl!=27291&&Dl!=27295&&Dl!=27296&&Dl!=27297&&Dl!=27298&&Dl!=27299&&Dl!=27300&&Dl!=27301&&Dl!=27302&&Dl!=27303&&Dl!=27306&&Dl!=27307&&Dl!=27308&&Dl!=27310&&Dl!=27312&&Dl!=27314&&Dl!=27316&&Dl!=27317&&Dl!=27318&&Dl!=27320&&Dl!=27321&&Dl!=27322&&Dl!=27327&&Dl!=27328&&Dl!=27330&&Dl!=27334&&Dl!=27335&&Dl!=27336&&Dl!=27337&&Dl!=27338&&Dl!=27339&&Dl!=27342&&Dl!=27348&&Dl!=27349&&Dl!=27352&&Dl!=27354&&Dl!=27355&&Dl!=27356&&Dl!=27357&&Dl!=27358&&Dl!=27360&&Dl!=27361&&Dl!=27362&&Dl!=27363&&Dl!=27364&&Dl!=27365&&Dl!=27370&&Dl!=27371&&Dl!=27372&&Dl!=27373&&Dl!=27376&&Dl!=27378&&Dl!=27379&&Dl!=27380&&Dl!=27384&&Dl!=27385&&Dl!=27386&&Dl!=27387&&Dl!=27388&&Dl!=27389&&Dl!=27390&&Dl!=27392&&Dl!=27393&&Dl!=27396&&Dl!=27397&&Dl!=27398&&Dl!=27399&&Dl!=27402&&Dl!=27403&&Dl!=27406&&Dl!=27410&&Dl!=90198&&Dl!=90214&&Dl!=113284&&Dl!=144389&&Dl!=144390&&Dl!=144392&&Dl!=144393&&Dl!=144394&&Dl!=144395&&Dl!=144428&&Dl!=144429&&Dl!=144430&&Dl!=144454&&Dl!=144456&&Dl!=144457&&Dl!=144458&&Dl!=144459&&Dl!=144461&&Dl!=144462&&Dl!=144463&&Dl!=144464&&Dl!=144465&&Dl!=144466&&Dl!=144467&&Dl!=144468&&Dl!=144469&&Dl!=144470&&Dl!=144472&&Dl!=144473&&Dl!=144474&&Dl!=144475&&Dl!=144477&&Dl!=144478&&Dl!=144480&&Dl!=144481&&Dl!=144482&&Dl!=144485&&Dl!=144486&&Dl!=144487&&Dl!=144488&&Dl!=144489&&Dl!=144490&&Dl!=144492&&Dl!=144493&&Dl!=144494&&Dl!=144495&&Dl!=144496&&Dl!=144497&&Dl!=144502&&Dl!=144503&&Dl!=144504&&Dl!=144505&&Dl!=144506&&Dl!=144507&&Dl!=144508&&Dl!=144509&&Dl!=144510&&Dl!=144512&&Dl!=144513&&Dl!=144515&&Dl!=144516&&Dl!=144517&&Dl!=144518&&Dl!=144519&&Dl!=144520&&Dl!=144521&&Dl!=144525&&Dl!=144529&&Dl!=144530&&Dl!=144532&&Dl!=144534&&Dl!=144535&&Dl!=144536&&Dl!=144537&&Dl!=144538&&Dl!=144539&&Dl!=144543&&Dl!=144544&&Dl!=144545&&Dl!=144546&&Dl!=144547&&Dl!=144548&&Dl!=144549&&Dl!=144550&&Dl!=144551&&Dl!=144554&&Dl!=144555&&Dl!=144556&&Dl!=144558&&Dl!=144560&&Dl!=144562&&Dl!=144564&&Dl!=144565&&Dl!=144566&&Dl!=144568&&Dl!=144569&&Dl!=144570&&Dl!=144575&&Dl!=144576&&Dl!=144578&&Dl!=144582&&Dl!=144583&&Dl!=144584&&Dl!=144585&&Dl!=144586&&Dl!=144587&&Dl!=144590&&Dl!=144596&&Dl!=144597&&Dl!=144600&&Dl!=144602&&Dl!=144603&&Dl!=144604&&Dl!=144605&&Dl!=144606&&Dl!=144608&&Dl!=144609&&Dl!=144610&&Dl!=144611&&Dl!=144612&&Dl!=144613&&Dl!=144618&&Dl!=144619&&Dl!=144620&&Dl!=144621&&Dl!=144624&&Dl!=144626&&Dl!=144627&&Dl!=144628&&Dl!=144632&&Dl!=144633&&Dl!=144634&&Dl!=144635&&Dl!=144636&&Dl!=144637&&Dl!=144638&&Dl!=144640&&Dl!=144641&&Dl!=144644&&Dl!=144645&&Dl!=144646&&Dl!=144647&&Dl!=144650&&Dl!=144651&&Dl!=144654&&Dl!=144658){Dl=Ol(6,Hl);if(Dl==0){var e=Pl,t=Hl,n=Bl,r=jl,i=Fl,s=Il,o=ql,u=Rl;try{$a(),Dl=-1}catch(a){Dl=-2}Pl=e,Hl=t,Bl=n,Bl==0?Yl=t:(jl=r,Fl=i,Il=s,Il==0?Yl=i:(ql=o,Rl=u,Yl=u)),Al(6,Hl,Dl)}}if(Dl!=-1&&Dl!=53&&Dl!=16134&&Dl!=27141&&Dl!=27142&&Dl!=27144&&Dl!=27145&&Dl!=27146&&Dl!=27147&&Dl!=27180&&Dl!=27181&&Dl!=27182&&Dl!=27206&&Dl!=27208&&Dl!=27209&&Dl!=27210&&Dl!=27211&&Dl!=27213&&Dl!=27214&&Dl!=27215&&Dl!=27216&&Dl!=27217&&Dl!=27218&&Dl!=27219&&Dl!=27220&&Dl!=27221&&Dl!=27222&&Dl!=27224&&Dl!=27225&&Dl!=27226&&Dl!=27227&&Dl!=27229&&Dl!=27230&&Dl!=27232&&Dl!=27233&&Dl!=27234&&Dl!=27237&&Dl!=27238&&Dl!=27239&&Dl!=27240&&Dl!=27241&&Dl!=27242&&Dl!=27244&&Dl!=27245&&Dl!=27246&&Dl!=27247&&Dl!=27248&&Dl!=27249&&Dl!=27254&&Dl!=27255&&Dl!=27256&&Dl!=27257&&Dl!=27258&&Dl!=27259&&Dl!=27260&&Dl!=27261&&Dl!=27262&&Dl!=27264&&Dl!=27265&&Dl!=27267&&Dl!=27268&&Dl!=27269&&Dl!=27270&&Dl!=27271&&Dl!=27272&&Dl!=27273&&Dl!=27277&&Dl!=27281&&Dl!=27282&&Dl!=27284&&Dl!=27286&&Dl!=27287&&Dl!=27288&&Dl!=27289&&Dl!=27290&&Dl!=27291&&Dl!=27295&&Dl!=27296&&Dl!=27297&&Dl!=27298&&Dl!=27299&&Dl!=27300&&Dl!=27301&&Dl!=27302&&Dl!=27303&&Dl!=27306&&Dl!=27307&&Dl!=27308&&Dl!=27310&&Dl!=27312&&Dl!=27314&&Dl!=27316&&Dl!=27317&&Dl!=27318&&Dl!=27320&&Dl!=27321&&Dl!=27322&&Dl!=27327&&Dl!=27328&&Dl!=27330&&Dl!=27334&&Dl!=27335&&Dl!=27336&&Dl!=27337&&Dl!=27338&&Dl!=27339&&Dl!=27342&&Dl!=27348&&Dl!=27349&&Dl!=27352&&Dl!=27354&&Dl!=27355&&Dl!=27356&&Dl!=27357&&Dl!=27358&&Dl!=27360&&Dl!=27361&&Dl!=27362&&Dl!=27363&&Dl!=27364&&Dl!=27365&&Dl!=27370&&Dl!=27371&&Dl!=27372&&Dl!=27373&&Dl!=27376&&Dl!=27378&&Dl!=27379&&Dl!=27380&&Dl!=27384&&Dl!=27385&&Dl!=27386&&Dl!=27387&&Dl!=27388&&Dl!=27389&&Dl!=27390&&Dl!=27392&&Dl!=27393&&Dl!=27396&&Dl!=27397&&Dl!=27398&&Dl!=27399&&Dl!=27402&&Dl!=27403&&Dl!=27406&&Dl!=27410&&Dl!=90198&&Dl!=90214&&Dl!=113284)break;Sl(),Va()}$l.endNonterminal("Statements",Hl)}function Ra(){for(;;){Tl(278);switch(Bl){case 34:Nl(269);break;case 35:kl(252);break;case 46:Nl(284);break;case 47:Nl(265);break;case 54:kl(4);break;case 55:kl(1);break;case 59:kl(3);break;case 66:Nl(257);break;case 68:Nl(272);break;case 77:Nl(200);break;case 82:Nl(281);break;case 121:Nl(280);break;case 132:Nl(203);break;case 137:Nl(208);break;case 174:Nl(205);break;case 218:Nl(206);break;case 219:Nl(207);break;case 260:Nl(210);break;case 276:Nl(277);break;case 278:Nl(273);break;case 5:case 45:Nl(186);break;case 31:case 32:Nl(255);break;case 40:case 42:Nl(267);break;case 86:case 102:Nl(201);break;case 110:case 159:Nl(209);break;case 184:case 216:Nl(268);break;case 103:case 129:case 235:case 262:Nl(197);break;case 8:case 9:case 10:case 11:case 44:Nl(192);break;case 78:case 124:case 165:case 167:case 242:Nl(191);break;case 96:case 119:case 202:case 244:case 250:case 256:Nl(204);break;case 73:case 74:case 93:case 111:case 112:case 135:case 136:case 206:case 212:case 213:case 229:Nl(198);break;case 6:case 70:case 72:case 75:case 79:case 80:case 81:case 83:case 84:case 85:case 88:case 89:case 90:case 91:case 94:case 97:case 98:case 101:case 104:case 105:case 106:case 108:case 109:case 113:case 118:case 120:case 122:case 123:case 125:case 126:case 128:case 131:case 133:case 134:case 141:case 145:case 146:case 148:case 150:case 151:case 152:case 153:case 154:case 155:case 160:case 161:case 162:case 163:case 164:case 166:case 170:case 171:case 172:case 176:case 178:case 180:case 181:case 182:case 185:case 186:case 191:case 192:case 194:case 198:case 199:case 200:case 201:case 203:case 220:case 221:case 222:case 224:case 225:case 226:case 227:case 228:case 234:case 236:case 237:case 240:case 243:case 248:case 249:case 251:case 252:case 253:case 254:case 257:case 261:case 263:case 266:case 267:case 270:case 274:Nl(195);break;default:Dl=Bl}if(Dl!=25&&Dl!=53&&Dl!=282&&Dl!=12805&&Dl!=12806&&Dl!=12808&&Dl!=12809&&Dl!=12810&&Dl!=12811&&Dl!=12844&&Dl!=12845&&Dl!=12846&&Dl!=12870&&Dl!=12872&&Dl!=12873&&Dl!=12874&&Dl!=12875&&Dl!=12877&&Dl!=12878&&Dl!=12879&&Dl!=12880&&Dl!=12881&&Dl!=12882&&Dl!=12883&&Dl!=12884&&Dl!=12885&&Dl!=12886&&Dl!=12888&&Dl!=12889&&Dl!=12890&&Dl!=12891&&Dl!=12893&&Dl!=12894&&Dl!=12896&&Dl!=12897&&Dl!=12898&&Dl!=12901&&Dl!=12902&&Dl!=12903&&Dl!=12904&&Dl!=12905&&Dl!=12906&&Dl!=12908&&Dl!=12909&&Dl!=12910&&Dl!=12911&&Dl!=12912&&Dl!=12913&&Dl!=12918&&Dl!=12919&&Dl!=12920&&Dl!=12921&&Dl!=12922&&Dl!=12923&&Dl!=12924&&Dl!=12925&&Dl!=12926&&Dl!=12928&&Dl!=12929&&Dl!=12931&&Dl!=12932&&Dl!=12933&&Dl!=12934&&Dl!=12935&&Dl!=12936&&Dl!=12937&&Dl!=12941&&Dl!=12945&&Dl!=12946&&Dl!=12948&&Dl!=12950&&Dl!=12951&&Dl!=12952&&Dl!=12953&&Dl!=12954&&Dl!=12955&&Dl!=12959&&Dl!=12960&&Dl!=12961&&Dl!=12962&&Dl!=12963&&Dl!=12964&&Dl!=12965&&Dl!=12966&&Dl!=12967&&Dl!=12970&&Dl!=12971&&Dl!=12972&&Dl!=12974&&Dl!=12976&&Dl!=12978&&Dl!=12980&&Dl!=12981&&Dl!=12982&&Dl!=12984&&Dl!=12985&&Dl!=12986&&Dl!=12991&&Dl!=12992&&Dl!=12994&&Dl!=12998&&Dl!=12999&&Dl!=13e3&&Dl!=13001&&Dl!=13002&&Dl!=13003&&Dl!=13006&&Dl!=13012&&Dl!=13013&&Dl!=13016&&Dl!=13018&&Dl!=13019&&Dl!=13020&&Dl!=13021&&Dl!=13022&&Dl!=13024&&Dl!=13025&&Dl!=13026&&Dl!=13027&&Dl!=13028&&Dl!=13029&&Dl!=13034&&Dl!=13035&&Dl!=13036&&Dl!=13037&&Dl!=13040&&Dl!=13042&&Dl!=13043&&Dl!=13044&&Dl!=13048&&Dl!=13049&&Dl!=13050&&Dl!=13051&&Dl!=13052&&Dl!=13053&&Dl!=13054&&Dl!=13056&&Dl!=13057&&Dl!=13060&&Dl!=13061&&Dl!=13062&&Dl!=13063&&Dl!=13066&&Dl!=13067&&Dl!=13070&&Dl!=13074&&Dl!=16134&&Dl!=20997&&Dl!=20998&&Dl!=21e3&&Dl!=21001&&Dl!=21002&&Dl!=21003&&Dl!=21036&&Dl!=21037&&Dl!=21038&&Dl!=21062&&Dl!=21064&&Dl!=21065&&Dl!=21066&&Dl!=21067&&Dl!=21069&&Dl!=21070&&Dl!=21071&&Dl!=21072&&Dl!=21073&&Dl!=21074&&Dl!=21075&&Dl!=21076&&Dl!=21077&&Dl!=21078&&Dl!=21080&&Dl!=21081&&Dl!=21082&&Dl!=21083&&Dl!=21085&&Dl!=21086&&Dl!=21088&&Dl!=21089&&Dl!=21090&&Dl!=21093&&Dl!=21094&&Dl!=21095&&Dl!=21096&&Dl!=21097&&Dl!=21098&&Dl!=21100&&Dl!=21101&&Dl!=21102&&Dl!=21103&&Dl!=21104&&Dl!=21105&&Dl!=21110&&Dl!=21111&&Dl!=21112&&Dl!=21113&&Dl!=21114&&Dl!=21115&&Dl!=21116&&Dl!=21117&&Dl!=21118&&Dl!=21120&&Dl!=21121&&Dl!=21123&&Dl!=21124&&Dl!=21125&&Dl!=21126&&Dl!=21127&&Dl!=21128&&Dl!=21129&&Dl!=21133&&Dl!=21137&&Dl!=21138&&Dl!=21140&&Dl!=21142&&Dl!=21143&&Dl!=21144&&Dl!=21145&&Dl!=21146&&Dl!=21147&&Dl!=21151&&Dl!=21152&&Dl!=21153&&Dl!=21154&&Dl!=21155&&Dl!=21156&&Dl!=21157&&Dl!=21158&&Dl!=21159&&Dl!=21162&&Dl!=21163&&Dl!=21164&&Dl!=21166&&Dl!=21168&&Dl!=21170&&Dl!=21172&&Dl!=21173&&Dl!=21174&&Dl!=21176&&Dl!=21177&&Dl!=21178&&Dl!=21183&&Dl!=21184&&Dl!=21186&&Dl!=21190&&Dl!=21191&&Dl!=21192&&Dl!=21193&&Dl!=21194&&Dl!=21195&&Dl!=21198&&Dl!=21204&&Dl!=21205&&Dl!=21208&&Dl!=21210&&Dl!=21211&&Dl!=21212&&Dl!=21213&&Dl!=21214&&Dl!=21216&&Dl!=21217&&Dl!=21218&&Dl!=21219&&Dl!=21220&&Dl!=21221&&Dl!=21226&&Dl!=21227&&Dl!=21228&&Dl!=21229&&Dl!=21232&&Dl!=21234&&Dl!=21235&&Dl!=21236&&Dl!=21240&&Dl!=21241&&Dl!=21242&&Dl!=21243&&Dl!=21244&&Dl!=21245&&Dl!=21246&&Dl!=21248&&Dl!=21249&&Dl!=21252&&Dl!=21253&&Dl!=21254&&Dl!=21255&&Dl!=21258&&Dl!=21259&&Dl!=21262&&Dl!=21266&&Dl!=27141&&Dl!=27142&&Dl!=27144&&Dl!=27145&&Dl!=27146&&Dl!=27147&&Dl!=27180&&Dl!=27181&&Dl!=27182&&Dl!=27206&&Dl!=27208&&Dl!=27209&&Dl!=27210&&Dl!=27211&&Dl!=27213&&Dl!=27214&&Dl!=27215&&Dl!=27216&&Dl!=27217&&Dl!=27218&&Dl!=27219&&Dl!=27220&&Dl!=27221&&Dl!=27222&&Dl!=27224&&Dl!=27225&&Dl!=27226&&Dl!=27227&&Dl!=27229&&Dl!=27230&&Dl!=27232&&Dl!=27233&&Dl!=27234&&Dl!=27237&&Dl!=27238&&Dl!=27239&&Dl!=27240&&Dl!=27241&&Dl!=27242&&Dl!=27244&&Dl!=27245&&Dl!=27246&&Dl!=27247&&Dl!=27248&&Dl!=27249&&Dl!=27254&&Dl!=27255&&Dl!=27256&&Dl!=27257&&Dl!=27258&&Dl!=27259&&Dl!=27260&&Dl!=27261&&Dl!=27262&&Dl!=27264&&Dl!=27265&&Dl!=27267&&Dl!=27268&&Dl!=27269&&Dl!=27270&&Dl!=27271&&Dl!=27272&&Dl!=27273&&Dl!=27277&&Dl!=27281&&Dl!=27282&&Dl!=27284&&Dl!=27286&&Dl!=27287&&Dl!=27288&&Dl!=27289&&Dl!=27290&&Dl!=27291&&Dl!=27295&&Dl!=27296&&Dl!=27297&&Dl!=27298&&Dl!=27299&&Dl!=27300&&Dl!=27301&&Dl!=27302&&Dl!=27303&&Dl!=27306&&Dl!=27307&&Dl!=27308&&Dl!=27310&&Dl!=27312&&Dl!=27314&&Dl!=27316&&Dl!=27317&&Dl!=27318&&Dl!=27320&&Dl!=27321&&Dl!=27322&&Dl!=27327&&Dl!=27328&&Dl!=27330&&Dl!=27334&&Dl!=27335&&Dl!=27336&&Dl!=27337&&Dl!=27338&&Dl!=27339&&Dl!=27342&&Dl!=27348&&Dl!=27349&&Dl!=27352&&Dl!=27354&&Dl!=27355&&Dl!=27356&&Dl!=27357&&Dl!=27358&&Dl!=27360&&Dl!=27361&&Dl!=27362&&Dl!=27363&&Dl!=27364&&Dl!=27365&&Dl!=27370&&Dl!=27371&&Dl!=27372&&Dl!=27373&&Dl!=27376&&Dl!=27378&&Dl!=27379&&Dl!=27380&&Dl!=27384&&Dl!=27385&&Dl!=27386&&Dl!=27387&&Dl!=27388&&Dl!=27389&&Dl!=27390&&Dl!=27392&&Dl!=27393&&Dl!=27396&&Dl!=27397&&Dl!=27398&&Dl!=27399&&Dl!=27402&&Dl!=27403&&Dl!=27406&&Dl!=27410&&Dl!=90198&&Dl!=90214&&Dl!=113284&&Dl!=144389&&Dl!=144390&&Dl!=144392&&Dl!=144393&&Dl!=144394&&Dl!=144395&&Dl!=144428&&Dl!=144429&&Dl!=144430&&Dl!=144454&&Dl!=144456&&Dl!=144457&&Dl!=144458&&Dl!=144459&&Dl!=144461&&Dl!=144462&&Dl!=144463&&Dl!=144464&&Dl!=144465&&Dl!=144466&&Dl!=144467&&Dl!=144468&&Dl!=144469&&Dl!=144470&&Dl!=144472&&Dl!=144473&&Dl!=144474&&Dl!=144475&&Dl!=144477&&Dl!=144478&&Dl!=144480&&Dl!=144481&&Dl!=144482&&Dl!=144485&&Dl!=144486&&Dl!=144487&&Dl!=144488&&Dl!=144489&&Dl!=144490&&Dl!=144492&&Dl!=144493&&Dl!=144494&&Dl!=144495&&Dl!=144496&&Dl!=144497&&Dl!=144502&&Dl!=144503&&Dl!=144504&&Dl!=144505&&Dl!=144506&&Dl!=144507&&Dl!=144508&&Dl!=144509&&Dl!=144510&&Dl!=144512&&Dl!=144513&&Dl!=144515&&Dl!=144516&&Dl!=144517&&Dl!=144518&&Dl!=144519&&Dl!=144520&&Dl!=144521&&Dl!=144525&&Dl!=144529&&Dl!=144530&&Dl!=144532&&Dl!=144534&&Dl!=144535&&Dl!=144536&&Dl!=144537&&Dl!=144538&&Dl!=144539&&Dl!=144543&&Dl!=144544&&Dl!=144545&&Dl!=144546&&Dl!=144547&&Dl!=144548&&Dl!=144549&&Dl!=144550&&Dl!=144551&&Dl!=144554&&Dl!=144555&&Dl!=144556&&Dl!=144558&&Dl!=144560&&Dl!=144562&&Dl!=144564&&Dl!=144565&&Dl!=144566&&Dl!=144568&&Dl!=144569&&Dl!=144570&&Dl!=144575&&Dl!=144576&&Dl!=144578&&Dl!=144582&&Dl!=144583&&Dl!=144584&&Dl!=144585&&Dl!=144586&&Dl!=144587&&Dl!=144590&&Dl!=144596&&Dl!=144597&&Dl!=144600&&Dl!=144602&&Dl!=144603&&Dl!=144604&&Dl!=144605&&Dl!=144606&&Dl!=144608&&Dl!=144609&&Dl!=144610&&Dl!=144611&&Dl!=144612&&Dl!=144613&&Dl!=144618&&Dl!=144619&&Dl!=144620&&Dl!=144621&&Dl!=144624&&Dl!=144626&&Dl!=144627&&Dl!=144628&&Dl!=144632&&Dl!=144633&&Dl!=144634&&Dl!=144635&&Dl!=144636&&Dl!=144637&&Dl!=144638&&Dl!=144640&&Dl!=144641&&Dl!=144644&&Dl!=144645&&Dl!=144646&&Dl!=144647&&Dl!=144650&&Dl!=144651&&Dl!=144654&&Dl!=144658){Dl=Ol(6,Hl);if(Dl==0){var e=Pl,t=Hl,n=Bl,r=jl,i=Fl,s=Il,o=ql,u=Rl;try{$a(),Al(6,t,-1);continue}catch(a){Pl=e,Hl=t,Bl=n,Bl==0?Yl=t:(jl=r,Fl=i,Il=s,Il==0?Yl=i:(ql=o,Rl=u,Yl=u)),Al(6,t,-2);break}}}if(Dl!=-1&&Dl!=53&&Dl!=16134&&Dl!=27141&&Dl!=27142&&Dl!=27144&&Dl!=27145&&Dl!=27146&&Dl!=27147&&Dl!=27180&&Dl!=27181&&Dl!=27182&&Dl!=27206&&Dl!=27208&&Dl!=27209&&Dl!=27210&&Dl!=27211&&Dl!=27213&&Dl!=27214&&Dl!=27215&&Dl!=27216&&Dl!=27217&&Dl!=27218&&Dl!=27219&&Dl!=27220&&Dl!=27221&&Dl!=27222&&Dl!=27224&&Dl!=27225&&Dl!=27226&&Dl!=27227&&Dl!=27229&&Dl!=27230&&Dl!=27232&&Dl!=27233&&Dl!=27234&&Dl!=27237&&Dl!=27238&&Dl!=27239&&Dl!=27240&&Dl!=27241&&Dl!=27242&&Dl!=27244&&Dl!=27245&&Dl!=27246&&Dl!=27247&&Dl!=27248&&Dl!=27249&&Dl!=27254&&Dl!=27255&&Dl!=27256&&Dl!=27257&&Dl!=27258&&Dl!=27259&&Dl!=27260&&Dl!=27261&&Dl!=27262&&Dl!=27264&&Dl!=27265&&Dl!=27267&&Dl!=27268&&Dl!=27269&&Dl!=27270&&Dl!=27271&&Dl!=27272&&Dl!=27273&&Dl!=27277&&Dl!=27281&&Dl!=27282&&Dl!=27284&&Dl!=27286&&Dl!=27287&&Dl!=27288&&Dl!=27289&&Dl!=27290&&Dl!=27291&&Dl!=27295&&Dl!=27296&&Dl!=27297&&Dl!=27298&&Dl!=27299&&Dl!=27300&&Dl!=27301&&Dl!=27302&&Dl!=27303&&Dl!=27306&&Dl!=27307&&Dl!=27308&&Dl!=27310&&Dl!=27312&&Dl!=27314&&Dl!=27316&&Dl!=27317&&Dl!=27318&&Dl!=27320&&Dl!=27321&&Dl!=27322&&Dl!=27327&&Dl!=27328&&Dl!=27330&&Dl!=27334&&Dl!=27335&&Dl!=27336&&Dl!=27337&&Dl!=27338&&Dl!=27339&&Dl!=27342&&Dl!=27348&&Dl!=27349&&Dl!=27352&&Dl!=27354&&Dl!=27355&&Dl!=27356&&Dl!=27357&&Dl!=27358&&Dl!=27360&&Dl!=27361&&Dl!=27362&&Dl!=27363&&Dl!=27364&&Dl!=27365&&Dl!=27370&&Dl!=27371&&Dl!=27372&&Dl!=27373&&Dl!=27376&&Dl!=27378&&Dl!=27379&&Dl!=27380&&Dl!=27384&&Dl!=27385&&Dl!=27386&&Dl!=27387&&Dl!=27388&&Dl!=27389&&Dl!=27390&&Dl!=27392&&Dl!=27393&&Dl!=27396&&Dl!=27397&&Dl!=27398&&Dl!=27399&&Dl!=27402&&Dl!=27403&&Dl!=27406&&Dl!=27410&&Dl!=90198&&Dl!=90214&&Dl!=113284)break;$a()}}function Ua(){$l.startNonterminal("StatementsAndExpr",Hl),qa(),Sl(),Q(),$l.endNonterminal("StatementsAndExpr",Hl)}function za(){Ra(),G()}function Wa(){$l.startNonterminal("StatementsAndOptionalExpr",Hl),qa(),Bl!=25&&Bl!=282&&(Sl(),Q()),$l.endNonterminal("StatementsAndOptionalExpr",Hl)}function Xa(){Ra(),Bl!=25&&Bl!=282&&G()}function Va(){$l.startNonterminal("Statement",Hl);switch(Bl){case 132:Nl(189);break;case 137:Nl(196);break;case 174:Nl(193);break;case 250:Nl(190);break;case 262:Nl(187);break;case 276:Nl(277);break;case 31:case 32:Nl(255);break;case 86:case 102:Nl(188);break;case 152:case 243:case 253:case 267:Nl(185);break;default:Dl=Bl}if(Dl==2836||Dl==3103||Dl==3104||Dl==3348||Dl==4372||Dl==4884||Dl==5396||Dl==5908||Dl==16148||Dl==16660||Dl==17675||Dl==17684||Dl==18196||Dl==20756||Dl==21780||Dl==22804||Dl==23316||Dl==23828||Dl==24340||Dl==27412||Dl==27924||Dl==28436||Dl==30484||Dl==34068||Dl==35092||Dl==35871||Dl==35872||Dl==36116||Dl==36895||Dl==36896||Dl==37140||Dl==37407||Dl==37408||Dl==37652||Dl==37919||Dl==37920||Dl==38164||Dl==38431||Dl==38432||Dl==38676||Dl==39455||Dl==39456||Dl==39700||Dl==39967||Dl==39968||Dl==40212||Dl==40479||Dl==40480||Dl==40724||Dl==40991||Dl==40992||Dl==41236||Dl==41503||Dl==41504||Dl==41748||Dl==42015||Dl==42016||Dl==42260||Dl==42527||Dl==42528||Dl==42772||Dl==43039||Dl==43040||Dl==43284||Dl==43551||Dl==43552||Dl==43796||Dl==44063||Dl==44064||Dl==44308||Dl==45087||Dl==45088||Dl==45332||Dl==45599||Dl==45600||Dl==45844||Dl==46111||Dl==46112||Dl==46356||Dl==46623||Dl==46624||Dl==46868||Dl==47647||Dl==47648||Dl==47892||Dl==48159||Dl==48160||Dl==48404||Dl==49183||Dl==49184||Dl==49428||Dl==49695||Dl==49696||Dl==49940||Dl==50207||Dl==50208||Dl==50452||Dl==51743||Dl==51744||Dl==51988||Dl==52255||Dl==52256||Dl==52500||Dl==52767||Dl==52768||Dl==53012||Dl==53279||Dl==53280||Dl==53524||Dl==53791||Dl==53792||Dl==54036||Dl==54303||Dl==54304||Dl==54548||Dl==55327||Dl==55328||Dl==55572||Dl==55839||Dl==55840||Dl==56084||Dl==56351||Dl==56352||Dl==56596||Dl==56863||Dl==56864||Dl==57108||Dl==57375||Dl==57376||Dl==57620||Dl==57887||Dl==57888||Dl==58132||Dl==60447||Dl==60448||Dl==60692||Dl==60959||Dl==60960||Dl==61204||Dl==61471||Dl==61472||Dl==61716||Dl==61983||Dl==61984||Dl==62228||Dl==62495||Dl==62496||Dl==62740||Dl==63007||Dl==63008||Dl==63252||Dl==63519||Dl==63520||Dl==63764||Dl==64031||Dl==64032||Dl==64276||Dl==64543||Dl==64544||Dl==64788||Dl==65567||Dl==65568||Dl==65812||Dl==66079||Dl==66080||Dl==66324||Dl==67103||Dl==67104||Dl==67348||Dl==67615||Dl==67616||Dl==67860||Dl==68127||Dl==68128||Dl==68372||Dl==68639||Dl==68640||Dl==68884||Dl==69151||Dl==69152||Dl==69396||Dl==69663||Dl==69664||Dl==69908||Dl==70175||Dl==70176||Dl==70420||Dl==72223||Dl==72224||Dl==72468||Dl==74271||Dl==74272||Dl==74516||Dl==74783||Dl==74784||Dl==75028||Dl==75807||Dl==75808||Dl==76052||Dl==76831||Dl==76832||Dl==77076||Dl==77343||Dl==77344||Dl==77588||Dl==77855||Dl==77856||Dl==78100||Dl==78367||Dl==78368||Dl==78612||Dl==78879||Dl==78880||Dl==79124||Dl==79391||Dl==79392||Dl==79636||Dl==81439||Dl==81440||Dl==81684||Dl==81951||Dl==81952||Dl==82196||Dl==82463||Dl==82464||Dl==82708||Dl==82975||Dl==82976||Dl==83220||Dl==83487||Dl==83488||Dl==83732||Dl==83999||Dl==84e3||Dl==84244||Dl==84511||Dl==84512||Dl==84756||Dl==85023||Dl==85024||Dl==85268||Dl==85535||Dl==85536||Dl==85780||Dl==87071||Dl==87072||Dl==87316||Dl==87583||Dl==87584||Dl==87828||Dl==88095||Dl==88096||Dl==88340||Dl==89119||Dl==89120||Dl==89364||Dl==90143||Dl==90144||Dl==90388||Dl==91167||Dl==91168||Dl==91412||Dl==92191||Dl==92192||Dl==92436||Dl==92703||Dl==92704||Dl==92948||Dl==93215||Dl==93216||Dl==93460||Dl==94239||Dl==94240||Dl==94484||Dl==94751||Dl==94752||Dl==94996||Dl==95263||Dl==95264||Dl==95508||Dl==97823||Dl==97824||Dl==98068||Dl==98335||Dl==98336||Dl==98580||Dl==99359||Dl==99360||Dl==99604||Dl==101407||Dl==101408||Dl==101652||Dl==101919||Dl==101920||Dl==102164||Dl==102431||Dl==102432||Dl==102676||Dl==102943||Dl==102944||Dl==103188||Dl==103455||Dl==103456||Dl==103700||Dl==103967||Dl==103968||Dl==104212||Dl==105503||Dl==105504||Dl==105748||Dl==108575||Dl==108576||Dl==108820||Dl==109087||Dl==109088||Dl==109332||Dl==110623||Dl==110624||Dl==110868||Dl==111647||Dl==111648||Dl==111892||Dl==112159||Dl==112160||Dl==112404||Dl==112671||Dl==112672||Dl==112916||Dl==113183||Dl==113184||Dl==113428||Dl==113695||Dl==113696||Dl==113940||Dl==114719||Dl==114720||Dl==114964||Dl==115231||Dl==115232||Dl==115476||Dl==115743||Dl==115744||Dl==115988||Dl==116255||Dl==116256||Dl==116500||Dl==116767||Dl==116768||Dl==117012||Dl==117279||Dl==117280||Dl==117524||Dl==119839||Dl==119840||Dl==120084||Dl==120351||Dl==120352||Dl==120596||Dl==120863||Dl==120864||Dl==121108||Dl==121375||Dl==121376||Dl==121620||Dl==122911||Dl==122912||Dl==123156||Dl==123935||Dl==123936||Dl==124180||Dl==124447||Dl==124448||Dl==124692||Dl==124959||Dl==124960||Dl==125204||Dl==127007||Dl==127008||Dl==127252||Dl==127519||Dl==127520||Dl==127764||Dl==128031||Dl==128032||Dl==128276||Dl==128543||Dl==128544||Dl==128788||Dl==129055||Dl==129056||Dl==129300||Dl==129567||Dl==129568||Dl==129812||Dl==130079||Dl==130080||Dl==130324||Dl==131103||Dl==131104||Dl==131348||Dl==131615||Dl==131616||Dl==131860||Dl==133151||Dl==133152||Dl==133396||Dl==133663||Dl==133664||Dl==133908||Dl==134175||Dl==134176||Dl==134420||Dl==134687||Dl==134688||Dl==134932||Dl==136223||Dl==136224||Dl==136468||Dl==136735||Dl==136736||Dl==136980||Dl==138271||Dl==138272||Dl==138516||Dl==140319||Dl==140320||Dl==140564||Dl==141588||Dl==142612||Dl==144660){Dl=Ol(7,Hl);if(Dl==0){var e=Pl,t=Hl,n=Bl,r=jl,i=Fl,s=Il,o=ql,u=Rl;try{Ka(),Dl=-1}catch(a){try{Pl=e,Hl=t,Bl=n,Bl==0?Yl=t:(jl=r,Fl=i,Il=s,Il==0?Yl=i:(ql=o,Rl=u,Yl=u)),Ga(),Dl=-2}catch(f){try{Pl=e,Hl=t,Bl=n,Bl==0?Yl=t:(jl=r,Fl=i,Il=s,Il==0?Yl=i:(ql=o,Rl=u,Yl=u)),Za(),Dl=-3}catch(l){try{Pl=e,Hl=t,Bl=n,Bl==0?Yl=t:(jl=r,Fl=i,Il=s,Il==0?Yl=i:(ql=o,Rl=u,Yl=u)),Tf(),Dl=-12}catch(c){Dl=-13}}}}Pl=e,Hl=t,Bl=n,Bl==0?Yl=t:(jl=r,Fl=i,Il=s,Il==0?Yl=i:(ql=o,Rl=u,Yl=u)),Al(7,Hl,Dl)}}switch(Dl){case-2:Qa();break;case-3:Ya();break;case 90198:ef();break;case 90214:nf();break;case 113284:sf();break;case 16009:case 16046:case 116910:case 119945:case 128649:uf();break;case 17560:cf();break;case 17651:pf();break;case 141562:gf();break;case 17661:bf();break;case-12:case 16134:xf();break;case-13:Nf();break;case 53:kf();break;default:Ja()}$l.endNonterminal("Statement",Hl)}function $a(){switch(Bl){case 132:Nl(189);break;case 137:Nl(196);break;case 174:Nl(193);break;case 250:Nl(190);break;case 262:Nl(187);break;case 276:Nl(277);break;case 31:case 32:Nl(255);break;case 86:case 102:Nl(188);break;case 152:case 243:case 253:case 267:Nl(185);break;default:Dl=Bl}if(Dl==2836||Dl==3103||Dl==3104||Dl==3348||Dl==4372||Dl==4884||Dl==5396||Dl==5908||Dl==16148||Dl==16660||Dl==17675||Dl==17684||Dl==18196||Dl==20756||Dl==21780||Dl==22804||Dl==23316||Dl==23828||Dl==24340||Dl==27412||Dl==27924||Dl==28436||Dl==30484||Dl==34068||Dl==35092||Dl==35871||Dl==35872||Dl==36116||Dl==36895||Dl==36896||Dl==37140||Dl==37407||Dl==37408||Dl==37652||Dl==37919||Dl==37920||Dl==38164||Dl==38431||Dl==38432||Dl==38676||Dl==39455||Dl==39456||Dl==39700||Dl==39967||Dl==39968||Dl==40212||Dl==40479||Dl==40480||Dl==40724||Dl==40991||Dl==40992||Dl==41236||Dl==41503||Dl==41504||Dl==41748||Dl==42015||Dl==42016||Dl==42260||Dl==42527||Dl==42528||Dl==42772||Dl==43039||Dl==43040||Dl==43284||Dl==43551||Dl==43552||Dl==43796||Dl==44063||Dl==44064||Dl==44308||Dl==45087||Dl==45088||Dl==45332||Dl==45599||Dl==45600||Dl==45844||Dl==46111||Dl==46112||Dl==46356||Dl==46623||Dl==46624||Dl==46868||Dl==47647||Dl==47648||Dl==47892||Dl==48159||Dl==48160||Dl==48404||Dl==49183||Dl==49184||Dl==49428||Dl==49695||Dl==49696||Dl==49940||Dl==50207||Dl==50208||Dl==50452||Dl==51743||Dl==51744||Dl==51988||Dl==52255||Dl==52256||Dl==52500||Dl==52767||Dl==52768||Dl==53012||Dl==53279||Dl==53280||Dl==53524||Dl==53791||Dl==53792||Dl==54036||Dl==54303||Dl==54304||Dl==54548||Dl==55327||Dl==55328||Dl==55572||Dl==55839||Dl==55840||Dl==56084||Dl==56351||Dl==56352||Dl==56596||Dl==56863||Dl==56864||Dl==57108||Dl==57375||Dl==57376||Dl==57620||Dl==57887||Dl==57888||Dl==58132||Dl==60447||Dl==60448||Dl==60692||Dl==60959||Dl==60960||Dl==61204||Dl==61471||Dl==61472||Dl==61716||Dl==61983||Dl==61984||Dl==62228||Dl==62495||Dl==62496||Dl==62740||Dl==63007||Dl==63008||Dl==63252||Dl==63519||Dl==63520||Dl==63764||Dl==64031||Dl==64032||Dl==64276||Dl==64543||Dl==64544||Dl==64788||Dl==65567||Dl==65568||Dl==65812||Dl==66079||Dl==66080||Dl==66324||Dl==67103||Dl==67104||Dl==67348||Dl==67615||Dl==67616||Dl==67860||Dl==68127||Dl==68128||Dl==68372||Dl==68639||Dl==68640||Dl==68884||Dl==69151||Dl==69152||Dl==69396||Dl==69663||Dl==69664||Dl==69908||Dl==70175||Dl==70176||Dl==70420||Dl==72223||Dl==72224||Dl==72468||Dl==74271||Dl==74272||Dl==74516||Dl==74783||Dl==74784||Dl==75028||Dl==75807||Dl==75808||Dl==76052||Dl==76831||Dl==76832||Dl==77076||Dl==77343||Dl==77344||Dl==77588||Dl==77855||Dl==77856||Dl==78100||Dl==78367||Dl==78368||Dl==78612||Dl==78879||Dl==78880||Dl==79124||Dl==79391||Dl==79392||Dl==79636||Dl==81439||Dl==81440||Dl==81684||Dl==81951||Dl==81952||Dl==82196||Dl==82463||Dl==82464||Dl==82708||Dl==82975||Dl==82976||Dl==83220||Dl==83487||Dl==83488||Dl==83732||Dl==83999||Dl==84e3||Dl==84244||Dl==84511||Dl==84512||Dl==84756||Dl==85023||Dl==85024||Dl==85268||Dl==85535||Dl==85536||Dl==85780||Dl==87071||Dl==87072||Dl==87316||Dl==87583||Dl==87584||Dl==87828||Dl==88095||Dl==88096||Dl==88340||Dl==89119||Dl==89120||Dl==89364||Dl==90143||Dl==90144||Dl==90388||Dl==91167||Dl==91168||Dl==91412||Dl==92191||Dl==92192||Dl==92436||Dl==92703||Dl==92704||Dl==92948||Dl==93215||Dl==93216||Dl==93460||Dl==94239||Dl==94240||Dl==94484||Dl==94751||Dl==94752||Dl==94996||Dl==95263||Dl==95264||Dl==95508||Dl==97823||Dl==97824||Dl==98068||Dl==98335||Dl==98336||Dl==98580||Dl==99359||Dl==99360||Dl==99604||Dl==101407||Dl==101408||Dl==101652||Dl==101919||Dl==101920||Dl==102164||Dl==102431||Dl==102432||Dl==102676||Dl==102943||Dl==102944||Dl==103188||Dl==103455||Dl==103456||Dl==103700||Dl==103967||Dl==103968||Dl==104212||Dl==105503||Dl==105504||Dl==105748||Dl==108575||Dl==108576||Dl==108820||Dl==109087||Dl==109088||Dl==109332||Dl==110623||Dl==110624||Dl==110868||Dl==111647||Dl==111648||Dl==111892||Dl==112159||Dl==112160||Dl==112404||Dl==112671||Dl==112672||Dl==112916||Dl==113183||Dl==113184||Dl==113428||Dl==113695||Dl==113696||Dl==113940||Dl==114719||Dl==114720||Dl==114964||Dl==115231||Dl==115232||Dl==115476||Dl==115743||Dl==115744||Dl==115988||Dl==116255||Dl==116256||Dl==116500||Dl==116767||Dl==116768||Dl==117012||Dl==117279||Dl==117280||Dl==117524||Dl==119839||Dl==119840||Dl==120084||Dl==120351||Dl==120352||Dl==120596||Dl==120863||Dl==120864||Dl==121108||Dl==121375||Dl==121376||Dl==121620||Dl==122911||Dl==122912||Dl==123156||Dl==123935||Dl==123936||Dl==124180||Dl==124447||Dl==124448||Dl==124692||Dl==124959||Dl==124960||Dl==125204||Dl==127007||Dl==127008||Dl==127252||Dl==127519||Dl==127520||Dl==127764||Dl==128031||Dl==128032||Dl==128276||Dl==128543||Dl==128544||Dl==128788||Dl==129055||Dl==129056||Dl==129300||Dl==129567||Dl==129568||Dl==129812||Dl==130079||Dl==130080||Dl==130324||Dl==131103||Dl==131104||Dl==131348||Dl==131615||Dl==131616||Dl==131860||Dl==133151||Dl==133152||Dl==133396||Dl==133663||Dl==133664||Dl==133908||Dl==134175||Dl==134176||Dl==134420||Dl==134687||Dl==134688||Dl==134932||Dl==136223||Dl==136224||Dl==136468||Dl==136735||Dl==136736||Dl==136980||Dl==138271||Dl==138272||Dl==138516||Dl==140319||Dl==140320||Dl==140564||Dl==141588||Dl==142612||Dl==144660){Dl=Ol(7,Hl);if(Dl==0){var e=Pl,t=Hl,n=Bl,r=jl,i=Fl,s=Il,o=ql,u=Rl;try{Ka(),Al(7,t,-1),Dl=-15}catch(a){try{Pl=e,Hl=t,Bl=n,Bl==0?Yl=t:(jl=r,Fl=i,Il=s,Il==0?Yl=i:(ql=o,Rl=u,Yl=u)),Ga(),Al(7,t,-2),Dl=-15}catch(f){try{Pl=e,Hl=t,Bl=n,Bl==0?Yl=t:(jl=r,Fl=i,Il=s,Il==0?Yl=i:(ql=o,Rl=u,Yl=u)),Za(),Al(7,t,-3),Dl=-15}catch(l){try{Pl=e,Hl=t,Bl=n,Bl==0?Yl=t:(jl=r,Fl=i,Il=s,Il==0?Yl=i:(ql=o,Rl=u,Yl=u)),Tf(),Al(7,t,-12),Dl=-15}catch(c){Dl=-13,Pl=e,Hl=t,Bl=n,Bl==0?Yl=t:(jl=r,Fl=i,Il=s,Il==0?Yl=i:(ql=o,Rl=u,Yl=u)),Al(7,t,-13)}}}}}}switch(Dl){case-2:Ga();break;case-3:Za();break;case 90198:tf();break;case 90214:rf();break;case 113284:of();break;case 16009:case 16046:case 116910:case 119945:case 128649:af();break;case 17560:hf();break;case 17651:df();break;case 141562:yf();break;case 17661:wf();break;case-12:case 16134:Tf();break;case-13:Cf();break;case 53:Lf();break;case-15:break;default:Ka()}}function Ja(){$l.startNonterminal("ApplyStatement",Hl),Mf(),bl(53),$l.endNonterminal("ApplyStatement",Hl)}function Ka(){_f(),wl(53)}function Qa(){$l.startNonterminal("AssignStatement",Hl),bl(31),Tl(255),Sl(),fi(),Tl(27),bl(52),Tl(267),Sl(),Af(),bl(53),$l.endNonterminal("AssignStatement",Hl)}function Ga(){wl(31),Tl(255),li(),Tl(27),wl(52),Tl(267),Of(),wl(53)}function Ya(){$l.startNonterminal("BlockStatement",Hl),bl(276),Tl(277),Sl(),qa(),bl(282),$l.endNonterminal("BlockStatement",Hl)}function Za(){wl(276),Tl(277),Ra(),wl(282)}function ef(){$l.startNonterminal("BreakStatement",Hl),bl(86),Tl(59),bl(176),Tl(28),bl(53),$l.endNonterminal("BreakStatement",Hl)}function tf(){wl(86),Tl(59),wl(176),Tl(28),wl(53)}function nf(){$l.startNonterminal("ContinueStatement",Hl),bl(102),Tl(59),bl(176),Tl(28),bl(53),$l.endNonterminal("ContinueStatement",Hl)}function rf(){wl(102),Tl(59),wl(176),Tl(28),wl(53)}function sf(){$l.startNonterminal("ExitStatement",Hl),bl(132),Tl(71),bl(221),Tl(267),Sl(),Af(),bl(53),$l.endNonterminal("ExitStatement",Hl)}function of(){wl(132),Tl(71),wl(221),Tl(267),Of(),wl(53)}function uf(){$l.startNonterminal("FLWORStatement",Hl),et();for(;;){Tl(173);if(Bl==220)break;Sl(),nt()}Sl(),ff(),$l.endNonterminal("FLWORStatement",Hl)}function af(){tt();for(;;){Tl(173);if(Bl==220)break;rt()}lf()}function ff(){$l.startNonterminal("ReturnStatement",Hl),bl(220),Tl(270),Sl(),Va(),$l.endNonterminal("ReturnStatement",Hl)}function lf(){wl(220),Tl(270),$a()}function cf(){$l.startNonterminal("IfStatement",Hl),bl(152),Tl(22),bl(34),Tl(267),Sl(),Q(),bl(37),Tl(77),bl(245),Tl(270),Sl(),Va(),Tl(48),bl(122),Tl(270),Sl(),Va(),$l.endNonterminal("IfStatement",Hl)}function hf(){wl(152),Tl(22),wl(34),Tl(267),G(),wl(37),Tl(77),wl(245),Tl(270),$a(),Tl(48),wl(122),Tl(270),$a()}function pf(){$l.startNonterminal("SwitchStatement",Hl),bl(243),Tl(22),bl(34),Tl(267),Sl(),Q(),bl(37);for(;;){Tl(35),Sl(),vf(),Tl(113);if(Bl!=88)break}bl(109),Tl(70),bl(220),Tl(270),Sl(),Va(),$l.endNonterminal("SwitchStatement",Hl)}function df(){wl(243),Tl(22),wl(34),Tl(267),G(),wl(37);for(;;){Tl(35),mf(),Tl(113);if(Bl!=88)break}wl(109),Tl(70),wl(220),Tl(270),$a()}function vf(){$l.startNonterminal("SwitchCaseStatement",Hl);for(;;){bl(88),Tl(267),Sl(),cn();if(Bl!=88)break}bl(220),Tl(270),Sl(),Va(),$l.endNonterminal("SwitchCaseStatement",Hl)}function mf(){for(;;){wl(88),Tl(267),hn();if(Bl!=88)break}wl(220),Tl(270),$a()}function gf(){$l.startNonterminal("TryCatchStatement",Hl),bl(250),Tl(87),Sl(),Ya();for(;;){Tl(36),bl(91),Tl(257),Sl(),An(),Sl(),Ya(),Tl(278);switch(Bl){case 91:Nl(279);break;default:Dl=Bl}if(Dl==38491||Dl==45659||Dl==46171||Dl==60507||Dl==65627||Dl==67163||Dl==74843||Dl==76891||Dl==77403||Dl==82011||Dl==83035||Dl==84059||Dl==88155||Dl==91227||Dl==92251||Dl==95323||Dl==102491||Dl==127067||Dl==127579||Dl==130139){Dl=Ol(8,Hl);if(Dl==0){var e=Pl,t=Hl,n=Bl,r=jl,i=Fl,s=Il,o=ql,u=Rl;try{Tl(36),wl(91),Tl(257),On(),Za(),Dl=-1}catch(a){Dl=-2}Pl=e,Hl=t,Bl=n,Bl==0?Yl=t:(jl=r,Fl=i,Il=s,Il==0?Yl=i:(ql=o,Rl=u,Yl=u)),Al(8,Hl,Dl)}}if(Dl!=-1&&Dl!=2651&&Dl!=3163&&Dl!=35931&&Dl!=36955&&Dl!=37467&&Dl!=37979&&Dl!=39515&&Dl!=40027&&Dl!=40539&&Dl!=41051&&Dl!=41563&&Dl!=42075&&Dl!=42587&&Dl!=43099&&Dl!=43611&&Dl!=44123&&Dl!=45147&&Dl!=46683&&Dl!=47707&&Dl!=48219&&Dl!=49243&&Dl!=49755&&Dl!=50267&&Dl!=51803&&Dl!=52315&&Dl!=52827&&Dl!=53339&&Dl!=53851&&Dl!=54363&&Dl!=55387&&Dl!=55899&&Dl!=56411&&Dl!=56923&&Dl!=57435&&Dl!=57947&&Dl!=61019&&Dl!=61531&&Dl!=62043&&Dl!=62555&&Dl!=63067&&Dl!=63579&&Dl!=64091&&Dl!=64603&&Dl!=66139&&Dl!=67675&&Dl!=68187&&Dl!=68699&&Dl!=69211&&Dl!=69723&&Dl!=70235&&Dl!=72283&&Dl!=74331&&Dl!=75867&&Dl!=77915&&Dl!=78427&&Dl!=78939&&Dl!=79451&&Dl!=81499&&Dl!=82523&&Dl!=83547&&Dl!=84571&&Dl!=85083&&Dl!=85595&&Dl!=87131&&Dl!=87643&&Dl!=89179&&Dl!=90203&&Dl!=92763&&Dl!=93275&&Dl!=94299&&Dl!=94811&&Dl!=97883&&Dl!=98395&&Dl!=99419&&Dl!=101467&&Dl!=101979&&Dl!=103003&&Dl!=103515&&Dl!=104027&&Dl!=105563&&Dl!=108635&&Dl!=109147&&Dl!=110683&&Dl!=111707&&Dl!=112219&&Dl!=112731&&Dl!=113243&&Dl!=113755&&Dl!=114779&&Dl!=115291&&Dl!=115803&&Dl!=116315&&Dl!=116827&&Dl!=117339&&Dl!=119899&&Dl!=120411&&Dl!=120923&&Dl!=121435&&Dl!=122971&&Dl!=123995&&Dl!=124507&&Dl!=125019&&Dl!=128091&&Dl!=128603&&Dl!=129115&&Dl!=129627&&Dl!=131163&&Dl!=131675&&Dl!=133211&&Dl!=133723&&Dl!=134235&&Dl!=134747&&Dl!=136283&&Dl!=136795&&Dl!=138331&&Dl!=140379)break}$l.endNonterminal("TryCatchStatement",Hl)}function yf(){wl(250),Tl(87),Za(),Tl(36),wl(91),Tl(257),On(),Za();for(;;){Tl(278);switch(Bl){case 91:Nl(279);break;default:Dl=Bl}if(Dl==38491||Dl==45659||Dl==46171||Dl==60507||Dl==65627||Dl==67163||Dl==74843||Dl==76891||Dl==77403||Dl==82011||Dl==83035||Dl==84059||Dl==88155||Dl==91227||Dl==92251||Dl==95323||Dl==102491||Dl==127067||Dl==127579||Dl==130139){Dl=Ol(8,Hl);if(Dl==0){var e=Pl,t=Hl,n=Bl,r=jl,i=Fl,s=Il,o=ql,u=Rl;try{Tl(36),wl(91),Tl(257),On(),Za(),Al(8,t,-1);continue}catch(a){Pl=e,Hl=t,Bl=n,Bl==0?Yl=t:(jl=r,Fl=i,Il=s,Il==0?Yl=i:(ql=o,Rl=u,Yl=u)),Al(8,t,-2);break}}}if(Dl!=-1&&Dl!=2651&&Dl!=3163&&Dl!=35931&&Dl!=36955&&Dl!=37467&&Dl!=37979&&Dl!=39515&&Dl!=40027&&Dl!=40539&&Dl!=41051&&Dl!=41563&&Dl!=42075&&Dl!=42587&&Dl!=43099&&Dl!=43611&&Dl!=44123&&Dl!=45147&&Dl!=46683&&Dl!=47707&&Dl!=48219&&Dl!=49243&&Dl!=49755&&Dl!=50267&&Dl!=51803&&Dl!=52315&&Dl!=52827&&Dl!=53339&&Dl!=53851&&Dl!=54363&&Dl!=55387&&Dl!=55899&&Dl!=56411&&Dl!=56923&&Dl!=57435&&Dl!=57947&&Dl!=61019&&Dl!=61531&&Dl!=62043&&Dl!=62555&&Dl!=63067&&Dl!=63579&&Dl!=64091&&Dl!=64603&&Dl!=66139&&Dl!=67675&&Dl!=68187&&Dl!=68699&&Dl!=69211&&Dl!=69723&&Dl!=70235&&Dl!=72283&&Dl!=74331&&Dl!=75867&&Dl!=77915&&Dl!=78427&&Dl!=78939&&Dl!=79451&&Dl!=81499&&Dl!=82523&&Dl!=83547&&Dl!=84571&&Dl!=85083&&Dl!=85595&&Dl!=87131&&Dl!=87643&&Dl!=89179&&Dl!=90203&&Dl!=92763&&Dl!=93275&&Dl!=94299&&Dl!=94811&&Dl!=97883&&Dl!=98395&&Dl!=99419&&Dl!=101467&&Dl!=101979&&Dl!=103003&&Dl!=103515&&Dl!=104027&&Dl!=105563&&Dl!=108635&&Dl!=109147&&Dl!=110683&&Dl!=111707&&Dl!=112219&&Dl!=112731&&Dl!=113243&&Dl!=113755&&Dl!=114779&&Dl!=115291&&Dl!=115803&&Dl!=116315&&Dl!=116827&&Dl!=117339&&Dl!=119899&&Dl!=120411&&Dl!=120923&&Dl!=121435&&Dl!=122971&&Dl!=123995&&Dl!=124507&&Dl!=125019&&Dl!=128091&&Dl!=128603&&Dl!=129115&&Dl!=129627&&Dl!=131163&&Dl!=131675&&Dl!=133211&&Dl!=133723&&Dl!=134235&&Dl!=134747&&Dl!=136283&&Dl!=136795&&Dl!=138331&&Dl!=140379)break;Tl(36),wl(91),Tl(257),On(),Za()}}function bf(){$l.startNonterminal("TypeswitchStatement",Hl),bl(253),Tl(22),bl(34),Tl(267),Sl(),Q(),bl(37);for(;;){Tl(35),Sl(),Ef(),Tl(113);if(Bl!=88)break}bl(109),Tl(95),Bl==31&&(bl(31),Tl(255),Sl(),fi()),Tl(70),bl(220),Tl(270),Sl(),Va(),$l.endNonterminal("TypeswitchStatement",Hl)}function wf(){wl(253),Tl(22),wl(34),Tl(267),G(),wl(37);for(;;){Tl(35),Sf(),Tl(113);if(Bl!=88)break}wl(109),Tl(95),Bl==31&&(wl(31),Tl(255),li()),Tl(70),wl(220),Tl(270),$a()}function Ef(){$l.startNonterminal("CaseStatement",Hl),bl(88),Tl(262),Bl==31&&(bl(31),Tl(255),Sl(),fi(),Tl(30),bl(79)),Tl(260),Sl(),ps(),Tl(70),bl(220),Tl(270),Sl(),Va(),$l.endNonterminal("CaseStatement",Hl)}function Sf(){wl(88),Tl(262),Bl==31&&(wl(31),Tl(255),li(),Tl(30),wl(79)),Tl(260),ds(),Tl(70),wl(220),Tl(270),$a()}function xf(){$l.startNonterminal("VarDeclStatement",Hl);for(;;){Tl(98);if(Bl!=32)break;Sl(),H()}bl(262),Tl(21),bl(31),Tl(255),Sl(),fi(),Tl(157),Bl==79&&(Sl(),cs()),Tl(145),Bl==52&&(bl(52),Tl(267),Sl(),Af());for(;;){if(Bl!=41)break;bl(41),Tl(21),bl(31),Tl(255),Sl(),fi(),Tl(157),Bl==79&&(Sl(),cs()),Tl(145),Bl==52&&(bl(52),Tl(267),Sl(),Af())}bl(53),$l.endNonterminal("VarDeclStatement",Hl)}function Tf(){for(;;){Tl(98);if(Bl!=32)break;B()}wl(262),Tl(21),wl(31),Tl(255),li(),Tl(157),Bl==79&&hs(),Tl(145),Bl==52&&(wl(52),Tl(267),Of());for(;;){if(Bl!=41)break;wl(41),Tl(21),wl(31),Tl(255),li(),Tl(157),Bl==79&&hs(),Tl(145),Bl==52&&(wl(52),Tl(267),Of())}wl(53)}function Nf(){$l.startNonterminal("WhileStatement",Hl),bl(267),Tl(22),bl(34),Tl(267),Sl(),Q(),bl(37),Tl(270),Sl(),Va(),$l.endNonterminal("WhileStatement",Hl)}function Cf(){wl(267),Tl(22),wl(34),Tl(267),G(),wl(37),Tl(270),$a()}function kf(){$l.startNonterminal("VoidStatement",Hl),bl(53),$l.endNonterminal("VoidStatement",Hl)}function Lf(){wl(53)}function Af(){$l.startNonterminal("ExprSingle",Hl);switch(Bl){case 137:Nl(236);break;case 174:Nl(233);break;case 250:Nl(232);break;case 152:case 243:case 253:Nl(229);break;default:Dl=Bl}switch(Dl){case 16009:case 16046:case 116910:case 119945:case 128649:Y();break;case 17560:bn();break;case 17651:un();break;case 141562:En();break;case 17661:pn();break;default:Mf()}$l.endNonterminal("ExprSingle",Hl)}function Of(){switch(Bl){case 137:Nl(236);break;case 174:Nl(233);break;case 250:Nl(232);break;case 152:case 243:case 253:Nl(229);break;default:Dl=Bl}switch(Dl){case 16009:case 16046:case 116910:case 119945:case 128649:Z();break;case 17560:wn();break;case 17651:an();break;case 141562:Sn();break;case 17661:dn();break;default:_f()}}function Mf(){$l.startNonterminal("ExprSimple",Hl);switch(Bl){case 77:Nl(231);break;case 218:Nl(234);break;case 219:Nl(235);break;case 110:case 159:Nl(237);break;case 103:case 129:case 235:Nl(230);break;default:Dl=Bl}if(Dl==133851){Dl=Ol(9,Hl);if(Dl==0){var e=Pl,t=Hl,n=Bl,r=jl,i=Fl,s=Il,o=ql,u=Rl;try{_o(),Dl=-6}catch(a){Dl=-11}Pl=e,Hl=t,Bl=n,Bl==0?Yl=t:(jl=r,Fl=i,Il=s,Il==0?Yl=i:(ql=o,Rl=u,Yl=u)),Al(9,Hl,Dl)}}switch(Dl){case 16001:case 16107:sn();break;case 97951:case 98463:ko();break;case 97902:case 98414:Ao();break;case 98010:Do();break;case-6:case 98011:Mo();break;case 15975:Ro();break;case 85102:Df();break;case 85151:Hf();break;case 85210:jf();break;case-11:If();break;case 85069:Rf();break;default:Mn()}$l.endNonterminal("ExprSimple",Hl)}function _f(){switch(Bl){case 77:Nl(231);break;case 218:Nl(234);break;case 219:Nl(235);break;case 110:case 159:Nl(237);break;case 103:case 129:case 235:Nl(230);break;default:Dl=Bl}if(Dl==133851){Dl=Ol(9,Hl);if(Dl==0){var e=Pl,t=Hl,n=Bl,r=jl,i=Fl,s=Il,o=ql,u=Rl;try{_o(),Al(9,t,-6),Dl=-13}catch(a){Dl=-11,Pl=e,Hl=t,Bl=n,Bl==0?Yl=t:(jl=r,Fl=i,Il=s,Il==0?Yl=i:(ql=o,Rl=u,Yl=u)),Al(9,t,-11)}}}switch(Dl){case 16001:case 16107:on();break;case 97951:case 98463:Lo();break;case 97902:case 98414:Oo();break;case 98010:Po();break;case-6:case 98011:_o();break;case 15975:Uo();break;case 85102:Pf();break;case 85151:Bf();break;case 85210:Ff();break;case-11:qf();break;case 85069:Uf();break;case-13:break;default:_n()}}function Df(){$l.startNonterminal("JSONDeleteExpr",Hl),bl(110),Tl(56),bl(166),Tl(264),Sl(),Kr(),$l.endNonterminal("JSONDeleteExpr",Hl)}function Pf(){wl(110),Tl(56),wl(166),Tl(264),Qr()}function Hf(){$l.startNonterminal("JSONInsertExpr",Hl);switch(Bl){case 159:Nl(56);break;default:Dl=Bl}Dl=Ol(10,Hl);if(Dl==0){var e=Pl,t=Hl,n=Bl,r=jl,i=Fl,s=Il,o=ql,u=Rl;try{wl(159),Tl(56),wl(166),Tl(267),Of(),wl(163),Tl(267),Of();switch(Bl){case 81:Nl(69);break;default:Dl=Bl}if(Dl==108113){Dl=Ol(11,Hl);if(Dl==0){var a=Pl,f=Hl,l=Bl,c=jl,h=Fl,p=Il,d=ql,v=Rl;try{wl(81),Tl(69),wl(211),Tl(267),Of(),Al(11,f,-1)}catch(m){Pl=a,Hl=f,Bl=l,Bl==0?Yl=f:(jl=c,Fl=h,Il=p,Il==0?Yl=h:(ql=d,Rl=v,Yl=v)),Al(11,f,-2)}Dl=-2}}Dl==-1&&(wl(81),Tl(69),wl(211),Tl(267),Of()),Dl=-1}catch(g){Dl=-2}Pl=e,Hl=t,Bl=n,Bl==0?Yl=t:(jl=r,Fl=i,Il=s,Il==0?Yl=i:(ql=o,Rl=u,Yl=u)),Al(10,Hl,Dl)}switch(Dl){case-1:bl(159),Tl(56),bl(166),Tl(267),Sl(),Af(),bl(163),Tl(267),Sl(),Af();switch(Bl){case 81:Nl(69);break;default:Dl=Bl}if(Dl==108113){Dl=Ol(11,Hl);if(Dl==0){var a=Pl,f=Hl,l=Bl,c=jl,h=Fl,p=Il,d=ql,v=Rl;try{wl(81),Tl(69),wl(211),Tl(267),Of(),Dl=-1}catch(m){Dl=-2}Pl=a,Hl=f,Bl=l,Bl==0?Yl=f:(jl=c,Fl=h,Il=p,Il==0?Yl=h:(ql=d,Rl=v,Yl=v)),Al(11,Hl,Dl)}}Dl==-1&&(bl(81),Tl(69),bl(211),Tl(267),Sl(),Af());break;default:bl(159),Tl(56),bl(166),Tl(267),Sl(),fl(),bl(163),Tl(267),Sl(),Af()}$l.endNonterminal("JSONInsertExpr",Hl)}function Bf(){switch(Bl){case 159:Nl(56);break;default:Dl=Bl}Dl=Ol(10,Hl);if(Dl==0){var e=Pl,t=Hl,n=Bl,r=jl,i=Fl,s=Il,o=ql,u=Rl;try{wl(159),Tl(56),wl(166),Tl(267),Of(),wl(163),Tl(267),Of();switch(Bl){case 81:Nl(69);break;default:Dl=Bl}if(Dl==108113){Dl=Ol(11,Hl);if(Dl==0){var a=Pl,f=Hl,l=Bl,c=jl,h=Fl,p=Il,d=ql,v=Rl;try{wl(81),Tl(69),wl(211),Tl(267),Of(),Al(11,f,-1)}catch(m){Pl=a,Hl=f,Bl=l,Bl==0?Yl=f:(jl=c,Fl=h,Il=p,Il==0?Yl=h:(ql=d,Rl=v,Yl=v)),Al(11,f,-2)}Dl=-2}}Dl==-1&&(wl(81),Tl(69),wl(211),Tl(267),Of()),Al(10,t,-1),Dl=-3}catch(g){Dl=-2,Pl=e,Hl=t,Bl=n,Bl==0?Yl=t:(jl=r,Fl=i,Il=s,Il==0?Yl=i:(ql=o,Rl=u,Yl=u)),Al(10,t,-2)}}switch(Dl){case-1:wl(159),Tl(56),wl(166),Tl(267),Of(),wl(163),Tl(267),Of();switch(Bl){case 81:Nl(69);break;default:Dl=Bl}if(Dl==108113){Dl=Ol(11,Hl);if(Dl==0){var a=Pl,f=Hl,l=Bl,c=jl,h=Fl,p=Il,d=ql,v=Rl;try{wl(81),Tl(69),wl(211),Tl(267),Of(),Al(11,f,-1)}catch(m){Pl=a,Hl=f,Bl=l,Bl==0?Yl=f:(jl=c,Fl=h,Il=p,Il==0?Yl=h:(ql=d,Rl=v,Yl=v)),Al(11,f,-2)}Dl=-2}}Dl==-1&&(wl(81),Tl(69),wl(211),Tl(267),Of());break;case-3:break;default:wl(159),Tl(56),wl(166),Tl(267),ll(),wl(163),Tl(267),Of()}}function jf(){$l.startNonterminal("JSONRenameExpr",Hl),bl(218),Tl(56),bl(166),Tl(264),Sl(),Kr(),bl(79),Tl(267),Sl(),Af(),$l.endNonterminal("JSONRenameExpr",Hl)}function Ff(){wl(218),Tl(56),wl(166),Tl(264),Qr(),wl(79),Tl(267),Of()}function If(){$l.startNonterminal("JSONReplaceExpr",Hl),bl(219),Tl(82),bl(261),Tl(64),bl(196),Tl(56),bl(166),Tl(264),Sl(),Kr(),bl(270),Tl(267),Sl(),Af(),$l.endNonterminal("JSONReplaceExpr",Hl)}function qf(){wl(219),Tl(82),wl(261),Tl(64),wl(196),Tl(56),wl(166),Tl(264),Qr(),wl(270),Tl(267),Of()}function Rf(){$l.startNonterminal("JSONAppendExpr",Hl),bl(77),Tl(56),bl(166),Tl(267),Sl(),Af(),bl(163),Tl(267),Sl(),Af(),$l.endNonterminal("JSONAppendExpr",Hl)}function Uf(){wl(77),Tl(56),wl(166),Tl(267),Of(),wl(163),Tl(267),Of()}function zf(){$l.startNonterminal("CommonContent",Hl);switch(Bl){case 12:bl(12);break;case 23:bl(23);break;case 277:bl(277);break;case 283:bl(283);break;default:vl()}$l.endNonterminal("CommonContent",Hl)}function Wf(){switch(Bl){case 12:wl(12);break;case 23:wl(23);break;case 277:wl(277);break;case 283:wl(283);break;default:ml()}}function Xf(){$l.startNonterminal("ContentExpr",Hl),Ua(),$l.endNonterminal("ContentExpr",Hl)}function Vf(){za()}function $f(){$l.startNonterminal("CompDocConstructor",Hl),bl(119),Tl(87),Sl(),vl(),$l.endNonterminal("CompDocConstructor",Hl)}function Jf(){wl(119),Tl(87),ml()}function Kf(){$l.startNonterminal("CompAttrConstructor",Hl),bl(82),Tl(258);switch(Bl){case 276:bl(276),Tl(267),Sl(),Q(),bl(282);break;default:Sl(),_a()}Tl(87);switch(Bl){case 276:Nl(277);break;default:Dl=Bl}if(Dl==144660){Dl=Ol(12,Hl);if(Dl==0){var e=Pl,t=Hl,n=Bl,r=jl,i=Fl,s=Il,o=ql,u=Rl;try{wl(276),Tl(88),wl(282),Dl=-1}catch(a){Dl=-2}Pl=e,Hl=t,Bl=n,Bl==0?Yl=t:(jl=r,Fl=i,Il=s,Il==0?Yl=i:(ql=o,Rl=u,Yl=u)),Al(12,Hl,Dl)}}switch(Dl){case-1:bl(276),Tl(88),bl(282);break;default:Sl(),vl()}$l.endNonterminal("CompAttrConstructor",Hl)}function Qf(){wl(82),Tl(258);switch(Bl){case 276:wl(276),Tl(267),G(),wl(282);break;default:Da()}Tl(87);switch(Bl){case 276:Nl(277);break;default:Dl=Bl}if(Dl==144660){Dl=Ol(12,Hl);if(Dl==0){var e=Pl,t=Hl,n=Bl,r=jl,i=Fl,s=Il,o=ql,u=Rl;try{wl(276),Tl(88),wl(282),Al(12,t,-1),Dl=-3}catch(a){Dl=-2,Pl=e,Hl=t,Bl=n,Bl==0?Yl=t:(jl=r,Fl=i,Il=s,Il==0?Yl=i:(ql=o,Rl=u,Yl=u)),Al(12,t,-2)}}}switch(Dl){case-1:wl(276),Tl(88),wl(282);break;case-3:break;default:ml()}}function Gf(){$l.startNonterminal("CompPIConstructor",Hl),bl(216),Tl(251);switch(Bl){case 276:bl(276),Tl(267),Sl(),Q(),bl(282);break;default:Sl(),Ba()}Tl(87);switch(Bl){case 276:Nl(277);break;default:Dl=Bl}if(Dl==144660){Dl=Ol(13,Hl);if(Dl==0){var e=Pl,t=Hl,n=Bl,r=jl,i=Fl,s=Il,o=ql,u=Rl;try{wl(276),Tl(88),wl(282),Dl=-1}catch(a){Dl=-2}Pl=e,Hl=t,Bl=n,Bl==0?Yl=t:(jl=r,Fl=i,Il=s,Il==0?Yl=i:(ql=o,Rl=u,Yl=u)),Al(13,Hl,Dl)}}switch(Dl){case-1:bl(276),Tl(88),bl(282);break;default:Sl(),vl()}$l.endNonterminal("CompPIConstructor",Hl)}function Yf(){wl(216),Tl(251);switch(Bl){case 276:wl(276),Tl(267),G(),wl(282);break;default:ja()}Tl(87);switch(Bl){case 276:Nl(277);break;default:Dl=Bl}if(Dl==144660){Dl=Ol(13,Hl);if(Dl==0){var e=Pl,t=Hl,n=Bl,r=jl,i=Fl,s=Il,o=ql,u=Rl;try{wl(276),Tl(88),wl(282),Al(13,t,-1),Dl=-3}catch(a){Dl=-2,Pl=e,Hl=t,Bl=n,Bl==0?Yl=t:(jl=r,Fl=i,Il=s,Il==0?Yl=i:(ql=o,Rl=u,Yl=u)),Al(13,t,-2)}}}switch(Dl){case-1:wl(276),Tl(88),wl(282);break;case-3:break;default:ml()}}function Zf(){$l.startNonterminal("CompCommentConstructor",Hl),bl(96),Tl(87),Sl(),vl(),$l.endNonterminal("CompCommentConstructor",Hl)}function el(){wl(96),Tl(87),ml()}function tl(){$l.startNonterminal("CompTextConstructor",Hl),bl(244),Tl(87),Sl(),vl(),$l.endNonterminal("CompTextConstructor",Hl)}function nl(){wl(244),Tl(87),ml()}function rl(){$l.startNonterminal("PrimaryExpr",Hl);switch(Bl){case 184:Nl(256);break;case 216:Nl(254);break;case 276:Nl(277);break;case 82:case 121:Nl(259);break;case 96:case 244:Nl(93);break;case 119:case 202:case 256:Nl(139);break;case 6:case 70:case 72:case 73:case 74:case 75:case 77:case 79:case 80:case 81:case 83:case 84:case 85:case 86:case 88:case 89:case 90:case 91:case 93:case 94:case 97:case 98:case 101:case 102:case 103:case 104:case 105:case 106:case 108:case 109:case 110:case 111:case 112:case 113:case 118:case 122:case 123:case 125:case 126:case 128:case 129:case 131:case 132:case 133:case 134:case 135:case 136:case 137:case 141:case 146:case 148:case 150:case 151:case 153:case 154:case 155:case 159:case 160:case 161:case 162:case 163:case 164:case 166:case 170:case 171:case 172:case 174:case 176:case 178:case 180:case 181:case 182:case 186:case 192:case 194:case 198:case 199:case 200:case 201:case 203:case 206:case 212:case 213:case 218:case 219:case 220:case 221:case 222:case 224:case 225:case 228:case 229:case 234:case 235:case 236:case 237:case 240:case 248:case 249:case 250:case 251:case 252:case 254:case 257:case 260:case 261:case 262:case 263:case 266:case 267:case 270:case 274:Nl(92);break;default:Dl=Bl}if(Dl==2836||Dl==3348||Dl==4372||Dl==4884||Dl==5396||Dl==5908||Dl==16148||Dl==16660||Dl==17684||Dl==18196||Dl==20756||Dl==21780||Dl==22804||Dl==23316||Dl==23828||Dl==24340||Dl==27924||Dl==28436||Dl==30484||Dl==34068||Dl==35092||Dl==36116||Dl==37140||Dl==37652||Dl==38164||Dl==38676||Dl==39700||Dl==40212||Dl==40724||Dl==41236||Dl==41748||Dl==42260||Dl==42772||Dl==43284||Dl==43796||Dl==44308||Dl==45332||Dl==45844||Dl==46356||Dl==46868||Dl==47892||Dl==48404||Dl==49428||Dl==49940||Dl==50452||Dl==51988||Dl==52500||Dl==53012||Dl==53524||Dl==54036||Dl==54548||Dl==55572||Dl==56084||Dl==56596||Dl==57108||Dl==57620||Dl==58132||Dl==60692||Dl==61204||Dl==61716||Dl==62228||Dl==62740||Dl==63252||Dl==63764||Dl==64276||Dl==64788||Dl==65812||Dl==66324||Dl==67348||Dl==67860||Dl==68372||Dl==68884||Dl==69396||Dl==69908||Dl==70420||Dl==72468||Dl==74516||Dl==75028||Dl==76052||Dl==77076||Dl==77588||Dl==78100||Dl==78612||Dl==79124||Dl==79636||Dl==81684||Dl==82196||Dl==82708||Dl==83220||Dl==83732||Dl==84244||Dl==84756||Dl==85268||Dl==85780||Dl==87316||Dl==87828||Dl==88340||Dl==89364||Dl==90388||Dl==91412||Dl==92436||Dl==92948||Dl==93460||Dl==94484||Dl==94996||Dl==95508||Dl==98068||Dl==98580||Dl==99604||Dl==101652||Dl==102164||Dl==102676||Dl==103188||Dl==103700||Dl==104212||Dl==105748||Dl==108820||Dl==109332||Dl==110868||Dl==111892||Dl==112404||Dl==112916||Dl==113428||Dl==113940||Dl==114964||Dl==115476||Dl==115988||Dl==116500||Dl==117012||Dl==117524||Dl==120084||Dl==120596||Dl==121108||Dl==121620||Dl==123156||Dl==124180||Dl==124692||Dl==125204||Dl==127252||Dl==127764||Dl==128276||Dl==128788||Dl==129300||Dl==129812||Dl==130324||Dl==131348||Dl==131860||Dl==133396||Dl==133908||Dl==134420||Dl==134932||Dl==136468||Dl==136980||Dl==138516||Dl==140564||Dl==141588||Dl==142612||Dl==144660){Dl=Ol(14,Hl);if(Dl==0){var e=Pl,t=Hl,n=Bl,r=jl,i=Fl,s=Il,o=ql,u=Rl;try{ml(),Dl=-10}catch(a){Dl=-11}Pl=e,Hl=t,Bl=n,Bl==0?Yl=t:(jl=r,Fl=i,Il=s,Il==0?Yl=i:(ql=o,Rl=u,Yl=u)),Al(14,Hl,Dl)}}switch(Dl){case 8:case 9:case 10:case 11:ri();break;case 31:ui();break;case 34:ci();break;case 44:pi();break;case 17414:case 17478:case 17480:case 17481:case 17482:case 17483:case 17485:case 17487:case 17488:case 17489:case 17491:case 17492:case 17493:case 17494:case 17496:case 17497:case 17498:case 17499:case 17501:case 17502:case 17505:case 17506:case 17509:case 17510:case 17511:case 17512:case 17513:case 17514:case 17516:case 17517:case 17518:case 17519:case 17520:case 17521:case 17526:case 17527:case 17530:case 17531:case 17533:case 17534:case 17536:case 17537:case 17539:case 17540:case 17541:case 17542:case 17543:case 17544:case 17545:case 17549:case 17554:case 17556:case 17558:case 17559:case 17561:case 17562:case 17563:case 17567:case 17568:case 17569:case 17570:case 17571:case 17572:case 17574:case 17578:case 17579:case 17580:case 17582:case 17584:case 17586:case 17588:case 17589:case 17590:case 17592:case 17594:case 17600:case 17602:case 17606:case 17607:case 17608:case 17609:case 17610:case 17611:case 17614:case 17620:case 17621:case 17626:case 17627:case 17628:case 17629:case 17630:case 17632:case 17633:case 17636:case 17637:case 17642:case 17643:case 17644:case 17645:case 17648:case 17656:case 17657:case 17658:case 17659:case 17660:case 17662:case 17664:case 17665:case 17668:case 17669:case 17670:case 17671:case 17674:case 17675:case 17678:case 17682:bi();break;case 141514:vi();break;case 141568:gi();break;case 32:case 78:case 120:case 124:case 145:case 152:case 165:case 167:case 185:case 191:case 226:case 227:case 242:case 243:case 253:case 14854:case 14918:case 14920:case 14921:case 14922:case 14923:case 14925:case 14927:case 14928:case 14929:case 14930:case 14931:case 14932:case 14933:case 14934:case 14936:case 14937:case 14938:case 14939:case 14941:case 14942:case 14944:case 14945:case 14946:case 14949:case 14950:case 14951:case 14952:case 14953:case 14954:case 14956:case 14957:case 14958:case 14959:case 14960:case 14961:case 14966:case 14967:case 14969:case 14970:case 14971:case 14973:case 14974:case 14976:case 14977:case 14979:case 14980:case 14981:case 14982:case 14983:case 14984:case 14985:case 14989:case 14994:case 14996:case 14998:case 14999:case 15001:case 15002:case 15003:case 15007:case 15008:case 15009:case 15010:case 15011:case 15012:case 15014:case 15018:case 15019:case 15020:case 15022:case 15024:case 15026:case 15028:case 15029:case 15030:case 15032:case 15034:case 15040:case 15042:case 15046:case 15047:case 15048:case 15049:case 15050:case 15051:case 15054:case 15060:case 15061:case 15064:case 15066:case 15067:case 15068:case 15069:case 15070:case 15072:case 15073:case 15076:case 15077:case 15082:case 15083:case 15084:case 15085:case 15088:case 15092:case 15096:case 15097:case 15098:case 15099:case 15100:case 15102:case 15104:case 15105:case 15108:case 15109:case 15110:case 15111:case 15114:case 15115:case 15118:case 15122:rs();break;case-10:case 27412:vl();break;case-11:ul();break;case 68:pl();break;case 278:sl();break;default:Ni()}$l.endNonterminal("PrimaryExpr",Hl)}function il(){switch(Bl){case 184:Nl(256);break;case 216:Nl(254);break;case 276:Nl(277);break;case 82:case 121:Nl(259);break;case 96:case 244:Nl(93);break;case 119:case 202:case 256:Nl(139);break;case 6:case 70:case 72:case 73:case 74:case 75:case 77:case 79:case 80:case 81:case 83:case 84:case 85:case 86:case 88:case 89:case 90:case 91:case 93:case 94:case 97:case 98:case 101:case 102:case 103:case 104:case 105:case 106:case 108:case 109:case 110:case 111:case 112:case 113:case 118:case 122:case 123:case 125:case 126:case 128:case 129:case 131:case 132:case 133:case 134:case 135:case 136:case 137:case 141:case 146:case 148:case 150:case 151:case 153:case 154:case 155:case 159:case 160:case 161:case 162:case 163:case 164:case 166:case 170:case 171:case 172:case 174:case 176:case 178:case 180:case 181:case 182:case 186:case 192:case 194:case 198:case 199:case 200:case 201:case 203:case 206:case 212:case 213:case 218:case 219:case 220:case 221:case 222:case 224:case 225:case 228:case 229:case 234:case 235:case 236:case 237:case 240:case 248:case 249:case 250:case 251:case 252:case 254:case 257:case 260:case 261:case 262:case 263:case 266:case 267:case 270:case 274:Nl(92);break;default:Dl=Bl}if(Dl==2836||Dl==3348||Dl==4372||Dl==4884||Dl==5396||Dl==5908||Dl==16148||Dl==16660||Dl==17684||Dl==18196||Dl==20756||Dl==21780||Dl==22804||Dl==23316||Dl==23828||Dl==24340||Dl==27924||Dl==28436||Dl==30484||Dl==34068||Dl==35092||Dl==36116||Dl==37140||Dl==37652||Dl==38164||Dl==38676||Dl==39700||Dl==40212||Dl==40724||Dl==41236||Dl==41748||Dl==42260||Dl==42772||Dl==43284||Dl==43796||Dl==44308||Dl==45332||Dl==45844||Dl==46356||Dl==46868||Dl==47892||Dl==48404||Dl==49428||Dl==49940||Dl==50452||Dl==51988||Dl==52500||Dl==53012||Dl==53524||Dl==54036||Dl==54548||Dl==55572||Dl==56084||Dl==56596||Dl==57108||Dl==57620||Dl==58132||Dl==60692||Dl==61204||Dl==61716||Dl==62228||Dl==62740||Dl==63252||Dl==63764||Dl==64276||Dl==64788||Dl==65812||Dl==66324||Dl==67348||Dl==67860||Dl==68372||Dl==68884||Dl==69396||Dl==69908||Dl==70420||Dl==72468||Dl==74516||Dl==75028||Dl==76052||Dl==77076||Dl==77588||Dl==78100||Dl==78612||Dl==79124||Dl==79636||Dl==81684||Dl==82196||Dl==82708||Dl==83220||Dl==83732||Dl==84244||Dl==84756||Dl==85268||Dl==85780||Dl==87316||Dl==87828||Dl==88340||Dl==89364||Dl==90388||Dl==91412||Dl==92436||Dl==92948||Dl==93460||Dl==94484||Dl==94996||Dl==95508||Dl==98068||Dl==98580||Dl==99604||Dl==101652||Dl==102164||Dl==102676||Dl==103188||Dl==103700||Dl==104212||Dl==105748||Dl==108820||Dl==109332||Dl==110868||Dl==111892||Dl==112404||Dl==112916||Dl==113428||Dl==113940||Dl==114964||Dl==115476||Dl==115988||Dl==116500||Dl==117012||Dl==117524||Dl==120084||Dl==120596||Dl==121108||Dl==121620||Dl==123156||Dl==124180||Dl==124692||Dl==125204||Dl==127252||Dl==127764||Dl==128276||Dl==128788||Dl==129300||Dl==129812||Dl==130324||Dl==131348||Dl==131860||Dl==133396||Dl==133908||Dl==134420||Dl==134932||Dl==136468||Dl==136980||Dl==138516||Dl==140564||Dl==141588||Dl==142612||Dl==144660){Dl=Ol(14,Hl);if(Dl==0){var e=Pl,t=Hl,n=Bl,r=jl,i=Fl,s=Il,o=ql,u=Rl;try{ml(),Al(14,t,-10),Dl=-14}catch(a){Dl=-11,Pl=e,Hl=t,Bl=n,Bl==0?Yl=t:(jl=r,Fl=i,Il=s,Il==0?Yl=i:(ql=o,Rl=u,Yl=u)),Al(14,t,-11)}}}switch(Dl){case 8:case 9:case 10:case 11:ii();break;case 31:ai();break;case 34:hi();break;case 44:di();break;case 17414:case 17478:case 17480:case 17481:case 17482:case 17483:case 17485:case 17487:case 17488:case 17489:case 17491:case 17492:case 17493:case 17494:case 17496:case 17497:case 17498:case 17499:case 17501:case 17502:case 17505:case 17506:case 17509:case 17510:case 17511:case 17512:case 17513:case 17514:case 17516:case 17517:case 17518:case 17519:case 17520:case 17521:case 17526:case 17527:case 17530:case 17531:case 17533:case 17534:case 17536:case 17537:case 17539:case 17540:case 17541:case 17542:case 17543:case 17544:case 17545:case 17549:case 17554:case 17556:case 17558:case 17559:case 17561:case 17562:case 17563:case 17567:case 17568:case 17569:case 17570:case 17571:case 17572:case 17574:case 17578:case 17579:case 17580:case 17582:case 17584:case 17586:case 17588:case 17589:case 17590:case 17592:case 17594:case 17600:case 17602:case 17606:case 17607:case 17608:case 17609:case 17610:case 17611:case 17614:case 17620:case 17621:case 17626:case 17627:case 17628:case 17629:case 17630:case 17632:case 17633:case 17636:case 17637:case 17642:case 17643:case 17644:case 17645:case 17648:case 17656:case 17657:case 17658:case 17659:case 17660:case 17662:case 17664:case 17665:case 17668:case 17669:case 17670:case 17671:case 17674:case 17675:case 17678:case 17682:wi();break;case 141514:mi();break;case 141568:yi();break;case 32:case 78:case 120:case 124:case 145:case 152:case 165:case 167:case 185:case 191:case 226:case 227:case 242:case 243:case 253:case 14854:case 14918:case 14920:case 14921:case 14922:case 14923:case 14925:case 14927:case 14928:case 14929:case 14930:case 14931:case 14932:case 14933:case 14934:case 14936:case 14937:case 14938:case 14939:case 14941:case 14942:case 14944:case 14945:case 14946:case 14949:case 14950:case 14951:case 14952:case 14953:case 14954:case 14956:case 14957:case 14958:case 14959:case 14960:case 14961:case 14966:case 14967:case 14969:case 14970:case 14971:case 14973:case 14974:case 14976:case 14977:case 14979:case 14980:case 14981:case 14982:case 14983:case 14984:case 14985:case 14989:case 14994:case 14996:case 14998:case 14999:case 15001:case 15002:case 15003:case 15007:case 15008:case 15009:case 15010:case 15011:case 15012:case 15014:case 15018:case 15019:case 15020:case 15022:case 15024:case 15026:case 15028:case 15029:case 15030:case 15032:case 15034:case 15040:case 15042:case 15046:case 15047:case 15048:case 15049:case 15050:case 15051:case 15054:case 15060:case 15061:case 15064:case 15066:case 15067:case 15068:case 15069:case 15070:case 15072:case 15073:case 15076:case 15077:case 15082:case 15083:case 15084:case 15085:case 15088:case 15092:case 15096:case 15097:case 15098:case 15099:case 15100:case 15102:case 15104:case 15105:case 15108:case 15109:case 15110:case 15111:case 15114:case 15115:case 15118:case 15122:is();break;case-10:case 27412:ml();break;case-11:al();break;case 68:dl();break;case 278:ol();break;case-14:break;default:Ci()}}function sl(){$l.startNonterminal("JSONSimpleObjectUnion",Hl),bl(278),Tl(273),Bl!=281&&(Sl(),Q()),bl(281),$l.endNonterminal("JSONSimpleObjectUnion",Hl)}function ol(){wl(278),Tl(273),Bl!=281&&G(),wl(281)}function ul(){$l.startNonterminal("ObjectConstructor",Hl),bl(276),Tl(274),Bl!=282&&(Sl(),fl()),bl(282),$l.endNonterminal("ObjectConstructor",Hl)}function al(){wl(276),Tl(274),Bl!=282&&ll(),wl(282)}function fl(){$l.startNonterminal("PairConstructorList",Hl),cl();for(;;){if(Bl!=41)break;bl(41),Tl(267),Sl(),cl()}$l.endNonterminal("PairConstructorList",Hl)}function ll(){hl();for(;;){if(Bl!=41)break;wl(41),Tl(267),hl()}}function cl(){$l.startNonterminal("PairConstructor",Hl),Af(),bl(49),Tl(267),Sl(),Af(),$l.endNonterminal("PairConstructor",Hl)}function hl(){Of(),wl(49),Tl(267),Of()}function pl(){$l.startNonterminal("ArrayConstructor",Hl),bl(68),Tl(272),Bl!=69&&(Sl(),Q()),bl(69),$l.endNonterminal("ArrayConstructor",Hl)}function dl(){wl(68),Tl(272),Bl!=69&&G(),wl(69)}function vl(){$l.startNonterminal("BlockExpr",Hl),bl(276),Tl(277),Sl(),Wa(),bl(282),$l.endNonterminal("BlockExpr",Hl)}function ml(){wl(276),Tl(277),Xa(),wl(282)}function gl(){$l.startNonterminal("FunctionDecl",Hl),bl(145),Tl(255),Sl(),_a(),Tl(22),bl(34),Tl(94),Bl==31&&(Sl(),R()),bl(37),Tl(148),Bl==79&&(Sl(),yl()),Tl(118);switch(Bl){case 276:bl(276),Tl(277),Sl(),Wa(),bl(282);break;default:bl(133)}$l.endNonterminal("FunctionDecl",Hl)}function yl(){$l.startNonterminal("ReturnType",Hl),bl(79),Tl(260),Sl(),ps(),$l.endNonterminal("ReturnType",Hl)}function bl(e){Bl==e?(Sl(),$l.terminal(i.TOKEN[Bl],jl,Fl>Ql?Ql:Fl),Pl=jl,Hl=Fl,Bl=Il,Bl!=0&&(jl=ql,Fl=Rl,Il=0)):Ll(jl,Fl,0,Bl,e)}function wl(e){Bl==e?(Pl=jl,Hl=Fl,Bl=Il,Bl!=0&&(jl=ql,Fl=Rl,Il=0)):Ll(jl,Fl,0,Bl,e)}function El(e){var t=Pl,n=Hl,r=Bl,i=jl,s=Fl;Bl=e,jl=Gl,Fl=Yl,Il=0,Ma(),Pl=t,Hl=n,Bl=r,Bl!=0&&(jl=i,Fl=s)}function Sl(){Hl!=jl&&(Pl=Hl,Hl=jl,$l.whitespace(Pl,Hl))}function xl(e){var t;for(;;){t=Ml(e);if(t!=22){if(t!=36)break;El(t)}}return t}function Tl(e){Bl==0&&(Bl=xl(e),jl=Gl,Fl=Yl)}function Nl(e){Il==0&&(Il=xl(e),ql=Gl,Rl=Yl),Dl=Il<<9|Bl}function Cl(e){Bl==0&&(Bl=Ml(e),jl=Gl,Fl=Yl)}function kl(e){Il==0&&(Il=Ml(e),ql=Gl,Rl=Yl),Dl=Il<<9|Bl}function Ll(e,t,n,r,i){throw t>zl&&(Ul=e,zl=t,Wl=n,Xl=r,Vl=i),new _l.ParseException(Ul,zl,Wl,Xl,Vl)}function Al(e,t,n){Jl[(t<<4)+e]=n}function Ol(e,t){var n=Jl[(t<<4)+e];return typeof n!="undefined"?n:0}function Ml(e){var t=!1;Gl=Yl;var n=Yl,r=i.INITIAL[e],s=0;for(var o=r&4095;o!=0;){var u,a=n<Ql?Kl.charCodeAt(n):0;++n;if(a<128)u=i.MAP0[a];else if(a<55296){var f=a>>4;u=i.MAP1[(a&15)+i.MAP1[(f&31)+i.MAP1[f>>5]]]}else{if(a<56320){var f=n<Ql?Kl.charCodeAt(n):0;f>=56320&&f<57344&&(++n,a=((a&1023)<<10)+(f&1023)+65536,t=!0)}var l=0,c=5;for(var h=3;;h=c+l>>1){if(i.MAP2[h]>a)c=h-1;else{if(!(i.MAP2[6+h]<a)){u=i.MAP2[12+h];break}l=h+1}if(l>c){u=0;break}}}s=o;var p=(u<<12)+o-1;o=i.TRANSITION[(p&15)+i.TRANSITION[p>>4]],o>4095&&(r=o,o&=4095,Yl=n)}r>>=12;if(r==0){Yl=n-1;var f=Yl<Ql?Kl.charCodeAt(Yl):0;return f>=56320&&f<57344&&--Yl,Ll(Gl,Yl,s,-1,-1)}if(t)for(var d=r>>9;d>0;--d){--Yl;var f=Yl<Ql?Kl.charCodeAt(Yl):0;f>=56320&&f<57344&&--Yl}else Yl-=r>>9;return(r&511)-1}n(e,t);var _l=this;this.ParseException=function(e,t,n,r,i){var s=e,o=t,u=n,a=r,f=i;this.getBegin=function(){return s},this.getEnd=function(){return o},this.getState=function(){return u},this.getExpected=function(){return f},this.getOffending=function(){return a},this.getMessage=function(){return a<0?"lexical analysis failed":"syntax error"}},this.getInput=function(){return Kl},this.getOffendingToken=function(e){var t=e.getOffending();return t>=0?i.TOKEN[t]:null},this.getExpectedTokenSet=function(e){var t;return e.getExpected()<0?t=i.getTokenSet(-e.getState()):t=[i.TOKEN[e.getExpected()]],t},this.getErrorMessage=function(e){var t=this.getExpectedTokenSet(e),n=this.getOffendingToken(e),r=Kl.substring(0,e.getBegin()),i=r.split("\n"),s=i.length,o=i[s-1].length+1,u=e.getEnd()-e.getBegin();return e.getMessage()+(n==null?"":", found "+n)+"\nwhile expecting "+(t.length==1?t[0]:"["+t.join(", ")+"]")+"\n"+(u==0||n!=null?"":"after successfully scanning "+u+" characters beginning ")+"at line "+s+", column "+o+":\n..."+Kl.substring(e.getBegin(),Math.min(Kl.length,e.getBegin()+64))+"..."},this.parse_XQuery=function(){$l.startNonterminal("XQuery",Hl),Tl(275),Sl(),s(),bl(25),$l.endNonterminal("XQuery",Hl)};var Dl,Pl,Hl,Bl,jl,Fl,Il,ql,Rl,Ul,zl,Wl,Xl,Vl,$l,Jl,Kl,Ql,Gl,Yl};r.getTokenSet=function(e){var t=[],n=e<0?-e:INITIAL[e]&4095;for(var i=0;i<284;i+=32){var s=i,o=(i>>5)*3694+n-1,u=o>>1,a=u>>2,f=r.EXPECTED[(o&1)+r.EXPECTED[(u&3)+r.EXPECTED[(a&3)+r.EXPECTED[a>>2]]]];for(;f!=0;f>>>=1,++s)(f&1)!=0&&t.push(r.TOKEN[s])}return t},r.MAP0=[70,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,17,17,17,17,17,17,17,17,17,18,19,20,21,22,23,24,25,26,27,28,29,26,30,30,30,30,30,31,32,33,30,30,34,30,30,35,30,30,30,36,30,30,37,38,39,38,30,38,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,38,38],r.MAP1=[108,124,214,214,214,214,214,214,214,214,214,214,214,214,214,214,156,181,181,181,181,181,214,215,213,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,247,261,277,293,309,355,371,387,423,423,423,415,339,331,339,331,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,440,440,440,440,440,440,440,324,339,339,339,339,339,339,339,339,401,423,423,424,422,423,423,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,338,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,423,70,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,17,17,17,17,17,17,17,17,17,18,19,20,21,22,23,24,25,26,27,28,29,26,30,30,30,30,30,31,32,33,30,30,30,30,30,30,30,30,30,30,30,30,30,30,38,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,34,30,30,35,30,30,30,36,30,30,37,38,39,38,30,38,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,38,38,38,38,38,38,38,38,38,38,38,38,30,30,38,38,38,38,38,38,38,69,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69],r.MAP2=[57344,63744,64976,65008,65536,983040,63743,64975,65007,65533,983039,1114111,38,30,38,30,30,38],r.INITIAL=[1,12290,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287],r.TRANSITION=[42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,25651,25666,25670,25670,25670,18189,25670,25670,25670,25670,18201,25670,25670,25670,25670,18176,25670,25671,18217,42516,42516,42516,27632,42516,42516,51474,42516,42516,42516,42516,42516,42516,42516,32629,20505,21066,18953,21068,19019,18919,18270,40105,18293,18315,42516,42516,18360,42516,49435,42820,18380,18411,18395,18574,19226,18433,20169,18459,25598,18486,18508,51199,18465,25604,18492,18514,20728,18530,42516,30418,42516,42516,42516,50250,25964,50770,42516,18553,39446,18564,20175,20411,20131,20505,23879,18590,26008,18612,18632,18596,18470,18594,26012,18616,18636,20798,20741,20757,42516,18652,18689,18711,18748,18695,18788,42516,41546,48871,18807,18835,19802,18823,19840,25206,18851,18904,18942,18979,19680,19006,18851,18904,18942,18979,19680,19045,20750,46697,19097,19132,20936,31767,19148,19174,19196,20141,20921,19788,19212,19242,19278,25525,20579,19301,19596,19271,25518,20572,19294,19589,19324,19353,35639,19379,39467,19401,41728,19421,19500,24458,19544,19575,19614,19632,19650,19559,19612,19630,19648,19666,19029,19696,19712,19728,19753,19773,19830,19435,19449,19888,19905,19856,19887,19904,19921,19947,19984,20043,20080,20119,20157,20536,20191,20213,20542,20197,20219,19931,20235,20264,20301,20317,20346,20333,20349,20365,20381,20397,20422,20606,20438,20477,20503,21067,21068,20521,20558,20595,20622,20652,23888,18878,20683,20699,20715,20779,20814,20880,20890,20906,19463,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,21141,42516,42516,42516,42516,48069,42516,42516,42516,42516,25917,18730,20976,20988,20999,21015,25420,18732,21040,42516,42516,42516,27632,42516,42516,51474,31122,42516,42516,42516,42516,42516,42516,32629,20505,21066,18953,21068,21056,21084,18270,40105,18293,18315,42516,42516,18360,42516,49435,42820,18380,18411,18395,18574,19226,18433,20169,18459,25598,18486,18508,51199,18465,25604,18492,18514,20728,18530,42516,30418,42516,42516,42516,50250,25964,50770,42516,18553,39446,18564,20175,20411,20131,20505,23879,18590,26008,18612,18632,18596,18470,18594,26012,18616,18636,20798,20741,20757,42516,18652,18689,18711,18748,18695,18788,42516,41546,48871,18807,18835,19802,18823,19840,25206,18851,18904,18942,18979,19680,19006,18851,18904,18942,18979,19680,19045,20750,46697,19097,19132,20936,31767,19148,19174,19196,20141,20921,19788,19212,19242,19278,25525,20579,19301,19596,19271,25518,20572,19294,19589,19324,19353,35639,19379,39467,19401,41728,19421,19500,24458,19544,19575,19614,19632,19650,19559,19612,19630,19648,19666,19029,19696,19712,19728,19753,19773,19830,19435,19449,19888,19905,19856,19887,19904,19921,19947,19984,20043,20080,20119,20157,20536,20191,20213,20542,20197,20219,19931,20235,20264,20301,20317,20346,20333,20349,20365,20381,20397,20422,20606,20438,20477,20503,21067,21068,20521,20558,20595,20622,20652,23888,18878,20683,20699,20715,20779,20814,20880,20890,20906,19463,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,23286,21107,42516,42516,42516,39416,42516,42516,43470,47286,25568,42516,42516,42516,42516,23672,41495,21126,21160,42516,42516,42516,27632,42516,42516,35938,42516,42516,42516,42516,42516,42516,42516,32629,20505,21066,18953,21068,19019,25556,18270,40105,18293,18315,42516,42516,18360,42516,49435,42820,18380,18411,18395,18574,19226,18433,20169,18459,25598,18486,18508,51199,18465,25604,18492,18514,20728,18530,42516,30418,42516,42516,42516,50250,25964,50770,42516,18553,39446,18564,20175,20411,20131,20505,23879,18590,26008,18612,18632,18596,18470,18594,26012,18616,18636,20798,20741,20757,42516,18652,18689,18711,18748,18695,18788,42516,41546,48871,18807,18835,19802,18823,19840,25206,18851,18904,18942,18979,19680,19006,18851,18904,18942,18979,19680,19045,20750,46697,19097,19132,20936,31767,19148,19174,19196,20141,20921,19788,19212,19242,19278,25525,20579,19301,19596,19271,25518,20572,19294,19589,19324,19353,35639,19379,39467,19401,41728,19421,19500,24458,19544,19575,19614,19632,19650,19559,19612,19630,19648,19666,19029,19696,19712,19728,19753,19773,19830,19435,19449,19888,19905,19856,19887,19904,19921,19947,19984,20043,20080,20119,20157,20536,20191,20213,20542,20197,20219,19931,20235,20264,20301,20317,20346,20333,20349,20365,20381,20397,20422,20606,20438,20477,20503,21067,21068,20521,20558,20595,20622,20652,23888,18878,20683,20699,20715,20779,20814,20880,20890,20906,19463,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,21176,21248,42516,42516,42516,50595,42516,42516,42445,42516,25917,23619,21211,21279,21269,21226,21240,44419,21040,42516,42516,42516,27632,21302,42516,32247,42516,42516,42516,42516,42516,42516,42516,32629,20505,21066,18953,21068,19019,19871,21321,40105,18293,18315,42516,42516,18360,42516,49435,42820,18380,18411,18395,18574,19226,18433,20169,18459,25598,18486,18508,51199,18465,25604,18492,18514,20728,18530,42516,30418,42516,42516,42516,50250,25964,50770,42516,18553,39446,18564,20175,20411,20131,20505,23879,21344,26008,18612,18632,18596,21349,18594,26012,18616,18636,20798,20741,20757,42516,18652,18689,18711,18748,18695,18788,42516,41546,48871,18807,18835,19802,18823,19840,25206,18851,18904,18942,18979,19680,19006,18851,18904,18942,18979,19680,19045,20750,46697,19097,19132,20936,31767,19148,19174,19196,20141,20921,19788,19212,19242,19278,25525,20579,19301,19596,19271,25518,20572,19294,19589,19324,19353,35639,19379,39467,19401,41728,19421,19500,24458,19544,19575,19614,19632,19650,19559,19612,19630,19648,19666,19029,19696,19712,19728,19753,19773,19830,19435,19449,19888,19905,19856,19887,19904,19921,19947,19984,20043,20080,20119,20157,20536,20191,20213,20542,20197,20219,19931,20235,20264,20301,20317,20346,20333,20349,20365,20381,20397,20422,20606,20438,20477,20503,21067,21068,20521,20558,20595,20622,20652,23888,18878,20683,20699,20715,20779,20814,20880,20890,20906,19463,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,21141,42510,42516,42516,42516,48894,42515,42516,51366,42516,21365,42504,21403,42515,21410,42516,27599,27612,21040,42516,42516,42516,27632,42516,42516,51474,42516,42516,42516,42516,42516,42516,42516,32629,20505,21066,18953,21068,19019,18919,18270,40105,18293,18315,42516,42516,18360,42516,49435,42820,18380,18411,18395,18574,19226,18433,20169,18459,25598,18486,18508,51199,18465,25604,18492,18514,20728,18530,42516,30418,42516,42516,42516,50250,25964,50770,42516,18553,39446,18564,20175,20411,20131,20505,23879,18590,26008,18612,18632,18596,18470,18594,26012,18616,18636,20798,20741,20757,42516,18652,18689,18711,18748,18695,18788,42516,41546,48871,18807,18835,19802,18823,19840,25206,18851,18904,18942,18979,19680,19006,18851,18904,18942,18979,19680,19045,20750,46697,19097,19132,20936,31767,19148,19174,19196,20141,20921,19788,19212,19242,19278,25525,20579,19301,19596,19271,25518,20572,19294,19589,19324,19353,35639,19379,39467,19401,41728,19421,19500,24458,19544,19575,19614,19632,19650,19559,19612,19630,19648,19666,19029,19696,19712,19728,19753,19773,19830,19435,19449,19888,19905,19856,19887,19904,19921,19947,19984,20043,20080,20119,20157,20536,20191,20213,20542,20197,20219,19931,20235,20264,20301,20317,20346,20333,20349,20365,20381,20397,20422,20606,20438,20477,20503,21067,21068,20521,20558,20595,20622,20652,23888,18878,20683,20699,20715,20779,20814,20880,20890,20906,19463,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,21141,42516,42516,42516,42516,48069,21426,42516,42516,42516,22170,42516,42516,21445,42516,42516,21468,21481,21040,42516,42516,42516,27632,42516,42516,51474,42516,42516,42516,42516,42516,42516,42516,32629,20505,21066,18953,21068,19019,18919,18270,40105,18293,18315,42516,42516,18360,42516,49435,42820,18380,18411,18395,18574,19226,18433,20169,18459,25598,18486,18508,51199,18465,25604,18492,18514,20728,18530,42516,30418,42516,42516,42516,50250,25964,50770,42516,18553,39446,18564,20175,20411,20131,20505,23879,18590,26008,18612,18632,18596,18470,18594,26012,18616,18636,20798,20741,20757,42516,18652,18689,18711,18748,18695,18788,42516,41546,48871,18807,18835,19802,18823,19840,25206,18851,18904,18942,18979,19680,19006,18851,18904,18942,18979,19680,19045,20750,46697,19097,19132,20936,31767,19148,19174,19196,20141,20921,19788,19212,19242,19278,25525,20579,19301,19596,19271,25518,20572,19294,19589,19324,19353,35639,19379,39467,19401,41728,19421,19500,24458,19544,19575,19614,19632,19650,19559,19612,19630,19648,19666,19029,19696,19712,19728,19753,19773,19830,19435,19449,19888,19905,19856,19887,19904,19921,19947,19984,20043,20080,20119,20157,20536,20191,20213,20542,20197,20219,19931,20235,20264,20301,20317,20346,20333,20349,20365,20381,20397,20422,20606,20438,20477,20503,21067,21068,20521,20558,20595,20622,20652,23888,18878,20683,20699,20715,20779,20814,20880,20890,20906,19463,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,21141,42516,42516,42516,42516,48069,42516,42516,42516,42516,24484,42516,42516,42516,42516,42516,42516,42517,21497,42516,42516,42516,27632,42516,42516,51474,42516,42516,42516,42516,42516,42516,42516,32629,20505,21066,18953,21068,19019,18919,18270,40105,18293,18315,42516,42516,18360,42516,49435,42820,18380,18411,18395,18574,19226,18433,20169,21513,25598,18486,18508,51408,18465,25604,18492,18514,20728,18530,42516,30418,42516,42516,42516,50250,25964,50770,42516,18553,39446,18564,20175,20411,20131,20505,23879,18590,26008,18612,18632,18596,18470,18594,26012,18616,18636,20798,20741,20757,42516,18652,18689,18711,18748,18695,18788,42516,41546,48871,18807,18835,19802,18823,19840,25206,18851,18904,18942,18979,19680,19006,18851,18904,18942,18979,19680,19045,20750,46697,19097,19132,20936,31767,19148,19174,19196,20141,20921,19788,19212,19242,19278,25525,20579,19301,19596,19271,25518,20572,19294,19589,19324,19353,35639,19379,39467,19401,41728,19421,19500,24458,19544,19575,19614,19632,19650,19559,19612,19630,19648,19666,19029,19696,19712,19728,19753,19773,19830,19435,19449,19888,19905,19856,19887,19904,19921,19947,19984,20043,20080,20119,20157,20536,20191,20213,20542,20197,20219,19931,20235,20264,20301,20317,20346,20333,20349,20365,20381,20397,20422,20606,20438,20477,20503,21067,21068,20521,20558,20595,20622,20652,23888,18878,20683,20699,20715,20779,20814,20880,20890,20906,19463,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,25358,21538,42516,42516,42516,29996,42516,42516,26519,46446,25383,42516,42516,42516,42516,25736,28473,18232,21557,42516,42516,42516,27632,42516,42516,51474,21573,42516,42516,42516,42516,42516,42516,32629,20505,21066,18953,21068,19019,19060,21591,40105,18293,18315,42516,42516,18360,42516,49435,42820,18380,18411,18395,18574,19226,18433,20169,18459,25598,18486,18508,51199,18465,25604,18492,18514,20728,18530,42516,30418,42516,42516,42516,50250,25964,50770,42516,18553,39446,18564,20175,20411,20131,20505,23879,18590,26008,18612,18632,18596,18470,18594,26012,18616,18636,20798,20741,20757,42516,18652,18689,18711,18748,18695,18788,42516,41546,48871,18807,18835,19802,18823,19840,25206,18851,18904,18942,18979,19680,19006,18851,18904,18942,18979,19680,19045,20750,46697,19097,19132,20936,31767,19148,19174,19196,20141,20921,19788,19212,19242,19278,25525,20579,19301,19596,19271,25518,20572,19294,19589,19324,19353,35639,19379,39467,19401,41728,19421,19500,24458,19544,19575,19614,19632,19650,19559,19612,19630,19648,19666,19029,19696,19712,19728,19753,19773,19830,19435,19449,19888,19905,19856,19887,19904,19921,19947,19984,20043,20080,20119,20157,20536,20191,20213,20542,20197,20219,19931,20235,20264,20301,20317,20346,20333,20349,20365,20381,20397,20422,20606,20438,20477,20503,21067,21068,20521,20558,20595,20622,20652,23888,18878,20683,20699,20715,20779,20814,20880,20890,20906,19463,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,23074,23089,21619,21619,21619,21672,21614,21619,21624,23096,21640,21745,21688,21665,21655,21732,21703,21716,21040,42516,42516,42516,33326,42516,42516,51474,42516,42516,42516,42516,42516,42516,42516,32629,20505,21066,18953,21068,19019,18919,18270,40105,18293,21761,42516,42516,18360,42516,49435,42820,18380,18411,18395,18574,19226,18433,20169,18459,25598,18486,18508,51199,18465,25604,18492,18514,20728,18530,42516,30418,42516,42516,42516,50250,25964,50770,42516,18553,39446,18564,20175,20411,20131,20505,23879,18590,26008,18612,18632,18596,18470,18594,26012,18616,18636,20798,20741,20757,42516,18652,18689,18711,18748,18695,18788,42516,41546,48871,18807,18835,19802,18823,19840,25206,18851,18904,18942,18979,19680,19006,18851,18904,18942,18979,19680,19045,20750,46697,19097,19132,20936,31767,19148,19174,19196,20141,20921,19788,19212,19242,19278,25525,20579,19301,19596,19271,25518,20572,19294,19589,19324,19353,35639,19379,39467,19401,41728,19421,19500,24458,19544,19575,19614,19632,19650,19559,19612,19630,19648,19666,19029,19696,19712,19728,19753,19773,19830,19435,19449,19888,19905,19856,19887,19904,19921,19947,19984,20043,20080,20119,20157,20536,20191,20213,20542,20197,20219,19931,20235,20264,20301,20317,20346,20333,20349,20365,20381,20397,20422,20606,20438,20477,20503,21067,21068,20521,20558,20595,20622,20652,23888,18878,20683,20699,20715,20779,20814,20880,20890,20906,19463,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,21141,45317,42516,42516,42516,49458,21798,42516,22640,21804,25917,45316,42516,21821,21844,21828,21860,21869,21885,42516,42516,42516,29550,42516,42516,51474,42516,42516,42516,42516,42516,42516,42516,32629,20505,21066,18953,21068,19019,18919,18270,40105,18293,21901,42516,42516,18360,42516,49435,42820,18380,18411,18395,18574,19226,18433,20169,18459,25598,18486,18508,51199,18465,25604,18492,18514,20728,18530,42516,30418,42516,42516,42516,50250,25964,50770,42516,18553,39446,18564,20175,20411,20131,20505,23879,18590,26008,18612,18632,18596,18470,18594,26012,18616,18636,20798,20741,20757,42516,18652,18689,18711,18748,18695,18788,42516,41546,48871,18807,18835,19802,18823,19840,25206,18851,18904,18942,18979,19680,19006,18851,18904,18942,18979,19680,19045,20750,46697,19097,19132,20936,31767,19148,19174,19196,20141,20921,19788,19212,19242,19278,25525,20579,19301,19596,19271,25518,20572,19294,19589,19324,19353,35639,19379,39467,19401,41728,19421,19500,24458,19544,19575,19614,19632,19650,19559,19612,19630,19648,19666,19029,19696,19712,19728,19753,19773,19830,19435,19449,19888,19905,19856,19887,19904,19921,19947,19984,20043,20080,20119,20157,20536,20191,20213,20542,20197,20219,19931,20235,20264,20301,20317,20346,20333,20349,20365,20381,20397,20422,20606,20438,20477,20503,21067,21068,20521,20558,20595,20622,20652,23888,18878,20683,20699,20715,20779,20814,20880,20890,20906,19463,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,21141,21944,42516,42516,42516,48069,42516,42516,42516,26308,36543,25445,25454,21937,25455,21960,21985,21998,21040,42516,42516,42516,27632,42516,42516,51474,42516,42516,42516,42516,42516,42516,42516,32629,20505,21066,18953,21068,19019,18919,18270,40105,18293,18315,42516,42516,18360,42516,49435,42820,18380,18411,18395,18574,19226,18433,20169,18459,25598,18486,18508,18888,18465,25604,18492,18514,20728,18530,42516,30418,42516,42516,42516,50250,25964,50770,42516,18553,39446,18564,20175,20411,20131,20505,23879,18590,26008,18612,18632,18596,18470,18594,26012,18616,18636,20798,20741,20757,42516,18652,18689,18711,18748,18695,18788,42516,41546,48871,18807,18835,19802,18823,19840,25206,18851,18904,18942,18979,19680,19006,18851,18904,18942,18979,19680,19045,20750,46697,19097,19132,20936,31767,19148,19174,19196,20141,20921,19788,19212,19242,19278,25525,20579,19301,19596,19271,25518,20572,19294,19589,19324,19353,35639,19379,39467,19401,41728,19421,19500,24458,19544,19575,19614,19632,19650,19559,19612,19630,19648,19666,19029,19696,19712,19728,19753,19773,19830,19435,19449,19888,19905,19856,19887,19904,19921,19947,19984,20043,20080,20119,20157,20536,20191,20213,20542,20197,20219,19931,20235,20264,20301,20317,20346,20333,20349,20365,20381,20397,20422,20606,20438,20477,20503,21067,21068,20521,20558,20595,20622,20652,23888,18878,20683,20699,20715,20779,20814,20880,20890,20906,19463,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,21141,42516,42516,42516,42516,48069,42516,42516,42516,26329,37275,42655,22014,22031,22014,22046,42653,22015,21040,42516,42516,42516,27632,42516,42516,51474,42516,42516,42516,42516,42516,42516,42516,32629,20505,21066,18953,21068,19019,18919,18270,40105,18293,18315,42516,42516,22071,42516,49435,42820,18380,18411,18395,18574,19226,18433,20169,18459,25598,18486,18508,51199,18465,25604,18492,18514,20728,18530,42516,30418,42516,42516,42516,50250,25964,50770,42516,18553,39446,18564,20175,20411,20131,20505,23879,18590,26008,18612,18632,18596,18470,18594,26012,18616,18636,20798,20741,20757,42516,18652,18689,18711,18748,18695,18788,42516,41546,48871,18807,18835,19802,18823,19840,25206,18851,18904,18942,18979,19680,19006,18851,18904,18942,18979,19680,19045,20750,46697,19097,19132,20936,31767,19148,19174,19196,20141,20921,19788,19212,19242,19278,25525,20579,19301,19596,19271,25518,20572,19294,19589,19324,19353,35639,19379,39467,19401,41728,19421,19500,24458,19544,19575,19614,19632,19650,19559,19612,19630,19648,19666,19029,19696,19712,19728,19753,19773,19830,19435,19449,19888,19905,19856,19887,19904,19921,19947,19984,20043,20080,20119,20157,20536,20191,20213,20542,20197,20219,19931,20235,20264,20301,20317,20346,20333,20349,20365,20381,20397,20422,20606,20438,20477,20503,21067,21068,20521,20558,20595,20622,20652,23888,18878,20683,20699,20715,20779,20814,20880,20890,20906,19463,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,21141,26891,42516,42516,42516,48069,22092,42516,23653,22130,40293,22116,22186,22191,22191,22207,26888,44587,21040,42516,42516,42516,27632,42516,42516,51474,42516,42516,42516,42516,42516,42516,42516,32629,20505,21066,18953,21068,19019,18919,18270,40105,18293,18315,42516,42516,18360,42516,49435,42820,18380,18411,18395,18574,19226,18433,20169,18459,25598,18486,18508,51199,18465,25604,18492,18514,20728,18530,42516,30418,42516,42516,42516,50250,25964,50770,42516,18553,39446,18564,20175,20411,20131,20505,23879,18590,26008,18612,18632,18596,18470,18594,26012,18616,18636,20798,20741,20757,42516,18652,18689,18711,18748,18695,18788,42516,41546,48871,18807,18835,19802,18823,19840,25206,18851,18904,18942,18979,19680,19006,18851,18904,18942,18979,19680,19045,20750,46697,19097,19132,20936,31767,19148,19174,19196,20141,20921,19788,19212,19242,19278,25525,20579,19301,19596,19271,25518,20572,19294,19589,19324,19353,35639,19379,39467,19401,41728,19421,19500,24458,19544,19575,19614,19632,19650,19559,19612,19630,19648,19666,19029,19696,19712,19728,19753,19773,19830,19435,19449,19888,19905,19856,19887,19904,19921,19947,19984,20043,20080,20119,20157,20536,20191,20213,20542,20197,20219,19931,20235,20264,20301,20317,20346,20333,20349,20365,20381,20397,20422,20606,20438,20477,20503,21067,21068,20521,20558,20595,20622,20652,23888,18878,20683,20699,20715,20779,20814,20880,20890,20906,19463,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,18247,42516,42516,42516,42516,48069,42516,42516,42516,42516,25917,35843,22232,22249,22232,22264,35841,22233,22289,42516,42516,42516,27632,42516,42516,51474,42516,42516,42516,42516,42516,42516,42516,28241,22657,46314,35273,38147,34810,46363,42516,33841,42516,34304,43899,22305,22071,36154,42516,42516,42516,42516,28243,22657,22322,22657,22657,22341,33347,46316,46316,39789,38147,35514,38147,38147,22359,22382,42516,42516,42516,42516,42516,28815,42516,22405,22426,42516,42516,38368,22657,22657,22657,22657,38374,22541,46316,46316,46316,46316,44805,38147,38147,38147,38147,38147,32923,22444,47355,26569,42516,42516,42516,42516,42516,45225,42516,42516,32981,50880,22657,22657,22657,30360,22467,39622,46316,22501,46316,22343,36422,42625,38147,22520,38147,27826,41766,42516,42516,42516,42516,42516,49148,42516,23255,22657,44467,22657,22657,30361,22539,42077,46316,46316,46316,30525,38147,40186,38147,38147,34440,41769,42516,42516,20027,37487,42516,28242,22657,22657,36250,37745,46316,46316,44329,37798,38147,38147,43834,27827,30836,42516,42516,19405,22558,38368,22576,22657,40730,22597,46316,36583,22617,38147,40469,22638,42516,25905,42516,34153,22656,33064,46073,46316,22674,22710,27827,22690,51145,42516,32408,22729,37572,22752,32120,22683,29050,30609,22771,38961,22813,36803,22874,22893,22911,28238,43147,27775,22913,22451,22736,46400,22448,28385,36584,34366,22755,31692,28429,22929,23e3,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,21141,42516,42516,42516,42516,48069,42516,42516,42516,50215,25917,42516,42516,42516,42516,42516,45715,23059,23112,42516,42516,42516,27632,42516,42516,37325,42516,42516,42516,42516,42516,42516,42516,28241,22657,46314,35273,38147,23128,46363,42516,42516,42516,34304,42516,42516,18360,42516,42516,42516,42516,42516,28243,22657,22657,22657,22657,22341,46316,46316,46316,39789,38147,38147,38147,38147,40896,22382,42516,42516,42516,42516,42516,28815,42516,42516,42516,42516,42516,38368,22657,22657,22657,22657,38374,22541,46316,46316,46316,46316,44805,38147,38147,38147,38147,38147,32923,22444,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,38370,22657,22657,22657,22657,30360,22540,46316,46316,46316,46316,22343,30533,38147,38147,38147,38147,27826,41766,42516,42516,42516,42516,42516,42516,42516,23255,22657,22657,22657,22657,30361,22539,46316,46316,46316,46316,30525,38147,38147,38147,38147,34440,41769,42516,42516,42516,42516,42516,28242,22657,22657,22657,37745,46316,46316,46316,37798,38147,38147,38147,27827,22690,42516,42516,42516,42516,38368,22657,22657,40730,46316,46316,36583,38147,38147,40469,42516,42516,42516,42516,38373,22657,28384,46316,46316,36586,38147,27827,22690,34920,42516,38372,43148,46316,28405,38147,22683,36804,38368,28385,28404,30535,36803,38372,46315,38146,28238,43147,27775,22913,28244,40729,36585,22448,28385,36584,34366,22755,31692,28429,22929,23e3,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,21141,23154,42516,42516,42516,46371,42516,42516,42516,42516,25917,35960,23175,23206,23195,23229,35959,23179,21040,42516,42516,42516,27632,42516,42516,51474,27227,42516,43023,42516,42516,42516,42516,32629,20505,21066,18953,21068,19019,18919,18270,40105,18293,18315,42516,42516,18360,42516,49435,42820,18380,18411,18395,18574,19226,18433,20169,18459,25598,18486,18508,51199,18465,25604,18492,18514,20728,18530,42516,30418,42516,42516,42516,50250,25964,50770,42516,18553,39446,18564,20175,20411,20131,20505,23879,18590,26008,18612,18632,18596,18470,18594,26012,18616,18636,20798,20741,20757,42516,18652,18689,18711,18748,18695,18788,42516,41546,48871,18807,18835,19802,18823,19840,25206,18851,18904,18942,18979,19680,19006,18851,18904,18942,18979,19680,19045,20750,46697,19097,19132,20936,31767,19148,19174,19196,20141,20921,19788,19212,19242,19278,25525,20579,19301,19596,19271,25518,20572,19294,19589,19324,19353,35639,19379,39467,19401,41728,19421,19500,24458,19544,19575,19614,19632,19650,19559,19612,19630,19648,19666,19029,19696,19712,19728,19753,19773,19830,19435,19449,19888,19905,19856,19887,19904,19921,19947,19984,20043,20080,20119,20157,20536,20191,20213,20542,20197,20219,19931,20235,20264,20301,20317,20346,20333,20349,20365,20381,20397,20422,20606,20438,20477,20503,21067,21068,20521,20558,20595,20622,20652,23888,18878,20683,20699,20715,20779,20814,20880,20890,20906,19463,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,21141,23254,42516,42516,42516,48069,42516,42516,42516,19968,25917,42516,42516,42516,42516,42516,42762,23271,23302,42516,42516,42516,27632,42516,42516,21380,42516,42516,42516,42516,42516,42516,42516,28241,22657,46314,35273,38147,23318,46363,42516,42516,42516,34304,42516,42516,23344,42516,42516,42516,42516,42516,28243,22657,22657,22657,22657,22341,46316,46316,46316,39789,38147,38147,38147,38147,40896,23370,23409,42516,42516,42516,42516,38331,23429,42516,42516,42516,42516,38368,22657,22657,22657,22657,38374,22541,46316,46316,46316,46316,44805,38147,38147,38147,38147,38147,32923,23450,23383,42516,42516,42516,42516,42516,23487,42516,42516,42516,38370,22657,22657,22657,22657,50700,22540,46316,46316,46316,46316,47852,30533,38147,38147,38147,38147,27826,35762,23510,42516,42516,42516,42516,42516,42516,23255,22657,22657,22657,22657,29796,22539,46316,46316,46316,46316,23533,38147,38147,38147,38147,34440,41769,42516,42516,42516,42516,42516,28242,22657,22657,22657,46191,46316,46316,46316,32038,38147,38147,38147,27827,22690,42516,42516,42516,42516,38368,22657,22657,40730,46316,46316,36583,38147,38147,40469,42516,42516,42516,42516,38373,22657,28384,46316,46316,36586,38147,27827,22690,34920,42516,38372,43148,46316,28405,38147,22683,36804,38368,28385,28404,30535,36803,38372,46315,38146,28238,43147,27775,22913,28244,40729,36585,22448,28385,36584,34366,22755,31692,28429,22929,23e3,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,21141,48371,42516,42516,42516,31492,32078,42516,42516,23557,25917,18721,49121,23587,23594,23610,42516,43878,23635,23651,42516,42516,33439,23669,42516,51474,42516,42516,42516,42516,42516,42516,42516,32629,20505,25038,24355,23991,25028,23804,18270,40105,18293,23688,42516,42516,18360,42516,49435,42820,18380,18411,18395,18574,19226,18433,20169,23724,24084,23749,23789,24317,23827,23849,23904,24015,23917,23946,42516,30418,42516,42516,42516,50250,25964,50770,42516,18553,39446,18564,20175,20411,20131,20505,23879,23969,24689,24310,25086,25092,23974,23990,24416,24845,24007,23833,24977,24993,42516,18652,18689,18711,18748,18695,18788,42516,41546,48871,18807,18835,19802,18823,19840,25206,24031,23930,24046,24073,24057,24100,24137,24664,24240,24198,24251,24225,24986,46697,19097,19132,20936,31767,19148,19174,19196,20141,20921,19788,19212,19242,24267,24283,24299,24348,24333,24371,24167,24428,24402,23773,24444,24474,35639,19379,39467,19401,41728,19421,19500,24458,19544,24500,24558,24572,24588,24604,24182,24745,24620,24636,24767,19696,19712,19728,19753,19773,19830,19435,19514,24680,24514,19528,24705,24152,24757,19947,19984,20043,20080,20119,20157,20667,24542,24528,24731,24830,24209,24939,20235,20264,20301,24783,24799,24815,24715,24861,20381,20397,19814,23733,24877,24893,20503,25039,24968,23864,24927,24955,25015,20652,18443,23763,24386,25055,24651,25071,25108,25159,25175,25191,25243,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,21141,27003,42516,42516,42516,48069,25296,42516,42516,25291,40518,25312,25320,25320,25320,25327,27168,25343,21040,42516,42516,42516,27632,42516,42516,51474,42516,42516,42516,42516,42516,42516,42516,32629,20505,21066,18953,21068,19019,18919,18270,40105,18293,18315,42516,42516,18360,42516,49435,42820,18380,18411,18395,18574,19226,18433,20169,18459,25598,18486,18508,51199,18465,25604,18492,18514,20728,18530,42516,30418,42516,42516,42516,50250,25399,50770,42516,18553,39446,18564,20175,20411,20131,20505,23879,18590,26008,18612,18632,18596,18470,18594,26012,18616,18636,20798,20741,18963,25373,18652,18689,18711,18748,18695,25415,42516,41546,48871,18807,18835,19802,18823,19840,25206,18851,18904,18942,18979,19680,19006,18851,18904,18942,18979,19680,19045,19337,25436,19097,19132,20936,31767,19148,19174,19196,20141,20921,19788,19212,25471,25509,25525,20579,19301,19596,25541,25518,20572,19294,19589,19324,19353,35639,19379,39467,19401,41728,19421,19500,24458,19544,25584,19614,19632,19650,25620,19612,19630,19648,19666,19029,19696,19712,19728,19753,19773,19830,19435,19449,19888,19905,19856,19887,19904,19921,19947,19984,20043,20080,20119,20157,20536,20191,20213,20542,20197,20219,19931,20235,20264,20301,20317,20346,20333,20349,20365,20381,20397,20422,20606,20438,20477,20503,21067,21068,20521,20558,20595,20622,20652,23888,18878,20683,20699,20715,20779,20814,20880,20890,20906,19463,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,21141,42516,42516,42516,42516,48069,42516,42516,42516,42516,21541,28730,28739,28739,28739,28746,47533,25636,21040,42516,42516,42516,27632,42516,42516,51474,42516,42516,27653,42516,42516,42516,42516,32629,20505,21066,18953,21068,19019,25687,18270,40105,18293,18315,42516,42516,18360,42516,49435,42820,18380,18411,18395,18574,19226,18433,20169,18459,25598,18486,18508,51199,18465,25604,18492,18514,20728,18530,42516,30418,42516,42516,42516,50250,25964,50770,42516,18553,39446,18564,20175,20411,20131,20505,23879,18590,26008,18612,18632,18596,18470,18594,26012,18616,18636,20798,20741,20757,42516,18652,18689,18711,18748,18695,18788,42516,41546,48871,18807,18835,19802,18823,19840,25206,18851,18904,18942,18979,19680,19006,18851,18904,18942,18979,19680,19045,20750,46697,19097,19132,20936,31767,19148,19174,19196,20141,20921,19788,19212,19242,19278,25525,20579,19301,19596,19271,25518,20572,19294,19589,19324,19353,35639,19379,39467,19401,41728,19421,19500,24458,19544,19575,19614,19632,19650,19559,19612,19630,19648,19666,19029,19696,19712,19728,19753,19773,19830,19435,19449,19888,19905,19856,19887,19904,19921,19947,19984,20043,20080,20119,20157,20536,20191,20213,20542,20197,20219,19931,20235,20264,20301,20317,20346,20333,20349,20365,20381,20397,20422,20606,20438,20477,20503,21067,21068,20521,20558,20595,20622,20652,23888,18878,20683,20699,20715,20779,20814,20880,20890,20906,19463,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,51268,23158,42516,42516,42516,48069,42516,42516,42516,42516,25917,22795,25710,25710,25710,25717,23159,22797,21040,25733,42516,42516,27632,42516,42516,51474,42516,42516,44769,42516,42516,42516,42516,32629,20505,21066,18953,21068,19019,25752,18270,40105,18293,18315,42516,42516,18360,42516,49435,42820,18380,18411,18395,18574,19226,18433,20169,18459,25598,18486,18508,51199,18465,25604,18492,18514,20728,18530,42516,30418,42516,42516,42516,50250,25964,50770,42516,18553,39446,18564,20175,20411,20131,20505,23879,18590,26008,18612,18632,18596,18470,18594,26012,18616,18636,20798,20741,20757,42516,18652,18689,18711,18748,18695,18788,42516,41546,48871,18807,18835,19802,18823,19840,25206,18851,18904,18942,18979,19680,19006,18851,18904,18942,18979,19680,19045,20750,46697,19097,19132,20936,31767,19148,19174,19196,20141,20921,19788,19212,19242,19278,25525,20579,19301,19596,19271,25518,20572,19294,19589,19324,19353,35639,19379,39467,19401,41728,19421,19500,24458,19544,19575,19614,19632,19650,19559,19612,19630,19648,19666,19029,19696,19712,19728,19753,19773,19830,19435,19449,19888,19905,19856,19887,19904,19921,19947,19984,20043,20080,20119,20157,20536,20191,20213,20542,20197,20219,19931,20235,20264,20301,20317,20346,20333,20349,20365,20381,20397,20422,20606,20438,20477,20503,21067,21068,20521,20558,20595,20622,20652,23888,18878,20683,20699,20715,20779,20814,20880,20890,20906,19463,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,26066,26075,42516,42516,42516,42907,42516,42516,42516,42516,25917,26405,25775,25775,25775,25782,28588,26407,25798,25814,42516,42516,27632,42516,42516,51474,42516,42516,23413,42516,42516,42516,42516,32629,20505,21066,18953,21068,19019,25831,18270,40105,18293,18315,42516,42516,18360,42516,49435,42820,18380,18411,18395,18574,19226,18433,20169,18459,25598,18486,18508,51199,18465,25604,18492,18514,20728,18530,42516,30418,42516,42516,42516,50250,25964,50770,42516,18553,39446,18564,20175,20411,20131,20505,23879,18590,26008,18612,18632,18596,18470,18594,26012,18616,18636,20798,20741,20757,42516,18652,18689,18711,18748,18695,18788,42516,41546,48871,18807,18835,19802,18823,19840,25206,18851,18904,18942,18979,19680,19006,18851,18904,18942,18979,19680,19045,20750,46697,19097,19132,20936,31767,19148,19174,19196,20141,20921,19788,19212,19242,19278,25525,20579,19301,19596,19271,25518,20572,19294,19589,19324,19353,35639,19379,39467,19401,41728,19421,19500,24458,19544,19575,19614,19632,19650,19559,19612,19630,19648,19666,19029,19696,19712,19728,19753,19773,19830,19435,19449,19888,19905,19856,19887,19904,19921,19947,19984,20043,20080,20119,20157,20536,20191,20213,20542,20197,20219,19931,20235,20264,20301,20317,20346,20333,20349,20365,20381,20397,20422,20606,20438,25857,20503,21067,21068,20521,20558,20595,20622,20652,23888,18878,20683,20699,20715,20779,20814,20880,20890,20906,19463,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,25891,42516,42516,42516,42516,48069,25942,42516,42516,28970,33768,42516,42516,42516,25933,25960,26180,25944,25980,42516,42516,42516,27632,42516,42516,51474,27927,42516,42516,42516,42516,42516,42516,32629,20505,21066,18953,21068,25996,26028,18270,40105,18293,18315,42516,42516,18360,42516,49435,42820,18380,18411,18395,18574,19226,18433,20169,18459,25598,18486,18508,51199,18465,25604,18492,18514,20728,18530,42516,30418,42516,42516,42516,50250,25964,50770,42516,18553,39446,18564,20175,20411,20131,20505,23879,18590,26008,18612,18632,18596,18470,18594,26012,18616,18636,20798,20741,20757,42516,18652,18689,18711,18748,18695,18788,42516,41546,48871,18807,18835,19802,18823,19840,25206,18851,18904,18942,18979,19680,19006,18851,18904,18942,18979,19680,19045,20750,46697,19097,19132,20936,31767,19148,19174,19196,20141,20921,19788,19212,19242,19278,25525,20579,19301,19596,19271,25518,20572,19294,19589,19324,19353,35639,19379,39467,19401,41728,19421,19500,24458,19544,19575,19614,19632,19650,19559,19612,19630,19648,19666,19029,19696,19712,19728,19753,19773,19830,19435,19449,19888,19905,19856,19887,19904,19921,19947,19984,20043,20080,20119,20157,20536,20191,20213,20542,20197,20219,19931,20235,20264,20301,20317,20346,20333,20349,20365,20381,20397,20422,20606,20438,20477,20503,21067,21068,20521,20558,20595,20622,20652,23888,18878,20683,20699,20715,20779,20814,20880,20890,20906,19463,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,21141,42516,42516,42516,42516,48069,42516,42516,42516,42516,25917,42516,42516,42516,42516,42516,41865,26051,21040,42516,42516,42516,27632,42516,42516,51474,42516,42516,42516,42516,42516,42516,42516,32629,20505,21066,18953,21068,19019,18919,18270,40105,18293,18315,42516,42516,18360,42516,49435,42820,18380,18411,18395,18574,19226,18433,20169,18459,25598,18486,18508,51199,18465,25604,18492,18514,20728,18530,42516,30418,42516,42516,42516,50250,25964,50770,42516,18553,39446,18564,20175,20411,20131,20505,23879,18590,26008,18612,18632,18596,18470,18594,26012,18616,18636,20798,20741,20757,42516,18652,18689,18711,18748,18695,18788,42516,41546,48871,18807,18835,19802,18823,19840,25206,18851,18904,18942,18979,19680,19006,18851,18904,18942,18979,19680,19045,20750,46697,19097,19132,20936,31767,19148,19174,19196,20141,20921,19788,19212,19242,19278,25525,20579,19301,19596,19271,25518,20572,19294,19589,19324,19353,35639,19379,39467,19401,41728,19421,19500,24458,19544,19575,19614,19632,19650,19559,19612,19630,19648,19666,19029,19696,19712,19728,19753,19773,19830,19435,19449,19888,19905,19856,19887,19904,19921,19947,19984,20043,20080,20119,20157,20536,20191,20213,20542,20197,20219,19931,20235,20264,20301,20317,20346,20333,20349,20365,20381,20397,20422,20606,20438,20477,20503,21067,21068,20521,20558,20595,20622,20652,23888,18878,20683,20699,20715,20779,20814,20880,20890,20906,19463,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,51361,42516,42516,42516,42516,51537,42516,42516,42516,42516,25917,42516,42516,42516,42516,46741,49861,51029,26099,42516,42516,42516,27632,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,28241,22657,46314,35273,38147,34810,28721,42516,42516,42516,34304,42516,42516,42516,42516,42516,42516,42516,42516,28243,22657,22657,22657,22657,27401,46316,46316,46316,48318,38147,38147,38147,38147,40896,22382,42516,42516,42516,42516,42516,42516,23487,42516,42516,42516,42516,38368,22657,22657,22657,22657,38374,22541,46316,46316,46316,46316,44805,38147,38147,38147,38147,38147,32923,26115,26152,42516,42516,42516,42516,42516,23487,42516,42516,42516,38370,22657,22657,22657,22657,30360,22540,46316,46316,46316,46316,22343,30533,38147,38147,38147,38147,27826,35762,23510,42516,42516,42516,42516,26178,42516,23255,22657,22657,22657,22657,22877,22539,46316,46316,46316,46316,32774,38147,38147,38147,38147,34440,41769,42516,42516,42516,42516,42516,28242,22657,22657,22657,46191,46316,46316,46316,32038,38147,38147,38147,27827,22690,42516,42516,23464,42516,38368,22657,22657,40730,46316,46316,36583,38147,38147,40469,42516,42516,42516,42516,38373,22657,28384,46316,46316,36586,38147,27827,22690,34920,42516,38372,43148,46316,28405,38147,22683,36804,38368,28385,28404,30535,36803,38372,46315,38146,28238,43147,27775,22913,28244,40729,36585,22448,28385,36584,34366,22755,31692,28429,22929,23e3,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,51361,42516,42516,42516,42516,51537,42516,42516,42516,42516,25917,42516,42516,42516,42516,46741,49861,51029,26099,42516,42516,42516,27632,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,28241,22657,46314,35273,38147,34810,28721,42516,42516,42516,34304,42516,42516,42516,42516,42516,42516,42516,42516,28243,22657,22657,22657,22657,27401,46316,46316,46316,48318,38147,38147,38147,38147,40896,22382,42516,42516,42516,42516,42516,42516,23487,42516,42516,42516,42516,38368,22657,22657,22657,22657,38374,22541,46316,46316,46316,46316,44805,38147,38147,38147,38147,38147,32923,26115,26152,42516,42516,42516,42516,42516,23487,42516,42516,42516,38370,22657,22657,22657,22657,30360,22540,46316,46316,46316,46316,22343,30533,38147,38147,38147,38147,27826,35762,23510,42516,42516,42516,42516,42516,42516,23255,22657,22657,22657,22657,22877,22539,46316,46316,46316,46316,32774,38147,38147,38147,38147,34440,41769,42516,42516,42516,42516,42516,28242,22657,22657,22657,46191,46316,46316,46316,32038,38147,38147,38147,27827,22690,42516,42516,42516,42516,38368,22657,22657,40730,46316,46316,36583,38147,38147,40469,42516,42516,42516,42516,38373,22657,28384,46316,46316,36586,38147,27827,22690,34920,42516,38372,43148,46316,28405,38147,22683,36804,38368,28385,28404,30535,36803,38372,46315,38146,28238,43147,27775,22913,28244,40729,36585,22448,28385,36584,34366,22755,31692,28429,22929,23e3,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,51361,42516,42516,42516,42516,51537,42516,42516,42516,42516,25917,42516,42516,42516,42516,46741,49861,51029,26099,42516,42516,42516,27632,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,28241,22657,46314,35273,38147,34810,28721,42516,42516,42516,34304,42516,42516,42516,42516,42516,42516,42516,42516,28243,22657,22657,22657,22657,27401,46316,46316,46316,48318,38147,38147,38147,38147,40896,22382,42516,42516,42516,42516,42516,42516,23487,26196,42516,42516,42516,38368,22657,22657,22657,22657,38374,22541,46316,46316,46316,46316,44805,38147,38147,38147,38147,38147,32923,26115,26152,42516,42516,42516,42516,42516,23487,42516,42516,42516,38370,22657,22657,22657,22657,30360,22540,46316,46316,46316,46316,22343,30533,38147,38147,38147,38147,27826,35762,23510,42516,42516,42516,42516,42516,42516,23255,22657,22657,22657,22657,22877,22539,46316,46316,46316,46316,32774,38147,38147,38147,38147,34440,41769,42516,42516,42516,42516,42516,28242,22657,22657,22657,46191,46316,46316,46316,32038,38147,38147,38147,27827,22690,42516,42516,42516,42516,38368,22657,22657,40730,46316,46316,36583,38147,38147,40469,42516,42516,42516,42516,38373,22657,28384,46316,46316,36586,38147,27827,22690,34920,42516,38372,43148,46316,28405,38147,22683,36804,38368,28385,28404,30535,36803,38372,46315,38146,28238,43147,27775,22913,28244,40729,36585,22448,28385,36584,34366,22755,31692,28429,22929,23e3,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,51361,42516,42516,42516,42516,51537,42516,42516,42516,42516,25917,42516,42516,42516,42516,46741,49861,51029,26099,42516,42516,42516,27632,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,28241,22657,46314,35273,38147,34810,28721,42516,42516,42516,34304,42516,42516,42516,42516,42516,42516,42516,42516,28243,22657,22657,22657,22657,27401,46316,46316,46316,48318,38147,38147,38147,38147,40896,22382,42516,42516,42516,42516,42516,42516,23487,42516,42516,42516,42516,38368,22657,22657,22657,22657,38374,22541,46316,46316,46316,46316,44805,38147,38147,38147,38147,38147,32923,26115,26152,42516,42516,42516,42516,42516,26216,42516,42516,42516,38370,22657,22657,22657,22657,30360,22540,46316,46316,46316,46316,22343,30533,38147,38147,38147,38147,27826,35762,23510,42516,42516,42516,42516,42516,42516,23255,22657,22657,22657,22657,22877,22539,46316,46316,46316,46316,32774,38147,38147,38147,38147,34440,41769,42516,42516,42516,42516,42516,28242,22657,22657,22657,46191,46316,46316,46316,32038,38147,38147,38147,27827,22690,42516,42516,42516,42516,38368,22657,22657,40730,46316,46316,36583,38147,38147,40469,42516,42516,42516,42516,38373,22657,28384,46316,46316,36586,38147,27827,22690,34920,42516,38372,43148,46316,28405,38147,22683,36804,38368,28385,28404,30535,36803,38372,46315,38146,28238,43147,27775,22913,28244,40729,36585,22448,28385,36584,34366,22755,31692,28429,22929,23e3,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,51361,42516,42516,42516,42516,51537,42516,42516,42516,42516,25917,42516,42516,42516,42516,46741,49861,51029,26099,42516,42516,42516,27632,42516,42516,31151,42516,42516,42516,42516,42516,42516,42516,28241,22657,46314,35273,38147,34810,28721,42516,42516,42516,34304,42516,42516,31154,42516,42516,42516,42516,42516,28243,22657,22657,22657,22657,27401,46316,46316,46316,48318,38147,38147,38147,38147,40896,22382,42516,42516,42516,42516,42516,42516,23487,42516,42516,42516,42516,38368,22657,22657,22657,22657,38374,22541,46316,46316,46316,46316,44805,38147,38147,38147,38147,38147,32923,26115,26152,42516,42516,42516,42516,42516,23487,42516,42516,42516,38370,22657,22657,22657,22657,30360,22540,46316,46316,46316,46316,22343,30533,38147,38147,38147,38147,27826,35762,23510,42516,42516,42516,42516,42516,42516,23255,22657,22657,22657,22657,22877,22539,46316,46316,46316,46316,32774,38147,38147,38147,38147,34440,41769,42516,42516,42516,42516,42516,28242,22657,22657,22657,46191,46316,46316,46316,32038,38147,38147,38147,27827,22690,42516,42516,42516,42516,38368,22657,22657,40730,46316,46316,36583,38147,38147,40469,42516,42516,42516,42516,38373,22657,28384,46316,46316,36586,38147,27827,22690,34920,42516,38372,43148,46316,28405,38147,22683,36804,38368,28385,28404,30535,36803,38372,46315,38146,28238,43147,27775,22913,28244,40729,36585,22448,28385,36584,34366,22755,31692,28429,22929,23e3,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,51361,42516,42516,42516,42516,51537,42516,42516,42516,42516,25917,42516,42516,42516,42516,46741,49861,51029,26099,42516,42516,42516,27632,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,28241,22657,46314,35273,38147,34810,28721,42516,42516,42516,34304,42516,42516,42516,42516,42516,42516,42516,42516,28243,22657,22657,22657,22657,27401,46316,46316,46316,48318,38147,38147,38147,38147,40896,22382,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,38368,22657,22657,22657,22657,38374,22541,46316,46316,46316,46316,44805,38147,38147,38147,38147,38147,32923,22444,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,38370,22657,22657,22657,22657,30360,22540,46316,46316,46316,46316,22343,30533,38147,38147,38147,38147,27826,41766,42516,42516,42516,42516,42516,42516,42516,23255,22657,22657,22657,22657,30361,22539,46316,46316,46316,46316,30525,38147,38147,38147,38147,34440,41769,42516,42516,42516,42516,42516,28242,22657,22657,22657,37745,46316,46316,46316,37798,38147,38147,38147,27827,22690,42516,42516,42516,42516,38368,22657,22657,40730,46316,46316,36583,38147,38147,40469,42516,42516,42516,42516,38373,22657,28384,46316,46316,36586,38147,27827,22690,34920,42516,38372,43148,46316,28405,38147,22683,36804,38368,28385,28404,30535,36803,38372,46315,38146,28238,43147,27775,22913,28244,40729,36585,22448,28385,36584,34366,22755,31692,28429,22929,23e3,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,51361,42516,42516,42516,42516,51537,42516,42516,42516,42516,25917,42516,42516,42516,42516,46741,49861,51029,26099,42516,42516,42516,27632,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,28241,22657,46314,35273,38147,34810,22786,42516,42516,42516,34304,42516,42516,42516,42516,42516,42516,42516,42516,28243,22657,22657,22657,22657,27401,46316,46316,46316,48318,38147,38147,38147,38147,40896,22382,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,38368,22657,22657,22657,22657,38374,22541,46316,46316,46316,46316,44805,38147,38147,38147,38147,38147,32923,22444,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,38370,22657,22657,22657,22657,30360,22540,46316,46316,46316,46316,22343,30533,38147,38147,38147,38147,27826,41766,42516,42516,42516,42516,42516,42516,42516,23255,22657,22657,22657,22657,30361,22539,46316,46316,46316,46316,30525,38147,38147,38147,38147,34440,41769,42516,42516,42516,42516,42516,28242,22657,22657,22657,37745,46316,46316,46316,37798,38147,38147,38147,27827,22690,42516,42516,42516,42516,38368,22657,22657,40730,46316,46316,36583,38147,38147,40469,42516,42516,42516,42516,38373,22657,28384,46316,46316,36586,38147,27827,22690,34920,42516,38372,43148,46316,28405,38147,22683,36804,38368,28385,28404,30535,36803,38372,46315,38146,28238,43147,27775,22913,28244,40729,36585,22448,28385,36584,34366,22755,31692,28429,22929,23e3,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,51361,42516,42516,42516,42516,51537,42516,42516,42516,42516,25917,42516,42516,42516,42516,46741,49861,51029,26258,42516,42516,42516,27632,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,28241,22657,46314,35273,38147,34810,28721,42516,42516,42516,34304,42516,42516,42516,42516,42516,42516,42516,42516,28243,22657,22657,22657,22657,27401,46316,46316,46316,48318,38147,38147,38147,38147,40896,22382,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,38368,22657,22657,22657,22657,38374,22541,46316,46316,46316,46316,44805,38147,38147,38147,38147,38147,32923,22444,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,38370,22657,22657,22657,22657,30360,22540,46316,46316,46316,46316,22343,30533,38147,38147,38147,38147,27826,41766,42516,42516,42516,42516,42516,42516,42516,23255,22657,22657,22657,22657,30361,22539,46316,46316,46316,46316,30525,38147,38147,38147,38147,34440,41769,42516,42516,42516,42516,42516,28242,22657,22657,22657,37745,46316,46316,46316,37798,38147,38147,38147,27827,22690,42516,42516,42516,42516,38368,22657,22657,40730,46316,46316,36583,38147,38147,40469,42516,42516,42516,42516,38373,22657,28384,46316,46316,36586,38147,27827,22690,34920,42516,38372,43148,46316,28405,38147,22683,36804,38368,28385,28404,30535,36803,38372,46315,38146,28238,43147,27775,22913,28244,40729,36585,22448,28385,36584,34366,22755,31692,28429,22929,23e3,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,51361,42516,42516,42516,42516,51537,42516,42516,42516,42516,25917,48694,42516,42516,42516,46741,49861,51029,26099,42516,42516,42516,27632,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,28241,22657,46314,35273,38147,34810,28721,42516,42516,42516,34304,42516,42516,42516,28605,42516,42516,42516,42516,28243,22657,22657,22657,22657,27401,46316,46316,46316,48318,38147,38147,38147,38147,40896,22382,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,38368,22657,22657,22657,22657,38374,22541,46316,46316,46316,46316,44805,38147,38147,38147,38147,38147,32923,22444,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,38370,22657,22657,22657,22657,30360,22540,46316,46316,46316,46316,22343,30533,38147,38147,38147,38147,27826,41766,42516,42516,42516,42516,42516,42516,42516,23255,22657,22657,22657,22657,30361,22539,46316,46316,46316,46316,30525,38147,38147,38147,38147,34440,41769,42516,42516,42516,42516,42516,28242,22657,22657,22657,37745,46316,46316,46316,37798,38147,38147,38147,27827,22690,42516,42516,42516,42516,38368,22657,22657,40730,46316,46316,36583,38147,38147,40469,42516,42516,42516,42516,38373,22657,28384,46316,46316,36586,38147,27827,22690,34920,42516,38372,43148,46316,28405,38147,22683,36804,38368,28385,28404,30535,36803,38372,46315,38146,28238,43147,27775,22913,28244,40729,36585,22448,28385,36584,34366,22755,31692,28429,22929,23e3,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,51361,42516,42516,42516,42516,51537,42516,42516,42516,42516,25917,42516,42516,42516,42516,47769,26274,26287,26099,42516,42516,42516,27632,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,28241,22657,46314,35273,38147,34810,28721,42516,42516,42516,34304,42516,42516,42516,42516,42516,42516,42516,42516,28243,22657,22657,22657,22657,27401,46316,46316,46316,48318,38147,38147,38147,38147,40896,22382,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,38368,22657,22657,22657,22657,38374,22541,46316,46316,46316,46316,44805,38147,38147,38147,38147,38147,32923,22444,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,38370,22657,22657,22657,22657,30360,22540,46316,46316,46316,46316,22343,30533,38147,38147,38147,38147,27826,41766,42516,42516,42516,42516,42516,42516,42516,23255,22657,22657,22657,22657,30361,22539,46316,46316,46316,46316,30525,38147,38147,38147,38147,34440,41769,42516,42516,42516,42516,42516,28242,22657,22657,22657,37745,46316,46316,46316,37798,38147,38147,38147,27827,22690,42516,42516,42516,42516,38368,22657,22657,40730,46316,46316,36583,38147,38147,40469,42516,42516,42516,42516,38373,22657,28384,46316,46316,36586,38147,27827,22690,34920,42516,38372,43148,46316,28405,38147,22683,36804,38368,28385,28404,30535,36803,38372,46315,38146,28238,43147,27775,22913,28244,40729,36585,22448,28385,36584,34366,22755,31692,28429,22929,23e3,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,51361,42516,42516,42516,42516,51537,42516,42516,42516,42516,25917,42516,42516,42516,42516,46741,49861,51029,26099,42516,42516,42516,27632,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,28241,22657,46314,35273,38147,34810,28721,42516,42516,42516,34304,42516,42516,42516,42516,42516,42516,42516,42516,28243,22657,22657,22657,22657,27401,46316,46316,46316,48318,38147,38147,38147,38147,40896,22382,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,38368,22657,22657,22657,22657,38374,22541,46316,46316,46316,46316,44805,38147,38147,38147,38147,38147,32923,22444,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,38370,22657,22657,22657,22657,30360,22540,46316,46316,46316,46316,22343,30533,38147,38147,38147,38147,27826,41766,42516,42516,42516,42516,42516,42516,42516,23255,22657,22657,22657,22657,30361,22539,46316,46316,46316,46316,30525,38147,38147,38147,38147,34440,41769,42516,42516,42516,26303,42516,28242,22657,22657,22657,37745,46316,46316,46316,37798,38147,38147,38147,27827,22690,42516,42516,42516,42516,38368,22657,22657,40730,46316,46316,36583,38147,38147,40469,42516,42516,42516,42516,38373,22657,28384,46316,46316,36586,38147,27827,22690,34920,42516,38372,43148,46316,28405,38147,22683,36804,38368,28385,28404,30535,36803,38372,46315,38146,28238,43147,27775,22913,28244,40729,36585,22448,28385,36584,34366,22755,31692,28429,22929,23e3,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,26324,42516,42516,42516,42516,51537,42516,42516,42516,42516,25917,42516,42516,42516,42516,46741,49861,51029,26099,42516,42516,42516,27632,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,28241,22657,46314,35273,38147,34810,28721,42516,42516,42516,34304,42516,42516,42516,42516,42516,42516,42516,42516,28243,22657,22657,22657,22657,27401,46316,46316,46316,48318,38147,38147,38147,38147,40896,22382,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,38368,22657,22657,22657,22657,38374,22541,46316,46316,46316,46316,44805,38147,38147,38147,38147,38147,32923,22444,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,38370,22657,22657,22657,22657,30360,22540,46316,46316,46316,46316,22343,30533,38147,38147,38147,38147,27826,41766,42516,42516,42516,42516,42516,42516,42516,23255,22657,22657,22657,22657,30361,22539,46316,46316,46316,46316,30525,38147,38147,38147,38147,34440,41769,42516,42516,42516,42516,42516,28242,22657,22657,22657,37745,46316,46316,46316,37798,38147,38147,38147,27827,22690,42516,42516,42516,42516,38368,22657,22657,40730,46316,46316,36583,38147,38147,40469,42516,42516,42516,42516,38373,22657,28384,46316,46316,36586,38147,27827,22690,34920,42516,38372,43148,46316,28405,38147,22683,36804,38368,28385,28404,30535,36803,38372,46315,38146,28238,43147,27775,22913,28244,40729,36585,22448,28385,36584,34366,22755,31692,28429,22929,23e3,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,21141,42516,42516,42516,42516,48069,42516,42516,42516,42516,25917,35004,26345,26373,26362,26396,35005,26346,21040,42516,42516,42516,27632,42516,42516,51474,42516,42516,42516,42516,42516,42516,42516,32629,20505,21066,18953,21068,19019,18919,18270,40105,18293,18315,42516,42516,18360,37963,49435,42820,18380,18411,18395,18574,19226,18433,20169,18459,25598,18486,18508,51199,18465,25604,18492,18514,20728,18530,42516,30418,42516,42516,42516,50250,25964,50770,42516,18553,39446,18564,20175,20411,20131,20505,23879,18590,26008,18612,18632,18596,18470,18594,26012,18616,18636,20798,20741,20757,42516,18652,18689,18711,18748,18695,18788,42516,41546,48871,18807,18835,19802,18823,19840,25206,18851,18904,18942,18979,19680,19006,18851,18904,18942,18979,19680,19045,20750,46697,19097,19132,20936,31767,19148,19174,19196,20141,20921,19788,19212,19242,19278,25525,20579,19301,19596,19271,25518,20572,19294,19589,19324,19353,35639,19379,39467,19401,41728,19421,19500,24458,19544,19575,19614,19632,19650,19559,19612,19630,19648,19666,19029,19696,19712,19728,19753,19773,19830,19435,19449,19888,19905,19856,19887,19904,19921,19947,19984,26423,20080,20119,20157,20536,20191,20213,20542,20197,20219,19931,20235,20264,20301,20317,20346,20333,20349,20365,20381,20397,20422,20606,20438,20477,20503,21067,21068,20521,20558,20595,20622,20652,23888,18878,20683,20699,20715,20779,20814,20880,20890,20906,19463,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,21141,42516,42516,42516,42516,48069,42516,42516,42516,42516,25917,42516,42516,42516,42516,42516,42516,42517,21040,42516,42516,42516,27632,42516,42516,51474,42516,42516,42516,42516,42516,42516,42516,32629,20505,21066,18953,21068,19019,18919,18270,40105,18293,18315,42516,42516,18360,42516,49435,42820,18380,18411,18395,18574,19226,18433,20169,18459,25598,18486,18508,51199,18465,25604,18492,18514,20728,18530,42516,30418,42516,42516,42516,50250,25964,50770,42516,18553,39446,18564,20175,20411,20131,20505,23879,18590,26008,18612,18632,18596,18470,18594,26012,18616,18636,20798,20741,20757,42516,18652,18689,18711,18748,18695,18788,42516,41546,48871,18807,18835,19802,18823,19840,25206,18851,18904,18942,18979,19680,19006,18851,18904,18942,18979,19680,19045,20750,46697,19097,19132,20936,31767,19148,19174,19196,20141,20921,19788,19212,19242,19278,25525,20579,19301,19596,19271,25518,20572,19294,19589,19324,19353,35639,19379,39467,19401,41728,19421,19500,24458,19544,19575,19614,19632,19650,19559,19612,19630,19648,19666,19029,19696,19712,19728,19753,19773,19830,19435,19449,19888,19905,19856,19887,19904,19921,19947,19984,20043,20080,20119,20157,20536,20191,20213,20542,20197,20219,19931,20235,20264,20301,20317,20346,20333,20349,20365,20381,20397,20422,20606,20438,20477,20503,21067,21068,20521,20558,20595,20622,20652,23888,18878,20683,20699,20715,20779,20814,20880,20890,20906,19463,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,21141,42516,42516,42516,42516,48069,42516,42516,42516,42516,25917,47727,42516,26460,26483,26467,42516,47735,21040,42516,42516,42516,27632,42516,42516,51474,42516,42516,42516,42516,42516,42516,42516,32629,20505,21066,18953,21068,19019,18919,18270,40105,18293,18315,42516,42516,18360,42516,49435,42820,18380,18411,18395,18574,19226,18433,20169,18459,25598,18486,18508,51199,18465,25604,18492,18514,20728,18530,42516,30418,42516,42516,42516,50250,25964,50770,42516,18553,39446,18564,20175,20411,20131,20505,23879,18590,26008,18612,18632,18596,18470,18594,26012,18616,18636,20798,20741,20757,42516,18652,18689,18711,18748,18695,18788,42516,41546,48871,18807,18835,19802,18823,19840,25206,18851,18904,18942,18979,19680,19006,18851,18904,18942,18979,19680,19045,20750,46697,19097,19132,20936,31767,19148,19174,19196,20141,20921,19788,19212,19242,19278,25525,20579,19301,19596,19271,25518,20572,19294,19589,19324,19353,35639,19379,39467,19401,41728,19421,19500,24458,19544,19575,19614,19632,19650,19559,19612,19630,19648,19666,19029,19696,19712,19728,19753,19773,19830,19435,19449,19888,19905,19856,19887,19904,19921,19947,19984,20043,20080,20119,20157,20536,20191,20213,20542,20197,20219,19931,26499,20264,20301,20317,20346,20333,20349,20365,26535,20397,20422,20606,20438,26551,20503,21067,21068,20521,20558,20595,20622,20652,23888,18878,20683,20699,20715,20779,20814,20880,20890,20906,19463,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,51361,29068,42516,42516,42516,51537,26585,26616,29663,26601,26633,26690,26699,26715,26730,26742,26758,26771,26099,19999,42516,26787,26162,26806,41856,26832,26883,26907,26946,30733,26962,26998,27019,27054,46783,31896,27070,46885,46348,36728,27120,42516,42516,34304,27137,37896,42516,27163,34995,39190,42516,27184,43650,22657,22657,22657,27203,27401,46316,46316,41985,48318,38147,38147,38147,37213,40896,22382,42516,27222,48046,42516,27243,27263,27280,42516,42516,27038,20763,27308,27328,22657,22657,27363,27386,27419,35266,46316,30482,27448,27495,27524,27566,38147,35889,38740,46095,27585,26152,27628,42516,45564,42516,47310,23487,42516,46936,27648,27669,27685,34339,22657,27729,22984,44673,27748,45967,46316,27773,39768,32782,27791,37607,38147,27824,22485,27843,27859,27882,27899,42516,27922,31758,27943,23255,33056,27962,22657,42185,33093,27982,30091,46316,35423,43042,32774,28017,38147,38147,42363,28033,23138,28062,40096,28115,41486,28137,21969,22956,28160,22657,46191,35558,28176,28197,32038,49740,47969,28214,27827,28233,42899,42516,21253,42516,38368,42934,43766,40730,37393,48025,36583,51021,44713,40469,42516,42516,42516,42516,38373,22657,28384,46316,46316,36586,38147,27827,22690,34920,42516,38372,43148,46316,28405,38147,22683,36804,38368,28385,28404,30535,28260,28298,33550,28320,28341,28379,28401,28421,26921,40729,36585,44924,28385,36584,34366,22755,31692,28429,22929,23e3,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,51361,42516,28445,42516,42516,51537,42516,42516,42516,42516,31409,28464,42516,28489,28496,28512,28528,28541,26099,42516,42516,42516,27632,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,28241,42942,46314,28557,30860,34810,28721,42516,42516,42516,34304,42516,42516,42516,42516,42516,42516,42516,42516,28243,22657,22657,22657,22657,27401,46316,46316,46316,48318,38147,38147,38147,38147,40896,22382,42516,42516,42516,42516,42516,28583,23487,28604,45602,42516,42516,38368,22657,22657,22657,44648,28621,22541,46316,46316,46316,40008,44805,38147,38147,38147,38147,41449,32923,26115,26152,42516,42516,42516,42516,42516,23487,42516,42516,42516,38370,22657,22657,22657,22657,30360,22540,46316,46316,46316,46316,22343,30533,38147,38147,38147,38147,27826,35762,23510,42516,32305,42516,42516,28652,43395,23255,28671,22657,22657,22657,28690,28706,46316,46316,46316,37589,32774,28762,38147,38147,38147,44356,41769,42516,42516,42516,42516,42516,28242,22657,22657,22657,46191,46316,46316,46316,32038,38147,38147,38147,27827,22690,42516,42516,42516,42516,38368,22657,22657,40730,46316,46316,36583,38147,38147,40469,42516,42516,42516,42516,38373,22657,28384,46316,46316,36586,38147,27827,22690,34920,42516,38372,43148,46316,28405,38147,22683,36804,38368,28385,28404,30535,36803,38372,46315,38146,23013,26674,44310,41661,28244,40729,36585,22448,28385,36584,34366,22755,31692,28429,22929,23e3,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,51361,42516,28784,42516,42516,51537,42516,28813,42516,28831,36313,28851,28860,28876,28891,28903,28919,28932,26099,42516,42516,33807,29427,42516,42516,28948,42516,28965,42516,42516,42516,25275,42516,28986,44283,46314,29021,22622,37863,32069,42516,29066,42516,34304,29084,49128,42516,45291,29103,36853,42516,39408,30216,37513,22657,22657,22657,29138,29162,46316,46316,48917,29187,29203,38147,38147,40896,22382,23471,42516,42516,37970,42516,41320,23487,39926,29222,42516,42516,38368,29257,38293,22657,29296,38374,29315,31567,38618,38779,46316,44805,42631,29346,29367,48610,38147,32923,26115,26152,42516,42516,35359,42516,36267,23487,42516,42516,42516,38370,22657,22657,38875,29587,30360,22540,46316,46316,49716,48753,22343,30533,38147,38147,47896,47206,27826,35762,29388,42516,42516,42516,29423,42516,29443,23255,22657,22657,22657,43545,22877,22539,46316,46316,49625,46316,32774,38147,38147,38147,29464,34440,41769,42516,42516,19074,42516,46902,29483,22657,45738,22657,46191,46316,28001,46316,32038,38147,48630,38147,27827,29518,29546,42516,39530,20864,38368,29566,29583,46250,46316,29603,36583,29623,29640,40469,42516,42516,42516,29661,38373,22657,29679,46316,51108,36586,38147,50541,22690,34920,42516,38372,43148,46316,28405,38147,22683,36804,38368,28385,28404,30535,36803,38372,46315,38146,29702,29722,29738,29754,28244,40729,36585,22448,28385,36584,34366,22755,31692,34720,29778,23e3,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,51361,42516,26790,42516,42516,51537,42516,29812,25227,42516,31450,29831,29840,29856,29871,29878,29894,29907,26099,42516,42516,42516,27632,42516,42516,42516,42516,42516,42516,31072,31070,42516,32276,32283,40826,29686,35273,29923,34810,28721,42516,35352,29943,34304,42516,29968,36872,42516,42516,29988,30012,34471,30028,22581,34160,30064,24121,30107,48780,30128,30172,30191,29624,22523,47650,28217,40896,22382,42516,42516,42516,42735,42516,30232,23487,42516,42516,42516,27906,38368,22657,22657,22657,26867,38374,22541,46316,46316,46316,37425,44805,38147,38147,38147,38147,30252,50615,30272,30304,42516,42516,42516,30320,30338,23487,42516,42516,27104,21782,30358,30377,22657,22657,30395,30434,30481,30498,46316,46316,30515,51071,30551,30568,38147,38147,30585,35762,23510,42516,42516,42516,42516,42516,30625,23255,30648,22657,22657,30668,22877,30687,46316,46316,34855,46316,32837,38147,38147,43217,38147,34440,41769,45029,42516,30729,42516,21024,28242,29299,22657,30749,46191,50174,46316,30776,32038,38147,30812,48472,27827,22690,23708,42516,42516,42516,38368,22657,22657,40730,46316,46316,36583,38147,38147,40469,42516,37071,42516,42516,38373,22657,31523,46316,43307,36586,38147,39352,22690,34920,42516,38372,43148,46316,38137,38147,30829,36804,38368,28385,28404,30535,27085,28354,31634,30852,30600,30074,38197,42103,28244,40729,36585,22448,28385,36584,34366,22755,31692,28429,22929,23e3,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,51361,42516,21805,30876,42516,51537,49762,30895,42516,30918,43094,30942,30951,30967,30982,30994,31010,31023,26099,42516,31039,39573,31055,20844,31088,31151,40795,31438,31118,31138,31170,31208,31224,31259,31325,39316,31341,31357,42305,39859,31243,31397,39944,31425,33906,31466,31484,36903,42516,42516,38844,42516,28243,31508,40831,43064,26242,31546,31583,49551,32501,35578,43001,31607,35023,30465,31623,22382,40777,39e3,31658,40711,31716,41838,31747,42230,41234,31783,31813,31829,31873,31912,31936,31952,31988,32019,35868,32054,38034,47598,32094,32110,32136,39813,32152,32186,47170,32233,26152,32263,42516,49503,42516,32299,32321,32337,32365,32386,32406,32424,22657,35078,32463,30760,22540,32487,46316,47681,50971,43200,30533,32517,38147,37625,38481,40265,32560,23510,18666,32576,32596,39698,32624,37664,32645,31965,32706,47478,32693,32731,32762,40433,46316,32798,32825,32774,32853,32872,49013,32893,32919,41769,42516,21429,46706,42516,42516,32939,25143,43551,27695,46191,47568,50517,33128,32038,44391,37914,44027,27827,22690,51501,22158,32960,23571,32997,33045,33080,33109,33144,33160,33196,33225,33259,33289,25257,41794,33305,33321,22943,47433,44826,33342,33363,33392,45913,37247,22690,23238,33434,38372,47456,46316,49977,38147,33455,33478,32944,28385,33515,33536,30206,38372,33571,38971,31372,39304,33587,33611,33627,33643,33674,33720,28385,36584,33273,33742,31692,28429,22929,23e3,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,51361,42516,42516,33784,42516,51537,33805,33823,29972,43389,33866,33897,42516,33882,33940,33947,33963,33976,26099,42516,42516,20279,27632,42516,42516,42516,42516,42516,41269,42516,41261,42516,41268,25123,41628,38176,37400,33992,34810,28721,42516,34012,42516,34304,34012,42516,42516,42516,34029,34013,37295,42516,28243,34045,22657,22657,22657,34069,34103,46316,46316,48318,47159,38147,38147,38147,40896,22382,42516,42516,42516,42516,42516,42516,23487,42516,42516,45931,42516,38368,22657,22657,22657,44213,38374,22541,46316,46316,46316,42968,44805,38147,38147,38147,38147,34120,32923,26115,26152,42516,42516,42516,42516,42516,23487,42516,46602,42516,38370,22657,22657,30041,22657,30360,22540,46316,46316,42268,46316,22343,30533,38147,38147,44e3,38147,27826,35762,23510,42516,42516,42516,42516,42516,39273,23255,22657,22657,22657,37139,22877,22539,46316,46316,49643,46316,32774,38147,38147,38147,48815,34440,41769,42516,42516,42516,42516,42516,28242,22657,22657,22657,46191,46316,46316,46316,32038,38147,38147,38147,27827,22690,42516,42516,42516,42516,38368,22657,22657,40730,46316,46316,36583,38147,38147,40469,46733,42516,42516,42516,36647,22657,28384,27995,46316,49984,38147,27827,22690,34920,42516,38372,43148,46316,28405,38147,22683,36804,38368,28385,28404,30535,36803,38372,46315,38146,28238,43147,27775,22913,28244,40729,36585,22448,28385,36584,44874,43254,31692,29762,34139,23e3,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,51361,42516,42516,42516,42516,51537,42516,38852,42516,42516,51280,34176,34185,34201,34208,34215,34231,34244,26099,42516,42516,42516,27632,42516,42516,34401,42516,42516,42516,42516,42516,42516,42516,28241,22657,46314,35273,38147,34810,37878,42057,42516,42516,34304,42516,42516,42516,42516,34260,42516,42516,42516,28243,22657,22657,22657,22657,27401,46316,46316,46316,48318,38147,38147,38147,38147,40896,22382,42516,42516,42516,42516,42516,42516,42516,42516,34278,42516,28081,38368,22657,22657,22657,22657,38374,42076,46316,46316,46316,46316,46212,38147,38147,38147,38147,38147,32923,22444,42516,42516,42516,47761,42516,34299,19108,42516,42516,19113,34320,22657,22657,34338,22657,30360,22540,46316,34104,46316,46316,22343,30533,38147,42837,38147,38147,27826,34355,42516,42516,42516,34399,42516,42516,42516,23255,22657,22657,22657,22657,30361,22539,46316,46316,46316,46316,30525,38147,38147,38147,38147,34440,41769,42516,42516,38663,42516,34417,28242,22657,22657,38760,37745,46316,46316,50996,37798,38147,38147,38147,34438,22690,34456,18364,34487,34538,24114,31309,31274,34559,34565,27432,34581,44559,30458,34604,22076,42516,19757,34657,29792,34679,47804,33555,31559,34736,35451,34758,22690,41150,39051,35676,32439,38610,34776,34795,22683,36804,38368,28385,28404,30535,36803,38372,46315,38146,28238,43147,27775,22913,28244,40729,36585,22448,28385,36584,34366,22755,34833,34871,22929,23e3,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,51361,42516,42516,42516,42516,51537,42516,42516,42516,42516,25917,42516,42516,42516,42516,46741,49861,51029,26099,18277,42516,42516,34899,42516,42516,42516,36062,42516,36065,42516,42516,34947,34936,36697,22657,34963,27757,38148,48007,34986,42516,42516,29815,34304,21387,19116,42516,38636,42516,42516,42516,42516,28243,22657,22657,43325,22657,27401,46316,46316,30705,48318,38147,38147,38147,35021,40896,22382,42516,42516,42516,42516,42516,42516,42516,42516,35376,42516,35039,38368,22657,22657,22657,22657,50945,22541,46316,46316,46316,46316,38717,38147,38147,38147,38147,38147,41757,22444,42516,35059,42516,42516,42516,42516,42516,42516,42516,39196,38370,35077,22657,22657,22657,30360,46821,46316,46316,46316,46316,22343,23541,38147,38147,38147,38147,27826,41766,42516,42516,42516,50318,42516,42516,42516,23255,22657,22657,22657,46040,30361,22539,46316,46316,46316,34080,30525,38147,38147,38147,42204,34440,41769,42516,42516,46608,42516,42516,28242,22657,22657,22657,37745,46316,46316,46316,37798,38147,38147,38147,27827,22690,42516,42516,42516,42516,38368,22657,22657,40730,46316,46316,36583,38147,38147,40469,42516,23434,42516,22428,38373,22657,28384,46316,46316,36586,38147,27827,35094,34920,22560,38372,50497,46316,40393,38147,43581,36804,38368,28385,28404,30535,36803,38372,46315,38146,28238,43147,27775,22913,28244,40729,36585,22448,28385,36584,34366,22755,31692,28429,22929,23e3,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,51361,42516,42516,44978,42516,51537,30322,33499,42482,50012,50022,18763,18772,35115,35131,35143,35159,35172,26099,42516,42516,42516,36498,41847,42516,42516,42516,31671,41803,35188,36161,35205,35221,43491,35237,35256,29171,35289,37464,35305,42516,42516,42516,35339,42516,28090,35375,42516,42516,28949,35314,39266,28243,48989,48108,22657,35392,47509,37433,35422,34970,35439,27808,35467,38147,35501,35536,22382,42516,35594,39908,48509,34515,35614,42516,18299,18417,42516,35655,35672,48116,22657,43129,29280,37184,22541,48019,46316,38117,35692,47637,38147,35719,38147,35737,27472,35753,22444,42516,42516,42516,42516,35778,48535,35820,42516,42516,42516,23024,36244,22657,22657,29502,38418,35859,41980,46316,46316,48733,41934,49389,35884,38147,38147,40673,49832,35905,42516,36909,35924,35976,35997,18673,36033,34522,36081,47410,36098,36117,36141,36177,46316,36198,32809,43953,30446,38147,43626,42012,36214,36230,23328,20636,45205,36266,36283,36301,35981,36329,26662,46771,36350,36390,48253,35703,36411,36456,40231,38454,41461,37653,42516,42516,37028,36479,40577,43121,45398,22366,37772,48725,38205,36432,50457,40469,42516,25485,42516,36514,38373,22657,28384,46316,46316,36586,38147,27827,36626,36531,42516,28996,31885,36559,36579,36602,36619,36804,36642,28385,28404,30535,42423,49897,44263,36663,36694,43147,27775,22913,28244,40729,36585,22448,36713,36744,34366,22755,31692,28429,36774,36790,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,51361,42516,42516,39935,42516,51537,42516,42516,42516,42516,25917,42516,29952,39942,19158,38671,36820,36833,26099,42516,42516,42516,27632,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,28241,22657,46314,35273,38147,34810,28721,42516,42516,42516,34304,42516,42516,42516,42516,42516,42516,42516,42516,28243,22657,22657,44206,22657,27401,46316,46317,46316,48318,38147,38147,34588,38147,40896,22382,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,38368,22657,22657,22657,22657,38374,22541,46316,46316,46316,46316,44805,38147,38147,38147,38147,38147,32923,22444,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,38370,22657,22657,22657,22657,30360,22540,46316,46316,46316,46316,22343,30533,38147,38147,38147,38147,27826,41766,42516,42516,42516,42516,42516,42516,42516,23255,22657,22657,22657,22657,30361,22539,46316,46316,46316,46316,30525,38147,38147,38147,38147,34440,41769,42516,42516,42516,42516,42516,28242,22657,22657,22657,37745,46316,46316,46316,37798,38147,38147,38147,27827,22690,42516,42516,42516,42516,38368,22657,22657,40730,46316,46316,36583,38147,38147,40469,42516,42516,42516,42516,38373,22657,28384,46316,46316,36586,38147,27827,22690,34920,42516,38372,43148,46316,28405,38147,22683,36804,38368,28385,28404,30535,36803,38372,46315,38146,28238,43147,27775,22913,28244,40729,36585,22448,28385,36584,34366,22755,31692,28429,22929,23e3,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,51361,42516,42516,19484,42516,51537,42516,42516,42516,42516,25917,42516,42516,42516,42516,46741,49861,51029,26099,42516,42516,42516,27632,42516,42516,36849,42516,42516,42516,42516,42516,42516,42516,28241,22657,46314,35273,38147,34810,28721,42516,42516,42516,34304,42516,42516,42516,42516,42516,42516,42516,42516,28243,22657,22657,22657,22657,27401,46316,46316,46316,48318,38147,38147,38147,38147,40896,22382,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,38368,22657,22657,22657,22657,38374,22541,46316,46316,46316,46316,44805,38147,38147,38147,38147,38147,32923,22444,42516,36869,42516,42516,42516,42516,42516,42516,42516,42516,46294,22657,22657,22657,22657,30360,49232,46316,46316,46316,46316,22343,30796,38147,38147,38147,38147,27826,41766,42516,42516,42516,42516,42516,42516,42516,23255,22657,22657,22657,22657,30361,22539,46316,46316,46316,46316,30525,38147,38147,38147,38147,34440,41769,42516,42516,42516,42516,42516,28242,22657,22657,22657,37745,46316,46316,46316,37798,38147,38147,38147,27827,22690,42516,42516,42516,42516,38368,22657,22657,40730,46316,46316,36583,38147,38147,40469,42516,42516,42516,42516,38373,22657,28384,46316,46316,36586,38147,27827,22690,34920,42516,38372,43148,46316,28405,38147,22683,36804,38368,28385,28404,30535,36803,38372,46315,38146,28238,43147,27775,22913,28244,40729,36585,22448,28385,36584,34366,22755,31692,28429,22929,23e3,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,51361,42516,42516,46996,42516,51537,42516,23354,42516,42753,36888,36925,36938,36954,36961,36977,36993,37006,26099,42516,37022,42516,27632,42516,41516,26816,42516,42516,37044,42516,37049,18537,37065,37087,37117,44086,37200,37235,39844,33658,37263,42516,42516,35791,42516,42516,34914,28072,42516,37291,22389,37311,18926,37716,37348,43712,48153,37366,37382,46316,37416,40607,40193,49587,35520,37449,27508,37480,37934,42516,42516,42516,42516,41144,42516,42516,42516,42516,42516,38368,37503,36125,22657,37529,39594,37550,37566,48265,46316,37588,30713,29645,37605,37623,38799,38147,37641,22444,42516,42516,37688,42516,42516,49494,24999,42516,42516,42516,38370,22657,22657,29494,37704,37740,22540,46316,46316,40001,37761,37795,30533,38147,38147,37825,37814,37848,41766,42516,37894,42516,42516,51139,42516,42516,23255,22657,41398,22657,22657,30361,22539,42274,46316,46316,46316,30525,38147,37912,38147,38147,34440,41769,37930,36490,42516,34663,37950,28242,37986,22657,22657,46812,38013,46316,46316,45485,49261,38147,38147,48821,22690,49311,42516,42516,38050,38368,41404,22657,40730,47057,46316,36583,48937,38147,40469,42516,21575,42516,42516,38373,22657,38069,46316,45780,36586,38147,40463,22690,34920,42516,38372,43148,46316,28405,38147,22683,36804,38368,28385,28404,30535,36803,38372,46315,38146,28238,43147,27775,22913,28244,38089,46273,22694,23034,40134,34366,22755,38105,38164,22929,23e3,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,51361,42516,42516,26200,42516,51537,42516,27946,42516,42516,47834,20951,20960,38221,38236,38243,38259,38272,26258,42516,38551,42516,27632,42516,34262,42516,42516,42516,38553,42516,38546,21091,38552,21774,38288,31700,35273,38309,34810,28721,42516,42516,38329,34304,42516,29241,23811,23953,42516,42516,42516,38347,38364,33022,22657,38390,38410,28636,46316,29607,39628,38434,42370,38147,48603,38470,47663,38504,38541,39253,39681,42516,42516,42516,42516,41197,42516,42516,42516,38368,31857,22657,38569,22657,38374,22541,38589,28198,46316,46316,44805,29206,27800,32877,38147,38147,32923,22444,42516,28144,42516,38634,42516,45188,42516,38652,42516,42516,38370,39723,22657,22657,38687,30379,22540,23043,46316,46316,38710,22895,30533,49398,38147,38147,38733,27826,41766,42516,42516,42516,42516,42516,42516,42516,23255,22657,22657,22657,22657,30361,22539,46316,46316,46316,46316,30525,38147,38147,38147,38147,34440,41769,42516,42516,42516,42516,42516,28242,22657,22657,22657,37745,46316,46316,46316,37798,38147,38147,38147,27827,33462,42516,42516,42516,42516,38368,38756,22657,40730,38776,46316,36583,38795,38147,40469,42516,42516,42516,42516,38373,22657,28384,46316,38815,36586,49663,27827,22690,34920,42516,38372,43148,46316,28405,38147,22683,49485,38368,44256,40047,45820,38834,38868,32210,38891,28238,43147,27775,22913,28244,40729,36585,22448,28385,38914,38935,22755,31692,28429,22929,23e3,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,51361,42516,42516,27187,42516,30926,42516,34543,38987,37672,39016,39067,39107,39092,39111,39076,39127,39140,26099,42516,25841,23701,20829,39222,20009,42516,39156,41252,39175,39212,32746,21195,39238,26847,39289,45668,39332,39368,34810,28721,32390,42516,42516,26444,30879,36010,28099,40787,39398,38525,26035,39432,39483,44460,39503,41633,22657,32003,22601,46316,49709,48318,47976,47889,30552,38147,33209,39523,39917,39159,42516,39546,42516,42516,40976,42516,42516,42516,39568,39487,37157,22657,39589,22657,38374,39610,45436,46316,39644,46316,44805,27542,39661,38313,38147,38147,32923,22444,42516,42516,42516,42516,30632,42516,42516,21187,39678,39697,39714,22657,22657,50559,22657,39739,39760,46316,46316,38818,46316,39784,39805,38147,38147,32856,38147,39829,41766,46006,39893,48391,49682,42516,39960,34641,39976,38394,40024,37997,33010,30361,22539,40063,40121,43817,40157,30525,40868,40175,40209,40247,34760,44916,20285,40281,34623,40309,51090,50324,48429,40325,40344,40364,39645,40409,40428,40449,38147,40485,49825,39382,22690,40506,42516,42516,22216,40534,39507,48098,30083,50926,38024,33595,45640,28567,40469,40559,42516,40087,26129,45371,31289,28384,40593,41927,40637,40665,40689,34614,41203,40707,27312,43148,48295,28405,40861,22683,50287,38368,40727,40746,40649,40767,40811,22827,40847,33407,49334,48207,33243,28244,40729,36585,22448,28385,36584,41673,40884,31692,28429,22929,40922,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,51361,42516,42516,42516,40951,51537,42516,42744,40972,42516,27292,40992,41001,41017,41032,41039,41055,41068,26099,20248,41084,41102,41129,21286,41166,42516,41182,41219,41286,31731,41302,41336,41352,41368,41384,34883,41420,41436,48349,41477,42516,42240,27121,34422,42516,41511,25267,41532,41575,42516,42516,41594,28243,22657,31843,41613,34053,27401,40159,35568,34847,41649,38147,27550,41689,41744,40896,22382,42516,26380,42516,41578,42516,44762,41785,42516,41828,27866,41270,19255,22657,41881,41897,22657,35406,41916,43971,44095,46316,46316,41950,22851,37219,42001,38147,29467,32923,42028,42044,42516,46644,19385,42516,42516,42516,42516,42516,34632,38370,22657,27339,43920,22657,30360,22540,46316,44514,36395,46316,22343,30533,38147,35478,49592,38147,27826,41766,42516,42516,21305,42516,31235,42516,42516,23255,22657,22657,22657,22657,20064,42074,46316,46316,46316,46316,42093,38147,38147,38147,38147,50734,41769,50664,35952,42516,42516,42516,41113,22657,42177,22657,45759,46316,43945,46316,45799,38147,45843,38147,27827,29041,42127,42516,42516,42516,48412,30671,22657,38073,44692,46316,33520,45533,38147,40469,42146,42516,42516,42516,38373,22657,28384,46316,46316,36586,38147,27827,43588,34920,42516,42166,40348,33173,48271,42201,22683,42220,41559,42256,42290,42321,33756,44448,35547,42352,28238,43147,27775,22913,28244,40729,36585,22448,28385,36584,32531,22755,42386,28429,22929,42410,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,51361,42516,42516,42516,39045,51537,42516,42516,42439,19363,42461,42498,42516,31468,42533,42547,42563,42576,26099,42516,42516,25867,27632,42516,42516,42516,42592,26617,42516,42516,26436,25867,42516,30236,31920,49620,42612,36440,34810,28721,42516,42647,42516,34304,42516,44608,36046,42516,35598,42516,42516,36057,51481,44194,32471,36334,37148,42671,32033,42687,33121,42706,38488,30256,30569,29372,32199,42722,42778,42516,42799,42516,49524,50043,35835,42516,42516,42516,42516,38368,22657,22657,37175,22657,38374,22541,46316,46316,47563,46316,44805,38147,38147,38147,42836,38147,32923,42853,42888,35656,42516,42516,42516,50763,30902,39460,48700,42516,38370,22657,42923,22657,22657,37350,22540,46316,42958,46316,46316,27403,30533,38147,42991,38147,38147,27826,41766,42516,29233,42516,42516,42516,43017,42516,23255,22657,22657,49093,22657,22325,22539,46316,46316,43039,46316,30788,38147,38147,35485,38147,34440,41769,42516,42516,42516,42516,42516,28242,22657,22657,22657,37745,46316,46316,46316,37798,38147,38147,38147,27827,22690,42516,36017,42516,42516,43058,22657,22657,40730,46316,46316,36583,38147,38147,48843,42516,42516,42516,42516,38373,22657,28384,46316,46316,36586,38147,27827,22690,34920,42516,38372,43148,46316,28405,38147,46409,43080,43110,32715,30112,30535,40935,43145,46315,38146,28238,43147,27775,22913,28244,40729,36585,22448,28385,36584,34366,22755,31692,28429,22929,23e3,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,51361,42516,42516,42516,42516,51537,42516,42516,42516,42516,25917,42516,42516,42516,42516,46741,49861,51029,26099,42516,42516,42516,27632,42516,42516,35061,42516,42516,42516,28279,28282,18254,28275,31684,43164,43182,29146,43216,43233,29330,43270,42516,42516,34304,42516,42516,42516,42516,42516,42516,42516,42516,28243,22657,22657,22657,22657,27401,46316,46316,46316,48318,38147,38147,38147,38147,40896,22382,42516,42516,42516,43287,42516,42516,42516,42516,42516,42516,42516,38368,22657,22657,22657,22657,38374,43306,46316,46316,46316,46316,50852,38147,38147,38147,38147,38147,32923,22444,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,38370,22657,22657,22657,22657,30360,22540,46316,46316,46316,46316,22343,30533,38147,38147,38147,38147,27826,41766,42516,42516,42516,42516,42516,42516,42516,23255,22657,22657,22657,22657,30361,22539,46316,46316,46316,46316,30525,38147,38147,38147,38147,34440,41769,42516,42516,42516,42516,42516,28242,22657,22657,22657,37745,46316,46316,46316,37798,38147,38147,38147,27827,22690,42516,42516,42516,42516,38368,22657,22657,40730,46316,46316,36583,38147,38147,40469,42516,42516,42516,42516,38373,43323,28384,43789,46316,36586,43341,27827,22690,34920,42516,38372,43148,46316,28405,38147,22683,36804,38368,28385,28404,30535,36803,38372,46315,38146,28238,43147,27775,22913,28244,40729,36585,22448,28385,36584,34366,22755,31692,28429,22929,23e3,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,51361,42516,42516,42516,50278,22100,42516,42516,50243,42516,29530,43375,33789,43361,43411,43418,43434,43447,26099,42516,33915,33924,27632,40956,43463,43486,41243,43507,26512,26972,26982,27147,41812,42783,43531,49966,43567,43604,44058,40078,42516,42516,42516,23213,43642,34502,43666,43684,38517,42516,42516,35323,43702,22657,43728,30048,43746,43782,42975,46316,43805,34708,43833,43850,27569,49274,49874,43871,42516,42516,42516,45270,35189,42516,42516,43894,43668,42516,42814,33726,22657,43915,22657,37724,49041,43936,46316,43969,46316,45680,43987,44022,33996,38147,38147,44043,44074,22444,42516,42516,19081,42516,44111,44127,42516,43290,44154,44166,44182,22657,37101,44229,44279,30652,44299,46316,42336,45461,44326,40412,44345,38147,44372,45987,44388,34123,41766,28121,42516,42516,24911,44407,50085,42516,44435,27732,44483,22975,22657,30361,22539,44504,42690,46316,46316,30525,28768,44537,44554,38147,40691,44575,42516,44603,44624,42516,42516,28242,44645,22657,22657,44664,44689,46316,46316,49378,44708,38147,38147,49798,22690,42516,44729,42516,42516,20056,22657,22657,34376,46316,51047,22477,38147,44538,40469,42516,22273,42516,42516,38373,22657,28384,46316,46316,36586,38147,27827,22690,34920,42516,38372,43148,46316,28405,38147,22683,44749,26230,34694,49922,44785,36803,38372,46315,38146,47702,44821,44842,44862,21913,40729,36585,22448,28385,36584,40621,44890,44940,42111,22929,23e3,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,51361,42516,42516,42516,46959,51537,45028,47264,44964,45002,45045,45083,45015,45108,45123,45139,45155,45168,26099,45184,28448,42516,28797,42516,42516,30342,42516,42516,45204,45221,31185,28655,31192,26648,48147,38948,50978,45241,34810,28721,45262,45286,25875,34304,35804,42516,42516,42516,42516,45307,45333,42516,45362,45387,27370,22657,22657,45422,45457,45477,46316,48318,45501,22713,45531,38147,40896,22382,41086,42516,42516,45549,45580,42516,42516,42516,42516,42516,41312,38368,32670,37166,22657,22657,33029,22541,45618,47052,46316,46316,45690,35721,38147,45637,38147,38147,45656,22444,42516,42516,45593,44733,42516,45600,35835,45706,27030,38348,45731,22657,22657,40543,26861,45754,45775,46316,46316,43191,44800,45796,45815,38147,38147,40256,45836,45859,28046,42867,49429,42516,25220,42516,19477,43271,20461,22657,22657,27347,45890,30361,22539,46316,48577,44521,46316,30525,38147,38147,46850,45910,34440,41769,42516,50831,45929,19737,42516,28242,22657,45947,43759,50887,46316,45965,46065,28181,38147,45983,46857,27827,22690,42516,42516,46003,44138,38368,22657,22657,40730,46316,46316,36583,38147,38147,29031,51383,46022,26136,47337,46039,22657,46056,46316,34383,36586,38147,46089,46111,34920,46149,46173,43148,46207,44846,46228,32903,36804,38368,46247,46266,45515,36803,38372,46315,38146,35099,35240,22504,22913,46289,46310,46333,36758,46387,47879,34366,22755,31692,28429,22929,23e3,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,51361,42516,42516,42516,27247,51537,42516,42516,23393,42516,46425,46462,46474,46490,46505,46521,46537,46550,26099,46566,25493,25815,46587,26561,21328,46624,21598,42516,46636,46660,46669,46685,46722,46757,46799,32544,46837,46873,41704,47524,33832,37332,35627,34304,46901,42516,44629,46918,39031,46952,46975,47012,47022,48184,31972,27713,43730,47038,31642,47073,47098,47607,47121,47145,47186,47202,47222,47250,47280,47302,42058,42516,47326,47353,42516,42516,47371,47388,46928,47404,47426,47449,47472,29567,47494,47549,47584,47623,47679,36182,44805,36463,37832,40141,38147,32161,32170,47697,42516,45060,42596,50682,47718,42130,47751,46440,36515,21144,38370,47785,29270,22657,44488,47820,47850,47868,40376,46316,45441,47912,47938,47958,43617,38147,38919,47992,41766,29407,48041,42516,27096,48062,42516,50062,40568,48085,38573,48132,48169,30361,48200,48223,48241,48287,48311,47922,47129,22858,48334,43855,34440,40906,48365,50193,42516,22144,48387,48407,44243,48428,22657,49223,47234,48445,46316,47082,50795,48488,38147,33704,22690,42516,48504,48525,42516,20103,22966,48559,32447,40385,48575,48593,50156,48626,48646,48680,42516,33850,39552,21921,26930,48716,48749,48769,48802,45246,48837,48960,48859,48887,32658,28363,48910,33376,48933,48953,36804,38368,28385,28404,30535,36803,38372,46315,38146,28238,43147,45621,46231,48976,39991,49005,49029,40039,49057,44903,22755,31692,28429,49073,23e3,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,51361,42516,42516,42516,42516,49109,42516,42516,49144,42516,32608,18328,18337,49164,18337,18344,49180,49193,26099,42516,42516,42516,27632,20863,28835,42516,42516,42516,42516,28834,42516,20857,42516,28241,49209,31530,22841,49248,36678,30143,33493,42516,42516,34304,42516,42516,35043,49290,42516,42516,42516,38053,28243,49327,22657,22657,22658,49350,46316,46316,46316,31591,33687,38147,38147,38147,49366,49414,49451,42516,49474,49519,42516,42516,43686,45346,42516,46571,46157,38368,45949,40328,45406,25137,29005,22541,48786,34087,38601,49540,48459,38147,33697,39345,49573,33236,49608,22444,42516,19180,42516,50588,42516,42516,42516,18791,42516,42516,38370,38694,22657,22657,22657,30360,49641,32217,46316,46316,46316,22343,49659,38898,38147,38147,38147,27826,41766,46990,42516,49679,42516,42516,42516,42516,20094,31303,22657,22657,22657,30361,49698,46316,46316,46316,46316,30525,49732,38147,38147,38147,34440,35908,42516,42516,46023,49756,42516,29706,37130,22657,22657,39744,38128,46316,46316,49778,49814,38147,38147,49848,22690,22055,42516,42516,42516,38368,22657,22657,40730,46316,46316,36583,38147,38147,40469,42516,42516,42516,42516,38373,22657,28384,46316,46316,36586,38147,27827,22690,34920,42516,34322,43148,47105,28405,38446,22683,36804,38368,28385,28404,30535,36803,38372,46315,38146,28238,43147,27775,22913,49890,49913,49938,22448,28385,36584,34366,34779,33418,49954,22929,23e3,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,51361,42516,42516,42516,42516,5e4,50082,50038,50059,42516,32349,42516,20487,50078,34283,44986,50101,50114,26099,42516,42516,42516,27632,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,28241,50130,42394,35273,50148,34810,28721,42516,36285,32580,34304,42516,42516,42516,42516,42516,25759,42516,42516,28243,27704,22657,37534,22657,27401,50172,46316,38188,48318,29351,38147,30813,38147,40896,22382,42516,42516,42516,42516,42516,41597,42516,42516,42516,42476,42516,38368,22657,50132,22657,22657,38374,22541,46316,49557,46316,46316,44805,38147,38147,50449,38147,38147,32923,22444,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,38370,22657,22657,22657,22657,30360,22540,46316,46316,46316,46316,22343,30533,38147,38147,38147,38147,27826,41766,42516,42516,42516,42516,42516,42516,42516,23255,22657,22657,22657,22657,30361,22539,46316,46316,46316,46316,30525,38147,38147,38147,38147,34440,41769,42516,42516,50190,42516,42516,28242,22657,22657,22657,37745,46316,46316,46316,37798,38147,38147,38147,27827,22690,42516,50209,42516,42516,38368,22657,22657,40730,46316,46316,36583,38147,38147,40469,42516,42516,42516,42516,38373,22657,28384,46316,46316,36586,38147,27827,22690,50231,42516,38372,43148,46316,28405,38147,22683,36804,38368,28385,28404,30535,36803,38372,46315,38146,28238,43147,27775,22913,28244,40729,36585,22448,28385,36584,34366,22755,31692,28429,22929,23e3,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,51361,42516,42516,42516,42516,50266,42516,22306,42516,45067,50303,50340,42516,50365,50380,50394,50410,50423,26099,42516,42516,42516,27632,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,28241,45894,46314,50439,28325,41965,36365,42516,42516,42516,34304,42516,42516,42516,42516,25694,42516,42516,42516,28243,22657,22657,22657,22657,27401,46316,46316,46316,48318,38147,38147,38147,38147,40896,22382,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,38368,22657,22657,22657,22657,38374,22541,46316,46316,46316,46316,44805,38147,38147,38147,38147,38147,32923,22444,42516,42516,42516,42516,42516,42516,50473,42516,42516,42516,50491,22657,22657,22657,22657,30360,50513,46316,46316,46316,46316,22343,50533,38147,38147,38147,38147,27826,41766,42516,42516,29399,42516,42516,42516,42516,23255,22657,22657,50557,22657,50575,22539,46316,43245,46316,33180,30525,38147,47942,38147,38147,50611,41769,42516,42516,42516,42516,42516,28242,22657,22657,22657,37745,46316,46316,46316,37798,38147,38147,38147,27827,22690,42516,42516,42516,42516,38368,22657,22657,40730,46316,46316,36583,38147,38147,40469,42516,42516,42516,42516,38373,22657,28384,46316,46316,36586,38147,27827,22690,34920,42516,38372,43148,46316,28405,38147,22683,36804,38368,28385,28404,30535,36803,38372,46315,38146,28238,43147,27775,22913,28244,40729,36585,22448,28385,36584,34366,22755,31692,28429,22929,23e3,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,26324,42516,42516,42516,42516,51537,42516,42516,42516,42516,25917,42516,42516,42516,42516,48543,50631,50644,26099,42516,42516,42516,27632,50660,42516,50680,42516,42516,42516,29122,42516,21452,29118,32973,50698,44948,35273,50716,34810,28721,42516,42516,42516,50750,27264,27883,43515,42516,42516,42516,42516,42516,28243,22657,43166,22657,49088,27401,46316,30696,30175,48318,38147,38147,50786,27533,40896,50811,50827,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,38368,22657,22657,22657,22657,38374,22541,46316,46316,46316,46316,44805,38147,38147,38147,38147,38147,32923,22444,42516,42516,42516,42516,42516,42516,51530,42516,42516,42516,38370,22657,27966,22657,22657,27206,22540,46316,36563,46316,46316,48225,30533,38147,43345,38147,38147,27826,41766,21110,42516,42516,42516,42516,42516,42516,23255,36082,22657,22657,22657,30361,22539,50847,46316,46316,46316,30525,40490,38147,38147,38147,34440,41769,42516,42516,42516,42516,42516,28242,22657,22657,22657,37745,46316,46316,46316,37798,38147,38147,38147,27827,22690,42516,42516,42516,42516,38368,22657,22657,40730,46316,46316,36583,38147,38147,40469,42516,42516,42516,42516,38373,22657,28384,46316,46316,36586,38147,27827,22690,34920,42516,38372,43148,46316,28405,38147,22683,36804,38368,28385,28404,30535,36803,38372,46315,38146,28238,43147,27775,22913,28244,40729,36585,22448,28385,36584,34366,22755,31692,28429,22929,23e3,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,51361,42516,42516,42516,42516,51537,42516,42516,42516,42516,25917,42516,42516,42516,42516,46741,49861,51029,26099,24903,42516,42516,27632,42516,42516,20017,42516,42516,42516,42516,20023,42516,42516,50868,36101,46314,27462,29927,45874,41719,42516,29087,42516,34304,42516,42516,42516,42516,42516,42516,42516,42872,28243,22657,22657,22657,47797,27401,46316,46316,22542,48318,38147,38147,38147,27479,40896,22382,42516,50903,42516,42516,42516,42516,42516,42516,42150,42516,42516,38368,46183,22657,41900,22657,38374,22541,50922,46316,37779,46316,44805,36603,38147,38147,40222,38147,32923,22444,42516,50475,42516,42516,42516,42516,42516,42516,42516,42516,38370,22657,50942,22657,22657,30360,50961,30499,50994,46316,46316,22343,49789,39662,51012,38147,38147,27826,41766,42516,42516,42516,42516,42516,42516,48664,23255,22657,22657,32677,22657,28304,22539,46316,46316,51045,46316,51063,38147,38147,50725,38147,44006,41769,42516,42516,50906,42516,42516,28242,22657,22657,22657,37745,46316,46316,46316,37798,38147,38147,38147,27827,48656,42516,42516,47372,42516,31381,22657,22657,34817,46316,46316,40751,38147,38147,40469,42516,42516,51087,42516,38373,28681,28384,46316,51106,36586,34742,27827,22690,34920,42516,38372,43148,46316,28405,38147,22683,36804,38368,28385,28404,30535,36803,38372,46315,38146,28238,43147,27775,22913,28244,40729,36585,22448,28385,36584,34366,22755,31692,28429,22929,23e3,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,51361,42516,42516,42516,42516,51537,42516,42516,42516,42516,25917,19962,42516,42516,42516,46741,49861,51029,26099,42516,42516,42516,27632,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,28241,22657,46314,35273,38147,34810,28721,42516,42516,42516,34304,42516,42516,42516,42516,42516,42516,42516,42516,28243,22657,22657,22657,22657,27401,46316,46316,46316,48318,38147,38147,38147,38147,40896,22382,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,38368,22657,22657,22657,22657,38374,22541,46316,46316,46316,46316,44805,38147,38147,38147,38147,38147,32923,22444,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,38370,22657,22657,22657,22657,30360,22540,46316,46316,46316,46316,22343,30533,38147,38147,38147,38147,27826,41766,42516,42516,42516,42516,42516,42516,42516,23255,22657,22657,22657,22657,30361,22539,46316,46316,46316,46316,30525,38147,38147,38147,38147,34440,41769,42516,42516,42516,42516,42516,28242,22657,22657,22657,37745,46316,46316,46316,37798,38147,38147,38147,27827,22690,42516,42516,42516,42516,38368,22657,22657,40730,46316,46316,36583,38147,38147,40469,42516,42516,42516,42516,38373,22657,28384,46316,46316,36586,38147,27827,22690,34920,42516,38372,43148,46316,28405,38147,22683,36804,38368,28385,28404,30535,36803,38372,46315,38146,28238,43147,27775,22913,28244,40729,36585,22448,28385,36584,34366,22755,31692,28429,22929,23e3,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,21141,42516,42516,42516,42516,46123,30288,30286,49299,30156,51124,22408,22410,49308,30152,46133,51161,51174,21040,42516,42516,42516,27632,42516,42516,31797,42516,42516,42516,42516,42516,42516,42516,32629,20505,20792,18990,21068,19019,18919,18270,40105,18293,18315,42516,42516,18360,42516,49435,42820,18380,18411,18395,18574,19226,18433,20169,51190,25598,18486,18508,19308,18465,25604,18492,18514,20728,18530,42516,30418,42516,42516,42516,50250,25964,50770,42516,18553,39446,18564,20175,20411,20131,20505,23879,18590,26008,18612,18632,18596,18470,18594,26012,18616,18636,20798,20741,20757,42516,18652,18689,18711,18748,18695,18788,42516,41546,48871,18807,18835,19802,18823,19840,25206,18851,18904,18942,18979,19680,19006,18851,18904,18942,18979,19680,19045,20750,46697,19097,19132,20936,31767,19148,19174,19196,20141,20921,19788,19212,19242,19278,25525,20579,19301,19596,19271,25518,20572,19294,19589,19324,19353,35639,19379,39467,19401,41728,19421,19500,24458,19544,19575,19614,19632,19650,19559,19612,19630,19648,19666,19029,19696,19712,19728,19753,19773,19830,19435,19449,19888,19905,19856,19887,19904,19921,19947,19984,20043,20080,20119,20157,20536,20191,20213,20542,20197,20219,19931,20235,20264,20301,20317,20346,20333,20349,20365,20381,20397,20422,20606,20438,20477,20503,21067,21068,20521,20558,20595,20622,20652,23888,18878,20683,20699,20715,20779,20814,20880,20890,20906,19463,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,21141,42516,42516,42516,42516,48069,42516,42516,30409,42516,25917,39868,39877,51215,51230,51237,29448,51253,21040,42516,42516,42516,27632,42516,42516,51474,42516,42516,42516,23517,42516,42516,23514,32629,20505,21066,18953,21068,18866,18919,18270,40105,18293,18315,42516,42516,18360,42516,49435,42820,18380,18411,18395,18574,19226,18433,20169,18459,25598,18486,18508,51199,18465,25604,18492,18514,20728,18530,42516,30418,42516,42516,42516,50250,25964,50770,42516,18553,39446,18564,20175,20411,20131,20505,23879,18590,26008,18612,18632,18596,18470,18594,26012,18616,18636,20798,20741,20757,42516,18652,18689,18711,18748,18695,18788,42516,41546,48871,18807,18835,19802,18823,19840,25206,18851,18904,18942,18979,19680,19006,18851,18904,18942,18979,19680,19045,20750,46697,19097,19132,20936,31767,19148,19174,19196,20141,20921,19788,19212,19242,19278,25525,20579,19301,19596,19271,25518,20572,19294,19589,19324,19353,35639,19379,39467,19401,41728,19421,19500,24458,19544,19575,19614,19632,19650,19559,19612,19630,19648,19666,19029,19696,19712,19728,19753,19773,19830,19435,19449,19888,19905,19856,19887,19904,19921,19947,19984,20043,20080,20119,20157,20536,20191,20213,20542,20197,20219,19931,20235,20264,20301,20317,20346,20333,20349,20365,20381,20397,20422,20606,20438,20477,20503,21067,21068,20521,20558,20595,20622,20652,23888,18878,20683,20699,20715,20779,20814,20880,20890,20906,19463,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,21141,42516,42516,42516,42516,36374,42516,42516,42516,42516,31102,50349,51296,51323,51307,51330,32370,51346,21040,42516,42516,42516,27632,42516,42516,51474,51382,42516,26083,42516,42516,42516,26079,32629,20505,21066,18953,21068,19019,18919,18270,40105,18293,18315,42516,42516,18360,42516,49435,42820,18380,18411,18395,18574,19226,18433,20169,51399,25598,18486,18508,21522,18465,25604,18492,18514,20728,18530,42516,30418,42516,42516,42516,50250,25964,50770,42516,18553,39446,18564,20175,20411,20131,20505,23879,18590,26008,18612,18632,18596,18470,18594,26012,18616,18636,20798,20741,20757,42516,18652,18689,18711,18748,18695,18788,42516,41546,48871,18807,18835,19802,18823,19840,25206,18851,18904,18942,18979,19680,19006,18851,18904,18942,18979,19680,19045,20750,46697,19097,19132,20936,31767,19148,19174,19196,20141,20921,19788,19212,19242,19278,25525,20579,19301,19596,19271,25518,20572,19294,19589,19324,19353,35639,19379,39467,19401,41728,19421,19500,24458,19544,19575,19614,19632,19650,19559,19612,19630,19648,19666,19029,19696,19712,19728,19753,19773,19830,19435,19449,19888,19905,19856,19887,19904,19921,19947,19984,20043,20080,20119,20157,20536,20191,20213,20542,20197,20219,19931,20235,20264,20301,20317,20346,20333,20349,20365,20381,20397,20422,20606,20438,20477,20503,21067,21068,20521,20558,20595,20622,20652,23888,18878,20683,20699,20715,20779,20814,20880,20890,20906,19463,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,21141,42516,42516,42516,42516,48069,42516,42516,42516,42516,25917,42516,42516,42516,42516,42516,42516,42517,26099,42516,42516,42516,27632,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,28241,22657,46314,35273,38147,34810,46363,42516,42516,42516,34304,42516,42516,42516,42516,42516,42516,42516,42516,28243,22657,22657,22657,22657,22341,46316,46316,46316,39789,38147,38147,38147,38147,40896,22382,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,38368,22657,22657,22657,22657,38374,22541,46316,46316,46316,46316,44805,38147,38147,38147,38147,38147,32923,22444,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,38370,22657,22657,22657,22657,30360,22540,46316,46316,46316,46316,22343,30533,38147,38147,38147,38147,27826,41766,42516,42516,42516,42516,42516,42516,42516,23255,22657,22657,22657,22657,30361,22539,46316,46316,46316,46316,30525,38147,38147,38147,38147,34440,41769,42516,42516,42516,42516,42516,28242,22657,22657,22657,37745,46316,46316,46316,37798,38147,38147,38147,27827,22690,42516,42516,42516,42516,38368,22657,22657,40730,46316,46316,36583,38147,38147,40469,42516,42516,42516,42516,38373,22657,28384,46316,46316,36586,38147,27827,22690,34920,42516,38372,43148,46316,28405,38147,22683,36804,38368,28385,28404,30535,36803,38372,46315,38146,28238,43147,27775,22913,28244,40729,36585,22448,28385,36584,34366,22755,31692,28429,22929,23e3,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,23494,42516,42516,45092,51424,51429,51429,51451,23492,51445,51467,42516,42516,42516,42516,42516,42516,51474,42516,42516,42516,42516,42516,42516,42516,32629,20505,21066,18953,21068,19019,18919,18270,40105,18293,51497,42516,42516,18360,42516,49435,42820,18380,18411,18395,18574,19226,18433,20169,51190,25598,18486,18508,19308,18465,25604,18492,18514,20728,18530,42516,30418,42516,42516,42516,50250,25964,50770,42516,18553,39446,18564,20175,20411,20131,20505,23879,18590,26008,18612,18632,18596,18470,18594,26012,18616,18636,20798,20741,20757,42516,18652,18689,18711,18748,18695,18788,42516,41546,48871,18807,18835,19802,18823,19840,25206,18851,18904,18942,18979,19680,19006,18851,18904,18942,18979,19680,19045,20750,46697,19097,19132,20936,31767,19148,19174,19196,20141,20921,19788,19212,19242,19278,25525,20579,19301,19596,19271,25518,20572,19294,19589,19324,19353,35639,19379,39467,19401,41728,19421,19500,24458,19544,19575,19614,19632,19650,19559,19612,19630,19648,19666,19029,19696,19712,19728,19753,19773,19830,19435,19449,19888,19905,19856,19887,19904,19921,19947,19984,20043,20080,20119,20157,20536,20191,20213,20542,20197,20219,19931,51517,20264,20301,20317,20346,20333,20349,20365,51553,20397,20422,20606,20438,20453,20503,21067,21068,20521,20558,20595,20622,20652,23888,18878,20683,20699,20715,20779,20814,20880,20890,20906,19463,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,42516,94506,94506,94506,94506,94506,94506,94506,94506,94506,94506,0,94506,90409,94506,94506,94506,94506,94506,94506,94506,94506,94506,365,94506,90409,94506,94506,94506,94506,94506,94506,94506,69632,73728,94506,94506,94506,94506,94506,65536,94506,12290,3,0,0,2183168,0,0,0,90409,94506,299,300,0,2134016,303,304,304,304,304,304,304,304,0,0,0,0,0,304,0,304,1,289,3,0,0,0,295,0,0,0,0,0,0,0,0,0,0,796,0,796,0,0,0,0,0,2424832,2433024,0,0,2457600,0,0,0,0,0,0,0,0,0,0,650,0,0,0,0,0,0,0,0,0,2904064,2908160,0,0,0,0,0,0,0,0,0,0,0,1685,1686,0,1688,0,0,0,0,3117056,0,0,0,0,0,0,0,365,365,0,0,0,0,0,0,448,0,0,474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,559,582,559,582,559,559,582,0,0,0,2138112,0,0,0,0,0,0,0,0,0,0,0,0,0,2991,0,0,0,2772992,2805760,2830336,0,2863104,2920448,0,0,0,0,0,0,0,2805760,2920448,0,0,0,0,0,0,0,2732032,0,2179072,2179072,2179072,2179072,2424832,2433024,0,0,0,0,0,2920448,0,0,0,0,0,0,0,0,0,0,0,1702,0,1704,0,0,2179072,2830336,2179072,2179072,2863104,2179072,2179072,2179072,2179072,2920448,2179072,2179072,2179072,2179072,2179072,2179072,2126737,2126737,2126737,2126737,2126737,2593681,2126737,2126737,2126737,2126737,0,914,2125824,2125824,2125824,2125824,2125824,2424832,2433024,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,0,0,2125824,2125824,2125824,2125824,2723840,2125824,2732032,2772992,2125824,2125824,2125824,2805760,2125824,2830336,2125824,2125824,2863104,2125824,2125824,2125824,2125824,2920448,2125824,2125824,2125824,2125824,2125824,2920448,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,3117056,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2457600,2125824,2125824,2125824,2125824,2183168,0,0,0,0,0,0,0,0,0,0,661,0,661,0,0,0,2408448,0,0,2584576,0,0,0,0,2838528,0,0,2838528,0,0,0,0,0,2179072,2179072,2179072,2408448,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2625536,2179072,2179072,0,2125824,2125824,2125824,2408448,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,3125248,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2662400,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2801664,2813952,2125824,2125824,2801664,2813952,2125824,2838528,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2461696,0,0,0,0,0,0,0,0,0,0,0,0,2600960,0,0,0,0,0,0,2441,0,0,0,0,0,0,0,0,0,0,2493,2494,0,0,2497,0,2768896,2777088,2781184,0,2822144,0,0,2883584,0,0,0,0,0,0,0,0,0,0,0,0,3055616,0,0,0,3080192,3100672,3104768,0,0,0,0,3186688,0,0,0,0,0,0,0,307,204800,0,0,0,0,0,0,0,0,0,111051,111051,111051,111051,111051,111051,111051,111051,1,0,0,0,0,0,2797568,0,0,0,0,0,0,0,2850816,2867200,0,0,0,0,0,441,0,0,332,468,468,468,468,468,468,468,468,468,468,468,468,468,468,468,468,0,0,3133440,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2131,0,0,0,0,0,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2461696,2465792,2179072,2768896,2777088,2781184,2797568,2822144,2179072,2179072,2179072,2883584,2179072,2912256,2179072,2179072,2179072,2179072,2179072,2179072,2523136,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2600960,0,0,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2461696,2465792,2125824,0,1142784,0,2179072,2125824,2125824,2179072,2179072,2179072,2179072,2179072,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2592768,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,0,24576,988,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2523136,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2600960,2125824,0,2125824,2125824,2125824,2125824,2125824,0,0,0,0,0,0,0,0,0,0,541,1272,541,541,541,541,2125824,2125824,2125824,2641920,2125824,2125824,2125824,2125824,2125824,2125824,2719744,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,0,2125824,2125824,2125824,2125824,2125824,2125824,299,0,0,0,299,0,300,0,0,0,2768896,2777088,2781184,2797568,2822144,2125824,2125824,2125824,2883584,2125824,2912256,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,0,2125824,2126812,2125824,2125824,2125824,2125824,2125824,2125824,3133440,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,3207168,2125824,0,0,0,2179072,2125824,2125824,2179072,2179072,2179072,2179072,2179072,2125824,2125824,2125824,2125824,0,0,0,0,0,0,2510848,2514944,0,0,2125824,2125824,3133440,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,3207168,2125824,2179072,2125824,0,2125824,2125824,2125824,2125824,2125824,0,0,0,0,0,0,300,0,0,0,0,0,0,2764,0,0,0,0,0,0,0,0,0,0,2059,2060,0,2062,2063,0,0,0,0,2605056,0,0,0,0,2887680,0,2924544,0,0,0,0,0,0,0,2108,0,0,0,0,0,0,0,0,0,0,0,0,0,1177,0,0,0,0,0,0,3162112,3170304,0,0,3219456,3035136,0,0,0,0,0,3072e3,3190784,0,0,0,0,0,0,0,0,2576384,0,0,0,0,0,0,0,334,0,0,334,0,0,334,0,0,0,0,0,0,0,2387968,0,0,0,0,0,0,0,0,0,0,0,2050,0,0,0,0,3121152,3141632,0,0,0,2924544,0,2682880,0,0,0,0,0,0,3112960,2387968,2924544,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,3035136,2179072,2179072,3072e3,2179072,2179072,2179072,2179072,2699264,2179072,2715648,2179072,2723840,2179072,2732032,2772992,2179072,2179072,2179072,2805760,3121152,2179072,2179072,3141632,2179072,2179072,2179072,3170304,2179072,2179072,3190784,3194880,2179072,0,0,0,0,0,0,541,1734,541,541,541,541,541,541,1740,541,2125824,3190784,3194880,2125824,0,0,0,0,0,0,2387968,2125824,2125824,2125824,2420736,2125824,2125824,2125824,2125824,2125824,2453504,2125824,2473984,2125824,2736128,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2887680,2125824,2125824,2924544,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,0,0,0,2125824,2125824,2125824,2125824,2125824,3141632,2125824,2125824,2125824,3170304,2125824,2125824,3190784,3194880,2125824,2179072,2125824,2125824,2179072,2179072,2179072,2179072,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,299,0,300,3112960,3219456,2125824,2125824,3112960,3219456,2125824,2125824,3112960,3219456,0,0,0,0,0,0,0,347,0,405,0,0,0,0,0,405,3022848,0,0,3145728,0,3203072,0,0,0,0,0,0,0,0,0,0,0,2072,0,0,0,0,0,0,0,3067904,0,0,0,0,0,0,0,0,0,0,0,0,0,3003,0,0,0,0,0,2621440,0,3182592,2899968,0,2961408,0,0,2179072,2179072,2416640,2179072,2179072,2179072,2179072,2928640,2179072,2179072,2179072,2998272,2179072,2179072,2179072,2179072,3059712,2179072,2179072,2179072,2179072,3178496,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2494464,2125824,2125824,0,2179072,2125824,2125824,0,2179072,2125824,2125824,2985984,2985984,2985984,2985984,0,0,0,0,0,0,2490,0,0,0,0,0,0,0,0,0,335,0,0,0,0,0,0,2179072,2445312,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2551808,2179072,2179072,2179072,2179072,3178496,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2495377,2126737,2126737,2126737,2126737,2126737,3179409,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2495451,2126811,2895872,2916352,2179072,2179072,2945024,2179072,2179072,2994176,2179072,3002368,2179072,2179072,3022848,2179072,3067904,3084288,2125824,3096576,2125824,2125824,2125824,2125824,2125824,2125824,2125824,3223552,0,0,2125824,2125824,2416640,3096576,2179072,2179072,2179072,2179072,2179072,2179072,2179072,3223552,0,0,2125824,2125824,2416640,2125824,2125824,2125824,2125824,2125824,2125824,2125824,3035136,2125824,2125824,3072e3,2125824,2125824,2125824,3121152,2125824,2125824,3141632,2125824,2125824,2125824,3170304,2125824,2125824,2125824,2125824,2445312,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2551808,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2637824,2125824,2125824,2125824,2125824,2727936,2752512,2125824,2125824,2125824,2125824,2842624,2846720,2842624,2846720,2125824,2895872,2916352,2125824,2125824,2945024,2125824,2125824,2994176,2125824,3002368,2125824,2125824,3022848,2125824,3067904,2125824,3067904,3084288,2125824,3096576,2125824,2125824,2125824,2125824,2125824,2125824,2125824,3223552,2179072,2125824,2125824,2125824,2125824,2125824,2125824,2125824,3039232,2125824,3063808,2125824,2125824,2125824,2125824,2125824,3100672,2547712,2596864,0,0,0,0,0,0,0,0,0,0,0,0,0,3178496,2670592,0,2744320,0,0,0,0,0,2928640,0,0,0,3059712,0,2543616,2666496,0,2633728,0,0,0,0,0,0,2494464,0,0,0,0,0,0,0,0,0,2780,0,0,0,0,2785,0,0,0,0,2957312,0,0,0,0,0,0,0,0,0,0,0,0,0,3188,0,0,0,0,3211264,0,0,0,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2494464,2179072,2179072,2179072,2707456,2179072,2736128,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2887680,2179072,2179072,2179072,2179072,2641920,2179072,2179072,2179072,2179072,2179072,2179072,2719744,2179072,2179072,2179072,2179072,2179072,2179072,2179072,3137536,2126737,2126737,2499473,2126737,2126737,2126737,2556817,2565009,2179072,2514944,2179072,2179072,2179072,2543616,2547712,2179072,2179072,2596864,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,3039232,2179072,3063808,2179072,2179072,2179072,2179072,3100672,2125824,2125824,2125824,2125824,2125824,3178496,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2494464,2125824,0,2125824,2125824,2125824,2125824,2125824,0,0,0,0,1080,1084,0,0,1088,2125824,2514944,2125824,2125824,2125824,2543616,2547712,2125824,2125824,2596864,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2928640,2125824,2125824,2125824,2998272,2125824,2125824,2125824,2125824,3059712,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,3178496,2179072,2125824,2125824,2179072,2179072,2125824,2125824,2125824,2125824,0,2486272,0,0,0,0,0,2678784,2854912,3006464,2441216,0,0,0,0,0,0,0,0,0,2932736,2965504,0,0,3076096,0,0,0,0,0,444,0,0,0,0,0,0,0,0,0,0,407,0,0,0,0,0,0,2695168,3174400,2646016,2613248,2703360,0,0,0,0,2977792,0,0,3047424,3129344,0,0,0,0,0,645,0,0,648,649,0,0,0,0,0,0,0,725,0,0,0,0,0,0,0,0,0,743,0,0,0,0,0,0,0,0,0,0,0,0,2769,0,0,0,2981888,2396160,0,3153920,0,0,0,0,0,0,0,0,2740224,0,0,0,0,0,0,541,3027,541,541,541,541,541,541,541,541,541,2584,541,541,541,0,0,0,0,0,2793472,0,0,0,0,0,2469888,2506752,2756608,0,0,2580480,0,0,0,0,0,0,2517,0,0,0,0,0,0,0,0,541,541,541,3029,541,541,541,541,541,541,0,2396160,2400256,2179072,2179072,2441216,2179072,2469888,2179072,2179072,2179072,2519040,2179072,2179072,2179072,2179072,2179072,2179072,2801664,2813952,2179072,2838528,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2453504,2179072,2473984,2482176,2179072,2179072,2179072,2179072,2588672,2179072,2613248,2646016,2179072,2179072,2695168,2756608,2179072,2179072,2179072,2932736,2179072,2179072,2179072,2179072,2179072,3117056,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2584576,2179072,2179072,2125824,2125824,2125824,2519040,2125824,2125824,2125824,2125824,2588672,2125824,2613248,2646016,2125824,2125824,2695168,2756608,2125824,2125824,2125824,2125824,2932736,2125824,2125824,2125824,2125824,2125824,2932736,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,3129344,2125824,2125824,3153920,3166208,3174400,2506752,2506752,2506752,0,3108864,3198976,0,0,3043328,0,3149824,2936832,0,2760704,3180,2437120,0,0,0,0,0,0,646,0,0,0,0,651,652,653,654,655,0,0,0,0,0,2953216,0,0,2826240,3158016,2428928,0,3018752,2764800,2572288,0,0,0,0,0,677,0,0,0,0,0,0,0,0,0,0,0,2741,0,0,0,0,0,3051520,2179072,2428928,2437120,2179072,2486272,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2654208,2678784,2760704,2764800,2854912,2969600,2179072,3006464,2179072,3018752,2179072,2179072,2179072,3149824,2125824,2428928,2437120,2969600,2125824,3006464,2125824,3018752,2125824,2125824,2125824,2125824,3149824,2125824,2428928,2437120,2125824,2486272,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2654208,2678784,2760704,2764800,2785280,2854912,2969600,2125824,3006464,2125824,3018752,2125824,2125824,2125824,2125824,3149824,2179072,3051520,2125824,3051520,2125824,3051520,0,2490368,2498560,0,0,0,0,2875392,0,0,0,3180,0,0,0,0,0,0,2834432,0,3227648,2568192,2564096,0,2940928,2179072,2179072,2498560,2179072,2179072,2179072,2555904,2564096,2179072,2179072,2179072,2617344,2179072,2179072,2179072,2179072,2179072,2179072,2662400,2179072,2179072,2179072,2179072,2179072,2179072,2179072,3137536,2125824,2125824,2498560,2125824,2125824,2125824,2555904,2564096,2125824,2555904,2564096,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,3137536,2940928,2940928,0,0,0,0,0,2748416,2879488,0,0,0,0,0,0,0,0,0,2519,0,0,0,0,0,541,2940928,0,0,0,0,0,2748416,2879488,0,3180,0,0,0,0,0,0,0,375,0,0,0,0,0,0,0,360,0,0,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2125824,0,2502656,0,0,3010560,0,0,0,0,0,0,0,0,2990080,2179072,2179072,2179072,3129344,2179072,2179072,3153920,3166208,3174400,2396160,2400256,2125824,2125824,2441216,2125824,2469888,2125824,2125824,2125824,2519040,2125824,2125824,2179072,2502656,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,3010560,2179072,2179072,2125824,2125824,2125824,2125824,2125824,2125824,2605056,2125824,2629632,2125824,2125824,2650112,2125824,2125824,2125824,2707456,2125824,2736128,2125824,2125824,2125824,2125824,2125824,2502656,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,3010560,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,3137536,2125824,2125824,2498560,2125824,2125824,2502656,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,3010560,2125824,2125824,2125824,0,0,0,0,0,0,2739,0,0,0,0,0,0,0,2743,0,0,0,2592768,0,0,0,0,0,0,2179072,2179072,2179072,2179072,2179072,2592768,2179072,2179072,2179072,3129344,2179072,2179072,3153920,3166208,3174400,2397073,2401169,2126737,2126737,2442129,2126737,2470801,2125824,2125824,2449408,0,2535424,3031040,2859008,0,0,0,0,0,2179072,2449408,2179072,2535424,2179072,2609152,2179072,2859008,2179072,2179072,2179072,3031040,2125824,2449408,2125824,2535424,2125824,2609152,2125824,2859008,2125824,2125824,2125824,3031040,2125824,2125824,2449408,2125824,2535424,2125824,2609152,2125824,2859008,2125824,2125824,2125824,0,2179072,2125824,2125824,2457600,2179072,2179072,2179072,2179072,2457600,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2179072,2125824,2125824,2179072,2179072,2179072,2179072,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,0,0,0,0,0,0,0,0,0,0,0,1727,0,0,1728,0,3031040,2125824,2527232,0,0,0,0,0,2179072,2527232,2179072,2179072,2179072,2179072,2179072,2125824,2126738,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,3125248,2125824,2125824,2125824,2125824,2125824,2527232,2125824,2125824,2125824,2125824,2125824,3092480,2125824,2527232,2125824,2125824,2125824,2125824,2125824,3092480,0,0,0,0,0,693,0,0,0,0,0,0,365,365,365,0,0,0,0,0,707,708,0,0,0,0,0,714,0,0,0,0,0,0,703,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3020,3026944,0,0,0,2404352,2179072,2179072,2179072,2179072,3026944,2404352,2125824,2125824,2125824,2125824,3026944,0,2539520,0,2949120,2179072,2658304,2973696,2179072,2125824,2658304,2973696,2125824,2125824,2658304,2973696,2125824,0,2711552,256e4,2179072,256e4,2125824,256e4,2125824,0,2179072,2179072,2531328,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2605056,2179072,2629632,2179072,2179072,2650112,0,0,2809856,0,0,0,0,0,0,0,0,0,0,3088384,0,0,0,0,0,442,0,0,454,470,470,470,470,470,470,470,470,470,470,480,470,470,470,470,470,111051,111051,111051,111051,111051,111051,111051,111051,111051,111051,111051,111051,111051,111051,111051,111051,459,459,111051,459,459,459,459,459,459,459,459,459,111051,111051,111051,111051,111051,111051,111051,111051,111051,111051,459,111051,111051,111051,459,111051,111051,111051,111051,111051,0,0,0,0,0,0,0,0,0,2795,0,0,0,0,0,0,12290,3,0,0,2183168,0,0,0,0,0,299,300,0,2134016,303,304,2125824,1060,0,0,2179072,2125824,2125824,2179072,2179072,2179072,2179072,2179072,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,1060,2125824,2125824,2125824,2125824,2125824,0,0,0,0,0,0,0,0,0,0,662,0,662,0,0,0,0,303,118784,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2434,0,303,303,303,303,303,303,303,0,0,0,0,0,303,0,303,1,12290,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2155,0,12290,3,0,0,2183168,0,0,0,0,0,33403,300,0,2134016,49791,304,2105632,12290,3,0,0,294,0,0,0,0,294,0,0,0,0,0,0,0,2124,0,0,0,0,0,0,0,0,0,788,814,0,814,809,0,0,0,122880,122880,122880,122880,122880,122880,122880,122880,122880,122880,122880,122880,122880,122880,122880,0,0,0,122880,0,122880,122880,122880,0,0,0,0,0,122880,0,0,122880,0,0,0,0,0,0,0,0,122880,0,0,0,0,0,0,0,0,0,0,0,0,3002,0,0,0,0,0,0,0,0,122880,122880,122880,122880,122880,122880,122880,122880,122880,0,0,122880,0,0,0,0,0,0,0,0,0,0,712,0,0,0,716,0,0,0,147456,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2459,0,1092,0,2424832,2433024,0,0,2457600,0,0,0,0,0,0,0,0,0,0,728,0,0,0,0,0,1823,2125824,2125824,2125824,2408448,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,0,1919,2125824,2125824,2125824,0,0,0,131072,0,0,0,69632,73728,0,0,0,0,0,65536,0,0,0,0,0,740,407,0,0,0,0,0,0,0,0,0,0,1158,0,0,0,0,0,0,131072,0,0,131072,131072,0,0,0,0,0,0,0,131072,0,0,131072,0,0,131072,0,0,0,0,135168,135168,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2756,0,0,0,0,135168,0,0,135168,0,0,0,0,0,0,0,0,0,0,735,0,797,0,0,0,0,0,0,0,135168,0,135168,135168,135168,135168,135168,135168,0,135168,135168,135168,135168,135168,135168,135168,0,0,0,0,0,135168,0,135168,1,12290,3,0,0,2183168,0,0,0,0,0,636,637,0,2134016,640,641,0,1361,2125824,2125824,2125824,2125824,2125824,2424832,2433024,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,0,0,987,2125824,2125824,2125824,2125824,0,304,139264,0,0,0,0,0,0,0,0,0,0,0,0,0,0,225709,0,12290,3,0,0,2183168,0,0,0,0,0,299,33406,0,2134016,303,49794,0,61440,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3178,0,304,2424832,2433024,0,0,2457600,0,0,0,0,0,0,0,0,0,0,757,0,0,0,0,762,301,301,301,143661,371,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,301,143661,301,301,143661,301,301,301,143731,301,301,301,143731,69632,73728,301,301,143661,301,301,65536,301,301,301,301,301,143661,143661,143661,143661,143661,143661,143661,143661,143661,301,301,143661,301,301,301,301,301,301,301,301,301,366,301,0,143661,301,301,301,143661,143661,143661,143661,143661,143661,143661,143661,143661,143661,143661,143661,143661,143661,143661,143661,301,301,301,143661,301,143661,143661,143661,143661,143661,143731,143661,143731,143731,143731,143731,143731,143731,143731,143661,143661,143661,143661,143661,143661,143661,143661,1,301,143661,301,143661,143661,143661,143661,143661,143661,301,0,301,0,301,301,301,301,301,301,301,301,301,143661,301,143661,143661,143661,143661,301,0,0,0,3117056,0,0,0,0,0,0,0,2200252,2200252,0,0,0,0,0,0,662,0,0,0,0,0,541,541,541,541,541,541,541,541,2168,541,541,541,0,0,0,0,0,155648,155648,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,325,0,0,0,0,155648,155648,0,155648,155648,155648,155648,155648,155648,155648,155648,155648,0,0,0,0,155648,0,0,155648,155648,155648,155648,155648,155648,155648,155648,155648,155648,155648,155648,155648,155648,155648,155648,0,0,0,0,0,155648,0,155648,0,0,0,0,0,155648,0,0,0,0,0,155648,155648,0,155648,155648,0,12290,3,0,0,2183168,126976,0,0,0,0,299,300,0,2134016,303,304,0,0,0,3117056,0,0,0,0,0,0,0,365,0,0,0,0,0,0,0,3563,0,541,541,541,541,541,541,541,541,541,3209,541,541,541,541,541,159744,159744,159744,159744,0,0,159744,0,0,0,0,0,0,0,0,159744,0,0,0,0,0,0,0,159744,159744,159744,163840,159744,159744,159744,159744,159744,0,0,0,0,0,0,0,0,0,2805,0,541,541,541,541,541,0,25162,0,0,0,159744,0,0,0,25162,25162,25162,159744,25162,25162,25162,25162,25162,25162,25162,25162,159744,159744,159744,159744,25162,159744,25162,1,167936,167936,167936,167936,167936,167936,167936,167936,167936,167936,167936,167936,167936,167936,167936,167936,1,167936,167936,167936,167936,0,0,167936,0,0,0,0,0,0,0,0,167936,167936,167936,167936,167936,167936,167936,167936,167936,0,0,0,0,0,0,0,0,0,2976,0,0,0,0,0,0,0,0,0,2138112,1183,0,0,0,0,0,0,0,0,0,0,0,0,3168,0,0,0,0,0,0,0,0,172032,0,172032,0,0,0,0,0,0,0,0,0,365,0,293,0,0,0,348,172032,172032,0,0,172032,0,0,172032,172032,0,172032,0,0,0,0,172032,172032,0,0,0,0,0,0,0,0,0,0,172032,0,0,0,0,0,0,2777,0,0,0,0,0,0,2784,0,0,0,0,0,0,2986,2987,0,2988,0,2990,0,0,0,0,0,0,0,69632,73728,0,135168,135168,0,0,65536,135168,172032,0,172032,172032,0,172032,172032,172032,172032,172032,172032,172032,172032,172032,172032,172032,172032,172032,172032,172032,172032,172032,172032,172032,172032,172032,172032,172032,172032,172032,0,0,0,0,0,0,0,0,0,3014,0,0,0,0,0,0,176128,176128,176128,176128,176128,176128,176128,176128,176128,176128,176128,176128,176128,176128,176128,176128,1,176128,176128,176128,176128,0,0,176128,0,0,0,0,0,0,0,0,176128,176128,176128,176128,176128,176128,176128,176128,176128,0,0,0,0,0,0,0,0,0,3175,0,0,0,0,0,0,0,3,78115,78115,293,0,634,0,0,0,299,300,0,2134016,303,304,1164,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,361,541,541,1308,541,541,541,541,541,541,541,541,541,541,541,541,541,0,0,2242,0,914,563,563,563,563,563,563,563,563,563,563,563,563,563,563,0,0,587,587,587,1203,541,587,563,541,541,541,541,541,563,563,563,563,3070,563,563,563,563,3074,563,563,587,587,587,587,587,1079,0,0,0,0,0,0,0,0,0,0,1102,0,0,0,0,0,0,0,229376,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1134592,0,0,0,0,1691,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3201,563,563,587,587,587,587,0,0,0,0,0,0,0,0,0,0,541,541,541,541,3569,541,541,0,0,563,563,563,563,563,563,563,2251,563,563,563,563,563,563,587,3109,587,587,587,587,587,587,587,587,2407,587,587,587,587,587,2412,2413,563,563,2288,563,563,563,563,563,563,563,563,563,563,563,563,563,563,3541,587,587,587,2375,587,587,587,587,587,587,587,587,587,587,587,587,587,1497,587,587,0,0,0,563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,1439,0,3007,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3317,541,541,541,541,3038,541,541,541,541,541,541,541,541,541,541,541,541,1300,541,541,541,563,563,563,3078,563,563,563,563,563,563,563,563,563,563,563,563,1401,563,563,563,587,587,587,587,3120,587,587,587,587,587,587,587,587,587,587,587,1042,587,587,587,587,0,3159,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,155648,3214,541,541,541,541,541,541,541,541,541,541,541,541,541,541,541,541,1359,563,563,563,587,3259,587,587,587,3262,587,587,587,587,587,587,587,541,541,563,563,587,587,0,0,0,0,0,0,0,0,0,0,3609,541,541,541,587,587,3270,587,587,587,587,587,587,587,587,587,587,587,587,587,1498,587,587,541,541,541,3330,3331,541,541,541,541,541,541,541,541,563,563,563,563,3581,563,563,563,563,563,3349,563,563,563,563,563,563,563,563,563,587,587,587,587,587,587,587,587,0,541,541,541,3406,541,541,541,541,563,563,563,563,563,563,3415,563,0,587,587,587,587,587,291,1079,0,0,0,0,0,0,0,0,0,249856,249856,249856,249856,249856,249856,249856,249856,1,587,3431,587,587,587,587,587,587,3437,587,587,587,3441,587,541,563,563,3473,563,563,563,563,3478,563,563,563,563,3483,563,563,563,563,977,563,563,563,563,0,587,587,587,587,587,587,1931,587,587,587,587,587,587,587,587,587,2678,587,587,587,2681,587,587,0,0,3456,541,541,541,541,541,541,541,541,541,541,541,541,541,0,2586,0,541,3471,563,563,563,563,563,563,563,563,563,563,563,563,563,563,0,2327,563,3487,587,587,587,587,587,587,587,587,587,587,587,587,587,587,0,0,563,563,587,587,587,587,0,0,541,541,563,563,587,587,0,541,541,541,3205,541,541,541,541,541,541,541,3210,541,541,541,541,541,541,2816,541,541,2820,541,541,541,541,541,541,541,541,3041,541,541,541,541,541,541,541,541,2556,541,541,541,541,541,541,541,541,2233,541,541,541,541,541,0,0,563,587,0,541,563,587,0,541,563,587,0,541,563,587,0,0,0,0,0,0,0,0,0,3510,0,0,0,0,541,541,541,541,541,2165,541,541,541,541,541,541,541,541,3616,563,563,563,563,563,563,563,2265,563,563,563,563,2270,563,563,563,184932,184932,184932,184932,184932,184932,184932,0,0,0,0,0,184932,0,184932,1,12290,3,0,0,0,0,0,0,0,0,0,0,0,0,301,301,0,0,301,301,143661,301,301,301,301,301,301,301,301,301,301,301,143731,301,301,301,301,12290,3,78115,78115,293,0,0,0,0,0,299,300,0,2134016,303,304,587,0,0,188416,541,587,563,541,541,541,541,541,563,563,563,563,587,587,587,587,0,0,0,0,2731,0,0,0,0,305,0,0,0,0,0,0,0,0,0,0,0,0,0,249856,0,0,0,192972,192972,192972,192972,192972,192972,192972,192972,192972,192972,192972,192972,192972,192972,192972,192972,0,192972,0,1,0,0,0,0,0,192972,192972,192972,192972,192972,192972,192972,192972,192972,192972,0,0,192972,0,0,0,0,0,0,0,0,0,0,1145,365,365,0,0,1148,192972,192972,192972,0,192972,192972,192972,192972,192972,0,0,0,0,0,0,0,0,0,3304,0,3180,0,0,0,0,302,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,541,407,407,407,407,407,407,407,0,0,0,0,0,407,0,407,1,12290,3,0,0,0,0,0,0,0,0,0,0,0,118784,299,12290,3,78115,78115,293,0,0,0,0,0,299,300,0,302,303,304,587,0,0,740,541,587,563,541,541,541,541,541,563,563,563,563,587,587,587,587,0,0,2729,0,0,0,0,0,0,740,1184,0,0,0,0,1188,0,0,0,0,0,0,0,378,0,381,0,0,0,381,0,0,563,587,587,587,587,587,1079,1559,0,0,0,1565,0,0,0,1571,2034,0,0,0,0,1577,2036,0,0,0,0,0,0,0,397,0,0,0,0,0,397,0,0,0,0,0,1577,0,0,0,0,0,0,0,0,0,0,0,0,0,262144,0,0,0,0,0,1188,1669,0,0,0,0,0,0,0,0,0,0,0,0,3177,0,0,0,563,563,587,587,587,587,1559,2030,0,0,0,0,1565,2032,0,0,0,0,0,0,2997,0,0,0,0,0,0,0,0,0,0,1586,1587,0,0,0,0,0,0,0,0,1669,0,0,0,0,0,0,0,0,0,0,0,0,106496,0,0,0,0,0,0,2034,0,2036,0,0,0,0,0,0,0,0,0,0,0,0,0,1150976,0,0,0,0,0,563,563,563,563,2325,2652,0,0,0,0,587,587,587,587,587,587,587,587,587,587,587,587,587,2343,0,307,0,307,0,0,0,0,0,0,0,0,0,307,0,0,0,0,0,0,3011,0,0,0,0,3016,3017,0,3019,0,0,0,0,0,204800,204800,0,204800,204800,204800,204800,204800,204800,204800,204800,204800,204800,204800,204800,204800,204800,204800,205107,204800,204800,205106,205107,204800,205106,205106,204800,204800,0,0,0,0,0,0,0,0,0,122880,0,122880,122880,122880,122880,122880,12290,3,0,0,2183801,0,0,0,0,0,299,300,151552,2134016,303,304,0,212992,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,172032,0,0,151552,0,0,0,0,0,0,0,0,0,0,0,0,0,303,0,0,0,0,0,3117056,0,0,0,0,0,0,0,0,2200253,0,0,0,0,0,0,678,0,0,0,0,0,0,0,0,0,0,2977,0,0,0,0,0,0,914,2126737,2126737,2126737,2126737,2126737,2425745,2433937,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,3138449,2126811,2126811,2499547,2126811,2126811,2126737,2724753,2126737,2732945,2773905,2126737,2126737,2126737,2806673,2126737,2831249,2126737,2126737,2864017,2126737,2126737,2126737,2126737,2126811,2126811,2126811,2126811,2126811,2593755,2126811,2126811,2126811,2126811,2126811,2126811,2126811,3036123,2126811,2126811,3072987,2126811,2126811,2126811,3122139,2126811,2126737,2126737,2921361,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,3117969,2126737,0,2126811,2126811,2126811,2126811,2126811,0,0,0,0,0,0,0,0,0,0,1190,0,0,0,0,0,2126811,2425819,2434011,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,3126235,2126811,2126811,2126811,2126811,2126811,2626523,2126811,2126811,2126811,2126811,2126811,2126811,2700251,2126811,2716635,2126811,2724827,2126811,2733019,2773979,2126811,0,2502656,0,0,3010560,0,0,0,0,0,0,0,0,2990080,2179072,2179072,3125248,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2125824,2125824,2125824,2125824,2125824,2592768,2125824,2125824,2125824,2125824,2126811,2126811,2806747,2126811,2831323,2126811,2126811,2864091,2126811,2126811,2126811,2126811,2921435,2126811,2126811,2126811,0,2179072,2126811,2126737,2457600,2179072,2179072,2179072,2179072,2458513,2126737,2126737,2126737,2126737,2126737,2524049,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2601873,2126737,2126737,2458587,2126811,2126811,2126811,2126811,2183168,0,0,0,0,0,0,0,0,0,0,1206,0,1208,0,0,0,0,2126737,2126737,2126737,2409361,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,0,0,2126811,2126811,2126811,2409435,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2839515,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,3118043,2126811,2126811,2126811,2126811,2126811,2126811,2126811,0,0,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2462609,2466705,2126737,2126737,2126737,2642833,2126737,2126737,2126737,2126737,2126737,2126737,2720657,2126737,2126737,2126737,2126737,2126737,2126737,2126737,3040145,2126737,3064721,2126737,2126737,2126737,2126737,2126737,3101585,2769809,2778001,2782097,2798481,2823057,2126737,2126737,2126737,2884497,2126737,2913169,2126737,2126737,2126737,2126737,2126737,2126737,2626449,2126737,2126737,2126737,2126737,2126737,2126737,2700177,2126737,2716561,2126737,2126737,3134353,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,3208081,2126737,0,0,0,0,0,0,3026,541,541,541,541,541,541,541,541,541,541,1352,541,541,541,541,541,0,0,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2462683,2466779,2126811,2126811,2126811,2126811,2126811,2929627,2126811,2126811,2126811,2999259,2126811,2126811,2126811,2126811,3060699,2126811,2126811,2126811,2126811,2454491,2126811,2474971,2483163,2126811,2126811,2126811,2126811,2126811,2126811,2532315,2126811,2126811,2126811,2446299,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2552795,2769883,2778075,2782171,2798555,2823131,2126811,2126811,2126811,2884571,2126811,2913243,2126811,2126811,2126811,2126811,2126811,2126811,2126811,3130331,2126811,2126811,3154907,3167195,3175387,2506752,2507739,2507665,2126811,2126811,3134427,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,3208155,2126811,2179072,2126811,2126811,2126811,2642907,2126811,2126811,2126811,2126811,2126811,2126811,2720731,2126811,2126811,2126811,2126811,2126811,2126811,2126811,3040219,2126811,3064795,2126811,2126811,2126811,2126811,2126811,3101659,0,0,0,2388881,2126737,2126737,2126737,2421649,2126737,2126737,2126737,2126737,2126737,2454417,2126737,2474897,2483089,2126737,2126737,2126737,2126737,2126737,2126737,2532241,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2605969,2126737,2630545,2126737,2126737,2651025,2126737,2126737,2126737,2708369,2126737,2737041,2126737,2126737,2126737,2126737,2126737,2126737,2663313,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,0,0,988,2126811,2126811,2126811,2126811,3036049,2126737,2126737,3072913,2126737,2126737,2126737,3122065,2126737,2126737,3142545,2126737,2126737,2126737,3171217,2126737,2126737,2126737,2888593,2126737,2126737,2925457,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,986,2126811,2126811,2126811,2126811,2126811,2126811,2126737,3191697,3195793,2126737,0,0,0,0,0,0,2388955,2126811,2126811,2126811,2421723,2126811,2126811,2449408,0,2535424,3031040,2859008,0,0,0,0,0,2179072,2449408,2179072,2535424,2126811,2737115,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2888667,2126811,2126811,2925531,2126811,2126811,2126811,2126811,2126811,2585563,2126811,2126811,2126811,2126811,2126811,2618331,2126811,2126811,2126811,2126811,2126811,2126811,2606043,2126811,2630619,2126811,2126811,2651099,2126811,2126811,2126811,2708443,2126811,3142619,2126811,2126811,2126811,3171291,2126811,2126811,3191771,3195867,2126811,2179072,2126811,2126737,2179072,2179072,2179072,2637824,2179072,2179072,2179072,2179072,2727936,2752512,2179072,2179072,2179072,2842624,2846720,2179072,3112960,3219456,2126737,2126737,3113873,3220369,2126811,2126811,3113947,3220443,0,0,0,0,0,0,0,415,415,0,0,0,0,0,415,0,3096576,2179072,2179072,2179072,2179072,2179072,2179072,2179072,3223552,0,0,2126737,2126737,2417553,2126737,2126737,2126737,2126737,2929553,2126737,2126737,2126737,2999185,2126737,2126737,2126737,2126737,3060625,2126737,2126737,2126737,2126737,2933649,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,3130257,2126737,2126737,2126737,2519953,2126737,2126737,2126737,2126737,2589585,2126737,2614161,2646929,2126737,2126737,2696081,2757521,2126737,2446225,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2552721,2126737,2126737,2126737,2638737,2126737,2126737,2126737,2126737,2728849,2753425,2126737,2126737,2126737,2126737,2843537,2847633,2126737,2896785,2917265,2126737,2126737,2945937,2126737,2126737,2995089,2126737,3003281,2126737,2126737,3023761,2126737,3068817,3085201,2126737,3097489,2126737,2126737,2126737,2126737,2126737,2126737,2126737,3224465,0,0,2126811,2126811,2417627,2843611,2847707,2126811,2896859,2917339,2126811,2126811,2946011,2126811,2126811,2995163,2126811,3003355,2126811,2126811,3023835,2126811,3068891,3085275,2126811,3097563,2126811,2126811,2126811,2126811,2126811,2126811,2126811,3224539,2179072,2126811,2126737,2126737,2126737,3031953,2126737,2126811,2450395,2126811,2536411,2126811,2610139,2126811,2859995,2126811,2126811,2126811,2126811,2126811,2524123,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2601947,2126811,2515857,2126737,2126737,2126737,2544529,2548625,2126737,2126737,2597777,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2585489,2126737,2126737,2126737,2126737,2126737,2618257,2126811,2515931,2126811,2126811,2126811,2544603,2548699,2126811,2126811,2597851,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2655195,2679771,2761691,2765787,2786267,2855899,2970587,2126811,3007451,3154833,3167121,3175313,2397147,2401243,2126811,2126811,2442203,2126811,2470875,2126811,2126811,2126811,2520027,2126811,2126811,2126811,2126811,2126811,2638811,2126811,2126811,2126811,2126811,2728923,2753499,2126811,2126811,2126811,2126811,2126811,2126811,3179483,2179072,2126811,2126737,2179072,2179072,2126737,2126737,2126811,2126811,0,0,0,0,0,0,2510848,2514944,0,0,2678784,2760704,2764800,2854912,2969600,2179072,3006464,2179072,3018752,2179072,2179072,2179072,3149824,2126737,2429841,2438033,2126737,2487185,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2655121,2679697,2761617,2765713,2786193,2855825,2970513,2126737,3007377,2126737,3019665,2126737,2126737,2126737,2126737,3150737,2126811,2429915,2438107,2126811,2487259,2126811,2126811,2589659,2126811,2614235,2647003,2126811,2126811,2696155,2757595,2126811,2126811,2126811,2126811,2933723,2126811,2126811,2663387,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2802651,2814939,2126811,3019739,2126811,2126811,2126811,2126811,3150811,2179072,3051520,2126737,3052433,2126811,3052507,0,2490368,2498560,2126811,2556891,2565083,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,3138523,2940928,2941841,2941915,0,0,0,0,0,2748416,2879488,0,3180,0,0,0,0,0,0,0,647,0,0,0,0,0,0,0,0,0,2467,0,0,2470,0,0,0,2179072,2502656,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,3010560,2179072,2179072,2126737,2126737,2126811,2126811,0,2486272,0,0,0,0,0,2678784,2854912,3006464,2503569,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,3011473,2126737,2126737,2126737,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2179072,2126811,2126737,2179072,2179072,2179072,2179072,2126737,2126737,2126737,2126737,2126811,2126811,2126811,2126811,0,0,0,0,0,0,0,0,0,0,0,2112,0,0,0,0,2503643,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,2126811,3011547,2126811,2126811,2126811,0,0,0,2179072,2126811,2126737,2179072,2179072,2179072,2179072,2179072,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2179072,2609152,2179072,2859008,2179072,2179072,2179072,3031040,2126737,2450321,2126737,2536337,2126737,2610065,2126737,2859921,3032027,2126811,2527232,0,0,0,0,0,2179072,2527232,2179072,2179072,2179072,2179072,2179072,2126737,2126737,2802577,2814865,2126737,2839441,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,2126737,3126161,2126737,2528145,2126737,2126737,2126737,2126737,2126737,3093393,2126811,2528219,2126811,2126811,2126811,2126811,2126811,3093467,0,0,0,0,0,782,0,0,0,0,0,0,541,843,541,541,541,541,541,1796,541,541,541,541,541,541,541,541,541,541,541,2822,541,541,541,541,3026944,0,0,0,2404352,2179072,2179072,2179072,2179072,3026944,2405265,2126737,2126737,2126737,2126737,3027857,2405339,2126811,2126811,2126811,2126811,3027931,0,2539520,0,2949120,2179072,2658304,2973696,2179072,2126737,2659217,2974609,2126737,2126811,2659291,2974683,2126811,0,2711552,256e4,2179072,2560913,2126737,2560987,2126811,0,2179072,2179072,3133440,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,2179072,3207168,2179072,0,0,0,0,0,0,2464,0,0,0,0,0,0,0,0,0,324,398,0,0,0,324,0,2126737,2126811,0,2179072,2126737,2126811,0,2179072,2126737,2126811,2985984,2985984,2986897,2986971,0,0,0,0,0,0,3164,0,0,3167,0,0,0,0,0,0,0,1135,0,0,0,0,0,0,0,0,0,824,0,0,0,0,0,0,0,221184,221184,0,0,0,0,0,0,0,0,0,221184,221184,0,0,221184,221184,221184,0,0,0,0,0,0,0,221184,0,0,221184,221184,221184,221184,221184,221184,221184,221184,221184,221184,221184,221184,221184,221184,221184,221184,0,0,0,0,0,0,0,0,0,0,221184,0,221184,221184,221184,221184,221184,221184,221184,221184,221184,221184,1,12290,3,0,0,0,0,0,0,0,0,0,0,0,139264,300,0,303,0,0,0,303,0,304,0,0,0,304,0,0,0,304,69632,139682,0,0,0,0,0,65536,0,0,0,0,98304,0,0,0,53248,0,0,0,0,0,2662400,0,2813952,0,0,3133440,0,98304,0,0,0,0,0,0,0,0,0,0,0,0,111051,0,0,0,0,303,0,304,0,0,0,2473984,2478080,0,0,0,0,0,0,0,0,0,159744,159744,159744,159744,159744,159744,159744,159744,159744,159744,159744,159744,159744,159744,159744,159744,163840,3121152,2179072,2179072,3141632,2179072,2179072,2179072,3170304,2179072,2179072,3190784,3194880,2179072,914,0,0,0,0,0,0,3172,3173,0,0,0,0,0,0,0,0,0,665,0,0,668,0,0,0,0,914,0,2387968,2125824,2125824,2125824,2420736,2125824,2125824,2125824,2125824,2125824,2453504,2125824,2473984,2482176,2125824,2125824,2125824,2125824,2125824,2125824,2531328,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2605056,2125824,3190784,3194880,2125824,988,0,0,0,988,0,2387968,2125824,2125824,2125824,2420736,2125824,0,2125824,2125824,2125824,2125824,2125824,0,0,0,299,0,0,0,303,0,0,0,303,119198,73728,0,0,0,0,0,65536,0,3096576,2179072,2179072,2179072,2179072,2179072,2179072,2179072,3223552,914,0,2125824,2125824,2416640,2125824,2125824,2125824,2125824,2125824,2125824,2625536,2125824,2125824,2125824,2125824,2125824,2125824,2699264,2125824,2715648,2125824,2723840,2125824,2732032,2772992,2125824,3084288,2125824,3096576,2125824,2125824,2125824,2125824,2125824,2125824,2125824,3223552,988,0,2125824,2125824,2416640,225890,225890,225890,225890,225890,225890,225890,225741,225741,225741,225741,225741,225906,225741,225906,1,12290,3,0,0,0,0,0,0,0,90409,90409,90409,90409,0,94506,94506,90409,90409,94506,94506,94506,94506,94506,94506,94506,94506,94506,94506,94506,94506,94506,94506,94506,94506,1,2125824,237568,2125824,2125824,2125824,2125824,2125824,0,0,0,0,0,0,0,0,0,0,1222,0,0,0,0,0,249856,249856,249856,249856,249856,249856,249856,249856,249856,249856,249856,249856,249856,249856,249856,249856,0,0,0,0,0,0,0,0,0,217088,0,0,0,0,0,0,0,0,0,0,0,0,0,304,0,0,2125824,241664,2125824,2125824,2125824,2125824,2125824,0,0,0,0,0,0,0,0,0,0,1236,0,0,0,0,0,254414,254414,254414,254414,254414,254414,254414,254414,254414,254414,254414,254414,254414,254414,254414,254414,0,0,0,0,0,0,0,12290,0,0,0,2183168,0,0,270336,0,0,299,300,0,2134016,303,304,200704,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,687,2125824,0,2125824,2125824,2125824,2125824,2125824,0,0,180224,0,0,0,0,0,0,0,663,0,0,666,667,0,0,0,0,2940928,0,0,0,0,0,2748416,2879488,0,20480,0,0,0,0,0,0,0,679,0,0,0,0,0,0,0,0,0,1129,0,0,0,0,0,0,1,12290,2113826,0,0,0,0,0,0,296,0,0,0,296,0,0,0,0,0,0,3182,0,0,0,0,3187,0,0,0,0,0,0,0,69632,73728,0,0,0,0,0,65536,0,0,0,0,266240,0,0,0,0,0,0,0,0,0,0,0,266240,0,0,0,0,0,0,0,0,0,0,1,0,0,0,266240,0,0,0,0,0,0,0,0,0,0,0,0,0,2662400,0,2813952,12290,2113826,0,0,2183168,0,0,0,0,0,299,300,0,2134016,303,304,2125824,245760,0,0,2179072,2125824,2125824,2179072,2179072,2179072,2179072,2179072,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2584576,2125824,2125824,2125824,2125824,2125824,2617344,2125824,2125824,2125824,2125824,2125824,245760,2125824,2125824,2125824,2125824,2125824,0,0,0,0,0,0,0,0,0,0,1245,0,0,0,0,0,274432,274432,274432,274432,274432,274432,274432,0,0,0,0,0,274432,0,274432,1,12290,3,0,0,0,0,0,253952,0,0,0,253952,0,0,0,0,0,0,0,0,0,0,0,0,0,1155072,0,0,0,0,0,0,12290,3,78115,78115,293,0,0,0,0,0,299,300,0,0,303,304,563,563,587,587,587,587,0,2030,0,0,0,0,0,2032,0,0,0,0,0,0,3196,0,0,0,0,0,0,0,0,0,0,3186,0,0,0,3189,0,0,0,0,2034,0,0,0,0,0,2036,0,0,0,0,0,0,0,695,0,0,0,0,365,365,365,0,0,2485,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,266240,0,0,0,1678,0,0,0,0,0,0,0,0,0,0,0,0,338,0,0,0,0,0,0,0,1669,0,0,0,0,0,0,0,0,2114,0,0,0,0,0,0,3395,541,541,541,541,3399,541,541,541,541,541,541,1346,541,541,541,541,541,541,1356,541,541,12290,3,78115,78456,293,0,0,0,0,0,299,300,0,0,303,304,541,588,564,564,564,564,564,564,564,588,588,588,541,588,588,588,588,588,588,588,588,564,564,541,564,588,564,588,1,0,0,0,0,2775,0,0,0,0,0,0,0,0,0,0,0,0,163840,0,0,0,1,12290,3,78116,293,0,0,0,0,0,0,0,0,0,0,0,0,167936,0,0,0,282624,282624,282624,282624,282624,282624,282624,282624,282624,282624,282624,282624,282624,282624,282624,282624,1,0,0,0,0,0,282624,282624,282624,282624,282624,282624,282624,282624,282624,282624,0,0,282624,0,0,0,0,0,0,0,0,0,0,1600,1601,0,0,0,0,282624,282624,282624,0,282624,282624,282624,282624,282624,0,0,0,0,0,0,0,0,0,254414,254414,254414,254414,254414,254414,254414,254414,1,2981888,2396160,0,3153920,3180,0,0,0,0,0,0,0,2740224,0,0,0,0,0,0,679,751,0,0,0,0,0,0,0,0,0,1144,0,365,365,0,1147,0,0,0,0,0,286720,286720,0,286720,286720,286720,286720,286720,286720,286720,286720,286720,0,0,0,0,0,0,0,286720,286720,286720,286720,286720,286720,286720,286720,286720,286720,286720,286720,286720,286720,286720,286720,0,3108864,3198976,0,0,3043328,0,3149824,2936832,0,2760704,3305,2437120,0,0,0,0,0,0,680,0,0,0,0,0,0,0,0,0,300,0,0,0,0,0,0,0,0,0,0,2875392,0,0,0,3386,0,0,0,0,0,0,2834432,2940928,0,0,0,0,0,2748416,2879488,0,3386,0,0,0,0,0,0,0,709,0,0,0,0,0,0,0,0,0,2048,0,0,0,0,0,0,0,0,0,309,0,0,0,0,0,308,0,308,309,0,308,308,0,0,0,308,308,309,309,0,0,0,0,0,0,308,408,309,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,781,0,0,0,309,413,0,0,69632,73728,0,0,0,0,0,65536,0,0,0,0,0,783,0,802,0,0,0,0,541,847,541,541,541,541,541,2830,2831,541,541,541,541,2834,541,541,541,541,541,541,541,3521,541,3523,541,541,3525,541,563,563,0,0,432,0,0,0,0,308,449,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,489,489,463,489,489,489,489,489,489,489,514,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,534,489,489,489,489,489,542,565,542,565,542,542,565,542,589,565,565,565,565,565,565,565,589,589,589,542,589,589,589,589,589,589,589,589,565,565,542,565,589,565,589,1,0,0,674,0,0,0,0,0,0,0,0,0,0,0,0,0,323,324,0,0,704,0,0,0,0,0,0,0,711,0,0,0,0,0,0,0,742,0,0,0,0,742,0,748,0,0,0,736,0,0,0,0,0,0,0,0,0,0,0,747,0,0,0,0,0,792,663,841,0,0,0,0,541,845,541,541,541,541,541,2217,541,541,541,541,541,541,541,541,541,541,541,1802,541,541,541,541,0,0,0,0,645,0,0,0,0,0,0,0,0,0,0,0,0,172032,0,0,0,0,0,0,0,0,765,0,0,768,0,0,0,0,774,0,0,778,0,0,0,0,0,0,3562,0,3564,541,541,541,541,541,541,541,541,541,3219,541,541,541,541,541,3224,0,0,785,0,0,0,0,789,0,0,0,0,0,0,0,793,0,0,736,0,793,0,0,0,0,648,0,0,0,0,0,0,0,807,808,0,0,0,0,808,0,0,807,0,0,0,0,0,755,0,0,816,817,0,0,0,793,0,0,0,0,0,0,0,0,0,0,0,0,221184,0,0,0,0,0,0,648,0,0,0,0,0,834,789,0,0,0,0,0,0,0,2139,0,0,0,0,0,0,0,0,0,1712,0,0,0,0,0,0,838,839,789,789,0,0,0,0,789,736,789,0,541,541,849,853,563,964,563,967,563,563,981,563,563,0,587,587,587,996,1e3,587,0,0,0,0,0,0,0,0,3180,3448,0,0,0,0,0,0,0,2465,0,0,0,0,0,0,0,0,0,2152,0,0,0,0,0,0,1093,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1135,0,0,0,0,1152,0,0,0,0,1157,0,0,0,0,0,0,0,822,0,816,0,664,0,0,0,0,0,0,0,0,1201,0,0,0,0,0,0,0,0,0,0,0,0,221184,0,221184,0,0,0,1253,0,0,0,0,0,0,0,0,0,0,0,0,0,339,340,341,541,541,1342,541,541,541,541,541,541,541,541,541,541,541,541,541,541,2239,0,0,0,0,0,1596,0,0,0,0,0,0,0,0,0,0,0,0,233472,0,0,0,0,0,0,1640,0,0,0,0,0,0,0,0,0,0,0,0,354,355,356,357,1653,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1163,0,0,0,0,1669,0,0,0,0,0,0,1673,0,0,0,0,0,0,0,69632,73728,0,0,0,346,345,65536,344,0,1729,0,0,0,0,541,541,541,541,541,541,541,541,541,541,541,3327,541,541,1742,541,541,541,541,541,541,541,541,541,1755,541,541,541,541,541,541,541,2193,541,541,541,541,541,541,541,541,541,2557,541,541,541,541,541,541,541,541,541,1794,541,541,1797,541,541,541,541,541,541,541,541,541,541,1314,541,541,541,1318,541,541,1809,541,541,541,541,541,1814,541,541,541,541,541,541,541,1360,914,563,563,563,563,563,563,563,563,563,563,563,563,563,563,0,2328,1824,563,563,563,563,563,1831,563,563,563,563,563,1837,563,563,563,563,563,3093,563,563,563,563,563,563,563,563,563,3102,563,563,1892,563,563,563,563,563,563,563,563,563,563,1905,563,563,563,563,978,563,563,563,563,0,587,587,587,587,587,587,1997,587,587,587,587,587,587,587,587,587,1531,587,587,587,587,587,587,563,563,563,1910,563,563,563,563,563,563,563,26028,1920,587,587,587,0,1285,1469,1377,541,541,1339,541,541,563,563,1431,563,587,587,1927,587,587,587,587,587,1933,587,587,587,587,587,587,587,1529,587,587,587,587,587,587,587,587,1932,587,587,587,587,587,587,587,587,1494,587,587,587,587,587,587,587,587,587,1946,587,587,587,587,587,587,587,587,587,587,587,587,587,1513,587,587,563,563,2026,587,587,587,0,2030,0,0,0,0,0,2032,0,0,0,0,0,0,131072,0,131072,131072,131072,131072,0,131072,131072,131072,131072,131072,131072,131072,0,0,0,0,0,131072,0,131072,1,0,0,0,2042,0,0,0,0,0,0,0,0,0,0,0,0,365,365,365,0,0,2141,0,0,2148,0,0,0,0,0,0,0,0,0,0,0,0,237568,0,0,0,0,0,0,2140,541,541,541,541,541,541,541,541,541,541,541,2170,541,541,2173,541,541,541,541,541,541,2181,541,541,541,541,541,541,541,541,2841,541,541,541,541,541,541,541,541,1294,541,541,541,541,541,541,541,541,1327,541,541,541,1334,1336,541,541,541,541,2214,541,541,541,541,541,541,541,541,541,541,541,541,541,541,2535,541,563,2258,563,563,563,563,563,563,2266,563,563,563,563,563,563,563,983,563,0,587,587,587,587,1001,587,563,2300,563,563,563,563,563,563,563,563,563,563,563,563,563,563,587,587,587,2345,587,587,587,587,587,587,2353,587,587,587,587,587,587,587,1950,587,587,587,587,587,587,587,587,1468,587,587,587,587,587,587,587,587,2387,587,587,587,587,587,587,587,587,587,587,587,587,587,587,541,587,563,2414,541,541,541,541,563,563,563,563,587,587,587,587,2030,0,2032,0,2034,0,2036,0,0,2428,0,0,0,0,0,0,0,0,0,0,1713,0,0,0,0,0,2436,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1179,2449,0,0,0,0,0,2453,0,0,0,0,0,0,0,0,0,0,1726,0,0,0,0,0,0,0,0,0,2477,0,0,0,0,0,0,0,0,0,0,0,0,245760,0,0,0,0,0,2501,0,0,0,0,0,0,0,0,0,0,0,0,0,386,338,0,541,541,541,2539,541,541,541,541,541,541,541,541,541,541,541,541,541,2198,541,541,0,0,0,563,563,563,563,563,563,563,563,563,2595,563,563,563,563,563,3238,563,563,563,563,563,563,563,563,563,563,2880,563,563,563,563,563,587,587,587,2661,587,587,587,587,587,587,587,587,587,587,587,2669,587,587,587,587,2714,587,587,587,587,587,587,541,587,563,541,541,2417,2418,563,563,2421,2422,587,587,2425,2426,0,1563,0,0,0,2735,0,0,0,0,0,0,2740,0,0,0,0,0,0,0,1102,1101,0,0,0,0,0,0,0,0,1724,0,0,0,0,0,0,0,0,1172,0,0,0,0,0,0,0,0,1187,0,0,0,0,0,0,1104,0,0,0,0,0,2763,0,0,0,0,0,0,0,0,0,0,0,2431,2432,0,0,0,0,0,0,0,0,2792,2793,0,0,0,0,0,0,0,0,0,0,2049,0,0,0,0,0,541,541,541,541,2829,541,541,541,541,541,541,541,541,541,541,2836,563,563,563,563,2876,563,563,563,563,563,563,563,563,563,563,563,0,2329,587,587,587,2884,563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,1874,587,587,2933,587,587,587,587,587,587,587,587,587,587,587,587,587,1536,587,587,2955,541,2957,563,2959,587,0,0,0,0,0,0,0,0,0,0,0,0,0,0,541,541,541,541,541,541,541,587,3442,0,3444,0,0,0,0,0,3180,0,0,0,0,3452,0,0,0,0,0,796,0,0,0,0,0,0,0,0,0,0,0,0,796,0,0,0,0,3454,0,541,3457,541,3459,541,541,541,541,541,541,541,541,541,541,541,541,2585,0,0,0,563,587,3488,587,3490,587,587,587,587,587,587,587,587,587,587,587,1047,587,587,587,587,587,0,0,0,3505,0,0,0,0,0,0,0,3512,0,0,541,541,541,541,541,541,3462,541,541,541,541,541,541,541,541,541,3334,541,541,541,563,563,563,541,541,541,3517,541,541,541,541,541,541,541,541,541,541,563,563,563,563,563,563,563,563,563,563,3530,563,563,563,563,563,563,563,563,563,563,563,587,587,587,587,587,587,587,587,3544,587,587,587,587,587,587,587,587,587,587,587,0,0,0,0,541,541,541,541,563,563,310,311,312,0,0,0,0,0,0,0,0,0,0,0,0,0,669,0,0,0,0,0,421,0,0,0,0,450,0,0,0,0,0,0,0,0,304,304,304,304,0,304,304,304,0,0,0,0,450,450,421,450,450,450,450,450,450,450,450,450,450,450,450,450,450,533,450,533,533,533,450,533,533,533,533,450,543,566,543,566,543,543,566,543,590,566,566,566,566,566,566,566,590,590,590,543,590,590,590,590,590,590,590,590,566,566,616,621,590,621,627,1,960,563,563,563,563,563,563,563,563,0,587,587,587,587,587,587,587,3136,587,587,3138,587,587,587,587,587,0,0,0,0,1657,0,0,0,0,0,0,0,0,0,0,0,0,254414,0,0,0,1676,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1211,541,541,541,1810,541,541,541,541,541,541,541,541,541,541,541,1360,914,563,563,563,563,563,563,563,563,563,563,563,563,563,1378,0,0,2486,0,0,0,0,0,0,0,0,0,0,0,0,0,694,0,0,541,541,541,541,2528,541,541,541,541,2532,541,541,541,541,541,541,541,541,3218,541,541,541,541,541,541,541,541,2583,541,541,541,541,0,2586,0,0,0,0,563,563,563,563,563,563,2592,563,563,563,563,2596,563,0,587,587,587,587,587,78115,1079,0,0,0,0,0,0,0,0,0,225741,225741,225741,225741,225741,225741,225741,225741,225741,225741,225741,225741,225741,225741,225741,225741,0,0,0,0,0,0,0,2658,587,587,587,587,2662,587,587,587,587,587,587,587,587,587,587,2665,587,587,587,587,587,0,0,0,313,314,315,316,317,318,319,320,321,322,0,0,0,0,0,0,694,0,0,0,0,0,365,365,365,0,0,313,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2142208,0,0,316,0,0,0,0,0,0,0,0,0,0,0,0,0,730,0,0,0,423,431,433,422,431,0,313,431,451,464,464,464,464,464,464,464,464,464,464,464,464,464,464,464,464,464,464,464,485,490,490,501,490,490,490,490,490,490,490,490,516,516,529,529,530,530,530,530,530,530,530,530,530,530,530,516,530,530,530,530,530,544,567,544,567,544,544,567,544,591,567,567,567,567,567,567,567,591,591,591,613,591,591,591,591,591,591,591,614,615,615,613,615,614,615,614,1,734,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1238,0,0,0,0,767,0,0,0,0,0,0,0,0,0,0,0,0,266240,0,0,0,0,0,702,0,0,0,0,0,702,0,0,0,541,541,541,541,541,541,3322,541,541,541,541,541,541,541,541,1816,541,541,541,541,541,541,1360,563,563,563,968,563,563,563,563,563,0,587,587,587,587,587,587,587,3150,3151,3152,541,541,563,563,587,587,0,0,2963,0,0,0,0,0,0,0,0,3180,0,0,3389,0,0,0,0,0,1108,0,0,0,0,0,0,0,0,0,0,0,0,0,0,308,309,0,1150,1108,0,0,0,0,0,0,0,0,0,0,0,0,0,1119,0,0,1212,0,0,0,0,0,0,0,0,0,0,0,0,0,1225,0,0,0,0,0,797,0,0,0,0,0,0,0,0,0,0,0,0,797,0,1360,914,563,563,1364,563,563,1368,563,563,563,563,563,563,563,563,985,0,587,587,587,587,587,587,1382,563,1387,563,563,1391,563,563,1394,563,563,563,563,563,563,563,984,563,0,587,587,587,587,587,1004,587,1460,587,587,587,587,587,587,587,587,1474,587,1479,587,587,1483,587,587,1486,587,587,587,587,587,587,587,587,587,587,587,587,587,1939,587,587,0,1692,0,1694,0,0,0,0,0,0,1701,0,0,0,0,0,0,0,2442,0,0,0,0,0,0,0,0,0,1173,0,0,0,0,0,0,541,541,1745,541,541,541,541,541,541,541,541,541,1757,541,541,541,541,541,541,2192,541,541,2195,541,541,541,541,541,541,541,1798,541,541,541,541,541,541,1806,541,541,1792,1793,541,541,541,541,541,541,541,541,541,541,541,541,541,541,2824,541,0,563,563,563,563,563,563,563,563,563,563,563,563,563,1840,563,0,587,587,587,587,587,78115,1079,0,0,1083,1087,0,0,1091,587,587,587,587,1948,587,587,587,587,587,587,587,587,587,587,587,1478,587,587,587,587,587,587,587,587,1961,587,587,587,587,587,587,587,587,587,587,587,1533,587,587,587,587,0,2034,0,2036,0,0,0,0,0,0,2430,0,0,0,0,0,0,0,2454,0,0,0,0,0,0,0,0,0,2429,0,0,0,0,0,0,0,0,0,2476,0,0,0,0,0,0,0,0,0,0,0,0,365,365,365,702,0,0,0,2502,2503,0,0,0,0,0,0,0,0,0,0,0,0,1147355,0,0,0,587,587,2700,587,587,587,587,587,587,587,587,587,587,587,587,587,2004,587,587,0,0,2802,0,0,0,0,0,0,0,2806,541,541,541,541,541,541,541,2204,541,541,541,541,541,541,541,541,541,2220,541,541,541,541,541,541,541,2956,563,2958,587,2960,0,0,0,0,0,2966,0,0,0,0,0,0,0,69632,73728,0,0,0,350,348,65536,0,0,0,0,2970,0,0,0,0,0,0,0,0,0,0,0,0,365,365,208896,0,3035,541,541,541,541,541,541,541,541,541,541,541,541,541,541,541,1807,541,541,3050,3051,541,541,541,541,541,541,541,541,541,541,541,541,541,2223,2224,541,563,3090,563,3092,563,563,563,563,563,563,563,563,563,563,563,563,1415,563,563,563,3117,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,1484,587,587,3132,587,3134,587,587,587,587,587,587,587,587,587,587,587,1937,1938,587,587,587,0,3192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,309,308,541,541,541,541,3228,541,541,541,541,563,563,563,563,563,563,563,563,563,945,563,563,563,563,587,3503,0,3504,0,0,0,0,0,0,0,0,0,0,0,541,541,541,541,2810,3515,541,3516,541,541,541,3520,541,541,541,541,541,541,541,563,3528,563,3529,563,563,563,3533,563,563,563,563,563,563,563,563,587,3542,587,3543,587,587,587,3547,587,587,587,587,587,587,587,587,0,0,0,0,3673,541,541,541,3675,563,563,3676,587,587,587,3678,0,0,541,541,563,563,587,587,0,541,541,3204,541,541,541,541,541,541,541,541,541,541,541,541,541,2238,2586,0,324,324,374,0,0,0,0,0,0,0,0,0,0,0,0,0,1133,0,0,0,0,434,374,0,439,445,0,452,465,465,465,465,465,465,465,465,465,465,465,465,465,465,465,465,465,465,465,465,491,491,502,491,491,491,491,491,491,491,491,517,517,517,517,517,517,517,517,517,517,517,517,517,517,517,517,545,568,545,568,545,545,568,545,592,568,568,568,568,568,568,568,592,592,592,545,592,592,592,592,592,592,592,592,568,568,545,568,592,568,592,1,587,587,587,1019,587,587,587,587,587,587,587,587,587,587,587,587,1052,587,587,587,1122,0,1124,1125,0,0,0,1127,1128,0,0,0,0,0,0,0,0,334,0,0,0,0,0,334,0,0,0,1166,1167,0,0,0,0,0,0,0,0,0,0,0,0,400,0,0,0,0,0,1228,0,0,0,0,1233,0,0,0,0,0,0,0,0,0,365,300,0,0,0,0,0,0,0,0,0,1241,0,0,0,0,1244,0,1194,0,1113,0,1250,1127,0,0,0,0,0,0,0,0,0,541,541,1274,541,541,541,541,541,541,2203,541,541,541,541,541,541,541,541,541,541,1329,541,541,541,541,541,541,541,1322,541,541,1324,541,541,541,1328,541,541,541,541,541,541,541,541,3522,541,541,541,541,541,563,563,3068,563,563,563,563,563,563,563,563,2603,563,563,563,563,563,563,563,1360,914,563,563,1365,563,563,563,563,563,563,563,563,563,563,563,587,3427,587,587,3429,563,563,563,1405,563,563,563,563,563,563,563,1414,563,563,1416,563,0,587,587,587,1051,587,78115,1079,0,0,0,0,0,0,0,0,1134592,0,0,0,0,0,0,1134592,0,0,0,0,563,563,1420,563,563,563,563,563,563,563,563,563,563,563,563,563,1437,563,563,563,563,563,1444,563,563,563,563,563,26028,1360,988,587,587,1457,587,0,0,0,0,0,0,0,3447,3180,0,0,0,0,0,0,0,1237,0,0,541,541,1273,541,1276,541,0,0,0,1656,0,0,0,0,0,0,0,0,0,0,0,0,541,846,541,541,587,587,587,1993,587,587,587,587,587,587,587,587,587,587,587,587,1496,587,587,587,563,2025,587,587,587,2029,0,2030,0,0,0,0,0,2032,0,0,0,0,0,0,1134592,0,0,0,0,0,0,0,0,0,0,1134592,0,0,0,2034,0,0,0,0,0,2036,0,0,0,0,0,2039,0,2078,0,0,0,0,0,0,0,0,0,0,0,0,0,0,331,0,0,0,0,2092,0,0,0,0,0,0,0,0,0,0,0,0,643,0,0,0,541,2172,541,541,541,541,541,541,541,541,541,541,541,541,541,541,0,0,0,541,2188,541,541,541,541,541,541,541,541,541,541,541,541,541,541,0,2240,541,541,541,541,2229,541,2231,541,541,541,541,541,541,541,0,0,0,0,0,0,1146880,0,1146880,0,0,0,0,0,0,0,0,2617344,0,0,0,0,0,2789376,0,0,0,563,563,563,563,563,563,563,563,563,2253,563,563,563,563,0,0,0,0,0,0,587,2654,587,587,587,587,587,587,3135,587,587,587,587,587,587,587,587,587,1530,587,587,587,587,587,587,2257,563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,1889,2273,563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,2272,563,563,563,563,2316,563,2318,563,563,563,563,563,563,563,0,0,0,0,0,0,587,587,587,587,587,587,587,587,587,587,587,587,587,587,541,563,2344,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,1516,2360,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,1517,587,587,587,587,2403,587,2405,587,587,587,587,587,587,587,541,587,0,0,0,0,0,0,0,3508,0,0,0,0,0,0,541,541,541,541,541,541,3400,541,541,541,2499,0,0,0,0,0,2504,0,0,0,0,0,0,0,0,0,0,2086,2087,0,0,0,0,541,541,2526,2527,541,541,541,541,541,541,541,541,541,541,541,541,541,2237,0,0,541,541,2566,541,541,541,541,541,541,541,541,541,541,541,541,541,541,3046,541,0,0,0,563,563,563,2590,563,2591,563,563,563,563,563,563,563,1411,563,563,563,563,563,563,563,563,1429,563,563,563,563,563,563,563,563,1916,563,563,26028,1921,587,587,587,0,0,0,2761,0,0,0,0,0,0,0,0,0,0,0,0,674,0,0,0,541,541,2837,541,541,541,541,541,541,541,2843,541,541,541,541,541,541,541,2232,541,541,2235,2236,541,541,0,0,563,563,563,2885,563,563,563,563,563,563,563,2891,563,563,563,563,0,0,2329,0,0,0,587,587,587,587,587,587,587,587,587,587,2341,587,587,587,2920,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,1519,587,587,587,587,3373,587,587,541,541,563,563,587,587,0,0,0,0,0,0,0,0,0,2968,563,587,587,587,587,587,587,3493,587,587,587,587,587,587,587,587,1034,587,587,587,587,587,587,587,326,327,328,0,0,0,0,0,0,0,0,0,0,0,0,0,1161,0,0,0,0,0,325,373,328,372,0,0,0,0,0,0,0,0,0,0,2111,0,0,0,0,0,325,0,0,372,372,402,0,328,0,0,0,0,0,0,0,0,0,365,339,293,0,0,0,0,0,0,325,0,327,0,0,0,453,466,466,466,466,466,466,466,479,466,466,466,466,466,466,466,466,466,466,466,466,492,492,466,492,492,507,509,492,492,507,492,518,518,518,518,518,518,518,518,518,518,518,518,518,518,518,535,518,518,518,518,518,546,569,546,569,546,546,569,546,593,569,569,569,569,569,569,569,593,593,593,546,593,593,593,593,593,593,593,593,569,569,546,569,593,569,593,1,0,0,658,659,0,0,0,0,0,0,0,0,0,0,670,671,0,689,0,0,0,0,0,0,0,0,0,0,365,365,365,0,0,0,0,0,800,0,0,0,0,0,0,0,0,0,0,0,0,718,0,720,0,0,0,0,0,0,727,0,0,0,731,0,0,0,0,0,0,1159168,417,417,0,0,0,0,0,417,0,0,784,0,786,0,0,0,0,0,0,0,0,0,0,0,0,759,0,0,0,0,0,798,0,803,0,806,0,0,0,0,803,806,0,0,0,0,0,0,741,0,0,0,0,0,0,0,0,0,0,0,0,806,806,803,0,0,0,0,0,0,0,786,0,798,0,815,0,0,0,0,0,802,0,0,783,0,0,0,0,802,0,0,0,0,0,0,0,802,0,0,0,0,806,0,707,0,0,823,0,0,0,0,0,823,823,826,0,0,0,786,0,0,0,0,0,835,0,0,0,0,0,0,0,2480,0,0,0,0,0,0,0,0,0,1100,0,0,0,0,0,0,0,0,0,0,784,0,0,0,835,815,835,0,541,541,850,541,541,541,541,541,3052,541,541,541,541,541,541,541,541,3060,541,541,541,541,541,3217,541,541,541,541,541,541,541,3222,541,541,541,541,541,2529,541,541,541,541,541,541,541,541,541,541,541,3043,541,541,541,541,856,541,541,869,541,541,880,541,885,541,541,893,896,901,541,909,563,563,966,969,974,563,982,563,563,0,587,587,587,997,587,1003,587,587,1016,587,587,1027,587,1032,587,587,1040,1043,1048,587,1056,587,0,0,0,0,0,0,3507,0,0,0,0,0,0,0,541,541,541,541,541,3031,541,541,541,541,0,0,0,1110,0,0,0,0,0,0,0,1117,0,0,0,0,0,0,0,69632,73728,0,0,0,421,0,65536,0,0,1137,1138,0,0,0,0,1142,0,0,0,365,365,0,0,0,0,0,0,769,0,0,0,775,776,0,0,0,0,0,0,0,69632,73728,0,0,0,374,0,65536,0,0,1165,0,0,0,0,0,0,0,0,0,0,0,0,0,0,515,522,0,0,1182,741,0,0,0,1134,0,0,0,0,0,0,0,0,0,367,0,0,0,0,0,0,541,541,541,1281,541,541,541,541,541,541,1296,541,541,541,1301,541,541,541,541,541,3229,541,541,541,563,563,563,563,563,563,563,941,563,563,563,563,563,563,1360,914,563,563,563,563,563,563,563,563,563,563,1373,563,563,563,563,563,3249,563,3251,563,563,563,563,563,563,563,563,1852,563,563,563,563,563,563,563,563,563,563,1388,563,563,563,1393,563,563,563,563,563,563,563,563,1451,26028,1360,988,587,587,587,587,587,1485,587,587,587,587,587,587,587,587,587,587,587,587,587,1500,1540,587,587,0,541,587,563,541,541,541,541,541,563,563,563,563,563,563,3477,563,563,563,563,563,563,563,563,1396,563,563,563,563,563,563,563,0,0,1607,1608,1609,0,1611,1612,0,0,0,0,1617,0,0,0,0,0,0,770,0,0,773,0,0,777,0,0,0,0,0,0,796,0,0,0,0,0,541,541,541,541,541,541,563,563,563,563,563,563,933,563,563,947,563,563,563,563,0,0,1639,0,0,1642,0,1644,0,0,0,0,0,1650,1651,0,0,0,0,0,805,0,0,692,0,0,672,0,692,0,810,0,1667,0,0,1669,0,0,0,0,1671,1672,0,0,0,0,0,0,0,2491,2492,0,0,0,0,0,0,0,0,0,2686976,2736128,0,0,2531328,2707456,0,0,0,0,0,1708,0,0,1711,0,0,0,0,0,1715,0,0,0,0,0,0,2134016,0,0,0,0,0,0,0,0,1138688,0,1719,1720,0,0,0,0,0,0,0,0,0,0,0,0,1711,0,0,0,1731,1585,1585,1733,541,1735,541,1736,1737,541,1739,541,541,541,541,541,1310,541,541,541,541,541,541,541,1317,541,541,541,541,541,1748,541,541,541,541,541,541,541,541,541,1759,541,1743,541,541,541,541,541,541,541,541,541,1756,541,541,541,541,541,541,541,3333,541,541,541,541,541,563,563,563,922,926,563,563,563,563,563,563,952,563,957,1760,541,541,541,541,1764,541,1766,541,541,541,541,541,541,541,541,541,889,541,541,541,541,907,541,1774,1775,1777,541,541,541,541,541,541,541,1785,1786,1787,541,541,1790,1791,541,541,541,541,541,541,541,1799,541,541,541,1803,541,541,541,541,541,541,2530,541,541,541,541,541,541,541,541,541,541,1315,541,541,541,541,1320,541,541,541,541,1811,541,541,541,541,541,541,541,541,541,1822,1360,914,563,563,563,563,563,563,563,563,563,563,563,563,563,1379,0,1827,563,1829,563,1830,563,1832,563,1834,563,563,563,1838,563,563,563,563,1390,563,563,563,563,563,563,563,563,563,563,563,2652,0,587,587,587,563,1859,563,1861,563,563,563,563,563,563,563,563,1869,1870,1872,563,0,587,587,1042,587,587,78115,1079,0,0,0,0,0,0,0,0,307,307,307,0,0,0,0,0,1907,563,563,563,563,563,563,563,563,563,1918,26028,0,1923,587,1925,587,1926,587,1928,587,1930,587,587,587,1934,587,587,587,587,587,587,587,3366,587,587,587,587,3367,3368,587,587,587,587,587,1947,587,587,587,587,1951,587,587,587,587,1955,587,1957,587,587,1976,1977,1978,587,587,1981,1982,587,587,587,587,587,587,587,1999,2e3,587,587,587,587,587,587,587,2015,2016,2017,541,2019,541,541,563,2023,1990,587,587,587,1994,587,587,587,587,587,587,587,2003,587,587,587,0,1288,1472,1380,541,541,541,541,541,563,563,563,563,3475,563,563,563,563,563,563,563,563,563,563,2267,563,563,563,563,563,563,2024,563,1982,587,2028,587,0,2030,0,0,0,0,0,2032,0,0,0,0,0,0,2134016,0,0,0,0,0,0,0,746,0,0,0,0,0,2043,0,0,2046,2047,0,0,0,2051,0,0,0,0,0,0,800,0,0,0,0,0,0,0,800,0,0,0,0,541,541,541,541,2090,0,0,0,0,2094,0,0,0,0,0,0,0,0,0,0,0,2456,0,0,0,0,0,0,0,0,1669,0,0,0,0,0,0,0,2113,0,0,2116,0,0,2119,0,0,0,0,0,0,2126,0,2128,0,0,0,0,0,0,0,69632,73728,0,370,370,0,0,65536,370,0,0,0,0,2137,0,0,0,0,0,0,0,0,0,0,0,0,1159168,0,0,0,0,2047,0,2147,0,0,0,0,0,0,0,0,0,0,0,0,1103,1104,1105,1106,0,2158,0,0,541,541,541,541,541,541,541,541,541,541,541,541,541,3329,541,541,541,2174,541,2176,541,541,541,541,541,541,2184,541,2186,541,541,541,541,541,3332,541,541,541,541,541,541,541,563,563,563,3069,563,563,563,563,563,563,563,2212,541,541,541,541,541,541,2219,541,541,541,541,541,541,541,541,541,1312,541,541,541,541,541,541,563,563,2259,563,2261,563,563,563,563,563,563,2269,563,2271,563,563,563,563,1422,563,563,563,563,563,563,563,563,563,563,1438,587,587,2346,587,2348,587,587,587,587,587,587,2356,587,2358,587,587,0,0,0,3634,0,3636,541,541,541,541,541,541,541,563,563,921,563,563,563,563,940,944,950,563,955,563,563,2261,541,2416,541,541,563,2420,563,563,587,2424,587,587,2030,0,2032,0,0,0,2452,0,0,0,0,0,0,0,0,0,0,0,0,1132,0,0,0,0,0,2461,0,0,0,0,0,2466,0,2468,2469,0,0,0,0,0,0,0,69632,73728,0,420,420,0,0,65536,420,0,0,0,0,2488,0,0,0,0,0,0,0,0,0,0,0,0,2179072,2179072,2179072,2179072,0,0,0,0,2516,2468,0,0,0,0,0,2521,0,0,0,541,541,541,541,541,3321,541,541,541,3325,541,541,541,541,541,541,1749,541,541,541,541,541,541,541,541,541,541,2558,541,541,541,541,541,2563,541,541,541,2568,541,541,541,541,541,541,541,2575,541,541,541,541,541,541,2542,541,2544,541,541,541,541,541,541,541,541,563,3411,563,563,3413,563,563,563,541,541,541,541,2580,541,541,541,541,541,541,541,541,0,2586,0,0,0,0,0,812,0,809,792,0,0,814,0,667,0,788,0,0,0,563,563,563,563,563,563,563,563,2594,563,563,563,563,0,2652,0,0,0,0,587,587,587,587,587,587,587,587,587,587,587,587,2342,587,563,2624,563,563,563,563,2628,563,563,563,2633,563,563,563,563,563,563,2629,563,563,563,563,563,563,2636,563,563,563,563,2640,563,563,563,563,563,563,563,563,2646,563,563,563,563,0,2652,0,0,0,0,587,587,587,2656,587,2657,587,587,2660,587,587,587,587,587,587,587,587,587,587,587,587,587,2383,587,587,587,587,2672,587,2674,587,587,587,587,587,587,587,587,587,587,587,1970,587,587,587,587,587,2699,587,587,587,587,587,587,587,2706,587,587,587,587,587,587,587,3375,541,3376,563,3377,587,0,0,0,587,587,2712,587,587,587,587,587,587,587,587,541,587,563,541,541,541,541,563,563,2800,2801,0,0,0,0,0,0,0,0,0,541,541,541,541,541,541,541,541,541,3402,2992,0,0,0,0,0,0,0,0,0,0,0,2992,0,0,0,0,0,0,840,0,0,0,0,0,541,541,541,541,541,541,2166,541,541,541,541,541,0,3022,0,0,0,3025,541,541,541,541,541,541,3032,541,541,541,541,541,541,2570,541,541,541,541,2574,541,541,541,541,541,541,1286,541,541,541,541,541,541,541,541,541,541,1818,541,541,541,541,1360,541,541,3036,541,541,541,541,541,541,541,3042,541,541,541,541,541,541,541,2531,541,541,541,541,541,541,541,541,541,563,3230,563,563,563,3233,563,3048,541,541,541,541,541,541,541,541,541,541,3057,3059,541,541,541,541,541,541,2582,541,541,541,541,541,541,0,2586,0,3062,541,3064,3065,541,563,563,563,563,563,563,3072,563,563,563,563,563,1425,563,563,563,563,563,563,563,563,563,563,2889,563,563,563,563,563,563,563,3076,563,563,563,563,563,563,563,3082,563,563,563,563,563,3088,563,563,3091,563,563,563,563,563,563,563,563,3098,3100,563,563,563,563,563,3342,563,563,563,563,563,563,563,563,563,563,2645,563,563,563,563,563,563,563,3104,563,3106,3107,563,587,587,587,587,587,587,3114,587,587,587,0,1544,1545,1546,541,541,1548,541,541,563,563,1552,563,587,587,3118,587,587,587,587,587,587,587,3124,587,587,587,587,587,587,1998,587,587,587,587,587,587,587,587,587,3551,587,587,3553,587,0,0,3130,587,587,3133,587,587,587,587,587,587,587,587,3140,3142,587,587,0,0,3633,0,0,0,541,541,3638,541,541,541,3642,563,587,587,3146,587,3148,3149,587,541,587,563,541,3154,563,3156,587,3158,0,0,0,0,0,3181,0,3183,0,0,0,0,0,0,0,3190,0,0,0,3193,3194,0,0,0,0,0,0,0,0,0,0,0,0,2200252,2200252,2200252,0,563,563,563,563,3237,563,563,563,563,563,563,563,563,563,563,563,1400,563,563,563,563,563,563,563,3248,563,563,563,563,563,563,563,563,3256,563,563,563,563,563,3352,563,563,563,563,587,587,587,587,587,3358,563,563,563,587,587,587,3261,587,587,587,587,587,587,587,3266,587,0,0,0,0,0,3506,0,0,3509,0,0,0,0,0,541,541,541,541,3662,541,563,563,563,563,3666,563,0,3310,0,0,3313,0,0,0,0,0,0,0,0,0,0,0,0,2200253,151552,2200253,0,587,587,587,3372,587,587,587,541,541,563,563,587,587,0,0,0,0,0,0,0,0,2967,0,0,0,0,0,0,3383,3384,0,3180,0,0,0,0,0,3392,0,0,0,0,0,1097,0,0,0,0,0,0,0,0,0,0,331,382,384,0,0,0,563,3417,563,563,563,563,563,563,563,563,563,587,587,587,587,587,587,587,3115,587,587,587,587,587,587,3433,587,587,587,587,587,587,587,587,587,541,563,3472,563,3474,563,563,563,563,563,563,563,563,563,563,563,563,3243,563,563,563,3470,563,563,563,563,563,563,563,563,563,563,563,563,563,563,3485,563,563,563,563,3532,563,563,563,563,563,563,563,563,563,587,587,3110,587,587,587,587,587,587,587,587,587,587,587,3546,587,587,587,587,587,587,587,587,587,3555,3556,0,0,0,3559,0,0,0,0,0,3565,3566,3567,541,541,541,3570,541,3572,541,541,541,541,3577,3578,3579,563,563,563,3582,563,3584,563,0,587,587,1044,587,587,291,1079,0,0,1082,1086,0,0,1090,563,563,563,3589,3590,3591,3592,587,587,587,3595,587,3597,587,587,587,587,587,1464,587,587,587,1473,587,587,587,587,587,587,1949,587,587,587,587,587,587,587,587,587,2949,587,587,587,541,587,563,587,3602,0,0,0,0,0,0,0,0,0,0,541,541,541,541,541,541,1738,541,541,541,563,3644,563,563,563,3648,563,587,587,3650,587,587,587,3654,587,0,0,0,0,0,0,0,0,3180,0,3449,0,0,0,0,0,0,0,69632,73728,266240,0,0,0,0,65536,0,0,0,0,329,330,0,0,0,0,0,0,0,0,0,0,0,349,0,0,0,0,0,369,0,0,0,0,0,0,0,0,0,0,0,0,0,0,686,0,0,0,0,369,0,0,0,377,379,0,0,0,0,0,0,0,0,1099,0,0,0,0,0,0,0,0,1115,0,0,0,0,0,0,0,0,0,3185,0,0,0,0,0,0,0,0,412,0,0,0,412,69632,73728,0,369,369,0,424,65536,369,0,0,0,369,424,499,503,499,499,508,499,499,499,508,499,424,424,0,330,424,0,0,424,424,0,0,0,0,0,0,0,0,1156,0,0,0,0,0,0,0,0,664,0,0,0,0,0,0,0,0,680,681,0,0,0,0,0,0,424,424,424,424,424,424,424,424,424,424,424,424,424,424,424,424,547,570,547,570,547,547,570,547,594,570,570,570,570,570,570,570,594,594,594,547,594,594,594,594,594,594,594,594,570,570,547,570,594,570,594,1,587,587,587,1020,587,587,587,587,587,587,587,587,587,587,587,587,1954,587,587,587,0,0,1109,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1215,0,0,0,0,0,0,0,0,0,0,0,1226,541,1279,541,541,541,541,541,1291,541,541,541,541,541,541,541,541,541,1351,541,541,541,541,541,541,1360,914,563,563,563,563,563,563,563,563,1371,563,563,563,563,563,563,2643,563,563,563,563,563,563,563,563,563,1866,563,563,563,563,563,563,1383,563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,2286,587,587,1992,587,587,587,587,587,587,587,587,587,587,587,587,587,2411,541,587,563,563,3677,587,587,587,0,0,541,541,563,563,587,587,0,541,3203,541,541,541,3206,541,541,541,541,541,541,541,541,541,541,1313,541,541,541,541,541,425,425,0,0,425,440,0,425,425,467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,493,493,467,493,493,493,493,493,493,493,493,493,493,493,493,493,493,493,493,548,571,548,571,548,548,571,548,595,571,571,571,571,571,571,571,595,595,595,548,595,595,595,595,595,595,595,595,571,571,548,571,595,571,595,1,0,1213,0,0,0,0,0,0,0,0,0,0,0,0,0,0,732,0,0,0,0,0,1695,0,0,0,0,0,0,0,0,0,0,0,360,0,0,0,0,0,0,0,0,2093,0,0,0,0,0,0,0,0,0,0,0,365,365,0,0,0,2157,0,0,0,541,541,541,541,541,541,541,541,541,541,541,541,3328,541,2201,541,541,541,541,541,541,541,541,541,541,541,541,541,541,541,2200,563,2415,541,541,541,2419,563,563,563,2423,587,587,587,0,0,0,0,0,0,541,541,541,541,541,541,541,563,3067,563,563,563,563,563,563,563,563,563,3253,563,563,563,563,563,563,0,2460,0,0,0,0,0,0,0,0,0,0,0,0,0,0,748,0,0,0,0,0,2791,0,0,0,0,0,0,0,0,0,0,0,365,365,1146,0,0,2943,587,587,587,587,587,587,587,587,587,587,587,587,541,587,563,541,541,0,0,0,0,2971,0,0,0,2975,0,0,0,0,0,2981,0,0,0,0,0,1128,0,0,0,0,0,1233,0,0,0,1265,0,0,0,2994,0,2996,0,0,0,0,0,0,0,0,3004,0,0,0,0,0,1169,0,1171,0,0,0,0,1176,0,0,0,0,0,0,1643,0,0,0,0,0,0,0,0,0,0,2520,0,0,0,0,541,0,0,0,0,3009,0,0,0,0,0,0,0,0,0,0,0,383,0,0,0,387,541,3063,541,541,541,3066,563,563,563,563,563,563,563,563,563,563,3083,563,563,563,563,563,563,563,3105,563,563,563,3108,587,587,587,587,587,587,587,587,587,1509,587,587,587,587,587,587,3144,587,587,3147,587,587,587,541,587,563,541,541,563,563,587,587,0,0,3295,0,0,0,0,0,0,0,0,2766,0,0,0,0,0,0,0,0,2151,0,0,0,0,0,0,0,0,2506,0,0,0,0,0,2512,0,0,0,0,0,0,3195,0,0,0,0,0,0,0,0,0,0,0,2782,0,0,0,0,541,541,541,541,3216,541,541,541,541,541,541,541,3221,541,3223,541,541,541,541,541,3408,541,541,3410,563,563,563,563,3414,563,563,563,563,1446,1447,563,563,563,26028,1360,988,587,587,587,587,587,587,3671,0,0,0,541,541,541,3674,563,563,563,563,563,587,587,3260,587,587,587,587,587,587,587,587,587,587,3274,587,587,587,587,587,587,3280,587,587,587,587,587,587,587,587,587,587,587,541,587,563,541,2722,563,3350,563,563,563,563,563,563,563,563,587,587,587,587,587,587,587,587,3655,587,587,587,587,3363,587,587,587,587,587,587,587,587,587,3369,587,0,0,0,541,587,563,541,541,541,541,541,563,563,563,563,563,3071,563,563,563,563,563,0,0,0,0,541,541,3660,3661,541,541,563,563,3664,3665,563,563,563,563,1423,563,563,1430,563,563,563,563,563,563,563,563,2631,563,563,563,563,563,563,563,587,587,3668,3669,587,587,0,0,0,0,541,541,541,541,563,563,563,924,928,931,563,939,563,563,563,954,956,959,0,0,690,691,0,0,0,0,696,0,0,0,365,365,365,0,0,0,0,0,1185,0,0,0,0,0,0,0,0,0,0,0,3180,0,0,0,0,0,0,829,0,0,0,0,0,0,0,0,0,758,0,0,0,0,0,0,758,0,0,0,0,0,758,758,910,541,563,563,563,563,927,563,563,563,563,563,563,563,563,563,1432,563,563,1436,563,563,563,983,0,587,587,587,587,1057,78115,1079,0,0,0,0,0,0,0,0,1220,0,0,0,0,0,0,0,0,0,282624,282624,282624,282624,282624,282624,282624,282624,587,1521,587,587,587,587,587,587,587,587,587,587,587,587,587,587,1514,587,0,0,0,1721,0,0,0,0,0,0,0,0,0,0,0,0,1193,0,0,0,0,2040,0,0,0,0,0,0,0,0,0,0,0,0,0,0,749,0,2171,541,541,541,541,541,541,541,541,541,541,541,541,541,541,541,2211,3288,541,3290,563,3292,587,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3514,468,468,468,486,494,494,486,494,494,494,494,494,494,494,494,519,527,527,527,527,527,527,527,527,527,527,527,527,527,527,527,536,527,527,527,527,527,549,572,549,572,549,549,572,549,596,572,572,572,572,572,572,572,596,596,596,549,596,596,596,596,596,596,596,596,572,572,549,572,596,572,596,1,795,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1652,0,818,0,0,0,795,0,0,818,0,0,0,0,0,818,818,0,0,0,0,795,0,0,0,0,0,0,836,791,0,0,836,857,541,865,541,541,541,541,541,541,541,541,541,541,541,541,541,541,3527,563,911,541,563,563,563,563,563,930,563,938,563,563,563,563,563,563,1850,563,563,563,563,563,563,563,563,563,0,587,587,587,587,587,587,587,1012,587,587,587,587,587,587,587,587,587,587,587,587,587,1058,984,0,587,587,587,1077,1058,78115,1079,0,0,0,0,0,0,0,0,1243,0,0,0,0,0,0,0,0,1259,0,0,0,1263,0,0,0,0,0,0,0,1139,1140,0,0,0,0,0,365,365,0,0,0,0,0,0,1113,0,0,0,0,0,0,0,0,0,0,2071,0,0,0,0,0,1180,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1705,1340,541,541,1344,541,541,541,541,541,1350,541,541,541,1357,541,541,541,541,541,1812,541,541,541,541,541,541,541,541,541,1360,1403,563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,2638,563,563,1442,563,563,563,1449,563,563,26028,1360,988,587,587,587,587,587,587,3272,587,587,587,587,587,587,587,587,3278,587,587,1487,587,587,587,587,587,587,587,1495,587,587,587,587,587,587,2365,587,587,587,587,587,587,587,587,587,2691,587,587,587,587,587,587,587,587,587,1524,587,587,1528,587,587,587,587,587,1534,587,587,587,587,587,1492,587,587,587,587,587,587,587,587,587,587,1510,587,587,587,587,587,1541,587,587,0,541,587,563,541,541,541,541,541,563,563,563,563,563,3476,563,563,563,3480,563,563,563,563,563,563,2863,563,563,2867,563,563,563,563,563,563,1409,563,563,1413,563,563,563,563,563,563,1448,563,563,26028,1360,988,587,587,587,587,0,0,0,1595,0,0,0,0,0,0,0,0,0,0,0,0,1223,0,0,0,0,0,1655,0,0,0,0,0,0,0,0,0,1664,0,0,0,0,0,0,1126,0,0,0,1130,1131,0,0,0,0,0,0,0,2818048,2846720,0,2916352,0,0,3002368,0,0,1718,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2053,1702,0,0,0,0,0,541,541,541,541,541,541,541,541,541,541,3326,541,541,541,563,563,563,1893,563,563,563,563,563,563,1901,563,563,563,563,563,563,2887,563,563,563,2890,563,2892,563,563,563,587,1944,587,587,587,587,587,587,587,587,587,587,587,587,587,587,1940,587,587,1974,587,587,587,587,1980,587,587,587,587,587,587,587,587,1989,2007,2009,587,587,587,587,587,541,587,563,541,541,541,541,563,563,563,563,587,587,587,587,2030,0,2032,0,0,2079,0,0,0,2082,0,0,0,0,0,2088,0,0,0,0,0,0,1141,0,1143,0,0,365,365,0,0,0,0,0,0,1154,0,0,0,0,0,1160,0,1162,0,2104,0,0,0,0,0,0,0,0,0,0,0,0,0,2115,0,0,0,0,0,1192,0,0,0,0,0,0,0,0,0,0,0,176128,176128,176128,176128,176128,176128,176128,0,0,563,563,563,563,563,563,2250,563,563,563,563,563,563,563,1851,563,563,563,563,1855,563,563,563,587,587,587,587,2349,587,587,587,587,587,587,587,587,587,587,587,1985,587,587,1988,587,2262,541,541,541,541,563,563,563,563,587,587,587,587,0,0,0,0,0,2732,0,2450,0,0,0,0,0,0,0,0,2455,0,0,2458,0,0,0,0,0,0,2134016,0,0,0,0,0,0,57344,0,0,0,0,0,0,2748,0,0,0,0,0,0,0,0,0,0,192972,192972,192972,192972,192972,192972,192972,0,0,0,0,2462,0,0,0,0,0,0,0,0,0,0,0,541,541,541,2809,541,2473,0,0,0,0,0,0,0,2481,0,0,0,2483,0,0,0,0,0,0,1170,0,0,0,0,0,0,0,0,0,0,2989,0,0,0,0,0,0,2500,0,0,0,0,0,0,0,0,0,0,2510,0,0,0,0,0,0,1186,0,0,0,1191,0,0,0,0,1107,0,0,0,0,0,0,0,0,0,0,0,758,0,0,0,0,0,0,0,2524,541,541,541,541,541,541,541,541,541,541,541,541,541,541,541,2536,541,541,2552,541,541,541,541,541,541,541,541,541,541,541,541,541,905,541,541,2564,541,541,541,541,541,541,2571,541,541,541,541,541,541,541,541,541,1768,541,541,541,541,541,541,541,2578,541,541,541,2581,541,541,541,541,541,541,541,0,0,0,0,0,0,1203,0,0,0,0,0,0,0,0,0,0,813,0,0,0,0,0,0,0,0,563,2588,563,563,563,563,563,563,563,563,563,563,563,1903,1904,563,563,563,2611,563,563,563,563,563,563,2616,563,563,563,563,563,563,563,2622,587,587,587,587,2702,587,587,587,587,587,587,587,587,587,587,2710,587,587,587,2713,587,587,587,587,587,587,587,2718,2719,2720,541,541,541,541,541,2177,541,541,541,541,541,541,541,541,541,541,541,541,2845,541,541,541,2758,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2103,0,2773,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1120,0,0,0,2789,0,0,0,0,2794,0,0,0,2796,0,0,0,0,0,0,0,69632,73728,316,317,317,422,423,65536,430,541,541,541,541,2814,541,541,541,541,541,541,541,541,541,541,541,541,1333,541,541,541,541,541,2848,541,541,541,541,541,541,0,0,563,563,563,2856,563,0,587,587,1047,587,587,78115,1079,0,0,0,0,0,0,0,0,1159168,365,0,0,0,0,0,0,563,563,563,563,2861,563,563,563,563,563,563,563,563,563,563,563,2294,563,563,563,563,563,563,563,563,2897,563,563,563,563,563,563,0,0,587,587,587,587,587,587,587,2338,587,587,587,587,587,587,587,3122,587,587,587,587,587,587,587,587,1036,587,587,587,587,1054,587,587,2905,587,587,587,587,587,2910,587,587,587,587,587,587,587,587,587,1935,587,587,587,587,1941,587,3006,0,0,0,0,3010,0,0,0,0,3015,0,0,0,0,0,0,0,2749,0,0,0,0,0,0,0,0,0,697,698,0,365,365,365,0,3191,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2145,3300,0,0,0,0,0,0,0,0,0,0,3180,0,0,0,0,0,0,0,69632,73728,163840,0,0,0,0,65536,0,563,563,563,3340,563,563,563,563,563,563,563,563,563,563,563,563,2283,563,563,563,563,563,563,3351,563,563,563,563,563,563,587,587,587,587,587,587,587,587,587,587,587,587,587,3359,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,1942,3370,587,587,587,587,587,587,541,541,563,563,587,587,0,0,0,0,3297,0,0,0,0,0,0,0,0,0,3394,0,541,541,541,541,541,541,541,541,541,541,541,541,3211,541,541,3486,587,587,587,587,587,587,587,587,3495,587,3497,3498,587,3500,587,0,0,0,541,587,563,541,541,541,904,541,563,563,563,977,3502,0,0,0,0,0,0,0,0,0,0,0,0,0,0,541,541,541,854,541,541,3612,541,3613,541,541,541,563,563,563,563,563,563,3619,563,0,996,1075,1041,587,587,78115,1079,0,0,1081,1085,0,0,1089,3620,563,563,563,563,587,587,587,587,587,587,3627,587,3628,587,587,0,3603,0,0,0,0,0,0,0,0,541,541,3610,541,563,563,587,587,587,587,0,0,541,541,563,563,587,587,3683,3684,3685,3686,0,541,563,587,0,541,563,587,0,541,563,587,0,0,0,0,0,0,0,0,3180,0,0,0,0,0,0,0,550,597,573,573,573,573,573,573,573,597,597,597,550,597,597,597,597,597,597,597,597,573,573,550,573,597,573,597,1,0,0,0,737,0,0,0,0,0,0,0,0,0,0,0,0,1237,0,0,0,0,0,2041,0,0,0,0,0,0,0,0,0,0,0,0,0,1194,1196,0,403,0,0,0,0,381,0,69632,73728,0,0,0,0,426,65536,0,0,0,0,0,1202,0,0,0,0,0,0,0,0,0,0,0,2444,2445,0,0,2448,426,426,0,0,426,0,446,426,426,469,469,469,476,469,469,469,469,469,469,469,469,469,476,469,469,469,469,469,469,469,469,483,469,495,495,469,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,538,551,574,551,574,551,551,574,551,598,574,574,574,574,574,574,574,598,598,598,551,598,598,598,598,598,598,598,598,574,574,551,574,598,574,598,1,0,0,0,0,660,661,0,0,0,0,0,0,0,0,0,0,0,3001,0,0,0,0,0,0,0,0,661,0,0,0,0,0,0,0,0,0,0,0,661,0,0,0,0,0,827,0,0,0,661,0,0,0,0,0,0,0,0,0,0,0,3176,0,0,0,0,0,0,0,729,0,742,661,0,0,0,0,0,541,844,541,541,541,541,541,2191,541,541,541,541,541,541,2197,541,2199,541,541,859,541,541,541,541,541,541,541,541,541,541,897,541,541,541,541,541,541,2817,541,2819,541,541,541,541,541,541,541,541,2572,541,541,541,541,541,541,541,541,1349,541,541,541,541,541,541,541,541,1752,541,541,541,541,541,541,541,541,1767,541,541,541,541,541,541,541,541,1782,541,541,541,541,541,541,541,541,1815,1817,541,541,541,541,541,1360,563,563,563,970,563,563,563,563,563,0,587,587,990,587,587,587,587,587,1526,587,587,587,587,587,587,587,587,587,587,1953,587,587,587,587,587,1006,587,587,587,587,587,587,587,587,587,587,1044,587,587,587,587,587,587,3285,587,587,587,587,587,587,541,587,563,1094,0,0,0,0,0,0,0,0,0,1101,1102,0,0,0,0,0,0,0,69632,73728,167936,0,0,0,0,65536,0,0,0,0,1229,0,0,0,0,0,0,0,0,0,0,0,0,1247,0,0,0,0,0,0,0,1102,0,0,0,0,1260,1261,0,0,1101,0,0,0,0,0,0,2134756,0,0,0,0,0,0,0,0,0,0,1116,0,0,0,0,0,541,1306,541,541,541,541,541,541,541,541,541,541,541,541,541,541,0,2241,1360,914,563,1363,563,563,563,563,563,563,563,563,563,563,563,1377,1384,563,563,563,563,563,563,563,563,563,1398,563,563,563,563,563,563,3079,563,563,563,563,563,563,563,563,563,0,587,587,989,587,587,587,1418,563,563,563,563,563,563,563,1431,563,563,563,563,563,563,563,1897,563,563,563,563,563,563,563,563,1395,563,563,563,563,563,563,563,587,587,1523,587,587,587,587,587,587,587,587,587,587,587,1537,587,0,0,0,541,587,563,541,541,541,1067,911,563,563,563,1072,563,587,587,1523,587,587,1079,0,0,0,0,0,0,0,0,0,0,2781,0,0,0,0,0,541,541,541,1746,1747,541,541,541,541,1754,541,541,541,541,541,541,541,1290,541,1295,541,541,1299,541,541,1302,541,541,541,541,1795,541,541,541,541,541,541,541,541,541,541,541,541,1335,541,541,541,1825,563,563,563,563,563,563,563,563,563,563,563,563,563,563,1841,1842,563,563,563,563,1849,563,563,563,563,563,563,563,563,563,563,3347,563,563,563,563,3348,1890,563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,2649,587,1945,587,587,587,587,587,587,587,587,587,587,587,587,587,587,2372,587,587,1959,587,587,587,587,587,587,587,587,587,587,587,587,587,587,2384,2385,587,587,587,587,2012,587,587,541,587,563,541,541,541,541,563,563,587,587,2961,0,0,2964,2965,0,0,0,0,0,0,0,2505,0,0,0,0,0,0,0,0,0,387,0,0,0,0,0,387,0,0,0,2054,0,2055,0,0,0,0,0,0,0,0,0,2064,541,541,541,541,2216,541,541,541,541,541,541,2221,541,541,541,541,541,541,1285,1292,541,541,541,541,541,541,541,541,541,1800,541,541,541,1805,541,541,541,2226,541,541,541,541,541,541,541,541,541,541,541,541,0,0,563,563,563,563,563,563,563,563,2302,563,563,563,563,563,563,2307,563,563,563,563,563,563,3080,563,563,563,563,563,563,563,563,563,1883,563,563,563,563,563,563,563,2313,563,563,563,563,563,563,563,563,563,563,563,563,0,0,587,587,587,587,587,587,2389,587,587,587,587,587,587,2394,587,587,587,587,587,587,2377,587,587,587,587,587,587,587,587,587,1952,587,587,587,587,1956,587,587,2400,587,587,587,587,587,587,587,587,587,587,587,587,541,587,0,0,0,541,587,563,541,541,895,541,541,563,563,968,563,0,587,587,587,587,587,78115,1079,0,0,1082,1086,0,0,1090,0,2437,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1178,0,587,2671,587,587,587,587,587,587,587,587,587,587,587,587,587,587,2931,587,0,0,0,2736,0,0,0,0,0,0,0,0,0,0,0,0,1588,1589,0,0,2787,0,0,0,0,0,0,0,0,0,0,0,2797,0,0,0,0,0,0,1204,0,0,0,0,0,0,0,0,0,0,1631,0,0,0,0,0,541,541,541,2813,541,541,541,541,541,541,2821,541,541,541,541,541,541,541,2555,541,541,541,541,541,541,541,2562,563,563,563,2860,563,563,563,563,563,563,2868,563,563,563,563,563,563,3094,563,563,3096,563,563,563,563,563,563,1880,1881,1882,563,563,1885,1886,563,563,563,0,0,3008,0,0,0,0,0,0,0,0,0,0,0,0,0,1197,0,0,541,541,3227,541,541,541,541,541,541,563,563,563,563,563,563,563,3073,563,563,563,3571,541,3573,541,541,541,563,563,563,563,563,563,563,3583,563,3585,0,0,0,0,541,3659,541,541,541,541,563,3663,563,563,563,563,563,1878,563,563,563,563,1884,563,563,563,563,563,563,2864,563,2866,563,563,563,563,563,563,563,3354,563,563,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,1057,587,3667,587,587,587,587,0,0,0,0,541,541,541,541,563,563,915,563,563,563,563,563,563,946,563,563,563,563,563,1427,563,563,563,563,563,563,563,563,563,563,3535,563,563,563,563,563,563,587,587,587,587,3112,587,587,587,587,3116,470,470,470,470,454,454,470,454,454,454,454,454,454,454,454,520,520,520,520,520,520,520,520,520,520,520,520,520,520,520,520,552,575,552,575,552,552,575,552,599,575,575,575,575,575,575,575,599,599,599,552,599,599,599,599,599,599,599,599,575,575,552,575,599,575,599,1,541,860,541,541,874,541,541,541,541,541,541,541,541,541,541,541,541,1770,541,541,541,1007,587,587,1021,587,587,587,587,587,587,587,587,587,587,587,587,1971,587,587,587,0,1123,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1184,1184,1251,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2156,0,0,0,1268,0,0,0,0,0,0,541,541,541,541,541,541,541,541,541,541,541,541,541,541,541,1360,541,541,541,1323,541,541,541,541,541,541,541,541,541,541,541,541,541,2534,541,541,541,1341,541,541,541,541,541,1348,541,541,541,541,541,541,541,541,541,2234,541,541,541,541,0,0,1440,563,563,563,563,563,563,563,563,26028,1360,988,587,587,587,587,587,587,3365,587,587,587,587,587,587,587,587,587,2936,587,587,587,2939,587,2941,587,587,587,587,587,1525,587,587,587,587,587,1532,587,587,587,587,587,587,2392,587,587,587,587,587,587,587,587,587,1472,587,587,587,587,1482,587,563,587,587,587,1557,587,1079,0,1561,0,0,0,1567,0,0,0,0,0,0,1218,1219,0,0,0,0,0,0,0,0,0,1235,0,0,0,0,0,0,1573,0,0,0,1579,0,0,0,0,0,0,0,0,0,0,0,662,0,0,0,0,0,0,0,0,0,0,0,541,541,541,1779,541,541,541,541,541,541,541,541,541,541,541,541,541,2548,541,541,563,1843,563,563,563,563,563,563,563,563,563,1854,563,563,563,563,563,1879,563,563,563,563,563,563,563,563,563,563,3344,563,563,563,563,563,563,563,563,1865,563,563,563,563,563,563,563,2065,2066,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1210,0,2117,0,0,2120,2121,0,0,0,0,0,2127,0,0,0,0,0,0,0,2765,0,0,0,0,0,0,0,0,0,550,573,550,573,550,550,573,541,2213,541,541,541,541,2218,541,541,541,541,541,541,541,541,541,541,2182,541,541,541,541,541,2299,563,563,563,563,2304,563,563,563,563,563,563,563,563,563,563,1917,563,26028,0,587,587,587,2386,587,587,587,587,2391,587,587,587,587,587,587,587,587,587,587,2001,587,587,587,587,587,2006,541,541,541,3037,541,541,541,541,541,541,541,541,541,541,541,541,541,2846,541,541,563,563,3077,563,563,563,563,563,563,563,563,563,563,563,563,563,1887,1888,563,587,587,587,3119,587,587,587,587,587,587,587,587,587,587,587,587,1986,587,587,587,563,563,3247,563,563,563,563,563,563,563,563,563,563,563,563,563,2296,563,563,587,0,0,0,3445,0,0,0,0,3180,0,0,0,0,0,0,0,1242,0,0,0,0,0,0,0,0,0,380,0,0,0,0,0,0,0,0,541,541,541,541,3460,541,541,541,541,541,541,541,541,541,541,2207,541,541,541,541,541,563,587,587,587,587,3491,587,587,587,587,587,587,587,587,587,587,2354,587,587,587,587,587,587,563,563,563,563,3623,587,587,587,587,587,587,587,587,587,587,587,2395,587,587,587,587,587,3631,0,0,0,0,0,0,541,541,541,541,541,541,541,563,563,920,563,563,563,563,563,563,949,951,563,563,563,563,563,3421,563,563,563,3425,563,587,587,587,587,587,587,587,587,587,587,587,587,587,587,3501,388,390,340,0,0,0,0,0,0,339,0,0,340,0,0,0,0,0,0,1598,0,0,0,0,0,0,0,0,1604,0,0,0,387,0,0,0,69632,73728,0,0,0,0,0,65536,0,0,0,0,0,1217,0,0,0,0,0,0,0,1224,0,0,0,0,0,347,0,0,0,0,0,0,0,0,0,0,0,3316,0,0,0,0,0,0,435,339,0,0,447,0,0,471,471,471,471,471,471,471,471,471,553,576,553,576,553,553,576,471,482,471,471,471,500,477,500,500,500,500,500,500,500,500,471,471,477,471,471,471,471,471,471,471,471,471,471,471,481,481,471,482,471,471,553,600,576,576,576,576,576,576,576,600,600,600,553,600,600,600,600,600,600,600,600,576,576,553,576,600,576,600,1,0,0,750,0,0,0,0,0,0,0,0,0,0,0,0,0,1603,0,0,0,0,0,0,663,0,788,0,0,0,0,0,0,0,792,0,0,0,0,0,1231,0,0,0,0,0,0,0,0,0,0,0,2153,0,0,0,0,0,0,0,801,0,0,0,0,0,809,0,0,0,0,706,0,0,0,0,0,0,0,0,715,0,717,0,828,0,0,0,663,831,0,788,0,0,0,0,0,837,0,0,0,0,0,1597,0,0,0,577536,0,0,1602,0,0,0,0,0,0,1257,0,0,0,0,0,0,0,0,0,0,2508,0,0,0,0,0,541,861,541,541,875,541,541,541,541,888,541,541,541,541,906,541,541,541,541,541,3519,541,541,541,541,541,541,541,541,563,563,563,923,563,929,563,563,942,563,563,953,563,958,961,563,563,563,563,979,563,563,563,0,587,587,991,587,587,587,587,587,1962,587,587,587,587,587,587,587,587,587,587,3287,587,587,587,541,587,563,1008,587,587,1022,587,587,587,587,1035,587,587,587,587,1053,587,587,587,587,587,2945,587,587,2948,587,587,2951,587,2952,2953,2954,0,0,0,0,1216,0,0,0,0,1221,0,0,0,0,0,0,0,1258,0,0,0,0,0,0,0,0,0,365,299,0,0,0,0,0,0,1144,0,0,1256,0,0,0,0,0,0,0,0,1235,0,0,0,0,0,0,2891776,0,0,0,0,0,2392064,2412544,0,0,0,0,0,0,2123,0,0,0,0,0,0,0,0,0,0,2727936,0,0,0,3084288,0,0,0,1267,0,0,0,0,0,0,0,541,541,541,541,541,541,541,541,541,1741,541,541,541,1309,541,541,541,541,541,541,541,541,541,541,541,541,541,3045,541,3047,563,587,587,1556,587,587,1079,0,0,0,0,0,0,0,0,0,0,3e3,0,0,0,0,0,1621,0,0,1624,0,1626,0,0,0,0,0,0,0,0,0,0,0,3198,3199,0,0,0,0,0,0,0,1722,0,0,0,0,0,0,0,0,0,0,0,683,684,685,0,0,541,541,541,541,1780,541,541,541,541,541,541,541,541,541,541,541,541,1820,541,541,1360,0,563,563,563,563,563,563,563,563,563,563,1836,563,563,563,563,563,2263,563,563,563,563,563,563,563,563,563,563,1433,563,563,563,563,563,1875,563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,2872,1943,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,2359,0,0,2135,0,0,0,0,0,0,0,0,0,0,0,0,0,1618,0,0,2146,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2484,0,0,0,0,541,541,541,2163,2164,541,541,541,541,541,541,541,541,2180,541,541,541,541,2185,541,541,541,541,541,2228,541,541,541,541,541,541,541,541,541,541,0,0,563,563,563,563,2857,0,0,563,563,563,2247,563,2249,563,563,563,563,563,563,563,563,2320,563,563,563,563,563,0,0,563,563,563,2315,563,563,563,563,563,563,563,563,563,563,0,0,988,587,587,587,587,0,0,587,587,587,2334,587,2336,587,587,587,587,587,587,587,587,1965,1966,1968,587,587,587,587,587,587,587,587,2402,587,587,587,587,587,587,587,587,587,587,541,587,0,0,0,541,587,563,541,541,897,541,541,563,563,970,563,0,997,587,1076,1048,587,78115,1079,0,0,0,0,0,0,0,0,458,1147355,1147355,1147355,1147355,1147355,1147355,1147355,1147355,1147355,1147355,1147355,1147355,1147355,1147355,1147355,1147355,0,0,2438,0,0,0,0,0,0,2443,0,0,0,2446,2447,0,0,0,0,0,1610,0,0,1613,0,0,0,0,0,0,0,0,1584,0,0,0,0,0,0,0,0,1683,0,0,0,0,0,0,0,0,334,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1134,0,0,0,0,2487,0,0,0,0,0,0,0,0,0,0,0,2498,0,0,0,2515,0,0,0,0,0,0,0,0,0,2523,0,541,541,541,541,541,3576,563,563,563,3580,563,563,563,563,563,563,2290,563,563,563,563,563,563,563,563,563,1899,563,563,563,563,563,1906,2537,2538,541,541,541,541,541,2543,541,2545,541,541,541,541,2549,541,541,541,541,541,3614,3615,541,563,563,563,563,563,563,563,563,3424,563,563,587,587,587,587,587,563,563,2598,563,563,2601,2602,563,563,563,563,563,2607,563,2609,563,0,999,1039,587,1050,587,78115,1079,0,0,0,0,0,0,0,0,3184,0,0,0,0,0,0,0,0,2750,0,0,0,0,0,0,0,0,0,2732032,0,0,0,0,0,0,563,563,563,2613,563,563,563,563,563,563,563,563,2619,563,563,563,563,563,3624,587,587,587,587,587,587,587,587,587,587,1967,587,587,587,1972,587,587,563,2639,563,563,563,563,563,563,563,563,563,563,563,563,563,563,1402,563,587,587,587,2673,587,2675,587,587,587,587,2679,587,587,587,587,587,587,2676,587,587,587,587,587,587,587,587,587,1469,1476,587,587,587,587,587,587,587,587,2685,587,587,587,587,587,587,587,587,2693,587,587,587,587,587,1979,587,587,587,587,587,587,587,587,587,587,2926,2927,587,587,587,587,2930,587,587,587,587,587,2701,587,587,587,587,2705,587,587,587,587,587,587,587,2378,2379,587,587,587,587,587,587,587,2406,587,587,2409,2410,587,587,2176,2348,0,2745,0,0,0,0,0,0,0,2751,2752,2753,0,0,0,0,0,0,0,69632,73728,172032,0,0,0,0,65536,0,2772,0,2774,0,0,0,0,2778,0,0,0,0,2783,0,0,2786,541,541,2828,541,541,541,541,541,541,541,541,541,541,541,541,541,1771,541,541,541,541,541,2838,541,541,541,541,541,541,541,541,541,541,541,541,541,3337,563,563,541,2847,541,541,2850,541,541,2853,541,0,0,2854,563,563,563,563,563,2277,563,563,2280,563,563,563,563,563,563,563,3081,563,563,563,563,563,563,563,563,3355,563,587,587,587,587,587,587,563,563,2875,563,563,563,563,563,563,563,563,563,563,563,563,563,2324,0,0,563,563,563,563,2886,563,563,563,563,563,563,563,563,563,563,563,2606,563,2608,563,563,563,563,563,2896,563,563,2899,563,563,2902,563,0,0,2903,587,587,587,587,587,3284,587,587,587,587,587,587,587,541,587,563,541,541,563,563,587,587,587,2921,587,587,2924,587,587,587,587,587,587,587,587,587,587,587,2666,587,587,587,587,0,0,0,0,0,2972,2973,0,0,0,0,2978,0,0,0,0,0,0,0,69632,73728,221184,0,0,0,0,65536,0,3021,0,0,3023,0,0,541,541,3028,541,541,541,541,541,541,541,541,2205,2206,541,541,541,541,541,541,0,0,3160,0,3162,0,0,0,3166,0,0,0,0,0,0,0,0,2518,0,0,0,0,0,0,541,541,541,541,3030,541,541,541,541,3034,3234,3235,563,563,563,563,3239,3240,563,563,563,563,563,3244,563,563,563,563,1445,563,563,563,563,26028,1360,988,587,1455,587,587,0,3632,0,0,0,0,541,541,541,541,541,3641,541,563,563,563,563,587,587,587,587,587,587,587,3263,3264,587,587,587,587,587,587,3435,587,587,587,587,587,587,587,541,563,3268,3269,587,587,587,587,587,3273,587,587,587,587,587,587,587,587,2393,587,587,587,587,587,587,587,3279,587,587,587,587,587,587,587,587,587,587,587,587,541,587,563,2721,541,0,0,0,3312,0,0,0,0,0,0,0,0,0,0,0,0,1633,0,0,0,541,3404,541,541,541,541,541,541,563,563,563,563,563,563,563,563,563,563,563,563,563,563,3419,563,563,563,563,563,563,563,587,587,587,587,587,3113,587,587,587,587,587,0,3443,0,0,3446,0,0,0,3180,0,0,0,0,0,0,0,1583,0,1585,0,0,0,0,0,0,0,1106,0,0,0,0,0,0,0,0,0,756,0,0,0,0,0,0,0,0,541,541,3458,541,541,541,541,3463,541,541,541,541,3468,541,541,541,541,872,541,541,541,541,541,541,541,541,541,541,541,541,1316,541,541,541,563,587,587,3489,587,587,587,587,3494,587,587,587,587,3499,587,587,587,587,587,3364,587,587,587,587,587,587,587,587,587,587,2664,587,587,2667,2668,587,587,563,563,3645,3646,563,563,563,587,587,587,3651,3652,587,587,587,0,541,587,563,541,541,541,541,541,563,563,563,563,587,587,587,587,0,0,0,2730,0,0,563,587,0,541,563,587,3691,3692,3693,3694,0,541,563,587,0,0,0,0,0,0,0,0,3180,0,0,0,0,0,3453,342,343,344,345,346,0,0,0,0,0,0,0,0,0,0,0,713,0,0,0,0,0,0,0,391,0,0,0,0,0,0,0,0,0,0,0,0,1674,0,0,0,345,345,0,346,345,0,344,345,455,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,487,496,496,504,496,506,496,496,506,506,496,506,521,521,521,521,521,521,521,521,521,521,521,521,521,521,521,521,554,577,554,577,554,554,577,554,601,577,577,577,577,577,577,577,601,601,601,554,601,601,601,601,601,601,601,601,577,577,554,577,601,577,601,1,656,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1590,1591,672,673,0,675,676,0,0,0,0,0,682,0,0,0,0,0,0,0,2804,0,0,0,541,2808,541,541,541,0,0,0,0,692,0,0,0,0,0,0,699,365,365,365,0,0,0,0,0,1658,0,0,0,0,0,0,0,0,0,0,0,3180,0,0,0,3308,0,719,0,721,0,723,0,0,0,0,0,0,0,0,0,733,0,0,0,0,646,752,753,754,0,0,0,0,0,760,761,0,0,0,0,0,1680,0,0,0,0,0,0,0,0,0,0,0,3180,0,3306,0,0,763,764,675,0,0,0,0,0,0,0,0,0,0,779,780,0,0,0,0,0,1696,1697,1698,1699,0,0,0,0,0,0,0,0,755,0,0,0,0,0,0,0,0,772,0,0,0,0,0,0,0,0,782,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1601,0,0,761,0,0,787,0,0,0,0,0,0,0,0,0,794,675,723,0,692,811,0,0,0,0,761,0,0,0,0,0,0,0,1591,0,0,0,0,0,0,0,0,0,1662,0,0,0,0,0,0,0,0,754,820,821,0,0,0,0,0,0,754,0,0,825,699,0,0,0,830,0,0,0,832,0,0,0,692,699,0,0,692,830,830,0,0,0,0,0,0,0,0,0,692,541,541,851,855,858,541,866,541,541,541,881,883,886,541,541,541,898,902,541,541,541,541,541,2541,541,541,541,541,541,541,541,541,541,541,541,541,3044,541,541,541,563,563,563,971,975,563,563,563,563,0,587,587,587,998,1002,1005,587,1013,587,587,587,1028,1030,1033,587,587,587,1045,1049,587,587,587,587,587,1995,587,587,587,587,587,2002,587,587,587,587,587,587,2946,587,587,587,587,587,587,541,587,563,1073,0,998,587,1045,1049,1078,78115,1079,0,0,0,0,0,0,0,0,2779,0,0,0,0,0,0,0,0,303,303,303,303,0,303,303,303,0,0,0,0,1168,0,0,0,0,0,0,0,0,0,0,0,729,0,0,0,0,0,0,1199,0,0,0,0,0,0,0,0,0,0,1209,0,0,0,0,0,0,2912256,0,3207168,2465792,0,0,2719744,0,0,0,0,0,0,541,541,541,3397,541,541,541,541,3401,541,0,0,1214,0,0,0,0,0,0,0,0,0,0,0,0,0,1634,0,0,0,0,1254,0,0,0,0,0,0,0,0,0,0,0,0,0,1665,0,0,1321,541,541,541,541,541,541,541,541,541,541,1331,541,541,1338,541,541,541,541,873,541,541,541,541,541,541,541,541,541,541,541,541,1332,541,541,541,563,563,1443,563,563,563,563,563,563,26028,1360,988,587,587,587,587,587,587,3548,587,3550,587,587,3552,587,587,0,0,0,0,0,0,541,541,541,3639,3640,541,541,563,1501,587,587,1505,587,587,587,587,587,587,587,587,587,587,1515,587,0,0,0,541,587,563,541,541,899,541,541,563,563,972,563,0,1074,587,587,1052,587,78115,1079,0,0,0,0,0,0,0,0,2445312,0,2842624,0,0,0,2637824,0,587,1522,587,587,587,587,587,587,587,587,587,587,1535,587,587,587,587,587,2013,587,541,587,563,541,541,541,541,563,563,563,563,587,587,587,587,0,0,0,0,0,0,1666,0,1668,0,0,0,1670,0,748,0,0,0,0,0,0,0,0,3174,0,0,0,0,0,0,0,0,791,0,0,0,0,0,0,0,0,833,0,0,0,0,0,0,808,0,0,1693,0,0,0,0,0,0,1700,0,0,0,0,0,0,0,1660,1661,0,0,0,0,0,0,0,0,710,0,0,0,0,0,0,0,0,726,0,0,0,0,0,0,0,0,0,274432,274432,274432,0,274432,274432,274432,541,541,1762,541,541,541,541,541,541,541,541,1769,541,541,541,1773,541,541,1778,541,541,541,541,541,541,541,541,541,541,541,541,541,1788,541,541,0,563,1828,563,563,563,563,563,563,563,1835,563,563,563,563,563,563,3250,563,563,563,563,563,563,563,563,563,2321,563,563,563,563,0,0,563,1908,563,563,563,563,563,563,563,563,563,26028,0,587,1924,587,0,0,0,541,587,563,541,541,900,541,541,563,563,973,563,563,563,563,2262,563,563,563,563,563,563,563,563,563,563,563,1434,563,563,563,563,587,587,587,1960,587,587,587,1964,587,587,1969,587,587,587,587,587,587,2688,587,587,587,587,587,587,2695,587,587,563,563,587,587,587,587,0,0,0,2031,0,1082,0,0,0,2033,0,1086,0,0,0,2035,0,1090,0,0,0,2037,0,1094,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1620,2587,0,1825,563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,2610,2650,563,563,563,0,0,0,2653,0,1921,587,587,587,587,587,587,587,3549,587,587,587,587,587,587,0,0,3672,0,541,541,541,541,563,563,0,0,2969,0,0,0,0,0,0,0,0,0,0,0,0,0,2102,0,0,0,0,0,3161,0,0,0,0,0,0,0,0,0,0,0,0,1703,0,0,0,0,0,3319,541,541,541,541,541,541,541,3324,541,541,541,541,541,541,541,2832,541,541,541,541,541,541,541,541,541,2573,541,541,541,541,541,541,587,587,3361,587,587,587,587,587,587,587,587,587,587,587,587,587,2709,587,587,3379,0,0,3382,0,0,0,0,3180,3387,0,0,0,0,0,0,0,1682,0,1684,0,0,0,0,0,0,0,1114,0,0,0,0,1118,0,0,1121,541,541,541,541,3407,541,541,541,563,563,563,3412,563,563,563,563,563,2289,563,563,563,563,563,563,563,563,563,563,2605,563,563,563,563,563,3416,563,563,563,563,563,3422,563,563,563,563,587,587,587,3428,587,0,0,0,541,587,563,850,541,1066,901,541,923,563,1071,974,587,587,587,3432,587,587,587,587,587,3438,587,587,587,587,541,563,563,563,563,2276,563,563,563,563,563,563,2282,563,2284,563,2287,563,587,587,587,587,587,3492,587,587,587,3496,587,587,587,587,587,587,2704,587,587,587,587,587,587,587,587,587,1470,587,587,587,587,587,587,0,0,3657,0,541,541,541,541,541,541,563,563,563,563,563,563,936,563,563,563,563,563,563,563,563,587,3687,3688,3689,3690,0,541,563,587,0,541,563,587,0,0,0,0,0,0,0,0,3180,0,0,3450,3451,0,0,389,0,0,0,393,389,0,0,0,0,0,0,0,0,0,0,0,122880,0,0,0,0,0,0,0,405,0,347,0,69632,73728,0,0,0,0,0,65536,0,0,0,0,0,1709,0,0,0,0,0,0,0,0,0,0,399,0,0,0,0,0,0,0,436,0,0,443,0,0,0,0,0,0,0,0,0,0,0,131072,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,522,522,522,522,522,0,0,0,0,0,0,0,0,0,522,522,522,522,522,522,522,522,522,555,578,555,578,555,555,578,555,602,578,578,578,578,578,578,578,602,602,602,555,602,602,602,602,602,602,602,602,578,578,617,622,602,622,628,1,0,0,0,751,0,0,0,0,0,0,0,0,0,0,0,0,2061,0,0,0,962,563,563,563,563,980,563,563,563,0,587,587,992,587,587,587,587,587,2350,587,587,587,587,587,587,587,587,587,587,1936,587,587,587,587,587,1107,0,0,0,0,1112,0,0,0,0,0,0,0,0,0,0,0,167936,167936,167936,167936,167936,167936,167936,1360,914,563,563,563,1366,563,563,563,563,563,563,563,563,563,1380,563,563,1404,563,563,563,563,563,563,563,563,563,563,563,563,563,2620,563,563,563,1441,563,563,563,563,563,563,563,26028,1360,988,587,587,587,1458,563,587,587,587,587,587,1079,0,1562,0,0,0,1568,0,0,0,0,0,0,1627,1628,1629,0,0,0,0,0,0,0,0,343,0,0,0,0,0,0,0,0,403,0,0,0,0,0,0,0,0,407,407,407,407,0,407,407,407,1574,0,0,0,1580,0,0,0,0,0,0,0,0,0,0,0,808,541,541,852,541,1605,0,0,0,0,0,0,0,0,0,0,0,0,0,1619,0,0,0,0,0,1723,0,0,0,0,0,0,0,0,0,0,0,2625536,0,2699264,2715648,0,1973,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,2373,563,563,587,587,587,587,0,0,1563,0,0,0,0,0,1569,0,1575,0,1581,0,0,0,0,0,0,0,0,0,0,0,1262,0,0,0,0,0,0,0,0,1575,0,0,0,0,0,1581,0,0,0,0,0,0,0,2974,0,0,0,0,0,0,0,0,0,365,0,253952,0,0,0,0,541,541,541,2190,541,541,541,541,2194,541,2196,541,541,541,541,541,541,541,3039,541,541,541,541,541,541,541,541,541,887,541,541,541,541,541,541,563,563,2275,563,563,563,563,2279,563,2281,563,563,563,563,563,563,1896,563,563,563,563,563,563,563,563,563,1397,1399,563,563,563,563,563,587,587,2362,587,587,587,587,2366,587,2368,587,587,587,587,587,587,1465,587,587,587,587,587,587,1480,587,587,0,0,0,0,0,2489,0,0,0,0,0,0,0,0,0,0,0,196608,0,0,0,0,563,563,2625,563,563,563,563,563,563,563,563,563,563,563,563,563,2648,563,563,0,0,0,0,3024,0,541,541,541,541,541,541,541,541,541,541,541,1330,541,541,541,541,0,3380,0,0,0,0,0,0,3180,0,0,0,0,3391,0,0,0,0,0,328,0,69632,73728,0,0,0,0,0,65536,0,3393,0,0,0,0,0,541,3396,541,541,3398,541,541,541,541,541,541,541,3040,541,541,541,541,541,541,541,541,541,1783,541,541,541,541,1789,541,0,3455,541,541,541,541,541,541,541,541,541,541,541,541,541,541,563,563,563,541,862,541,541,541,541,541,541,541,541,541,541,541,541,541,541,1319,541,541,912,563,563,563,563,563,563,935,563,563,563,563,563,563,563,2291,2292,563,563,563,563,563,563,563,2319,563,563,2322,2323,563,563,0,0,1009,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,2697,1059,0,0,0,541,587,563,541,541,541,541,541,563,563,563,563,563,2614,563,563,563,563,563,563,563,563,563,563,3649,587,587,587,587,587,587,587,0,1095,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2513,0,0,1623,0,0,0,0,0,0,0,0,0,0,0,0,0,2130,0,2132,1826,563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,3258,541,3215,541,541,541,541,541,541,541,541,541,541,541,541,541,541,1337,541,587,587,587,3271,587,587,587,587,587,587,587,587,587,587,587,587,2370,587,587,587,0,0,0,0,348,348,350,348,348,348,348,348,348,513,348,348,0,350,348,0,0,348,348,0,0,0,0,349,0,0,0,0,0,329,0,0,0,0,0,0,0,0,0,0,0,2509,0,0,0,0,348,348,348,348,348,348,348,348,348,348,348,348,348,348,348,348,556,579,556,579,556,556,579,556,603,579,579,579,579,579,579,579,603,603,603,556,603,603,603,603,603,603,603,603,579,579,556,579,603,579,603,1,0,0,0,0,722,0,724,0,0,0,0,0,0,0,0,0,299,0,0,0,0,0,0,0,0,0,0,739,0,0,0,0,0,0,0,0,0,0,0,836,541,541,541,541,0,0,0,766,0,0,0,771,0,0,0,0,0,0,0,0,0,1189,0,0,0,0,0,0,541,541,541,870,541,541,541,541,541,890,892,541,541,903,541,541,541,541,541,2569,541,541,541,541,541,541,541,541,541,541,541,541,2835,541,541,541,963,965,563,563,976,563,563,563,563,0,587,587,993,999,587,587,587,587,587,3374,587,541,541,563,563,587,587,0,0,0,0,0,0,3299,0,0,0,587,587,1017,587,587,587,587,587,1037,1039,587,587,1050,587,587,587,587,587,2364,587,587,2367,587,587,587,587,587,587,587,2677,587,587,587,587,587,587,2682,587,0,0,0,1151,0,1153,0,1155,0,0,0,0,0,0,0,0,0,1231,541,541,541,541,541,541,0,1181,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1636,0,0,1198,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1675,0,0,1266,0,0,0,0,0,0,0,1181,541,541,541,541,541,541,541,1326,541,541,541,541,541,541,541,1339,1305,1307,541,541,541,541,541,541,541,541,541,541,541,541,541,541,1358,541,541,541,1343,541,541,541,541,541,541,541,541,1354,1355,541,541,541,541,541,541,2840,541,541,541,541,541,541,541,541,541,541,3056,541,3058,541,541,541,1360,914,563,563,563,563,1367,563,563,563,563,563,563,563,563,563,3242,563,563,563,563,563,563,563,563,563,1421,563,563,563,563,563,563,563,1435,563,563,563,563,563,2627,563,563,563,563,563,563,2635,563,563,563,1459,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,2942,587,587,587,1489,1491,587,587,587,587,587,587,587,587,587,587,587,2707,2708,587,587,587,1554,587,1555,587,587,1558,1079,0,0,0,0,0,0,0,0,0,306,204800,204800,0,205106,204800,1,0,1677,0,0,1679,0,0,0,0,0,0,0,0,0,0,0,1159,0,0,0,0,541,541,541,541,1763,541,541,541,541,541,541,541,541,541,541,541,541,2208,541,541,541,0,563,563,563,563,563,563,563,1833,563,563,563,563,563,563,563,2879,563,563,563,563,563,563,563,563,2644,563,563,563,2647,563,563,563,1858,563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,1857,563,563,563,1909,563,563,563,563,1915,563,563,563,26028,0,587,587,587,587,587,2376,587,587,587,587,587,587,587,587,587,587,2717,541,587,563,541,541,587,587,587,587,1929,587,587,587,587,587,587,587,587,587,587,587,2938,587,587,587,587,587,1991,587,587,587,1996,587,587,587,587,587,587,587,587,2005,587,0,0,0,541,587,563,852,892,541,903,541,925,965,563,976,587,587,587,2011,587,587,587,541,587,563,541,541,541,541,563,563,916,563,563,563,932,563,563,563,563,563,563,563,1864,563,563,563,1868,563,563,1873,563,2077,0,0,0,0,0,0,0,0,2085,0,0,0,0,0,2089,0,0,2091,0,0,0,0,0,0,0,2099,0,0,0,0,0,0,0,3012,3013,0,0,0,0,3018,0,0,2133,2134,0,2136,0,0,0,0,0,0,0,0,0,0,2144,0,0,2149,2150,0,0,0,0,0,2154,0,0,0,0,0,0,0,2160,541,541,541,541,541,541,2167,541,541,541,541,541,541,1288,541,541,541,541,1298,541,541,541,541,541,541,1325,541,541,541,541,541,541,541,541,541,541,1801,541,541,541,541,541,2202,541,541,541,541,541,541,541,541,541,541,541,541,2209,541,541,541,541,541,2815,541,2818,541,541,541,541,2823,541,541,541,541,541,541,3409,541,563,563,563,563,563,563,563,563,3479,563,3481,3482,563,3484,563,541,541,541,2215,541,541,541,541,541,541,541,541,541,541,541,541,895,541,541,541,0,0,2244,563,563,563,563,563,563,563,2252,563,563,563,563,563,563,3534,563,3536,563,563,3538,563,563,587,587,563,563,2301,563,563,563,563,563,563,563,563,563,563,563,563,563,2893,563,563,0,0,2331,587,587,587,587,587,587,587,2339,587,587,587,587,587,587,2715,587,587,587,587,541,587,563,541,541,587,587,587,587,2363,587,587,587,587,587,587,2369,587,2371,587,2374,587,587,2388,587,587,587,587,587,587,587,587,587,587,587,587,587,2918,587,587,0,2474,0,0,0,0,0,0,0,0,0,2482,0,0,0,0,0,0,0,122880,122880,122880,122880,122880,0,122880,0,2105632,0,0,2514,0,0,0,0,0,0,0,0,0,2522,0,0,541,541,541,541,541,3461,541,541,541,3465,541,541,541,541,541,541,1287,541,541,541,541,541,541,541,541,541,541,2546,541,541,541,541,541,541,541,541,541,2540,541,541,541,541,541,541,541,541,541,541,541,541,2222,541,541,541,563,563,563,2599,563,563,563,563,563,2604,563,563,563,563,563,563,2278,563,563,563,563,563,563,563,563,563,2632,563,563,563,563,563,563,2670,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,3143,587,587,587,587,2686,587,587,587,587,587,587,587,587,587,587,587,3125,587,587,587,587,541,541,2723,563,563,563,2725,587,587,587,2727,2728,0,0,0,0,0,0,0,172032,172032,172032,172032,172032,172032,172032,172032,1,0,0,2746,0,2747,0,0,0,0,0,0,0,0,0,0,0,1175,0,0,0,0,0,0,0,0,2762,0,0,0,0,0,0,0,0,0,0,0,1192,0,1195,0,0,2811,541,2812,541,541,541,541,541,541,541,541,541,541,541,541,541,1804,541,541,541,541,541,2849,541,541,541,541,541,0,0,563,563,563,563,563,563,563,563,563,563,563,563,2255,563,2858,563,2859,563,563,563,563,563,563,563,563,563,563,563,563,563,3086,563,563,587,587,2907,587,2908,587,587,587,587,587,587,587,587,587,587,587,3139,587,3141,587,587,0,0,0,2983,0,0,0,0,0,0,0,0,0,0,0,0,2073,0,0,0,0,0,3381,0,0,0,0,0,3180,0,0,0,3390,0,0,0,0,0,0,1659,0,0,0,0,0,0,0,0,0,0,114688,0,241664,258048,0,0,3430,587,587,587,587,587,587,587,587,587,3439,587,587,587,541,563,563,563,563,2303,563,563,563,563,563,563,563,563,563,563,563,26028,0,587,587,587,541,541,541,541,3518,541,541,541,541,541,541,541,541,541,563,563,563,3232,563,563,563,563,563,563,3531,563,563,563,563,563,563,563,563,563,563,587,587,587,3357,587,587,587,587,587,3545,587,587,587,587,587,587,587,587,587,587,0,0,0,0,0,0,3637,541,541,541,541,541,541,3643,563,563,563,563,3647,563,563,587,587,587,587,587,3653,587,587,0,0,0,0,3635,0,541,541,541,541,541,541,541,563,2724,563,563,587,2726,587,587,0,0,0,0,0,0,0,0,3607,0,541,541,541,541,0,3656,0,3658,541,541,541,541,541,541,563,563,563,563,563,563,937,563,563,563,563,563,563,563,0,0,0,0,394,395,0,396,0,0,0,0,0,396,0,0,0,0,0,331,332,333,0,0,0,0,0,0,0,0,0,560,583,560,583,560,560,583,401,0,0,0,0,0,368,376,404,0,0,0,0,0,368,0,0,396,0,0,0,0,0,351,0,0,368,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2744,409,411,0,0,368,376,0,69632,73728,0,0,0,0,427,65536,0,0,0,0,0,2044,2045,0,0,0,0,0,0,0,0,0,361,0,0,0,0,0,361,427,427,437,0,427,0,411,427,456,0,0,0,0,0,0,0,0,106496,0,106496,0,0,0,0,106496,396,0,409,0,497,497,0,497,497,497,497,497,497,497,497,523,523,523,523,523,456,456,456,456,531,456,456,532,456,523,537,523,523,523,537,523,523,523,523,539,557,580,557,580,557,557,580,557,604,580,580,580,580,580,580,580,604,604,604,557,604,604,604,604,604,604,604,604,580,580,618,623,604,623,629,1,0,0,0,643,0,0,0,0,0,0,0,0,0,0,0,0,2101,0,0,0,783,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2757,0,0,0,802,0,0,0,0,0,0,0,0,0,0,0,0,2129,0,0,0,587,587,587,1023,1025,587,587,587,587,587,587,587,587,587,587,587,3275,587,587,587,587,0,0,0,0,1096,0,0,1098,0,0,0,0,0,0,0,0,0,1630,0,0,0,0,0,1636,0,0,0,0,1111,0,0,0,0,0,0,0,0,0,0,0,1207,0,0,0,0,1098,1227,0,0,0,0,0,0,1234,0,0,0,0,0,0,0,0,155648,0,0,0,0,0,0,0,0,1239,0,0,0,0,0,0,0,0,0,0,1239,1248,0,0,0,0,0,0,1681,0,0,0,0,0,0,1687,0,1689,0,0,0,0,1239,1269,1270,0,1239,0,541,541,541,541,541,541,541,3207,3208,541,541,541,541,3212,3213,1278,541,541,541,1282,541,541,1293,541,541,1297,541,541,541,541,541,541,541,3054,541,541,541,541,541,541,541,541,541,1784,541,541,541,541,541,541,1360,914,563,563,563,563,563,563,563,1370,563,563,563,1374,563,563,563,563,1847,563,563,563,563,563,563,563,563,563,563,563,2308,563,563,563,563,1385,563,563,1389,563,563,563,563,563,563,563,563,563,563,563,563,2295,563,563,563,563,563,563,1406,563,563,563,1410,563,563,563,563,563,563,563,563,2901,563,563,0,0,587,587,587,587,587,587,1462,587,587,587,1466,587,587,1477,587,587,1481,587,587,587,587,587,3434,587,3436,587,587,587,587,587,587,541,563,587,1502,587,587,587,587,587,587,587,587,587,587,587,587,587,587,3128,587,0,1622,0,0,0,0,0,0,0,0,0,0,0,0,1635,0,0,0,0,0,2067,0,0,0,0,0,0,0,0,0,2076,1637,0,0,0,1641,0,0,0,1645,0,0,0,1649,0,0,0,0,0,0,2056,0,2057,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1676,0,563,563,1844,563,563,563,563,563,563,563,563,563,563,563,563,563,3540,587,587,1958,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,3127,587,3129,587,587,2010,587,587,587,587,1749,1940,1844,541,541,541,541,563,563,917,563,563,563,934,563,563,948,563,563,563,563,563,1895,563,563,563,1900,563,563,563,563,563,563,1914,563,563,563,563,26028,0,587,587,587,0,2118,0,0,0,0,0,0,2125,0,0,0,0,0,0,0,0,184726,184932,184932,184932,0,184932,184932,184932,0,0,2159,0,541,541,2162,541,541,541,541,541,541,541,541,541,541,2833,541,541,541,541,541,541,541,2227,541,541,541,541,541,541,541,541,541,541,541,0,0,563,2855,563,563,563,0,0,563,563,2246,563,563,563,563,563,563,563,563,563,563,563,3255,563,563,563,563,563,563,2314,563,563,563,563,563,563,563,563,563,563,563,0,0,587,2904,587,0,0,587,587,2333,587,587,587,587,587,587,587,587,587,587,587,3440,587,587,541,563,587,587,587,587,2390,587,587,587,587,587,587,587,587,587,587,587,2928,587,587,587,587,587,587,587,587,2401,587,587,587,587,587,587,587,587,587,587,587,541,587,0,0,0,541,587,563,1064,541,541,905,541,1069,563,563,978,541,541,541,2567,541,541,541,541,541,541,541,541,541,541,541,541,900,541,541,541,2698,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,3277,587,587,0,2759,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1716,0,541,2827,541,541,541,541,541,541,541,541,541,541,541,541,541,541,1758,541,563,2874,563,563,563,563,563,563,563,563,563,563,563,563,563,563,2285,563,587,587,587,2923,587,587,587,587,587,587,587,587,587,587,587,587,2382,587,587,587,0,0,2993,0,0,0,0,0,0,0,0,0,0,0,0,0,2433,0,2435,3171,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2771,3202,541,541,541,541,541,541,541,541,541,541,541,541,541,541,541,2577,3225,541,541,541,541,541,541,541,541,563,563,563,563,563,563,563,2888,563,563,563,563,563,563,563,563,3241,563,563,563,563,563,563,563,587,587,587,3282,587,587,587,587,587,587,587,587,587,541,587,563,2018,541,541,541,2022,563,541,3289,563,3291,587,3293,3294,0,0,0,0,3298,0,0,0,0,0,0,0,1134592,0,365,0,0,0,1134592,0,0,0,1134592,1134592,0,0,1134592,0,0,1134592,0,0,0,3311,0,0,0,0,3315,0,0,0,0,0,0,0,0,0,1725,0,0,0,0,0,0,3318,0,541,541,541,3320,541,541,541,3323,541,541,541,541,541,541,541,1751,541,541,541,541,541,541,541,541,541,2586,0,563,563,563,563,563,3338,563,563,563,3341,563,563,563,563,563,563,563,563,563,563,563,26028,1921,587,587,587,587,3360,587,587,587,587,587,587,587,587,587,587,587,587,587,587,3554,0,0,3403,541,3405,541,541,541,541,541,563,563,563,563,563,563,563,563,563,563,3075,563,563,3418,563,3420,563,563,563,563,563,563,587,587,587,587,587,587,587,3596,587,3598,587,587,0,0,0,0,3560,0,0,0,0,541,541,541,541,541,541,541,541,541,2169,541,541,541,541,541,3574,541,541,563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,1417,3586,563,563,563,587,587,587,587,587,587,587,587,587,587,3599,587,0,0,0,853,1e3,926,849,1065,894,541,541,922,1070,967,563,0,587,587,587,587,587,78115,0,0,0,0,0,0,0,0,0,365,0,305,0,0,0,0,3611,541,541,541,541,541,541,541,563,563,3617,563,3618,563,563,563,563,587,587,587,587,3594,587,587,587,587,587,587,587,541,541,563,563,587,587,3378,0,0,410,356,0,0,0,0,0,69632,73728,0,0,0,0,0,65536,0,0,0,0,0,2122,0,0,0,0,0,0,0,0,0,0,304,304,0,0,0,0,0,0,354,0,0,0,356,0,0,473,473,473,473,473,473,473,478,473,473,473,473,473,473,473,473,473,473,473,478,473,484,473,0,0,473,0,0,0,0,0,0,0,0,524,528,528,528,528,473,473,473,473,473,473,473,478,473,528,524,528,528,528,524,528,528,528,528,540,558,581,558,581,558,558,581,558,605,581,581,581,581,581,581,581,605,605,605,558,605,605,605,605,605,605,605,605,581,581,619,624,605,624,630,1,0,0,0,0,644,0,0,0,0,0,0,0,0,0,0,0,1606,0,0,0,0,688,0,0,0,0,0,0,0,0,0,0,0,365,365,365,0,0,0,0,0,2138,0,0,0,0,0,0,0,0,0,0,0,2768,0,0,0,0,0,0,0,738,0,0,0,644,738,0,744,745,644,0,0,0,0,0,0,790,0,0,0,0,0,0,0,0,0,2058,0,0,0,0,0,0,0,0,799,0,804,0,0,0,0,0,0,804,0,0,0,0,0,644,0,0,0,799,0,804,0,790,0,819,0,0,0,665,0,0,0,0,819,0,0,0,0,0,0,0,2473984,2478080,0,0,0,0,0,0,0,0,0,2767,0,0,0,0,0,0,0,644,0,0,0,0,0,0,0,0,790,0,0,0,0,0,0,0,3165,0,0,0,0,0,0,0,0,0,541,563,541,563,541,541,563,0,0,790,790,0,644,0,0,790,804,842,0,541,848,541,541,541,541,541,2839,541,541,541,2842,541,2844,541,541,541,541,541,541,879,541,884,541,891,541,894,541,541,908,541,541,867,871,877,541,882,541,541,541,541,541,899,541,541,541,541,541,541,2852,541,541,0,0,563,563,563,563,563,563,563,563,563,563,563,563,563,2256,563,563,563,972,563,563,563,563,563,0,587,587,995,587,587,587,587,587,2687,587,587,587,587,587,587,587,587,587,587,2937,587,587,587,587,587,587,587,1014,1018,1024,587,1029,587,587,587,587,587,1046,587,587,587,587,587,1026,587,1031,587,1038,587,1041,587,587,1055,587,1149,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2799,0,0,0,1200,0,0,0,0,0,1205,0,0,0,0,0,0,0,1714,0,0,0,0,0,0,0,0,0,2140,2141,0,0,2143,0,0,1099,0,0,0,1230,0,1232,0,0,0,0,0,0,0,0,0,351,352,353,0,0,0,0,1240,0,0,0,0,0,0,0,0,0,0,1246,0,1249,1200,0,0,0,0,0,2427,0,0,0,0,0,0,0,0,0,0,336,337,0,0,0,0,1230,1252,0,1255,0,0,0,0,0,1130,0,0,0,0,1264,0,0,1149,1264,0,1271,541,541,541,541,1277,1360,914,1362,563,563,563,563,563,1369,563,563,563,563,1375,563,563,563,563,1862,563,563,563,563,563,563,563,563,563,563,563,3084,563,563,563,563,563,563,563,1407,563,563,563,563,1412,563,563,563,563,563,563,563,2900,563,563,563,0,0,587,587,587,563,1419,563,563,563,1426,1428,563,563,563,563,563,563,563,563,563,3346,563,563,563,563,563,563,587,587,1461,587,587,587,587,1467,587,587,587,587,587,587,587,587,2663,587,587,587,587,587,587,587,587,587,1488,587,587,587,587,587,587,587,587,587,587,1499,587,587,587,587,1463,587,587,587,587,587,1475,587,587,587,587,587,587,2014,541,587,563,1791,541,2020,541,1886,563,587,587,1504,587,587,587,587,587,587,587,587,1511,587,587,587,1518,1520,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,2396,2397,2398,587,587,1542,587,0,541,587,563,541,541,541,541,541,563,563,563,563,563,2862,563,2865,563,563,563,563,2870,563,563,563,563,587,587,587,587,587,1079,0,0,1563,0,0,0,1569,0,0,0,0,0,376,0,0,0,0,368,0,385,0,351,0,0,1575,0,0,0,1581,0,0,0,0,0,0,0,0,0,0,303,303,0,0,0,0,1592,1593,0,0,0,0,0,1599,0,0,0,0,0,0,0,0,0,2098,0,2100,0,0,0,0,0,1638,0,0,0,0,0,0,0,1646,1647,0,0,0,0,0,0,0,3197,0,0,0,0,0,0,3200,0,0,1654,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2038,0,1690,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3005,0,1706,1707,0,0,0,1710,0,0,0,0,0,1714,0,0,1717,0,0,1730,0,1732,1706,541,541,541,541,541,541,541,541,541,541,541,2547,541,541,541,541,541,1744,541,541,541,541,1750,541,541,541,541,541,541,541,541,541,541,3220,541,541,541,541,541,541,1761,541,541,541,541,1765,541,541,541,541,541,541,541,541,541,541,3335,541,541,563,563,563,541,1776,541,541,541,1781,541,541,541,541,541,541,541,541,541,541,541,2559,541,541,541,541,1808,541,541,541,541,541,541,541,541,541,541,541,541,541,541,1360,914,563,563,563,563,563,563,563,563,563,563,563,563,1376,563,0,587,587,1046,587,587,78115,1079,0,0,0,0,0,0,0,0,225890,225890,225890,225890,225741,225890,225890,225890,0,563,563,563,563,563,563,563,563,563,563,563,563,1839,563,563,563,563,1877,563,563,563,563,563,563,563,563,563,563,563,2869,563,563,563,563,563,563,1845,563,563,563,563,563,563,563,563,563,563,1856,563,563,563,563,1894,563,563,563,1898,563,563,563,563,563,563,563,1450,563,26028,1360,988,1454,587,587,587,563,563,1860,563,563,563,563,563,563,563,563,563,563,1871,563,563,563,563,1911,1913,563,563,563,563,563,26028,0,587,587,587,587,587,1506,587,587,1508,587,587,587,1512,587,587,587,0,1286,1470,1378,541,541,541,1549,541,563,563,563,1553,563,1876,563,563,563,563,563,563,563,563,563,563,563,563,563,563,2297,2298,563,563,587,2027,587,587,0,0,0,0,0,0,0,0,0,0,3511,0,3513,0,541,0,0,0,2080,2081,0,0,2083,2084,0,0,0,0,0,0,0,0,286720,0,0,0,0,0,0,0,0,0,286720,286720,0,286720,286720,1,0,0,0,2106,0,0,0,0,2109,2110,0,0,0,0,0,0,0,2069,0,0,0,0,0,0,0,0,0,541,564,541,564,541,541,564,541,541,541,541,2175,541,541,2179,541,541,541,2183,541,541,541,541,541,541,1347,541,541,541,541,541,541,541,541,541,563,563,3231,563,563,563,563,2225,541,541,541,541,2230,541,541,541,541,541,541,541,541,0,0,0,0,0,386,0,69632,73728,0,0,0,0,0,65536,0,2242,0,563,563,563,563,563,563,563,563,563,563,563,563,563,563,2325,0,563,563,563,2260,563,563,2264,563,563,563,2268,563,563,563,563,563,587,587,3625,587,3626,587,587,587,587,587,587,1493,587,587,587,587,587,587,587,587,587,2380,587,587,587,587,587,587,2312,563,563,563,563,2317,563,563,563,563,563,563,563,563,0,0,0,0,0,0,587,587,2655,587,587,587,2329,0,587,587,587,587,587,587,587,587,587,587,587,587,587,587,2680,587,587,587,587,587,587,2347,587,587,2351,587,587,587,2355,587,587,587,587,587,587,2925,587,587,587,587,587,587,587,587,587,1471,587,587,587,587,587,587,2399,587,587,587,587,2404,587,587,587,587,587,587,587,587,541,587,0,0,0,854,1001,927,541,541,541,541,910,563,563,563,563,563,1848,563,563,563,563,563,563,563,563,563,563,3097,563,3099,563,563,563,0,0,0,0,2439,0,0,0,0,0,0,0,0,0,0,0,1616,0,0,0,0,0,0,2475,0,0,0,2479,0,0,0,0,0,0,0,0,0,365,0,0,0,0,0,0,541,2525,541,541,541,541,541,541,541,541,541,541,2533,541,541,541,541,541,541,3053,541,541,3055,541,541,541,541,541,541,541,1311,541,541,541,541,541,541,541,541,541,1753,541,541,541,541,541,541,541,2551,541,541,2553,541,2554,541,541,541,541,541,541,541,2561,541,541,541,541,876,878,541,541,541,541,541,541,541,541,541,541,541,1353,541,541,541,541,541,2565,541,541,541,541,541,541,541,541,541,541,541,541,2576,541,541,541,541,1283,541,541,541,541,541,541,541,541,541,541,1304,0,0,0,563,563,2589,563,563,563,563,563,563,563,563,563,563,3537,563,563,3539,563,587,587,563,2597,563,563,563,563,563,563,563,563,563,563,563,563,563,563,2326,0,563,563,2612,563,563,563,2615,563,563,2617,563,2618,563,563,563,563,563,2877,2878,563,563,563,563,2881,563,563,563,563,563,1863,563,563,563,563,563,563,563,563,563,563,3356,587,587,587,587,587,563,563,563,563,2626,563,563,2630,563,563,563,563,563,563,563,563,3345,563,563,563,563,563,563,563,563,563,563,563,2641,2642,563,563,563,563,563,563,563,563,563,563,26028,1360,988,587,587,587,587,2683,587,2684,587,587,587,587,587,587,587,587,2692,587,587,2696,587,0,0,0,1061,1062,1063,851,541,898,902,1068,924,563,971,975,2733,2734,0,0,2737,2738,0,0,0,0,0,0,0,0,0,0,306,307,0,0,0,0,0,2788,0,2790,0,0,0,0,0,0,0,0,0,0,0,0,2457,0,0,0,0,0,0,0,2803,0,0,0,0,0,0,541,541,541,541,541,541,541,3033,541,541,2826,541,541,541,541,541,541,541,541,541,541,541,541,541,541,541,2825,2873,563,563,563,563,563,563,563,563,563,563,563,563,2883,563,563,563,563,1912,563,563,563,563,563,563,26028,0,587,587,587,587,587,2934,587,587,587,587,587,587,587,2940,587,587,587,587,2922,587,587,587,587,587,587,587,587,587,587,587,587,2932,0,2982,0,0,2984,0,0,0,0,0,0,0,0,0,0,0,1632,0,0,0,0,0,0,0,0,2995,0,0,2998,0,2999,0,0,0,0,0,0,0,2096,0,0,0,0,0,0,0,0,0,562,585,562,585,562,562,585,541,3049,541,541,541,541,541,541,541,541,541,541,541,541,541,3061,3089,563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,2621,563,3103,563,563,563,563,563,587,587,587,3111,587,587,587,587,587,587,1507,587,587,587,587,587,587,587,587,587,1983,1984,587,587,587,587,587,587,3131,587,587,587,587,587,587,587,587,587,587,587,587,587,587,2929,587,587,587,587,3145,587,587,587,587,587,541,587,563,541,541,563,563,587,587,0,2962,0,0,0,0,0,0,0,0,0,2507,0,0,0,0,0,0,0,0,0,0,0,3163,0,0,0,0,0,0,0,3169,0,0,0,0,0,438,0,0,0,0,0,0,0,0,0,0,0,2142,0,0,0,0,541,3226,541,541,541,541,541,541,541,563,563,563,563,563,563,563,3095,563,563,563,563,563,563,563,563,2306,563,563,563,563,563,563,563,563,563,3236,563,563,563,563,563,563,563,563,563,563,563,563,563,2309,2310,2311,563,563,3246,563,563,563,563,563,563,3252,563,3254,563,563,563,563,563,1392,563,563,563,563,563,563,563,563,563,563,1853,563,563,563,563,563,563,563,563,587,587,587,587,587,587,587,587,587,3265,587,587,587,587,587,2703,587,587,587,587,587,587,587,587,587,587,2950,587,587,541,587,563,587,587,3281,587,3283,587,587,587,587,587,587,587,587,541,587,563,3153,541,3155,563,3157,587,0,0,0,3301,0,0,0,0,0,0,0,3180,0,0,0,0,0,0,0,3014656,3207168,0,2691072,0,0,3215360,0,0,3309,0,0,0,0,0,3314,0,0,0,0,0,0,0,0,0,365,0,0,0,0,131072,131072,563,563,3339,563,563,563,3343,563,563,563,563,563,563,563,563,563,26028,1360,988,587,587,1456,587,587,587,587,3362,587,587,587,587,587,587,587,587,587,587,587,587,3126,587,587,587,587,587,3371,587,587,587,587,541,541,563,563,587,587,0,0,0,3296,0,0,0,0,0,0,3557,3558,0,0,0,0,0,0,0,541,541,541,3568,541,541,541,541,541,1284,541,541,541,541,541,541,541,541,541,1303,563,563,3588,563,587,587,587,3593,587,587,587,587,587,587,587,587,2690,587,587,587,587,2694,587,587,3601,587,0,0,0,0,0,3604,3605,3606,0,3608,541,541,541,541,541,541,1813,541,541,541,541,1819,541,541,541,1360,563,3621,3622,563,563,587,587,587,587,587,587,587,587,587,3629,3630,563,563,587,587,587,587,3679,0,541,3680,563,3681,587,3682,0,541,541,541,541,1345,541,541,541,541,541,541,541,541,541,541,541,541,2560,541,541,541,358,359,0,0,0,0,0,0,0,365,0,293,0,0,0,0,0,0,306,0,0,0,0,0,0,0,0,0,0,1174,0,0,0,0,0,0,0,0,392,0,0,0,0,0,0,0,0,0,0,0,0,2495,0,0,0,474,474,474,488,0,0,488,359,359,359,510,359,359,359,359,474,559,606,582,582,582,582,582,582,582,606,606,606,559,606,606,606,606,606,606,606,606,582,582,559,582,606,582,606,1,541,541,868,541,541,541,541,541,541,541,541,541,541,904,541,541,541,541,541,2851,541,541,541,0,0,563,563,563,563,563,563,563,563,563,563,2254,563,563,563,587,1015,587,587,587,587,587,587,587,587,587,587,1051,587,587,587,587,587,2909,587,587,587,587,587,587,2917,587,587,587,587,587,1527,587,587,587,587,587,587,587,587,1538,1539,1197,0,0,0,0,0,0,0,1197,0,0,0,0,0,0,0,0,1134592,0,0,1134592,0,0,0,0,0,0,0,0,0,0,0,0,0,2980,0,0,541,541,1280,541,541,541,1289,541,541,541,541,541,541,541,541,541,541,3524,541,541,3526,563,563,1360,914,563,563,563,563,563,563,563,563,563,1372,563,563,563,1381,587,587,1543,0,1289,1473,1381,541,541,541,541,541,563,563,563,563,563,2898,563,563,563,563,563,0,0,587,587,587,587,587,587,2337,587,587,587,587,587,587,587,2352,587,587,587,587,2357,587,587,587,563,587,587,587,587,587,1079,0,0,0,1564,0,0,0,1570,0,0,0,0,0,2440,0,0,0,0,0,0,0,0,0,0,0,2871296,0,0,2424832,0,0,0,1576,0,0,0,1582,0,0,0,0,0,0,0,0,0,365,0,0,0,0,155648,0,0,1606,0,0,0,0,0,0,0,1614,1615,0,0,0,0,0,0,0,3385,3180,0,0,0,0,0,0,0,0,2097,0,0,0,0,0,0,0,0,2070,0,0,0,0,2074,0,0,0,0,0,0,1625,0,0,0,0,0,0,0,0,0,0,0,1648,0,0,0,0,563,1891,563,563,563,563,563,563,563,563,1902,563,563,563,563,563,1408,563,563,563,563,563,563,563,563,563,563,1867,563,563,563,563,563,587,1975,587,587,587,587,587,587,587,587,587,587,587,1987,587,587,587,587,1490,587,587,587,587,587,587,587,587,587,587,587,2381,587,587,587,587,2008,587,587,587,587,587,587,541,587,563,541,541,541,541,563,563,918,563,563,563,563,563,563,563,563,563,563,563,2634,563,563,563,563,0,2243,563,563,563,563,563,563,563,563,563,563,563,563,563,563,2637,563,0,2330,587,587,587,587,587,587,587,587,587,587,587,587,587,587,3276,587,587,587,0,0,2451,0,0,0,0,0,0,0,0,0,0,0,0,0,2471,0,2472,0,0,0,563,563,563,563,563,563,563,2593,563,563,563,563,563,1424,563,563,563,563,563,563,563,563,563,563,2293,563,563,563,563,563,563,587,2659,587,587,587,587,587,587,587,587,587,587,587,587,587,587,2912,587,587,2916,587,587,587,587,0,0,0,0,0,2776,0,0,0,0,0,0,0,0,0,0,372,0,0,373,0,0,563,2895,563,563,563,563,563,563,563,563,563,0,0,587,587,587,587,2335,587,587,587,587,587,587,587,587,587,2947,587,587,587,587,587,541,587,563,587,2906,587,587,587,587,587,587,2913,587,2915,587,587,587,587,587,587,2935,587,587,587,587,587,587,587,587,587,2408,587,587,587,587,2177,2349,587,587,587,2944,587,587,587,587,587,587,587,587,587,541,587,563,563,563,563,563,563,563,587,587,587,541,587,587,587,0,541,587,563,541,1547,541,541,1550,563,1551,563,563,0,0,0,0,0,3561,0,0,0,541,541,541,541,541,541,541,541,3464,541,3466,3467,541,3469,541,541,541,541,3575,541,563,563,563,563,563,563,563,563,563,563,3423,563,563,563,3426,587,587,587,587,563,3587,563,563,587,587,587,587,587,587,587,587,587,587,587,3600,587,587,587,587,3670,587,0,0,0,0,541,541,541,541,563,563,919,925,563,563,563,563,943,563,563,563,563,563,563,3353,563,563,563,587,587,587,587,587,587,587,587,587,587,587,587,3267,0,0,360,0,0,0,0,0,0,365,0,293,0,0,0,0,0,0,331,0,0,0,0,0,0,0,331,0,0,69632,73728,0,419,419,0,0,65536,419,0,0,0,0,375,0,0,0,0,0,0,0,0,0,0,0,1663,0,0,0,0,0,0,360,0,0,0,0,0,0,0,0,0,0,0,0,0,2511,0,0,0,0,0,370,0,0,370,0,0,0,0,0,0,0,0,0,0,0,0,0,2496,0,0,560,607,583,583,583,583,583,583,583,607,607,607,560,607,607,607,607,607,607,607,607,583,583,560,583,607,583,607,1,541,863,541,541,541,541,541,541,541,541,541,541,541,541,541,541,1772,541,1010,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,3123,587,587,587,587,587,587,587,563,1386,563,563,563,563,563,563,563,563,563,563,563,563,563,563,2871,563,0,0,2760,0,0,0,0,0,0,0,0,0,0,0,0,0,2755,0,0,0,0,0,0,0,2985,0,0,0,0,0,0,0,0,0,0,406,0,0,0,0,0,0,0,0,0,3302,0,3303,0,0,0,0,3180,0,0,0,0,0,0,348,0,0,0,0,0,0,0,0,0,0,2801664,0,0,0,0,2142208,0,0,0,361,362,363,364,0,0,365,0,293,0,0,0,0,0,0,348,349,350,0,0,0,0,0,0,0,0,3180,0,3388,0,0,0,0,0,0,362,0,361,0,0,0,69632,73728,0,0,0,0,428,65536,0,0,0,0,0,2463,0,0,0,0,0,0,0,0,0,0,0,2807,541,541,541,541,428,428,0,0,428,0,362,428,457,0,0,0,0,0,0,0,0,1159168,0,1159168,0,0,0,0,1159168,0,0,0,0,498,498,0,505,505,505,505,511,512,505,505,525,525,525,525,525,457,457,457,457,457,457,457,457,457,525,525,525,525,525,525,525,525,525,561,584,561,584,561,561,584,561,608,584,584,584,584,584,584,584,608,608,608,561,608,608,608,608,608,608,608,608,584,584,620,625,608,625,631,1,563,563,563,973,563,563,563,563,563,0,587,587,587,587,587,587,1963,587,587,587,587,587,587,587,587,587,3137,587,587,587,587,587,587,587,0,2105,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2052,0,0,0,0,0,541,2161,541,541,541,541,541,541,541,541,541,541,541,3336,541,563,563,563,0,0,563,2245,563,563,563,563,563,563,563,563,563,563,563,563,2882,563,563,563,0,0,587,2332,587,587,587,587,587,587,587,587,587,587,587,587,3286,587,587,587,587,541,587,563,2550,541,541,541,541,541,541,541,541,541,541,541,541,541,541,541,2210,541,541,541,2579,541,541,541,541,541,541,541,541,541,541,0,0,0,0,0,0,2068,0,0,0,0,0,0,0,0,0,365,0,0,122880,122880,0,0,2711,587,587,587,587,587,587,587,587,587,587,541,587,563,541,541,541,2021,563,563,562,609,585,585,585,585,585,585,585,609,609,609,562,609,609,609,609,609,609,609,609,585,585,562,585,609,585,609,1,0,0,0,705,0,0,0,0,0,0,0,0,0,0,0,0,2742,0,0,0,0,735,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2075,0,541,864,541,541,541,541,541,541,541,541,541,541,541,541,541,541,2238,0,1011,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,2689,587,587,587,587,587,587,587,587,2716,587,587,587,541,587,563,541,541,1136,0,0,0,0,0,0,0,0,0,0,365,365,0,0,0,0,0,0,2095,0,0,0,0,0,0,0,0,0,0,2375680,0,0,0,0,0,587,1503,587,587,587,587,587,587,587,587,587,587,587,587,587,587,2911,587,2914,587,587,587,587,2919,587,563,587,587,587,587,587,1079,1560,0,0,0,1566,0,0,0,1572,0,0,0,1578,0,0,0,0,0,0,0,0,0,0,0,0,2754,0,0,0,563,563,563,563,2600,563,563,563,563,563,563,563,563,563,563,563,26028,1922,587,587,587,0,0,0,0,647,0,0,0,0,0,0,743,541,541,541,541,541,541,2178,541,541,541,541,541,541,541,541,541,0,2242,563,563,563,563,563,0,0,1594,0,0,0,0,0,0,0,0,0,0,0,0,0,2770,0,0,563,563,563,1846,563,563,563,563,563,563,563,563,563,563,563,563,3085,563,3087,563,2187,541,2189,541,541,541,541,541,541,541,541,541,541,541,541,541,1821,541,1360,0,0,563,563,563,563,2248,563,563,563,563,563,563,563,563,563,2305,563,563,563,563,563,563,563,563,563,0,587,587,994,587,587,587,563,2274,563,563,563,563,563,563,563,563,563,563,563,563,563,563,2894,563,587,2361,587,587,587,587,587,587,587,587,587,587,587,587,587,587,3121,587,587,587,587,587,587,587,587,563,563,541,563,587,563,587,1,2623,563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,3101,563,563,563,563,2651,0,0,0,0,0,0,587,587,587,587,587,587,587,587,587,2340,587,587,587,587,0,0,3179,0,0,0,0,0,0,0,0,0,0,0,0,0,2798,0,0,3245,563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,3257,563,1134592,0,1134592,0,0,0,1134592,1135008,1135008,0,0,0,0,0,1135008,0,0,0,0,0,2478,0,0,0,0,0,0,0,0,0,0,0,3180,0,0,3307,0,1134592,0,1134592,1134592,0,0,0,0,1135203,1135203,1135203,1135203,1134592,1135203,1135203,1135203,1135203,1135203,1135203,1135203,0,1134592,1134592,1134592,1134592,1135203,1134592,1135203,1,0,0,2125824,2125824,2125824,2125824,2125824,2424832,2433024,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,0,0,988,2125824,2125824,2125824,2125824,1147355,1147355,1147355,1147355,458,458,1147355,458,458,458,458,458,458,458,458,1147406,1147406,1147406,1147406,1147406,1147406,1147406,1147406,1147406,1147406,1147406,1147406,1147406,1147406,1147406,1147406,0,0,0,0,0,0,0,0,458,0,0,0,0,0,1147355,1147355,1147355,1147406,1147406,1147355,1147406,1147406,1,12290,3,0,0,0,0,249856,0,0,0,249856,0,0,0,0,0,0,0,69632,73728,0,0,0,0,425,65536,0,1159168,0,0,1159168,0,1159168,1159168,0,1159168,1159168,0,1159168,1159168,1159168,1159168,1159168,1159168,1159168,1159168,1159168,1159168,1159168,1159168,1159168,1159168,1159168,1159168,1159168,1159168,1159168,0,1159168,1159168,0,1159168,1159168,1159168,1159168,1159168,1159168,1159168,1159168,1159168,0,0,0,0,0,0,0,0,0,1159168,0,0,1159168,1159168,1159168,1159168,1159168,1159168,1159168,1159168,1159168,1159168,1,12290,3,78115,293,0,0,0,0,0,0,0,0,0,0,0,0,131072,131072,0,0,1163264,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3170,0,913,2125824,2125824,2125824,2125824,2125824,2424832,2433024,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,2125824,0,0,1453,2125824,2125824,2125824,2125824,106496,0,106496,106496,0,106496,106496,106496,106496,106496,106496,106496,106496,106496,106496,106496,106496,106496,106496,106496,106496,0,0,0,106496,0,0,106496,106496,106496,106496,106496,106496,106496,106496,106496,0,0,0,0,0,0,0,0,0,0,0,2183168,0,0,0,0,0,0,0,0,2134016,0,0,0,0,0,0,0,0,0,0,541,541,541,1275,541,541,0,0,0,3117056,0,0,0,0,0,0,0,0,0,0,0,0,2979,0,0,0,0,3108864,3198976,0,0,3043328,0,3149824,2936832,0,2760704,0,2437120,0,0,0,0,0,0,2107,0,0,0,0,0,0,0,0,0,365,0,293,0,0,0,0,0,0,0,0,2875392,0,0,0,0,0,0,0,0,0,0,2834432],r.EXPECTED=[1039,1047,1048,1046,1042,1052,1056,1060,1064,1068,1446,1074,2948,2053,1092,1446,2490,1670,1213,1080,1084,1085,1446,1089,1446,1446,2818,1098,1103,1108,1187,1181,1181,1114,1118,1446,1933,1123,1446,1136,1098,1098,1204,1108,1108,1171,1181,1181,1130,1134,1446,1446,1140,1446,1147,1098,1152,1108,1108,1109,1181,1181,1182,1158,1446,1446,1238,1668,1098,1148,1108,1108,1206,1181,1181,1165,1446,3130,2162,1098,1099,1108,1177,1181,1215,1219,2143,1136,1098,1186,1110,1181,1191,3130,2153,1099,1108,1180,1217,2659,2819,1197,1173,1201,1104,1235,1210,1224,1154,1228,1232,1168,1243,1247,1251,1255,1259,1261,1266,1262,1270,1274,1278,1282,1286,1290,1220,1295,1890,1296,1446,1446,1446,1446,1375,2489,1446,1446,1446,2385,1446,1446,1446,1446,1446,1446,1446,1446,1076,1446,1446,1446,1446,2986,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1300,1304,1305,1309,1405,1315,1318,1322,1326,1330,1446,1446,1804,1334,2315,1338,2350,1142,1143,1342,1346,1446,1446,2834,1352,1362,1369,1446,1126,1446,2386,1379,1446,1384,1390,1446,2987,2588,1396,2688,1457,1446,1518,1446,1446,2269,1446,1446,1446,1402,1446,1441,1897,1409,1413,1446,1447,1419,1446,1447,1419,1446,1446,1193,1446,2988,3136,2482,1446,2617,1425,1446,1448,1431,1446,1918,1446,2648,1436,1457,1348,1457,1380,1440,1446,1445,3050,1452,1446,1456,1311,1446,1916,2325,1463,2125,1347,1472,2317,1909,1478,3010,2343,2076,2746,2758,1482,2765,2077,1799,1486,2744,1493,1358,1446,1446,2131,1446,2559,1386,1365,1497,1501,1505,1509,1515,2369,1569,2450,1522,2538,1526,1530,1536,2479,2088,1457,1971,1540,1544,1548,1552,1557,1446,2103,1446,1532,1446,2479,2082,1563,1568,2137,1573,1577,3026,1446,1446,2116,1446,1446,3027,1446,1586,1938,1584,2123,1647,1590,1432,1594,1446,2517,1600,1446,2517,1600,1446,2872,1606,1612,1616,1620,1626,1446,1239,1633,1446,1596,1640,3118,2782,1645,1651,1863,1446,1863,1446,1602,1446,2675,2173,1655,2685,1559,1866,2685,3124,1659,1665,2904,2903,3055,2673,1674,1678,3047,2266,2239,1682,1686,1690,1694,1698,2892,1702,1715,1719,1723,1727,1731,1446,2332,1773,1737,1744,1748,1751,1755,1758,1446,1772,2979,1777,1781,2506,1788,1792,1635,1636,1446,2668,2874,1796,1808,2784,1815,1819,1823,2304,1828,1446,2430,1446,1446,2334,1853,2583,1834,1843,1446,2069,1446,1446,1954,1446,1446,2070,1446,1446,1622,1608,1847,1851,1857,1641,1871,1446,2225,1956,1446,2225,1956,1446,2374,1885,1876,1811,1446,1883,1446,1947,1889,1446,1511,1446,1291,2287,1894,1901,1906,1446,1906,1446,1913,1446,1740,1922,1446,1932,1733,1446,1932,1830,1094,1732,1446,1937,2066,2439,2671,1945,1942,2455,1489,2323,1951,1709,1711,1629,1161,1962,1968,1977,1980,1984,1446,1119,1994,1999,2003,2007,2011,2015,2019,2023,1986,1872,2093,1928,2028,2032,2036,1802,2040,1446,1446,2044,1580,2050,2059,2063,2074,2046,1446,2024,2081,1446,2086,1446,1446,1988,2092,2097,2109,2113,1446,2120,1446,1446,2129,1446,1558,2135,1446,1446,2141,2535,2866,2147,1446,1990,1446,1446,3096,1446,1446,3096,1446,1446,1466,2151,2157,2204,1458,2161,1446,2914,1446,1446,1764,1446,3053,2166,2170,1446,2182,1446,2187,1446,2916,1957,2192,2202,2305,1446,2210,2496,1824,3112,2217,1761,1459,1558,2224,2229,2841,2969,2682,2815,2233,2248,2236,2243,1837,1839,2247,2252,2100,1446,1446,1446,1446,2918,1766,2256,2260,2273,2277,2281,2284,1446,2889,1902,2985,2524,2433,2299,2576,2212,2213,2303,1415,1457,2309,1958,2321,2329,1446,2976,1446,1398,1446,1553,2338,2342,2751,1446,2347,2503,2354,2358,1558,2363,1446,1995,2368,1446,1421,2364,2373,2733,2378,2383,2390,3044,1446,2715,1446,1446,1860,1446,1446,1860,2719,2733,2397,2176,2401,1946,2461,1446,1446,2405,1446,1473,2717,2413,2417,2427,2437,3061,1446,2105,1446,1973,2407,2443,2447,2454,2459,2379,1446,2465,2472,2476,2486,2511,2494,2701,2409,2500,2510,2516,2521,2528,2220,2532,2542,2546,2198,2312,2550,2554,2563,2567,2571,2575,1446,2580,2592,2596,2600,2604,2608,2612,2616,1446,2621,2393,1372,2628,2632,2636,2640,2652,3103,1446,2708,2468,2656,2665,2679,2692,1558,2699,1446,2705,1446,2998,2712,1446,2723,2624,1768,1879,3159,1446,2205,2727,1446,1468,2732,1446,2206,2982,1446,3004,2737,2741,3109,2750,1446,2755,1446,1446,2762,1446,1446,2762,2769,3037,2775,2420,2779,1446,2788,1446,1446,2795,1446,1427,2801,3020,2805,2646,1446,2812,1446,2809,1446,3067,2853,2823,2643,2183,2827,2863,2512,2832,2838,1707,1070,2359,2845,2851,2857,1964,1474,3084,2557,2878,2955,3090,2882,2293,2295,2886,2896,2900,2908,2912,1446,1446,1446,2922,2926,2930,2934,2938,2942,2946,1446,2055,2952,1355,2791,2178,2959,1867,2963,1784,2967,1446,2973,2423,2992,2996,3002,1446,2728,1446,1446,3008,1446,3014,3018,1446,3024,2188,3031,3147,1446,1446,2694,1446,1446,2847,1446,1446,2695,3035,1446,3041,3078,3141,3059,1446,1446,3065,1446,1446,3065,1446,1446,3071,1446,3075,1925,3153,1446,1446,3082,1446,1564,3088,1446,1661,3094,3100,2195,3116,1446,3122,1446,3128,1446,3134,1705,3140,2586,2797,1446,3145,2771,1392,3151,1446,3157,2290,2828,2661,2869,2422,3106,2860,2263,1446,1446,1446,1446,1446,1446,1446,1446,1446,1446,1473,3163,3166,3170,3182,3186,3182,3189,3181,3182,3182,3182,3182,3177,3173,3193,3182,3197,3201,3204,3210,3214,3216,3206,3220,3224,3228,3232,3235,3239,3243,3729,3929,3929,3246,3929,3929,5383,3929,3929,3300,3929,3261,3562,3273,4078,3734,3929,3929,3929,3277,3287,3294,4847,3929,3250,3929,3929,3344,3929,4873,4873,4873,4873,3266,4873,4873,3564,3564,3567,3564,3564,3564,3564,3267,3256,3305,3562,3568,3335,4081,3929,3929,3929,3323,4919,3377,4693,3929,3252,3722,3750,3365,3315,3269,3334,4080,3732,3929,3929,3559,4873,5799,4692,3929,3929,3688,3929,3929,3560,4873,4873,4873,4195,4873,4873,4873,4874,3564,3267,3264,3331,3339,3929,3342,3929,3738,3256,3367,3317,3321,3560,4873,3564,3309,3256,3256,3365,3371,3564,3564,3564,3567,3256,3256,3256,3256,3327,4195,3564,3564,3564,3310,3365,3359,3929,3929,3813,3929,3564,3564,3564,3364,3929,5741,3559,4873,4194,3564,3564,3268,3256,4193,4873,3266,3564,3310,3256,3256,3256,3366,3348,3929,3929,3929,3505,3383,3256,3373,3766,3256,3384,3929,4872,4874,3564,3268,3256,3257,3373,4694,3929,3929,3929,3355,3566,3256,3321,4194,3565,3311,3560,3563,3384,3561,3319,3360,3388,3390,4109,3394,3401,3405,3429,3429,3429,3429,3424,3430,3412,3416,3420,3428,3434,3438,3442,3397,3446,3450,3453,3457,3460,3463,3465,3469,3473,3408,3477,3481,3485,3696,3498,4473,3929,3929,3929,3512,3511,3929,3929,3929,3517,4964,4966,3929,3523,3527,3929,3929,3929,3752,3534,3543,3929,3929,3850,3854,3578,3582,3586,3589,3590,3594,3597,3601,3604,3608,3611,3614,3618,3622,3626,4965,3648,3636,5178,3647,5820,3654,4257,3659,3929,3669,4219,3694,3703,3929,5714,3525,3929,3929,3929,3770,3790,3929,5539,3707,3929,3342,5695,3904,3929,3289,3290,3906,3929,4658,4464,5227,4306,3936,3718,3726,3743,3929,3375,3631,3929,3548,5050,5064,3749,3929,3929,3929,3836,3758,3298,3929,3929,3915,3927,4893,3528,3929,3929,3921,4548,5744,4281,3929,3929,3932,5019,3929,5587,5178,3929,3553,3557,3572,5826,3929,3929,4530,3789,3794,3929,3929,3972,4899,3798,3806,3929,3929,3972,5040,3817,3826,3929,3929,3972,5490,3785,3929,3929,3929,3869,4728,4203,3770,3790,4142,3929,3929,3929,3894,4001,3929,3929,3929,3929,3252,3798,4127,4203,3850,3854,4139,3744,3929,3929,3929,3844,5313,5832,4137,4141,3929,3650,3929,3929,4854,4858,4140,3929,3929,3929,3930,5557,3873,3929,3929,3883,3929,5107,3929,5107,4780,3929,4781,5020,3929,3929,3738,5109,3929,3290,3904,3940,3947,3946,3942,3951,3955,3956,3956,3960,3962,3963,3962,3967,3971,3929,3929,4017,4021,4708,3978,3988,3929,3683,3781,3802,3995,4392,3929,5597,5363,3530,3929,4135,4005,4013,3929,3929,4065,4070,4026,3929,3929,4026,3375,3929,3929,4049,4056,4576,3997,5403,5596,3929,3856,4795,3529,3929,3929,3929,3931,4061,3929,3929,3929,3972,4199,3911,3929,3929,3929,3974,5170,3929,3929,4704,3929,4075,5320,4248,5165,3855,4657,4085,3929,3690,4699,5178,3978,3251,3929,3929,4101,3929,5319,4247,5772,5010,4113,3981,3929,3929,4164,4148,4148,4120,3929,3929,4165,4115,4709,4132,3929,3929,4247,4459,5170,3929,3929,4706,3879,4572,4576,5321,4249,4655,3929,3929,4274,3929,3972,4146,4150,3929,3735,3929,3735,4154,4158,3929,3929,4396,3929,3929,3982,3929,3929,3929,4029,4107,3929,4706,3929,4366,4574,4181,5320,5850,4644,4180,5319,4886,4217,4208,4673,3929,3929,4424,5855,3279,5321,4215,3929,3766,4873,4873,3563,3564,4228,3929,4451,4182,4233,4305,4240,4273,4435,4246,4434,4245,4708,4241,3929,3699,4502,3698,4255,5609,4272,5609,4272,3699,5199,5610,4273,4253,3281,4246,4270,3929,3809,3929,4549,3737,3929,3896,3929,5021,3770,4271,3771,4182,5163,5161,3929,3283,5762,3710,4279,4279,4211,4127,4128,4405,3712,4286,3929,3929,3929,4052,3929,5548,3754,4301,3929,3842,3574,4534,4651,5125,3745,4537,4310,4314,4318,4319,4323,4327,4333,4334,4331,4338,4339,4339,4340,3929,3844,4827,3929,3846,3929,3929,4905,3929,3376,5780,4202,3929,3929,3929,4235,4524,5352,5187,4364,4473,3342,4273,3929,3888,5737,4840,4356,4374,4378,4842,5051,4864,3929,4387,4491,3929,4413,3929,3892,5107,3929,3665,3929,3929,4681,3640,4265,4472,3929,4802,3929,4518,3670,4266,4421,3929,4204,4203,3929,4718,4428,4432,3929,3929,3929,4451,4440,4445,3929,3929,4450,4541,4470,3929,3343,3929,3897,3929,4294,3929,4296,3929,5616,3929,5461,4463,3929,5347,4362,5468,4800,3929,3929,4457,4461,5243,3929,4484,3929,3931,5074,3929,3972,4166,4116,3929,3929,3929,4035,4737,3929,3929,3929,4505,3929,5347,4495,3929,3972,5410,5415,4015,4019,3929,3929,4457,4490,4499,3929,3929,3929,4624,5347,3929,4801,3929,3997,3929,5743,4160,3929,3929,3929,4628,3929,5704,4529,3929,3998,5353,5435,3929,5703,4528,3929,4e3,3929,3929,3999,3528,4505,5352,4800,3929,4007,4653,3929,4009,3929,4642,5697,3929,3929,3929,4695,4052,3929,3929,3929,4708,4545,3929,3929,3301,4450,3929,3929,3929,4734,3929,5303,3342,3929,4030,4480,3929,3929,3929,4516,4994,3894,3929,3895,3929,3929,3351,3892,3737,3735,3929,4039,3929,3929,4086,5090,3895,5020,3895,3737,5022,3736,3737,4554,4556,3929,3929,4638,4794,3929,3929,4668,4806,4689,3929,3929,3929,4752,4504,3929,3929,5097,4566,4022,5334,4383,5691,4570,4582,4586,4590,4594,4598,4602,4605,4608,4612,4614,4618,4634,4632,4634,4621,3929,3929,3929,4757,4725,4816,3929,4648,4662,4666,5081,4672,3929,5344,4398,4352,4678,3929,3929,4678,4687,5178,3929,3929,4745,4749,4210,3929,4965,4768,5739,3929,3929,3322,5689,3899,5181,4703,5110,5214,4713,4722,3929,4051,3558,3929,4028,4478,4500,3929,5400,4741,3929,3929,4780,3929,4780,4762,3929,3929,3929,4821,4756,4761,3929,3929,4818,4822,4505,3863,3867,3929,3341,3341,3929,4766,4294,3929,3899,3929,4066,3929,3929,4087,5091,3767,5433,4817,4683,4716,3929,5809,3929,4091,4095,3751,3972,4773,4777,3929,4107,3929,3929,4137,4141,4786,4775,3929,3929,4820,3910,4788,4777,3929,3929,4828,3972,3322,4792,3929,3929,4847,3929,5432,4816,4833,4799,3929,5147,3929,3929,4872,4873,4966,4295,4304,4814,4826,3929,3929,3929,4871,4674,3929,4708,3897,5180,5433,4832,3929,4159,3929,3377,3299,3929,4503,4708,3929,4837,3929,3929,3929,4913,5207,3929,3929,3929,4965,3929,5148,3929,4008,3929,4408,3929,4172,3929,4172,3900,5432,3628,3929,3929,3929,4856,4860,3844,5313,3929,3929,4982,3929,5086,3768,5434,3630,3929,4174,3929,4562,5312,3929,3929,3929,5003,4502,5148,4878,4885,4293,3929,3929,4296,3929,4296,3929,4229,5198,5520,3928,3929,3928,3897,4293,3929,3898,3929,5228,3899,3898,3929,4296,3929,5547,3519,4911,3929,5584,4917,3769,3929,3929,3929,4240,4273,3929,3779,3800,3744,4923,4927,4934,4935,4930,4939,4943,4949,4953,4945,4957,4957,4958,4962,3929,4247,4511,3929,3972,5871,3929,3983,3929,5572,5591,3929,4731,4359,5861,5581,4990,3929,3929,3929,5111,4846,5503,4707,5051,3929,4263,4465,3929,4282,3929,3929,3860,3929,5742,3929,3929,3737,3929,3894,5322,3929,5e3,5007,3507,3929,4290,3929,3929,4449,3929,5018,3929,3929,3642,5026,3929,3929,3929,5177,4628,3929,3300,3929,4346,3674,3681,3547,3929,3539,5030,5034,3929,3929,3929,5337,5040,3822,3929,3929,3641,5042,3929,3929,3929,5368,3643,3929,3929,3929,5405,5793,3929,3929,3929,5453,4626,3377,5052,3929,3929,3929,3721,4501,4368,3929,3546,3490,5496,5308,5793,3929,3929,5485,4370,3929,3929,5068,3972,5073,4863,3929,3513,4450,5122,3375,5406,3842,3929,3655,5793,3929,3739,4707,5781,3929,3990,3929,3929,4006,3299,4452,4369,3929,4439,4444,3929,3895,4547,3886,3929,5078,3929,3929,5048,5304,3929,5095,3929,5486,5051,4451,4368,3929,4474,4050,4057,4293,4450,3929,3929,5228,3929,5453,3929,3929,5072,4862,3929,5101,3929,3512,5742,3929,5241,5105,4986,3751,5323,3296,4502,4381,3929,4486,4034,3929,3684,3783,3744,5062,3929,3929,4209,3929,3929,3929,3560,3929,5118,3929,3929,5111,4852,4515,4382,5129,3929,4502,4176,3929,4350,5314,3549,3929,5797,3929,3929,3929,5526,5795,3929,3929,3929,5603,5136,5144,5227,4451,4236,3929,4975,3676,5063,4465,3744,4042,4464,5152,3929,4507,3865,3929,4121,5622,4297,4174,3342,5169,3342,5169,4514,3537,4561,4558,3929,4559,4453,3929,5213,4466,3929,4520,3929,3929,5170,4045,5196,5187,5174,4560,5185,4558,5193,5203,5211,5218,5221,5222,5226,3929,3929,3929,5725,3929,5232,4690,3929,4524,5352,3677,3929,3929,3929,5771,3929,5740,3929,4274,4848,5238,5247,5773,5254,5251,4704,3918,5260,5266,5262,5268,5272,5276,5280,5284,5287,5291,5294,5293,5298,5302,3929,3929,3929,5742,5425,3929,4694,5050,3546,3490,3494,3929,5318,3929,5327,3923,4464,4390,5227,3929,5816,5331,5341,3929,5782,3744,3929,4547,3770,3929,4547,3929,3736,5322,3929,5189,3929,3929,5189,5361,5367,3374,3929,4693,3929,3929,3829,3929,5372,3929,5411,3929,4704,4292,3929,3892,3929,3929,4517,5713,4819,4170,3929,5416,3991,3929,4708,4852,3929,4186,4190,3929,3765,3775,3800,5841,5084,3929,3929,5111,5157,3753,5377,5381,3929,3929,5117,3929,3929,5388,3821,3929,4708,5234,4550,3929,5393,5392,3929,4751,5041,3744,3929,3929,5048,5036,3929,5373,5397,4693,3501,3929,3929,3929,5766,4862,3929,3929,3929,5789,5048,4769,3378,3492,5429,4705,5779,3929,4781,4779,3929,4505,5110,3876,3929,3929,3929,5791,3972,5439,3839,3929,4815,3929,4778,5514,5443,3839,3929,4815,3929,5108,5841,5843,3929,3929,5139,3929,5050,5457,3492,4485,5465,3770,3878,3929,4821,3929,3929,4417,3929,3929,5472,5477,3929,4881,3929,5701,5473,5482,3929,3929,5140,3929,5478,3929,5420,3877,3546,5494,3714,3632,3929,5514,5508,3929,4907,5500,3929,4890,4880,3929,4193,4873,4873,4195,5742,3379,5773,3631,5525,3929,3929,3929,5870,5524,3760,3896,3929,5819,4519,5513,3488,5530,5351,3929,4708,4846,4159,3929,3929,3929,5155,5159,5336,5518,3761,3929,3929,5512,5536,4519,4522,3989,3929,3929,3929,4913,5518,3929,4964,4293,5179,5352,3929,3929,4125,3929,3929,4247,4402,4086,3353,3929,5556,5570,3929,5570,5578,3983,3929,5573,3929,4971,3751,3929,4253,3929,4261,5594,4522,3929,5601,3984,3929,5574,3929,4978,4224,3929,3929,5608,5571,5607,5351,5349,3929,3929,3929,5206,4827,3929,3929,4897,4901,5733,5834,3662,4782,5757,3879,5132,5614,5467,5620,5626,5630,5634,5638,5642,5646,5650,5654,5658,5662,5666,5670,5673,5677,5681,5685,3929,3929,5256,4275,5756,3929,3972,3929,4996,3929,5561,5708,5718,3929,5722,5729,3929,3888,3998,5749,3929,3929,3929,5311,3929,5731,5753,5459,3929,5014,4985,3929,4344,4461,3929,3875,5420,3929,3878,3929,3929,3929,3736,4071,4506,3929,3766,4521,4967,3929,3929,3929,5387,3820,5761,4485,3929,3929,5424,4691,5113,3998,3929,3929,5435,3873,3929,5112,5770,4234,5849,3929,3929,3929,5447,3929,5732,5805,3929,3972,4093,4097,3929,3905,3929,4408,3670,5786,3929,3929,3929,5447,4693,4517,5803,5807,3929,5046,5056,3929,4434,4245,3929,3770,5321,3929,3649,3929,3929,4977,4223,3929,5830,3929,3929,5450,5042,4423,5838,3929,3929,5507,4159,4423,5838,4248,5847,4578,5805,3929,4548,3929,3929,5813,4423,5854,3929,3929,5552,5542,5859,3929,3929,3929,5564,3929,5786,4235,3929,3929,5566,4810,4103,5807,3990,3929,5059,5357,3929,4549,3929,3929,4549,5416,3929,4674,3929,4868,5532,3929,3929,3929,5710,3929,3831,3998,3929,3929,5712,4818,3973,5866,3929,3929,5739,3929,3972,5865,3929,3929,5745,3929,4964,3929,5180,4523,5824,3832,3929,3929,3929,5777,5545,4965,3929,4409,3929,3675,3738,3973,3547,3929,3929,5841,3929,6277,6502,5875,6282,5878,6547,6266,5881,6546,5889,6232,5882,6232,5892,6221,6267,5888,5883,5884,6232,6232,6232,6232,6414,5887,5883,6232,5891,6232,6232,5894,6232,6232,5922,5937,5949,5938,5939,5949,5944,5950,5944,5944,5940,5944,5941,5952,5941,5944,5946,5945,5946,5946,5946,5946,5947,5941,5948,5952,5948,5944,5942,5954,5956,5958,5962,5960,5959,5964,5966,5967,5971,5967,5968,5967,5969,5974,5973,5976,5978,6293,5998,5875,6282,5896,6871,6437,6282,6321,6282,6282,6282,5917,6456,6456,6456,6456,5991,5906,6379,6455,5990,6019,5991,5904,5904,5904,6456,6456,5926,5899,6456,6456,5997,6282,6408,6410,6282,5932,6282,5933,6464,6024,6282,6282,6379,5924,6282,6282,5924,6282,6362,6010,5984,6282,6003,6282,6362,6282,6282,6282,6004,6456,5906,6455,5990,5904,5902,6456,6456,6456,5906,6457,6019,6019,5904,5904,6456,6456,6282,6282,6282,5980,5917,6456,6456,6456,6455,5905,6456,6445,5926,5926,5926,5926,6032,6032,6008,5932,6282,6282,6282,6434,6024,6282,6019,5904,6456,6282,5896,6873,6282,6282,6282,6474,5903,6457,6019,5904,6456,6229,5904,6456,6456,6456,6018,6457,6019,5991,5905,5906,6282,6282,6282,5984,6282,6282,6282,5925,6543,5905,6456,6456,6456,6282,5905,6229,5905,6229,5905,6282,6650,6437,6043,6515,6056,6672,6088,6052,6515,6520,6054,6060,6058,6515,6515,6083,6528,6101,6761,6518,6521,6516,6517,6063,6065,6068,6061,6057,6515,6515,6519,6515,6070,6072,6066,6515,6515,6515,6515,6125,6522,6074,6515,6515,6076,6515,6523,6079,6082,6515,6081,6055,6091,6089,6090,6093,6114,6092,6113,6114,6114,6114,6114,6115,6117,6116,6117,6117,6118,6119,6120,6121,6121,6095,6097,6099,6122,6123,6124,6524,5900,6515,6518,6103,6108,6110,6104,6105,6109,6106,6112,6121,6127,6129,6282,5899,6282,5925,6463,6321,6282,6294,6006,6378,6282,6508,6282,6449,6646,6218,6604,6282,6524,6291,6282,6774,6282,6270,6282,6282,6282,6e3,6e3,6027,6161,6282,6282,5895,6375,6282,6312,6230,6366,6265,5876,6282,6282,6282,6015,6406,6282,6284,6027,6027,6137,6282,6282,6379,6281,6372,6028,6159,6282,5899,6282,6282,6282,6573,6282,6282,6467,6282,6311,6312,6372,6282,6282,6282,6019,6019,5904,5904,5904,5904,5905,6456,6456,6031,6154,6158,6282,6149,6273,6282,6163,6282,6677,6280,6166,6279,6682,6685,6501,6173,6175,6178,6178,6178,6178,6176,6181,6180,6181,6181,6183,6181,6185,6187,6188,6188,6188,6194,6193,6194,6193,6193,6189,6191,6190,6190,6196,6196,6198,6203,6202,6204,6208,6203,6205,6199,6200,6210,6206,6212,6282,6282,5896,6282,6282,6282,6512,6282,6150,6135,6320,6500,6163,6282,6282,6282,6026,6282,6026,6166,6282,6282,6282,6027,6221,6282,6505,6282,6282,6282,6032,6238,6282,6241,6282,5899,6451,6282,5913,6669,6401,6238,6282,6282,6282,6037,6245,6282,6282,6282,6040,6282,6282,6225,6248,6282,6282,5916,6722,6377,6247,6249,6282,6282,5924,6370,6252,6253,6282,6282,5932,6282,6282,6530,5924,6254,6282,6282,6254,6282,6322,6228,6282,5933,6378,6282,6378,6282,6452,6282,6432,6317,6282,5917,6086,6725,6727,6216,6086,6726,6450,6231,5926,5933,6008,6008,6008,6282,6282,6282,5918,6282,6282,6282,5923,6309,6683,6282,6282,6282,6148,6216,6308,6310,6282,6282,6282,6149,6282,5903,6397,6605,6282,6282,5933,5933,5933,6780,6282,6282,6282,6229,6282,6282,6282,5933,5924,6316,5917,6723,6377,5916,6722,6323,6448,6454,6216,6332,6436,6683,6282,5917,6328,6465,6450,6217,6231,6160,6436,6683,6328,6448,6454,6216,6610,6436,6683,6282,6221,6602,6310,6282,5984,5899,5925,6229,6435,6500,6281,6722,6013,6465,6450,6160,6603,6683,6282,6282,6231,6218,6310,6282,5984,6282,6283,6043,5914,6282,5933,6328,6465,6450,6647,6604,6282,6e3,6282,6282,6283,6277,6707,6733,6282,6722,6465,6230,6396,6282,6282,6282,6235,6686,6282,6708,6281,6282,6e3,6437,6362,6338,6279,6282,6282,6283,6444,6145,6683,6282,6282,5933,6003,6282,6282,6282,6006,6375,6465,6708,6282,6005,6282,6282,6287,6289,6282,6548,6282,6282,5933,6282,6282,6282,6137,6282,6282,6020,6282,6375,6282,6282,6282,6281,6471,6218,6683,6282,6282,6282,6370,5984,6282,6010,6795,5984,5899,6282,6282,6661,6282,6e3,6137,6282,6282,6282,6282,5896,5914,6704,6273,5928,6340,6344,6503,6348,6349,6349,6350,6355,6352,6349,6349,6349,6349,6354,6355,6355,6355,6356,6357,6357,6357,6357,6357,6358,6359,6359,6359,6359,6383,6360,6382,6382,6382,6361,6282,6282,6282,6283,6043,5903,5897,6485,6376,6395,6425,6282,6282,6282,6293,6291,6338,6282,6282,6282,6284,6282,6282,6345,6282,6282,6291,6282,6282,6282,6230,5876,6282,6407,6282,6282,6282,6286,6282,6282,6037,6411,6417,6282,6282,5979,5903,6470,6313,6647,6281,6282,6282,6408,6416,6418,6282,6282,5979,6525,6458,6342,6422,6282,6282,6282,6288,6282,6664,6731,6282,6012,6e3,6282,6012,6335,6310,5985,6504,6282,6282,6273,6470,6372,6273,6504,6385,6282,6282,6412,6257,6598,6600,6282,6411,6413,6597,6599,6599,6282,6282,6282,6291,6410,6282,6322,6451,5926,5926,6008,6008,6008,5932,6236,6282,6282,6282,6292,5982,6282,6283,6442,6050,6013,6609,6259,6424,6310,6282,5919,5920,6282,6282,6011,5916,6282,6664,6282,6282,6023,6437,6459,5983,6013,6594,6700,6437,6282,6424,6437,6282,6282,6235,6480,6481,6282,6282,6133,6282,6282,6485,6376,6647,6282,6016,6282,6282,5933,6330,6454,6217,6683,6282,6282,6484,5917,5929,6011,6608,6259,6425,6282,6486,5983,6013,6594,6786,6437,6282,6282,6282,6294,6282,6283,6484,5917,5983,6013,6531,6471,6282,6282,6146,6683,6282,6282,6155,6282,6282,6385,6282,6322,6282,6282,6275,6493,5917,5983,6324,6259,6729,6282,6019,6019,6019,5991,5904,6277,5903,6531,6011,6148,6282,6282,6282,6234,6531,6282,6282,6282,6322,6282,6133,6372,6505,6282,6230,6282,6282,6171,6756,6531,6046,6834,6437,6282,6282,6285,6530,5924,6282,6684,6282,6149,6282,6282,6282,6325,6285,6530,6045,6159,6024,6046,6386,6282,6282,6282,6372,6282,6294,6282,6530,6464,6386,6282,6282,6215,6224,5933,5924,6410,6282,6040,6282,6482,6282,6282,6282,6531,6536,6024,6282,6282,6282,6370,5987,6282,6535,6282,6282,6227,6282,6282,6282,6378,6378,6378,6282,6452,5994,6282,6282,6282,6394,6282,6282,6282,6404,6539,6333,6683,6282,6020,6282,6282,6282,6341,6282,6570,6300,6569,6301,6370,6545,6300,6302,6303,6303,6303,6303,6303,6304,6551,6554,6552,6561,6552,6555,6563,6564,6563,6563,6563,6563,6564,6556,6557,6557,6557,6557,6558,6372,6273,6282,6282,6243,6282,6509,6566,6282,6282,6271,6213,6282,6283,6568,6282,6021,6041,6282,6027,6282,6321,6282,6006,6282,6282,6027,6462,6282,6282,6282,6572,6282,6168,6282,6575,6510,6282,6029,6282,6282,6282,6588,5907,5909,5911,6282,6036,6282,6282,6388,6407,5908,5910,6282,6282,6272,6282,6526,6282,5916,6322,6282,6378,6282,6020,6282,6278,6282,6282,6394,5924,6278,6282,6283,6502,6365,6282,6579,6282,6282,6275,6525,5914,5992,6371,6048,6365,6367,6369,6282,6282,6277,6531,6046,6275,6583,5993,6047,6256,6256,6366,6368,6282,6282,6452,6e3,6282,6282,6282,6408,6282,6027,6282,6372,6526,6282,5899,6539,6664,6682,6282,6282,6282,6146,6282,6482,6282,6006,6451,6282,6282,6282,5985,6458,6342,6313,6136,6152,6282,6037,6378,6282,6282,6282,6421,6584,6020,6437,6683,6282,6027,6321,6282,6451,6646,6152,6282,6282,6282,6410,6282,6282,6282,6375,6282,6e3,6526,6322,6533,6682,6282,6408,6282,6282,6282,6505,6282,6282,6278,6282,6282,6282,6143,6371,6472,6282,6282,6282,6423,6539,6437,6683,6282,6040,6148,6040,6149,6273,6229,6682,6282,6470,6282,6282,6283,6282,6282,6282,6524,6548,5933,6282,5933,6282,6434,6410,6282,6282,6434,6537,6282,6664,6491,6866,5876,6482,6491,6282,6282,6283,6410,6282,6427,6282,6282,5980,6011,6276,6037,6285,6038,6590,6783,6607,6612,6620,6619,6620,6620,6616,6620,6620,6618,6622,6620,6614,6613,6624,6627,6626,6627,6627,6628,6630,6630,6634,6630,6632,6631,6630,6630,6630,6636,6638,6638,6637,6637,6640,6641,6282,6132,6282,6282,5895,5924,5984,6282,6640,6637,6640,6640,6640,6640,6505,5903,6644,6331,6649,6282,6282,6229,5879,6282,6527,6653,6148,6282,6137,5924,6282,6282,6282,6230,6281,6282,6282,6306,6402,6433,6346,6656,6658,6549,6282,6282,6283,6475,6423,6282,6282,6282,6437,6682,5912,6668,6400,6282,6157,6282,6282,5896,6451,5980,5917,6029,6221,6281,6282,6282,6524,6282,6282,6282,5930,6664,6282,6264,6683,6694,6282,6282,6282,6452,6282,6282,6282,6285,5897,6453,6654,6282,6346,6295,6282,6282,6283,6582,6297,6282,6681,6282,6164,6024,6282,6133,6451,6282,5988,6281,6285,5980,6458,6371,6263,6647,6281,6282,6676,6282,6676,6514,5903,6680,6465,6489,5995,6282,6282,6283,6496,6085,6282,6513,6525,6679,6688,6688,6399,6713,6281,6282,6286,6282,6037,6282,6282,6282,5899,6691,6497,6724,6488,6734,6282,6282,6282,6498,6282,6282,6282,6255,6282,6283,6691,6696,6724,6488,6698,6331,6222,6282,6282,6282,6431,6296,6282,6282,6282,6499,6282,6282,5903,6464,6231,6734,6696,6134,6733,6281,6693,6282,6282,6434,6282,6282,6282,6277,6525,6531,6471,6218,6231,6490,6282,6282,6282,6504,6548,6282,6283,6278,6282,6275,6710,6733,6282,6169,6282,6282,6509,6003,6712,6282,6282,6282,6508,5899,6702,6490,6282,6282,6283,6861,6854,6033,6858,6646,6218,6604,6282,6282,6282,6577,6286,6282,6394,6282,6229,6019,6019,6019,6019,5904,6286,6282,6137,6282,6229,6282,6292,6229,6282,6282,6372,6505,6282,6437,6683,6282,6229,6146,6265,6282,6283,6525,5927,6539,6729,6683,6282,6282,6650,6282,6282,6283,6863,6364,6024,6282,6282,6283,6869,6282,6362,6282,6362,6363,6010,6592,5925,6719,6591,6593,6718,6721,5934,5934,5935,6469,6736,5934,5934,5934,6736,6738,6742,6740,6739,6744,6746,6751,6751,6752,6753,6747,6748,6748,6748,6749,6751,6751,6751,6753,6753,6753,6753,6758,6754,6755,6282,6282,6285,6282,6282,6282,6014,6760,5981,6007,6728,6282,6763,6282,6282,6285,6496,6531,6282,6283,6768,6770,6282,6282,6282,6539,6392,6282,6282,6392,6027,6156,6282,6282,6293,6586,6282,6373,6281,6285,6507,5903,6470,6326,6505,6659,6282,6234,6229,5879,6283,6496,6703,6776,6704,6777,6282,6282,6282,6548,6282,5918,6025,6282,6282,6026,6282,6286,6505,6394,6282,6291,6370,6282,6370,6282,6496,6085,6831,6147,6603,6683,6282,6380,6282,6282,6370,6282,6282,6282,6003,6282,6294,6336,6e3,6282,6239,6846,6282,6260,6282,6282,6282,6642,6379,6282,6505,6336,6283,6702,6782,6319,6218,6604,6282,6785,5999,6282,6269,6663,6282,6140,6282,6282,6393,6282,5982,6724,6319,6218,6604,6539,6310,6282,6282,6375,6370,6375,6788,6320,6310,6e3,6e3,6282,6282,6375,6548,6282,6282,6282,6275,6084,6447,6282,6788,6429,6683,6282,6282,6664,6683,6282,6273,6541,6148,6282,6394,6e3,6282,6274,6282,6003,6318,6429,6683,6282,6275,5898,5915,6282,6282,6370,6370,6370,6664,6282,6683,6282,6410,6282,6699,6282,6275,5901,5982,6724,6291,6282,6282,6531,6689,6282,6282,6220,6282,6537,6282,6282,6282,6664,6146,6282,6282,6434,6281,6282,6282,6282,6020,6282,6006,6410,6408,6282,6027,6282,6282,6250,6843,6434,6410,6282,6434,6410,6282,6408,6282,6322,6282,6410,6410,6027,6282,6275,6702,6231,6490,6146,6282,6146,6282,6282,6282,6671,6146,6410,6408,6408,6409,6409,6409,6409,6409,6282,6282,6282,6682,6282,6282,6285,6039,6216,6221,6281,6286,6282,6282,6790,6543,6282,6505,6003,6282,6559,6282,6282,6559,6508,6792,6282,6077,6139,6282,6282,6379,6374,6793,6806,6798,6798,6801,6799,6798,6799,6798,6797,6803,6808,6807,6808,6805,6808,6809,6810,6813,6814,6815,6816,6815,6818,6811,6813,6811,6813,6820,6822,6822,6821,6821,6824,6824,6824,6824,6821,6824,6824,6828,6825,6826,6282,6282,6282,6683,6282,6282,6689,6439,6282,6277,6715,6282,6282,6282,6510,6035,6282,6282,6282,6684,6282,6282,6282,6233,6282,6716,6282,6580,6419,6282,6836,6282,6281,6282,6282,6283,6293,6337,6282,6838,6840,6282,6282,6666,6282,6143,6292,6282,6282,6292,6282,6282,6282,6378,6845,6282,6282,6845,6282,6487,6282,6282,6391,6391,6651,6282,6282,6282,6730,6512,6282,6282,6282,6830,6853,5931,6141,6428,6602,6604,6282,6282,6409,6410,6282,6852,6854,6856,6450,6002,6282,6001,6003,6282,6645,6231,6281,6282,6282,6674,6282,6167,6282,6282,6e3,6282,6e3,6034,6282,6282,6282,6848,6282,6394,6683,6282,6282,5933,6003,5933,6003,6282,6830,6645,6231,6222,6487,6282,6024,6282,6282,6693,6282,6282,6282,6464,6861,6854,6009,6377,6525,5931,6011,6465,6282,6830,5885,6282,6282,6702,5931,6319,6436,6683,5916,6282,6282,5925,6282,6282,6448,6282,6282,6931,6282,6282,6451,6282,6282,6282,6860,6044,6011,6465,6449,6647,6310,6282,6282,6142,6436,6683,6282,6282,6732,5924,5984,6861,5983,6377,6454,5982,6321,6282,6294,6138,6282,6461,6151,6437,6282,6282,6732,6772,6860,5983,6465,6151,6437,6282,6865,6282,6282,6282,6860,6337,6437,6282,6282,6466,6282,6144,6436,6282,6282,6282,6868,6219,6282,6282,6282,6468,6282,6282,6732,6282,5916,6262,6299,6282,5918,5918,5918,6378,6282,6282,6526,6282,6148,6282,6283,6293,6586,6292,6502,6437,6282,6282,6282,6294,6282,6292,6294,6282,6282,6474,5980,6293,6291,6282,6282,6292,6502,6282,6278,6294,6282,6278,6282,6282,6765,6282,6229,6362,6282,6230,6320,6500,6282,6505,6282,6292,6502,6282,6505,6233,6282,6282,6293,6282,6282,6282,6474,6478,6291,6278,6282,6282,6292,6531,6536,6875,6255,6282,6282,6476,6282,6006,6255,6282,6006,6390,6282,6314,6049,6282,6877,6878,6881,6375,6880,5930,6282,6532,6542,6883,6596,6258,6885,6596,6595,6595,6886,6889,6595,6888,6890,6889,6892,6897,6893,6894,6895,6899,6900,6905,6905,6901,6902,6912,6903,6902,6906,6905,6906,6905,6906,6907,6909,6908,6910,6914,6908,6908,6922,6922,6921,6922,6923,6916,6917,6918,6920,6926,6925,6928,6460,6371,6282,6282,6482,5932,6321,6285,6282,6282,6494,6371,6930,6282,6282,6282,6505,6494,6371,6130,6282,6282,6282,6505,6506,6282,6282,6282,6312,6933,6282,6505,6935,6282,6282,6937,6282,6282,6767,6769,6290,6282,6282,6282,6505,6692,6011,6313,6291,6233,6282,6282,6508,6282,6282,6282,5916,6030,6282,6423,6170,6282,6282,6170,6011,6372,6282,5916,6282,6282,5915,6451,6440,6282,6282,5918,6322,6283,6939,6446,6705,6447,6291,6282,6282,6294,6282,6282,6282,6438,6282,6282,6511,6282,6282,6282,6842,6149,6282,6149,6282,6282,6779,6007,6728,6310,6282,6282,6319,6310,6282,6282,6363,6282,6692,6011,6372,5916,6282,5915,6282,6282,6511,6268,6286,6282,5924,6282,6282,6833,6282,6279,6398,6282,6282,6014,6282,6282,6282,6601,6282,6439,5933,6133,6282,6148,6282,6255,6282,5914,5931,6705,6282,6282,6850,6282,6850,6282,6372,6282,6372,6282,6149,6282,6505,5914,5931,6291,6282,6282,5982,6585,6282,6282,6660,6291,6043,5914,6291,6282,6282,6283,6043,5899,6282,6282,1048576,1073741824,2147483648,1075838976,2097152,2147483648,4194560,4196352,-2143289344,-2143289344,4194304,2147483648,37748736,541065216,541065216,-2143289344,4198144,4196352,276901888,8540160,4194304,1,4,16,64,0,48,64,32,64,64,96,0,59,140224,5505024,-1887436800,0,63,64,128,0,64,256,0,110,110,8425488,4194304,1024,0,128,128,512,512,1024,1024,2048,0,256,256,257,37748736,742391808,742391808,775946240,-1371537408,775946240,4718592,775946240,775946240,171966464,171966464,775946240,239075328,-1405091840,-1371537408,239075328,171966464,64,4718592,2097216,4720640,541589504,4194368,4194368,541065280,541589504,4194400,-2143289280,4194368,-2143285440,-2143285408,-2143285408,-2109730976,775946336,776470528,-2143285408,776470528,775946304,775946304,-1908404384,775946304,-1908404384,2,8,32,128,1024,4096,0,260,8392704,0,1856,64,524288,64,896,8192,67108864,2147483648,96,262144,262144,8192,0,288,8388608,0,384,0,512,2048,2048,4096,4096,8192,8192,16384,0,520,520,96,524288,524288,0,2432,2048,268435456,0,24576,0,32768,32768,65536,1048576,128,2048,12288,0,12289,0,16384,16384,32768,0,1864,2,16,1024,98304,131072,262144,1048576,512,5120,2,536936448,80,528,528,2097168,2097168,268435472,524304,1048592,2097168,24,560,48,2097680,1048592,3145744,1048592,20,560,48,3146256,2097552,3146256,28,16,8192,2,2098064,163577856,17,21,112,128,3584,8192,2228784,-161430188,-161430188,-161429680,-161430188,-161429676,-161430188,-161298576,-160299088,-161298576,-161298572,-160774288,-160299084,146804757,146812949,146862101,146863389,146863389,148960541,-161429740,-161429676,146863421,148960541,146863389,-161429676,-160905388,-161429676,-161429676,-161429675,-161349072,-161349072,-161347728,-161347728,-161298572,-161298572,-160774284,-161298572,16,262160,-18860267,-160774284,-18729163,0,58368,159383552,0,65536,2097152,8388608,33554432,0,66048,0,77824,524288,33554432,1024,262144,2097152,16777216,67108864,0,131072,524288,134217728,2147483648,1,32768,196608,0,131328,131072,16777216,100663296,-1073741824,164096,0,131584,2621440,0,139264,0,150528,0,235712,16777216,1073774592,1226014816,100665360,-2046818288,100665360,100665360,-2044196848,1091799136,1091799136,1091803360,1091799136,1158908e3,1158908001,1192462432,1192462448,1192462448,1870638912,1870655296,1870638912,1200851056,1200851056,1091799393,1870655296,1870655296,1870655312,1870655316,1870655312,1870655312,1870638928,1870655316,1870655316,1870655317,1870655316,1879043952,1870655348,1870655316,1879027568,1879043952,1879043956,0,284672,229440,1048576,2097152,67108864,134217728,8,4194304,16777216,2147483648,1224736768,0,503616,2048,100663296,0,524288,2097152,4194304,4194304,0,40,0,44,-2046820352,0,605503,231488,1090519040,1157627904,1191182336,9437184,231744,52e4,7864320,1862270976,0,867391,1862270976,1862270976,16252928,0,1048576,4194304,25165824,25165824,33554432,8192,98304,1048576,8388608,134217728,268435456,4194432,3145728,0,24,0,29,0,32,1,2,2,4,0,2147483648,2147483648,0,0,1,0,2,0,3,240,19456,262144,0,4,8,0,6,0,7,150994944,0,1049088,1049088,12845065,12845065,147193865,128,6144,4194304,251658240,536870912,1073741824,32768,131072,1048576,4096,83886080,117440512,0,3145728,16777216,134217728,0,2048,8192,229376,0,2304,1536,8192,1536,65536,4194304,67108864,536870912,9216,33554432,262144,134217728,1073741824,50331649,9476,512,8192,134218240,1050624,0,5242880,1275208192,4194312,4194312,4194344,4194312,541065224,4203820,-869654016,-869654016,1279402504,1279402504,2143549415,2143549415,2143549423,0,8388608,4096,4194304,8388608,16777216,33554432,-1946157056,0,8192,131072,0,1792,0,1024,8192,65536,0,1536,2147483648,2143549423,2143549423,2143549415,1,16777216,268435456,512,139264,2760704,-872415232,0,19947520,0,33554432,67108864,1073741824,1073741824,262144,7340032,-2030043136,0,331776,300,4203520,4333568,1275068416,0,16777216,16777216,0,999,259072,4194304,4194432,999,29619200,2113929216,0,58720256,1007,1007,0,67108864,402653184,536870912,2048,1048576,16777216,536870912,300,0,83886080,0,2097152,134217728,536870912,0,49152,0,57344,102,384,6,96,128,3072,16384,65536,524288,1048576,0,4096,262144,524288,96,96,64,384,512,4096,65536,131072,1024,65536,262144,131072,32768,256,384,8192,33554432,2147483648,1,6,8,8388608,96,384,104,104,0,134217728,6,32,256,512,65536,7340032,50331648,0,8396800,4,32,384,4,64,1024,2097152,268435456,1073741824,8,262144,512,0,8,8,16,0,9,0,12,0,15,16,16,17,20,16,20,48,16,28,0,16,32,0,21,53,4,256,1024,524288,536870912,256,65536,16777216,1073741824,2048,524288,32,4100,1024,134217728,1049088,270532608,2097152,2097152,0,23,5505537,5587457,5591557,147202057,5587457,13894153,-1881791493,-1881791493,0,134218752,5587465,5587457,13894153,13894153,81003049,4456448,8388608,5505024,0,134348800,134348800,82432,0,142606336,5,86528,41,75497472,81920,0,184549376,2,56,64,2048,262144,536870912,2048,134217728,-2113929216,16777216,1073743872,268435968,229376,25165824,92274688,25165824,100663296,402653184,1610612736,0,100663296,134217728,805306368,1073741824,8388608,268567040,16384,229376,4194304,117440512,2113544,68423701,-2079059883,-2079059947,85200917,68423701,68423765,68489237,68423701,68423701,72618005,68423701,68425749,68423703,85200919,69488664,69488664,70537244,70537245,70537245,-2076946339,-2076946403,70537245,70537309,70539293,-2022351745,-2022351617,-2022351745,-2022351617,-2022351617,0,243269632,256,32768,1048576,33554432,134217728,-2113929216,0,268435456,49152,266240,1048576,67108864,-2080374784,-2080374784,268288,0,301989888,0,318767104,282624,0,536870912,28,3145728,192,351232,7340032,5,16,1049104,12,3145728,13,0,1073741825,192,3072,20480,0,1073741824,0,262144,2621440,-1073741824,20480,65536,268435456,14,32,512,131072,268435456,192,1024,64,32768,33554432,268435456,4,128,3840,16384,262144,128,2097152,1073741824,4,2097152,4,50331648,67108864,128,50331648,1073741824,128,268435968,268435968,268436032,256,1536,2048,16384,98304,393216,524288,268435456,536870912,9216,0,4194304,50331648,2147483648,256,536871168,-1879046336,-1879046334,-1879046326,-1879046334,1073744256,-1879046334,-1879046326,-1845491902,-1878784182,268444480,268436288,268436288,268436289,268444480,268444480,2100318149,2100318149,2100326341,0,1090519040,2100326341,2100326341,1,16,536936448,576,0,832,8192,1,4036,19939328,2080374784,0,1,1024,768,8192,16384,19922944,2080374784,1,128,4096,3584,16384,524288,8,33554432,402653184,2048,3145728,128,131072,268500992,4243456,4096,1048588,0,1258292224,1124073472,1124073472,1124073488,1124073474,1124073472,1392574464,1124073472,1073754113,12289,1124073472,12289,12289,1098920193,1132474625,1098920209,1132474625,1132474625,1124085761,1124085761,1124085777,1258304513,1124085761,1400975617,2132360255,2132622399,2132360255,2132622399,2132622399,2141011263,0,2140749119,2141011263,2,16384,3145728,12545,25165824,268435456,12305,13313,12561,0,78081,327155712,605247,1058013184,1073741824,867647,1066401792,0,1,12288,256,8388608,1,30,32,1024,2048,339968,327680,524288,1,14,16,14,1024,16384,4194304,134217728,1,12,1024,8,134217728,8,536870912,9437184,0,68157440,137363456,0,137363456,66,66,100680704,25165824,26214400,92274688,25165952,93323264,92274688,92274688,92274720,93323264,25165890,100721928,100721928,100787464,100721664,100721664,100853e3,100721928,125977600,125846528,125846528,125846560,125977600,125977600,127026176,281843,281843,1330419,281843,126895104,125846528,1330419,1330419,72633587,5524723,72633587,92556531,93605107,93605107,5524723,5524723,39079155,97799411,127290611,127290611,131484915,0,17408,33554432,1073741824,58624,0,124160,189696,148480,50331648,2,112],r.TOKEN=["(0)","PragmaContents","DirCommentContents","DirPIContents","CDataSection","Wildcard","EQName","URILiteral","IntegerLiteral","DecimalLiteral","DoubleLiteral","StringLiteral","PredefinedEntityRef","'\"\"'","EscapeApos","ElementContentChar","QuotAttrContentChar","AposAttrContentChar","PITarget","NCName","QName","S","S","CharRef","CommentContents","EOF","'!'","'!='","'\"'","'#'","'#)'","'$'","'%'","''''","'('","'(#'","'(:'","')'","'*'","'*'","'+'","','","'-'","'-->'","'.'","'..'","'/'","'//'","'/>'","':'","':)'","'::'","':='","';'","'<'","'<!--'","'</'","'<<'","'<='","'<?'","'='","'>'","'>='","'>>'","'?'","'?>'","'@'","'NaN'","'['","']'","'after'","'all'","'allowing'","'ancestor'","'ancestor-or-self'","'and'","'any'","'append'","'array'","'as'","'ascending'","'at'","'attribute'","'base-uri'","'before'","'boundary-space'","'break'","'by'","'case'","'cast'","'castable'","'catch'","'check'","'child'","'collation'","'collection'","'comment'","'constraint'","'construction'","'contains'","'content'","'context'","'continue'","'copy'","'copy-namespaces'","'count'","'decimal-format'","'decimal-separator'","'declare'","'default'","'delete'","'descendant'","'descendant-or-self'","'descending'","'diacritics'","'different'","'digit'","'distance'","'div'","'document'","'document-node'","'element'","'else'","'empty'","'empty-sequence'","'encoding'","'end'","'entire'","'eq'","'every'","'exactly'","'except'","'exit'","'external'","'first'","'following'","'following-sibling'","'for'","'foreach'","'foreign'","'from'","'ft-option'","'ftand'","'ftnot'","'ftor'","'function'","'ge'","'greatest'","'group'","'grouping-separator'","'gt'","'idiv'","'if'","'import'","'in'","'index'","'infinity'","'inherit'","'insensitive'","'insert'","'instance'","'integrity'","'intersect'","'into'","'is'","'item'","'json'","'json-item'","'key'","'language'","'last'","'lax'","'le'","'least'","'let'","'levels'","'loop'","'lowercase'","'lt'","'minus-sign'","'mod'","'modify'","'module'","'most'","'namespace'","'namespace-node'","'ne'","'next'","'no'","'no-inherit'","'no-preserve'","'node'","'nodes'","'not'","'object'","'occurs'","'of'","'on'","'only'","'option'","'or'","'order'","'ordered'","'ordering'","'paragraph'","'paragraphs'","'parent'","'pattern-separator'","'per-mille'","'percent'","'phrase'","'position'","'preceding'","'preceding-sibling'","'preserve'","'previous'","'processing-instruction'","'relationship'","'rename'","'replace'","'return'","'returning'","'revalidation'","'same'","'satisfies'","'schema'","'schema-attribute'","'schema-element'","'score'","'self'","'sensitive'","'sentence'","'sentences'","'skip'","'sliding'","'some'","'stable'","'start'","'stemming'","'stop'","'strict'","'strip'","'structured-item'","'switch'","'text'","'then'","'thesaurus'","'times'","'to'","'treat'","'try'","'tumbling'","'type'","'typeswitch'","'union'","'unique'","'unordered'","'updating'","'uppercase'","'using'","'validate'","'value'","'variable'","'version'","'weight'","'when'","'where'","'while'","'wildcards'","'window'","'with'","'without'","'word'","'words'","'xquery'","'zero-digit'","'{'","'{{'","'{|'","'|'","'||'","'|}'","'}'","'}}'"]},{}],10:[function(e,t,n){n.TreeOps={flatten:function(e){var t=this,n="";if(!e)throw new Error("Invalid node found");return e.value===undefined?e.children.forEach(function(e){n+=t.flatten(e)}):n+=e.value,n},concat:function(e,t,n){var r=n?{}:e;n&&Object.keys(e).forEach(function(t){r[t]=e[t]});var i=Object.keys(t);return i.forEach(function(e){r[e]=t[e]}),r},removeParentPtr:function(e){e.getParent!==undefined&&delete e.getParent;for(var t in e.children){var n=e.children[t];this.removeParentPtr(n)}},inRange:function(e,t,n){if(e&&e.sl<=t.line&&t.line<=e.el){if(e.sl<t.line&&t.line<e.el)return!0;if(e.sl===t.line&&t.line<e.el)return e.sc<=t.col;if(e.sl===t.line&&e.el===t.line)return e.sc<=t.col&&t.col<=e.ec+(n?1:0);if(e.sl<t.line&&e.el===t.line)return t.col<=e.ec+(n?1:0)}},findNode:function(e,t){if(!e)return;var n=e.pos;if(this.inRange(n,t)===!0){for(var r in e.children){var i=e.children[r],s=this.findNode(i,t);if(s!==undefined)return s}return e}return},astAsXML:function(e,t){var n="";t=t?t:"",e.value&&(n+=t+"<"+e.name+">"+e.value+"</"+e.name+">\n"),n+=t+"<"+e.name+">\n";var r=this;return e.children.forEach(function(e){n+=r.astAsXML(e,t+"    ")}),n+=t+"</"+e.name+">\n",n}}},{}],11:[function(e,t,n){var r=n.createStaticContext=function(){var t=e("./compiler/static_context").StaticContext;return new t};n.XQLint=function(t,n){n=n?n:{};var i=e("./parsers/JSONiqParser").JSONiqParser,s=e("./parsers/XQueryParser").XQueryParser,o=e("./parsers/JSONParseTreeHandler").JSONParseTreeHandler,u=e("./compiler/translator").Translator,a=e("./formatter/style_checker").StyleChecker,f=e("../lib/completion/completer"),l=function(e,t){return e?(Object.keys(t).forEach(function(n){e[n]===undefined&&(e[n]=t[n])}),e):t};n=l(n,{styleCheck:!1});var c;this.getAST=function(){return c};var h=[];this.getMarkers=function(){return h},this.getErrors=function(){var e=[];return h.forEach(function(t){t.type==="error"&&e.push(t)}),e},this.getWarnings=function(){var e=[];return h.forEach(function(t){t.type==="warning"&&e.push(t)}),e},this.getCompletions=function(e){return f.complete(t,c,v,e)};var p=!1;this.hasSyntaxError=function(){return p};var d=function(e,t,n){var r=e.substring(0,t),i=e.substring(0,n),s=r.split("\n").length,o=t-r.lastIndexOf("\n"),u=i.split("\n").length,a=n-i.lastIndexOf("\n"),f={sl:s-1,sc:o-1,el:u-1,ec:a-1};return f},v=n.staticContext?n.staticContext:r(),m=n.fileName?n.fileName:"",g=m.substring(m.length-".jq".length).indexOf(".jq")!==-1&&t.indexOf("xquery version")!==0||t.indexOf("jsoniq version")===0,y=new o(t),b=g?new i(t,y):new s(t,y);try{b.parse_XQuery()}catch(w){if(!(w instanceof b.ParseException))throw w;p=!0,y.closeParseTree();var E=d(t,w.getBegin(),w.getEnd()),S=b.getErrorMessage(w);E.sc===E.ec&&E.ec++,h.push({pos:E,type:"error",level:"error",message:S})}c=y.getParseTree(),n.styleCheck&&(h=h.concat((new a(c,t)).getMarkers()));var x=new u(v,c);h=h.concat(x.getMarkers())}},{"../lib/completion/completer":5,"./compiler/static_context":3,"./compiler/translator":4,"./formatter/style_checker":6,"./parsers/JSONParseTreeHandler":7,"./parsers/JSONiqParser":8,"./parsers/XQueryParser":9}]},{},[11])(11)}),ace.define("ace/mode/xquery/modules",["require","exports","module"],function(e,t,n){t.Modules={"http://xbrl.io/modules/bizql/components":{ns:"http://xbrl.io/modules/bizql/components",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This module provides functionality for retrieving components.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Components help organizing the facts contained in archives\n in smaller parts that "make sense" together. A component is identified\n with a CID (component ID).</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">A component is made of networks (see the networks module) and hypercubes\n (see the hypercubes module).</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">With this module, you can retrieve all components, all components belonging\n to one or several archives. You can retrieve the CID of a component or retrieve\n the components associated with a couple of CIDs.</p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Charles Hoffman</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Matthias Brantner</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Dennis Knochenwefel</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Ghislain Fourny</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://xbrl.io/modules/bizql/archives",prefix:"archives"},{uri:"http://xbrl.io/modules/bizql/components",prefix:"components"},{uri:"http://www.28msec.com/modules/credentials",prefix:"credentials"},{uri:"http://xbrl.io/modules/bizql/facts",prefix:"facts"},{uri:"http://www.28msec.com/modules/mongodb",prefix:"mongo"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"cid",qname:"components:cid",signature:"($component-or-id as item()) as atomic",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Converts the input to a normalized component id (CID). The input\n can be either an CID, or an component object which contains an _id.</p>\n',summary:"<p>  Converts the input to a normalized component id (CID).</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"component-or-id",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> an component object or an CID.</div>'}],returns:{type:"atomic",description:"the normalized CID."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">components:INVALID_PARAMETER if the CID or component is not valid.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"components-for-archives",qname:"components:components-for-archives",signature:"($archive-or-ids as item()*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves all components that belong to the supplied archives.</p>\n',summary:"<p>  Retrieves all components that belong to the supplied archives.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"archive-or-ids",type:"item()",occurrence:"*",description:""}],returns:{type:"object()*",description:"all components in the archive with this AID."},errors:[]},{isDocumented:!0,arity:0,name:"components",qname:"components:components",signature:"() as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves all components.</p>\n',summary:"<p>  Retrieves all components.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"object()*",description:"all components."},errors:[]},{isDocumented:!0,arity:1,name:"components",qname:"components:components",signature:"($component-or-ids as item()*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves the components with the given CIDs.</p>\n',summary:"<p>  Retrieves the components with the given CIDs.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"component-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the CIDs or the components themselves.</div>'}],returns:{type:"object()*",description:"the components whose _id field matches one of these CIDs."},errors:[]},{isDocumented:!0,arity:1,name:"num-abstract-primary-items-in-hypercubes",qname:"components:num-abstract-primary-items-in-hypercubes",signature:"($components-or-ids) as integer*",description:" Return the number of (distinct) abstract primary items being\n in a hypercube for each of the given components.\n",summary:"<p> Return the number of (distinct) abstract primary items being\n in a hypercube for each of the given components.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"components-or-ids",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> list of archives or IDs</div>'}],returns:{type:"integer*",description:"the said number of primary items"},errors:[]},{isDocumented:!0,arity:1,name:"num-concrete-primary-items-in-hypercubes",qname:"components:num-concrete-primary-items-in-hypercubes",signature:"($components-or-ids) as integer*",description:" Return the number of (distinct) concrete primary items being\n in a hypercube for each of the given components.\n",summary:"<p> Return the number of (distinct) concrete primary items being\n in a hypercube for each of the given components.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"components-or-ids",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> list of archives or IDs</div>'}],returns:{type:"integer*",description:"the said number of primary items"},errors:[]},{isDocumented:!0,arity:1,name:"num-concrete-primary-items-not-in-hypercubes",qname:"components:num-concrete-primary-items-not-in-hypercubes",signature:"($components-or-ids) as integer*",description:" Return the number of (distinct) concrete primary items not being\n in a hypercube for each of the given components.\n",summary:"<p> Return the number of (distinct) concrete primary items not being\n in a hypercube for each of the given components.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"components-or-ids",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> list of archives or IDs</div>'}],returns:{type:"integer*",description:"the said number of primary items"},errors:[]},{isDocumented:!0,arity:1,name:"num-distinct-abstract-primary-items-not-in-hypercubes",qname:"components:num-distinct-abstract-primary-items-not-in-hypercubes",signature:"($components-or-ids) as integer*",description:" Return the number of (distinct) abstract primary items not being\n in a hypercube for each of the given components.\n",summary:"<p> Return the number of (distinct) abstract primary items not being\n in a hypercube for each of the given components.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"components-or-ids",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> list of archives or IDs</div>'}],returns:{type:"integer*",description:"the said number of primary items"},errors:[]},{isDocumented:!0,arity:1,name:"num-domains",qname:"components:num-domains",signature:"($components-or-ids) as integer*",description:" Return the number of (distinct) domains in each of the given components.\n",summary:"<p> Return the number of (distinct) domains in each of the given components.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"components-or-ids",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> list of archives or IDs</div>'}],returns:{type:"integer*",description:"the said number of domains"},errors:[]},{isDocumented:!0,arity:1,name:"num-explicit-dimensions",qname:"components:num-explicit-dimensions",signature:"($components-or-ids) as integer*",description:" Return the number of (distinct) explicit dimensions in each of the given components.\n",summary:"<p> Return the number of (distinct) explicit dimensions in each of the given components.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"components-or-ids",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> list of archives or IDs</div>'}],returns:{type:"integer*",description:"the said number of dimensions"},errors:[]},{isDocumented:!0,arity:1,name:"num-hypercubes",qname:"components:num-hypercubes",signature:"($components-or-ids as item()*) as integer*",description:" Return the number of hypercubes in each of the given components.\n",summary:"<p> Return the number of hypercubes in each of the given components.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"components-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> list of archives or IDs</div>'}],returns:{type:"integer*",description:"the said number of hypercubes"},errors:[]},{isDocumented:!0,arity:1,name:"num-members",qname:"components:num-members",signature:"($components-or-ids) as integer*",description:" Return the number of (distinct) members in each of the given components.\n",summary:"<p> Return the number of (distinct) members in each of the given components.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"components-or-ids",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> list of archives or IDs</div>'}],returns:{type:"integer*",description:"the said number of members"},errors:[]},{isDocumented:!0,arity:1,name:"num-networks",qname:"components:num-networks",signature:"($components-or-ids) as integer*",description:" Return the number of networks in each of the given components.\n",summary:"<p> Return the number of networks in each of the given components.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"components-or-ids",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> list of archives or IDs</div>'}],returns:{type:"integer*",description:"the said number of networks"},errors:[]}],variables:[{name:"components:col",type:"xs:string",description:" Name of the collection the components are stored in.\n"},{name:"components:ARCHIVE",type:"xs:string",description:" Name of the field pointing to the archive.\n"}]},"http://jsound.io/modules/validate":{ns:"http://jsound.io/modules/validate",description:" JSound simple validator.\n This is a JSONiq implemenation of the JSound (the schema for JSON) validator.\n",sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Cezar Andrei</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://zorba.io/modules/fetch",prefix:"fetch"},{uri:"http://jsoniq.org/functions",prefix:"jn"},{uri:"http://jsound.io/modules/validate",prefix:"jsv"},{uri:"http://jsound.io/modules/validate/map",prefix:"map"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:3,name:"jsd-valid",qname:"jsv:jsd-valid",signature:"($ns as string, $name as string, $instance as json-item()) as boolean",description:" Validates the $instance JSON item against the JSound type with name $name\n and namespace $ns, from the JSound schema definition $jsd.\n",summary:"<p> Validates the $instance JSON item against the JSound type with name $name\n and namespace $ns, from the JSound schema definition $jsd.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"ns",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the namespace of the expected type</div>'},{name:"name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the expected type</div>'},{name:"instance",type:"json-item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the instance to be validated</div>'}],returns:{type:"boolean",description:"true if the instance is valid, otherwise throws an error."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">jsv:BadJSoundFormat If the schema is not a valid JSound schema</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">jsv:Invalid If the instance does not conform to the JSound schema</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZXQP0025 If the schema namespace URI cannot be resolved.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">jn:JNDY0021 If the loaded schema is syntactically incorrect</xqdoc:error>']},{isDocumented:!0,arity:4,name:"jsd-valid",qname:"jsv:jsd-valid",signature:"($jsd as object(), $name as string, $ns as string, $instance as item()) as boolean",description:" Validates the $instance JSON item against the JSound type with name $name\n and namespace $ns, from the JSound schema definition $jsd.\n",summary:"<p> Validates the $instance JSON item against the JSound type with name $name\n and namespace $ns, from the JSound schema definition $jsd.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"jsd",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the JSound schema as a JSON object to be validated against</div>'},{name:"name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the expected type</div>'},{name:"ns",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the namespace of the expected type</div>'},{name:"instance",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the instance to be validated</div>'}],returns:{type:"boolean",description:"true if the instance is valid, otherwise throws an error."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">jsv:BadJSoundFormat If the schema is not a valid JSound schema</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">jsv:Invalid If the instance does not conform to the JSound schema</xqdoc:error>']}],variables:[]},"http://xbrl.io/modules/bizql/archives":{ns:"http://xbrl.io/modules/bizql/archives",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This module provides functions for retrieving metadata about archives.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Archives represent the granularity of "report shipping", i.e., an entity\n reports one archive at a time. An archive is identified with an AID (archive ID).</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Archives are made of reported facts (see facts module),\n which are structured and organized in components (see components module).</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">With this module, you can retrieve all archives, or a certain number of archives\n with their AIDs, or obtain the AID of archives you already have. You can also retrieve\n all archives submitted by one or several entities.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Archive information is stored in a MongoDB datasource called <b>xbrl</b>.</p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Charles Hoffman</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Matthias Brantner</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Dennis Knochenwefel</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Ghislain Fourny</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://xbrl.io/modules/bizql/archives",prefix:"archives"},{uri:"http://www.28msec.com/modules/credentials",prefix:"credentials"},{uri:"http://xbrl.io/modules/bizql/entities",prefix:"entities"},{uri:"http://www.w3.org/2005/xqt-errors",prefix:"err"},{uri:"http://www.28msec.com/modules/mongodb",prefix:"mongo"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"aid",qname:"archives:aid",signature:"($archives-or-ids as item()*) as atomic*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Converts the input to a normalized archive identifier (AID). The input\n can be either a pure AID, or an archive object which contains an AID.</p>\n',summary:"<p>  Converts the input to a normalized archive identifier (AID).</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"archives-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of archive objects or identifiers (AID).</div>'}],returns:{type:"atomic*",description:"the normalized AIDs."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">archives:INVALID_PARAMETER if the AID or archive is not valid</xqdoc:error>']},{isDocumented:!0,arity:1,name:"archives-for-entities",qname:"archives:archives-for-entities",signature:"($entities-or-ids as item()*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Return all archives created by the supplied entities.</p>\n',summary:"<p>  Return all archives created by the supplied entities.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"entities-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> arbitrary number of entity objects or EIDs.</div>'}],returns:{type:"object()*",description:"all archives created by these entities."},errors:[]},{isDocumented:!0,arity:0,name:"archives",qname:"archives:archives",signature:"() as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves all archives.</p>\n',summary:"<p>  Retrieves all archives.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"object()*",description:"all archives."},errors:[]},{isDocumented:!0,arity:1,name:"archives",qname:"archives:archives",signature:"($archive-or-ids as item()*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves the archives with the given AIDs.</p>\n',summary:"<p>  Retrieves the archives with the given AIDs.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"archive-or-ids",type:"item()",occurrence:"*",description:""}],returns:{type:"object()*",description:"the archives with the given AIDs the empty sequence if no archive was found or if the input is an empty sequence."},errors:[]},{isDocumented:!0,arity:1,name:"entities",qname:"archives:entities",signature:"($archives-or-ids as item()*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the entities that submitted the supplied archives.</p>\n',summary:"<p>  Returns the entities that submitted the supplied archives.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"archives-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of archives or their identifiers (AID).</div>'}],returns:{type:"object()*",description:"the submitting entities."},errors:[]},{isDocumented:!0,arity:1,name:"num-abstract-primary-items-in-hypercubes",qname:"archives:num-abstract-primary-items-in-hypercubes",signature:"($archives-or-ids) as integer*",description:" Return the number of (distinct) abstract primary items being\n in a hypercube for each of the given archives.\n",summary:"<p> Return the number of (distinct) abstract primary items being\n in a hypercube for each of the given archives.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"archives-or-ids",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> list of archives or IDs</div>'}],returns:{type:"integer*",description:"the said number of primary items"},errors:[]},{isDocumented:!0,arity:1,name:"num-components",qname:"archives:num-components",signature:"($archives-or-ids) as integer*",description:" Return the number of components of each of the given archives.\n",summary:"<p> Return the number of components of each of the given archives.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"archives-or-ids",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> list of archives or IDs</div>'}],returns:{type:"integer*",description:"the said number of components"},errors:[]},{isDocumented:!0,arity:1,name:"num-concrete-primary-items-in-hypercubes",qname:"archives:num-concrete-primary-items-in-hypercubes",signature:"($archives-or-ids) as integer*",description:" Return the number of (distinct) concrete primary items being\n in a hypercube for each of the given archives.\n",summary:"<p> Return the number of (distinct) concrete primary items being\n in a hypercube for each of the given archives.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"archives-or-ids",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> list of archives or IDs</div>'}],returns:{type:"integer*",description:"the said number of primary items"},errors:[]},{isDocumented:!0,arity:1,name:"num-concrete-primary-items-not-in-hypercubes",qname:"archives:num-concrete-primary-items-not-in-hypercubes",signature:"($archives-or-ids) as integer*",description:" Return the number of (distinct) concrete primary items not being\n in a hypercube for each of the given archives.\n",summary:"<p> Return the number of (distinct) concrete primary items not being\n in a hypercube for each of the given archives.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"archives-or-ids",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> list of archives or IDs</div>'}],returns:{type:"integer*",description:"the said number of primary items"},errors:[]},{isDocumented:!0,arity:1,name:"num-distinct-abstract-primary-items-not-in-hypercubes",qname:"archives:num-distinct-abstract-primary-items-not-in-hypercubes",signature:"($archives-or-ids) as integer*",description:" Return the number of (distinct) abstract primary items not being\n in a hypercube for each of the given archives.\n",summary:"<p> Return the number of (distinct) abstract primary items not being\n in a hypercube for each of the given archives.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"archives-or-ids",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> list of archives or IDs</div>'}],returns:{type:"integer*",description:"the said number of primary items"},errors:[]},{isDocumented:!0,arity:1,name:"num-domains",qname:"archives:num-domains",signature:"($archives-or-ids) as integer*",description:" Return the number of (distinct) domains in each of the given archives.\n",summary:"<p> Return the number of (distinct) domains in each of the given archives.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"archives-or-ids",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> list of archives or IDs</div>'}],returns:{type:"integer*",description:"the said number of domains"},errors:[]},{isDocumented:!0,arity:1,name:"num-explicit-dimensions",qname:"archives:num-explicit-dimensions",signature:"($archives-or-ids) as integer*",description:" Return the number of (distinct) explicit dimensions in each of the given archives.\n",summary:"<p> Return the number of (distinct) explicit dimensions in each of the given archives.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"archives-or-ids",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> list of archives or IDs</div>'}],returns:{type:"integer*",description:"the said number of dimensions"},errors:[]},{isDocumented:!0,arity:1,name:"num-facts",qname:"archives:num-facts",signature:"($archives-or-ids) as integer*",description:" Return the number of facts of each of the given archives.\n",summary:"<p> Return the number of facts of each of the given archives.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"archives-or-ids",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> list of archives or IDs</div>'}],returns:{type:"integer*",description:"the said number of facts"},errors:[]},{isDocumented:!0,arity:1,name:"num-footnotes",qname:"archives:num-footnotes",signature:"($archives-or-ids) as integer*",description:" Return the number of XBRL footnotes of each of the given archives.\n",summary:"<p> Return the number of XBRL footnotes of each of the given archives.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"archives-or-ids",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> list of archives or IDs</div>'}],returns:{type:"integer*",description:"the said number of footnotes"},errors:[]},{isDocumented:!0,arity:1,name:"num-hypercubes",qname:"archives:num-hypercubes",signature:"($archives-or-ids as item()*) as integer*",description:" Return the number of hypercubes in each of the given archives.\n",summary:"<p> Return the number of hypercubes in each of the given archives.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"archives-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> list of archives or IDs</div>'}],returns:{type:"integer*",description:"the said number of hypercubes"},errors:[]},{isDocumented:!0,arity:1,name:"num-members",qname:"archives:num-members",signature:"($archives-or-ids) as integer*",description:" Return the number of (distinct) members in each of the given archives.\n",summary:"<p> Return the number of (distinct) members in each of the given archives.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"archives-or-ids",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> list of archives or IDs</div>'}],returns:{type:"integer*",description:"the said number of members"},errors:[]},{isDocumented:!0,arity:1,name:"num-networks",qname:"archives:num-networks",signature:"($archives-or-ids) as integer*",description:" Return the number of networks in each of the given archives.\n",summary:"<p> Return the number of networks in each of the given archives.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"archives-or-ids",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> list of archives or IDs</div>'}],returns:{type:"integer*",description:"the said number of networks"},errors:[]}],variables:[{name:"archives:col",type:"string",description:" Name of the collection the archives are stored in.\n"},{name:"archives:ENTITY",type:"string",description:" Name of the field which points to the reporting entity.\n"}]},"http://www.28msec.com/modules/xmlrpc":{ns:"http://www.28msec.com/modules/xmlrpc",description:' XML RPC Client Module\n This module provides the functions necessary to execute remote call\n procedures using\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.xmlrpc.com/spec" target="_blank">XML-RPC</a>.\n The application/mashup creator does not need to know the\n specifics of <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.xmlrpc.com/spec" target="_blank">XML-RPC</a> to use this module.\n Usage:\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0">xmlrpc:invoke("http://www.advogato.org/XMLRPC", "test.sumprod", (5, 7))</pre>\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0">xmlrpc:invoke("http://www.advogato.org/XMLRPC", "test.capitalize", "HelloWorld")</pre>\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0">xmlrpc:invoice("http://www.example.com/XMLRPC", "test.foo", ("some-parameter",\n                      &lt;struct&gt;\n                        &lt;member&gt;\n                          &lt;name&gt;Foo&lt;/name&gt;\n                          &lt;value&gt;&lt;string&gt;Bar&lt;/string&gt;&lt;/value&gt;\n                        &lt;/member&gt;\n                      &lt;/struct&gt;))</pre>\n',sees:['<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0"><a href="http://www.xmlrpc.com/spec" target="_blank">XML-RPC Specification</a></xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0"><a href="http://en.wikipedia.org/wiki/XML-RPC" target="_blank">XML-RPC Wikipedia article</a></xqdoc:see>'],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">William Candillon {william.candillon@28msec.com}</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"ann"},{uri:"http://expath.org/ns/http-client",prefix:"http"},{uri:"http://expath.org/ns/http-client",prefix:"http-client"},{uri:"http://zorba.io/options/versioning",prefix:"ver"},{uri:"http://www.28msec.com/modules/xmlrpc",prefix:"xmlrpc"}],functions:[{isDocumented:!0,arity:2,name:"invoke",qname:"xmlrpc:invoke",signature:"($endpoint-url as xs:string, $method as xs:string) as item()*",description:" Invoke a remote method without parameters.\n Calling this function is equivalent to xmlrpc:invoke($url, $method, ())\n",summary:"<p> Invoke a remote method without parameters.</p>",annotation_str:" %ann:sequential",annotations:[{prefix:"ann",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> URL of the XML-RPC server.</div>'},{name:"method",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Name of the method to invoke.</div>'}],returns:{type:"item()*",description:"Result of the method invocation."},errors:[]},{isDocumented:!0,arity:3,name:"invoke",qname:"xmlrpc:invoke",signature:"($endpoint-url as xs:string, $method as xs:string, $parameters as item()*) as item()*",description:" Invoke a remote method with parameters.\n",summary:"<p> Invoke a remote method with parameters.</p>",annotation_str:" %ann:sequential",annotations:[{prefix:"ann",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> URL of the XML-RPC server.</div>'},{name:"method",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Name of the method to invoke.</div>'},{name:"parameters",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Method parameters. Struct and Arrays need to follow XML-RPC format. Atomic types will be automatically convert to the proper XML-RPC data format.</div>'}],returns:{type:"item()*",description:"Result of the method invocation."},errors:[]}],variables:[{name:"xmlrpc:ERR_001",type:"xs:QName",description:" XML-RPC serialization error.\n"}]},"http://zorba.io/modules/unordered-maps":{ns:"http://zorba.io/modules/unordered-maps",description:' This module defines a set of functions for working with maps. A map\n is identified by a string and can be created using the map:create function\n and dropped using the map:drop function.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n It is possible to create persistent and transient maps. The lifetime of a\n transient map is limited by the execution of the current query.\n A persistent map lives until it is explicitly dropped.\n Accordingly, it is also available to other requests.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n For example,\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0">map:create("my-map", ["string", "integer"], { "persistent" : false })</pre>\n will create a transient map named my-map having two keys.\n The types of the keys are string and integer.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The key of a particular entry in the map can consist of a tuple of\n atomic values (called key attributes). The actual type of each attribute\n is determined when the map is created. The value of each entry is a\n sequence of items. If an item in this sequence is a object or array,\n this item needs to belong to a collection, otherwise, an error is raised.\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Matthias Brantner</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://zorba.io/modules/unordered-maps",prefix:"map"},{uri:"http://zorba.io/options/versioning",prefix:"ver"},{uri:"http://zorba.io/errors",prefix:"zerr"}],functions:[{isDocumented:!0,arity:0,name:"available-maps",qname:"map:available-maps",signature:"() as string* external",description:' The function returns a sequence of names of the maps that are\n available (persistent and non-persistent). The sequence will be\n empty if there are no maps.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n',summary:"<p> The function returns a sequence of names of the maps that are\n available (persistent and non-persistent).</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"string*",description:"A sequence of string, one for each available map, or an empty sequence."},errors:[]},{isDocumented:!0,arity:2,name:"create",qname:"map:create",signature:"($name as string, $key-types as item()) as empty-sequence() external",description:' Create a persistent map with a given name and type identifiers for the key\n attributes.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n If the map has only one key attribute, a single type identifier is given,\n for more than one key attribute an array of type identifiers is given.\n Calling this function is equivalent to calling create with the options\n <code xmlns:xqdoc="http://www.xqdoc.org/1.0">{ "persistent" : true }</code>\n Note that the function is sequential and immediately creates the map.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Each key-type should be specified as string (e.g. "integer",\n "string", "boolean", "double", or "datetime").\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n For example,\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0">map:create("my-map", "string")</pre> or\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0">map:create("my-map", ["string", "integer"])</pre>.\n',summary:"<p> Create a persistent map with a given name and type identifiers for the key\n attributes.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the map (the restrictions on collection names apply)</div>'},{name:"key-types",type:"item()",occurrence:null,description:""}],returns:{type:"empty-sequence()",description:"the function is sequential and immediately creates the corresponding map. It returns the empty-sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XPTY0004 if any of the key attribute types is not a subtype of anyAtomicType.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZSTR0001 if a map with the given name already exists.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY1000 if the given name is not a legal collection name</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0043 if any of the given options has an invalid type</xqdoc:error>']},{isDocumented:!0,arity:3,name:"create",qname:"map:create",signature:"($name as string, $key-types as item(), $options as object()) as empty-sequence() external",description:' Create a map with a given name, type identifiers for the key attributes, and\n options.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n If the map has only one key attribute, a single type identifier is given,\n for more than one key attribute an array of type identifiers is given.\n Currently only one option is supported: To create a transient map the object\n <code xmlns:xqdoc="http://www.xqdoc.org/1.0">{ "persistent" : false }</code>\n has to be passed to the $options parameter.\n Note that the function is sequential and immediately creates the map in the\n store.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Note that a map cannot be created if it already exists in a parent context.\n For example, a map that was created in an outer query cannot be\n created again in an inner query executed using the\n <code xmlns:xqdoc="http://www.xqdoc.org/1.0">reflection:eval-s</code> function.\n',summary:"<p> Create a map with a given name, type identifiers for the key attributes, and\n options.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the map (the restrictions on collection names apply)</div>'},{name:"key-types",type:"item()",occurrence:null,description:""},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> an object describing options for the map</div>'}],returns:{type:"empty-sequence()",description:"the function is sequential and immediately creates the corresponding map but returns the empty-sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XPTY0004 if any of the attribute types is not a subtype of anyAtomicType.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZSTR0001 if a map with the given name already exists.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY1000 if the given name is not a legal collection name</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0043 if any of the given options has an invalid type</xqdoc:error>']},{isDocumented:!0,arity:2,name:"delete",qname:"map:delete",signature:"($name as string, $key as item()) as empty-sequence() external",description:' Removes an entry identified by the given key from the map.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n If the map has only one key attribute, a single key value is given, for\n more than one key attribute an array of key values is given.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Note that it is possible to insert entries with empty key attributes.\n However as the removing the entries is based on the "eq" comparison and\n as "eq" with an empty sequence always return false, it is not possible\n to delete these entries.\n',summary:"<p> Removes an entry identified by the given key from the map.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the map</div>'},{name:"key",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> either a single attribute key or an array of keys</div>'}],returns:{type:"empty-sequence()",description:"the function is sequential and immediately deletes the entry into the map but returns the empty-sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0023 if a map with the given name does not exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0025 if the given number of key attributes does not match the number of key attributes specified when creating the map (see the map:create function).</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZXQD0005 if any of the given key attributes can not be cast (or is not a subtype) of the corresponding key attribute specified when creating the map.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"drop",qname:"map:drop",signature:"($name as string) as empty-sequence() external",description:' Deletes the map with the given name.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Note that a map can only be dropped in the context it was created.\n For example, a map that was created in an outer query cannot be\n dropped in an inner query executed using the\n <code xmlns:xqdoc="http://www.xqdoc.org/1.0">reflection:eval-s</code> function.\n',summary:"<p> Deletes the map with the given name.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the map to drop</div>'}],returns:{type:"empty-sequence()",description:"the function is sequential and immediately drops the map. It returns the empty-sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0023 if a map with the given name does not exist.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"get",qname:"map:get",signature:"($name as string, $key as item()) as item()* external",description:' Returns the value of the entry with the given key from the map.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n If the map has only one key attribute, a single key value is given, for\n more than one key attribute an array of key values is given.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Note that it is possible to insert entries with empty key attributes.\n However as the getting the entries is based on the "eq" comparison and\n as "eq" with an empty sequence always return false, it is not possible\n to retrieve these entries.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n For example,\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0">map:get("my-map", "key")</pre> or\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0">map:get("my-map", [ "key1", "key2" ])</pre>.\n',summary:"<p> Returns the value of the entry with the given key from the map.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the map</div>'},{name:"key",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> either a single attribute key or an array of keys</div>'}],returns:{type:"item()*",description:"the value of the entry in the map identified by the given key. The empty-sequence will be returned if no entry with the given key is contained in the map."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0023 if a map with the given name does not exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0025 if the given number of key attributes does not match the number of key attributes specified when creating the map (see the map:create function).</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZXQD0005 if any of the given key attributes can not be cast (or is not a subtype) of the corresponding key attribute specified when creating the map.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"insert",qname:"map:insert",signature:"($name as string, $key as item(), $value as item()*) as empty-sequence() external",description:' Inserts a new entry into the map with the given name.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n If the map has only one key attribute, a single key value is given, for\n more than one key attribute an array of key values is given.\n If an entry with the given key already exists in the map, the value\n sequences of the existing entry and the sequence passed using $value\n argument are concatenated.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n If an item in the value sequence is an object or array, this\n item needs to belong to a collection, otherwise, an an error\n is raised.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Note that it is possible to insert entries with empty key attributes\n or key attributes having the value <code xmlns:xqdoc="http://www.xqdoc.org/1.0">null</code>. However, as\n the comparison with an empty sequence or null always returns false,\n it is not possible to retrieve these entries.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n For example,\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0">map:insert("my-map", "key", "value")</pre> or\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0">map:insert("my-map", [ "key1", "key2" ] , (42, "value"))</pre>.\n',summary:"<p> Inserts a new entry into the map with the given name.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the map</div>'},{name:"key",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> either a single attribute key or an array of keys</div>'},{name:"value",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the value of the entry to insert</div>'}],returns:{type:"empty-sequence()",description:"the function is sequential and immediately inserts the entry into the map. It returns the empty-sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0023 if a map with the given name does not exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0025 if the given number of key attributes does not match the number of key attributes specified when creating the map (see the map:create function).</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZXQD0005 if any of the given key attributes can not be cast (or is not a subtype) of the corresponding key attribute specified when creating the map.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY1003 if the value to insert is an object or array it must belong to a collection.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"keys",qname:"map:keys",signature:"($name as string) as array()* external",description:' Returns the keys of all entries of a map. The keys\n are returned as sequence of arrays.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The following condition always holds:\n <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">map:size($name) eq count(map:keys($name))</tt>\n',summary:"<p> Returns the keys of all entries of a map.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the map</div>'}],returns:{type:"array()*",description:"an sequence of arrays each array containing the values of all attributes of one key."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0023 if a map with the given name does not exist.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"options",qname:"map:options",signature:"($name as string) as object() external",description:" The function returns the options that were passed during creation or the\n default options if no options were passed.\n",summary:"<p> The function returns the options that were passed during creation or the\n default options if no options were passed.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the map</div>'}],returns:{type:"object()",description:"an options object"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0023 if a map with the given name does not exist.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"size",qname:"map:size",signature:"($name as string) as integer external",description:' Returns the number of entries in a map.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The following condition always holds:\n <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">map:size($name) eq count(map:keys($name))</tt>\n',summary:"<p> Returns the number of entries in a map.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the map</div>'}],returns:{type:"integer",description:"the number of entries in the map."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0023 if a map with the given name does not exist.</xqdoc:error>']}],variables:[{name:"map:PERSISTENT",type:"string",description:" Constant containing the field name of the options object\n indiciating whether a map is persistent or transient.\n"}]},"http://www.28msec.com/modules/assertion":{ns:"http://www.28msec.com/modules/assertion",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n   This module provides a set of assertion functions.\n </p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">28msec</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://www.28msec.com/modules/assertion",prefix:"assertion"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:2,name:"equals-deep",qname:"assertion:equals-deep",signature:"($expected as item()*, $actual as item()*) as item()*",description:" Asserts that two objects are deep-equal.\n If they are not, an error containing the diff is raised.\n",summary:"<p> Asserts that two objects are deep-equal.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"expected",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> expected value</div>'},{name:"actual",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> actual value</div>'}],returns:{type:"item()*",description:"actual value"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">assertion:A003 expected and actual value are not deep-equal</xqdoc:error>']},{isDocumented:!0,arity:2,name:"equals-general",qname:"assertion:equals-general",signature:"($expected as item()*, $actual as item()*) as item()*",description:" Asserts that two objects are equal (by general comarison).\n If they are not, an error containing the diff is raised.\n",summary:"<p> Asserts that two objects are equal (by general comarison).</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"expected",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> expected value</div>'},{name:"actual",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> actual value</div>'}],returns:{type:"item()*",description:"actual value"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">assertion:A002 expected and actual value are not equal</xqdoc:error>']},{isDocumented:!0,arity:2,name:"equals-value",qname:"assertion:equals-value",signature:"($expected as item()?, $actual as item()?) as item()?",description:" Asserts that two objects are equal (by value comparison).\n If they are not, an error containing the diff is raised.\n",summary:"<p> Asserts that two objects are equal (by value comparison).</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"expected",type:"item()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> expected value</div>'},{name:"actual",type:"item()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> actual value</div>'}],returns:{type:"item()?",description:"actual value"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">assertion:A001 expected and actual value are not equal</xqdoc:error>']}],variables:[{name:"assertion:A001",type:"xs:QName",description:" xs:QName with namespace URI=\"http://www.28msec.com/modules/assertion\" and\n local name 'A001'. 'equals-value' assertion failed.\n"},{name:"assertion:A002",type:"xs:QName",description:" xs:QName with namespace URI=\"http://www.28msec.com/modules/assertion\" and\n local name 'A002'. 'equals-general' assertion failed.\n"},{name:"assertion:A003",type:"xs:QName",description:" xs:QName with namespace URI=\"http://www.28msec.com/modules/assertion\" and\n local name 'A003'. 'equals-general' assertion failed.\n"}]},"http://www.zorba-xquery.com/modules/image/basic":{ns:"http://www.zorba-xquery.com/modules/image/basic",description:' This module provides function to do the following basic image operations:\n <ul xmlns:xqdoc="http://www.xqdoc.org/1.0">\n   <li>create empty images</li>\n   <li>compare images</li>\n   <li>compress image</li>\n   <li>convert an image one format to another</li>\n   <li>retrieve with, height, format, and exif information from an image</li>\n </ul>\n The following image formats are supported:\n <ul xmlns:xqdoc="http://www.xqdoc.org/1.0">\n   <li>GIF</li>\n   <li>JPEG</li>\n   <li>PNG</li>\n   <li>TIFF</li>\n   <li>BMP</li>\n </ul>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The errors raised by functions of this module have the namespace\n <tt>http://www.zorba-xquery.com/modules/image/error</tt> (associated with prefix ierr).</p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Daniel Thomas</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://www.zorba-xquery.com/modules/image/basic",prefix:"basic"},{uri:"http://www.w3.org/2005/xqt-errors",prefix:"err"},{uri:"http://www.zorba-xquery.com/modules/image/error",prefix:"ierr"},{uri:"http://www.zorba-xquery.com/modules/image/image",prefix:"image"},{uri:"http://www.w3.org/2000/svg",prefix:"svg"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:2,name:"compress",qname:"basic:compress",signature:"($image as xs:base64Binary, $quality as xs:unsignedInt) as xs:base64Binary external",description:" Compresses the passed image.\n Compressing means lowering the quality and reducing the size.\n",summary:"<p> Compresses the passed image.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"image",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the image</div>'},{name:"quality",type:"xs:unsignedInt",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> compression level, 0 to 100</div>'}],returns:{type:"xs:base64Binary",description:"the compressed image"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ierr:IM001 the passed image is invalid.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"convert-svg-string",qname:"basic:convert-svg-string",signature:"($svg as xs:string, $format as xs:string) as xs:base64Binary",description:" Converts an SVG image to a supported image format.\n",summary:"<p> Converts an SVG image to a supported image format.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"svg",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the image to convert as string</div>'},{name:"format",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> target format</div>'}],returns:{type:"xs:base64Binary",description:"the resulting image"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ierr:IM001 the passed SVG is invalid.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"convert-svg",qname:"basic:convert-svg",signature:"($svg as element(svg:svg), $format as xs:string) as xs:base64Binary",description:" Converts an SVG image to a supported image format.\n",summary:"<p> Converts an SVG image to a supported image format.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"svg",type:"element(svg:svg)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the image to convert</div>'},{name:"format",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> target format</div>'}],returns:{type:"xs:base64Binary",description:"the resulting image"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ierr:IM001 the passed SVG is invalid.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"convert",qname:"basic:convert",signature:"($image as xs:base64Binary, $format as xs:string) as xs:base64Binary",description:" Converts an image to another format.\n",summary:"<p> Converts an image to another format.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"image",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the source image</div>'},{name:"format",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the format (see supported formats above) of the resulting image.</div>'}],returns:{type:"xs:base64Binary",description:"A new image with the same content as the passed image but with the specified file format."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ierr:IM001 the passed image is invalid.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FORG0001 unsupported image format</xqdoc:error>']},{isDocumented:!0,arity:3,name:"create",qname:"basic:create",signature:"($width as xs:unsignedInt, $height as xs:unsignedInt, $format as xs:string) as xs:base64Binary",description:" Creates an empty image with background color white.\n",summary:"<p> Creates an empty image with background color white.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"width",type:"xs:unsignedInt",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the width of the new image</div>'},{name:"height",type:"xs:unsignedInt",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the height of the new image</div>'},{name:"format",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the format of the new image</div>'}],returns:{type:"xs:base64Binary",description:"newly created image"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FORG0001 unsupported image format</xqdoc:error>']},{isDocumented:!0,arity:2,name:"equals",qname:"basic:equals",signature:"($image1 as xs:base64Binary, $image2 as xs:base64Binary) as xs:boolean external",description:" Compares two images.\n",summary:"<p> Compares two images.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"image1",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> first image</div>'},{name:"image2",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> second image</div>'}],returns:{type:"xs:boolean",description:"True if the images are equal."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ierr:IM001 one of the passed images is invalid.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"exif",qname:"basic:exif",signature:"($image as xs:base64Binary, $tag as xs:string) as xs:string? external",description:" Reads exif information from an image.\n This function works for JPEG and TIFF images only.\n It returns empty sequence if no exif information matching the passed tag is found.\n",summary:"<p> Reads exif information from an image.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"image",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the image</div>'},{name:"tag",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the field name we want read (e.g. DateTime).</div>'}],returns:{type:"xs:string?",description:"exif field content"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ierr:IM001 the passed image is invalid.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"format",qname:"basic:format",signature:"($image as xs:base64Binary) as xs:string external",description:" Returns the format of the passed image.\n",summary:"<p> Returns the format of the passed image.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"image",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the image</div>'}],returns:{type:"xs:string",description:"the format"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ierr:IM001 the passed image is invalid.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"height",qname:"basic:height",signature:"($image as xs:base64Binary) as xs:unsignedInt external",description:" Returns the height of the passed image.\n",summary:"<p> Returns the height of the passed image.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"image",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the image</div>'}],returns:{type:"xs:unsignedInt",description:"the height in pixels"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ierr:IM001 the passed image is invalid.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"width",qname:"basic:width",signature:"($image as xs:base64Binary) as xs:unsignedInt external",description:" Returns the width of the passed image.\n",summary:"<p> Returns the width of the passed image.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"image",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the image</div>'}],returns:{type:"xs:unsignedInt",description:"the width in pixels"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ierr:IM001 the passed image is invalid.</xqdoc:error>']}],variables:[]},"http://api.28.io/indices":{ns:"http://api.28.io/indices",description:"",sees:[],authors:[],version:null,encoding:null,namespaces:[{uri:"",prefix:"an"},{uri:"http://api.28.io/indices",prefix:"in"},{uri:"http://www.28msec.com/modules/http/request",prefix:"req"},{uri:"http://www.28msec.com/modules/http/response",prefix:"resp"},{uri:"http://api.28.io/util",prefix:"util"},{uri:"http://api.28.io/validation",prefix:"validate"}],functions:[{isDocumented:!1,arity:1,name:"create-index",qname:"in:create-index",signature:"($new-index as object()) as empty-sequence()",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"new-index",type:"object()",occurrence:null,description:""}],returns:{type:"empty-sequence()",description:""},errors:[]},{isDocumented:!1,arity:1,name:"delete-index",qname:"in:delete-index",signature:"($name) as empty-sequence()",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"name",type:null,occurrence:null,description:""}],returns:{type:"empty-sequence()",description:""},errors:[]},{isDocumented:!1,arity:0,name:"dispatch",qname:"in:dispatch",signature:"()",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:1,name:"get-index",qname:"in:get-index",signature:"($name as xs:string) as object()?",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"name",type:"xs:string",occurrence:null,description:""}],returns:{type:"object()?",description:""},errors:[]},{isDocumented:!1,arity:0,name:"list-indices",qname:"in:list-indices",signature:"() as array()",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[],returns:{type:"array()",description:""},errors:[]},{isDocumented:!1,arity:0,name:"metadata",qname:"in:metadata",signature:"()",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:2,name:"put-index",qname:"in:put-index",signature:"($name as xs:string, $new-index-obj as object()) as empty-sequence()",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"name",type:"xs:string",occurrence:null,description:""},{name:"new-index-obj",type:"object()",occurrence:null,description:""}],returns:{type:"empty-sequence()",description:""},errors:[]},{isDocumented:!1,arity:1,name:"refresh-index",qname:"in:refresh-index",signature:"($index as xs:string) as empty-sequence()",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"index",type:"xs:string",occurrence:null,description:""}],returns:{type:"empty-sequence()",description:""},errors:[]},{isDocumented:!1,arity:1,name:"validate-index",qname:"in:validate-index",signature:"($index as object()) as empty-sequence()",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"index",type:"object()",occurrence:null,description:""}],returns:{type:"empty-sequence()",description:""},errors:[]}],variables:[]},"http://api.28.io/xdmview":{ns:"http://api.28.io/xdmview",description:"",sees:[],authors:[],version:null,encoding:null,namespaces:[{uri:"",prefix:"an"},{uri:"http://api.28.io/model",prefix:"model"},{uri:"http://zorba.io/modules/reference",prefix:"ref"},{uri:"http://www.zorba-xquery.com/schemas/xdm",prefix:"xdm"},{uri:"http://api.28.io/xdmview",prefix:"xdmview"}],functions:[{isDocumented:!1,arity:1,name:"show-namespaces",qname:"xdmview:show-namespaces",signature:"($namespaces)",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"namespaces",type:null,occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:3,name:"show-node",qname:"xdmview:show-node",signature:"($node, $namespaces, $include-noderef as xs:boolean)",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"node",type:null,occurrence:null,description:""},{name:"namespaces",type:null,occurrence:null,description:""},{name:"include-noderef",type:"xs:boolean",occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:2,name:"show-nodes",qname:"xdmview:show-nodes",signature:"($nodes, $include-noderef as xs:boolean)",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"nodes",type:null,occurrence:null,description:""},{name:"include-noderef",type:"xs:boolean",occurrence:null,description:""}],returns:{type:null,description:""},errors:[]}],variables:[]},"http://www.zorba-xquery.com/modules/xqdoc/json":{ns:"http://www.zorba-xquery.com/modules/xqdoc/json",description:' Convert an XQDoc document into an HTML document.\n This module contains a single <code xmlns:xqdoc="http://www.xqdoc.org/1.0">convert()</code> function\n that transform an XQDoc document into an HTML document.\n Usage:\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static" ace-mode="xquery">\n let $xqdoc := xqdoc:xqdoc("http://expath.org/ns/file")\n return html:convert($xqdoc)\n </pre>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">William Candillon <a href="?anchor=">wcandillon at gmail dot com</a></xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://www.zorba-xquery.com/modules/xqdoc/json",prefix:"html"},{uri:"http://www.w3.org/2010/xslt-xquery-serialization",prefix:"o"},{uri:"http://www.xqdoc.org/1.0",prefix:"xq"}],functions:[{isDocumented:!1,arity:1,name:"convert",qname:"html:convert",signature:"($xqdoc as element(xq:xqdoc)) as object()",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"xqdoc",type:"element(xq:xqdoc)",occurrence:null,description:""}],returns:{type:"object()",description:""},errors:[]},{isDocumented:!1,arity:1,name:"normalize-anchors",qname:"html:normalize-anchors",signature:"($node)",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"node",type:null,occurrence:null,description:""}],returns:{type:null,description:""},errors:[]}],variables:[]},"http://zorba.io/modules/math":{ns:"http://zorba.io/modules/math",description:' Extensive math library.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Daniel Turcanu, Dan Muresan</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://www.w3.org/2005/xpath-functions/math",prefix:"W3Cmath"},{uri:"http://zorba.io/modules/math",prefix:"math"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"acosh",qname:"math:acosh",signature:"($arg as double) as double external",description:" Inverse hyperbolic cosine.\n",summary:"<p> Inverse hyperbolic cosine.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the arg</div>'}],returns:{type:"double",description:"the result of acosh(arg)"},errors:[]},{isDocumented:!0,arity:1,name:"asinh",qname:"math:asinh",signature:"($arg as double) as double external",description:" Calculate the inverse hyperbolic sine.\n",summary:"<p> Calculate the inverse hyperbolic sine.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the arg</div>'}],returns:{type:"double",description:"the result of asinh(arg)"},errors:[]},{isDocumented:!0,arity:1,name:"atanh",qname:"math:atanh",signature:"($arg as double) as double external",description:" Calculate the hyperbolic tangent.\n",summary:"<p> Calculate the hyperbolic tangent.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> must be in range -1 ... +1 (exclusive)</div>'}],returns:{type:"double",description:"the result of atanh(arg)"},errors:[]},{isDocumented:!0,arity:1,name:"avedev",qname:"math:avedev",signature:"($numbers as double+) as double",description:' Returns the average of the absolute deviations of data points from their mean.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The formula is sum(abs(x - average_x))/n, where n is the count of x in the sequence.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.\n',summary:"<p> Returns the average of the absolute deviations of data points from their mean.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"double",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of numbers. Sequence can be of any length from 1 up.</div>'}],returns:{type:"double",description:"The formula result"},errors:[]},{isDocumented:!0,arity:1,name:"cast-as-numeric",qname:"math:cast-as-numeric",signature:"($number as anyAtomicType) as anyAtomicType",description:' Cast the anyAtomicType to a numeric type.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n If the value is already of a numeric type then nothing is changed.\n Otherwise the value is casted to the numeric type that is most appropriate.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.\n',summary:"<p> Cast the anyAtomicType to a numeric type.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"number",type:"anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The parameter can be a number, string, boolean value.</div>'}],returns:{type:"anyAtomicType",description:"The casted value."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">math:VALUE_NOT_NUMERIC if the value cannot be casted to numeric type.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"ceiling",qname:"math:ceiling",signature:"($number as double, $significance as double) as double",description:' Returns number rounded up, away from zero, to the nearest multiple of significance.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Significance must have the same sign as number.\n Number and significance must be of a numeric type or castable to numeric.\n Significance must not be zero.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.\n',summary:"<p> Returns number rounded up, away from zero, to the nearest multiple of significance.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"number",type:"double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The value you want to round.</div>'},{name:"significance",type:"double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The multiple to which you want to round.</div>'}],returns:{type:"double",description:"The rounded value."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">math:INVALID_ARGUMENT if significance is zero or it doesn\'t have the same sign as number.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"cosh",qname:"math:cosh",signature:"($arg as double) as double external",description:' Returns the hyperbolic cosine of x.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n If the result it too large, INF is returned.\n',summary:"<p> Returns the hyperbolic cosine of x.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> must be smaller than 7.104760e+002</div>'}],returns:{type:"double",description:"cosh(arg)"},errors:[]},{isDocumented:!0,arity:1,name:"deg-to-rad",qname:"math:deg-to-rad",signature:"($deg as double) as double",description:' Convert angle from degrees to radians. <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The parameter is first converted to value range of (-360, 360).\n',summary:"<p> Convert angle from degrees to radians.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"deg",type:"double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> angle in degrees</div>'}],returns:{type:"double",description:"value in radians (-2PI, 2PI)"},errors:[]},{isDocumented:!0,arity:1,name:"even",qname:"math:even",signature:"($number as double) as integer",description:' Returns number rounded up to the nearest even integer.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Regardless of the sign of number, a value is rounded up when adjusted away from zero.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.\n',summary:"<p> Returns number rounded up to the nearest even integer.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"number",type:"double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The value to round.</div>'}],returns:{type:"integer",description:"The rounded value casted as numeric type."},errors:[]},{isDocumented:!0,arity:1,name:"fact",qname:"math:fact",signature:"($number as integer) as integer",description:' Returns the factorial of a number.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.\n',summary:"<p> Returns the factorial of a number.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"number",type:"integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The non-negative number you want the factorial of.</div>'}],returns:{type:"integer",description:"Returns the factorial of a number. The factorial of a number is equal to 1*2*3*...* number."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">math:INVALID_ARGUMENT if the number is smaller than zero</xqdoc:error>']},{isDocumented:!0,arity:1,name:"factdouble",qname:"math:factdouble",signature:"($number as integer) as integer",description:' Returns the double factorial of a number.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Computes the double factorial of n as n(n-2)(n-4)...<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.\n',summary:"<p> Returns the double factorial of a number.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"number",type:"integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The positive integer value.</div>'}],returns:{type:"integer",description:"The result as integer."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">math:INVALID_ARGUMENT if the number is negative.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"floor",qname:"math:floor",signature:"($number as double, $significance as double) as double",description:' Rounds number down, toward zero, to the nearest multiple of significance.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Significance must have the same sign as number.\n Borrowed from excel module.\n',summary:"<p> Rounds number down, toward zero, to the nearest multiple of significance.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"number",type:"double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The value you want to round.</div>'},{name:"significance",type:"double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The multiple to which you want to round.</div>'}],returns:{type:"double",description:"The rounded value as numeric type."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">math:INVALID_ARGUMENT if significance is zero or it doesn\'t have the same sign as number.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"fmod",qname:"math:fmod",signature:"($x as double, $y as double) as double external",description:" Function performing the modulo operation between the two arguments.\n",summary:"<p> Function performing the modulo operation between the two arguments.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"x",type:"double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the x</div>'},{name:"y",type:"double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the y</div>'}],returns:{type:"double",description:"The remainder of x/y."},errors:[]},{isDocumented:!0,arity:1,name:"frexp",qname:"math:frexp",signature:"($arg as double) as double+ external",description:' Returns the argument split as mantissa and exponent.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The recombining formula is (mantissa * 2^exponent).\n',summary:"<p> Returns the argument split as mantissa and exponent.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the double to be split.</div>'}],returns:{type:"double+",description:"A sequence of two doubles (mantissa, exponent)"},errors:[]},{isDocumented:!0,arity:1,name:"gcd",qname:"math:gcd",signature:"($numbers as integer+) as integer",description:' Returns the greatest common divisor GCD of a sequence of integers.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The sequence can have one or more positive integers.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.\n',summary:"<p> Returns the greatest common divisor GCD of a sequence of integers.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"integer",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The sequence of positive integers.</div>'}],returns:{type:"integer",description:"The GCD as integer."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">math:INVALID_ARGUMENT if any number is smaller than zero.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"int",qname:"math:int",signature:"($number as double) as integer",description:' Rounds a number down to the nearest integer.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Positive numbers are rounded toward zero, negative numbers are rounded away from zero.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.\n',summary:"<p> Rounds a number down to the nearest integer.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"number",type:"double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The value to be rounded.</div>'}],returns:{type:"integer",description:"The rounded integer."},errors:[]},{isDocumented:!0,arity:1,name:"is-a-number",qname:"math:is-a-number",signature:"($value as anyAtomicType) as boolean",description:' Checks if the anyAtomicType argument is actually a numeric type\n or can be converted to numeric.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.\n',summary:"<p> Checks if the anyAtomicType argument is actually a numeric type\n or can be converted to numeric.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"value",type:"anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Parameter to be checked.</div>'}],returns:{type:"boolean",description:"true if the value can be casted to numeric."},errors:[]},{isDocumented:!0,arity:1,name:"is_inf",qname:"math:is_inf",signature:"($arg as double) as boolean external",description:" Checks if the double value is positive or negative infinite.\n",summary:"<p> Checks if the double value is positive or negative infinite.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the double to be checked</div>'}],returns:{type:"boolean",description:"boolean true if argument is pos INF or neg INF"},errors:[]},{isDocumented:!0,arity:1,name:"is_nan",qname:"math:is_nan",signature:"($arg as double) as boolean external",description:" Checks if the double value is Not a Number (NaN).\n",summary:"<p> Checks if the double value is Not a Number (NaN).</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the arg</div>'}],returns:{type:"boolean",description:"boolean true if the double is NaN"},errors:[]},{isDocumented:!0,arity:2,name:"large",qname:"math:large",signature:"($numbers as double+, $k as integer) as double",description:' Returns the k-th largest value in a data set. <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n If n is the number of data points in a range,\n   then LARGE(array,1) returns the largest value,\n   and LARGE(array,n) returns the smallest value.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.<br xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n',summary:"<p> Returns the k-th largest value in a data set.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"double",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of numbers The sequence can be of any length, from 1 up.</div>'},{name:"k",type:"integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the position of largest value, with value from 1 to count of values</div>'}],returns:{type:"double",description:"The k-th largest value as numeric type"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">math:INVALID_ARGUMENT if the sequence is empty or k is not a value between 1 and the size of the sequence</xqdoc:error>']},{isDocumented:!0,arity:1,name:"lcm",qname:"math:lcm",signature:"($numbers as integer+) as integer",description:' Returns the least common multiple of integers.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n LCM for two numbers is computed by multiplying them and dividing with GCD.\n The function is applied recursively replacing the first two numbers in the sequence with their LCM.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.\n',summary:"<p> Returns the least common multiple of integers.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"integer",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The sequence of one or more positive integers.</div>'}],returns:{type:"integer",description:"The LCM as integer."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">math:INVALID_ARGUMENT if any number is smaller than zero.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"ldexp",qname:"math:ldexp",signature:"($x as double, $i as integer) as double external",description:' Computes a real number from the mantissa and exponent.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The formula is (x * 2^i).\n',summary:"<p> Computes a real number from the mantissa and exponent.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"x",type:"double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the mantissa</div>'},{name:"i",type:"integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the exponent</div>'}],returns:{type:"double",description:"the computed real number"},errors:[]},{isDocumented:!0,arity:1,name:"median",qname:"math:median",signature:"($numbers as double*) as double",description:' Returns the median of the given numbers. <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The median is the number in the middle of a set of numbers.\n Half the numbers have values that are greater than the median,\n and half the numbers have values that are less than the median. <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.\n',summary:"<p> Returns the median of the given numbers.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"double",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of numbers, of any length</div>'}],returns:{type:"double",description:"for odd count of numbers return the number in the middle of the sorted sequence. For even count of numbers return the average of the two numbers in the middle."},errors:[]},{isDocumented:!0,arity:2,name:"mod",qname:"math:mod",signature:"($number as double, $divisor as double) as double",description:' Returns the remainder after number is divided by divisor.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The result has the same sign as divisor.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.\n',summary:"<p> Returns the remainder after number is divided by divisor.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"number",type:"double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The number for which you want to find the remainder.</div>'},{name:"divisor",type:"double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The number by which you want to divide number. This cannot be zero.</div>'}],returns:{type:"double",description:"The remainder from division as numeric type."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">math:DIVIDE_BY_0 if divisor is zero after casting to numeric.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"mode",qname:"math:mode",signature:"($numbers as double*) as double",description:' Returns the most frequently occurring, or repetitive, value in a sequence.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.\n',summary:"<p> Returns the most frequently occurring, or repetitive, value in a sequence.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"double",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of numbers, of any length</div>'}],returns:{type:"double",description:"The most occuring number"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">math:INVALID_INPUT if there are no duplicate numbers</xqdoc:error>']},{isDocumented:!0,arity:1,name:"modf",qname:"math:modf",signature:"($arg as double) as double+ external",description:' Splits a floating-point value into fractional and integer parts.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Both the fraction and integer keep the original sign of the value.\n',summary:"<p> Splits a floating-point value into fractional and integer parts.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the double to be split.</div>'}],returns:{type:"double+",description:"A sequence of two doubles (fraction, integer)"},errors:[]},{isDocumented:!0,arity:2,name:"mround",qname:"math:mround",signature:"($number as decimal, $multiple as double) as double",description:' Returns a number rounded to the desired multiple.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n MROUND rounds up, away from zero, if the remainder of dividing number by multiple\n is greater than or equal to half the value of multiple.\n MROUND is computed through math:floor function.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.\n',summary:"<p> Returns a number rounded to the desired multiple.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"number",type:"decimal",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The value to round,</div>'},{name:"multiple",type:"double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The multiple to which you want to round number.</div>'}],returns:{type:"double",description:"The rounded number up to the desired multiple."},errors:[]},{isDocumented:!0,arity:1,name:"odd",qname:"math:odd",signature:"($number as double) as integer",description:' Returns number rounded up to the nearest odd integer, away from zero.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.\n',summary:"<p> Returns number rounded up to the nearest odd integer, away from zero.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"number",type:"double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The value to round.</div>'}],returns:{type:"integer",description:"The odd integer."},errors:[]},{isDocumented:!0,arity:2,name:"percentile",qname:"math:percentile",signature:"($numbers as double*, $k_at as double) as double",description:' Returns the k-th percentile of values in a sequence.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n If k is not a multiple of 1/(n - 1),\n   PERCENTILE interpolates to determine the value at the k-th percentile.\n The function is computed by (max-min)*k + min<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.\n',summary:"<p> Returns the k-th percentile of values in a sequence.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"double",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of numbers, of any length</div>'},{name:"k_at",type:"double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the percentile, with value between 0 .. 1 inclusive</div>'}],returns:{type:"double",description:"The computed percentile"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">math:INVALID_ARGUMENT if percentile is not between 0 .. 1</xqdoc:error>']},{isDocumented:!0,arity:2,name:"percentrank",qname:"math:percentrank",signature:"($numbers as double*, $x as double) as double",description:' Returns the rank of a value in a data set as a percentage of the data set.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n If x does not match one of the values in array,\n   PERCENTRANK interpolates to return the correct percentage rank. <br xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The formula is uses: (RANK - 1) / (size - 1) .<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.\n',summary:"<p> Returns the rank of a value in a data set as a percentage of the data set.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"double",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of numbers. The sequence can be of any length, from 1 up.</div>'},{name:"x",type:"double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is the value for which you want to know the rank</div>'}],returns:{type:"double",description:"The percentage of rank."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">math:INVALID_ARGUMENT if the sequence is zero length</xqdoc:error>']},{isDocumented:!0,arity:3,name:"prob",qname:"math:prob",signature:"($x_range as double+, $prob_range as double+, $range_lower_limit as double) as double",description:' This is the same as math:prob#4, only that upper_limit is not specified.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The probability is computed only for range_lower_limit.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.\n',summary:"<p> This is the same as math:prob#4, only that upper_limit is not specified.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"x_range",type:"double",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is the range of numeric values of x with which there are associated probabilities. This does not need to be ordered.</div>'},{name:"prob_range",type:"double",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is a set of probabilities associated with values in x_range.</div>'},{name:"range_lower_limit",type:"double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is the value for which you want a probability.</div>'}],returns:{type:"double",description:"The probability of the range_lower_limit value"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">math:INVALID_ARGUMENT if any probability is not between 0 and 1</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">math:INVALID_ARGUMENT if the sum of probabilities is not equal to 1</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">math:INVALID_ARGUMENT if x_range and prob_range do not have the same number of values</xqdoc:error>']},{isDocumented:!0,arity:4,name:"prob",qname:"math:prob",signature:"($x_range as double+, $prob_range as double+, $range_lower_limit as double, $upper_limit as double) as double",description:' Returns the probability that values in a range are between two limits.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.\n',summary:"<p> Returns the probability that values in a range are between two limits.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"x_range",type:"double",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is the range of numeric values of x with which there are associated probabilities. This does not need to be ordered.</div>'},{name:"prob_range",type:"double",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is a set of probabilities associated with values in x_range.</div>'},{name:"range_lower_limit",type:"double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is the lower bound on the value for which you want a probability.</div>'},{name:"upper_limit",type:"double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is the upper bound on the value for which you want a probability.</div>'}],returns:{type:"double",description:"The probability of the entire range"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">math:INVALID_ARGUMENT if any probability is not between 0 and 1</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">math:INVALID_ARGUMENT if the sum of probabilities is not equal to 1</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">math:INVALID_ARGUMENT if x_range and prob_range do not have the same number of values</xqdoc:error>']},{isDocumented:!0,arity:1,name:"product",qname:"math:product",signature:"($numbers as double*) as double",description:' Multiplies all the numbers given as arguments and returns the product.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.\n',summary:"<p> Multiplies all the numbers given as arguments and returns the product.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"double",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The sequence of arguments convertible to numeric types. The sequence can be of any length.</div>'}],returns:{type:"double",description:"The multiplication result as numeric type."},errors:[]},{isDocumented:!0,arity:2,name:"quartile",qname:"math:quartile",signature:"($numbers as double*, $quart as integer) as double",description:' Returns the quartile of a data set. <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.\n',summary:"<p> Returns the quartile of a data set.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"double",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> sequence of numbers. The sequence can be of any length, from 1 up.</div>'},{name:"quart",type:"integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> <dl>one of the values 0, 1, 2, 3, 4 with meaning: <dt>0</dt> <dd> compute minimum value</dd> <dt>1</dt> <dd> compute first quartile (25th percentile)</dd> <dt>2</dt> <dd> compute median value (50th percentile)</dd> <dt>3</dt> <dd> compute third quartile (75th percentile)</dd> <dt>4</dt> <dd> compute maximum value</dd></dl></div>'}],returns:{type:"double",description:"the computed quartile, as numeric type"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">math:INVALID_ARGUMENT if the sequence is zero length or $quart is not one of the values 0,1,3,4</xqdoc:error>']},{isDocumented:!0,arity:2,name:"quotient",qname:"math:quotient",signature:"($numerator as double, $denominator as double) as integer",description:' Returns the integer portion of a division.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.\n',summary:"<p> Returns the integer portion of a division.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numerator",type:"double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The divider.</div>'},{name:"denominator",type:"double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The divisor. It cannot be zero.</div>'}],returns:{type:"integer",description:"The result value as numeric type."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">math:DIVIDE_BY_0 if denominator casted as numeric type has value zero.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"rad-to-deg",qname:"math:rad-to-deg",signature:"($rad as double) as double",description:' Convert angle from radians to degrees. <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n',summary:"<p> Convert angle from radians to degrees.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"rad",type:"double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> value in radians</div>'}],returns:{type:"double",description:"value in degrees (-360, 360)"},errors:[]},{isDocumented:!0,arity:2,name:"rank",qname:"math:rank",signature:"($x as double, $numbers as double*) as double",description:' This RANK function is same as the above, only that $order_ascending is set by default to false.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.\n',summary:"<p> This RANK function is same as the above, only that $order_ascending is set by default to false.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"x",type:"double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The number whose rank you want to find.</div>'},{name:"numbers",type:"double",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of numbers. The sequence can be of any length.</div>'}],returns:{type:"double",description:"The rank of $x."},errors:[]},{isDocumented:!0,arity:3,name:"rank",qname:"math:rank",signature:"($x as double, $numbers as double*, $order_ascending as boolean) as double",description:' Returns the rank of a number in a list of numbers. <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The rank of a number is its size relative to other values in a list.\n (If you were to sort the list, the rank of the number would be its position.)\n RANK gives duplicate numbers the same rank.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.\n',summary:"<p> Returns the rank of a number in a list of numbers.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"x",type:"double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The number whose rank you want to find.</div>'},{name:"numbers",type:"double",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The sequence of numbers. The sequence can be of any length.</div>'},{name:"order_ascending",type:"boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> <dl>A boolean having the meaning: <dt>false</dt><dd>then rank the number as if the sequence was sorted in descending order.</dd> <dt>true</dt> <dd>then rank the number as if the sequence was sorted in ascending order.</dd></dl></div>'}],returns:{type:"double",description:"The rank of $x."},errors:[]},{isDocumented:!0,arity:1,name:"roman",qname:"math:roman",signature:"($number as integer) as string",description:' Converts an Arabic numeral to roman, as text.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Only the classic format is supported (out of all formats Excel requires).\n M is the largest digit, it represents 1000.\n Numbers bigger than 2000 will be represented by a sequence of "M".\n D = 500, C = 100, L = 50, X = 10, V = 5, I = 1.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.\n',summary:"<p> Converts an Arabic numeral to roman, as text.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"number",type:"integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A positive integer.</div>'}],returns:{type:"string",description:"The roman string representation."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">math:INVALID_ARGUMENT if the input integer is negative</xqdoc:error>']},{isDocumented:!0,arity:2,name:"round",qname:"math:round",signature:"($number as double, $precision as integer) as double",description:' Rounds a number to a specified number of digits.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n If precision is greater than 0 (zero), then number is rounded\n to the specified number of decimal places.\n If num_digits is 0, then number is rounded to the nearest integer.\n If num_digits is less than 0, then number is rounded to the left of the decimal point.\n The 0.5 is rounded away from zero. <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.\n',summary:"<p> Rounds a number to a specified number of digits.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"number",type:"double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The number to round.</div>'},{name:"precision",type:"integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The number of decimal places to keep.</div>'}],returns:{type:"double",description:"The rounded number as numeric type."},errors:[]},{isDocumented:!0,arity:2,name:"rounddown",qname:"math:rounddown",signature:"($number as double, $precision as integer) as double",description:' Rounds a number down, toward zero.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n If num_digits is greater than 0 (zero), then number is rounded down\n to the specified number of decimal places.\n If num_digits is 0, then number is rounded down to the nearest integer.\n If num_digits is less than 0, then number is rounded down to the left of the decimal point. <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.\n',summary:"<p> Rounds a number down, toward zero.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"number",type:"double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The number to round</div>'},{name:"precision",type:"integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The number of decimal places to keep.</div>'}],returns:{type:"double",description:"the truncated number toward zero, as numeric type."},errors:[]},{isDocumented:!0,arity:2,name:"roundup",qname:"math:roundup",signature:"($number as double, $precision as integer) as double",description:' Rounds a number up, away from 0 (zero).<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n If num_digits is greater than 0 (zero), then number is rounded down\n to the specified number of decimal places.\n If num_digits is 0, then number is rounded down to the nearest integer.\n If num_digits is less than 0, then number is rounded down to the left of the decimal point. <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.\n',summary:"<p> Rounds a number up, away from 0 (zero).</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"number",type:"double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The number to round</div>'},{name:"precision",type:"integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The number of decimal places to keep.</div>'}],returns:{type:"double",description:"The truncated number away from zero, as numeric type."},errors:[]},{isDocumented:!0,arity:1,name:"sign",qname:"math:sign",signature:"($number as double) as integer",description:' Determines the sign of a number. <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Returns 1 if the number is positive, zero (0) if the number is 0,\n and -1 if the number is negative.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.\n',summary:"<p> Determines the sign of a number.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"number",type:"double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The argument</div>'}],returns:{type:"integer",description:"The sign as (-1, 0, 1)."},errors:[]},{isDocumented:!0,arity:1,name:"sinh",qname:"math:sinh",signature:"($arg as double) as double external",description:" Calculate the hyperbolic sine.\n",summary:"<p> Calculate the hyperbolic sine.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the arg</div>'}],returns:{type:"double",description:"the result of sinh(arg)"},errors:[]},{isDocumented:!0,arity:2,name:"slope",qname:"math:slope",signature:"($known_y as double+, $known_x as double+) as double",description:' Returns the slope of the linear regression line through data points in known_y\'s and known_x\'s.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The slope is the vertical distance divided by the horizontal distance between\n   any two points on the line, which is the rate of change along the regression line.\n It computes the formula:<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n sum((x - average_x)(y - average_y)) / sum((x - average_x)^2)<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n where average_x and average_y are computed with AVERAGE function.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.\n',summary:"<p> Returns the slope of the linear regression line through data points in known_y's and known_x's.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"known_y",type:"double",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of y numbers. The sequence can be of any length, from 1 up.</div>'},{name:"known_x",type:"double",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of x numbers. The sequence can be of any length, from 1 up.</div>'}],returns:{type:"double",description:"The slope value, as numeric type"},errors:["<xqdoc:error xmlns:xqdoc=\"http://www.xqdoc.org/1.0\">math:INVALID_INPUT if there are different numbers of x's and y's or if the sequence is empty</xqdoc:error>",'<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">math:DIVIDE_BY_0 if all x\'s are equal</xqdoc:error>']},{isDocumented:!0,arity:2,name:"small",qname:"math:small",signature:"($numbers as double*, $k as integer) as double",description:' This function computes the k-th smallest value in a data set. <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Use this function to return values with a particular relative standing in a data set.\n If n is the number of data points in array, SMALL(array,1) equals the smallest value,\n   and SMALL(array,n) equals the largest value.\n Borrowed from excel module.\n',summary:"<p> This function computes the k-th smallest value in a data set.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"double",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A sequence of numbers. The sequence can be of any length, from 1 up.</div>'},{name:"k",type:"integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The position (from the smallest) in the sequence of data to return. Must have value between 1 and size of sequence.</div>'}],returns:{type:"double",description:"The k-th smallest value of $numbers."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">math:INVALID_ARGUMENT if the sequence is zero length or $k is not a value between 1 and the size of sequence.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"sort-numbers",qname:"math:sort-numbers",signature:"($numbers as double*) as double*",description:' Sorts a sequence of numbers or arguments castable to numeric.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n It first casts all arguments to numeric and then sorts ascending.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Helper function.<br xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.\n',summary:"<p> Sorts a sequence of numbers or arguments castable to numeric.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"double",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The sequence of arguments castable to numeric.</div>'}],returns:{type:"double*",description:"The sorted sequence as numeric types."},errors:[]},{isDocumented:!0,arity:3,name:"standardize",qname:"math:standardize",signature:"($x as double, $mean as double, $standard_dev as double) as double",description:' Returns a normalized value from a distribution characterized by mean and standard_dev.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The formula is (x - mean) / standard_dev .<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.\n',summary:"<p> Returns a normalized value from a distribution characterized by mean and standard_dev.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"x",type:"double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is the value you want to normalize</div>'},{name:"mean",type:"double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is the arithmetic mean of the distribution.</div>'},{name:"standard_dev",type:"double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is the standard deviation of the distribution.</div>'}],returns:{type:"double",description:"The normalized x, as numeric type"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">math:INVALID_ARGUMENT if standard_dev is a value smaller than zero or equal</xqdoc:error>']},{isDocumented:!0,arity:1,name:"stdev",qname:"math:stdev",signature:"($numbers as double+) as double",description:' Estimates standard deviation based on a sample. <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The standard deviation is a measure of how widely values are dispersed\n   from the average value (the mean).\n It is computed with formula:\n sqrt( sum((x-average_x)^2) / (n-1) )    = sqrt ( VAR(numbers) )<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.\n',summary:"<p> Estimates standard deviation based on a sample.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"double",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of numbers The sequence can be of any length, from 1 up.</div>'}],returns:{type:"double",description:"the standard deviation, as numeric type"},errors:[]},{isDocumented:!0,arity:1,name:"stdeva",qname:"math:stdeva",signature:"($numbers as double+) as double",description:' Estimates standard deviation based on a sample. <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The standard deviation is a measure of how widely values are dispersed\n   from the average value (the mean).\n It is computed with formula:\n sqrt( sum((x-average_x)^2) / (n-1) )    = sqrt ( VARA(numbers) )<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.\n',summary:"<p> Estimates standard deviation based on a sample.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"double",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of numbers. The sequence can be of any length, from 1 up.</div>'}],returns:{type:"double",description:"the standard deviation, as numeric type"},errors:[]},{isDocumented:!0,arity:1,name:"stdevp",qname:"math:stdevp",signature:"($numbers as double+) as double",description:' Calculates standard deviation based on the entire population given as arguments. <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The standard deviation is a measure of how widely values are dispersed from\n   the average value (the mean).\n It is computed with formula:\n sqrt( sum((x-average_x)^2) / n )    = sqrt ( VARP(numbers) )<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.\n',summary:"<p> Calculates standard deviation based on the entire population given as arguments.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"double",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of numbers or values castable to numeric The sequence can be of any length, from 1 up.</div>'}],returns:{type:"double",description:"the standard deviation, as numeric type"},errors:[]},{isDocumented:!0,arity:1,name:"stdevpa",qname:"math:stdevpa",signature:"($numbers as double+) as double",description:' Calculates standard deviation based on the entire population given as arguments. <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The standard deviation is a measure of how widely values are dispersed from\n   the average value (the mean).\n It is computed with formula:\n sqrt( sum((x-average_x)^2) / n )    = sqrt ( VARPA(numbers) )<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.\n',summary:"<p> Calculates standard deviation based on the entire population given as arguments.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"double",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of numbers or values castable to numeric The sequence can be of any length, from 1 up.</div>'}],returns:{type:"double",description:"the standard deviation, as numeric type"},errors:[]},{isDocumented:!0,arity:2,name:"subtotal",qname:"math:subtotal",signature:"($function_num as integer, $numbers as double*) as double",description:' Returns a subtotal in a sequence of numbers.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The function applied is given by $function_num.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.\n',summary:"<p> Returns a subtotal in a sequence of numbers.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"function_num",type:"integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> <dl>defines the function to be applied on sequence values. The possible values are: <dt>1 or 101</dt> <dd> AVERAGE</dd> <dt>2 or 102</dt> <dd> COUNT</dd> <dt>3 or 103</dt> <dd> COUNTA</dd> <dt>4 or 104</dt> <dd> MAX</dd> <dt>5 or 105</dt> <dd> MIN</dd> <dt>6 or 106</dt> <dd> PRODUCT</dd> <dt>7 or 107</dt> <dd> STDEV</dd> <dt>8 or 108</dt> <dd> STDEVP</dd> <dt>9 or 109</dt> <dd> SUM</dd> <dt>10 or 110</dt> <dd> VAR</dd> <dt>11 or 111</dt> <dd> VARP</dd></dl> In this implementation there is no difference between x and 10x.<br/></div>'},{name:"numbers",type:"double",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of numbers. The sequence can be of any length.</div>'}],returns:{type:"double",description:"The function result, as numeric type"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">* depends on the function called</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">math:INVALID_ARGUMENT if $function_num is not a value between 1 .. 11 or 101 .. 111</xqdoc:error>']},{isDocumented:!0,arity:2,name:"sumproduct",qname:"math:sumproduct",signature:"($array1 as double*, $array2 as double*) as double",description:' Multiplies the elements on the same position in each sequence\n and sums up the results.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.\n',summary:"<p> Multiplies the elements on the same position in each sequence\n and sums up the results.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"array1",type:"double",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers</div>'},{name:"array2",type:"double",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers</div>'}],returns:{type:"double",description:"the sum of products"},errors:[]},{isDocumented:!0,arity:1,name:"sumsq",qname:"math:sumsq",signature:"($numbers as double+) as double",description:' Returns the sum of the squares of the arguments.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n It uses the sumproduct function.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.\n',summary:"<p> Returns the sum of the squares of the arguments.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"double",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of one or more numbers</div>'}],returns:{type:"double",description:"the sum of squared values, as numeric type"},errors:[]},{isDocumented:!0,arity:1,name:"tanh",qname:"math:tanh",signature:"($arg as double) as double external",description:" Calculate the hyperbolic tangent.\n",summary:"<p> Calculate the hyperbolic tangent.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the arg</div>'}],returns:{type:"double",description:"the result of tanh(arg)"},errors:[]},{isDocumented:!0,arity:1,name:"trunc",qname:"math:trunc",signature:"($number as double) as integer",description:' Truncates a number to an integer by removing the fractional part of the number.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.\n',summary:"<p> Truncates a number to an integer by removing the fractional part of the number.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"number",type:"double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The argument .</div>'}],returns:{type:"integer",description:"The integer value."},errors:[]},{isDocumented:!0,arity:2,name:"trunc",qname:"math:trunc",signature:"($number as double, $precision as integer) as double",description:' Truncates a number down to precision.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n This behaves exactly like rounddown.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.\n',summary:"<p> Truncates a number down to precision.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"number",type:"double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The argument castable to numeric type.</div>'},{name:"precision",type:"integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The number of decimal places to keep .</div>'}],returns:{type:"double",description:"The integer value."},errors:[]},{isDocumented:!0,arity:1,name:"var",qname:"math:var",signature:"($numbers as double+) as double",description:' Estimates variance based on a sample.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The formula is sum(x - average_x)^2 / (n - 1).\n average_x is computed with AVERAGE function.\n n is the count of numbers from the sequence, excluding empty values.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.\n',summary:"<p> Estimates variance based on a sample.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"double",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of numbers. The sequence can be of any length, from 1 up.</div>'}],returns:{type:"double",description:"The variance, as numeric type"},errors:[]},{isDocumented:!0,arity:1,name:"vara",qname:"math:vara",signature:"($numbers as double+) as double",description:' Estimates variance based on a sample.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The formula is sum(x - average_x)^2 / (n - 1).\n average_x is computed with AVERAGE function.\n n is the size of sequence, including empty values.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.\n',summary:"<p> Estimates variance based on a sample.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"double",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of numbers. The sequence can be of any length, from 1 up.</div>'}],returns:{type:"double",description:"The variance, as numeric type"},errors:[]},{isDocumented:!0,arity:1,name:"varp",qname:"math:varp",signature:"($numbers as double+) as double",description:' Calculates variance based on the entire population.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The formula is sum(x - average_x)^2 / n.\n average_x is computed with AVERAGE function.\n n is the count of numbers from the sequence, excluding empty values.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.<br xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n',summary:"<p> Calculates variance based on the entire population.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"double",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of numbers. The sequence can be of any length, from 1 up.</div>'}],returns:{type:"double",description:"The variance, as numeric type"},errors:[]},{isDocumented:!0,arity:1,name:"varpa",qname:"math:varpa",signature:"($numbers as double+) as double",description:' Calculates variance based on the entire population.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The formula is sum(x - average_x)^2 / n.\n average_x is computed with AVERAGE function.\n n is the size of sequence, including empty values.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Borrowed from excel module.\n',summary:"<p> Calculates variance based on the entire population.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"double",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of numbers. The sequence can be of any length, from 1 up.</div>'}],returns:{type:"double",description:"The variance, as numeric type"},errors:[]}],variables:[]},"http://www.zorba-xquery.com/modules/oauth/error":{ns:"http://www.zorba-xquery.com/modules/oauth/error",description:" Module that defines the errors raised in Oauth modules.\n",sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Stephanie Russell</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://www.zorba-xquery.com/modules/oauth/error",prefix:"oerr"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[],variables:[{name:"oerr:errNS",type:"xs:string",description:" Errors namespace URI.\n"},{name:"oerr:OC001",type:"xs:QName",description:" xs:QName with namespace URI=\"http://www.zorba-xquery.com/modules/oauth/errors\" and local name 'OC001'. This signing method is not implemented yet.\n"},{name:"oerr:OC002",type:"xs:QName",description:" xs:QName with namespace URI=\"http://www.zorba-xquery.com/modules/oauth/errors\" and local name 'OC002'. This signing method is not supported.\n"},{name:"oerr:OC003",type:"xs:QName",description:" xs:QName with namespace URI=\"http://www.zorba-xquery.com/modules/oauth/errors\" and local name 'OC003'. Http 401 error.\n"},{name:"oerr:OC004",type:"xs:QName",description:" xs:QName with namespace URI=\"http://www.zorba-xquery.com/modules/oauth/errors\" and local name 'OC004'. Http 500 error.\n"},{name:"oerr:OC005",type:"xs:QName",description:" xs:QName with namespace URI=\"http://www.zorba-xquery.com/modules/oauth/errors\" and local name 'OC004'. Http 500 error.\n"}]},"http://jsoniq.org/functions":{ns:"http://jsoniq.org/functions",description:' This module contains all of the functions defined by the JSONiq\n specification (see http://jsoniq.org/).\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The module is always imported so you do not need to import it explicitly.\n Also, you do not need to fully qualify a function to invoke it.</p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Markos Zaharioudakis, Matthias Brantner, Ghislain Fourny</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://www.w3.org/2005/xqt-errors",prefix:"err"},{uri:"http://jsoniq.org/errors",prefix:"jerr"},{uri:"http://jsoniq.org/functions",prefix:"jn"},{uri:"http://jsoniq.org/types",prefix:"js"},{uri:"http://zorba.io/modules/schema",prefix:"schema"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"decode-from-roundtrip",qname:"jn:decode-from-roundtrip",signature:"($items as item()*) as item()* external",description:' This function decodes non-JSON types previously encoded with\n jn:encode-for-roundtrip.\n Calling this version of the function is equivalent to calling the\n 2 argument version of the function with the second argument\n   { "prefix" : "Q{http://jsoniq.org/roundtrip}" }\n',summary:"<p> This function decodes non-JSON types previously encoded with\n jn:encode-for-roundtrip.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"items",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the items to be decoded.</div>'}],returns:{type:"item()*",description:"the decoded items."},errors:[]},{isDocumented:!0,arity:2,name:"decode-from-roundtrip",qname:"jn:decode-from-roundtrip",signature:"($items as item()*, $options as object()) as item()* external",description:' This function decodes non-JSON types previously encoded with\n jn:encode-for-roundtrip.\n The $options parameter contains options for the decoding process.\n Currently the only supported option is "prefix". It specifies the prefix\n that determines if this function decodes an item.\n Example:\n   jn:decode-from-roundtrip(\n     { "nan" : { "pre-type" : "double", "pre-value" : "NaN" } },\n     { "prefix" : "pre-" }\n   )\n returns the same instance that would be constructed by\n   { "nan" : double("NaN") }\n So\n   let $decoded := jn:decode-from-roundtrip(\n           { "nan" : { "pre-type" : "double", "pre-value" : "NaN" } },\n           { "prefix" : "pre-" }\n       )\n   let $nan := $decoded("nan")\n   return\n       ($nan instance of double, $nan)\n returns\n   true NaN\n',summary:"<p> This function decodes non-JSON types previously encoded with\n jn:encode-for-roundtrip.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"items",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the items to be decoded.</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the decoding options.</div>'}],returns:{type:"item()*",description:"the decoded items."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">jerr:JNTY0023 if $options("prefix") is not a string</xqdoc:error>']},{isDocumented:!0,arity:1,name:"encode-for-roundtrip",qname:"jn:encode-for-roundtrip",signature:"($items as item()*) as item()* external",description:" This function recursively encodes non-JSON types in such a way that they\n can be serialized as JSON while keeping roundtrip capability.\n",summary:"<p> This function recursively encodes non-JSON types in such a way that they\n can be serialized as JSON while keeping roundtrip capability.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"items",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the items to be encoded.</div>'}],returns:{type:"item()*",description:"the encoded items."},errors:[]},{isDocumented:!0,arity:2,name:"encode-for-roundtrip",qname:"jn:encode-for-roundtrip",signature:"($items as item()*, $options as object()) as item()* external",description:' This function recursively encodes non-JSON types in such a way that they\n can be serialized as JSON while keeping roundtrip capability.\n Example:\n   jn:encode-for-roundtrip(\n     { "nan" : double("NaN") },\n     { "prefix" : "pre-" }\n   )\n returns\n   { "nan" : { "pre-type" : "double", "pre-value" : "NaN" } }\n',summary:"<p> This function recursively encodes non-JSON types in such a way that they\n can be serialized as JSON while keeping roundtrip capability.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"items",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the items to be encoded.</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the encoding options.</div>'}],returns:{type:"item()*",description:"the encoded items."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">jerr:JNTY0023 if $options("prefix") is not a string</xqdoc:error>']},{isDocumented:!0,arity:1,name:"flatten",qname:"jn:flatten",signature:"($items as item()*) as item()* external",description:' For each item in the given sequence, this function returns the item itself,\n if it is not an array, or a sequence of items "flattened-out" from the array.\n Flattening an array means replacing the array with its members, and recursively\n flattening any arrays in the members sequence.\n Note: The function is equivalent to\n   define function jn:flatten($args as item()*)\n   {\n     for $arg in args\n     return\n       if ($arg instance of array())\n       then\n         for $value in $arg[]\n         return\n           if ($value instance of array())\n           then jn:flatten($value[])\n           else $value\n       else\n         $arg\n   };\n',summary:'<p> For each item in the given sequence, this function returns the item itself,\n if it is not an array, or a sequence of items "flattened-out" from the array.</p>',annotation_str:"",annotations:[],updating:!1,parameters:[{name:"items",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A sequence of items</div>'}],returns:{type:"item()*",description:"The flattened-out items of the arrays in $items."},errors:[]},{isDocumented:!0,arity:1,name:"keys",qname:"jn:keys",signature:"($o as item()*) as string* external",description:" Returns the set of keys belonging to the objects found inside a given\n sequence of items. The keys are returned in an implementation-defined\n order. Duplicate keys are eliminated.\n",summary:"<p> Returns the set of keys belonging to the objects found inside a given\n sequence of items.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"o",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A sequence of items. Only object items are actually processed; items of any other kind are simply skipped.</div>'}],returns:{type:"string*",description:"The distinct keys of the objects in the input sequence."},errors:[]},{isDocumented:!0,arity:1,name:"members",qname:"jn:members",signature:"($a as item()*) as item()* external",description:" Returns the items belonging to the arrays found inside a given sequence\n of items. The items are returned in an implementation-defined order.\n",summary:"<p> Returns the items belonging to the arrays found inside a given sequence\n of items.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"a",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A sequence of items. Only array items are actually processed; items of any other kind are simply skipped.</div>'}],returns:{type:"item()*",description:"The members of the arrays in the input sequence."},errors:[]},{isDocumented:!0,arity:0,name:"null",qname:"jn:null",signature:"() as js:null external",description:" Returns the JSON null.\n",summary:"<p> Returns the JSON null.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"js:null",description:"The JSON null."},errors:[]},{isDocumented:!0,arity:1,name:"parse-json",qname:"jn:parse-json",signature:"($j as string?) as json-item()* external",description:" This function parses a given string as JSON and returns a sequence\n of Objects or Arrays.\n Please note that this function allows to parse sequences of whitespace\n separated objects and arrays.\n",summary:"<p> This function parses a given string as JSON and returns a sequence\n of Objects or Arrays.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"j",type:"string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A string containing a valid JSON text.</div>'}],returns:{type:"json-item()*",description:"A sequence of JSON Object or Array item."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">jerr:JNDY0021 if the given string is not valid JSON.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"parse-json",qname:"jn:parse-json",signature:"($j as string?, $o as object()) as json-item()* external",description:" This function parses a given string as JSON and returns a sequence\n of Objects or Arrays.\n",summary:"<p> This function parses a given string as JSON and returns a sequence\n of Objects or Arrays.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"j",type:"string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A string containing a valid JSON text.</div>'},{name:"o",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A JSON object defining options to configure the parser. Allowed options are <ul> <li>jsoniq-multiple-top-level-items: allow parsing of sequences of JSON Objects and Arrays (boolean; default: true)</li> <li>jsoniq-strip-top-level-array: if the top-level JSON item is an array, strip it and return its elements as multiple top-level items (boolean; default: false)</li> </ul></div>'}],returns:{type:"json-item()*",description:"a sequence of JSON Object or Array item."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">jerr:JNDY0021 if the given string is not valid JSON or if jsoniq-multiple-top-level-items is false and there is additional content after the first JSON Object or Array.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">jerr:JNTY0020 if the value for the option jsoniq-multiple-top-level-items is not of type boolean.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"project",qname:"jn:project",signature:"($items as item()*, $keys as string*) as item()* external",description:' For each item in the given sequence, this function returns the item itself,\n if it is not an object, or its "projected" copy if it is an object. Projecting\n an object by a set of keys means creating a new object from the specified pairs\n of the source object. Specifically, for each key in $keys, if the object has a\n pair with that key, then a copy of that pair is included in the new object.\n',summary:'<p> For each item in the given sequence, this function returns the item itself,\n if it is not an object, or its "projected" copy if it is an object.</p>',annotation_str:"",annotations:[],updating:!1,parameters:[{name:"items",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A sequence of items.</div>'},{name:"keys",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The keys of the pairs to include from each object in $items.</div>'}],returns:{type:"item()*",description:"The projection of the original sequence."},errors:[]},{isDocumented:!0,arity:1,name:"size",qname:"jn:size",signature:"($a as array()?) as integer? external",description:" Returns the size of a JSON array, or the empty sequence if no array is given.\n The size of an Array is the number of members contained within it.\n",summary:"<p> Returns the size of a JSON array, or the empty sequence if no array is given.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"a",type:"array()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0">rray A JSON array.</div>'}],returns:{type:"integer?",description:"The number of items in $array, or the empty sequence if $array is empty."},errors:[]},{isDocumented:!0,arity:2,name:"trim",qname:"jn:trim",signature:"($items as item()*, $keys as string*) as item()* external",description:' For each item in the given sequence, this function returns the item itself,\n if it is not an object, or its "trimmed" copy, if it is an object. Trimming\n an object by a set of keys means creating a new object containing all the\n pairs of the source object except the ones whose key appears in the given\n set of keys.\n',summary:'<p> For each item in the given sequence, this function returns the item itself,\n if it is not an object, or its "trimmed" copy, if it is an object.</p>',annotation_str:"",annotations:[],updating:!1,parameters:[{name:"items",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A sequence of items.</div>'},{name:"keys",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The keys of the pairs to exclude from each object in $items.</div>'}],returns:{type:"item()*",description:"The trimmed version of the input sequence."},errors:[]}],variables:[]},"http://zorba.io/modules/xqdoc":{ns:"http://zorba.io/modules/xqdoc",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n The goal of xqDoc is to provide a simple vendor neutral solution for\n documenting XQuery modules, as well as tools to generate a user friendly\n presentation of this documentation and cross referencing information.\n Therefore, xqDoc proposes a new commenting convention that extends the\n currently defined XQuery comment style. This convention is modeled\n after Java\'s Javadoc commenting style, and provides a simple, uniform\n way to document XQuery source code. You can find more information about\n xqDoc on the website of the <a href="http://xqdoc.org/">xqDoc project</a>.\n This library module provides XQDoc utility functions.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n Generating a user friendly presentation of the documentation is\n accomplished in the following steps:\n <ol>\n  <li>Module, variable, function, collection, and index declarations need\n      to be commented using the xqDoc commenting conventions. For example,\n      this module contains xqDoc-style comments</li>\n  <li>A xqDoc-enabled processor can parse such documentation and generate\n      a vendor neutral XML document which stores all the information about\n      the code and the comments. Such a document adheres to the xqDoc\n      Schema.</li>\n  <li>The information of an XML document generated by the second step,\n      can be transformed into arbitrary presentation formats\n      (e.g. html).</li>\n </ol>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This module implements the first and second step of this process.\n That is, Zorba can parse XQuery modules which are annotated with\n xqDoc-style documentation and generate the vendor neutral\n XML representation.\n </p>\n',sees:['<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0"><a href="http://xqdoc.org/" target="_blank">xqDoc specification</a></xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0"><a href="http://www.zorba-xquery.com/tutorials/xqdoc.html" target="_blank">xqDoc tutorial with Zorba</a></xqdoc:see>'],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Gabriel Petrovay</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://www.w3.org/2005/xqt-errors",prefix:"err"},{uri:"http://zorba.io/modules/fetch",prefix:"fetch"},{uri:"http://zorba.io/modules/xqdoc-options",prefix:"opt"},{uri:"http://zorba.io/modules/schema",prefix:"schema"},{uri:"http://zorba.io/options/versioning",prefix:"ver"},{uri:"http://zorba.io/modules/xqdoc",prefix:"xqd"},{uri:"http://zorba.io/errors",prefix:"zerr"}],functions:[{isDocumented:!0,arity:1,name:"xqdoc-content",qname:"xqd:xqdoc-content",signature:"($module as xs:string) as element(*)",description:" Generated the an XQDoc XML document for the module provided\n as parameter to this function.\n",summary:"<p> Generated the an XQDoc XML document for the module provided\n as parameter to this function.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"module",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The module (as string) for which to generate the XQDoc documentation.</div>'}],returns:{type:"element(*)",description:'An element according to the xqdoc schema (<tt xmlns:xqdoc="http://www.xqdoc.org/1.0">http://zorba.io/modules/xqdoc.xsd</tt>).'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr::ZXQD0002 if the xqdoc comments in the module contain invalid XML</xqdoc:error>']},{isDocumented:!0,arity:2,name:"xqdoc-content",qname:"xqd:xqdoc-content",signature:"($module as xs:string, $options as element(opt:enable)) as element(*)",description:" Generated the an XQDoc XML document for the module provided\n as parameter to this function.\n In comparison to the single parameter version, this function does not\n generate XQDoc for all language components. By default, the\n following components are deactivated: XQuery comments, import\n statements, variable declarations, function declarations, collection\n declarations,  and index declarations. The second parameter is used to\n enable the XQDoc generation of those components.\n",summary:"<p> Generated the an XQDoc XML document for the module provided\n as parameter to this function.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"module",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The module (as string) for which to generate the XQDoc documentation.</div>'},{name:"options",type:"element(opt:enable)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> XQDoc generation options, e.g.: <pre> &lt;enable xmlns="http://zorba.io/modules/xqdoc-options" comments="true" functions="true" indexes="true" &gt; </pre></div>'}],returns:{type:"element(*)",description:'An element according to the xqdoc schema (<tt xmlns:xqdoc="http://www.xqdoc.org/1.0">http://zorba.io/modules/xqdoc.xsd</tt>).'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr::ZXQD0002 if the xqdoc comments in the module contain invalid XML</xqdoc:error>']},{isDocumented:!0,arity:1,name:"xqdoc",qname:"xqd:xqdoc",signature:"($module-uri as xs:string) as element(*)",description:" Generates an XQDoc XML document for the module located\n at the URI provided as parameter to this function.\n",summary:"<p> Generates an XQDoc XML document for the module located\n at the URI provided as parameter to this function.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"module-uri",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The URL of the module for which to generate XQDoc.</div>'}],returns:{type:"element(*)",description:'An element according to the xqdoc schema (<tt xmlns:xqdoc="http://www.xqdoc.org/1.0">http://zorba.io/modules/xqdoc.xsd</tt>).'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr::ZXQD0002 if the xqdoc comments in the module contain invalid XML</xqdoc:error>']},{isDocumented:!0,arity:2,name:"xqdoc",qname:"xqd:xqdoc",signature:"($module-uri as xs:string, $options as element(opt:enable)) as element(*)",description:" Generates an XQDoc XML document for the module located\n at the URI provided as parameter to this function.\n In comparison to the single parameter version, this function does not\n generate XQDoc for all language components. By default, the\n following components are deactivated: XQuery comments, import\n statements, variable declarations, function declarations, collection\n declarations,  and index declarations. The second parameter is used to\n enable the XQDoc generation of those components.\n",summary:"<p> Generates an XQDoc XML document for the module located\n at the URI provided as parameter to this function.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"module-uri",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The URL of the module for which to generate XQDoc.</div>'},{name:"options",type:"element(opt:enable)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> XQDoc generation options, e.g.: <pre> &lt;enable xmlns="http://zorba.io/modules/xqdoc-options" comments="true" functions="true" indexes="true" /&gt; </pre></div>'}],returns:{type:"element(*)",description:'An element according to the xqdoc schema (<tt xmlns:xqdoc="http://www.xqdoc.org/1.0">http://zorba.io/modules/xqdoc.xsd</tt>).'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr::ZXQD0002 if the xqdoc comments in the module contain invalid XML</xqdoc:error>']}],variables:[]},"http://zorba.io/modules/data-cleaning/character-based-string-similarity":{ns:"http://zorba.io/modules/data-cleaning/character-based-string-similarity",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This library module provides character-based string similarity functions\n that view strings as sequences of characters, generally computing a similarity score\n that corresponds to the cost of transforming one string into another.\n These functions are particularly useful for matching near duplicate strings\n in the presence of typographical errors. </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The logic contained in this module is not specific to any particular XQuery implementation.</p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Bruno Martins and Diogo Simões</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/modules/data-cleaning/character-based-string-similarity",prefix:"simc"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:2,name:"edit-distance",qname:"simc:edit-distance",signature:"($s1 as xs:string, $s2 as xs:string) as xs:integer",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the edit distance between two strings.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This distance, also refered to as the Levenshtein distance, is defined as the minimum number\n of edits needed to transform one string into the other, with the allowable edit operations\n being insertion, deletion, or substitution of a single character.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery">edit-distance("FLWOR", "FLOWER")</pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery">2</pre></p>\n',summary:"<p>  Returns the edit distance between two strings.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s1",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The first string.</div>'},{name:"s2",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The second string.</div>'}],returns:{type:"xs:integer",description:"The edit distance between the two strings."},errors:[]},{isDocumented:!0,arity:4,name:"jaro-winkler",qname:"simc:jaro-winkler",signature:"($s1 as xs:string, $s2 as xs:string, $prefix as xs:integer, $fact as xs:double) as xs:double",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the Jaro-Winkler similarity coefficient between two strings.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This similarity coefficient corresponds to an extension of the Jaro similarity coefficient that weights or\n penalizes strings based on their similarity at the beginning of the string, up to a given prefix size.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery">jaro-winkler("DWAYNE", "DUANE", 4, 0.1 )</pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery">0.8577777777777778</pre></p>\n',summary:"<p>  Returns the Jaro-Winkler similarity coefficient between two strings.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s1",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The first string.</div>'},{name:"s2",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The second string.</div>'},{name:"prefix",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The number of characters to consider when testing for equal prefixes in the strings.</div>'},{name:"fact",type:"xs:double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The weighting factor to consider when the input strings have equal prefixes.</div>'}],returns:{type:"xs:double",description:"The Jaro-Winkler similarity coefficient between the two strings."},errors:[]},{isDocumented:!0,arity:2,name:"jaro",qname:"simc:jaro",signature:"($s1 as xs:string, $s2 as xs:string) as xs:double",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the Jaro similarity coefficient between two strings.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This similarity coefficient is based on the number of transposed characters and on a\n weighted sum of the percentage of matched characters held within the strings. The higher\n the Jaro-Winkler value is, the more similar the strings are. The coefficient is\n normalized such that 0 equates to no similarity and 1 is an exact match.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery">jaro("FLWOR Found.", "FLWOR Foundation")</pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery">0.5853174603174603</pre></p>\n',summary:"<p>  Returns the Jaro similarity coefficient between two strings.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s1",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The first string.</div>'},{name:"s2",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The second string.</div>'}],returns:{type:"xs:double",description:"The Jaro similarity coefficient between the two strings."},errors:[]},{isDocumented:!0,arity:4,name:"needleman-wunsch",qname:"simc:needleman-wunsch",signature:"($s1 as xs:string, $s2 as xs:string, $score as xs:integer, $penalty as xs:integer) as xs:double",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the Needleman-Wunsch distance between two strings.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The Needleman-Wunsch distance is similar to the basic edit distance metric, adding a\n variable cost adjustment to the cost of a gap (i.e., an insertion or deletion) in the\n distance metric.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery">needleman-wunsch("KAK", "KQRK", 1, 1)</pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery">0</pre></p>\n',summary:"<p>  Returns the Needleman-Wunsch distance between two strings.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s1",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The first string.</div>'},{name:"s2",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The second string.</div>'},{name:"score",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The score value.</div>'},{name:"penalty",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The penalty value.</div>'}],returns:{type:"xs:double",description:"The Needleman-Wunsch distance between the two strings."},errors:[]},{isDocumented:!0,arity:4,name:"smith-waterman",qname:"simc:smith-waterman",signature:"($s1 as xs:string, $s2 as xs:string, $score as xs:integer, $penalty as xs:integer) as xs:double",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the Smith-Waterman distance between two strings.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery">smith-waterman("ACACACTA", "AGCACACA", 2, 1)</pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery">12</pre></p>\n',summary:"<p>  Returns the Smith-Waterman distance between two strings.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s1",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The first string.</div>'},{name:"s2",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The second string.</div>'},{name:"score",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The score value.</div>'},{name:"penalty",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The penalty value.</div>'}],returns:{type:"xs:double",description:"The Smith-Waterman distance between the two strings."},errors:[]}],variables:[]},"http://expath.org/ns/error":{ns:"http://expath.org/ns/error",description:" This module defines all errors for the http-client module.\n",sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Markus Pilman</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://expath.org/ns/error",prefix:"err"}],functions:[],variables:[{name:"err:errNS",type:"xs:string",description:" Error namespace URI.\n"},{name:"err:HC001",type:"xs:QName",description:" An HTTP error occurred.\n"},{name:"err:HC002",type:"xs:QName",description:" Error parsing the entity content as XML or HTML.\n"},{name:"err:HC003",type:"xs:QName",description:" With a multipart response, the override-media-type must be either a multipart media type or application/octet-stream.\n"},{name:"err:HC004",type:"xs:QName",description:" The src attribute on the body element is mutually exclusive with all other attribute (except the media-type).\n"},{name:"err:HC005",type:"xs:QName",description:" The request element is not valid.\n"},{name:"err:HC006",type:"xs:QName",description:" A timeout occurred waiting for the response.\n"},{name:"err:HCV01",type:"xs:QName",description:" This error is not defined in the specification but used by the Zorba implementation.\n It gets thrown when the user gives wrong arguments which are statically correct,\n but make no sense (for example: http:send-request((), ())).\n"},{name:"err:HCV02",type:"xs:QName",description:" Zorba specific error\n This error is raised if trying to follow a redirect for a POST, PUT, or\n DELETE request\n"}]},"http://www.28msec.com/modules/s3":{ns:"http://www.28msec.com/modules/s3",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This module provides functionality for managing S3 buckets and object.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">It is not possible to access buckets whose names are not DNS-compliant. For\n instance a bucket name which contains uppercase letters or is longer than 63\n characters is not DNS-compliant. For additional details on bucket naming\n conventions refer to\n <a href="http://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html">\n Bucket Restrictions and Limitations</a>.</p>\n <h2 xmlns:xqdoc="http://www.xqdoc.org/1.0">Authentication</h2>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For each functionality two methods are provided:\n <ul>\n   <li>one which allows to specify the credentials to use, by means of the\n   optional $credentials parameter (named). If the parameter is not specified,\n   the default credentials in the "S3" category will be used. If the parameter\n   is specified it must be either a string or an object. If it is a string it\n   will be interpreted as the name of a credentials in the "S3" category. If\n   it is an object it must have the following structure:\n   <ul>\n     <li>accessKey: the AWS access key to use (string, mandatory).</li>\n     <li>secretKey: the AWS secret key to use (string, mandatory).</li>\n     <li>useHttps: whether to use secure HTTPS connections or not.\n     (boolean, optional). The default is <code>false</code></li>\n     <li>defaultBucket: the default bucket name (string, optional).</li>\n   </ul>\n   </li>\n   <li>one which does not allow to specify which credentials to use.\n   In this case the default credentials in the "S3" category will be used.</li>\n </ul>\n </p>\n <h2 xmlns:xqdoc="http://www.xqdoc.org/1.0" id="determinism">Important Notice Regarding Function Determinism</h2>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The non side-effecting functions:\n <ul>\n   <li><a href="?anchor=list-buckets-0">list-buckets#0</a></li>\n   <li><a href="?anchor=list-buckets-1">list-buckets#1</a></li>\n   <li><a href="?anchor=list-bucket-0">list-bucket#0</a></li>\n   <li><a href="?anchor=list-bucket-1">list-bucket#1</a></li>\n   <li><a href="?anchor=list-bucket-2">list-bucket#2</a></li>\n   <li><a href="?anchor=list-bucket-3">list-bucket#3</a></li>\n   <li><a href="?anchor=list-bucket-versions-0">list-bucket-versions#0</a></li>\n   <li><a href="?anchor=list-bucket-versions-1">list-bucket-versions#1</a></li>\n   <li><a href="?anchor=list-bucket-versions-2">list-bucket-versions#2</a></li>\n   <li><a href="?anchor=list-bucket-versions-3">list-bucket-versions#3</a></li>\n   <li><a href="?anchor=read-text-1">read-text#1</a></li>\n   <li><a href="?anchor=read-text-2">read-text#2</a></li>\n   <li><a href="?anchor=read-binary-1">read-binary#1</a></li>\n   <li><a href="?anchor=read-binary-2">read-binary#2</a></li>\n   <li><a href="?anchor=read-object-1">read-object#1</a></li>\n   <li><a href="?anchor=read-object-2">read-object#2</a></li>\n   <li><a href="?anchor=object-metadata-1">object-metadata#1</a></li>\n   <li><a href="?anchor=object-metadata-2">object-metadata#2</a></li>\n   <li><a href="?anchor=object-torrent-1">object-torrent#1</a></li>\n   <li><a href="?anchor=object-torrent-2">object-torrent#2</a></li>\n   <li><a href="?anchor=object-permissions-1">object-permissions#1</a></li>\n   <li><a href="?anchor=object-permissions-2">object-permissions#2</a></li>\n </ul>\n are declared deterministic, which means that their results could be cached\n when invoked multiple times with the same arguments in the same query execution.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">To not use cached results you can use the following alternative functions:\n <ul>\n   <li><a href="?anchor=list-buckets-nondeterministic-0">list-buckets-nondeterministic#0</a></li>\n   <li><a href="?anchor=list-buckets-nondeterministic-1">list-buckets-nondeterministic#1</a></li>\n   <li><a href="?anchor=list-bucket-nondeterministic-0">list-bucket-nondeterministic#0</a></li>\n   <li><a href="?anchor=list-bucket-nondeterministic-1">list-bucket-nondeterministic#1</a></li>\n   <li><a href="?anchor=list-bucket-nondeterministic-2">list-bucket-nondeterministic#2</a></li>\n   <li><a href="?anchor=list-bucket-nondeterministic-3">list-bucket-nondeterministic#3</a></li>\n   <li><a href="?anchor=list-bucket-versions-nondeterministic-0">list-bucket-versions-nondeterministic#0</a></li>\n   <li><a href="?anchor=list-bucket-versions-nondeterministic-1">list-bucket-versions-nondeterministic#1</a></li>\n   <li><a href="?anchor=list-bucket-versions-nondeterministic-2">list-bucket-versions-nondeterministic#2</a></li>\n   <li><a href="?anchor=list-bucket-versions-nondeterministic-3">list-bucket-versions-nondeterministic#3</a></li>\n   <li><a href="?anchor=read-text-nondeterministic-1">read-text-nondeterministic#1</a></li>\n   <li><a href="?anchor=read-text-nondeterministic-2">read-text-nondeterministic#2</a></li>\n   <li><a href="?anchor=read-binary-nondeterministic-1">read-binary-nondeterministic#1</a></li>\n   <li><a href="?anchor=read-binary-nondeterministic-2">read-binary-nondeterministic#2</a></li>\n   <li><a href="?anchor=read-object-nondeterministic-1">read-object-nondeterministic#1</a></li>\n   <li><a href="?anchor=read-object-nondeterministic-2">read-object-nondeterministic#2</a></li>\n   <li><a href="?anchor=object-metadata-nondeterministic-1">object-metadata-nondeterministic#1</a></li>\n   <li><a href="?anchor=object-metadata-nondeterministic-2">object-metadata-nondeterministic#2</a></li>\n   <li><a href="?anchor=object-torrent-nondeterministic-1">object-torrent-nondeterministic#1</a></li>\n   <li><a href="?anchor=object-torrent-nondeterministic-2">object-torrent-nondeterministic#2</a></li>\n   <li><a href="?anchor=object-permissions-nondeterministic-1">object-permissions-nondeterministic#1</a></li>\n   <li><a href="?anchor=object-permissions-nondeterministic-2">object-permissions-nondeterministic#2</a></li>\n </ul>\n which have been declared as being non deterministic.</p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Alexander Kreutz</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Federico Cavalieri</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://www.28msec.com/modules/credentials",prefix:"credentials"},{uri:"http://www.w3.org/2005/xqt-errors",prefix:"err"},{uri:"http://www.zorba-xquery.com/modules/cryptography/hmac",prefix:"hmac"},{uri:"http://zorba.io/modules/http-client",prefix:"http"},{uri:"http://jsoniq.org/errors",prefix:"jerr"},{uri:"http://www.28msec.com/modules/s3",prefix:"s3"},{uri:"http://s3.amazonaws.com/doc/2006-03-01/",prefix:"s3s"},{uri:"http://www.28msec.com/modules/sleep",prefix:"sleep"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:2,name:"copy-object",qname:"s3:copy-object",signature:"($s3-object-source as item(), $s3-object-target as item()) as item()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Copies an object already stored on s3 into a target bucket using the\n default credentials. If the target object already exists it will be overwritten.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The source object metadata is copied to the target object, unless new\n metadata is specified. In this case the target object will possess only the\n specified metadata.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Unless the permissions for the target are specified, the target object will\n have the "private" ACL, that is, the owner gets FULL_CONTROL, and no one else\n has access rights.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The source S3 object is specified through the $s3-object-source parameter.\n Either a string or a JSON object can be used. If a string is specified, it is\n interpreted as key for an object in the default bucket of the default\n credentials. If no default bucket is present in the default credentials, the\n <code>s3:BUCKET</code> error is raised. If a JSON object is used, it must have\n the following structure:\n <ul>\n   <li>key: the object key (string, mandatory).</li>\n   <li>bucket: the bucket name (string, optional). If this field is not present\n   and the default credentials do not have a default bucket, the\n   <code>s3:BUCKET</code> error is raised.</li>\n   <li>version: the object version (string, optional). If versioning is enabled\n   for the specified object and no version is specified the latest version of\n   the object will be copied. If specified, only that particular version of the\n   object will be copied.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The target S3 object is specified through the $s3-object-target parameter.\n Either a string or a JSON object can be used. If a string is specified and the\n default credentials contain a default bucket, the object will be copied in\n the credentials default bucket. Otherwise, the object will be copied in the\n source object bucket. If a JSON object is used, it must have the following\n structure:\n <ul>\n   <li>key: the object key (string, mandatory).</li>\n   <li>bucket: the bucket name (string, optional). If this field is not present\n   and the default credentials contain a default bucket, the object will be\n   copied in the credentials default bucket. Otherwise, the object will be\n   copied in the source object bucket.</li>\n   <li>metadata: an object specifying additional metadata. Each metadata is a\n   name-value pair and is represented as different fields (object, optional).\n   If not specified, the source object metadata will be copied to the target\n   object. Otherwise the target object metadata will be the specified one.</li>\n   <li>reducedRedundancy: whether to use reduced-redundancy or not (bool,\n   optional). Default is false.</li>\n   <li>permission: the permission to set (string, optional). It must be one of\n   "private", "public-read", "public-read-write", "authenticated-read",\n   "bucket-owner-read", "bucket-owner-full-control". For your convenience the\n   following variables can be used: <code>$s3:ACL-GRANT-PRIVATE</code>,\n   <code>$s3:ACL-GRANT-PUBLIC-READ</code>, <code>$s3:ACL-GRANT-PUBLIC-READ-WRITE</code>,\n   <code>$s3:ACL-GRANT-AUTHENTICATED-READ</code>, <code>$s3:ACL-GRANT-BUCKET-OWNER-READ</code>,\n   <code>$s3:ACL-GRANT-BUCKET-OWNER-FULL-CONTROL</code>. If this field is not\n   specified, the "private" ACL is used, that is, the owner gets FULL_CONTROL,\n   and no one else has access rights.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n let $s3-object-source :=\n {\n   "key" : "test.xml",\n   "bucket": "28msec"\n }\n let $s3-object-target :=\n {\n   "key" : "test-copy.xml",\n   "bucket": "28msec",\n   "permisstion": $s3:ACL-GRANT-PUBLIC-READ\n   "metadata":\n   {\n     "author": "28msec"\n   }\n }\n return s3:copy-object($s3-object-source, $s3-object-target)\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example return object:\n <pre>\n {\n   "sourceVersion": "3/L4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo",\n   "version": "QUpfdndhfd8438MNFDN93jdnJFkdmqnh893",\n   "lastModified": "2009-10-28T22:32:00",\n   "eTag": "\\"9b2cf535f27731c974343645a3985328\\"",\n   "expiration": "expiry-date=\\"Fri, 21 Dec 2012 00:00:00 GMT\\", rule-id=\\"Rule for testfile.txt\\""\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The fields in the returned object have the following meanings:\n <ul>\n   <li>sourceVersion: the version of the copied object. When you enable versioning,\n   Amazon S3 generates a random number for objects added to a bucket. The value\n   is UTF-8 encoded and URL ready. When the soruce object is copied in a bucket where\n   versioning has been suspended, the version ID is always null. (string, optional)</li>\n   <li>version: the version of the copied object. When you enable versioning,\n   Amazon S3 generates a random number for objects added to a bucket. The value\n   is UTF-8 encoded and URL ready. When the soruce object is copied in a bucket where\n   versioning has been suspended, the version ID is always null. (string, optional)</li>\n   <li>lastModified: the last modification date of the target object. (dateTime, optional)</li>\n   <li>eTag: the entity tag is a hash of the copeid object. The eTag only reflects\n   changes to the contents of an object, not its metadata. The eTag is determined\n   when an object is created. The eTag returned by this method is a quoted,\n   32-digit hexadecimal string representing the MD5 digest of the object data.\n   For other objects, the eTag may or may not be an MD5 digest of the object data.\n   (string, optional).</li>\n   <li>expiration: if the object expiration is configured (see\n   <a href="http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlifecycle.html">PUT Bucket lifecycle</a>),\n   this field is present. It includes the expiry-date and rule-id key value\n   pairs providing object expiration information. The value of rule-id is URL\n   encoded.(string, optional).</li>\n </ul>\n </p>\n',summary:"<p>  Copies an object already stored on s3 into a target bucket using the\n default credentials.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"s3-object-source",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The S3 object or object version to copy from.</div>'},{name:"s3-object-target",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The S3 object to write to.</div>'}],returns:{type:"item()*",description:"the S3 copy result."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the default S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OBJECT if the object specification is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the used credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:RESPONSE the response received from S3 cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:3,name:"copy-object",qname:"s3:copy-object",signature:"($credentials as item()?, $s3-object-source as item(), $s3-object-target as item()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Copies an object already stored on S3 into a target bucket using the\n specified credentials. If the target object already exists it will be overwritten.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The source object metadata is copied to the target object, unless new\n metadata is specified. In this case the target object will possess only the\n specified metadata.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Unless the permissions for the target are specified, the target object will\n have the "private" ACL, that is, the owner gets FULL_CONTROL, and no one else\n has access rights.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The source S3 object is specified through the $s3-object-source parameter.\n Either a string or a JSON object can be used. If a string is specified, it is\n interpreted as key for an object in the default bucket of the specified\n credentials. If no default bucket is present in the specified credentials, the\n <code>s3:BUCKET</code> error is raised. If a JSON object is used, it must have\n the following structure:\n <ul>\n   <li>key: the object key (string, mandatory).</li>\n   <li>bucket: the bucket name (string, optional). If this field is not present\n   and the specified credentials do not have a default bucket, the\n   <code>s3:BUCKET</code> error is raised.</li>\n   <li>version: the object version (string, optional). If versioning is enabled\n   for the specified object and no version is specified the latest version of\n   the object will be copied. If specified, only that particular version of the\n   object will be copied.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The target S3 object is specified through the $s3-object-target parameter.\n Either a string or a JSON object can be used. If a string is specified and the\n specified credentials contain a default bucket, the object will be copied in\n the credentials default bucket. Otherwise, the object will be copied in the\n source object bucket. If a JSON object is used, it must have the following\n structure:\n <ul>\n   <li>key: the object key (string, mandatory).</li>\n   <li>bucket: the bucket name (string, optional). If this field is not present\n   and the specified credentials contain a default bucket, the object will be\n   copied in the credentials default bucket. Otherwise, the object will be\n   copied in the source object bucket.</li>\n   <li>metadata: an object specifying additional metadata. Each metadata is a\n   name-value pair and is represented as different fields (object, optional).\n   If not specified, the source object metadata will be copied to the target\n   object. Otherwise the target object metadata will be the specified one.</li>\n   <li>reducedRedundancy: whether to use reduced-redundancy or not (bool,\n   optional). Default is false.</li>\n   <li>permission: the permission to set (string, optional). It must be one of\n   "private", "public-read", "public-read-write", "authenticated-read",\n   "bucket-owner-read", "bucket-owner-full-control". For your convenience the\n   following variables can be used: <code>$s3:ACL-GRANT-PRIVATE</code>,\n   <code>$s3:ACL-GRANT-PUBLIC-READ</code>, <code>$s3:ACL-GRANT-PUBLIC-READ-WRITE</code>,\n   <code>$s3:ACL-GRANT-AUTHENTICATED-READ</code>, <code>$s3:ACL-GRANT-BUCKET-OWNER-READ</code>,\n   <code>$s3:ACL-GRANT-BUCKET-OWNER-FULL-CONTROL</code>. If this field is not\n   specified, the "private" ACL is used, that is, the owner gets FULL_CONTROL,\n   and no one else has access rights.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n let $s3-object-source :=\n {\n   "key" : "test.xml",\n   "bucket": "28msec"\n }\n let $s3-object-target :=\n {\n   "key" : "test-copy.xml",\n   "bucket": "28msec",\n   "permisstion": $s3:ACL-GRANT-PUBLIC-READ\n   "metadata":\n   {\n     "author": "28msec"\n   }\n }\n return s3:copy-object("credentials", $s3-object-source, $s3-object-target)\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example return object:\n <pre>\n {\n   "sourceVersion": "3/L4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo",\n   "version": "QUpfdndhfd8438MNFDN93jdnJFkdmqnh893",\n   "lastModified": "2009-10-28T22:32:00",\n   "eTag": "\\"9b2cf535f27731c974343645a3985328\\"",\n   "expiration": "expiry-date=\\"Fri, 21 Dec 2012 00:00:00 GMT\\", rule-id=\\"Rule for testfile.txt\\""\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The fields in the returned object have the following meanings:\n <ul>\n   <li>sourceVersion: the version of the copied object. When you enable versioning,\n   Amazon S3 generates a random number for objects added to a bucket. The value\n   is UTF-8 encoded and URL ready. When the soruce object is copied in a bucket where\n   versioning has been suspended, the version ID is always null. (string, optional)</li>\n   <li>version: the version of the copied object. When you enable versioning,\n   Amazon S3 generates a random number for objects added to a bucket. The value\n   is UTF-8 encoded and URL ready. When the soruce object is copied in a bucket where\n   versioning has been suspended, the version ID is always null. (string, optional)</li>\n   <li>lastModified: the last modification date of the target object. (dateTime, optional)</li>\n   <li>eTag: the entity tag is a hash of the copeid object. The eTag only reflects\n   changes to the contents of an object, not its metadata. The eTag is determined\n   when an object is created. The eTag returned by this method is a quoted,\n   32-digit hexadecimal string representing the MD5 digest of the object data.\n   For other objects, the eTag may or may not be an MD5 digest of the object data.\n   (string, optional).</li>\n </ul>\n </p>\n',summary:"<p>  Copies an object already stored on S3 into a target bucket using the\n specified credentials.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"credentials",type:"item()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The credentials to use.</div>'},{name:"s3-object-source",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The S3 object or object version to copy from.</div>'},{name:"s3-object-target",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The S3 object to write to.</div>'}],returns:{type:"object()",description:"the S3 copy result."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the specified S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OBJECT if the object specification is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the used credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:RESPONSE the response received from S3 cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:1,name:"create-bucket",qname:"s3:create-bucket",signature:"($bucket as string) as empty-sequence()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Creates a bucket using the default S3 credentials. The bucket owner will\n be the account of the default S3 credentials.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The bucket is created with the S3 default bucket settings. Specifically,\n it is created in the US Standard region and the default credentials\n account becomes its owner. The bucket ACL permissions are set to "private",\n that is, the owner gets FULL_CONTROL, whereas no one else has access rights.\n The bucket name must comply with the following rules:\n <ul>\n   <li>bucket names must be no more than 255 characters long.</li>\n   <li>bucket names must be a combination of uppercase letters, lowercase letters,\n   numbers, periods (.), dashes (-) and underscores (_).</li>\n </ul>\n For more details, refer to the\n <a href="http://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html">\n Amazon S3 Bucket Restrictions</a> page.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If the specified bucket already exists in the US Standard region and has\n the same owner, its permissions settings are reset and its contents are\n preserved. Otherwise, if the specified bucket already exists an s3:REQUEST\n error is raised.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n s3:create-bucket("28msec");\n </pre>\n </p>\n',summary:"<p>  Creates a bucket using the default S3 credentials.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"bucket",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The bucket name.</div>'}],returns:{type:"empty-sequence()",description:"the empty sequence"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the default S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>']},{isDocumented:!0,arity:2,name:"create-bucket",qname:"s3:create-bucket",signature:"($credentials as item()?, $bucket as string) as empty-sequence()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Creates a bucket using the specified S3 credentials. The bucket owner will\n be the account of the specified S3 credentials.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The bucket is created with the S3 default bucket settings. Specifically,\n it is created in the US Standard region and the specified credentials\n account becomes its owner. The bucket ACL permissions are set to "private",\n that is, the owner gets FULL_CONTROL, whereas no one else has access rights.\n The bucket name must comply with the following rules:\n <ul>\n   <li>bucket names must be no more than 255 characters long.</li>\n   <li>bucket names must be a combination of uppercase letters, lowercase letters,\n   numbers, periods (.), dashes (-) and underscores (_).</li>\n </ul>\n For more details, refer to the\n <a href="http://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html">\n Amazon S3 Bucket Restrictions</a> page.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If the specified bucket already exists in the US Standard region and has\n the same owner, its permissions settings are reset and its contents are\n preserved. Otherwise, if the specified bucket already exists an s3:REQUEST\n error is raised.</p>\n',summary:"<p>  Creates a bucket using the specified S3 credentials.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"credentials",type:"item()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The credentials to use.</div>'},{name:"bucket",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The bucket name.</div>'}],returns:{type:"empty-sequence()",description:"the empty sequence"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the specified S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>']},{isDocumented:!0,arity:1,name:"delete-bucket",qname:"s3:delete-bucket",signature:"($bucket as string) as empty-sequence()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Deletes a bucket using the default S3 credentials. The bucket must be owned\n by the account of the default S3 credentials.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This operation will fail if the deleted bucket is not empty. All objects,\n object versions, and delete markers have to be deleted beforehand using this\n function.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n s3:delete-bucket("28msec");\n </pre>\n </p>\n',summary:"<p>  Deletes a bucket using the default S3 credentials.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"bucket",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The bucket name.</div>'}],returns:{type:"empty-sequence()",description:"the empty sequence"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the default S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>']},{isDocumented:!0,arity:2,name:"delete-bucket",qname:"s3:delete-bucket",signature:"($credentials as item()?, $bucket as string) as empty-sequence()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Deletes a bucket using the specified S3 credentials. The bucket must be owned\n by the account of the specified S3 credentials.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This operation will fail if the deleted bucket is not empty. All objects,\n object versions, and delete markers have to be deleted beforehand using this\n function.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n s3:delete-bucket("credentials", "28msec");\n </pre>\n </p>\n',summary:"<p>  Deletes a bucket using the specified S3 credentials.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"credentials",type:"item()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The credentials to use.</div>'},{name:"bucket",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The bucket name.</div>'}],returns:{type:"empty-sequence()",description:"the empty sequence"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the specified S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>']},{isDocumented:!0,arity:1,name:"delete-object",qname:"s3:delete-object",signature:"($s3-object as item()) as empty-sequence()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Deletes an object or a specific object version from a bucket using the\n default S3 credentials.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The S3 object is specified through the $s3-object parameter. Either a string\n or a JSON object can be used. If a string is specified, it is interpreted as\n key for an object in the default bucket of the default credentials. If no default\n bucket is present in the default credentials, the <code>s3:BUCKET</code> error\n is raised. If a JSON object is used, it must have the following structure:\n <ul>\n   <li>key: the object key (string, mandatory).</li>\n   <li>bucket: the bucket name (string, optional). If this field is not present\n   and the default credentials do not have a default bucket, the\n   <code>s3:BUCKET</code> error is raised.</li>\n   <li>version: the object version (string, optional). If not specified, the\n   null version of the object is removed, if there is one. To remove a specific\n   version, this field must be specified.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If the bucket is versioned a delete marker is inserted for the object. If\n mfa-deletion is enabled you will not be able to delete an object through\n this method. If the specified bucket exists, and the specified object does not\n exist no errors will be raised.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n s3:delete-object(\n {\n   "key": "test.xml",\n   "bucket": "28msec",\n   "version": "3/L4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo"\n });\n </pre>\n </p>\n',summary:"<p>  Deletes an object or a specific object version from a bucket using the\n default S3 credentials.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"s3-object",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The S3 object or object version to delete.</div>'}],returns:{type:"empty-sequence()",description:"the empty sequence"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the default S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OBJECT if the object specification is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the used credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:RESPONSE the response received from S3 cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:2,name:"delete-object",qname:"s3:delete-object",signature:"($credentials as item()?, $s3-object as item()) as empty-sequence()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Deletes an object or a specific object version from a bucket using the\n specified S3 credentials.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The S3 object is specified through the $s3-object parameter. Either a string\n or a JSON object can be used. If a string is specified, it is interpreted as\n key for an object in the default bucket of the specified credentials. If no default\n bucket is present in the specified credentials, the <code>s3:BUCKET</code> error\n is raised. If a JSON object is used, it must have the following structure:\n <ul>\n   <li>key: the object key (string, mandatory).</li>\n   <li>bucket: the bucket name (string, optional). If this field is not present\n   and the specified credentials do not have a default bucket, the\n   <code>s3:BUCKET</code> error is raised.</li>\n   <li>version: the object version (string, optional). If not specified, the\n   null version of the object is removed, if there is one. To remove a specific\n   version, this field must be specified.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If the bucket is versioned a delete marker is inserted for the object. If\n mfa-deletion is enabled you will not be able to delete an object through\n this method. If the specified bucket exists, and the specified object does not\n exist no errors will be raised.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n s3:delete-object("credentials",\n {\n   "key": "test.xml",\n   "bucket": "28msec",\n   "version": "3/L4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo"\n });\n </pre>\n </p>\n',summary:"<p>  Deletes an object or a specific object version from a bucket using the\n specified S3 credentials.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"credentials",type:"item()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The credentials to use.</div>'},{name:"s3-object",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The S3 object or object version to delete.</div>'}],returns:{type:"empty-sequence()",description:"the empty sequence"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the specified S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OBJECT if the object specification is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the used credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:RESPONSE the response received from S3 cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:0,name:"list-bucket-nondeterministic",qname:"s3:list-bucket-nondeterministic",signature:"() as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Lists the objects in the default bucket of the default S3 credentials.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#list-bucket-0">list-bucket#0</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Lists the objects in the default bucket of the default S3 credentials.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[],returns:{type:"object()",description:"the list of objects in the default bucket of the default S3 credentials"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the specified S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no default bucket is present in the default S3 credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OPTIONS if the specified options are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:RESPONSE the response received from S3 cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:1,name:"list-bucket-nondeterministic",qname:"s3:list-bucket-nondeterministic",signature:"($bucket as string?) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Lists the objects in a bucket using the default S3 credentials.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#list-bucket-1">list-bucket#1</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Lists the objects in a bucket using the default S3 credentials.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"bucket",type:"string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The bucket to list. If the empty sequence is given, the default bucket of the default S3 credentials will be listed.</div>'}],returns:{type:"object()",description:"the list of the objects in the specified bucket."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the specified S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the used credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OPTIONS if the specified options are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:RESPONSE the response received from S3 cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:2,name:"list-bucket-nondeterministic",qname:"s3:list-bucket-nondeterministic",signature:"($bucket as string?, $options as object()?) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Lists the objects in a bucket using the default S3 credentials.\n This method allows the specification of additional listing options.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#list-bucket-2">list-bucket#2</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Lists the objects in a bucket using the default S3 credentials.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"bucket",type:"string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The bucket to list. If the empty sequence is given, the default bucket of the default S3 credentials will be listed.</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The listing options.</div>'}],returns:{type:"object()",description:"the list of the object in the specified bucket"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the specified S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the default credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OPTIONS if the specified options are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:RESPONSE the response received from S3 cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:3,name:"list-bucket-nondeterministic",qname:"s3:list-bucket-nondeterministic",signature:"($credentials as item()?, $bucket as string?, $options as object()?) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Lists the objects in a bucket using the specified credentials.\n This method allows the specification of additional listing options.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#list-bucket-3">list-bucket#3</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Lists the objects in a bucket using the specified credentials.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"credentials",type:"item()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The credentials to use.</div>'},{name:"bucket",type:"string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The bucket to list. If the empty sequence is given, the default bucket of the specified credentials will be listed.</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The listing options.</div>'}],returns:{type:"object()",description:"the list of the object in the specified bucket"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the specified S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the used credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OPTIONS if the specified options are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:RESPONSE the response received from S3 cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:0,name:"list-bucket-versions-nondeterministic",qname:"s3:list-bucket-versions-nondeterministic",signature:"() as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Lists the objects versions in the default bucket of the default S3\n credentials.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#list-bucket-versions-0">list-bucket-versions#0</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Lists the objects versions in the default bucket of the default S3\n credentials.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[],returns:{type:"object()",description:"the list of the object versions in the default bucket of the default S3 credentials"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the specified S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no default bucket is present in the default S3 credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OPTIONS if the specified options are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:RESPONSE the response received from S3 cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:1,name:"list-bucket-versions-nondeterministic",qname:"s3:list-bucket-versions-nondeterministic",signature:"($bucket as string?) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Lists the objects versions in a bucket using the default S3 credentials.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#list-bucket-versions-1">list-bucket-versions#1</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Lists the objects versions in a bucket using the default S3 credentials.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"bucket",type:"string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The bucket to list. If the empty sequence is given, the default bucket of the default credentials will be listed.</div>'}],returns:{type:"object()",description:"the list of the object versions in the specified bucket"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the specified S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the used credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OPTIONS if the specified options are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:RESPONSE the response received from S3 cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:2,name:"list-bucket-versions-nondeterministic",qname:"s3:list-bucket-versions-nondeterministic",signature:"($bucket as string?, $options as object()?) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Lists the objects versions in a bucket using the default S3 credentials.\n This method allows the specification of additional listing options.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#list-bucket-versions-2">list-bucket-versions#2</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Lists the objects versions in a bucket using the default S3 credentials.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"bucket",type:"string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The bucket to list. If the empty sequence is given, the default bucket of the default credentials will be listed.</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The listing options.</div>'}],returns:{type:"object()",description:"the list of the object versions in the specified bucket"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the specified S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the default credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OPTIONS if the specified options are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:RESPONSE the response received from S3 cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:3,name:"list-bucket-versions-nondeterministic",qname:"s3:list-bucket-versions-nondeterministic",signature:"($credentials as item()?, $bucket as string?, $options as object()?) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Lists the objects versions in a bucket using the specified credentials.\n This method allows the specification of additional listing options.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#list-bucket-versions-3">list-bucket-versions#3</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Lists the objects versions in a bucket using the specified credentials.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"credentials",type:"item()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The credentials to use.</div>'},{name:"bucket",type:"string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The bucket to list. If the empty sequence is given, the default bucket of the specified credentials will be listed.</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The listing options.</div>'}],returns:{type:"object()",description:"the list of the object in the specified bucket"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the specified S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the used credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OPTIONS if the specified options are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:RESPONSE the response received from S3 cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:0,name:"list-bucket-versions",qname:"s3:list-bucket-versions",signature:"() as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Lists the objects versions in the default bucket of the default S3\n credentials.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n s3:list-bucket-versions()\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example return object:\n <pre>\n {\n   "name": "bucket",\n   "prefix": "",\n   "keyMarker" : "image.jpg",\n   "versionIdMarker" : "QUpfdndhfd8438MNFDN93jdnJFkdmqnh893",\n   "nextKeyMarker": "marker",\n   "nextVersionIdMarker": "UIORUnfndfhnw89493jJFJ",\n   "maxKeys": 1,\n   "delimiter": "/",\n   "isTruncated": true,\n   "revisions":\n   [\n     {\n       "kind": "Version",\n       "key": "image.jpg",\n       "versionId": "QUpfdndhfd8438MNFDN93jdnJFkdmqnh893",\n       "isLatest": false,\n       "lastModified": "2009-10-12T17:50:30.000Z",\n       "eTag": "\\"fba9dede5f27731c9771645a39863328\\"",\n       "size": 434234,\n       "storageClass": "STANDARD",\n       "owner":\n       {\n         "id": "75aa57f09aa0c8caeab4f8c24e99d10f8e7faeebf76c078efc7c6caea54ba06a"\n         "displayName": "mtd@amazon.com"\n       }\n     },\n     {\n       "kind": "DeleteMarker",\n       "key": "image.jpg",\n       "versionId": "03jpff543dhffds434rfdsFDN943fdsFkdmqnh892",\n       "isLatest": true,\n       "lastModified": "2009-10-12T17:50:30.000Z",\n       "owner":\n       {\n         "id": "75aa57f09aa0c8caeab4f8c24e99d10f8e7faeebf76c078efc7c6caea54ba06a"\n         "displayName": "mtd@amazon.com"\n       }\n     }\n   ],\n   "commonPrefixes": ["photos/"]\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The fields in the returned object have the following meanings:\n <ul>\n   <li>name: the bucket name (string, mandatory).</li>\n   <li>prefix: the used prefix (string, mandatory).</li>\n   <li>keyMarker: indicates from which key in the listing begins\n   (string, mandatory).</li>\n   <li>versionMarker: indicates from which version  the listing begins\n   (string, optional).</li>\n   <li>nextKeyMarker: when the number of responses exceeds the value of maxKeys,\n   nextKeyMarker specifies the first key not returned that satisfies the search\n   criteria. Use this value for the keyMarker request parameter in a subsequent\n   request. (string, optional)</li>\n   <li>nextVersionMarker: when the number of responses exceeds the value of maxKeys,\n   nextVersionIdMarker specifies the first object version not returned that\n   satisfies the search criteria. Use this value for the versionMarker request\n   parameter in a subsequent request. (string, optional)</li>\n   <li>maxKeys: the maximum number of keys returned in the response body\n   (integer, mandatory).</li>\n   <li>delimiter: the used delimiter (string, optional).</li>\n   <li>isTruncated: whether or not all of the results were returned. All of the\n   results may not be returned if the number of results exceeds that specified\n   by the maxKeys request parameter (boolean, mandatory).</li>\n   <li>revisions: an array of objects listing the bucket object versions\n   (array, mandatory). The fields of each contained object have the following\n   meaning:\n   <ul>\n     <li>kind: the revision kind. One of "Version" or "DeleteMarker" (string,\n     mandatory).</li>\n     <li>key: the object key (string, mandatory).</li>\n     <li>versionId: the object version id (string, mandatory).</li>\n     <li>lastModified: the object last modification date (dateTime, mandatory).</li>\n     <li>eTag: the entity tag is a hash of the object. The eTag only reflects\n     changes to the contents of an object, not its metadata. The eTag is determined\n     when an object is created. For objects created by the PUT Object operation\n     and the POST Object operation, the eTag is a quoted, 32-digit hexadecimal\n     string representing the MD5 digest of the object data. For other objects,\n     the eTag may or may not be an MD5 digest of the object data. If the eTag is\n     not an MD5 digest of the object data, it will contain one or more non-hexadecimal\n     characters and/or will consist of less than 32 or more than 32 hexadecimal\n     digits.(string, mandatory for "Version" objects, not present for\n     "DeleteMarker" objects).</li>\n     <li>size: the object size in bytes (integer, mandatory for "Version" objects,\n     not present for "DeleteMarker" objects).</li>\n     <li>storageClass: the object storage class. One of "STANDARD",\n     "REDUCED_REDUNDANCY" or "GLACIER" (string, mandatory for "Version" objects,\n     not present for "DeleteMarker" objects).</li>\n     <li>owner: an object which specifies the owner of the object (object,\n     optional). It has the following fields:\n     <ul>\n       <li>id: the user identifier of the object owner (string, mandatory).</li>\n       <li>displayName: the screen name of the object owner (string, mandatory).</li>\n     </ul>\n     </li>\n   </ul>\n   </li>\n   <li>commonPrefixes: an array of strings which contains the list of the common\n   prefixes. It can be present only when the delimiter request parameter is\n   specified (array, optional).</li>\n </ul>\n </p>\n',summary:"<p>  Lists the objects versions in the default bucket of the default S3\n credentials.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"object()",description:"the list of the object versions in the default bucket of the default S3 credentials"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the specified S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no default bucket is present in the default S3 credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OPTIONS if the specified options are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:RESPONSE the response received from S3 cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:1,name:"list-bucket-versions",qname:"s3:list-bucket-versions",signature:"($bucket as string?) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Lists the objects versions in a bucket using the default S3 credentials.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n s3:list-bucket-versions("28msec")\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example return object:\n <pre>\n {\n   "name": "bucket",\n   "prefix": "",\n   "keyMarker" : "image.jpg",\n   "versionIdMarker" : "QUpfdndhfd8438MNFDN93jdnJFkdmqnh893",\n   "nextKeyMarker": "marker",\n   "nextVersionIdMarker": "UIORUnfndfhnw89493jJFJ",\n   "maxKeys": 1,\n   "delimiter": "/",\n   "isTruncated": true,\n   "revisions":\n   [\n     {\n       "kind": "Version",\n       "key": "image.jpg",\n       "versionId": "QUpfdndhfd8438MNFDN93jdnJFkdmqnh893",\n       "isLatest": false,\n       "lastModified": "2009-10-12T17:50:30.000Z",\n       "eTag": "\\"fba9dede5f27731c9771645a39863328\\"",\n       "size": 434234,\n       "storageClass": "STANDARD",\n       "owner":\n       {\n         "id": "75aa57f09aa0c8caeab4f8c24e99d10f8e7faeebf76c078efc7c6caea54ba06a"\n         "displayName": "mtd@amazon.com"\n       }\n     },\n     {\n       "kind": "DeleteMarker",\n       "key": "image.jpg",\n       "versionId": "03jpff543dhffds434rfdsFDN943fdsFkdmqnh892",\n       "isLatest": true,\n       "lastModified": "2009-10-12T17:50:30.000Z",\n       "owner":\n       {\n         "id": "75aa57f09aa0c8caeab4f8c24e99d10f8e7faeebf76c078efc7c6caea54ba06a"\n         "displayName": "mtd@amazon.com"\n       }\n     }\n   ],\n   "commonPrefixes": ["photos/"]\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The fields in the returned object have the following meanings:\n <ul>\n   <li>name: the bucket name (string, mandatory).</li>\n   <li>prefix: the used prefix (string, mandatory).</li>\n   <li>keyMarker: indicates from which key in the listing begins\n   (string, mandatory).</li>\n   <li>versionMarker: indicates from which version  the listing begins\n   (string, optional).</li>\n   <li>nextKeyMarker: when the number of responses exceeds the value of maxKeys,\n   nextKeyMarker specifies the first key not returned that satisfies the search\n   criteria. Use this value for the keyMarker request parameter in a subsequent\n   request. (string, optional)</li>\n   <li>nextVersionMarker: when the number of responses exceeds the value of maxKeys,\n   nextVersionIdMarker specifies the first object version not returned that\n   satisfies the search criteria. Use this value for the versionMarker request\n   parameter in a subsequent request. (string, optional)</li>\n   <li>maxKeys: the maximum number of keys returned in the response body\n   (integer, mandatory).</li>\n   <li>delimiter: the used delimiter (string, optional).</li>\n   <li>isTruncated: whether or not all of the results were returned. All of the\n   results may not be returned if the number of results exceeds that specified\n   by the maxKeys request parameter (boolean, mandatory).</li>\n   <li>revisions: an array of objects listing the bucket object versions\n   (array, mandatory). The fields of each contained object have the following\n   meaning:\n   <ul>\n     <li>kind: the revision kind. One of "Version" or "DeleteMarker" (string,\n     mandatory).</li>\n     <li>key: the object key (string, mandatory).</li>\n     <li>versionId: the object version id (string, mandatory).</li>\n     <li>lastModified: the object last modification date (dateTime, mandatory).</li>\n     <li>eTag: the entity tag is a hash of the object. The eTag only reflects\n     changes to the contents of an object, not its metadata. The eTag is determined\n     when an object is created. For objects created by the PUT Object operation\n     and the POST Object operation, the eTag is a quoted, 32-digit hexadecimal\n     string representing the MD5 digest of the object data. For other objects,\n     the eTag may or may not be an MD5 digest of the object data. If the eTag is\n     not an MD5 digest of the object data, it will contain one or more non-hexadecimal\n     characters and/or will consist of less than 32 or more than 32 hexadecimal\n     digits.(string, mandatory for "Version" objects, not present for\n     "DeleteMarker" objects).</li>\n     <li>size: the object size in bytes (integer, mandatory for "Version" objects,\n     not present for "DeleteMarker" objects).</li>\n     <li>storageClass: the object storage class. One of "STANDARD",\n     "REDUCED_REDUNDANCY" or "GLACIER" (string, mandatory for "Version" objects,\n     not present for "DeleteMarker" objects).</li>\n     <li>owner: an object which specifies the owner of the object (object,\n     optional). It has the following fields:\n     <ul>\n       <li>id: the user identifier of the object owner (string, mandatory).</li>\n       <li>displayName: the screen name of the object owner (string, mandatory).</li>\n     </ul>\n     </li>\n   </ul>\n   </li>\n   <li>commonPrefixes: an array of strings which contains the list of the common\n   prefixes. It can be present only when the delimiter request parameter is\n   specified (array, optional).</li>\n </ul>\n </p>\n',summary:"<p>  Lists the objects versions in a bucket using the default S3 credentials.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"bucket",type:"string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The bucket to list. If the empty sequence is given, the default bucket of the default credentials will be listed.</div>'}],returns:{type:"object()",description:"the list of the object versions in the specified bucket"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the specified S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the used credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OPTIONS if the specified options are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:RESPONSE the response received from S3 cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:2,name:"list-bucket-versions",qname:"s3:list-bucket-versions",signature:"($bucket as string?, $options as object()?) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Lists the objects versions in a bucket using the default S3 credentials.\n This method allows the specification of additional listing options.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n let $options :=\n {\n   "delimiter": "/",\n   "maxKeys": 2,\n   "keyMarker": "image.jpg",\n   "versionIdMarker" : "QUpfdndhfd8438MNFDN93jdnJFkdmqnh893"\n }\n return s3:list-bucket-versions("28msec", $options)\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The options object must have the following structure:\n <ul>\n   <li>delimiter: the delimiter marks where the listed results stop. For example,\n       a delimiter / lists all objects starting with $prefix plus arbitrary\n       characters but not / (string, optional). Default is the empty string,\n       that is, all objects are listed.</li>\n   <li>keyMarker: specifies a key as starting point; following keys (lexicographically\n       greater than the marker) in alphabetical order are listed (string, optional).\n       Default is the empty string, that is, all objects are listed.</li>\n   <li>versionMarker: specifies the object version you want starting from;\n       following revisions (newer than the marker) are listed (string, optional).\n       By default all versions are listed. Empty string is not allowed.</li>\n   <li>maxKeys: the maximum number of keys returned. If more keys than maxKeys\n       can be fetched, the result contains <IsTruncated>true</IsTruncated>\n       (integer, optional). Default is 1000.</li>\n   <li>prefix: only keys starting with the prefix are returned (string, optional).\n       Default is the empty string, that is, all objects are listed.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example return object:\n <pre>\n {\n   "name": "bucket",\n   "prefix": "",\n   "keyMarker" : "image.jpg",\n   "versionIdMarker" : "QUpfdndhfd8438MNFDN93jdnJFkdmqnh893",\n   "nextKeyMarker": "marker",\n   "nextVersionIdMarker": "UIORUnfndfhnw89493jJFJ",\n   "maxKeys": 1,\n   "delimiter": "/",\n   "isTruncated": true,\n   "revisions":\n   [\n     {\n       "kind": "Version",\n       "key": "image.jpg",\n       "versionId": "QUpfdndhfd8438MNFDN93jdnJFkdmqnh893",\n       "isLatest": false,\n       "lastModified": "2009-10-12T17:50:30.000Z",\n       "eTag": "\\"fba9dede5f27731c9771645a39863328\\"",\n       "size": 434234,\n       "storageClass": "STANDARD",\n       "owner":\n       {\n         "id": "75aa57f09aa0c8caeab4f8c24e99d10f8e7faeebf76c078efc7c6caea54ba06a"\n         "displayName": "mtd@amazon.com"\n       }\n     },\n     {\n       "kind": "DeleteMarker",\n       "key": "image.jpg",\n       "versionId": "03jpff543dhffds434rfdsFDN943fdsFkdmqnh892",\n       "isLatest": true,\n       "lastModified": "2009-10-12T17:50:30.000Z",\n       "owner":\n       {\n         "id": "75aa57f09aa0c8caeab4f8c24e99d10f8e7faeebf76c078efc7c6caea54ba06a"\n         "displayName": "mtd@amazon.com"\n       }\n     }\n   ],\n   "commonPrefixes": ["photos/"]\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The fields in the returned object have the following meanings:\n <ul>\n   <li>name: the bucket name (string, mandatory).</li>\n   <li>prefix: the used prefix (string, mandatory).</li>\n   <li>keyMarker: indicates from which key in the listing begins\n   (string, mandatory).</li>\n   <li>versionMarker: indicates from which version  the listing begins\n   (string, optional).</li>\n   <li>nextKeyMarker: when the number of responses exceeds the value of maxKeys,\n   nextKeyMarker specifies the first key not returned that satisfies the search\n   criteria. Use this value for the keyMarker request parameter in a subsequent\n   request. (string, optional)</li>\n   <li>nextVersionMarker: when the number of responses exceeds the value of maxKeys,\n   nextVersionIdMarker specifies the first object version not returned that\n   satisfies the search criteria. Use this value for the versionMarker request\n   parameter in a subsequent request. (string, optional)</li>\n   <li>maxKeys: the maximum number of keys returned in the response body\n   (integer, mandatory).</li>\n   <li>delimiter: the used delimiter (string, optional).</li>\n   <li>isTruncated: whether or not all of the results were returned. All of the\n   results may not be returned if the number of results exceeds that specified\n   by the maxKeys request parameter (boolean, mandatory).</li>\n   <li>revisions: an array of objects listing the bucket object versions\n   (array, mandatory). The fields of each contained object have the following\n   meaning:\n   <ul>\n     <li>kind: the revision kind. One of "Version" or "DeleteMarker" (string,\n     mandatory).</li>\n     <li>key: the object key (string, mandatory).</li>\n     <li>versionId: the object version id (string, mandatory).</li>\n     <li>lastModified: the object last modification date (dateTime, mandatory).</li>\n     <li>eTag: the entity tag is a hash of the object. The eTag only reflects\n     changes to the contents of an object, not its metadata. The eTag is determined\n     when an object is created. For objects created by the PUT Object operation\n     and the POST Object operation, the eTag is a quoted, 32-digit hexadecimal\n     string representing the MD5 digest of the object data. For other objects,\n     the eTag may or may not be an MD5 digest of the object data. If the eTag is\n     not an MD5 digest of the object data, it will contain one or more non-hexadecimal\n     characters and/or will consist of less than 32 or more than 32 hexadecimal\n     digits.(string, mandatory for "Version" objects, not present for\n     "DeleteMarker" objects).</li>\n     <li>size: the object size in bytes (integer, mandatory for "Version" objects,\n     not present for "DeleteMarker" objects).</li>\n     <li>storageClass: the object storage class. One of "STANDARD",\n     "REDUCED_REDUNDANCY" or "GLACIER" (string, mandatory for "Version" objects,\n     not present for "DeleteMarker" objects).</li>\n     <li>owner: an object which specifies the owner of the object (object,\n     optional). It has the following fields:\n     <ul>\n       <li>id: the user identifier of the object owner (string, mandatory).</li>\n       <li>displayName: the screen name of the object owner (string, mandatory).</li>\n     </ul>\n     </li>\n   </ul>\n   </li>\n   <li>commonPrefixes: an array of strings which contains the list of the common\n   prefixes. It can be present only when the delimiter request parameter is\n   specified (array, optional).</li>\n </ul>\n </p>\n',summary:"<p>  Lists the objects versions in a bucket using the default S3 credentials.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"bucket",type:"string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The bucket to list. If the empty sequence is given, the default bucket of the default credentials will be listed.</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The listing options.</div>'}],returns:{type:"object()",description:"the list of the object versions in the specified bucket"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the specified S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the default credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OPTIONS if the specified options are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:RESPONSE the response received from S3 cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:3,name:"list-bucket-versions",qname:"s3:list-bucket-versions",signature:"($credentials as item()?, $bucket as string?, $options as object()?) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Lists the objects versions in a bucket using the specified credentials.\n This method allows the specification of additional listing options.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n let $options :=\n {\n   "delimiter": "/",\n   "maxKeys": 2,\n   "keyMarker": "image.jpg",\n   "versionIdMarker": "QUpfdndhfd8438MNFDN93jdnJFkdmqnh893"\n }\n return s3:list-bucket-versions("credentials", "28msec", $options)\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The options object must have the following structure:\n <ul>\n   <li>delimiter: the delimiter marks where the listed results stop. For example,\n       a delimiter / lists all objects starting with $prefix plus arbitrary\n       characters but not / (string, optional). Default is the empty string,\n       that is, all objects are listed.</li>\n   <li>keyMarker: specifies a key as starting point; following keys (lexicographically\n       greater than the marker) in alphabetical order are listed (string, optional).\n       Default is the empty string, that is, all objects are listed.</li>\n   <li>versionMarker: specifies the object version you want starting from;\n       following revisions (newer than the marker) are listed (string, optional).\n       By default all versions are listed. Empty string is not allowed.</li>\n   <li>maxKeys: the maximum number of keys returned. If more keys than maxKeys\n       can be fetched, the result contains <IsTruncated>true</IsTruncated>\n       (integer, optional). Default is 1000.</li>\n   <li>prefix: only keys starting with the prefix are returned (string, optional).\n       Default is the empty string, that is, all objects are listed.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example return object:\n <pre>\n {\n   "name": "bucket",\n   "prefix": "",\n   "keyMarker" : "image.jpg",\n   "VersionIdMarker" : "QUpfdndhfd8438MNFDN93jdnJFkdmqnh893",\n   "nextKeyMarker": "marker",\n   "nextVersionIdMarker": "UIORUnfndfhnw89493jJFJ",\n   "maxKeys": 1,\n   "delimiter": "/",\n   "isTruncated": true,\n   "revisions":\n   [\n     {\n       "kind": "Version",\n       "key": "image.jpg",\n       "versionId": "QUpfdndhfd8438MNFDN93jdnJFkdmqnh893",\n       "isLatest": false,\n       "lastModified": "2009-10-12T17:50:30.000Z",\n       "eTag": "\\"fba9dede5f27731c9771645a39863328\\"",\n       "size": 434234,\n       "storageClass": "STANDARD",\n       "owner":\n       {\n         "id": "75aa57f09aa0c8caeab4f8c24e99d10f8e7faeebf76c078efc7c6caea54ba06a"\n         "displayName": "mtd@amazon.com"\n       }\n     },\n     {\n       "kind": "DeleteMarker",\n       "key": "image.jpg",\n       "versionId": "03jpff543dhffds434rfdsFDN943fdsFkdmqnh892",\n       "isLatest": true,\n       "lastModified": "2009-10-12T17:50:30.000Z",\n       "owner":\n       {\n         "id": "75aa57f09aa0c8caeab4f8c24e99d10f8e7faeebf76c078efc7c6caea54ba06a"\n         "displayName": "mtd@amazon.com"\n       }\n     }\n   ],\n   "commonPrefixes": ["photos/"]\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The fields in the returned object have the following meanings:\n <ul>\n   <li>name: the bucket name (string, mandatory).</li>\n   <li>prefix: the used prefix (string, mandatory).</li>\n   <li>keyMarker: indicates from which key in the listing begins\n   (string, mandatory).</li>\n   <li>versionMarker: indicates from which version  the listing begins\n   (string, optional).</li>\n   <li>nextKeyMarker: when the number of responses exceeds the value of maxKeys,\n   nextKeyMarker specifies the first key not returned that satisfies the search\n   criteria. Use this value for the keyMarker request parameter in a subsequent\n   request. (string, optional)</li>\n   <li>nextVersionMarker: when the number of responses exceeds the value of maxKeys,\n   nextVersionIdMarker specifies the first object version not returned that\n   satisfies the search criteria. Use this value for the versionMarker request\n   parameter in a subsequent request. (string, optional)</li>\n   <li>maxKeys: the maximum number of keys returned in the response body\n   (integer, mandatory).</li>\n   <li>delimiter: the used delimiter (string, optional).</li>\n   <li>isTruncated: whether or not all of the results were returned. All of the\n   results may not be returned if the number of results exceeds that specified\n   by the maxKeys request parameter (boolean, mandatory).</li>\n   <li>revisions: an array of objects listing the bucket object versions\n   (array, mandatory). The fields of each contained object have the following\n   meaning:\n   <ul>\n     <li>kind: the revision kind. One of "Version" or "DeleteMarker" (string,\n     mandatory).</li>\n     <li>key: the object key (string, mandatory).</li>\n     <li>versionId: the object version id (string, mandatory).</li>\n     <li>lastModified: the object last modification date (dateTime, mandatory).</li>\n     <li>eTag: the entity tag is a hash of the object. The eTag only reflects\n     changes to the contents of an object, not its metadata. The eTag is determined\n     when an object is created. For objects created by the PUT Object operation\n     and the POST Object operation, the eTag is a quoted, 32-digit hexadecimal\n     string representing the MD5 digest of the object data. For other objects,\n     the eTag may or may not be an MD5 digest of the object data. If the eTag is\n     not an MD5 digest of the object data, it will contain one or more non-hexadecimal\n     characters and/or will consist of less than 32 or more than 32 hexadecimal\n     digits.(string, mandatory for "Version" objects, not present for\n     "DeleteMarker" objects).</li>\n     <li>size: the object size in bytes (integer, mandatory for "Version" objects,\n     not present for "DeleteMarker" objects).</li>\n     <li>storageClass: the object storage class. One of "STANDARD",\n     "REDUCED_REDUNDANCY" or "GLACIER" (string, mandatory for "Version" objects,\n     not present for "DeleteMarker" objects).</li>\n     <li>owner: an object which specifies the owner of the object (object,\n     optional). It has the following fields:\n     <ul>\n       <li>id: the user identifier of the object owner (string, mandatory).</li>\n       <li>displayName: the screen name of the object owner (string, mandatory).</li>\n     </ul>\n     </li>\n   </ul>\n   </li>\n   <li>commonPrefixes: an array of strings which contains the list of the common\n   prefixes. It can be present only when the delimiter request parameter is\n   specified (array, optional).</li>\n </ul>\n </p>\n',summary:"<p>  Lists the objects versions in a bucket using the specified credentials.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"credentials",type:"item()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The credentials to use.</div>'},{name:"bucket",type:"string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The bucket to list. If the empty sequence is given, the default bucket of the specified credentials will be listed.</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The listing options.</div>'}],returns:{type:"object()",description:"the list of the object in the specified bucket"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the specified S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the used credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OPTIONS if the specified options are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:RESPONSE the response received from S3 cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:0,name:"list-bucket",qname:"s3:list-bucket",signature:"() as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Lists the objects in the default bucket of the default S3 credentials.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n s3:list-bucket("28msec")\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example return object:\n <pre>\n {\n   "name": "28msec",\n   "prefix": "",\n   "marker" : "",\n   "nextMarker": "marker",\n   "maxKeys": 1,\n   "delimiter": "",\n   "isTruncated": true,\n   "contents":\n   [\n     {\n       "key": "image.jpg",\n       "lastModified": "2009-10-12T17:50:30.000Z",\n       "eTag": "\\"fba9dede5f27731c9771645a39863328\\"",\n       "size": 434234,\n       "storageClass": "STANDARD"\n       "owner":\n       {\n         "id": "75aa57f09aa0c8caeab4f8c24e99d10f8e7faeebf76c078efc7c6caea54ba06a"\n         "displayName": "mtd@amazon.com"\n       }\n     }\n   ]\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The fields in the returned object have the following meanings:\n <ul>\n   <li>name: the bucket name (string, mandatory).</li>\n   <li>prefix: the used prefix (string, mandatory).</li>\n   <li>marker: indicates where in the bucket listing begins (string, mandatory).</li>\n   <li>nextMarker: when the response is truncated, you can use the key name\n   in this field as marker in the subsequent request to get next set of objects.\n   Amazon S3 lists objects in alphabetical order. This field is returned only\n   if you have specified the delimiter request parameter. If the response does\n   not include the nextMaker field and it is truncated, you can use the value\n   of the last Key in the response as the marker in the subsequent request to\n   get the next set of object keys. (string, optional)</li>\n   <li>maxKeys: the maximum number of keys returned in the response body\n   (integer, mandatory).</li>\n   <li>delimiter: the used delimiter (string, optional).</li>\n   <li>isTruncated: whether or not all of the results were returned. All of the\n   results may not be returned if the number of results exceeds that specified\n   by the maxKeys request parameter (boolean, mandatory).</li>\n   <li>contents: an array of objects listing the bucket content  (array, mandatory).\n   The fields of each contained object have the following meaning:\n   <ul>\n     <li>key: the object key (string, mandatory).</li>\n     <li>lastModified: the object last modification date (dateTime, mandatory).</li>\n     <li>eTag: the entity tag is a hash of the object. The eTag only reflects\n     changes to the contents of an object, not its metadata. The eTag is determined\n     when an object is created. For objects created by the PUT Object operation\n     and the POST Object operation, the eTag is a quoted, 32-digit hexadecimal\n     string representing the MD5 digest of the object data. For other objects,\n     the eTag may or may not be an MD5 digest of the object data. If the eTag is\n     not an MD5 digest of the object data, it will contain one or more non-hexadecimal\n     characters and/or will consist of less than 32 or more than 32 hexadecimal\n     digits.(string, mandatory).</li>\n     <li>storageClass: the object storage class. One of "STANDARD",\n     "REDUCED_REDUNDANCY" or "GLACIER" (string, mandatory).</li>\n     <li>owner: an object which specifies the owner of the object (object,\n     optional). It has the following fields:\n     <ul>\n       <li>id: the user identifier of the object owner (string, mandatory).</li>\n       <li>displayName: the screen name of the object owner (string, mandatory).</li>\n     </ul>\n     </li>\n   </ul>\n   </li>\n </ul>\n </p>\n',summary:"<p>  Lists the objects in the default bucket of the default S3 credentials.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"object()",description:"the list of objects in the default bucket of the default S3 credentials"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the specified S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no default bucket is present in the default S3 credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OPTIONS if the specified options are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:RESPONSE the response received from S3 cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:1,name:"list-bucket",qname:"s3:list-bucket",signature:"($bucket as string?) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Lists the objects in a bucket using the default S3 credentials.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n s3:list-bucket("28msec")\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example return object:\n <pre>\n {\n   "name": "28msec",\n   "prefix": "",\n   "marker" : "",\n   "nextMarker": "marker",\n   "maxKeys": 1,\n   "delimiter": "",\n   "isTruncated": true,\n   "contents":\n   [\n     {\n       "key": "image.jpg",\n       "lastModified": "2009-10-12T17:50:30.000Z",\n       "eTag": "\\"fba9dede5f27731c9771645a39863328\\"",\n       "size": 434234,\n       "storageClass": "STANDARD"\n       "owner":\n       {\n         "id": "75aa57f09aa0c8caeab4f8c24e99d10f8e7faeebf76c078efc7c6caea54ba06a"\n         "displayName": "mtd@amazon.com"\n       }\n     }\n   ]\n }\n </pre>\n The meanings of the fields in the return object are the following:\n <ul>\n   <li>name: the bucket name (string, mandatory).</li>\n   <li>prefix: the used prefix (string, mandatory).</li>\n   <li>marker: indicates where in the bucket listing begins (string, mandatory).</li>\n   <li>nextMarker: when the response is truncated, you can use the key name\n   in this field as marker in the subsequent request to get next set of objects.\n   Amazon S3 lists objects in alphabetical order. This field is returned only\n   if you have specified the delimiter request parameter. If the response does\n   not include the nextMaker field and it is truncated, you can use the value\n   of the last Key in the response as the marker in the subsequent request to\n   get the next set of object keys. (string, optional)</li>\n   <li>maxKeys: the maximum number of keys returned in the response body\n   (integer, mandatory).</li>\n   <li>delimiter: the used delimiter (string, optional).</li>\n   <li>isTruncated: whether or not all of the results were returned. All of the\n   results may not be returned if the number of results exceeds that specified\n   by the maxKeys request parameter (boolean, mandatory).</li>\n   <li>contents: an array of objects listing the bucket content  (array, mandatory).\n   The fields of each contained object have the following meaning:\n   <ul>\n     <li>key: the object key (string, mandatory).</li>\n     <li>lastModified: the object last modification date (dateTime, mandatory).</li>\n     <li>eTag: the entity tag is a hash of the object. The eTag only reflects\n     changes to the contents of an object, not its metadata. The eTag is determined\n     when an object is created. For objects created by the PUT Object operation\n     and the POST Object operation, the eTag is a quoted, 32-digit hexadecimal\n     string representing the MD5 digest of the object data. For other objects,\n     the eTag may or may not be an MD5 digest of the object data. If the eTag is\n     not an MD5 digest of the object data, it will contain one or more non-hexadecimal\n     characters and/or will consist of less than 32 or more than 32 hexadecimal\n     digits.(string, mandatory).</li>\n     <li>storageClass: the object storage class. One of "STANDARD",\n     "REDUCED_REDUNDANCY" or "GLACIER" (string, mandatory).</li>\n     <li>owner: an object which specifies the owner of the object (object,\n     optional). It has the following fields:\n     <ul>\n       <li>id: the user identifier of the object owner (string, mandatory).</li>\n       <li>displayName: the screen name of the object owner (string, mandatory).</li>\n     </ul>\n     </li>\n   </ul>\n   </li>\n </ul>\n </p>\n',summary:"<p>  Lists the objects in a bucket using the default S3 credentials.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"bucket",type:"string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The bucket to list. If the empty sequence is given, the default bucket of the default S3 credentials will be listed.</div>'}],returns:{type:"object()",description:"the list of the objects in the specified bucket."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the specified S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the used credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OPTIONS if the specified options are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:RESPONSE the response received from S3 cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:2,name:"list-bucket",qname:"s3:list-bucket",signature:"($bucket as string?, $options as object()?) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Lists the objects in a bucket using the default S3 credentials.\n This method allows the specification of additional listing options.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n let $options :=\n {\n   "delimiter": "/",\n   "marker": "",\n   "maxKeys": 1,\n   "prefix": ""\n }\n return s3:list-bucket("credentials", "28msec", $options)\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The options object must have the following structure:\n <ul>\n   <li>delimiter: the delimiter marks where the listed results stop. For example,\n       a delimiter / lists all objects starting with $prefix plus arbitrary\n       characters but not / (string, optional). Default is the empty string,\n       that is, all objects are listed.</li>\n   <li>marker: specifies a key as starting point; following keys (lexicographically\n       greater than the marker) in alphabetical order are listed (string, optional).\n       Default is the empty string, that is, all objects are listed.</li>\n   <li>maxKeys: the maximum number of keys returned. If more keys than maxKeys\n       can be fetched, the result contains <IsTruncated>true</IsTruncated>\n       (integer, optional). Default is 1000.</li>\n   <li>prefix: only keys starting with the prefix are returned (string, optional).\n       Default is the empty string, that is, all objects are listed.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example return object:\n <pre>\n {\n   "name": "bucket",\n   "prefix": "",\n   "marker" : "",\n   "nextMarker": "marker",\n   "maxKeys": 1,\n   "delimiter": "/",\n   "isTruncated": true,\n   "contents":\n   [\n     {\n       "key": "image.jpg",\n       "lastModified": "2009-10-12T17:50:30.000Z",\n       "eTag": "\\"fba9dede5f27731c9771645a39863328\\"",\n       "size": 434234,\n       "storageClass": "STANDARD"\n       "owner":\n       {\n         "id": "75aa57f09aa0c8caeab4f8c24e99d10f8e7faeebf76c078efc7c6caea54ba06a"\n         "displayName": "mtd@amazon.com"\n       }\n     }\n   ],\n   "commonPrefixes": ["photos/"]\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The fields in the returned object have the following meanings:\n <ul>\n   <li>name: the bucket name (string, mandatory).</li>\n   <li>prefix: the used prefix (string, mandatory).</li>\n   <li>marker: indicates where in the bucket listing begins (string, mandatory).</li>\n   <li>nextMarker: when the response is truncated, you can use the key name\n   in this field as marker in the subsequent request to get next set of objects.\n   Amazon S3 lists objects in alphabetical order. This field is returned only\n   if you have specified the delimiter request parameter. If the response does\n   not include the nextMaker field and it is truncated, you can use the value\n   of the last Key in the response as the marker in the subsequent request to\n   get the next set of object keys. (string, optional)</li>\n   <li>maxKeys: the maximum number of keys returned in the response body\n   (integer, mandatory).</li>\n   <li>delimiter: the used delimiter (string, optional).</li>\n   <li>isTruncated: whether or not all of the results were returned. All of the\n   results may not be returned if the number of results exceeds that specified\n   by the maxKeys request parameter (boolean, mandatory).</li>\n   <li>contents: an array of objects listing the bucket content  (array, mandatory).\n   The fields of each contained object have the following meaning:\n   <ul>\n     <li>key: the object key (string, mandatory).</li>\n     <li>lastModified: the object last modification date (dateTime, mandatory).</li>\n     <li>eTag: the entity tag is a hash of the object. The eTag only reflects\n     changes to the contents of an object, not its metadata. The eTag is determined\n     when an object is created. For objects created by the PUT Object operation\n     and the POST Object operation, the eTag is a quoted, 32-digit hexadecimal\n     string representing the MD5 digest of the object data. For other objects,\n     the eTag may or may not be an MD5 digest of the object data. If the eTag is\n     not an MD5 digest of the object data, it will contain one or more non-hexadecimal\n     characters and/or will consist of less than 32 or more than 32 hexadecimal\n     digits.(string, mandatory).</li>\n     <li>storageClass: the object storage class. One of "STANDARD",\n     "REDUCED_REDUNDANCY" or "GLACIER" (string, mandatory).</li>\n     <li>owner: an object which specifies the owner of the object (object,\n     optional). It has the following fields:\n     <ul>\n       <li>id: the user identifier of the object owner (string, mandatory).</li>\n       <li>displayName: the screen name of the object owner (string, mandatory).</li>\n     </ul>\n     </li>\n   </ul>\n   </li>\n   <li>commonPrefixes: an array of strings which contains the list of the common\n   prefixes. It can be present only when the delimiter request parameter is\n   specified (array, optional).</li>\n </ul>\n </p>\n',summary:"<p>  Lists the objects in a bucket using the default S3 credentials.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"bucket",type:"string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The bucket to list. If the empty sequence is given, the default bucket of the default S3 credentials will be listed.</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The listing options.</div>'}],returns:{type:"object()",description:"the list of the object in the specified bucket"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the specified S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the default credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OPTIONS if the specified options are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:RESPONSE the response received from S3 cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:3,name:"list-bucket",qname:"s3:list-bucket",signature:"($credentials as item()?, $bucket as string?, $options as object()?) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Lists the objects in a bucket using the specified credentials.\n This method allows the specification of additional listing options.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n let $options :=\n {\n   "delimiter": "/",\n   "marker": "",\n   "maxKeys": 1,\n   "prefix": ""\n }\n return s3:list-bucket("credentials", "28msec", $options)\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The options object must have the following structure:\n <ul>\n   <li>delimiter: the delimiter marks where the listed results stop. For example,\n       a delimiter / lists all objects starting with $prefix plus arbitrary\n       characters but not / (string, optional). Default is the empty string,\n       that is, all objects are listed.</li>\n   <li>marker: specifies a key as starting point; following keys (lexicographically\n       greater than the marker) in alphabetical order are listed (string, optional).\n       Default is the empty string, that is, all objects are listed.</li>\n   <li>maxKeys: the maximum number of keys returned. If more keys than maxKeys\n       can be fetched, the result contains <IsTruncated>true</IsTruncated>\n       (integer, optional). Default is 1000.</li>\n   <li>prefix: only keys starting with the prefix are returned (string, optional).\n       Default is the empty string, that is, all objects are listed.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example result:\n <pre>\n {\n   "name": "bucket",\n   "prefix": "",\n   "marker" : "",\n   "nextMarker": "marker",\n   "maxKeys": 1,\n   "delimiter": "/",\n   "isTruncated": true,\n   "contents":\n   [\n     {\n       "key": "image.jpg",\n       "lastModified": "2009-10-12T17:50:30.000Z",\n       "eTag": "\\"fba9dede5f27731c9771645a39863328\\"",\n       "size": 434234,\n       "storageClass": "STANDARD"\n       "owner":\n       {\n         "id": "75aa57f09aa0c8caeab4f8c24e99d10f8e7faeebf76c078efc7c6caea54ba06a"\n         "displayName": "mtd@amazon.com"\n       }\n     }\n   ],\n   "commonPrefixes": ["photos/"]\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The fields in the returned object have the following meanings:\n <ul>\n   <li>name: the bucket name (string, mandatory).</li>\n   <li>prefix: the used prefix (string, mandatory).</li>\n   <li>marker: indicates where in the bucket listing begins (string, mandatory).</li>\n   <li>nextMarker: when the response is truncated, you can use the key name\n   in this field as marker in the subsequent request to get next set of objects.\n   Amazon S3 lists objects in alphabetical order. This field is returned only\n   if you have specified the delimiter request parameter. If the response does\n   not include the nextMaker field and it is truncated, you can use the value\n   of the last Key in the response as the marker in the subsequent request to\n   get the next set of object keys. (string, optional)</li>\n   <li>maxKeys: the maximum number of keys returned in the response body\n   (integer, mandatory).</li>\n   <li>delimiter: the used delimiter (string, optional).</li>\n   <li>isTruncated: whether or not all of the results were returned. All of the\n   results may not be returned if the number of results exceeds that specified\n   by the maxKeys request parameter (boolean, mandatory).</li>\n   <li>contents: an array of objects listing the bucket content  (array, mandatory).\n   The fields of each contained object have the following meaning:\n   <ul>\n     <li>key: the object key (string, mandatory).</li>\n     <li>lastModified: the object last modification date (dateTime, mandatory).</li>\n     <li>eTag: the entity tag is a hash of the object. The eTag only reflects\n     changes to the contents of an object, not its metadata. The eTag is determined\n     when an object is created. For objects created by the PUT Object operation\n     and the POST Object operation, the eTag is a quoted, 32-digit hexadecimal\n     string representing the MD5 digest of the object data. For other objects,\n     the eTag may or may not be an MD5 digest of the object data. If the eTag is\n     not an MD5 digest of the object data, it will contain one or more non-hexadecimal\n     characters and/or will consist of less than 32 or more than 32 hexadecimal\n     digits.(string, mandatory).</li>\n     <li>storageClass: the object storage class. One of "STANDARD",\n     "REDUCED_REDUNDANCY" or "GLACIER" (string, mandatory).</li>\n     <li>owner: an object which specifies the owner of the object (object,\n     optional). It has the following fields:\n     <ul>\n       <li>id: the user identifier of the object owner (string, mandatory).</li>\n       <li>displayName: the screen name of the object owner (string, mandatory).</li>\n     </ul>\n     </li>\n   </ul>\n   </li>\n   <li>commonPrefixes: an array of strings which contains the list of the common\n   prefixes. It can be present only when the delimiter request parameter is\n   specified (array, optional).</li>\n </ul>\n </p>\n',summary:"<p>  Lists the objects in a bucket using the specified credentials.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"credentials",type:"item()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The credentials to use.</div>'},{name:"bucket",type:"string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The bucket to list. If the empty sequence is given, the default bucket of the specified credentials will be listed.</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The listing options.</div>'}],returns:{type:"object()",description:"the list of the object in the specified bucket"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the specified S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the used credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OPTIONS if the specified options are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:RESPONSE the response received from S3 cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:0,name:"list-buckets-nondeterministic",qname:"s3:list-buckets-nondeterministic",signature:"() as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Lists all buckets owned by the account of the default S3 credentials.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#list-buckets-0">list-buckets#0</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Lists all buckets owned by the account of the default S3 credentials.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[],returns:{type:"object()",description:"the owned buckets list"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the default S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:RESPONSE the response received from S3 cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:1,name:"list-buckets-nondeterministic",qname:"s3:list-buckets-nondeterministic",signature:"($credentials as item()?) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Lists all buckets owned by the account of the specified S3 credentials.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#list-buckets-1">list-buckets#1</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Lists all buckets owned by the account of the specified S3 credentials.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"credentials",type:"item()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The credentials to use.</div>'}],returns:{type:"object()",description:"the owned buckets list"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the specified S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:RESPONSE the response received from S3 cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:0,name:"list-buckets",qname:"s3:list-buckets",signature:"() as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Lists all buckets owned by the account of the default S3 credentials.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n s3:list-buckets()\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example return object:\n <pre>\n {\n   "owner" :\n   {\n     "id": "dfe08489302934392afe39239fe953039d9e2af0c94",\n     "displayName": "28msec"\n   },\n   "buckets" :\n   [\n     {\n       "name": "28msec",\n       "creationDate": "2010-11-03T17:42:45.000Z",\n     }\n   ]\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The fields in the returned object have the following meanings:\n <ul>\n   <li>owner: an object which specifies the owner of the bucket (object,\n   mandatory). It has the following fields:\n   <ul>\n     <li>id: the user identifier of the bucket owner (string, mandatory).</li>\n     <li>displayName: the screen name of the bucket owner (string, mandatory).</li>\n   </ul>\n   </li>\n   <li>buckets: an array which contains an object for each owned bucket\n   (array, mandatory). Each object contains the following fields:\n   <ul>\n     <li>name: the bucket name (string, mandatory).</li>\n     <li>creationDate: the bucket creation date. (dateTime, mandatory).</li>\n   </ul>\n   </li>\n </ul>\n </p>\n',summary:"<p>  Lists all buckets owned by the account of the default S3 credentials.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"object()",description:"the owned buckets list"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the default S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:RESPONSE the response received from S3 cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:1,name:"list-buckets",qname:"s3:list-buckets",signature:"($credentials as item()?) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Lists all buckets owned by the account of the specified S3 credentials.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n s3:list-buckets("credentials")\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example return object:\n <pre>\n {\n   "owner" :\n   {\n     "id": "dfe08489302934392afe39239fe953039d9e2af0c94",\n     "displayName": "28msec"\n   },\n   "buckets" :\n   [\n     {\n       "name": "28msec",\n       "creationDate": "2010-11-03T17:42:45.000Z",\n     }\n   ]\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The fields in the returned object have the following meanings:\n <ul>\n   <li>owner: an object which specifies the owner of the bucket (object,\n   mandatory). It has the following fields:\n   <ul>\n     <li>id: the user identifier of the bucket owner (string, mandatory).</li>\n     <li>displayName: the screen name of the bucket owner (string, mandatory).</li>\n   </ul>\n   </li>\n   <li>buckets: an array which contains an object for each owned bucket\n   (array, mandatory). Each object contains the following fields:\n   <ul>\n     <li>name: the bucket name (string, mandatory).</li>\n     <li>creationDate: the bucket creation date. (dateTime, mandatory).</li>\n   </ul>\n   </li>\n </ul>\n </p>\n',summary:"<p>  Lists all buckets owned by the account of the specified S3 credentials.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"credentials",type:"item()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The credentials to use.</div>'}],returns:{type:"object()",description:"the owned buckets list"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the specified S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:RESPONSE the response received from S3 cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:1,name:"object-metadata-nondeterministic",qname:"s3:object-metadata-nondeterministic",signature:"($s3-object as item()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves an object metadata using the default S3 credentials.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#object-metadata-1">object-metadata#1</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Retrieves an object metadata using the default S3 credentials.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"s3-object",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The S3 object or object version to retrieve the metadata for.</div>'}],returns:{type:"object()",description:"the specified object metadata."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the default S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OBJECT if the object specification is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the used credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:RESPONSE the response received from S3 cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:2,name:"object-metadata-nondeterministic",qname:"s3:object-metadata-nondeterministic",signature:"($credentials as item()?, $s3-object as item()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves an object metadata using the specified S3 credentials.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#object-metadata-2">object-metadata#2</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Retrieves an object metadata using the specified S3 credentials.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"credentials",type:"item()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The credentials to use.</div>'},{name:"s3-object",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The S3 object or object version to retrieve the metadata for.</div>'}],returns:{type:"object()",description:"the specified object metadata."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the specified S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OBJECT if the object specification is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the used credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:RESPONSE the response received from S3 cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:1,name:"object-metadata",qname:"s3:object-metadata",signature:"($s3-object as item()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves an object metadata using the default S3 credentials.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The S3 object is specified through the $s3-object parameter. Either a string\n or a JSON object can be used. If a string is specified, it is interpreted as\n key for an object in the default bucket of the default credentials. If no default\n bucket is present in the default credentials, the <code>s3:BUCKET</code> error\n is raised. If a JSON object is used, it must have the following structure:\n <ul>\n   <li>key: the object key (string, mandatory).</li>\n   <li>bucket: the bucket name (string, optional). If this field is not present\n   and the default credentials do not have a default bucket, the\n   <code>s3:BUCKET</code> error is raised.</li>\n   <li>version: the object version (string, optional). If versioning is enabled\n   for the specified object and no version is specified the metadata of the\n   latest version of the object will be returned. If specified, only the\n   metadata of that particular version of the object will be returned.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n let $object :=\n {\n   "key": "object",\n   "bucket": "28msec",\n   "version": "3/L4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo"\n }\n return s3:metadata-object($object)\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example return object:\n <pre>\n {\n   "key": "test.xml",\n   "bucket": "28msec",\n   "metadata":\n   {\n     "author": "28msec"\n   },\n   "missing-metadata" : 1,\n   "version": "3GL4kqtJlcpXroDTDm3vjVBH40Nr8X8g",\n   "expiration": "expiry-date=\\"Fri, 21 Dec 2012 00:00:00 GMT\\", rule-id=\\"Rule for testfile.txt\\""\n   "restore": "x-amz-restore: ongoing-request=\\"false\\", expiry-date=\\"Wed, 07 Nov 2012 00:00:00 GMT\\""\n   "serverSideEncryption": "AES256",\n   "lastModified": "Mon, 15 Oct 2012 21:58:07 GMT",\n   "eTag": "1accb31fcf202eba0c0f41fa2f09b4d7",\n   "mediaType": "text/plain"\n   "length": "28"\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The fields in the returned object have the following meanings:\n <ul>\n   <li>key: the object key (string, mandatory).</li>\n   <li>bucket: the bucket name (string, mandatory).</li>\n   <li>metadata: an object specifying additional metadata. Each metadata is a\n   name-value pair and is represented as different fields (object, optional).</li>\n   <li>missing-metadata: the number of metadata entries that were not returned\n   in the metadata object. This can happen if you create metadata using an API\n   like SOAP that supports more flexible metadata than the REST API. (integer,\n   optional).</li>\n   <li>version: the object version (string, optional). If versioning is enabled\n   for the specified object and no version is specified the permissions for the\n   latest version of the object will be returned. If specified, only the\n   permissions for that particular version of the object will be returned.</li>\n   <li>expiration: if the object expiration is configured (see\n   <a href="http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlifecycle.html">PUT Bucket lifecycle</a>),\n   this field is present. It includes the expiry-date and rule-id key value\n   pairs providing object expiration information. The value of rule-id is URL\n   encoded.(string, optional).</li>\n   <li>restore: if the object is an archived object (an object whose storage\n   class is Glacier), the response includes this header if either the archive\n   restoration is in progress (see\n   <a href="http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPOSTrestore.html">POST Object restore</a>),\n   or an archive copy is already restored.(string, optional).</li>\n   <li>serverSideEncryption: If the object is stored by using server-side\n   encryption, the response includes this header with a value of the encryption\n   algorithm that was used.(string, optional).</li>\n   <li>lastModified: the date in which the object was last modified (dateTime,\n   optional).</li>\n   <li>eTag: the entity tag is a hash of the object. The eTag only reflects\n   changes to the contents of an object, not its metadata. The eTag is determined\n   when an object is created. For objects created by the PUT Object operation\n   and the POST Object operation, the eTag is a quoted, 32-digit hexadecimal\n   string representing the MD5 digest of the object data. For other objects,\n   the eTag may or may not be an MD5 digest of the object data. If the eTag is\n   not an MD5 digest of the object data, it will contain one or more non-hexadecimal\n   characters and/or will consist of less than 32 or more than 32 hexadecimal\n   digits.(string, optional).</li>\n   <li>mediaType: the object media-type (string, mandatory).</li>\n   <li>length: the object content length (integer, optional).</li>\n </ul>\n </p>\n',summary:"<p>  Retrieves an object metadata using the default S3 credentials.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s3-object",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The S3 object or object version to retrieve the metadata for.</div>'}],returns:{type:"object()",description:"the specified object metadata."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the default S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OBJECT if the object specification is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the used credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:RESPONSE the response received from S3 cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:2,name:"object-metadata",qname:"s3:object-metadata",signature:"($credentials as item()?, $s3-object as item()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves an object metadata using the specified S3 credentials.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The S3 object is specified through the $s3-object parameter. Either a string\n or a JSON object can be used. If a string is specified, it is interpreted as\n key for an object in the default bucket of the specified credentials. If no default\n bucket is present in the specified credentials, the <code>s3:BUCKET</code> error\n is raised. If a JSON object is used, it must have the following structure:\n <ul>\n   <li>key: the object key (string, mandatory).</li>\n   <li>bucket: the bucket name (string, optional). If this field is not present\n   and the specified credentials do not have a default bucket, the\n   <code>s3:BUCKET</code> error is raised.</li>\n   <li>version: the object version (string, optional). If versioning is enabled\n   for the specified object and no version is specified the metadata of the\n   latest version of the object will be returned. If specified, only the\n   metadata of that particular version of the object will be returned.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n let $object :=\n {\n   "key": "object",\n   "bucket": "28msec",\n   "version": "3/L4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo"\n }\n return s3:metadata-object("credentials", $object)\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example return object:\n <pre>\n {\n   "key": "test.xml",\n   "bucket": "28msec",\n   "metadata":\n   {\n     "author": "28msec"\n   },\n   "missing-metadata" : 1,\n   "version": "3GL4kqtJlcpXroDTDm3vjVBH40Nr8X8g",\n   "expiration": "expiry-date=\\"Fri, 21 Dec 2012 00:00:00 GMT\\", rule-id=\\"Rule for testfile.txt\\""\n   "restore": "x-amz-restore: ongoing-request=\\"false\\", expiry-date=\\"Wed, 07 Nov 2012 00:00:00 GMT\\""\n   "serverSideEncryption": "AES256",\n   "lastModified": "Mon, 15 Oct 2012 21:58:07 GMT",\n   "eTag": "1accb31fcf202eba0c0f41fa2f09b4d7",\n   "mediaType": "text/plain"\n   "length": "28"\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The fields in the returned object have the following meanings:\n <ul>\n   <li>key: the object key (string, mandatory).</li>\n   <li>bucket: the bucket name (string, mandatory).</li>\n   <li>metadata: an object specifying additional metadata. Each metadata is a\n   name-value pair and is represented as different fields (object, optional).</li>\n   <li>missing-metadata: the number of metadata entries that were not returned\n   in the metadata object. This can happen if you create metadata using an API\n   like SOAP that supports more flexible metadata than the REST API. (integer,\n   optional).</li>\n   <li>version: the object version (string, optional). If versioning is enabled\n   for the specified object and no version is specified the permissions for the\n   latest version of the object will be returned. If specified, only the\n   permissions for that particular version of the object will be returned.</li>\n   <li>expiration: if the object expiration is configured (see\n   <a href="http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlifecycle.html">PUT Bucket lifecycle</a>),\n   this field is present. It includes the expiry-date and rule-id key value\n   pairs providing object expiration information. The value of rule-id is URL\n   encoded.(string, optional).</li>\n   <li>restore: if the object is an archived object (an object whose storage\n   class is Glacier), the response includes this header if either the archive\n   restoration is in progress (see\n   <a href="http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPOSTrestore.html">POST Object restore</a>),\n   or an archive copy is already restored.(string, optional).</li>\n   <li>serverSideEncryption: If the object is stored by using server-side\n   encryption, the response includes this header with a value of the encryption\n   algorithm that was used.(string, optional).</li>\n   <li>lastModified: the date in which the object was last modified (dateTime,\n   optional).</li>\n   <li>eTag: the entity tag is a hash of the object. The eTag only reflects\n   changes to the contents of an object, not its metadata. The eTag is determined\n   when an object is created. For objects created by the PUT Object operation\n   and the POST Object operation, the eTag is a quoted, 32-digit hexadecimal\n   string representing the MD5 digest of the object data. For other objects,\n   the eTag may or may not be an MD5 digest of the object data. If the eTag is\n   not an MD5 digest of the object data, it will contain one or more non-hexadecimal\n   characters and/or will consist of less than 32 or more than 32 hexadecimal\n   digits.(string, optional).</li>\n   <li>mediaType: the object media-type (string, mandatory).</li>\n   <li>length: the object content length (integer, optional).</li>\n </ul>\n </p>\n',summary:"<p>  Retrieves an object metadata using the specified S3 credentials.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"credentials",type:"item()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The credentials to use.</div>'},{name:"s3-object",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The S3 object or object version to retrieve the metadata for.</div>'}],returns:{type:"object()",description:"the specified object metadata."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the specified S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OBJECT if the object specification is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the used credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:RESPONSE the response received from S3 cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:1,name:"object-permissions-nondeterministic",qname:"s3:object-permissions-nondeterministic",signature:"($s3-object as item()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves the access control list (ACL) of an S3 object using the default\n S3 credentials.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#object-permissions-1">object-permissions#1</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Retrieves the access control list (ACL) of an S3 object using the default\n S3 credentials.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"s3-object",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The S3 object or object version to retrieve the ACL for.</div>'}],returns:{type:"object()",description:"the object ACL"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the default S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OBJECT if the object specification is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the used credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:RESPONSE the response received from S3 cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:2,name:"object-permissions-nondeterministic",qname:"s3:object-permissions-nondeterministic",signature:"($credentials as item()?, $s3-object as item()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves the access control list (ACL) of an S3 object using the specified\n credentials.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#object-permissions-2">object-permissions#2</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Retrieves the access control list (ACL) of an S3 object using the specified\n credentials.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"credentials",type:"item()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The credentials to use.</div>'},{name:"s3-object",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The S3 object or object version to retrieve the ACL for.</div>'}],returns:{type:"object()",description:"the object ACL"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the specified S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OBJECT if the object specification is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the used credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:RESPONSE the response received from S3 cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:1,name:"object-permissions",qname:"s3:object-permissions",signature:"($s3-object as item()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves the access control list (ACL) of an S3 object using the default\n S3 credentials.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The S3 object is specified through the $s3-object parameter. Either a string\n or a JSON object can be used. If a string is specified, it is interpreted as\n key for an object in the default bucket of the default credentials. If no default\n bucket is present in the default credentials, the <code>s3:BUCKET</code> error\n is raised. If a JSON object is used, it must have the following structure:\n <ul>\n   <li>key: the object key (string, mandatory).</li>\n   <li>bucket: the bucket name (string, optional). If this field is not present\n   and the default credentials do not have a default bucket, the\n   <code>s3:BUCKET</code> error is raised.</li>\n   <li>version: the object version (string, optional). If versioning is enabled\n   for the specified object and no version is specified the permissions for the\n   latest version of the object will be returned. If specified, only the\n   permissions for that particular version of the object will be returned.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n let $object :=\n {\n   "key": "object",\n   "bucket": "28msec",\n   "version": "3/L4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo"\n }\n return s3:object-permissions($object)\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example return object:\n <pre>\n {\n   "owner" :\n   {\n     "id" : "ea3617f5543e366a51bf51f440c221410b8001c34744e9d3a81acb79cff9d2ed",\n     "displayName" : "28msec"\n   },\n   "acl" :\n   [\n     {\n       "grantee" :\n       {\n         "type" : "CanonicalUser",\n         "id" : "ea3617f5543e366a51bf51f440c221410b8001c34744e9d3a81acb79cff9d2ed",\n         "displayName" : "28msec"\n       },\n       "permission" : "FULL_CONTROL"\n     }\n   ]\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The fields in the returned object have the following meanings:\n <ul>\n <li>owner: an object which specifies the owner of the object (object,\n mandatory). It has the following fields:\n   <ul>\n     <li>id: the user identifier of the object owner (string, mandatory).</li>\n     <li>displayName: the screen name of the object owner (string, mandatory).</li>\n   </ul>\n </li>\n <li>acl: an array which contains an object for each grantee with the corresponding\n ACL settings (array, mandatory). Each object contains the following fields:\n   <ul>\n     <li>grantee: specifies the permissions grantee (object, mandatory). It\n     contains the following fields:\n       <ul>\n         <li>type: one of "AmazonCustomerByEmail", "CanonicalUser" or "Group".</li>\n         <li>emailAddress: the customer email address (string, present in all\n         and only AmazonCustomerByEmail grantees).</li>\n         <li>id: the user identifier (string, present in all and only CanonicalUser\n         grantees).</li>\n         <li>displayName: the user screen name (string, present in all and only\n         CanonicalUser grantees).</li>\n         <li>URI: the group URI (string, present in all and only Group grantees).</li>\n       </ul>\n     </li>\n     <li>permission: the granted permissions. One of "READ", "WRITE", "READ_ACP",\n     "WRITE_ACP", "FULL_CONTROL". (string, mandatory).</li>\n   </ul>\n </li>\n </ul>\n </p>\n',summary:"<p>  Retrieves the access control list (ACL) of an S3 object using the default\n S3 credentials.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s3-object",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The S3 object or object version to retrieve the ACL for.</div>'}],returns:{type:"object()",description:"the object ACL"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the default S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OBJECT if the object specification is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the used credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:RESPONSE the response received from S3 cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:2,name:"object-permissions",qname:"s3:object-permissions",signature:"($credentials as item()?, $s3-object as item()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves the access control list (ACL) of an S3 object using the specified\n credentials.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The S3 object is specified through the $s3-object parameter. Either a string\n or a JSON object can be used. If a string is specified, it is interpreted as\n key for an object in the default bucket of the specified credentials. If no default\n bucket is present in the specified credentials, the <code>s3:BUCKET</code> error\n is raised. If a JSON object is used, it must have the following structure:\n <ul>\n   <li>key: the object key (string, mandatory).</li>\n   <li>bucket: the bucket name (string, optional). If this field is not present\n   and the specified credentials does not have a default bucket, the\n   <code>s3:BUCKET</code> error is raised.</li>\n   <li>version: the object version (string, optional). If versioning is enabled\n   for the specified object and no version is specified the permissions for the\n   latest version of the object will be returned. If specified, only the\n   permissions for that particular version of the object will be returned.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n let $object :=\n {\n   "key": "object",\n   "bucket": "28msec",\n   "version": "3/L4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo"\n }\n return s3:object-permissions("credentials", $object)\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example return object:\n <pre>\n {\n   "owner" :\n   {\n     "id" : "ea3617f5543e366a51bf51f440c221410b8001c34744e9d3a81acb79cff9d2ed",\n     "displayName" : "28msec"\n   },\n   "acl" :\n   [\n     {\n       "grantee" :\n       {\n         "type" : "CanonicalUser",\n         "id" : "ea3617f5543e366a51bf51f440c221410b8001c34744e9d3a81acb79cff9d2ed",\n         "displayName" : "28msec"\n       },\n       "permission" : "FULL_CONTROL"\n     }\n   ]\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The fields in the returned object have the following meanings:\n <ul>\n <li>owner: an object which specifies the owner of the object (object,\n mandatory). It has the following fields:\n   <ul>\n     <li>id: the user identifier of the object owner (string, mandatory).</li>\n     <li>displayName: the screen name of the object owner (string, mandatory).</li>\n   </ul>\n </li>\n <li>acl: an array which contains an object for each grantee with the corresponding\n ACL settings (array, mandatory). Each object contains the following fields:\n   <ul>\n     <li>grantee: specifies the permissions grantee (object, mandatory). It contains\n     the following fields:\n       <ul>\n         <li>type: one of "AmazonCustomerByEmail", "CanonicalUser" or "Group".</li>\n         <li>emailAddress: the customer email address (string, present in all\n         and only AmazonCustomerByEmail grantees).</li>\n         <li>id: the user identifier (string, present in all and only CanonicalUser\n         grantees).</li>\n         <li>displayName: the user screen name (string, present in all and only\n         CanonicalUser grantees).</li>\n         <li>URI: the group URI (string, present in all and only Group grantees).</li>\n       </ul>\n     </li>\n     <li>permission: the granted permissions. One of "READ", "WRITE", "READ_ACP",\n     "WRITE_ACP", "FULL_CONTROL". (string, mandatory).</li>\n   </ul>\n </li>\n </ul>\n </p>\n',summary:"<p>  Retrieves the access control list (ACL) of an S3 object using the specified\n credentials.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"credentials",type:"item()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The credentials to use.</div>'},{name:"s3-object",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The S3 object or object version to retrieve the ACL for.</div>'}],returns:{type:"object()",description:"the object ACL"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the specified S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OBJECT if the object specification is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the used credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:RESPONSE the response received from S3 cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:1,name:"object-torrent-nondeterministic",qname:"s3:object-torrent-nondeterministic",signature:"($s3-object as item()) as base64Binary",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns a torrent file for a given object using the default S3 credentials.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#object-torrent-1">object-torrent#1</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Returns a torrent file for a given object using the default S3 credentials.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"s3-object",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The S3 object to retrieve the torrent file for</div>'}],returns:{type:"base64Binary",description:"the base64 encoded torrent file for the specified object."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the default S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OBJECT if the object specification is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the used credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:RESPONSE the response received from S3 cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:2,name:"object-torrent-nondeterministic",qname:"s3:object-torrent-nondeterministic",signature:"($credentials as item()?, $s3-object as item()) as base64Binary",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns a torrent file for a given object using the specified S3 credentials.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#object-torrent-2">object-torrent#2</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Returns a torrent file for a given object using the specified S3 credentials.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"credentials",type:"item()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The credentials to use.</div>'},{name:"s3-object",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The S3 object to retrieve the torrent file for</div>'}],returns:{type:"base64Binary",description:"the base64 encoded torrent file of the specified object."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the specified S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OBJECT if the object specification is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the used credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:RESPONSE the response received from S3 cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:1,name:"object-torrent",qname:"s3:object-torrent",signature:"($s3-object as item()) as base64Binary",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns a torrent file for a given object using the default S3 credentials.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The S3 object is specified through the $s3-object parameter. Either a string\n or a JSON object can be used. If a string is specified, it is interpreted as\n key for an object in the default bucket of the default credentials. If no default\n bucket is present in the default credentials, the <code>s3:BUCKET</code> error\n is raised. If a JSON object is used, it must have the following structure:\n <ul>\n   <li>key: the object key (string, mandatory).</li>\n   <li>bucket: the bucket name (string, optional). If this field is not present\n   and the default credentials do not have a default bucket, the\n   <code>s3:BUCKET</code> error is raised.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n let $object :=\n {\n   "key": "object",\n   "bucket": "28msec"\n }\n return s3:object-torrent($object)\n </pre>\n </p>\n',summary:"<p>  Returns a torrent file for a given object using the default S3 credentials.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s3-object",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The S3 object to retrieve the torrent file for</div>'}],returns:{type:"base64Binary",description:"the base64 encoded torrent file for the specified object."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the default S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OBJECT if the object specification is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the used credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:RESPONSE the response received from S3 cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:2,name:"object-torrent",qname:"s3:object-torrent",signature:"($credentials as item()?, $s3-object as item()) as base64Binary",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns a torrent file for a given object using the specified S3 credentials.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The S3 object is specified through the $s3-object parameter. Either a string\n or a JSON object can be used. If a string is specified, it is interpreted as\n key for an object in the default bucket of the specified credentials. If no default\n bucket is present in the specified credentials, the <code>s3:BUCKET</code> error\n is raised. If a JSON object is used, it must have the following structure:\n <ul>\n   <li>key: the object key (string, mandatory).</li>\n   <li>bucket: the bucket name (string, optional). If this field is not present\n   and the specified credentials do not have a default bucket, the\n   <code>s3:BUCKET</code> error is raised.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n let $object :=\n {\n   "key": "object",\n   "bucket": "28msec"\n }\n return s3:object-torrent($object)\n </pre>\n </p>\n',summary:"<p>  Returns a torrent file for a given object using the specified S3 credentials.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"credentials",type:"item()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The credentials to use.</div>'},{name:"s3-object",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The S3 object to retrieve the torrent file for</div>'}],returns:{type:"base64Binary",description:"the base64 encoded torrent file of the specified object."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the specified S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OBJECT if the object specification is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the used credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:RESPONSE the response received from S3 cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:1,name:"read-binary-nondeterministic",qname:"s3:read-binary-nondeterministic",signature:"($s3-object as item()) as base64Binary",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves the binary content of an S3 object using the default S3 credentials.\n The object content is forced to be interpreted as binaryand will be returned\n as a base64Binary item.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#read-binary-1">read-binary#1</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Retrieves the binary content of an S3 object using the default S3 credentials.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"s3-object",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The S3 object or object version to retrieve.</div>'}],returns:{type:"base64Binary",description:"the object or object version binary content."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the default S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OBJECT if the object specification is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the used credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>']},{isDocumented:!0,arity:2,name:"read-binary-nondeterministic",qname:"s3:read-binary-nondeterministic",signature:"($credentials as item()?, $s3-object as item()) as base64Binary",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves the binary content of an S3 object using the specified S3 credentials.\n The object content is forced to be interpreted as binaryand will be returned\n as a base64Binary item.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#read-binary-2">read-binary#2</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Retrieves the binary content of an S3 object using the specified S3 credentials.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"credentials",type:"item()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The credentials to use.</div>'},{name:"s3-object",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The S3 object or object version to retrieve.</div>'}],returns:{type:"base64Binary",description:"the object or object version binary content."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the specified S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OBJECT if the object specification is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the used credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>']},{isDocumented:!0,arity:1,name:"read-binary",qname:"s3:read-binary",signature:"($s3-object as item()) as base64Binary",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves the binary content of an S3 object using the default S3 credentials.\n The object content is forced to be interpreted as binaryand will be returned\n as a base64Binary item.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The S3 object is specified through the $s3-object parameter. Either a string\n or a JSON object can be used. If a string is specified, it is interpreted as\n key for an object in the default bucket of the default credentials. If no default\n bucket is present in the default credentials, the <code>s3:BUCKET</code> error\n is raised. If a JSON object is used, it must have the following structure:\n <ul>\n   <li>key: the object key (string, mandatory).</li>\n   <li>bucket: the bucket name (string, optional). If this field is not present\n   and the default credentials do not have a default bucket, the\n   <code>s3:BUCKET</code> error is raised.</li>\n   <li>version: the object version (string, optional). If versioning is enabled\n   for the specified object and no version is specified the latest version of\n   the object will be returned. If specified, only that particular version of\n   the object will be returned.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n let $object :=\n {\n   "key": "object",\n   "bucket": "28msec",\n   "version": "3/L4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo"\n }\n return s3:read-binary($object)\n </pre>\n </p>\n',summary:"<p>  Retrieves the binary content of an S3 object using the default S3 credentials.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s3-object",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The S3 object or object version to retrieve.</div>'}],returns:{type:"base64Binary",description:"the object or object version binary content."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the default S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OBJECT if the object specification is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the used credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>']},{isDocumented:!0,arity:2,name:"read-binary",qname:"s3:read-binary",signature:"($credentials as item()?, $s3-object as item()) as base64Binary",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves the binary content of an S3 object using the specified S3 credentials.\n The object content is forced to be interpreted as binaryand will be returned\n as a base64Binary item.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The S3 object is specified through the $s3-object parameter. Either a string\n or a JSON object can be used. If a string is specified, it is interpreted as\n key for an object in the default bucket of the specified credentials. If no default\n bucket is present in the specified credentials, the <code>s3:BUCKET</code> error\n is raised. If a JSON object is used, it must have the following structure:\n <ul>\n   <li>key: the object key (string, mandatory).</li>\n   <li>bucket: the bucket name (string, optional). If this field is not present\n   and the specified credentials do not have a default bucket, the\n   <code>s3:BUCKET</code> error is raised.</li>\n   <li>version: the object version (string, optional). If versioning is enabled\n   for the specified object and no version is specified the latest version of\n   the object will be returned. If specified, only that particular version of\n   the object will be returned.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n let $object :=\n {\n   "key": "object",\n   "bucket": "28msec",\n   "version": "3/L4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo"\n }\n return s3:read-binary("credentials", $object)\n </pre>\n </p>\n',summary:"<p>  Retrieves the binary content of an S3 object using the specified S3 credentials.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"credentials",type:"item()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The credentials to use.</div>'},{name:"s3-object",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The S3 object or object version to retrieve.</div>'}],returns:{type:"base64Binary",description:"the object or object version binary content."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the specified S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OBJECT if the object specification is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the used credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>']},{isDocumented:!0,arity:1,name:"read-object-nondeterministic",qname:"s3:read-object-nondeterministic",signature:"($s3-object as item()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves an S3 object using the default S3 credentials.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#read-object-1">read-object#1</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Retrieves an S3 object using the default S3 credentials.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"s3-object",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The S3 object or object version to retrieve.</div>'}],returns:{type:"object()",description:"the specified object."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the default S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OBJECT if the object specification is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the used credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:RESPONSE the response received from S3 cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:2,name:"read-object-nondeterministic",qname:"s3:read-object-nondeterministic",signature:"($credentials as item()?, $s3-object as item()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves an S3 object using the specified S3 credentials.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#read-object-2">read-object#2</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Retrieves an S3 object using the specified S3 credentials.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"credentials",type:"item()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The credentials to use.</div>'},{name:"s3-object",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The S3 object or object version to retrieve.</div>'}],returns:{type:"object()",description:"the specified object."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the specified S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OBJECT if the object specification is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the used credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:RESPONSE the response received from S3 cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:1,name:"read-object",qname:"s3:read-object",signature:"($s3-object as item()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves an S3 object using the default S3 credentials.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The S3 object is specified through the $s3-object parameter. Either a string\n or a JSON object can be used. If a string is specified, it is interpreted as\n key for an object in the default bucket of the default credentials. If no default\n bucket is present in the default credentials, the <code>s3:BUCKET</code> error\n is raised. If a JSON object is used, it must have the following structure:\n <ul>\n   <li>key: the object key (string, mandatory).</li>\n   <li>bucket: the bucket name (string, optional). If this field is not present\n   and the default credentials do not have a default bucket, the\n   <code>s3:BUCKET</code> error is raised.</li>\n   <li>version: the object version (string, optional). If versioning is enabled\n   for the specified object and no version is specified the latest version of\n   the object will be returned. If specified, only that particular version of\n   the object will be returned.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n let $object :=\n {\n   "key": "object",\n   "bucket": "28msec",\n   "version": "3/L4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo"\n }\n return s3:read-object($object)\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example return object:\n <pre>\n {\n   "key": "test.xml",\n   "bucket": "28msec",\n   "metadata":\n   {\n     "author": "28msec"\n   },\n   "missing-metadata" : 1,\n   "version": "3GL4kqtJlcpXroDTDm3vjVBH40Nr8X8g",\n   "expiration": "expiry-date=\\"Fri, 21 Dec 2012 00:00:00 GMT\\", rule-id=\\"Rule for testfile.txt\\""\n   "restore": "x-amz-restore: ongoing-request=\\"false\\", expiry-date=\\"Wed, 07 Nov 2012 00:00:00 GMT\\""\n   "serverSideEncryption": "AES256",\n   "lastModified": "Mon, 15 Oct 2012 21:58:07 GMT",\n   "eTag": "1accb31fcf202eba0c0f41fa2f09b4d7",\n   "mediaType": "text/plain"\n   "length": "28",\n   "content: "1234567890123456789012345678"\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The fields in the returned object have the following meanings:\n <ul>\n   <li>key: the object key (string, mandatory).</li>\n   <li>bucket: the bucket name (string, mandatory).</li>\n   <li>metadata: an object specifying additional metadata. Each metadata is a\n   name-value pair and is represented as different fields (object, optional).</li>\n   <li>missing-metadata: the number of metadata entries that were not returned\n   in the metadata object. This can happen if you create metadata using an API\n   like SOAP that supports more flexible metadata than the REST API. (integer,\n   optional).</li>\n   <li>version: the object version (string, optional). If versioning is enabled\n   for the specified object and no version is specified the permissions for the\n   latest version of the object will be returned. If specified, only the\n   permissions for that particular version of the object will be returned.</li>\n   <li>expiration: if the object expiration is configured (see\n   <a href="http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlifecycle.html">PUT Bucket lifecycle</a>),\n   this field is present. It includes the expiry-date and rule-id key value\n   pairs providing object expiration information. The value of rule-id is URL\n   encoded.(string, optional).</li>\n   <li>restore: if the object is an archived object (an object whose storage\n   class is Glacier), the response includes this header if either the archive\n   restoration is in progress (see\n   <a href="http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPOSTrestore.html">POST Object restore</a>),\n   or an archive copy is already restored.(string, optional).</li>\n   <li>serverSideEncryption: If the object is stored by using server-side\n   encryption, the response includes this header with a value of the encryption\n   algorithm that was used.(string, optional).</li>\n   <li>lastModified: the date in which the object was last modified (dateTime,\n   optional).</li>\n   <li>eTag: the entity tag is a hash of the object. The eTag only reflects\n   changes to the contents of an object, not its metadata. The eTag is determined\n   when an object is created. For objects created by the PUT Object operation\n   and the POST Object operation, the eTag is a quoted, 32-digit hexadecimal\n   string representing the MD5 digest of the object data. For other objects,\n   the eTag may or may not be an MD5 digest of the object data. If the eTag is\n   not an MD5 digest of the object data, it will contain one or more non-hexadecimal\n   characters and/or will consist of less than 32 or more than 32 hexadecimal\n   digits.(string, optional).</li>\n   <li>mediaType: the object media-type (string, mandatory).</li>\n   <li>length: the object content length (integer, optional).</li>\n   <li>content: the object content. (item, optional). The type of this field\n   is determined by the media-type returned by the server. If the media-type\n   indicates that the body content is textual, then the content has type string,\n   base64Binary otherwise. Specifically, the body content is considered textual\n   if and only if the MIME-type specified in the media-type is one of:\n   <ul>\n     <li>"application/json"</li>\n     <li>"application/x-javascript"</li>\n     <li>"application/xml"</li>\n     <li>"application/xml-external-parsed-entity"</li>\n   </ul>\n   or if the MIME-type starts with "text/" or ends with "+xml".</li>\n </ul>\n </p>\n',summary:"<p>  Retrieves an S3 object using the default S3 credentials.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s3-object",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The S3 object or object version to retrieve.</div>'}],returns:{type:"object()",description:"the specified object."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the default S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OBJECT if the object specification is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the used credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:RESPONSE the response received from S3 cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:2,name:"read-object",qname:"s3:read-object",signature:"($credentials as item()?, $s3-object as item()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves an S3 object using the specified S3 credentials.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The S3 object is specified through the $s3-object parameter. Either a string\n or a JSON object can be used. If a string is specified, it is interpreted as\n key for an object in the default bucket of the specified credentials. If no default\n bucket is present in the specified credentials, the <code>s3:BUCKET</code> error\n is raised. If a JSON object is used, it must have the following structure:\n <ul>\n   <li>key: the object key (string, mandatory).</li>\n   <li>bucket: the bucket name (string, optional). If this field is not present\n   and the specified credentials do not have a default bucket, the\n   <code>s3:BUCKET</code> error is raised.</li>\n   <li>version: the object version (string, optional). If versioning is enabled\n   for the specified object and no version is specified the latest version of\n   the object will be returned. If specified, only that particular version of\n   the object will be returned.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n let $object :=\n {\n   "key": "object",\n   "bucket": "28msec",\n   "version": "3/L4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo"\n }\n return s3:read-object($object)\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example return object:\n <pre>\n {\n   "key": "test.xml",\n   "bucket": "28msec",\n   "metadata":\n   {\n     "author": "28msec"\n   },\n   "missing-metadata" : 1,\n   "version": "3GL4kqtJlcpXroDTDm3vjVBH40Nr8X8g",\n   "expiration": "expiry-date=\\"Fri, 21 Dec 2012 00:00:00 GMT\\", rule-id=\\"Rule for testfile.txt\\""\n   "restore": "x-amz-restore: ongoing-request=\\"false\\", expiry-date=\\"Wed, 07 Nov 2012 00:00:00 GMT\\""\n   "serverSideEncryption": "AES256",\n   "lastModified": "Mon, 15 Oct 2012 21:58:07 GMT",\n   "eTag": "1accb31fcf202eba0c0f41fa2f09b4d7",\n   "mediaType": "text/plain"\n   "length": "28",\n   "content: "1234567890123456789012345678"\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The fields in the returned object have the following meanings:\n <ul>\n   <li>key: the object key (string, mandatory).</li>\n   <li>bucket: the bucket name (string, mandatory).</li>\n   <li>metadata: an object specifying additional metadata. Each metadata is a\n   name-value pair and is represented as different fields (object, optional).</li>\n   <li>missing-metadata: the number of metadata entries that were not returned\n   in the metadata object. This can happen if you create metadata using an API\n   like SOAP that supports more flexible metadata than the REST API. (integer,\n   optional).</li>\n   <li>version: the object version (string, optional). If versioning is enabled\n   for the specified object and no version is specified the permissions for the\n   latest version of the object will be returned. If specified, only the\n   permissions for that particular version of the object will be returned.</li>\n   <li>expiration: if the object expiration is configured (see\n   <a href="http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlifecycle.html">PUT Bucket lifecycle</a>),\n   this field is present. It includes the expiry-date and rule-id key value\n   pairs providing object expiration information. The value of rule-id is URL\n   encoded.(string, optional).</li>\n   <li>restore: if the object is an archived object (an object whose storage\n   class is Glacier), the response includes this header if either the archive\n   restoration is in progress (see\n   <a href="http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPOSTrestore.html">POST Object restore</a>),\n   or an archive copy is already restored.(string, optional).</li>\n   <li>serverSideEncryption: If the object is stored by using server-side\n   encryption, the response includes this header with a value of the encryption\n   algorithm that was used.(string, optional).</li>\n   <li>lastModified: the date in which the object was last modified (dateTime,\n   optional).</li>\n   <li>eTag: the entity tag is a hash of the object. The eTag only reflects\n   changes to the contents of an object, not its metadata. The eTag is determined\n   when an object is created. For objects created by the PUT Object operation\n   and the POST Object operation, the eTag is a quoted, 32-digit hexadecimal\n   string representing the MD5 digest of the object data. For other objects,\n   the eTag may or may not be an MD5 digest of the object data. If the eTag is\n   not an MD5 digest of the object data, it will contain one or more non-hexadecimal\n   characters and/or will consist of less than 32 or more than 32 hexadecimal\n   digits.(string, optional).</li>\n   <li>mediaType: the object media-type (string, mandatory).</li>\n   <li>length: the object content length (integer, optional).</li>\n   <li>content: the object content. (item, optional). The type of this field\n   is determined by the media-type returned by the server. If the media-type\n   indicates that the body content is textual,then the content has type string,\n   base64Binary otherwise. Specifically, the body content is considered textual\n   if and only if the MIME-type specified in the media-type is one of:\n   <ul>\n     <li>"application/json"</li>\n     <li>"application/x-javascript"</li>\n     <li>"application/xml"</li>\n     <li>"application/xml-external-parsed-entity"</li>\n   </ul>\n   or if the MIME-type starts with "text/" or ends with "+xml".</li>\n </ul>\n </p>\n',summary:"<p>  Retrieves an S3 object using the specified S3 credentials.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"credentials",type:"item()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The credentials to use.</div>'},{name:"s3-object",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The S3 object or object version to retrieve.</div>'}],returns:{type:"object()",description:"the specified object."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the specified S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OBJECT if the object specification is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the used credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:RESPONSE the response received from S3 cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:1,name:"read-text-nondeterministic",qname:"s3:read-text-nondeterministic",signature:"($s3-object as item()) as string",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves the textual content of an S3 object using the default S3 credentials.\n The object content is forced to be interpreted as textual, with a UTF-8 charset\n and will be returned as string.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#read-text-1">read-text#1</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Retrieves the textual content of an S3 object using the default S3 credentials.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"s3-object",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The S3 object or object version to retrieve.</div>'}],returns:{type:"string",description:"the object or object version textual content."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the default S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OBJECT if the object specification is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the used credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:RESPONSE the response received from S3 cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:2,name:"read-text-nondeterministic",qname:"s3:read-text-nondeterministic",signature:"($credentials as item()?, $s3-object as item()) as string",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves the textual content of an S3 object using the specified S3 credentials.\n The object content is forced to be interpreted as textual, with a UTF-8 charset\n and will be returned as string.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#read-text-2">read-text#2</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Retrieves the textual content of an S3 object using the specified S3 credentials.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"credentials",type:"item()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The credentials to use.</div>'},{name:"s3-object",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The S3 object or object version to retrieve.</div>'}],returns:{type:"string",description:"the object or object version textual content."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the specified S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OBJECT if the object specification is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the used credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:RESPONSE the response received from S3 cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:1,name:"read-text",qname:"s3:read-text",signature:"($s3-object as item()) as string",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves the textual content of an S3 object using the default S3 credentials.\n The object content is forced to be interpreted as textual, with a UTF-8 charset\n and will be returned as string.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The S3 object is specified through the $s3-object parameter. Either a string\n or a JSON object can be used. If a string is specified, it is interpreted as\n key for an object in the default bucket of the default credentials. If no default\n bucket is present in the default credentials, the <code>s3:BUCKET</code> error\n is raised. If a JSON object is used, it must have the following structure:\n <ul>\n   <li>key: the object key (string, mandatory).</li>\n   <li>bucket: the bucket name (string, optional). If this field is not present\n   and the default credentials do not have a default bucket, the\n   <code>s3:BUCKET</code> error is raised.</li>\n   <li>version: the object version (string, optional). If versioning is enabled\n   for the specified object and no version is specified the latest version of\n   the object will be returned. If specified, only that particular version of\n   the object will be returned.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n let $object :=\n {\n   "key": "object",\n   "bucket": "28msec",\n   "version": "3/L4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo"\n }\n return s3:read-text("credentials", $object)\n </pre>\n </p>\n',summary:"<p>  Retrieves the textual content of an S3 object using the default S3 credentials.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s3-object",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The S3 object or object version to retrieve.</div>'}],returns:{type:"string",description:"the object or object version textual content."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the default S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OBJECT if the object specification is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the used credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:RESPONSE the response received from S3 cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:2,name:"read-text",qname:"s3:read-text",signature:"($credentials as item()?, $s3-object as item()) as string",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves the textual content of an S3 object using the specified S3 credentials.\n The object content is forced to be interpreted as textual, with a UTF-8 charset\n and will be returned as string.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The S3 object is specified through the $s3-object parameter. Either a string\n or a JSON object can be used. If a string is specified, it is interpreted as\n key for an object in the default bucket of the specified credentials. If no default\n bucket is present in the specified credentials, the <code>s3:BUCKET</code> error\n is raised. If a JSON object is used, it must have the following structure:\n <ul>\n   <li>key: the object key (string, mandatory).</li>\n   <li>bucket: the bucket name (string, optional). If this field is not present\n   and the specified credentials do not have a default bucket, the\n   <code>s3:BUCKET</code> error is raised.</li>\n   <li>version: the object version (string, optional). If versioning is enabled\n   for the specified object and no version is specified the latest version of\n   the object will be returned. If specified, only that particular version of\n   the object will be returned.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n let $object :=\n {\n   "key": "object",\n   "bucket": "28msec",\n   "version": "3/L4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo"\n }\n return s3:read-text("credentials", $object)\n </pre>\n </p>\n',summary:"<p>  Retrieves the textual content of an S3 object using the specified S3 credentials.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"credentials",type:"item()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The credentials to use.</div>'},{name:"s3-object",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The S3 object or object version to retrieve.</div>'}],returns:{type:"string",description:"the object or object version textual content."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the specified S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OBJECT if the object specification is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the used credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:RESPONSE the response received from S3 cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:1,name:"set-object-permissions",qname:"s3:set-object-permissions",signature:"($s3-object as item()) as empty-sequence()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Sets the access control list (ACL) of an S3 object using the default S3\n credentials.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The S3 object is specified through the $s3-object parameter. Either a string\n or a JSON object can be used. If a string is specified, it is interpreted as\n key for an object in the default bucket of the default credentials. If no default\n bucket is present in the default credentials, the <code>s3:BUCKET</code> error\n is raised. If a JSON object is used, it must have the following structure:\n <ul>\n   <li>key: the object key (string, mandatory).</li>\n   <li>bucket: the bucket name (string, optional). If this field is not present\n   and the default credentials do not have a default bucket, the\n   <code>s3:BUCKET</code> error is raised.</li>\n   <li>version: the object version (string, optional). If versioning is enabled\n   for the specified object and no version is specified the permissions for the\n   latest version of the object will be set. If specified, only the\n   permissions for that particular version of the object will be set.</li>\n   <li>permission: the permission to set (string, optional). It must be one of\n   "private", "public-read", "public-read-write", "authenticated-read",\n   "bucket-owner-read", "bucket-owner-full-control". For your convenience the\n   following variables can be used: <code>$s3:ACL-GRANT-PRIVATE</code>,\n   <code>$s3:ACL-GRANT-PUBLIC-READ</code>, <code>$s3:ACL-GRANT-PUBLIC-READ-WRITE</code>,\n   <code>$s3:ACL-GRANT-AUTHENTICATED-READ</code>, <code>$s3:ACL-GRANT-BUCKET-OWNER-READ</code>,\n   <code>$s3:ACL-GRANT-BUCKET-OWNER-FULL-CONTROL</code>. If this field is not\n   specified, the "private" ACL is used, that is, the owner gets FULL_CONTROL,\n   and no one else has access rights.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n let $object :=\n {\n   "key": "object",\n   "bucket": "28msec",\n   "version": "3/L4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo",\n   "permission": $s3:ACL-GRANT-PUBLIC-READ\n }\n return s3:set-object-permissions($object)\n </pre>\n </p>\n',summary:"<p>  Sets the access control list (ACL) of an S3 object using the default S3\n credentials.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"s3-object",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The S3 object or object version and ACL to set.</div>'}],returns:{type:"empty-sequence()",description:"the empty sequence"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the default S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OBJECT if the object specification is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the used credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>']},{isDocumented:!0,arity:2,name:"set-object-permissions",qname:"s3:set-object-permissions",signature:"($credentials as item()?, $s3-object as item()) as empty-sequence()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Sets the access control list (ACL) of an S3 object using the specified S3\n credentials.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The S3 object is specified through the $s3-object parameter. Either a string\n or a JSON object can be used. If a string is specified, it is interpreted as\n key for an object in the default bucket of the specified credentials. If no default\n bucket is present in the specified credentials, the <code>s3:BUCKET</code> error\n is raised. If a JSON object is used, it must have the following structure:\n <ul>\n   <li>key: the object key (string, mandatory).</li>\n   <li>bucket: the bucket name (string, optional). If this field is not present\n   and the specified credentials do not have a default bucket, the\n   <code>s3:BUCKET</code> error is raised.</li>\n   <li>version: the object version (string, optional). If versioning is enabled\n   for the specified object and no version is specified the permissions for the\n   latest version of the object will be set. If specified, only the\n   permissions for that particular version of the object will be set.</li>\n   <li>permission: the permission to set (string, optional). It must be one of\n   "private", "public-read", "public-read-write", "authenticated-read",\n   "bucket-owner-read", "bucket-owner-full-control". For your convenience the\n   following variables can be used: <code>$s3:ACL-GRANT-PRIVATE</code>,\n   <code>$s3:ACL-GRANT-PUBLIC-READ</code>, <code>$s3:ACL-GRANT-PUBLIC-READ-WRITE</code>,\n   <code>$s3:ACL-GRANT-AUTHENTICATED-READ</code>, <code>$s3:ACL-GRANT-BUCKET-OWNER-READ</code>,\n   <code>$s3:ACL-GRANT-BUCKET-OWNER-FULL-CONTROL</code>. If this field is not\n   specified, the "private" ACL is used, that is, the owner gets FULL_CONTROL,\n   and no one else has access rights.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n let $object :=\n {\n   "key": "object",\n   "bucket": "28msec",\n   "version": "3/L4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo",\n   "permission": $s3:ACL-GRANT-PUBLIC-READ\n }\n return s3:set-object-permissions($object)\n </pre>\n </p>\n',summary:"<p>  Sets the access control list (ACL) of an S3 object using the specified S3\n credentials.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"credentials",type:"item()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The credentials to use.</div>'},{name:"s3-object",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The S3 object or object version and ACL to set.</div>'}],returns:{type:"empty-sequence()",description:"the empty sequence"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the specified S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OBJECT if the object specification is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the used credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>']},{isDocumented:!0,arity:2,name:"write-binary",qname:"s3:write-binary",signature:"($object as item(), $binary-content as base64Binary) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Writes a binary object in an S3 bucket using the default S3 credentials.\n If the object already exists it is overwritten.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The S3 object is specified through the $s3-object parameter. Either a string\n or a JSON object can be used.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If a string is specified, it is interpreted as\n key for an object in the default bucket of the default credentials. If no default\n bucket is present in the default credentials, the <code>s3:BUCKET</code> error\n is raised. The object media-type will be set to "binary/octet-stream", no metadata will\n be set for the object, the object will be stored on standard redundancy storage,\n and the object permission will be set to "private", that is, the owner gets\n FULL_CONTROL, and no one else has access rights.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If a JSON object is used, it must have the following structure:\n <ul>\n   <li>key: the object key (string, mandatory).</li>\n   <li>bucket: the bucket name (string, optional). If this field is not present\n   and the default credentials do not have a default bucket, the\n   <code>s3:BUCKET</code> error is raised.</li>\n   <li>mediaType: the media-type of the object (string, optional). If not specified,\n   "binary/octet-stream" is used.</li>\n   <li>metadata: an object specifying additional metadata. Each metadata is a\n   name-value pair and is represented as different fields (object, optional).</li>\n   <li>permission: the permission to set (string, optional). It must be one of\n   "private", "public-read", "public-read-write", "authenticated-read",\n   "bucket-owner-read", "bucket-owner-full-control". For your convenience the\n   following variables can be used: <code>$s3:ACL-GRANT-PRIVATE</code>,\n   <code>$s3:ACL-GRANT-PUBLIC-READ</code>, <code>$s3:ACL-GRANT-PUBLIC-READ-WRITE</code>,\n   <code>$s3:ACL-GRANT-AUTHENTICATED-READ</code>, <code>$s3:ACL-GRANT-BUCKET-OWNER-READ</code>,\n   <code>$s3:ACL-GRANT-BUCKET-OWNER-FULL-CONTROL</code>. If this field is not\n   specified, the "private" ACL is used, that is, the owner gets FULL_CONTROL,\n   and no one else has access rights.</li>\n   <li>reducedRedundancy: whether to use reduced-redundancy or not (bool,\n   optional). Default is false.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n variable $s3-object :=\n {\n   "key": "test.xml",\n   "bucket": "28msec",\n   "permission": $const:ACL-GRANT-PUBLIC-READ,\n   "metadata": { "author": "28msec" },\n   "mediaType": "application/octet-stream"\n }\n s3:write-binary($s3-object, base64Binary("Mjhtc2Vj"))\n </pre>\n Example Result:\n <pre>\n {\n   "expiration": "expiry-date=\\"Fri, 23 Dec 2012 00:00:00 GMT\\", rule-id=\\"1\\"",\n   "version": "3GL4kqtJlcpXroDTDm3vjVBH40Nr8X8g",\n   "eTag": "\\"1b2cf535f27731c974343645a3985328\\""\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The meaning of the fields in the result object is the following:\n <ul>\n   <li>expiration: if the object expiration is configured, the response\n   includes this header. It includes the expiry-date and rule-id key-value\n   pairs providing object expiration information. The value of the rule-id is\n   URL encoded. (string, optional)</li>\n   <li>version: the version of the object. When you enable versioning,\n   Amazon S3 generates a random number for objects added to a bucket. The value\n   is UTF-8 encoded and URL ready. When you PUT an object in a bucket where\n   versioning has been suspended, the version ID is always null. (string, optional)</li>\n   <li>eTag: the entity tag is a hash of the object. The eTag only reflects\n   changes to the contents of an object, not its metadata. The eTag is determined\n   when an object is created. The eTag returned by this method is a quoted,\n   32-digit hexadecimal string representing the MD5 digest of the object data.\n   For other objects, the eTag may or may not be an MD5 digest of the object data.\n   (string, optional).</li>\n </ul>\n </p>\n',summary:"<p>  Writes a binary object in an S3 bucket using the default S3 credentials.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"object",type:"item()",occurrence:null,description:""},{name:"binary-content",type:"base64Binary",occurrence:null,description:""}],returns:{type:"object()",description:"the S3 operation result."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the default S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OBJECT if the object specification is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the used credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>']},{isDocumented:!0,arity:3,name:"write-binary",qname:"s3:write-binary",signature:"($credentials as item()?, $object as item(), $binary-content as base64Binary) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Writes a binary object in an S3 bucket using the specified S3 credentials.\n If the object already exists it is overwritten.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The S3 object is specified through the $s3-object parameter. Either a string\n or a JSON object can be used.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If a string is specified, it is interpreted as\n key for an object in the default bucket of the specified credentials. If no default\n bucket is present in the specified credentials, the <code>s3:BUCKET</code> error\n is raised. The object media-type will be set to "binary/octet-stream", no metadata will\n be set for the object, the object will be stored on standard redundancy storage,\n and the object permission will be set to "private", that is, the owner gets\n FULL_CONTROL, and no one else has access rights.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If a JSON object is used, it must have the following structure:\n <ul>\n   <li>key: the object key (string, mandatory).</li>\n   <li>bucket: the bucket name (string, optional). If this field is not present\n   and the specified credentials do not have a default bucket, the\n   <code>s3:BUCKET</code> error is raised.</li>\n   <li>mediaType: the media-type of the object (string, optional). If not specified,\n   "binary/octet-stream" is used.</li>\n   <li>metadata: an object specifying additional metadata. Each metadata is a\n   name-value pair and is represented as different fields (object, optional).</li>\n   <li>permission: the permission to set (string, optional). It must be one of\n   "private", "public-read", "public-read-write", "authenticated-read",\n   "bucket-owner-read", "bucket-owner-full-control". For your convenience the\n   following variables can be used: <code>$s3:ACL-GRANT-PRIVATE</code>,\n   <code>$s3:ACL-GRANT-PUBLIC-READ</code>, <code>$s3:ACL-GRANT-PUBLIC-READ-WRITE</code>,\n   <code>$s3:ACL-GRANT-AUTHENTICATED-READ</code>, <code>$s3:ACL-GRANT-BUCKET-OWNER-READ</code>,\n   <code>$s3:ACL-GRANT-BUCKET-OWNER-FULL-CONTROL</code>. If this field is not\n   specified, the "private" ACL is used, that is, the owner gets FULL_CONTROL,\n   and no one else has access rights.</li>\n   <li>reducedRedundancy: whether to use reduced-redundancy or not (bool,\n   optional). Default is false.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n variable $s3-object :=\n {\n   "key": "test.xml",\n   "bucket": "28msec",\n   "permission": $const:ACL-GRANT-PUBLIC-READ,\n   "metadata": { "author": "28msec" },\n   "mediaType": "application/octet-stream"\n }\n s3:write-binary("credentials", $s3-object, base64Binary("Mjhtc2Vj"))\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example return object:\n <pre>\n {\n   "expiration": "expiry-date=\\"Fri, 23 Dec 2012 00:00:00 GMT\\", rule-id=\\"1\\"",\n   "version": "3GL4kqtJlcpXroDTDm3vjVBH40Nr8X8g",\n   "eTag": "\\"1b2cf535f27731c974343645a3985328\\""\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The fields in the returned object have the following meanings:\n <ul>\n   <li>expiration: if the object expiration is configured, the response\n   includes this header. It includes the expiry-date and rule-id key-value\n   pairs providing object expiration information. The value of the rule-id is\n   URL encoded. (string, optional)</li>\n   <li>version: the version of the object. When you enable versioning,\n   Amazon S3 generates a random number for objects added to a bucket. The value\n   is UTF-8 encoded and URL ready. When you PUT an object in a bucket where\n   versioning has been suspended, the version ID is always null. (string, optional)</li>\n   <li>eTag: the entity tag is a hash of the object. The eTag only reflects\n   changes to the contents of an object, not its metadata. The eTag is determined\n   when an object is created. The eTag returned by this method is a quoted,\n   32-digit hexadecimal string representing the MD5 digest of the object data.\n   For other objects, the eTag may or may not be an MD5 digest of the object data.\n   (string, optional).</li>\n </ul>\n </p>\n',summary:"<p>  Writes a binary object in an S3 bucket using the specified S3 credentials.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"credentials",type:"item()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The credentials to use.</div>'},{name:"object",type:"item()",occurrence:null,description:""},{name:"binary-content",type:"base64Binary",occurrence:null,description:""}],returns:{type:"object()",description:"the S3 operation result."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the specified S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OBJECT if the object specification is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the used credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>']},{isDocumented:!0,arity:1,name:"write-object",qname:"s3:write-object",signature:"($s3-object as item()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Writes an object in an S3 bucket using the default S3 credentials.\n If the object already exists it is overwritten.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The object to write and its contents are specified through the $s3-object\n parameter, which must have the following structure:\n <ul>\n   <li>key: the object key (string, mandatory).</li>\n   <li>bucket: the bucket name (string, optional). If this field is not present\n   and the default credentials do not have a default bucket, the\n   <code>s3:BUCKET</code> error is raised.</li>\n   <li>content: the object content. It must either be a string or a base64Binary\n   atomic. (item, mandatory).</li>\n   <li>mediaType: the media-type of the object (string, optional). If not specified,\n   "text/plain" is used if the content field is of type string, "binary/octet-stream"\n   if it is of type base64Binary.</li>\n   <li>metadata: an object specifying additional metadata. Each metadata is a\n   name-value pair and is represented as different fields (object, optional).</li>\n   <li>permission: the permission to set (string, optional). It must be one of\n   "private", "public-read", "public-read-write", "authenticated-read",\n   "bucket-owner-read", "bucket-owner-full-control". For your convenience the\n   following variables can be used: <code>$s3:ACL-GRANT-PRIVATE</code>,\n   <code>$s3:ACL-GRANT-PUBLIC-READ</code>, <code>$s3:ACL-GRANT-PUBLIC-READ-WRITE</code>,\n   <code>$s3:ACL-GRANT-AUTHENTICATED-READ</code>, <code>$s3:ACL-GRANT-BUCKET-OWNER-READ</code>,\n   <code>$s3:ACL-GRANT-BUCKET-OWNER-FULL-CONTROL</code>. If this field is not\n   specified, the "private" ACL is used, that is, the owner gets FULL_CONTROL,\n   and no one else has access rights.</li>\n   <li>reducedRedundancy: whether to use reduced-redundancy or not (bool,\n   optional). Default is false.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n variable $s3-object :=\n {\n   "key": "test.xml",\n   "bucket": "28msec",\n   "permission": $const:ACL-GRANT-PUBLIC-READ,\n   "metadata": { "author": "28msec" },\n   "content": serialize({ "Hello": "World" }),\n   "mediaType": "application/xml"\n }\n s3:write-object($s3-object)\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example return object:\n <pre>\n {\n   "expiration": "expiry-date=\\"Fri, 23 Dec 2012 00:00:00 GMT\\", rule-id=\\"1\\"",\n   "version": "3GL4kqtJlcpXroDTDm3vjVBH40Nr8X8g",\n   "eTag": "\\"1b2cf535f27731c974343645a3985328\\""\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The fields in the returned object have the following meanings:\n <ul>\n   <li>expiration: if the object expiration is configured, the response\n   includes this header. It includes the expiry-date and rule-id key-value\n   pairs providing object expiration information. The value of the rule-id is\n   URL encoded. (string, optional)</li>\n   <li>version: the version of the object. When you enable versioning,\n   Amazon S3 generates a random number for objects added to a bucket. The value\n   is UTF-8 encoded and URL ready. When you PUT an object in a bucket where\n   versioning has been suspended, the version ID is always null. (string, optional)</li>\n   <li>eTag: the entity tag is a hash of the object. The eTag only reflects\n   changes to the contents of an object, not its metadata. The eTag is determined\n   when an object is created. The eTag returned by this method is a quoted,\n   32-digit hexadecimal string representing the MD5 digest of the object data.\n   For other objects, the eTag may or may not be an MD5 digest of the object data.\n   (string, optional).</li>\n </ul>\n </p>\n',summary:"<p>  Writes an object in an S3 bucket using the default S3 credentials.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"s3-object",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The S3 object to write.</div>'}],returns:{type:"object()",description:"the S3 operation result."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the default S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OBJECT if the object specification is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the used credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>']},{isDocumented:!0,arity:2,name:"write-object",qname:"s3:write-object",signature:"($credentials as item()?, $s3-object as object()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Writes an object in an S3 bucket using the specified credentials.\n If the object already exists it is overwritten.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The object to write and its contents are specified through the $s3-object\n parameter, which must have the following structure:\n <ul>\n   <li>key: the object key (string, mandatory).</li>\n   <li>bucket: the bucket name (string, optional). If this field is not present\n   and the specified credentials do not have a default bucket, the\n   <code>s3:BUCKET</code> error is raised.</li>\n   <li>content: the object content. It must either be a string or a base64Binary\n   atomic. (item, mandatory).</li>\n   <li>mediaType: the media-type of the object (string, optional). If not specified,\n   "text/plain" is used if the content field is of type string, "binary/octet-stream"\n   if it is of type base64Binary.</li>\n   <li>metadata: an object specifying additional metadata. Each metadata is a\n   name-value pair and is represented as different fields (object, optional).</li>\n   <li>permission: the permission to set (string, optional). It must be one of\n   "private", "public-read", "public-read-write", "authenticated-read",\n   "bucket-owner-read", "bucket-owner-full-control". For your convenience the\n   following variables can be used: <code>$s3:ACL-GRANT-PRIVATE</code>,\n   <code>$s3:ACL-GRANT-PUBLIC-READ</code>, <code>$s3:ACL-GRANT-PUBLIC-READ-WRITE</code>,\n   <code>$s3:ACL-GRANT-AUTHENTICATED-READ</code>, <code>$s3:ACL-GRANT-BUCKET-OWNER-READ</code>,\n   <code>$s3:ACL-GRANT-BUCKET-OWNER-FULL-CONTROL</code>. If this field is not\n   specified, the "private" ACL is used, that is, the owner gets FULL_CONTROL,\n   and no one else has access rights.</li>\n   <li>reducedRedundancy: whether to use reduced-redundancy or not (bool,\n   optional). Default is false.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n variable $s3-object :=\n {\n   "key": "test.xml",\n   "bucket": "28msec",\n   "permission": $const:ACL-GRANT-PUBLIC-READ,\n   "metadata": { "author": "28msec" },\n   "content": serialize({ "Hello": "World" }),\n   "mediaType": "application/xml"\n }\n s3:write-object("s3", $s3-object)\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example return object:\n <pre>\n {\n   "expiration": "expiry-date=\\"Fri, 23 Dec 2012 00:00:00 GMT\\", rule-id=\\"1\\"",\n   "version": "3GL4kqtJlcpXroDTDm3vjVBH40Nr8X8g",\n   "eTag": "\\"1b2cf535f27731c974343645a3985328\\""\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The fields in the returned object have the following meanings:\n <ul>\n   <li>expiration: if the object expiration is configured, the response\n   includes this header. It includes the expiry-date and rule-id key-value\n   pairs providing object expiration information. The value of the rule-id is\n   URL encoded. (string, optional)</li>\n   <li>version: the version of the object. When you enable versioning,\n   Amazon S3 generates a random number for objects added to a bucket. The value\n   is UTF-8 encoded and URL ready. When you PUT an object in a bucket where\n   versioning has been suspended, the version ID is always null. (string, optional)</li>\n   <li>eTag: the entity tag is a hash of the object. The eTag only reflects\n   changes to the contents of an object, not its metadata. The eTag is determined\n   when an object is created. The eTag returned by this method is a quoted,\n   32-digit hexadecimal string representing the MD5 digest of the object data.\n   For other objects, the eTag may or may not be an MD5 digest of the object data.\n   (string, optional).</li>\n </ul>\n </p>\n',summary:"<p>  Writes an object in an S3 bucket using the specified credentials.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"credentials",type:"item()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The credentials to use.</div>'},{name:"s3-object",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The S3 object to write.</div>'}],returns:{type:"object()",description:"the S3 operation result."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the specified S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OBJECT if the object specification is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the used credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>']},{isDocumented:!0,arity:2,name:"write-text",qname:"s3:write-text",signature:"($object as item(), $text-content as string) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Writes a textual object in an S3 bucket using the default S3 credentials.\n If the object already exists it is overwritten.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The S3 object is specified through the $s3-object parameter. Either a string\n or a JSON object can be used.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If a string is specified, it is interpreted as\n key for an object in the default bucket of the default credentials. If no default\n bucket is present in the default credentials, the <code>s3:BUCKET</code> error\n is raised. The object media-type will be set to "text/plain", no metadata will\n be set for the object, the object will be stored on standard redundancy storage,\n and the object permission will be set to "private", that is, the owner gets\n FULL_CONTROL, and no one else has access rights.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If a JSON object is used, it must have the following structure:\n <ul>\n   <li>key: the object key (string, mandatory).</li>\n   <li>bucket: the bucket name (string, optional). If this field is not present\n   and the default credentials do not have a default bucket, the\n   <code>s3:BUCKET</code> error is raised.</li>\n   <li>mediaType: the media-type of the object (string, optional). If not specified,\n   "text/plain" is used.</li>\n   <li>metadata: an object specifying additional metadata. Each metadata is a\n   name-value pair and is represented as different fields (object, optional).</li>\n   <li>permission: the permission to set (string, optional). It must be one of\n   "private", "public-read", "public-read-write", "authenticated-read",\n   "bucket-owner-read", "bucket-owner-full-control". For your convenience the\n   following variables can be used: <code>$s3:ACL-GRANT-PRIVATE</code>,\n   <code>$s3:ACL-GRANT-PUBLIC-READ</code>, <code>$s3:ACL-GRANT-PUBLIC-READ-WRITE</code>,\n   <code>$s3:ACL-GRANT-AUTHENTICATED-READ</code>, <code>$s3:ACL-GRANT-BUCKET-OWNER-READ</code>,\n   <code>$s3:ACL-GRANT-BUCKET-OWNER-FULL-CONTROL</code>. If this field is not\n   specified, the "private" ACL is used, that is, the owner gets FULL_CONTROL,\n   and no one else has access rights.</li>\n   <li>reducedRedundancy: whether to use reduced-redundancy or not (bool,\n   optional). Default is false.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n variable $s3-object :=\n {\n   "key": "test.xml",\n   "bucket": "28msec",\n   "permission": $const:ACL-GRANT-PUBLIC-READ,\n   "metadata": { "author": "28msec" },\n   "mediaType": "text/xml"\n }\n s3:write-text($s3-object, serialize(&lt;a/&gt;))\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example return object:\n <pre>\n {\n   "expiration": "expiry-date=\\"Fri, 23 Dec 2012 00:00:00 GMT\\", rule-id=\\"1\\"",\n   "version": "3GL4kqtJlcpXroDTDm3vjVBH40Nr8X8g",\n   "eTag": "\\"1b2cf535f27731c974343645a3985328\\""\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The fields in the returned object have the following meanings:\n <ul>\n   <li>expiration: if the object expiration is configured, the response\n   includes this header. It includes the expiry-date and rule-id key-value\n   pairs providing object expiration information. The value of the rule-id is\n   URL encoded. (string, optional)</li>\n   <li>version: the version of the object. When you enable versioning,\n   Amazon S3 generates a random number for objects added to a bucket. The value\n   is UTF-8 encoded and URL ready. When you PUT an object in a bucket where\n   versioning has been suspended, the version ID is always null. (string, optional)</li>\n   <li>eTag: the entity tag is a hash of the object. The eTag only reflects\n   changes to the contents of an object, not its metadata. The eTag is determined\n   when an object is created. The eTag returned by this method is a quoted,\n   32-digit hexadecimal string representing the MD5 digest of the object data.\n   For other objects, the eTag may or may not be an MD5 digest of the object data.\n   (string, optional).</li>\n </ul>\n </p>\n',summary:"<p>  Writes a textual object in an S3 bucket using the default S3 credentials.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"object",type:"item()",occurrence:null,description:""},{name:"text-content",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The textual object content.</div>'}],returns:{type:"object()",description:"the S3 operation result."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the default S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OBJECT if the object specification is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the used credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>']},{isDocumented:!0,arity:3,name:"write-text",qname:"s3:write-text",signature:"($credentials as item()?, $object as item(), $text-content as string) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Writes a text object in an S3 bucket using the specified S3 credentials.\n If the object already exists it is overwritten.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The S3 object is specified through the $s3-object parameter. Either a string\n or a JSON object can be used.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If a string is specified, it is interpreted as\n key for an object in the default bucket of the specified credentials. If no default\n bucket is present in the specified credentials, the <code>s3:BUCKET</code> error\n is raised. The object media-type will be set to "text/plain", no metadata will\n be set for the object, the object will be stored on standard redundancy storage,\n and the object permission will be set to "private", that is, the owner gets\n FULL_CONTROL, and no one else has access rights.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If a JSON object is used, it must have the following structure:\n <ul>\n   <li>key: the object key (string, mandatory).</li>\n   <li>bucket: the bucket name (string, optional). If this field is not present\n   and the specified credentials do not have a default bucket, the\n   <code>s3:BUCKET</code> error is raised.</li>\n   <li>mediaType: the media-type of the object (string, optional). If not specified,\n   "text/plain" is used.</li>\n   <li>metadata: an object specifying additional metadata. Each metadata is a\n   name-value pair and is represented as different fields (object, optional).</li>\n   <li>permission: the permission to set (string, optional). It must be one of\n   "private", "public-read", "public-read-write", "authenticated-read",\n   "bucket-owner-read", "bucket-owner-full-control". For your convenience the\n   following variables can be used: <code>$s3:ACL-GRANT-PRIVATE</code>,\n   <code>$s3:ACL-GRANT-PUBLIC-READ</code>, <code>$s3:ACL-GRANT-PUBLIC-READ-WRITE</code>,\n   <code>$s3:ACL-GRANT-AUTHENTICATED-READ</code>, <code>$s3:ACL-GRANT-BUCKET-OWNER-READ</code>,\n   <code>$s3:ACL-GRANT-BUCKET-OWNER-FULL-CONTROL</code>. If this field is not\n   specified, the "private" ACL is used, that is, the owner gets FULL_CONTROL,\n   and no one else has access rights.</li>\n   <li>reducedRedundancy: whether to use reduced-redundancy or not (bool,\n   optional). Default is false.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n variable $s3-object :=\n {\n   "key": "test.xml",\n   "bucket": "28msec",\n   "permission": $const:ACL-GRANT-PUBLIC-READ,\n   "metadata": { "author": "28msec" },\n   "mediaType": "text/xml"\n }\n s3:write-text("credentials", $s3-object, serialize(&lt;a/&gt;))\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example return object:\n <pre>\n {\n   "expiration": "expiry-date=\\"Fri, 23 Dec 2012 00:00:00 GMT\\", rule-id=\\"1\\"",\n   "version": "3GL4kqtJlcpXroDTDm3vjVBH40Nr8X8g",\n   "eTag": "\\"1b2cf535f27731c974343645a3985328\\""\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The fields in the returned object have the following meanings:\n <ul>\n   <li>expiration: if the object expiration is configured, the response\n   includes this header. It includes the expiry-date and rule-id key-value\n   pairs providing object expiration information. The value of the rule-id is\n   URL encoded. (string, optional)</li>\n   <li>version: the version of the object. When you enable versioning,\n   Amazon S3 generates a random number for objects added to a bucket. The value\n   is UTF-8 encoded and URL ready. When you PUT an object in a bucket where\n   versioning has been suspended, the version ID is always null. (string, optional)</li>\n   <li>eTag: the entity tag is a hash of the object. The eTag only reflects\n   changes to the contents of an object, not its metadata. The eTag is determined\n   when an object is created. The eTag returned by this method is a quoted,\n   32-digit hexadecimal string representing the MD5 digest of the object data.\n   For other objects, the eTag may or may not be an MD5 digest of the object data.\n   (string, optional).</li>\n </ul>\n </p>\n',summary:"<p>  Writes a text object in an S3 bucket using the specified S3 credentials.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"credentials",type:"item()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The credentials to use.</div>'},{name:"object",type:"item()",occurrence:null,description:""},{name:"text-content",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The textual object content.</div>'}],returns:{type:"object()",description:"the S3 operation result."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:CREDENTIALS if the specified S3 credentials cannot be found or are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:OBJECT if the object specification is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:BUCKET if no bucket has been specified and no default bucket is present in the used credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:HTTP an HTTP error occurred sending the request to S3</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">s3:REQUEST S3 refused to execute the request</xqdoc:error>']}],variables:[{name:"s3:ACL-GRANT-PRIVATE",type:"item()*",description:" The private canned ACL. It is applicable to buckets and objects.\n Owner gets FULL_CONTROL. No one else has access rights.\n"},{name:"s3:ACL-GRANT-PUBLIC-READ",type:"item()*",description:" The public-read canned ACL. Applicable to buckets and objects.\n Owner gets FULL_CONTROL. The AllUsers group gets READ access.\n"},{name:"s3:ACL-GRANT-PUBLIC-READ-WRITE",type:"item()*",description:" The public-read-write canned ACL. Applicable to buckets and objects.\n Owner gets FULL_CONTROL. The AllUsers group gets READ and WRITE access.\n Granting this on a bucket is generally not recommended.\n"},{name:"s3:ACL-GRANT-AUTHENTICATED-READ",type:"item()*",description:" The autenticated-read canned ACL. Applicable to buckets and objects.\n Owner gets FULL_CONTROL. The AuthenticatedUsers group gets READ access.\n"},{name:"s3:ACL-GRANT-BUCKET-OWNER-READ",type:"item()*",description:" The grant-bucket-owner-read canned ACL. Applicable to objects.\n Object owner gets FULL_CONTROL. Bucket owner gets READ access.\n If you specify this canned ACL when creating a bucket, Amazon S3 ignores it.\n"},{name:"s3:ACL-GRANT-BUCKET-OWNER-FULL-CONTROL",type:"item()*",description:" The grant-bucket-owner-full-control canned ACL. Applicable to objects.\n Both the object owner and the bucket owner get FULL_CONTROL over the object.\n If you specify this canned ACL when creating a bucket, Amazon S3 ignores it.\n"}]},"http://api.28.io/authorization":{ns:"http://api.28.io/authorization",description:"",sees:[],authors:[],version:null,encoding:null,namespaces:[{uri:"",prefix:"an"},{uri:"http://api.28.io/authorization",prefix:"authorization"},{uri:"http://zorba.io/modules/base64",prefix:"base64"},{uri:"http://zorba.io/modules/hmac",prefix:"hmac"},{uri:"http://expath.org/ns/http-client",prefix:"http-client"},{uri:"http://www.28msec.com/modules/project",prefix:"project"},{uri:"http://www.28msec.com/modules/http/request",prefix:"req"},{uri:"http://www.28msec.com/modules/http/response",prefix:"res"}],functions:[{isDocumented:!1,arity:0,name:"authorized",qname:"authorization:authorized",signature:"() as xs:boolean",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!1,arity:0,name:"html-do-login",qname:"authorization:html-do-login",signature:"()",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:0,name:"html-show-login",qname:"authorization:html-show-login",signature:"()",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[],returns:{type:null,description:""},errors:[]}],variables:[]},"http://zorba.io/modules/store/static/integrity-constraints/dml":{ns:"http://zorba.io/modules/store/static/integrity-constraints/dml",description:' This module defines a function to check if an integrity constraint is\n satisfied.\n The integrity constraint needs to be declared in the prolog of a module.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n This module is part of\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="../zorba/xqddf.html">Zorba\'s XQuery Data Definition Facility</a>.\n All the integrity constraints managed by this module have to be pre-declared\n in the prolog of a module.\n Please refer to the\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="../zorba/data_lifecycle.html">general documentation</a>\n for more information and examples.\n',sees:['<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0"><a href="../zorba/data_lifecycle.html">Data Lifecycle</a></xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0"><a href="../zorba/xqddf.html">XQuery Data Definition Facility</a></xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://zorba.io/modules/store/static/integrity-constraints/dml</xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://zorba.io/modules/store/static/collections/dml</xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://zorba.io/modules/store/static/collections/ddl</xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://zorba.io/modules/store/static/indexes/ddl</xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://zorba.io/modules/store/static/indexes/dml</xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://zorba.io/errors</xqdoc:see>'],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Nicolae Brinza, Matthias Brantner, David Graf, Till Westmann, Markos Zaharioudakis</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/modules/store/static/integrity-constraints/dml",prefix:"icdml"},{uri:"http://zorba.io/options/versioning",prefix:"ver"},{uri:"http://zorba.io/errors",prefix:"zerr"}],functions:[{isDocumented:!0,arity:1,name:"check-integrity-constraint",qname:"icdml:check-integrity-constraint",signature:"($name as xs:QName) as xs:boolean external",description:" Checks if the specified constraints are valid in the database.\n",summary:"<p> Checks if the specified constraints are valid in the database.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the integrity constraint to check.</div>'}],returns:{type:"xs:boolean",description:"true if the constraints are valid; false otherwise."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0031 if the integrity constraint is not declared.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0032 if the integrity constraint is not available.</xqdoc:error>']}],variables:[]},"http://zorba.io/modules/excel/statistical":{ns:"http://zorba.io/modules/excel/statistical",description:" This is a library module offering a part of the set of statistical functions\n defined by Microsoft Excel 2003.\n",sees:['<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0"><a href="http://office.microsoft.com/en-us/excel/CH062528311033.aspx" target="_blank">Excel 2003 Documentation: Statistical Functions</a></xqdoc:see>'],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Daniel Turcanu</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/modules/excel/statistical",prefix:"excel"},{uri:"http://zorba.io/modules/excel/errors",prefix:"excel-err"},{uri:"http://zorba.io/modules/excel/math",prefix:"excel-math"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"avedev",qname:"excel:avedev",signature:"($numbers as xs:anyAtomicType+) as xs:anyAtomicType",description:" Returns the average of the absolute deviations of data points from their mean.\n The formula is sum(abs(x - average_x))/n, where n is the count of x in the sequence.\n",summary:"<p> Returns the average of the absolute deviations of data points from their mean.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"xs:anyAtomicType",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of numbers or values castable to numeric. Sequence can be of any length from 1 up.</div>'}],returns:{type:"xs:anyAtomicType",description:"The formula result"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>']},{isDocumented:!0,arity:1,name:"average",qname:"excel:average",signature:"($numbers as xs:anyAtomicType*) as xs:anyAtomicType",description:" Returns the average (arithmetic mean) of the arguments.\n Arguments can be empty values, otherwise must be castable to numeric.\n If sequence is empty then zero is returned.\n The sequence can be of any length.\n",summary:"<p> Returns the average (arithmetic mean) of the arguments.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The sequence of numbers or empty values.</div>'}],returns:{type:"xs:anyAtomicType",description:"The sum of all numbers divided by the number of non-empty values."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"averagea",qname:"excel:averagea",signature:"($numbers as xs:anyAtomicType+) as xs:anyAtomicType",description:" Calculates the average (arithmetic mean) of the values in the sequence of arguments.\n Arguments can be of any type.\n The numbers are added, and the sum is divided by the size of entire sequence.\n",summary:"<p> Calculates the average (arithmetic mean) of the values in the sequence of arguments.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"xs:anyAtomicType",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of values of any type. The sequence can be of any length, from 1 up.</div>'}],returns:{type:"xs:anyAtomicType",description:"The result"},errors:[]},{isDocumented:!0,arity:1,name:"count",qname:"excel:count",signature:"($numbers as xs:anyAtomicType*) as xs:integer",description:" Counts the number of cells that contain numbers or values castable to numeric.\n",summary:"<p> Counts the number of cells that contain numbers or values castable to numeric.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The sequence of values, of any length.</div>'}],returns:{type:"xs:integer",description:"The count of numbers."},errors:[]},{isDocumented:!0,arity:1,name:"counta",qname:"excel:counta",signature:"($numbers as xs:anyAtomicType*) as xs:integer",description:' Counts the number of values that are not empty.\n Empty values are the one with string value "".\n',summary:"<p> Counts the number of values that are not empty.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of values of any type, any length</div>'}],returns:{type:"xs:integer",description:"The count of non-empty values"},errors:[]},{isDocumented:!0,arity:1,name:"countblank",qname:"excel:countblank",signature:"($cells as xs:anyAtomicType*) as xs:integer",description:' Counts the empty values in a sequence.\n The empty values are the ones with string value "".\n The value 0 is not counted.\n',summary:"<p> Counts the empty values in a sequence.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"cells",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of values, of any length</div>'}],returns:{type:"xs:integer",description:"The count"},errors:[]},{isDocumented:!0,arity:2,name:"large",qname:"excel:large",signature:"($numbers as xs:anyAtomicType*, $k as xs:integer) as xs:anyAtomicType",description:" Returns the k-th largest value in a data set.\n If n is the number of data points in a range,\n   then LARGE(array,1) returns the largest value,\n   and LARGE(array,n) returns the smallest value.\n",summary:"<p> Returns the k-th largest value in a data set.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of numbers or values castable to numeric. The sequence can be of any length, from 1 up.</div>'},{name:"k",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the position of largest value, with value from 1 to count of values</div>'}],returns:{type:"xs:anyAtomicType",description:"The k-th largest value as numeric type"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if the sequence is empty</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if k is not a value between 1 and the sequence size</xqdoc:error>']},{isDocumented:!0,arity:1,name:"max",qname:"excel:max",signature:"($numbers as xs:anyAtomicType*) as xs:anyAtomicType",description:" Returns the largest number in a sequence.\n",summary:"<p> Returns the largest number in a sequence.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of numbers or values castable to numeric. The sequence can be of any length.</div>'}],returns:{type:"xs:anyAtomicType",description:"The max"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>']},{isDocumented:!0,arity:1,name:"maxa",qname:"excel:maxa",signature:"($numbers as xs:anyAtomicType*) as xs:anyAtomicType",description:" Returns the largest value in a list of arguments.\n In this implementation there is no difference between MAX and MAXA.\n",summary:"<p> Returns the largest value in a list of arguments.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of numbers or values castable to numeric The sequence can be of any length.</div>'}],returns:{type:"xs:anyAtomicType",description:"The max"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>']},{isDocumented:!0,arity:1,name:"median",qname:"excel:median",signature:"($numbers as xs:anyAtomicType*) as xs:anyAtomicType",description:" Returns the median of the given numbers.\n The median is the number in the middle of a set of numbers.\n Half the numbers have values that are greater than the median,\n and half the numbers have values that are less than the median.\n",summary:"<p> Returns the median of the given numbers.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of numbers, of any length</div>'}],returns:{type:"xs:anyAtomicType",description:"for odd count of numbers return the number in the middle of the sorted sequence. For even count of numbers return the average of the two numbers in the middle."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>']},{isDocumented:!0,arity:1,name:"min",qname:"excel:min",signature:"($numbers as xs:anyAtomicType*) as xs:anyAtomicType",description:" Returns the smallest number in a sequence.\n",summary:"<p> Returns the smallest number in a sequence.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of numbers or values castable to numeric. The sequence can be of any length.</div>'}],returns:{type:"xs:anyAtomicType",description:"The min"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>']},{isDocumented:!0,arity:1,name:"mina",qname:"excel:mina",signature:"($numbers as xs:anyAtomicType*) as xs:anyAtomicType",description:" Returns the smallest value in a list of arguments.\n In this implementation there is no difference between MAX and MAXA.\n",summary:"<p> Returns the smallest value in a list of arguments.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of numbers or values castable to numeric The sequence can be of any length.</div>'}],returns:{type:"xs:anyAtomicType",description:"The min"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>']},{isDocumented:!0,arity:1,name:"mode",qname:"excel:mode",signature:"($numbers as xs:anyAtomicType*) as xs:anyAtomicType",description:" Returns the most frequently occurring, or repetitive, value in a sequence.\n Arguments must be castable to numeric.\n",summary:"<p> Returns the most frequently occurring, or repetitive, value in a sequence.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of numbers, of any length</div>'}],returns:{type:"xs:anyAtomicType",description:"The most occuring number"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">fn:QName("http://zorba.io/modules/excel/errors", "excel-err:NA") if there are no duplicate numbers</xqdoc:error>']},{isDocumented:!0,arity:2,name:"percentile",qname:"excel:percentile",signature:"($numbers as xs:anyAtomicType*, $k_at as xs:anyAtomicType) as xs:anyAtomicType",description:" Returns the k-th percentile of values in a sequence.\n If k is not a multiple of 1/(n - 1),\n   PERCENTILE interpolates to determine the value at the k-th percentile.\n The function is computed by (max-min)*k + min\n",summary:"<p> Returns the k-th percentile of values in a sequence.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of numbers, of any length</div>'},{name:"k_at",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the percentile, with value between 0 .. 1 inclusive</div>'}],returns:{type:"xs:anyAtomicType",description:"The computed percentile"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if percentile is not between 0 .. 1</xqdoc:error>']},{isDocumented:!0,arity:2,name:"percentrank",qname:"excel:percentrank",signature:"($numbers as xs:anyAtomicType*, $x as xs:anyAtomicType) as xs:decimal",description:' Returns the rank of a value in a data set as a percentage of the data set.\n If x does not match one of the values in array,\n   PERCENTRANK interpolates to return the correct percentage rank. <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The formula is uses: (RANK - 1) / (size - 1) .\n',summary:"<p> Returns the rank of a value in a data set as a percentage of the data set.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of numbers or values castable to numbers. The sequence can be of any length, from 1 up.</div>'},{name:"x",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is the value for which you want to know the rank</div>'}],returns:{type:"xs:decimal",description:"The percentage of rank."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if the sequence is zero length</xqdoc:error>']},{isDocumented:!0,arity:3,name:"prob",qname:"excel:prob",signature:"($x_range as xs:anyAtomicType+, $prob_range as xs:anyAtomicType+, $range_lower_limit as xs:anyAtomicType) as xs:anyAtomicType",description:" This is the same as above, only that upper_limit is not specified.\n The probability is computed only for range_lower_limit.\n",summary:"<p> This is the same as above, only that upper_limit is not specified.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"x_range",type:"xs:anyAtomicType",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is the range of numeric values of x with which there are associated probabilities. This does not need to be ordered.</div>'},{name:"prob_range",type:"xs:anyAtomicType",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is a set of probabilities associated with values in x_range.</div>'},{name:"range_lower_limit",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is the value for which you want a probability.</div>'}],returns:{type:"xs:anyAtomicType",description:"The probability of the range_lower_limit value"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if any probability is not between 0 and 1</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if the sum of probabilities is not equal to 1</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if any parameter is not castable to numeric</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if x_range and prob_range do not have the same number of values</xqdoc:error>']},{isDocumented:!0,arity:4,name:"prob",qname:"excel:prob",signature:"($x_range as xs:anyAtomicType+, $prob_range as xs:anyAtomicType+, $range_lower_limit as xs:anyAtomicType, $upper_limit as xs:anyAtomicType) as xs:anyAtomicType",description:" Returns the probability that values in a range are between two limits.\n",summary:"<p> Returns the probability that values in a range are between two limits.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"x_range",type:"xs:anyAtomicType",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is the range of numeric values of x with which there are associated probabilities. This does not need to be ordered.</div>'},{name:"prob_range",type:"xs:anyAtomicType",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is a set of probabilities associated with values in x_range.</div>'},{name:"range_lower_limit",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is the lower bound on the value for which you want a probability.</div>'},{name:"upper_limit",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is the upper bound on the value for which you want a probability.</div>'}],returns:{type:"xs:anyAtomicType",description:"The probability of the entire range"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if any probability is not between 0 and 1</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if the sum of probabilities is not equal to 1</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if any parameter is not castable to numeric</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if x_range and prob_range do not have the same number of values</xqdoc:error>']},{isDocumented:!0,arity:2,name:"quartile",qname:"excel:quartile",signature:"($numbers as xs:anyAtomicType*, $quart as xs:integer) as xs:anyAtomicType",description:" Returns the quartile of a data set.\n",summary:"<p> Returns the quartile of a data set.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> sequence of numbers or values castable to numbers. The sequence can be of any length, from 1 up.</div>'},{name:"quart",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> <dl>one of the values 0, 1, 2, 3, 4 with meaning: <dt>0</dt> <dd> compute minimum value</dd> <dt>1</dt> <dd> compute first quartile (25th percentile)</dd> <dt>2</dt> <dd> compute median value (50th percentile)</dd> <dt>3</dt> <dd> compute third quartile (75th percentile)</dd> <dt>4</dt> <dd> compute maximum value</dd></dl></div>'}],returns:{type:"xs:anyAtomicType",description:"the computed quartile, as numeric type"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if the sequence is zero length</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if $quart is not one of the values 0, 1, 2, 3, 4</xqdoc:error>']},{isDocumented:!0,arity:2,name:"rank",qname:"excel:rank",signature:"($x as xs:anyAtomicType, $numbers as xs:anyAtomicType*) as xs:decimal",description:" This RANK function is same as the above, only that $order_ascending is set by default to false.\n",summary:"<p> This RANK function is same as the above, only that $order_ascending is set by default to false.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"x",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The number whose rank you want to find.</div>'},{name:"numbers",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of numbers or values castable to numbers. The sequence can be of any length.</div>'}],returns:{type:"xs:decimal",description:"The rank of $x."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"rank",qname:"excel:rank",signature:"($x as xs:anyAtomicType, $numbers as xs:anyAtomicType*, $order_ascending as xs:boolean) as xs:decimal",description:" Returns the rank of a number in a list of numbers.\n The rank of a number is its size relative to other values in a list.\n (If you were to sort the list, the rank of the number would be its position.)\n RANK gives duplicate numbers the same rank.\n",summary:"<p> Returns the rank of a number in a list of numbers.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"x",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The number whose rank you want to find.</div>'},{name:"numbers",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The sequence of numbers or values castable to numbers. The sequence can be of any length.</div>'},{name:"order_ascending",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> <dl>A boolean having the meaning: <dt>false</dt><dd>then rank the number as if the sequence was sorted in descending order.</dd> <dt>true</dt> <dd>then rank the number as if the sequence was sorted in ascending order.</dd></dl></div>'}],returns:{type:"xs:decimal",description:"The rank of $x."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"slope",qname:"excel:slope",signature:"($known_y as xs:anyAtomicType+, $known_x as xs:anyAtomicType+) as xs:anyAtomicType",description:' Returns the slope of the linear regression line through data points in known_y\'s and known_x\'s.\n The slope is the vertical distance divided by the horizontal distance between\n   any two points on the line, which is the rate of change along the regression line.\n It computes the formula:<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n sum((x - average_x)(y - average_y)) / sum((x - average_x)^2)  <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n where average_x and average_y are computed with AVERAGE function.\n',summary:"<p> Returns the slope of the linear regression line through data points in known_y's and known_x's.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"known_y",type:"xs:anyAtomicType",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of y numbers. The sequence can be of any length, from 1 up.</div>'},{name:"known_x",type:"xs:anyAtomicType",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of x numbers. The sequence can be of any length, from 1 up.</div>'}],returns:{type:"xs:anyAtomicType",description:"The slope value, as numeric type"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if any parameter cannot be casted to numeric</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">fn:QName("http://zorba.io/modules/excel/errors", "excel-err:NA") if there are different numbers of x\'s and y\'s</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">fn:QName("http://zorba.io/modules/excel/errors", "excel-err:NA") if any sequence is empty</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Div0 if all x\'s are equal</xqdoc:error>']},{isDocumented:!0,arity:2,name:"small",qname:"excel:small",signature:"($numbers as xs:anyAtomicType*, $k as xs:integer) as xs:anyAtomicType",description:" This function computes the k-th smallest value in a data set.\n Use this function to return values with a particular relative standing in a data set.\n If n is the number of data points in array, SMALL(array,1) equals the smallest value,\n   and SMALL(array,n) equals the largest value.\n",summary:"<p> This function computes the k-th smallest value in a data set.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A sequence of numbers or values castable to numeric. The sequence can be of any length, from 1 up.</div>'},{name:"k",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The position (from the smallest) in the sequence of data to return. Must have value between 1 and size of sequence.</div>'}],returns:{type:"xs:anyAtomicType",description:"The k-th smallest value of $numbers."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if the sequence is zero length.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if $k is not a value between 1 and the size of sequence.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"standardize",qname:"excel:standardize",signature:"($x as xs:anyAtomicType, $mean as xs:anyAtomicType, $standard_dev as xs:anyAtomicType) as xs:double",description:' Returns a normalized value from a distribution characterized by mean and standard_dev.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The formula is (x - mean) / standard_dev .\n',summary:"<p> Returns a normalized value from a distribution characterized by mean and standard_dev.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"x",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is the value you want to normalize</div>'},{name:"mean",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is the arithmetic mean of the distribution.</div>'},{name:"standard_dev",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is the standard deviation of the distribution.</div>'}],returns:{type:"xs:double",description:"The normalized x, as numeric type"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if any parameter cannot be casted to numeric</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if standard_dev is a value smaller than zero or equal</xqdoc:error>']},{isDocumented:!0,arity:1,name:"var",qname:"excel:var",signature:"($numbers as xs:anyAtomicType+) as xs:anyAtomicType",description:' Estimates variance based on a sample.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The formula is sum(x - average_x)^2 / (n - 1).<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n average_x is computed with AVERAGE function.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n n is the count of numbers from the sequence, excluding empty values.\n',summary:"<p> Estimates variance based on a sample.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"xs:anyAtomicType",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of numbers or values castable to numeric. The sequence can be of any length, from 1 up.</div>'}],returns:{type:"xs:anyAtomicType",description:"The variance, as numeric type"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>']},{isDocumented:!0,arity:1,name:"vara",qname:"excel:vara",signature:"($numbers as xs:anyAtomicType+) as xs:anyAtomicType",description:' Estimates variance based on a sample.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The formula is sum(x - average_x)^2 / (n - 1).<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n average_x is computed with AVERAGE function.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n n is the size of sequence, including empty values.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n',summary:"<p> Estimates variance based on a sample.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"xs:anyAtomicType",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of numbers or values castable to numeric. The sequence can be of any length, from 1 up.</div>'}],returns:{type:"xs:anyAtomicType",description:"The variance, as numeric type"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>']},{isDocumented:!0,arity:1,name:"varp",qname:"excel:varp",signature:"($numbers as xs:anyAtomicType+) as xs:anyAtomicType",description:' Calculates variance based on the entire population.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The formula is sum(x - average_x)^2 / n.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n average_x is computed with AVERAGE function.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n n is the count of numbers from the sequence, excluding empty values.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n',summary:"<p> Calculates variance based on the entire population.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"xs:anyAtomicType",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of numbers or values castable to numeric. The sequence can be of any length, from 1 up.</div>'}],returns:{type:"xs:anyAtomicType",description:"The variance, as numeric type"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>']},{isDocumented:!0,arity:1,name:"varpa",qname:"excel:varpa",signature:"($numbers as xs:anyAtomicType+) as xs:anyAtomicType",description:' Calculates variance based on the entire population.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The formula is sum(x - average_x)^2 / n.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n average_x is computed with AVERAGE function.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n n is the size of sequence, including empty values.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n',summary:"<p> Calculates variance based on the entire population.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"xs:anyAtomicType",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of numbers or values castable to numeric. The sequence can be of any length, from 1 up.</div>'}],returns:{type:"xs:anyAtomicType",description:"The variance, as numeric type"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>']}],variables:[]},"http://www.zorba-xquery.com/modules/languages/xslt":{ns:"http://www.zorba-xquery.com/modules/languages/xslt",description:' This module provides XSLT 1.0 transformation functionality.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For details on XSLT see\n <a href="http://www.w3.org/TR/xslt">XSLT 1.0 specification</a>.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This module implements the invoking of an XSLT transformation from XQuery\n described in <a href="http://lists.w3.org/Archives/Member/w3c-xsl-wg/2008Apr/0052.html">\n    Michael Kay\'s proposal</a>.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre class="ace-static" ace-mode="xquery">import module namespace\n        xslt = "http://www.zorba-xquery.com/modules/languages/xslt";\n let $source :=\n     &lt;catalog&gt;\n         &lt;cd&gt;\n           &lt;title&gt;Empire Burlesque&lt;/title&gt;\n           &lt;artist&gt;Bob Dylan&lt;/artist&gt;\n           &lt;country&gt;USA&lt;/country&gt;\n           &lt;company&gt;Columbia&lt;/company&gt;\n           &lt;price&gt;10.90&lt;/price&gt;\n           &lt;year&gt;1985&lt;/year&gt;\n         &lt;/cd&gt;\n         &lt;cd&gt;\n           &lt;title&gt;Hide your heart&lt;/title&gt;\n           &lt;artist&gt;Bonnie Tyler&lt;/artist&gt;\n           &lt;country&gt;UK&lt;/country&gt;\n           &lt;company&gt;CBS Records&lt;/company&gt;\n           &lt;price&gt;9.90&lt;/price&gt;\n           &lt;year&gt;1988&lt;/year&gt;\n         &lt;/cd&gt;\n     &lt;/catalog&gt;\n let $stylesheet :=\n   &lt;xsl:stylesheet version="1.0"\n       xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;\n     &lt;xsl:template match="/"&gt;\n       &lt;html&gt;\n       &lt;body&gt;\n       &lt;h2&gt;Music Collection&amp;lt;/h2&gt;\n         &lt;table border="1"&gt;\n           &lt;tr bgcolor="lightblue"&gt;\n             &lt;th&gt;Title&amp;lt;/th&gt;\n             &lt;th&gt;Artist&amp;lt;/th&gt;\n           &lt;/tr&gt;\n           &lt;xsl:for-each select="catalog/cd"&gt;\n            &lt;tr&gt;\n              &lt;td&gt;&amp;lt;xsl:value-of select="title"/&gt;&lt;/td&gt;\n              &lt;td&gt;&amp;lt;xsl:value-of select="artist"/&gt;&lt;/td&gt;\n           &lt;/tr&gt;\n           &lt;/xsl:for-each&gt;\n         &lt;/table&gt;\n       &lt;/body&gt;\n       &lt;/html&gt;\n     &lt;/xsl:template&gt;\n   &lt;/xsl:stylesheet&gt;\n return\n   xslt:transform( $source, $stylesheet)</pre></p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Cezar Andrei</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/options/versioning",prefix:"ver"},{uri:"http://www.zorba-xquery.com/modules/languages/xslt",prefix:"xslt"}],functions:[{isDocumented:!0,arity:2,name:"transform",qname:"xslt:transform",signature:"($source as node(), $stylesheet as node()) as node() external",description:'<p xmlns:xqdoc="http://www.xqdoc.org/1.0">Invokes an XSLT transformation.</p>\n',summary:"<p>Invokes an XSLT transformation.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"source",type:"node()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the input document to the transformation</div>'},{name:"stylesheet",type:"node()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the XSLT stylesheet module</div>'}],returns:{type:"node()",description:"the result tree produced by the transformation"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">xslt:XSLT001 if $stylesheet is not a valid XSLT stylesheet</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">xslt:XSLT002 if result can not be imported</xqdoc:error>']}],variables:[]},"http://zorba.io/modules/data-cleaning/phonetic-string-similarity":{ns:"http://zorba.io/modules/data-cleaning/phonetic-string-similarity",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This library module provides phonetic string similarity functions, comparing strings with basis on how they sound.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">These metrics are particularly effective in matching names, since names are often spelled in different\n ways that sound the same.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The logic contained in this module is not specific to any particular XQuery implementation.</p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Bruno Martins</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/modules/data-cleaning/phonetic-string-similarity",prefix:"simp"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"metaphone-key",qname:"simp:metaphone-key",signature:"($s1 as xs:string) as xs:string",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the Metaphone key for a given string.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The Metaphone algorithm produces variable length keys as its output, as opposed to Soundex\'s fixed-length keys.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery">metaphone-key("ALEKSANDER")</pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery">"ALKSNTR"</pre></p>\n',summary:"<p>  Returns the Metaphone key for a given string.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s1",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The string.</div>'}],returns:{type:"xs:string",description:"The Metaphone key for the given input string."},errors:[]},{isDocumented:!0,arity:2,name:"metaphone",qname:"simp:metaphone",signature:"($s1 as xs:string, $s2 as xs:string) as xs:boolean",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Checks if two strings have the same Metaphone key.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery">metaphone("ALEKSANDER", "ALEXANDRE")</pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery">true</pre></p>\n',summary:"<p>  Checks if two strings have the same Metaphone key.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s1",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The first string.</div>'},{name:"s2",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The second string.</div>'}],returns:{type:"xs:boolean",description:"Returns true if both strings have the same Metaphone key and false otherwise."},errors:[]},{isDocumented:!0,arity:1,name:"soundex-key",qname:"simp:soundex-key",signature:"($s1 as xs:string) as xs:string",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the Soundex key for a given string.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery">soundex-key("Robert")</pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery">"R163"</pre></p>\n',summary:"<p>  Returns the Soundex key for a given string.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s1",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The string.</div>'}],returns:{type:"xs:string",description:"The Soundex key for the given input string."},errors:[]},{isDocumented:!0,arity:2,name:"soundex",qname:"simp:soundex",signature:"($s1 as xs:string, $s2 as xs:string) as xs:boolean",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Checks if two strings have the same Soundex key.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery">soundex( "Robert" , "Rupert" )</pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery">true</pre></p>\n',summary:"<p>  Checks if two strings have the same Soundex key.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s1",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The first string.</div>'},{name:"s2",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The second string.</div>'}],returns:{type:"xs:boolean",description:"Returns true if both strings have the same Soundex key and false otherwise."},errors:[]}],variables:[]},"http://www.28msec.com/modules/collections":{ns:"http://www.28msec.com/modules/collections",description:" This module provides functions to work with collections. For example,\n it contains functions to retrieve the content of a collection or the\n names of all collections.\n <p xmlns:xqdoc=\"http://www.xqdoc.org/1.0\">The module is always imported so you don't need to import it explicitly.\n Also, you don't need to fully qualify a function to invoke it.</p>\n",sees:[],authors:[],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://zorba.io/options/versioning",prefix:"ver"},{uri:"http://zorba.io/errors",prefix:"zerr"}],functions:[{isDocumented:!0,arity:2,name:"apply-insert",qname:"db:apply-insert",signature:"($name as string, $content as item()*) as item()* external",description:" This function does the same as the insert function and it immediately applies\n the resulting pending updates and returns the items that have been inserted.\n Note that each item in the content sequence is copied before insertion. This\n function provides an efficient way to retrieve the actual copies that have\n been inserted.\n",summary:"<p> This function does the same as the insert function and it immediately applies\n the resulting pending updates and returns the items that have been inserted.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the collection to which the items should be added.</div>'},{name:"content",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The sequences of items whose copies should be added to the collection.</div>'}],returns:{type:"item()*",description:"The result of the function is the sequence of items that have been inserted into the collection."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0003 if the collection identified by <tt>$name</tt> does not exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDTY0001 if any of the items in the $content do not match the expected type (as specified in the collection declaration) or are not XML documents, XML elements, JSON objects, or JSON arrays.</xqdoc:error>']},{isDocumented:!0,arity:0,name:"available-collections",qname:"db:available-collections",signature:"() as string* external",description:" Return the names of all existing collections.\n",summary:"<p> Return the names of all existing collections.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"string*",description:"The names of all existing collections."},errors:[]},{isDocumented:!0,arity:1,name:"collection-name",qname:"db:collection-name",signature:"($o as item()) as string external",description:" The collection-name function returns the name of the containing collection\n of the given item.\n",summary:"<p> The collection-name function returns the name of the containing collection\n of the given item.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"o",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The item for which to get the name of the collection.</div>'}],returns:{type:"string",description:"The name of the containing collection."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0011 if the given item does not belong to a collection.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"collection",qname:"db:collection",signature:"($name as string) as item()* external",description:' The collection function returns the sequence of items that belong\n to the collection identified by the given name.\n Please note that the order of the items returned is not deterministic,\n i.e. it might change between invocations. You can use\n <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">db:collection($name, 0)</tt> to get a deterministic order.\n',summary:"<p> The collection function returns the sequence of items that belong\n to the collection identified by the given name.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the collection.</div>'}],returns:{type:"item()*",description:"The content of the collection."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0003 if the collection identified by $name does not exist.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"collection",qname:"db:collection",signature:"($name as string, $skip as integer) as item()* external",description:' The collection function returns the sequence of items that belong to\n the collection identified\n by the given name. The skip parameter allows to (efficiently) skip\n a given number of items.\n Note that the collections are generally unordered. However, there\n is an implicit deterministic ordering (i.e. sorting by the _id field\n in MongoDB) that is used by this function. This ordering is not present\n for the <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">db:collection#1</tt> function. In order to return items with\n a stable ordering, db:collection($name, 0) can be used.\n',summary:"<p> The collection function returns the sequence of items that belong to\n the collection identified\n by the given name.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the collection.</div>'},{name:"skip",type:"integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The number of items to skip starting from the beginning.</div>'}],returns:{type:"item()*",description:'The content of the collection starting at the <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">$skip</tt>+1 item.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0003 if the collection identified by $name does not exist</xqdoc:error>']},{isDocumented:!0,arity:3,name:"collection",qname:"db:collection",signature:"($name as string, $start as string, $skip as integer) as item()* external",description:' The collection function returns the sequence of items that belong to\n the collection identified\n by the given name. The start parameter is a reference and determines\n the first item to return. The skip parameter allows to (efficiently) skip\n a given number of items starting at the item referenced by <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">$start</tt>.\n The start parameter is useful for efficiently implementing pagination.\n Note that the collections are generally unordered. However, there\n is an implicit deterministic ordering (i.e. sorting by the _id field\n in MongoDB) that is used by this function. This ordering is not present\n for the <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">db:collection#1</tt> function. In order to return items with\n a stable ordering, db:collection($name, $start, 0) can be used.\n Example:\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0">\n import module namespace ref = "http://zorba.io/modules/reference";\n let $ref := ref:reference(db:collection("test", 1)[1])\n return\n   db:collection("test", $ref, 1)\n </pre>\n',summary:"<p> The collection function returns the sequence of items that belong to\n the collection identified\n by the given name.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the collection.</div>'},{name:"start",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The reference to the first item to return.</div>'},{name:"skip",type:"integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The number of collection items to skip.</div>'}],returns:{type:"item()*",description:'The content of the collection starting at the item referenced by <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">$start</tt> and skipping <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">$skip</tt> items.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0003 if the collection identified by <tt>$name</tt> does not exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZAPI0028 If the given reference $start is not a valid reference.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZSTR0066 if the given reference $start does not reference an item of this collection.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"create",qname:"db:create",signature:"($name as string) external",description:' The create function is an updating function that creates\n a new collection with the given name.\n It is not possible to create collections that start with\n "system." or "_28" (zerr:ZDDY1000).\n Collections are identified by a name (string). Names are not allowed to\n contain the <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">$</tt> sign or exceed the length of 70 characters.\n This is consistent with the restrictions for names of collections in MongoDB.\n',summary:"<p> The create function is an updating function that creates\n a new collection with the given name.</p>",annotation_str:"",annotations:[],updating:!0,parameters:[{name:"name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the collection to create.</div>'}],returns:{type:null,description:"The result of the function is an empty XDM instance and a pending update list which, once applied, creates a collection with the given name."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0002 if a collection with the given name already exists.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY1000 if the given name is not a legal collection name</xqdoc:error>']},{isDocumented:!0,arity:2,name:"create",qname:"db:create",signature:"($name as string, $content as item()*) external",description:' The create function is an updating function which creates\n a new collection with the given name. Moreover, it adds copies\n of the sequence <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">$content</tt> to the new collection.\n It is not possible to create collections that start with\n "system." or "_28" (zerr:ZDDY1000).\n Collections are identified by a name (string). Names are not allowed to\n contain the <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">$</tt> sign or exceed the length of 70 characters.\n This is consistent with the restrictions for names of collections in MongoDB.\n',summary:"<p> The create function is an updating function which creates\n a new collection with the given name.</p>",annotation_str:"",annotations:[],updating:!0,parameters:[{name:"name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The string of the collection to create.</div>'},{name:"content",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The sequences of items that should be added to the new collection.</div>'}],returns:{type:null,description:"The result of the function is an empty XDM instance and a pending update list which, once applied, creates a collection with the given name and inserts the given items into it."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0002 if a collection with the given name already exists.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDTY0001 if any of the items in the $content do not match the expected type (as specified in the collection declaration) or are not XML documents, XML elements, JSON objects, or JSON arrays.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY1000 if the given name is not a legal collection name</xqdoc:error>']},{isDocumented:!0,arity:1,name:"delete",qname:"db:delete",signature:"($target as item()*) external",description:" The delete function is an updating function that deletes zero or more items\n (JSON objects, JSON arrays, or XML nodes) from a collection.\n Please note that the all of the items belong to the same collection\n (zerr:ZDDY0011).\n",summary:"<p> The delete function is an updating function that deletes zero or more items\n (JSON objects, JSON arrays, or XML nodes) from a collection.</p>",annotation_str:"",annotations:[],updating:!0,parameters:[{name:"target",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the items that should be deleted from the containing collection.</div>'}],returns:{type:null,description:"The result of this function is an empty XDM instance and a pending update list which, once applied, deletes the items from the collections."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0003 if the collection identified by <tt>$name</tt> does not exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0011 if any item in the <tt>$target</tt> sequence is not a member of a collection or not all items belong to the same collection.</xqdoc:error>']},{isDocumented:!1,arity:1,name:"drop",qname:"db:drop",signature:"($name as string) external",description:"",summary:"",annotation_str:"",annotations:[],updating:!0,parameters:[{name:"name",type:"string",occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!0,arity:2,name:"edit",qname:"db:edit",signature:"($target as item(), $content as item()) external",description:" The edit function is an updating function that edits the first supplied\n item so as to make it look exactly like a copy of the second supplied item,\n while retaining its original identity.\n",summary:"<p> The edit function is an updating function that edits the first supplied\n item so as to make it look exactly like a copy of the second supplied item,\n while retaining its original identity.</p>",annotation_str:"",annotations:[],updating:!0,parameters:[{name:"target",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The target item, that must be edited.</div>'},{name:"content",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The content item, that serves as an edit goal.</div>'}],returns:{type:null,description:"The result of the function is an empty XDM instance and a pending update list which, once applied, performs the edit."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0017 if the $target item is not a member of a collection.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0040 if the target cannot be updated to match the content (for example because the target is a node and the content is an object).</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDTY0001 if $content does not match the expected type (as specified in the collection declaration) according to the rules for SequenceType Matching.</xqdoc:error>']},{isDocumented:!1,arity:1,name:"index-keys",qname:"db:index-keys",signature:"($index-name as string) as array()* external",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"index-name",type:"string",occurrence:null,description:""}],returns:{type:"array()*",description:""},errors:[]},{isDocumented:!0,arity:2,name:"insert",qname:"db:insert",signature:"($name as string, $content as item()*) external",description:" The insert function is an updating function that inserts copies of the given\n items into a collection.\n",summary:"<p> The insert function is an updating function that inserts copies of the given\n items into a collection.</p>",annotation_str:"",annotations:[],updating:!0,parameters:[{name:"name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the collection to which the items should be added.</div>'},{name:"content",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The sequences of items whose copies should be added.</div>'}],returns:{type:null,description:"The result of the function is an empty XDM instance and a pending update list which, once applied, inserts the items into the collection."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0003 if the collection identified by <tt>$name</tt> does not exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDTY0001 if any of the items in the $content do not match the expected type (as specified in the collection declaration) or are not XML documents, XML elements, JSON objects, or JSON arrays.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"is-available-collection",qname:"db:is-available-collection",signature:"($name as string) as boolean external",description:" Determine if the collection with the given name exists.\n",summary:"<p> Determine if the collection with the given name exists.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The string of the collection in question.</div>'}],returns:{type:"boolean",description:"true if collection with the given name exists, false otherwise."},errors:[]},{isDocumented:!1,arity:2,name:"lookup",qname:"db:lookup",signature:"($index-name as string, $key as item()) as item()* external",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"index-name",type:"string",occurrence:null,description:""},{name:"key",type:"item()",occurrence:null,description:""}],returns:{type:"item()*",description:""},errors:[]},{isDocumented:!1,arity:3,name:"lookup",qname:"db:lookup",signature:"($index-name as string, $keys as item(), $skip as integer) as item()* external",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"index-name",type:"string",occurrence:null,description:""},{name:"keys",type:"item()",occurrence:null,description:""},{name:"skip",type:"integer",occurrence:null,description:""}],returns:{type:"item()*",description:""},errors:[]},{isDocumented:!1,arity:1,name:"refresh",qname:"db:refresh",signature:"($index-name as string) external",description:"",summary:"",annotation_str:"",annotations:[],updating:!0,parameters:[{name:"index-name",type:"string",occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!0,arity:1,name:"truncate",qname:"db:truncate",signature:"($name as string) external",description:" The truncate function is an updating function that deletes the\n entire content of a given collection.\n Please note that applying this function can not be undone in case\n an error happens during the application of the containing PUL.\n",summary:"<p> The truncate function is an updating function that deletes the\n entire content of a given collection.</p>",annotation_str:"",annotations:[],updating:!0,parameters:[{name:"name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the collection whose content to delete.</div>'}],returns:{type:null,description:"The result of this function is an empty XDM instance and a pending update list which, once applied, deletes the nodes."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0003 if the collection identified by <tt>$name</tt> does not exist.</xqdoc:error>']}],variables:[]},"http://expath.org/ns/http-client":{ns:"http://expath.org/ns/http-client",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This module provides an implementation of the\n <a href="http://expath.org/modules/http-client/">EXPath Http Client</a>.\n It provides functions for making HTTP requests and is a superset of the\n module specified by EXPath.\n Specifically, it implements the <code>http:send-request()</code> functions\n as specified by EXPath. Moreover, it adds an additional function\n <code>http:read()</code> (with several arities for the sake of ease).\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n In general, both functions take a description of the HTTP request to make\n as parameter, execute the request, and return a representation of the HTTP\n response. For instance, in the following code snippet, we fetch the Zorba\n home page:\n </p>\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static" ace-mode="xquery">import module namespace http = "http://expath.org/ns/http-client";\n http:send-request(\n  &lt;http:request href="http://zorba.io" method="get" /&gt;\n )\n </pre>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n The <code>http:send-request()</code> functions are declared as sequential.\n Sequential functions are allowed to have side effects. For example, most probably,\n an HTTP POST request is a request that has side effects because it adds/changes\n a remote resource. Sequential functions are specified in the\n <a href="http://zorba.io/documentation/2.9/zorba/scripting_tutorial.html">XQuery Scripting Extension</a>.\n In contrast, the http:read() functions are not declared as sequential -\n they are declared as being non deterministic though, which\n means that several calls may return different results.\n HTTP requests performed using these functions are <b>not</b> allowed to have\n side effects.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n The response is returned as a sequence of one or more items. The first\n one is an <code>http:response</code> element with quite the same\n structure as an http:request, but without the content itself.\n The content is returned as the second item (or several items in case of\n a multipart response) as a string, a document node, or a binary item.\n This depends on the content-type returned.\n Specifically, the rules are as follows:\n <ul>\n  <li>A document node is returned if the media type has a MIME type of\n     text/xml, application/xml, text/xml-external-parsed-entity, or\n     application/xml-external-parsed-entity, as defined in [RFC 3023]\n     (except that application/xml-dtd is considered a text media type).\n     MIME types ending by +xml are also XML media types.</li>\n  <li>A document node is returned if the media type has a MIME type of\n      text/html. In order to be able to make HTML parseable, tidy is automatically\n      invoked. If you want to prevent that, you can also set your own content-type\n      by setting the override-media-type attribute in the request element.\n       For tidying, the following <a href="http://tidy.sourceforge.net/docs/quickref.html">options</a>\n       will be used:\n       <ul>\n         <li>TidyXmlOut=yes</li>\n         <li>TidyDoctypeMode=TidyDoctypeOmit</li>\n         <li>TidyQuoteNbsp=yes</li>\n         <li>TidyCharEncoding="utf8"</li>\n         <li>TidyNewline="LF"</li>\n       </ul>\n  </li>\n  <li>An xs:string item is returned if the media type has a text MIME type,\n     i.e. beginning with text/.</li>\n  <li>An xs:base64Binary item is returned for all the other media types.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n The structure of a request element is defined in the schema that is imported\n by this module. The details are described in the\n <a href="http://expath.org/spec/http-client#d2e183">specification</a>.\n Analogously, the response element is also described in this\n <a href="http://expath.org/spec/http-client#d2e491">specification</a>.\n </p>\n',sees:['<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0"><a href="http://www.w3.org/TR/xquery-3/#FunctionDeclns">XQuery 3.0: Function Declaration</a></xqdoc:see>'],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Federico Cavalieri, Markus Pilman</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://expath.org/ns/error",prefix:"err"},{uri:"http://expath.org/ns/http-client",prefix:"http"},{uri:"http://zorba.io/modules/http-client-wrapper",prefix:"http-wrapper"},{uri:"http://expath.org/ns/http-client",prefix:"https"},{uri:"http://www.zorba-xquery.com/modules/converters/html",prefix:"tidy"},{uri:"http://www.zorba-xquery.com/modules/converters/html-options",prefix:"tidy-options"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"send-request",qname:"http:send-request",signature:"($request as element(*)) as item()+",description:' Function for convenience.\n Calling this function is equivalent to calling\n <code xmlns:xqdoc="http://www.xqdoc.org/1.0">\n http:send-request($request, (), ())\n </code>\n',summary:"<p> Function for convenience.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"request",type:"element(*)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> see request parameter of the sequential <a href="#send-request-3">send-request</a> function with three parameters.</div>'}],returns:{type:"item()+",description:'see return value of the sequential <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#send-request-3">send-request</a> function with three parameters.'},errors:[]},{isDocumented:!0,arity:2,name:"send-request",qname:"http:send-request",signature:"($request as element(*)?, $href as xs:string?) as item()+",description:' Function for convenience.\n Calling this function is equivalent to calling\n <code xmlns:xqdoc="http://www.xqdoc.org/1.0">\n http:send-request($request, $href, ())\n </code>\n',summary:"<p> Function for convenience.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"request",type:"element(*)",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> see request parameter of the sequential <a href="#send-request-3">send-request</a> function with three parameters.</div>'},{name:"href",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> see href parameter of the sequential <a href="#send-request-3">send-request</a> function with three parameters.</div>'}],returns:{type:"item()+",description:'see return of <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#send-request-3">send-request</a>'},errors:[]},{isDocumented:!0,arity:3,name:"send-request",qname:"http:send-request",signature:"($request as element(*)?, $href as xs:string?, $bodies as item()*) as item()+",description:' This function sends an HTTP request and returns the corresponding response.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This function is declared as sequential (see XQuery Scripting).\n Sequential functions are allowed to have side effects. For example, most probably,\n an HTTP POST request is a request that has side effects because it adds/changes\n a remote resource.\n </p>\n',summary:"<p> This function sends an HTTP request and returns the corresponding response.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"request",type:"element(*)",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Contains the various parameters of the request. See the <a href="http://expath.org/spec/http-client#d2e183">specification</a>. for a full description of the structure of this element.</div>'},{name:"href",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is the HTTP or HTTPS URI to send the request to. It must be a valid xs:anyURI, but is declared as a string to be able to pass literal strings (without requiring to explicitly cast it to an xs:anyURI.)</div>'},{name:"bodies",type:"item()",occurrence:"*",description:""}],returns:{type:"item()+",description:'a sequence of items, where the first item is a element of type http:responseType. The response element is also described in the <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://expath.org/spec/http-client#d2e483">specification</a>. If there is one (or several, in case of multipart) response body, the response bodies are the next items in the sequence.'},errors:[]}],variables:[]},"http://zorba.io/modules/schema":{ns:"http://zorba.io/modules/schema",description:" This module provides function that are related to XML Schema support\n in Zorba.\n",sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Cezar Andrei, Matthias Brantner</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/modules/schema",prefix:"schema"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"is-validated",qname:"schema:is-validated",signature:"($node as node()) as xs:boolean external",description:" This function returns true if the given node has been validated,\n and false otherwise.\n",summary:"<p> This function returns true if the given node has been validated,\n and false otherwise.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"node",type:"node()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the node item that should be checked for validation</div>'}],returns:{type:"xs:boolean",description:"true if the given node has been validated, false otherwise."},errors:[]},{isDocumented:!0,arity:1,name:"schema-type",qname:"schema:schema-type",signature:"($item as item()) as xs:QName? external",description:" This function returns the name of the type of the item passed\n as parameter.\n",summary:"<p> This function returns the name of the type of the item passed\n as parameter.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"item",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the item from which the name of the type should be returned.</div>'}],returns:{type:"xs:QName?",description:"the name of the type (as QName) of the item passed as parameter."},errors:[]},{isDocumented:!0,arity:1,name:"validate-in-place",qname:"schema:validate-in-place",signature:"($node as node()) external",description:" Updating function that validates the document in place. After the updating\n query is applied the $node will contain the validated content.\n",summary:"<p> Updating function that validates the document in place.</p>",annotation_str:"",annotations:[],updating:!0,parameters:[{name:"node",type:"node()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the document or element to be validated, otherwise error</div>'}],returns:{type:null,description:"The result of the function is an empty XDM instance and a pending update list that consists the schema:validate-in-place($node)) primitive."},errors:[]}],variables:[]},"http://www.28msec.com/modules/mongodb":{ns:"http://www.28msec.com/modules/mongodb",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This module provides a driver to access a\n <a href="http://www.mongodb.org/">MongoDB</a> database - similar to\n drivers for other high-level languages like e.g.\n <a href="http://api.mongodb.org/python/current/">PyMongo</a>.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Here is a simple example of how we can raise the salary of each\n developer by 10%.\n Starting with an <em>employees</em> collection in MongoDB that contains\n <pre>\n { "name" : "Peter", "role" : "developer" , "salary" : 80 }\n { "name" : "Paul",  "role" : "developer" , "salary" : 75 }\n { "name" : "Mary",  "role" : "manager"   , "salary" : 90 } </pre>\n we can get a connection\n <pre>\n variable $conn := mongo:connect("hostname", 27017, "db", "user", "password");\n </pre>\n run this update\n <pre>\n for $emp in mongo:find($conn, "employees")\n where $emp("role") = "developer"\n let $salary := $emp("salary")\n return {\n   replace value of json $emp("salary") with $salary * 1.1;\n   mongo:save($conn, "employees", $emp)\n };\n </pre>\n and get the names and the current salaries using\n <pre>\n mongo:find($conn, "employees", {}, { "_id" : false, "role" : false }, {}) </pre>\n In this query we have removed the <em>_id</em> and <em>role</em> fields from\n the results and get\n <pre>\n { "name" : "Peter", "salary" : 88   }\n { "name" : "Paul",  "salary" : 82.5 }\n { "name" : "Mary",  "salary" : 90   }\n </pre>\n </p>\n <h2 xmlns:xqdoc="http://www.xqdoc.org/1.0" id="determinism">Important Notice Regarding Function Determinism</h2>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The non side-effecting functions:\n <ul>\n   <li><a href="?anchor=connect-0">connect#0</a></li>\n   <li><a href="?anchor=connect-1">connect#1</a></li>\n   <li><a href="?anchor=connect-2">connect#2</a></li>\n   <li><a href="?anchor=connect-5">connect#5</a></li>\n   <li><a href="?anchor=collection-names-1">collection-names#1</a></li>\n   <li><a href="?anchor=count-2">count#2</a></li>\n   <li><a href="?anchor=count-3">count#3</a></li>\n   <li><a href="?anchor=find-2">find#2</a></li>\n   <li><a href="?anchor=find-3">find#3</a></li>\n   <li><a href="?anchor=find-4">find#4</a></li>\n   <li><a href="?anchor=find-5">find#5</a></li>\n </ul>\n are declared deterministic, which means that their results could be cached\n when invoked multiple times with the same arguments in the same query execution.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">To not use cached results you can use the following alternative functions:\n <ul>\n   <li><a href="?anchor=connect-nondeterministic-0">connect-nondeterministic#0</a></li>\n   <li><a href="?anchor=connect-nondeterministic-1">connect-nondeterministic#1</a></li>\n   <li><a href="?anchor=connect-nondeterministic-2">connect-nondeterministic#2</a></li>\n   <li><a href="?anchor=connect-nondeterministic-5">connect-nondeterministic#5</a></li>\n   <li><a href="?anchor=collection-names-nondeterministic-1">collection-names-nondeterministic#1</a></li>\n   <li><a href="?anchor=count-nondeterministic-2">count-nondeterministic#2</a></li>\n   <li><a href="?anchor=count-nondeterministic-3">count-nondeterministic#3</a></li>\n   <li><a href="?anchor=find-nondeterministic-2">find-nondeterministic#2</a></li>\n   <li><a href="?anchor=find-nondeterministic-3">find-nondeterministic#3</a></li>\n   <li><a href="?anchor=find-nondeterministic-4">find-nondeterministic#4</a></li>\n   <li><a href="?anchor=find-nondeterministic-5">find-nondeterministic#5</a></li>\n </ul>\n which have been declared as being non deterministic.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Three different functions have been defined to run mongo commands:\n <ul>\n   <li><a href="?anchor=run-cmd-2">run-cmd#2</a></li>\n   <li><a href="?anchor=run-cmd-nondeterministic-2">run-cmd-nondeterministic#2</a></li>\n   <li><a href="?anchor=run-cmd-deterministic-2">run-cmd-deterministic#2</a></li>\n </ul>\n If your application depends on the ordering of side-effects from commands issued\n through these functions you should use <a href="?anchor=run-cmd-2">run-cmd#2</a>,\n which has been declared as sequential.\n For non-side-effecting commands you can also use\n <a href="?anchor=run-cmd-nondeterministic-2">run-cmd-nondeterministic#2</a> and\n <a href="?anchor=run-cmd-deterministic-2">run-cmd-deterministic#2</a>.\n The results of commands executed by means of\n <a href="?anchor=run-cmd-deterministic-2">run-cmd-deterministic#2</a> (which is\n declared <i>deterministic</i>) could be cached, whereas the results of\n commands executed by means of\n <a href="?anchor=run-cmd-nondeterministic-2">run-cmd-nondeterministic#2</a> (which is\n declared <i>non-deterministic</i>) are never cached.</p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">28msec</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://www.28msec.com/modules/credentials",prefix:"credentials"},{uri:"http://www.28msec.com/modules/mongodb/types",prefix:"m-schema"},{uri:"http://www.28msec.com/modules/mongodb",prefix:"mongo"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"collection-names-nondeterministic",qname:"mongo:collection-names-nondeterministic",signature:"($db as xs:anyURI) as xs:string* external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Get a list of all the collection names in this database.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#collection-names-1">collection-names#1</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Get a list of all the collection names in this database.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"db",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a database connection identifier</div>'}],returns:{type:"xs:string*",description:"a list of the names of all collection in the given database."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO004 invalid database identifier</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO005 if any mongodb error happens</xqdoc:error>']},{isDocumented:!0,arity:1,name:"collection-names",qname:"mongo:collection-names",signature:"($db as xs:anyURI) as xs:string* external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Get a list of all the collection names in this database.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n',summary:"<p>  Get a list of all the collection names in this database.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"db",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a database connection identifier</div>'}],returns:{type:"xs:string*",description:"a list of the names of all collection in the given database."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO004 invalid database identifier</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO005 if any mongodb error happens</xqdoc:error>']},{isDocumented:!0,arity:0,name:"connect-nondeterministic",qname:"mongo:connect-nondeterministic",signature:"() as xs:anyURI",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Connect to this project\'s default MongoDB database.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as <a href="#connect-0">connect#0</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Connect to this project's default MongoDB database.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[],returns:{type:"xs:anyURI",description:"an identifier for a connection to the MongoDB database."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO002 connection to MongoDB failed</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO003 authentication to the MongoDB database failed</xqdoc:error>']},{isDocumented:!0,arity:1,name:"connect-nondeterministic",qname:"mongo:connect-nondeterministic",signature:"($connection-config as item()) as xs:anyURI",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Connect to a MongoDB database.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as <a href="#connect-1">connect#1</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Connect to a MongoDB database.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"connection-config",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the connection specification.</div>'}],returns:{type:"xs:anyURI",description:"an identifier for a connection to the MongoDB database."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO001 if the connection specification is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO002 connection to MongoDB failed</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO003 authentication to the MongoDB database failed</xqdoc:error>']},{isDocumented:!0,arity:2,name:"connect-nondeterministic",qname:"mongo:connect-nondeterministic",signature:"($credentials-name as xs:string?, $options as object()) as xs:anyURI",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Connect to a MongoDB database.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as <a href="#connect-2">connect#2</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Connect to a MongoDB database.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"credentials-name",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the credentials to use.</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the credentials to use.</div>'}],returns:{type:"xs:anyURI",description:"an identifier for a connection to the MongoDB database."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO001 if the connection specification is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO002 connection to MongoDB failed</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO003 authentication to the MongoDB database failed</xqdoc:error>']},{isDocumented:!0,arity:5,name:"connect-nondeterministic",qname:"mongo:connect-nondeterministic",signature:"($host as xs:string, $port as xs:integer?, $db as xs:string, $user as xs:string?, $pass as xs:string?) as xs:anyURI",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Connect to a MongoDB database.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as <a href="#connect-5">connect#5</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Connect to a MongoDB database.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"host",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the host to connect to</div>'},{name:"port",type:"xs:integer",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the port to connect to</div>'},{name:"db",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the database to connect to</div>'},{name:"user",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the user used to authorize access to the db</div>'},{name:"pass",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the password used to authorize access to the db</div>'}],returns:{type:"xs:anyURI",description:"an identifier for a connection to the MongoDB database."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO002 connection to MongoDB failed</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO003 authentication to the MongoDB database failed</xqdoc:error>']},{isDocumented:!0,arity:0,name:"connect",qname:"mongo:connect",signature:"() as xs:anyURI",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Connect to this project\'s default MongoDB database.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n',summary:"<p>  Connect to this project's default MongoDB database.</p>",annotation_str:" %an:strictlydeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"strictlydeterministic",value:""}],updating:!1,parameters:[],returns:{type:"xs:anyURI",description:"an identifier for a connection to the MongoDB database."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO002 connection to MongoDB failed</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO003 authentication to the MongoDB database failed</xqdoc:error>']},{isDocumented:!0,arity:1,name:"connect",qname:"mongo:connect",signature:"($connection-config as item()) as xs:anyURI",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Connect to a MongoDB database.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The $connection-config parameter is used to specify the connection information.\n If a string is used, then the function will interpret it as the name of\n a credential in the MongoDB category.\n If an object is used, then the function will open a connection using it.\n The object structure is the following:\n <ul>\n   <li>host (string; mandatory)</li>\n   <li>port (integer; default: 27017)</li>\n   <li>db (string; mandatory)</li>\n   <li>user (string)</li>\n   <li>pass (string)</li>\n   <li>timeout (decimal; default: 0)</li>\n   <li>pre-digested (boolean; default: false)</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example, using stored credential:\n <pre>mongo:connect("credentials-name")</pre>\n <p>For example, specifying the connection information:</p>\n <pre>mongo:connect(\n   {\n     "host": "hostname",\n     "port": 11011,\n     "db": "mydb",\n     "user": "myuser"\n     "password: "mypass"\n   })</pre>.\n </p>\n',summary:"<p>  Connect to a MongoDB database.</p>",annotation_str:" %an:strictlydeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"strictlydeterministic",value:""}],updating:!1,parameters:[{name:"connection-config",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the connection specification.</div>'}],returns:{type:"xs:anyURI",description:"an identifier for a connection to the MongoDB database."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO001 if the connection specification is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO002 connection to MongoDB failed</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO003 authentication to the MongoDB database failed</xqdoc:error>']},{isDocumented:!0,arity:2,name:"connect",qname:"mongo:connect",signature:"($credentials-name as xs:string?, $options as object()) as xs:anyURI",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Connect to a MongoDB database.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The $credentials-name parameter is used to specify the connection information.\n If empty a connection will be opened to the project default MongoDB database.\n Otherwise, the function will use it to identify a credential in the MongoDB category.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"> The $options object can be used to specify connection options. The following\n fields are supported:\n <ul>\n   <li>timeout (decimal; default: 0)</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example, connecting to the project default MongoDB database:\n <pre>mongo:connect((), {"timeout": 10})</pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example, specifying the connection information:\n <pre>mongo:connect("credentials-name", {"timeout": 10})</pre>\n </p>\n',summary:"<p>  Connect to a MongoDB database.</p>",annotation_str:" %an:strictlydeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"strictlydeterministic",value:""}],updating:!1,parameters:[{name:"credentials-name",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the credentials to use.</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the credentials to use.</div>'}],returns:{type:"xs:anyURI",description:"an identifier for a connection to the MongoDB database."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO001 if the connection specification is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO002 connection to MongoDB failed</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO003 authentication to the MongoDB database failed</xqdoc:error>']},{isDocumented:!0,arity:5,name:"connect",qname:"mongo:connect",signature:"($host as xs:string, $port as xs:integer?, $db as xs:string, $user as xs:string?, $pass as xs:string?) as xs:anyURI",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Connect to a MongoDB database.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n',summary:"<p>  Connect to a MongoDB database.</p>",annotation_str:" %an:strictlydeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"strictlydeterministic",value:""}],updating:!1,parameters:[{name:"host",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the host to connect to</div>'},{name:"port",type:"xs:integer",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the port to connect to</div>'},{name:"db",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the database to connect to</div>'},{name:"user",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the user used to authorize access to the db</div>'},{name:"pass",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the password used to authorize access to the db</div>'}],returns:{type:"xs:anyURI",description:"an identifier for a connection to the MongoDB database."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO002 connection to MongoDB failed</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO003 authentication to the MongoDB database failed</xqdoc:error>']},{isDocumented:!0,arity:3,name:"copy",qname:"mongo:copy",signature:"($db as xs:anyURI, $from-db as xs:string, $to-db as xs:string) as empty-sequence()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Copies a MongoDB database. Be aware, you must call\n this function on the admin database.</p>\n',summary:"<p>  Copies a MongoDB database.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"db",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a database connection identifier</div>'},{name:"from-db",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the source database</div>'},{name:"to-db",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the target database</div>'}],returns:{type:"empty-sequence()",description:"the function has side-effects and returns the empty sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO004 invalid database identifier</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO005 if copy operation fails</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO006 if any mongodb error happens</xqdoc:error>']},{isDocumented:!0,arity:2,name:"count-nondeterministic",qname:"mongo:count-nondeterministic",signature:"($db as xs:anyURI, $coll as xs:string) as xs:integer external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Counts the number of documents in the given collection.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as <a href="#count-2">count#2</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Counts the number of documents in the given collection.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"db",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a database connection identifier</div>'},{name:"coll",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the collection</div>'}],returns:{type:"xs:integer",description:"the said count"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO005 if any mongodb error happens</xqdoc:error>']},{isDocumented:!0,arity:3,name:"count-nondeterministic",qname:"mongo:count-nondeterministic",signature:"($db as xs:anyURI, $coll as xs:string, $query as object()) as xs:integer external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Counts the number of documents satisfying the query in the given collection.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as <a href="#count-3">count#3</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Counts the number of documents satisfying the query in the given collection.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"db",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a database connection identifier</div>'},{name:"coll",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the collection</div>'},{name:"query",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the query specifying which objects to count</div>'}],returns:{type:"xs:integer",description:"the said count"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO005 if any mongodb error happens</xqdoc:error>']},{isDocumented:!0,arity:2,name:"count",qname:"mongo:count",signature:"($db as xs:anyURI, $coll as xs:string) as xs:integer external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Counts the number of documents in the given collection.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n',summary:"<p>  Counts the number of documents in the given collection.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"db",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a database connection identifier</div>'},{name:"coll",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the collection</div>'}],returns:{type:"xs:integer",description:"the said count"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO005 if any mongodb error happens</xqdoc:error>']},{isDocumented:!0,arity:3,name:"count",qname:"mongo:count",signature:"($db as xs:anyURI, $coll as xs:string, $query as object()) as xs:integer external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Counts the number of documents satisfying the query in the given collection.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n',summary:"<p>  Counts the number of documents satisfying the query in the given collection.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"db",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a database connection identifier</div>'},{name:"coll",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the collection</div>'},{name:"query",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the query specifying which objects to count</div>'}],returns:{type:"xs:integer",description:"the said count"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO005 if any mongodb error happens</xqdoc:error>']},{isDocumented:!0,arity:1,name:"disconnect",qname:"mongo:disconnect",signature:"($db as xs:anyURI) as empty-sequence() external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Disconnect from a MongoDB database.</p>\n',summary:"<p>  Disconnect from a MongoDB database.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"db",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a database connection identifier</div>'}],returns:{type:"empty-sequence()",description:"the function has side-effects and returns the empty sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO004 invalid database identifier</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO005 if any mongodb error happens</xqdoc:error>']},{isDocumented:!0,arity:2,name:"drop-collection",qname:"mongo:drop-collection",signature:"($db as xs:anyURI, $coll as xs:string) as empty-sequence() external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Drop a collection.</p>\n',summary:"<p>  Drop a collection.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"db",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a database connection identifier</div>'},{name:"coll",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the collection</div>'}],returns:{type:"empty-sequence()",description:"the function has side-effects and returns the empty sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO004 invalid database identifier</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO005 if any mongodb error happens</xqdoc:error>']},{isDocumented:!0,arity:2,name:"find-nondeterministic",qname:"mongo:find-nondeterministic",signature:"($db as xs:anyURI, $coll as xs:string) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns all objects of the given collection.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as <a href="#find-2">find#2</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Returns all objects of the given collection.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"db",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a database connection identifier</div>'},{name:"coll",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the collection</div>'}],returns:{type:"object()*",description:"all objects of the given collection"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO004 invalid database identifier</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO005 if any mongodb error happens</xqdoc:error>']},{isDocumented:!0,arity:3,name:"find-nondeterministic",qname:"mongo:find-nondeterministic",signature:"($db as xs:anyURI, $coll as xs:string, $query as object()) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Performs a query operation on the given collection and\n returns all matches.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as <a href="#find-3">find#3</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Performs a query operation on the given collection and\n returns all matches.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"db",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a database connection identifier</div>'},{name:"coll",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the collection</div>'},{name:"query",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the query operation to perform</div>'}],returns:{type:"object()*",description:"all matches returned by the given query operation"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO004 invalid database identifier</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO005 if any mongodb error happens</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO006 if the given query could not be converted to BSON</xqdoc:error>']},{isDocumented:!0,arity:4,name:"find-nondeterministic",qname:"mongo:find-nondeterministic",signature:"($db as xs:anyURI, $coll as xs:string, $query as object(), $options as object()) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Performs a query operation on the given collection and\n returns all matches.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as <a href="#find-4">find#4</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Performs a query operation on the given collection and\n returns all matches.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"db",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a database connection identifier</div>'},{name:"coll",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the collection</div>'},{name:"query",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the query operation to perform</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the options for this operation (see find#5 for available options)</div>'}],returns:{type:"object()*",description:"all matches returned by the given query operation"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO004 invalid database identifier</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO005 if any mongodb error happens</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO006 if the given query could not be converted to BSON</xqdoc:error>']},{isDocumented:!0,arity:5,name:"find-nondeterministic",qname:"mongo:find-nondeterministic",signature:"($db as xs:anyURI, $coll as xs:string, $query as object(), $projection as object(), $options as object()) as object()* external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Performs a query operation on the given collection and\n returns all matches.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as <a href="#find-5">find#5</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Performs a query operation on the given collection and\n returns all matches.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"db",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a database connection identifier</div>'},{name:"coll",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the collection</div>'},{name:"query",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the query operation to perform</div>'},{name:"projection",type:"object()",occurrence:null,description:""},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the options for this operation</div>'}],returns:{type:"object()*",description:"all matches returned by the given query operation"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO004 invalid database identifier</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO005 if any mongodb error happens</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO006 if the given query or projection could not be converted to BSON</xqdoc:error>']},{isDocumented:!0,arity:2,name:"find",qname:"mongo:find",signature:"($db as xs:anyURI, $coll as xs:string) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns all objects of the given collection.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n',summary:"<p>  Returns all objects of the given collection.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"db",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a database connection identifier</div>'},{name:"coll",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the collection</div>'}],returns:{type:"object()*",description:"all objects of the given collection"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO004 invalid database identifier</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO005 if any mongodb error happens</xqdoc:error>']},{isDocumented:!0,arity:3,name:"find",qname:"mongo:find",signature:"($db as xs:anyURI, $coll as xs:string, $query as object()) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Performs a query operation on the given collection and\n returns all matches.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n',summary:"<p>  Performs a query operation on the given collection and\n returns all matches.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"db",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a database connection identifier</div>'},{name:"coll",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the collection</div>'},{name:"query",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the query operation to perform</div>'}],returns:{type:"object()*",description:"all matches returned by the given query operation"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO004 invalid database identifier</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO005 if any mongodb error happens</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO006 if the given query could not be converted to BSON</xqdoc:error>']},{isDocumented:!0,arity:4,name:"find",qname:"mongo:find",signature:"($db as xs:anyURI, $coll as xs:string, $query as object(), $options as object()) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Performs a query operation on the given collection and\n returns all matches.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n',summary:"<p>  Performs a query operation on the given collection and\n returns all matches.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"db",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a database connection identifier</div>'},{name:"coll",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the collection</div>'},{name:"query",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the query operation to perform</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the options for this operation (see find#5 for available options)</div>'}],returns:{type:"object()*",description:"all matches returned by the given query operation"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO004 invalid database identifier</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO005 if any mongodb error happens</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO006 if the given query could not be converted to BSON</xqdoc:error>']},{isDocumented:!0,arity:5,name:"find",qname:"mongo:find",signature:"($db as xs:anyURI, $coll as xs:string, $query as object(), $projection as object(), $options as object()) as object()* external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Performs a query operation on the given collection and\n returns all matches.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Available options:\n <ul>\n   <li>to-return: the maximum number of objects to return (0 = unlimited)</li>\n   <li>to-skip: start with the n-th object</li>\n   <li>batch-size: the number of objects to return in one batch</li>\n   <li>slave-ok: allow this query to be run against a replica secondary</li>\n   <li>await-data: the server will block for some extra time before returning,\n   waiting for more data to return</li>\n   <li>partial-results: return partial results if some shards are down instead\n   of returning an error</li>\n </ul>\n </p>\n',summary:"<p>  Performs a query operation on the given collection and\n returns all matches.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"db",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a database connection identifier</div>'},{name:"coll",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the collection</div>'},{name:"query",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the query operation to perform</div>'},{name:"projection",type:"object()",occurrence:null,description:""},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the options for this operation</div>'}],returns:{type:"object()*",description:"all matches returned by the given query operation"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO004 invalid database identifier</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO005 if any mongodb error happens</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO006 if the given query or projection could not be converted to BSON</xqdoc:error>']},{isDocumented:!0,arity:1,name:"is-connected",qname:"mongo:is-connected",signature:"($db as xs:anyURI) as xs:boolean external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Checks if the given identifiers is valid and the corresponding\n connection is open.</p>\n',summary:"<p>  Checks if the given identifiers is valid and the corresponding\n connection is open.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"db",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a database connection identifier</div>'}],returns:{type:"xs:boolean",description:"true if the given connection identifier is valid and the corresponding connection is open, false otherwise."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO004 invalid database identifier</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO005 if any mongodb error happens</xqdoc:error>']},{isDocumented:!0,arity:3,name:"remove",qname:"mongo:remove",signature:"($db as xs:anyURI, $coll as xs:string, $remove as object()) as empty-sequence()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Performs a remove operation on the given collection.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The operation will be checked and an error is raised if\n one of them fails.</p>\n',summary:"<p>  Performs a remove operation on the given collection.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"db",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a database connection identifier</div>'},{name:"coll",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the collection</div>'},{name:"remove",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the remove command to be performed</div>'}],returns:{type:"empty-sequence()",description:"the function has side-effects and returns the empty sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO004 invalid database identifier</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO005 if any mongodb error happens</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO006 if the given document could not be converted to BSON</xqdoc:error>']},{isDocumented:!0,arity:4,name:"remove",qname:"mongo:remove",signature:"($db as xs:anyURI, $coll as xs:string, $remove as object(), $options as object()) as empty-sequence() external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Performs a remove operation on the given collection.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n <ul>\n   <li>safe: If to true, the operation will wait for a response from\n    the database and an error is raised if the operation fails.\n    Otherwise, the operation will not wait for a response.</li>\n  <li>just-one: true if the operation should stop after a single match\n    has been found and deleted</li>\n </ul>\n </p>\n',summary:"<p>  Performs a remove operation on the given collection.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"db",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a database connection identifier</div>'},{name:"coll",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the collection</div>'},{name:"remove",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the remove command to be performed</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the options for this operation</div>'}],returns:{type:"empty-sequence()",description:"the function has side-effects and returns the empty sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO004 invalid database identifier</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO005 if any mongodb error happens</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO006 if the given document could not be converted to BSON</xqdoc:error>']},{isDocumented:!0,arity:2,name:"run-cmd-deterministic",qname:"mongo:run-cmd-deterministic",signature:"($db as xs:anyURI, $cmd as object()) as object() external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Executes a\n <a href="http://docs.mongodb.org/manual/reference/commands/">database command</a>.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is marked as deterministic and should be used whenever the\n specified command has no side-effects and result caching is desired.</p>\n',summary:"<p>  Executes a\n  database command .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"db",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a database connection identifier</div>'},{name:"cmd",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the database command to execute</div>'}],returns:{type:"object()",description:"The result object. Typically has { ok : ..., errmsg : ... } fields set."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO004 invalid database identifier</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO006 if any mongodb error happens</xqdoc:error>']},{isDocumented:!0,arity:2,name:"run-cmd-nondeterministic",qname:"mongo:run-cmd-nondeterministic",signature:"($db as xs:anyURI, $cmd as object()) as object() external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Executes a\n <a href="http://docs.mongodb.org/manual/reference/commands/">database command</a>.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is marked as non-deterministic and should be used whenever the\n specified command has no side-effects and result caching is undesired.</p>\n',summary:"<p>  Executes a\n  database command .</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"db",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a database connection identifier</div>'},{name:"cmd",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the database command to execute</div>'}],returns:{type:"object()",description:"The result object. Typically has { ok : ..., errmsg : ... } fields set."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO004 invalid database identifier</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO006 if any mongodb error happens</xqdoc:error>']},{isDocumented:!0,arity:2,name:"run-cmd",qname:"mongo:run-cmd",signature:"($db as xs:anyURI, $cmd as object()) as object() external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Executes a\n <a href="http://docs.mongodb.org/manual/reference/commands/">database command</a>.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is marked as sequential and should be used whenever the\n specified command has side-effects.</p>\n',summary:"<p>  Executes a\n  database command .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"db",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a database connection identifier</div>'},{name:"cmd",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the database command to execute</div>'}],returns:{type:"object()",description:"The result object. Typically has { ok : ..., errmsg : ... } fields set."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO004 invalid database identifier</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO006 if any mongodb error happens</xqdoc:error>']},{isDocumented:!0,arity:3,name:"save",qname:"mongo:save",signature:"($db as xs:anyURI, $coll as xs:string, $doc as object()) as empty-sequence()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Save a sequence of documents in the given collection.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If a document to be save already has an "_id" field, then an\n upsert operation is performed an any existing document with that\n id will be overwritten. Otherwise, an insert operation is performed\n and the "_id" generated for each document will be returned.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Each safe operation will be checked and an error is raised if\n one of them fails.</p>\n',summary:"<p>  Save a sequence of documents in the given collection.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"db",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a database connection identifier</div>'},{name:"coll",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the collection</div>'},{name:"doc",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the document to be saved or upserted</div>'}],returns:{type:"empty-sequence()",description:'the documents that have been inserted with "_id" fields.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO004 invalid database identifier</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO005 if any mongodb error happens</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO006 if the given document could not be converted to BSON</xqdoc:error>']},{isDocumented:!0,arity:4,name:"save",qname:"mongo:save",signature:"($db as xs:anyURI, $coll as xs:string, $doc as object(), $options as object()) as m-schema:oid? external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Save a sequence of documents in the given collection.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If a document to be saved already has an "_id" field, then an\n upsert operation is performed and any existing document with that\n id will be overwritten. Otherwise, an insert operation is performed.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If the manipulate option is set to true, an "_id" field will be\n added to the document. The new id will be returned. Otherwise,\n the "_id" field will be added by the server.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If the safe options is set to true, each operation will wait for a\n response from the database and an error is raised if the operation\n fails. Otherwise, the operation will not wait for a response.</p>\n',summary:"<p>  Save a sequence of documents in the given collection.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"db",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a database connection identifier</div>'},{name:"coll",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the collection</div>'},{name:"doc",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the document to be saved or upserted</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the options for this operation</div>'}],returns:{type:"m-schema:oid?",description:"a generated OID if the manipulate option was set to true, the empty sequence otherwise."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO004 invalid database identifier</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO005 if any mongodb error happens</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO006 if the given document could not be converted to BSON</xqdoc:error>']},{isDocumented:!0,arity:4,name:"update",qname:"mongo:update",signature:"($db as xs:anyURI, $coll as xs:string, $query as object(), $update as object()) as empty-sequence()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Performs an update command on the given collection.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The operation will be checked and an error is raised if\n one of them fails. Also, this function only modifies one\n document matching the query and does not do any upserts.</p>\n',summary:"<p>  Performs an update command on the given collection.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"db",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a database connection identifier</div>'},{name:"coll",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the collection</div>'},{name:"query",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the query to select the objects that are updated</div>'},{name:"update",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the update specification to be performed</div>'}],returns:{type:"empty-sequence()",description:"the function has side-effects and returns the empty sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO004 invalid database identifier</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO005 if any mongodb error happens</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO006 if the given objects could not be converted to BSON</xqdoc:error>']},{isDocumented:!0,arity:5,name:"update",qname:"mongo:update",signature:"($db as xs:anyURI, $coll as xs:string, $query as object(), $update as object(), $options as object()) as empty-sequence() external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Performs an update operation on the given collection.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n <ul>\n   <li>safe: If to true, the operation will wait for a response from\n    the database and an error is raised if the operation fails.\n    Otherwise, the operation will not wait for a response.</li>\n  <li>multi: indicates if all documents matching criteria should be updated\n  rather than just one.</li>\n  <li>upsert: if this should be an "upsert" operation; that is,\n  if the record(s) do not exist, insert one. Upsert only inserts a single document.</li>\n </ul>\n </p>\n',summary:"<p>  Performs an update operation on the given collection.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"db",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a database connection identifier</div>'},{name:"coll",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the collection</div>'},{name:"query",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the query to select the objects that are updated</div>'},{name:"update",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the update specification to be performed</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the options for this operation</div>'}],returns:{type:"empty-sequence()",description:"the function has side-effects and returns the empty sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO004 invalid database identifier</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO005 if any mongodb error happens</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">mongo:MONGO006 if the given objects could not be converted to BSON</xqdoc:error>']}],variables:[]},"http://jsoniq.org/function-library":{ns:"http://jsoniq.org/function-library",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This module provides extensions to the JSONiq core function library.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The module is always imported so you do not need to import it explicitly.\n Also, you do not need to fully qualify a function to invoke it.</p>\n',sees:['<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://jsoniq.org/</xqdoc:see>'],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Ghislain Fourny</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://jsoniq.org/functions",prefix:"jn"},{uri:"http://jsoniq.org/function-library",prefix:"libjn"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"accumulate",qname:"libjn:accumulate",signature:"($items as item()*) as object()",description:" This function dynamically builds an object, like the {||} syntax, except that\n it does not throw an error upon pair collision. Instead, it accumulates them\n into an array, if more than one.\n",summary:"<p> This function dynamically builds an object, like the {||} syntax, except that\n it does not throw an error upon pair collision.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"items",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A sequence of items, the objects of which are going to be accumulated into a single object.</div>'}],returns:{type:"object()",description:"The accumulated object."},errors:[]},{isDocumented:!0,arity:1,name:"descendant-arrays",qname:"libjn:descendant-arrays",signature:"($items as item()*) as array()*",description:" This function returns all arrays contained at any depth within a sequence of items.\n",summary:"<p> This function returns all arrays contained at any depth within a sequence of items.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"items",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A sequence of items.</div>'}],returns:{type:"array()*",description:"The descendant arrays of the input sequence."},errors:[]},{isDocumented:!0,arity:1,name:"descendant-objects",qname:"libjn:descendant-objects",signature:"($items as item()*) as object()*",description:" This function returns all objects contained at any depth within a sequence of items.\n",summary:"<p> This function returns all objects contained at any depth within a sequence of items.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"items",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A sequence of items.</div>'}],returns:{type:"object()*",description:"The descendant objects of the input sequence."},errors:[]},{isDocumented:!0,arity:1,name:"descendant-pairs-priv",qname:"libjn:descendant-pairs-priv",signature:"($i as item()) as object()*",description:" Helper function for libjn:descendant-pairs()\n",summary:"<p> Helper function for libjn:descendant-pairs()\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"i",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An item</div>'}],returns:{type:"object()*",description:"The descendant pairs of the item"},errors:[]},{isDocumented:!0,arity:1,name:"descendant-pairs",qname:"libjn:descendant-pairs",signature:"($items as item()*) as object()*",description:" This function returns all pairs contained at any depth within an sequence of items.\n",summary:"<p> This function returns all pairs contained at any depth within an sequence of items.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"items",type:"item()",occurrence:"*",description:""}],returns:{type:"object()*",description:"All direct and indirect descendant pairs."},errors:[]},{isDocumented:!0,arity:1,name:"intersect",qname:"libjn:intersect",signature:"($items as item()*) as object()",description:" This function returns the intersection of the objects contained in the\n given sequence of items, aggregating values corresponding to the same key\n into an array.\n",summary:"<p> This function returns the intersection of the objects contained in the\n given sequence of items, aggregating values corresponding to the same key\n into an array.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"items",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A sequence of items.</div>'}],returns:{type:"object()",description:"The insersection of the objects contained in $items."},errors:[]},{isDocumented:!0,arity:1,name:"values",qname:"libjn:values",signature:"($items as item()*) as item()*",description:" This functions returns all values of all objects contained in a sequence of items.\n",summary:"<p> This functions returns all values of all objects contained in a sequence of items.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"items",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A sequence of items.</div>'}],returns:{type:"item()*",description:"The values inside the objects of the sequence."},errors:[]}],variables:[]},"http://zorba.io/modules/node-position":{ns:"http://zorba.io/modules/node-position",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This module provides a function (np:node-position) that, given a node,\n returns positional information about the node in the form of an xs:anyURI\n item. The module also defines functions that use such positional information\n to determine: (1) positional relationships between two nodes (e.g. if one\n is the ancestor of another) and (2) positional properties of a single node\n (e.g. its level in the tree).</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Within this module, the term "node position" will be used to refer to an\n xs:anyURI item that is returned by the np:node-position function.</p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Federico Cavalieri, Markos Zaharioudakis</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/modules/node-position",prefix:"np"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:2,name:"ancestor-of",qname:"np:ancestor-of",signature:"($pos1 as xs:anyURI, $pos2 as xs:anyURI) as xs:boolean external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Determines whether the node position given as second argument is\n an ancestor of the node position given as first argument.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If the two positions were obtained within the same snapshot S, then the\n result of the function applies to the corresponding nodes as well, that\n is, within snapshot S, the second node is an ancestor of the first.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Otherwise, the result of the function does not imply anything about the\n positional relationship of the two nodes.</p>\n',summary:"<p>  Determines whether the node position given as second argument is\n an ancestor of the node position given as first argument.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"pos1",type:"xs:anyURI",occurrence:null,description:""},{name:"pos2",type:"xs:anyURI",occurrence:null,description:""}],returns:{type:"xs:boolean",description:"true if the node position $n-pos2 is an ancestor of the node position $n-pos1; false otherwise."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZAPI0028 if one of the given URI is not a valid node position computed by the <tt>np:node-position</tt> function.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"attribute-of",qname:"np:attribute-of",signature:"($n-pos1 as xs:anyURI, $n-pos2 as xs:anyURI) as xs:boolean external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Determines whether the node position given as second argument is\n an attribute of the node position given as first argument.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If the two positions were obtained within the same snapshot S, then the\n result of the function applies to the corresponding nodes as well, that\n is, within snapshot S, the second node is an attribute of the first.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Otherwise, the result of the function does not imply anything about the\n positional relationship of the two nodes.</p>\n',summary:"<p>  Determines whether the node position given as second argument is\n an attribute of the node position given as first argument.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"n-pos1",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the potential parent node position</div>'},{name:"n-pos2",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the potential attribute node position</div>'}],returns:{type:"xs:boolean",description:"true if the node position $n-pos2 is an attribute of the node position $n-pos1; false otherwise."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZAPI0028 if one of the given URI is not a valid node position computed by the <tt>np:node-position</tt> function.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"child-of",qname:"np:child-of",signature:"($n-pos1 as xs:anyURI, $n-pos2 as xs:anyURI) as xs:boolean external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Determines whether the node position given as second argument is\n a child of the node position given as first argument.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If the two positions were obtained within the same snapshot S, then the\n result of the function applies to the corresponding nodes as well, that\n is, within snapshot S, the second node is a child of the first.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Otherwise, the result of the function does not imply anything about the\n positional relationship of the two nodes.</p>\n',summary:"<p>  Determines whether the node position given as second argument is\n a child of the node position given as first argument.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"n-pos1",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the potential parent node position</div>'},{name:"n-pos2",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the potential child node position</div>'}],returns:{type:"xs:boolean",description:"true if the node position $n-pos2 is a child of the node position $n-pos1; false otherwise."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZAPI0028 if one of the given URI is not a valid node position computed by the <tt>np:node-position</tt> function.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"descendant-of",qname:"np:descendant-of",signature:"($n-pos1 as xs:anyURI, $n-pos2 as xs:anyURI) as xs:boolean external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Determines whether the node position given as second argument is\n a descendant of the node position given as first argument.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If the two positions were obtained within the same snapshot S, then the\n result of the function applies to the corresponding nodes as well, that\n is, within snapshot S, the second node is a descendant of the first.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Otherwise, the result of the function does not imply anything about the\n positional relationship of the two nodes.</p>\n',summary:"<p>  Determines whether the node position given as second argument is\n a descendant of the node position given as first argument.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"n-pos1",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the potential ancestor node position</div>'},{name:"n-pos2",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the potential descendant node position</div>'}],returns:{type:"xs:boolean",description:"true if the node position $n-pos2 is a descendant of the node position $n-pos1; false otherwise."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZAPI0028 if one of the given URI is not a valid node position computed by the <tt>np:node-position</tt> function.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"following-in-document-order-of",qname:"np:following-in-document-order-of",signature:"($n-pos1 as xs:anyURI, $n-pos2 as xs:anyURI) as xs:boolean external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Determines whether the node position given as second argument is\n following in document order the node position given as first argument.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If the two positions were obtained within the same snapshot S, then the\n result of the function applies to the corresponding nodes as well, that\n is, within snapshot S, the second node is following in document order the\n first.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Otherwise, the result of the function does not imply anything about\n the positional relationship of the two nodes.</p>\n',summary:"<p>  Determines whether the node position given as second argument is\n following in document order the node position given as first argument.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"n-pos1",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the potential preceding node position</div>'},{name:"n-pos2",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the potential following node position</div>'}],returns:{type:"xs:boolean",description:"true if the node position $n-pos2 is following in document order the node position $n-pos1; false otherwise."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZAPI0028 if one of the given URI is not a valid node position computed by the <tt>np:node-position</tt> function.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"following-of",qname:"np:following-of",signature:"($n-pos1 as xs:anyURI, $n-pos2 as xs:anyURI) as xs:boolean external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Determines whether the node position given as second argument is\n following the node position given as first argument.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If the two positions were obtained within the same snapshot S, then the\n result of the function applies to the corresponding nodes as well, that\n is, within snapshot S, the second node is following the first.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Otherwise, the result of the function does not imply anything about the\n positional relationship of the two nodes.</p>\n',summary:"<p>  Determines whether the node position given as second argument is\n following the node position given as first argument.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"n-pos1",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the potential preceding node position</div>'},{name:"n-pos2",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the potential following node position</div>'}],returns:{type:"xs:boolean",description:"true if node positions $n-pos1 and $n-pos2 belong to the same XML tree and $n-pos2 is following the node position $n-pos1; false otherwise."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZAPI0028 if one of the given URI is not a valid node position computed by the <tt>np:node-position</tt> function.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"following-sibling-of",qname:"np:following-sibling-of",signature:"($n-pos1 as xs:anyURI, $n-pos2 as xs:anyURI) as xs:boolean external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Determines whether the node position given as second argument is\n a following-sibling of the node position given as first argument.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If the two positions were obtained within the same snapshot S, then the\n result of the function applies to the corresponding nodes as well, that\n is, within snapshot S, the second node is a following-sibling of the first.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Otherwise, the result of the function does not imply anything about the\n positional relationship of the two nodes.</p>\n',summary:"<p>  Determines whether the node position given as second argument is\n a following-sibling of the node position given as first argument.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"n-pos1",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the potential preceding-sibling node position</div>'},{name:"n-pos2",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the potential following-sibling node position</div>'}],returns:{type:"xs:boolean",description:"true if the node position $n-pos2 is a following-sibling of the node position $n-pos1; false otherwise."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZAPI0028 if one of the given URI is not a valid node position computed by the <tt>np:node-position</tt> function.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"in-collection",qname:"np:in-collection",signature:"($n-pos as xs:anyURI) as xs:boolean external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Determines whether a node position belongs to a collection.</p>\n',summary:"<p>  Determines whether a node position belongs to a collection.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"n-pos",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the node position</div>'}],returns:{type:"xs:boolean",description:"true if the node position $n-pos belongs to a collection; false otherwise."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZAPI0028 if the given URI is not a valid node position computed by the <tt>np:node-position</tt> function.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"in-same-collection-of",qname:"np:in-same-collection-of",signature:"($n-pos1 as xs:anyURI, $n-pos2 as xs:anyURI) as xs:boolean external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Determines whether two node positions belong to the same collection.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If the two positions were obtained within the same snapshot S, then the\n result of the function applies to the corresponding nodes as well, that\n is, within snapshot S, the two nodes belong to the same collection.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Otherwise, the result of the function does not imply anything about\n the positional relationship of the two nodes.</p>\n',summary:"<p>  Determines whether two node positions belong to the same collection.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"n-pos1",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a node position</div>'},{name:"n-pos2",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a node position</div>'}],returns:{type:"xs:boolean",description:"true if the two nodes whose node positions are $n-pos1 and $n-pos2 belong to the same collection."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZAPI0028 if one of the given URI is not a valid node position computed by the <tt>np:node-position</tt> function.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"in-same-tree-of",qname:"np:in-same-tree-of",signature:"($n-pos1 as xs:anyURI, $n-pos2 as xs:anyURI) as xs:boolean external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Determines whether two node positions belong to the same tree.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If the two positions were obtained within the same snapshot S, then the\n result of the function applies to the corresponding nodes as well, that\n is, within snapshot S, the two nodes belong to the same tree.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Otherwise, the result of the function does not imply anything about\n the positional relationship of the two nodes.</p>\n',summary:"<p>  Determines whether two node positions belong to the same tree.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"n-pos1",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a node position</div>'},{name:"n-pos2",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a node position</div>'}],returns:{type:"xs:boolean",description:"true if the two nodes whose node positions are $n-pos1 and $n-pos2 belong to the same tree."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZAPI0028 if one of the given URI is not a valid node position computed by the <tt>np:node-position</tt> function.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"in-subtree-of",qname:"np:in-subtree-of",signature:"($n-pos1 as xs:anyURI, $n-pos2 as xs:anyURI) as xs:boolean external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Determines whether the node position given as second argument belongs\n to the subtree rooted at the node position given as first argument.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If the two positions were obtained within the same snapshot S, then the\n result of the function applies to the corresponding nodes as well, that\n is, within snapshot S, the second node belongs to the subtree rooted at the\n first. Otherwise, the result of the function does not imply anything about\n the positional relationship of the two nodes.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function differs from np:descendant-of in the way it treats attribute\n nodes. np:descendant-of follows the XQuery/XPath specification for the\n descendant axis, and as a result, it does not consider attributes as\n descendants of any nodes; it will always return false if $n-pos2 was\n obtained from an attribute node.In contrast, np:in-subtree-of will return\n true if $n-pos2 was obtained from an attribute node that appeared in the\n subtree of the node that $n-pos1 was obtained from.</p>\n',summary:"<p>  Determines whether the node position given as second argument belongs\n to the subtree rooted at the node position given as first argument.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"n-pos1",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the potential subtree root node position</div>'},{name:"n-pos2",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the potential node in the subtree node position</div>'}],returns:{type:"xs:boolean",description:"true if the node position $n-pos2 belongs to the subtree rooted at the node position $n-pos1; false otherwise."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZAPI0028 if one of the given URI is not a valid node position computed by the <tt>np:node-position</tt> function.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"is-attribute",qname:"np:is-attribute",signature:"($n-pos1 as xs:anyURI) as xs:boolean external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Determines whether a node position corresponds to an attribute node.</p>\n',summary:"<p>  Determines whether a node position corresponds to an attribute node.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"n-pos1",type:"xs:anyURI",occurrence:null,description:""}],returns:{type:"xs:boolean",description:"true if the node position $n-pos corresponds to an attribute; false otherwise."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZAPI0028 if the given URI is not a valid node position computed by the <tt>np:node-position</tt> function.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"is-comment",qname:"np:is-comment",signature:"($n-pos1 as xs:anyURI) as xs:boolean external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Determines whether a node position corresponds to a comment node.</p>\n',summary:"<p>  Determines whether a node position corresponds to a comment node.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"n-pos1",type:"xs:anyURI",occurrence:null,description:""}],returns:{type:"xs:boolean",description:"true if the node position $n-pos corresponds to an comment; false otherwise."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZAPI0028 if the given URI is not a valid node position computed by the <tt>np:node-position</tt> function.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"is-document",qname:"np:is-document",signature:"($n-pos1 as xs:anyURI) as xs:boolean external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Determines whether a node position corresponds to a document node.</p>\n',summary:"<p>  Determines whether a node position corresponds to a document node.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"n-pos1",type:"xs:anyURI",occurrence:null,description:""}],returns:{type:"xs:boolean",description:"true if the node position $n-pos corresponds to a document; false otherwise."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZAPI0028 if the given URI is not a valid node position computed by the <tt>np:node-position</tt> function.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"is-element",qname:"np:is-element",signature:"($n-pos1 as xs:anyURI) as xs:boolean external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Determines whether a node position corresponds to an element node.</p>\n',summary:"<p>  Determines whether a node position corresponds to an element node.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"n-pos1",type:"xs:anyURI",occurrence:null,description:""}],returns:{type:"xs:boolean",description:"true if the node position $n-pos corresponds to an element; false otherwise."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZAPI0028 if the given URI is not a valid node position computed by the <tt>np:node-position</tt> function.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"is-processing-instruction",qname:"np:is-processing-instruction",signature:"($n-pos1 as xs:anyURI) as xs:boolean external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Determines whether a node position corresponds to an processing-instruction\n node.</p>\n',summary:"<p>  Determines whether a node position corresponds to an processing-instruction\n node.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"n-pos1",type:"xs:anyURI",occurrence:null,description:""}],returns:{type:"xs:boolean",description:"true if the node position $n-pos corresponds to a processing instruction; false otherwise."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZAPI0028 if the given URI is not a valid node position computed by the <tt>np:node-position</tt> function.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"is-text",qname:"np:is-text",signature:"($n-pos1 as xs:anyURI) as xs:boolean external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Determines whether a node position corresponds to a text node.</p>\n',summary:"<p>  Determines whether a node position corresponds to a text node.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"n-pos1",type:"xs:anyURI",occurrence:null,description:""}],returns:{type:"xs:boolean",description:"true if the node position $n-pos corresponds to a text; false otherwise."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZAPI0028 if the given URI is not a valid node position computed by the <tt>np:node-position</tt> function.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"level",qname:"np:level",signature:"($n-pos as xs:anyURI) as xs:integer external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Computes the level of a node position in its tree.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Note: The root node of a tree is at level one.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The result of the function applies to the corresponding node as well,\n that is, within the snapshot in which the position was computed, the node\n level is the returned one.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The result of the function does not imply anything about the\n node level in other snapshots.</p>\n',summary:"<p>  Computes the level of a node position in its tree.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"n-pos",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the node position of the node whose level should be determined.</div>'}],returns:{type:"xs:integer",description:"the level in the tree of the node position $n-pos as xs:integer."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZAPI0028 if the given URI is not a valid node position computed by the <tt>np:node-position</tt> function.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"node-position",qname:"np:node-position",signature:"($arg as node()) as xs:anyURI external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Return a URI item containing positional information for a given node.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Within a snapshot, each has a different positional URI. However,\n different nodes in different snapshots might have the same URI.</p>\n',summary:"<p>  Return a URI item containing positional information for a given node.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"node()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the node for which the positional information URI should be computed</div>'}],returns:{type:"xs:anyURI",description:"the opaque positional information URI of the node."},errors:[]},{isDocumented:!0,arity:2,name:"parent-of",qname:"np:parent-of",signature:"($n-pos1 as xs:anyURI, $n-pos2 as xs:anyURI) as xs:boolean external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Determines whether the node position given as second argument is\n the parent of the node position given as first argument.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If the two positions were obtained within the same snapshot S, then the\n result of the function applies to the corresponding nodes as well, that\n is, within snapshot S, the second node is the parent of the first.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Otherwise, the result of the function does not imply anything about the\n positional relationship of the two nodes.</p>\n',summary:"<p>  Determines whether the node position given as second argument is\n the parent of the node position given as first argument.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"n-pos1",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the potential child node position</div>'},{name:"n-pos2",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the potential parent node position</div>'}],returns:{type:"xs:boolean",description:"true if the node position $n-pos2 is the parent of the node position $n-pos1; false otherwise."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZAPI0028 if one of the given URI is not a valid node position computed by the <tt>np:node-position</tt> function.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"preceding-in-document-order-of",qname:"np:preceding-in-document-order-of",signature:"($n-pos1 as xs:anyURI, $n-pos2 as xs:anyURI) as xs:boolean external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Determines whether the node position given as second argument is\n preceding in document order the node position given as first argument.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If the two positions were obtained within the same snapshot S, then the\n result of the function applies to the corresponding nodes as well, that\n is, within snapshot S, the second node is preceding in document order the\n first.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Otherwise, the result of the function does not imply anything about\n the positional relationship of the two nodes.</p>\n',summary:"<p>  Determines whether the node position given as second argument is\n preceding in document order the node position given as first argument.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"n-pos1",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the potential following node position</div>'},{name:"n-pos2",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the potential preceding node position</div>'}],returns:{type:"xs:boolean",description:"true if the node position $n-pos2 is preceding in document order the node position $n-pos1; false otherwise."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZAPI0028 if one of the given URI is not a valid node position computed by the <tt>np:node-position</tt> function.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"preceding-of",qname:"np:preceding-of",signature:"($n-pos1 as xs:anyURI, $n-pos2 as xs:anyURI) as xs:boolean external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Determines whether the node position given as second argument is\n preceding the node position given as first argument.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If the two positions were obtained within the same snapshot S, then the\n result of the function applies to the corresponding nodes as well, that\n is, within snapshot S, the second node is preceding the first.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Otherwise, the result of the function does not imply anything about the\n positional relationship of the two nodes.</p>\n',summary:"<p>  Determines whether the node position given as second argument is\n preceding the node position given as first argument.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"n-pos1",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the potential following node position</div>'},{name:"n-pos2",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the potential preceding node position</div>'}],returns:{type:"xs:boolean",description:"true if node positions $n-pos1 and $n-pos2 belong to the same XML tree and $n-pos2 is preceding the node position $n-pos1; false otherwise."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZAPI0028 if one of the given URI is not a valid node position computed by the <tt>np:node-position</tt> function.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"preceding-sibling-of",qname:"np:preceding-sibling-of",signature:"($n-pos1 as xs:anyURI, $n-pos2 as xs:anyURI) as xs:boolean external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Determines whether the node position given as second argument is\n a preceding-sibling of the node position given as first argument.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If the two positions were obtained within the same snapshot S, then the\n result of the function applies to the corresponding nodes as well, that\n is, within snapshot S, the second node is a preceding-sibling of the first.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Otherwise, the result of the function does not imply anything about the\n positional relationship of the two nodes.</p>\n',summary:"<p>  Determines whether the node position given as second argument is\n a preceding-sibling of the node position given as first argument.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"n-pos1",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the potential following-sibling node position</div>'},{name:"n-pos2",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the potential preceding-sibling node position</div>'}],returns:{type:"xs:boolean",description:"true if the node position $n-pos2 is a preceding-sibling of the node position $n-pos1; false otherwise."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZAPI0028 if one of the given URI is not a valid node position computed by the <tt>np:node-position</tt> function.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"sibling-of",qname:"np:sibling-of",signature:"($n-pos1 as xs:anyURI, $n-pos2 as xs:anyURI) as xs:boolean external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Determines whether two node positions are siblings.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If the two positions were obtained within the same snapshot S, then the\n result of the function applies to the corresponding nodes as well, that\n is, within snapshot S, the second node is a sibling of the first.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Otherwise, the result of the function does not imply anything about the\n positional relationship of the two nodes.</p>\n',summary:"<p>  Determines whether two node positions are siblings.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"n-pos1",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a node position</div>'},{name:"n-pos2",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a node position</div>'}],returns:{type:"xs:boolean",description:"true if the two node positions $n-pos1 and $n-pos2 are siblings; false otherwise."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZAPI0028 if one of the given URI is not a valid node position computed by the <tt>np:node-position</tt> function.</xqdoc:error>']}],variables:[]},"http://www.zorba-xquery.com/modules/cryptography/hash":{ns:"http://www.zorba-xquery.com/modules/cryptography/hash",description:" This module provides functions that perform different hash operations.\n",sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Gabriel Petrovay, Markus Pilman</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://www.zorba-xquery.com/modules/cryptography/hash",prefix:"hash"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:2,name:"hash-impl",qname:"hash:hash-impl",signature:"($value as xs:string, $alg as xs:string) as xs:string external",description:" This function computes a hash value of the string provided as parameter.\n The function expects the hash algorithm to be used as parameter.\n",summary:"<p> This function computes a hash value of the string provided as parameter.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"value",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The string to be hashed.</div>'},{name:"alg",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The algorithm to use for this hashing operation. Currently only "md5" and "sha1" algorithms are available. If no valid algorithm name is given, md5 will be used.</div>'}],returns:{type:"xs:string",description:"The hash of the provided string. In case SHA1 is used, the resulting hash value is base64 encoded."},errors:[]},{isDocumented:!0,arity:1,name:"md5",qname:"hash:md5",signature:"($value as xs:string) as xs:string",description:" Computes the MD5 hash of the string provided as parameter.\n",summary:"<p> Computes the MD5 hash of the string provided as parameter.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"value",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The string to hash.</div>'}],returns:{type:"xs:string",description:"The MD5 hash of the provided string."},errors:[]},{isDocumented:!0,arity:1,name:"sha1",qname:"hash:sha1",signature:"($value as xs:string) as xs:string",description:" Computes the SHA1 hash of the string provided as parameter.\n",summary:"<p> Computes the SHA1 hash of the string provided as parameter.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"value",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The string to hash.</div>'}],returns:{type:"xs:string",description:"The base64 encoded SHA1 hash of the provided string."},errors:[]}],variables:[]},"http://zorba.io/modules/excel/lookup":{ns:"http://zorba.io/modules/excel/lookup",description:" This module implements some Excel 2003 lookup functions.\n",sees:['<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0"><a href="http://office.microsoft.com/en-us/excel/CH062528281033.aspx" target="_blank">Excel 2003 Documentation: Lookup Functions</a></xqdoc:see>'],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Daniel Turcanu</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/modules/excel/lookup",prefix:"excel"},{uri:"http://zorba.io/modules/excel/errors",prefix:"excel-err"},{uri:"http://zorba.io/modules/excel/math",prefix:"excel-math"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:2,name:"choose",qname:"excel:choose",signature:"($index_num as xs:integer, $values as xs:anyAtomicType*) as xs:anyAtomicType",description:" Uses index_num to return a value from the sequence of value arguments.\n",summary:"<p> Uses index_num to return a value from the sequence of value arguments.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"index_num",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The position in the sequence, 1 based.</div>'},{name:"values",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The sequence of values.</div>'}],returns:{type:"xs:anyAtomicType",description:"The value at the index position."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if index is smaller than 1 or bigger than the size of sequence.</xqdoc:error>']},{isDocumented:!0,arity:30,name:"choose",qname:"excel:choose",signature:"($index_num as xs:integer, $value_sequence1 as xs:anyAtomicType*, $value_sequence2 as xs:anyAtomicType*, $value_sequence3 as xs:anyAtomicType*, $value_sequence4 as xs:anyAtomicType*, $value_sequence5 as xs:anyAtomicType*, $value_sequence6 as xs:anyAtomicType*, $value_sequence7 as xs:anyAtomicType*, $value_sequence8 as xs:anyAtomicType*, $value_sequence9 as xs:anyAtomicType*, $value_sequence10 as xs:anyAtomicType*, $value_sequence11 as xs:anyAtomicType*, $value_sequence12 as xs:anyAtomicType*, $value_sequence13 as xs:anyAtomicType*, $value_sequence14 as xs:anyAtomicType*, $value_sequence15 as xs:anyAtomicType*, $value_sequence16 as xs:anyAtomicType*, $value_sequence17 as xs:anyAtomicType*, $value_sequence18 as xs:anyAtomicType*, $value_sequence19 as xs:anyAtomicType*, $value_sequence20 as xs:anyAtomicType*, $value_sequence21 as xs:anyAtomicType*, $value_sequence22 as xs:anyAtomicType*, $value_sequence23 as xs:anyAtomicType*, $value_sequence24 as xs:anyAtomicType*, $value_sequence25 as xs:anyAtomicType*, $value_sequence26 as xs:anyAtomicType*, $value_sequence27 as xs:anyAtomicType*, $value_sequence28 as xs:anyAtomicType*, $value_sequence29 as xs:anyAtomicType*) as xs:anyAtomicType*",description:" Uses index_num to return a sequence from the list of sequences.\n Use CHOOSE to select one of up to 29 sequences based on the index number.\n",summary:"<p> Uses index_num to return a sequence from the list of sequences.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"index_num",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the position in the sequence, 1 based</div>'},{name:"value_sequence1",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of values. Specify the empty sequence () if you don\'t need it.</div>'},{name:"value_sequence2",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of values. Specify the empty sequence () if you don\'t need it.</div>'},{name:"value_sequence3",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of values. Specify the empty sequence () if you don\'t need it.</div>'},{name:"value_sequence4",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of values. Specify the empty sequence () if you don\'t need it.</div>'},{name:"value_sequence5",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of values. Specify the empty sequence () if you don\'t need it.</div>'},{name:"value_sequence6",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of values. Specify the empty sequence () if you don\'t need it.</div>'},{name:"value_sequence7",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of values. Specify the empty sequence () if you don\'t need it.</div>'},{name:"value_sequence8",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of values. Specify the empty sequence () if you don\'t need it.</div>'},{name:"value_sequence9",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of values. Specify the empty sequence () if you don\'t need it.</div>'},{name:"value_sequence10",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of values. Specify the empty sequence () if you don\'t need it.</div>'},{name:"value_sequence11",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of values. Specify the empty sequence () if you don\'t need it.</div>'},{name:"value_sequence12",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of values. Specify the empty sequence () if you don\'t need it.</div>'},{name:"value_sequence13",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of values. Specify the empty sequence () if you don\'t need it.</div>'},{name:"value_sequence14",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of values. Specify the empty sequence () if you don\'t need it.</div>'},{name:"value_sequence15",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of values. Specify the empty sequence () if you don\'t need it.</div>'},{name:"value_sequence16",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of values. Specify the empty sequence () if you don\'t need it.</div>'},{name:"value_sequence17",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of values. Specify the empty sequence () if you don\'t need it.</div>'},{name:"value_sequence18",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of values. Specify the empty sequence () if you don\'t need it.</div>'},{name:"value_sequence19",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of values. Specify the empty sequence () if you don\'t need it.</div>'},{name:"value_sequence20",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of values. Specify the empty sequence () if you don\'t need it.</div>'},{name:"value_sequence21",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of values. Specify the empty sequence () if you don\'t need it.</div>'},{name:"value_sequence22",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of values. Specify the empty sequence () if you don\'t need it.</div>'},{name:"value_sequence23",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of values. Specify the empty sequence () if you don\'t need it.</div>'},{name:"value_sequence24",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of values. Specify the empty sequence () if you don\'t need it.</div>'},{name:"value_sequence25",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of values. Specify the empty sequence () if you don\'t need it.</div>'},{name:"value_sequence26",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of values. Specify the empty sequence () if you don\'t need it.</div>'},{name:"value_sequence27",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of values. Specify the empty sequence () if you don\'t need it.</div>'},{name:"value_sequence28",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of values. Specify the empty sequence () if you don\'t need it.</div>'},{name:"value_sequence29",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of values. Specify the empty sequence () if you don\'t need it.</div>'}],returns:{type:"xs:anyAtomicType*",description:"The value at the index position"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if index is smaller than 1 or bigger than 29</xqdoc:error>']},{isDocumented:!0,arity:5,name:"hlookup",qname:"excel:hlookup",signature:"($lookup_value as xs:anyAtomicType, $table_array as xs:anyAtomicType+, $table_width as xs:integer, $table_height as xs:integer, $row_index_num as xs:integer) as xs:anyAtomicType",description:" Same as above, only that range_lookup is defaulted to true.\n That is, this Hlookup looks for the approximate value\n   and the first row must be ordered ascending.\n",summary:"<p> Same as above, only that range_lookup is defaulted to true.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"lookup_value",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the value to be searched. Allowed types are numeric, string, boolean. <p/> Boolean values are compared only with booleans. Numbers are compared only with numbers, if range_lookup is not zero. The other types are converted to string and compared to string value of all values.</div>'},{name:"table_array",type:"xs:anyAtomicType",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of values, row after row</div>'},{name:"table_width",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number of values in a row</div>'},{name:"table_height",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number of rows</div>'},{name:"row_index_num",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the row index, 1 based</div>'}],returns:{type:"xs:anyAtomicType",description:"The value found, with original type"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the array contains less elements than specified by table_height and table_width</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if row_index_num is outside the range 1 .. table_height</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if range_lookup is true and the value searched is smaller than the first value in the header</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if range_lookup=false and the value cannot be found</xqdoc:error>']},{isDocumented:!0,arity:6,name:"hlookup",qname:"excel:hlookup",signature:"($lookup_value as xs:anyAtomicType, $table_array as xs:anyAtomicType+, $table_width as xs:integer, $table_height as xs:integer, $row_index_num as xs:integer, $range_lookup as xs:boolean) as xs:anyAtomicType",description:' Searches for a value in the top row of an array of values,\n   and then returns a value in the same column from a row you specify in the array.\n <dl xmlns:xqdoc="http://www.xqdoc.org/1.0">Array is specified with 3 parameters:\n <dt>table_array</dt> <dd>is a sequence of elements, first row first, then second row and so on</dd>\n <dt>table_width</dt> <dd>specifies the number of elements in a row</dd>\n <dt>table_height</dt> <dd>specifies the number of rows</dd></dl>\n The number of elements in table_array must be equal or more than table_width * table_height.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n For wildchar matching, the XQuery regex matcher is used.\n',summary:"<p> Searches for a value in the top row of an array of values,\n   and then returns a value in the same column from a row you specify in the array.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"lookup_value",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the value to be searched. Allowed types are numeric, string, boolean. <p/> Boolean values are compared only with booleans. Numbers are compared only with numbers, if range_lookup is not zero. The other types are converted to string and compared to string value of all values.</div>'},{name:"table_array",type:"xs:anyAtomicType",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of values, row after row</div>'},{name:"table_width",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number of values in a row</div>'},{name:"table_height",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number of rows</div>'},{name:"row_index_num",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the row index, 1 based</div>'},{name:"range_lookup",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> <dl>specifies the algorithm to use: <dt>true</dt> <dd>find approximative match. First row of array must be sorted in ascending order.</dd> <dt>false</dt> <dd>find exact match, using xquery regex First row of array can be in any order. </dd></dl></div>'}],returns:{type:"xs:anyAtomicType",description:"The value found, with original type"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the array contains less elements than specified by table_height and table_width</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if row_index_num is outside the range 1 .. table_height</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if range_lookup is true and the value searched is smaller than the first value in the header</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if range_lookup=false and the value cannot be found</xqdoc:error>']},{isDocumented:!0,arity:5,name:"index",qname:"excel:index",signature:"($array as xs:anyAtomicType+, $array_height as xs:integer, $array_width as xs:integer, $row_num as xs:integer, $column_num as xs:integer) as xs:anyAtomicType+",description:' Returns a value from within an array.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n This is the Array form of the Excel Index function.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <dl xmlns:xqdoc="http://www.xqdoc.org/1.0">Array is specified with 3 parameters:\n <dt>array</dt> <dd>is a sequence of elements, first row first, then second row and so on</dd>\n <dt>array_height</dt> <dd>specifies the number of rows</dd>\n <dt>array_width</dt> <dd>specifies the number of elements in a row</dd></dl>\n The number of elements in array must be equal or more than array_width * array_height.\n',summary:"<p> Returns a value from within an array.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"array",type:"xs:anyAtomicType",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of values, row after row</div>'},{name:"array_height",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number of rows</div>'},{name:"array_width",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number of values in a row</div>'},{name:"row_num",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the row position of the value, 1 based</div>'},{name:"column_num",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the column position of the value, 1 based</div>'}],returns:{type:"xs:anyAtomicType+",description:"The value from x-y in the array"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the array contains less elements than specified by table_height and table_width</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Ref if row_num is outside the range</xqdoc:error>']},{isDocumented:!0,arity:3,name:"lookup",qname:"excel:lookup",signature:"($lookup_value as xs:anyAtomicType, $lookup_vector as xs:anyAtomicType+, $result_vector as xs:anyAtomicType+) as xs:anyAtomicType",description:' The Vector form. <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Looks in a sequence for a value\n   and return a value from the same position in a second sequence.\n If the value is not found, then it matches the largest value in lookup_vector\n   that is less than or equal to lookup_value.\n',summary:"<p> The Vector form.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"lookup_value",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the value to be searched</div>'},{name:"lookup_vector",type:"xs:anyAtomicType",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence to be searched, in ascending order.</div>'},{name:"result_vector",type:"xs:anyAtomicType",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence containing the result values</div>'}],returns:{type:"xs:anyAtomicType",description:"a value from $result_vector"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:NA if lookup value is smaller than the first value in lookup_vector</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:NA if position found is outside the result range</xqdoc:error>']},{isDocumented:!0,arity:4,name:"lookup",qname:"excel:lookup",signature:"($lookup_value as xs:anyAtomicType, $array as xs:anyAtomicType+, $array_width as xs:integer, $array_height as xs:integer) as xs:anyAtomicType",description:' The Array form.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n It looks in the first row or column of an array for the specified value\n   and returns a value from the same position in the last row or column of the array.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n If array covers an area that is wider than it is tall (more columns than rows),\n   LOOKUP searches for lookup_value in the first row.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n If array is square or is taller than it is wide (more rows than columns),\n   LOOKUP searches in the first column.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The values in the first row or first column must be in ascending order.\n',summary:"<p> The Array form.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"lookup_value",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the value to be searched. If the value is not found, then it matches the largest value in lookup_vector that is less than or equal to lookup_value.</div>'},{name:"array",type:"xs:anyAtomicType",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the array sequence, row after row</div>'},{name:"array_width",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number of values in a row</div>'},{name:"array_height",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number of rows in the array</div>'}],returns:{type:"xs:anyAtomicType",description:"The corresponding value in the last row or column"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if array contains less values than specified by array_width and array_height or array_width = 0 or array_height = 0</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:NA if the lookup_value is smaller than the first value in the row or column</xqdoc:error>']},{isDocumented:!0,arity:2,name:"match",qname:"excel:match",signature:"($lookup_value as xs:anyAtomicType, $sequence as xs:anyAtomicType+) as xs:anyAtomicType",description:" Same as above, but match_type is defaulted to 1.\n It finds the largest value that is less than or equal to lookup_value.\n",summary:"<p> Same as above, but match_type is defaulted to 1.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"lookup_value",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> value to be searched.</div>'},{name:"sequence",type:"xs:anyAtomicType",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the vector where to search the value</div>'}],returns:{type:"xs:anyAtomicType",description:"The position of found value"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:NA for match_type 1 or -1, the lookup_value is smaller or larger than the first value in sequence</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if range_lookup=0 and the value cannot be found</xqdoc:error>']},{isDocumented:!0,arity:3,name:"match",qname:"excel:match",signature:"($lookup_value as xs:anyAtomicType, $sequence as xs:anyAtomicType+, $match_type as xs:integer) as xs:anyAtomicType",description:" Returns the relative position of an item in a sequence that\n   matches a specified value in a specified order.\n Only for one dimensional vector.\n",summary:"<p> Returns the relative position of an item in a sequence that\n   matches a specified value in a specified order.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"lookup_value",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> value to be searched.</div>'},{name:"sequence",type:"xs:anyAtomicType",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the vector where to search the value</div>'},{name:"match_type",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> <dl>specifies the algorithm used for searching. Possible values: <dt>1</dt> <dd> finds the largest value that is less than or equal to lookup_value. Sequence must be in ascending order.</dd> <dt>0</dt> <dd> finds the first value that is exactly equal to lookup_value. <p/> Sequence can be in any order.<p/> If lookup_value is boolean, then only booleans are compared.<p/> For other types, they are casted to string and then compared using xquery regular expressions. Lookup_value can be a xquery regular expression.</dd> <dt>-1</dt> <dd> finds the smallest value that is greater than or equal to lookup_value.<p/> Sequence must be in descending order.</dd></dl></div>'}],returns:{type:"xs:anyAtomicType",description:"The position of found value"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:NA for match_type 1 or -1, the lookup_value is smaller or larger than the first value in sequence</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if range_lookup=0 and the value cannot be found</xqdoc:error>']},{isDocumented:!0,arity:5,name:"offset",qname:"excel:offset",signature:"($reference as xs:anyAtomicType+, $reference_height as xs:integer, $reference_width as xs:integer, $rows as xs:integer, $cols as xs:integer) as xs:anyAtomicType*",description:" Same as above, only that the sub-array is specified only by rows and cols relative position.\n The sub-array height and width is computed to contain the remaining elements of the array.\n",summary:"<p> Same as above, only that the sub-array is specified only by rows and cols relative position.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"reference",type:"xs:anyAtomicType",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the reference array</div>'},{name:"reference_height",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number of rows in the reference array</div>'},{name:"reference_width",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number of elements in the reference array row</div>'},{name:"rows",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the relative row position where the sub-array starts. It must be a positive value, zero relative.</div>'},{name:"cols",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the relative column position where the sub-array starts. It must be a positive value, zero relative.</div>'}],returns:{type:"xs:anyAtomicType*",description:"The sequence specifying the sub-array, row after row"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:NA rows or cols are negative</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:NA height or width are smaller than 1</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value reference array contains less elements than specified by reference_height and reference_width</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:NA the resulted sub-array is not completely contained inside reference array</xqdoc:error>']},{isDocumented:!0,arity:7,name:"offset",qname:"excel:offset",signature:"($reference as xs:anyAtomicType+, $reference_height as xs:integer, $reference_width as xs:integer, $rows as xs:integer, $cols as xs:integer, $height as xs:integer, $width as xs:integer) as xs:anyAtomicType*",description:" Returns a sub-array from an array.\n The inner array must be within the reference array\n",summary:"<p> Returns a sub-array from an array.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"reference",type:"xs:anyAtomicType",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the reference array</div>'},{name:"reference_height",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number of rows in the reference array</div>'},{name:"reference_width",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number of elements in the reference array row</div>'},{name:"rows",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the relative row position where the sub-array starts. It must be a positive value, zero relative.</div>'},{name:"cols",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the relative column position where the sub-array starts. It must be a positive value, zero relative.</div>'},{name:"height",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the desired height of sub-array. The sub-array must be inside the reference array.</div>'},{name:"width",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the desired width of sub-array. The sub-array must be inside the reference array.</div>'}],returns:{type:"xs:anyAtomicType*",description:"The sequence specifying the sub-array, row after row"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:NA rows or cols are negative</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:NA height or width are smaller than 1</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value reference array contains less elements than specified by reference_height and reference_width</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:NA the resulted sub-array is not completely contained inside reference array</xqdoc:error>']},{isDocumented:!0,arity:3,name:"transpose",qname:"excel:transpose",signature:"($array as xs:anyAtomicType+, $array_width as xs:integer, $array_height as xs:integer) as xs:anyAtomicType+",description:" Transposes an array. The rows become columns and vice versa.\n",summary:"<p> Transposes an array.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"array",type:"xs:anyAtomicType",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence specifying the array, row after row</div>'},{name:"array_width",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number of elements in a row</div>'},{name:"array_height",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number of rows in the array</div>'}],returns:{type:"xs:anyAtomicType+",description:"The transposed array. It will be a sequence specifying an array, row after row. The result width is the input height. The result height is the input width."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value the array contains less elements than specified by array_width and array_height</xqdoc:error>']},{isDocumented:!0,arity:5,name:"vlookup",qname:"excel:vlookup",signature:"($lookup_value as xs:anyAtomicType, $table_array as xs:anyAtomicType+, $table_width as xs:integer, $table_height as xs:integer, $col_index_num as xs:integer) as xs:anyAtomicType",description:" Same as above, with range_lookup defaulted to true.\n It finds the largest value that is less than or equal to lookup_value.\n First column must be in ascending order.\n",summary:"<p> Same as above, with range_lookup defaulted to true.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"lookup_value",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the value to be searched. Allowed types are numeric, string, boolean. <p/> Boolean values are compared only with booleans. Numbers are compared only with numbers, if range_lookup is not zero. The other types are converted to string and compared to string value of all values.</div>'},{name:"table_array",type:"xs:anyAtomicType",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of values, row after row</div>'},{name:"table_width",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number of values in a row</div>'},{name:"table_height",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number of rows</div>'},{name:"col_index_num",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the row index, 1 based</div>'}],returns:{type:"xs:anyAtomicType",description:"The value found, with original type"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the array contains less elements than specified by table_height and table_width</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if col_index_num is outside the range 1 .. table_height</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if range_lookup is true and the value searched is smaller than the first value in the first column</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if range_lookup=false and the value cannot be found</xqdoc:error>']},{isDocumented:!0,arity:6,name:"vlookup",qname:"excel:vlookup",signature:"($lookup_value as xs:anyAtomicType, $table_array as xs:anyAtomicType+, $table_width as xs:integer, $table_height as xs:integer, $col_index_num as xs:integer, $range_lookup as xs:boolean) as xs:anyAtomicType",description:' Searches for a value in the first column of a table array\n   and returns a value in the same row from another column in the table array.\n <dl xmlns:xqdoc="http://www.xqdoc.org/1.0">Array is specified with 3 parameters:\n <dt>table_array</dt> <dd>is a sequence of elements, first row first, then second row and so on</dd>\n <dt>table_width</dt> <dd>specifies the number of elements in a row</dd>\n <dt>table_height</dt> <dd>specifies the number of rows</dd></dl>\n For wildchar matching, the XQuery regex matcher is used.\n',summary:"<p> Searches for a value in the first column of a table array\n   and returns a value in the same row from another column in the table array.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"lookup_value",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the value to be searched. Allowed types are numeric, string, boolean. <p/> Boolean values are compared only with booleans. Numbers are compared only with numbers, if range_lookup is not zero. The other types are converted to string and compared to string value of all values.</div>'},{name:"table_array",type:"xs:anyAtomicType",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of values, row after row</div>'},{name:"table_width",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number of values in a row</div>'},{name:"table_height",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number of rows</div>'},{name:"col_index_num",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the row index, 1 based</div>'},{name:"range_lookup",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> <dl>specified the algorithm to use: <dt>true</dt> <dd> find approximative match. First column of array must be sorted in ascending order.</dd> <dt>false</dt> <dd> find exact match, using xquery regex. First column of array can be in any order.</dd></dl></div>'}],returns:{type:"xs:anyAtomicType",description:"The value found, with original type"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the array contains less elements than specified by table_height and table_width</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if col_index_num is outside the range 1 .. table_height</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if range_lookup is true and the value searched is smaller than the first value in the first column</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if range_lookup=false and the value cannot be found</xqdoc:error>']}],variables:[]},"http://zorba.io/modules/datetime":{ns:"http://zorba.io/modules/datetime",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This module provides functions to retrieve the current dateTime and to\n parse dates and times.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">In contrast to the current-dateTime functions specified in\n <a href="http://www.w3.org/TR/xpath-functions-30/">XQuery Functions and\n Operators</a>, the functions in this module are nondeterministic, that is,\n they do not return the current dateTime from the dynamic context, but return\n the actual value.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Dates and times are parsed according to the format given by\n <a href="http://pubs.opengroup.org/onlinepubs/007904975/functions/strptime.html">strptime</a>.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">However, date and time values must be "complete."</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For a date, the year and either month and day or day of the year must have\n been parsed.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For a time, the hour must have been parsed.\n (If either the minute, second, or timezone has not been parsed, they default\n to 0.)</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For a dateTime, the parsing requirements of both date and time must be met.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">When a locale is given,\n it must be of the form {lang}[{sep}{country}[{encoding}]] where\n {lang} is an ISO 639-1 2-letter or 639-2 3-letter language code,\n {sep} is either \'-\' or \'_\',\n {country} is an ISO 3166-1 2-letter country code,\n and {encoding} is any string that begins with a \'.\'.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The {sep}, {country}, and {encoding} are optional;\n {encoding} is always ignored.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Examples include: de, en-US, fr_CA, ru_RU.UTF-8.</p>\n',sees:['<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://www.w3.org/TR/xpath-functions/#context</xqdoc:see>'],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Matthias Brantner</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Paul J. Lucas</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://zorba.io/modules/datetime",prefix:"datetime"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:0,name:"current-date",qname:"datetime:current-date",signature:"() as xs:date external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Gets the current date value in Universal time.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Note that this function is not stable: it returns the value of the date when\n the function is invoked.</p>\n',summary:"<p>  Gets the current date value in Universal time.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[],returns:{type:"xs:date",description:"the non-stable date value"},errors:[]},{isDocumented:!0,arity:0,name:"current-dateTime",qname:"datetime:current-dateTime",signature:"() as xs:dateTimeStamp external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Gets the current dateTime value in Universal time.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Note that this function is not stable: it returns the value of the date and\n time when the function is invoked.</p>\n',summary:"<p>  Gets the current dateTime value in Universal time.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[],returns:{type:"xs:dateTimeStamp",description:"the non-stable datetime value"},errors:[]},{isDocumented:!0,arity:0,name:"current-time",qname:"datetime:current-time",signature:"() as xs:time external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Return the current time value in Universal time.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Note that this function is not stable: it returns the value of the time when\n the function is invoked.</p>\n',summary:"<p>  Return the current time value in Universal time.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[],returns:{type:"xs:time",description:"the non-stable time value"},errors:[]},{isDocumented:!0,arity:1,name:"millis-to-dateTime",qname:"datetime:millis-to-dateTime",signature:"($millis as xs:long) as xs:dateTime external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Converts the given number of milliseconds since epoch into its corresponding\n xs:dateTime.</p>\n',summary:"<p>  Converts the given number of milliseconds since epoch into its corresponding\n xs:dateTime.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"millis",type:"xs:long",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The number of milliseconds since epoch.</div>'}],returns:{type:"xs:dateTime",description:"Returns an xs:dateTime."},errors:[]},{isDocumented:!0,arity:2,name:"parse-date",qname:"datetime:parse-date",signature:"($input as xs:string, $format as xs:string) as xs:date external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Parses a date from a string in the current locale.</p>\n',summary:"<p>  Parses a date from a string in the current locale.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"input",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The string to parse.</div>'},{name:"format",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The format string containing zero or more conversion specifications and ordinary characters. All ordinary characters are matched exactly with the buffer; all whitespace characters match any amount of whitespace in the buffer.</div>'}],returns:{type:"xs:date",description:"Returns an xs:date."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">datetime:INVALID_SPECIFICATION if $format contains an invalid conversion specification.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">datetime:INSUFFICIENT_BUFFER if $input is insufficient for $format.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">datetime:INVALID_VALUE if $input contains an invalid value for a conversion specification.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">datetime:LITERAL_MISMATCH if there is a literal characer mismatch between $input and $format.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">datetime:INCOMPLETE_DATE_OR_TIME if the date is incomplete.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"parse-date",qname:"datetime:parse-date",signature:"($input as xs:string, $format as xs:string, $locale as xs:string) as xs:date external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Parses a date from a string in the given locale.</p>\n',summary:"<p>  Parses a date from a string in the given locale.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"input",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The string to parse.</div>'},{name:"format",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The format string containing zero or more conversion specifications and ordinary characters. All ordinary characters are matched exactly with the buffer; all whitespace characters match any amount of whitespace in the buffer.</div>'},{name:"locale",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The locale to use.</div>'}],returns:{type:"xs:date",description:"Returns an xs:date."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">datetime:INVALID_SPECIFICATION if $format contains an invalid conversion specification.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">datetime:INSUFFICIENT_BUFFER if $input is insufficient for $format.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">datetime:INVALID_VALUE if $input contains an invalid value for a conversion specification.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">datetime:LITERAL_MISMATCH if there is a literal characer mismatch between $input and $format.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">datetime:INCOMPLETE_DATE_OR_TIME if the date is incomplete.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">datetime:INVALID_LOCALE if $locale is in an invalid format.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">datetime:UNKNOWN_LOCALE if $locale is unknown.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">datetime:UNSUPPORTED_LOCALE if $locale is unsupported by the operating system.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"parse-dateTime",qname:"datetime:parse-dateTime",signature:"($input as xs:string, $format as xs:string) as xs:dateTime external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Parses a dateTime from a string in the current locale.</p>\n',summary:"<p>  Parses a dateTime from a string in the current locale.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"input",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The string to parse.</div>'},{name:"format",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The format string containing zero or more conversion specifications and ordinary characters. All ordinary characters are matched exactly with the buffer; all whitespace characters match any amount of whitespace in the buffer.</div>'}],returns:{type:"xs:dateTime",description:"Returns an xs:dateTime."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">datetime:INVALID_SPECIFICATION if $format contains an invalid conversion specification.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">datetime:INSUFFICIENT_BUFFER if $input is insufficient for $format.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">datetime:INVALID_VALUE if $input contains an invalid value for a conversion specification.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">datetime:LITERAL_MISMATCH if there is a literal characer mismatch between $input and $format.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">datetime:INCOMPLETE_DATE_OR_TIME if either the date or time is incomplete.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"parse-dateTime",qname:"datetime:parse-dateTime",signature:"($input as xs:string, $format as xs:string, $locale as xs:string) as xs:dateTime external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Parses a dateTime from a string in the given locale.</p>\n',summary:"<p>  Parses a dateTime from a string in the given locale.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"input",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The string to parse.</div>'},{name:"format",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The format string containing zero or more conversion specifications and ordinary characters. All ordinary characters are matched exactly with the buffer; all whitespace characters match any amount of whitespace in the buffer.</div>'},{name:"locale",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The locale to use.</div>'}],returns:{type:"xs:dateTime",description:"Returns an xs:dateTime."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">datetime:INVALID_SPECIFICATION if $format contains an invalid conversion specification.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">datetime:INSUFFICIENT_BUFFER if $input is insufficient for $format.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">datetime:INVALID_VALUE if $input contains an invalid value for a conversion specification.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">datetime:LITERAL_MISMATCH if there is a literal characer mismatch between $input and $format.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">datetime:INCOMPLETE_DATE_OR_TIME if either the date or time is incomplete.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">datetime:INVALID_LOCALE if $locale is in an invalid format.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">datetime:UNKNOWN_LOCALE if $locale is unknown.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">datetime:UNSUPPORTED_LOCALE if $locale is unsupported by the operating system.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"parse-time",qname:"datetime:parse-time",signature:"($input as xs:string, $format as xs:string) as xs:time external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Parses a time from a string in the current locale.</p>\n',summary:"<p>  Parses a time from a string in the current locale.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"input",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The string to parse.</div>'},{name:"format",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The format string containing zero or more conversion specifications and ordinary characters. All ordinary characters are matched exactly with the buffer; all whitespace characters match any amount of whitespace in the buffer.</div>'}],returns:{type:"xs:time",description:"Returns an xs:time."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">datetime:INVALID_SPECIFICATION if $format contains an invalid conversion specification.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">datetime:INSUFFICIENT_BUFFER if $input is insufficient for $format.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">datetime:INVALID_VALUE if $input contains an invalid value for a conversion specification.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">datetime:LITERAL_MISMATCH if there is a literal characer mismatch between $input and $format.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">datetime:INCOMPLETE_DATE_OR_TIME if the hour has not been parsed.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"parse-time",qname:"datetime:parse-time",signature:"($input as xs:string, $format as xs:string, $locale as xs:string) as xs:time external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Parses a time from a string in the given locale.</p>\n',summary:"<p>  Parses a time from a string in the given locale.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"input",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The string to parse.</div>'},{name:"format",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The format string containing zero or more conversion specifications and ordinary characters. All ordinary characters are matched exactly with the buffer; all whitespace characters match any amount of whitespace in the buffer.</div>'},{name:"locale",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The locale to use.</div>'}],returns:{type:"xs:time",description:"Returns an xs:time."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">datetime:INVALID_SPECIFICATION if $format contains an invalid conversion specification.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">datetime:INSUFFICIENT_BUFFER if $input is insufficient for $format.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">datetime:INVALID_VALUE if $input contains an invalid value for a conversion specification.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">datetime:LITERAL_MISMATCH if there is a literal characer mismatch between $input and $format.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">datetime:INCOMPLETE_DATE_OR_TIME if the hour has not been parsed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">datetime:INVALID_LOCALE if $locale is in an invalid format.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">datetime:UNKNOWN_LOCALE if $locale is unknown.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">datetime:UNSUPPORTED_LOCALE if $locale is unsupported by the operating system.</xqdoc:error>']},{isDocumented:!0,arity:0,name:"timestamp",qname:"datetime:timestamp",signature:"() as xs:long external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Gets the the number of milliseconds since epoch.</p>\n',summary:"<p>  Gets the the number of milliseconds since epoch.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[],returns:{type:"xs:long",description:"the said number of milliseconds."},errors:[]},{isDocumented:!0,arity:0,name:"utc-offset",qname:"datetime:utc-offset",signature:"() as xs:long external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Gets the offset of the current timezone from Universal time.</p>\n',summary:"<p>  Gets the offset of the current timezone from Universal time.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[],returns:{type:"xs:long",description:"the offset in seconds with positive values being east of the prime meridian."},errors:[]}],variables:[]},"http://www.28msec.com/modules/http/util/diagnostic":{ns:"http://www.28msec.com/modules/http/util/diagnostic",description:" This module provides utility functions to help with diagnostic analysis\n / debugging of RESTful Apps or webapps.\n",sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">28msec</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/modules/base64",prefix:"base64"},{uri:"http://www.28msec.com/modules/http/util/diagnostic",prefix:"diagnostic"},{uri:"http://www.w3.org/2005/xqt-errors",prefix:"err"},{uri:"http://www.28msec.com/modules/http/util/multipart",prefix:"multipart"},{uri:"http://www.28msec.com/modules/http/request",prefix:"request"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:0,name:"serialize-request-as-html",qname:"diagnostic:serialize-request-as-html",signature:"() as element(*)*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns a sequence of html elements listing all request\n characteristics.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is helpful for debugging purposes. It can be used\n to output request information within an HTML page.</p>\n',summary:"<p>  Returns a sequence of html elements listing all request\n characteristics.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"element(*)*",description:"HTML elements describing the request"},errors:[]},{isDocumented:!0,arity:0,name:"serialize-request-as-txt",qname:"diagnostic:serialize-request-as-txt",signature:"() as xs:string*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns a sequence of xs:string listing all request\n characteristics.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is helpful for debugging purposes. It can be used\n to output request information as plan text.</p>\n',summary:"<p>  Returns a sequence of xs:string listing all request\n characteristics.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:string*",description:"sequence of strings describing each characteristic of a request"},errors:[]}],variables:[]},"http://www.28msec.com/modules/credentials":{ns:"http://www.28msec.com/modules/credentials",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This module provides functionality for storing credentials\n using an AES-encrypted file the project configuration folder.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Specifically, the credentials will be stored in the <tt>credentials</tt>\n file in the <tt>config</tt> folder in the project root folder.\n The credentials file is encrypted using 256bit AES encryption. The AES\n key is computed using the project seed. If the project seed is changed the\n credential store is re-encrypted transparently.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Each credential has an associated name and category.\n Credentials can be retrieved specifying their name and category.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For each category, it is possible to specify the default credentials.\n A category default credentials can then be easily retrieved. </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The name of credentials and categories can contain lowercase or\n uppercase letters, digits, and the following special characters: "_" , "-",\n ".". Additionally it must not be empty and must start with a lowercase\n or uppercase letter.</p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Federico Cavalieri</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://www.28msec.com/modules/credentials",prefix:"credentials"},{uri:"http://www.w3.org/2005/xqt-errors",prefix:"err"},{uri:"http://jsoniq.org/errors",prefix:"jerr"},{uri:"http://www.28msec.com/modules/mongodb",prefix:"mongo"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:3,name:"add-credentials",qname:"credentials:add-credentials",signature:"($category as string, $name as string, $credentials as object()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Adds the given credentials to the credential store.\n The credentials are not set as default.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If credentials  with the given name and category are already present an\n error is raised.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n import module namespace credentials = "http://www.28msec.com/modules/credentials";\n credentials:add-credentials("S3", "DataBucket", { ... });\n </pre>\n </p>\n',summary:"<p>  Adds the given credentials to the credential store.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"category",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The credentials category name.</div>'},{name:"name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The credentials name.</div>'},{name:"credentials",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object containing the credentials data.</div>'}],returns:{type:"object()",description:"the credential object"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">credentials:EXIST if credentials with the given name and category are already present.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">credentials:NAME if the credentials or category name is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">credentials:MONGO-DEFAULT if the specified credentials and category name correspond with the default MongoDB credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">credentials:TEST if a connection cannot be established using the specified credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">credentials:CREDENTIALS-STORE if an internal error arises accessing the crendentials store</xqdoc:error>']},{isDocumented:!0,arity:4,name:"add-credentials",qname:"credentials:add-credentials",signature:"($category as string, $name as string, $credentials as object(), $default as boolean) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Adds the given credentials to the credential store,\n either as default or not.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If credentials  with the given name and category are already present an\n error is raised.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n import module namespace credentials = "http://www.28msec.com/modules/credentials";\n credentials:add-credentials("S3", "DataBucket", { ... }, true);\n </pre>\n </p>\n',summary:"<p>  Adds the given credentials to the credential store,\n either as default or not.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"category",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The credentials category name.</div>'},{name:"name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The credentials name.</div>'},{name:"credentials",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object containing the credentials data.</div>'},{name:"default",type:"boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Whether the credentials will be default or not.</div>'}],returns:{type:"object()",description:"the credential object"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">credentials:EXIST if credentials with the given name and category are already present.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">credentials:NAME if the credentials or category name is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">credentials:MONGO-DEFAULT if trying to add the default MongoDB credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">credentials:TEST if a connection cannot be established using the specified credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">credentials:CREDENTIALS-STORE if an internal error arises accessing the crendentials store</xqdoc:error>']},{isDocumented:!0,arity:1,name:"credentials",qname:"credentials:credentials",signature:"($category as string) as object()?",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the given category\'s default credentials, if any.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If no default credentials are present for the given category\n the empty sequence is returned.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n import module namespace credentials = "http://www.28msec.com/modules/credentials";\n credentials:credentials("S3")\n </pre>\n </p>\n',summary:"<p>  Returns the given category's default credentials, if any.</p>",annotation_str:" %an:strictlydeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"strictlydeterministic",value:""}],updating:!1,parameters:[{name:"category",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The category name.</div>'}],returns:{type:"object()?",description:"The specified category default credentials, if any."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">credentials:NAME if the credentials or category name is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">credentials:MONGO-DEFAULT if the specified category is MongoDB</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">credentials:CREDENTIALS-STORE if an internal error arises accessing the crendentials store</xqdoc:error>']},{isDocumented:!0,arity:2,name:"credentials",qname:"credentials:credentials",signature:"($category as string, $name as string) as object()?",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the specified credentials, if present in the credential store.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If the specified credentials are not present the empty sequence is returned.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n import module namespace credentials = "http://www.28msec.com/modules/credentials";\n credentials:credentials("S3", "DataBucket")\n </pre>\n </p>\n',summary:"<p>  Returns the specified credentials, if present in the credential store.</p>",annotation_str:" %an:strictlydeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"strictlydeterministic",value:""}],updating:!1,parameters:[{name:"category",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The credentials category name.</div>'},{name:"name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The credentials name.</div>'}],returns:{type:"object()?",description:"The specified credentials, if present."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">credentials:NAME if the credentials or category name is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">credentials:MONGO-DEFAULT if the credentials or category name is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">credentials:CREDENTIALS-STORE if an internal error arises accessing the crendentials store</xqdoc:error>']},{isDocumented:!0,arity:0,name:"list-categories",qname:"credentials:list-categories",signature:"() as array()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Lists all the credentials categories in the credentials store.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If no credentials are stored the empty sequence is returned.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n import module namespace credentials = "http://www.28msec.com/modules/credentials";\n credentials:list-categories()\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The returned array contains the name of each distinct credential category.</p>\n',summary:"<p>  Lists all the credentials categories in the credentials store.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"array()",description:"An array of all the distinct credentials categories in the credentials store."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">credentials:CREDENTIALS-STORE if an internal error arises accessing the crendentials store</xqdoc:error>']},{isDocumented:!0,arity:1,name:"list-category-credentials",qname:"credentials:list-category-credentials",signature:"($category-name as string) as array()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Lists all the credentials of the specified category in the\n credentials store.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If no credentials for the given category are stored the empty\n sequence is returned.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n import module namespace credentials = "http://www.28msec.com/modules/credentials";\n credentials:list-category-credentials("category-name")\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The returned array contains one object for each credential. Each object has\n the following structure:\n <pre>\n {\n   "category": "category-name",\n   "name": "credential-name",\n   "default": true\n }\n </pre>\n Specifically the fields of each object have the following meaning:\n <ul>\n  <li>category: the name of the credentials category (string)</li>\n  <li>name: the name of the credentials (string)</li>\n  <li>default: whether the credentials are the default credentials in\n      their category (boolean)</li>\n </ul>\n </p>\n',summary:"<p>  Lists all the credentials of the specified category in the\n credentials store.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"category-name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The credentials category name.</div>'}],returns:{type:"array()",description:"An array of all the credentials of the specified category in the credentials store."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">credentials:NAME if the credentials or category name is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">credentials:CREDENTIALS-STORE if an internal error arises accessing the crendentials store</xqdoc:error>']},{isDocumented:!0,arity:0,name:"list-credentials",qname:"credentials:list-credentials",signature:"() as array()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Lists all the credentials in the credentials store.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If no credentials are stored the empty sequence is returned.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n import module namespace credentials = "http://www.28msec.com/modules/credentials";\n credentials:list-credentials()\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The returned array contains one object for each credential. Each object has\n the following structure:\n <pre>\n {\n   "category": "category-name",\n   "name": "credential-name",\n   "default": true\n }\n </pre>\n Specifically the fields of each object have the following meaning:\n <ul>\n  <li>category: the name of the credentials category (string)</li>\n  <li>name: the name of the credentials (string)</li>\n  <li>default: whether the credentials are the default credentials in\n      their category (boolean)</li>\n </ul>\n </p>\n',summary:"<p>  Lists all the credentials in the credentials store.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"array()",description:"An array of all credentials in the credentials store."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">credentials:CREDENTIALS-STORE if an internal error arises accessing the crendentials store</xqdoc:error>']},{isDocumented:!0,arity:2,name:"make-default",qname:"credentials:make-default",signature:"($category as string, $name as string) as empty-sequence()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Makes the specified credentials the default for their category.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">It is not allowed to call this method on credentials in the "MongoDB" category.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If the specified credentials are not present an error is raised.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n import module namespace credentials = "http://www.28msec.com/modules/credentials";\n credentials:make-default("S3", "DataBucket");\n </pre>\n </p>\n',summary:"<p>  Makes the specified credentials the default for their category.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"category",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The credentials category name.</div>'},{name:"name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The credentials name.</div>'}],returns:{type:"empty-sequence()",description:"The empty sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">credentials:NOT-EXIST if no credentials with the given name and category are present.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">credentials:NAME if the credentials or category name is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">credentials:MONGO-DEFAULT if the specified category is MongoDB</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">credentials:CREDENTIALS-STORE if an internal error arises accessing the crendentials store</xqdoc:error>']},{isDocumented:!0,arity:2,name:"remove-credentials",qname:"credentials:remove-credentials",signature:"($category as string, $name as string) as empty-sequence()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Removes the specified credentials from the credential store.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If no credentials with the given name and category are present\n in the category store an error is raised.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n import module namespace credentials = "http://www.28msec.com/modules/credentials";\n credentials:remove-credentials("S3", "DataBucket");\n </pre>\n </p>\n',summary:"<p>  Removes the specified credentials from the credential store.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"category",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The credentials category name.</div>'},{name:"name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The credentials name.</div>'}],returns:{type:"empty-sequence()",description:"The empty sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">credentials:NOT-EXIST if no credentials with the given name and category exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">credentials:NAME if the credentials or category name is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">credentials:MONGO-DEFAULT if the specified credentials and category name correspond with the default MongoDB credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">credentials:CREDENTIALS-STORE if an internal error arises accessing the crendentials store</xqdoc:error>']},{isDocumented:!0,arity:5,name:"update-credentials",qname:"credentials:update-credentials",signature:"($category as string, $name as string, $new-default as boolean?, $new-name as string?, $new-credentials as object()?) as empty-sequence()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Updates the specified credentials in the credential store.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">It is possible to specify whether the credentials should become or stop being the\n default credentials in their category, rename the credentials or change the credentials\n object. These three changes are specified by means of the $new-default, $new-name and\n $new-credentials parameter. If the corresponding parameter is the empty sequence the\n corresponding property will not be changed.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example the following query renames the "DataBucket" credentials in the "S3"\n category as "Bucket":\n <pre>\n import module namespace credentials = "http://www.28msec.com/modules/credentials";\n credentials:update-credentials("S3", "DataBucket", (), "Bucket", () );\n </pre>\n </p>\n',summary:"<p>  Updates the specified credentials in the credential store.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"category",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The credentials category name.</div>'},{name:"name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The credentials name.</div>'},{name:"new-default",type:"boolean",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Whether the credentials should become/stop being the default credentials in their category. If it is an empty sequence the current default property will not be changed.</div>'},{name:"new-name",type:"string",occurrence:"?",description:""},{name:"new-credentials",type:"object()",occurrence:"?",description:""}],returns:{type:"empty-sequence()",description:"the empty sequence"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">credentials:NOT-EXIST if credentials with the given name and category do not exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">credentials:EXIST if credentials with the given new name and category are already present.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">credentials:NAME if the credentials or category name is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">credentials:MONGO-DEFAULT if the specified credentials or category name correspond with the default MongoDB credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">credentials:TEST if a connection cannot be established using the specified credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">credentials:CREDENTIALS-STORE if an internal error arises accessing the crendentials store</xqdoc:error>']}],variables:[]},"http://www.28msec.com/modules/parallelism":{ns:"http://www.28msec.com/modules/parallelism",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This module provides functionality for executing FLWOR queries in parallel.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">There are two kinds of parallel jobs: map jobs and shuffle jobs.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">A map job runs a mapping function on the items of an input collection. The input\n collection is chunked and the mapping function is called on each chunk in parallel.\n The results are either inserted in a single collection, or on one ouptut collection\n for each chunk.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">A shuffle job shuffles the items of an input collection to several output collections.\n The input collection is chunked and each chunk is processed in parallel.\n The selection of the output collection for each item is done with a shuffling function.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">It is also possible to run a map or shuffle job on the output of another map or shuffle\n job (piping).\n Keep in mind though that if an intermediate output is in a\n single collection, no chunking can be done: only the first job of the pipeline can chunk\n its input.\n Hence, for performance, it makes sense that all intermediate jobs\n in the pipeline (except the last one, although not compulsory) output to automatically\n generated temporary collections rather than a single collection. That way, the next job\n can be executed on these collections in parallel.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Map jobs allow the parallel execution of "simple" FLWORs: a for on a big collection, let clauses,\n small for clauses, where clauses.\n Map-shuffle-map piping allows the parallel execution of FLWORs containing a group by clause.\n Jobs can be composed in many ways, for example map-map-shuffle-map-shuffle-map. This way,\n FLWORs with several group by clauses can be parallelized.\n In some circumstances, FLWORs with order by clauses (using bucket sort) can also be\n parallelized, but one should keep in mind that collections are not ordered so that\n any ordering within a map job is susceptible to be lost in the output.</p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Ghislain Fourny</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Julien Ribon</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"",prefix:"an"},{uri:"http://www.28msec.com/modules/asynchronous-jobs",prefix:"job"},{uri:"http://www.28msec.com/modules/parallelism",prefix:"parallel"},{uri:"http://zorba.io/modules/random",prefix:"rand"},{uri:"http://www.28msec.com/modules/store",prefix:"store"}],functions:[{isDocumented:!0,arity:1,name:"job-statuses",qname:"parallel:job-statuses",signature:"($id as xs:string) as object()?",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the statuses of the underlying asynchronous jobs, as an object\n indicating the number of chunks in each status.</p>\n',summary:"<p>  Returns the statuses of the underlying asynchronous jobs, as an object\n indicating the number of chunks in each status.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The id of the parallel job to query, as it was returned by map or shuffle.</div>'}],returns:{type:"object()?",description:"The statuses of the underlying jobs. The empty sequence if the parallel job does not exist."},errors:[]},{isDocumented:!0,arity:2,name:"map",qname:"parallel:map",signature:"($input as xs:string, $function as function (item()*) as item()*) as xs:string",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Schedules a parallel map job on a collection or on the output of another\n parallel job.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The name of the output collections are randomly generated (one for\n each chunk and start with <tt>_28.temporary</tt>.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example of usage:</p>\n parallel:map("input", my:function#1)\n',summary:"<p>  Schedules a parallel map job on a collection or on the output of another\n parallel job.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"input",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the collection to process, or the id of a parallel job of which the output will be taken.</div>'},{name:"function",type:"function (item()*) as item()*",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the function which is run in parallel on the collection\'s contents.</div>'}],returns:{type:"xs:string",description:"A parallel job id that can be used to query the parallel job's properties."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">job:JBDY0005 if the supplied function does not have a name.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">job:JBDY0006 if the supplied function is in the local namespace.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">job:JPDY0001 if the input is not an available collection or a parallel job id.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"map",qname:"parallel:map",signature:"($input as xs:string, $function as function (item()*) as item()*, $options as object()?) as xs:string",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Schedules a parallel map job on a collection or on the output of another\n parallel job.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The $options parameter allows for the specification of properties for\n the parallel job. Allowed options are:\n <ul>\n   <li><tt>output-collection as string</tt>: the name of the collection in\n     which the output of the executed query is stored. If not specified,\n     the result of the query will be stored in a collection withing the\n     MongoDB database associated with the project. The name of the\n     collection is randomly generated and starts with <tt>_28.temporary</tt>\n   </li>\n   <li><tt>chunk-size</tt>: the size of the chunks the collection must be split\n   into, if it is not already sharded (default: MongoDB sharding, or 1000).\n   </li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example of usage:</p>\n parallel:map("input", my:function#1, { "chunk-size" : xs:int(1000) })\n parallel:map("input",\n              my:function#1,\n              {\n                "chunk-size" : xs:int(1000),\n                "output-collection" : output"\n              }\n )\n',summary:"<p>  Schedules a parallel map job on a collection or on the output of another\n parallel job.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"input",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the collection to process, or the id of a parallel job of which the output will be taken.</div>'},{name:"function",type:"function (item()*) as item()*",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The function which is run in parallel on the collection\'s contents.</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object specifying above options for the parallel job.</div>'}],returns:{type:"xs:string",description:"A parallel job id that can be used to query the parallel job's properties."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XPTY0004 if the type of a supplied option is incorrect.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">job:JBDY0005 if the supplied function does not have a name.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">job:JBDY0006 if the supplied function is in the local namespace.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">job:JPDY0001 if the input is not an available collection or a parallel job id.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"output-collections",qname:"parallel:output-collections",signature:"($id as xs:string) as xs:string*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the output collections of the specified parallel job.</p>\n',summary:"<p>  Returns the output collections of the specified parallel job.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The id of the parallel job to query, as it was returned by map or shuffle.</div>'}],returns:{type:"xs:string*",description:"The names of the output collections to which the corresponding parallel job writes. The empty sequence if the job does not exist."},errors:[]},{isDocumented:!0,arity:1,name:"results",qname:"parallel:results",signature:"($id as xs:string) as item()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the results of the specified parallel job.</p>\n',summary:"<p>  Returns the results of the specified parallel job.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The id of the parallel job to query, as it was returned by map or shuffle.</div>'}],returns:{type:"item()*",description:"The structured items output by the corresponding parallel job. The empty sequence if the job does not exist."},errors:[]},{isDocumented:!0,arity:2,name:"shuffle",qname:"parallel:shuffle",signature:"($input as xs:string, $function as function (item()) as xs:integer) as xs:string",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Schedules a parallel shuffle job on a collection or on the output of another\n parallel job.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The output collection for each item is determined by calling the shuffle function,\n which gives an integer i. The i-th output collection\n is then taken. If necessary, a modulo operation is done\n to make sure that the integer is comprised between 1 and the number of output collections.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The name of the output collections are randomly generated (10 of them) and\n start with <tt>_28.temporary</tt>.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example of usage:</p>\n parallel:shuffle("input", my:function#1)\n',summary:"<p>  Schedules a parallel shuffle job on a collection or on the output of another\n parallel job.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"input",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the collection to process, or the id of a parallel job of which the output will be taken.</div>'},{name:"function",type:"function (item()) as xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the function which is run on each item to determine where it is shuffled to.</div>'}],returns:{type:"xs:string",description:"A parallel job id that can be used to query the parallel job's properties."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">job:JBDY0005 if the supplied function does not have a name.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">job:JBDY0006 if the supplied function is in the local namespace.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">job:JPDY0001 if the input is not an available collection or a parallel job id.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"shuffle",qname:"parallel:shuffle",signature:"($input as item(), $function as function (item()) as xs:integer, $options as object()?) as xs:string",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Schedules a parallel shuffle job on a collection or on the output of another\n parallel job.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The output collection for each item is determined by calling the shuffle function,\n which gives an integer i. The i-th output collection\n is then taken. If necessary, a modulo operation is done\n to make sure that the integer is comprised between 1 and the number of output collections.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The $options parameter allows for the specification of properties for\n the parallel shuffle job. Allowed options are:\n <ul>\n   <li><tt>number-of-output-collections as integer</tt>: the number of output collections\n     to automatically generate if none are provided. The default value is 10. An error is raised\n     if the provided value is not positive.\n   </li>\n   <li><tt>output-collections as array</tt>: an array with the names of the collections in\n     which the items of the input collections are shuffled. If not specified,\n     these collections will be automatically generated (as many as specified in the\n     <tt>number-of-output-collections</tt> option) in the\n     MongoDB database associated with the project. The name of the\n     collections are randomly generated and start with <tt>_28.temporary</tt>\n   </li>\n   <li><tt>chunk-size</tt>: the size of the chunks the collection must be split\n   into, if it is not already sharded (default: MongoDB sharding, or 1000).\n   </li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example of usage:</p>\n parallel:shuffle("input", my:function#1, { "chunk-size" : xs:int(1000) })\n parallel:shuffle("input",\n                  my:function#1,\n                  {\n                    "chunk-size" : xs:int(1000),\n                    "output-collections" : [ "output1", "output2" ]\n                  }\n )\n parallel:shuffle("input",\n                  my:function#1,\n                  {\n                    "number-of-output-collections" : 20\n                  }\n )\n',summary:"<p>  Schedules a parallel shuffle job on a collection or on the output of another\n parallel job.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"input",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the collection to process, or the id of a parallel job of which the output will be taken.</div>'},{name:"function",type:"function (item()) as xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the function which is run on each item to determine where it is shuffled to.</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object specifying above options for the parallel shuffle job.</div>'}],returns:{type:"xs:string",description:"A parallel job id that can be used to query the parallel job's properties."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XPTY0004 if the type of a supplied option is incorrect.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">job:JBDY0005 if the supplied function does not have a name.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">job:JBDY0006 if the supplied function is in the local namespace.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">job:JPDY0001 if the input is not an available collection or a parallel job id.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FOCA0002 if number-of-output-collections is not a positive integer.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"status",qname:"parallel:status",signature:"($id as xs:string) as xs:string?",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the general status of the parallel job.</p>\n',summary:"<p>  Returns the general status of the parallel job.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> id of the parallel job to query, as it was returned by map or shuffle.</div>'}],returns:{type:"xs:string?",description:"The status of the corresponding parallel job. The empty sequence if the job does not exist."},errors:[]}],variables:[]},"http://www.zorba-xquery.com/modules/image/graphviz":{ns:"http://www.zorba-xquery.com/modules/image/graphviz",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Module that provides functions for generating SVG graphs.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The module provides two function for generating graphs given in the :\n <ul><li>DOT language (see <a href="http://www.graphviz.org/">\n http://www.graphviz.org</a>)</li><li>or in the XML-based Graph eXchange\n Language (see <a href="http://www.gupro.de/GXL/">http://www.gupro.de/GXL/</a>),\n respectively.</li></ul>\n Both functions use the Graphviz Visualization Library in order to\n layout and render the graphs. As a result, both return a sequence\n of (document)-nodes (one for each input graph).\n These nodes are instances of the Scalable Vector Graphics (SVG) format.\n SVG is a language for describing two-dimensional graphics and\n graphical applications in XML. More information about SVG can\n be found at <a href="http://www.w3.org/Graphics/SVG/">http://www.w3.org/Graphics/SVG/</a>.\n As second parameters, both functions take a sequence of strings that\n are parameters for the graph generation and rendering algorithms.\n Currently, only the empty-sequence is allowed here.\n These parameters exist for future use.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Please note that this feature is only available on Unix-based\n platforms (i.e. not on Windows).</p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0"><a href="http://www.28msec.com/home/index">28msec</a></xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://www.zorba-xquery.com/modules/image/graphviz",prefix:"gr"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:2,name:"dot",qname:"gr:dot",signature:"($dot as xs:string*, $params as xs:string*) as node()* external",description:' Layout one ore more graphs given in the DOT language and render\n them as SVG. For example,\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"><code>\n dot("digraph mygraph { p -&gt; q }", ())\n </code></p>\n',summary:"<p> Layout one ore more graphs given in the DOT language and render\n them as SVG.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"dot",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A dot description of the graph to render.</div>'},{name:"params",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Parameters to configure the layout and rendering process. Currently, only the empty-sequence is allowed here.</div>'}],returns:{type:"node()*",description:"A graph for each item in the sequence given using the first parameter. The result sequence consists of items which are instance of the SVG data model."},errors:[]},{isDocumented:!0,arity:2,name:"gxl",qname:"gr:gxl",signature:"($gxl as node()*, $params as xs:string*) as node()* external",description:" Layout one ore more graphs given in the GXL language and render\n them as SVG.\n",summary:"<p> Layout one ore more graphs given in the GXL language and render\n them as SVG.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"gxl",type:"node()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A GXL description of the graph to render.</div>'},{name:"params",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Parameters to configure the layout and rendering process. Currently, only the empty-sequence is allowed here.</div>'}],returns:{type:"node()*",description:"A graph for each item in the sequence given using the first parameter. The result sequence consists of items which are instance of the SVG data model."},errors:[]}],variables:[]},"http://zorba.io/modules/data-cleaning/token-based-string-similarity":{ns:"http://zorba.io/modules/data-cleaning/token-based-string-similarity",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This library module provides token-based string similarity functions that view strings\n as sets or multi-sets of tokens and use set-related properties to compute similarity scores.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The tokens correspond to groups of characters extracted from the strings being compared, such as\n individual words or character n-grams.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">These functions are particularly useful for matching near duplicate strings in cases where\n typographical conventions often lead to rearrangement of words (e.g., "John Smith" versus "Smith, John").</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The logic contained in this module is not specific to any particular XQuery implementation,\n although the module requires the trigonometic functions of XQuery 3.0 or a math extension\n function such as sqrt($x as numeric) for computing the square root.</p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Bruno Martins</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://www.w3.org/2005/xpath-functions/math",prefix:"math"},{uri:"http://zorba.io/modules/data-cleaning/set-similarity",prefix:"set"},{uri:"http://zorba.io/modules/data-cleaning/token-based-string-similarity",prefix:"simt"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:3,name:"cosine-ngrams",qname:"simt:cosine-ngrams",signature:"($s1 as xs:string, $s2 as xs:string, $n as xs:integer) as xs:double",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the cosine similarity coefficient between sets of character n-grams extracted from two strings.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The n-grams from each string are weighted according to their occurence frequency (i.e., weighted according to\n the term-frequency heuristic from Information Retrieval).</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery"> cosine-ngrams("DWAYNE", "DUANE", 2 ) </pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery"> 0.2401922307076307 </pre></p>\n',summary:"<p>  Returns the cosine similarity coefficient between sets of character n-grams extracted from two strings.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s1",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The first string.</div>'},{name:"s2",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The second string.</div>'},{name:"n",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The number of characters to consider when extracting n-grams.</div>'}],returns:{type:"xs:double",description:"The cosine similarity coefficient between the sets n-grams extracted from the two strings."},errors:[]},{isDocumented:!0,arity:3,name:"cosine-tokens",qname:"simt:cosine-tokens",signature:"($s1 as xs:string, $s2 as xs:string, $r as xs:string) as xs:double",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the cosine similarity coefficient between sets of tokens extracted from two strings. The tokens\n from each string are weighted according to their occurence frequency (i.e., weighted according to the\n term-frequency heuristic from Information Retrieval).</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery"> cosine-tokens("The FLWOR Foundation", "FLWOR Found.", " +" ) </pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery"> 0.408248290463863 </pre></p>\n',summary:"<p>  Returns the cosine similarity coefficient between sets of tokens extracted from two strings.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s1",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The first string.</div>'},{name:"s2",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The second string.</div>'},{name:"r",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A regular expression forming the delimiter character(s) which mark the boundaries between adjacent tokens.</div>'}],returns:{type:"xs:double",description:"The cosine similarity coefficient between the sets tokens extracted from the two strings."},errors:[]},{isDocumented:!0,arity:2,name:"cosine",qname:"simt:cosine",signature:"($desc1 as xs:string*, $desc2 as xs:string*) as xs:double",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Auxiliary function for computing the cosine similarity coefficient between strings,\n using stringdescriptors based on sets of character n-grams or sets of tokens extracted from two strings.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery"> cosine( ("aa","bb") , ("bb","aa")) </pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery"> 1.0 </pre></p>\n',summary:"<p>  Auxiliary function for computing the cosine similarity coefficient between strings,\n using stringdescriptors based on sets of character n-grams or sets of tokens extracted from two strings.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"desc1",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The descriptor for the first string.</div>'},{name:"desc2",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The descriptor for the second string.</div>'}],returns:{type:"xs:double",description:"The cosine similarity coefficient between the descriptors for the two strings."},errors:[]},{isDocumented:!0,arity:3,name:"dice-ngrams",qname:"simt:dice-ngrams",signature:"($s1 as xs:string, $s2 as xs:string, $n as xs:integer) as xs:double",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the Dice similarity coefficient between sets of character n-grams extracted from two strings.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery"> dice-ngrams("DWAYNE", "DUANE", 2 ) </pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery"> 0.4615384615384616 </pre></p>\n',summary:"<p>  Returns the Dice similarity coefficient between sets of character n-grams extracted from two strings.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s1",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The first string.</div>'},{name:"s2",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The second string.</div>'},{name:"n",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The number of characters to consider when extracting n-grams.</div>'}],returns:{type:"xs:double",description:"The Dice similarity coefficient between the sets of character n-grams extracted from the two strings."},errors:[]},{isDocumented:!0,arity:3,name:"dice-tokens",qname:"simt:dice-tokens",signature:"($s1 as xs:string, $s2 as xs:string, $r as xs:string) as xs:double",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the Dice similarity coefficient between sets of tokens extracted from two strings.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery"> dice-tokens("The FLWOR Foundation", "FLWOR Found.", " +" ) </pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery"> 0.4 </pre></p>\n',summary:"<p>  Returns the Dice similarity coefficient between sets of tokens extracted from two strings.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s1",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The first string.</div>'},{name:"s2",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The second string.</div>'},{name:"r",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A regular expression forming the delimiter character(s) which mark the boundaries between adjacent tokens.</div>'}],returns:{type:"xs:double",description:"The Dice similarity coefficient between the sets tokens extracted from the two strings."},errors:[]},{isDocumented:!0,arity:3,name:"jaccard-ngrams",qname:"simt:jaccard-ngrams",signature:"($s1 as xs:string, $s2 as xs:string, $n as xs:integer) as xs:double",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the Jaccard similarity coefficient between sets of character n-grams extracted from two strings.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery"> jaccard-ngrams("DWAYNE", "DUANE", 2 ) </pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery"> 0.3 </pre></p>\n',summary:"<p>  Returns the Jaccard similarity coefficient between sets of character n-grams extracted from two strings.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s1",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The first string.</div>'},{name:"s2",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The second string.</div>'},{name:"n",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The number of characters to consider when extracting n-grams.</div>'}],returns:{type:"xs:double",description:"The Jaccard similarity coefficient between the sets of character n-grams extracted from the two strings."},errors:[]},{isDocumented:!0,arity:3,name:"jaccard-tokens",qname:"simt:jaccard-tokens",signature:"($s1 as xs:string, $s2 as xs:string, $r as xs:string) as xs:double",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the Jaccard similarity coefficient between sets of tokens extracted from two strings.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery"> jaccard-tokens("The FLWOR Foundation", "FLWOR Found.", " +" ) </pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery"> 0.25 </pre></p>\n',summary:"<p>  Returns the Jaccard similarity coefficient between sets of tokens extracted from two strings.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s1",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The first string.</div>'},{name:"s2",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The second string.</div>'},{name:"r",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A regular expression forming the delimiter character(s) which mark the boundaries between adjacent tokens.</div>'}],returns:{type:"xs:double",description:"The Jaccard similarity coefficient between the sets tokens extracted from the two strings."},errors:[]},{isDocumented:!0,arity:2,name:"ngrams",qname:"simt:ngrams",signature:"($s as xs:string, $n as xs:integer) as xs:string*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the individual character n-grams forming a string.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery"> ngrams("FLWOR", 2 ) </pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery"> ("_F" , "FL" , "LW" , "WO" , "LW" , "WO" , "OR" , "R_") </pre></p>\n',summary:"<p>  Returns the individual character n-grams forming a string.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The input string.</div>'},{name:"n",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The number of characters to consider when extracting n-grams.</div>'}],returns:{type:"xs:string*",description:"The sequence of strings with the extracted n-grams."},errors:[]},{isDocumented:!0,arity:3,name:"overlap-ngrams",qname:"simt:overlap-ngrams",signature:"($s1 as xs:string, $s2 as xs:string, $n as xs:integer) as xs:double",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the overlap similarity coefficient between sets of character n-grams extracted from two strings.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery"> overlap-ngrams("DWAYNE", "DUANE", 2 ) </pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery"> 0.5 </pre></p>\n',summary:"<p>  Returns the overlap similarity coefficient between sets of character n-grams extracted from two strings.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s1",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The first string.</div>'},{name:"s2",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The second string.</div>'},{name:"n",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The number of characters to consider when extracting n-grams.</div>'}],returns:{type:"xs:double",description:"The overlap similarity coefficient between the sets of character n-grams extracted from the two strings."},errors:[]},{isDocumented:!0,arity:3,name:"overlap-tokens",qname:"simt:overlap-tokens",signature:"($s1 as xs:string, $s2 as xs:string, $r as xs:string) as xs:double",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the overlap similarity coefficient between sets of tokens extracted from two strings.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery"> overlap-tokens("The FLWOR Foundation", "FLWOR Found.", " +" ) </pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery"> 0.5 </pre></p>\n',summary:"<p>  Returns the overlap similarity coefficient between sets of tokens extracted from two strings.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s1",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The first string.</div>'},{name:"s2",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The second string.</div>'},{name:"r",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A regular expression forming the delimiter character(s) which mark the boundaries between adjacent tokens.</div>'}],returns:{type:"xs:double",description:"The overlap similarity coefficient between the sets tokens extracted from the two strings."},errors:[]}],variables:[]},"http://www.zorba-xquery.com/modules/image/paint":{ns:"http://www.zorba-xquery.com/modules/image/paint",description:' This module provides a function to extend an image with additional shapes.\n Fully supported image formats are:\n <ul xmlns:xqdoc="http://www.xqdoc.org/1.0">\n   <li>GIF</li>\n   <li>JPEG</li>\n   <li>PNG</li>\n   <li>TIFF</li>\n   <li>BMP</li>\n </ul>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The errors raised by functions of this module have the namespace\n <tt>http://www.zorba-xquery.com/modules/image/error</tt> (associated with prefix ierr).</p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Daniel Thomas</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://www.w3.org/2005/xqt-errors",prefix:"err"},{uri:"http://www.zorba-xquery.com/modules/image/error",prefix:"ierr"},{uri:"http://www.zorba-xquery.com/modules/image/image",prefix:"img"},{uri:"http://www.zorba-xquery.com/modules/image/paint",prefix:"paint"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:2,name:"paint",qname:"paint:paint",signature:"($image as xs:base64Binary, $shapes as element(*)*) as xs:base64Binary",description:' Extends the passed image with a sequence of shapes.\n The shapes are passed as a sequence of elements.\n The possibilities for shape elements are:\n    <ul xmlns:xqdoc="http://www.xqdoc.org/1.0">\n      <li> line:\n        <pre class="brush: xml">\n          &lt;img:line&gt;\n            &lt;img:start&gt;&lt;img:x&gt;-20&lt;/img:x&gt;&lt;img:y&gt;-20&lt;/img:y&gt;&lt;/img:start&gt;\n            &lt;img:end&gt;&lt;img:x&gt;80&lt;/img:x&gt;&lt;img:y&gt;80&lt;/img:y&gt;&lt;/img:end&gt;\n          &lt;/img:line&gt;</pre>\n      </li>\n       <li> polyline:\n         <pre class="brush: xml">\n           &lt;img:polyLine&gt;\n             &lt;img:point&gt;&lt;img:x&gt;10&lt;/img:x&gt;&lt;img:y&gt;10&lt;/img:y&gt;&lt;/img:point&gt;\n             &lt;img:point&gt;&lt;img:x&gt;40&lt;/img:x&gt;&lt;img:y&gt;80&lt;/img:y&gt;&lt;/point&gt;\n             &lt;img:point&gt;&lt;img:x&gt;50&lt;/img:x&gt;&lt;img:y&gt;30&lt;/img:y&gt;&lt;/point&gt;\n             &lt;img:point&gt;&lt;img:x&gt;200&lt;/img:x&gt;&lt;img:y&gt;200&lt;/img:y&gt;&lt;/point&gt;\n           &lt;/img:polyLine&gt;\n         </pre>\n       </li>\n       <li> stroked polyline:\n         <pre class="brush: xml">\n           &lt;img:strokedPolyLine&gt;\n             &lt;img:point&gt;&lt;img:x&gt;10&lt;/img:x&gt;&lt;img:y&gt;10&lt;/img:y&gt;&lt;/img:point&gt;\n             &lt;img:point&gt;&lt;img:x&gt;40&lt;/img:x&gt;&lt;img:y&gt;80&lt;/img:y&gt;&lt;/img:point&gt;\n             &lt;img:point&gt;&lt;img:x&gt;50&lt;/img:x&gt;&lt;img:y&gt;30&lt;/img:y&gt;&lt;/img:point&gt;\n             &lt;img:strokeLength&gt;5&lt;/img:strokeLength&gt;&lt;img:gapLength&gt;2&lt;/img:gapLength&gt;\n           &lt;/img:strokedPolyLine&gt;\n         </pre>\n       </li>\n       <li> rectangle:\n         <pre class="brush: xml">\n           &lt;img:rectangle&gt;\n             &lt;img:upperLeft&gt;&lt;img:x&gt;20&lt;/img:x&gt;&lt;img:y&gt;20&lt;/img:y&gt;&lt;/img:upperLeft&gt;\n             &lt;img:lowerRight&gt;&lt;img:x&gt;50&lt;/img:x&gt;&lt;img:y&gt;50&lt;/img:y&gt;&lt;/img:lowerRight&gt;\n           &lt;/img:rectangle&gt;\n         </pre>\n       </li>\n       <li> rounded rectangle:\n         <pre class="brush: xml">\n           &lt;img:roundedRectangle&gt;\n             &lt;img:upperLeft&gt;&lt;img:x&gt;20&lt;/img:x&gt;&lt;img:y&gt;20&lt;/img:y&gt;&lt;/img:upperLeft&gt;\n             &lt;img:lowerRight&gt;&lt;img:x&gt;50&lt;/img:x&gt;&lt;img:y&gt;50&lt;/img:y&gt;&lt;/img:lowerRight&gt;\n             &lt;img:cornerWidth&gt;10&lt;/img:cornerWidth&gt;&lt;img:cornerHeight&gt;10&lt;/img:cornerHeight&gt;\n           &lt;/img:roundedRectangle&gt;\n         </pre>\n       </li>\n       <li> circle:\n         <pre class="brush: xml">\n           &lt;img:circle&gt;\n             &lt;img:origin&gt;&lt;img:x&gt;20&lt;/img:x&gt;&lt;img:y&gt;20&lt;/img:y&gt;&lt;/img:origin&gt;\n             &lt;img:perimeter&gt;5&lt;/img:perimeter&gt;\n           &lt;/img:circle&gt;\n         </pre>\n       </li>\n       <li> ellipse:\n         <pre class="brush: xml">\n           &lt;img:ellipse&gt;\n             &lt;img:origin&gt;&lt;img:x&gt;50&lt;/img:x&gt;&lt;img:y&gt;50&lt;/img:y&gt;&lt;/img:origin&gt;\n             &lt;img:perimeterX&gt;30&lt;/img:perimeterX&gt;&lt;img:perimeterY&gt;20&lt;/img:perimeterY&gt;\n           &lt;/img:ellipse&gt;\n         </pre>\n       </li>\n       <li> arc:\n         <pre class="brush: xml">\n           &lt;img:arc&gt;\n             &lt;img:origin&gt;&lt;img:x&gt;50&lt;/img:x&gt;&lt;img:y&gt;50&lt;/img:y&gt;&lt;/img:origin&gt;\n             &lt;img:perimeterX&gt;10&lt;/img:perimeterX&gt;&lt;img:perimeterY&gt;20&lt;/img:perimeterY&gt;\n             &lt;img:startDegrees&gt;180&lt;/img:startDegrees&gt;&lt;img:endDegrees&gt;270&lt;/img:endDegrees&gt;\n           &lt;/img:arc&gt;\n         </pre>\n       </li>\n       <li> polygon:\n         <pre class="brush: xml">\n           &lt;img:polygon&gt;\n             &lt;img:point&gt;&lt;img:x&gt;10&lt;/img:x&gt;&lt;img:y&gt;10&lt;/img:y&gt;&lt;/img:point&gt;\n             &lt;img:point&gt;&lt;img:x&gt;40&lt;/img:x&gt;&lt;img:y&gt;80&lt;/img:y&gt;&lt;/img:point&gt;\n             &lt;img:point&gt;&lt;img:x&gt;50&lt;/img:x&gt;&lt;img:y&gt;30&lt;/img:y&gt;&lt;/img:point&gt;\n           &lt;/img:polygon&gt;\n         </pre>\n       </li>\n       <li> text:\n         <pre class="brush: xml">\n           &lt;img:text&gt;\n             &lt;img:origin&gt;&lt;img:x&gt;20&lt;/img:x&gt;&lt;img:y&gt;20&lt;/img:y&gt;&lt;/img:origin&gt;\n             &lt;img:text&gt;Hello Zorba&lt;/img:text&gt;&lt;img:font&gt;&lt;/img:font&gt;&lt;img:font-size&gt;12&lt;/img:font-size&gt;\n           &lt;/img:text&gt;\n         </pre>\n       </li>\n     </ul>\n Optionally, each of the shape elements can contain elements to define the stroke with, stroke color, fill color, and anti-aliasing.\n E.g.:\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n   <pre class="brush: xml">\n     &lt;img:rectangle&gt;\n       &lt;img:strokeWidth&gt;5&lt;/img:strokeWidth&gt;\n       &lt;img:strokeColor&gt;#00AF00&lt;/img:strokeColor&gt;\n       &lt;img:fillColor&gt;#A10000&lt;/img:fillColor&gt;\n       &lt;img:antiAliasing&gt;true&lt;/img:antiAliasing&gt;\n       &lt;img:upperLeft&gt;&lt;img:x&gt;20&lt;/img:x&gt;&lt;img:y&gt;20&lt;/img:y&gt;&lt;/img:upperLeft&gt;\n       &lt;img:lowerRight&gt;&lt;img:x&gt;50&lt;/img:x&gt;&lt;img:y&gt;50&lt;/img:y&gt;&lt;/img:lowerRight&gt;\n     &lt;/img:rectangle&gt;\n   </pre>\n  </p>\n',summary:"<p> Extends the passed image with a sequence of shapes.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"image",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the passed image</div>'},{name:"shapes",type:"element(*)",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the shapes</div>'}],returns:{type:"xs:base64Binary",description:"image with additional shapes"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ierr:IM001 the passed image is invalid.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FORG0001 one of the passed shape elements is invalid.</xqdoc:error>']}],variables:[]},"http://zorba.io/modules/fetch":{ns:"http://zorba.io/modules/fetch",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This module provides functions to fetch the content of a resource identified\n by a URI. For example, it fetches the content of file or http resources.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">In order to retrieve such content, the functions use the\n URI resolution and URL resolver process as documented at\n <a href="../zorba/uriresolvers.html">\n URI Resolvers</a>.</p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Matthias Brantner</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://zorba.io/modules/fetch",prefix:"fetch"},{uri:"http://zorba.io/options/versioning",prefix:"ver"},{uri:"http://zorba.io/errors",prefix:"zerr"}],functions:[{isDocumented:!0,arity:1,name:"content-binary",qname:"fetch:content-binary",signature:"($uri as xs:string) as xs:base64Binary",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Tries to fetch the resource referred to by the given URI and\n returning it as base64Binary.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">It queries all URI mappers and resolvers with kind\n <tt>EntityData::SOME_CONTENT</tt>.</p>\n',summary:"<p>  Tries to fetch the resource referred to by the given URI and\n returning it as base64Binary.</p>",annotation_str:" %an:streamable",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"streamable",value:""}],updating:!1,parameters:[{name:"uri",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the resource to fetch.</div>'}],returns:{type:"xs:base64Binary",description:"the resource referred to by the given URI as streamble base64Binary."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">uri:URI_UNRESOLVED_OR_NOSTREAM if the URI could not be resolved or did not resolve to a <tt>StreamResource</tt>.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"content-binary",qname:"fetch:content-binary",signature:"($uri as xs:string, $entity-kind as xs:string) as xs:base64Binary external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Tries to fetch the resource referred to by the given URI and\n returning it as base64Binary.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">It queries all URI mappers and resolvers with kind the specified\n entity kind.</p>\n',summary:"<p>  Tries to fetch the resource referred to by the given URI and\n returning it as base64Binary.</p>",annotation_str:" %an:streamable",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"streamable",value:""}],updating:!1,parameters:[{name:"uri",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the resource to fetch.</div>'},{name:"entity-kind",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the kind of resource to fetch.</div>'}],returns:{type:"xs:base64Binary",description:"the resource referred to by the given URI as streamble base64Binary."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">uri:URI_UNRESOLVED_OR_NOSTREAM if the URI could not be resolved or did not resolve to a <tt>StreamResource</tt>.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"content",qname:"fetch:content",signature:"($uri as xs:string) as xs:string",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Tries to fetch the resource referred to by the given URI.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">It queries all URI mappers and resolvers with kind\n <tt>EntityData::SOME_CONTENT</tt>.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The content is assumed to be UTF-8 encoded.</p>\n',summary:"<p>  Tries to fetch the resource referred to by the given URI.</p>",annotation_str:" %an:streamable",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"streamable",value:""}],updating:!1,parameters:[{name:"uri",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the resource to fetch.</div>'}],returns:{type:"xs:string",description:"the resource referred to by the given URI as streamble string."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">uri:URI_UNRESOLVED_OR_NOSTREAM if the URI could not be resolved or did not resolve to a <tt>StreamResource</tt>.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"content",qname:"fetch:content",signature:"($uri as xs:string, $entity-kind as xs:string) as xs:string",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Tries to fetch the resource referred to by the given URI.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">It queries all URI mappers and resolvers with kind the specified\n entity kind.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The content is assumed to be UTF-8 encoded.</p>\n',summary:"<p>  Tries to fetch the resource referred to by the given URI.</p>",annotation_str:" %an:streamable",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"streamable",value:""}],updating:!1,parameters:[{name:"uri",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the resource to fetch.</div>'},{name:"entity-kind",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the kind of resource to fetch.</div>'}],returns:{type:"xs:string",description:"the resource referred to by the given URI as streamble string."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">uri:URI_NOT_RESOLVED_OR_NOSTREAM if the URI could not be resolved or did not resolve to a <tt>StreamResource</tt>.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"content",qname:"fetch:content",signature:"($uri as xs:string, $entity-kind as xs:string, $encoding as xs:string) as xs:string external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Tries to fetch the resource referred to by the given URI.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">It queries all URI mappers and resolvers with kind the specified\n entity kind.</p>\n',summary:"<p>  Tries to fetch the resource referred to by the given URI.</p>",annotation_str:" %an:streamable",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"streamable",value:""}],updating:!1,parameters:[{name:"uri",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the resource to fetch.</div>'},{name:"entity-kind",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the kind of resource to fetch.</div>'},{name:"encoding",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the encoding of the content</div>'}],returns:{type:"xs:string",description:"the resource referred to by the given URI as streamble string."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">uri:URI_UNRESOLVED_OR_NOSTREAM if the URI could not be resolved or did not resolve to a <tt>StreamResource</tt>.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">uri:CHARSET_UNKNOWN if the given encoding is invalid or not supported.</xqdoc:error>']}],variables:[]},"http://xbrl.io/modules/bizql/concept-maps":{ns:"http://xbrl.io/modules/bizql/concept-maps",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This module provides functions for storing, retrieving, and modifying\n concept maps. Concept maps can be used in BizQL queries.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">A concept map is a network of concepts that can be contained in a report schema.\n It maps "virtual" concepts to reported concepts, which allows comparison across\n archives that use different vocabularies (so-called extension facts).</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">With this module, you can retrieve the concept map associated with each report\n schema. You can also query for facts by making implicitly use of the mapping.</p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Charles Hoffman</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Matthias Brantner</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Dennis Knochenwefel</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Ghislain Fourny</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://xbrl.io/modules/bizql/archives",prefix:"archives"},{uri:"http://xbrl.io/modules/bizql/concept-maps",prefix:"concept-maps"},{uri:"http://xbrl.io/modules/bizql/facts",prefix:"facts"},{uri:"http://xbrl.io/modules/bizql/networks",prefix:"networks"},{uri:"http://xbrl.io/modules/bizql/report-schemas",prefix:"report-schemas"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:0,name:"concept-maps",qname:"concept-maps:concept-maps",signature:"() as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves all concept maps.</p>\n',summary:"<p>  Retrieves all concept maps.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"object()*",description:"all concept maps."},errors:[]},{isDocumented:!0,arity:1,name:"concept-maps",qname:"concept-maps:concept-maps",signature:"($report-schemas-or-ids as item()*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Return the concept maps from the given report schemas.</p>\n',summary:"<p>  Return the concept maps from the given report schemas.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"report-schemas-or-ids",type:"item()",occurrence:"*",description:""}],returns:{type:"object()*",description:"the concept maps from the report schemas."},errors:[]},{isDocumented:!0,arity:3,name:"facts-for-archives-and-concepts",qname:"concept-maps:facts-for-archives-and-concepts",signature:"($archive-or-ids as item()*, $concepts as string*, $concept-maps as object()*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Resolves the supplied concepts according to the supplied concept map.</p>\n',summary:"<p>  Resolves the supplied concepts according to the supplied concept map.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"archive-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of archives or AIDs (or $concept-maps:ALL_OF_THEM to do no filter on archives).</div>'},{name:"concepts",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of concept names (or $concept-maps:ALL_OF_THEM to do no filter on concepts).</div>'},{name:"concept-maps",type:"object()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of concept maps.</div>'}],returns:{type:"object()*",description:"the resolved facts, with the concept name overriden with the new name."},errors:[]},{isDocumented:!0,arity:4,name:"facts-for-archives-and-concepts",qname:"concept-maps:facts-for-archives-and-concepts",signature:"($archive-or-ids as item()*, $concepts as string*, $concept-maps as object()+, $options as object()?) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Resolves the supplied concepts according to the supplied concept map.</p>\n',summary:"<p>  Resolves the supplied concepts according to the supplied concept map.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"archive-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of archives or AIDs (or $concept-maps:ALL_OF_THEM to do no filter on archives).</div>'},{name:"concepts",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of concept names (or $concept-maps:ALL_OF_THEM to do no filter on concepts).</div>'},{name:"concept-maps",type:"object()",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of concept maps.</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> <a href="facts#standard_options">standard fact retrieving options</a>.</div>'}],returns:{type:"object()*",description:"the resolved facts, with the concept name overriden with the new name."},errors:[]}],variables:[{name:"concept-maps:ALL_OF_THEM",type:"boolean",description:" Joker for all archives or all concepts.\n"}]},"http://www.28msec.com/modules/http/cookie":{ns:"http://www.28msec.com/modules/http/cookie",description:" The Sausalito Cookie module provides function to manipulate\n HTTP-Cookies.\n",sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">28msec</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://www.28msec.com/modules/http/cookie",prefix:"cookie"},{uri:"http://www.28msec.com/modules/http/cookie",prefix:"cookie-schema"},{uri:"http://www.28msec.com/modules/http/request",prefix:"req"},{uri:"http://www.28msec.com/modules/http/response",prefix:"resp"},{uri:"http://zorba.io/modules/schema",prefix:"schema"},{uri:"http://www.zorba-xquery.com/modules/cryptography/hmac",prefix:"sec"},{uri:"http://zorba.io/modules/uri",prefix:"uri"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"create-session",qname:"cookie:create-session",signature:"($sessionData as node()) as empty-sequence()",description:' Creates a client-side cookie named "_session", containing the\n <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">$sessionData</tt> node value together with its signature.\n The signature is generated with the server\'s private key.\n',summary:'<p> Creates a client-side cookie named "_session", containing the\n  $sessionData  node value together with its signature.</p>',annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"sessionData",type:"node()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The data to be used for the session.</div>'}],returns:{type:"empty-sequence()",description:"The empty-sequence is returned."},errors:[]},{isDocumented:!0,arity:2,name:"create-session",qname:"cookie:create-session",signature:"($sessionData as node(), $expires as xs:dateTime) as empty-sequence()",description:' Creates a client-side cookie named "_session", containing the\n <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">$sessionData</tt> node value together with its signature.\n The signature is generated with the server\'s private key.\n The cookie is also set to expire on the date specified by\n <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">$expires</tt>.\n',summary:'<p> Creates a client-side cookie named "_session", containing the\n  $sessionData  node value together with its signature.</p>',annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"sessionData",type:"node()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The data to be used for the session.</div>'},{name:"expires",type:"xs:dateTime",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The expiration time of the cookie.</div>'}],returns:{type:"empty-sequence()",description:"The empty-sequence is returned."},errors:[]},{isDocumented:!0,arity:3,name:"create-session",qname:"cookie:create-session",signature:"($sessionData as node(), $expires as xs:dateTime?, $path as xs:string?) as empty-sequence()",description:' Creates a client-side cookie named "_session", containing the\n <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">$sessionData</tt> node value together with its signature.\n The signature is generated with the server\'s private key.\n The cookie is also set to expire on the date specified by\n <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">$expires</tt>. The cookie is only valid for the specified path.\n',summary:'<p> Creates a client-side cookie named "_session", containing the\n  $sessionData  node value together with its signature.</p>',annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"sessionData",type:"node()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The data to be used for the session.</div>'},{name:"expires",type:"xs:dateTime",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The expiration time of the cookie.</div>'},{name:"path",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The path of the URL for which the cookie is valid.</div>'}],returns:{type:"empty-sequence()",description:"The empty-sequence is returned."},errors:[]},{isDocumented:!0,arity:0,name:"delete-session",qname:"cookie:delete-session",signature:"() as empty-sequence()",description:' Delete the "_session" cookie from the client. The next\n user request will not receive a valid session cookie\n anymore\n',summary:'<p> Delete the "_session" cookie from the client.</p>',annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[],returns:{type:"empty-sequence()",description:"The empty-sequence is returned."},errors:[]},{isDocumented:!0,arity:1,name:"delete-session",qname:"cookie:delete-session",signature:"($path as xs:string?) as empty-sequence()",description:' Delete the "_session" cookie from the client. The next\n user request will not receive a valid session cookie\n anymore\n',summary:'<p> Delete the "_session" cookie from the client.</p>',annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"path",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The path of the URL for which the cookie is valid.</div>'}],returns:{type:"empty-sequence()",description:"The empty-sequence is returned."},errors:[]},{isDocumented:!0,arity:1,name:"get",qname:"cookie:get",signature:"($name as xs:string?) as element(cookie:cookie)*",description:' Returns the cookie in the request having the given name or the empty sequence\n if no such cookie exists. The cookie format returned is:\n <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">\n &lt;cookie:cookie\n   name=".."&gt;...&lt;/cookie:cookie&gt;</tt>.\n The content of the cookie element is the value of the cookie.\n',summary:"<p> Returns the cookie in the request having the given name or the empty sequence\n if no such cookie exists.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the cookie that should be retrieved.</div>'}],returns:{type:"element(cookie:cookie)*",description:"The cookie with the given name or the empty sequence if no cookie with the given name exist"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cookie:S003 if $decode evaluates to fn:true() and the value of the cookie cannot be parsed.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"get",qname:"cookie:get",signature:"($name as xs:string?, $decode as xs:boolean) as element(cookie:cookie)*",description:" Returns the cookies in the request having the given name. If no name is given,\n it returns all available cookies. If no cookie value decoding is wanted,\n the user must specify a second argument that evaluates to fn:false().\n",summary:"<p> Returns the cookies in the request having the given name.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the cookie that should be retrieved</div>'},{name:"decode",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Boolean to specify if cookie value decoding id needed</div>'}],returns:{type:"element(cookie:cookie)*",description:"The cookie with the given name or the empty sequence if no cookie with the given name exist"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cookie:S003 if $decode evaluates to fn:true() and the value of the cookie cannot be parsed.</xqdoc:error>']},{isDocumented:!0,arity:0,name:"session-data",qname:"cookie:session-data",signature:"() as node()",description:' Reads the "_session" cookie in the request and verifies if the signature\n matches the ad-hoc computed signature of the content of the session. If the\n verification is successful, the function returns the session data. Otherwise,\n an error is raised.\n',summary:'<p> Reads the "_session" cookie in the request and verifies if the signature\n matches the ad-hoc computed signature of the content of the session.</p>',annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"node()",description:"The session data is returned if verification succesful."},errors:[]},{isDocumented:!0,arity:1,name:"set",qname:"cookie:set",signature:"($cookie as element(cookie:cookie)) as empty-sequence()",description:' Adds a <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">Set-Cookie</tt> header to the response. This function is equivalent to\n <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">cookie:set($cookie, fn:true())</tt>.\n',summary:"<p> Adds a  Set-Cookie  header to the response.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"cookie",type:"element(cookie:cookie)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The XML representation of the cookie to be sent to the client.</div>'}],returns:{type:"empty-sequence()",description:"The empty-sequence is returned."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cookie:S002 if the cookie is bigger than 4096 bytes.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"set",qname:"cookie:set",signature:"($cookie as element(cookie:cookie), $encode as xs:boolean) as empty-sequence()",description:' Adds a <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">Set-Cookie</tt> header to the response.\n The cookie parameter needs to adhere to the cookie schema. For example,\n <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">\n &lt;cookie:cookie\n   name="xs:string"\n   expires="xs:datetime"\n   domain="xs:string"\n   path="xs:string"\n   secure="xs:boolean"&gt;value&lt;/cookie:cookie&gt;\n </tt>.\n If the cookie parameter is not valid according to the schema, err:XQDY0027 is raised.\n If $encode evaluates to fn:true(), then the child nodes of the cookie element will be\n serialized using XML serialization (omitting the XML declaration). In order not to\n break the cookie syntax, any occurence of whitespace or column in the value will be\n encoded on the client using the URL encoding format. For this reason also the \'%\'\n character will be encoded using the same format.\n If $encode evaluates to fn:false(), the children nodes of the cookie element will be\n serialized as text and no encoding will be performed whatsoever. It is the\n responsibility of the caller to make sure the text serialization will not produce an\n invalid cookie.\n',summary:"<p> Adds a  Set-Cookie  header to the response.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"cookie",type:"element(cookie:cookie)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The cookie to send to the client</div>'},{name:"encode",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> if encoding should be performed on the value or not</div>'}],returns:{type:"empty-sequence()",description:"The empty-sequence is returned."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cookie:S002 if the cookie is bigger than 4096 bytes.</xqdoc:error>']},{isDocumented:!0,arity:0,name:"validate-session",qname:"cookie:validate-session",signature:"() as xs:boolean",description:' Reads the "_session" cookie in the request and verifies if\n the signature matches the ad-hoc computed signature of the\n content of the session. The signature is generated with a\n server private key. If no cookie named "_session" exists,\n this function returns false.\n',summary:'<p> Reads the "_session" cookie in the request and verifies if\n the signature matches the ad-hoc computed signature of the\n content of the session.</p>',annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:boolean",description:'Returns <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">true</tt> if the session is valid, and and false otherwise.'},errors:[]}],variables:[]},"http://www.28msec.com/modules/couchbase":{ns:"http://www.28msec.com/modules/couchbase",description:' This module provides functionality to interact with the\n Couchbase NoSQL database.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The module is built using the libcouchbase 2.0 C client library and\n exposes most of its functionality in JSONiq.\n Beyond just allowing for basic key-value store operations (e.g.\n put-/get-text or put-/get-binary, this module also allows to work\n with Couchbase views in order to allow for complex JSON query\n operations.\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Cristi Dumitru</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://www.28msec.com/modules/couchbase",prefix:"cb"},{uri:"http://zorba.io/options/versioning",prefix:"ver"},{uri:"http://www.zorba-xquery.com/modules/couchbase",prefix:"zcb"}],functions:[{isDocumented:!0,arity:1,name:"connect",qname:"cb:connect",signature:"($options as object()) as anyURI",description:' Connect to the Couchbase server.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The input to the function is an object that contains the connection\n information. Specifically, it allows for the following options:\n <ul>\n   <li><tt>host</tt>: the endpoint of the Couchbase server (mandatory)</li>\n   <li><tt>user</tt>: the user used for connecting (optional)</li>\n   <li><tt>password</tt>: the password used for connecting (optional)</li>\n   <li><tt>bucket</tt>: name of an existing bucket (mandatory)</li>\n </ul></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <ul><li><pre>\n $conn := cb:connect({\n   "host" : "192.168.1.56:8091",\n   "username" : (),\n   "password" : (),\n   "bucket" : "default"\n });\n </pre></li></ul></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function returns an opaque URI that represents the connection.\n This URI has to be passed to other functions of this module that require\n the <tt>$conn</tt> parameter as a first argument.</p>\n',summary:"<p> Connect to the Couchbase server.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a object that contains the host, bucket, and authentication information.</div>'}],returns:{type:"anyURI",description:"an identifier for the established connection."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">LCB0001 if the connection to the given host/bucket could not be established.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">CB0001 if mandatory connection information is missing.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">CB0007 if a given option is not supported.</xqdoc:error>']},{isDocumented:!0,arity:4,name:"connect",qname:"cb:connect",signature:"($host as string, $username as string?, $password as string?, $bucket as string) as anyURI",description:' Connect to the Couchbase server.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function returns an opaque URI that represents the connection.\n This URI has to be passed to other functions of this module that require\n the <tt>$conn</tt> parameter as a first argument.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <ul><li><pre>\n $conn := cb:connect("192.168.1.56:8091", (), (), "default");\n </pre></li></ul></p>\n',summary:"<p> Connect to the Couchbase server.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"host",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> address of the couchbase server (mandatory) <code>"192.168.1.56:8091"</code></div>'},{name:"username",type:"string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> username used for the connection</div>'},{name:"password",type:"string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> password used for the connection</div>'},{name:"bucket",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> name of the bucket to use (mandatory) <code>"default"</code></div>'}],returns:{type:"anyURI",description:"an identifier that represents the connection to the server."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">LCB0001 if the connection to the given host/bucket could not be established.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"create-view",qname:"cb:create-view",signature:"($conn as anyURI, $doc-name as string, $view-names as string*) as string*",description:' Create a document and views.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n If the document already exists, it is replaced.\n A document can hold several views that must be specified in the same call.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <ul><li><pre>\n $views := cb:create-view($conn, "zip", ("bystate", "bycity"));\n </pre></li></ul></p>\n',summary:"<p> Create a document and views.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"conn",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier of the active connection</div>'},{name:"doc-name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the document to create</div>'},{name:"view-names",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The names of the views to create in the document</div>'}],returns:{type:"string*",description:"The paths for the views that have been created."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">LCB0002 if any error occurs in the communication with the server.</xqdoc:error>']},{isDocumented:!0,arity:4,name:"create-view",qname:"cb:create-view",signature:"($conn as anyURI, $doc-name as string, $view-names as string*, $options as object()*) as string*",description:' Create a document and views.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n If the document already exists, it is replaced.\n A document can hold several views that must be specified in the same call.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">In addition, the function allows to specify several options:\n <ul>\n   <li><tt>key</tt>: <tt>string</tt> name of the value that will be used\n        as key in the view</li>\n   <li><tt>values</tt>: <tt>string/array</tt> name of the value(s) that\n        will be used as values in the view</li>\n   <li><tt>function</tt>: <tt>javascript function</tt> the map function\n        that will create the connection between key and value.<br/>\n        If <tt>function</tt> is specified, the <tt>key</tt> and\n        <tt>values</tt> options are ignored.</li>\n </ul></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <ul><li><pre>\n $views := cb:create-view($conn, "zip", "bystate", { "key": "doc.state", "values" : ["doc.pop", "doc.city"] });\n </pre></li>\n <li><pre>\n $views := cb:create-view($conn, "zip", "bycity", { "function": "function(doc, meta) {  emit(doc.state, null); }"});\n </pre></li></ul></p>\n',summary:"<p> Create a document and views.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"conn",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier of the active connection</div>'},{name:"doc-name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the document to create</div>'},{name:"view-names",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The names of the views to create in the document</div>'},{name:"options",type:"object()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object with additional options</div>'}],returns:{type:"string*",description:"The paths for the views that have been created."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">LCB0002 if any error occurs in the communication with the server.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">CB0005 if the number of options doesn\'t match the number of view-names.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">CB0007 if any of the options is not supported.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">CB0010 if any of the given options has an invalid type.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"delete-view",qname:"cb:delete-view",signature:"($conn as anyURI, $doc as string*) as string*",description:' Delete a document and its views.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n If the document doesn\'t exists, the function does nothing.\n All the views hold in the document are deleted.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <ul><li><pre>\n cb:delete-view($conn, "zip");\n </pre></li></ul></p>\n',summary:"<p> Delete a document and its views.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"conn",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier of the active connection</div>'},{name:"doc",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0">-name The name of the document to delete</div>'}],returns:{type:"string*",description:"a empty sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">LCB0002 if any error occurs in the communication with the server.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"flush",qname:"cb:flush",signature:"($conn as anyURI) as empty-sequence()",description:' Remove all values and their keys.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <ul><li><pre>\n cb:flush($conn);\n </pre></li></ul></p>\n',summary:"<p> Remove all values and their keys.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"conn",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier of the active connection</div>'}],returns:{type:"empty-sequence()",description:"a empty sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">LCB0002 if any error occurs in the communication with the server.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"get-binary",qname:"cb:get-binary",signature:"($conn as anyURI, $key as string*) as base64Binary*",description:' Retrieve the values matching the given string keys, as base64Binary.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <ul><li><pre>\n $result := cb:get-binary($conn, "image");\n </pre></li></ul></p>\n',summary:"<p> Retrieve the values matching the given string keys, as base64Binary.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"conn",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier of the active connection</div>'},{name:"key",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The requested keys</div>'}],returns:{type:"base64Binary*",description:"A sequence of base64Binary values corresponding to the keys"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">LCB0002 if any error occurs in the communication with the server.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"get-binary",qname:"cb:get-binary",signature:"($conn as anyURI, $key as string*, $options as object()) as base64Binary*",description:' Retrieve the values matching the given string keys, as base64Binary.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">In addition, the function allows to specify several options:\n <ul>\n   <li><tt>expiration-time</tt>: <tt>integer</tt> value for refreshing the\n        expiration time in seconds\n       (default 0, which means values are kept indefinitely)</li>\n </ul></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <ul><li><pre>\n $result := cb:get-binary($conn, "image",{ "expiration-time" : 60 * 60 });\n </pre></li></ul></p>\n',summary:"<p> Retrieve the values matching the given string keys, as base64Binary.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"conn",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier of the active connection</div>'},{name:"key",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The requested keys</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object with additional options</div>'}],returns:{type:"base64Binary*",description:"A sequence of base64Binary values corresponding to the keys"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">LCB0002 if any error occurs in the communication with the server.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">CB0007 if any of the options is not supported.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">CB0009 if the given expiration time is not an integer.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"get-text",qname:"cb:get-text",signature:"($conn as anyURI, $key as string*) as string*",description:' Retrieve the values matching the given string keys, as string.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <ul><li><pre>\n $result := cb:get-text($conn, "35040");\n </pre></li></ul></p>\n',summary:"<p> Retrieve the values matching the given string keys, as string.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"conn",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier of the active connection</div>'},{name:"key",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The requested keys</div>'}],returns:{type:"string*",description:"A sequence of string values corresponding to the keys"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">LCB0002 if any error occurs in the communication with the server.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"get-text",qname:"cb:get-text",signature:"($conn as anyURI, $key as string*, $options as object()) as string*",description:' Retrieve the values matching the given string keys, as string.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">In addition, the function allows to specify several options:\n <ul>\n   <li><tt>expiration-time</tt>: <tt>integer</tt> value for refreshing the\n        expiration time in seconds\n       (default 0, which means values are kept indefinitely)</li>\n   <li><tt>encoding</tt>: <tt>string</tt> name of the encoding of the\n        returned string (default UTF-8)</li>\n </ul></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <ul><li><pre>\n $result := cb:get-text($conn, "35040", { "encoding" : "ASCII" } );\n </pre></li></ul></p>\n',summary:"<p> Retrieve the values matching the given string keys, as string.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"conn",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier of the active connection</div>'},{name:"key",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The requested key</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object with additional options</div>'}],returns:{type:"string*",description:"A sequence of string values corresponding to the keys"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">LCB0002 if any error occurs in the communication with the server.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">CB0006 if the given encoding is not supported.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">CB0007 if any of the options is not supported.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">CB0009 if the given expiration time is not an integer.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"put-binary",qname:"cb:put-binary",signature:"($conn as anyURI, $key as string*, $value as base64Binary*) as empty-sequence()",description:' Store base64binary values along with their string keys.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <ul><li><pre>\n cb:put-binary($conn, "image",\n   http:get-binary("http://localhost:8091/images/couchbase_logo.png")[2]);\n </pre></li></ul></p>\n',summary:"<p> Store base64binary values along with their string keys.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"conn",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier of the active connection</div>'},{name:"key",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The keys to store</div>'},{name:"value",type:"base64Binary",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The base64 binary values to be stored</div>'}],returns:{type:"empty-sequence()",description:"a empty sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">LCB0002 if any error occurs in the communication with the server.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">CB0005 if the number of keys doesn\'t match the number of values.</xqdoc:error>']},{isDocumented:!0,arity:4,name:"put-binary",qname:"cb:put-binary",signature:"($conn as anyURI, $key as string*, $value as base64Binary*, $options as object()) as empty-sequence()",description:' Store base64Binary values along with their string keys.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">In addition, the function allows to specify several options:\n <ul>\n   <li><tt>expiration-time</tt>: <tt>integer</tt> value for refreshing the\n        expiration time in seconds\n       (default 0, which means values are kept indefinitely)</li>\n   <li><tt>operation</tt>: <tt>add/replace/set/append/prepend</tt> type of\n       operation</li>\n   <li><tt>wait</tt>: <tt>persist/false</tt> if the system should wait for\n        persistence of the keys</li>\n </ul></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <ul><li><pre>\n cb:put-binary($conn, "image",\n   http:get-binary("http://localhost:8091/images/couchbase_logo.png")[2],\n   { "expiration-time" : 60 * 60 * 24 });\n </pre></li></ul></p>\n',summary:"<p> Store base64Binary values along with their string keys.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"conn",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier of the active connection</div>'},{name:"key",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The keys to store</div>'},{name:"value",type:"base64Binary",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The base64Binary values to be stored</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object with additional options</div>'}],returns:{type:"empty-sequence()",description:"a empty sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">LCB0002 if any error occurs in the communication with the server.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">CB0005 if the number of keys doesn\'t match the number of values.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">CB0007 if any of the options is not supported.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">CB0009 if the given expiration time is not an integer.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">CB0011 if the stored Variable was not stored</xqdoc:error>']},{isDocumented:!0,arity:3,name:"put-text",qname:"cb:put-text",signature:"($conn as anyURI, $key as string*, $value as string*) as empty-sequence()",description:' Store string values along with their string keys.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The values are stored with the UTF-8 encoding and a default\n expiration time 0.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <ul><li><pre>\n cb:put-text($conn, "35040", fn:serialize({\n                      "city" : "CALERA",\n                      "loc" : [ -86.755987, 33.1098 ],\n                      "pop" : 4675,\n                      "state" : "AL",\n                      "_id" : "35040"\n                    }));\n </pre></li></ul></p>\n',summary:"<p> Store string values along with their string keys.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"conn",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier of the active connection</div>'},{name:"key",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The keys to store</div>'},{name:"value",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The string values to be stored.</div>'}],returns:{type:"empty-sequence()",description:"a empty sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">LCB0002 if any error occurs in the communication with the server.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">CB0005 if the number of keys doesn\'t match the number of values.</xqdoc:error>']},{isDocumented:!0,arity:4,name:"put-text",qname:"cb:put-text",signature:"($conn as anyURI, $key as string*, $value as string*, $options as object()) as empty-sequence()",description:' Store string values along with their string keys.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">In addition, the function allows to specify several options:\n <ul>\n   <li><tt>expiration-time</tt>: <tt>integer</tt> value for refreshing the\n        expiration time in seconds\n       (default 0, which means values are kept indefinitely)</li>\n   <li><tt>encoding</tt>: <tt>string</tt> name of the encoding of the\n        returned string (default UTF-8)</li>\n   <li><tt>operation</tt>: <tt>add/replace/set/append/prepend</tt> type\n        of operation</li>\n   <li><tt>wait</tt>: <tt>persist/false</tt> if the system should wait for\n        persistence of the keys</li>\n </ul></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <ul><li><pre>\n cb:put-text($conn, "35040", fn:serialize({\n                      "city" : "CALERA",\n                      "loc" : [ -86.755987, 33.1098 ],\n                      "pop" : 4675,\n                      "state" : "AL",\n                      "_id" : "35040"\n                    }), { "expiration-time" : 60 * 60 * 24 });\n </pre></li></ul></p>\n',summary:"<p> Store string values along with their string keys.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"conn",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier of the active connection</div>'},{name:"key",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The keys to store</div>'},{name:"value",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The string values to be stored</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object with additional options</div>'}],returns:{type:"empty-sequence()",description:"a empty sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">LCB0002 if any error occurs in the communication with the server.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">CB0005 if the number of keys doesn\'t match the number of values.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">CB0006 if the given encoding is not supported.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">CB0007 if any of the options is not supported.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">CB0009 if the given expiration time is not an integer.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">CB0011 if the stored Variable was not stored</xqdoc:error>']},{isDocumented:!0,arity:2,name:"remove",qname:"cb:remove",signature:"($conn as anyURI, $key as string*) as empty-sequence()",description:' Remove the values matching the given string keys.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <ul><li><pre>\n cb:remove($conn, "35040");\n </pre></li></ul></p>\n',summary:"<p> Remove the values matching the given string keys.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"conn",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier of the active connection</div>'},{name:"key",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The requested keys to have their values removed</div>'}],returns:{type:"empty-sequence()",description:"a empty sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">LCB0002 if any error occurs in the communication with the server.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"touch",qname:"cb:touch",signature:"($conn as anyURI, $key as string*, $exp-time as integer) as empty-sequence()",description:' Refresh the expiration time of the given string keys.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <ul><li><pre>\n cb:touch($conn, "35040", 60 * 60 * 24);\n </pre></li></ul></p>\n',summary:"<p> Refresh the expiration time of the given string keys.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"conn",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier of the active connection</div>'},{name:"key",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The keys to touch</div>'},{name:"exp-time",type:"integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> New expiration time in seconds</div>'}],returns:{type:"empty-sequence()",description:"a empty sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">LCB0002 if any error occurs in the communication with the server.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"view",qname:"cb:view",signature:"($conn as anyURI, $path as string*) as object()*",description:' Retrieve the content of existing views. <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <ul><li><pre>\n $results := cb:view($conn, "_design/zip/_view/bystate");\n </pre></li></ul></p>\n',summary:"<p> Retrieve the content of existing views.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"conn",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier of the active connection</div>'},{name:"path",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The view path</div>'}],returns:{type:"object()*",description:"information about the view"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">LCB0002 if any error occurs in the communication with the server.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"view",qname:"cb:view",signature:"($conn as anyURI, $path as string*, $options as object()) as object()*",description:' Retrieve the content of existing views.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <ul><li><pre>\n $results := cb:view($conn, "_design/zip/_view/bystate", { "limit": 100 });\n </pre></li></ul></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">In addition, the function allows to specify several options:\n <ul>\n   <li><tt>encoding</tt>: <tt>string</tt> name of the encoding of the\n        returned string (default UTF-8)</li>\n   <li><tt>stale</tt>: if the system should wait for persistence of the keys\n    <ul>\n      <li><tt>ok</tt> the view is not updated</li>\n      <li><tt>false</tt> the view is updated before the function view is\n      executed, this options needs the key to be on disk before the call of\n      the function.</li>\n      <li><tt>update_after</tt> the view is updated after the call\n      of the function.</li>\n    </ul></li>\n   <li><tt>limit</tt>: <tt>integer</tt> how many rows qill be shown\n         (default all)</li>\n </ul></p>\n',summary:"<p> Retrieve the content of existing views.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"conn",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier of the active connection</div>'},{name:"path",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The view path <code>"_design/test/_view/vies"</code></div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object with additional options</div>'}],returns:{type:"object()*",description:"information about the view"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">LCB0002 if any error occurs in the communication with the server.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">CB0007 if any of the options is not supported.</xqdoc:error>']}],variables:[]},"http://zorba.io/modules/random":{ns:"http://zorba.io/modules/random",description:" This module provides several functions for generating (pseudo-)random\n numbers and strings.\n",sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Matthias Brantner, Sorin Nasoi</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://zorba.io/modules/random",prefix:"r"},{uri:"http://zorba.io/options/versioning",prefix:"ver"},{uri:"http://zorba.io/errors",prefix:"zerr"}],functions:[{isDocumented:!0,arity:2,name:"random-between",qname:"r:random-between",signature:"($lower as integer, $upper as integer) as integer",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function generates one random number within a given range.\n The function is nondeterministic.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function is based on <tt>r:random-between#3</tt>.\n Specifically, it returns the value of invoking\n <tt>r:random-betwen($lower, $upper, 1)</tt>.</p>\n',summary:"<p>  This function generates one random number within a given range.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"lower",type:"integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the lower bound for the random number</div>'},{name:"upper",type:"integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the upper bound for the random number</div>'}],returns:{type:"integer",description:"a random integer within the given range"},errors:[]},{isDocumented:!0,arity:3,name:"random-between",qname:"r:random-between",signature:"($lower as integer, $upper as integer, $num as integer) as integer*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function generates an arbitrary number of random numbers\n within a given range. The function is nondeterministic because\n the sequence is <b>not</b> repeatable.</p>\n',summary:"<p>  This function generates an arbitrary number of random numbers\n within a given range.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"lower",type:"integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the lower bound for every value within the sequence</div>'},{name:"upper",type:"integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the upper bound for every value within the sequence</div>'},{name:"num",type:"integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the length of the sequence returned</div>'}],returns:{type:"integer*",description:'<tt xmlns:xqdoc="http://www.xqdoc.org/1.0">$num</tt> pseudo-random integers within (and including) the range specified by <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">$lower</tt> and <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">$upper</tt>. It returns <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">$num</tt>-times <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">$lower</tt> if <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">$lower</tt> is equal to <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">$upper</tt> and the empty sequence if <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">$num</tt> is negative.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">r:INVALID_ARGUMENT if <tt>$lower</tt> is greater than <tt>$upper</tt></xqdoc:error>']},{isDocumented:!0,arity:0,name:"random",qname:"r:random",signature:"() as integer",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function generates one random number.\n The function is nondeterministic.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function is based on <tt>r:random#1</tt>. Specifically, it\n returns the value of invoking <tt>r:random(1)</tt>.</p>\n',summary:"<p>  This function generates one random number.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[],returns:{type:"integer",description:"a random integer"},errors:[]},{isDocumented:!0,arity:1,name:"random",qname:"r:random",signature:"($num as integer) as integer* external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function generates an arbitrary number of random numbers.\n The function is nondeterministic because the sequence is\n <b>not</b> repeatable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">However, the function is based on posix function <tt>srand()</tt> and\n <tt>rand()</tt>. Specifically, it invokes <tt>srand()</tt>\n with some random number based on the current time\n and then returns the values returned by invoking\n <tt>rand()</tt> <tt>$num</tt>-times.</p>\n',summary:"<p>  This function generates an arbitrary number of random numbers.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"num",type:"integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the length of the sequence returned</div>'}],returns:{type:"integer*",description:'<tt xmlns:xqdoc="http://www.xqdoc.org/1.0">$num</tt> random integers, or the empty sequence if <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">$num</tt> is negative.'},errors:[]},{isDocumented:!0,arity:4,name:"seeded-random-between",qname:"r:seeded-random-between",signature:"($seed as integer, $lower as integer, $upper as integer, $num as integer) as integer*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function generates an arbitrary number of pseudo-random numbers\n within a given range. The sequence is repeatable by calling the\n function with the same seed and boundaries.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function is based on the function <tt>r:seeded-random#2</tt>.\n Specifically, its result is repeatable if called with the\n same arguments.</p>\n',summary:"<p>  This function generates an arbitrary number of pseudo-random numbers\n within a given range.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"seed",type:"integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the initial seed value for the sequence</div>'},{name:"lower",type:"integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the lower bound for every value within the sequence</div>'},{name:"upper",type:"integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the upper bound for every value within the sequence</div>'},{name:"num",type:"integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the length of the sequence returned</div>'}],returns:{type:"integer*",description:'<tt xmlns:xqdoc="http://www.xqdoc.org/1.0">$num</tt> pseudo-random integers within (and including) the range specified by <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">$lower</tt> and <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">$upper</tt>. It returns <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">$num</tt>-times <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">$lower</tt> if <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">$lower</tt> is equal to <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">$upper</tt> and the empty sequence if <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">$num</tt> is negative.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZQXD0004 if the given seed is negative or great than the max value of <tt>unsigned int</tt> on the given platform.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">r:INVALID_ARGUMENT if <tt>$lower</tt> is greater than <tt>$upper</tt></xqdoc:error>']},{isDocumented:!0,arity:2,name:"seeded-random",qname:"r:seeded-random",signature:"($seed as integer, $num as integer) as integer* external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function generates an arbitrary number of pseudo-random numbers.\n The sequence is repeatable by calling the function with the same\n seed.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function is based on posix function <tt>srand()</tt> and\n <tt>rand()</tt>. Specifically, it invokes <tt>srand($seed)</tt>\n and then returns the values returned by invoking <tt>rand()</tt>\n <tt>$num</tt>-times.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Sequences returned by this function are not thread-safe (i.e.\n if multiple XQuery programs invoking this function are executed\n concurrently in several threads). This is because the function is\n based on <tt>srand()</tt> and <tt>rand()</tt>.</p>\n',summary:"<p>  This function generates an arbitrary number of pseudo-random numbers.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"seed",type:"integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the initial seed value for the sequence</div>'},{name:"num",type:"integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the length of the sequence returned</div>'}],returns:{type:"integer*",description:'<tt xmlns:xqdoc="http://www.xqdoc.org/1.0">$num</tt> pseudo-random integers, or the empty sequence if <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">$num</tt> is negative.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZQXD0004 if the given seed is negative or great than the max value of <tt>unsigned int</tt> on the given platform.</xqdoc:error>']},{isDocumented:!0,arity:0,name:"uuid",qname:"r:uuid",signature:"() as string external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function returns a uuid.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"> Note, that the function is not stable,\n that is, it returns a different UUID everytime the function is invoked.</p>\n',summary:"<p>  This function returns a uuid.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[],returns:{type:"string",description:"the generated UUID as string"},errors:[]}],variables:[]},"http://www.zorba-xquery.com/modules/http-client":{ns:"http://www.zorba-xquery.com/modules/http-client",description:' <h1 xmlns:xqdoc="http://www.xqdoc.org/1.0">Introduction</h1>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This module provides provides simple functions for performing HTTP requests\n (GET, POST, DELETE etc.), as well as a more flexible general\n purpose function (<a href="?anchor=send-request-3">send-request()</a>).\n </p>\n <h1 xmlns:xqdoc="http://www.xqdoc.org/1.0">Examples of how to use this module</h1>\n <h4 xmlns:xqdoc="http://www.xqdoc.org/1.0">Simple GET Request</h4>\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static" ace-mode="xquery">\n import module namespace http="http://www.zorba-xquery.com/modules/http-client";\n declare namespace svg="http://www.w3.org/2000/svg";\n http:get("http://www.w3.org/Graphics/SVG/svglogo.svg")[2]/svg:svg/svg:title\n </pre>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This example downloads an XML resource from the web (in this case,\n an SVG file, which is an XML-based image format) and returns it as\n a document node. Since the XML is in a namespace, we declare that\n namespace; we can then perform a path expression directly on the\n return value of http:get().\n </p>\n <h4 xmlns:xqdoc="http://www.xqdoc.org/1.0">Simple GET Request (retrieving XHTML)</h4>\n   <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static" ace-mode="xquery">\n   import module namespace http="http://www.zorba-xquery.com/modules/http-client";\n   declare namespace xhtml="http://www.w3.org/1999/xhtml";\n   http:get-node( "http://www.w3.org" )[2]//xhtml:body\n   </pre>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This example shows how to retrieve an XHTML resource. XHTML is\n XML, so the http:get-node() function will return it as a document node\n and you can operate on it with the full power of XQuery. As above, since this\n XML is in a particular namespace, the above query defines that namespace\n with the prefix "xhtml" so it can easily perform path expressions, etc.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n Note: many webservers, include www.w3.org, return XHTML with the\n HTTP Content-Type "text/html". Zorba cannot assume that "text/html"\n is actually XHTML, and so http:get() would have returned raw text\n rather than a document node. That is why the example above uses\n http:get-node(), which overrides the server\'s Content-Type and tells\n Zorba to attempt to parse the result as XML.\n </p>\n <h4 xmlns:xqdoc="http://www.xqdoc.org/1.0">Simple GET Request (retrieving HTML as text)</h4>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n Note that XQuery does <b>not</b> understand plain HTML, and so if the URL\n you retrieve contains plain HTML data (not XHTML), it will be treated as\n plain text as shown in the next example. If you want to operate on the HTML\n with XQuery, you should use the HTML language module which can transform\n HTML to XHTML. The HTML module is supported by the Zorba team, but it is\n not a "core module", meaning that it is not shipped with every Zorba\n installation and may not be available. See\n <a href="http://www.zorba-xquery.com/site2/html/downloads.html">the Zorba downloads\n page</a> for information about obtaining this module if you do not\n have it.</p>\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static" ace-mode="xquery">\n import module namespace http="http://www.zorba-xquery.com/modules/http-client";\n http:get("http://www.example.com")[2]\n </pre>\n returns\n   <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static" ace-mode="xml">\n   &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&gt;\n   &lt;html&gt;\n     &lt;head&gt;\n       &lt;meta http-equiv="Content-Type"\n       content="text/html; charset=utf-8" /&gt;\n       &lt;title&gt;Example Web Page&lt;/title&gt;\n     &lt;/head&gt;\n     &lt;body&gt;\n       &lt;p&gt;You have reached this web page by typing "example.com",\n       "example.net", or "example.org" into your web browser.&lt;/p&gt;\n       &lt;p&gt;These domain names are reserved for use in documentation and are\n       Not available for registration. See\n       &lt;a href="http://www.rfc-editor.org/rfc/rfc2606.txt"&gt;RFC 2606&lt;/a&gt;,\n       Section 3.&lt;/p&gt;\n     &lt;/body&gt;\n   &lt;/html&gt;\n   </pre>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Note that the response data above is a simple\n xs:string value containing the HTML data, not actual XML data. If you\n executed the above query using the Zorba command-line client, you would\n have actually seen data like the following:</p>\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static" ace-mode="xml">\n   &amp;lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&amp;gt;\n   &amp;lt;html&amp;gt;\n      ...\n </pre>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">because Zorba would attempt to serialize it as XML data, and would\n escape all the raw angle brackets in the original xs:string.</p>\n <h4 xmlns:xqdoc="http://www.xqdoc.org/1.0">Simple POST Request</h4>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n Here is a simple example which sends text content by making an HTTP POST\n request.\n </p>\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static" ace-mode="xquery">\n import module namespace http="http://www.zorba-xquery.com/modules/http-client";\n http:post( "...", "Hello World" )\n </pre>\n <h1 xmlns:xqdoc="http://www.xqdoc.org/1.0" id="standard_return">Return Values</h1>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Most functions in this module (all except\n <a href="?anchor=options-1">options()</a>) return one or more items.\n (<a href="?anchor=head-1">head()</a> returns exactly one.) For all of these,\n the first item returned will be a &lt;http-schema:response&gt;\n element, as seen in the examples above. This element has "status" and\n "message" attributes, representing the result of the HTTP call. It\n also has any number of &lt;http-schema:header&gt; child elements that\n encode the HTTP headers returned by the HTTP server. Finally, it\n will generally contain a &lt;http-schema:body&gt; child element with\n a "media-type" attribute that identifies the content-type of the\n result data.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The full schema of this &lt;http-schema:response&gt; element is\n part of the <a href="http://expath.org/modules/http-client/">EXPath\n HTTP Client module</a>. You can see the schema\n <a href="schemas/expath.org_ns_http-client.html">here</a>.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Any items in function return values after the initial\n &lt;http-schema:response&gt; element are the body/bodies of the HTTP\n response from the server. (MIME Multi-part responses will have\n more than one body.) The type of these items depends on the\n Content-Type for each body. Each item will be:</p>\n <ul xmlns:xqdoc="http://www.xqdoc.org/1.0">\n  <li>\n    an element node, if the returned content type is one of:\n    <ul>\n      <li>text/xml</li>\n      <li>application/xml</li>\n      <li>text/xml-external-parsed-entity</li>\n      <li>application/xml-external-parsed-entity</li>\n      <li>or if the Content-Type ends with "+xml".</li>\n    </ul>\n  </li>\n  <li>\n    an xs:string, if the returned content type starts with "text/"\n    and does not match the above XML content types strings, or if\n    it is one of:\n    <ul>\n      <li>"application/json"</li>\n      <li>"application/x-javascript"</li>\n    </ul>\n  </li>\n  <li>xs:base64Binary for all other content types.</li>\n </ul>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This return value - a sequence of items comprising one\n &lt;http-schema:response&gt; element followed by zero or more\n response items - is referred to as the "standard http-client\n return type" in the function declarations below.</p>\n <h1 xmlns:xqdoc="http://www.xqdoc.org/1.0" id="url_string">$href Arguments to Functions</h1>\n All functions in this module accept a URL argument named $href. In\n all cases, the value passed to $href must be a valid xs:anyURI.\n However, all functions declare $href to be of type xs:string. This\n is for convenience, since you can pass a string literal value (that\n is, a URL in double-quotes spelled out explicitly in your query)\n to an xs:string parameter.\n <h1 xmlns:xqdoc="http://www.xqdoc.org/1.0" id="get_warning">Important Notice Regarding get() Functions</h1>\n All of the get() functions in this module -\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="?anchor=get-1">get()</a>, <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="?anchor=get-node-1">get-node()</a>,\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="?anchor=get-text-1">get-text()</a>, and\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="?anchor=get-binary()">get-binary()</a> - are declared to be\n <i xmlns:xqdoc="http://www.xqdoc.org/1.0">nondeterministic</i>, which means that Zorba will not cache\n their results. However, they are <b xmlns:xqdoc="http://www.xqdoc.org/1.0">not</b> declared to be\n <i xmlns:xqdoc="http://www.xqdoc.org/1.0">sequential</i>, which means that Zorba may re-order them\n as part of its query optimization. According to the HTTP RFC,\n GET requests should only return data, and should not have any\n side-effects. However, in practice it is not uncommon for GET\n requests to have side-effects. If your application depends on\n the ordering of side-effects from making GET requests, you should\n either use the more complex <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="?anchor=send-request-3">send-request()</a>\n function (which <b xmlns:xqdoc="http://www.xqdoc.org/1.0">is</b> declared <i xmlns:xqdoc="http://www.xqdoc.org/1.0">sequential</i>), or alterately\n wrap each call to get() in your own sequential function, to ensure\n that Zorba does not place the GET requests out of order.\n <h1 xmlns:xqdoc="http://www.xqdoc.org/1.0" id="expath_relation">Relation to the EXPath http-client module</h1>\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://expath.org/">EXPath</a> defines its own http-client\n module, which is available separately for Zorba as a non-core module.\n There are two primary differences between EXPath\'s http-client and\n Zorba\'s core http-client (this module):\n <ol xmlns:xqdoc="http://www.xqdoc.org/1.0">\n   <li>EXPath defines only the send-request() function, although it\n does include convenient 1- and 2-argument forms in addition to the\n full 3-argument form. EXPath does not include the simpler get(),\n post(), put(), delete(), head(), and options() functions defined by\n this module.</li>\n   <li>EXPath specifies that all HTML content returned from the\n HTTP server will be <i>tidied up</i> into valid XML, and then parsed\n into an element. As this required an additional third-party library\n dependency, Zorba\'s http-client module does not perform this tidying.\n Instead, HTML content is returned as a string (with special XML\n characters replaced with XML entity references, as shown in the\n above examples).</li>\n </ol>\n See <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.expath.org/spec/http-client">the full spec\n of the EXPath http-client module</a> for more information.\n',sees:['<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0"><a href="http://www.w3.org/TR/xquery-11/#FunctionDeclns">XQuery 1.1: Function Declaration</a></xqdoc:see>'],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Markus Pilman, Federico Cavalieri</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://www.w3.org/2005/xqt-errors",prefix:"err"},{uri:"http://expath.org/ns/error",prefix:"error"},{uri:"http://www.zorba-xquery.com/modules/http-client",prefix:"http"},{uri:"http://expath.org/ns/http-client",prefix:"http-schema"},{uri:"http://zorba.io/modules/http-client-wrapper",prefix:"http-wrapper"},{uri:"http://jsoniq.org/functions",prefix:"jn"},{uri:"http://zorba.io/modules/http-client",prefix:"json-http"},{uri:"http://jsoniq.org/function-library",prefix:"libjn"},{uri:"http://www.w3.org/2010/xslt-xquery-serialization",prefix:"ser"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"delete",qname:"http:delete",signature:"($href as xs:string) as item()+",description:" This function makes an HTTP DELETE request to a given URL.\n",summary:"<p> This function makes an HTTP DELETE request to a given URL.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"href",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The URL to which the request will be made (see <a href="#url_string">note</a> above).</div>'}],returns:{type:"item()+",description:'<a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#standard_return">standard http-client return type</a>.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC001 An HTTP error occurred.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC002 Error parsing the response content as XML.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC006 A timeout occurred waiting for the response.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HCV02 Trying to follow a redirect of a DELETE request.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"get-binary",qname:"http:get-binary",signature:"($href as xs:string) as item()+",description:" This function makes a GET request on a given URL. All returned bodies\n are forced to be interpreted as binary data, and will be returned\n as xs:base64Binary items.\n",summary:"<p> This function makes a GET request on a given URL.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"href",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The URL to which the request will be made (see <a href="#url_string">note</a> above).</div>'}],returns:{type:"item()+",description:'<a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#standard_return">standard http-client return type</a>.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC001 An HTTP error occurred.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC002 Error parsing the response content as XML.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC006 A timeout occurred waiting for the response.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"get-node",qname:"http:get-node",signature:"($href as xs:string) as item()+",description:" This function makes a GET request to a given URL. All returned bodies\n are forced to be interpreted as XML and parsed into elements.\n",summary:"<p> This function makes a GET request to a given URL.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"href",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The URL to which the request will be made (see <a href="#url_string">note</a> above).</div>'}],returns:{type:"item()+",description:'<a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#standard_return">standard http-client return type</a>.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC001 An HTTP error occurred.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC002 Error parsing the response content as XML.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC006 A timeout occurred waiting for the response.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"get-text",qname:"http:get-text",signature:"($href as xs:string) as item()+",description:" This function makes a GET request to a given URL. All returned bodies\n are forced to be interpreted as plain strings, and will be returned\n as xs:string items.\n",summary:"<p> This function makes a GET request to a given URL.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"href",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The URL to which the request will be made (see <a href="#url_string">note</a> above).</div>'}],returns:{type:"item()+",description:'<a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#standard_return">standard http-client return type</a>.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC001 An HTTP error occurred.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC002 Error parsing the response content as XML.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC006 A timeout occurred waiting for the response.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"get",qname:"http:get",signature:"($href as xs:string) as item()+",description:" This function makes a GET request to a given URL.\n",summary:"<p> This function makes a GET request to a given URL.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"href",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The URL to which the request will be made (see <a href="#url_string">note</a> above).</div>'}],returns:{type:"item()+",description:'<a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#standard_return">standard http-client return type</a>.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC001 An HTTP error occurred.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC002 Error parsing the response content as XML.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC006 A timeout occurred waiting for the response.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"head",qname:"http:head",signature:"($href as xs:string) as item()",description:" This function makes an HTTP HEAD request on a given URL.\n",summary:"<p> This function makes an HTTP HEAD request on a given URL.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"href",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The URL to which the request will be made (see <a href="#url_string">note</a> above).</div>'}],returns:{type:"item()",description:'<a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#standard_return">standard http-client return type</a> (since HEAD never returns any body data, only the &lt;http-schema:response&gt; element will be returned).'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC001 An HTTP error occurred.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC006 A timeout occurred waiting for the response.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"options",qname:"http:options",signature:"($href as xs:string) as xs:string*",description:" This function makes an HTTP OPTIONS request, which asks the server\n which operations it supports.\n",summary:"<p> This function makes an HTTP OPTIONS request, which asks the server\n which operations it supports.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"href",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The URL to which the request will be made (see <a href="#url_string">note</a> above).</div>'}],returns:{type:"xs:string*",description:"A sequence of xs:string values of the allowed operations."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC001 An HTTP error occurred.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC006 A timeout occurred waiting for the response.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"post",qname:"http:post",signature:"($href as xs:string, $body as item()) as item()+",description:' This function makes an HTTP POST request to a given URL. If the body\n passed to this function is an element, it will be serialized to XML\n to be sent to the server, and the Content-Type sent to the server will\n be "text/xml". Otherwise, the body will be converted to\n a plain string, and the Content-Type will be "text/plain".\n',summary:"<p> This function makes an HTTP POST request to a given URL.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"href",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The URL to which the request will be made (see <a href="#url_string">note</a> above).</div>'},{name:"body",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The body which will be sent to the server.</div>'}],returns:{type:"item()+",description:'<a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#standard_return">standard http-client return type</a>.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC001 An HTTP error occurred.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC002 Error parsing the response content as XML.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC006 A timeout occurred waiting for the response.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HCV02 Trying to follow a redirect of a POST request.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"post",qname:"http:post",signature:"($href as xs:string, $body as item(), $content-type as xs:string) as item()+",description:' This function makes an HTTP POST request to a given URL. If the body\n passed to this function is an element, it will be serialized\n according to the $content-type parameter as follows:\n <ul xmlns:xqdoc="http://www.xqdoc.org/1.0">\n  <li>If $content-type is "text/xml", "application/xml",\n "text/xml-external-parsed-entity", or\n "application/xml-external-parsed-entity", or if it ends with "+xml",\n $body will be serialized to XML.</li>\n  <li>If $content-type starts with "text/html", $body will be\n serialized to HTML.</li>\n  <li>Otherwise, $body will be serialized to text.</li>\n </ul>\n If $body is not an element, $body will be serialized to text\n regardless of $content-type.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">In any case, Content-Type of the request sent to the server will\n be $content-type.</p>\n',summary:"<p> This function makes an HTTP POST request to a given URL.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"href",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The URL to which the request will be made (see <a href="#url_string">note</a> above).</div>'},{name:"body",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The body which will be sent to the server</div>'},{name:"content-type",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The content type of the body as described above.</div>'}],returns:{type:"item()+",description:"The first element of the result is the metadata (like headers, status etc), the next elements are the response"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC001 An HTTP error occurred.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC002 Error parsing the response content as XML.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC006 A timeout occurred waiting for the response.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HCV02 Trying to follow a redirect of a POST request.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"put",qname:"http:put",signature:"($href as xs:string, $body as item()) as item()+",description:' This function makes an HTTP PUT request to a given URL. If the body\n passed to this function is an element, it will be serialized to XML\n to be sent to the server, and the Content-Type sent to the server will\n be "text/xml". Otherwise, the body will be converted to\n a plain string, and the Content-Type will be "text/plain".\n',summary:"<p> This function makes an HTTP PUT request to a given URL.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"href",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The URL to which the request will be made (see <a href="#url_string">note</a> above).</div>'},{name:"body",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The body which will be sent to the server.</div>'}],returns:{type:"item()+",description:'<a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#standard_return">standard http-client return type</a>.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC001 An HTTP error occurred.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC002 Error parsing the response content as XML.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC006 A timeout occurred waiting for the response.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HCV02 Trying to follow a redirect of a PUT request.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"put",qname:"http:put",signature:"($href as xs:string, $body as item(), $content-type as xs:string) as item()+",description:' This function makes an HTTP PUT request to a given URL. If the body\n passed to this function is an element, it will be serialized\n according to the $content-type parameter as follows:\n <ul xmlns:xqdoc="http://www.xqdoc.org/1.0">\n  <li>If $content-type is "text/xml", "application/xml",\n "text/xml-external-parsed-entity", or\n "application/xml-external-parsed-entity", or if it ends with "+xml",\n $body will be serialized to XML.</li>\n  <li>If $content-type starts with "text/html", $body will be\n serialized to HTML.</li>\n  <li>Otherwise, $body will be serialized to text.</li>\n </ul>\n If $body is not an element, $body will be serialized to text\n regardless of $content-type.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">In any case, Content-Type of the request sent to the server will\n be $content-type.</p>\n',summary:"<p> This function makes an HTTP PUT request to a given URL.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"href",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The URL to which the request will be made (see <a href="#url_string">note</a> above).</div>'},{name:"body",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The body which will be sent to the server.</div>'},{name:"content-type",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The content type of $body as described above.</div>'}],returns:{type:"item()+",description:'<a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#standard_return">standard http-client return type</a>.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC001 An HTTP error occurred.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC002 Error parsing the response content as XML.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC006 A timeout occurred waiting for the response.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HCV02 Trying to follow a redirect of a PUT request.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"send-request",qname:"http:send-request",signature:"($request as element(http-schema:request)?, $href as xs:string?, $bodies as item()*) as item()+",description:' This function sends an HTTP request and returns the corresponding response.\n Its inputs, outputs, and behavior are identical to the\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://expath.org/spec/http-client">EXPath http-client</a>\'s\n send-request() function (except that HTML responses are not tidied\n into XML - see <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#expath_relation">the note above</a>). It\n is provided here for use in Zorba installations that do not have\n the EXPath module available. If you have the option of using the\n EXPath module instead of this function, please do so, as it will\n allow your application to be more interoperable between different\n XQuery engines.\n Full documentation of the $request parameter can be found in\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://expath.org/spec/http-client#d2e183">the EXPath\n specification</a>.\n',summary:"<p> This function sends an HTTP request and returns the corresponding response.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"request",type:"element(http-schema:request)",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Contains the various parameters of the request (see above).</div>'},{name:"href",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The URL to which the request will be made (see <a href="#url_string">note</a> above). If this parameter is specified, it will override the "href" attribute of $request.</div>'},{name:"bodies",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is the request body content, for HTTP methods that can contain a body in the request (i.e. POST and PUT). It is an error if this param is not the empty sequence for methods</div>'}],returns:{type:"item()+",description:'<a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#standard_return">standard http-client return type</a>.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC001 An HTTP error occurred.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC002 Error parsing the response content as XML.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC003 With a multipart response, the override-media-type must be either a multipart media type or application/octet-stream.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC004 The src attribute on the body element is mutually exclusive with all other attribute (except the media-type).</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC005 The input request element is not valid.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC006 A timeout occurred waiting for the response.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HCV02 Trying to follow a redirect of a POST, PUT, or DELETE request</xqdoc:error>']}],variables:[]},"http://xbrl.io/modules/bizql/profiles/sec/networks":{ns:"http://xbrl.io/modules/bizql/profiles/sec/networks",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This module provides functionality for querying SEC networks in SEC filings.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">SEC Networks are actually XBRL Components. In the SEC profiles, all XBRL networks\n in an XBRL component must be consistent to each other. A way to look at it is that\n the SEC Network can be identified with the XBRL presentation network it contains.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For XBRL-generic operations on XBRL components, use the\n generic components module.</p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Charles Hoffman</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Matthias Brantner</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Dennis Knochenwefel</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Ghislain Fourny</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://xbrl.io/modules/bizql/archives",prefix:"archives"},{uri:"http://xbrl.io/modules/bizql/components",prefix:"components"},{uri:"http://www.28msec.com/modules/credentials",prefix:"credentials"},{uri:"http://xbrl.io/modules/bizql/facts",prefix:"facts"},{uri:"http://xbrl.io/modules/bizql/profiles/sec/filings",prefix:"filings"},{uri:"http://xbrl.io/modules/bizql/hypercubes",prefix:"hypercubes"},{uri:"http://www.28msec.com/modules/mongodb",prefix:"mongo"},{uri:"http://xbrl.io/modules/bizql/networks",prefix:"networks"},{uri:"http://xbrl.io/modules/bizql/profiles/sec/core",prefix:"sec"},{uri:"http://xbrl.io/modules/bizql/profiles/sec/networks",prefix:"sec-networks"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"abstracts",qname:"sec-networks:abstracts",signature:"($networks-or-ids as item()*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns all SEC Abstracts contained in the supplied SEC Networks.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">SEC Abstracts are XBRL abstract primary items that may or may not be associated\n with a hypercube -- except those that are SEC LineItems (i.e., source of an all relation).</p>\n',summary:"<p>  Returns all SEC Abstracts contained in the supplied SEC Networks.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"networks-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of SEC Network objects, or their XBRL Component IDs.</div>'}],returns:{type:"object()*",description:"the SEC Abstracts."},errors:[]},{isDocumented:!0,arity:1,name:"axes",qname:"sec-networks:axes",signature:"($networks-or-ids as item()*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns all SEC Axes contained in the supplied SEC Networks.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">SEC Axes are XBRL dimensions.</p>\n',summary:"<p>  Returns all SEC Axes contained in the supplied SEC Networks.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"networks-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of SEC Network objects, or their XBRL Component IDs.</div>'}],returns:{type:"object()*",description:"the SEC Axes."},errors:[]},{isDocumented:!0,arity:1,name:"categories",qname:"sec-networks:categories",signature:"($networks-or-ids) as string*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Return the categories of the supplied SEC networks (Statement, Disclosure, Document or Schedule).</p>\n',summary:"<p>  Return the categories of the supplied SEC networks (Statement, Disclosure, Document or Schedule).</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"networks-or-ids",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of SEC Network objects, or their XBRL Component IDs.</div>'}],returns:{type:"string*",description:"the category of each network."},errors:[]},{isDocumented:!0,arity:1,name:"concepts",qname:"sec-networks:concepts",signature:"($networks-or-ids as item()*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns all SEC Concepts contained in the supplied SEC Networks.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">SEC Concepts are XBRL concrete primary items that may or may not be associated\n with a hypercube.</p>\n',summary:"<p>  Returns all SEC Concepts contained in the supplied SEC Networks.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"networks-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of SEC Network objects, or their XBRL Component IDs.</div>'}],returns:{type:"object()*",description:"the SEC Concepts."},errors:[]},{isDocumented:!0,arity:1,name:"disclosures",qname:"sec-networks:disclosures",signature:"($networks-or-ids as item()*) as string+",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the disclosures of the suplied networks.</p>\n',summary:"<p>  Returns the disclosures of the suplied networks.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"networks-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of SEC Network objects, or their XBRL Component IDs.</div>'}],returns:{type:"string+",description:'the disclosure names, or "UncategorizedInformation" if none.'},errors:[]},{isDocumented:!0,arity:1,name:"fact-tables",qname:"sec-networks:fact-tables",signature:"($networks-or-ids as item()*) as array()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves all facts belonging to the SEC Network.</p>\n',summary:"<p>  Retrieves all facts belonging to the SEC Network.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"networks-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of SEC Network objects, or their XBRL Component IDs.</div>'}],returns:{type:"array()",description:"a array populated with fact values."},errors:[]},{isDocumented:!0,arity:2,name:"fact-tables",qname:"sec-networks:fact-tables",signature:"($networks-or-ids as item()*, $options as object()?) as array()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves all facts belonging to the SEC Network.</p>\n',summary:"<p>  Retrieves all facts belonging to the SEC Network.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"networks-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of SEC Network objects, or their XBRL Component IDs.</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> <a href="core#standard_options">standard SEC BizQL options</a>.</div>'}],returns:{type:"array()",description:"a array of arrays filled with fact values."},errors:[]},{isDocumented:!0,arity:1,name:"facts",qname:"sec-networks:facts",signature:"($networks-or-ids as item()*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves all facts belonging to the SEC Network.</p>\n',summary:"<p>  Retrieves all facts belonging to the SEC Network.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"networks-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of SEC Network objects, or their XBRL Component IDs.</div>'}],returns:{type:"object()*",description:"a sequence of facts."},errors:[]},{isDocumented:!0,arity:2,name:"facts",qname:"sec-networks:facts",signature:"($networks-or-ids as item()*, $options as object()?) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves all facts belonging to the SEC Network.</p>\n',summary:"<p>  Retrieves all facts belonging to the SEC Network.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"networks-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of SEC Network objects, or their XBRL Component IDs.</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> <a href="core#standard_options">standard SEC BizQL options</a>.</div>'}],returns:{type:"object()*",description:"a sequence of facts."},errors:[]},{isDocumented:!0,arity:1,name:"line-items-report-elements",qname:"sec-networks:line-items-report-elements",signature:"($networks-or-ids as item()*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns all SEC LineItems report elements contained in the supplied SEC Networks.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This is not to be confused with the "line items" terminology, which includes all\n SEC Abstracts and SEC Concepts.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">SEC LineItems report elements are XBRL abstract primary items that are top-level in their\n association with an XBRL hypercube (source of an all relation).</p>\n',summary:"<p>  Returns all SEC LineItems report elements contained in the supplied SEC Networks.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"networks-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of SEC Network objects, or their XBRL Component IDs.</div>'}],returns:{type:"object()*",description:"the SEC LineItems report elements."},errors:[]},{isDocumented:!0,arity:1,name:"line-items",qname:"sec-networks:line-items",signature:"($networks-or-ids as item()*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns all SEC Line Items (Concepts and Abstracts) contained in the\n supplied SEC Networks. Not to be confused with the LineItems report element.</p>\n',summary:"<p>  Returns all SEC Line Items (Concepts and Abstracts) contained in the\n supplied SEC Networks.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"networks-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of SEC Network objects, or their XBRL Component IDs.</div>'}],returns:{type:"object()*",description:"the SEC Line Items."},errors:[]},{isDocumented:!0,arity:1,name:"members",qname:"sec-networks:members",signature:"($networks-or-ids as item()*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns all SEC Members contained in the supplied SEC Networks.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">SEC Members are XBRL members that are in the transitive closure of SEC Axes\n via the dimension-domain and domain-member relations.</p>\n',summary:"<p>  Returns all SEC Members contained in the supplied SEC Networks.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"networks-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of SEC Network objects, or their XBRL Component IDs.</div>'}],returns:{type:"object()*",description:"the SEC Members."},errors:[]},{isDocumented:!0,arity:1,name:"model-structures",qname:"sec-networks:model-structures",signature:"($networks-or-ids as item()*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Computes the model structure of the supplied SEC Network, which is a hierarchy\n of SEC Report Elements (Tables, Axes, Members, LineItems, Abstracts, Concepts).</p>\n',summary:"<p>  Computes the model structure of the supplied SEC Network, which is a hierarchy\n of SEC Report Elements (Tables, Axes, Members, LineItems, Abstracts, Concepts).</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"networks-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of SEC Network objects, or their XBRL Component IDs.</div>'}],returns:{type:"object()*",description:"the model structures of these SEC Networks."},errors:[]},{isDocumented:!0,arity:1,name:"networks-for-disclosures",qname:"sec-networks:networks-for-disclosures",signature:"($disclosures as string*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves all SEC Networks that bear the supplied disclosures.</p>\n',summary:"<p>  Retrieves all SEC Networks that bear the supplied disclosures.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"disclosures",type:"string",occurrence:"*",description:""}],returns:{type:"object()*",description:"all models that match one of the disclosures."},errors:[]},{isDocumented:!0,arity:2,name:"networks-for-filings-and-categories",qname:"sec-networks:networks-for-filings-and-categories",signature:"($archive-or-ids as item()*, $categories as string*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves all models that belong to the archives given as first\n parameter and that match the supplied category.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">A category can be any of "Statement", "Disclosure", "Document",\n "Schedule", or "Unknown".</p>\n',summary:"<p>  Retrieves all models that belong to the archives given as first\n parameter and that match the supplied category.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"archive-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> an arbitrary number of archive identifiers (AIDs) or archive objects.</div>'},{name:"categories",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a list of categories.</div>'}],returns:{type:"object()*",description:"all said models"},errors:[]},{isDocumented:!0,arity:2,name:"networks-for-filings-and-disclosures",qname:"sec-networks:networks-for-filings-and-disclosures",signature:"($archive-or-ids as item()*, $disclosures as string*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves all models that belong to the archives given as first\n parameter and that match the supplied disclosures.</p>\n',summary:"<p>  Retrieves all models that belong to the archives given as first\n parameter and that match the supplied disclosures.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"archive-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> an arbitrary number of archive identifiers (AIDs) or archive objects.</div>'},{name:"disclosures",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a list of disclosures.</div>'}],returns:{type:"object()*",description:"all models in the archives and that match one of the disclosures."},errors:[]},{isDocumented:!0,arity:1,name:"networks-for-filings",qname:"sec-networks:networks-for-filings",signature:"($archives-or-ids as item()*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves all SEC Networks in a given filing.</p>\n',summary:"<p>  Retrieves all SEC Networks in a given filing.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"archives-or-ids",type:"item()",occurrence:"*",description:""}],returns:{type:"object()*",description:"all networks in the supplied filings."},errors:[]},{isDocumented:!0,arity:1,name:"num-abstracts",qname:"sec-networks:num-abstracts",signature:"($networks-or-ids as item()*) as integer*",description:" Return the number of (distinct) SEC Abstracts in each of the given components.\n",summary:"<p> Return the number of (distinct) SEC Abstracts in each of the given components.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"networks-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> list of components or IDs</div>'}],returns:{type:"integer*",description:"the said number of abstracts"},errors:[]},{isDocumented:!0,arity:1,name:"num-axes",qname:"sec-networks:num-axes",signature:"($networks-or-ids as item()*) as integer*",description:" Return the number of (distinct) SEC Axes in each of the given components.\n",summary:"<p> Return the number of (distinct) SEC Axes in each of the given components.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"networks-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> list of components or IDs</div>'}],returns:{type:"integer*",description:"the said number of axes"},errors:[]},{isDocumented:!0,arity:1,name:"num-concepts",qname:"sec-networks:num-concepts",signature:"($networks-or-ids as item()*) as integer*",description:" Return the number of (distinct) SEC Concepts in each of the given components.\n",summary:"<p> Return the number of (distinct) SEC Concepts in each of the given components.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"networks-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> list of components or IDs</div>'}],returns:{type:"integer*",description:"the said number of concepts"},errors:[]},{isDocumented:!0,arity:1,name:"num-line-items",qname:"sec-networks:num-line-items",signature:"($networks-or-ids as item()*) as integer*",description:" Return the number of (distinct) SEC LineItems report elements in each of the given components.\n",summary:"<p> Return the number of (distinct) SEC LineItems report elements in each of the given components.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"networks-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> list of components or IDs</div>'}],returns:{type:"integer*",description:"the said number of line items"},errors:[]},{isDocumented:!0,arity:1,name:"num-members",qname:"sec-networks:num-members",signature:"($networks-or-ids as item()*) as integer*",description:" Return the number of (distinct) SEC Members in each of the given components.\n",summary:"<p> Return the number of (distinct) SEC Members in each of the given components.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"networks-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> list of components or IDs</div>'}],returns:{type:"integer*",description:"the said number of members"},errors:[]},{isDocumented:!0,arity:1,name:"num-report-elements",qname:"sec-networks:num-report-elements",signature:"($networks-or-ids as item()*) as integer*",description:" Return the number of (distinct) SEC report elements in each of the given components.\n",summary:"<p> Return the number of (distinct) SEC report elements in each of the given components.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"networks-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> list of components or IDs</div>'}],returns:{type:"integer*",description:"the said number of report elements"},errors:[]},{isDocumented:!0,arity:1,name:"num-tables",qname:"sec-networks:num-tables",signature:"($networks-or-ids as item()*) as integer*",description:" Return the number of SEC Tables in each of the given components.\n",summary:"<p> Return the number of SEC Tables in each of the given components.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"networks-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> list of components or IDs</div>'}],returns:{type:"integer*",description:"the said number of tables"},errors:[]},{isDocumented:!0,arity:1,name:"populated-model-structures",qname:"sec-networks:populated-model-structures",signature:"($networks-or-ids as item()*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves all facts belonging to the SEC Networks and populates the model structures.</p>\n',summary:"<p>  Retrieves all facts belonging to the SEC Networks and populates the model structures.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"networks-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of SEC Network objects, or their XBRL Component IDs.</div>'}],returns:{type:"object()*",description:"the populated model structures (Facts array fields)."},errors:[]},{isDocumented:!0,arity:2,name:"populated-model-structures",qname:"sec-networks:populated-model-structures",signature:"($networks-or-ids as item()*, $options as object()?) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves all facts belonging to the SEC Networks and populates the model structures.</p>\n',summary:"<p>  Retrieves all facts belonging to the SEC Networks and populates the model structures.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"networks-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of SEC Network objects, or their XBRL Component IDs.</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> <a href="core#standard_options">standard SEC BizQL options</a>.</div>'}],returns:{type:"object()*",description:"the populated model structures (Facts array fields)."},errors:[]},{isDocumented:!0,arity:1,name:"sub-categories",qname:"sec-networks:sub-categories",signature:"($networks-or-ids) as string*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Return the sub-categories of the supplied SEC networks (Detail, TextBlockLevel4, TextBLockLevel1to3).</p>\n',summary:"<p>  Return the sub-categories of the supplied SEC networks (Detail, TextBlockLevel4, TextBLockLevel1to3).</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"networks-or-ids",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of SEC Network objects, or their XBRL Component IDs.</div>'}],returns:{type:"string*",description:"the sub-category of each network."},errors:[]},{isDocumented:!0,arity:1,name:"summaries",qname:"sec-networks:summaries",signature:"($networks-or-ids) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Return summary information for the supplied SEC networks.</p>\n',summary:"<p>  Return summary information for the supplied SEC networks.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"networks-or-ids",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of SEC Network objects, or their XBRL Component IDs.</div>'}],returns:{type:"object()*",description:"one object per network, containing a summary."},errors:[]},{isDocumented:!0,arity:1,name:"tables",qname:"sec-networks:tables",signature:"($networks-or-ids as item()*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns all SEC Tables contained in the supplied SEC Networks.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">SEC Tables are XBRL hypercubes.</p>\n',summary:"<p>  Returns all SEC Tables contained in the supplied SEC Networks.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"networks-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of SEC Network objects, or their XBRL Component IDs.</div>'}],returns:{type:"object()*",description:"the SEC Tables."},errors:[]},{isDocumented:!0,arity:2,name:"tables",qname:"sec-networks:tables",signature:"($networks-or-ids as item()*, $options as object()?) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns all SEC Tables contained in the supplied SEC Networks.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">SEC Tables are XBRL hypercubes.</p>\n',summary:"<p>  Returns all SEC Tables contained in the supplied SEC Networks.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"networks-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of SEC Network objects, or their XBRL Component IDs.</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> <a href="core#standard_options">standard SEC BizQL options</a>.</div>'}],returns:{type:"object()*",description:"the SEC Tables."},errors:[]}],variables:[{name:"sec-networks:BALANCE_SHEET",type:"xs:string",description:" Disclosure for the balance sheet.\n"},{name:"sec-networks:BALANCE_SHEET_PARENTHETICAL",type:"xs:string",description:" Disclosure for the parenthetical balance sheet.\n"},{name:"sec-networks:INCOME_STATEMENT",type:"xs:string",description:" Disclosure for the income statement.\n"},{name:"sec-networks:INCOME_STATEMENT_PARENTHETICAL",type:"xs:string",description:" Disclosure for the parenthetical income statement.\n"},{name:"sec-networks:STATEMENT_OF_COMPREHENSIVE_INCOME",type:"xs:string",description:" Disclosure for the statement of comprehensive income.\n"},{name:"sec-networks:CASH_FLOW_STATEMENT",type:"xs:string",description:" Disclosure for the cash flow statement.\n"},{name:"sec-networks:CASH_FLOW_STATEMENT_PARENTHETICAL",type:"xs:string",description:" Disclosure for the parenthetical cash flow statement.\n"},{name:"sec-networks:DEFAULT_COMPONENT",type:"xs:string",description:" Disclosure for the default component.\n"},{name:"sec-networks:DOCUMENT_AND_ENTITY_INFO",type:"xs:string",description:" Disclosure for the document and entity information\n"}]},"http://www.28msec.com/modules/http/request":{ns:"http://www.28msec.com/modules/http/request",description:' The Sausalito request module provides functions for accessing\n information contained in the current HTTP request. For example,\n the <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">parameter-names</tt> function can be used to retrieve all\n the names of the parameters contained in a request.\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">28msec</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://www.28msec.com/modules/http/request",prefix:"request"},{uri:"http://www.zorba-xquery.com/modules/cryptography/hmac",prefix:"sec"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:0,name:"binary-content",qname:"request:binary-content",signature:"() as xs:base64Binary external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the content of the request as base64Binary.</p>\n',summary:"<p>  Returns the content of the request as base64Binary.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:base64Binary",description:"The content of the request as base64Binary."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:no-binary-content if the content contained in the body of the request cannot be treated as binary because it is a request with multipart or url-encoded content.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"binary-part",qname:"request:binary-part",signature:"($ref as xs:string) as xs:base64Binary external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the value of a part as base64Binary.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">A part is identified by a reference that is the value of a\n <tt>src</tt> attribute returned by the <tt>request:parts</tt> function.</p>\n',summary:"<p>  Returns the value of a part as base64Binary.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"ref",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the part</div>'}],returns:{type:"xs:base64Binary",description:"the value of the part as base64Binary"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:invalid-part if the part with the given name ($ref) does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:non-multipart if the current request does not contain multipart content</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:invalid-multipart if the multipart content is invalid (e.g. the boundary is missing)</xqdoc:error>']},{isDocumented:!0,arity:0,name:"content-length",qname:"request:content-length",signature:"() as xs:integer? external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the length of the content in bytes.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The value returned corresponds to the value of the HTTP\n content-length header. The function returns an empty sequence\n if this header does not exist in the request or its value\n could not be converted to item of type xs:integer</p>.\n',summary:"<p>  Returns the length of the content in bytes.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:integer?",description:"The content-length in bytes of the content sent with this request or the empty sequence if the content-length header does not exist in the request."},errors:[]},{isDocumented:!0,arity:0,name:"content-type",qname:"request:content-type",signature:"() as xs:string? external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the content-type of the data sent with this request.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Note that the content-type is only set for PUT and POST requests.</p>\n',summary:"<p>  Returns the content-type of the data sent with this request.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:string?",description:"The content-type of the request if it is a PUT or POST request. Otherwise, it returns the empty sequence."},errors:[]},{isDocumented:!0,arity:0,name:"header-accept",qname:"request:header-accept",signature:"() as element(request:accept)*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the values of the HTTP ACCEPT header.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The data is returned as a sequence of elements with name\n <tt>request:accept</tt> as shown in the following example.</p>\n <code xmlns:xqdoc="http://www.xqdoc.org/1.0">\n  &lt;request:accept xmlns:request="http://www.28msec.com/modules/http/request"&gt;\n    &lt;request:type&gt;text&lt;/request:type&gt;\n    &lt;request:subtype&gt;html&lt;/request:subtype&gt;\n    &lt;request:quality&gt;1&lt;/request:quality&gt;\n  &lt;/request:accept&gt;\n  &lt;request:accept xmlns="http://www.28msec.com/modules/http/request"&gt;\n    &lt;request:type&gt;application&lt;/request:type&gt;\n    &lt;request:quality&gt;0.9&lt;/request:quality&gt;\n  &lt;/request:accept&gt;\n </code>\n',summary:"<p>  Returns the values of the HTTP ACCEPT header.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"element(request:accept)*",description:"The header values of the header ACCEPT or the empty sequence if the header is not contained in the request. The order of the returned elements reflects the order of the components in the header."},errors:[]},{isDocumented:!0,arity:0,name:"header-names",qname:"request:header-names",signature:"() as xs:string* external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the names of all the HTTP headers in this request.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Header fields are colon-separated name-value pairs, terminated\n by a carriage return (CR) and line feed (LF) character sequence. The\n names and values of each header are allowed to consist of US-ASCII\n characters only.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The names of the headers are returned using upper-case letters.\n If a header with the same name is contained multiple times in a request,\n its name is only returned once. The order of the names in the resulting\n sequence does not reflect the order of the headers in the request. If\n a header does not have a value, it is as if the header does not exist\n in the request.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Note that the header names user-agent and content-type are not\n returned by this function. They are returned by the corresponding\n functions of this module module\n (e.g. <a href="#user-agent-0">user-agent</a>).</p>\n',summary:"<p>  Returns the names of all the HTTP headers in this request.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:string*",description:"The names of the headers of this request or the empty sequence if no headers are contained in the request."},errors:[]},{isDocumented:!0,arity:1,name:"header-value",qname:"request:header-value",signature:"($name as xs:string) as xs:string? external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the value of the HTTP header with the given name.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Header fields are colon-separated name-value pairs, terminated\n by a carriage return (CR) and line feed (LF) character sequence. The\n names and values of each header are allowed to consist of US-ASCII\n characters only.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Please note that header names are considered case-insensitive.\n Also note, that only one value is returned if multiple headers with the\n same names exist in the request. This value is a comma-separated list\n of the values of the headers in the order in which the headers appeared\n in the request.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">All headers having a name that starts with SAUSALITO_ are reserved\n and will not be returned by this function.</p>\n',summary:"<p>  Returns the value of the HTTP header with the given name.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The header name for which the value should be returned.</div>'}],returns:{type:"xs:string?",description:'The header value of the header with the <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">$name</tt> argument or the empty sequence if no header with that name is contained in the request.'},errors:[]},{isDocumented:!0,arity:0,name:"method-delete",qname:"request:method-delete",signature:"() as xs:boolean external",description:" Returns true if the HTTP method of this request is DELETE.\n",summary:"<p> Returns true if the HTTP method of this request is DELETE.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:boolean",description:"true if the HTTP method of this request is DELETE, false otherwise."},errors:[]},{isDocumented:!0,arity:0,name:"method-get",qname:"request:method-get",signature:"() as xs:boolean external",description:" Returns true if the HTTP method of this request is GET.\n",summary:"<p> Returns true if the HTTP method of this request is GET.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:boolean",description:"true if the HTTP method of this request is GET, false otherwise."},errors:[]},{isDocumented:!0,arity:0,name:"method-head",qname:"request:method-head",signature:"() as xs:boolean external",description:" Returns true if the HTTP method of this request is HEAD.\n",summary:"<p> Returns true if the HTTP method of this request is HEAD.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:boolean",description:"true if the HTTP method of this request is HEAD, false otherwise."},errors:[]},{isDocumented:!0,arity:0,name:"method-options",qname:"request:method-options",signature:"() as xs:boolean external",description:" Returns true if the HTTP method of this request is OPTION.\n",summary:"<p> Returns true if the HTTP method of this request is OPTION.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:boolean",description:"true if the HTTP method of this request is OPTION, false otherwise."},errors:[]},{isDocumented:!0,arity:0,name:"method-patch",qname:"request:method-patch",signature:"() as xs:boolean external",description:" Returns true if the HTTP method of this request is PATCH.\n",summary:"<p> Returns true if the HTTP method of this request is PATCH.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:boolean",description:"true if the HTTP method of this request is PATCH, false otherwise."},errors:[]},{isDocumented:!0,arity:0,name:"method-post",qname:"request:method-post",signature:"() as xs:boolean external",description:" Returns true if the HTTP method of this request is POST.\n",summary:"<p> Returns true if the HTTP method of this request is POST.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:boolean",description:"true if the HTTP method of this request is POST, false otherwise."},errors:[]},{isDocumented:!0,arity:0,name:"method-put",qname:"request:method-put",signature:"() as xs:boolean external",description:" Returns true if the HTTP method of this request is PUT.\n",summary:"<p> Returns true if the HTTP method of this request is PUT.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:boolean",description:"true if the HTTP method of this request is PUT, false otherwise."},errors:[]},{isDocumented:!0,arity:0,name:"method",qname:"request:method",signature:"() as xs:string external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the name of the HTTP method used to make this request.</p>\n',summary:"<p>  Returns the name of the HTTP method used to make this request.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:string",description:"The request method used to make this request (i.e. GET, POST, PUT, DELETE or HEAD)."},errors:[]},{isDocumented:!0,arity:0,name:"parameter-names",qname:"request:parameter-names",signature:"() as xs:string*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the names of the parameters contained in the current request.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Parameters are name-value pairs contained in the query string of the URL\n used to make this request. As defined in RFC 1738, the query string of a\n URL starts with a "?" character and ends with the character (if any).\n Additionally, such name-value pairs may be part of the request\'s body if\n it is a PUT or POST request and the content-type of the request is\n "application/x-www-form-urlencoded". Name-value pairs are separated\n using either the "&amp;" or the ";" character.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">In general, the names and the values  are precent-encoded. This function\n does the decoding of the parameters, i.e. it returns the values being\n not percent-encoded.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Also, the names of each parameter (after being precent-decoded) are\n treated as UTF-8. Please see the <tt>http:parameter-names#1</tt> function\n for retrieving parameter names submitted using a encoding other than UTF-8.\n </p>\n',summary:"<p>  Returns the names of the parameters contained in the current request.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:string*",description:"The names of all parameters in this request. The empty sequence is returned if there are none."},errors:[]},{isDocumented:!0,arity:1,name:"parameter-names",qname:"request:parameter-names",signature:"($encoding as xs:string) as xs:string* external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the names of the parameters contained in the current request.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is similar to the <tt>request:parameter-names#0</tt> function.\n However, the names are treated (after precent-decoding) using the\n given encoding supplied as parameter. For example, parameters might\n be encoded using the ISO-8859-1 encoding.</p>\n',summary:"<p>  Returns the names of the parameters contained in the current request.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"encoding",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The encoding of the parameters in the request (e.g. ISO-8859-1).</div>'}],returns:{type:"xs:string*",description:"The names of all parameters in this request. The empty sequence is returned if there are none."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:invalid-encoding if the given encoding is invalid or not supported.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"parameter-values",qname:"request:parameter-values",signature:"($name as xs:string) as xs:string*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns a sequence of parameter values for the given parameter name\n which are contained in the URL\'s query string or the body of a POST or PUT\n request.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Parameters are name-value pairs contained in the query string of the URL\n used to make this request. As defined in RFC 1738, the query string of a\n URL starts with a "?" character and ends with the character (if any).\n Additionally, such name-value pairs may be part of the request\'s body if\n it is a PUT or POST request and the content-type of the request is\n "application/x-www-form-urlencoded". Name-value pairs are separated\n using either the "&amp;" or the ";" character.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">In general, the names and the values  are precent-encoded. This function\n does the decoding of the parameters, i.e. it returns the values being\n not percent-encoded.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Also, the names and the values of each parameter (after being precent-decoded)\n are treated as UTF-8. Please see the <tt>http:parameter-values#3</tt> function\n for retrieving parameters submitted using a encoding other than UTF-8.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function returns the empty-sequence if no parameter with the\n given name exists in this request. If you want the function to return\n a default value other than the empty sequence, use the\n <tt>http:parameter-values#2</tt> function.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">A URL could contain the following query string:\n <tt>name1=value1&amp;name2=value2;name1=value3&amp;name3</tt>.\n <tt>name1=value1&amp;name2=value2&amp;name1=value3&amp;name3</tt>.\n The name value pairs in this query string are\n <ul>\n   <li> name: <tt>name1</tt>; values: <tt>value1</tt> and <tt>value3</tt></li>\n   <li> name: <tt>name2</tt>; value: <tt>value2</tt></li>\n   <li> name: <tt>name3</tt>; value: <tt/></li>\n </ul>\n </p>\n',summary:"<p>  Returns a sequence of parameter values for the given parameter name\n which are contained in the URL's query string or the body of a POST or PUT\n request.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the parameter whose value(s) should be returned.</div>'}],returns:{type:"xs:string*",description:"A sequence of values for the parameter with the given name. The empty sequence is returned if no parameter exists with the given name."},errors:[]},{isDocumented:!0,arity:2,name:"parameter-values",qname:"request:parameter-values",signature:"($name as xs:string, $default-values as xs:string*) as xs:string*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns a sequence of parameter values for the given parameter name\n which are contained in the URL\'s query string or the body of a POST or PUT\n request.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is similar to the <tt>request:parameter-values#1</tt> function.\n However, instead of returning the empty-sequence as a default value it returns\n the given default-values sequence if no parameter with the given name is found\n in this request.</p>\n',summary:"<p>  Returns a sequence of parameter values for the given parameter name\n which are contained in the URL's query string or the body of a POST or PUT\n request.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the parameter whose value(s) should be returned.</div>'},{name:"default-values",type:"xs:string",occurrence:"*",description:""}],returns:{type:"xs:string*",description:"A sequence of values for the parameter with the given name. The sequence given as $default-values parameter is returned if no parameter exists with the given name."},errors:[]},{isDocumented:!0,arity:3,name:"parameter-values",qname:"request:parameter-values",signature:"($name as xs:string, $default-values as xs:string*, $encoding as xs:string) as xs:string* external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns a sequence of parameter values for the given parameter name\n which are contained in the URL\'s query string or the body of a POST or PUT\n request.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is similar to the <tt>request:parameter-values#2</tt> function.\n However, the names and values are treated (after precent-decoding) using the\n given encoding supplied as third parameter. For example, parameters might\n be encoded using the ISO-8859-1 encoding.</p>\n',summary:"<p>  Returns a sequence of parameter values for the given parameter name\n which are contained in the URL's query string or the body of a POST or PUT\n request.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the parameter whose value(s) should be returned.</div>'},{name:"default-values",type:"xs:string",occurrence:"*",description:""},{name:"encoding",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The encoding of the parameters in the request (e.g. ISO-8859-1)</div>'}],returns:{type:"xs:string*",description:"A sequence of values for the parameter with the given name. The sequence given as $default-values parameter is returned if no parameter exists with the given name."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:invalid-encoding if the given encoding is invalid or not supported.</xqdoc:error>']},{isDocumented:!0,arity:0,name:"parts",qname:"request:parts",signature:"() as element(request:multipart) external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the metadata of all parts contained in a multipart request.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The data is returned as an element with name <tt>request:mulitpart</tt>\n as shown in the following example.</p>\n <code xmlns:xqdoc="http://www.xqdoc.org/1.0">\n  &lt;multipart xmlns="http://www.28msec.com/modules/http/request"\n    media-type="multipart/...; boundary=..."&gt;\n    &lt;header name="Content-Disposition" value=\'form-data; filename="..."\'/&gt;\n    &lt;header name="Content-Type" value="application/octet-stream"/&gt;\n    &lt;body filename="..." src="..."/&gt;\n    &lt;header name="Content-Disposition" value=\'form-data; filename="..."\'/&gt;\n    &lt;header name="Content-Type" value="application/octet-stream"/&gt;\n    &lt;body filename="..." src="..."/&gt;\n  &lt;/multipart&gt;\n </code>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The <tt>media-type</tt> is the type of the content as given in the\n request (i.e. it\'s value is equal to the value returned by\n <tt>request:header-values("Content-Type")</tt>).</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Within the <tt>multipart</tt> element is a sequence of\n (<tt>header</tt>*,<tt>body</tt>) elements. Each such group corresponds to\n one part. Every <tt>header</tt> belongs to a header for this part and the\n <tt>body</tt> refers to the value of a part. The actual value of a part\n can be retrieved by passing the value of the <tt>src</tt> attribute of\n the <tt>body</tt> to the <tt>request:text-part</tt> or\n <tt>request:binary-part</tt> functions. The other attributes of the\n <tt>body</tt> element represent a parameter of the Content-Disposition\n header as described in RFC 2183 (e.g. filename, name, creation-date).</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Please note that recursive multipart content is not supported.</p>\n',summary:"<p>  Returns the metadata of all parts contained in a multipart request.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"element(request:multipart)",description:"a multipart element representing the meta data of the multipart content"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:non-multipart if the current request does not contain multipart content</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:invalid-multipart if the multipart content is invalid (e.g. the boundary is missing)</xqdoc:error>']},{isDocumented:!0,arity:0,name:"path",qname:"request:path",signature:"() as xs:string",description:" Return the path component of the request URI. The path starts after the\n host and ends before the query string starts.\n",summary:"<p> Return the path component of the request URI.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:string",description:"The path component of the request URI"},errors:[]},{isDocumented:!0,arity:0,name:"query-string",qname:"request:query-string",signature:"() as xs:string external",description:" <p xmlns:xqdoc=\"http://www.xqdoc.org/1.0\">Returns the query string that was used to make this request.</p>\n <p xmlns:xqdoc=\"http://www.xqdoc.org/1.0\">The query string contains the part of the request URL that\n starts with the '?' character to the end or the starting of the\n fragment (i.e. the '#' character).</p>\n",summary:"<p>  Returns the query string that was used to make this request.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:string",description:"The query string part of the request's URL"},errors:[]},{isDocumented:!0,arity:0,name:"remote-addr",qname:"request:remote-addr",signature:"() as xs:string external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the IP address of the client to which this request\n is connected.</p>\n',summary:"<p>  Returns the IP address of the client to which this request\n is connected.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:string",description:"The IP address on the client side to which this request is connected."},errors:[]},{isDocumented:!0,arity:0,name:"remote-port",qname:"request:remote-port",signature:"() as xs:int external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the port of the client to which this request is connected.</p>\n',summary:"<p>  Returns the port of the client to which this request is connected.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:int",description:"The port on the client side to which this request is connected."},errors:[]},{isDocumented:!0,arity:0,name:"server-name",qname:"request:server-name",signature:"() as xs:string external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the server name of the server running the application.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The web server\'s hostname or IP address.</p>\n',summary:"<p>  Returns the server name of the server running the application.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:string",description:"The name of the server that runs the application accepting this request."},errors:[]},{isDocumented:!0,arity:0,name:"server-port",qname:"request:server-port",signature:"() as xs:int external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the sever port to which the client making the current request\n is connected.</p>\n',summary:"<p>  Returns the sever port to which the client making the current request\n is connected.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:int",description:"The server port to which the client is connected."},errors:[]},{isDocumented:!0,arity:0,name:"text-content",qname:"request:text-content",signature:"() as xs:string external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the content of the request as string.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function returns the content of the request only\n if the content-type refers to a type that can be treated\n as text (e.g. text/* or application/xml). The function raises\n an error if the content cannot be treated as text.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The text content is interpreted using the encoding/charset\n that is specified in the Content-Type header of the request. If\n no charset is specified, the default ISO-8859-1 is used. If a encoding\n other than the specified or default one should be used, the\n <tt>request:text-content#1</tt> function should be used.</p>\n',summary:"<p>  Returns the content of the request as string.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:string",description:"The content of the request as a string."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:invalid-encoding if the encoding specified in the Content-Type header is invalid or not supported.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:no-text-content if the content contained in the body of the request cannot be treated as text.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"text-content",qname:"request:text-content",signature:"($overwrite-encoding as xs:string) as xs:string external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the content of the request as string interpreting\n it with the given encoding.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function returns the content of the request only\n if the content-type refers to a type that can be treated\n as text (e.g. text/* or application/xml). The function raises\n an error if the content cannot be treated as text.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The text content is interpreted using the given encoding/charset.\n That is, the charset specified in the Content-Type header of the request\n is ignored. An error is raised if the given encoding is invalid\n or not supported.</p>\n',summary:"<p>  Returns the content of the request as string interpreting\n it with the given encoding.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"overwrite-encoding",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:string",description:"The content of the request as a string."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:invalid-encoding if the encoding specified in the Content-Type header or the $overwrite-encoding parameter is invalid or not supported.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:no-text-content if the content contained in the body of the request cannot be treated as text.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"text-part",qname:"request:text-part",signature:"($ref as xs:string) as xs:string external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the value of a part as string</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">A part is identified by a reference that is the value of a\n <tt>src</tt> attribute returned by the <tt>request:parts</tt> function.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The value of the text part is interpreted using the encoding/charset\n given in the headers of the part. If no encoding is given, the default\n US-ASCII is assumed.</p>\n',summary:"<p>  Returns the value of a part as string \n  A part is identified by a reference that is the value of a\n  src  attribute returned by the  request:parts  function.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"ref",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the part</div>'}],returns:{type:"xs:string",description:"the value of the part as string"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:invalid-encoding if the encoding given in the headers of the part is invalid or not supported.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:no-text-content if the value of the part cannot be treated as text</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:invalid-part if the part with the given name ($ref) does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:non-multipart if the current request does not contain multipart content</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:invalid-multipart if the multipart content is invalid (e.g. the boundary is missing)</xqdoc:error>']},{isDocumented:!0,arity:2,name:"text-part",qname:"request:text-part",signature:"($ref as xs:string, $overwrite-encoding as xs:string) as xs:string external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the value of a part as string interpreting\n it with the given encoding.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">A part is identified by a reference that is the value of a\n <tt>src</tt> attribute returned by the <tt>request:parts</tt> function.</p>\n',summary:"<p>  Returns the value of a part as string interpreting\n it with the given encoding.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"ref",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the part</div>'},{name:"overwrite-encoding",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:string",description:"the value of the part as string"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:invalid-encoding if the encoding given using the $overwrite-encoding parameter is invalid or not supported.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:no-text-content if the value of the part cannot be treated as text</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:invalid-part if the part with the given name ($ref) does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:non-multipart if the current request does not contain multipart content</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:invalid-multipart if the multipart content is invalid (e.g. the boundary is missing)</xqdoc:error>']},{isDocumented:!0,arity:0,name:"uri",qname:"request:uri",signature:"() as xs:string external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the URI that was used to make this request.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The value returned contains the part of the URL starting\n from the path to the end or the starting of the fragment (i.e.\n the \'#\' character).</p>\n',summary:"<p>  Returns the URI that was used to make this request.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:string",description:"The path and query string part of the request's URL"},errors:[]},{isDocumented:!0,arity:0,name:"user-agent",qname:"request:user-agent",signature:"() as xs:string? external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the user agent that made to perform the current request.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function returns the value of the User-Agent header\n contained in the current request.</p>\n',summary:"<p>  Returns the user agent that made to perform the current request.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:string?",description:"The user agent used to perform this request of the empty sequence if there was no User-Agent header in the request."},errors:[]}],variables:[]},"http://www.w3.org/2005/xpath-functions":{ns:"http://www.w3.org/2005/xpath-functions",description:" This module contains all the functions specified in the\n W3C XPath and XQuery Functions and Operators 3.0.\n",sees:['<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://www.w3.org/TR/xpath-functions-30/</xqdoc:see>'],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">www.w3c.org</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[],functions:[{isDocumented:!0,arity:2,name:"QName",qname:"fn:QName",signature:"($paramURI as xs:string?, $paramQName as xs:string) as xs:QName external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Constructs an <code>xs:QName</code> value given a namespace URI and a lexical\n             QName.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="QName" return-type="xs:QName" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="paramURI" type="xs:string?"/><arg name="paramQName" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The namespace URI in the returned QName is taken from <code>$paramURI</code>. If\n                <code>$paramURI</code> is the zero-length string or the empty sequence, it represents\n             "no namespace".</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The prefix (or absence of a prefix) in <code>$paramQName</code> is retained in the\n             returned <code>xs:QName</code> value.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The local name in the result is taken from the local part of\n             <code>$paramQName</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="CA" code="0002"/> if <code>$paramQName</code> does\n             not have the correct lexical form for an instance of <code>xs:QName</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="CA" code="0002"/> if <code>$paramURI</code> is the\n             zero-length string or the empty sequence, and the value of <code>$paramQName</code>\n             contains a colon (<code>:</code>).</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="G">A <phrase diff="add" at="L">dynamic</phrase> error <rfc2119>may</rfc2119> be raised <errorref class="CA" code="0002"/> if <code>$paramURI</code> is not a valid URI (XML Namespaces 1.0) or\n             IRI (XML Namespaces 1.1). </p></div>\n',summary:"<p>  Constructs an  xs:QName  value given a namespace URI and a lexical\n             QName.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"paramURI",type:"xs:string",occurrence:"?",description:""},{name:"paramQName",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:QName",description:""},errors:[]},{isDocumented:!0,arity:1,name:"abs",qname:"fn:abs",signature:"($arg as numeric?) as numeric? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the absolute value of <code>$arg</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="abs" return-type="numeric?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="numeric?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">General rules: see <specref ref="numeric-value-functions"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is negative the function returns <code>-$arg</code>, otherwise it\n             returns <code>$arg</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the type of <code>$arg</code> is one of the four numeric types <code>xs:float</code>,\n                <code>xs:double</code>, <code>xs:decimal</code> or <code>xs:integer</code> the type\n             of the result is the same as the type of <code>$arg</code>. If the type of\n                <code>$arg</code> is a type derived from one of the numeric types, the result is an\n             instance of the base numeric type.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">For <code>xs:float</code> and <code>xs:double</code> arguments, if the argument is\n             positive zero or negative zero, then positive zero is returned. If the argument is\n             positive or negative infinity, positive infinity is returned.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="del" at="F">For detailed type semantics, see [Formal Semantics].</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:abs(10.5)</code> returns <code>10.5</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:abs(-10.5)</code> returns <code>10.5</code>.</p></div>\n',summary:"<p>  Returns the absolute value of  $arg .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"numeric",occurrence:"?",description:""}],returns:{type:"numeric?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"adjust-date-to-timezone",qname:"fn:adjust-date-to-timezone",signature:"($arg as xs:date?) as xs:date? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Adjusts an <code>xs:date</code> value to a specific timezone, or to no timezone\n             at all; the result is the date in the target timezone that contains the starting instant\n             of the supplied date.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="adjust-date-to-timezone" return-type="xs:date?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:date?"/></proto></example><example role="signature"><proto name="adjust-date-to-timezone" return-type="xs:date?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:date?"/><arg name="timezone" type="xs:dayTimeDuration?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		implicit timezone.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$timezone</code> is not specified, then the effective value of\n                <code>$timezone</code> is the value of the implicit timezone in the dynamic\n             context.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$arg</code> is the empty sequence, then the function returns the empty\n             sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$arg</code> does not have a timezone component and <code>$timezone</code> is\n             the empty sequence, then the result is the value of <code>$arg</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$arg</code> does not have a timezone component and <code>$timezone</code> is\n             not the empty sequence, then the result is <code>$arg</code> with <code>$timezone</code>\n             as the timezone component.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$arg</code> has a timezone component and <code>$timezone</code> is the empty\n             sequence, then the result is the local value of <code>$arg</code> without its timezone\n             component.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$arg</code> has a timezone component and <code>$timezone</code> is not the\n             empty sequence, then the function returns the value of the expression:</p><ulist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>Let <code>$dt</code> be the value of <code>fn:dateTime($arg,\n                      xs:time(\'00:00:00\'))</code>.</p></item><item><p>Let <code>$adt</code> be the value of <code>fn:adjust-dateTime-to-timezone($dt,\n                      $timezone)</code></p></item><item><p>The function returns the value of <code>xs:date($adt)</code></p></item></ulist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DT" code="0003"/> if <code>$timezone</code> is less\n             than <code>-PT14H</code> or greater than <code>PT14H</code> or is not an integral number\n             of minutes.</p></div>\n',summary:"<p>  Adjusts an  xs:date  value to a specific timezone, or to no timezone\n             at all; the result is the date in the target timezone that contains the starting instant\n             of the supplied date.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:date",occurrence:"?",description:""}],returns:{type:"xs:date?",description:""},errors:[]},{isDocumented:!0,arity:2,name:"adjust-date-to-timezone",qname:"fn:adjust-date-to-timezone",signature:"($arg as xs:date?, $timezone as xs:dayTimeDuration?) as xs:date? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Adjusts an <code>xs:date</code> value to a specific timezone, or to no timezone\n             at all; the result is the date in the target timezone that contains the starting instant\n             of the supplied date.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="adjust-date-to-timezone" return-type="xs:date?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:date?"/></proto></example><example role="signature"><proto name="adjust-date-to-timezone" return-type="xs:date?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:date?"/><arg name="timezone" type="xs:dayTimeDuration?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		implicit timezone.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$timezone</code> is not specified, then the effective value of\n                <code>$timezone</code> is the value of the implicit timezone in the dynamic\n             context.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$arg</code> is the empty sequence, then the function returns the empty\n             sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$arg</code> does not have a timezone component and <code>$timezone</code> is\n             the empty sequence, then the result is the value of <code>$arg</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$arg</code> does not have a timezone component and <code>$timezone</code> is\n             not the empty sequence, then the result is <code>$arg</code> with <code>$timezone</code>\n             as the timezone component.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$arg</code> has a timezone component and <code>$timezone</code> is the empty\n             sequence, then the result is the local value of <code>$arg</code> without its timezone\n             component.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$arg</code> has a timezone component and <code>$timezone</code> is not the\n             empty sequence, then the function returns the value of the expression:</p><ulist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>Let <code>$dt</code> be the value of <code>fn:dateTime($arg,\n                      xs:time(\'00:00:00\'))</code>.</p></item><item><p>Let <code>$adt</code> be the value of <code>fn:adjust-dateTime-to-timezone($dt,\n                      $timezone)</code></p></item><item><p>The function returns the value of <code>xs:date($adt)</code></p></item></ulist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DT" code="0003"/> if <code>$timezone</code> is less\n             than <code>-PT14H</code> or greater than <code>PT14H</code> or is not an integral number\n             of minutes.</p></div>\n',summary:"<p>  Adjusts an  xs:date  value to a specific timezone, or to no timezone\n             at all; the result is the date in the target timezone that contains the starting instant\n             of the supplied date.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:date",occurrence:"?",description:""},{name:"timezone",type:"xs:dayTimeDuration",occurrence:"?",description:""}],returns:{type:"xs:date?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"adjust-dateTime-to-timezone",qname:"fn:adjust-dateTime-to-timezone",signature:"($arg as xs:dateTime?) as xs:dateTime external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Adjusts an <code>xs:dateTime</code> value to a specific timezone, or to no\n             timezone at all.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="adjust-dateTime-to-timezone" return-type="xs:dateTime?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:dateTime?"/></proto></example><example role="signature"><proto name="adjust-dateTime-to-timezone" return-type="xs:dateTime?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:dateTime?"/><arg name="timezone" type="xs:dayTimeDuration?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		implicit timezone.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$timezone</code> is not specified, then the effective value of\n                <code>$timezone</code> is the value of the implicit timezone in the dynamic\n             context.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$arg</code> is the empty sequence, then the function returns the empty\n             sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$arg</code> does not have a timezone component and <code>$timezone</code> is\n             the empty sequence, then the result is <code>$arg</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$arg</code> does not have a timezone component and <code>$timezone</code> is\n             not the empty sequence, then the result is <code>$arg</code> with <code>$timezone</code>\n             as the timezone component.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$arg</code> has a timezone component and <code>$timezone</code> is the empty\n             sequence, then the result is the local value of <code>$arg</code> without its timezone\n             component.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$arg</code> has a timezone component and <code>$timezone</code> is not the\n             empty sequence, then the result is the <code>xs:dateTime</code> value that is equal to\n                <code>$arg</code> and that has a timezone component equal to\n             <code>$timezone</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DT" code="0003"/> if <code>$timezone</code> is less\n             than <code>-PT14H</code> or greater than <code>PT14H</code> or is not an integral number\n             of minutes.</p></div>\n',summary:"<p>  Adjusts an  xs:dateTime  value to a specific timezone, or to no\n             timezone at all.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:dateTime",occurrence:"?",description:""}],returns:{type:"xs:dateTime",description:""},errors:[]},{isDocumented:!0,arity:2,name:"adjust-dateTime-to-timezone",qname:"fn:adjust-dateTime-to-timezone",signature:"($arg as xs:dateTime?, $timezone as xs:dayTimeDuration?) as xs:dateTime external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Adjusts an <code>xs:dateTime</code> value to a specific timezone, or to no\n             timezone at all.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="adjust-dateTime-to-timezone" return-type="xs:dateTime?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:dateTime?"/></proto></example><example role="signature"><proto name="adjust-dateTime-to-timezone" return-type="xs:dateTime?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:dateTime?"/><arg name="timezone" type="xs:dayTimeDuration?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		implicit timezone.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$timezone</code> is not specified, then the effective value of\n                <code>$timezone</code> is the value of the implicit timezone in the dynamic\n             context.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$arg</code> is the empty sequence, then the function returns the empty\n             sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$arg</code> does not have a timezone component and <code>$timezone</code> is\n             the empty sequence, then the result is <code>$arg</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$arg</code> does not have a timezone component and <code>$timezone</code> is\n             not the empty sequence, then the result is <code>$arg</code> with <code>$timezone</code>\n             as the timezone component.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$arg</code> has a timezone component and <code>$timezone</code> is the empty\n             sequence, then the result is the local value of <code>$arg</code> without its timezone\n             component.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$arg</code> has a timezone component and <code>$timezone</code> is not the\n             empty sequence, then the result is the <code>xs:dateTime</code> value that is equal to\n                <code>$arg</code> and that has a timezone component equal to\n             <code>$timezone</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DT" code="0003"/> if <code>$timezone</code> is less\n             than <code>-PT14H</code> or greater than <code>PT14H</code> or is not an integral number\n             of minutes.</p></div>\n',summary:"<p>  Adjusts an  xs:dateTime  value to a specific timezone, or to no\n             timezone at all.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:dateTime",occurrence:"?",description:""},{name:"timezone",type:"xs:dayTimeDuration",occurrence:"?",description:""}],returns:{type:"xs:dateTime",description:""},errors:[]},{isDocumented:!0,arity:1,name:"adjust-time-to-timezone",qname:"fn:adjust-time-to-timezone",signature:"($arg as xs:time?) as xs:time? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Adjusts an <code>xs:time</code> value to a specific timezone, or to no timezone\n             at all.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="adjust-time-to-timezone" return-type="xs:time?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:time?"/></proto></example><example role="signature"><proto name="adjust-time-to-timezone" return-type="xs:time?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:time?"/><arg name="timezone" type="xs:dayTimeDuration?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		implicit timezone.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$timezone</code> is not specified, then the effective value of\n                <code>$timezone</code> is the value of the implicit timezone in the dynamic\n             context.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$arg</code> is the empty sequence, then the function returns the empty\n             sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$arg</code> does not have a timezone component and <code>$timezone</code> is\n             the empty sequence, then the result is <code>$arg</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$arg</code> does not have a timezone component and <code>$timezone</code> is\n             not the empty sequence, then the result is <code>$arg</code> with <code>$timezone</code>\n             as the timezone component.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$arg</code> has a timezone component and <code>$timezone</code> is the empty\n             sequence, then the result is the localized value of <code>$arg</code> without its\n             timezone component.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$arg</code> has a timezone component and <code>$timezone</code> is not the\n             empty sequence, then:</p><ulist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>Let <code>$dt</code> be the <code>xs:dateTime</code> value\n                      <code>fn:dateTime(xs:date(\'1972-12-31\'), $arg)</code>.</p></item><item><p>Let <code>$adt</code> be the value of <code>fn:adjust-dateTime-to-timezone($dt,\n                      $timezone)</code>\n                </p></item><item><p>The function returns the <code>xs:time</code> value\n                   <code>xs:time($adt)</code>.</p></item></ulist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DT" code="0003"/> if <code>$timezone</code> is less\n             than <code>-PT14H</code> or greater than <code>PT14H</code> or if does not contain an\n             integral number of minutes.</p></div>\n',summary:"<p>  Adjusts an  xs:time  value to a specific timezone, or to no timezone\n             at all.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:time",occurrence:"?",description:""}],returns:{type:"xs:time?",description:""},errors:[]},{isDocumented:!0,arity:2,name:"adjust-time-to-timezone",qname:"fn:adjust-time-to-timezone",signature:"($arg as xs:time?, $timezone as xs:dayTimeDuration?) as xs:time? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Adjusts an <code>xs:time</code> value to a specific timezone, or to no timezone\n             at all.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="adjust-time-to-timezone" return-type="xs:time?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:time?"/></proto></example><example role="signature"><proto name="adjust-time-to-timezone" return-type="xs:time?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:time?"/><arg name="timezone" type="xs:dayTimeDuration?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		implicit timezone.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$timezone</code> is not specified, then the effective value of\n                <code>$timezone</code> is the value of the implicit timezone in the dynamic\n             context.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$arg</code> is the empty sequence, then the function returns the empty\n             sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$arg</code> does not have a timezone component and <code>$timezone</code> is\n             the empty sequence, then the result is <code>$arg</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$arg</code> does not have a timezone component and <code>$timezone</code> is\n             not the empty sequence, then the result is <code>$arg</code> with <code>$timezone</code>\n             as the timezone component.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$arg</code> has a timezone component and <code>$timezone</code> is the empty\n             sequence, then the result is the localized value of <code>$arg</code> without its\n             timezone component.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$arg</code> has a timezone component and <code>$timezone</code> is not the\n             empty sequence, then:</p><ulist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>Let <code>$dt</code> be the <code>xs:dateTime</code> value\n                      <code>fn:dateTime(xs:date(\'1972-12-31\'), $arg)</code>.</p></item><item><p>Let <code>$adt</code> be the value of <code>fn:adjust-dateTime-to-timezone($dt,\n                      $timezone)</code>\n                </p></item><item><p>The function returns the <code>xs:time</code> value\n                   <code>xs:time($adt)</code>.</p></item></ulist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DT" code="0003"/> if <code>$timezone</code> is less\n             than <code>-PT14H</code> or greater than <code>PT14H</code> or if does not contain an\n             integral number of minutes.</p></div>\n',summary:"<p>  Adjusts an  xs:time  value to a specific timezone, or to no timezone\n             at all.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:time",occurrence:"?",description:""},{name:"timezone",type:"xs:dayTimeDuration",occurrence:"?",description:""}],returns:{type:"xs:time?",description:""},errors:[]},{isDocumented:!0,arity:2,name:"analyze-string",qname:"fn:analyze-string",signature:"($input as xs:string?, $pattern as xs:string) as element(fn:analyze-string-result) external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Analyzes a string using a regular expression, returning an XML structure that\n             identifies which parts of the input string matched or failed to match the regular\n             expression, and in the case of matched substrings, which substrings matched each\n             capturing group in the regular expression.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="analyze-string" return-type="element(fn:analyze-string-result)" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="input" type="xs:string?"/><arg name="pattern" type="xs:string"/></proto></example><example role="signature"><proto name="analyze-string" return-type="element(fn:analyze-string-result)" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="input" type="xs:string?"/><arg name="pattern" type="xs:string"/><arg name="flags" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-nondeterministic">nondeterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The effect of calling the first version of this function (omitting the argument\n                <code>$flags</code>) is the same as the effect of calling the second version with the\n                <code>$flags</code> argument set to a zero-length string. Flags are defined in\n                <specref ref="flags"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The <code>$flags</code> argument is interpreted in the same way as for the\n                <code>fn:matches</code> function.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$input</code> is the empty sequence the function behaves as if\n                <code>$input</code> were the zero-length string. In this situation the result will be\n             an element node with no children.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns an element node whose local name is\n                <code>analyze-string-result</code>. This element and all its descendant elements have\n             the namespace URI <code>http://www.w3.org/2005/xpath-functions</code>. The namespace\n             prefix is <termref def="implementation-dependent"/>. The children of this element are a\n             sequence of <code>fn:match</code> and <code>fn:non-match</code> elements. This sequence\n             is formed by breaking the <code>$input</code> string into a sequence of strings,\n             returning any substring that matches <code>$pattern</code> as the content of a\n                <code>match</code> element, and any intervening substring as the content of a\n                <code>non-match</code> element.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">More specifically, the function starts at the beginning of the input string and attempts\n             to find the first substring that matches the regular expression. If there are several\n             matches, the first match is defined to be the one whose starting position comes first in\n             the string. If several alternatives within the regular expression both match at the same\n             position in the input string, then the match that is chosen is the first alternative\n             that matches. For example, if the input string is <code>The quick brown fox jumps</code>\n             and the regular expression is <code>jump|jumps</code>, then the match that is chosen is\n                <code>jump</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Having found the first match, the instruction proceeds to find the second and subsequent\n             matches by repeating the search, starting at the first <termref def="character">character</termref> that was not included in the previous match.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The input string is thus partitioned into a sequence of substrings, some of which match\n             the regular expression, others which do not match it. Each substring will contain at\n             least one character. This sequence is represented in the result by the sequence of\n                <code>fn:match</code> and <code>fn:non-match</code> children of the returned element\n             node; the string value of the <code>fn:match</code> or <code>fn:non-match</code> element\n             will be the corresponding substring of <code>$input</code>, and the string value of the\n             returned element node will therefore be the same as <code>$input</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The content of an <code>fn:non-match</code> element is always a single text node.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The content of a <code>fn:match</code> element, however, is in general a sequence of\n             text nodes and <code>fn:group</code> element children. An <code>fn:group</code> element\n             with a <code>nr</code> attribute having the integer value <var>N</var> identifies the\n             substring captured by the <var>Nth</var> parenthesized sub-expression in the regular\n             expression. For each capturing subexpression there will be at most one corresponding\n                <code>fn:group</code> element in each <code>fn:match</code> element in the\n             result.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the function is called twice with the same arguments, it is <termref def="implementation-dependent"/> whether the two calls return the same element node\n             or distinct (but deep equal) element nodes. In this respect it is\n             <termref def="nondeterministic">nondeterministic</termref>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="J">The base URI of the element nodes in the result is\n          <termref def="implementation-dependent"/></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A schema is defined for the structure of the returned element, containing the\n             definitions below. The returned element and its descendants will have type annotations\n             obtained by validating the returned element against this schema, unless the function is\n             used in an environment where type annotations are not supported (for example, a Basic\n             XSLT Processor), in which case the elements will all be annotated as\n                <code>xs:untyped</code> and the attributes as <code>xs:untypedAtomic</code>.</p><note xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><p diff="add" at="M">A free-standing copy of this schema can be found at <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="analyze-string.xsd" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">analyze-string.xsd</loc></p></note><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">\n             <eg xml:space="preserve">&lt;?xml version="1.0" encoding="UTF-8"?&gt;\n &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"\n     targetNamespace="http://www.w3.org/2005/xpath-functions"\n     xmlns:fn="http://www.w3.org/2005/xpath-functions"\n     elementFormDefault="qualified"&gt;\n     &lt;xs:element name="analyze-string-result" type="fn:analyze-string-result-type"/&gt;\n     &lt;xs:element name="match" type="fn:match-type"/&gt;\n     &lt;xs:element name="non-match" type="xs:string"/&gt;\n     &lt;xs:element name="group" type="fn:group-type"/&gt;\n     &lt;xs:complexType name="analyze-string-result-type" mixed="true"&gt;\n         &lt;xs:choice minOccurs="0" maxOccurs="unbounded"&gt;\n             &lt;xs:element ref="fn:match"/&gt;\n             &lt;xs:element ref="fn:non-match"/&gt;\n         &lt;/xs:choice&gt;\n     &lt;/xs:complexType&gt;\n     &lt;xs:complexType name="match-type" mixed="true"&gt;\n         &lt;xs:sequence&gt;\n             &lt;xs:element ref="fn:group" minOccurs="0" maxOccurs="unbounded"/&gt;\n         &lt;/xs:sequence&gt;\n     &lt;/xs:complexType&gt;\n     &lt;xs:complexType name="group-type" mixed="true"&gt;\n         &lt;xs:sequence&gt;\n             &lt;xs:element ref="fn:group" minOccurs="0" maxOccurs="unbounded"/&gt;\n         &lt;/xs:sequence&gt;\n         &lt;xs:attribute name="nr" type="xs:positiveInteger"/&gt;\n     &lt;/xs:complexType&gt;\n &lt;/xs:schema&gt;\n </eg>\n          </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0002"/> if the value of\n                <code>$pattern</code> is invalid according to the rules described in section <specref ref="regex-syntax"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0001"/> if the value of\n                <code>$flags</code> is invalid according to the rules described in section <specref ref="regex-syntax"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0003"/> if the supplied\n                <code>$pattern</code> matches a zero-length string, that is, if <code>fn:matches("",\n                $pattern, $flags)</code> returns <code>true</code>.</p></div>\n',summary:"<p>  Analyzes a string using a regular expression, returning an XML structure that\n             identifies which parts of the input string matched or failed to match the regular\n             expression, and in the case of matched substrings, which substrings matched each\n             capturing group in the regular expression.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"input",type:"xs:string",occurrence:"?",description:""},{name:"pattern",type:"xs:string",occurrence:null,description:""}],returns:{type:"element(fn:analyze-string-result)",description:""},errors:[]},{isDocumented:!0,arity:3,name:"analyze-string",qname:"fn:analyze-string",signature:"($input as xs:string?, $pattern as xs:string, $flags as xs:string) as element(fn:analyze-string-result) external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Analyzes a string using a regular expression, returning an XML structure that\n             identifies which parts of the input string matched or failed to match the regular\n             expression, and in the case of matched substrings, which substrings matched each\n             capturing group in the regular expression.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="analyze-string" return-type="element(fn:analyze-string-result)" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="input" type="xs:string?"/><arg name="pattern" type="xs:string"/></proto></example><example role="signature"><proto name="analyze-string" return-type="element(fn:analyze-string-result)" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="input" type="xs:string?"/><arg name="pattern" type="xs:string"/><arg name="flags" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-nondeterministic">nondeterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The effect of calling the first version of this function (omitting the argument\n                <code>$flags</code>) is the same as the effect of calling the second version with the\n                <code>$flags</code> argument set to a zero-length string. Flags are defined in\n                <specref ref="flags"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The <code>$flags</code> argument is interpreted in the same way as for the\n                <code>fn:matches</code> function.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$input</code> is the empty sequence the function behaves as if\n                <code>$input</code> were the zero-length string. In this situation the result will be\n             an element node with no children.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns an element node whose local name is\n                <code>analyze-string-result</code>. This element and all its descendant elements have\n             the namespace URI <code>http://www.w3.org/2005/xpath-functions</code>. The namespace\n             prefix is <termref def="implementation-dependent"/>. The children of this element are a\n             sequence of <code>fn:match</code> and <code>fn:non-match</code> elements. This sequence\n             is formed by breaking the <code>$input</code> string into a sequence of strings,\n             returning any substring that matches <code>$pattern</code> as the content of a\n                <code>match</code> element, and any intervening substring as the content of a\n                <code>non-match</code> element.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">More specifically, the function starts at the beginning of the input string and attempts\n             to find the first substring that matches the regular expression. If there are several\n             matches, the first match is defined to be the one whose starting position comes first in\n             the string. If several alternatives within the regular expression both match at the same\n             position in the input string, then the match that is chosen is the first alternative\n             that matches. For example, if the input string is <code>The quick brown fox jumps</code>\n             and the regular expression is <code>jump|jumps</code>, then the match that is chosen is\n                <code>jump</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Having found the first match, the instruction proceeds to find the second and subsequent\n             matches by repeating the search, starting at the first <termref def="character">character</termref> that was not included in the previous match.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The input string is thus partitioned into a sequence of substrings, some of which match\n             the regular expression, others which do not match it. Each substring will contain at\n             least one character. This sequence is represented in the result by the sequence of\n                <code>fn:match</code> and <code>fn:non-match</code> children of the returned element\n             node; the string value of the <code>fn:match</code> or <code>fn:non-match</code> element\n             will be the corresponding substring of <code>$input</code>, and the string value of the\n             returned element node will therefore be the same as <code>$input</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The content of an <code>fn:non-match</code> element is always a single text node.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The content of a <code>fn:match</code> element, however, is in general a sequence of\n             text nodes and <code>fn:group</code> element children. An <code>fn:group</code> element\n             with a <code>nr</code> attribute having the integer value <var>N</var> identifies the\n             substring captured by the <var>Nth</var> parenthesized sub-expression in the regular\n             expression. For each capturing subexpression there will be at most one corresponding\n                <code>fn:group</code> element in each <code>fn:match</code> element in the\n             result.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the function is called twice with the same arguments, it is <termref def="implementation-dependent"/> whether the two calls return the same element node\n             or distinct (but deep equal) element nodes. In this respect it is\n             <termref def="nondeterministic">nondeterministic</termref>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="J">The base URI of the element nodes in the result is\n          <termref def="implementation-dependent"/></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A schema is defined for the structure of the returned element, containing the\n             definitions below. The returned element and its descendants will have type annotations\n             obtained by validating the returned element against this schema, unless the function is\n             used in an environment where type annotations are not supported (for example, a Basic\n             XSLT Processor), in which case the elements will all be annotated as\n                <code>xs:untyped</code> and the attributes as <code>xs:untypedAtomic</code>.</p><note xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><p diff="add" at="M">A free-standing copy of this schema can be found at <loc xmlns:xlink="http://www.w3.org/1999/xlink" href="analyze-string.xsd" xlink:type="simple" xlink:show="replace" xlink:actuate="onRequest">analyze-string.xsd</loc></p></note><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">\n             <eg xml:space="preserve">&lt;?xml version="1.0" encoding="UTF-8"?&gt;\n &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"\n     targetNamespace="http://www.w3.org/2005/xpath-functions"\n     xmlns:fn="http://www.w3.org/2005/xpath-functions"\n     elementFormDefault="qualified"&gt;\n     &lt;xs:element name="analyze-string-result" type="fn:analyze-string-result-type"/&gt;\n     &lt;xs:element name="match" type="fn:match-type"/&gt;\n     &lt;xs:element name="non-match" type="xs:string"/&gt;\n     &lt;xs:element name="group" type="fn:group-type"/&gt;\n     &lt;xs:complexType name="analyze-string-result-type" mixed="true"&gt;\n         &lt;xs:choice minOccurs="0" maxOccurs="unbounded"&gt;\n             &lt;xs:element ref="fn:match"/&gt;\n             &lt;xs:element ref="fn:non-match"/&gt;\n         &lt;/xs:choice&gt;\n     &lt;/xs:complexType&gt;\n     &lt;xs:complexType name="match-type" mixed="true"&gt;\n         &lt;xs:sequence&gt;\n             &lt;xs:element ref="fn:group" minOccurs="0" maxOccurs="unbounded"/&gt;\n         &lt;/xs:sequence&gt;\n     &lt;/xs:complexType&gt;\n     &lt;xs:complexType name="group-type" mixed="true"&gt;\n         &lt;xs:sequence&gt;\n             &lt;xs:element ref="fn:group" minOccurs="0" maxOccurs="unbounded"/&gt;\n         &lt;/xs:sequence&gt;\n         &lt;xs:attribute name="nr" type="xs:positiveInteger"/&gt;\n     &lt;/xs:complexType&gt;\n &lt;/xs:schema&gt;\n </eg>\n          </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0002"/> if the value of\n                <code>$pattern</code> is invalid according to the rules described in section <specref ref="regex-syntax"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0001"/> if the value of\n                <code>$flags</code> is invalid according to the rules described in section <specref ref="regex-syntax"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0003"/> if the supplied\n                <code>$pattern</code> matches a zero-length string, that is, if <code>fn:matches("",\n                $pattern, $flags)</code> returns <code>true</code>.</p></div>\n',summary:"<p>  Analyzes a string using a regular expression, returning an XML structure that\n             identifies which parts of the input string matched or failed to match the regular\n             expression, and in the case of matched substrings, which substrings matched each\n             capturing group in the regular expression.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"input",type:"xs:string",occurrence:"?",description:""},{name:"pattern",type:"xs:string",occurrence:null,description:""},{name:"flags",type:"xs:string",occurrence:null,description:""}],returns:{type:"element(fn:analyze-string-result)",description:""},errors:[]},{isDocumented:!0,arity:0,name:"available-environment-variables",qname:"fn:available-environment-variables",signature:"() as xs:string* external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns a list of environment variable names that are suitable for passing to\n                <code>fn:environment-variable</code>, as a (possibly empty) sequence of strings.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="available-environment-variables" return-type="xs:string*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		environment variables.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns a sequence of strings, being the names of the environment variables\n             in the dynamic context in some <termref def="implementation-dependent">implementation-dependent</termref> order.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function is <termref def="dt-deterministic">deterministic</termref>: that is, the\n             set of available environment variables does not vary during evaluation.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns a list of strings, containing no duplicates.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">It is intended that the strings in this list should be suitable for passing to\n                <code>fn:environment-variable</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">See also the note on security under the definition of the\n                <code>fn:environment-variable</code> function. If access to environment variables has\n             been disabled, <code>fn:available-environment-variables</code> always returns the empty\n             sequence.</p></div>\n',summary:"<p>  Returns a list of environment variable names that are suitable for passing to\n                 fn:environment-variable , as a (possibly empty) sequence of strings.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:string*",description:""},errors:[]},{isDocumented:!0,arity:0,name:"available-environment-variables",qname:"fn:available-environment-variables",signature:"() as xs:string* external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns a list of environment variable names that are suitable for passing to\n                <code>fn:environment-variable</code>, as a (possibly empty) sequence of strings.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="available-environment-variables" return-type="xs:string*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		environment variables.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns a sequence of strings, being the names of the environment variables\n             in the dynamic context in some <termref def="implementation-dependent">implementation-dependent</termref> order.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function is <termref def="dt-deterministic">deterministic</termref>: that is, the\n             set of available environment variables does not vary during evaluation.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns a list of strings, containing no duplicates.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">It is intended that the strings in this list should be suitable for passing to\n                <code>fn:environment-variable</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">See also the note on security under the definition of the\n                <code>fn:environment-variable</code> function. If access to environment variables has\n             been disabled, <code>fn:available-environment-variables</code> always returns the empty\n             sequence.</p></div>\n',summary:"<p>  Returns a list of environment variable names that are suitable for passing to\n                 fn:environment-variable , as a (possibly empty) sequence of strings.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:string*",description:""},errors:[]},{isDocumented:!0,arity:1,name:"avg",qname:"fn:avg",signature:"($arg as xs:anyAtomicType*) as xs:anyAtomicType? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the average of the values in the input sequence <code>$arg</code>, that\n             is, the sum of the values divided by the number of values.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="avg" return-type="xs:anyAtomicType?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:anyAtomicType*"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, the empty sequence is returned.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> contains values of type <code>xs:untypedAtomic</code> they are cast\n             to <code>xs:double</code>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Duration values must either all be <code>xs:yearMonthDuration</code> values or must all\n             be <code>xs:dayTimeDuration</code> values. For numeric values, the numeric promotion\n             rules defined in <specref ref="op.numeric"/> are used to promote all values to a single\n             common type. After these operations, <code>$arg</code> must contain items of a single\n             type, which must be one of the four numeric types, <code>xs:yearMonthDuration</code> or\n                <code>xs:dayTimeDuration</code> or one if its subtypes.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns the average of the values as <code>sum($arg) div\n             count($arg)</code>; but the implementation may use an otherwise equivalent algorithm\n             that avoids arithmetic overflow.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="del" at="F">For detailed type semantics, see [Formal Semantics].</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A type error is raised <errorref class="RG" code="0006"/> if the input sequence contains\n             items of incompatible types, as described above.</p></div>\n',summary:"<p>  Returns the average of the values in the input sequence  $arg , that\n             is, the sum of the values divided by the number of values.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:anyAtomicType",occurrence:"*",description:""}],returns:{type:"xs:anyAtomicType?",description:""},errors:[]},{isDocumented:!0,arity:0,name:"base-uri",qname:"fn:base-uri",signature:"() as xs:anyURI? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the base URI of a node.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="base-uri" return-type="xs:anyURI?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example><example role="signature"><proto name="base-uri" return-type="xs:anyURI?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="node()?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The zero-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-dependent">focus-dependent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="B">The zero-argument version of the function returns the base URI of the\n             context node: it is equivalent to calling <code>fn:base-uri(.)</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="B">The single-argument version of the function behaves as follows:</p><olist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item>If <code>$arg</code> is the empty sequence, the function returns the empty\n                sequence.</item><item>Otherwise, the function returns the value of the <code>dm:base-uri</code> accessor\n                applied to the node <code>$arg</code>. This accessor is defined, for each kind of\n                node, in the XDM specification (See <xspecref spec="DM30" ref="dm-base-uri"/>).</item></olist><note xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">As explained in XDM, document, element and processing-instruction nodes have a\n             base-uri property which may be empty. The base-uri property for all other node kinds is\n             the empty sequence. The dm:base-uri accessor returns the base-uri property of a node if\n             it exists and is non-empty; otherwise it returns the result of applying the dm:base-uri\n             accessor to its parent, recursively. If the node does not have a parent, or if the\n             recursive ascent up the ancestor chain encounters a parentless node whose base-uri\n             property is empty, the empty sequence is returned. In the case of namespace nodes,\n             however, the result is always an empty sequence -- it does not depend on the base URI of\n             the parent element.</note><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">See also <code>fn:static-base-uri</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The following errors may be raised when <code>$arg</code> is omitted:</p><ul xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><li><p>If the context\n                item is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>, <phrase diff="add" at="M">dynamic error</phrase>\n                <xerrorref spec="XP" class="DY" code="0002" type="dynamic"/></p></li><li><p>If the context item is not a\n                node, <phrase diff="add" at="M">type error</phrase> <xerrorref spec="XP" class="TY" code="0004" type="type"/>.</p></li></ul></div>\n',summary:"<p>  Returns the base URI of a node.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:anyURI?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"base-uri",qname:"fn:base-uri",signature:"($arg as node()?) as xs:anyURI? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the base URI of a node.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="base-uri" return-type="xs:anyURI?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example><example role="signature"><proto name="base-uri" return-type="xs:anyURI?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="node()?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The zero-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-dependent">focus-dependent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="B">The zero-argument version of the function returns the base URI of the\n             context node: it is equivalent to calling <code>fn:base-uri(.)</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="B">The single-argument version of the function behaves as follows:</p><olist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item>If <code>$arg</code> is the empty sequence, the function returns the empty\n                sequence.</item><item>Otherwise, the function returns the value of the <code>dm:base-uri</code> accessor\n                applied to the node <code>$arg</code>. This accessor is defined, for each kind of\n                node, in the XDM specification (See <xspecref spec="DM30" ref="dm-base-uri"/>).</item></olist><note xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">As explained in XDM, document, element and processing-instruction nodes have a\n             base-uri property which may be empty. The base-uri property for all other node kinds is\n             the empty sequence. The dm:base-uri accessor returns the base-uri property of a node if\n             it exists and is non-empty; otherwise it returns the result of applying the dm:base-uri\n             accessor to its parent, recursively. If the node does not have a parent, or if the\n             recursive ascent up the ancestor chain encounters a parentless node whose base-uri\n             property is empty, the empty sequence is returned. In the case of namespace nodes,\n             however, the result is always an empty sequence -- it does not depend on the base URI of\n             the parent element.</note><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">See also <code>fn:static-base-uri</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The following errors may be raised when <code>$arg</code> is omitted:</p><ul xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><li><p>If the context\n                item is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>, <phrase diff="add" at="M">dynamic error</phrase>\n                <xerrorref spec="XP" class="DY" code="0002" type="dynamic"/></p></li><li><p>If the context item is not a\n                node, <phrase diff="add" at="M">type error</phrase> <xerrorref spec="XP" class="TY" code="0004" type="type"/>.</p></li></ul></div>\n',summary:"<p>  Returns the base URI of a node.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"node()",occurrence:"?",description:""}],returns:{type:"xs:anyURI?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"boolean",qname:"fn:boolean",signature:"($arg as item()*) as xs:boolean external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Computes the effective boolean value of the sequence <code>$arg</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="boolean" return-type="xs:boolean" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="item()*"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function computes the effective boolean value of a sequence, defined according to\n             the following rules. See also <xspecref spec="XP30" ref="id-ebv"/>.</p><ulist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>If <code>$arg</code> is the empty sequence, <code>fn:boolean</code> returns\n                      <code>false</code>.</p></item><item><p>If <code>$arg</code> is a sequence whose first item is a node,\n                      <code>fn:boolean</code> returns <code>true</code>.</p></item><item><p>If <code>$arg</code> is a singleton value of type <code>xs:boolean</code> or a\n                   derived from <code>xs:boolean</code>, <code>fn:boolean</code> returns\n                      <code>$arg</code>.</p></item><item><p>If <code>$arg</code> is a singleton value of type <code>xs:string</code> or a type\n                   derived from <code>xs:string</code>, <code>xs:anyURI</code> or a type derived from\n                      <code>xs:anyURI</code> or <code>xs:untypedAtomic</code>,\n                      <code>fn:boolean</code> returns <code>false</code> if the operand value has\n                   zero length; otherwise it returns <code>true</code>.</p></item><item><p>If <code>$arg</code> is a singleton value of any numeric type or a type derived\n                   from a numeric type, <code>fn:boolean</code> returns <code>false</code> if the\n                   operand value is <code>NaN</code> or is numerically equal to zero; otherwise it\n                   returns <code>true</code>.</p></item><item><p>In all other cases, <code>fn:boolean</code> raises a type error <errorref class="RG" code="0006"/>.</p></item></ulist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="del" at="F">The static semantics of this function are described in [Formal\n             Semantics].</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The result of this function is not necessarily the same as <code>$arg cast as\n                xs:boolean</code>. For example, <code>fn:boolean("false")</code> returns the value\n                <code>true</code> whereas <code>"false" cast as xs:boolean</code> (which can also be\n             written <code>xs:boolean("false")</code>) returns <code>false</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">let <code>$abc</code> := <code>("a", "b", "")</code></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><code>fn:boolean($abc)</code> raises a type error <errorref class="RG" code="0006"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:boolean($abc[1])</code> returns <code>true()</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:boolean($abc[0])</code> returns <code>false()</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:boolean($abc[3])</code> returns <code>false()</code>.</p></div>\n',summary:"<p>  Computes the effective boolean value of the sequence  $arg .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"item()",occurrence:"*",description:""}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:1,name:"ceiling",qname:"fn:ceiling",signature:"($arg as numeric?) as numeric? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Rounds <code>$arg</code> upwards to a whole number.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="ceiling" return-type="numeric?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="numeric?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">General rules: see <specref ref="numeric-value-functions"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns the smallest (closest to negative infinity) number with no\n             fractional part that is not less than the value of <code>$arg</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the type of <code>$arg</code> is one of the four numeric types <code>xs:float</code>,\n                <code>xs:double</code>, <code>xs:decimal</code> or <code>xs:integer</code> the type\n             of the result is the same as the type of <code>$arg</code>. If the type of\n                <code>$arg</code> is a type derived from one of the numeric types, the result is an\n             instance of the base numeric type.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">For <code>xs:float</code> and <code>xs:double</code> arguments, if the argument is\n             positive zero, then positive zero is returned. If the argument is negative zero, then\n             negative zero is returned. If the argument is less than zero and greater than -1,\n             negative zero is returned.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="del" at="F">For detailed type semantics, see [Formal Semantics].</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:ceiling(10.5)</code> returns <code>11</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:ceiling(-10.5)</code> returns <code>-10</code>.</p></div>\n',summary:"<p>  Rounds  $arg  upwards to a whole number.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"numeric",occurrence:"?",description:""}],returns:{type:"numeric?",description:""},errors:[]},{isDocumented:!0,arity:2,name:"codepoint-equal",qname:"fn:codepoint-equal",signature:"($comparand1 as xs:string?, $comparand2 as xs:string?) as xs:boolean? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns true if two strings are equal, considered codepoint-by-codepoint.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="codepoint-equal" return-type="xs:boolean?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="comparand1" type="xs:string?"/><arg name="comparand2" type="xs:string?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If either argument is the empty sequence, the function returns the empty sequence. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function returns <code>true</code> or <code>false</code> depending on\n             whether the value of <code>$comparand1</code> is equal to the value of\n                <code>$comparand2</code>, according to the Unicode codepoint collation\n                (<code>http://www.w3.org/2005/xpath-functions/collation/codepoint</code>).</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function allows <code>xs:anyURI</code> values to be compared without having to\n             specify the Unicode codepoint collation.</p></div>\n',summary:"<p>  Returns true if two strings are equal, considered codepoint-by-codepoint.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"comparand1",type:"xs:string",occurrence:"?",description:""},{name:"comparand2",type:"xs:string",occurrence:"?",description:""}],returns:{type:"xs:boolean?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"codepoints-to-string",qname:"fn:codepoints-to-string",signature:"($arg as xs:integer*) as xs:string external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Creates an <code>xs:string</code> from a sequence of <termref def="codepoint">codepoints</termref>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="codepoints-to-string" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:integer*"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns the string made up from the <termref def="character">characters</termref> whose Unicode <termref def="codepoint">codepoints</termref> are\n             supplied in <code>$arg</code>. This will be the zero-length string if <code>$arg</code>\n             is the empty sequence. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="M">dynamic</phrase> error is raised <errorref class="CH" code="0001"/> if any of the codepoints in\n                <code>$arg</code> is not a permitted XML character.</p></div>\n',summary:"<p>  Creates an  xs:string  from a sequence of  codepoints .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:integer",occurrence:"*",description:""}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:1,name:"codepoints-to-string",qname:"fn:codepoints-to-string",signature:"($arg as xs:integer*) as xs:string external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Creates an <code>xs:string</code> from a sequence of <termref def="codepoint">codepoints</termref>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="codepoints-to-string" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:integer*"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns the string made up from the <termref def="character">characters</termref> whose Unicode <termref def="codepoint">codepoints</termref> are\n             supplied in <code>$arg</code>. This will be the zero-length string if <code>$arg</code>\n             is the empty sequence. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="M">dynamic</phrase> error is raised <errorref class="CH" code="0001"/> if any of the codepoints in\n                <code>$arg</code> is not a permitted XML character.</p></div>\n',summary:"<p>  Creates an  xs:string  from a sequence of  codepoints .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:integer",occurrence:"*",description:""}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:0,name:"collection",qname:"fn:collection",signature:"() as node()* external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns a sequence of nodes representing a collection of documents indentified\n             by a collection URI; or a default collection if no URI is supplied.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="collection" return-type="node()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example><example role="signature"><proto name="collection" return-type="node()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:string?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		available node collections, and static base uri.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function takes an <code>xs:string</code> as argument and returns a sequence of\n             nodes obtained by interpreting <code>$arg</code> as an <code>xs:anyURI</code> and\n             resolving it according to the mapping specified in <term>Available node collections</term>\n             described in <xspecref spec="XP30" ref="id-xp-evaluation-context-components"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <term>Available node collections</term> provides a mapping from this string to a sequence\n             of nodes, the function returns that sequence. If <term>Available node collections</term> maps\n             the string to an empty sequence, then the function returns an empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is not specified, the function returns the sequence of the nodes in\n             the default node collection in the dynamic context. See <xspecref spec="XP30" ref="id-xp-evaluation-context-components"/>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$arg</code> is a relative <code>xs:anyURI</code>, it is resolved\n             against the value of the base-URI property from the static context. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, the function behaves as if it had been\n             called without an argument. See above.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">By default, this function is <termref def="deterministic">deterministic</termref>.\n             This means that repeated\n             calls on the function with the same argument will return the same result. However, for\n             performance reasons, implementations may provide a user option to evaluate the function\n             without a guarantee of determinism. The manner in which any such option is provided is\n                <termref def="implementation-defined"/>. If the user has not selected such an option,\n             a call to this function must either return a deterministic result or must raise a <phrase diff="add" at="L">dynamic</phrase> error\n                <errorref class="DC" code="0003"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="G">There is no requirement that the returned nodes should be in document\n             order, nor is there a requirement that the result should contain no duplicates.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="del" at="F">For detailed type semantics, see [Formal Semantics].</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DC" code="0002"/> if no URI is supplied and the\n             value of the default collection is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="J">A <phrase diff="add" at="M">dynamic</phrase> error is raised <errorref class="DC" code="0002"/> if <term>available\n                node collections</term> provides no mapping for the absolutized URI.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DC" code="0004"/> if <code>$arg</code> is not a\n             valid <code>xs:anyURI</code>.</p></div>\n',summary:"<p>  Returns a sequence of nodes representing a collection of documents indentified\n             by a collection URI; or a default collection if no URI is supplied.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"node()*",description:""},errors:[]},{isDocumented:!0,arity:1,name:"collection",qname:"fn:collection",signature:"($arg as xs:string?) as node()* external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns a sequence of nodes representing a collection of documents indentified\n             by a collection URI; or a default collection if no URI is supplied.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="collection" return-type="node()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example><example role="signature"><proto name="collection" return-type="node()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:string?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		available node collections, and static base uri.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function takes an <code>xs:string</code> as argument and returns a sequence of\n             nodes obtained by interpreting <code>$arg</code> as an <code>xs:anyURI</code> and\n             resolving it according to the mapping specified in <term>Available node collections</term>\n             described in <xspecref spec="XP30" ref="id-xp-evaluation-context-components"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <term>Available node collections</term> provides a mapping from this string to a sequence\n             of nodes, the function returns that sequence. If <term>Available node collections</term> maps\n             the string to an empty sequence, then the function returns an empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is not specified, the function returns the sequence of the nodes in\n             the default node collection in the dynamic context. See <xspecref spec="XP30" ref="id-xp-evaluation-context-components"/>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$arg</code> is a relative <code>xs:anyURI</code>, it is resolved\n             against the value of the base-URI property from the static context. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, the function behaves as if it had been\n             called without an argument. See above.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">By default, this function is <termref def="deterministic">deterministic</termref>.\n             This means that repeated\n             calls on the function with the same argument will return the same result. However, for\n             performance reasons, implementations may provide a user option to evaluate the function\n             without a guarantee of determinism. The manner in which any such option is provided is\n                <termref def="implementation-defined"/>. If the user has not selected such an option,\n             a call to this function must either return a deterministic result or must raise a <phrase diff="add" at="L">dynamic</phrase> error\n                <errorref class="DC" code="0003"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="G">There is no requirement that the returned nodes should be in document\n             order, nor is there a requirement that the result should contain no duplicates.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="del" at="F">For detailed type semantics, see [Formal Semantics].</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DC" code="0002"/> if no URI is supplied and the\n             value of the default collection is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="J">A <phrase diff="add" at="M">dynamic</phrase> error is raised <errorref class="DC" code="0002"/> if <term>available\n                node collections</term> provides no mapping for the absolutized URI.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DC" code="0004"/> if <code>$arg</code> is not a\n             valid <code>xs:anyURI</code>.</p></div>\n',summary:"<p>  Returns a sequence of nodes representing a collection of documents indentified\n             by a collection URI; or a default collection if no URI is supplied.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:""}],returns:{type:"node()*",description:""},errors:[]},{isDocumented:!0,arity:2,name:"compare",qname:"fn:compare",signature:"($comparand1 as xs:string?, $comparand2 as xs:string?) as xs:integer? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns -1, 0, or 1, depending on whether <code>$comparand1</code> collates\n             before, equal to, or after <code>$comparand2</code> according to the rules of a selected\n             collation.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="compare" return-type="xs:integer?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="comparand1" type="xs:string?"/><arg name="comparand2" type="xs:string?"/></proto></example><example role="signature"><proto name="compare" return-type="xs:integer?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="comparand1" type="xs:string?"/><arg name="comparand2" type="xs:string?"/><arg name="collation" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		collations.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The three-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		collations, and static base uri.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns -1, 0, or 1, depending on whether the value of the <code>$comparand1</code> is\n             respectively less than, equal to, or greater than the value of <code>$comparand2</code>,\n             according to the rules of the collation that is used. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The collation used by this function is determined according to the rules in <specref ref="choosing-a-collation"/>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If either <code>$comparand1</code> or <code>$comparand2</code> is the empty sequence,\n             the function returns the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function, called with the first signature, defines the semantics of the "eq", "ne",\n             "gt", "lt", "le" and "ge" operators on <code>xs:string</code> values.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:compare(\'abc\', \'abc\')</code> returns <code>0</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:compare(\'Strasse\', \'Straße\')</code> returns <code>0</code>. <emph>(Assuming the default collation includes provisions that equate\n                      <quote>ss</quote> and the (German) character <quote>ß</quote>\n                      (<quote>sharp-s</quote>). Otherwise, the returned value depends on the\n                   semantics of the default collation.).</emph></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:compare(\'Strasse\', \'Straße\',\n                   \'http://example.com/deutsch\')</code> returns <code>0</code>. <emph>(Assuming the collation identified by the URI\n                      <code>http://example.com/deutsch</code> includes provisions that equate\n                      <quote>ss</quote> and the (German) character <quote>ß</quote>\n                      (<quote>sharp-s</quote>). Otherwise, the returned value depends on the\n                   semantics of that collation.).</emph></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:compare(\'Strassen\', \'Straße\')</code> returns <code>1</code>. <emph>(Assuming the default collation includes provisions that treat\n                   differences between <quote>ss</quote> and the (German) character <quote>ß</quote>\n                      (<quote>sharp-s</quote>) with less strength than the differences between the\n                   base characters, such as the final <quote>n</quote>. ).</emph></p></div>\n',summary:"<p>  Returns -1, 0, or 1, depending on whether  $comparand1  collates\n             before, equal to, or after  $comparand2  according to the rules of a selected\n             collation.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"comparand1",type:"xs:string",occurrence:"?",description:""},{name:"comparand2",type:"xs:string",occurrence:"?",description:""}],returns:{type:"xs:integer?",description:""},errors:[]},{isDocumented:!0,arity:3,name:"compare",qname:"fn:compare",signature:"($comparand1 as xs:string?, $comparand2 as xs:string?, $collation as xs:string) as xs:integer? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns -1, 0, or 1, depending on whether <code>$comparand1</code> collates\n             before, equal to, or after <code>$comparand2</code> according to the rules of a selected\n             collation.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="compare" return-type="xs:integer?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="comparand1" type="xs:string?"/><arg name="comparand2" type="xs:string?"/></proto></example><example role="signature"><proto name="compare" return-type="xs:integer?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="comparand1" type="xs:string?"/><arg name="comparand2" type="xs:string?"/><arg name="collation" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		collations.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The three-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		collations, and static base uri.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns -1, 0, or 1, depending on whether the value of the <code>$comparand1</code> is\n             respectively less than, equal to, or greater than the value of <code>$comparand2</code>,\n             according to the rules of the collation that is used. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The collation used by this function is determined according to the rules in <specref ref="choosing-a-collation"/>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If either <code>$comparand1</code> or <code>$comparand2</code> is the empty sequence,\n             the function returns the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function, called with the first signature, defines the semantics of the "eq", "ne",\n             "gt", "lt", "le" and "ge" operators on <code>xs:string</code> values.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:compare(\'abc\', \'abc\')</code> returns <code>0</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:compare(\'Strasse\', \'Straße\')</code> returns <code>0</code>. <emph>(Assuming the default collation includes provisions that equate\n                      <quote>ss</quote> and the (German) character <quote>ß</quote>\n                      (<quote>sharp-s</quote>). Otherwise, the returned value depends on the\n                   semantics of the default collation.).</emph></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:compare(\'Strasse\', \'Straße\',\n                   \'http://example.com/deutsch\')</code> returns <code>0</code>. <emph>(Assuming the collation identified by the URI\n                      <code>http://example.com/deutsch</code> includes provisions that equate\n                      <quote>ss</quote> and the (German) character <quote>ß</quote>\n                      (<quote>sharp-s</quote>). Otherwise, the returned value depends on the\n                   semantics of that collation.).</emph></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:compare(\'Strassen\', \'Straße\')</code> returns <code>1</code>. <emph>(Assuming the default collation includes provisions that treat\n                   differences between <quote>ss</quote> and the (German) character <quote>ß</quote>\n                      (<quote>sharp-s</quote>) with less strength than the differences between the\n                   base characters, such as the final <quote>n</quote>. ).</emph></p></div>\n',summary:"<p>  Returns -1, 0, or 1, depending on whether  $comparand1  collates\n             before, equal to, or after  $comparand2  according to the rules of a selected\n             collation.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"comparand1",type:"xs:string",occurrence:"?",description:""},{name:"comparand2",type:"xs:string",occurrence:"?",description:""},{name:"collation",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:integer?",description:""},errors:[]},{isDocumented:!0,arity:2,name:"concat",qname:"fn:concat",signature:"($arg1 as xs:anyAtomicType?, $arg2 as xs:anyAtomicType?) as xs:string external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the concatenation of the string values of the arguments.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">\n          The two-argument form of this function defines the semantics of the "||" operator.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="concat" return-type="xs:string" isOp="yes" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg1" type="xs:anyAtomicType?"/><arg name="arg2" type="xs:anyAtomicType?"/><arg name="..." type="xs:anyAtomicType?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function accepts two or more <code>xs:anyAtomicType</code> arguments and casts each\n             one to <code>xs:string</code>. The function returns the <code>xs:string</code> that is\n             the concatenation of the values of its arguments after conversion. If any argument is\n             the empty sequence, that argument is treated as the zero-length string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="A-E19">The <code>fn:concat</code> function is specified to allow two or\n             more arguments, which are concatenated together. This is the only function specified in\n             this document that allows a variable number of arguments. This capability is retained\n             for compatibility with <bibref ref="xpath"/>. </p></div>\n',summary:"<p>  Returns the concatenation of the string values of the arguments.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg1",type:"xs:anyAtomicType",occurrence:"?",description:""},{name:"arg2",type:"xs:anyAtomicType",occurrence:"?",description:""}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:2,name:"contains",qname:"fn:contains",signature:"($arg1 as xs:string?, $arg2 as xs:string?) as xs:boolean external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns true if the string <code>$arg1</code> contains <code>$arg2</code> as a\n             substring, taking collations into account.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="contains" return-type="xs:boolean" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg1" type="xs:string?"/><arg name="arg2" type="xs:string?"/></proto></example><example role="signature"><proto name="contains" return-type="xs:boolean" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg1" type="xs:string?"/><arg name="arg2" type="xs:string?"/><arg name="collation" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		collations.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The three-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		collations, and static base uri.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$arg1</code> or <code>$arg2</code> is the empty sequence, or\n             contains only ignorable collation units, it is interpreted as the zero-length\n             string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$arg2</code> is the zero-length string, then the function returns\n                <code>true</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$arg1</code> is the zero-length string, the function returns\n                <code>false</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The collation used by this function is determined according to the rules in <specref ref="choosing-a-collation"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns an <code>xs:boolean</code> indicating whether or not the value of\n                <code>$arg1</code> contains (at the beginning, at the end, or anywhere within) at\n             least one sequence of collation units that provides a <term>minimal match</term> to the\n             collation units in the value of <code>$arg2</code>, according to the collation that is\n             used.</p><note xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><p><term>Minimal match</term> is defined in <bibref ref="Unicode-Collations"/>. </p></note><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error <rfc2119>may</rfc2119> be raised <errorref class="CH" code="0004"/> if the\n             specified collation does not support collation units.</p></div>\n',summary:"<p>  Returns true if the string  $arg1  contains  $arg2  as a\n             substring, taking collations into account.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg1",type:"xs:string",occurrence:"?",description:""},{name:"arg2",type:"xs:string",occurrence:"?",description:""}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:3,name:"contains",qname:"fn:contains",signature:"($arg1 as xs:string?, $arg2 as xs:string?, $collation as xs:string) as xs:boolean external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns true if the string <code>$arg1</code> contains <code>$arg2</code> as a\n             substring, taking collations into account.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="contains" return-type="xs:boolean" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg1" type="xs:string?"/><arg name="arg2" type="xs:string?"/></proto></example><example role="signature"><proto name="contains" return-type="xs:boolean" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg1" type="xs:string?"/><arg name="arg2" type="xs:string?"/><arg name="collation" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		collations.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The three-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		collations, and static base uri.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$arg1</code> or <code>$arg2</code> is the empty sequence, or\n             contains only ignorable collation units, it is interpreted as the zero-length\n             string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$arg2</code> is the zero-length string, then the function returns\n                <code>true</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$arg1</code> is the zero-length string, the function returns\n                <code>false</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The collation used by this function is determined according to the rules in <specref ref="choosing-a-collation"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns an <code>xs:boolean</code> indicating whether or not the value of\n                <code>$arg1</code> contains (at the beginning, at the end, or anywhere within) at\n             least one sequence of collation units that provides a <term>minimal match</term> to the\n             collation units in the value of <code>$arg2</code>, according to the collation that is\n             used.</p><note xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><p><term>Minimal match</term> is defined in <bibref ref="Unicode-Collations"/>. </p></note><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error <rfc2119>may</rfc2119> be raised <errorref class="CH" code="0004"/> if the\n             specified collation does not support collation units.</p></div>\n',summary:"<p>  Returns true if the string  $arg1  contains  $arg2  as a\n             substring, taking collations into account.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg1",type:"xs:string",occurrence:"?",description:""},{name:"arg2",type:"xs:string",occurrence:"?",description:""},{name:"collation",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:1,name:"count",qname:"fn:count",signature:"($arg as item()*) as xs:integer external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the number of items in a sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="count" return-type="xs:integer" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="item()*"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns the number of items in the value of <code>$arg</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns 0 if <code>$arg</code> is the empty sequence.</p></div>\n',summary:"<p>  Returns the number of items in a sequence.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"item()",occurrence:"*",description:""}],returns:{type:"xs:integer",description:""},errors:[]},{isDocumented:!0,arity:0,name:"current-date",qname:"fn:current-date",signature:"() as xs:date external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the current date.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="current-date" return-type="xs:date" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		implicit timezone.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns <code>xs:date(fn:current-dateTime())</code>. This is an <code>xs:date</code>\n             (with timezone) that is current at some time during the evaluation of a query or\n             transformation in which <code>fn:current-date</code> is executed.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic"/>. The precise instant during the query or\n             transformation represented by the value of <code>fn:current-date</code> is <termref def="implementation-dependent"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The returned date will always have an associated timezone, which will always be the same\n             as the implicit timezone in the dynamic context</p></div>\n',summary:"<p>  Returns the current date.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:date",description:""},errors:[]},{isDocumented:!0,arity:0,name:"current-dateTime",qname:"fn:current-dateTime",signature:"() as xs:dateTimeStamp external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the current date and time (with timezone).</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="current-dateTime" return-type="xs:dateTimeStamp" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		implicit timezone.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the current dateTime (with timezone) from the dynamic context. (See <xspecref spec="XP30" ref="id-xp-evaluation-context-components"/>.) This is an\n                <code>xs:dateTime</code> that is current at some time during the evaluation of a\n             query or transformation in which <code>fn:current-dateTime</code> is executed.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic"/>. The precise instant during the query or\n             transformation represented by the value of <code>fn:current-dateTime()</code> is\n                <termref def="implementation-dependent"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="A">If the implementation supports data types from XSD 1.1 then the\n             returned value will be an instance of <code>xs:dateTimeStamp</code>. Otherwise, the only\n             guarantees are that it will be an instance of <code>xs:dateTime</code> and will have a\n             timezone component.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The returned <code>xs:dateTime</code> will always have an associated timezone, which\n             will always be the same as the implicit timezone in the dynamic context</p></div>\n',summary:"<p>  Returns the current date and time (with timezone).</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:dateTimeStamp",description:""},errors:[]},{isDocumented:!0,arity:0,name:"current-time",qname:"fn:current-time",signature:"() as xs:time external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the current time.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="current-time" return-type="xs:time" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		implicit timezone.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns <code>xs:time(fn:current-dateTime())</code>. This is an <code>xs:time</code>\n             (with timezone) that is current at some time during the evaluation of a query or\n             transformation in which <code>fn:current-time</code> is executed.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic"/>. The precise instant during the query or\n             transformation represented by the value of <code>fn:current-time()</code> is <termref def="implementation-dependent"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The returned time will always have an associated timezone, which will always be the same\n             as the implicit timezone in the dynamic context</p></div>\n',summary:"<p>  Returns the current time.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:time",description:""},errors:[]},{isDocumented:!0,arity:0,name:"data",qname:"fn:data",signature:"() as xs:anyAtomicType* external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the result of atomizing a sequence, that is, replacing all nodes in the\n             sequence by their typed values.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="data" return-type="xs:anyAtomicType*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example><example role="signature"><proto name="data" return-type="xs:anyAtomicType*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="item()*"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The zero-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-dependent">focus-dependent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="F">If the argument is omitted, it defaults to the context item\n                (<code>.</code>). The behavior of the function if the argument is omitted is exactly\n             the same as if the context item had been passed as the argument.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> The result of <code>fn:data</code> is the sequence of atomic values produced by\n             applying the following rules to each item in <code>$arg</code>:</p><ulist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>If the item is an atomic value, it is appended to the result sequence.</p></item><item><p> If the item is a node, the typed value of the node is appended to the result\n                   sequence. The typed value is a sequence of zero or more atomic values:\n                   specifically, the result of the <code>dm:typed-value</code> accessor as defined in\n                      <bibref ref="xpath-datamodel-30"/> (See <xspecref spec="DM30" ref="dm-typed-value"/>).</p></item></ulist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">type</phrase> error is raised <errorref class="TY" code="0012" type="type"/> if an item in the\n             sequence <code>$arg</code> is a node that does not have a typed value. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="B">A <phrase diff="add" at="L">type</phrase> error is raised <errorref class="TY" code="0013" type="dynamic"/>\n             if an item in the sequence <code>$arg</code> is a function item. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="I">A <phrase diff="add" at="M">dynamic</phrase> error is raised\n             if <code>$arg</code> is omitted\n             and the context item is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>.</p></div>\n',summary:"<p>  Returns the result of atomizing a sequence, that is, replacing all nodes in the\n             sequence by their typed values.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:anyAtomicType*",description:""},errors:[]},{isDocumented:!0,arity:1,name:"data",qname:"fn:data",signature:"($arg as item()*) as xs:anyAtomicType* external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the result of atomizing a sequence, that is, replacing all nodes in the\n             sequence by their typed values.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="data" return-type="xs:anyAtomicType*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example><example role="signature"><proto name="data" return-type="xs:anyAtomicType*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="item()*"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The zero-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-dependent">focus-dependent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="F">If the argument is omitted, it defaults to the context item\n                (<code>.</code>). The behavior of the function if the argument is omitted is exactly\n             the same as if the context item had been passed as the argument.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> The result of <code>fn:data</code> is the sequence of atomic values produced by\n             applying the following rules to each item in <code>$arg</code>:</p><ulist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>If the item is an atomic value, it is appended to the result sequence.</p></item><item><p> If the item is a node, the typed value of the node is appended to the result\n                   sequence. The typed value is a sequence of zero or more atomic values:\n                   specifically, the result of the <code>dm:typed-value</code> accessor as defined in\n                      <bibref ref="xpath-datamodel-30"/> (See <xspecref spec="DM30" ref="dm-typed-value"/>).</p></item></ulist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">type</phrase> error is raised <errorref class="TY" code="0012" type="type"/> if an item in the\n             sequence <code>$arg</code> is a node that does not have a typed value. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="B">A <phrase diff="add" at="L">type</phrase> error is raised <errorref class="TY" code="0013" type="dynamic"/>\n             if an item in the sequence <code>$arg</code> is a function item. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="I">A <phrase diff="add" at="M">dynamic</phrase> error is raised\n             if <code>$arg</code> is omitted\n             and the context item is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>.</p></div>\n',summary:"<p>  Returns the result of atomizing a sequence, that is, replacing all nodes in the\n             sequence by their typed values.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"item()",occurrence:"*",description:""}],returns:{type:"xs:anyAtomicType*",description:""},errors:[]},{isDocumented:!0,arity:2,name:"dateTime",qname:"fn:dateTime",signature:"($arg1 as xs:date?, $arg2 as xs:time?) as xs:dateTime? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns an <code>xs:dateTime</code> value created by combining an\n                <code>xs:date</code> and an <code>xs:time</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="dateTime" return-type="xs:dateTime?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg1" type="xs:date?"/><arg name="arg2" type="xs:time?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If either <code>$arg1</code> or <code>$arg2</code> is the empty sequence the function\n             returns the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function returns an <code>xs:dateTime</code> whose date component is\n             equal to <code>$arg1</code> and whose time component is equal to <code>$arg2</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The timezone of the result is computed as follows:</p><ulist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>If neither argument has a timezone, the result has no timezone.</p></item><item><p>If exactly one of the arguments has a timezone, or if both arguments have the same\n                   timezone, the result has this timezone.</p></item></ulist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RG" code="0008"/> if the two arguments both have\n             timezones and the timezones are different. </p></div>\n',summary:"<p>  Returns an  xs:dateTime  value created by combining an\n                 xs:date  and an  xs:time .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg1",type:"xs:date",occurrence:"?",description:""},{name:"arg2",type:"xs:time",occurrence:"?",description:""}],returns:{type:"xs:dateTime?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"day-from-date",qname:"fn:day-from-date",signature:"($arg as xs:date?) as xs:integer? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the day component of an <code>xs:date</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="day-from-date" return-type="xs:integer?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:date?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, the function returns the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function returns an <code>xs:integer</code> between 1 and 31, both\n             inclusive, representing the day component in the localized value of\n             <code>$arg</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:day-from-date(xs:date("1999-05-31-05:00"))</code> returns <code>31</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:day-from-date(xs:date("2000-01-01+05:00"))</code> returns <code>1</code>.</p></div>\n',summary:"<p>  Returns the day component of an  xs:date .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:date",occurrence:"?",description:""}],returns:{type:"xs:integer?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"days-from-duration",qname:"fn:days-from-duration",signature:"($arg as xs:duration?) as xs:integer? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the number of days in a duration.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="days-from-duration" return-type="xs:integer?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:duration?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, the function returns the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function returns an <code>xs:integer</code> representing the days\n             component in the value of <code>$arg</code>. The result is obtained by casting\n                <code>$arg</code> to an <code>xs:dayTimeDuration</code> (see <specref ref="casting-to-durations"/>) and then computing the days component as described in\n                <specref ref="canonical-dayTimeDuration"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is a negative duration then the result will be negative..</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is an <code>xs:yearMonthDuration</code> the function returns 0.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:days-from-duration(xs:dayTimeDuration("P3DT10H"))</code> returns <code>3</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:days-from-duration(xs:dayTimeDuration("P3DT55H"))</code> returns <code>5</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:days-from-duration(xs:yearMonthDuration("P3Y5M"))</code> returns <code>0</code>.</p></div>\n',summary:"<p>  Returns the number of days in a duration.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:duration",occurrence:"?",description:""}],returns:{type:"xs:integer?",description:""},errors:[]},{isDocumented:!0,arity:2,name:"deep-equal",qname:"fn:deep-equal",signature:"($parameter1 as item()*, $parameter2 as item()*) as xs:boolean external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> This function assesses whether two sequences are deep-equal to each other. To\n             be deep-equal, they must contain items that are pairwise deep-equal; and for two items\n             to be deep-equal, they must either be atomic values that compare equal, or nodes of the\n             same kind, with the same name, whose children are deep-equal.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="deep-equal" return-type="xs:boolean" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="parameter1" type="item()*"/><arg name="parameter2" type="item()*"/></proto></example><example role="signature"><proto name="deep-equal" return-type="xs:boolean" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="parameter1" type="item()*"/><arg name="parameter2" type="item()*"/><arg name="collation" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		collations, and implicit timezone.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The three-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		collations, and static base uri, and implicit timezone.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The <code>$collation</code> argument identifies a collation which is used at all levels\n             of recursion when strings are compared (but not when names are compared), according to\n             the rules in <specref ref="choosing-a-collation"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the two sequences are both empty, the function returns <code>true</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the two sequences are of different lengths, the function returns\n             <code>false</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the two sequences are of the same length, the function returns <code>true</code> if\n             and only if every item in the sequence <code>$parameter1</code> is deep-equal to the\n             item at the same position in the sequence <code>$parameter2</code>. The rules for\n             deciding whether two items are deep-equal follow.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Call the two items <code>$i1</code> and <code>$i2</code> respectively.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$i1</code> and <code>$i2</code> are both atomic values, they are deep-equal if\n             and only if <code>($i1 eq $i2)</code> is <code>true</code>, or if both values are\n                <code>NaN</code>. If the <code>eq</code> operator is not defined for <code>$i1</code>\n             and <code>$i2</code>, the function returns <code>false</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If one of the pair <code>$i1</code> or <code>$i2</code> is an atomic value and the\n             other is not,\n             <!--<phrase diff="add" at="MAP">or if one is a node and the other is not, </phrase>-->\n             the function returns <code>false</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$i1</code> and <code>$i2</code> are both nodes, they are compared as described\n             below:</p><olist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>If the two nodes are of different kinds, the result is <code>false</code>.</p></item><item><p>If the two nodes are both document nodes then they are deep-equal if and only if\n                   the sequence <code>$i1/(*|text())</code> is deep-equal to the sequence\n                      <code>$i2/(*|text())</code>.</p></item><item><p> If the two nodes are both element nodes then they are deep-equal if and only if\n                   all of the following conditions are satisfied:</p><olist><item><p>The two nodes have the same name, that is <code>(node-name($i1) eq\n                            node-name($i2))</code>.</p></item><item><!-- bug 17252 --><p diff="chg" at="L">Either both nodes are both annotated as having simple content or both nodes are\n                         annotated as having complex content. For this purpose "simple content" means either a simple\n                      type or a complex type with simple content; "complex content" means a complex type whose variety\n                      is mixed, element-only, or empty.</p><note diff="add" at="L"><p>It is a consequence of this rule that validating a document\n                      <var>D</var> against a schema will usually (but not necessarily) result in a document that is not deep-equal\n                         to <var>D</var>. The exception is when the schema allows all elements to have mixed content.</p></note></item><item><p>The two nodes have the same number of attributes, and for every attribute\n                            <code>$a1</code> in <code>$i1/@*</code> there exists an attribute\n                            <code>$a2</code> in <code>$i2/@*</code> such that <code>$a1</code> and\n                            <code>$a2</code> are deep-equal.</p></item><item><p> One of the following conditions holds:</p><ulist><item><p>Both element nodes are annotated as having simple content\n                               <phrase diff="add" at="L">(as defined in 3(b) above)</phrase>, and\n                               the typed value of <code>$i1</code> is deep-equal to the typed value\n                               of <code>$i2</code>.</p></item><item><p>Both element nodes have a type annotation that is <phrase diff="chg" at="L">a complex type with\n                               variety element-only, and the sequence <code>$i1/*</code> is\n                               deep-equal to the sequence <code>$i2/*</code>.</phrase></p></item><item><p>Both element nodes have a type annotation that is <phrase diff="chg" at="L">a complex type with\n                               variety mixed</phrase>, and the sequence <code>$i1/(*|text())</code> is\n                               deep-equal to the sequence <code>$i2/(*|text())</code>.</p></item><item><p>Both element nodes have a type annotation that is <phrase diff="chg" at="L">a complex type with\n                               variety empty</phrase>.</p></item></ulist></item></olist></item><item><p>If the two nodes are both attribute nodes then they are deep-equal if and only if\n                   both the following conditions are satisfied:</p><olist><item><p>The two nodes have the same name, that is <code>(node-name($i1) eq\n                            node-name($i2))</code>.</p></item><item><p>The typed value of <code>$i1</code> is deep-equal to the typed value of\n                            <code>$i2</code>.</p></item></olist></item><item><p> If the two nodes are both processing instruction nodes<phrase diff="del" at="A-E42"> or namespace bindings</phrase>, then they are deep-equal if and\n                   only if both the following conditions are satisfied:</p><olist><item><p>The two nodes have the same name, that is <code>(node-name($i1) eq\n                            node-name($i2))</code>.</p></item><item><p>The string value of <code>$i1</code> is equal to the string value of\n                            <code>$i2</code>.</p></item></olist></item><item><p diff="add" at="A-E42"> If the two nodes are both namespace nodes, then they are deep-equal if and only\n                   if both the following conditions are satisfied:</p><olist><item><p diff="add" at="A-E42">The two nodes either have the same name or are both nameless, that is\n                            <code>fn:deep-equal(node-name($i1), node-name($i2))</code>.</p></item><item><p diff="add" at="A-E42">The string value of <code>$i1</code> is equal to the string value of\n                            <code>$i2</code> when compared using the Unicode codepoint collation.</p></item></olist></item><item><p>If the two nodes are both text nodes or comment nodes, then they are deep-equal if\n                   and only if their string-values are equal.</p></item></olist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="B">A <phrase diff="add" at="L">type</phrase> error is raised <errorref class="TY" code="0015" type="type"/>\n             if either input sequence contains a function item.\n             <!--<phrase diff="add" at="MAP">that is not a map</phrase>,-->\n          </p></div>\n',summary:"<p>   This function assesses whether two sequences are deep-equal to each other.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"parameter1",type:"item()",occurrence:"*",description:""},{name:"parameter2",type:"item()",occurrence:"*",description:""}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:3,name:"deep-equal",qname:"fn:deep-equal",signature:"($parameter1 as item()*, $parameter2 as item()*, $collation as xs:string) as xs:boolean external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> This function assesses whether two sequences are deep-equal to each other. To\n             be deep-equal, they must contain items that are pairwise deep-equal; and for two items\n             to be deep-equal, they must either be atomic values that compare equal, or nodes of the\n             same kind, with the same name, whose children are deep-equal.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="deep-equal" return-type="xs:boolean" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="parameter1" type="item()*"/><arg name="parameter2" type="item()*"/></proto></example><example role="signature"><proto name="deep-equal" return-type="xs:boolean" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="parameter1" type="item()*"/><arg name="parameter2" type="item()*"/><arg name="collation" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		collations, and implicit timezone.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The three-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		collations, and static base uri, and implicit timezone.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The <code>$collation</code> argument identifies a collation which is used at all levels\n             of recursion when strings are compared (but not when names are compared), according to\n             the rules in <specref ref="choosing-a-collation"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the two sequences are both empty, the function returns <code>true</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the two sequences are of different lengths, the function returns\n             <code>false</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the two sequences are of the same length, the function returns <code>true</code> if\n             and only if every item in the sequence <code>$parameter1</code> is deep-equal to the\n             item at the same position in the sequence <code>$parameter2</code>. The rules for\n             deciding whether two items are deep-equal follow.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Call the two items <code>$i1</code> and <code>$i2</code> respectively.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$i1</code> and <code>$i2</code> are both atomic values, they are deep-equal if\n             and only if <code>($i1 eq $i2)</code> is <code>true</code>, or if both values are\n                <code>NaN</code>. If the <code>eq</code> operator is not defined for <code>$i1</code>\n             and <code>$i2</code>, the function returns <code>false</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If one of the pair <code>$i1</code> or <code>$i2</code> is an atomic value and the\n             other is not,\n             <!--<phrase diff="add" at="MAP">or if one is a node and the other is not, </phrase>-->\n             the function returns <code>false</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$i1</code> and <code>$i2</code> are both nodes, they are compared as described\n             below:</p><olist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>If the two nodes are of different kinds, the result is <code>false</code>.</p></item><item><p>If the two nodes are both document nodes then they are deep-equal if and only if\n                   the sequence <code>$i1/(*|text())</code> is deep-equal to the sequence\n                      <code>$i2/(*|text())</code>.</p></item><item><p> If the two nodes are both element nodes then they are deep-equal if and only if\n                   all of the following conditions are satisfied:</p><olist><item><p>The two nodes have the same name, that is <code>(node-name($i1) eq\n                            node-name($i2))</code>.</p></item><item><!-- bug 17252 --><p diff="chg" at="L">Either both nodes are both annotated as having simple content or both nodes are\n                         annotated as having complex content. For this purpose "simple content" means either a simple\n                      type or a complex type with simple content; "complex content" means a complex type whose variety\n                      is mixed, element-only, or empty.</p><note diff="add" at="L"><p>It is a consequence of this rule that validating a document\n                      <var>D</var> against a schema will usually (but not necessarily) result in a document that is not deep-equal\n                         to <var>D</var>. The exception is when the schema allows all elements to have mixed content.</p></note></item><item><p>The two nodes have the same number of attributes, and for every attribute\n                            <code>$a1</code> in <code>$i1/@*</code> there exists an attribute\n                            <code>$a2</code> in <code>$i2/@*</code> such that <code>$a1</code> and\n                            <code>$a2</code> are deep-equal.</p></item><item><p> One of the following conditions holds:</p><ulist><item><p>Both element nodes are annotated as having simple content\n                               <phrase diff="add" at="L">(as defined in 3(b) above)</phrase>, and\n                               the typed value of <code>$i1</code> is deep-equal to the typed value\n                               of <code>$i2</code>.</p></item><item><p>Both element nodes have a type annotation that is <phrase diff="chg" at="L">a complex type with\n                               variety element-only, and the sequence <code>$i1/*</code> is\n                               deep-equal to the sequence <code>$i2/*</code>.</phrase></p></item><item><p>Both element nodes have a type annotation that is <phrase diff="chg" at="L">a complex type with\n                               variety mixed</phrase>, and the sequence <code>$i1/(*|text())</code> is\n                               deep-equal to the sequence <code>$i2/(*|text())</code>.</p></item><item><p>Both element nodes have a type annotation that is <phrase diff="chg" at="L">a complex type with\n                               variety empty</phrase>.</p></item></ulist></item></olist></item><item><p>If the two nodes are both attribute nodes then they are deep-equal if and only if\n                   both the following conditions are satisfied:</p><olist><item><p>The two nodes have the same name, that is <code>(node-name($i1) eq\n                            node-name($i2))</code>.</p></item><item><p>The typed value of <code>$i1</code> is deep-equal to the typed value of\n                            <code>$i2</code>.</p></item></olist></item><item><p> If the two nodes are both processing instruction nodes<phrase diff="del" at="A-E42"> or namespace bindings</phrase>, then they are deep-equal if and\n                   only if both the following conditions are satisfied:</p><olist><item><p>The two nodes have the same name, that is <code>(node-name($i1) eq\n                            node-name($i2))</code>.</p></item><item><p>The string value of <code>$i1</code> is equal to the string value of\n                            <code>$i2</code>.</p></item></olist></item><item><p diff="add" at="A-E42"> If the two nodes are both namespace nodes, then they are deep-equal if and only\n                   if both the following conditions are satisfied:</p><olist><item><p diff="add" at="A-E42">The two nodes either have the same name or are both nameless, that is\n                            <code>fn:deep-equal(node-name($i1), node-name($i2))</code>.</p></item><item><p diff="add" at="A-E42">The string value of <code>$i1</code> is equal to the string value of\n                            <code>$i2</code> when compared using the Unicode codepoint collation.</p></item></olist></item><item><p>If the two nodes are both text nodes or comment nodes, then they are deep-equal if\n                   and only if their string-values are equal.</p></item></olist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="B">A <phrase diff="add" at="L">type</phrase> error is raised <errorref class="TY" code="0015" type="type"/>\n             if either input sequence contains a function item.\n             <!--<phrase diff="add" at="MAP">that is not a map</phrase>,-->\n          </p></div>\n',summary:"<p>   This function assesses whether two sequences are deep-equal to each other.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"parameter1",type:"item()",occurrence:"*",description:""},{name:"parameter2",type:"item()",occurrence:"*",description:""},{name:"collation",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:0,name:"default-collation",qname:"fn:default-collation",signature:"() as xs:string external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the value of the default collation property from the static context.\n          </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="default-collation" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		collations.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the value of the default collation property from the static context. Components\n             of the static context are discussed in <xspecref spec="XP30" ref="id-xp-static-context-components"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The default collation property can never be absent. If it is not explicitly defined, a\n             system defined default can be invoked. If this is not provided, the Unicode codepoint\n             collation (<code>http://www.w3.org/2005/xpath-functions/collation/codepoint</code>) is\n             used. </p></div>\n',summary:"<p>  Returns the value of the default collation property from the static context.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:1,name:"distinct-values",qname:"fn:distinct-values",signature:"($arg as xs:anyAtomicType*) as xs:anyAtomicType* external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the values that appear in a sequence, with duplicates eliminated.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="distinct-values" return-type="xs:anyAtomicType*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:anyAtomicType*"/></proto></example><example role="signature"><proto name="distinct-values" return-type="xs:anyAtomicType*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:anyAtomicType*"/><arg name="collation" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		collations, and implicit timezone.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		collations, and static base uri, and implicit timezone.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns the sequence that results from removing from <code>$arg</code> all\n             but one of a set of values that are equal to one another. Values are compared using the\n                <code>eq</code> operator, subject to the caveats defined below.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Values of type <code>xs:untypedAtomic</code> are compared as if they were of type\n                <code>xs:string</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Values that cannot be compared, because the <code>eq</code> operator is not defined for\n             their types, are considered to be distinct.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The collation used by this function is determined according to the rules in <specref ref="choosing-a-collation"/>. This collation is used when string comparison is\n             required.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">For <code>xs:float</code> and <code>xs:double</code> values, positive zero is equal to\n             negative zero and, although <code>NaN</code> does not equal itself, if <code>$arg</code>\n             contains multiple <code>NaN</code> values a single <code>NaN</code> is returned.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>xs:dateTime</code>, <code>xs:date</code> or <code>xs:time</code> values do not\n             have a timezone, they are considered to have the implicit timezone provided by the\n             dynamic context for the purpose of comparison. Note that <code>xs:dateTime</code>,\n                <code>xs:date</code> or <code>xs:time</code> values can compare equal even if their\n             timezones are different.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The order in which the sequence of values is returned is <termref def="implementation-dependent"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Which value of a set of values that compare equal is returned is <termref def="implementation-dependent"/>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="del" at="F">The static type of the result is a sequence of prime types as defined\n             in [Formal Semantics].</p><change xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="A-E44">\n             <p>If the input sequence contains values of different numeric types that differ from\n                each other by small amounts, then the eq operator is not transitive, because of\n                rounding effects occurring during type promotion. In the situation where the input\n                contains three values <code>A</code>, <code>B</code>, and <code>C</code> such that\n                   <code>A eq B</code>, <code>B eq C</code>, but <code>A ne C</code>, then the number\n                of items in the result of the function (as well as the choice of which items are\n                returned) is <termref def="implementation-dependent"/>, subject only to the\n                constraints that (a) no two items in the result sequence compare equal to each other,\n                and (b) every input item that does not appear in the result sequence compares equal\n                to some item that does appear in the result sequence.</p>\n             <p>For example, this arises when computing:</p>\n             <eg xml:space="preserve">    distinct-values(\n             (xs:float(\'1.0\'),\n             xs:decimal(\'1.0000000000100000000001\',\n             xs:double( \'1.00000000001\'))</eg>\n             <p>because the values of type <code>xs:float</code> and <code>xs:double</code> both\n                compare equal to the value of type <code>xs:decimal</code> but not equal to each\n                other. </p>\n          </change><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, the function returns the empty sequence.</p></div>\n',summary:"<p>  Returns the values that appear in a sequence, with duplicates eliminated.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:anyAtomicType",occurrence:"*",description:""}],returns:{type:"xs:anyAtomicType*",description:""},errors:[]},{isDocumented:!0,arity:2,name:"distinct-values",qname:"fn:distinct-values",signature:"($arg as xs:anyAtomicType*, $collation as xs:string) as xs:anyAtomicType* external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the values that appear in a sequence, with duplicates eliminated.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="distinct-values" return-type="xs:anyAtomicType*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:anyAtomicType*"/></proto></example><example role="signature"><proto name="distinct-values" return-type="xs:anyAtomicType*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:anyAtomicType*"/><arg name="collation" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		collations, and implicit timezone.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		collations, and static base uri, and implicit timezone.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns the sequence that results from removing from <code>$arg</code> all\n             but one of a set of values that are equal to one another. Values are compared using the\n                <code>eq</code> operator, subject to the caveats defined below.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Values of type <code>xs:untypedAtomic</code> are compared as if they were of type\n                <code>xs:string</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Values that cannot be compared, because the <code>eq</code> operator is not defined for\n             their types, are considered to be distinct.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The collation used by this function is determined according to the rules in <specref ref="choosing-a-collation"/>. This collation is used when string comparison is\n             required.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">For <code>xs:float</code> and <code>xs:double</code> values, positive zero is equal to\n             negative zero and, although <code>NaN</code> does not equal itself, if <code>$arg</code>\n             contains multiple <code>NaN</code> values a single <code>NaN</code> is returned.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>xs:dateTime</code>, <code>xs:date</code> or <code>xs:time</code> values do not\n             have a timezone, they are considered to have the implicit timezone provided by the\n             dynamic context for the purpose of comparison. Note that <code>xs:dateTime</code>,\n                <code>xs:date</code> or <code>xs:time</code> values can compare equal even if their\n             timezones are different.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The order in which the sequence of values is returned is <termref def="implementation-dependent"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Which value of a set of values that compare equal is returned is <termref def="implementation-dependent"/>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="del" at="F">The static type of the result is a sequence of prime types as defined\n             in [Formal Semantics].</p><change xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="A-E44">\n             <p>If the input sequence contains values of different numeric types that differ from\n                each other by small amounts, then the eq operator is not transitive, because of\n                rounding effects occurring during type promotion. In the situation where the input\n                contains three values <code>A</code>, <code>B</code>, and <code>C</code> such that\n                   <code>A eq B</code>, <code>B eq C</code>, but <code>A ne C</code>, then the number\n                of items in the result of the function (as well as the choice of which items are\n                returned) is <termref def="implementation-dependent"/>, subject only to the\n                constraints that (a) no two items in the result sequence compare equal to each other,\n                and (b) every input item that does not appear in the result sequence compares equal\n                to some item that does appear in the result sequence.</p>\n             <p>For example, this arises when computing:</p>\n             <eg xml:space="preserve">    distinct-values(\n             (xs:float(\'1.0\'),\n             xs:decimal(\'1.0000000000100000000001\',\n             xs:double( \'1.00000000001\'))</eg>\n             <p>because the values of type <code>xs:float</code> and <code>xs:double</code> both\n                compare equal to the value of type <code>xs:decimal</code> but not equal to each\n                other. </p>\n          </change><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, the function returns the empty sequence.</p></div>\n',summary:"<p>  Returns the values that appear in a sequence, with duplicates eliminated.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:anyAtomicType",occurrence:"*",description:""},{name:"collation",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:anyAtomicType*",description:""},errors:[]},{isDocumented:!0,arity:1,name:"doc-available",qname:"fn:doc-available",signature:"($uri as xs:string?) as xs:boolean external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="A-E26">The function returns true if and only if the function\n             call <code>fn:doc($uri)</code> would return a document node.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="doc-available" return-type="xs:boolean" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="uri" type="xs:string?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		available documents, and static base uri.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="A-E26">If <code>$uri</code> is an empty sequence, this function returns\n                <code>false</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="A-E26">If a call on <code>fn:doc($uri)</code> would return a document\n             node, this function returns <code>true</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="A-E26">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DC" code="0005"/> if\n                <code>$uri</code> is not a valid URI according to the rules applied by the\n             implementation of <code>fn:doc</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="A-E26">Otherwise, this function returns <code>false</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If this function returns <code>true</code>, then calling <code>fn:doc($uri)</code>\n             within the same <termref def="execution-scope"/> must return a document node. However,\n             if nondeterministic processing has been selected for the <code>fn:doc</code> function,\n             this guarantee is lost.</p></div>\n',summary:"<p>  The function returns true if and only if the function\n             call  fn:doc($uri)  would return a document node.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"uri",type:"xs:string",occurrence:"?",description:""}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:1,name:"doc",qname:"fn:doc",signature:"($uri as xs:string?) as document()? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="A-E26">Retrieves a document using a URI supplied as an\n                <code>xs:string</code>, and returns the corresponding document node.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="doc" return-type="document-node()?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="uri" type="xs:string?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		available documents, and static base uri.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$uri</code> is the empty sequence, the result is an empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="A-E26">If <code>$uri</code> is a relative URI reference, it is resolved\n             relative to the value of the <phrase diff="chg" at="L">Static Base URI property from the static context</phrase>. The resulting\n             absolute URI is promoted to an <code>xs:string</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="A-E26">If the <term>Available documents</term> described in <xspecref spec="XP30" ref="eval_context"/> provides a mapping from this string to a document\n             node, the function returns that document node.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="A-E26">The URI may include a fragment identifier.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">By default, this function is <termref def="deterministic">deterministic</termref>. Two calls on this function\n             return the same document node if the same URI Reference (after resolution to an absolute\n             URI Reference) is supplied to both calls. Thus, the following expression (if it does not\n             raise an error) will always be true:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">doc("foo.xml") is doc("foo.xml")</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">However, for performance reasons, implementations may provide a user option to evaluate\n             the function without a guarantee of determinism. The manner in which any such option is\n             provided is implementation-defined. If the user has not selected such an option, a call\n             of the function must either return a deterministic result or must raise a <phrase diff="add" at="L">dynamic</phrase> error\n                <errorref class="DC" code="0003"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="del" at="F">For detailed type semantics, see [Formal Semantics].</p><note xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><p>If <code>$uri</code> is read from a source document, it is generally appropriate to\n                resolve it relative to the base URI property of the relevant node in the source\n                document. This can be achieved by calling the <code>fn:resolve-uri</code> function,\n                and passing the resulting absolute URI as an argument to the <code>fn:doc</code>\n                function.</p></note><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If two calls to this function supply different absolute URI References as arguments, the\n             same document node may be returned if the implementation can determine that the two\n             arguments refer to the same resource.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> By defining the semantics of this function in terms of a string-to-document-node\n             mapping in the dynamic context, the specification is acknowledging that the results of\n             this function are outside the purview of the language specification itself, and depend\n             entirely on the run-time environment in which the expression is evaluated. This run-time\n             environment includes not only an unpredictable collection of resources ("the web"), but\n             configurable machinery for locating resources and turning their contents into document\n             nodes within the XPath data model. Both the set of resources that are reachable, and the\n             mechanisms by which those resources are parsed and validated, are <termref def="implementation-dependent"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> One possible processing model for this function is as follows. The resource identified\n             by the URI Reference is retrieved. If the resource cannot be retrieved, a <phrase diff="add" at="L">dynamic</phrase> error is\n             raised <errorref class="DC" code="0002"/>. The data resulting from the retrieval action\n             is then parsed as an XML document and a tree is constructed in accordance with the\n                <bibref ref="xpath-datamodel-30"/>. If the top-level media type is known and is\n             "text", the content is parsed in the same way as if the media type were text/xml;\n             otherwise, it is parsed in the same way as if the media type were application/xml. If\n             the contents cannot be parsed successfully, a <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DC" code="0002"/>. Otherwise, the result of the function is the document node at the root\n             of the resulting tree. This tree is then optionally validated against a schema.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Various aspects of this processing are <termref def="implementation-defined"/>.\n             Implementations may provide external configuration options that allow any aspect of the\n             processing to be controlled by the user. In particular:</p><ulist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>The set of URI schemes that the implementation recognizes is\n                   implementation-defined. Implementations may allow the mapping of URIs to resources\n                   to be configured by the user, using mechanisms such as catalogs or user-written\n                   URI handlers.</p></item><item><p>The handling of non-XML media types is implementation-defined. Implementations may\n                   allow instances of the data model to be constructed from non-XML resources, under\n                   user control.</p></item><item><p>It is <termref def="implementation-defined"/> whether DTD validation and/or schema\n                   validation is applied to the source document.</p></item><item><p>Implementations may provide user-defined error handling options that allow\n                   processing to continue following an error in retrieving a resource, or in parsing\n                   and validating its content. When errors have been handled in this way, the\n                   function may return either an empty sequence, or a fallback document provided by\n                   the error handler.</p></item><item><p>Implementations may provide user options that relax the requirement for the\n                   function to return deterministic results.</p></item></ulist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="A-E26">A <phrase diff="add" at="L">dynamic</phrase> error <rfc2119>may</rfc2119> be raised <errorref class="DC" code="0005"/> if <code>$uri</code> is not a valid URI.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="G">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DC" code="0002"/> if the\n                <term>available documents</term> provides no mapping for the absolutized URI.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DC" code="0002"/> if the resource cannot be\n             retrieved or cannot be parsed successfully as XML.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DC" code="0003"/> if the implementation is not able\n             to guarantee that the result of the function will be deterministic, and the user has not\n             indicated that an unstable result is acceptable.</p></div>\n',summary:"<p>  Retrieves a document using a URI supplied as an\n                 xs:string , and returns the corresponding document node.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"uri",type:"xs:string",occurrence:"?",description:""}],returns:{type:"document()?",description:""},errors:[]},{isDocumented:!0,arity:0,name:"document-uri",qname:"fn:document-uri",signature:"() as xs:anyURI? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the URI of a resource where a document can be found, if available.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="document-uri" return-type="xs:anyURI?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example><example role="signature"><proto name="document-uri" return-type="xs:anyURI?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="node()?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The zero-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-dependent">focus-dependent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="F">If the argument is omitted, it defaults to the context item\n                (<code>.</code>). The behavior of the function if the argument is omitted is exactly\n             the same as if the context item had been passed as the argument.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, the function returns the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is not a document node, the function returns the empty\n             sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function returns the value of the <code>document-uri</code> accessor\n             applied to <code>$arg</code>, as defined in <bibref ref="xpath-datamodel-30"/> (See\n                <xspecref spec="DM30" ref="DocumentNodeAccessors"/>).</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The following errors may be raised when <code>$arg</code> is omitted:</p><ul xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><li><p>If the context\n                item is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>, <phrase diff="add" at="M">dynamic error</phrase>\n                <xerrorref spec="XP" class="DY" code="0002" type="dynamic"/></p></li><li><p>If the context item is not a\n                node, <phrase diff="add" at="M">type error</phrase> <xerrorref spec="XP" class="TY" code="0004" type="type"/>.</p></li></ul></div>\n',summary:"<p>  Returns the URI of a resource where a document can be found, if available.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:anyURI?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"document-uri",qname:"fn:document-uri",signature:"($arg as node()?) as xs:anyURI? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the URI of a resource where a document can be found, if available.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="document-uri" return-type="xs:anyURI?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example><example role="signature"><proto name="document-uri" return-type="xs:anyURI?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="node()?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The zero-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-dependent">focus-dependent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="F">If the argument is omitted, it defaults to the context item\n                (<code>.</code>). The behavior of the function if the argument is omitted is exactly\n             the same as if the context item had been passed as the argument.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, the function returns the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is not a document node, the function returns the empty\n             sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function returns the value of the <code>document-uri</code> accessor\n             applied to <code>$arg</code>, as defined in <bibref ref="xpath-datamodel-30"/> (See\n                <xspecref spec="DM30" ref="DocumentNodeAccessors"/>).</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The following errors may be raised when <code>$arg</code> is omitted:</p><ul xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><li><p>If the context\n                item is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>, <phrase diff="add" at="M">dynamic error</phrase>\n                <xerrorref spec="XP" class="DY" code="0002" type="dynamic"/></p></li><li><p>If the context item is not a\n                node, <phrase diff="add" at="M">type error</phrase> <xerrorref spec="XP" class="TY" code="0004" type="type"/>.</p></li></ul></div>\n',summary:"<p>  Returns the URI of a resource where a document can be found, if available.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"node()",occurrence:"?",description:""}],returns:{type:"xs:anyURI?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"element-with-id",qname:"fn:element-with-id",signature:"($arg as xs:string*) as element(*)* external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="A-E31"> Returns the sequence of element nodes that have an\n                <code>ID</code> value matching the value of one or more of the <code>IDREF</code>\n             values supplied in <code>$arg</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="element-with-id" return-type="element()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:string*"/></proto></example><example role="signature"><proto name="element-with-id" return-type="element()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:string*"/><arg name="node" type="node()"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-dependent">focus-dependent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><change xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="A-E31">\n             <note><p>The effect of this function is identical to <function>fn:id</function> in respect\n                   of elements that have an attribute with the <code>is-id</code> property. However,\n                   it behaves differently in respect of element nodes with the <code>is-id</code>\n                   property. Whereas the <code>fn:id</code>, for legacy reasons, returns the element\n                   that has the <code>is-id</code> property, this parent returns the element\n                   identified by the ID, which is the parent of the element having the\n                      <code>is-id</code> property.</p></note>\n             <p>The function returns a sequence, in document order with duplicates eliminated,\n                containing every element node <code>E</code> that satisfies all the following\n                conditions:</p>\n             <olist><item><p>\n                      <code>E</code> is in the target document. The target document is the document\n                      containing <code>$node</code>, or the document containing the context item\n                         (<code>.</code>) if the second argument is omitted. The behavior of the\n                      function if <code>$node</code> is omitted is exactly the same as if the context\n                      item had been passed as <code>$node</code>.</p></item><item><p><code>E</code> has an <code>ID</code> value equal to one of the candidate\n                         <code>IDREF</code> values, where:</p><ulist><item><p> An element has an <code>ID</code> value equal to <code>V</code> if\n                            either or both of the following conditions are true:</p><ulist><item><p>The element has an child element node whose <code>is-id</code>\n                                  property (See <xspecref spec="DM30" ref="dm-is-id"/>.) is true and\n                                  whose typed value is equal to <code>V</code> under the rules of the\n                                     <code>eq</code> operator using the Unicode code point collation\n                                     (<code>http://www.w3.org/2005/xpath-functions/collation/codepoint</code>).</p></item><item><p>The element has an attribute node whose <code>is-id</code> property\n                                  (See <xspecref spec="DM30" ref="dm-is-id"/>.) is true and whose\n                                  typed value is equal to <code>V</code> under the rules of the\n                                     <code>eq</code> operator using the Unicode code point collation\n                                     (<code>http://www.w3.org/2005/xpath-functions/collation/codepoint</code>).</p></item></ulist></item><item><p>Each <code>xs:string</code> in <code>$arg</code> is parsed as if it were\n                            of type <code>IDREFS</code>, that is, each <code>xs:string</code> in\n                               <code>$arg</code> is treated as a whitespace-separated sequence of\n                            tokens, each acting as an <code>IDREF</code>. These tokens are then\n                            included in the list of candidate <code>IDREF</code>s. If any of the\n                            tokens is not a lexically valid <code>IDREF</code> (that is, if it is not\n                            lexically an <code>xs:NCName</code>), it is ignored. Formally, the\n                            candidate <code>IDREF</code> values are the strings in the sequence given\n                            by the expression:</p><eg xml:space="preserve">for $s in $arg return\n    fn:tokenize(fn:normalize-space($s), \' \')[. castable as xs:IDREF]</eg></item></ulist></item><item><p> If several elements have the same <code>ID</code> value, then <code>E</code>\n                      is the one that is first in document order.</p></item></olist>\n          </change><change xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="A-E31">\n             <p>A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DC" code="0001" type="dynamic"/> if\n                   <code>$node</code>, or the context item if the second argument is omitted, is a\n                   node in a tree whose root is not a document node.</p>\n             <p>The following errors may be raised when <code>$node</code> is omitted:</p>\n             <ul><li><p>If the context\n                   item is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>, <phrase diff="add" at="M">dynamic error</phrase>\n                   <xerrorref spec="XP" class="DY" code="0002" type="dynamic"/></p></li><li><p>If the context item is not a\n                   node, <phrase diff="add" at="M">type error</phrase> <xerrorref spec="XP" class="TY" code="0004" type="type"/>.</p></li></ul>\n          </change></div>\n',summary:"<p>   Returns the sequence of element nodes that have an\n                 ID  value matching the value of one or more of the  IDREF \n             values supplied in  $arg .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"*",description:""}],returns:{type:"element(*)*",description:""},errors:[]},{isDocumented:!0,arity:2,name:"element-with-id",qname:"fn:element-with-id",signature:"($arg as xs:string*, $node as node()) as element(*)* external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="A-E31"> Returns the sequence of element nodes that have an\n                <code>ID</code> value matching the value of one or more of the <code>IDREF</code>\n             values supplied in <code>$arg</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="element-with-id" return-type="element()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:string*"/></proto></example><example role="signature"><proto name="element-with-id" return-type="element()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:string*"/><arg name="node" type="node()"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-dependent">focus-dependent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><change xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="A-E31">\n             <note><p>The effect of this function is identical to <function>fn:id</function> in respect\n                   of elements that have an attribute with the <code>is-id</code> property. However,\n                   it behaves differently in respect of element nodes with the <code>is-id</code>\n                   property. Whereas the <code>fn:id</code>, for legacy reasons, returns the element\n                   that has the <code>is-id</code> property, this parent returns the element\n                   identified by the ID, which is the parent of the element having the\n                      <code>is-id</code> property.</p></note>\n             <p>The function returns a sequence, in document order with duplicates eliminated,\n                containing every element node <code>E</code> that satisfies all the following\n                conditions:</p>\n             <olist><item><p>\n                      <code>E</code> is in the target document. The target document is the document\n                      containing <code>$node</code>, or the document containing the context item\n                         (<code>.</code>) if the second argument is omitted. The behavior of the\n                      function if <code>$node</code> is omitted is exactly the same as if the context\n                      item had been passed as <code>$node</code>.</p></item><item><p><code>E</code> has an <code>ID</code> value equal to one of the candidate\n                         <code>IDREF</code> values, where:</p><ulist><item><p> An element has an <code>ID</code> value equal to <code>V</code> if\n                            either or both of the following conditions are true:</p><ulist><item><p>The element has an child element node whose <code>is-id</code>\n                                  property (See <xspecref spec="DM30" ref="dm-is-id"/>.) is true and\n                                  whose typed value is equal to <code>V</code> under the rules of the\n                                     <code>eq</code> operator using the Unicode code point collation\n                                     (<code>http://www.w3.org/2005/xpath-functions/collation/codepoint</code>).</p></item><item><p>The element has an attribute node whose <code>is-id</code> property\n                                  (See <xspecref spec="DM30" ref="dm-is-id"/>.) is true and whose\n                                  typed value is equal to <code>V</code> under the rules of the\n                                     <code>eq</code> operator using the Unicode code point collation\n                                     (<code>http://www.w3.org/2005/xpath-functions/collation/codepoint</code>).</p></item></ulist></item><item><p>Each <code>xs:string</code> in <code>$arg</code> is parsed as if it were\n                            of type <code>IDREFS</code>, that is, each <code>xs:string</code> in\n                               <code>$arg</code> is treated as a whitespace-separated sequence of\n                            tokens, each acting as an <code>IDREF</code>. These tokens are then\n                            included in the list of candidate <code>IDREF</code>s. If any of the\n                            tokens is not a lexically valid <code>IDREF</code> (that is, if it is not\n                            lexically an <code>xs:NCName</code>), it is ignored. Formally, the\n                            candidate <code>IDREF</code> values are the strings in the sequence given\n                            by the expression:</p><eg xml:space="preserve">for $s in $arg return\n    fn:tokenize(fn:normalize-space($s), \' \')[. castable as xs:IDREF]</eg></item></ulist></item><item><p> If several elements have the same <code>ID</code> value, then <code>E</code>\n                      is the one that is first in document order.</p></item></olist>\n          </change><change xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="A-E31">\n             <p>A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DC" code="0001" type="dynamic"/> if\n                   <code>$node</code>, or the context item if the second argument is omitted, is a\n                   node in a tree whose root is not a document node.</p>\n             <p>The following errors may be raised when <code>$node</code> is omitted:</p>\n             <ul><li><p>If the context\n                   item is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>, <phrase diff="add" at="M">dynamic error</phrase>\n                   <xerrorref spec="XP" class="DY" code="0002" type="dynamic"/></p></li><li><p>If the context item is not a\n                   node, <phrase diff="add" at="M">type error</phrase> <xerrorref spec="XP" class="TY" code="0004" type="type"/>.</p></li></ul>\n          </change></div>\n',summary:"<p>   Returns the sequence of element nodes that have an\n                 ID  value matching the value of one or more of the  IDREF \n             values supplied in  $arg .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"*",description:""},{name:"node",type:"node()",occurrence:null,description:""}],returns:{type:"element(*)*",description:""},errors:[]},{isDocumented:!0,arity:1,name:"empty",qname:"fn:empty",signature:"($arg as item()*) as xs:boolean external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns true if the argument is the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="empty" return-type="xs:boolean" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="item()*"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$arg</code> is the empty sequence, the function returns\n                <code>true</code>; otherwise, the function returns <code>false</code>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:empty((1,2,3)[10])</code> returns <code>true()</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:empty(fn:remove(("hello", "world"), 1))</code> returns <code>false()</code>.</p></div>\n',summary:"<p>  Returns true if the argument is the empty sequence.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"item()",occurrence:"*",description:""}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:1,name:"encode-for-uri",qname:"fn:encode-for-uri",signature:"($uri-part as xs:string?) as xs:string external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Encodes reserved characters in a string that is intended to be used in the path\n             segment of a URI.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="encode-for-uri" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="uri-part" type="xs:string?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$uri-part</code> is the empty sequence, the function returns the zero-length\n             string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function applies the URI escaping rules defined in section 2 of <bibref ref="rfc3986"/> to the <code>xs:string</code> supplied as <code>$uri-part</code>. The\n             effect of the function is to escape reserved characters. Each such character in the\n             string is replaced with its percent-encoded form as described in <bibref ref="rfc3986"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Since <bibref ref="rfc3986"/> recommends that, for consistency, URI producers and\n             normalizers should use uppercase hexadecimal digits for all percent-encodings, this\n             function must always generate hexadecimal values using the upper-case letters A-F.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">All characters are escaped except those identified as "unreserved" by <bibref ref="rfc3986"/>, that is the upper- and lower-case letters A-Z, the digits 0-9,\n             HYPHEN-MINUS ("-"), LOW LINE ("_"), FULL STOP ".", and TILDE "~".</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function escapes URI delimiters and therefore cannot be used indiscriminately to\n             encode "invalid" characters in a path segment.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is invertible but not idempotent. This is because a string containing a\n             percent character will be modified by applying the function: for example\n                <code>100%</code> becomes <code>100%25</code>, while <code>100%25</code> becomes\n                <code>100%2525</code>.</p></div>\n',summary:"<p>  Encodes reserved characters in a string that is intended to be used in the path\n             segment of a URI.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"uri-part",type:"xs:string",occurrence:"?",description:""}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:2,name:"ends-with",qname:"fn:ends-with",signature:"($arg1 as xs:string?, $arg2 as xs:string?) as xs:boolean external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns true if the string <code>$arg1</code> contains <code>$arg2</code> as a\n             trailing substring, taking collations into account.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="ends-with" return-type="xs:boolean" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg1" type="xs:string?"/><arg name="arg2" type="xs:string?"/></proto></example><example role="signature"><proto name="ends-with" return-type="xs:boolean" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg1" type="xs:string?"/><arg name="arg2" type="xs:string?"/><arg name="collation" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		collations.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The three-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		collations, and static base uri.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$arg1</code> or <code>$arg2</code> is the empty sequence, or\n             contains only ignorable collation units, it is interpreted as the zero-length\n             string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$arg2</code> is the zero-length string, then the function returns\n                <code>true</code>. If the value of <code>$arg1</code> is the zero-length string and\n             the value of <code>$arg2</code> is not the zero-length string, then the function returns\n                <code>false</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The collation used by this function is determined according to the rules in <specref ref="choosing-a-collation"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns an <code>xs:boolean</code> indicating whether or not the value of\n                <code>$arg1</code> starts with a sequence of collation units that provides a\n                <term>match</term> to the collation units of <code>$arg2</code> according to the\n             collation that is used.</p><note xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><p>\n                <term>Match</term> is defined in <bibref ref="Unicode-Collations"/>. </p></note><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error <rfc2119>may</rfc2119> be raised <errorref class="CH" code="0004"/> if the\n             specified collation does not support collation units.</p></div>\n',summary:"<p>  Returns true if the string  $arg1  contains  $arg2  as a\n             trailing substring, taking collations into account.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg1",type:"xs:string",occurrence:"?",description:""},{name:"arg2",type:"xs:string",occurrence:"?",description:""}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:3,name:"ends-with",qname:"fn:ends-with",signature:"($arg1 as xs:string?, $arg2 as xs:string?, $collation as xs:string) as xs:boolean external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns true if the string <code>$arg1</code> contains <code>$arg2</code> as a\n             trailing substring, taking collations into account.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="ends-with" return-type="xs:boolean" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg1" type="xs:string?"/><arg name="arg2" type="xs:string?"/></proto></example><example role="signature"><proto name="ends-with" return-type="xs:boolean" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg1" type="xs:string?"/><arg name="arg2" type="xs:string?"/><arg name="collation" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		collations.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The three-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		collations, and static base uri.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$arg1</code> or <code>$arg2</code> is the empty sequence, or\n             contains only ignorable collation units, it is interpreted as the zero-length\n             string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$arg2</code> is the zero-length string, then the function returns\n                <code>true</code>. If the value of <code>$arg1</code> is the zero-length string and\n             the value of <code>$arg2</code> is not the zero-length string, then the function returns\n                <code>false</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The collation used by this function is determined according to the rules in <specref ref="choosing-a-collation"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns an <code>xs:boolean</code> indicating whether or not the value of\n                <code>$arg1</code> starts with a sequence of collation units that provides a\n                <term>match</term> to the collation units of <code>$arg2</code> according to the\n             collation that is used.</p><note xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><p>\n                <term>Match</term> is defined in <bibref ref="Unicode-Collations"/>. </p></note><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error <rfc2119>may</rfc2119> be raised <errorref class="CH" code="0004"/> if the\n             specified collation does not support collation units.</p></div>\n',summary:"<p>  Returns true if the string  $arg1  contains  $arg2  as a\n             trailing substring, taking collations into account.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg1",type:"xs:string",occurrence:"?",description:""},{name:"arg2",type:"xs:string",occurrence:"?",description:""},{name:"collation",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:1,name:"environment-variable",qname:"fn:environment-variable",signature:"($arg as xs:string) as xs:string? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the value of a system environment variable, if it exists.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="environment-variable" return-type="xs:string?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="name" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		environment variables.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The set of available <xtermref spec="XP30" ref="dt-environment-variables">environment variables</xtermref>\n             is a set of (name, value) pairs forming part\n             of the dynamic context, in which the name is unique within the set of pairs. The name\n             and value are arbitrary strings.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the <code>$name</code> argument matches the name of one of these pairs, the function\n             returns the corresponding value.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If there is no environment variable with a matching name, the function returns the empty\n             sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The collation used for matching names is <termref def="implementation-defined"/>, but\n             must be the same as the collation used to ensure that the names of all environment\n             variables are unique.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="I">The function is <termref def="dt-deterministic">deterministic</termref>,\n             which means that if it is called several times\n          within the same <termref def="dt-execution-scope">execution scope</termref>, with the same arguments,\n             it must return the same result.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">On many platforms, the term "environment variable" has a natural meaning in terms of\n             facilities provided by the operating system. This interpretation of the concept does not\n             exclude other interpretations, such as a mapping to a set of configuration parameters in\n             a database system.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Environment variable names are usually case sensitive. Names are usually of the form\n                <code>(letter|_) (letter|_|digit)*</code>, but this varies by platform.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">On some platforms, there may sometimes be multiple environment variables with the same name;\n             in this case, it is implementation-dependent as to which is returned; see for example\n                <bibref ref="POSIX.1-2008"/> (Chapter 8, Environment Variables).\n             Implementations <rfc2119>may</rfc2119> use prefixes or other naming conventions\n             to disambiguate the names.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The requirement to ensure that the function is deterministic means in practice that\n          the implementation must make a snapshot of the environment variables at some time\n          during execution, and return values obtained from this snapshot, rather than using\n          live values that are subject to change at any time.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Operating system environment variables may be associated with a particular process,\n          while queries and stylesheets may execute across multiple processes (or multiple machines).\n          In such circumstances implementations <rfc2119>may</rfc2119> choose to provide access\n          to the environment variables associated with the process in which the query or stylesheet\n          processing was initiated.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Security advice: Queries from untrusted sources should not be permitted unrestricted\n             access to environment variables. For example, the name of the account under which the\n             query is running may be useful information to a would-be intruder. An implementation may\n             therefore choose to restrict access to the environment, or may provide a facility to\n             make <code>fn:environment-variable</code> always return the empty sequence.</p></div>\n',summary:"<p>  Returns the value of a system environment variable, if it exists.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:string?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"environment-variable",qname:"fn:environment-variable",signature:"($name as xs:string) as xs:string? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the value of a system environment variable, if it exists.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="environment-variable" return-type="xs:string?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="name" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		environment variables.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The set of available <xtermref spec="XP30" ref="dt-environment-variables">environment variables</xtermref>\n             is a set of (name, value) pairs forming part\n             of the dynamic context, in which the name is unique within the set of pairs. The name\n             and value are arbitrary strings.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the <code>$name</code> argument matches the name of one of these pairs, the function\n             returns the corresponding value.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If there is no environment variable with a matching name, the function returns the empty\n             sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The collation used for matching names is <termref def="implementation-defined"/>, but\n             must be the same as the collation used to ensure that the names of all environment\n             variables are unique.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="I">The function is <termref def="dt-deterministic">deterministic</termref>,\n             which means that if it is called several times\n          within the same <termref def="dt-execution-scope">execution scope</termref>, with the same arguments,\n             it must return the same result.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">On many platforms, the term "environment variable" has a natural meaning in terms of\n             facilities provided by the operating system. This interpretation of the concept does not\n             exclude other interpretations, such as a mapping to a set of configuration parameters in\n             a database system.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Environment variable names are usually case sensitive. Names are usually of the form\n                <code>(letter|_) (letter|_|digit)*</code>, but this varies by platform.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">On some platforms, there may sometimes be multiple environment variables with the same name;\n             in this case, it is implementation-dependent as to which is returned; see for example\n                <bibref ref="POSIX.1-2008"/> (Chapter 8, Environment Variables).\n             Implementations <rfc2119>may</rfc2119> use prefixes or other naming conventions\n             to disambiguate the names.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The requirement to ensure that the function is deterministic means in practice that\n          the implementation must make a snapshot of the environment variables at some time\n          during execution, and return values obtained from this snapshot, rather than using\n          live values that are subject to change at any time.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Operating system environment variables may be associated with a particular process,\n          while queries and stylesheets may execute across multiple processes (or multiple machines).\n          In such circumstances implementations <rfc2119>may</rfc2119> choose to provide access\n          to the environment variables associated with the process in which the query or stylesheet\n          processing was initiated.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Security advice: Queries from untrusted sources should not be permitted unrestricted\n             access to environment variables. For example, the name of the account under which the\n             query is running may be useful information to a would-be intruder. An implementation may\n             therefore choose to restrict access to the environment, or may provide a facility to\n             make <code>fn:environment-variable</code> always return the empty sequence.</p></div>\n',summary:"<p>  Returns the value of a system environment variable, if it exists.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:string?",description:""},errors:[]},{isDocumented:!0,arity:0,name:"error",qname:"fn:error",signature:"() as none external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Calling the <code>fn:error</code> function raises an application-defined\n             error.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="error" return-type="none" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example><example role="signature"><proto name="error" return-type="none" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="code" type="xs:QName"/></proto></example><example role="signature"><proto name="error" return-type="none" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="code" type="xs:QName?"/><arg name="description" type="xs:string"/></proto></example><example role="signature"><proto name="error" return-type="none" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="code" type="xs:QName?"/><arg name="description" type="xs:string"/><arg name="error-object" type="item()*"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-nondeterministic">nondeterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function never returns a value. Instead it always raises an error. The effect of\n             the error is identical to the effect of dynamic errors raised implicitly, for example\n             when an incorrect argument is supplied to a function.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The parameters to the <code>fn:error</code> function supply information that is\n             associated with the error condition and that is made available to a caller that asks for\n             information about the error. The error may be caught either by the host language (using\n             a try/catch construct in XSLT or XQuery, for example), or by the calling application or\n             external processing environment. The way in which error information is returned to the\n             external processing environment is <termref def="implementation-dependent"/></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>fn:error</code> is called with no arguments, then its behavior is the same as\n             the function call: </p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve"> fn:error(fn:QName(\'http://www.w3.org/2005/xqt-errors\', \'err:FOER0000\')) </eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$code</code> is the empty sequence then the effective value is the\n                <code>xs:QName</code> constructed by:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve"> fn:QName(\'http://www.w3.org/2005/xqt-errors\', \'err:FOER0000\')</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">There are three pieces of information that may be associated with an error:</p><ulist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>The <code>$code</code> is an error code that distinguishes this error from others.\n                   It is an <code>xs:QName</code>; the namespace URI conventionally identifies the\n                   component, subsystem, or authority responsible for defining the meaning of the\n                   error code, while the local part identifies the specific error condition. The\n                   namespace URI <code>http://www.w3.org/2005/xqt-errors</code> is used for errors\n                   defined in this specification; other namespace URIs may be used for errors defined\n                   by the application.</p><p>If the external processing environment expects the error code to be returned as a\n                   URI or a string rather than as an <code>xs:QName</code>, then an error code with\n                   namespace URI <code>NS</code> and local part <code>LP</code> will be returned in\n                   the form <code>NS#LP</code>. The namespace URI part of the error code should\n                   therefore not include a fragment identifier.</p></item><item><p>The <code>$description</code> is a natural-language description of the error\n                   condition.</p></item><item><p>The <code>$error-object</code> is an arbitrary value used to convey additional\n                   information about the error, and may be used in any way the application\n                   chooses.</p></item></ulist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function always raises a <phrase diff="add" at="L">dynamic</phrase> error. By default, it raises <errorref class="ER" code="0000"/></p></div>\n',summary:"<p>  Calling the  fn:error  function raises an application-defined\n             error.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"none",description:""},errors:[]},{isDocumented:!0,arity:1,name:"error",qname:"fn:error",signature:"($code as xs:QName) as none external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Calling the <code>fn:error</code> function raises an application-defined\n             error.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="error" return-type="none" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example><example role="signature"><proto name="error" return-type="none" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="code" type="xs:QName"/></proto></example><example role="signature"><proto name="error" return-type="none" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="code" type="xs:QName?"/><arg name="description" type="xs:string"/></proto></example><example role="signature"><proto name="error" return-type="none" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="code" type="xs:QName?"/><arg name="description" type="xs:string"/><arg name="error-object" type="item()*"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-nondeterministic">nondeterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function never returns a value. Instead it always raises an error. The effect of\n             the error is identical to the effect of dynamic errors raised implicitly, for example\n             when an incorrect argument is supplied to a function.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The parameters to the <code>fn:error</code> function supply information that is\n             associated with the error condition and that is made available to a caller that asks for\n             information about the error. The error may be caught either by the host language (using\n             a try/catch construct in XSLT or XQuery, for example), or by the calling application or\n             external processing environment. The way in which error information is returned to the\n             external processing environment is <termref def="implementation-dependent"/></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>fn:error</code> is called with no arguments, then its behavior is the same as\n             the function call: </p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve"> fn:error(fn:QName(\'http://www.w3.org/2005/xqt-errors\', \'err:FOER0000\')) </eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$code</code> is the empty sequence then the effective value is the\n                <code>xs:QName</code> constructed by:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve"> fn:QName(\'http://www.w3.org/2005/xqt-errors\', \'err:FOER0000\')</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">There are three pieces of information that may be associated with an error:</p><ulist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>The <code>$code</code> is an error code that distinguishes this error from others.\n                   It is an <code>xs:QName</code>; the namespace URI conventionally identifies the\n                   component, subsystem, or authority responsible for defining the meaning of the\n                   error code, while the local part identifies the specific error condition. The\n                   namespace URI <code>http://www.w3.org/2005/xqt-errors</code> is used for errors\n                   defined in this specification; other namespace URIs may be used for errors defined\n                   by the application.</p><p>If the external processing environment expects the error code to be returned as a\n                   URI or a string rather than as an <code>xs:QName</code>, then an error code with\n                   namespace URI <code>NS</code> and local part <code>LP</code> will be returned in\n                   the form <code>NS#LP</code>. The namespace URI part of the error code should\n                   therefore not include a fragment identifier.</p></item><item><p>The <code>$description</code> is a natural-language description of the error\n                   condition.</p></item><item><p>The <code>$error-object</code> is an arbitrary value used to convey additional\n                   information about the error, and may be used in any way the application\n                   chooses.</p></item></ulist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function always raises a <phrase diff="add" at="L">dynamic</phrase> error. By default, it raises <errorref class="ER" code="0000"/></p></div>\n',summary:"<p>  Calling the  fn:error  function raises an application-defined\n             error.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"code",type:"xs:QName",occurrence:null,description:""}],returns:{type:"none",description:""},errors:[]},{isDocumented:!0,arity:2,name:"error",qname:"fn:error",signature:"($code as xs:QName?, $description as xs:string) as none external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Calling the <code>fn:error</code> function raises an application-defined\n             error.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="error" return-type="none" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example><example role="signature"><proto name="error" return-type="none" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="code" type="xs:QName"/></proto></example><example role="signature"><proto name="error" return-type="none" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="code" type="xs:QName?"/><arg name="description" type="xs:string"/></proto></example><example role="signature"><proto name="error" return-type="none" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="code" type="xs:QName?"/><arg name="description" type="xs:string"/><arg name="error-object" type="item()*"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-nondeterministic">nondeterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function never returns a value. Instead it always raises an error. The effect of\n             the error is identical to the effect of dynamic errors raised implicitly, for example\n             when an incorrect argument is supplied to a function.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The parameters to the <code>fn:error</code> function supply information that is\n             associated with the error condition and that is made available to a caller that asks for\n             information about the error. The error may be caught either by the host language (using\n             a try/catch construct in XSLT or XQuery, for example), or by the calling application or\n             external processing environment. The way in which error information is returned to the\n             external processing environment is <termref def="implementation-dependent"/></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>fn:error</code> is called with no arguments, then its behavior is the same as\n             the function call: </p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve"> fn:error(fn:QName(\'http://www.w3.org/2005/xqt-errors\', \'err:FOER0000\')) </eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$code</code> is the empty sequence then the effective value is the\n                <code>xs:QName</code> constructed by:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve"> fn:QName(\'http://www.w3.org/2005/xqt-errors\', \'err:FOER0000\')</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">There are three pieces of information that may be associated with an error:</p><ulist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>The <code>$code</code> is an error code that distinguishes this error from others.\n                   It is an <code>xs:QName</code>; the namespace URI conventionally identifies the\n                   component, subsystem, or authority responsible for defining the meaning of the\n                   error code, while the local part identifies the specific error condition. The\n                   namespace URI <code>http://www.w3.org/2005/xqt-errors</code> is used for errors\n                   defined in this specification; other namespace URIs may be used for errors defined\n                   by the application.</p><p>If the external processing environment expects the error code to be returned as a\n                   URI or a string rather than as an <code>xs:QName</code>, then an error code with\n                   namespace URI <code>NS</code> and local part <code>LP</code> will be returned in\n                   the form <code>NS#LP</code>. The namespace URI part of the error code should\n                   therefore not include a fragment identifier.</p></item><item><p>The <code>$description</code> is a natural-language description of the error\n                   condition.</p></item><item><p>The <code>$error-object</code> is an arbitrary value used to convey additional\n                   information about the error, and may be used in any way the application\n                   chooses.</p></item></ulist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function always raises a <phrase diff="add" at="L">dynamic</phrase> error. By default, it raises <errorref class="ER" code="0000"/></p></div>\n',summary:"<p>  Calling the  fn:error  function raises an application-defined\n             error.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"code",type:"xs:QName",occurrence:"?",description:""},{name:"description",type:"xs:string",occurrence:null,description:""}],returns:{type:"none",description:""},errors:[]},{isDocumented:!0,arity:3,name:"error",qname:"fn:error",signature:"($code as xs:QName?, $description as xs:string, $error-object as item()*) as none external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Calling the <code>fn:error</code> function raises an application-defined\n             error.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="error" return-type="none" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example><example role="signature"><proto name="error" return-type="none" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="code" type="xs:QName"/></proto></example><example role="signature"><proto name="error" return-type="none" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="code" type="xs:QName?"/><arg name="description" type="xs:string"/></proto></example><example role="signature"><proto name="error" return-type="none" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="code" type="xs:QName?"/><arg name="description" type="xs:string"/><arg name="error-object" type="item()*"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-nondeterministic">nondeterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function never returns a value. Instead it always raises an error. The effect of\n             the error is identical to the effect of dynamic errors raised implicitly, for example\n             when an incorrect argument is supplied to a function.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The parameters to the <code>fn:error</code> function supply information that is\n             associated with the error condition and that is made available to a caller that asks for\n             information about the error. The error may be caught either by the host language (using\n             a try/catch construct in XSLT or XQuery, for example), or by the calling application or\n             external processing environment. The way in which error information is returned to the\n             external processing environment is <termref def="implementation-dependent"/></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>fn:error</code> is called with no arguments, then its behavior is the same as\n             the function call: </p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve"> fn:error(fn:QName(\'http://www.w3.org/2005/xqt-errors\', \'err:FOER0000\')) </eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$code</code> is the empty sequence then the effective value is the\n                <code>xs:QName</code> constructed by:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve"> fn:QName(\'http://www.w3.org/2005/xqt-errors\', \'err:FOER0000\')</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">There are three pieces of information that may be associated with an error:</p><ulist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>The <code>$code</code> is an error code that distinguishes this error from others.\n                   It is an <code>xs:QName</code>; the namespace URI conventionally identifies the\n                   component, subsystem, or authority responsible for defining the meaning of the\n                   error code, while the local part identifies the specific error condition. The\n                   namespace URI <code>http://www.w3.org/2005/xqt-errors</code> is used for errors\n                   defined in this specification; other namespace URIs may be used for errors defined\n                   by the application.</p><p>If the external processing environment expects the error code to be returned as a\n                   URI or a string rather than as an <code>xs:QName</code>, then an error code with\n                   namespace URI <code>NS</code> and local part <code>LP</code> will be returned in\n                   the form <code>NS#LP</code>. The namespace URI part of the error code should\n                   therefore not include a fragment identifier.</p></item><item><p>The <code>$description</code> is a natural-language description of the error\n                   condition.</p></item><item><p>The <code>$error-object</code> is an arbitrary value used to convey additional\n                   information about the error, and may be used in any way the application\n                   chooses.</p></item></ulist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function always raises a <phrase diff="add" at="L">dynamic</phrase> error. By default, it raises <errorref class="ER" code="0000"/></p></div>\n',summary:"<p>  Calling the  fn:error  function raises an application-defined\n             error.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"code",type:"xs:QName",occurrence:"?",description:""},{name:"description",type:"xs:string",occurrence:null,description:""},{name:"error-object",type:"item()",occurrence:"*",description:""}],returns:{type:"none",description:""},errors:[]},{isDocumented:!0,arity:1,name:"escape-html-uri",qname:"fn:escape-html-uri",signature:"($uri as xs:string?) as xs:string external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Escapes a URI in the same way that HTML user agents handle attribute values\n             expected to contain URIs.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="escape-html-uri" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="uri" type="xs:string?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$uri</code> is the empty sequence, the function returns the zero-length\n             string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function escapes all <termref def="character">characters</termref> except\n             printable characters of the US-ASCII coded character set, specifically the <termref def="codepoint">codepoints</termref> between 32 and 126 (decimal) inclusive. Each\n             character in <code>$uri</code> to be escaped is replaced by an escape sequence, which is\n             formed by encoding the character as a sequence of octets in UTF-8, and then representing\n             each of these octets in the form %HH, where HH is the hexadecimal representation of the\n             octet. This function must always generate hexadecimal values using the upper-case\n             letters A-F.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The behavior of this function corresponds to the recommended handling of non-ASCII\n             characters in URI attribute values as described in <bibref ref="HTML40"/> Appendix\n             B.2.1.</p></div>\n',summary:"<p>  Escapes a URI in the same way that HTML user agents handle attribute values\n             expected to contain URIs.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"uri",type:"xs:string",occurrence:"?",description:""}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:1,name:"exactly-one",qname:"fn:exactly-one",signature:"($arg as item()*) as item() external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns <code>$arg</code> if it contains exactly one item. Otherwise, raises an\n             error. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="exactly-one" return-type="item()" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="item()*"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Except in error cases, the function returns <code>$arg</code> unchanged.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="del" at="F">For detailed type semantics, see [Formal Semantics].</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RG" code="0005"/> if <code>$arg</code> is an empty\n             sequence or a sequence containing more than one item.</p></div>\n',summary:"<p>  Returns  $arg  if it contains exactly one item.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"item()",occurrence:"*",description:""}],returns:{type:"item()",description:""},errors:[]},{isDocumented:!0,arity:1,name:"exists",qname:"fn:exists",signature:"($arg as item()*) as xs:boolean external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns true if the argument is a non-empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="exists" return-type="xs:boolean" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="item()*"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$arg</code> is a non-empty sequence, the function returns\n                <code>true</code>; otherwise, the function returns <code>false</code>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:exists(fn:remove(("hello"), 1))</code> returns <code>false()</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:exists(fn:remove(("hello", "world"), 1))</code> returns <code>true()</code>.</p></div>\n',summary:"<p>  Returns true if the argument is a non-empty sequence.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"item()",occurrence:"*",description:""}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:0,name:"false",qname:"fn:false",signature:"() as xs:boolean external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the <code>xs:boolean</code> value <code>false</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="false" return-type="xs:boolean" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The result is equivalent to <code>xs:boolean("0")</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:false()</code> returns <code>xs:boolean(0)</code>.</p></div>\n',summary:"<p>  Returns the  xs:boolean  value  false .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:2,name:"filter",qname:"fn:filter",signature:"($seq as item()*, $f as function (item()) as xs:boolean) as item()* external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns those items from the sequence <var>$seq</var> for which the supplied\n             function <var>$f</var> returns true.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="filter" return-type="item()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="seq" type="item()*"/><arg name="f" type="function(item()) as xs:boolean"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The effect of the function is equivalent to the following implementation in XQuery:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">\n declare function fn:filter(\n         $seq as item()*,\n         $f as function(item()) as xs:boolean)\n         as item()* {\n   if (fn:empty($seq))\n   then ()\n   else ( fn:head($seq)[$f(.) eq fn:true()],\n          fn:filter(fn:tail($seq), $f)\n        )\n };</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">or its equivalent in XSLT:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">\n &lt;xsl:function name="fn:filter" as="item()*"&gt;\n   &lt;xsl:param name="seq" as="item()*"/&gt;\n   &lt;xsl:param name="f" as="function(item()) as xs:boolean"/&gt;\n   &lt;xsl:if test="fn:exists($seq)"&gt;\n     &lt;xsl:sequence select="fn:head($seq)[$f(.) eq fn:true()], fn:filter(fn:tail($seq), $f)"/&gt;\n   &lt;/xsl:if&gt;\n &lt;/xsl:function&gt;\n          </eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="G">As a consequence of the function signature and the function calling\n             rules, a type error occurs if the supplied function <var>$f</var> returns anything other\n             than a single <code>xs:boolean</code> item; there is no conversion to an effective\n             boolean value.</p></div>\n',summary:"<p>  Returns those items from the sequence  $seq  for which the supplied\n             function  $f  returns true.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"seq",type:"item()",occurrence:"*",description:""},{name:"f",type:"function (item()) as xs:boolean",occurrence:null,description:""}],returns:{type:"item()*",description:""},errors:[]},{isDocumented:!0,arity:1,name:"floor",qname:"fn:floor",signature:"($arg as numeric?) as numeric? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Rounds <code>$arg</code> downwards to a whole number.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="floor" return-type="numeric?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="numeric?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">General rules: see <specref ref="numeric-value-functions"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns the largest (closest to positive infinity) number with no\n             fractional part that is not greater than the value of <code>$arg</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the type of <code>$arg</code> is one of the four numeric types <code>xs:float</code>,\n                <code>xs:double</code>, <code>xs:decimal</code> or <code>xs:integer</code> the type\n             of the result is the same as the type of <code>$arg</code>. If the type of\n                <code>$arg</code> is a type derived from one of the numeric types, the result is an\n             instance of the base numeric type.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">For <code>xs:float</code> and <code>xs:double</code> arguments, if the argument is\n             positive zero, then positive zero is returned. If the argument is negative zero, then\n             negative zero is returned.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="del" at="F">For detailed type semantics, see [Formal Semantics].</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:floor(10.5)</code> returns <code>10</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:floor(-10.5)</code> returns <code>-11</code>.</p></div>\n',summary:"<p>  Rounds  $arg  downwards to a whole number.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"numeric",occurrence:"?",description:""}],returns:{type:"numeric?",description:""},errors:[]},{isDocumented:!0,arity:3,name:"fold-left",qname:"fn:fold-left",signature:"($seq as item()*, $zero as item()*, $f as function (item()*, item()) as item()*) as item()* external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Processes the supplied sequence from left to right, applying the supplied\n             function repeatedly to each item in turn, together with an accumulated result value.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="fold-left" return-type="item()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="seq" type="item()*"/><arg name="zero" type="item()*"/><arg name="f" type="function(item()*, item()) as item()*"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The effect of the function is equivalent to the following implementation in XQuery:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">\n declare function fn:fold-left(\n         $seq as item()*\n         $zero as item()*,\n         $f as function(item()*, item()) as item()*)\n         as item()* {\n   if (fn:empty($seq))\n   then $zero\n   else fn:fold-left(fn:tail($seq), $f($zero, fn:head($seq)), $f)\n };</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">or its equivalent in XSLT:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">\n &lt;xsl:function name="fn:fold-left" as="item()*"&gt;\n   &lt;xsl:param name="seq" as="item()*"/&gt;\n   &lt;xsl:param name="zero" as="item()*"/&gt;\n   &lt;xsl:param name="f" as="function(item()*, item()) as item()*"/&gt;\n   &lt;xsl:choose&gt;\n     &lt;xsl:when test="fn:empty($seq)"&gt;\n       &lt;xsl:sequence select="$zero"/&gt;\n     &lt;/xsl:when&gt;\n     &lt;xsl:otherwise&gt;\n       &lt;xsl:sequence select="fn:fold-left(fn:tail($seq), $f($zero, fn:head($seq)), $f)"/&gt;\n     &lt;/xsl:otherwise&gt;\n   &lt;/xsl:choose&gt;\n &lt;/xsl:function&gt;\n          </eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="G">As a consequence of the function signature and the function calling\n             rules, a type error occurs if the supplied function <var>$f</var> cannot be applied to\n             two arguments, where the first argument is either the value of <var>$zero</var> or the\n             result of a previous application of <var>$f</var>, and the second is <var>$seq</var> or\n             any trailing subsequence of <var>$seq</var>.</p></div>\n',summary:"<p>  Processes the supplied sequence from left to right, applying the supplied\n             function repeatedly to each item in turn, together with an accumulated result value.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"seq",type:"item()",occurrence:"*",description:""},{name:"zero",type:"item()",occurrence:"*",description:""},{name:"f",type:"function (item()*, item()) as item()*",occurrence:null,description:""}],returns:{type:"item()*",description:""},errors:[]},{isDocumented:!0,arity:3,name:"fold-right",qname:"fn:fold-right",signature:"($seq as item()*, $zero as item()*, $f as function (item()*, item()) as item()*) as item()* external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Processes the supplied sequence from right to left, applying the supplied\n             function repeatedly to each item in turn, together with an accumulated result value.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="fold-right" return-type="item()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="seq" type="item()*"/><arg name="zero" type="item()*"/><arg name="f" type="function(item()*, item()) as item()*"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The effect of the function is equivalent to the following implementation in XQuery:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">\n declare function fn:fold-right(\n         $seq as item()*,\n         $zero as item()*,\n         $f as function(item(), item()*) as item()*)\n         as item()* {\n   if (fn:empty($seq))\n   then $zero\n   else $f(fn:head($seq), fn:fold-right(fn:tail($seq), $zero, $f))\n };</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">or its equivalent in XSLT:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">\n &lt;xsl:function name="fn:fold-right" as="item()*"&gt;\n   &lt;xsl:param name="seq" as="item()*"/&gt;\n   &lt;xsl:param name="zero" as="item()*"/&gt;\n   &lt;xsl:param name="f" as="function(item(), item()*) as item()*"/&gt;\n   &lt;xsl:choose&gt;\n     &lt;xsl:when test="fn:empty($seq)"&gt;\n       &lt;xsl:sequence select="$zero"/&gt;\n     &lt;/xsl:when&gt;\n     &lt;xsl:otherwise&gt;\n       &lt;xsl:sequence select="$f(fn:head($seq), fn:fold-right(fn:tail($seq), $zero, $f))"/&gt;\n     &lt;/xsl:otherwise&gt;\n   &lt;/xsl:choose&gt;\n &lt;/xsl:function&gt;\n          </eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="G">As a consequence of the function signature and the function calling\n             rules, a type error occurs if the supplied function <var>$f</var> cannot be applied to\n             two arguments, where the first argument is any item in the sequence <var>$seq</var>, and\n             the second is either the value of <var>$zero</var> or the result of a previous\n             application of <var>$f</var>.</p></div>\n',summary:"<p>  Processes the supplied sequence from right to left, applying the supplied\n             function repeatedly to each item in turn, together with an accumulated result value.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"seq",type:"item()",occurrence:"*",description:""},{name:"zero",type:"item()",occurrence:"*",description:""},{name:"f",type:"function (item()*, item()) as item()*",occurrence:null,description:""}],returns:{type:"item()*",description:""},errors:[]},{isDocumented:!0,arity:3,name:"for-each-pair",qname:"fn:for-each-pair",signature:"($seq1 as item()*, $seq2 as item()*, $f as function (item(), item()) as item()*) as item()* external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Applies the function item <var>$f</var> to successive pairs of items taken one\n             from <var>$seq1</var> and one from <var>$seq2</var>, returning the concatenation of the\n             resulting sequences in order.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="for-each-pair" return-type="item()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="seq1" type="item()*"/><arg name="seq2" type="item()*"/><arg name="f" type="function(item(), item()) as item()*"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The effect of the function is equivalent to the following implementation in XQuery:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">\n declare function fn:for-each-pair($seq1, $seq2, $f)\n {\n    if(fn:exists($seq1) and fn:exists($seq2))\n    then (\n      $f(fn:head($seq1), fn:head($seq2)),\n      fn:for-each-pair(fn:tail($seq1), fn:tail($seq2), $f)\n    )\n    else ()\n };</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">or its equivalent in XSLT:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">\n &lt;xsl:function name="fn:for-each-pair"&gt;\n   &lt;xsl:param name="seq1/&gt;\n   &lt;xsl:param name="seq2/&gt;\n   &lt;xsl:param name="f"/&gt;\n   &lt;xsl:if test="fn:exists($seq1) and fn:exists($seq2)"&gt;\n     &lt;xsl:sequence select="$f(fn:head($seq1), fn:head($seq2))"/&gt;\n     &lt;xsl:sequence select="fn:for-each-pair(fn:tail($seq1), fn:tail($seq2), $f)"/&gt;\n   &lt;/xsl:if&gt;\n &lt;/xsl:function&gt;\n          </eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:for-each-pair(("a", "b", "c"), ("x", "y", "z"), concat#2)</code> returns <code>("ax", "by", "cz")</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:for-each-pair(1 to 5, 1 to 5, function($a, $b){10*$a + $b}</code> returns <code>(11, 22, 33, 44, 55)</code>.</p></div>\n',summary:"<p>  Applies the function item  $f  to successive pairs of items taken one\n             from  $seq1  and one from  $seq2 , returning the concatenation of the\n             resulting sequences in order.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"seq1",type:"item()",occurrence:"*",description:""},{name:"seq2",type:"item()",occurrence:"*",description:""},{name:"f",type:"function (item(), item()) as item()*",occurrence:null,description:""}],returns:{type:"item()*",description:""},errors:[]},{isDocumented:!0,arity:2,name:"for-each",qname:"fn:for-each",signature:"($seq as item()*, $f as function (item()) as item()*) as item()* external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Applies the function item <var>$f</var> to every item from the sequence\n                <var>$seq</var> in turn, returning the concatenation of the resulting sequences in\n             order.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="for-each" return-type="item()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="seq" type="item()*"/><arg name="f" type="function(item()) as item()*"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The effect of the function is equivalent to the following implementation in XQuery:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">\n declare function fn:for-each($seq, $f) {\n   if (fn:empty($seq))\n   then ()\n   else ($f(fn:head($seq)), fn:for-each(fn:tail($seq), $f))\n };</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">or its equivalent in XSLT:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">\n &lt;xsl:function name="fn:for-each"&gt;\n   &lt;xsl:param name="seq"/&gt;\n   &lt;xsl:param name="f"/&gt;\n   &lt;xsl:if test="fn:exists($seq)"&gt;\n     &lt;xsl:sequence select="$f(fn:head($seq)), fn:for-each(fn:tail($seq), $f)"/&gt;\n   &lt;/xsl:if&gt;\n &lt;/xsl:function&gt;\n          </eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function call <code>fn:for-each($SEQ, $F)</code> is equivalent to the expression\n                <code>for $i in $SEQ return $F($i)</code><phrase diff="add" at="G">, assuming that\n                ordering mode is <code>ordered</code>.</phrase></p></div>\n',summary:"<p>  Applies the function item  $f  to every item from the sequence\n                 $seq  in turn, returning the concatenation of the resulting sequences in\n             order.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"seq",type:"item()",occurrence:"*",description:""},{name:"f",type:"function (item()) as item()*",occurrence:null,description:""}],returns:{type:"item()*",description:""},errors:[]},{isDocumented:!0,arity:2,name:"format-date",qname:"fn:format-date",signature:"($value as xs:date?, $picture as xs:string) as xs:string? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns a string containing an <code>xs:date</code> value formatted for display.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="format-date" return-type="xs:string?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="value" type="xs:date?"/><arg name="picture" type="xs:string"/></proto></example><example role="signature"><proto name="format-date" return-type="xs:string?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="value" type="xs:date?"/><arg name="picture" type="xs:string"/><arg name="language" type="xs:string?"/><arg name="calendar" type="xs:string?"/><arg name="place" type="xs:string?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		default calendar, and default language, and default place, and implicit timezone.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The five-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		implicit timezone, and namespaces.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">See <specref ref="rules-for-datetime-formatting"/>.</p></div>\n',summary:"<p>  Returns a string containing an  xs:date  value formatted for display.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"value",type:"xs:date",occurrence:"?",description:""},{name:"picture",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:string?",description:""},errors:[]},{isDocumented:!0,arity:5,name:"format-date",qname:"fn:format-date",signature:"($value as xs:date?, $picture as xs:string, $language as xs:string?, $calendar as xs:string?, $place as xs:string?) as xs:string? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns a string containing an <code>xs:date</code> value formatted for display.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="format-date" return-type="xs:string?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="value" type="xs:date?"/><arg name="picture" type="xs:string"/></proto></example><example role="signature"><proto name="format-date" return-type="xs:string?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="value" type="xs:date?"/><arg name="picture" type="xs:string"/><arg name="language" type="xs:string?"/><arg name="calendar" type="xs:string?"/><arg name="place" type="xs:string?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		default calendar, and default language, and default place, and implicit timezone.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The five-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		implicit timezone, and namespaces.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">See <specref ref="rules-for-datetime-formatting"/>.</p></div>\n',summary:"<p>  Returns a string containing an  xs:date  value formatted for display.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"value",type:"xs:date",occurrence:"?",description:""},{name:"picture",type:"xs:string",occurrence:null,description:""},{name:"language",type:"xs:string",occurrence:"?",description:""},{name:"calendar",type:"xs:string",occurrence:"?",description:""},{name:"place",type:"xs:string",occurrence:"?",description:""}],returns:{type:"xs:string?",description:""},errors:[]},{isDocumented:!0,arity:2,name:"format-dateTime",qname:"fn:format-dateTime",signature:"($value as xs:dateTime?, $picture as xs:string) as xs:string? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns a string containing an <code>xs:dateTime</code> value formatted for display.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="format-dateTime" return-type="xs:string?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="value" type="xs:dateTime?"/><arg name="picture" type="xs:string"/></proto></example><example role="signature"><proto name="format-dateTime" return-type="xs:string?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="value" type="xs:dateTime?"/><arg name="picture" type="xs:string"/><arg name="language" type="xs:string?"/><arg name="calendar" type="xs:string?"/><arg name="place" type="xs:string?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		default calendar, and default language, and default place, and implicit timezone.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The five-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		implicit timezone, and namespaces.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">See <specref ref="rules-for-datetime-formatting"/>.</p></div>\n',summary:"<p>  Returns a string containing an  xs:dateTime  value formatted for display.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"value",type:"xs:dateTime",occurrence:"?",description:""},{name:"picture",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:string?",description:""},errors:[]},{isDocumented:!0,arity:5,name:"format-dateTime",qname:"fn:format-dateTime",signature:"($value as xs:dateTime?, $picture as xs:string, $language as xs:string?, $calendar as xs:string?, $place as xs:string?) as xs:string? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns a string containing an <code>xs:dateTime</code> value formatted for display.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="format-dateTime" return-type="xs:string?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="value" type="xs:dateTime?"/><arg name="picture" type="xs:string"/></proto></example><example role="signature"><proto name="format-dateTime" return-type="xs:string?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="value" type="xs:dateTime?"/><arg name="picture" type="xs:string"/><arg name="language" type="xs:string?"/><arg name="calendar" type="xs:string?"/><arg name="place" type="xs:string?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		default calendar, and default language, and default place, and implicit timezone.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The five-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		implicit timezone, and namespaces.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">See <specref ref="rules-for-datetime-formatting"/>.</p></div>\n',summary:"<p>  Returns a string containing an  xs:dateTime  value formatted for display.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"value",type:"xs:dateTime",occurrence:"?",description:""},{name:"picture",type:"xs:string",occurrence:null,description:""},{name:"language",type:"xs:string",occurrence:"?",description:""},{name:"calendar",type:"xs:string",occurrence:"?",description:""},{name:"place",type:"xs:string",occurrence:"?",description:""}],returns:{type:"xs:string?",description:""},errors:[]},{isDocumented:!0,arity:2,name:"format-integer",qname:"fn:format-integer",signature:"($value as xs:integer?, $picture as xs:string) as xs:string external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Formats an integer according to a given picture string, using the conventions\n             of a given natural language if specified.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="format-integer" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="value" type="xs:integer?"/><arg name="picture" type="xs:string"/></proto></example><example role="signature"><proto name="format-integer" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="value" type="xs:integer?"/><arg name="picture" type="xs:string"/><arg name="lang" type="xs:string?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		default language.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The three-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$value</code> is an empty sequence, the function returns a zero-length\n             string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">In all other cases, the <code>$picture</code> argument describes the format in which\n                <code>$value</code> is output.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The rules that follow describe how non-negative numbers are output. If the value of\n                <code>$value</code> is negative, the rules below are applied to the absolute value of\n                <code>$value</code>, and a minus sign is prepended to the result.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="L">The value of <code>$picture</code> consists of a primary format token,\n             optionally followed\n             by a format modifier. The primary format token is always present and <rfc2119>must not</rfc2119>\n             be zero-length. If the string contains one or more semicolons then everything that\n             precedes the last semicolon is taken as the primary format token and everything\n             that follows is taken as the format modifier; if the string contains no\n             semicolon then the entire picture is taken as the primary format token, and the\n             format modifier is taken to be absent (which is equivalent to supplying a\n             zero-length string).</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The primary format token is classified as one of the following:</p><ulist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>A <var>decimal-digit-pattern</var> made up of <var>optional-digit-signs</var>,\n                      <var>mandatory-digit-signs</var>, and <var>grouping-separator-signs</var>.</p><ulist><item><p>The <var>optional-digit-sign</var> is the character "#".</p></item><item><p>A <var>mandatory-digit-sign</var> is a <termref def="character">character</termref> in Unicode category Nd. All\n                            <var>mandatory-digit-signs</var> within the format token <rfc2119>must</rfc2119> be from the\n                         same digit family, where a digit family is a sequence of ten consecutive\n                         characters in Unicode category Nd, having digit values 0 through 9. Within\n                         the format token, these digits are interchangeable: a three-digit number may\n                         thus be indicated equivalently by <code>000</code>, <code>001</code>, or\n                            <code>999</code>.</p></item><item><p>a <var>grouping-separator-sign</var> is a non-alphanumeric character, that\n                         is a <termref def="character">character</termref> whose Unicode category is\n                         other than Nd, Nl, No, Lu, Ll, Lt, Lm or Lo.</p></item></ulist><p diff="chg" at="L">If the primary format token contains at least one Unicode digit\n                   then it is taken as a decimal digit pattern, and in this case it <rfc2119>must</rfc2119>\n                   match the regular expression <code>^((\\p{Nd}|#|[^\\p{N}\\p{L}])+?)$</code>. If it contains\n                   a digit but does not match this pattern, a <phrase diff="add" at="L">dynamic</phrase> error\n                   is raised <errorref class="DF" code="1310"/>.</p><note><p diff="add" at="L">If a semicolon is to be used as a grouping separator, then the primary\n                format token as a whole must be followed by another semicolon, to ensure that\n                the grouping separator is not mistaken as a separator between the primary format\n                token and the format modifier.</p></note><p>There <rfc2119>must</rfc2119> be at least one <var>mandatory-digit-sign</var>. There may be zero or\n                   more <var>optional-digit-signs</var>, and (if present) these <rfc2119>must</rfc2119> precede all\n                      <var>mandatory-digit-signs</var>. There may be zero or more\n                      <var>grouping-separator-signs</var>. A <var>grouping-separator-sign</var> <rfc2119>must\n                   not</rfc2119> appear at the start or end of the <var>decimal-digit-pattern</var>, nor\n                   adjacent to another <var>grouping-separator-sign</var>.</p><p>The corresponding output format is a decimal number, using this digit family, with\n                   at least as many digits as there are <var>mandatory-digit-signs</var> in the\n                   format token. Thus, a format token <code>1</code> generates the sequence <code>0 1\n                      2 ... 10 11 12 ...</code>, and a format token <code>01</code> (or equivalently,\n                      <code>00</code> or <code>99</code>) generates the sequence <code>00 01 02 ...\n                      09 10 11 12 ... 99 100 101</code>. A format token of <code>&amp;#x661;</code>\n                   (Arabic-Indic digit one) generates the sequence <code>١</code> then <code>٢</code>\n                   then <code>٣</code> ...</p><p>The <var>grouping-separator-signs</var> are handled as follows. The position of\n                   grouping separators within the format token, counting backwards from the last\n                   digit, indicates the position of grouping separators to appear within the\n                   formatted number, and the character used as the <var>grouping-separator-sign</var>\n                   within the format token indicates the character to be used as the corresponding\n                   grouping separator in the formatted number. If <var>grouping-separator-signs</var>\n                   appear at regular intervals within the format token, that is if the same grouping\n                   separator appears at positions forming a sequence <var>N</var>, 2<var>N</var>,\n                      3<var>N</var>, ... for some integer value <var>N</var> (including the case\n                   where there is only one number in the list), then the sequence is extrapolated to\n                   the left, so grouping separators will be used in the formatted number at every\n                   multiple of <var>N</var>. For example, if the format token is <code>0\'000</code>\n                   then the number one million will be formatted as <code>1\'000\'000</code>, while the\n                   number fifteen will be formatted as <code>0\'015</code>.</p><p>The only purpose of <var>optional-digit-signs</var> is to mark the position of\n                      <var>grouping-separator-signs</var>. For example, if the format token is\n                      <code>#\'##0</code> then the number one million will be formatted as\n                      <code>1\'000\'000</code>, while the number fifteen will be formatted as\n                      <code>15</code>. A grouping separator is included in the formatted number only\n                   if there is a digit to its left, which will only be the case if either (a) the\n                   number is large enough to require that digit, or (b) the number of\n                      <var>mandatory-digit-signs</var> in the format token requires insignificant\n                   leading zeros to be present.</p><note><p>Numbers will never be truncated. Given the <var>decimal-digit-pattern</var>\n                      <code>01</code>, the number three hundred will be output as <code>300</code>,\n                      despite the absence of any <var>optional-digit-sign</var>.</p></note></item><item><p>The format token <code>A</code>, which generates the sequence <code>A B C ... Z AA AB\n                      AC...</code>.</p></item><item><p>The format token <code>a</code>, which generates the sequence <code>a b c ... z aa ab\n                      ac...</code>.</p></item><item><p>The format token <code>i</code>, which generates the sequence <code>i ii iii iv v vi vii\n                      viii ix x ...</code>.</p></item><item><p>The format token <code>I</code>, which generates the sequence <code>I II III IV V VI VII\n                      VIII IX X ...</code>.</p></item><item><p>The format token <code>w</code>, which generates numbers written as lower-case words, for\n                   example in English, <code>one two three four ...</code>\n                </p></item><item><p>The format token <code>W</code>, which generates numbers written as upper-case words, for\n                   example in English, <code>ONE TWO THREE FOUR ...</code>\n                </p></item><item><p>The format token <code>Ww</code>, which generates numbers written as title-case words, for\n                   example in English, <code>One Two Three Four ...</code>\n                </p></item><item><p>Any other format token, which indicates a numbering sequence in which that token\n                   represents the number 1 (one) (but see the note below).\n                   <!-- Where possible (given the constraint that format tokens\n 						must be alphanumeric, and that they must be distinct) the format token\n 						used to represent a numbering sequence should be the same as the representation\n 						of the number 1 (one) in that sequence.-->\n                   It is <termref def="implementation-defined">implementation-defined</termref> which\n                   numbering sequences, additional to those listed above, are supported. If an\n                   implementation does not support a numbering sequence represented by the given\n                   token, it <rfc2119>must</rfc2119> use a format token of <code>1</code>.</p><note><p>In some traditional numbering sequences additional signs are added to denote\n                      that the letters should be interpreted as numbers; these are not included in\n                      the format token. An example (see also the example below) is classical Greek\n                      where a <emph>dexia keraia</emph> (x0374, ʹ) and sometimes an <emph>aristeri keraia</emph>\n                      (x0375, ͵) is added.</p></note></item></ulist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">For all format tokens other than the first kind above (one that consists of decimal\n             digits), there <rfc2119>may</rfc2119> be <termref def="implementation-defined">implementation-defined</termref> lower and upper bounds on the range of numbers that\n             can be formatted using this format token; indeed, for some numbering sequences there may\n             be intrinsic limits. For example, the format token <code>&amp;#x2460;</code> (circled\n             digit one, ①) has a range <phrase diff="chg" at="M">imposed by the Unicode character repertoire — 1 to 20 in\n             Unicode versions prior to 4.0, increased in subsequent versions</phrase>. For\n             the numbering sequences described above any upper bound imposed by the implementation\n                <rfc2119>must not</rfc2119> be less than 1000 (one thousand) and any lower bound must\n             not be greater than 1. Numbers that fall outside this range <rfc2119>must</rfc2119> be\n             formatted using the format token <code>1</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The above expansions of numbering sequences for format tokens such as <code>a</code> and\n                <code>i</code> are indicative but not prescriptive. There are various conventions in\n             use for how alphabetic sequences continue when the alphabet is exhausted, and differing\n             conventions for how roman numerals are written (for example, <code>IV</code> versus\n                <code>IIII</code> as the representation of the number 4). Sometimes alphabetic\n             sequences are used that omit letters such as <code>i</code> and <code>o</code>. This\n             specification does not prescribe the detail of any sequence other than those sequences\n             consisting entirely of decimal digits.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Many numbering sequences are language-sensitive. This applies especially to the sequence\n             selected by the tokens <code>w</code>, <code>W</code> and <code>Ww</code>. It also\n             applies to other sequences, for example different languages using the Cyrillic alphabet\n             use different sequences of characters, each starting with the letter #x410 (Cyrillic\n             capital letter A). In such cases, the <code>$lang</code> argument specifies which\n             language\'s conventions are to be used. <phrase diff="chg" at="L">If the argument\n             is specified, the value <rfc2119>should</rfc2119> be either an empty sequence\n             or a value that would be valid for the <code>xml:lang</code> attribute (see <bibref ref="REC-xml"/>).\n             Note that this permits the identification of sublanguages based on country codes (from ISO 3166-1)\n             as well as identification of dialects and regions within a country.</phrase>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The set of languages\n             for which numbering is supported is <termref def="implementation-defined"/>.\n             If the <code>$lang</code> argument is absent,\n             or is set to an empty sequence, or is invalid, or is not a language supported by the\n             implementation, then the number is formatted using <phrase diff="chg" at="K">the\n             default language from the dynamic context</phrase>.\n             </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The format modifier <phrase diff="chg" at="L"><rfc2119>must</rfc2119>\n             be a string that matches the regular expression <code diff="chg" at="M">^([co](\\(.+\\))?)?[at]?$</code>. </phrase>\n             That is, if it is present it must consist of one <phrase diff="add" at="G">or more</phrase> of\n             the following, in <phrase diff="del" at="K">any</phrase> order:</p><ulist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p diff="chg" at="G">either <code>c</code> or <code>o</code>, optionally followed by\n                   a sequence of characters enclosed between parentheses, to indicate cardinal or\n                   ordinal numbering respectively, the default being cardinal numbering</p></item><item><p diff="chg" at="G">either <code>a</code> or <code>t</code>, to indicate alphabetic\n                   or traditional numbering respectively, the default being <termref def="implementation-defined">implementation-defined</termref>.</p></item></ulist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the <code>o</code> modifier is present, this indicates a request to output ordinal\n             numbers rather than cardinal numbers. For example, in English, when used with the format\n             token <code>1</code>, this outputs the sequence <code>1st 2nd 3rd 4th ...</code>, and\n             when used with the format token <code>w</code> outputs the sequence <code>first second\n             third fourth ...</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="L">The string of characters between the parentheses, if present, is used to\n          select between other possible variations of cardinal or ordinal numbering sequences.\n          The interpretation of this string is <termref def="implemementation-defined">implementation-defined</termref>. No error occurs\n          if the implementation does not define any interpretation for the defined string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">For example, in some languages, ordinal numbers vary depending on the grammatical context:\n             they may have different genders and may decline with the noun that they qualify.\n             In such cases the string appearing in parentheses after the letter <code>o</code> may be\n             used to indicate the variation of the ordinal number required. The way in which the\n             variation is indicated will depend on the conventions of the language. For inflected\n             languages that vary the ending of the word, the <rfc2119>recommended</rfc2119> approach is to indicate the\n             required ending, preceded by a hyphen: for example in German, appropriate values are\n                <code>o(-e)</code>, <code>o(-er)</code>, <code>o(-es)</code>, <code>o(-en)</code>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">It is <termref def="implementation-defined">implementation-defined</termref> what\n             combinations of values of the format token, the language, and the cardinal/ordinal\n             modifier are supported. If ordinal numbering is not supported for the combination of the\n             format token, the language, and the string appearing in parentheses, the request is\n             ignored and cardinal numbers are generated instead.</p><example xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><head>Ordinal Numbering in Italian</head><p>The specification <code>"1;o(-º)"</code> with <code>$lang</code> equal to\n                   <code>it</code>, if supported, should produce the sequence:</p><eg xml:space="preserve">1º 2º 3º 4º ...</eg><p>The specification <code>"Ww;o"</code> with <code>$lang</code> equal to\n                   <code>it</code>, if supported, should produce the sequence:</p><eg xml:space="preserve">Primo Secondo Terzo Quarto Quinto ...</eg></example><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The <phrase diff="chg" at="G">use of the <code>a</code> or <code>t</code>\n                modifier</phrase> disambiguates between numbering sequences that use letters. In many\n             languages there are two commonly used numbering sequences that use letters. One\n             numbering sequence assigns numeric values to letters in alphabetic sequence, and the\n             other assigns numeric values to each letter in some other manner traditional in that\n             language. In English, these would correspond to the numbering sequences specified by the\n             format tokens <code>a</code> and <code>i</code>. In some languages, the first member of\n             each sequence is the same, and so the format token alone would be ambiguous. <phrase diff="chg" at="G">In the absence of the <code>a</code> or <code>t</code> modifier,\n                the default is <termref def="implementation-defined">implementation-defined</termref></phrase>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="L">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DF" code="1310"/> if the format token is invalid,\n             that is, if it violates any mandatory rules (indicated by an emphasized <rfc2119>must</rfc2119>\n             or <rfc2119>required</rfc2119> keyword in the above rules). For example, the error is raised if\n             the primary format token contains a digit but does not match the required regular expression.</p></div>\n',summary:"<p>  Formats an integer according to a given picture string, using the conventions\n             of a given natural language if specified.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"value",type:"xs:integer",occurrence:"?",description:""},{name:"picture",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:3,name:"format-integer",qname:"fn:format-integer",signature:"($value as xs:integer?, $picture as xs:string, $language as xs:string) as xs:string external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Formats an integer according to a given picture string, using the conventions\n             of a given natural language if specified.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="format-integer" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="value" type="xs:integer?"/><arg name="picture" type="xs:string"/></proto></example><example role="signature"><proto name="format-integer" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="value" type="xs:integer?"/><arg name="picture" type="xs:string"/><arg name="lang" type="xs:string?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		default language.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The three-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$value</code> is an empty sequence, the function returns a zero-length\n             string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">In all other cases, the <code>$picture</code> argument describes the format in which\n                <code>$value</code> is output.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The rules that follow describe how non-negative numbers are output. If the value of\n                <code>$value</code> is negative, the rules below are applied to the absolute value of\n                <code>$value</code>, and a minus sign is prepended to the result.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="L">The value of <code>$picture</code> consists of a primary format token,\n             optionally followed\n             by a format modifier. The primary format token is always present and <rfc2119>must not</rfc2119>\n             be zero-length. If the string contains one or more semicolons then everything that\n             precedes the last semicolon is taken as the primary format token and everything\n             that follows is taken as the format modifier; if the string contains no\n             semicolon then the entire picture is taken as the primary format token, and the\n             format modifier is taken to be absent (which is equivalent to supplying a\n             zero-length string).</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The primary format token is classified as one of the following:</p><ulist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>A <var>decimal-digit-pattern</var> made up of <var>optional-digit-signs</var>,\n                      <var>mandatory-digit-signs</var>, and <var>grouping-separator-signs</var>.</p><ulist><item><p>The <var>optional-digit-sign</var> is the character "#".</p></item><item><p>A <var>mandatory-digit-sign</var> is a <termref def="character">character</termref> in Unicode category Nd. All\n                            <var>mandatory-digit-signs</var> within the format token <rfc2119>must</rfc2119> be from the\n                         same digit family, where a digit family is a sequence of ten consecutive\n                         characters in Unicode category Nd, having digit values 0 through 9. Within\n                         the format token, these digits are interchangeable: a three-digit number may\n                         thus be indicated equivalently by <code>000</code>, <code>001</code>, or\n                            <code>999</code>.</p></item><item><p>a <var>grouping-separator-sign</var> is a non-alphanumeric character, that\n                         is a <termref def="character">character</termref> whose Unicode category is\n                         other than Nd, Nl, No, Lu, Ll, Lt, Lm or Lo.</p></item></ulist><p diff="chg" at="L">If the primary format token contains at least one Unicode digit\n                   then it is taken as a decimal digit pattern, and in this case it <rfc2119>must</rfc2119>\n                   match the regular expression <code>^((\\p{Nd}|#|[^\\p{N}\\p{L}])+?)$</code>. If it contains\n                   a digit but does not match this pattern, a <phrase diff="add" at="L">dynamic</phrase> error\n                   is raised <errorref class="DF" code="1310"/>.</p><note><p diff="add" at="L">If a semicolon is to be used as a grouping separator, then the primary\n                format token as a whole must be followed by another semicolon, to ensure that\n                the grouping separator is not mistaken as a separator between the primary format\n                token and the format modifier.</p></note><p>There <rfc2119>must</rfc2119> be at least one <var>mandatory-digit-sign</var>. There may be zero or\n                   more <var>optional-digit-signs</var>, and (if present) these <rfc2119>must</rfc2119> precede all\n                      <var>mandatory-digit-signs</var>. There may be zero or more\n                      <var>grouping-separator-signs</var>. A <var>grouping-separator-sign</var> <rfc2119>must\n                   not</rfc2119> appear at the start or end of the <var>decimal-digit-pattern</var>, nor\n                   adjacent to another <var>grouping-separator-sign</var>.</p><p>The corresponding output format is a decimal number, using this digit family, with\n                   at least as many digits as there are <var>mandatory-digit-signs</var> in the\n                   format token. Thus, a format token <code>1</code> generates the sequence <code>0 1\n                      2 ... 10 11 12 ...</code>, and a format token <code>01</code> (or equivalently,\n                      <code>00</code> or <code>99</code>) generates the sequence <code>00 01 02 ...\n                      09 10 11 12 ... 99 100 101</code>. A format token of <code>&amp;#x661;</code>\n                   (Arabic-Indic digit one) generates the sequence <code>١</code> then <code>٢</code>\n                   then <code>٣</code> ...</p><p>The <var>grouping-separator-signs</var> are handled as follows. The position of\n                   grouping separators within the format token, counting backwards from the last\n                   digit, indicates the position of grouping separators to appear within the\n                   formatted number, and the character used as the <var>grouping-separator-sign</var>\n                   within the format token indicates the character to be used as the corresponding\n                   grouping separator in the formatted number. If <var>grouping-separator-signs</var>\n                   appear at regular intervals within the format token, that is if the same grouping\n                   separator appears at positions forming a sequence <var>N</var>, 2<var>N</var>,\n                      3<var>N</var>, ... for some integer value <var>N</var> (including the case\n                   where there is only one number in the list), then the sequence is extrapolated to\n                   the left, so grouping separators will be used in the formatted number at every\n                   multiple of <var>N</var>. For example, if the format token is <code>0\'000</code>\n                   then the number one million will be formatted as <code>1\'000\'000</code>, while the\n                   number fifteen will be formatted as <code>0\'015</code>.</p><p>The only purpose of <var>optional-digit-signs</var> is to mark the position of\n                      <var>grouping-separator-signs</var>. For example, if the format token is\n                      <code>#\'##0</code> then the number one million will be formatted as\n                      <code>1\'000\'000</code>, while the number fifteen will be formatted as\n                      <code>15</code>. A grouping separator is included in the formatted number only\n                   if there is a digit to its left, which will only be the case if either (a) the\n                   number is large enough to require that digit, or (b) the number of\n                      <var>mandatory-digit-signs</var> in the format token requires insignificant\n                   leading zeros to be present.</p><note><p>Numbers will never be truncated. Given the <var>decimal-digit-pattern</var>\n                      <code>01</code>, the number three hundred will be output as <code>300</code>,\n                      despite the absence of any <var>optional-digit-sign</var>.</p></note></item><item><p>The format token <code>A</code>, which generates the sequence <code>A B C ... Z AA AB\n                      AC...</code>.</p></item><item><p>The format token <code>a</code>, which generates the sequence <code>a b c ... z aa ab\n                      ac...</code>.</p></item><item><p>The format token <code>i</code>, which generates the sequence <code>i ii iii iv v vi vii\n                      viii ix x ...</code>.</p></item><item><p>The format token <code>I</code>, which generates the sequence <code>I II III IV V VI VII\n                      VIII IX X ...</code>.</p></item><item><p>The format token <code>w</code>, which generates numbers written as lower-case words, for\n                   example in English, <code>one two three four ...</code>\n                </p></item><item><p>The format token <code>W</code>, which generates numbers written as upper-case words, for\n                   example in English, <code>ONE TWO THREE FOUR ...</code>\n                </p></item><item><p>The format token <code>Ww</code>, which generates numbers written as title-case words, for\n                   example in English, <code>One Two Three Four ...</code>\n                </p></item><item><p>Any other format token, which indicates a numbering sequence in which that token\n                   represents the number 1 (one) (but see the note below).\n                   <!-- Where possible (given the constraint that format tokens\n 						must be alphanumeric, and that they must be distinct) the format token\n 						used to represent a numbering sequence should be the same as the representation\n 						of the number 1 (one) in that sequence.-->\n                   It is <termref def="implementation-defined">implementation-defined</termref> which\n                   numbering sequences, additional to those listed above, are supported. If an\n                   implementation does not support a numbering sequence represented by the given\n                   token, it <rfc2119>must</rfc2119> use a format token of <code>1</code>.</p><note><p>In some traditional numbering sequences additional signs are added to denote\n                      that the letters should be interpreted as numbers; these are not included in\n                      the format token. An example (see also the example below) is classical Greek\n                      where a <emph>dexia keraia</emph> (x0374, ʹ) and sometimes an <emph>aristeri keraia</emph>\n                      (x0375, ͵) is added.</p></note></item></ulist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">For all format tokens other than the first kind above (one that consists of decimal\n             digits), there <rfc2119>may</rfc2119> be <termref def="implementation-defined">implementation-defined</termref> lower and upper bounds on the range of numbers that\n             can be formatted using this format token; indeed, for some numbering sequences there may\n             be intrinsic limits. For example, the format token <code>&amp;#x2460;</code> (circled\n             digit one, ①) has a range <phrase diff="chg" at="M">imposed by the Unicode character repertoire — 1 to 20 in\n             Unicode versions prior to 4.0, increased in subsequent versions</phrase>. For\n             the numbering sequences described above any upper bound imposed by the implementation\n                <rfc2119>must not</rfc2119> be less than 1000 (one thousand) and any lower bound must\n             not be greater than 1. Numbers that fall outside this range <rfc2119>must</rfc2119> be\n             formatted using the format token <code>1</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The above expansions of numbering sequences for format tokens such as <code>a</code> and\n                <code>i</code> are indicative but not prescriptive. There are various conventions in\n             use for how alphabetic sequences continue when the alphabet is exhausted, and differing\n             conventions for how roman numerals are written (for example, <code>IV</code> versus\n                <code>IIII</code> as the representation of the number 4). Sometimes alphabetic\n             sequences are used that omit letters such as <code>i</code> and <code>o</code>. This\n             specification does not prescribe the detail of any sequence other than those sequences\n             consisting entirely of decimal digits.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Many numbering sequences are language-sensitive. This applies especially to the sequence\n             selected by the tokens <code>w</code>, <code>W</code> and <code>Ww</code>. It also\n             applies to other sequences, for example different languages using the Cyrillic alphabet\n             use different sequences of characters, each starting with the letter #x410 (Cyrillic\n             capital letter A). In such cases, the <code>$lang</code> argument specifies which\n             language\'s conventions are to be used. <phrase diff="chg" at="L">If the argument\n             is specified, the value <rfc2119>should</rfc2119> be either an empty sequence\n             or a value that would be valid for the <code>xml:lang</code> attribute (see <bibref ref="REC-xml"/>).\n             Note that this permits the identification of sublanguages based on country codes (from ISO 3166-1)\n             as well as identification of dialects and regions within a country.</phrase>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The set of languages\n             for which numbering is supported is <termref def="implementation-defined"/>.\n             If the <code>$lang</code> argument is absent,\n             or is set to an empty sequence, or is invalid, or is not a language supported by the\n             implementation, then the number is formatted using <phrase diff="chg" at="K">the\n             default language from the dynamic context</phrase>.\n             </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The format modifier <phrase diff="chg" at="L"><rfc2119>must</rfc2119>\n             be a string that matches the regular expression <code diff="chg" at="M">^([co](\\(.+\\))?)?[at]?$</code>. </phrase>\n             That is, if it is present it must consist of one <phrase diff="add" at="G">or more</phrase> of\n             the following, in <phrase diff="del" at="K">any</phrase> order:</p><ulist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p diff="chg" at="G">either <code>c</code> or <code>o</code>, optionally followed by\n                   a sequence of characters enclosed between parentheses, to indicate cardinal or\n                   ordinal numbering respectively, the default being cardinal numbering</p></item><item><p diff="chg" at="G">either <code>a</code> or <code>t</code>, to indicate alphabetic\n                   or traditional numbering respectively, the default being <termref def="implementation-defined">implementation-defined</termref>.</p></item></ulist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the <code>o</code> modifier is present, this indicates a request to output ordinal\n             numbers rather than cardinal numbers. For example, in English, when used with the format\n             token <code>1</code>, this outputs the sequence <code>1st 2nd 3rd 4th ...</code>, and\n             when used with the format token <code>w</code> outputs the sequence <code>first second\n             third fourth ...</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="L">The string of characters between the parentheses, if present, is used to\n          select between other possible variations of cardinal or ordinal numbering sequences.\n          The interpretation of this string is <termref def="implemementation-defined">implementation-defined</termref>. No error occurs\n          if the implementation does not define any interpretation for the defined string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">For example, in some languages, ordinal numbers vary depending on the grammatical context:\n             they may have different genders and may decline with the noun that they qualify.\n             In such cases the string appearing in parentheses after the letter <code>o</code> may be\n             used to indicate the variation of the ordinal number required. The way in which the\n             variation is indicated will depend on the conventions of the language. For inflected\n             languages that vary the ending of the word, the <rfc2119>recommended</rfc2119> approach is to indicate the\n             required ending, preceded by a hyphen: for example in German, appropriate values are\n                <code>o(-e)</code>, <code>o(-er)</code>, <code>o(-es)</code>, <code>o(-en)</code>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">It is <termref def="implementation-defined">implementation-defined</termref> what\n             combinations of values of the format token, the language, and the cardinal/ordinal\n             modifier are supported. If ordinal numbering is not supported for the combination of the\n             format token, the language, and the string appearing in parentheses, the request is\n             ignored and cardinal numbers are generated instead.</p><example xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><head>Ordinal Numbering in Italian</head><p>The specification <code>"1;o(-º)"</code> with <code>$lang</code> equal to\n                   <code>it</code>, if supported, should produce the sequence:</p><eg xml:space="preserve">1º 2º 3º 4º ...</eg><p>The specification <code>"Ww;o"</code> with <code>$lang</code> equal to\n                   <code>it</code>, if supported, should produce the sequence:</p><eg xml:space="preserve">Primo Secondo Terzo Quarto Quinto ...</eg></example><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The <phrase diff="chg" at="G">use of the <code>a</code> or <code>t</code>\n                modifier</phrase> disambiguates between numbering sequences that use letters. In many\n             languages there are two commonly used numbering sequences that use letters. One\n             numbering sequence assigns numeric values to letters in alphabetic sequence, and the\n             other assigns numeric values to each letter in some other manner traditional in that\n             language. In English, these would correspond to the numbering sequences specified by the\n             format tokens <code>a</code> and <code>i</code>. In some languages, the first member of\n             each sequence is the same, and so the format token alone would be ambiguous. <phrase diff="chg" at="G">In the absence of the <code>a</code> or <code>t</code> modifier,\n                the default is <termref def="implementation-defined">implementation-defined</termref></phrase>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="L">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DF" code="1310"/> if the format token is invalid,\n             that is, if it violates any mandatory rules (indicated by an emphasized <rfc2119>must</rfc2119>\n             or <rfc2119>required</rfc2119> keyword in the above rules). For example, the error is raised if\n             the primary format token contains a digit but does not match the required regular expression.</p></div>\n',summary:"<p>  Formats an integer according to a given picture string, using the conventions\n             of a given natural language if specified.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"value",type:"xs:integer",occurrence:"?",description:""},{name:"picture",type:"xs:string",occurrence:null,description:""},{name:"language",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:2,name:"format-number",qname:"fn:format-number",signature:"($value as numeric?, $picture as xs:string) as xs:string external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns a string containing a number formatted according to a given picture\n             string, taking account of decimal formats specified in the static context.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="format-number" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="value" type="numeric?"/><arg name="picture" type="xs:string"/></proto></example><example role="signature"><proto name="format-number" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="value" type="numeric?"/><arg name="picture" type="xs:string"/><arg name="decimal-format-name" type="xs:string?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The three-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		decimal formats, and namespaces.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="K">The effect of the two-argument form of the function is equivalent to calling\n          the three-argument form with an empty sequence as the value of the third argument.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function formats <code>$value</code> as a string using the <termref def="dt-picture-string">picture string</termref> specified by the\n                <code>$picture</code> argument and the decimal-format named by the\n                <code>$decimal-format-name</code> argument, or the default decimal-format, if there\n             is no <code>$decimal-format-name</code> argument. The syntax of the picture string is\n             described in <specref ref="syntax-of-picture-string"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The <code>$value</code> argument may be of any numeric data type\n             (<code>xs:double</code>, <code>xs:float</code>, <code>xs:decimal</code>, or their\n             subtypes including <code>xs:integer</code>). Note that if an <code>xs:decimal</code> is\n             supplied, it is not automatically promoted to an <code>xs:double</code>, as such\n             promotion can involve a loss of precision.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the supplied value of the <code>$value</code> argument is an empty sequence, the\n             function behaves as if the supplied value were the <code>xs:double</code> value\n                <code>NaN</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The value of <code>$decimal-format-name</code>,\n             <phrase diff="add" at="K">if present and non-empty, </phrase>\n             <rfc2119>must</rfc2119> <phrase diff="chg" at="L">be a string which after removal of leading and trailing whitespace is in the form of an\n             an <code>EQName</code> as defined in the XPath 3.0 grammar, that is one of the following</phrase>:</p><ulist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>A lexical QName, which is expanded using the\n                <phrase diff="chg" at="J">statically known namespaces</phrase>.\n                The default namespace is not used (no prefix means no namespace).</p></item><item><p diff="add" at="L">A <code>URIQualifiedName</code> using the syntax <code>Q{uri}local</code>,\n             where the URI can be zero-length to indicate a name in no namespace.</p></item></ulist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="K">The decimal format that is used is the decimal format\n          in the static context whose name matches <code>$decimal-format-name</code> if supplied,\n          or the default decimal format in the static context otherwise.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The evaluation of the <function>format-number</function> function takes place in two\n             phases, an analysis phase described in <specref ref="analysing-picture-string"/> and a\n             formatting phase described in <specref ref="formatting-the-number"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The analysis phase takes as its inputs the <termref def="dt-picture-string">picture\n                string</termref> and the variables derived from the relevant decimal format in the\n             static context, and produces as its output a number of variables with defined values.\n             The formatting phase takes as its inputs the number to be formatted and the variables\n             produced by the analysis phase, and produces as its output a string containing a\n             formatted representation of the number.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The result of the function is the formatted string representation of the supplied\n             number.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DF" code="1280"/> if the name specified as the\n                <code>$decimal-format-name</code> argument is\n             <phrase diff="chg" at="L">neither a valid lexical QName nor a valid <code>URIQualifiedName</code></phrase>, or if it\n             uses a prefix <phrase diff="add" at="J">that is not found in the statically known namespaces</phrase>, or if the static\n             context does not contain a declaration of a decimal-format with a matching expanded\n             QName. If the processor is able to detect the error statically (for example, when the\n             argument is supplied as a string literal), then the processor <rfc2119>may</rfc2119>\n             optionally signal this as a static error.</p></div>\n',summary:"<p>  Returns a string containing a number formatted according to a given picture\n             string, taking account of decimal formats specified in the static context.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"value",type:"numeric",occurrence:"?",description:""},{name:"picture",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:3,name:"format-number",qname:"fn:format-number",signature:"($value as numeric?, $picture as xs:string, $decimal-format-name as xs:string) as xs:string external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns a string containing a number formatted according to a given picture\n             string, taking account of decimal formats specified in the static context.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="format-number" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="value" type="numeric?"/><arg name="picture" type="xs:string"/></proto></example><example role="signature"><proto name="format-number" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="value" type="numeric?"/><arg name="picture" type="xs:string"/><arg name="decimal-format-name" type="xs:string?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The three-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		decimal formats, and namespaces.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="K">The effect of the two-argument form of the function is equivalent to calling\n          the three-argument form with an empty sequence as the value of the third argument.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function formats <code>$value</code> as a string using the <termref def="dt-picture-string">picture string</termref> specified by the\n                <code>$picture</code> argument and the decimal-format named by the\n                <code>$decimal-format-name</code> argument, or the default decimal-format, if there\n             is no <code>$decimal-format-name</code> argument. The syntax of the picture string is\n             described in <specref ref="syntax-of-picture-string"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The <code>$value</code> argument may be of any numeric data type\n             (<code>xs:double</code>, <code>xs:float</code>, <code>xs:decimal</code>, or their\n             subtypes including <code>xs:integer</code>). Note that if an <code>xs:decimal</code> is\n             supplied, it is not automatically promoted to an <code>xs:double</code>, as such\n             promotion can involve a loss of precision.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the supplied value of the <code>$value</code> argument is an empty sequence, the\n             function behaves as if the supplied value were the <code>xs:double</code> value\n                <code>NaN</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The value of <code>$decimal-format-name</code>,\n             <phrase diff="add" at="K">if present and non-empty, </phrase>\n             <rfc2119>must</rfc2119> <phrase diff="chg" at="L">be a string which after removal of leading and trailing whitespace is in the form of an\n             an <code>EQName</code> as defined in the XPath 3.0 grammar, that is one of the following</phrase>:</p><ulist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>A lexical QName, which is expanded using the\n                <phrase diff="chg" at="J">statically known namespaces</phrase>.\n                The default namespace is not used (no prefix means no namespace).</p></item><item><p diff="add" at="L">A <code>URIQualifiedName</code> using the syntax <code>Q{uri}local</code>,\n             where the URI can be zero-length to indicate a name in no namespace.</p></item></ulist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="K">The decimal format that is used is the decimal format\n          in the static context whose name matches <code>$decimal-format-name</code> if supplied,\n          or the default decimal format in the static context otherwise.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The evaluation of the <function>format-number</function> function takes place in two\n             phases, an analysis phase described in <specref ref="analysing-picture-string"/> and a\n             formatting phase described in <specref ref="formatting-the-number"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The analysis phase takes as its inputs the <termref def="dt-picture-string">picture\n                string</termref> and the variables derived from the relevant decimal format in the\n             static context, and produces as its output a number of variables with defined values.\n             The formatting phase takes as its inputs the number to be formatted and the variables\n             produced by the analysis phase, and produces as its output a string containing a\n             formatted representation of the number.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The result of the function is the formatted string representation of the supplied\n             number.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DF" code="1280"/> if the name specified as the\n                <code>$decimal-format-name</code> argument is\n             <phrase diff="chg" at="L">neither a valid lexical QName nor a valid <code>URIQualifiedName</code></phrase>, or if it\n             uses a prefix <phrase diff="add" at="J">that is not found in the statically known namespaces</phrase>, or if the static\n             context does not contain a declaration of a decimal-format with a matching expanded\n             QName. If the processor is able to detect the error statically (for example, when the\n             argument is supplied as a string literal), then the processor <rfc2119>may</rfc2119>\n             optionally signal this as a static error.</p></div>\n',summary:"<p>  Returns a string containing a number formatted according to a given picture\n             string, taking account of decimal formats specified in the static context.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"value",type:"numeric",occurrence:"?",description:""},{name:"picture",type:"xs:string",occurrence:null,description:""},{name:"decimal-format-name",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:2,name:"format-time",qname:"fn:format-time",signature:"($value as xs:time?, $picture as xs:string) as xs:string? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns a string containing an <code>xs:time</code> value formatted for display.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="format-time" return-type="xs:string?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="value" type="xs:time?"/><arg name="picture" type="xs:string"/></proto></example><example role="signature"><proto name="format-time" return-type="xs:string?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="value" type="xs:time?"/><arg name="picture" type="xs:string"/><arg name="language" type="xs:string?"/><arg name="calendar" type="xs:string?"/><arg name="place" type="xs:string?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		default calendar, and default language, and default place, and implicit timezone.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The five-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		implicit timezone, and namespaces.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">See <specref ref="rules-for-datetime-formatting"/>.</p></div>\n',summary:"<p>  Returns a string containing an  xs:time  value formatted for display.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"value",type:"xs:time",occurrence:"?",description:""},{name:"picture",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:string?",description:""},errors:[]},{isDocumented:!0,arity:5,name:"format-time",qname:"fn:format-time",signature:"($value as xs:time?, $picture as xs:string, $language as xs:string?, $calendar as xs:string?, $place as xs:string?) as xs:string? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns a string containing an <code>xs:time</code> value formatted for display.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="format-time" return-type="xs:string?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="value" type="xs:time?"/><arg name="picture" type="xs:string"/></proto></example><example role="signature"><proto name="format-time" return-type="xs:string?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="value" type="xs:time?"/><arg name="picture" type="xs:string"/><arg name="language" type="xs:string?"/><arg name="calendar" type="xs:string?"/><arg name="place" type="xs:string?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		default calendar, and default language, and default place, and implicit timezone.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The five-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		implicit timezone, and namespaces.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">See <specref ref="rules-for-datetime-formatting"/>.</p></div>\n',summary:"<p>  Returns a string containing an  xs:time  value formatted for display.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"value",type:"xs:time",occurrence:"?",description:""},{name:"picture",type:"xs:string",occurrence:null,description:""},{name:"language",type:"xs:string",occurrence:"?",description:""},{name:"calendar",type:"xs:string",occurrence:"?",description:""},{name:"place",type:"xs:string",occurrence:"?",description:""}],returns:{type:"xs:string?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"function-arity",qname:"fn:function-arity",signature:"($func as function (*)) as xs:integer external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the arity of the function identified by a function item.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="function-arity" return-type="xs:integer" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="func" type="function(*)"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The <code>fn:function-arity</code> function returns the arity (number of arguments) of\n             the function identified by <code>$func</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:function-arity(fn:substring#2)</code> returns <code>2</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:function-arity(function($node){name($node)})</code> returns <code>1</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>let $initial := fn:substring(?, 1, 1) return fn:function-arity($initial)</code> returns <code>1</code>.</p></div>\n',summary:"<p>  Returns the arity of the function identified by a function item.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"func",type:"function (*)",occurrence:null,description:""}],returns:{type:"xs:integer",description:""},errors:[]},{isDocumented:!0,arity:0,name:"generate-id",qname:"fn:generate-id",signature:"() as xs:string external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function returns a string that uniquely identifies a given node. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="generate-id" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example><example role="signature"><proto name="generate-id" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="node()?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The zero-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-dependent">focus-dependent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the argument is omitted, it defaults to the context item (<code>.</code>). The\n             behavior of the function if the argument is omitted is exactly the same as if the\n             context item had been passed as the argument.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the argument is the empty sequence, the result is the zero-length string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">In other cases, the function returns a string that uniquely identifies a given node.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The returned identifier <rfc2119>must</rfc2119> consist of ASCII alphanumeric characters\n             and <rfc2119>must</rfc2119> start with an alphabetic character. Thus, the string is\n             syntactically an XML name.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">An implementation is free to generate an identifier in any convenient way provided that\n             it always generates the same identifier for the same node and that different identifiers\n             are always generated from different nodes. An implementation is under no obligation to\n             generate the same identifiers each time a document is transformed or queried.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The following errors may be raised when <code>$arg</code> is omitted:</p><ul xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><li><p>If the context\n                item is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>, <phrase diff="add" at="M">dynamic error</phrase>\n                <xerrorref spec="XP" class="DY" code="0002" type="dynamic"/></p></li><li><p>If the context item is not a\n                node, <phrase diff="add" at="M">type error</phrase> <xerrorref spec="XP" class="TY" code="0004" type="type"/>.</p></li></ul></div>\n',summary:"<p>  This function returns a string that uniquely identifies a given node.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:1,name:"generate-id",qname:"fn:generate-id",signature:"($arg as node()?) as xs:string external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function returns a string that uniquely identifies a given node. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="generate-id" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example><example role="signature"><proto name="generate-id" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="node()?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The zero-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-dependent">focus-dependent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the argument is omitted, it defaults to the context item (<code>.</code>). The\n             behavior of the function if the argument is omitted is exactly the same as if the\n             context item had been passed as the argument.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the argument is the empty sequence, the result is the zero-length string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">In other cases, the function returns a string that uniquely identifies a given node.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The returned identifier <rfc2119>must</rfc2119> consist of ASCII alphanumeric characters\n             and <rfc2119>must</rfc2119> start with an alphabetic character. Thus, the string is\n             syntactically an XML name.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">An implementation is free to generate an identifier in any convenient way provided that\n             it always generates the same identifier for the same node and that different identifiers\n             are always generated from different nodes. An implementation is under no obligation to\n             generate the same identifiers each time a document is transformed or queried.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The following errors may be raised when <code>$arg</code> is omitted:</p><ul xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><li><p>If the context\n                item is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>, <phrase diff="add" at="M">dynamic error</phrase>\n                <xerrorref spec="XP" class="DY" code="0002" type="dynamic"/></p></li><li><p>If the context item is not a\n                node, <phrase diff="add" at="M">type error</phrase> <xerrorref spec="XP" class="TY" code="0004" type="type"/>.</p></li></ul></div>\n',summary:"<p>  This function returns a string that uniquely identifies a given node.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"node()",occurrence:"?",description:""}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:0,name:"has-children",qname:"fn:has-children",signature:"() as xs:boolean external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns true if the supplied node has one or more child nodes (of any kind).</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="has-children" return-type="xs:boolean" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example><example role="signature"><proto name="has-children" return-type="xs:boolean" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="node" type="node()?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The zero-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-dependent">focus-dependent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the argument is omitted, it defaults to the context item (<code>.</code>). The\n             behavior of the function if the argument is omitted is exactly the same as if the\n             context item had been passed as the argument.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><phrase diff="add" at="L">Provided that the supplied argument <code>$node</code> matches the expected\n          type <code>node()?</code>, </phrase>the result of the function call <code>fn:has-children($node)</code> is defined to be\n             the same as the result of the expression\n             <code>fn:exists($node/child::node())</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The following errors may be raised when <code>$node</code> is omitted:</p><ul xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><li><p>If the context\n                item is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>, <phrase diff="add" at="M">dynamic error</phrase>\n                <xerrorref spec="XP" class="DY" code="0002" type="dynamic"/></p></li><li><p>If the context item is not a\n                node, <phrase diff="add" at="M">type error</phrase> <xerrorref spec="XP" class="TY" code="0004" type="type"/>.</p></li></ul></div>\n',summary:"<p>  Returns true if the supplied node has one or more child nodes (of any kind).</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:1,name:"has-children",qname:"fn:has-children",signature:"($node as node()?) as xs:boolean external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns true if the supplied node has one or more child nodes (of any kind).</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="has-children" return-type="xs:boolean" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example><example role="signature"><proto name="has-children" return-type="xs:boolean" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="node" type="node()?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The zero-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-dependent">focus-dependent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the argument is omitted, it defaults to the context item (<code>.</code>). The\n             behavior of the function if the argument is omitted is exactly the same as if the\n             context item had been passed as the argument.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><phrase diff="add" at="L">Provided that the supplied argument <code>$node</code> matches the expected\n          type <code>node()?</code>, </phrase>the result of the function call <code>fn:has-children($node)</code> is defined to be\n             the same as the result of the expression\n             <code>fn:exists($node/child::node())</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The following errors may be raised when <code>$node</code> is omitted:</p><ul xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><li><p>If the context\n                item is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>, <phrase diff="add" at="M">dynamic error</phrase>\n                <xerrorref spec="XP" class="DY" code="0002" type="dynamic"/></p></li><li><p>If the context item is not a\n                node, <phrase diff="add" at="M">type error</phrase> <xerrorref spec="XP" class="TY" code="0004" type="type"/>.</p></li></ul></div>\n',summary:"<p>  Returns true if the supplied node has one or more child nodes (of any kind).</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"node",type:"node()",occurrence:"?",description:""}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:1,name:"head",qname:"fn:head",signature:"($arg as item()*) as item()? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the first item in a sequence. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="head" return-type="item()?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="item()*"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns the value of the expression <code>$arg[1]</code></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, the empty sequence is returned. Otherwise\n             the first item in the sequence is returned.</p></div>\n',summary:"<p>  Returns the first item in a sequence.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"item()",occurrence:"*",description:""}],returns:{type:"item()?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"hours-from-duration",qname:"fn:hours-from-duration",signature:"($arg as xs:duration?) as xs:integer? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the number of hours in a duration.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="hours-from-duration" return-type="xs:integer?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:duration?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, the function returns the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function returns an <code>xs:integer</code> representing the hours\n             component in the value of <code>$arg</code>. The result is obtained by casting\n                <code>$arg</code> to an <code>xs:dayTimeDuration</code> (see <specref ref="casting-to-durations"/>) and then computing the hours component as described in\n                <specref ref="canonical-dayTimeDuration"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is a negative duration then the result will be negative..</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is an <code>xs:yearMonthDuration</code> the function returns 0.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:hours-from-duration(xs:dayTimeDuration("P3DT10H"))</code> returns <code>10</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:hours-from-duration(xs:dayTimeDuration("P3DT12H32M12S"))</code> returns <code>12</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:hours-from-duration(xs:dayTimeDuration("PT123H"))</code> returns <code>3</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:hours-from-duration(xs:dayTimeDuration("-P3DT10H"))</code> returns <code>-10</code>.</p></div>\n',summary:"<p>  Returns the number of hours in a duration.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:duration",occurrence:"?",description:""}],returns:{type:"xs:integer?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"hours-from-time",qname:"fn:hours-from-time",signature:"($arg as xs:time?) as xs:integer? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the hours component of an <code>xs:time</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="hours-from-time" return-type="xs:integer?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:time?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, the function returns the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function returns an <code>xs:integer</code> between 0 and 23, both\n             inclusive, representing the value of the hours component in the local value of\n                <code>$arg</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Assume that the dynamic context provides an implicit timezone value of\n                   <code>-05:00</code>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:hours-from-time(xs:time("11:23:00"))</code> returns <code>11</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:hours-from-time(xs:time("21:23:00"))</code> returns <code>21</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:hours-from-time(xs:time("01:23:00+05:00"))</code> returns <code>1</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:hours-from-time(fn:adjust-time-to-timezone(xs:time("01:23:00+05:00"),\n                   xs:dayTimeDuration("PT0S")))</code> returns <code>20</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:hours-from-time(xs:time("24:00:00"))</code> returns <code>0</code>.</p></div>\n',summary:"<p>  Returns the hours component of an  xs:time .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:time",occurrence:"?",description:""}],returns:{type:"xs:integer?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"id",qname:"fn:id",signature:"($arg as xs:string*) as element(*)* external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the sequence of element nodes that have an <code>ID</code> value\n             matching the value of one or more of the <code>IDREF</code> values supplied in\n                <code>$arg</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="id" return-type="element()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:string*"/></proto></example><example role="signature"><proto name="id" return-type="element()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:string*"/><arg name="node" type="node()"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-dependent">focus-dependent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns a sequence, in document order with duplicates eliminated,\n             containing every element node <code>E</code> that satisfies all the following\n             conditions:</p><olist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>\n                   <code>E</code> is in the target document. The target document is the document\n                   containing <code>$node</code>, or the document containing the context item\n                      (<code>.</code>) if the second argument is omitted. The behavior of the\n                   function if <code>$node</code> is omitted is exactly the same as if the context\n                   item had been passed as <code>$node</code>.</p></item><item><p><code>E</code> has an <code>ID</code> value equal to one of the candidate\n                      <code>IDREF</code> values, where:</p><ulist><item><p> An element has an <code>ID</code> value equal to <code>V</code> if either\n                         or both of the following conditions are true:</p><ulist><item><p>The <code>is-id</code> property (See <xspecref spec="DM30" ref="dm-is-id"/>.) of the element node is true, and the typed value\n                               of the element node is equal to <code>V</code> under the rules of the\n                                  <code>eq</code> operator using the Unicode codepoint collation\n                                  (<code>http://www.w3.org/2005/xpath-functions/collation/codepoint</code>).</p></item><item><p>The element has an attribute node whose <code>is-id</code> property\n                               (See <xspecref spec="DM30" ref="dm-is-id"/>.) is true and whose typed\n                               value is equal to <code>V</code> under the rules of the\n                                  <code>eq</code> operator using the Unicode code point collation\n                                  (<code>http://www.w3.org/2005/xpath-functions/collation/codepoint</code>).</p></item></ulist></item><item><p> Each <code>xs:string</code> in <code>$arg</code> is parsed as if it were of\n                         type <code>IDREFS</code>, that is, each <code>xs:string</code> in\n                            <code>$arg</code> is treated as a whitespace-separated sequence of\n                         tokens, each acting as an <code>IDREF</code>. These tokens are then included\n                         in the list of candidate <code>IDREF</code>s. If any of the tokens is not a\n                         lexically valid <code>IDREF</code> (that is, if it is not lexically an\n                            <code>xs:NCName</code>), it is ignored. Formally, the candidate\n                            <code>IDREF</code> values are the strings in the sequence given by the\n                         expression:</p><eg xml:space="preserve">for $s in $arg return\n     fn:tokenize(fn:normalize-space($s), \' \')[. castable as xs:IDREF]</eg></item></ulist></item><item><p>If several elements have the same <code>ID</code> value, then <code>E</code> is\n                   the one that is first in document order.</p></item></olist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DC" code="0001" type="dynamic"/> if\n                <code>$node</code>, or the context item if the second argument is absent, is a node\n                in a tree whose root is not a document node.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The following errors may be raised when <code>$node</code> is omitted:</p><ul xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><li><p>If the context\n                item is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>, <phrase diff="add" at="M">dynamic error</phrase>\n                <xerrorref spec="XP" class="DY" code="0002" type="dynamic"/></p></li><li><p>If the context item is not a\n                node, <phrase diff="add" at="M">type error</phrase> <xerrorref spec="XP" class="TY" code="0004" type="type"/>.</p></li></ul></div>\n',summary:"<p>  Returns the sequence of element nodes that have an  ID  value\n             matching the value of one or more of the  IDREF  values supplied in\n                 $arg .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"*",description:""}],returns:{type:"element(*)*",description:""},errors:[]},{isDocumented:!0,arity:2,name:"id",qname:"fn:id",signature:"($arg as xs:string*, $node as node()) as element(*)* external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the sequence of element nodes that have an <code>ID</code> value\n             matching the value of one or more of the <code>IDREF</code> values supplied in\n                <code>$arg</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="id" return-type="element()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:string*"/></proto></example><example role="signature"><proto name="id" return-type="element()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:string*"/><arg name="node" type="node()"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-dependent">focus-dependent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns a sequence, in document order with duplicates eliminated,\n             containing every element node <code>E</code> that satisfies all the following\n             conditions:</p><olist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>\n                   <code>E</code> is in the target document. The target document is the document\n                   containing <code>$node</code>, or the document containing the context item\n                      (<code>.</code>) if the second argument is omitted. The behavior of the\n                   function if <code>$node</code> is omitted is exactly the same as if the context\n                   item had been passed as <code>$node</code>.</p></item><item><p><code>E</code> has an <code>ID</code> value equal to one of the candidate\n                      <code>IDREF</code> values, where:</p><ulist><item><p> An element has an <code>ID</code> value equal to <code>V</code> if either\n                         or both of the following conditions are true:</p><ulist><item><p>The <code>is-id</code> property (See <xspecref spec="DM30" ref="dm-is-id"/>.) of the element node is true, and the typed value\n                               of the element node is equal to <code>V</code> under the rules of the\n                                  <code>eq</code> operator using the Unicode codepoint collation\n                                  (<code>http://www.w3.org/2005/xpath-functions/collation/codepoint</code>).</p></item><item><p>The element has an attribute node whose <code>is-id</code> property\n                               (See <xspecref spec="DM30" ref="dm-is-id"/>.) is true and whose typed\n                               value is equal to <code>V</code> under the rules of the\n                                  <code>eq</code> operator using the Unicode code point collation\n                                  (<code>http://www.w3.org/2005/xpath-functions/collation/codepoint</code>).</p></item></ulist></item><item><p> Each <code>xs:string</code> in <code>$arg</code> is parsed as if it were of\n                         type <code>IDREFS</code>, that is, each <code>xs:string</code> in\n                            <code>$arg</code> is treated as a whitespace-separated sequence of\n                         tokens, each acting as an <code>IDREF</code>. These tokens are then included\n                         in the list of candidate <code>IDREF</code>s. If any of the tokens is not a\n                         lexically valid <code>IDREF</code> (that is, if it is not lexically an\n                            <code>xs:NCName</code>), it is ignored. Formally, the candidate\n                            <code>IDREF</code> values are the strings in the sequence given by the\n                         expression:</p><eg xml:space="preserve">for $s in $arg return\n     fn:tokenize(fn:normalize-space($s), \' \')[. castable as xs:IDREF]</eg></item></ulist></item><item><p>If several elements have the same <code>ID</code> value, then <code>E</code> is\n                   the one that is first in document order.</p></item></olist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DC" code="0001" type="dynamic"/> if\n                <code>$node</code>, or the context item if the second argument is absent, is a node\n                in a tree whose root is not a document node.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The following errors may be raised when <code>$node</code> is omitted:</p><ul xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><li><p>If the context\n                item is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>, <phrase diff="add" at="M">dynamic error</phrase>\n                <xerrorref spec="XP" class="DY" code="0002" type="dynamic"/></p></li><li><p>If the context item is not a\n                node, <phrase diff="add" at="M">type error</phrase> <xerrorref spec="XP" class="TY" code="0004" type="type"/>.</p></li></ul></div>\n',summary:"<p>  Returns the sequence of element nodes that have an  ID  value\n             matching the value of one or more of the  IDREF  values supplied in\n                 $arg .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"*",description:""},{name:"node",type:"node()",occurrence:null,description:""}],returns:{type:"element(*)*",description:""},errors:[]},{isDocumented:!0,arity:1,name:"idref",qname:"fn:idref",signature:"($arg as xs:string*) as node()* external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the sequence of element or attribute nodes with an <code>IDREF</code>\n             value matching the value of one or more of the <code>ID</code> values supplied in\n                <code>$arg</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="idref" return-type="node()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:string*"/></proto></example><example role="signature"><proto name="idref" return-type="node()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:string*"/><arg name="node" type="node()"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-dependent">focus-dependent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> The function returns a sequence, in document order with duplicates eliminated,\n             containing every element or attribute node <code>$N</code> that satisfies all the\n             following conditions:</p><olist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p><code>$N</code> is in the target document. The target document is the document\n                   containing <code>$node</code> or the document containing the context item\n                      (<code>.</code>) if the second argument is omitted. The behavior of the\n                   function if <code>$node</code> is omitted is exactly the same as if the context\n                   item had been passed as <code>$node</code>.</p></item><item><p><code>$N</code> has an <code>IDREF</code> value equal to one of the candidate\n                      <code>ID</code> values, where:</p><ulist><item><p>A node <code>$N</code> has an <code>IDREF</code> value equal to\n                            <code>V</code> if both of the following conditions are true:</p><ulist><item><p>The <code>is-idrefs</code> property (see <xspecref spec="DM30" ref="dm-is-idrefs"/>) of <code>$N</code> is <code>true</code>.</p></item><item><p>The sequence <!--Text replaced by erratum E29 change 1"--><eg diff="chg" at="A-E29" xml:space="preserve">fn:tokenize(fn:normalize-space(fn:string($N)), \' \')</eg>\n                               <!--End of text replaced by erratum E29--> contains a string that is\n                               equal to <code>V</code> under the rules of the <code>eq</code>\n                               operator using the Unicode code point collation\n                                  (<code>http://www.w3.org/2005/xpath-functions/collation/codepoint</code>).</p></item></ulist></item><item><p>Each <code>xs:string</code> in <code>$arg</code> is parsed as if it were of\n                         lexically of type <code>xs:ID</code>. These <code>xs:string</code>s are then\n                         included in the list of candidate <code>xs:ID</code>s. If any of the strings\n                         in <code>$arg</code> is not a lexically valid <code>xs:ID</code> (that is,\n                         if it is not lexically an <code>xs:NCName</code>), it is ignored. More\n                         formally, the candidate <code>ID</code> values are the strings in the\n                         sequence:</p><eg xml:space="preserve">$arg[. castable as xs:NCName]</eg></item></ulist></item></olist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DC" code="0001" type="dynamic"/> if\n                <code>$node</code>, or the context item if the second argument is omitted, is a node\n                in a tree whose root is not a document node. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The following errors may be raised when <code>$node</code> is omitted:</p><ul xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><li><p>If the context\n                item is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>, <phrase diff="add" at="M">dynamic error</phrase>\n                <xerrorref spec="XP" class="DY" code="0002" type="dynamic"/></p></li><li><p>If the context item is not a\n                node, <phrase diff="add" at="M">type error</phrase> <xerrorref spec="XP" class="TY" code="0004" type="type"/>.</p></li></ul></div>\n',summary:"<p>  Returns the sequence of element or attribute nodes with an  IDREF \n             value matching the value of one or more of the  ID  values supplied in\n                 $arg .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"*",description:""}],returns:{type:"node()*",description:""},errors:[]},{isDocumented:!0,arity:2,name:"idref",qname:"fn:idref",signature:"($arg as xs:string*, $node as node()) as node()* external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the sequence of element or attribute nodes with an <code>IDREF</code>\n             value matching the value of one or more of the <code>ID</code> values supplied in\n                <code>$arg</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="idref" return-type="node()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:string*"/></proto></example><example role="signature"><proto name="idref" return-type="node()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:string*"/><arg name="node" type="node()"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-dependent">focus-dependent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> The function returns a sequence, in document order with duplicates eliminated,\n             containing every element or attribute node <code>$N</code> that satisfies all the\n             following conditions:</p><olist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p><code>$N</code> is in the target document. The target document is the document\n                   containing <code>$node</code> or the document containing the context item\n                      (<code>.</code>) if the second argument is omitted. The behavior of the\n                   function if <code>$node</code> is omitted is exactly the same as if the context\n                   item had been passed as <code>$node</code>.</p></item><item><p><code>$N</code> has an <code>IDREF</code> value equal to one of the candidate\n                      <code>ID</code> values, where:</p><ulist><item><p>A node <code>$N</code> has an <code>IDREF</code> value equal to\n                            <code>V</code> if both of the following conditions are true:</p><ulist><item><p>The <code>is-idrefs</code> property (see <xspecref spec="DM30" ref="dm-is-idrefs"/>) of <code>$N</code> is <code>true</code>.</p></item><item><p>The sequence <!--Text replaced by erratum E29 change 1"--><eg diff="chg" at="A-E29" xml:space="preserve">fn:tokenize(fn:normalize-space(fn:string($N)), \' \')</eg>\n                               <!--End of text replaced by erratum E29--> contains a string that is\n                               equal to <code>V</code> under the rules of the <code>eq</code>\n                               operator using the Unicode code point collation\n                                  (<code>http://www.w3.org/2005/xpath-functions/collation/codepoint</code>).</p></item></ulist></item><item><p>Each <code>xs:string</code> in <code>$arg</code> is parsed as if it were of\n                         lexically of type <code>xs:ID</code>. These <code>xs:string</code>s are then\n                         included in the list of candidate <code>xs:ID</code>s. If any of the strings\n                         in <code>$arg</code> is not a lexically valid <code>xs:ID</code> (that is,\n                         if it is not lexically an <code>xs:NCName</code>), it is ignored. More\n                         formally, the candidate <code>ID</code> values are the strings in the\n                         sequence:</p><eg xml:space="preserve">$arg[. castable as xs:NCName]</eg></item></ulist></item></olist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DC" code="0001" type="dynamic"/> if\n                <code>$node</code>, or the context item if the second argument is omitted, is a node\n                in a tree whose root is not a document node. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The following errors may be raised when <code>$node</code> is omitted:</p><ul xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><li><p>If the context\n                item is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>, <phrase diff="add" at="M">dynamic error</phrase>\n                <xerrorref spec="XP" class="DY" code="0002" type="dynamic"/></p></li><li><p>If the context item is not a\n                node, <phrase diff="add" at="M">type error</phrase> <xerrorref spec="XP" class="TY" code="0004" type="type"/>.</p></li></ul></div>\n',summary:"<p>  Returns the sequence of element or attribute nodes with an  IDREF \n             value matching the value of one or more of the  ID  values supplied in\n                 $arg .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"*",description:""},{name:"node",type:"node()",occurrence:null,description:""}],returns:{type:"node()*",description:""},errors:[]},{isDocumented:!0,arity:0,name:"implicit-timezone",qname:"fn:implicit-timezone",signature:"() as xs:dayTimeDuration external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the value of the implicit timezone property from the dynamic context.\n          </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="implicit-timezone" return-type="xs:dayTimeDuration" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		implicit timezone.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the value of the implicit timezone property from the dynamic context. Components\n             of the dynamic context are discussed in <xspecref spec="XP30" ref="id-xp-evaluation-context-components"/>.</p></div>\n',summary:"<p>  Returns the value of the implicit timezone property from the dynamic context.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:dayTimeDuration",description:""},errors:[]},{isDocumented:!0,arity:1,name:"in-scope-prefixes",qname:"fn:in-scope-prefixes",signature:"($element as element(*)) as xs:string* external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the prefixes of the in-scope namespaces for an element node.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="in-scope-prefixes" return-type="xs:string*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="element" type="element()"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns a sequence of strings representing the prefixes of the in-scope\n             namespaces for <code>$element</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">For namespace bindings that have a prefix, the function returns the prefix as an\n                <code>xs:NCName</code>. For the default namespace, which has no prefix, it returns\n             the zero-length string. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The result sequence contains no duplicates.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The ordering of the result sequence is <termref def="implementation-dependent">implementation-dependent</termref>.</p></div>\n',summary:"<p>  Returns the prefixes of the in-scope namespaces for an element node.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"element",type:"element(*)",occurrence:null,description:""}],returns:{type:"xs:string*",description:""},errors:[]},{isDocumented:!0,arity:2,name:"index-of",qname:"fn:index-of",signature:"($seq as xs:anyAtomicType*, $search as xs:anyAtomicType) as xs:integer* external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns a sequence of positive integers giving the positions within the\n             sequence <code>$seq</code> of items that are equal to <code>$search</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="index-of" return-type="xs:integer*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="seq" type="xs:anyAtomicType*"/><arg name="search" type="xs:anyAtomicType"/></proto></example><example role="signature"><proto name="index-of" return-type="xs:integer*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="seq" type="xs:anyAtomicType*"/><arg name="search" type="xs:anyAtomicType"/><arg name="collation" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		collations, and implicit timezone.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The three-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		collations, and static base uri, and implicit timezone.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns a sequence of positive integers giving the positions within the\n             sequence <code>$seq</code> of items that are equal to <code>$search</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The collation used by this function is determined according to the rules in <specref ref="choosing-a-collation"/>. This collation is used when string comparison is\n             required.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The items in the sequence <code>$seq</code> are compared with <code>$search</code> under\n             the rules for the <code>eq</code> operator. Values of type <code>xs:untypedAtomic</code>\n             are compared as if they were of type <code>xs:string</code>. Values that cannot be\n             compared, because the <code>eq</code> operator is not defined for their types, are\n             considered to be distinct. If an item compares equal, then the position of that item in\n             the sequence <code>$seq</code> is included in the result.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The first item in a sequence is at position 1, not position 0.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The result sequence is in ascending numeric order.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$seq</code> is the empty sequence, or if no item in\n                <code>$seq</code> matches <code>$search</code>, then the function returns the empty\n             sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="D">No error occurs if non-comparable values are encountered. So when\n             comparing two atomic values, the effective boolean value of <code>fn:index-of($a,\n                $b)</code> is true if <code>$a</code> and <code>$b</code> are equal, false if they\n             are not equal or not comparable.</p></div>\n',summary:"<p>  Returns a sequence of positive integers giving the positions within the\n             sequence  $seq  of items that are equal to  $search .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"seq",type:"xs:anyAtomicType",occurrence:"*",description:""},{name:"search",type:"xs:anyAtomicType",occurrence:null,description:""}],returns:{type:"xs:integer*",description:""},errors:[]},{isDocumented:!0,arity:3,name:"index-of",qname:"fn:index-of",signature:"($seq as xs:anyAtomicType*, $search as xs:anyAtomicType, $collation as xs:string) as xs:integer* external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns a sequence of positive integers giving the positions within the\n             sequence <code>$seq</code> of items that are equal to <code>$search</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="index-of" return-type="xs:integer*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="seq" type="xs:anyAtomicType*"/><arg name="search" type="xs:anyAtomicType"/></proto></example><example role="signature"><proto name="index-of" return-type="xs:integer*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="seq" type="xs:anyAtomicType*"/><arg name="search" type="xs:anyAtomicType"/><arg name="collation" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		collations, and implicit timezone.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The three-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		collations, and static base uri, and implicit timezone.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns a sequence of positive integers giving the positions within the\n             sequence <code>$seq</code> of items that are equal to <code>$search</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The collation used by this function is determined according to the rules in <specref ref="choosing-a-collation"/>. This collation is used when string comparison is\n             required.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The items in the sequence <code>$seq</code> are compared with <code>$search</code> under\n             the rules for the <code>eq</code> operator. Values of type <code>xs:untypedAtomic</code>\n             are compared as if they were of type <code>xs:string</code>. Values that cannot be\n             compared, because the <code>eq</code> operator is not defined for their types, are\n             considered to be distinct. If an item compares equal, then the position of that item in\n             the sequence <code>$seq</code> is included in the result.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The first item in a sequence is at position 1, not position 0.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The result sequence is in ascending numeric order.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$seq</code> is the empty sequence, or if no item in\n                <code>$seq</code> matches <code>$search</code>, then the function returns the empty\n             sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="D">No error occurs if non-comparable values are encountered. So when\n             comparing two atomic values, the effective boolean value of <code>fn:index-of($a,\n                $b)</code> is true if <code>$a</code> and <code>$b</code> are equal, false if they\n             are not equal or not comparable.</p></div>\n',summary:"<p>  Returns a sequence of positive integers giving the positions within the\n             sequence  $seq  of items that are equal to  $search .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"seq",type:"xs:anyAtomicType",occurrence:"*",description:""},{name:"search",type:"xs:anyAtomicType",occurrence:null,description:""},{name:"collation",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:integer*",description:""},errors:[]},{isDocumented:!0,arity:1,name:"innermost",qname:"fn:innermost",signature:"($nodes as node()*) as node()* external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns every node within the input sequence that is not an ancestor of another member\n             of the input sequence; the nodes are returned in document order with duplicates\n             eliminated.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="innermost" return-type="node()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="nodes" type="node()*"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The effect of the function call <code>fn:innermost($nodes)</code> is defined to be\n             equivalent to the result of the expression <code>$nodes except\n                $nodes/ancestor::node()</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">That is, the function takes as input a sequence of nodes, and returns every node within\n             the sequence that is not an ancestor of another node within the sequence; the nodes are\n             returned in document order with duplicates eliminated.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the source document contains nested sections represented by <code>div</code>\n                elements, the expression <code>innermost(//div)</code> returns those <code>div</code>\n                elements that do not contain further <code>div</code> elements.</p></div>\n',summary:"<p>  Returns every node within the input sequence that is not an ancestor of another member\n             of the input sequence; the nodes are returned in document order with duplicates\n             eliminated.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"nodes",type:"node()",occurrence:"*",description:""}],returns:{type:"node()*",description:""},errors:[]},{isDocumented:!0,arity:3,name:"insert-before",qname:"fn:insert-before",signature:"($target as item()*, $position as xs:integer, $inserts as item()*) as item()* external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns a sequence constructed by inserting an item or a sequence of items at a\n             given position within an existing sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="insert-before" return-type="item()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="target" type="item()*"/><arg name="position" type="xs:integer"/><arg name="inserts" type="item()*"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The value returned by the function consists of all items of <code>$target</code> whose\n             index is less than <code>$position</code>, followed by all items of\n                <code>$inserts</code>, followed by the remaining elements of <code>$target</code>, in\n             that order. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="del" at="F">For detailed type semantics, see [Formal Semantics].</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$target</code> is the empty sequence, <code>$inserts</code> is returned. If\n                <code>$inserts</code> is the empty sequence, <code>$target</code> is returned.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$position</code> is less than one (1), the first position, the effective value\n             of <code>$position</code> is one (1). If <code>$position</code> is greater than the\n             number of items in <code>$target</code>, then the effective value of\n                <code>$position</code> is equal to the number of items in <code>$target</code> plus\n             1. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The value of <code>$target</code> is not affected by the sequence construction.</p></div>\n',summary:"<p>  Returns a sequence constructed by inserting an item or a sequence of items at a\n             given position within an existing sequence.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"target",type:"item()",occurrence:"*",description:""},{name:"position",type:"xs:integer",occurrence:null,description:""},{name:"inserts",type:"item()",occurrence:"*",description:""}],returns:{type:"item()*",description:""},errors:[]},{isDocumented:!0,arity:1,name:"iri-to-uri",qname:"fn:iri-to-uri",signature:"($iri as xs:string?) as xs:string external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Converts a string containing an IRI into a URI according to the rules of\n                <bibref ref="rfc3987"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="iri-to-uri" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="iri" type="xs:string?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$iri</code> is the empty sequence, the function returns the zero-length\n             string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function converts the value of <code>$iri</code> into a URI according to\n             the rules given in Section 3.1 of <bibref ref="rfc3987"/> by percent-encoding characters\n             that are allowed in an IRI but not in a URI. If <code>$iri</code> contains a character\n             that is invalid in an IRI, such as the space character (see note below), the invalid\n             character is replaced by its percent-encoded form as described in <bibref ref="rfc3986"/> before the conversion is performed.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Since <bibref ref="rfc3986"/> recommends that, for consistency, URI producers and\n             normalizers should use uppercase hexadecimal digits for all percent-encodings, this\n             function must always generate hexadecimal values using the upper-case letters A-F.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function is idempotent but not invertible. Both the inputs <code>My Documents</code>\n             and <code>My%20Documents</code> will be converted to the output\n                <code>My%20Documents</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function does not check whether <code>$iri</code> is a valid IRI. It treats it as\n             an <termref def="string">string</termref> and operates on the <termref def="character">characters</termref> in the string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> The following printable ASCII characters are invalid in an IRI: "&lt;", "&gt;", <quote>\n                " </quote> (double quote), space, "{", "}", "|", "\\", "^", and "`". Since these\n             characters should not appear in an IRI, if they do appear in <code>$iri</code> they will\n             be percent-encoded. In addition, characters outside the range x20-<phrase diff="chg" at="A-E8">x7E</phrase> will be percent-encoded because they are invalid in a URI. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> Since this function does not escape the PERCENT SIGN "%" and this character is not\n             allowed in data within a URI, users wishing to convert character strings (such as file\n             names) that include "%" to a URI should manually escape "%" by replacing it with "%25".\n          </p></div>\n',summary:"<p>  Converts a string containing an IRI into a URI according to the rules of\n                  .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"iri",type:"xs:string",occurrence:"?",description:""}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:1,name:"lang",qname:"fn:lang",signature:"($testlang as xs:string?) as xs:boolean external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function tests whether the language of <code>$node</code>, or the context\n             item if the second argument is omitted, as specified by <code>xml:lang</code> attributes\n             is the same as, or is a sublanguage of, the language specified by\n             <code>$testlang</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="lang" return-type="xs:boolean" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="testlang" type="xs:string?"/></proto></example><example role="signature"><proto name="lang" return-type="xs:boolean" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="testlang" type="xs:string?"/><arg name="node" type="node()"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-dependent">focus-dependent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The behavior of the function if the second argument is omitted is exactly the same as if\n             the context item (<code>.</code>) had been passed as the second argument.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The language of the argument <code>$node</code>, or the context item if the second\n             argument is omitted, is determined by the value of the <code>xml:lang</code> attribute\n             on the node, or, if the node has no such attribute, by the value of the\n                <code>xml:lang</code> attribute on the nearest ancestor of the node that has an\n                <code>xml:lang</code> attribute. If there is no such ancestor, then the function\n             returns <code>false</code>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$testlang</code> is the empty sequence it is interpreted as the zero-length\n             string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The relevant <code>xml:lang</code> attribute is determined by the value of the XPath\n             expression:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">(ancestor-or-self::*/@xml:lang)[last()]</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If this expression returns an empty sequence, the function returns <code>false</code>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function returns <code>true</code> if and only if, based on a caseless\n             default match as specified in section 3.13 of <bibref ref="Unicode"/>, either:</p><olist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p diff="chg" at="A-E16">\n                   <code>$testlang</code> is equal to the string-value of the relevant\n                      <code>xml:lang</code> attribute, or</p></item><item><p diff="chg" at="A-E16">\n                   <code>$testlang</code> is equal to some substring of the string-value of the\n                   relevant <code>xml:lang</code> attribute that starts at the start of the\n                   string-value and ends immediately before a hyphen, "-" (the character "-" is\n                   HYPHEN-MINUS, #x002D).</p></item></olist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The following errors may be raised when <code>$arg</code> is omitted:</p><ul xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><li><p>If the context\n                item is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>, <phrase diff="add" at="M">dynamic error</phrase>\n                <xerrorref spec="XP" class="DY" code="0002" type="dynamic"/></p></li><li><p>If the context item is not a\n                node, <phrase diff="add" at="M">type error</phrase> <xerrorref spec="XP" class="TY" code="0004" type="type"/>.</p></li></ul></div>\n',summary:"<p>  This function tests whether the language of  $node , or the context\n             item if the second argument is omitted, as specified by  xml:lang  attributes\n             is the same as, or is a sublanguage of, the language specified by\n              $testlang .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"testlang",type:"xs:string",occurrence:"?",description:""}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:2,name:"lang",qname:"fn:lang",signature:"($testlang as xs:string?, $node as node()) as xs:boolean external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function tests whether the language of <code>$node</code>, or the context\n             item if the second argument is omitted, as specified by <code>xml:lang</code> attributes\n             is the same as, or is a sublanguage of, the language specified by\n             <code>$testlang</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="lang" return-type="xs:boolean" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="testlang" type="xs:string?"/></proto></example><example role="signature"><proto name="lang" return-type="xs:boolean" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="testlang" type="xs:string?"/><arg name="node" type="node()"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-dependent">focus-dependent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The behavior of the function if the second argument is omitted is exactly the same as if\n             the context item (<code>.</code>) had been passed as the second argument.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The language of the argument <code>$node</code>, or the context item if the second\n             argument is omitted, is determined by the value of the <code>xml:lang</code> attribute\n             on the node, or, if the node has no such attribute, by the value of the\n                <code>xml:lang</code> attribute on the nearest ancestor of the node that has an\n                <code>xml:lang</code> attribute. If there is no such ancestor, then the function\n             returns <code>false</code>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$testlang</code> is the empty sequence it is interpreted as the zero-length\n             string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The relevant <code>xml:lang</code> attribute is determined by the value of the XPath\n             expression:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">(ancestor-or-self::*/@xml:lang)[last()]</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If this expression returns an empty sequence, the function returns <code>false</code>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function returns <code>true</code> if and only if, based on a caseless\n             default match as specified in section 3.13 of <bibref ref="Unicode"/>, either:</p><olist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p diff="chg" at="A-E16">\n                   <code>$testlang</code> is equal to the string-value of the relevant\n                      <code>xml:lang</code> attribute, or</p></item><item><p diff="chg" at="A-E16">\n                   <code>$testlang</code> is equal to some substring of the string-value of the\n                   relevant <code>xml:lang</code> attribute that starts at the start of the\n                   string-value and ends immediately before a hyphen, "-" (the character "-" is\n                   HYPHEN-MINUS, #x002D).</p></item></olist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The following errors may be raised when <code>$arg</code> is omitted:</p><ul xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><li><p>If the context\n                item is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>, <phrase diff="add" at="M">dynamic error</phrase>\n                <xerrorref spec="XP" class="DY" code="0002" type="dynamic"/></p></li><li><p>If the context item is not a\n                node, <phrase diff="add" at="M">type error</phrase> <xerrorref spec="XP" class="TY" code="0004" type="type"/>.</p></li></ul></div>\n',summary:"<p>  This function tests whether the language of  $node , or the context\n             item if the second argument is omitted, as specified by  xml:lang  attributes\n             is the same as, or is a sublanguage of, the language specified by\n              $testlang .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"testlang",type:"xs:string",occurrence:"?",description:""},{name:"node",type:"node()",occurrence:null,description:""}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:0,name:"last",qname:"fn:last",signature:"() as xs:integer external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the context size from the dynamic context.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="last" return-type="xs:integer" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-dependent">focus-dependent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the context size from the dynamic context. (See <xspecref spec="XP30" ref="id-xp-evaluation-context-components"/>.)</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="M">dynamic</phrase> error is raised <xerrorref spec="XP" class="DY" code="0002" type="type"/> if the\n             context item is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>.</p></div>\n',summary:"<p>  Returns the context size from the dynamic context.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:integer",description:""},errors:[]},{isDocumented:!0,arity:1,name:"local-name-from-QName",qname:"fn:local-name-from-QName",signature:"($arg as xs:QName?) as xs:NCName? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the local part of the supplied QName.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="local-name-from-QName" return-type="xs:NCName?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:QName?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence the function returns the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function returns an <code>xs:NCName</code> representing the local part of\n                <code>$arg</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:local-name-from-QName(fn:QName("http://www.example.com/example",\n                   "person"))</code> returns <code>"person"</code>.</p></div>\n',summary:"<p>  Returns the local part of the supplied QName.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:QName",occurrence:"?",description:""}],returns:{type:"xs:NCName?",description:""},errors:[]},{isDocumented:!0,arity:0,name:"local-name",qname:"fn:local-name",signature:"() as xs:string external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the local part of the name of <code>$arg</code> as an\n                <code>xs:string</code> that is either the zero-length string, or has the lexical form\n             of an <code>xs:NCName</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="local-name" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example><example role="signature"><proto name="local-name" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="node()?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The zero-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-dependent">focus-dependent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the argument is omitted, it defaults to the context item (<code>.</code>). The\n             behavior of the function if the argument is omitted is exactly the same as if the\n             context item had been passed as the argument.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the argument is supplied and is the empty sequence, the function returns the\n             zero-length string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the node identified by <code>$arg</code> has no name (that is, if it is a document\n             node, a comment, a text node, or a namespace node having no name), the function returns\n             the zero-length string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function returns the local part of the expanded-QName of the node\n             identified by <code>$arg</code>, as determined by the <code>dm:node-name</code> accessor\n             defined in <xspecref spec="DM30" ref="dm-node-name"/>). This will be an\n                <code>xs:string</code> whose lexical form is an <code>xs:NCName</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The following errors may be raised when <code>$arg</code> is omitted:</p><ul xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><li><p>If the context\n                item is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>, <phrase diff="add" at="M">dynamic error</phrase>\n                <xerrorref spec="XP" class="DY" code="0002" type="dynamic"/></p></li><li><p>If the context item is not a\n                node, <phrase diff="add" at="M">type error</phrase> <xerrorref spec="XP" class="TY" code="0004" type="type"/>.</p></li></ul></div>\n',summary:"<p>  Returns the local part of the name of  $arg  as an\n                 xs:string  that is either the zero-length string, or has the lexical form\n             of an  xs:NCName .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:1,name:"local-name",qname:"fn:local-name",signature:"($arg as node()?) as xs:string external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the local part of the name of <code>$arg</code> as an\n                <code>xs:string</code> that is either the zero-length string, or has the lexical form\n             of an <code>xs:NCName</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="local-name" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example><example role="signature"><proto name="local-name" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="node()?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The zero-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-dependent">focus-dependent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the argument is omitted, it defaults to the context item (<code>.</code>). The\n             behavior of the function if the argument is omitted is exactly the same as if the\n             context item had been passed as the argument.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the argument is supplied and is the empty sequence, the function returns the\n             zero-length string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the node identified by <code>$arg</code> has no name (that is, if it is a document\n             node, a comment, a text node, or a namespace node having no name), the function returns\n             the zero-length string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function returns the local part of the expanded-QName of the node\n             identified by <code>$arg</code>, as determined by the <code>dm:node-name</code> accessor\n             defined in <xspecref spec="DM30" ref="dm-node-name"/>). This will be an\n                <code>xs:string</code> whose lexical form is an <code>xs:NCName</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The following errors may be raised when <code>$arg</code> is omitted:</p><ul xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><li><p>If the context\n                item is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>, <phrase diff="add" at="M">dynamic error</phrase>\n                <xerrorref spec="XP" class="DY" code="0002" type="dynamic"/></p></li><li><p>If the context item is not a\n                node, <phrase diff="add" at="M">type error</phrase> <xerrorref spec="XP" class="TY" code="0004" type="type"/>.</p></li></ul></div>\n',summary:"<p>  Returns the local part of the name of  $arg  as an\n                 xs:string  that is either the zero-length string, or has the lexical form\n             of an  xs:NCName .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"node()",occurrence:"?",description:""}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:1,name:"lower-case",qname:"fn:lower-case",signature:"($arg as xs:string?) as xs:string external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Converts a string to lower case.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="lower-case" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:string?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$arg</code> is the empty sequence, the zero-length string is\n             returned.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function returns the value of <code>$arg</code> after translating every\n                <termref def="character">character</termref> to its lower-case correspondent as\n             defined in the appropriate case mappings section in the Unicode standard <bibref ref="Unicode"/>. For versions of Unicode beginning with the 2.1.8 update, only\n             locale-insensitive case mappings should be applied. Beginning with version 3.2.0 (and\n             likely future versions) of Unicode, precise mappings are described in default case\n             operations, which are full case mappings in the absence of tailoring for particular\n             languages and environments. Every upper-case character that does not have a lower-case\n             correspondent, as well as every lower-case character, is included in the returned value\n             in its original form. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Case mappings may change the length of a string. In general, the\n                <code>fn:upper-case</code> and <code>fn:lower-case</code> functions are not inverses\n             of each other: <code>fn:lower-case(fn:upper-case($arg))</code> is not guaranteed to\n             return <code>$arg</code>, nor is <code>fn:upper-case(fn:lower-case($arg))</code>. The\n             Latin small letter dotless i (as used in Turkish) is perhaps the most prominent\n             lower-case letter which will not round-trip. The Latin capital letter i with dot above\n             is the most prominent upper-case letter which will not round trip; there are others,\n             such as Latin capital letter Sharp S (#1E9E) which is introduced in Unicode 5.1.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> These functions may not always be linguistically appropriate (e.g. Turkish i without\n             dot) or appropriate for the application (e.g. titlecase). In cases such as Turkish, a\n             simple translation should be used first.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> Because the function is not sensitive to locale, results will not always match user\n             expectations. In Quebec, for example, the standard uppercase equivalent of "è" is "È",\n             while in metropolitan France it is more commonly "E"; only one of these is supported by\n             the functions as defined.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> Many characters of class Ll lack uppercase equivalents in the Unicode case mapping\n             tables; many characters of class Lu lack lowercase equivalents.</p></div>\n',summary:"<p>  Converts a string to lower case.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:""}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:2,name:"matches",qname:"fn:matches",signature:"($input as xs:string?, $pattern as xs:string) as xs:boolean external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns true if the supplied string matches a given regular expression.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="matches" return-type="xs:boolean" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="input" type="xs:string?"/><arg name="pattern" type="xs:string"/></proto></example><example role="signature"><proto name="matches" return-type="xs:boolean" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="input" type="xs:string?"/><arg name="pattern" type="xs:string"/><arg name="flags" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The effect of calling the first version of this function (omitting the argument\n                <code>$flags</code>) is the same as the effect of calling the second version with the\n                <code>$flags</code> argument set to a zero-length string. Flags are defined in\n                <specref ref="flags"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$input</code> is the empty sequence, it is interpreted as the zero-length\n             string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns <code>true</code> if <code>$input</code> or some substring of\n                <code>$input</code> matches the regular expression supplied as <code>$pattern</code>.\n             Otherwise, the function returns <code>false</code>. The matching rules are influenced by\n             the value of <code>$flags</code> if present. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0002"/> if the value of\n                <code>$pattern</code> is invalid according to the rules described in <specref ref="regex-syntax"/>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0001"/> if the value of\n                <code>$flags</code> is invalid according to the rules described in <specref ref="flags"/>. </p></div>\n',summary:"<p>  Returns true if the supplied string matches a given regular expression.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"input",type:"xs:string",occurrence:"?",description:""},{name:"pattern",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:3,name:"matches",qname:"fn:matches",signature:"($input as xs:string?, $pattern as xs:string, $flags as xs:string) as xs:boolean external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns true if the supplied string matches a given regular expression.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="matches" return-type="xs:boolean" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="input" type="xs:string?"/><arg name="pattern" type="xs:string"/></proto></example><example role="signature"><proto name="matches" return-type="xs:boolean" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="input" type="xs:string?"/><arg name="pattern" type="xs:string"/><arg name="flags" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The effect of calling the first version of this function (omitting the argument\n                <code>$flags</code>) is the same as the effect of calling the second version with the\n                <code>$flags</code> argument set to a zero-length string. Flags are defined in\n                <specref ref="flags"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$input</code> is the empty sequence, it is interpreted as the zero-length\n             string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns <code>true</code> if <code>$input</code> or some substring of\n                <code>$input</code> matches the regular expression supplied as <code>$pattern</code>.\n             Otherwise, the function returns <code>false</code>. The matching rules are influenced by\n             the value of <code>$flags</code> if present. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0002"/> if the value of\n                <code>$pattern</code> is invalid according to the rules described in <specref ref="regex-syntax"/>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0001"/> if the value of\n                <code>$flags</code> is invalid according to the rules described in <specref ref="flags"/>. </p></div>\n',summary:"<p>  Returns true if the supplied string matches a given regular expression.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"input",type:"xs:string",occurrence:"?",description:""},{name:"pattern",type:"xs:string",occurrence:null,description:""},{name:"flags",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:1,name:"max",qname:"fn:max",signature:"($arg as xs:anyAtomicType*) as xs:anyAtomicType? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns a value that is equal to the highest value appearing in the input\n             sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="max" return-type="xs:anyAtomicType?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:anyAtomicType*"/></proto></example><example role="signature"><proto name="max" return-type="xs:anyAtomicType?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:anyAtomicType*"/><arg name="collation" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The zero-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		collations, and implicit timezone.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		collations, and static base uri, and implicit timezone.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The following rules are applied to the input sequence <code>$arg</code>:</p><ulist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>Values of type <code>xs:untypedAtomic</code> in <code>$arg</code> are cast to\n                      <code>xs:double</code>.</p></item><item><!--Text replaced by erratum E27 change 1"--><p diff="chg" at="A-E27">Numeric and <code>xs:anyURI</code> values are converted to\n                   the least common type reachable by a combination of type promotion and subtype\n                   substitution. See <xspecref spec="XP30" ref="promotion"/> and <xspecref spec="XP30" ref="mapping"/>.</p><!--End of text replaced by erratum E27--></item></ulist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The items in the resulting sequence may be reordered in an arbitrary order. The\n             resulting sequence is referred to below as the converted sequence. The function returns\n             an item from the converted sequence rather than the input sequence. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the converted sequence is empty, the function returns the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">All items in the <phrase diff="chg" at="A-E47">converted sequence must be\n                derived</phrase> from a single base type for which the <code>le</code> operator is\n             defined. In addition, the values in the sequence must have a total order. If date/time\n             values do not have a timezone, they are considered to have the implicit timezone\n             provided by the dynamic context for the purpose of comparison. Duration values must\n             either all be <code>xs:yearMonthDuration</code> values or must all be\n                <code>xs:dayTimeDuration</code> values.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the converted sequence contains the value <code>NaN</code>, the value\n                <code>NaN</code> is returned.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the items in the <phrase diff="chg" at="A-E47">converted sequence</phrase> are of\n             type <code>xs:string</code> or types derived by restriction from <code>xs:string</code>,\n             then the determination of the item with the smallest value is made according to the\n             collation that is used. If the type of the items in the <phrase diff="chg" at="A-E47">converted sequence</phrase> is not <code>xs:string</code> and\n                <code>$collation</code> is specified, the collation is ignored.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The collation used by this function is determined according to the rules in <specref ref="choosing-a-collation"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns the result of the expression:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">\n    if (every $v in $c satisfies $c[1] ge $v)\n    then $c[1]\n    else fn:max(fn:subsequence($c, 2))</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">evaluated with <code>$collation</code> as the default collation if specified, and with\n                <code>$c</code> as the converted sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="del" at="F">For detailed type semantics, see [Formal Semantics].</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A type error is raised <errorref class="RG" code="0006"/> if the input sequence contains\n             items of incompatible types, as described above.</p></div>\n',summary:"<p>  Returns a value that is equal to the highest value appearing in the input\n             sequence.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:anyAtomicType",occurrence:"*",description:""}],returns:{type:"xs:anyAtomicType?",description:""},errors:[]},{isDocumented:!0,arity:2,name:"max",qname:"fn:max",signature:"($arg as xs:anyAtomicType*, $collation as xs:string) as xs:anyAtomicType? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns a value that is equal to the highest value appearing in the input\n             sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="max" return-type="xs:anyAtomicType?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:anyAtomicType*"/></proto></example><example role="signature"><proto name="max" return-type="xs:anyAtomicType?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:anyAtomicType*"/><arg name="collation" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The zero-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		collations, and implicit timezone.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		collations, and static base uri, and implicit timezone.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The following rules are applied to the input sequence <code>$arg</code>:</p><ulist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>Values of type <code>xs:untypedAtomic</code> in <code>$arg</code> are cast to\n                      <code>xs:double</code>.</p></item><item><!--Text replaced by erratum E27 change 1"--><p diff="chg" at="A-E27">Numeric and <code>xs:anyURI</code> values are converted to\n                   the least common type reachable by a combination of type promotion and subtype\n                   substitution. See <xspecref spec="XP30" ref="promotion"/> and <xspecref spec="XP30" ref="mapping"/>.</p><!--End of text replaced by erratum E27--></item></ulist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The items in the resulting sequence may be reordered in an arbitrary order. The\n             resulting sequence is referred to below as the converted sequence. The function returns\n             an item from the converted sequence rather than the input sequence. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the converted sequence is empty, the function returns the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">All items in the <phrase diff="chg" at="A-E47">converted sequence must be\n                derived</phrase> from a single base type for which the <code>le</code> operator is\n             defined. In addition, the values in the sequence must have a total order. If date/time\n             values do not have a timezone, they are considered to have the implicit timezone\n             provided by the dynamic context for the purpose of comparison. Duration values must\n             either all be <code>xs:yearMonthDuration</code> values or must all be\n                <code>xs:dayTimeDuration</code> values.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the converted sequence contains the value <code>NaN</code>, the value\n                <code>NaN</code> is returned.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the items in the <phrase diff="chg" at="A-E47">converted sequence</phrase> are of\n             type <code>xs:string</code> or types derived by restriction from <code>xs:string</code>,\n             then the determination of the item with the smallest value is made according to the\n             collation that is used. If the type of the items in the <phrase diff="chg" at="A-E47">converted sequence</phrase> is not <code>xs:string</code> and\n                <code>$collation</code> is specified, the collation is ignored.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The collation used by this function is determined according to the rules in <specref ref="choosing-a-collation"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns the result of the expression:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">\n    if (every $v in $c satisfies $c[1] ge $v)\n    then $c[1]\n    else fn:max(fn:subsequence($c, 2))</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">evaluated with <code>$collation</code> as the default collation if specified, and with\n                <code>$c</code> as the converted sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="del" at="F">For detailed type semantics, see [Formal Semantics].</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A type error is raised <errorref class="RG" code="0006"/> if the input sequence contains\n             items of incompatible types, as described above.</p></div>\n',summary:"<p>  Returns a value that is equal to the highest value appearing in the input\n             sequence.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:anyAtomicType",occurrence:"*",description:""},{name:"collation",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:anyAtomicType?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"min",qname:"fn:min",signature:"($arg as xs:anyAtomicType*) as xs:anyAtomicType? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns a value that is equal to the lowest value appearing in the input\n             sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="min" return-type="xs:anyAtomicType?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:anyAtomicType*"/></proto></example><example role="signature"><proto name="min" return-type="xs:anyAtomicType?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:anyAtomicType*"/><arg name="collation" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The zero-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		collations, and implicit timezone.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		collations, and static base uri, and implicit timezone.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The following rules are applied to the input sequence:</p><ulist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>Values of type <code>xs:untypedAtomic</code> in <code>$arg</code> are cast to\n                      <code>xs:double</code>.</p></item><item><!--Text replaced by erratum E27 change 2"--><p diff="chg" at="A-E27">Numeric and <code>xs:anyURI</code> values are converted to\n                   the least common type reachable by a combination of type promotion and subtype\n                   substitution. See <xspecref spec="XP30" ref="promotion"/> and <xspecref spec="XP30" ref="mapping"/>.</p><!--End of text replaced by erratum E27--></item></ulist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The items in the resulting sequence may be reordered in an arbitrary order. The\n             resulting sequence is referred to below as the converted sequence. The function returns\n             an item from the converted sequence rather than the input sequence. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the converted sequence is empty, the empty sequence is returned.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">All items in the <phrase diff="chg" at="A-E47">converted sequence must be\n                derived</phrase> from a single base type for which the <code>le</code> operator is\n             defined. In addition, the values in the sequence must have a total order. If date/time\n             values do not have a timezone, they are considered to have the implicit timezone\n             provided by the dynamic context for the purpose of comparison. Duration values must\n             either all be <code>xs:yearMonthDuration</code> values or must all be\n                <code>xs:dayTimeDuration</code> values.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the converted sequence contains the value <code>NaN</code>, the value\n                <code>NaN</code> is returned.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the items in the <phrase diff="chg" at="A-E47">converted sequence</phrase> are of\n             type <code>xs:string</code> or types derived by restriction from <code>xs:string</code>,\n             then the determination of the item with the smallest value is made according to the\n             collation that is used. If the type of the items in the <phrase diff="chg" at="A-E47">converted sequence</phrase> is not <code>xs:string</code> and\n                <code>$collation</code> is specified, the collation is ignored.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The collation used by this function is determined according to the rules in <specref ref="choosing-a-collation"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns the result of the expression:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">\n    if (every $v in $c satisfies $c[1] le $v)\n    then $c[1]\n    else fn:min(fn:subsequence($c, 2))</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">evaluated with <code>$collation</code> as the default collation if specified, and with\n                <code>$c</code> as the converted sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="del" at="F">For detailed type semantics, see [Formal Semantics].</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A type error is raised <errorref class="RG" code="0006"/> if the input sequence contains\n             items of incompatible types, as described above.</p></div>\n',summary:"<p>  Returns a value that is equal to the lowest value appearing in the input\n             sequence.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:anyAtomicType",occurrence:"*",description:""}],returns:{type:"xs:anyAtomicType?",description:""},errors:[]},{isDocumented:!0,arity:2,name:"min",qname:"fn:min",signature:"($arg as xs:anyAtomicType*, $collation as xs:string) as xs:anyAtomicType? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns a value that is equal to the lowest value appearing in the input\n             sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="min" return-type="xs:anyAtomicType?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:anyAtomicType*"/></proto></example><example role="signature"><proto name="min" return-type="xs:anyAtomicType?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:anyAtomicType*"/><arg name="collation" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The zero-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		collations, and implicit timezone.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		collations, and static base uri, and implicit timezone.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The following rules are applied to the input sequence:</p><ulist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>Values of type <code>xs:untypedAtomic</code> in <code>$arg</code> are cast to\n                      <code>xs:double</code>.</p></item><item><!--Text replaced by erratum E27 change 2"--><p diff="chg" at="A-E27">Numeric and <code>xs:anyURI</code> values are converted to\n                   the least common type reachable by a combination of type promotion and subtype\n                   substitution. See <xspecref spec="XP30" ref="promotion"/> and <xspecref spec="XP30" ref="mapping"/>.</p><!--End of text replaced by erratum E27--></item></ulist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The items in the resulting sequence may be reordered in an arbitrary order. The\n             resulting sequence is referred to below as the converted sequence. The function returns\n             an item from the converted sequence rather than the input sequence. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the converted sequence is empty, the empty sequence is returned.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">All items in the <phrase diff="chg" at="A-E47">converted sequence must be\n                derived</phrase> from a single base type for which the <code>le</code> operator is\n             defined. In addition, the values in the sequence must have a total order. If date/time\n             values do not have a timezone, they are considered to have the implicit timezone\n             provided by the dynamic context for the purpose of comparison. Duration values must\n             either all be <code>xs:yearMonthDuration</code> values or must all be\n                <code>xs:dayTimeDuration</code> values.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the converted sequence contains the value <code>NaN</code>, the value\n                <code>NaN</code> is returned.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the items in the <phrase diff="chg" at="A-E47">converted sequence</phrase> are of\n             type <code>xs:string</code> or types derived by restriction from <code>xs:string</code>,\n             then the determination of the item with the smallest value is made according to the\n             collation that is used. If the type of the items in the <phrase diff="chg" at="A-E47">converted sequence</phrase> is not <code>xs:string</code> and\n                <code>$collation</code> is specified, the collation is ignored.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The collation used by this function is determined according to the rules in <specref ref="choosing-a-collation"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns the result of the expression:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">\n    if (every $v in $c satisfies $c[1] le $v)\n    then $c[1]\n    else fn:min(fn:subsequence($c, 2))</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">evaluated with <code>$collation</code> as the default collation if specified, and with\n                <code>$c</code> as the converted sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="del" at="F">For detailed type semantics, see [Formal Semantics].</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A type error is raised <errorref class="RG" code="0006"/> if the input sequence contains\n             items of incompatible types, as described above.</p></div>\n',summary:"<p>  Returns a value that is equal to the lowest value appearing in the input\n             sequence.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:anyAtomicType",occurrence:"*",description:""},{name:"collation",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:anyAtomicType?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"minutes-from-dateTime",qname:"fn:minutes-from-dateTime",signature:"($arg as xs:dateTime?) as xs:integer? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the minute component of an <code>xs:dateTime</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="minutes-from-dateTime" return-type="xs:integer?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:dateTime?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, the function returns the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function returns an <code>xs:integer</code> value between 0 and 59, both\n             inclusive, representing the minute component in the local value of\n             <code>$arg</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:minutes-from-dateTime(xs:dateTime("1999-05-31T13:20:00-05:00"))</code> returns <code>20</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:minutes-from-dateTime(xs:dateTime("1999-05-31T13:30:00+05:30"))</code> returns <code>30</code>.</p></div>\n',summary:"<p>  Returns the minute component of an  xs:dateTime .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:dateTime",occurrence:"?",description:""}],returns:{type:"xs:integer?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"minutes-from-duration",qname:"fn:minutes-from-duration",signature:"($arg as xs:duration?) as xs:integer? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the number of minutes in a duration.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="minutes-from-duration" return-type="xs:integer?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:duration?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, the function returns the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function returns an <code>xs:integer</code> representing the minutes\n             component in the value of <code>$arg</code>. The result is obtained by casting\n                <code>$arg</code> to an <code>xs:dayTimeDuration</code> (see <specref ref="casting-to-durations"/>) and then computing the minutes component as described\n             in <specref ref="canonical-dayTimeDuration"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is a negative duration then the result will be negative..</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is an <code>xs:yearMonthDuration</code> the function returns 0.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:minutes-from-duration(xs:dayTimeDuration("P3DT10H"))</code> returns <code>0</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:minutes-from-duration(xs:dayTimeDuration("-P5DT12H30M"))</code> returns <code>-30</code>.</p></div>\n',summary:"<p>  Returns the number of minutes in a duration.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:duration",occurrence:"?",description:""}],returns:{type:"xs:integer?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"minutes-from-time",qname:"fn:minutes-from-time",signature:"($arg as xs:time?) as xs:integer? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the minutes component of an <code>xs:time</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="minutes-from-time" return-type="xs:integer?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:time?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, the function returns the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function returns an <code>xs:integer</code> value between 0 and 59, both\n             inclusive, representing the value of the minutes component in the local value of\n                <code>$arg</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:minutes-from-time(xs:time("13:00:00Z"))</code> returns <code>0</code>.</p></div>\n',summary:"<p>  Returns the minutes component of an  xs:time .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:time",occurrence:"?",description:""}],returns:{type:"xs:integer?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"month-from-date",qname:"fn:month-from-date",signature:"($arg as xs:date?) as xs:integer? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the month component of an <code>xs:date</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="month-from-date" return-type="xs:integer?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:date?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, the function returns the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function returns an <code>xs:integer</code> between 1 and 12, both\n             inclusive, representing the month component in the local value of <code>$arg</code>.\n          </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:month-from-date(xs:date("1999-05-31-05:00"))</code> returns <code>5</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:month-from-date(xs:date("2000-01-01+05:00"))</code> returns <code>1</code>.</p></div>\n',summary:"<p>  Returns the month component of an  xs:date .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:date",occurrence:"?",description:""}],returns:{type:"xs:integer?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"months-from-duration",qname:"fn:months-from-duration",signature:"($arg as xs:duration?) as xs:integer? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the number of months in a duration.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="months-from-duration" return-type="xs:integer?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:duration?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, the function returns the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function returns an <code>xs:integer</code> representing the months\n             component in the value of <code>$arg</code>. The result is obtained by casting\n                <code>$arg</code> to an <code>xs:yearMonthDuration</code> (see <specref ref="casting-to-durations"/>) and then computing the months component as described in\n                <specref ref="canonical-yearMonthDuration"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is a negative duration then the result will be negative..</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is an <code>xs:dayTimeDuration</code> the function returns 0.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:months-from-duration(xs:yearMonthDuration("P20Y15M"))</code> returns <code>3</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:months-from-duration(xs:yearMonthDuration("-P20Y18M"))</code> returns <code>-6</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:months-from-duration(xs:dayTimeDuration("-P2DT15H0M0S"))</code> returns <code>0</code>.</p></div>\n',summary:"<p>  Returns the number of months in a duration.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:duration",occurrence:"?",description:""}],returns:{type:"xs:integer?",description:""},errors:[]},{isDocumented:!0,arity:0,name:"name",qname:"fn:name",signature:"() as xs:string external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the name of a node, as an <code>xs:string</code> that is either the\n             zero-length string, or has the lexical form of an <code>xs:QName</code>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="name" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example><example role="signature"><proto name="name" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="node()?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The zero-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-dependent">focus-dependent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the argument is omitted, it defaults to the context item (<code>.</code>). The\n             behavior of the function if the argument is omitted is exactly the same as if the\n             context item had been passed as the argument.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the argument is supplied and is the empty sequence, the function returns the\n             zero-length string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the node identified by <code>$arg</code> has no name (that is, if it is a document\n             node, a comment, a text node, or a namespace node having no name), the function returns\n             the zero-length string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function returns the value of the expression\n                <code>fn:string(fn:node-name($arg))</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The following errors may be raised when <code>$arg</code> is omitted:</p><ul xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><li><p>If the context\n                item is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>, <phrase diff="add" at="M">dynamic error</phrase>\n                <xerrorref spec="XP" class="DY" code="0002" type="dynamic"/></p></li><li><p>If the context item is not a\n                node, <phrase diff="add" at="M">type error</phrase> <xerrorref spec="XP" class="TY" code="0004" type="type"/>.</p></li></ul></div>\n',summary:"<p>  Returns the name of a node, as an  xs:string  that is either the\n             zero-length string, or has the lexical form of an  xs:QName .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:1,name:"name",qname:"fn:name",signature:"($arg as node()?) as xs:string external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the name of a node, as an <code>xs:string</code> that is either the\n             zero-length string, or has the lexical form of an <code>xs:QName</code>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="name" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example><example role="signature"><proto name="name" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="node()?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The zero-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-dependent">focus-dependent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the argument is omitted, it defaults to the context item (<code>.</code>). The\n             behavior of the function if the argument is omitted is exactly the same as if the\n             context item had been passed as the argument.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the argument is supplied and is the empty sequence, the function returns the\n             zero-length string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the node identified by <code>$arg</code> has no name (that is, if it is a document\n             node, a comment, a text node, or a namespace node having no name), the function returns\n             the zero-length string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function returns the value of the expression\n                <code>fn:string(fn:node-name($arg))</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The following errors may be raised when <code>$arg</code> is omitted:</p><ul xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><li><p>If the context\n                item is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>, <phrase diff="add" at="M">dynamic error</phrase>\n                <xerrorref spec="XP" class="DY" code="0002" type="dynamic"/></p></li><li><p>If the context item is not a\n                node, <phrase diff="add" at="M">type error</phrase> <xerrorref spec="XP" class="TY" code="0004" type="type"/>.</p></li></ul></div>\n',summary:"<p>  Returns the name of a node, as an  xs:string  that is either the\n             zero-length string, or has the lexical form of an  xs:QName .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"node()",occurrence:"?",description:""}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:2,name:"namespace-uri-for-prefix",qname:"fn:namespace-uri-for-prefix",signature:"($prefix as xs:string?, $element as element(*)) as xs:anyURI? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the namespace URI of one of the in-scope namespaces for\n                <code>$element</code>, identified by its namespace prefix.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="namespace-uri-for-prefix" return-type="xs:anyURI?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="prefix" type="xs:string?"/><arg name="element" type="element()"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$element</code> has an in-scope namespace whose namespace prefix is equal to\n                <code>$prefix</code>, the function returns the namespace URI of that namespace.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$element</code> has no in-scope namespace whose namespace prefix is equal to\n             <code>$prefix</code>, the function returns the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="I">If <code>$prefix</code> is the zero-length string or the empty\n             sequence, then if <code>$element</code> has a default namespace (that is, a namespace\n             node with no name), the function returns the namespace URI of the default namespace. If\n                <code>$element</code> has no default namespace, the function returns the empty\n             sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Prefixes are equal only if their Unicode codepoints match exactly.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">let <code>$e</code> := <eg xml:space="preserve">\n &lt;z:a xmlns="http://example.org/one" xmlns:z="http://example.org/two"&gt;\n   &lt;b xmlns=""/&gt;\n &lt;/z:a&gt;</eg></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:namespace-uri-for-prefix("z", $e)</code> returns <code>"http://example.org/two"</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:namespace-uri-for-prefix("", $e)</code> returns <code>"http://example.org/one"</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:namespace-uri-for-prefix((), $e)</code> returns <code>"http://example.org/one"</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:namespace-uri-for-prefix("xml", $e)</code> returns <code>"http://www.w3.org/XML/1998/namespace"</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:namespace-uri-for-prefix("xml", $e)</code> returns <code>"http://www.w3.org/XML/1998/namespace"</code>.</p></div>\n',summary:"<p>  Returns the namespace URI of one of the in-scope namespaces for\n                 $element , identified by its namespace prefix.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"prefix",type:"xs:string",occurrence:"?",description:""},{name:"element",type:"element(*)",occurrence:null,description:""}],returns:{type:"xs:anyURI?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"namespace-uri-from-QName",qname:"fn:namespace-uri-from-QName",signature:"($arg as xs:QName?) as xs:anyURI? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the namespace URI part of the supplied QName.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="namespace-uri-from-QName" return-type="xs:anyURI?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:QName?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence the function returns the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function returns an <code>xs:anyURI</code> representing the namespace URI\n             part of <code>$arg</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is in no namespace, the function returns the zero-length\n                <code>xs:anyURI</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:namespace-uri-from-QName(fn:QName("http://www.example.com/example",\n                   "person"))</code> returns <code>xs:anyURI("http://www.example.com/example")</code>.</p></div>\n',summary:"<p>  Returns the namespace URI part of the supplied QName.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:QName",occurrence:"?",description:""}],returns:{type:"xs:anyURI?",description:""},errors:[]},{isDocumented:!0,arity:0,name:"namespace-uri",qname:"fn:namespace-uri",signature:"() as xs:anyURI external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="A-E15">Returns the namespace URI part of the name of\n                <code>$arg</code>, as an <code>xs:anyURI</code> value.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="namespace-uri" return-type="xs:anyURI" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example><example role="signature"><proto name="namespace-uri" return-type="xs:anyURI" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="node()?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The zero-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-dependent">focus-dependent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the argument is omitted, it defaults to the context node (<code>.</code>). The\n             behavior of the function if the argument is omitted is exactly the same as if the\n             context item had been passed as the argument.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the node identified by <code>$arg</code> is neither an element nor an attribute node,\n             or if it is an element or attribute node whose expanded-QName (as determined by the\n                <code>dm:node-name</code> accessor in the <xspecref spec="DM30" ref="dm-node-name"/>)\n             is in no namespace, then the function returns the zero-length <code>xs:anyURI</code>\n             value.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the result will be the namespace URI part of the expanded-QName of the node\n             identified by <code>$arg</code>, as determined by the <code>dm:node-name</code> accessor\n             defined in <xspecref spec="DM30" ref="dm-node-name"/>), returned as an\n                <code>xs:anyURI</code> value.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The following errors may be raised when <code>$arg</code> is omitted:</p><ul xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><li><p>If the context\n                item is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>, <phrase diff="add" at="M">dynamic error</phrase>\n                <xerrorref spec="XP" class="DY" code="0002" type="dynamic"/></p></li><li><p>If the context item is not a\n                node, <phrase diff="add" at="M">type error</phrase> <xerrorref spec="XP" class="TY" code="0004" type="type"/>.</p></li></ul></div>\n',summary:"<p>  Returns the namespace URI part of the name of\n                 $arg , as an  xs:anyURI  value.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:anyURI",description:""},errors:[]},{isDocumented:!0,arity:1,name:"namespace-uri",qname:"fn:namespace-uri",signature:"($arg as node()?) as xs:anyURI external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="A-E15">Returns the namespace URI part of the name of\n                <code>$arg</code>, as an <code>xs:anyURI</code> value.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="namespace-uri" return-type="xs:anyURI" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example><example role="signature"><proto name="namespace-uri" return-type="xs:anyURI" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="node()?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The zero-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-dependent">focus-dependent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the argument is omitted, it defaults to the context node (<code>.</code>). The\n             behavior of the function if the argument is omitted is exactly the same as if the\n             context item had been passed as the argument.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the node identified by <code>$arg</code> is neither an element nor an attribute node,\n             or if it is an element or attribute node whose expanded-QName (as determined by the\n                <code>dm:node-name</code> accessor in the <xspecref spec="DM30" ref="dm-node-name"/>)\n             is in no namespace, then the function returns the zero-length <code>xs:anyURI</code>\n             value.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the result will be the namespace URI part of the expanded-QName of the node\n             identified by <code>$arg</code>, as determined by the <code>dm:node-name</code> accessor\n             defined in <xspecref spec="DM30" ref="dm-node-name"/>), returned as an\n                <code>xs:anyURI</code> value.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The following errors may be raised when <code>$arg</code> is omitted:</p><ul xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><li><p>If the context\n                item is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>, <phrase diff="add" at="M">dynamic error</phrase>\n                <xerrorref spec="XP" class="DY" code="0002" type="dynamic"/></p></li><li><p>If the context item is not a\n                node, <phrase diff="add" at="M">type error</phrase> <xerrorref spec="XP" class="TY" code="0004" type="type"/>.</p></li></ul></div>\n',summary:"<p>  Returns the namespace URI part of the name of\n                 $arg , as an  xs:anyURI  value.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"node()",occurrence:"?",description:""}],returns:{type:"xs:anyURI",description:""},errors:[]},{isDocumented:!0,arity:0,name:"nilled",qname:"fn:nilled",signature:"() as xs:boolean external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns true for an element that is <term>nilled</term>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="nilled" return-type="xs:boolean" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example><example role="signature"><proto name="nilled" return-type="xs:boolean?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="node()?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The zero-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-dependent">focus-dependent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the argument is omitted, it defaults to the context item (<code>.</code>). The\n             behavior of the function if the argument is omitted is exactly the same as if the\n             context item had been passed as the argument.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, the function returns the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise the function returns the result of the <code>dm:nilled</code> accessor as\n             defined in <bibref ref="xpath-datamodel-30"/> (see <xspecref spec="DM30" ref="dm-nilled"/>).</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="I">The following errors may be raised when <code>$arg</code> is omitted:</p><ul xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><li><p>If the context\n                item is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>, <phrase diff="add" at="M">dynamic error</phrase>\n                <xerrorref spec="XP" class="DY" code="0002" type="dynamic"/></p></li><li><p>If the context item is not a\n                node, <phrase diff="add" at="M">type error</phrase> <xerrorref spec="XP" class="TY" code="0004" type="type"/>.</p></li></ul></div>\n',summary:"<p>  Returns true for an element that is  nilled .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:1,name:"nilled",qname:"fn:nilled",signature:"($arg as node()?) as xs:boolean? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns true for an element that is <term>nilled</term>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="nilled" return-type="xs:boolean" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example><example role="signature"><proto name="nilled" return-type="xs:boolean?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="node()?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The zero-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-dependent">focus-dependent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the argument is omitted, it defaults to the context item (<code>.</code>). The\n             behavior of the function if the argument is omitted is exactly the same as if the\n             context item had been passed as the argument.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, the function returns the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise the function returns the result of the <code>dm:nilled</code> accessor as\n             defined in <bibref ref="xpath-datamodel-30"/> (see <xspecref spec="DM30" ref="dm-nilled"/>).</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="I">The following errors may be raised when <code>$arg</code> is omitted:</p><ul xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><li><p>If the context\n                item is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>, <phrase diff="add" at="M">dynamic error</phrase>\n                <xerrorref spec="XP" class="DY" code="0002" type="dynamic"/></p></li><li><p>If the context item is not a\n                node, <phrase diff="add" at="M">type error</phrase> <xerrorref spec="XP" class="TY" code="0004" type="type"/>.</p></li></ul></div>\n',summary:"<p>  Returns true for an element that is  nilled .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"node()",occurrence:"?",description:""}],returns:{type:"xs:boolean?",description:""},errors:[]},{isDocumented:!0,arity:0,name:"node-name",qname:"fn:node-name",signature:"() as xs:QName? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the name of a node, as an <code>xs:QName</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="node-name" return-type="xs:QName?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example><example role="signature"><proto name="node-name" return-type="xs:QName?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="node()?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The zero-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-dependent">focus-dependent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="F">If the argument is omitted, it defaults to the context item\n                (<code>.</code>). The behavior of the function if the argument is omitted is exactly\n             the same as if the context item had been passed as the argument.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, the empty sequence is returned.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function returns the result of the <code>dm:node-name</code> accessor as\n             defined in <bibref ref="xpath-datamodel-30"/> (see <xspecref spec="DM30" ref="dm-node-name"/>).</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="I">The following errors may be raised when <code>$arg</code> is omitted:</p><ul xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><li><p>If the context\n                item is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>, <phrase diff="add" at="M">dynamic error</phrase>\n                <xerrorref spec="XP" class="DY" code="0002" type="dynamic"/></p></li><li><p>If the context item is not a\n                node, <phrase diff="add" at="M">type error</phrase> <xerrorref spec="XP" class="TY" code="0004" type="type"/>.</p></li></ul></div>\n',summary:"<p>  Returns the name of a node, as an  xs:QName .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:QName?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"node-name",qname:"fn:node-name",signature:"($arg as node()?) as xs:QName? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the name of a node, as an <code>xs:QName</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="node-name" return-type="xs:QName?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example><example role="signature"><proto name="node-name" return-type="xs:QName?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="node()?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The zero-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-dependent">focus-dependent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="F">If the argument is omitted, it defaults to the context item\n                (<code>.</code>). The behavior of the function if the argument is omitted is exactly\n             the same as if the context item had been passed as the argument.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, the empty sequence is returned.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function returns the result of the <code>dm:node-name</code> accessor as\n             defined in <bibref ref="xpath-datamodel-30"/> (see <xspecref spec="DM30" ref="dm-node-name"/>).</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="I">The following errors may be raised when <code>$arg</code> is omitted:</p><ul xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><li><p>If the context\n                item is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>, <phrase diff="add" at="M">dynamic error</phrase>\n                <xerrorref spec="XP" class="DY" code="0002" type="dynamic"/></p></li><li><p>If the context item is not a\n                node, <phrase diff="add" at="M">type error</phrase> <xerrorref spec="XP" class="TY" code="0004" type="type"/>.</p></li></ul></div>\n',summary:"<p>  Returns the name of a node, as an  xs:QName .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"node()",occurrence:"?",description:""}],returns:{type:"xs:QName?",description:""},errors:[]},{isDocumented:!0,arity:0,name:"normalize-space",qname:"fn:normalize-space",signature:"() as xs:string external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the value of <code>$arg</code> with leading and trailing whitespace\n             removed, and sequences of internal whitespace reduced to a single space character.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="normalize-space" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example><example role="signature"><proto name="normalize-space" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:string?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The zero-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-dependent">focus-dependent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$arg</code> is the empty sequence, the function returns the\n             zero-length string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns a string constructed by stripping leading and trailing whitespace\n             from the value of <code>$arg</code>, and replacing sequences of one or more adjacent\n             whitespace characters with a single space, <code>#x20</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The whitespace characters are defined in the metasymbol S (Production 3) of <bibref ref="REC-xml"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="A-E14">If no argument is supplied, then <code>$arg</code> defaults to the\n             string value (calculated using <code>fn:string</code>) of the context item\n                (<code>.</code>). </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If no argument is supplied and the context item is <xtermref ref="dt-absent" spec="DM30">absent</xtermref> then a <phrase diff="add" at="dynamic">dynamic</phrase> error is raised: <xerrorref spec="XP" class="DY" code="0002" type="dynamic"/>.</p></div>\n',summary:"<p>  Returns the value of  $arg  with leading and trailing whitespace\n             removed, and sequences of internal whitespace reduced to a single space character.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:1,name:"normalize-space",qname:"fn:normalize-space",signature:"($arg as xs:string?) as xs:string external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the value of <code>$arg</code> with leading and trailing whitespace\n             removed, and sequences of internal whitespace reduced to a single space character.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="normalize-space" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example><example role="signature"><proto name="normalize-space" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:string?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The zero-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-dependent">focus-dependent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$arg</code> is the empty sequence, the function returns the\n             zero-length string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns a string constructed by stripping leading and trailing whitespace\n             from the value of <code>$arg</code>, and replacing sequences of one or more adjacent\n             whitespace characters with a single space, <code>#x20</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The whitespace characters are defined in the metasymbol S (Production 3) of <bibref ref="REC-xml"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="A-E14">If no argument is supplied, then <code>$arg</code> defaults to the\n             string value (calculated using <code>fn:string</code>) of the context item\n                (<code>.</code>). </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If no argument is supplied and the context item is <xtermref ref="dt-absent" spec="DM30">absent</xtermref> then a <phrase diff="add" at="dynamic">dynamic</phrase> error is raised: <xerrorref spec="XP" class="DY" code="0002" type="dynamic"/>.</p></div>\n',summary:"<p>  Returns the value of  $arg  with leading and trailing whitespace\n             removed, and sequences of internal whitespace reduced to a single space character.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:""}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:1,name:"normalize-unicode",qname:"fn:normalize-unicode",signature:"($arg as xs:string?) as xs:string external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the value of <code>$arg</code> after applying Unicode\n             normalization.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="normalize-unicode" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:string?"/></proto></example><example role="signature"><proto name="normalize-unicode" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:string?"/><arg name="normalizationForm" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$arg</code> is the empty sequence, the function returns the\n             zero-length string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the single-argument version of the function is used, the result is the same as\n             calling the two-argument version with <code>$normalizationForm</code> set to the string\n             "NFC".</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function returns the value of <code>$arg</code> normalized according to\n             the rules of the normalization form identified by the value of\n                <code>$normalizationForm</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The effective value of <code>$normalizationForm</code> is the value of the expression\n                <code>fn:upper-case(fn:normalize-space($normalizationForm))</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="del" at="D">See <bibref ref="charmod-normalization"/> for a description of the\n             normalization forms.</p><ulist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>If the effective value of <code>$normalizationForm</code> is <quote>NFC</quote>,\n                   then the function returns the value of <code>$arg</code> converted to Unicode\n                   Normalization Form C (NFC).</p></item><item><p>If the effective value of <code>$normalizationForm</code> is <quote>NFD</quote>,\n                   then the function returns the value of <code>$arg</code> converted to Unicode\n                   Normalization Form D (NFD).</p></item><item><p>If the effective value of <code>$normalizationForm</code> is <quote>NFKC</quote>,\n                   then the function returns the value of <code>$arg</code> in Unicode Normalization\n                   Form KC (NFKC).</p></item><item><p>If the effective value of <code>$normalizationForm</code> is <quote>NFKD</quote>,\n                   then the function returns the value of <code>$arg</code> converted to Unicode\n                   Normalization Form KD (NFKD).</p></item><item><p>If the effective value of <code>$normalizationForm</code> is\n                      <quote>FULLY-NORMALIZED</quote>, then the function returns the value of\n                      <code>$arg</code> converted to fully normalized form. </p></item><item><p>If the effective value of <code>$normalizationForm</code> is the zero-length\n                   string, no normalization is performed and <code>$arg</code> is returned.</p></item></ulist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="D">Normalization forms NFC, NFD, NFKC, and NFKD, and the algorithms to be\n             used for converting a string to each of these forms, are defined in <bibref ref="Unicode-Normalization"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="D">The motivation for normalization form FULLY-NORMALIZED is explained in\n                <bibref ref="charmod-normalization"/>. However, as that specification did not\n             progress beyond working draft status, the normative specification is as follows:</p><ulist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="D"><item><p>A string is <term>fully-normalized</term> if (a) it is in normalization form NFC\n                   as defined in <bibref ref="Unicode-Normalization"/>, and (b) it does not start\n                   with a composing character.</p></item><item><p>A composing character is a character that is one or both of the following:</p><ulist><item><p>the second character in the canonical decomposition mapping of some\n                         character that is not listed in the Composition Exclusion Table defined in\n                            <bibref ref="Unicode-Normalization"/>;</p></item><item><p>of non-zero canonical combining class (as defined in <bibref ref="Unicode"/>).</p></item></ulist></item><item><p>A string is converted to FULLY-NORMALIZED form as follows:</p><ulist><item><p>if the first character in the string is a composing character, prepend a\n                         single space (x20);</p></item><item><p>convert the resulting string to normalization form NFC.</p></item></ulist></item></ulist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" At="L">Conforming implementations <rfc2119>must</rfc2119> support normalization form "NFC" and\n                <rfc2119>may</rfc2119> support normalization forms "NFD", "NFKC", "NFKD", and\n             "FULLY-NORMALIZED". They <rfc2119>may</rfc2119> also support other normalization forms\n             with <termref def="implementation-defined">implementation-defined</termref> semantics. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="L">It is <termref def="dt-implementation-defined">implementation-defined</termref> which version of\n             Unicode (and therefore, of the normalization algorithms and their underlying\n             data) is supported by the implementation. See <bibref ref="Unicode-Normalization"/> for details of the\n             stability policy regarding changes to the normalization rules in future\n             versions of Unicode. If the input string contains codepoints that are\n             unassigned in the relevant version of Unicode, or for which no normalization\n             rules are defined, the <code>fn:normalize-unicode</code> function leaves such codepoints\n             unchanged. If the implementation supports the requested normalization form then\n             it <rfc2119>must</rfc2119> be able to handle every input string without raising an error.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="CH" code="0003"/> if the effective value of the\n                <code>$normalizationForm</code> argument is not one of the values supported by the\n             implementation.</p></div>\n',summary:"<p>  Returns the value of  $arg  after applying Unicode\n             normalization.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:""}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:2,name:"normalize-unicode",qname:"fn:normalize-unicode",signature:"($arg as xs:string?, $normalizationForm as xs:string) as xs:string external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the value of <code>$arg</code> after applying Unicode\n             normalization.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="normalize-unicode" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:string?"/></proto></example><example role="signature"><proto name="normalize-unicode" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:string?"/><arg name="normalizationForm" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$arg</code> is the empty sequence, the function returns the\n             zero-length string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the single-argument version of the function is used, the result is the same as\n             calling the two-argument version with <code>$normalizationForm</code> set to the string\n             "NFC".</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function returns the value of <code>$arg</code> normalized according to\n             the rules of the normalization form identified by the value of\n                <code>$normalizationForm</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The effective value of <code>$normalizationForm</code> is the value of the expression\n                <code>fn:upper-case(fn:normalize-space($normalizationForm))</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="del" at="D">See <bibref ref="charmod-normalization"/> for a description of the\n             normalization forms.</p><ulist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>If the effective value of <code>$normalizationForm</code> is <quote>NFC</quote>,\n                   then the function returns the value of <code>$arg</code> converted to Unicode\n                   Normalization Form C (NFC).</p></item><item><p>If the effective value of <code>$normalizationForm</code> is <quote>NFD</quote>,\n                   then the function returns the value of <code>$arg</code> converted to Unicode\n                   Normalization Form D (NFD).</p></item><item><p>If the effective value of <code>$normalizationForm</code> is <quote>NFKC</quote>,\n                   then the function returns the value of <code>$arg</code> in Unicode Normalization\n                   Form KC (NFKC).</p></item><item><p>If the effective value of <code>$normalizationForm</code> is <quote>NFKD</quote>,\n                   then the function returns the value of <code>$arg</code> converted to Unicode\n                   Normalization Form KD (NFKD).</p></item><item><p>If the effective value of <code>$normalizationForm</code> is\n                      <quote>FULLY-NORMALIZED</quote>, then the function returns the value of\n                      <code>$arg</code> converted to fully normalized form. </p></item><item><p>If the effective value of <code>$normalizationForm</code> is the zero-length\n                   string, no normalization is performed and <code>$arg</code> is returned.</p></item></ulist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="D">Normalization forms NFC, NFD, NFKC, and NFKD, and the algorithms to be\n             used for converting a string to each of these forms, are defined in <bibref ref="Unicode-Normalization"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="D">The motivation for normalization form FULLY-NORMALIZED is explained in\n                <bibref ref="charmod-normalization"/>. However, as that specification did not\n             progress beyond working draft status, the normative specification is as follows:</p><ulist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="D"><item><p>A string is <term>fully-normalized</term> if (a) it is in normalization form NFC\n                   as defined in <bibref ref="Unicode-Normalization"/>, and (b) it does not start\n                   with a composing character.</p></item><item><p>A composing character is a character that is one or both of the following:</p><ulist><item><p>the second character in the canonical decomposition mapping of some\n                         character that is not listed in the Composition Exclusion Table defined in\n                            <bibref ref="Unicode-Normalization"/>;</p></item><item><p>of non-zero canonical combining class (as defined in <bibref ref="Unicode"/>).</p></item></ulist></item><item><p>A string is converted to FULLY-NORMALIZED form as follows:</p><ulist><item><p>if the first character in the string is a composing character, prepend a\n                         single space (x20);</p></item><item><p>convert the resulting string to normalization form NFC.</p></item></ulist></item></ulist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" At="L">Conforming implementations <rfc2119>must</rfc2119> support normalization form "NFC" and\n                <rfc2119>may</rfc2119> support normalization forms "NFD", "NFKC", "NFKD", and\n             "FULLY-NORMALIZED". They <rfc2119>may</rfc2119> also support other normalization forms\n             with <termref def="implementation-defined">implementation-defined</termref> semantics. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="L">It is <termref def="dt-implementation-defined">implementation-defined</termref> which version of\n             Unicode (and therefore, of the normalization algorithms and their underlying\n             data) is supported by the implementation. See <bibref ref="Unicode-Normalization"/> for details of the\n             stability policy regarding changes to the normalization rules in future\n             versions of Unicode. If the input string contains codepoints that are\n             unassigned in the relevant version of Unicode, or for which no normalization\n             rules are defined, the <code>fn:normalize-unicode</code> function leaves such codepoints\n             unchanged. If the implementation supports the requested normalization form then\n             it <rfc2119>must</rfc2119> be able to handle every input string without raising an error.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="CH" code="0003"/> if the effective value of the\n                <code>$normalizationForm</code> argument is not one of the values supported by the\n             implementation.</p></div>\n',summary:"<p>  Returns the value of  $arg  after applying Unicode\n             normalization.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:""},{name:"normalizationForm",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:1,name:"not",qname:"fn:not",signature:"($arg as item()*) as xs:boolean external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns <code>true</code> if the effective boolean value of <code>$arg</code>\n             is <code>false</code>, or <code>false</code> if it is <code>true</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="not" return-type="xs:boolean" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="item()*"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The value of <code>$arg</code> is first reduced to an effective boolean value by\n             applying the <code>fn:boolean()</code> function. The function returns <code>true</code>\n             if the effective boolean value is <code>false</code>, or <code>false</code> if the\n             effective boolean value is <code>true</code>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:not(fn:true())</code> returns <code>false()</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:not("false")</code> returns <code>false()</code>.</p></div>\n',summary:"<p>  Returns  true  if the effective boolean value of  $arg \n             is  false , or  false  if it is  true .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"item()",occurrence:"*",description:""}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:0,name:"number",qname:"fn:number",signature:"() as xs:double external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the value indicated by <code>$arg</code> or, if <code>$arg</code> is\n             not specified, the context item after atomization, converted to an\n                <code>xs:double</code>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="number" return-type="xs:double" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example><example role="signature"><proto name="number" return-type="xs:double" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:anyAtomicType?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The zero-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-dependent">focus-dependent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Calling the zero-argument version of the function is defined to give the same result as\n             calling the single-argument version with the context item (<code>.</code>). That is,\n                <code>fn:number()</code> is equivalent to <code>fn:number(.)</code>, as\n          defined by the rules that follow.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence or if <code>$arg</code> <phrase diff="del" at="L">or the context item</phrase>\n             cannot be converted to an <code>xs:double</code>, the <code>xs:double</code> value\n                <code>NaN</code> is returned. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, <code>$arg</code> <phrase diff="del" at="L">, or the context item after atomization,</phrase> is converted to an\n                <code>xs:double</code> following the rules of <specref ref="casting-to-double"/>. If\n             the conversion to <code>xs:double</code> fails, the <code>xs:double</code> value\n                <code>NaN</code> is returned.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="M">dynamic</phrase> error is raised <xerrorref spec="XP" class="DY" code="0002" type="dynamic"/> if\n                <code>$arg</code> is omitted and the context item is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="L">As a consequence of the rules given above, a type error occurs if the context\n          item cannot be atomized, or if the result of atomizing the context item is a sequence containing\n          more than one atomic value.</p></div>\n',summary:"<p>  Returns the value indicated by  $arg  or, if  $arg  is\n             not specified, the context item after atomization, converted to an\n                 xs:double .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:double",description:""},errors:[]},{isDocumented:!0,arity:1,name:"number",qname:"fn:number",signature:"($arg as xs:anyAtomicType?) as xs:double external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the value indicated by <code>$arg</code> or, if <code>$arg</code> is\n             not specified, the context item after atomization, converted to an\n                <code>xs:double</code>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="number" return-type="xs:double" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example><example role="signature"><proto name="number" return-type="xs:double" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:anyAtomicType?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The zero-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-dependent">focus-dependent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Calling the zero-argument version of the function is defined to give the same result as\n             calling the single-argument version with the context item (<code>.</code>). That is,\n                <code>fn:number()</code> is equivalent to <code>fn:number(.)</code>, as\n          defined by the rules that follow.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence or if <code>$arg</code> <phrase diff="del" at="L">or the context item</phrase>\n             cannot be converted to an <code>xs:double</code>, the <code>xs:double</code> value\n                <code>NaN</code> is returned. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, <code>$arg</code> <phrase diff="del" at="L">, or the context item after atomization,</phrase> is converted to an\n                <code>xs:double</code> following the rules of <specref ref="casting-to-double"/>. If\n             the conversion to <code>xs:double</code> fails, the <code>xs:double</code> value\n                <code>NaN</code> is returned.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="M">dynamic</phrase> error is raised <xerrorref spec="XP" class="DY" code="0002" type="dynamic"/> if\n                <code>$arg</code> is omitted and the context item is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="L">As a consequence of the rules given above, a type error occurs if the context\n          item cannot be atomized, or if the result of atomizing the context item is a sequence containing\n          more than one atomic value.</p></div>\n',summary:"<p>  Returns the value indicated by  $arg  or, if  $arg  is\n             not specified, the context item after atomization, converted to an\n                 xs:double .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:anyAtomicType",occurrence:"?",description:""}],returns:{type:"xs:double",description:""},errors:[]},{isDocumented:!0,arity:1,name:"one-or-more",qname:"fn:one-or-more",signature:"($arg as item()*) as item()+ external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns <code>$arg</code> if it contains one or more items. Otherwise, raises\n             an error. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="one-or-more" return-type="item()+" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="item()*"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Except in error cases, the function returns <code>$arg</code> unchanged.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="del" at="F">For detailed type semantics, see [Formal Semantics].</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RG" code="0004"/> if <code>$arg</code> is an empty\n             sequence.</p></div>\n',summary:"<p>  Returns  $arg  if it contains one or more items.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"item()",occurrence:"*",description:""}],returns:{type:"item()+",description:""},errors:[]},{isDocumented:!0,arity:1,name:"outermost",qname:"fn:outermost",signature:"($nodes as node()*) as node()* external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns every node within the input sequence that has no ancestor that is itself a\n             member of the input sequence; the nodes are returned in document order with duplicates\n             eliminated.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="outermost" return-type="node()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="nodes" type="node()*"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The effect of the function call <code>fn:outermost($nodes)</code> is defined to be\n             equivalent to the result of the expression <code diff="chg" at="L">$nodes[not(ancestor::node() intersect\n                $nodes)]/.</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">That is, the function takes as input a sequence of nodes, and returns every node within\n             the sequence that <phrase diff="chg" at="J">does not have another node within the sequence as an ancestor</phrase>; the nodes are\n             returned in document order with duplicates eliminated.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The formulation <code>$nodes except $nodes/descendant::node()</code> might appear to be\n             simpler, but does not correctly account for attribute nodes, as these are not\n             descendants of their parent element.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The motivation for the function was based on XSLT streaming use cases. There are cases\n             where the <bibref ref="xslt-30"/> streaming rules allow the construct\n                <code>outermost(//section)</code> but do not allow <code>//section</code>; the\n             function can therefore be useful in cases where it is known that sections will not be\n             nested, as well as cases where the application actually wishes to process all sections\n             except those that are nested within another.</p></div>\n',summary:"<p>  Returns every node within the input sequence that has no ancestor that is itself a\n             member of the input sequence; the nodes are returned in document order with duplicates\n             eliminated.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"nodes",type:"node()",occurrence:"*",description:""}],returns:{type:"node()*",description:""},errors:[]},{isDocumented:!0,arity:1,name:"parse-xml-fragment",qname:"fn:parse-xml-fragment",signature:"($arg as xs:string?) as document(element(*,xs:untyped)) external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function takes as input an XML external entity represented as a string,\n             and returns the document node at the root of an XDM tree representing the parsed\n             document fragment.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="parse-xml-fragment" return-type="document-node()?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:string?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-nondeterministic">nondeterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		static base uri.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, the function returns the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The input must be a namespace-well-formed external general parsed entity. More specifically,\n             it must be a string conforming to the production rule <xnt xmlns:xlink="http://www.w3.org/1999/xlink" spec="xml" ref="NT-extParsedEnt" xlink:type="simple">extParsedEnt</xnt> in <bibref ref="REC-xml"/>, it must contain no entity references other\n             than references to predefined entities,\n             and it must satisfy all the rules\n             of <bibref ref="REC-xml-names"/> for namespace-well-formed documents with the exception\n             that the rule requiring it to be a well-formed document is replaced by the rule requiring\n             it to be a well-formed external general parsed entity.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The string is parsed to form a sequence of nodes which\n             become children of the new document node, in the same way as the content of any element\n             is converted into a sequence of children for the resulting element node.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Schema validation is <emph>not</emph> invoked, which means that the nodes in the\n             returned document will all be untyped.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The precise process used to construct the XDM instance is <termref def="implementation-defined"/>. In\n             particular, it is implementation-defined whether an XML 1.0 or XML 1.1 parser is\n             used.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="L">The Static Base URI from the static context of the <code>fn:parse-xml-fragment</code> function call\n             is used as the base URI of the document node\n             that is returned.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The document URI of the returned node is <termref def="absent">absent</termref>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function is <emph>not</emph>\n             <termref def="deterministic">deterministic</termref>: that is, if the function is called\n             twice with the same arguments, it is <termref def="implementation-dependent">implementation-dependent</termref> whether the same node is returned on both\n                occasions.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DC" code="0006"/> if the content of\n                <code>$arg</code> is not a well-formed external general parsed entity,\n             if it contains entity references other than references to predefined entities, or if a document that\n             incorporates this well-formed parsed entity would not be namespace-well-formed.</p></div>\n',summary:"<p>  This function takes as input an XML external entity represented as a string,\n             and returns the document node at the root of an XDM tree representing the parsed\n             document fragment.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:""}],returns:{type:"document(element(*,xs:untyped))",description:""},errors:[]},{isDocumented:!0,arity:1,name:"parse-xml",qname:"fn:parse-xml",signature:"($arg as xs:string?) as document(element(*,xs:untyped)) external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function takes as input an XML document represented as a string, and\n             returns the document node at the root of an XDM tree representing the parsed\n             document.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="parse-xml" return-type="document-node(element(*))?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:string?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-nondeterministic">nondeterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		static base uri.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="G">If <code>$arg</code> is the empty sequence, the function returns the\n             empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The precise process used to construct the XDM instance is <termref def="implementation-defined"/>. In\n             particular, it is implementation-defined whether DTD and/or schema validation is invoked, and it is\n             implementation-defined whether an XML 1.0 or XML 1.1 parser is used.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The Static Base URI property from the static context of the\n             <code>fn:parse-xml</code> function call is used both as the base URI used by the XML parser to resolve\n             relative entity references within the document, and as the base URI of the document node\n             that is returned.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The document URI of the returned node is <termref def="absent">absent</termref>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function is <emph>not</emph>\n             <termref def="deterministic">deterministic</termref>: that is, if the function is called\n             twice with the same arguments, it is <termref def="implementation-dependent">implementation-dependent</termref> whether the same node is returned on both\n             occasions.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DC" code="0006"/> if the content of\n                <code>$arg</code> is not a well-formed and namespace-well-formed XML document.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="G">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DC" code="0006"/> if DTD-based\n             validation is carried out and the content of <code>$arg</code> is not valid against its\n             DTD.</p></div>\n',summary:"<p>  This function takes as input an XML document represented as a string, and\n             returns the document node at the root of an XDM tree representing the parsed\n             document.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:""}],returns:{type:"document(element(*,xs:untyped))",description:""},errors:[]},{isDocumented:!0,arity:2,name:"parse-xml",qname:"fn:parse-xml",signature:"($arg as xs:string?, $baseURI as xs:string) as document(element(*,xs:untyped)) external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function takes as input an XML document represented as a string, and\n             returns the document node at the root of an XDM tree representing the parsed\n             document.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="parse-xml" return-type="document-node(element(*))?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:string?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-nondeterministic">nondeterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		static base uri.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="G">If <code>$arg</code> is the empty sequence, the function returns the\n             empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The precise process used to construct the XDM instance is <termref def="implementation-defined"/>. In\n             particular, it is implementation-defined whether DTD and/or schema validation is invoked, and it is\n             implementation-defined whether an XML 1.0 or XML 1.1 parser is used.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The Static Base URI property from the static context of the\n             <code>fn:parse-xml</code> function call is used both as the base URI used by the XML parser to resolve\n             relative entity references within the document, and as the base URI of the document node\n             that is returned.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The document URI of the returned node is <termref def="absent">absent</termref>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function is <emph>not</emph>\n             <termref def="deterministic">deterministic</termref>: that is, if the function is called\n             twice with the same arguments, it is <termref def="implementation-dependent">implementation-dependent</termref> whether the same node is returned on both\n             occasions.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DC" code="0006"/> if the content of\n                <code>$arg</code> is not a well-formed and namespace-well-formed XML document.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="G">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DC" code="0006"/> if DTD-based\n             validation is carried out and the content of <code>$arg</code> is not valid against its\n             DTD.</p></div>\n',summary:"<p>  This function takes as input an XML document represented as a string, and\n             returns the document node at the root of an XDM tree representing the parsed\n             document.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:""},{name:"baseURI",type:"xs:string",occurrence:null,description:""}],returns:{type:"document(element(*,xs:untyped))",description:""},errors:[]},{isDocumented:!0,arity:0,name:"position",qname:"fn:position",signature:"() as xs:integer external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the context position from the dynamic context.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="position" return-type="xs:integer" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-dependent">focus-dependent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the context position from the dynamic context. (See <xspecref spec="XP30" ref="id-xp-evaluation-context-components"/>.)</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="M">dynamic</phrase> error is raised <xerrorref spec="XP" class="DY" code="0002" type="type"/> if the\n             context item is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>.</p></div>\n',summary:"<p>  Returns the context position from the dynamic context.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:integer",description:""},errors:[]},{isDocumented:!0,arity:1,name:"prefix-from-QName",qname:"fn:prefix-from-QName",signature:"($arg as xs:QName?) as xs:NCName? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the prefix component of the supplied QName.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="prefix-from-QName" return-type="xs:NCName?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:QName?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence the function returns the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> has no prefix component the function returns the empty\n             sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function returns an <code>xs:NCName</code> representing the prefix\n             component of <code>$arg</code>.</p></div>\n',summary:"<p>  Returns the prefix component of the supplied QName.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:QName",occurrence:"?",description:""}],returns:{type:"xs:NCName?",description:""},errors:[]},{isDocumented:!0,arity:2,name:"remove",qname:"fn:remove",signature:"($target as item()*, $position as xs:integer) as item()* external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns a new sequence containing all the items of <code>$target</code> except\n             the item at position <code>$position</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="remove" return-type="item()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="target" type="item()*"/><arg name="position" type="xs:integer"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns a sequence consisting of all items of <code>$target</code> whose\n             index is less than <code>$position</code>, followed by all items of <code>$target</code>\n             whose index is greater than <code>$position</code>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="del" at="F">For detailed type semantics, see [Formal Semantics].</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$position</code> is less than 1 or greater than the number of items in\n                <code>$target</code>, <code>$target</code> is returned.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$target</code> is the empty sequence, the empty sequence is returned.</p></div>\n',summary:"<p>  Returns a new sequence containing all the items of  $target  except\n             the item at position  $position .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"target",type:"item()",occurrence:"*",description:""},{name:"position",type:"xs:integer",occurrence:null,description:""}],returns:{type:"item()*",description:""},errors:[]},{isDocumented:!0,arity:3,name:"replace",qname:"fn:replace",signature:"($input as xs:string?, $pattern as xs:string, $replacement as xs:string) as xs:string external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns a string produced from the input string by replacing any substrings\n             that match a given regular expression with a supplied replacement string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="replace" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="input" type="xs:string?"/><arg name="pattern" type="xs:string"/><arg name="replacement" type="xs:string"/></proto></example><example role="signature"><proto name="replace" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="input" type="xs:string?"/><arg name="pattern" type="xs:string"/><arg name="replacement" type="xs:string"/><arg name="flags" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The effect of calling the first version of this function (omitting the argument\n                <code>$flags</code>) is the same as the effect of calling the second version with the\n                <code>$flags</code> argument set to a zero-length string. Flags are defined in\n                <specref ref="flags"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The <code>$flags</code> argument is interpreted in the same manner as for the\n                <code>fn:matches</code> function. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$input</code> is the empty sequence, it is interpreted as the zero-length\n             string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns the <code>xs:string</code> that is obtained by replacing each\n             non-overlapping substring of <code>$input</code> that matches the given\n                <code>$pattern</code> with an occurrence of the <code>$replacement</code> string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If two overlapping substrings of <code>$input</code> both match the\n                <code>$pattern</code>, then only the first one (that is, the one whose first <termref def="character">character</termref> comes first in the <code>$input</code> string) is\n             replaced.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="B">If the <code>q</code> flag is present, the replacement string is used\n                <emph>as is</emph>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><phrase diff="add" at="B">Otherwise,</phrase> within the <code>$replacement</code>\n             string, a variable <code>$N</code> may be used to refer to the substring captured by the\n             Nth parenthesized sub-expression in the regular expression. For each match of the\n             pattern, these variables are assigned the value of the content matched by the relevant\n             sub-expression, and the modified replacement string is then substituted for the <termref def="character">characters</termref> in <code>$input</code> that matched the pattern.\n                <code>$0</code> refers to the substring captured by the regular expression as a\n             whole.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">More specifically, the rules are as follows, where <code>S</code> is the number of\n             parenthesized sub-expressions in the regular expression, and <code>N</code> is the\n             decimal number formed by taking all the digits that consecutively follow the\n                <code>$</code> character:</p><olist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>If <code>N</code>=<code>0</code>, then the variable is replaced by the substring\n                   matched by the regular expression as a whole.</p></item><item><p>If <code>1</code>&lt;=<code>N</code>&lt;=<code>S</code>, then the variable is\n                   replaced by the substring captured by the Nth parenthesized sub-expression. If the\n                      <code>Nth</code> parenthesized sub-expression was not matched, then the\n                   variable is replaced by the zero-length string.</p></item><item><p>If <code>S</code>&lt;<code>N</code>&lt;=<code>9</code>, then the variable is\n                   replaced by the zero-length string.</p></item><item><p>Otherwise (if <code>N</code>&gt;<code>S</code> and\n                      <code>N</code>&gt;<code>9</code>), the last digit of <code>N</code> is taken to\n                   be a literal character to be included "as is" in the replacement string, and the\n                   rules are reapplied using the number <code>N</code> formed by stripping off this\n                   last digit.</p></item></olist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">For example, if the replacement string is <quote>\n                <code>$23</code>\n             </quote> and there are 5 substrings, the result contains the value of the substring that\n             matches the second sub-expression, followed by the digit <quote>\n                <code>3</code>\n             </quote>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="B">Unless the <code>q</code> flag is used, a literal <code>$</code>\n             character within the replacement string must be written as <code>\\$</code>, and a\n             literal <code>\\</code> character must be written as <code>\\\\</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If two alternatives within the pattern both match at the same position in the\n                <code>$input</code>, then the match that is chosen is the one matched by the first\n             alternative. For example:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve"> fn:replace("abcd", "(ab)|(a)", "[1=$1][2=$2]") returns "[1=ab][2=]cd"</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0002"/> if the value of\n                <code>$pattern</code> is invalid according to the rules described in section <specref ref="regex-syntax"/>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0001"/> if the value of\n                <code>$flags</code> is invalid according to the rules described in section <specref ref="regex-syntax"/>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0003"/> if the pattern matches a\n             zero-length string, that is, if the expression <code>fn:matches("", $pattern,\n                $flags)</code> returns <code>true</code>. It is not an error, however, if a captured\n             substring is zero-length.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0004"/> if the value of\n                <code>$replacement</code> contains a "<code>$</code>" character that is not\n             immediately followed by a digit <code>0-9</code> and not immediately preceded by a\n             "\\".</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0004"/> if the value of\n                <code>$replacement</code> contains a "<code>\\</code>" character that is not part of a\n                "<code>\\\\</code>" pair, unless it is immediately followed by a "<code>$</code>"\n             character.</p></div>\n',summary:"<p>  Returns a string produced from the input string by replacing any substrings\n             that match a given regular expression with a supplied replacement string.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"input",type:"xs:string",occurrence:"?",description:""},{name:"pattern",type:"xs:string",occurrence:null,description:""},{name:"replacement",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:4,name:"replace",qname:"fn:replace",signature:"($input as xs:string?, $pattern as xs:string, $replacement as xs:string, $flags as xs:string) as xs:string external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns a string produced from the input string by replacing any substrings\n             that match a given regular expression with a supplied replacement string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="replace" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="input" type="xs:string?"/><arg name="pattern" type="xs:string"/><arg name="replacement" type="xs:string"/></proto></example><example role="signature"><proto name="replace" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="input" type="xs:string?"/><arg name="pattern" type="xs:string"/><arg name="replacement" type="xs:string"/><arg name="flags" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The effect of calling the first version of this function (omitting the argument\n                <code>$flags</code>) is the same as the effect of calling the second version with the\n                <code>$flags</code> argument set to a zero-length string. Flags are defined in\n                <specref ref="flags"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The <code>$flags</code> argument is interpreted in the same manner as for the\n                <code>fn:matches</code> function. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$input</code> is the empty sequence, it is interpreted as the zero-length\n             string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns the <code>xs:string</code> that is obtained by replacing each\n             non-overlapping substring of <code>$input</code> that matches the given\n                <code>$pattern</code> with an occurrence of the <code>$replacement</code> string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If two overlapping substrings of <code>$input</code> both match the\n                <code>$pattern</code>, then only the first one (that is, the one whose first <termref def="character">character</termref> comes first in the <code>$input</code> string) is\n             replaced.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="B">If the <code>q</code> flag is present, the replacement string is used\n                <emph>as is</emph>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><phrase diff="add" at="B">Otherwise,</phrase> within the <code>$replacement</code>\n             string, a variable <code>$N</code> may be used to refer to the substring captured by the\n             Nth parenthesized sub-expression in the regular expression. For each match of the\n             pattern, these variables are assigned the value of the content matched by the relevant\n             sub-expression, and the modified replacement string is then substituted for the <termref def="character">characters</termref> in <code>$input</code> that matched the pattern.\n                <code>$0</code> refers to the substring captured by the regular expression as a\n             whole.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">More specifically, the rules are as follows, where <code>S</code> is the number of\n             parenthesized sub-expressions in the regular expression, and <code>N</code> is the\n             decimal number formed by taking all the digits that consecutively follow the\n                <code>$</code> character:</p><olist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>If <code>N</code>=<code>0</code>, then the variable is replaced by the substring\n                   matched by the regular expression as a whole.</p></item><item><p>If <code>1</code>&lt;=<code>N</code>&lt;=<code>S</code>, then the variable is\n                   replaced by the substring captured by the Nth parenthesized sub-expression. If the\n                      <code>Nth</code> parenthesized sub-expression was not matched, then the\n                   variable is replaced by the zero-length string.</p></item><item><p>If <code>S</code>&lt;<code>N</code>&lt;=<code>9</code>, then the variable is\n                   replaced by the zero-length string.</p></item><item><p>Otherwise (if <code>N</code>&gt;<code>S</code> and\n                      <code>N</code>&gt;<code>9</code>), the last digit of <code>N</code> is taken to\n                   be a literal character to be included "as is" in the replacement string, and the\n                   rules are reapplied using the number <code>N</code> formed by stripping off this\n                   last digit.</p></item></olist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">For example, if the replacement string is <quote>\n                <code>$23</code>\n             </quote> and there are 5 substrings, the result contains the value of the substring that\n             matches the second sub-expression, followed by the digit <quote>\n                <code>3</code>\n             </quote>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="B">Unless the <code>q</code> flag is used, a literal <code>$</code>\n             character within the replacement string must be written as <code>\\$</code>, and a\n             literal <code>\\</code> character must be written as <code>\\\\</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If two alternatives within the pattern both match at the same position in the\n                <code>$input</code>, then the match that is chosen is the one matched by the first\n             alternative. For example:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve"> fn:replace("abcd", "(ab)|(a)", "[1=$1][2=$2]") returns "[1=ab][2=]cd"</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0002"/> if the value of\n                <code>$pattern</code> is invalid according to the rules described in section <specref ref="regex-syntax"/>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0001"/> if the value of\n                <code>$flags</code> is invalid according to the rules described in section <specref ref="regex-syntax"/>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0003"/> if the pattern matches a\n             zero-length string, that is, if the expression <code>fn:matches("", $pattern,\n                $flags)</code> returns <code>true</code>. It is not an error, however, if a captured\n             substring is zero-length.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0004"/> if the value of\n                <code>$replacement</code> contains a "<code>$</code>" character that is not\n             immediately followed by a digit <code>0-9</code> and not immediately preceded by a\n             "\\".</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0004"/> if the value of\n                <code>$replacement</code> contains a "<code>\\</code>" character that is not part of a\n                "<code>\\\\</code>" pair, unless it is immediately followed by a "<code>$</code>"\n             character.</p></div>\n',summary:"<p>  Returns a string produced from the input string by replacing any substrings\n             that match a given regular expression with a supplied replacement string.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"input",type:"xs:string",occurrence:"?",description:""},{name:"pattern",type:"xs:string",occurrence:null,description:""},{name:"replacement",type:"xs:string",occurrence:null,description:""},{name:"flags",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:2,name:"resolve-QName",qname:"fn:resolve-QName",signature:"($qname as xs:string?, $element as element(*)) as xs:QName? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns an <code>xs:QName</code> value (that is, an expanded-QName) by taking\n             an <code>xs:string</code> that has the lexical form of an <code>xs:QName</code> (a\n             string in the form "prefix:local-name" or "local-name") and resolving it using the\n             in-scope namespaces for a given element.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="resolve-QName" return-type="xs:QName?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="qname" type="xs:string?"/><arg name="element" type="element()"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$qname</code> is the empty sequence, returns the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">More specifically, the function searches the namespace bindings of <code>$element</code>\n             for a binding whose name matches the prefix of <code>$qname</code>, or the zero-length\n             string if it has no prefix, and constructs an expanded-QName whose local name is taken\n             from the supplied <code>$qname</code>, and whose namespace URI is taken from the string\n             value of the namespace binding.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the <code>$qname</code> has no prefix, and there is no namespace binding for\n                <code>$element</code> corresponding to the default (unnamed) namespace, then the\n             resulting expanded-QName has no namespace part.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The prefix (or absence of a prefix) in the supplied <code>$qname</code> argument is\n             retained in the returned expanded-QName, as discussed in <xspecref spec="DM30" ref="terminology"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="CA" code="0002"/> if <code>$qname</code> does not\n             have the correct lexical form for an instance of <code>xs:QName</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="NS" code="0004"/> if <code>$qname</code> has a\n             prefix and there is no namespace binding for <code>$element</code> that matches this\n             prefix.</p></div>\n',summary:'<p>  Returns an  xs:QName  value (that is, an expanded-QName) by taking\n             an  xs:string  that has the lexical form of an  xs:QName  (a\n             string in the form "prefix:local-name" or "local-name") and resolving it using the\n             in-scope namespaces for a given element.</p>',annotation_str:"",annotations:[],updating:!1,parameters:[{name:"qname",type:"xs:string",occurrence:"?",description:""},{name:"element",type:"element(*)",occurrence:null,description:""}],returns:{type:"xs:QName?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"resolve-uri",qname:"fn:resolve-uri",signature:"($relative as xs:string?) as xs:anyURI? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Resolves a relative IRI reference against an absolute IRI.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="resolve-uri" return-type="xs:anyURI?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="relative" type="xs:string?"/></proto></example><example role="signature"><proto name="resolve-uri" return-type="xs:anyURI?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="relative" type="xs:string?"/><arg name="base" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		static base uri.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the second argument is absent, the effect is the same as calling the two-argument\n             function with the value of <code>fn:static-base-uri()</code> as the second argument.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function is defined to operate on IRI references as defined in <bibref ref="rfc3987"/>, and the implementation <rfc2119>must</rfc2119> permit all arguments that are valid\n             according to that specification. In addition, the implementation <rfc2119>may</rfc2119>\n             accept some or all strings that conform to the rules for (absolute or relative) Legacy\n             Extended IRI references as defined in <bibref ref="LEIRI"/>. For the purposes of this\n             section, the terms IRI and IRI reference include these extensions, insofar as the\n             implementation chooses to support them.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$relative</code> is the empty sequence, the function returns the empty\n             sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$relative</code> is an absolute IRI (as defined above), then it is returned\n             unchanged.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function resolves the relative IRI reference <code>$relative</code>\n             against the base IRI <code>$base</code> using the algorithm defined in <bibref ref="rfc3986"/>, adapted by treating any <termref def="character">character</termref>\n             that would not be valid in an RFC3986 URI or relative reference in the same way that\n             RFC3986 treats unreserved characters. No percent-encoding takes place.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The first form of this function resolves <code>$relative</code> against the value of the\n             base-uri property from the static context. A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="NS" code="0005"/> if the base-uri property is not initialized in the static context. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RG" code="0002"/> if <code>$relative</code> is not a\n             valid IRI according to the rules of RFC3987, extended with an implementation-defined\n             subset of the extensions permitted in LEIRI, or if it is not a suitable relative\n             reference to use as input to the RFC3986 resolution algorithm extended to handle\n             additional unreserved characters. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RG" code="0002"/> if <code>$base</code> is not a\n             valid IRI according to the rules of RFC3987, extended with an implementation-defined\n             subset of the extensions permitted in LEIRI, or if it is not a suitable IRI to use as\n             input to the chosen resolution algorithm (for example, if it is a relative IRI\n             reference, if it is a non-hierarchic URI, or if it contains a fragment identifier). </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RG" code="0009"/> if the chosen resolution algorithm\n             fails for any other reason. </p></div>\n',summary:"<p>  Resolves a relative IRI reference against an absolute IRI.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"relative",type:"xs:string",occurrence:"?",description:""}],returns:{type:"xs:anyURI?",description:""},errors:[]},{isDocumented:!0,arity:2,name:"resolve-uri",qname:"fn:resolve-uri",signature:"($relative as xs:string?, $base as xs:string) as xs:anyURI? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Resolves a relative IRI reference against an absolute IRI.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="resolve-uri" return-type="xs:anyURI?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="relative" type="xs:string?"/></proto></example><example role="signature"><proto name="resolve-uri" return-type="xs:anyURI?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="relative" type="xs:string?"/><arg name="base" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		static base uri.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the second argument is absent, the effect is the same as calling the two-argument\n             function with the value of <code>fn:static-base-uri()</code> as the second argument.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function is defined to operate on IRI references as defined in <bibref ref="rfc3987"/>, and the implementation <rfc2119>must</rfc2119> permit all arguments that are valid\n             according to that specification. In addition, the implementation <rfc2119>may</rfc2119>\n             accept some or all strings that conform to the rules for (absolute or relative) Legacy\n             Extended IRI references as defined in <bibref ref="LEIRI"/>. For the purposes of this\n             section, the terms IRI and IRI reference include these extensions, insofar as the\n             implementation chooses to support them.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$relative</code> is the empty sequence, the function returns the empty\n             sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$relative</code> is an absolute IRI (as defined above), then it is returned\n             unchanged.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function resolves the relative IRI reference <code>$relative</code>\n             against the base IRI <code>$base</code> using the algorithm defined in <bibref ref="rfc3986"/>, adapted by treating any <termref def="character">character</termref>\n             that would not be valid in an RFC3986 URI or relative reference in the same way that\n             RFC3986 treats unreserved characters. No percent-encoding takes place.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The first form of this function resolves <code>$relative</code> against the value of the\n             base-uri property from the static context. A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="NS" code="0005"/> if the base-uri property is not initialized in the static context. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RG" code="0002"/> if <code>$relative</code> is not a\n             valid IRI according to the rules of RFC3987, extended with an implementation-defined\n             subset of the extensions permitted in LEIRI, or if it is not a suitable relative\n             reference to use as input to the RFC3986 resolution algorithm extended to handle\n             additional unreserved characters. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RG" code="0002"/> if <code>$base</code> is not a\n             valid IRI according to the rules of RFC3987, extended with an implementation-defined\n             subset of the extensions permitted in LEIRI, or if it is not a suitable IRI to use as\n             input to the chosen resolution algorithm (for example, if it is a relative IRI\n             reference, if it is a non-hierarchic URI, or if it contains a fragment identifier). </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RG" code="0009"/> if the chosen resolution algorithm\n             fails for any other reason. </p></div>\n',summary:"<p>  Resolves a relative IRI reference against an absolute IRI.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"relative",type:"xs:string",occurrence:"?",description:""},{name:"base",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:anyURI?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"reverse",qname:"fn:reverse",signature:"($arg as item()*) as item()* external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Reverses the order of items in a sequence. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="reverse" return-type="item()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="item()*"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns a sequence containing the items in <code>$arg</code> in reverse\n             order.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="del" at="F">For detailed type semantics, see [Formal Semantics].</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, the empty sequence is returned. </p></div>\n',summary:"<p>  Reverses the order of items in a sequence.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"item()",occurrence:"*",description:""}],returns:{type:"item()*",description:""},errors:[]},{isDocumented:!0,arity:0,name:"root",qname:"fn:root",signature:"() as node() external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the root of the tree to which <code>$arg</code> belongs. This will\n             usually, but not necessarily, be a document node.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="root" return-type="node()" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example><example role="signature"><proto name="root" return-type="node()?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="node()?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The zero-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-dependent">focus-dependent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the function is called without an argument, the context item (<code>.</code>) is used\n             as the default argument. The behavior of the function if the argument is omitted is\n             exactly the same as if the context item had been passed as the argument.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns the value of the expression\n                <code>($arg/ancestor-or-self::node())[1]</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The following errors may be raised when <code>$arg</code> is omitted:</p><ul xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><li><p>If the context\n                item is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>, <phrase diff="add" at="M">dynamic error</phrase>\n                <xerrorref spec="XP" class="DY" code="0002" type="dynamic"/></p></li><li><p>If the context item is not a\n                node, <phrase diff="add" at="M">type error</phrase> <xerrorref spec="XP" class="TY" code="0004" type="type"/>.</p></li></ul></div>\n',summary:"<p>  Returns the root of the tree to which  $arg  belongs.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"node()",description:""},errors:[]},{isDocumented:!0,arity:1,name:"root",qname:"fn:root",signature:"($arg as node()?) as node()? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the root of the tree to which <code>$arg</code> belongs. This will\n             usually, but not necessarily, be a document node.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="root" return-type="node()" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example><example role="signature"><proto name="root" return-type="node()?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="node()?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The zero-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-dependent">focus-dependent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the function is called without an argument, the context item (<code>.</code>) is used\n             as the default argument. The behavior of the function if the argument is omitted is\n             exactly the same as if the context item had been passed as the argument.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns the value of the expression\n                <code>($arg/ancestor-or-self::node())[1]</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The following errors may be raised when <code>$arg</code> is omitted:</p><ul xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><li><p>If the context\n                item is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>, <phrase diff="add" at="M">dynamic error</phrase>\n                <xerrorref spec="XP" class="DY" code="0002" type="dynamic"/></p></li><li><p>If the context item is not a\n                node, <phrase diff="add" at="M">type error</phrase> <xerrorref spec="XP" class="TY" code="0004" type="type"/>.</p></li></ul></div>\n',summary:"<p>  Returns the root of the tree to which  $arg  belongs.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"node()",occurrence:"?",description:""}],returns:{type:"node()?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"round-half-to-even",qname:"fn:round-half-to-even",signature:"($arg as numeric?) as numeric? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Rounds a value to a specified number of decimal places, rounding to make the\n             last digit even if two such values are equally near.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="round-half-to-even" return-type="numeric?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="numeric?"/></proto></example><example role="signature"><proto name="round-half-to-even" return-type="numeric?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="numeric?"/><arg name="precision" type="xs:integer"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">General rules: see <specref ref="numeric-value-functions"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns the nearest (that is, numerically closest) value to\n                <code>$arg</code> that is a multiple of ten to the power of minus\n                <code>$precision</code>. If two such values are equally near (e.g. if the fractional\n             part in <code>$arg</code> is exactly .500...), the function returns the one whose least\n             significant digit is even.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the type of <code>$arg</code> is one of the four numeric types <code>xs:float</code>,\n                <code>xs:double</code>, <code>xs:decimal</code> or <code>xs:integer</code> the type\n             of the result is the same as the type of <code>$arg</code>. If the type of\n                <code>$arg</code> is a type derived from one of the numeric types, the result is an\n             instance of the base numeric type.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> The first signature of this function produces the same result as the second signature\n             with <code>$precision=0</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">For arguments of type <code>xs:float</code> and <code>xs:double</code>:</p><olist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>If the argument is <code>NaN</code>, positive or negative zero, or positive or\n                   negative infinity, then the result is the same as the argument.</p></item><item><p>In all other cases, the argument is cast to <code>xs:decimal</code>\n                   <phrase diff="add" at="A">using an implementation of xs:decimal that imposes no\n                      limits on the number of digits that can be represented.</phrase> The function\n                   is applied to this <code>xs:decimal</code> value, and the resulting\n                      <code>xs:decimal</code> is cast back to <code>xs:float</code> or\n                      <code>xs:double</code> as appropriate to form the function result. If the\n                   resulting <code>xs:decimal</code> value is zero, then positive or negative zero is\n                   returned according to the sign of the original argument.</p></item></olist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="del" at="F">For detailed type semantics, see [Formal Semantics].</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="A">This function is typically used in financial applications where the\n             argument is of type <code>xs:decimal</code>. For arguments of type <code>xs:float</code>\n             and <code>xs:double</code> the results may be counter-intuitive. For example, consider\n                <code>round-half-to-even(xs:float(150.015), 2)</code>. The result is not 150.02 as\n             might be expected, but 150.01. This is because the conversion of the\n                <code>xs:float</code> value represented by the literal 150.015 to an\n                <code>xs:decimal</code> produces the <code>xs:decimal</code> value 150.014999389...,\n             which is closer to 150.01 than to 150.02.</p></div>\n',summary:"<p>  Rounds a value to a specified number of decimal places, rounding to make the\n             last digit even if two such values are equally near.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"numeric",occurrence:"?",description:""}],returns:{type:"numeric?",description:""},errors:[]},{isDocumented:!0,arity:2,name:"round-half-to-even",qname:"fn:round-half-to-even",signature:"($arg as numeric?, $precision as xs:integer) as numeric? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Rounds a value to a specified number of decimal places, rounding to make the\n             last digit even if two such values are equally near.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="round-half-to-even" return-type="numeric?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="numeric?"/></proto></example><example role="signature"><proto name="round-half-to-even" return-type="numeric?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="numeric?"/><arg name="precision" type="xs:integer"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">General rules: see <specref ref="numeric-value-functions"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns the nearest (that is, numerically closest) value to\n                <code>$arg</code> that is a multiple of ten to the power of minus\n                <code>$precision</code>. If two such values are equally near (e.g. if the fractional\n             part in <code>$arg</code> is exactly .500...), the function returns the one whose least\n             significant digit is even.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the type of <code>$arg</code> is one of the four numeric types <code>xs:float</code>,\n                <code>xs:double</code>, <code>xs:decimal</code> or <code>xs:integer</code> the type\n             of the result is the same as the type of <code>$arg</code>. If the type of\n                <code>$arg</code> is a type derived from one of the numeric types, the result is an\n             instance of the base numeric type.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> The first signature of this function produces the same result as the second signature\n             with <code>$precision=0</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">For arguments of type <code>xs:float</code> and <code>xs:double</code>:</p><olist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>If the argument is <code>NaN</code>, positive or negative zero, or positive or\n                   negative infinity, then the result is the same as the argument.</p></item><item><p>In all other cases, the argument is cast to <code>xs:decimal</code>\n                   <phrase diff="add" at="A">using an implementation of xs:decimal that imposes no\n                      limits on the number of digits that can be represented.</phrase> The function\n                   is applied to this <code>xs:decimal</code> value, and the resulting\n                      <code>xs:decimal</code> is cast back to <code>xs:float</code> or\n                      <code>xs:double</code> as appropriate to form the function result. If the\n                   resulting <code>xs:decimal</code> value is zero, then positive or negative zero is\n                   returned according to the sign of the original argument.</p></item></olist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="del" at="F">For detailed type semantics, see [Formal Semantics].</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="A">This function is typically used in financial applications where the\n             argument is of type <code>xs:decimal</code>. For arguments of type <code>xs:float</code>\n             and <code>xs:double</code> the results may be counter-intuitive. For example, consider\n                <code>round-half-to-even(xs:float(150.015), 2)</code>. The result is not 150.02 as\n             might be expected, but 150.01. This is because the conversion of the\n                <code>xs:float</code> value represented by the literal 150.015 to an\n                <code>xs:decimal</code> produces the <code>xs:decimal</code> value 150.014999389...,\n             which is closer to 150.01 than to 150.02.</p></div>\n',summary:"<p>  Rounds a value to a specified number of decimal places, rounding to make the\n             last digit even if two such values are equally near.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"numeric",occurrence:"?",description:""},{name:"precision",type:"xs:integer",occurrence:null,description:""}],returns:{type:"numeric?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"round",qname:"fn:round",signature:"($arg as numeric?) as numeric? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Rounds a value to a specified number of decimal places, rounding upwards if two\n             such values are equally near.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="round" return-type="numeric?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="numeric?"/></proto></example><example role="signature"><proto name="round" return-type="numeric?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="numeric?"/><arg name="precision" type="xs:integer"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">General rules: see <specref ref="numeric-value-functions"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns the nearest (that is, numerically closest) value to\n                <code>$arg</code> that is a multiple of ten to the power of minus\n                <code>$precision</code>. If two such values are equally near (for example, if the\n             fractional part in <code>$arg</code> is exactly .5), the function returns the one that\n             is closest to positive infinity.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the type of <code>$arg</code> is one of the four numeric types <code>xs:float</code>,\n                <code>xs:double</code>, <code>xs:decimal</code> or <code>xs:integer</code> the type\n             of the result is the same as the type of <code>$arg</code>. If the type of\n                <code>$arg</code> is a type derived from one of the numeric types, the result is an\n             instance of the base numeric type.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The single-argument version of this function produces the same result as the\n             two-argument version with <code>$precision=0</code> (that is, it rounds to a whole\n             number).</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">When <code>$arg</code> is of type <code>xs:float</code> and <code>xs:double</code>:</p><olist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>If <code>$arg</code> is NaN, positive or negative zero, or positive or negative\n                   infinity, then the result is the same as the argument.</p></item><item><p>For other values, the argument is cast to <code>xs:decimal</code> using an\n                   implementation of <code>xs:decimal</code> that imposes no limits on the number of\n                   digits that can be represented. The function is applied to this\n                      <code>xs:decimal</code> value, and the resulting <code>xs:decimal</code> is\n                   cast back to <code>xs:float</code> or <code>xs:double</code> as appropriate to\n                   form the function result. If the resulting <code>xs:decimal</code> value is zero,\n                   then positive or negative zero is returned according to the sign of\n                      <code>$arg</code>.</p></item></olist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="del" at="F">For detailed type semantics, see [Formal Semantics].</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is typically used with a non-zero <code>$precision</code> in financial\n             applications where the argument is of type <code>xs:decimal</code>. For arguments of\n             type <code>xs:float</code> and <code>xs:double</code> the results may be\n             counter-intuitive. For example, consider <code>round(35.425e0, 2)</code>. The result is\n             not 35.43, as might be expected, but 35.42. This is because the <code>xs:double</code> written as 35.425e0\n             has an exact value equal to 35.42499999999..., which is closer\n             to 35.42 than to 35.43.</p></div>\n',summary:"<p>  Rounds a value to a specified number of decimal places, rounding upwards if two\n             such values are equally near.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"numeric",occurrence:"?",description:""}],returns:{type:"numeric?",description:""},errors:[]},{isDocumented:!0,arity:2,name:"round",qname:"fn:round",signature:"($arg as numeric?, $precision as xs:integer) as numeric? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Rounds a value to a specified number of decimal places, rounding upwards if two\n             such values are equally near.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="round" return-type="numeric?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="numeric?"/></proto></example><example role="signature"><proto name="round" return-type="numeric?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="numeric?"/><arg name="precision" type="xs:integer"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">General rules: see <specref ref="numeric-value-functions"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns the nearest (that is, numerically closest) value to\n                <code>$arg</code> that is a multiple of ten to the power of minus\n                <code>$precision</code>. If two such values are equally near (for example, if the\n             fractional part in <code>$arg</code> is exactly .5), the function returns the one that\n             is closest to positive infinity.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the type of <code>$arg</code> is one of the four numeric types <code>xs:float</code>,\n                <code>xs:double</code>, <code>xs:decimal</code> or <code>xs:integer</code> the type\n             of the result is the same as the type of <code>$arg</code>. If the type of\n                <code>$arg</code> is a type derived from one of the numeric types, the result is an\n             instance of the base numeric type.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The single-argument version of this function produces the same result as the\n             two-argument version with <code>$precision=0</code> (that is, it rounds to a whole\n             number).</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">When <code>$arg</code> is of type <code>xs:float</code> and <code>xs:double</code>:</p><olist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>If <code>$arg</code> is NaN, positive or negative zero, or positive or negative\n                   infinity, then the result is the same as the argument.</p></item><item><p>For other values, the argument is cast to <code>xs:decimal</code> using an\n                   implementation of <code>xs:decimal</code> that imposes no limits on the number of\n                   digits that can be represented. The function is applied to this\n                      <code>xs:decimal</code> value, and the resulting <code>xs:decimal</code> is\n                   cast back to <code>xs:float</code> or <code>xs:double</code> as appropriate to\n                   form the function result. If the resulting <code>xs:decimal</code> value is zero,\n                   then positive or negative zero is returned according to the sign of\n                      <code>$arg</code>.</p></item></olist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="del" at="F">For detailed type semantics, see [Formal Semantics].</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is typically used with a non-zero <code>$precision</code> in financial\n             applications where the argument is of type <code>xs:decimal</code>. For arguments of\n             type <code>xs:float</code> and <code>xs:double</code> the results may be\n             counter-intuitive. For example, consider <code>round(35.425e0, 2)</code>. The result is\n             not 35.43, as might be expected, but 35.42. This is because the <code>xs:double</code> written as 35.425e0\n             has an exact value equal to 35.42499999999..., which is closer\n             to 35.42 than to 35.43.</p></div>\n',summary:"<p>  Rounds a value to a specified number of decimal places, rounding upwards if two\n             such values are equally near.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"numeric",occurrence:"?",description:""},{name:"precision",type:"xs:integer",occurrence:null,description:""}],returns:{type:"numeric?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"seconds-from-dateTime",qname:"fn:seconds-from-dateTime",signature:"($arg as xs:dateTime?) as xs:decimal? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the seconds component of an <code>xs:dateTime</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="seconds-from-dateTime" return-type="xs:decimal?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:dateTime?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, the function returns the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function returns an <code>xs:decimal</code> value greater than or equal\n             to zero and less than 60, representing the seconds and fractional seconds in the local\n             value of <code>$arg</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:seconds-from-dateTime(xs:dateTime("1999-05-31T13:20:00-05:00"))</code> returns <code>0</code>.</p></div>\n',summary:"<p>  Returns the seconds component of an  xs:dateTime .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:dateTime",occurrence:"?",description:""}],returns:{type:"xs:decimal?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"seconds-from-duration",qname:"fn:seconds-from-duration",signature:"($arg as xs:duration?) as xs:decimal? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the number of seconds in a duration.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="seconds-from-duration" return-type="xs:decimal?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:duration?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, the function returns the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function returns an <code>xs:decimal</code> representing the seconds\n             component in the value of <code>$arg</code>. The result is obtained by casting\n                <code>$arg</code> to an <code>xs:dayTimeDuration</code> (see <specref ref="casting-to-durations"/>) and then computing the seconds component as described\n             in <specref ref="canonical-dayTimeDuration"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is a negative duration then the result will be negative..</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is an <code>xs:yearMonthDuration</code> the function returns 0.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:seconds-from-duration(xs:dayTimeDuration("P3DT10H12.5S"))</code> returns <code>12.5</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:seconds-from-duration(xs:dayTimeDuration("-PT256S"))</code> returns <code>-16.0</code>.</p></div>\n',summary:"<p>  Returns the number of seconds in a duration.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:duration",occurrence:"?",description:""}],returns:{type:"xs:decimal?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"seconds-from-time",qname:"fn:seconds-from-time",signature:"($arg as xs:time?) as xs:decimal? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the seconds component of an <code>xs:time</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="seconds-from-time" return-type="xs:decimal?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:time?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, the function returns the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function returns an <code>xs:decimal</code> value greater than or equal\n             to zero and less than 60, representing the seconds and fractional seconds in the local\n             value of <code>$arg</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:seconds-from-time(xs:time("13:20:10.5"))</code> returns <code>10.5</code>.</p></div>\n',summary:"<p>  Returns the seconds component of an  xs:time .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:time",occurrence:"?",description:""}],returns:{type:"xs:decimal?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"serialize",qname:"fn:serialize",signature:"($arg as item()*) as xs:string external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function serializes the supplied <phrase diff="chg" at="G">input\n                sequence</phrase>\n             <code>$arg</code> as described in <bibref ref="xslt-xquery-serialization-30"/>,\n             returning the serialized <phrase diff="chg" at="G">representation of the\n                sequence</phrase> as a string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="serialize" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="item()*"/></proto></example><example role="signature"><proto name="serialize" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="item()*"/><arg name="params" type="element(output:serialization-parameters)?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The value of <code>$arg</code> acts as the input sequence to the serialization process,\n             which starts with sequence normalization.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="G">The single-argument version of this function has the same effect as\n             the two-argument version called with <code>$params</code> set to an empty sequence. This\n             in turn is the same as the effect of passing an\n                <code>output:serialization-parameters</code> element with no child elements.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="G">The <code>$params</code> argument is used to identify a set of\n             serialization parameters. These are supplied in the form of an\n                <code>output:serialization-parameters</code> element, having the format described in\n                <xspecref spec="SER30" ref="serparams-in-xdm-instance"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The final stage of serialization, that is, encoding, is skipped. If the serializer does\n             not allow this phase to be skipped, then the sequence of octets returned by the\n             serializer is decoded into a string by reversing the character encoding performed in the\n             final stage.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="L">If the host language makes serialization an optional feature and\n          the implementation does not support serialization, then a dynamic error\n             <errorref class="DC" code="0010"/> is raised.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The serialization process will raise an error if <code>$arg</code> is an attribute or\n             namespace node.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If any serialization error occurs, including the detection of an invalid value for a\n             serialization parameter, this results in the <code>fn:serialize</code> call failing with\n             a dynamic error.</p></div>\n',summary:"<p>  This function serializes the supplied  input\n                sequence \n              $arg  as described in   ,\n             returning the serialized  representation of the\n                sequence  as a string.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"item()",occurrence:"*",description:""}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:2,name:"serialize",qname:"fn:serialize",signature:"($arg as item()*, $params as element(output:serialization-parameters)?) as xs:string external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function serializes the supplied <phrase diff="chg" at="G">input\n                sequence</phrase>\n             <code>$arg</code> as described in <bibref ref="xslt-xquery-serialization-30"/>,\n             returning the serialized <phrase diff="chg" at="G">representation of the\n                sequence</phrase> as a string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="serialize" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="item()*"/></proto></example><example role="signature"><proto name="serialize" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="item()*"/><arg name="params" type="element(output:serialization-parameters)?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The value of <code>$arg</code> acts as the input sequence to the serialization process,\n             which starts with sequence normalization.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="G">The single-argument version of this function has the same effect as\n             the two-argument version called with <code>$params</code> set to an empty sequence. This\n             in turn is the same as the effect of passing an\n                <code>output:serialization-parameters</code> element with no child elements.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="G">The <code>$params</code> argument is used to identify a set of\n             serialization parameters. These are supplied in the form of an\n                <code>output:serialization-parameters</code> element, having the format described in\n                <xspecref spec="SER30" ref="serparams-in-xdm-instance"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The final stage of serialization, that is, encoding, is skipped. If the serializer does\n             not allow this phase to be skipped, then the sequence of octets returned by the\n             serializer is decoded into a string by reversing the character encoding performed in the\n             final stage.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="L">If the host language makes serialization an optional feature and\n          the implementation does not support serialization, then a dynamic error\n             <errorref class="DC" code="0010"/> is raised.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The serialization process will raise an error if <code>$arg</code> is an attribute or\n             namespace node.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If any serialization error occurs, including the detection of an invalid value for a\n             serialization parameter, this results in the <code>fn:serialize</code> call failing with\n             a dynamic error.</p></div>\n',summary:"<p>  This function serializes the supplied  input\n                sequence \n              $arg  as described in   ,\n             returning the serialized  representation of the\n                sequence  as a string.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"item()",occurrence:"*",description:""},{name:"params",type:"element(output:serialization-parameters)",occurrence:"?",description:""}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:2,name:"starts-with",qname:"fn:starts-with",signature:"($arg1 as xs:string?, $arg2 as xs:string?) as xs:boolean external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns true if the string <code>$arg1</code> contains <code>$arg2</code> as a\n             leading substring, taking collations into account.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="starts-with" return-type="xs:boolean" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg1" type="xs:string?"/><arg name="arg2" type="xs:string?"/></proto></example><example role="signature"><proto name="starts-with" return-type="xs:boolean" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg1" type="xs:string?"/><arg name="arg2" type="xs:string?"/><arg name="collation" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		collations.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The three-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		collations, and static base uri.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$arg1</code> or <code>$arg2</code> is the empty sequence, or\n             contains only ignorable collation units, it is interpreted as the zero-length\n             string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$arg2</code> is the zero-length string, then the function returns\n                <code>true</code>. If the value of <code>$arg1</code> is the zero-length string and\n             the value of <code>$arg2</code> is not the zero-length string, then the function returns\n                <code>false</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The collation used by this function is determined according to the rules in <specref ref="choosing-a-collation"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns an <code>xs:boolean</code> indicating whether or not the value of\n                <code>$arg1</code> starts with a sequence of collation units that provides a\n                <term>match</term> to the collation units of <code>$arg2</code> according to the\n             collation that is used.</p><note xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><p><term>Match</term> is defined in <bibref ref="Unicode-Collations"/>.</p></note><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error <rfc2119>may</rfc2119> be raised <errorref class="CH" code="0004"/> if the\n             specified collation does not support collation units.</p></div>\n',summary:"<p>  Returns true if the string  $arg1  contains  $arg2  as a\n             leading substring, taking collations into account.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg1",type:"xs:string",occurrence:"?",description:""},{name:"arg2",type:"xs:string",occurrence:"?",description:""}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:3,name:"starts-with",qname:"fn:starts-with",signature:"($arg1 as xs:string?, $arg2 as xs:string?, $collation as xs:string) as xs:boolean external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns true if the string <code>$arg1</code> contains <code>$arg2</code> as a\n             leading substring, taking collations into account.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="starts-with" return-type="xs:boolean" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg1" type="xs:string?"/><arg name="arg2" type="xs:string?"/></proto></example><example role="signature"><proto name="starts-with" return-type="xs:boolean" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg1" type="xs:string?"/><arg name="arg2" type="xs:string?"/><arg name="collation" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		collations.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The three-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		collations, and static base uri.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$arg1</code> or <code>$arg2</code> is the empty sequence, or\n             contains only ignorable collation units, it is interpreted as the zero-length\n             string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$arg2</code> is the zero-length string, then the function returns\n                <code>true</code>. If the value of <code>$arg1</code> is the zero-length string and\n             the value of <code>$arg2</code> is not the zero-length string, then the function returns\n                <code>false</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The collation used by this function is determined according to the rules in <specref ref="choosing-a-collation"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns an <code>xs:boolean</code> indicating whether or not the value of\n                <code>$arg1</code> starts with a sequence of collation units that provides a\n                <term>match</term> to the collation units of <code>$arg2</code> according to the\n             collation that is used.</p><note xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><p><term>Match</term> is defined in <bibref ref="Unicode-Collations"/>.</p></note><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error <rfc2119>may</rfc2119> be raised <errorref class="CH" code="0004"/> if the\n             specified collation does not support collation units.</p></div>\n',summary:"<p>  Returns true if the string  $arg1  contains  $arg2  as a\n             leading substring, taking collations into account.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg1",type:"xs:string",occurrence:"?",description:""},{name:"arg2",type:"xs:string",occurrence:"?",description:""},{name:"collation",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:0,name:"static-base-uri",qname:"fn:static-base-uri",signature:"() as xs:anyURI? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function returns the value of the Static Base URI property from the static context.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="static-base-uri" return-type="xs:anyURI?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		static base uri.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns the value of the Static Base URI property from the static context. If the\n             property is absent, the empty sequence is returned.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Components of the static context are discussed in <xspecref spec="XP30" ref="static_context"/> .</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="L">XQuery 3.0 and XSLT 3.0 give an implementation freedom to use different base URIs during the\n          static analysis phase and the dynamic evaluation phase, that is, for compile-time and run-time resources respectively.\n          In this situation, the <code>fn:static-base-uri</code> function should return a URI suitable for locating resources needed\n          during dynamic evaluation.</p></div>\n',summary:"<p>  This function returns the value of the Static Base URI property from the static context.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:anyURI?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"string-join",qname:"fn:string-join",signature:"($arg1 as xs:string*) as xs:string external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns a string created by concatenating the items in a sequence, with a\n             defined separator between adjacent items.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="string-join" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg1" type="xs:string*"/></proto></example><example role="signature"><proto name="string-join" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg1" type="xs:string*"/><arg name="arg2" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="B">The effect of calling the single-argument version of this function is\n             the same as calling the two-argument version with <code>$arg2</code> set to a\n             zero-length string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns an <code>xs:string</code> created by concatenating the items in the\n             sequence <code>$arg1</code>, in order, using the value of <code>$arg2</code> as a\n             separator between adjacent items. If the value of <code>$arg2</code> is the zero-length\n             string, then the members of <code>$arg1</code> are concatenated without a separator.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$arg1</code> is the empty sequence, the function returns the\n             zero-length string.</p></div>\n',summary:"<p>  Returns a string created by concatenating the items in a sequence, with a\n             defined separator between adjacent items.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg1",type:"xs:string",occurrence:"*",description:""}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:2,name:"string-join",qname:"fn:string-join",signature:"($arg1 as xs:string*, $arg2 as xs:string) as xs:string external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns a string created by concatenating the items in a sequence, with a\n             defined separator between adjacent items.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="string-join" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg1" type="xs:string*"/></proto></example><example role="signature"><proto name="string-join" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg1" type="xs:string*"/><arg name="arg2" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="B">The effect of calling the single-argument version of this function is\n             the same as calling the two-argument version with <code>$arg2</code> set to a\n             zero-length string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns an <code>xs:string</code> created by concatenating the items in the\n             sequence <code>$arg1</code>, in order, using the value of <code>$arg2</code> as a\n             separator between adjacent items. If the value of <code>$arg2</code> is the zero-length\n             string, then the members of <code>$arg1</code> are concatenated without a separator.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$arg1</code> is the empty sequence, the function returns the\n             zero-length string.</p></div>\n',summary:"<p>  Returns a string created by concatenating the items in a sequence, with a\n             defined separator between adjacent items.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg1",type:"xs:string",occurrence:"*",description:""},{name:"arg2",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:0,name:"string-length",qname:"fn:string-length",signature:"() as xs:integer external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the number of <termref def="character">characters</termref> in a\n             string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="string-length" return-type="xs:integer" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example><example role="signature"><proto name="string-length" return-type="xs:integer" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:string?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The zero-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-dependent">focus-dependent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns an <code>xs:integer</code> equal to the length in <termref def="character">characters</termref> of the value of <code>$arg</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Calling the zero-argument version of the function is equivalent to calling\n                <code>fn:string-length(fn:string(.))</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$arg</code> is the empty sequence, the function returns the\n                <code>xs:integer</code> value zero (0).</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is not specified and the context item is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>, a <phrase diff="add" at="M">dynamic</phrase> error is raised: <xerrorref spec="XP" class="DY" code="0002" type="dynamic"/>.</p></div>\n',summary:"<p>  Returns the number of  characters  in a\n             string.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:integer",description:""},errors:[]},{isDocumented:!0,arity:1,name:"string-length",qname:"fn:string-length",signature:"($arg as xs:string?) as xs:integer external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the number of <termref def="character">characters</termref> in a\n             string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="string-length" return-type="xs:integer" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example><example role="signature"><proto name="string-length" return-type="xs:integer" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:string?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The zero-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-dependent">focus-dependent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns an <code>xs:integer</code> equal to the length in <termref def="character">characters</termref> of the value of <code>$arg</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Calling the zero-argument version of the function is equivalent to calling\n                <code>fn:string-length(fn:string(.))</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$arg</code> is the empty sequence, the function returns the\n                <code>xs:integer</code> value zero (0).</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is not specified and the context item is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>, a <phrase diff="add" at="M">dynamic</phrase> error is raised: <xerrorref spec="XP" class="DY" code="0002" type="dynamic"/>.</p></div>\n',summary:"<p>  Returns the number of  characters  in a\n             string.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:""}],returns:{type:"xs:integer",description:""},errors:[]},{isDocumented:!0,arity:1,name:"string-to-codepoints",qname:"fn:string-to-codepoints",signature:"($arg as xs:string?) as xs:integer* external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the sequence of <termref def="codepoint">codepoints</termref> that\n             constitute an <code>xs:string</code> value. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="string-to-codepoints" return-type="xs:integer*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:string?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns a sequence of integers, each integer being the Unicode <termref def="codepoint">codepoints</termref> of the corresponding <termref def="character">character</termref> in <code>$arg</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is a zero-length string or the empty sequence, the function returns\n             the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:string-to-codepoints("Thérèse")</code> returns <code>(84, 104, 233, 114, 232, 115, 101)</code>.</p></div>\n',summary:"<p>  Returns the sequence of  codepoints  that\n             constitute an  xs:string  value.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:""}],returns:{type:"xs:integer*",description:""},errors:[]},{isDocumented:!0,arity:1,name:"string-to-codepoints",qname:"fn:string-to-codepoints",signature:"($arg as xs:string?) as xs:integer* external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the sequence of <termref def="codepoint">codepoints</termref> that\n             constitute an <code>xs:string</code> value. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="string-to-codepoints" return-type="xs:integer*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:string?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns a sequence of integers, each integer being the Unicode <termref def="codepoint">codepoints</termref> of the corresponding <termref def="character">character</termref> in <code>$arg</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is a zero-length string or the empty sequence, the function returns\n             the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:string-to-codepoints("Thérèse")</code> returns <code>(84, 104, 233, 114, 232, 115, 101)</code>.</p></div>\n',summary:"<p>  Returns the sequence of  codepoints  that\n             constitute an  xs:string  value.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:""}],returns:{type:"xs:integer*",description:""},errors:[]},{isDocumented:!0,arity:0,name:"string",qname:"fn:string",signature:"() as xs:string external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the value of <code>$arg</code> represented as an\n             <code>xs:string</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="string" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example><example role="signature"><proto name="string" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="item()?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The zero-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-dependent">focus-dependent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">In the zero-argument version of the function, <code>$arg</code> defaults to the context\n             item. That is, calling <code>fn:string()</code> is equivalent to calling\n                <code>fn:string(.)</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, the function returns the zero-length\n             string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is a node, the function returns the string-value of the node, as\n             obtained using the <code>dm:string-value</code> accessor defined in <bibref ref="xpath-datamodel-30"/> (see <xspecref spec="DM30" ref="dm-string-value"/>).</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is an atomic value, the function returns the result of the\n             expression <code>$arg cast as xs:string</code> (see <specref ref="casting"/>).</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="M">dynamic</phrase> error is raised <xerrorref spec="XP" class="DY" code="0002" type="type"/> by the\n             zero-argument version of the function if the context item is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">type</phrase> error is raised <errorref class="TY" code="0014" type="type"/> if\n                <code>$arg</code> is a function item. </p></div>\n',summary:"<p>  Returns the value of  $arg  represented as an\n              xs:string .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:1,name:"string",qname:"fn:string",signature:"($arg as item()?) as xs:string external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the value of <code>$arg</code> represented as an\n             <code>xs:string</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="string" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example><example role="signature"><proto name="string" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="item()?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The zero-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-dependent">focus-dependent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The one-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">In the zero-argument version of the function, <code>$arg</code> defaults to the context\n             item. That is, calling <code>fn:string()</code> is equivalent to calling\n                <code>fn:string(.)</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, the function returns the zero-length\n             string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is a node, the function returns the string-value of the node, as\n             obtained using the <code>dm:string-value</code> accessor defined in <bibref ref="xpath-datamodel-30"/> (see <xspecref spec="DM30" ref="dm-string-value"/>).</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is an atomic value, the function returns the result of the\n             expression <code>$arg cast as xs:string</code> (see <specref ref="casting"/>).</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="M">dynamic</phrase> error is raised <xerrorref spec="XP" class="DY" code="0002" type="type"/> by the\n             zero-argument version of the function if the context item is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">type</phrase> error is raised <errorref class="TY" code="0014" type="type"/> if\n                <code>$arg</code> is a function item. </p></div>\n',summary:"<p>  Returns the value of  $arg  represented as an\n              xs:string .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"item()",occurrence:"?",description:""}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:2,name:"subsequence",qname:"fn:subsequence",signature:"($sourceSeq as item()*, $startingLoc as xs:double) as item()* external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the contiguous sequence of items in the value of\n                <code>$sourceSeq</code> beginning at the position indicated by the value of\n                <code>$startingLoc</code> and continuing for the number of items indicated by the\n             value of <code>$length</code>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="subsequence" return-type="item()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="sourceSeq" type="item()*"/><arg name="startingLoc" type="xs:double"/></proto></example><example role="signature"><proto name="subsequence" return-type="item()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="sourceSeq" type="item()*"/><arg name="startingLoc" type="xs:double"/><arg name="length" type="xs:double"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">In the two-argument case, returns:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="A-E2" xml:space="preserve">$sourceSeq[fn:round($startingLoc) le position()]</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">In the three-argument case, returns:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="A-E2" xml:space="preserve">$sourceSeq[fn:round($startingLoc) le position()\n          and position() lt fn:round($startingLoc) + fn:round($length)]</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="del" at="F">For detailed type semantics, see [Formal Semantics].</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The first item of a sequence is located at position 1, not position 0.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$sourceSeq</code> is the empty sequence, the empty sequence is returned.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$startingLoc</code> is zero or negative, the subsequence includes items from\n             the beginning of the <code>$sourceSeq</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$length</code> is not specified, the subsequence includes items to the end of\n                <code>$sourceSeq</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$length</code> is greater than the number of items in the value of\n                <code>$sourceSeq</code> following <code>$startingLoc</code>, the subsequence includes\n             items to the end of <code>$sourceSeq</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="F">As an exception to the previous two notes, if\n                <code>$startingLoc</code> is <code>-INF</code> and <code>$length</code> is\n                <code>+INF</code>, then <code>fn:round($startingLoc) + fn:round($length)</code> is\n                <code>NaN</code>; since <code>position() lt NaN</code> is always false, the result is\n             an empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The reason the function accepts arguments of type <code>xs:double</code> is that many\n             computations on untyped data return an <code>xs:double</code> result; and the reason for\n             the rounding rules is to compensate for any imprecision in these floating-point\n             computations.</p></div>\n',summary:"<p>  Returns the contiguous sequence of items in the value of\n                 $sourceSeq  beginning at the position indicated by the value of\n                 $startingLoc  and continuing for the number of items indicated by the\n             value of  $length .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"sourceSeq",type:"item()",occurrence:"*",description:""},{name:"startingLoc",type:"xs:double",occurrence:null,description:""}],returns:{type:"item()*",description:""},errors:[]},{isDocumented:!0,arity:3,name:"subsequence",qname:"fn:subsequence",signature:"($sourceSeq as item()*, $startingLoc as xs:double, $length as xs:double) as item()* external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the contiguous sequence of items in the value of\n                <code>$sourceSeq</code> beginning at the position indicated by the value of\n                <code>$startingLoc</code> and continuing for the number of items indicated by the\n             value of <code>$length</code>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="subsequence" return-type="item()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="sourceSeq" type="item()*"/><arg name="startingLoc" type="xs:double"/></proto></example><example role="signature"><proto name="subsequence" return-type="item()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="sourceSeq" type="item()*"/><arg name="startingLoc" type="xs:double"/><arg name="length" type="xs:double"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">In the two-argument case, returns:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="A-E2" xml:space="preserve">$sourceSeq[fn:round($startingLoc) le position()]</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">In the three-argument case, returns:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="A-E2" xml:space="preserve">$sourceSeq[fn:round($startingLoc) le position()\n          and position() lt fn:round($startingLoc) + fn:round($length)]</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="del" at="F">For detailed type semantics, see [Formal Semantics].</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The first item of a sequence is located at position 1, not position 0.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$sourceSeq</code> is the empty sequence, the empty sequence is returned.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$startingLoc</code> is zero or negative, the subsequence includes items from\n             the beginning of the <code>$sourceSeq</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$length</code> is not specified, the subsequence includes items to the end of\n                <code>$sourceSeq</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If <code>$length</code> is greater than the number of items in the value of\n                <code>$sourceSeq</code> following <code>$startingLoc</code>, the subsequence includes\n             items to the end of <code>$sourceSeq</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="F">As an exception to the previous two notes, if\n                <code>$startingLoc</code> is <code>-INF</code> and <code>$length</code> is\n                <code>+INF</code>, then <code>fn:round($startingLoc) + fn:round($length)</code> is\n                <code>NaN</code>; since <code>position() lt NaN</code> is always false, the result is\n             an empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The reason the function accepts arguments of type <code>xs:double</code> is that many\n             computations on untyped data return an <code>xs:double</code> result; and the reason for\n             the rounding rules is to compensate for any imprecision in these floating-point\n             computations.</p></div>\n',summary:"<p>  Returns the contiguous sequence of items in the value of\n                 $sourceSeq  beginning at the position indicated by the value of\n                 $startingLoc  and continuing for the number of items indicated by the\n             value of  $length .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"sourceSeq",type:"item()",occurrence:"*",description:""},{name:"startingLoc",type:"xs:double",occurrence:null,description:""},{name:"length",type:"xs:double",occurrence:null,description:""}],returns:{type:"item()*",description:""},errors:[]},{isDocumented:!0,arity:2,name:"substring-after",qname:"fn:substring-after",signature:"($arg1 as xs:string?, $arg2 as xs:string?) as xs:string external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the part of <code>$arg1</code> that follows the first occurrence of\n                <code>$arg2</code>, taking collations into account.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="substring-after" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg1" type="xs:string?"/><arg name="arg2" type="xs:string?"/></proto></example><example role="signature"><proto name="substring-after" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg1" type="xs:string?"/><arg name="arg2" type="xs:string?"/><arg name="collation" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		collations.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The three-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		collations, and static base uri.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$arg1</code> or <code>$arg2</code> is the empty sequence, or\n             contains only ignorable collation units, it is interpreted as the zero-length\n             string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$arg2</code> is the zero-length string, then the function returns\n             the value of <code>$arg1</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$arg1</code> does not contain a string that is equal to the value\n             of <code>$arg2</code>, then the function returns the zero-length string. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The collation used by this function is determined according to the rules in <specref ref="choosing-a-collation"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns the substring of the value of <code>$arg1</code> that follows in\n             the value of <code>$arg1</code> the first occurrence of a sequence of collation units\n             that provides a <term>minimal match</term> to the collation units of <code>$arg2</code>\n             according to the collation that is used. </p><note xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><p><term>Minimal match</term> is defined in <bibref ref="Unicode-Collations"/>. </p></note><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error <rfc2119>may</rfc2119> be raised <errorref class="CH" code="0004"/> if the\n             specified collation does not support collation units.</p></div>\n',summary:"<p>  Returns the part of  $arg1  that follows the first occurrence of\n                 $arg2 , taking collations into account.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg1",type:"xs:string",occurrence:"?",description:""},{name:"arg2",type:"xs:string",occurrence:"?",description:""}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:3,name:"substring-after",qname:"fn:substring-after",signature:"($arg1 as xs:string?, $arg2 as xs:string?, $collation as xs:string) as xs:string external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the part of <code>$arg1</code> that follows the first occurrence of\n                <code>$arg2</code>, taking collations into account.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="substring-after" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg1" type="xs:string?"/><arg name="arg2" type="xs:string?"/></proto></example><example role="signature"><proto name="substring-after" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg1" type="xs:string?"/><arg name="arg2" type="xs:string?"/><arg name="collation" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		collations.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The three-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		collations, and static base uri.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$arg1</code> or <code>$arg2</code> is the empty sequence, or\n             contains only ignorable collation units, it is interpreted as the zero-length\n             string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$arg2</code> is the zero-length string, then the function returns\n             the value of <code>$arg1</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$arg1</code> does not contain a string that is equal to the value\n             of <code>$arg2</code>, then the function returns the zero-length string. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The collation used by this function is determined according to the rules in <specref ref="choosing-a-collation"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns the substring of the value of <code>$arg1</code> that follows in\n             the value of <code>$arg1</code> the first occurrence of a sequence of collation units\n             that provides a <term>minimal match</term> to the collation units of <code>$arg2</code>\n             according to the collation that is used. </p><note xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><p><term>Minimal match</term> is defined in <bibref ref="Unicode-Collations"/>. </p></note><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error <rfc2119>may</rfc2119> be raised <errorref class="CH" code="0004"/> if the\n             specified collation does not support collation units.</p></div>\n',summary:"<p>  Returns the part of  $arg1  that follows the first occurrence of\n                 $arg2 , taking collations into account.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg1",type:"xs:string",occurrence:"?",description:""},{name:"arg2",type:"xs:string",occurrence:"?",description:""},{name:"collation",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:2,name:"substring-before",qname:"fn:substring-before",signature:"($arg1 as xs:string?, $arg2 as xs:string?) as xs:string external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the part of <code>$arg1</code> that precedes the first occurrence of\n                <code>$arg2</code>, taking collations into account.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="substring-before" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg1" type="xs:string?"/><arg name="arg2" type="xs:string?"/></proto></example><example role="signature"><proto name="substring-before" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg1" type="xs:string?"/><arg name="arg2" type="xs:string?"/><arg name="collation" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		collations.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The three-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		collations, and static base uri.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If the value of <code>$arg1</code> or <code>$arg2</code> is the empty sequence, or\n             contains only ignorable collation units, it is interpreted as the zero-length\n             string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$arg2</code> is the zero-length string, then the function returns\n             the zero-length string. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$arg1</code> does not contain a string that is equal to the value\n             of <code>$arg2</code>, then the function returns the zero-length string. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The collation used by this function is determined according to the rules in <specref ref="choosing-a-collation"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns the substring of the value of <code>$arg1</code> that precedes in\n             the value of <code>$arg1</code> the first occurrence of a sequence of collation units\n             that provides a <term>minimal match</term> to the collation units of <code>$arg2</code>\n             according to the collation that is used.</p><note xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><p><term>Minimal match</term> is defined in <bibref ref="Unicode-Collations"/>. </p></note><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error <rfc2119>may</rfc2119> be raised <errorref class="CH" code="0004"/> if the\n             specified collation does not support collation units.</p></div>\n',summary:"<p>  Returns the part of  $arg1  that precedes the first occurrence of\n                 $arg2 , taking collations into account.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg1",type:"xs:string",occurrence:"?",description:""},{name:"arg2",type:"xs:string",occurrence:"?",description:""}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:3,name:"substring-before",qname:"fn:substring-before",signature:"($arg1 as xs:string?, $arg2 as xs:string?, $collation as xs:string) as xs:string external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the part of <code>$arg1</code> that precedes the first occurrence of\n                <code>$arg2</code>, taking collations into account.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="substring-before" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg1" type="xs:string?"/><arg name="arg2" type="xs:string?"/></proto></example><example role="signature"><proto name="substring-before" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg1" type="xs:string?"/><arg name="arg2" type="xs:string?"/><arg name="collation" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		collations.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The three-argument form of this function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		collations, and static base uri.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If the value of <code>$arg1</code> or <code>$arg2</code> is the empty sequence, or\n             contains only ignorable collation units, it is interpreted as the zero-length\n             string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$arg2</code> is the zero-length string, then the function returns\n             the zero-length string. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$arg1</code> does not contain a string that is equal to the value\n             of <code>$arg2</code>, then the function returns the zero-length string. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The collation used by this function is determined according to the rules in <specref ref="choosing-a-collation"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns the substring of the value of <code>$arg1</code> that precedes in\n             the value of <code>$arg1</code> the first occurrence of a sequence of collation units\n             that provides a <term>minimal match</term> to the collation units of <code>$arg2</code>\n             according to the collation that is used.</p><note xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><p><term>Minimal match</term> is defined in <bibref ref="Unicode-Collations"/>. </p></note><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error <rfc2119>may</rfc2119> be raised <errorref class="CH" code="0004"/> if the\n             specified collation does not support collation units.</p></div>\n',summary:"<p>  Returns the part of  $arg1  that precedes the first occurrence of\n                 $arg2 , taking collations into account.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg1",type:"xs:string",occurrence:"?",description:""},{name:"arg2",type:"xs:string",occurrence:"?",description:""},{name:"collation",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:2,name:"substring",qname:"fn:substring",signature:"($sourceString as xs:string?, $start as xs:double) as xs:string external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the portion of the value of <code>$sourceString</code> beginning at the\n             position indicated by the value of <code>$start</code> and continuing for the number of\n                <termref def="character">characters</termref> indicated by the value of\n                <code>$length</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="substring" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="sourceString" type="xs:string?"/><arg name="start" type="xs:double"/></proto></example><example role="signature"><proto name="substring" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="sourceString" type="xs:string?"/><arg name="start" type="xs:double"/><arg name="length" type="xs:double"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$sourceString</code> is the empty sequence, the function returns\n             the zero-length string. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function returns a string comprising those <termref def="character">characters</termref> of <code>$sourceString</code> whose index position (counting\n             from one) is greater than or equal to the value of <code>$start</code> (rounded to an\n             integer), and (if <code>$length</code> is specified) less than the sum of\n                <code>$start</code> and <code>$length</code> (both rounded to integers).</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The characters returned do not extend beyond <code>$sourceString</code>. If\n                <code>$start</code> is zero or negative, only those characters in positions greater\n             than zero are returned.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">More specifically, the three argument version of the function returns the characters in\n                <code>$sourceString</code> whose position <code>$p</code> satisfies:</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">\n             <code>fn:round($start) &lt;= $p &lt; fn:round($start) + fn:round($length)</code>\n          </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two argument version of the function assumes that <code>$length</code> is infinite\n             and thus returns the <termref def="character">characters</termref> in\n                <code>$sourceString</code> whose position <code>$p</code> satisfies:</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">\n             <code>fn:round($start) &lt;= $p</code>\n          </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">In the above computations, the rules for <code>op:numeric-less-than</code> and\n                <code>op:numeric-greater-than</code> apply.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The first character of a string is located at position 1, not position 0.</p></div>\n',summary:"<p>  Returns the portion of the value of  $sourceString  beginning at the\n             position indicated by the value of  $start  and continuing for the number of\n                 characters  indicated by the value of\n                 $length .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"sourceString",type:"xs:string",occurrence:"?",description:""},{name:"start",type:"xs:double",occurrence:null,description:""}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:3,name:"substring",qname:"fn:substring",signature:"($sourceString as xs:string?, $start as xs:double, $length as xs:double) as xs:string external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the portion of the value of <code>$sourceString</code> beginning at the\n             position indicated by the value of <code>$start</code> and continuing for the number of\n                <termref def="character">characters</termref> indicated by the value of\n                <code>$length</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="substring" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="sourceString" type="xs:string?"/><arg name="start" type="xs:double"/></proto></example><example role="signature"><proto name="substring" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="sourceString" type="xs:string?"/><arg name="start" type="xs:double"/><arg name="length" type="xs:double"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$sourceString</code> is the empty sequence, the function returns\n             the zero-length string. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function returns a string comprising those <termref def="character">characters</termref> of <code>$sourceString</code> whose index position (counting\n             from one) is greater than or equal to the value of <code>$start</code> (rounded to an\n             integer), and (if <code>$length</code> is specified) less than the sum of\n                <code>$start</code> and <code>$length</code> (both rounded to integers).</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The characters returned do not extend beyond <code>$sourceString</code>. If\n                <code>$start</code> is zero or negative, only those characters in positions greater\n             than zero are returned.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">More specifically, the three argument version of the function returns the characters in\n                <code>$sourceString</code> whose position <code>$p</code> satisfies:</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">\n             <code>fn:round($start) &lt;= $p &lt; fn:round($start) + fn:round($length)</code>\n          </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The two argument version of the function assumes that <code>$length</code> is infinite\n             and thus returns the <termref def="character">characters</termref> in\n                <code>$sourceString</code> whose position <code>$p</code> satisfies:</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">\n             <code>fn:round($start) &lt;= $p</code>\n          </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">In the above computations, the rules for <code>op:numeric-less-than</code> and\n                <code>op:numeric-greater-than</code> apply.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The first character of a string is located at position 1, not position 0.</p></div>\n',summary:"<p>  Returns the portion of the value of  $sourceString  beginning at the\n             position indicated by the value of  $start  and continuing for the number of\n                 characters  indicated by the value of\n                 $length .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"sourceString",type:"xs:string",occurrence:"?",description:""},{name:"start",type:"xs:double",occurrence:null,description:""},{name:"length",type:"xs:double",occurrence:null,description:""}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:1,name:"sum",qname:"fn:sum",signature:"($arg as xs:anyAtomicType*) as xs:anyAtomicType external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns a value obtained by adding together the values in\n             <code>$arg</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="sum" return-type="xs:anyAtomicType" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:anyAtomicType*"/></proto></example><example role="signature"><proto name="sum" return-type="xs:anyAtomicType?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:anyAtomicType*"/><arg name="zero" type="xs:anyAtomicType?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Any values of type <code>xs:untypedAtomic</code> in <code>$arg</code> are cast to\n                <code>xs:double</code>. The items in the resulting sequence may be reordered in an\n             arbitrary order. The resulting sequence is referred to below as the converted\n             sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the converted sequence is empty, then the single-argument form of the function\n             returns the <code>xs:integer</code> value <code>0</code>; the two-argument form returns\n             the value of the argument <code>$zero</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the converted sequence contains the value <code>NaN</code>, <code>NaN</code> is\n             returned.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">All items in <code>$arg</code> must be numeric or derived from a single base type. In\n             addition, the type must support addition. Duration values must either all be\n                <code>xs:yearMonthDuration</code> values or must all be\n                <code>xs:dayTimeDuration</code> values. For numeric values, the numeric promotion\n             rules defined in <specref ref="op.numeric"/> are used to promote all values to a single\n             common type. The sum of a sequence of integers will therefore be an integer, while the\n             sum of a numeric sequence that includes at least one <code>xs:double</code> will be an\n                <code>xs:double</code>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The result of the function, using the second signature, is the result of the\n             expression:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">\n if (fn:count($c) eq 0) then\n     $zero\n else if (fn:count($c) eq 1) then\n     $c[1]\n else\n     $c[1] + fn:sum(subsequence($c, 2))</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">where <code>$c</code> is the converted sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The result of the function, using the first signature, is the result of the expression:\n                <code>fn:sum($arg, 0)</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="del" at="F">For detailed type semantics, see [Formal Semantics].</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A type error is raised <errorref class="RG" code="0006"/> if the input sequence contains\n             items of incompatible types, as described above.</p></div>\n',summary:"<p>  Returns a value obtained by adding together the values in\n              $arg .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:anyAtomicType",occurrence:"*",description:""}],returns:{type:"xs:anyAtomicType",description:""},errors:[]},{isDocumented:!0,arity:2,name:"sum",qname:"fn:sum",signature:"($arg as xs:anyAtomicType*, $zero as xs:anyAtomicType?) as xs:anyAtomicType? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns a value obtained by adding together the values in\n             <code>$arg</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="sum" return-type="xs:anyAtomicType" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:anyAtomicType*"/></proto></example><example role="signature"><proto name="sum" return-type="xs:anyAtomicType?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:anyAtomicType*"/><arg name="zero" type="xs:anyAtomicType?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Any values of type <code>xs:untypedAtomic</code> in <code>$arg</code> are cast to\n                <code>xs:double</code>. The items in the resulting sequence may be reordered in an\n             arbitrary order. The resulting sequence is referred to below as the converted\n             sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the converted sequence is empty, then the single-argument form of the function\n             returns the <code>xs:integer</code> value <code>0</code>; the two-argument form returns\n             the value of the argument <code>$zero</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the converted sequence contains the value <code>NaN</code>, <code>NaN</code> is\n             returned.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">All items in <code>$arg</code> must be numeric or derived from a single base type. In\n             addition, the type must support addition. Duration values must either all be\n                <code>xs:yearMonthDuration</code> values or must all be\n                <code>xs:dayTimeDuration</code> values. For numeric values, the numeric promotion\n             rules defined in <specref ref="op.numeric"/> are used to promote all values to a single\n             common type. The sum of a sequence of integers will therefore be an integer, while the\n             sum of a numeric sequence that includes at least one <code>xs:double</code> will be an\n                <code>xs:double</code>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The result of the function, using the second signature, is the result of the\n             expression:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve">\n if (fn:count($c) eq 0) then\n     $zero\n else if (fn:count($c) eq 1) then\n     $c[1]\n else\n     $c[1] + fn:sum(subsequence($c, 2))</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">where <code>$c</code> is the converted sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The result of the function, using the first signature, is the result of the expression:\n                <code>fn:sum($arg, 0)</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="del" at="F">For detailed type semantics, see [Formal Semantics].</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A type error is raised <errorref class="RG" code="0006"/> if the input sequence contains\n             items of incompatible types, as described above.</p></div>\n',summary:"<p>  Returns a value obtained by adding together the values in\n              $arg .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:anyAtomicType",occurrence:"*",description:""},{name:"zero",type:"xs:anyAtomicType",occurrence:"?",description:""}],returns:{type:"xs:anyAtomicType?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"tail",qname:"fn:tail",signature:"($arg as item()*) as item()* external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns all but the first item in a sequence. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="tail" return-type="item()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="item()*"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns the value of the expression <code>subsequence($arg, 2)</code></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, or a sequence containing a single item, then\n             the empty sequence is returned. </p></div>\n',summary:"<p>  Returns all but the first item in a sequence.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"item()",occurrence:"*",description:""}],returns:{type:"item()*",description:""},errors:[]},{isDocumented:!0,arity:1,name:"timezone-from-date",qname:"fn:timezone-from-date",signature:"($arg as xs:date?) as xs:dayTimeDuration? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the timezone component of an <code>xs:date</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="timezone-from-date" return-type="xs:dayTimeDuration?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:date?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, the function returns the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function returns the timezone component of <code>$arg</code>, if any. If\n                <code>$arg</code> has a timezone component, then the result is an\n                <code>xs:dayTimeDuration</code> that indicates deviation from UTC; its value may\n             range from +14:00 to -14:00 hours, both inclusive. If <code>$arg</code> has no timezone\n             component, the result is the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:timezone-from-date(xs:date("1999-05-31-05:00"))</code> returns <code>xs:dayTimeDuration("-PT5H")</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:timezone-from-date(xs:date("2000-06-12Z"))</code> returns <code>xs:dayTimeDuration("PT0S")</code>.</p></div>\n',summary:"<p>  Returns the timezone component of an  xs:date .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:date",occurrence:"?",description:""}],returns:{type:"xs:dayTimeDuration?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"timezone-from-dateTime",qname:"fn:timezone-from-dateTime",signature:"($arg as xs:dateTime?) as xs:dayTimeDuration? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the timezone component of an <code>xs:dateTime</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="timezone-from-dateTime" return-type="xs:dayTimeDuration?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:dateTime?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, the function returns the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function returns the timezone component of <code>$arg</code>, if any. If\n                <code>$arg</code> has a timezone component, then the result is an\n                <code>xs:dayTimeDuration</code> that indicates deviation from UTC; its value may\n             range from +14:00 to -14:00 hours, both inclusive. If <code>$arg</code> has no timezone\n             component, the result is the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:timezone-from-dateTime(xs:dateTime("1999-05-31T13:20:00-05:00"))</code> returns <code>xs:dayTimeDuration("-PT5H")</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:timezone-from-dateTime(xs:dateTime("2000-06-12T13:20:00Z"))</code> returns <code>xs:dayTimeDuration("PT0S")</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:timezone-from-dateTime(xs:dateTime("2004-08-27T00:00:00"))</code> returns <code>()</code>.</p></div>\n',summary:"<p>  Returns the timezone component of an  xs:dateTime .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:dateTime",occurrence:"?",description:""}],returns:{type:"xs:dayTimeDuration?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"timezone-from-time",qname:"fn:timezone-from-time",signature:"($arg as xs:time?) as xs:dayTimeDuration? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the timezone component of an <code>xs:time</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="timezone-from-time" return-type="xs:dayTimeDuration?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:time?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, the function returns the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function returns the timezone component of <code>$arg</code>, if any. If\n                <code>$arg</code> has a timezone component, then the result is an\n                <code>xs:dayTimeDuration</code> that indicates deviation from UTC; its value may\n             range from +14:00 to -14:00 hours, both inclusive. If <code>$arg</code> has no timezone\n             component, the result is the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:timezone-from-time(xs:time("13:20:00-05:00"))</code> returns <code>xs:dayTimeDuration("-PT5H")</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:timezone-from-time(xs:time("13:20:00"))</code> returns <code>()</code>.</p></div>\n',summary:"<p>  Returns the timezone component of an  xs:time .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:time",occurrence:"?",description:""}],returns:{type:"xs:dayTimeDuration?",description:""},errors:[]},{isDocumented:!0,arity:2,name:"tokenize",qname:"fn:tokenize",signature:"($input as xs:string?, $pattern as xs:string) as xs:string* external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns a sequence of strings constructed by splitting the input wherever a\n             separator is found; the separator is any substring that matches a given regular\n             expression.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="tokenize" return-type="xs:string*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="input" type="xs:string?"/><arg name="pattern" type="xs:string"/></proto></example><example role="signature"><proto name="tokenize" return-type="xs:string*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="input" type="xs:string?"/><arg name="pattern" type="xs:string"/><arg name="flags" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The effect of calling the first version of this function (omitting the argument\n                <code>$flags</code>) is the same as the effect of calling the second version with the\n                <code>$flags</code> argument set to a zero-length string. Flags are defined in\n                <specref ref="flags"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The <code>$flags</code> argument is interpreted in the same way as for the\n                <code>fn:matches</code> function.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$input</code> is the empty sequence, or if <code>$input</code> is the\n             zero-length string, the function returns the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns a sequence of strings formed by breaking the <code>$input</code>\n             string into a sequence of strings, treating any substring that matches\n                <code>$pattern</code> as a separator. The separators themselves are not returned.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If a separator occurs at the start of the <code>$input</code> string, the result\n             sequence will start with a zero-length string. Zero-length strings will also occur in\n             the result sequence if a separator occurs at the end of the <code>$input</code> string,\n             or if two adjacent substrings match the supplied <code>$pattern</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If two alternatives within the supplied <code>$pattern</code> both match at the same\n             position in the <code>$input</code> string, then the match that is chosen is the first.\n             For example:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve"> fn:tokenize("abracadabra", "(ab)|(a)") returns ("", "r", "c", "d", "r", "")</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0002"/> if the value of\n                <code>$pattern</code> is invalid according to the rules described in section <specref ref="regex-syntax"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0001"/> if the value of\n                <code>$flags</code> is invalid according to the rules described in section <specref ref="regex-syntax"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0003"/> if the supplied\n                <code>$pattern</code> matches a zero-length string, that is, if <code>fn:matches("",\n                $pattern, $flags)</code> returns <code>true</code>. </p></div>\n',summary:"<p>  Returns a sequence of strings constructed by splitting the input wherever a\n             separator is found; the separator is any substring that matches a given regular\n             expression.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"input",type:"xs:string",occurrence:"?",description:""},{name:"pattern",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:string*",description:""},errors:[]},{isDocumented:!0,arity:3,name:"tokenize",qname:"fn:tokenize",signature:"($input as xs:string?, $pattern as xs:string, $flags as xs:string) as xs:string* external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns a sequence of strings constructed by splitting the input wherever a\n             separator is found; the separator is any substring that matches a given regular\n             expression.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="tokenize" return-type="xs:string*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="input" type="xs:string?"/><arg name="pattern" type="xs:string"/></proto></example><example role="signature"><proto name="tokenize" return-type="xs:string*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="input" type="xs:string?"/><arg name="pattern" type="xs:string"/><arg name="flags" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The effect of calling the first version of this function (omitting the argument\n                <code>$flags</code>) is the same as the effect of calling the second version with the\n                <code>$flags</code> argument set to a zero-length string. Flags are defined in\n                <specref ref="flags"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The <code>$flags</code> argument is interpreted in the same way as for the\n                <code>fn:matches</code> function.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$input</code> is the empty sequence, or if <code>$input</code> is the\n             zero-length string, the function returns the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns a sequence of strings formed by breaking the <code>$input</code>\n             string into a sequence of strings, treating any substring that matches\n                <code>$pattern</code> as a separator. The separators themselves are not returned.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If a separator occurs at the start of the <code>$input</code> string, the result\n             sequence will start with a zero-length string. Zero-length strings will also occur in\n             the result sequence if a separator occurs at the end of the <code>$input</code> string,\n             or if two adjacent substrings match the supplied <code>$pattern</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> If two alternatives within the supplied <code>$pattern</code> both match at the same\n             position in the <code>$input</code> string, then the match that is chosen is the first.\n             For example:</p><eg xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" xml:space="preserve"> fn:tokenize("abracadabra", "(ab)|(a)") returns ("", "r", "c", "d", "r", "")</eg><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0002"/> if the value of\n                <code>$pattern</code> is invalid according to the rules described in section <specref ref="regex-syntax"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0001"/> if the value of\n                <code>$flags</code> is invalid according to the rules described in section <specref ref="regex-syntax"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RX" code="0003"/> if the supplied\n                <code>$pattern</code> matches a zero-length string, that is, if <code>fn:matches("",\n                $pattern, $flags)</code> returns <code>true</code>. </p></div>\n',summary:"<p>  Returns a sequence of strings constructed by splitting the input wherever a\n             separator is found; the separator is any substring that matches a given regular\n             expression.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"input",type:"xs:string",occurrence:"?",description:""},{name:"pattern",type:"xs:string",occurrence:null,description:""},{name:"flags",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:string*",description:""},errors:[]},{isDocumented:!0,arity:2,name:"trace",qname:"fn:trace",signature:"($value as item()*, $label as xs:string) as item()* external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Provides an execution trace intended to be used in debugging queries.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="trace" return-type="item()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="value" type="item()*"/><arg name="label" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns the value of <code>$value</code>, unchanged.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">In addition, the values of <code>$value</code>, converted to an <code>xs:string</code>,\n             and <code>$label</code>\n             <rfc2119>may</rfc2119> be directed to a trace data set. The destination of the trace\n             output is <termref def="implementation-defined"/>. The format of the trace output is\n                <termref def="implementation-dependent"/>. The ordering of output from calls of the\n                <code>fn:trace</code> function is <termref def="implementation-dependent"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Consider a situation in which a user wants to investigate the actual value passed to\n                a function. Assume that in a particular execution, <code>$v</code> is an\n                   <code>xs:decimal</code> with value <code>124.84</code>. Writing <code>fn:trace($v,\n                   \'the value of $v is:\')</code> will put the strings <code>"124.84"</code> and\n                   <code>"the value of $v is:"</code> in the trace data set in implementation\n                dependent order.</p></div>\n',summary:"<p>  Provides an execution trace intended to be used in debugging queries.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"value",type:"item()",occurrence:"*",description:""},{name:"label",type:"xs:string",occurrence:null,description:""}],returns:{type:"item()*",description:""},errors:[]},{isDocumented:!0,arity:3,name:"translate",qname:"fn:translate",signature:"($arg as xs:string?, $mapString as xs:string, $transString as xs:string) as xs:string external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the value of <code>$arg</code> modified by replacing or removing\n             individual characters. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="translate" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:string?"/><arg name="mapString" type="xs:string"/><arg name="transString" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$arg</code> is the empty sequence, the function returns the\n             zero-length string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function returns a result string constructed by processing each <termref def="character">character</termref> in the value of <code>$arg</code>, in order,\n             according to the following rules:</p><olist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>If the character does not appear in the value of <code>$mapString</code> then it\n                   is added to the result string unchanged.</p></item><item><p>If the character first appears in the value of <code>$mapString</code> at some\n                   position <emph>M</emph>, where the value of <code>$transString</code> is\n                      <emph>M</emph> or more characters in length, then the character at position\n                      <emph>M</emph> in <code>$transString</code> is added to the result string.</p></item><item><p>If the character first appears in the value of <code>$mapString</code> at some\n                   position <emph>M</emph>, where the value of <code>$transString</code> is less than\n                      <emph>M</emph> characters in length, then the character is omitted from the\n                   result string.</p></item></olist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$mapString</code> is the zero-length string then the function returns\n                <code>$arg</code> unchanged.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If a character occurs more than once in <code>$mapString</code>, then the first\n             occurrence determines the action taken.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$transString</code> is longer than <code>$mapString</code>, the excess\n             characters are ignored.</p></div>\n',summary:"<p>  Returns the value of  $arg  modified by replacing or removing\n             individual characters.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:""},{name:"mapString",type:"xs:string",occurrence:null,description:""},{name:"transString",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:0,name:"true",qname:"fn:true",signature:"() as xs:boolean external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the <code>xs:boolean</code> value <code>true</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="true" return-type="xs:boolean" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The result is equivalent to <code>xs:boolean("1")</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:true()</code> returns <code>xs:boolean(1)</code>.</p></div>\n',summary:"<p>  Returns the  xs:boolean  value  true .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:1,name:"unordered",qname:"fn:unordered",signature:"($sourceSeq as item()*) as item()* external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the items of <code>$sourceSeq</code> in an <termref def="implementation-dependent"/> order.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="unordered" return-type="item()*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="sourceSeq" type="item()*"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The function returns the items of <code>$sourceSeq</code> in an <termref def="implementation-dependent"/> order.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Query optimizers may be able to do a better job if the order of the output sequence is\n             not specified. For example, when retrieving prices from a purchase order, if an index\n             exists on prices, it may be more efficient to return the prices in index order rather\n             than in document order.</p></div>\n',summary:"<p>  Returns the items of  $sourceSeq  in an    order.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"sourceSeq",type:"item()",occurrence:"*",description:""}],returns:{type:"item()*",description:""},errors:[]},{isDocumented:!0,arity:1,name:"unparsed-text-available",qname:"fn:unparsed-text-available",signature:"($href as xs:string?) as xs:boolean external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Because errors in evaluating the <function>fn:unparsed-text</function> function are\n             non-recoverable, these two functions are provided to allow an application to determine\n             whether a call with particular arguments would succeed.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="unparsed-text-available" return-type="xs:boolean" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="href" type="xs:string?"/></proto></example><example role="signature"><proto name="unparsed-text-available" return-type="xs:boolean" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="href" type="xs:string?"/><arg name="encoding" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		static base uri.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The <function>fn:unparsed-text-available</function> function determines whether a call\n             on the <function>fn:unparsed-text</function> function with identical arguments would\n             return a string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the first argument is an empty sequence, the function returns false. <phrase diff="del" at="L">If the second\n             argument is an empty sequence, the function behaves as if the second argument were\n             omitted.</phrase></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">In other cases, the function returns true if a call on\n                <function>fn:unparsed-text</function> with the same arguments would succeed, and\n             false if a call on <function>fn:unparsed-text</function> with the same arguments would\n             fail with a non-recoverable dynamic error.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The functions <function>fn:unparsed-text</function> and\n                <function>fn:unparsed-text-available</function> have the same requirement for\n                <termref def="deterministic">determinism</termref> as the functions\n                <code>fn:doc</code> and <code>fn:doc-available</code>. This means that unless the\n             user has explicitly stated a requirement for a reduced level of determinism, either of\n             these functions if called twice with the same arguments during the course of a\n             transformation <rfc2119>must</rfc2119> return the same results each time; moreover, the\n             results of a call on <function>fn:unparsed-text-available</function>\n             <rfc2119>must</rfc2119> be consistent with the results of a subsequent call on\n                <function>unparsed-text</function> with the same arguments.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This requires that the <function>unparsed-text-available</function> function should\n             actually attempt to read the resource identified by the URI, and check that it is\n             correctly encoded and contains no characters that are invalid in XML. Implementations\n             may avoid the cost of repeating these checks for example by caching the validated\n             contents of the resource, to anticipate a subsequent call on the\n                <function>unparsed-text</function>\n             <phrase diff="add" at="A">or <function>unparsed-text-lines</function>\n             </phrase> function. Alternatively, implementations may be able to rewrite an expression\n             such as <code>if (unparsed-text-available(A)) then unparsed-text(A) else ...</code> to\n             generate a single call internally.</p></div>\n',summary:"<p>  Because errors in evaluating the  fn:unparsed-text  function are\n             non-recoverable, these two functions are provided to allow an application to determine\n             whether a call with particular arguments would succeed.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"href",type:"xs:string",occurrence:"?",description:""}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:1,name:"unparsed-text-available",qname:"fn:unparsed-text-available",signature:"($href as xs:string?) as xs:boolean external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Because errors in evaluating the <function>fn:unparsed-text</function> function are\n             non-recoverable, these two functions are provided to allow an application to determine\n             whether a call with particular arguments would succeed.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="unparsed-text-available" return-type="xs:boolean" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="href" type="xs:string?"/></proto></example><example role="signature"><proto name="unparsed-text-available" return-type="xs:boolean" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="href" type="xs:string?"/><arg name="encoding" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		static base uri.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The <function>fn:unparsed-text-available</function> function determines whether a call\n             on the <function>fn:unparsed-text</function> function with identical arguments would\n             return a string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the first argument is an empty sequence, the function returns false. <phrase diff="del" at="L">If the second\n             argument is an empty sequence, the function behaves as if the second argument were\n             omitted.</phrase></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">In other cases, the function returns true if a call on\n                <function>fn:unparsed-text</function> with the same arguments would succeed, and\n             false if a call on <function>fn:unparsed-text</function> with the same arguments would\n             fail with a non-recoverable dynamic error.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The functions <function>fn:unparsed-text</function> and\n                <function>fn:unparsed-text-available</function> have the same requirement for\n                <termref def="deterministic">determinism</termref> as the functions\n                <code>fn:doc</code> and <code>fn:doc-available</code>. This means that unless the\n             user has explicitly stated a requirement for a reduced level of determinism, either of\n             these functions if called twice with the same arguments during the course of a\n             transformation <rfc2119>must</rfc2119> return the same results each time; moreover, the\n             results of a call on <function>fn:unparsed-text-available</function>\n             <rfc2119>must</rfc2119> be consistent with the results of a subsequent call on\n                <function>unparsed-text</function> with the same arguments.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This requires that the <function>unparsed-text-available</function> function should\n             actually attempt to read the resource identified by the URI, and check that it is\n             correctly encoded and contains no characters that are invalid in XML. Implementations\n             may avoid the cost of repeating these checks for example by caching the validated\n             contents of the resource, to anticipate a subsequent call on the\n                <function>unparsed-text</function>\n             <phrase diff="add" at="A">or <function>unparsed-text-lines</function>\n             </phrase> function. Alternatively, implementations may be able to rewrite an expression\n             such as <code>if (unparsed-text-available(A)) then unparsed-text(A) else ...</code> to\n             generate a single call internally.</p></div>\n',summary:"<p>  Because errors in evaluating the  fn:unparsed-text  function are\n             non-recoverable, these two functions are provided to allow an application to determine\n             whether a call with particular arguments would succeed.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"href",type:"xs:string",occurrence:"?",description:""}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:2,name:"unparsed-text-available",qname:"fn:unparsed-text-available",signature:"($href as xs:string?, $encoding as xs:string) as xs:boolean external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Because errors in evaluating the <function>fn:unparsed-text</function> function are\n             non-recoverable, these two functions are provided to allow an application to determine\n             whether a call with particular arguments would succeed.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="unparsed-text-available" return-type="xs:boolean" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="href" type="xs:string?"/></proto></example><example role="signature"><proto name="unparsed-text-available" return-type="xs:boolean" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="href" type="xs:string?"/><arg name="encoding" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		static base uri.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The <function>fn:unparsed-text-available</function> function determines whether a call\n             on the <function>fn:unparsed-text</function> function with identical arguments would\n             return a string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the first argument is an empty sequence, the function returns false. <phrase diff="del" at="L">If the second\n             argument is an empty sequence, the function behaves as if the second argument were\n             omitted.</phrase></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">In other cases, the function returns true if a call on\n                <function>fn:unparsed-text</function> with the same arguments would succeed, and\n             false if a call on <function>fn:unparsed-text</function> with the same arguments would\n             fail with a non-recoverable dynamic error.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The functions <function>fn:unparsed-text</function> and\n                <function>fn:unparsed-text-available</function> have the same requirement for\n                <termref def="deterministic">determinism</termref> as the functions\n                <code>fn:doc</code> and <code>fn:doc-available</code>. This means that unless the\n             user has explicitly stated a requirement for a reduced level of determinism, either of\n             these functions if called twice with the same arguments during the course of a\n             transformation <rfc2119>must</rfc2119> return the same results each time; moreover, the\n             results of a call on <function>fn:unparsed-text-available</function>\n             <rfc2119>must</rfc2119> be consistent with the results of a subsequent call on\n                <function>unparsed-text</function> with the same arguments.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This requires that the <function>unparsed-text-available</function> function should\n             actually attempt to read the resource identified by the URI, and check that it is\n             correctly encoded and contains no characters that are invalid in XML. Implementations\n             may avoid the cost of repeating these checks for example by caching the validated\n             contents of the resource, to anticipate a subsequent call on the\n                <function>unparsed-text</function>\n             <phrase diff="add" at="A">or <function>unparsed-text-lines</function>\n             </phrase> function. Alternatively, implementations may be able to rewrite an expression\n             such as <code>if (unparsed-text-available(A)) then unparsed-text(A) else ...</code> to\n             generate a single call internally.</p></div>\n',summary:"<p>  Because errors in evaluating the  fn:unparsed-text  function are\n             non-recoverable, these two functions are provided to allow an application to determine\n             whether a call with particular arguments would succeed.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"href",type:"xs:string",occurrence:"?",description:""},{name:"encoding",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:2,name:"unparsed-text-available",qname:"fn:unparsed-text-available",signature:"($href as xs:string?, $encoding as xs:string) as xs:boolean external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Because errors in evaluating the <function>fn:unparsed-text</function> function are\n             non-recoverable, these two functions are provided to allow an application to determine\n             whether a call with particular arguments would succeed.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="unparsed-text-available" return-type="xs:boolean" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="href" type="xs:string?"/></proto></example><example role="signature"><proto name="unparsed-text-available" return-type="xs:boolean" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="href" type="xs:string?"/><arg name="encoding" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		static base uri.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The <function>fn:unparsed-text-available</function> function determines whether a call\n             on the <function>fn:unparsed-text</function> function with identical arguments would\n             return a string.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the first argument is an empty sequence, the function returns false. <phrase diff="del" at="L">If the second\n             argument is an empty sequence, the function behaves as if the second argument were\n             omitted.</phrase></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">In other cases, the function returns true if a call on\n                <function>fn:unparsed-text</function> with the same arguments would succeed, and\n             false if a call on <function>fn:unparsed-text</function> with the same arguments would\n             fail with a non-recoverable dynamic error.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The functions <function>fn:unparsed-text</function> and\n                <function>fn:unparsed-text-available</function> have the same requirement for\n                <termref def="deterministic">determinism</termref> as the functions\n                <code>fn:doc</code> and <code>fn:doc-available</code>. This means that unless the\n             user has explicitly stated a requirement for a reduced level of determinism, either of\n             these functions if called twice with the same arguments during the course of a\n             transformation <rfc2119>must</rfc2119> return the same results each time; moreover, the\n             results of a call on <function>fn:unparsed-text-available</function>\n             <rfc2119>must</rfc2119> be consistent with the results of a subsequent call on\n                <function>unparsed-text</function> with the same arguments.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This requires that the <function>unparsed-text-available</function> function should\n             actually attempt to read the resource identified by the URI, and check that it is\n             correctly encoded and contains no characters that are invalid in XML. Implementations\n             may avoid the cost of repeating these checks for example by caching the validated\n             contents of the resource, to anticipate a subsequent call on the\n                <function>unparsed-text</function>\n             <phrase diff="add" at="A">or <function>unparsed-text-lines</function>\n             </phrase> function. Alternatively, implementations may be able to rewrite an expression\n             such as <code>if (unparsed-text-available(A)) then unparsed-text(A) else ...</code> to\n             generate a single call internally.</p></div>\n',summary:"<p>  Because errors in evaluating the  fn:unparsed-text  function are\n             non-recoverable, these two functions are provided to allow an application to determine\n             whether a call with particular arguments would succeed.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"href",type:"xs:string",occurrence:"?",description:""},{name:"encoding",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:1,name:"unparsed-text-lines",qname:"fn:unparsed-text-lines",signature:"($href as xs:string?) as xs:string* external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The <code>fn:unparsed-text-lines</code> function reads an external resource (for\n             example, a file) and returns its contents as a sequence of strings, one for each line of\n             text in the  <phrase diff="chg" at="L">string representation</phrase> of the resource.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="unparsed-text-lines" return-type="xs:string*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="href" type="xs:string?"/></proto></example><example role="signature"><proto name="unparsed-text-lines" return-type="xs:string*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="href" type="xs:string?"/><arg name="encoding" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		static base uri.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The <code>unparsed-text-lines</code> function reads an external resource (for example, a\n             file) and returns its <phrase diff="chg" at="L">string representation</phrase> as a sequence of strings, separated at newline\n             boundaries. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The result of the single-argument function is the same as the result of the expression\n                <code>fn:tokenize(fn:unparsed-text($href), \'\\r\\n|\\r|\\n\')[not(position()=last() and\n                .=\'\')]</code>. The result of the two-argument function is the same as the result of\n             the expression <code>fn:tokenize(fn:unparsed-text($href, $encoding),\n                \'\\r\\n|\\r|\\n\'))[not(position()=last() and .=\'\')]</code>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The result is a thus a sequence of strings containing the text of the resource retrieved\n             using the URI, each string representing one line of text. Lines are separated by one of\n             the sequences x0A, x0D, or x0Dx0A. The characters representing the newline are not\n             included in the returned strings. If there are two adjacent newline sequences, a\n             zero-length string will be returned to represent the empty line; but if the external\n             resource ends with a newline sequence, no zero-length string will be returned as the\n             last item in the result.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Error conditions are the same as for the <code>fn:unparsed-text</code> function.</p></div>\n',summary:"<p>  The  fn:unparsed-text-lines  function reads an external resource (for\n             example, a file) and returns its contents as a sequence of strings, one for each line of\n             text in the   string representation  of the resource.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"href",type:"xs:string",occurrence:"?",description:""}],returns:{type:"xs:string*",description:""},errors:[]},{isDocumented:!0,arity:2,name:"unparsed-text-lines",qname:"fn:unparsed-text-lines",signature:"($href as xs:string?, $encoding as xs:string) as xs:string* external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The <code>fn:unparsed-text-lines</code> function reads an external resource (for\n             example, a file) and returns its contents as a sequence of strings, one for each line of\n             text in the  <phrase diff="chg" at="L">string representation</phrase> of the resource.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="unparsed-text-lines" return-type="xs:string*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="href" type="xs:string?"/></proto></example><example role="signature"><proto name="unparsed-text-lines" return-type="xs:string*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="href" type="xs:string?"/><arg name="encoding" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		static base uri.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The <code>unparsed-text-lines</code> function reads an external resource (for example, a\n             file) and returns its <phrase diff="chg" at="L">string representation</phrase> as a sequence of strings, separated at newline\n             boundaries. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The result of the single-argument function is the same as the result of the expression\n                <code>fn:tokenize(fn:unparsed-text($href), \'\\r\\n|\\r|\\n\')[not(position()=last() and\n                .=\'\')]</code>. The result of the two-argument function is the same as the result of\n             the expression <code>fn:tokenize(fn:unparsed-text($href, $encoding),\n                \'\\r\\n|\\r|\\n\'))[not(position()=last() and .=\'\')]</code>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The result is a thus a sequence of strings containing the text of the resource retrieved\n             using the URI, each string representing one line of text. Lines are separated by one of\n             the sequences x0A, x0D, or x0Dx0A. The characters representing the newline are not\n             included in the returned strings. If there are two adjacent newline sequences, a\n             zero-length string will be returned to represent the empty line; but if the external\n             resource ends with a newline sequence, no zero-length string will be returned as the\n             last item in the result.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Error conditions are the same as for the <code>fn:unparsed-text</code> function.</p></div>\n',summary:"<p>  The  fn:unparsed-text-lines  function reads an external resource (for\n             example, a file) and returns its contents as a sequence of strings, one for each line of\n             text in the   string representation  of the resource.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"href",type:"xs:string",occurrence:"?",description:""},{name:"encoding",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:string*",description:""},errors:[]},{isDocumented:!0,arity:2,name:"unparsed-text-lines",qname:"fn:unparsed-text-lines",signature:"($href as xs:string?, $encoding as xs:string) as xs:string* external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The <code>fn:unparsed-text-lines</code> function reads an external resource (for\n             example, a file) and returns its contents as a sequence of strings, one for each line of\n             text in the  <phrase diff="chg" at="L">string representation</phrase> of the resource.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="unparsed-text-lines" return-type="xs:string*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="href" type="xs:string?"/></proto></example><example role="signature"><proto name="unparsed-text-lines" return-type="xs:string*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="href" type="xs:string?"/><arg name="encoding" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		static base uri.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The <code>unparsed-text-lines</code> function reads an external resource (for example, a\n             file) and returns its <phrase diff="chg" at="L">string representation</phrase> as a sequence of strings, separated at newline\n             boundaries. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The result of the single-argument function is the same as the result of the expression\n                <code>fn:tokenize(fn:unparsed-text($href), \'\\r\\n|\\r|\\n\')[not(position()=last() and\n                .=\'\')]</code>. The result of the two-argument function is the same as the result of\n             the expression <code>fn:tokenize(fn:unparsed-text($href, $encoding),\n                \'\\r\\n|\\r|\\n\'))[not(position()=last() and .=\'\')]</code>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The result is a thus a sequence of strings containing the text of the resource retrieved\n             using the URI, each string representing one line of text. Lines are separated by one of\n             the sequences x0A, x0D, or x0Dx0A. The characters representing the newline are not\n             included in the returned strings. If there are two adjacent newline sequences, a\n             zero-length string will be returned to represent the empty line; but if the external\n             resource ends with a newline sequence, no zero-length string will be returned as the\n             last item in the result.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Error conditions are the same as for the <code>fn:unparsed-text</code> function.</p></div>\n',summary:"<p>  The  fn:unparsed-text-lines  function reads an external resource (for\n             example, a file) and returns its contents as a sequence of strings, one for each line of\n             text in the   string representation  of the resource.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"href",type:"xs:string",occurrence:"?",description:""},{name:"encoding",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:string*",description:""},errors:[]},{isDocumented:!0,arity:1,name:"unparsed-text",qname:"fn:unparsed-text",signature:"($href as xs:string?) as xs:string? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The <code>fn:unparsed-text</code> function reads an external resource (for example, a\n             file) and returns <phrase diff="chg" at="L">a string representation of the resource</phrase>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="unparsed-text" return-type="xs:string?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="href" type="xs:string?"/></proto></example><example role="signature"><proto name="unparsed-text" return-type="xs:string?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="href" type="xs:string?"/><arg name="encoding" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		static base uri.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The <code>$href</code> argument <rfc2119>must</rfc2119> be a string in the form of a URI\n             reference, which <rfc2119>must</rfc2119> contain no fragment identifier, and\n                <rfc2119>must</rfc2119> identify a resource\n             <phrase diff="chg" at="L">for which a string representation is available</phrase>. If the URI is a\n             relative URI reference, then it is resolved relative to the\n             <phrase diff="chg" at="L">Static Base URI property from the static context</phrase>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="L">The mapping of URIs to the string representation of a resource is the mapping defined\n             in the <xtermref spec="XP30" ref="dt-available-text-resources">available text resources</xtermref>\n          component of the dynamic context.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of the <code>$href</code> argument is an empty sequence, the function\n             returns an empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The <code>$encoding</code> argument, if present, is the name of an encoding. The values\n             for this attribute follow the same rules as for the <code>encoding</code> attribute in\n             an XML declaration. The only values which every <termref def="implementation">implementation</termref> is <rfc2119>required</rfc2119> to recognize are\n                <code>utf-8</code> and <code>utf-16</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The encoding of the external resource is determined as follows:</p><olist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>external encoding information is used if available, otherwise</p></item><item><p>if the media type of the resource is <code>text/xml</code> or\n                      <code>application/xml</code> (see <bibref ref="rfc2376"/>), or if it matches\n                   the conventions <code>text/*+xml</code> or <code>application/*+xml</code> (see\n                      <bibref ref="rfc3023"/> and/or its successors), then the encoding is recognized\n                   as specified in <bibref ref="REC-xml"/>, otherwise</p></item><item><p>the value of the <code>$encoding</code> argument is used if present, otherwise</p></item><item><p>the processor <rfc2119>may</rfc2119> use <termref def="implementation-defined">implementation-defined</termref> heuristics to determine the likely encoding,\n                   otherwise</p></item><item><p>UTF-8 is assumed.</p></item></olist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The result of the function is a string containing the\n             <phrase diff="chg" at="L">string representation</phrase> of the resource retrieved\n             using the URI.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="UT" code="1170"/> if <code>$href</code>\n             contains a fragment identifier, or if it cannot be used to retrieve the\n             <phrase diff="chg" at="L">string representation</phrase> of a resource.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="UT" code="1190"/> <phrase diff="add" at="L">if the value\n             of the <code>$encoding</code> argument is not a valid encoding name, </phrase>if the <termref def="dt-processor">processor</termref> does not support the specified encoding,\n             if the <phrase diff="chg" at="L">string representation</phrase> of the retrieved\n             resource contains octets that cannot be decoded into Unicode <termref def="character">characters</termref> using the specified encoding, or if the resulting characters\n             are not permitted XML characters.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="UT" code="1200"/> if\n                <code>$encoding</code> is absent and the <termref def="dt-processor">processor</termref> cannot infer the encoding using external information and the\n             encoding is not UTF-8.</p></div>\n',summary:"<p>  The  fn:unparsed-text  function reads an external resource (for example, a\n             file) and returns  a string representation of the resource .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"href",type:"xs:string",occurrence:"?",description:""}],returns:{type:"xs:string?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"unparsed-text",qname:"fn:unparsed-text",signature:"($href as xs:string?) as xs:string? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The <code>fn:unparsed-text</code> function reads an external resource (for example, a\n             file) and returns <phrase diff="chg" at="L">a string representation of the resource</phrase>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="unparsed-text" return-type="xs:string?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="href" type="xs:string?"/></proto></example><example role="signature"><proto name="unparsed-text" return-type="xs:string?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="href" type="xs:string?"/><arg name="encoding" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		static base uri.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The <code>$href</code> argument <rfc2119>must</rfc2119> be a string in the form of a URI\n             reference, which <rfc2119>must</rfc2119> contain no fragment identifier, and\n                <rfc2119>must</rfc2119> identify a resource\n             <phrase diff="chg" at="L">for which a string representation is available</phrase>. If the URI is a\n             relative URI reference, then it is resolved relative to the\n             <phrase diff="chg" at="L">Static Base URI property from the static context</phrase>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="L">The mapping of URIs to the string representation of a resource is the mapping defined\n             in the <xtermref spec="XP30" ref="dt-available-text-resources">available text resources</xtermref>\n          component of the dynamic context.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of the <code>$href</code> argument is an empty sequence, the function\n             returns an empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The <code>$encoding</code> argument, if present, is the name of an encoding. The values\n             for this attribute follow the same rules as for the <code>encoding</code> attribute in\n             an XML declaration. The only values which every <termref def="implementation">implementation</termref> is <rfc2119>required</rfc2119> to recognize are\n                <code>utf-8</code> and <code>utf-16</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The encoding of the external resource is determined as follows:</p><olist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>external encoding information is used if available, otherwise</p></item><item><p>if the media type of the resource is <code>text/xml</code> or\n                      <code>application/xml</code> (see <bibref ref="rfc2376"/>), or if it matches\n                   the conventions <code>text/*+xml</code> or <code>application/*+xml</code> (see\n                      <bibref ref="rfc3023"/> and/or its successors), then the encoding is recognized\n                   as specified in <bibref ref="REC-xml"/>, otherwise</p></item><item><p>the value of the <code>$encoding</code> argument is used if present, otherwise</p></item><item><p>the processor <rfc2119>may</rfc2119> use <termref def="implementation-defined">implementation-defined</termref> heuristics to determine the likely encoding,\n                   otherwise</p></item><item><p>UTF-8 is assumed.</p></item></olist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The result of the function is a string containing the\n             <phrase diff="chg" at="L">string representation</phrase> of the resource retrieved\n             using the URI.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="UT" code="1170"/> if <code>$href</code>\n             contains a fragment identifier, or if it cannot be used to retrieve the\n             <phrase diff="chg" at="L">string representation</phrase> of a resource.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="UT" code="1190"/> <phrase diff="add" at="L">if the value\n             of the <code>$encoding</code> argument is not a valid encoding name, </phrase>if the <termref def="dt-processor">processor</termref> does not support the specified encoding,\n             if the <phrase diff="chg" at="L">string representation</phrase> of the retrieved\n             resource contains octets that cannot be decoded into Unicode <termref def="character">characters</termref> using the specified encoding, or if the resulting characters\n             are not permitted XML characters.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="UT" code="1200"/> if\n                <code>$encoding</code> is absent and the <termref def="dt-processor">processor</termref> cannot infer the encoding using external information and the\n             encoding is not UTF-8.</p></div>\n',summary:"<p>  The  fn:unparsed-text  function reads an external resource (for example, a\n             file) and returns  a string representation of the resource .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"href",type:"xs:string",occurrence:"?",description:""}],returns:{type:"xs:string?",description:""},errors:[]},{isDocumented:!0,arity:2,name:"unparsed-text",qname:"fn:unparsed-text",signature:"($href as xs:string?, $encoding as xs:string) as xs:string? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The <code>fn:unparsed-text</code> function reads an external resource (for example, a\n             file) and returns <phrase diff="chg" at="L">a string representation of the resource</phrase>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="unparsed-text" return-type="xs:string?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="href" type="xs:string?"/></proto></example><example role="signature"><proto name="unparsed-text" return-type="xs:string?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="href" type="xs:string?"/><arg name="encoding" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		static base uri.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The <code>$href</code> argument <rfc2119>must</rfc2119> be a string in the form of a URI\n             reference, which <rfc2119>must</rfc2119> contain no fragment identifier, and\n                <rfc2119>must</rfc2119> identify a resource\n             <phrase diff="chg" at="L">for which a string representation is available</phrase>. If the URI is a\n             relative URI reference, then it is resolved relative to the\n             <phrase diff="chg" at="L">Static Base URI property from the static context</phrase>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="L">The mapping of URIs to the string representation of a resource is the mapping defined\n             in the <xtermref spec="XP30" ref="dt-available-text-resources">available text resources</xtermref>\n          component of the dynamic context.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of the <code>$href</code> argument is an empty sequence, the function\n             returns an empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The <code>$encoding</code> argument, if present, is the name of an encoding. The values\n             for this attribute follow the same rules as for the <code>encoding</code> attribute in\n             an XML declaration. The only values which every <termref def="implementation">implementation</termref> is <rfc2119>required</rfc2119> to recognize are\n                <code>utf-8</code> and <code>utf-16</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The encoding of the external resource is determined as follows:</p><olist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>external encoding information is used if available, otherwise</p></item><item><p>if the media type of the resource is <code>text/xml</code> or\n                      <code>application/xml</code> (see <bibref ref="rfc2376"/>), or if it matches\n                   the conventions <code>text/*+xml</code> or <code>application/*+xml</code> (see\n                      <bibref ref="rfc3023"/> and/or its successors), then the encoding is recognized\n                   as specified in <bibref ref="REC-xml"/>, otherwise</p></item><item><p>the value of the <code>$encoding</code> argument is used if present, otherwise</p></item><item><p>the processor <rfc2119>may</rfc2119> use <termref def="implementation-defined">implementation-defined</termref> heuristics to determine the likely encoding,\n                   otherwise</p></item><item><p>UTF-8 is assumed.</p></item></olist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The result of the function is a string containing the\n             <phrase diff="chg" at="L">string representation</phrase> of the resource retrieved\n             using the URI.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="UT" code="1170"/> if <code>$href</code>\n             contains a fragment identifier, or if it cannot be used to retrieve the\n             <phrase diff="chg" at="L">string representation</phrase> of a resource.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="UT" code="1190"/> <phrase diff="add" at="L">if the value\n             of the <code>$encoding</code> argument is not a valid encoding name, </phrase>if the <termref def="dt-processor">processor</termref> does not support the specified encoding,\n             if the <phrase diff="chg" at="L">string representation</phrase> of the retrieved\n             resource contains octets that cannot be decoded into Unicode <termref def="character">characters</termref> using the specified encoding, or if the resulting characters\n             are not permitted XML characters.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="UT" code="1200"/> if\n                <code>$encoding</code> is absent and the <termref def="dt-processor">processor</termref> cannot infer the encoding using external information and the\n             encoding is not UTF-8.</p></div>\n',summary:"<p>  The  fn:unparsed-text  function reads an external resource (for example, a\n             file) and returns  a string representation of the resource .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"href",type:"xs:string",occurrence:"?",description:""},{name:"encoding",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:string?",description:""},errors:[]},{isDocumented:!0,arity:2,name:"unparsed-text",qname:"fn:unparsed-text",signature:"($href as xs:string?, $encoding as xs:string) as xs:string? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The <code>fn:unparsed-text</code> function reads an external resource (for example, a\n             file) and returns <phrase diff="chg" at="L">a string representation of the resource</phrase>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="unparsed-text" return-type="xs:string?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="href" type="xs:string?"/></proto></example><example role="signature"><proto name="unparsed-text" return-type="xs:string?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="href" type="xs:string?"/><arg name="encoding" type="xs:string"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		static base uri.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The <code>$href</code> argument <rfc2119>must</rfc2119> be a string in the form of a URI\n             reference, which <rfc2119>must</rfc2119> contain no fragment identifier, and\n                <rfc2119>must</rfc2119> identify a resource\n             <phrase diff="chg" at="L">for which a string representation is available</phrase>. If the URI is a\n             relative URI reference, then it is resolved relative to the\n             <phrase diff="chg" at="L">Static Base URI property from the static context</phrase>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="add" at="L">The mapping of URIs to the string representation of a resource is the mapping defined\n             in the <xtermref spec="XP30" ref="dt-available-text-resources">available text resources</xtermref>\n          component of the dynamic context.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of the <code>$href</code> argument is an empty sequence, the function\n             returns an empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The <code>$encoding</code> argument, if present, is the name of an encoding. The values\n             for this attribute follow the same rules as for the <code>encoding</code> attribute in\n             an XML declaration. The only values which every <termref def="implementation">implementation</termref> is <rfc2119>required</rfc2119> to recognize are\n                <code>utf-8</code> and <code>utf-16</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The encoding of the external resource is determined as follows:</p><olist xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><item><p>external encoding information is used if available, otherwise</p></item><item><p>if the media type of the resource is <code>text/xml</code> or\n                      <code>application/xml</code> (see <bibref ref="rfc2376"/>), or if it matches\n                   the conventions <code>text/*+xml</code> or <code>application/*+xml</code> (see\n                      <bibref ref="rfc3023"/> and/or its successors), then the encoding is recognized\n                   as specified in <bibref ref="REC-xml"/>, otherwise</p></item><item><p>the value of the <code>$encoding</code> argument is used if present, otherwise</p></item><item><p>the processor <rfc2119>may</rfc2119> use <termref def="implementation-defined">implementation-defined</termref> heuristics to determine the likely encoding,\n                   otherwise</p></item><item><p>UTF-8 is assumed.</p></item></olist><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The result of the function is a string containing the\n             <phrase diff="chg" at="L">string representation</phrase> of the resource retrieved\n             using the URI.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="UT" code="1170"/> if <code>$href</code>\n             contains a fragment identifier, or if it cannot be used to retrieve the\n             <phrase diff="chg" at="L">string representation</phrase> of a resource.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="UT" code="1190"/> <phrase diff="add" at="L">if the value\n             of the <code>$encoding</code> argument is not a valid encoding name, </phrase>if the <termref def="dt-processor">processor</termref> does not support the specified encoding,\n             if the <phrase diff="chg" at="L">string representation</phrase> of the retrieved\n             resource contains octets that cannot be decoded into Unicode <termref def="character">characters</termref> using the specified encoding, or if the resulting characters\n             are not permitted XML characters.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="UT" code="1200"/> if\n                <code>$encoding</code> is absent and the <termref def="dt-processor">processor</termref> cannot infer the encoding using external information and the\n             encoding is not UTF-8.</p></div>\n',summary:"<p>  The  fn:unparsed-text  function reads an external resource (for example, a\n             file) and returns  a string representation of the resource .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"href",type:"xs:string",occurrence:"?",description:""},{name:"encoding",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:string?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"upper-case",qname:"fn:upper-case",signature:"($arg as xs:string?) as xs:string external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Converts a string to upper case.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="upper-case" return-type="xs:string" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:string?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$arg</code> is the empty sequence, the zero-length string is\n             returned.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function returns the value of <code>$arg</code> after translating every\n                <termref def="character">character</termref> to its upper-case correspondent as\n             defined in the appropriate case mappings section in the Unicode standard <bibref ref="Unicode"/>. For versions of Unicode beginning with the 2.1.8 update, only\n             locale-insensitive case mappings should be applied. Beginning with version 3.2.0 (and\n             likely future versions) of Unicode, precise mappings are described in default case\n             operations, which are full case mappings in the absence of tailoring for particular\n             languages and environments. Every lower-case character that does not have an upper-case\n             correspondent, as well as every upper-case character, is included in the returned value\n             in its original form. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Case mappings may change the length of a string. In general, the\n                <code>fn:upper-case</code> and <code>fn:lower-case</code> functions are not inverses\n             of each other: <code>fn:lower-case(fn:upper-case($arg))</code> is not guaranteed to\n             return <code>$arg</code>, nor is <code>fn:upper-case(fn:lower-case($arg))</code>. The\n             Latin small letter dotless i (as used in Turkish) is perhaps the most prominent\n             lower-case letter which will not round-trip. The Latin capital letter i with dot above\n             is the most prominent upper-case letter which will not round trip; there are others,\n             such as Latin capital letter Sharp S (#1E9E) which is introduced in Unicode 5.1.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> These functions may not always be linguistically appropriate (e.g. Turkish i without\n             dot) or appropriate for the application (e.g. titlecase). In cases such as Turkish, a\n             simple translation should be used first.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> Because the function is not sensitive to locale, results will not always match user\n             expectations. In Quebec, for example, the standard uppercase equivalent of "è" is "È",\n             while in metropolitan France it is more commonly "E"; only one of these is supported by\n             the functions as defined.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"> Many characters of class Ll lack uppercase equivalents in the Unicode case mapping\n             tables; many characters of class Lu lack lowercase equivalents.</p></div>\n',summary:"<p>  Converts a string to upper case.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:""}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:0,name:"uri-collection",qname:"fn:uri-collection",signature:"() as xs:anyURI* external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns a sequence of <code>xs:anyURI</code> values representing the URIs in a resource collection.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="uri-collection" return-type="xs:anyURI*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example><example role="signature"><proto name="uri-collection" return-type="xs:anyURI*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:string?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		available resource collections, and static base uri.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The zero-argument form of the function returns the URIs in the <term>Default resource collection</term>\n             described in <xspecref spec="XP30" ref="id-xp-evaluation-context-components"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$arg</code> is a relative <code>xs:anyURI</code>, it is resolved\n             against the value of the base-URI property from the static context. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, the function behaves as if it had been\n             called without an argument. See above.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The single-argument form of the function returns the sequence of URIs corresponding to the\n             supplied URI in the <term>Available resource collections</term> described in\n             <xspecref spec="XP30" ref="id-xp-evaluation-context-components"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DC" code="0002"/> if no URI is supplied (that is, if the\n             the function is called with no arguments, or with a single argument that evaluates to an empty sequence), and the\n             value of the default resource collection is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="J">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DC" code="0002"/>\n             if <term>available resource collections</term> provides no mapping for the absolutized URI.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DC" code="0004"/> if <code>$arg</code> is not a\n             valid <code>xs:anyURI</code>.</p></div>\n',summary:"<p>  Returns a sequence of  xs:anyURI  values representing the URIs in a resource collection.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:anyURI*",description:""},errors:[]},{isDocumented:!0,arity:0,name:"uri-collection",qname:"fn:uri-collection",signature:"() as xs:anyURI* external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns a sequence of <code>xs:anyURI</code> values representing the URIs in a resource collection.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="uri-collection" return-type="xs:anyURI*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example><example role="signature"><proto name="uri-collection" return-type="xs:anyURI*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:string?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		available resource collections, and static base uri.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The zero-argument form of the function returns the URIs in the <term>Default resource collection</term>\n             described in <xspecref spec="XP30" ref="id-xp-evaluation-context-components"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$arg</code> is a relative <code>xs:anyURI</code>, it is resolved\n             against the value of the base-URI property from the static context. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, the function behaves as if it had been\n             called without an argument. See above.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The single-argument form of the function returns the sequence of URIs corresponding to the\n             supplied URI in the <term>Available resource collections</term> described in\n             <xspecref spec="XP30" ref="id-xp-evaluation-context-components"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DC" code="0002"/> if no URI is supplied (that is, if the\n             the function is called with no arguments, or with a single argument that evaluates to an empty sequence), and the\n             value of the default resource collection is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="J">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DC" code="0002"/>\n             if <term>available resource collections</term> provides no mapping for the absolutized URI.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DC" code="0004"/> if <code>$arg</code> is not a\n             valid <code>xs:anyURI</code>.</p></div>\n',summary:"<p>  Returns a sequence of  xs:anyURI  values representing the URIs in a resource collection.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:anyURI*",description:""},errors:[]},{isDocumented:!0,arity:1,name:"uri-collection",qname:"fn:uri-collection",signature:"($arg as xs:string?) as xs:anyURI* external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns a sequence of <code>xs:anyURI</code> values representing the URIs in a resource collection.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="uri-collection" return-type="xs:anyURI*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example><example role="signature"><proto name="uri-collection" return-type="xs:anyURI*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:string?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		available resource collections, and static base uri.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The zero-argument form of the function returns the URIs in the <term>Default resource collection</term>\n             described in <xspecref spec="XP30" ref="id-xp-evaluation-context-components"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$arg</code> is a relative <code>xs:anyURI</code>, it is resolved\n             against the value of the base-URI property from the static context. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, the function behaves as if it had been\n             called without an argument. See above.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The single-argument form of the function returns the sequence of URIs corresponding to the\n             supplied URI in the <term>Available resource collections</term> described in\n             <xspecref spec="XP30" ref="id-xp-evaluation-context-components"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DC" code="0002"/> if no URI is supplied (that is, if the\n             the function is called with no arguments, or with a single argument that evaluates to an empty sequence), and the\n             value of the default resource collection is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="J">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DC" code="0002"/>\n             if <term>available resource collections</term> provides no mapping for the absolutized URI.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DC" code="0004"/> if <code>$arg</code> is not a\n             valid <code>xs:anyURI</code>.</p></div>\n',summary:"<p>  Returns a sequence of  xs:anyURI  values representing the URIs in a resource collection.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:""}],returns:{type:"xs:anyURI*",description:""},errors:[]},{isDocumented:!0,arity:1,name:"uri-collection",qname:"fn:uri-collection",signature:"($arg as xs:string?) as xs:anyURI* external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns a sequence of <code>xs:anyURI</code> values representing the URIs in a resource collection.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="uri-collection" return-type="xs:anyURI*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example><example role="signature"><proto name="uri-collection" return-type="xs:anyURI*" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:string?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-dependent">context-dependent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>.  It depends on\n 		available resource collections, and static base uri.\n 	</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The zero-argument form of the function returns the URIs in the <term>Default resource collection</term>\n             described in <xspecref spec="XP30" ref="id-xp-evaluation-context-components"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If the value of <code>$arg</code> is a relative <code>xs:anyURI</code>, it is resolved\n             against the value of the base-URI property from the static context. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, the function behaves as if it had been\n             called without an argument. See above.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The single-argument form of the function returns the sequence of URIs corresponding to the\n             supplied URI in the <term>Available resource collections</term> described in\n             <xspecref spec="XP30" ref="id-xp-evaluation-context-components"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DC" code="0002"/> if no URI is supplied (that is, if the\n             the function is called with no arguments, or with a single argument that evaluates to an empty sequence), and the\n             value of the default resource collection is <xtermref ref="dt-absent" spec="DM30">absent</xtermref>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="J">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DC" code="0002"/>\n             if <term>available resource collections</term> provides no mapping for the absolutized URI.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="DC" code="0004"/> if <code>$arg</code> is not a\n             valid <code>xs:anyURI</code>.</p></div>\n',summary:"<p>  Returns a sequence of  xs:anyURI  values representing the URIs in a resource collection.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:""}],returns:{type:"xs:anyURI*",description:""},errors:[]},{isDocumented:!0,arity:1,name:"year-from-date",qname:"fn:year-from-date",signature:"($arg as xs:date?) as xs:integer? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the year component of an <code>xs:date</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="year-from-date" return-type="xs:integer?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:date?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, the function returns the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function returns an <code>xs:integer</code> representing the year in the\n             local value of <code>$arg</code>. The value may be negative. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:year-from-date(xs:date("1999-05-31"))</code> returns <code>1999</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:year-from-date(xs:date("2000-01-01+05:00"))</code> returns <code>2000</code>.</p></div>\n',summary:"<p>  Returns the year component of an  xs:date .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:date",occurrence:"?",description:""}],returns:{type:"xs:integer?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"years-from-duration",qname:"fn:years-from-duration",signature:"($arg as xs:duration?) as xs:integer? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the number of years in a duration.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="years-from-duration" return-type="xs:integer?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:duration?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, the function returns the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise, the function returns an <code>xs:integer</code> representing the years\n             component in the value of <code>$arg</code>. The result is obtained by casting\n                <code>$arg</code> to an <code>xs:yearMonthDuration</code> (see <specref ref="casting-to-durations"/>) and then computing the years component as described in\n                <specref ref="canonical-yearMonthDuration"/>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is a negative duration then the result will be negative..</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is an <code>xs:dayTimeDuration</code> the function returns 0.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:years-from-duration(xs:yearMonthDuration("P20Y15M"))</code> returns <code>21</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:years-from-duration(xs:yearMonthDuration("-P15M"))</code> returns <code>-1</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>fn:years-from-duration(xs:dayTimeDuration("-P2DT15H"))</code> returns <code>0</code>.</p></div>\n',summary:"<p>  Returns the number of years in a duration.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:duration",occurrence:"?",description:""}],returns:{type:"xs:integer?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"zero-or-one",qname:"fn:zero-or-one",signature:"($arg as item()*) as item()? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns <code>$arg</code> if it contains zero or one items. Otherwise, raises\n             an error.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="zero-or-one" return-type="item()?" isOp="no" prefix="fn" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="item()*"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Except in error cases, the function returns <code>$arg</code> unchanged.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="del" at="F">For detailed type semantics, see [Formal Semantics].</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">A <phrase diff="add" at="L">dynamic</phrase> error is raised <errorref class="RG" code="0003"/> if <code>$arg</code> contains more\n             than one item.</p></div>\n',summary:"<p>  Returns  $arg  if it contains zero or one items.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"item()",occurrence:"*",description:""}],returns:{type:"item()?",description:""},errors:[]}],variables:[]},"http://zorba.io/modules/csv":{ns:"http://zorba.io/modules/csv",description:" Function library providing converters from CSV/TXT to XML and back.\n The functions are optimized to work with large amounts of data, in a streaming way.\n",sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Daniel Turcanu</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/modules/csv",prefix:"csv"},{uri:"http://zorba.io/modules/csv-options",prefix:"csv-options"},{uri:"http://zorba.io/modules/schema",prefix:"schemaOptions"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:2,name:"parse",qname:"csv:parse",signature:"($csv as xs:string, $options as element(csv-options:options)?) as element(*)*",description:' Parse a CSV or fixed size text and convert to XML.<br xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n By default each line is converted to a &lt;row&gt; element, and each field to a &lt;column&gt; element inside &lt;row&gt;.<br xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The format of the param $options is:<br xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n  <pre xmlns:xqdoc="http://www.xqdoc.org/1.0">\n    &lt;csv-options:options&gt;\n        &lt;csv  [separator="default comma ,"] ?\n          [quote-char="default double quotes &amp;quote;"]?\n          [quote-escape="default double double quotes &amp;quote;&amp;quote;"]? /&gt;\n        or\n        &lt;column-widths&gt;\n          &lt;column-width&gt;<i>[column fixed width, unsigned int]</i>&lt;column-width&gt;*\n        &lt;/column-widths&gt;\n        or\n        &lt;column-positions&gt;\n          &lt;column-position&gt;<i>[column position on line, unsigned int]</i>&lt;column-position&gt;*\n        &lt;/column-positions&gt;\n        &lt;first-row-is-header [line="<i>first_line[-last_line]?</i>"]?/&gt;?\n        &lt;start-from-row line="<i>first_line[-last_line]?</i>"/&gt;?\n        &lt;add-last-void-columns/&gt;?\n        &lt;xml-nodes&gt;\n          [&lt;<i>row-name</i>&gt;\n            [&lt;<i>column-name/</i>&gt;]?\n          &lt;/<i>row-name</i>&gt;]?\n        &lt;/xml-nodes&gt;?\n    &lt;/csv-options:options&gt;\n  </pre>\n    All the parameters are optional and can appear in any order.<br xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n    All the parameters are case sensitive. The namespace used is "http://zorba.io/modules/csv-options".<br xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n    All strings must have UTF-8 encoding.<br xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n    Parameters csv, column-widths, column-positions are mutually exclusive. If none is specified,\n    the input string is assumed to be csv.<br xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n    Description of parameters:\n    <dl xmlns:xqdoc="http://www.xqdoc.org/1.0">\n     <dt><b>csv</b></dt>\n     <dd> Specifies the parameters for parsing a csv string.<br/>\n       <dl>\n        <dt><b>separator</b></dt>\n        <dd>The character or group of characters used to separating fields in a row.\n            If it is not specified, it defaults to comma \',\'.\n        </dd>\n        <dt><b>quote-char</b></dt>\n        <dd>The character or group of characters used for quoting the fields that may contain special characters,\n             like separator, new line or this quote char. The default value is double quote ".<br/>\n        </dd>\n        <dt><b>quote-escape</b></dt>\n        <dd>The group of characters used for escaping the quote char inside a field. The whole quote escape group\n           is translated to a quote char during parsing. The default value is double double quotes "".<br/>\n        </dd>\n       </dl>\n     </dd>\n     <br/>\n     <dt><b>column-widths</b></dt>\n     <dd>Specifies the column widths for fixed size text. It contains multiple column-width child elements\n        specifying the fixed width of each column, from left to right.<br/>\n        If the line has more fields than specified, they are ignored.\n     </dd>\n     <dt><b>column-positions</b></dt>\n     <dd>This is an alternative to column-widths, and specifies instead the starting position of each column.\n        Column positions are 1 based, and are specified in order from left to right.\n        The last column is read until end of line. The first column position can be greater than 1, if you want\n        to parse only a part of the input text.\n     </dd>\n     <dt><b>first-row-is-header</b></dt>\n     <dd>The presence of this element indicates that the first row is to be treated as the name of the columns.\n        If it is not present, then each field is enclosed in a &lt;column&gt; element,\n        or how it is specified in &lt;xml-nodes&gt; parameter.<br/>\n        If the first row is the header, then each field is enclosed in an element with the corresponding name from the header.<br/>\n        For example, the csv:\n        <pre>\n        <i>ID,Name,Occupation\n        1,John,student</i>\n        </pre>\n        is parsed into:\n        <pre>\n        <i>&lt;row&gt;\n        &lt;ID&gt;1&lt;/ID&gt;\n        &lt;Name&gt;John&lt;/Name&gt;\n        &lt;Occupation&gt;student&lt;/Occupation&gt;\n        &lt;/row&gt;</i>\n        </pre>\n        If the header names contain characters that cannot be used in a QName, they are replaced with underscore \'_\'.<br/>\n        The namespace for the header QNames is taken from the column name specified in xml-nodes parameter, or from\n        the row name, or if that doesn\'t exist either then empty namespace is used. <br/>\n        If the header is not the first line in the input string, the starting line can be specified in the <b>line</b> attribute.<br/>\n        If a column does not have a name, a new name is constructed in the form <i>columnN</i> where N is the position of the column,\n        starting from 1.<br/>\n        <b>Subheaders</b><br/>\n        If the header consists of more than one line, this can be specified in the <b>line</b> attribute in the form\n        "<i>first_line - last_line</i>". Having more lines as the header translates into a hierarchy of elements in the xml.<br/>\n        For example, the csv:\n        <pre>\n        <i>ID,Name,,Occupation\n        ,First Name,Last Name,\n        1,John,Howard,student</i>\n        </pre>\n        is parsed into:\n        <pre>\n        <i>&lt;row&gt;\n        &lt;ID&gt;1&lt;/ID&gt;\n        &lt;Name&gt;\n          &lt;First_Name&gt;John&lt;/First_Name&gt;\n          &lt;Last_Name&gt;Howard&lt;/Last_Name&gt;\n        &lt;/Name&gt;\n        &lt;Occupation&gt;student&lt;/Occupation&gt;\n        &lt;/row&gt;</i>\n        </pre>\n        This element can have an attribute "accept-all-lines" with values "false" or "true" (default "false").\n        When set to true it tells the parser to not report lines that do not have the same number of items as\n        the header. If set to false, the parser will raise a csv:WrongInput error for these lines.<br/>\n     </dd>\n     <dt><b>start-from-row</b></dt>\n     <dd>If the data does not start from line 1 or immediately after the header,\n        you can specify the starting line in the <b>line</b> attribute.<br/>\n        Also you can use this attribute in the form "<i>first_line - last_line</i>" to specify also the last line\n        if you don\'t want the whole csv to be parsed.\n     </dd>\n     <dt><b>add-last-void-columns</b></dt>\n     <dd>In the case when using headers and some data lines are shorter than the header, by default the excess columns are ignored\n          for those lines. You can set the add-last-void-columns parameter to make all the columns appear in xml even if they are void.\n     </dd>\n     <dt><b>xml-nodes</b></dt>\n     <dd>With this parameter you can specify the names for the row element and for the column element if there is no header.<br/>\n        The first element child of this element specifies the desired QName of the row element in the output xml.\n        The name of this element will be used as the name of the row element.<br/>\n        The element child of this row element is the column element, and its name will be used as the name of the column elements\n        that enclose the fields in the output xml if there is no header. <br/>\n        If the csv has a header, only the namespace is used from the column element.<br/>\n        For example, with parameter:\n        <pre>\n        <i>&lt;xml-nodes&gt;\n        &lt;r&gt;\n          &lt;c/&gt;\n        &lt;/r&gt;\n        &lt;/xml-nodes&gt;</i>\n        </pre>\n        the output for each line will look like:\n        <pre>\n        <i>&lt;r&gt;\n          &lt;c&gt;field1&lt;/c&gt;\n          &lt;c&gt;field2&lt;/c&gt;\n          .......\n        &lt;/r&gt;</i>\n        </pre>\n     </dd>\n    </dl>\n',summary:"<p> Parse a CSV or fixed size text and convert to XML.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"csv",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the string containing the csv or fixed size text.</div>'},{name:"options",type:"element(csv-options:options)",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> this parameter is validated against "http://zorba.io/modules/csv-options" schema. If this parameter is not specified, the row name is by default "row" and the column name is by default "column".</div>'}],returns:{type:"element(*)*",description:"a sequence of row elements, one for each line in csv"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">csv:CSV001 if the input string is streamable string and cannot be rewinded</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">csv:WrongInput if the input string has lines with variable number of items, and the csv has headers and the options do not specify the ignore-foreign-input attribute</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XQDY0027 if $options can not be validated against the csv-options schema</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XQDY0084 if the options parameter doesn\'t have the name "csv-options:options".</xqdoc:error>']},{isDocumented:!0,arity:2,name:"serialize",qname:"csv:serialize",signature:"($xml as element(*)*, $options as element(csv-options:options)?) as xs:string",description:' Convert XML into CSV or fixed size text.\n Note: if you want to serialize out the result, make sure that the serializer method is set to "text".\n For example, in zorba command line, you have to set the param --serialize-text.\n When using the <pre xmlns:xqdoc="http://www.xqdoc.org/1.0">file:write(...)</pre> function, you have to set the\n method serialization parameter to "text":\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0">\n &lt;output:serialization-parameters&lt;\n   &lt;output:method value="text"/&lt;\n &lt;/output:serialization-parameters&lt;\n </pre>\n The <pre xmlns:xqdoc="http://www.xqdoc.org/1.0">$options</pre> parameter must have the following format:\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0">\n    &lt;csv-options:options&gt;<br/>\n        &lt;csv  [separator="default comma ,"] ? <br/>\n          [quote-char="default double quotes &amp;quote;"]? <br/>\n          [quote-escape="default double double quotes &amp;quote;&amp;quote;"]? /&gt; <br/>\n        <br/>\n        or<br/>\n        &lt;column-widths [align="left|right"]?&gt;<br/>\n          &lt;column-width [align="left|right"]?&gt;<i>[column fixed width, unsigned int]</i>&lt;column-width&gt;*<br/>\n        &lt;/column-widths&gt;<br/>\n        <br/>\n        or<br/>\n        &lt;column-positions [align="left|right"]?&gt;<br/>\n          &lt;column-position [align="left|right"]?&gt;<i>[column position on line, unsigned int]</i>&lt;column-position&gt;*<br/>\n        &lt;/column-positions&gt;<br/>\n        <br/>\n        &lt;first-row-is-header/&gt;?<br/>\n    &lt;/csv-options:options&gt;\n </pre>\n All the parameters are optional and can appear in any order.<br xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n All the parameters are case sensitive. The namespace used is "http://zorba.io/modules/csv-options".<br xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n All strings must have UTF-8 encoding.<br xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Parameters csv, column-widths, column-positions are mutually exclusive.\n If none is specified, the xml is converted to csv.\n Description of parameters:\n    <dl xmlns:xqdoc="http://www.xqdoc.org/1.0">\n     <dt><b>csv</b></dt>\n     <dd> Specifies the parameters for converting to csv.<br/>\n       <dl>\n        <dt><b>separator</b></dt>\n        <dd>The character or group of characters used to separating fields in a row.\n            If it is not specified, it defaults to comma \',\'.\n        </dd>\n        <dt><b>quote-char</b></dt>\n        <dd>The character or group of characters used for quoting the fields that may contain special characters,\n             like separator, new line or this quote char. The default value is double quote ".<br/>\n        </dd>\n        <dt><b>quote-escape</b></dt>\n        <dd>The group of characters used for escaping the quote char inside a field. The whole quote escape group\n           is translated to a quote char during parsing. The default value is double double quotes "".<br/>\n        </dd>\n       </dl>\n     </dd>\n     <br/>\n     <dt><b>column-widths</b></dt>\n     <dd>Specifies the column widths for fixed size text. It contains multiple column-width child elements\n        specifying the fixed width of each column, from left to right.<br/>\n        With the attribute <b>align</b> you can specify how to align fields that are smaller than the column width.\n        The default alignment is left.<br/>\n     </dd>\n     <dt><b>column-positions</b></dt>\n     <dd>This is an alternative to column-widths, and specifies instead the starting position of each column.\n        Column positions are 1 based, and are specified in order from left to right.\n        The last column has a variable length.<br/>\n        With the attribute <b>align</b> you can specify how to align fields that are smaller than the column width.\n        The default alignment is left. The last column does not need alignment.<br/>\n     </dd>\n     <dt><b>first-row-is-header</b></dt>\n     <dd>The presence of this element indicates that the first row will contain the header, that is, the names of\n        the column elements. Only the column names from the first row element are taken into account.<br/>\n        For example, the row xml:<br/>\n        <i>&lt;row&gt;<br/>\n        &lt;ID&gt;1&lt;/ID&gt;<br/>\n        &lt;Name&gt;John&lt;/Name&gt;<br/>\n        &lt;Occupation&gt;student&lt;/Occupation&gt;<br/>\n        &lt;/row&gt;</i><br/>\n        <br/>\n        is converted to<br/>\n        <i>ID,Name,Occupation<br/>\n        1,John,student</i><br/>\n        <br/>\n        The header names are the localnames of the column elements, and the namespace is ignored.<br/>\n        <b>Subheaders</b><br/>\n        If the row-column hierarchy is more complex, then subheaders are also generated on subsequent lines.\n        The number of subheaders depends on the depth of the column hierarchy.<br/>\n        When generating the subheaders, the non-whitespace text nodes are also taken into account,\n        and a separate column is generated for them too.<br/>\n        For example, the xml row element:<br/>\n        <i>&lt;row&gt;<br/>\n        &lt;ID&gt;1&lt;/ID&gt;<br/>\n        &lt;Name&gt;<br/>\n          Mr.<br/>\n          &lt;First_Name&gt;John&lt;/First_Name&gt;<br/>\n          &lt;Last_Name&gt;Howard&lt;/Last_Name&gt;<br/>\n        &lt;/Name&gt;<br/>\n        &lt;Occupation&gt;student&lt;/Occupation&gt;<br/>\n        &lt;/row&gt;</i><br/>\n        is converted to<br/>\n        <i>ID,Name,,Occupation<br/>\n        ,,First Name,Last Name,<br/>\n        1,Mr.,John,Howard,student</i><br/>\n        <br/>\n        If first-row-is-header is not specified and the columns have a deeper hierarchy,\n          only the first layer of columns is processed, and the fields are the string values of each column.<br/>\n        This element can have an attribute "ignore-foreign-input" with values "false" or "true" (default "false").\n        When set to true it tells the serializer to ignore elements that to not match the header names.\n        If set to false, the serializer will raise a csv:ForeignInput error for these elements.<br/>\n     </dd>\n    </dl>\n',summary:"<p> Convert XML into CSV or fixed size text.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"xml",type:"element(*)",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of elements, each element representing a row. The name of each row element is ignored. The childs of each row are the column fields.</div>'},{name:"options",type:"element(csv-options:options)",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The options parameter. See the function description for details. This parameter is validated against "http://zorba.io/modules/csv-options" schema.</div>'}],returns:{type:"xs:string",description:"the csv or fixed size text as string containing all the lines"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">csv:CSV003 if the serialize output is streamable string and cannot be reset</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">csv:ForeignInput if there are input elements in subsequent rows that do not match the headers, and the options specify first-row-is-header and do not specify the ignore-foreign-input attribute</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XQDY0027 if $options can not be validated against csv-options schema</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XQDY0084 if the options parameter doesn\'t have the name "csv-options:options".</xqdoc:error>']}],variables:[]},"http://zorba.io/modules/reference":{ns:"http://zorba.io/modules/reference",description:" The module provides functions to compute an immutable and opaque reference\n for nodes, objects, or arrays and to retrieve such items given their\n identifier, respectively.\n The identifiers are immutable, i.e. a identifier does not change\n during the items lifetime and cannot be reused for another item after the\n original item gets deleted.\n Identifiers are unique, in that, two different items will never have the same\n identifier. A item, at any time during its lifetime, can be retrieved by its\n identifier.\n",sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Matthias Brantner</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/modules/reference",prefix:"ref"},{uri:"http://zorba.io/options/versioning",prefix:"ver"},{uri:"http://zorba.io/errors",prefix:"zerr"}],functions:[{isDocumented:!0,arity:1,name:"dereference",qname:"ref:dereference",signature:"($arg as xs:string) as item()? external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the node, object, or array identified by the given reference.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function returns the empty sequence if the item\n that is referenced does not exist.</p>\n',summary:"<p>  Returns the node, object, or array identified by the given reference.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the URI of the item to retrieve.</div>'}],returns:{type:"item()?",description:"the item identified by the URI passed as parameter or the empty-sequence if no item with that URI is found."},errors:[]},{isDocumented:!0,arity:1,name:"reference",qname:"ref:reference",signature:"($arg as item()) as xs:string external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns an immutable and opaque reference (with type xs:anyURI) for\n a given node, object, or array.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The generated identifier is immutable, i.e. a identifier does not\n change during the item\'s lifetime and cannot be reused for another node after\n the original item gets deleted.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Identifiers are also unique, in that, two different items will never\n have the same identifier.</p>\n A item, at any time during its lifetime, can be retrieved by its\n identifier, using the <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">ref:dereference</tt> function.\n Please note that a reference can only be retrieved for a JSON object or JSON\n array if the item is a member of a collection.\n',summary:"<p>  Returns an immutable and opaque reference (with type xs:anyURI) for\n a given node, object, or array.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the node, object, or array for which the URI should be computed</div>'}],returns:{type:"xs:string",description:"the opaque URI of the item."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr::ZAPI0080 is raised if the object or array passed as argument is not a member of a collection.</xqdoc:error>']}],variables:[]},"http://zorba.io/modules/dctx":{ns:"http://zorba.io/modules/dctx",description:" This module provides functions that gets components of the dynamic context.\n",sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Federico Cavalieri</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/modules/dctx",prefix:"dctx"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:0,name:"snapshot-id",qname:"dctx:snapshot-id",signature:"() as xs:unsignedLong external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves the current snapshot id.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The returned id is opaque and should not be used for reasoning about time.\n The only guarantee is that the value returned by this function increases each\n time a snapshot finishes.</p>\n',summary:"<p>  Retrieves the current snapshot id.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:unsignedLong",description:"the current snapshot id."},errors:[]}],variables:[]},"http://xbrl.io/modules/bizql/facts":{ns:"http://xbrl.io/modules/bizql/facts",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This module provides functions for retrieving facts.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Facts are the smallest reportable piece of information.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Facts have a certain number of characteristics: the archive in\n which they were reported, a number of XBRL aspects (concept, entity, period,\n unit, further XBRL dimensions), as well as profile-specific information.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">With this module, you can retrieve facts by picking the characteristics\n you would like your results to have. You can retrieve a fact with its FID\n (Fact ID). You can extract information about facts (period, entity, etc).\n You can perform a full-text search on fact values, and obtain footnotes.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If you are interested in the structures in which facts can be organized (such\n as hypercubes), look at the components module.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Facts are stored in a MongoDB datasource called <b>xbrl</b>.</p>\n <h2 xmlns:xqdoc="http://www.xqdoc.org/1.0" id="standard_options">Standard <code>$options</code> Parameter</h2>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Most functions in the BizQL package allow an additional <code>$options</code>\n    parameter. The options parameter is a JSON object allowing the following\n    fields:</p>\n <ul xmlns:xqdoc="http://www.xqdoc.org/1.0">\n <li><b>Hypercube</b>: a hypercube object can be passed with the options to apply\n     implicit filtering for it. Only facts belonging to this hypercube will be\n     returned. Hypercube semantics (such as default dimension values) apply.\n     By default, the dimensionless hypercube is used (no dimensions allowed, no filtering).\n     You can override Hypercube with null to bypass hypercube semantics.</li>\n <li><b>Filter</b>: an object specifying the fields to filter for. Filtering fields\n     can be any field contained in facts, including profile specific fields, e.g.:\n     <pre class="ace-static" ace-mode="java">\n   {\n     Filter:\n       {\n         Archive: "0000034088-13-000011",\n         Aspects:\n         {\n           "us-gaap:DefinedBenefitPlansDisclosuresDefinedBenefitPlansAxis" :\n             "us-gaap:ForeignPensionPlansDefinedBenefitMember"\n         },\n         Profiles: {\n           SEC: {\n             Fiscal: {\n               Year: [2011, 2012]\n             }\n           }\n         }\n       }\n   }\n   </pre>\n   A filter must contain at least on of the fields Archive, Aspects.xbrl:Concept,\n   Aspects.xbrl:Period, or Aspects.xbrl:Entity.</li>\n <li><b>concept-maps</b>:\n   <ol><li>a string which is a name of a report schema that is stored in the\n       reportschemas collection and from which to load a ConceptMap</li>\n       <li>an object which is a ConceptMap network object</li>\n       <li>an array of ConceptMap network objects (to learn more about concept-maps\n       refer to the concept-maps module documentation)</li>\n   </ol></li>\n <li><b>Rules</b>:\n   <ol><li>a string which is a name of a report schema that is stored in the\n       reportschemas collection and from which to load Rules</li>\n       <li>an object which is a Rule object</li>\n       <li>an array of Rule objects</li>\n   </ol></li>\n <li><b>include-footnotes</b>: include XBRL Footnotes in each fact (true | false)</li>\n <li><b>Lang</b>: language identifier according to http://www.ietf.org/rfc/rfc3066.txt,\n     i.e. only return footnotes etc. for this specific language</li>\n <li><b>audit-trail</b>: if set to "debug" the audit trails will be more verbose</li>\n <li><b>facts-for-archives-and-concept</b>: to override how underlying facts are\n     resolved, for example with finer-grained, profile-specific filtering (option value\n     must be a function item). facts:facts-for-archives-and-concepts#3 is used by\n     default, but it is possible to supply another function that, for examples, filters\n     irrelevant facts out.</li>\n </ul>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Charles Hoffman</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Matthias Brantner</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Dennis Knochenwefel</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Ghislain Fourny</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://xbrl.io/modules/bizql/archives",prefix:"archives"},{uri:"http://xbrl.io/modules/bizql/concept-maps",prefix:"concept-maps"},{uri:"http://www.28msec.com/modules/credentials",prefix:"credentials"},{uri:"http://xbrl.io/modules/bizql/entities",prefix:"entities"},{uri:"http://xbrl.io/modules/bizql/facts",prefix:"facts"},{uri:"http://xbrl.io/modules/bizql/footnotes",prefix:"footnotes"},{uri:"http://xbrl.io/modules/bizql/hypercubes",prefix:"hypercubes"},{uri:"http://jsoniq.org/function-library",prefix:"j"},{uri:"http://www.28msec.com/modules/mongodb",prefix:"mongo"},{uri:"http://zorba.io/modules/reflection",prefix:"reflection"},{uri:"http://xbrl.io/modules/bizql/rules",prefix:"rules"},{uri:"http://zorba.io/modules/string",prefix:"string"},{uri:"http://zorba.io/options/versioning",prefix:"ver"},{uri:"http://zorba.io/modules/zorba-query",prefix:"zq"}],functions:[{isDocumented:!0,arity:1,name:"concept-for-fact",qname:"facts:concept-for-fact",signature:"($fact-or-id as item()) as string",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves the concept against which a fact is reported.</p>\n',summary:"<p>  Retrieves the concept against which a fact is reported.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"fact-or-id",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a fact or its FID.</div>'}],returns:{type:"string",description:"the concept name."},errors:[]},{isDocumented:!0,arity:1,name:"decimal-value",qname:"facts:decimal-value",signature:"($facts as object()*) as decimal",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the value of the given facts in case that it\n    is castable to decimal. If no facts are given or a fact value\n    is not castable to decimal 0 is returned instead.</p>\n',summary:"<p>  Returns the value of the given facts in case that it\n    is castable to decimal.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"facts",type:"object()",occurrence:"*",description:""}],returns:{type:"decimal",description:"the decimal value of the facts or 0."},errors:[]},{isDocumented:!0,arity:1,name:"duration-for-fact",qname:"facts:duration-for-fact",signature:"($fact-or-id as item()) as object()?",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves the duration period for which a fact was reported.</p>\n',summary:"<p>  Retrieves the duration period for which a fact was reported.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"fact-or-id",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a fact or its FID.</div>'}],returns:{type:"object()?",description:"the duration period as an object with Start and End, or the empty sequence if it is not instant."},errors:[]},{isDocumented:!0,arity:1,name:"entity-for-fact",qname:"facts:entity-for-fact",signature:"($fact-or-id as item()) as string",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves the eid of the entity who reported a fact.</p>\n',summary:"<p>  Retrieves the eid of the entity who reported a fact.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"fact-or-id",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a fact or its FID.</div>'}],returns:{type:"string",description:"the eid."},errors:[]},{isDocumented:!0,arity:2,name:"facts-for-archives-and-aspects",qname:"facts:facts-for-archives-and-aspects",signature:"($archives-or-ids as item()*, $aspects as object()) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Return all facts reported in a given archive, and associated with a\n given entity, concept, period and/or other aspects.</p>\n',summary:"<p>  Return all facts reported in a given archive, and associated with a\n given entity, concept, period and/or other aspects.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"archives-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of archive or archive IDs to filter (or $facts:ALL_OF_THEM to do not filter on archives).</div>'},{name:"aspects",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> an object containing aspects to filter, among which xbrl:Concept, xbrl:Entity and xbrl:Period (at least one of them is mandatory).</div>'}],returns:{type:"object()*",description:"all facts satisfying all supplied conditions."},errors:[]},{isDocumented:!0,arity:3,name:"facts-for-archives-and-aspects",qname:"facts:facts-for-archives-and-aspects",signature:"($archives-or-ids as item()*, $aspects as object(), $options as object()?) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Return all facts associated with a given entity, concept, period\n and/or other aspects.</p>\n',summary:"<p>  Return all facts associated with a given entity, concept, period\n and/or other aspects.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"archives-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of archive or archive IDs to filter (or $facts:ALL_OF_THEM to do not filter on archives).</div>'},{name:"aspects",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> an object containing aspects to filter, among which xbrl:Concept, xbrl:Entity and xbrl:Period (all optional).</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> <a href="#standard_options">standard fact retrieving options</a>.</div>'}],returns:{type:"object()*",description:"all facts satisfying all supplied conditions."},errors:[]},{isDocumented:!0,arity:2,name:"facts-for-archives-and-concepts",qname:"facts:facts-for-archives-and-concepts",signature:"($archives-or-ids as item()*, $concepts as item()*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Return facts associated with given concepts and archives.</p>\n',summary:"<p>  Return facts associated with given concepts and archives.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"archives-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of archive or archive IDs to filter (or $facts:ALL_OF_THEM to do not filter on archives).</div>'},{name:"concepts",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the concepts (or $facts:ALL_OF_THEM to do no filter on concepts).</div>'}],returns:{type:"object()*",description:"facts associated with these concepts and archives."},errors:[]},{isDocumented:!0,arity:3,name:"facts-for-archives-and-concepts",qname:"facts:facts-for-archives-and-concepts",signature:"($archives-or-ids as item()*, $concepts as item()*, $options as object()?) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Return facts associated with given concepts and archives.</p>\n',summary:"<p>  Return facts associated with given concepts and archives.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"archives-or-ids",type:"item()",occurrence:"*",description:""},{name:"concepts",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the concepts (or $facts:ALL_OF_THEM to do no filter on concepts).</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> <a href="#standard_options">standard fact retrieving options</a>.</div>'}],returns:{type:"object()*",description:"facts associated with these concepts."},errors:[]},{isDocumented:!0,arity:1,name:"facts-for-archives",qname:"facts:facts-for-archives",signature:"($archives-or-ids as item()*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Return all facts reported within a given archive.</p>\n',summary:"<p>  Return all facts reported within a given archive.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"archives-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of archives or AIDs to filter.</div>'}],returns:{type:"object()*",description:"all facts reported in these archives."},errors:[]},{isDocumented:!0,arity:1,name:"facts-for-aspects",qname:"facts:facts-for-aspects",signature:"($aspects as object()) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Return all facts associated with the given aspects.</p>\n',summary:"<p>  Return all facts associated with the given aspects.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"aspects",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> an object containing aspects to filter, among which xbrl:Concept, xbrl:Entity and xbrl:Period (at least one of them is mandatory).</div>'}],returns:{type:"object()*",description:"all facts associated with these aspects."},errors:[]},{isDocumented:!0,arity:2,name:"facts-for-aspects",qname:"facts:facts-for-aspects",signature:"($aspects as object(), $options as object()?) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Return all facts associated with the given aspects.</p>\n',summary:"<p>  Return all facts associated with the given aspects.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"aspects",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> an object containing aspects to filter, among which xbrl:Concept, xbrl:Entity and xbrl:Period (at least one of them is mandatory).</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> <a href="#standard_options">standard fact retrieving options</a>.</div>'}],returns:{type:"object()*",description:"all facts associated with these aspects."},errors:[]},{isDocumented:!0,arity:1,name:"facts-for-concepts",qname:"facts:facts-for-concepts",signature:"($concepts as string*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Return facts associated with given concepts.</p>\n',summary:"<p>  Return facts associated with given concepts.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"concepts",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the concepts.</div>'}],returns:{type:"object()*",description:"facts associated with these concepts."},errors:[]},{isDocumented:!0,arity:2,name:"facts-for-concepts",qname:"facts:facts-for-concepts",signature:"($concepts as string*, $options as object()?) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Return facts associated with given concepts.</p>\n',summary:"<p>  Return facts associated with given concepts.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"concepts",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the concepts.</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> <a href="#standard_options">standard fact retrieving options</a>.</div>'}],returns:{type:"object()*",description:"facts associated with these concepts."},errors:[]},{isDocumented:!0,arity:1,name:"facts-for-entities",qname:"facts:facts-for-entities",signature:"($entities-or-ids as item()*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Return facts reported by the given entities.</p>\n',summary:"<p>  Return facts reported by the given entities.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"entities-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the entities or EIDs.</div>'}],returns:{type:"object()*",description:"facts reported by the given entities."},errors:[]},{isDocumented:!0,arity:1,name:"facts-for",qname:"facts:facts-for",signature:"($options as object()?) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Return all facts that match a given filter object optionally interpreted\n    in the context of an optionally given hypercube.</p>\n',summary:"<p>  Return all facts that match a given filter object optionally interpreted\n    in the context of an optionally given hypercube.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> <a href="#standard_options">standard fact retrieving options</a>.</div>'}],returns:{type:"object()*",description:"all facts satisfying the filter and options."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">facts:FILTER-TOO-GENERIC The filter object must have at least one of the fields Archive, Aspects.xbrl:Concept, Aspects.xbrl:Period, or Aspects.xbrl:Entity.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"facts-search",qname:"facts:facts-search",signature:"($search as string) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Return all facts that match the given search term.</p>\n',summary:"<p>  Return all facts that match the given search term.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"search",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the search query</div>'}],returns:{type:"object()*",description:"all facts matching the given search query"},errors:[]},{isDocumented:!0,arity:1,name:"facts",qname:"facts:facts",signature:"($fact-or-ids as item()*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Return the fact with the given FIDs.</p>\n',summary:"<p>  Return the fact with the given FIDs.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"fact-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the FIDs or the facts themselves.</div>'}],returns:{type:"object()*",description:"the facts with the given FIDs the empty sequence if no fact was found or if the input is an empty sequence."},errors:[]},{isDocumented:!0,arity:1,name:"fid",qname:"facts:fid",signature:"($facts-or-ids as item()*) as atomic*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Converts the input to a normalized fact id (FID). The input\n can be either an FID, or a fact object which contains an _id.</p>\n',summary:"<p>  Converts the input to a normalized fact id (FID).</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"facts-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of fact objects or FIDs.</div>'}],returns:{type:"atomic*",description:"the normalized FIDs."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">facts:INVALID-PARAMETER if the FID or fact is not valid.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"instant-for-fact",qname:"facts:instant-for-fact",signature:"($fact-or-id as item()) as atomic?",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves the instant period for which a fact was reported.</p>\n',summary:"<p>  Retrieves the instant period for which a fact was reported.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"fact-or-id",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a fact or its FID.</div>'}],returns:{type:"atomic?",description:"the instance period, or the empty sequence if it is not instant."},errors:[]},{isDocumented:!0,arity:1,name:"is-fact-forever",qname:"facts:is-fact-forever",signature:"($fact-or-id as item()) as boolean",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Tests whether a fact is reported forever.</p>\n',summary:"<p>  Tests whether a fact is reported forever.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"fact-or-id",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a fact or its FID.</div>'}],returns:{type:"boolean",description:"true if its period is forever, false otherwise."},errors:[]},{isDocumented:!0,arity:3,name:"merge-objects",qname:"facts:merge-objects",signature:"($o1 as object()?, $o2 as object()?, $prioritize-first-object as boolean) as object()?",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Helper function to deep-merge two objects. If the two given objects have\n    fields with the same name they are merged, which means:\n      1. if the values of the fields are objects then these are merged\n      2. in any other case the fields are accumulated into an array.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The third parameter can be used to priotitize the first object. If the first\n    object is prioritized and both objects contain fields with the same name,\n    the fields are either merged (in case of two object values) or the value of\n    the first object is taken.</p>\n',summary:"<p>  Helper function to deep-merge two objects.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"o1",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> first object</div>'},{name:"o2",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> second object</div>'},{name:"prioritize-first-object",type:"boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> boolean flag to give the first object higher priority in the merge</div>'}],returns:{type:"object()?",description:"one merge object or an empty-sequence (in case both input objects are empty)."},errors:[]},{isDocumented:!0,arity:1,name:"populate-with-footnotes",qname:"facts:populate-with-footnotes",signature:"($fact-or-ids as item()*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Populates a sequence of facts with their associated footnotes.\n More in detail, in each returned fact object an additional field\n Footnotes is added which contains all connected footnotes in an\n array.</p>\n',summary:"<p>  Populates a sequence of facts with their associated footnotes.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"fact-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the FIDs or the facts themselves.</div>'}],returns:{type:"object()*",description:"a sequence of facts with populated Footnotes field."},errors:[]},{isDocumented:!0,arity:2,name:"populate-with-footnotes",qname:"facts:populate-with-footnotes",signature:"($fact-or-ids as item()*, $options as object()?) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Populates a sequence of facts with their associated footnotes.\n More in detail, in each returned fact object an additional field\n Footnotes is added which contains all connected footnotes in an\n array.</p>\n',summary:"<p>  Populates a sequence of facts with their associated footnotes.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"fact-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the FIDs or the facts themselves.</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> <a href="#standard_options">standard fact retrieving options</a>.</div>'}],returns:{type:"object()*",description:"a sequence of facts with populated Footnotes field."},errors:[]},{isDocumented:!0,arity:1,name:"prefix-from-fact-concept",qname:"facts:prefix-from-fact-concept",signature:"($fact as object()) as string?",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Helper function to get the prefix of a given fact`s xbrl:Concept aspect.</p>\n',summary:"<p>  Helper function to get the prefix of a given fact`s xbrl:Concept aspect.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"fact",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a fact object.</div>'}],returns:{type:"string?",description:"the prefix of the fact's xbrl:Concept aspect or empty sequence if the concept doesn't have a prefix."},errors:[]}],variables:[{name:"facts:col",type:"string",description:" Name of the collection the facts are stored in.\n"},{name:"facts:ID",type:"string",description:" Name of the field that points to the facts FID.\n"},{name:"facts:ARCHIVE",type:"string",description:" Name of the field that points to the archive.\n"},{name:"facts:ASPECTS",type:"string",description:" Name of the field that stores the aspects.\n"},{name:"facts:CONCEPT",type:"string",description:" Name of the concept aspect.\n"},{name:"facts:PERIOD",type:"string",description:" Name of the period aspect.\n"},{name:"facts:ENTITY",type:"string",description:" Name of the entity aspect.\n"},{name:"facts:UNIT",type:"string",description:" Name of the unit aspect.\n"},{name:"facts:FOOTNOTES",type:"string",description:" Name of the field that stores the Footnotes (if populated).\n"},{name:"facts:ALL_OF_THEM",type:"boolean",description:" Joker for all archives or all concepts.\n"}]},"http://www.w3.org/2005/xqt-errors":{ns:"http://www.w3.org/2005/xqt-errors",description:" This module contains one variable declaration for each diagnostic of the\n http://www.w3.org/2005/xqt-errors namespace.\n The variables serves as documentation for the errors but can also\n be used in the code. For example, one useful scenario is to compare\n an error caught in the catch clause of a try-catch expression with one of\n the variables.\n",sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Carlos Lopez</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://www.w3.org/2005/xqt-errors",prefix:"err"}],functions:[],variables:[{name:"err:FORG0006",type:"xs:QName",description:" Invalid argument type.\n"},{name:"err:FODF1280",type:"xs:QName",description:" Invalid decimal format name supplied to \\c fn:format-number().\n"},{name:"err:FODF1310",type:"xs:QName",description:" Invalid decimal/integer format picture string.\n"},{name:"err:FODT0001",type:"xs:QName",description:" Overflow/underflow in date/time operation.\n"},{name:"err:FODT0002",type:"xs:QName",description:" Overflow/underflow in duration operation.\n"},{name:"err:FODT0003",type:"xs:QName",description:" Invalid timezone value.\n"},{name:"err:FONS0004",type:"xs:QName",description:" No namespace found for prefix.\n"},{name:"err:FONS0005",type:"xs:QName",description:" Base-URI not defined in static context.\n"},{name:"err:FORG0001",type:"xs:QName",description:" Invalid value for cast/constructor.\n"},{name:"err:FORG0002",type:"xs:QName",description:" Invalid argument to \\c fn:resolve-uri().\n"},{name:"err:FORG0003",type:"xs:QName",description:" \\c fn:zero-or-one() called with a sequence containing more than one\n item.\n"},{name:"err:FORG0004",type:"xs:QName",description:" \\c fn:one-or-more() called with a sequence containing no items.\n"},{name:"err:FORG0005",type:"xs:QName",description:" \\c fn:exactly-one() called with a sequence containing zero or more\n than one item.\n"},{name:"err:FODC0007",type:"xs:QName",description:" Base URI passed to \\c fn:parse() is not a valid absolute URI.\n"},{name:"err:FORG0008",type:"xs:QName",description:" The two arguments to fn:dateTime() have inconsistent timezones.\n"},{name:"err:FORG0009",type:"xs:QName",description:" Error in resolving a relative URI against a base URI in\n \\c fn:resolve-uri().\n"},{name:"err:FORX0001",type:"xs:QName",description:" Invalid regular expression flags.\n"},{name:"err:FORX0002",type:"xs:QName",description:" Invalid regular expression.\n"},{name:"err:FORX0003",type:"xs:QName",description:" Regular expression matches zero-length string.\n"},{name:"err:FORX0004",type:"xs:QName",description:" Invalid replacement string.\n"},{name:"err:FOTY0012",type:"xs:QName",description:" Argument node does not have a typed value.\n"},{name:"err:FOTY0013",type:"xs:QName",description:" An argument to \\c fn:data() contains a node that does not have a typed\n value.\n"},{name:"err:FOTY0014",type:"xs:QName",description:" The argument to \\c fn:string() is a function item.\n"},{name:"err:FOTY0015",type:"xs:QName",description:" An argument to \\c fn:deep-equal() contains a function item.\n"},{name:"err:FOUT1170",type:"xs:QName",description:" Identifier cannot be used to retrive a resource containing text\n"},{name:"err:FOCA0005",type:"xs:QName",description:" NaN supplied as float/double value.\n"},{name:"err:FTDY0016",type:"xs:QName",description:" It is a dynamic error if a weight value is not within the required range\n of values; it is also a dynamic error if an implementation that does not\n support negative weights encounters a negative weight value.\n"},{name:"err:FTDY0017",type:"xs:QName",description:" It is a dynamic error if an implementation encounters a mild not\n selection, one of whose operands evaluates to an AllMatches that\n contains a StringExclude.\n"},{name:"err:FTST0018",type:"xs:QName",description:" It is a static error if, during the static analysis phase, the query is\n found to contain a thesaurus option that refers to a thesaurus that is\n not found in the statically known thesauri.\n"},{name:"err:FTST0019",type:"xs:QName",description:" It is a static error if, within a single FTMatchOptions, there is more\n than one match option of any given match option group.\n"},{name:"err:FTDY0020",type:"xs:QName",description:' It is a dynamic error if, when "wildcards" is in effect, a query string\n violates wildcard syntax.\n'},{name:"err:FOER0000",type:"xs:QName",description:" Unidentified error.\n"},{name:"err:FOAR0001",type:"xs:QName",description:" Division by zero.\n"},{name:"err:FOAR0002",type:"xs:QName",description:" Numeric operation overflow/underflow.\n"},{name:"err:FOCA0001",type:"xs:QName",description:" Input value too large for decimal.\n"},{name:"err:FOCA0002",type:"xs:QName",description:" Invalid lexical value.\n"},{name:"err:FOCA0003",type:"xs:QName",description:" Input value too large for integer.\n"},{name:"err:FOUT1190",type:"xs:QName",description:" Retrieved resource contains octets that cannot be decoded into Unicode\n using the specified encoding, the resulting characters are not\n permitted XML characters or requested encoding not supported\n"},{name:"err:FOCA0006",type:"xs:QName",description:" Raised when casting a string to xs:decimal if the string has more\n digits of precision than the implementation can represent (the\n implementation also has the option of rounding).\n"},{name:"err:FOCH0001",type:"xs:QName",description:" Code point not valid.\n"},{name:"err:FOCH0002",type:"xs:QName",description:" Unsupported collation.\n"},{name:"err:FOCH0003",type:"xs:QName",description:" Unsupported normalization form.\n"},{name:"err:FOCH0004",type:"xs:QName",description:" Collation does not support collation units.\n"},{name:"err:FODC0001",type:"xs:QName",description:" No context document.\n"},{name:"err:FODC0002",type:"xs:QName",description:" Error retrieving resource.\n"},{name:"err:FODC0003",type:"xs:QName",description:" Raised by fn:doc, fn:collection to indicate that it is not possible to\n return a result that is guaranteed deterministic.\n"},{name:"err:FODC0004",type:"xs:QName",description:" Invalid argument to \\c fn:collection().\n"},{name:"err:FODC0005",type:"xs:QName",description:" Invalid argument to \\c fn:doc() or \\c fn:doc-available().\n"},{name:"err:FODC0006",type:"xs:QName",description:" Invalid content passed to \\c fn:parse().\n"},{name:"err:SERE0005",type:"xs:QName",description:" It is an error if the serialized result would contain an NCName Names\n that contains a character that is not permitted by the version of\n Namespaces in XML specified by the version parameter.\n"},{name:"err:XUDY0024",type:"xs:QName",description:" It is a dynamic error if the effect of a set of updating expressions is\n to introduce conflicting namespace bindings into an element node.\n"},{name:"err:XUDY0027",type:"xs:QName",description:" It is a dynamic error if the target expression of an insert, replace, or\n rename expression evaluates to an empty sequence.\n"},{name:"err:XUST0028",type:"xs:QName",description:" It is a static error if a function declaration specifies both \\c updating\n and a return type.\n"},{name:"err:XUDY0029",type:"xs:QName",description:" In an insert expression where \\c before or \\c after is specified, it is\n a dynamic error if the node returned by the target expression does not\n have a parent.\n"},{name:"err:XUDY0030",type:"xs:QName",description:" It is a dynamic error if an insert expression specifies the insertion of\n an attribute node before or after a child of a document node.\n"},{name:"err:XUDY0031",type:"xs:QName",description:" It is a dynamic error if multiple calls to \\c fn:put() in the same\n snapshot specify the same URI (after resolution of relative URIs).\n"},{name:"err:FOUP0001",type:"xs:QName",description:" It is a dynamic error if the first operand of \\c fn:put() is not a node\n of a supported kind.\n"},{name:"err:FOUP0002",type:"xs:QName",description:" It is a dynamic error if the second operand of \\c fn:put() is not a valid\n lexical representation of the \\c xs:anyURI type.\n"},{name:"err:SENR0001",type:"xs:QName",description:" It is an error if an item in S6 in sequence normalization is an attribute\n node or a namespace node.\n"},{name:"err:SERE0003",type:"xs:QName",description:" It is an error if the serializer is unable to satisfy the rules for\n either a well-formed XML document entity or a well-formed XML external\n general parsed entity, or both, except for content modified by the\n character expansion phase of serialization.\n"},{name:"err:SEPM0004",type:"xs:QName",description:" It is an error to specify the doctype-system parameter, or to specify\n the standalone parameter with a value other than omit, if the instance\n of the data model contains text nodes or multiple element nodes as\n children of the root node.\n"},{name:"err:XUDY0023",type:"xs:QName",description:" It is a dynamic error if an insert, replace, or rename expression\n affects an element node by introducing a new namespace binding that\n conflicts with one of its existing namespace bindings.\n"},{name:"err:SERE0006",type:"xs:QName",description:" It is an error if the serialized result would contain a character that is\n not permitted by the version of XML specified by the version parameter.\n"},{name:"err:SESU0007",type:"xs:QName",description:" It is an error if an output encoding other than UTF-8 or UTF-16 is\n requested and the serializer does not support that encoding.\n"},{name:"err:SERE0008",type:"xs:QName",description:" It is an error if a character that cannot be represented in the encoding\n that the serializer is using for output appears in a context where\n character references are not allowed (for example if the character\n occurs in the name of an element).\n"},{name:"err:SEPM0009",type:"xs:QName",description:" It is an error if the omit-xml-declaration parameter has the value yes,\n and the standalone attribute has a value other than omit; or the version\n parameter has a value other than 1.0 and the doctype-system parameter is\n specified.\n"},{name:"err:SEPM0010",type:"xs:QName",description:" It is an error if the output method is xml, the value of the\n undeclare-prefixes parameter is yes, and the value of the version\n parameter is 1.0.\n"},{name:"err:SESU0011",type:"xs:QName",description:" It is an error if the value of the normalization-form parameter\n specifies a normalization form that is not supported by the serializer.\n"},{name:"err:SERE0012",type:"xs:QName",description:" It is an error if the value of the normalization-form parameter is\n fully-normalized and any relevant construct of the result begins with a\n combining character.\n"},{name:"err:SESU0013",type:"xs:QName",description:" It is an error if the serializer does not support the version of XML or\n HTML specified by the version parameter.\n"},{name:"err:SERE0014",type:"xs:QName",description:" It is an error to use the HTML output method when characters which are\n legal in XML but not in HTML, specifically the control characters\n #x7F-#x9F, appear in the instance of the data model.\n"},{name:"err:SERE0015",type:"xs:QName",description:" It is an error to use the HTML output method when \\c &gt; appears within a\n processing instruction in the data model instance being serialized.\n"},{name:"err:SEPM0016",type:"xs:QName",description:" It is a an error if a parameter value is invalid for the defined domain.\n"},{name:"err:XUTY0010",type:"xs:QName",description:" In a replace expression where value of is not specified and\n the target is an element, text, comment, or processing instruction node,\n it is a type error if the replacement sequence does not consist of zero\n or more element, text, comment, or processing instruction nodes.\n"},{name:"err:FOFL0001",type:"xs:QName",description:" This error is raised if the fn:function-lookup returns a context-dependent function and the context-dependent function is then called.\n"},{name:"err:FOCZ0001",type:"xs:QName",description:" Invalid content passed to \\c x:canonicalize().\n"},{name:"err:XUST0001",type:"xs:QName",description:" It is a static error if an updating expression is used in any position\n other than one of the following:\n - The topmost expression in the body of a query.\n - The \\c modify clause of a transform expression.\n - The \\c return clause of a FLWOR expression.\n - The \\c return clauses of a typeswitch expression in which every \\c\n return clause contains an updating expression or a vacuous expression.\n - The \\c then and \\c else clauses of a conditional statement in which\n both the \\c then and \\c else clauses contain either an updating\n expression or a vacuous expression.\n - An operand of a comma expression in which each operand is either an\n updating expression or a vacuous expression.\n - The content of a parenthesized expression.\n - The body of a function declaration in which the keyword \\c updating is\n specified.\n"},{name:"err:XUST0002",type:"xs:QName",description:" It is a static error if a simple expression that is not a vacuous\n expression is used in one of the following positions:\n - The \\c modify clause of a transform expression.\n - The top-level expression in the body of a function declaration in\n which the keyword \\c updating is specified.\n"},{name:"err:XUST0003",type:"xs:QName",description:" It is a static error if a Prolog contains more than one revalidation\n declaration.\n"},{name:"err:XUTY0004",type:"xs:QName",description:" It is a type error if the insertion sequence of an insert expression\n contains an attribute node following a node that is not an attribute\n node.\n"},{name:"err:XUTY0005",type:"xs:QName",description:" In an insert expression where into, as first\n into, or as last into is specified, it is a type\n error if the target expression returns a non-empty result that does not\n consist of a single element or document node.\n"},{name:"err:XUTY0006",type:"xs:QName",description:" In an insert expression where \\c before or \\c after is specified, it is\n a type error if the target expression returns a non-empty result that\n does not consist of a single element, text, comment, or processing\n instruction node.\n"},{name:"err:XUTY0007",type:"xs:QName",description:" It is a type error if the target expression of a delete expression does\n not return a sequence of zero or more nodes.\n"},{name:"err:XUTY0008",type:"xs:QName",description:" In a replace expression, it is a type error if the target expression\n returns a non-empty result that does not consist of a single element,\n attribute, text, comment, or processing instruction node.\n"},{name:"err:XUDY0009",type:"xs:QName",description:" In a replace expression where value of is not specified, it\n is a dynamic error if the node returned by the target expression does\n not have a parent.\n"},{name:"err:FTST0009",type:"xs:QName",description:" It may be a static error if, during the static analysis phase, the query\n is found to contain a language identifier in a language option that the\n implementation does not support. The implementation may choose not to\n raise this error and instead provide some other implementation-defined\n behavior.\n"},{name:"err:XUTY0011",type:"xs:QName",description:" In a replace expression where value of is not specified and\n the target is an attribute node, it is a type error if the replacement\n sequence does not consist of zero or more attribute nodes.\n"},{name:"err:XUTY0012",type:"xs:QName",description:" In a rename expression, it is a type error if the target expression\n returns a non-empty result that does not consist of a single element,\n attribute, or processing instruction node.\n"},{name:"err:XUTY0013",type:"xs:QName",description:" In a transform expression, it is a type error if a source expression in\n the \\c copy clause does not return a single node.\n"},{name:"err:XUDY0014",type:"xs:QName",description:" In a transform expression, it is a dynamic error if the \\c modify clause\n modifies any node that was not created by the \\c copy clause.\n"},{name:"err:XUDY0015",type:"xs:QName",description:" It is a dynamic error if any node is the target of more than one \\c\n rename expression within the same query.\n"},{name:"err:XUDY0016",type:"xs:QName",description:" It is a dynamic error if any node is the target of more than one \\c\n replace expression (without value of being specified)\n within the same query.\n"},{name:"err:XUDY0017",type:"xs:QName",description:" It is a dynamic error if any node is the target of more than one\n replace value of expression within the same query.\n"},{name:"err:XUDY0018",type:"xs:QName",description:" It is a dynamic error if a function that was declared to be \\c external\n but not \\c updating returns a non-empty pending update list.\n"},{name:"err:XUDY0019",type:"xs:QName",description:" It is a dynamic error if a function that was declared to be both \\c\n external and \\c updating returns a non-empty data model instance.\n"},{name:"err:XUDY0021",type:"xs:QName",description:" It is a dynamic error if the XDM instance that would result from\n applying all the updates in a query violates any constraint specified in\n [XQuery 1.0 and XPath 2.0 Data Model]. In this case, none of the updates\n in the query are made effective.\n"},{name:"err:XUTY0022",type:"xs:QName",description:" It is a type error if an insert expression specifies the insertion of an\n attribute node into a document node.\n"},{name:"err:XQST0052",type:"xs:QName",description:" The type must be the name of a type defined in the in-scope schema types,\n and the {variety} of the type must be simple.\n"},{name:"err:XQST0033",type:"xs:QName",description:" It is a static error if a module contains multiple bindings for the same\n namespace prefix.\n"},{name:"err:XQST0034",type:"xs:QName",description:" It is a static error if multiple functions declared or imported by a\n module have the same number of arguments and their expanded QNames are\n equal (as defined by the eq operator).\n"},{name:"err:XQST0035",type:"xs:QName",description:" It is a static error to import two schema components that both define the\n same name in the same symbol space and in the same scope.\n"},{name:"err:XQST0036",type:"xs:QName",description:" It is a static error to import a module if the in-scope schema\n definitions of the importing module do not include all of the following:\n -# An in-scope schema type for each type-name that appears:\n - in the type of a variable that is declared in the imported module\n and referenced in the importing module, OR\n - in a parameter-type or result-type of a function that is declared in\n the imported module and referenced in the importing module.\n -# An in-scope element declaration for each element-name \\c EN such that:\n - \\c schema-element(EN) appears in the declared type of a variable in\n the imported module, and that variable is referenced in the\n importing module, OR\n - \\c schema-element(EN) appears in a parameter-type or result-type\n of a function declared in the imported module, and that function is\n referenced in the importing module.\n -# An in-scope attribute declaration for each attribute-name \\c AN such\n that:\n - \\c schema-attribute(AN) appears in the declared type of a variable\n in the imported module, and that variable is referenced in the\n importing module, OR\n - \\c schema-attribute(AN) appears in a parameter-type or result-type\n of a function declared in the imported module, and that function is\n referenced in the importing module.\n"},{name:"err:XQST0038",type:"xs:QName",description:" It is a static error if a Prolog contains more than one default collation\n declaration, or the value specified by a default collation declaration is\n not present in statically known collations.\n"},{name:"err:XQST0039",type:"xs:QName",description:" It is a static error for a function declaration to have more than one\n parameter with the same name.\n"},{name:"err:XQST0040",type:"xs:QName",description:" It is a static error if the attributes specified by a direct element\n constructor do not have distinct expanded QNames.\n"},{name:"err:XQST0045",type:"xs:QName",description:" It is a static error if the function name in a function declaration is in\n one of the following namespaces:\n http://www.w3.org/XML/1998/namespace,\n http://www.w3.org/2001/XMLSchema,\n http://www.w3.org/2001/XMLSchema-instance,\n http://www.w3.org/2005/xpath-functions.\n"},{name:"err:XQST0046",type:"xs:QName",description:" An implementation MAY raise a static error if the value of a URILiteral\n is of nonzero length and is not in the lexical space of \\c xs:anyURI.\n"},{name:"err:XQST0047",type:"xs:QName",description:" It is a static error if multiple module imports in the same Prolog\n specify the same target namespace.\n"},{name:"err:XQST0048",type:"xs:QName",description:" It is a static error if a function or variable declared in a library\n module is not in the target namespace of the library module.\n"},{name:"err:XQST0049",type:"xs:QName",description:" It is a static error if two or more variables declared or imported by a\n module have equal expanded QNames (as defined by the eq operator.)\n"},{name:"err:XQST0032",type:"xs:QName",description:" A static error is raised if a Prolog contains more than one base URI\n declaration.\n"},{name:"err:XQST0054",type:"xs:QName",description:" It is a static error if a variable depends on itself.\n"},{name:"err:XQST0055",type:"xs:QName",description:" It is a static error if a Prolog contains more than one copy-namespaces\n declaration.\n"},{name:"err:XQST0057",type:"xs:QName",description:" It is a static error if a schema import binds a namespace prefix but\n does not specify a target namespace other than a zero-length string.\n"},{name:"err:XQST0058",type:"xs:QName",description:" It is a static error if multiple schema imports specify the same target\n namespace.\n"},{name:"err:XQST0059",type:"xs:QName",description:" It is a static error if an implementation is unable to process a schema\n or module import by finding a schema or module with the specified\n target namespace.\n"},{name:"err:XQST0060",type:"xs:QName",description:" It is a static error if the name of a function in a function declaration\n is not in a namespace (expanded QName has a null namespace URI).\n"},{name:"err:XQST0065",type:"xs:QName",description:" A static error is raised if a Prolog contains more than one ordering mode\n declaration.\n"},{name:"err:XQST0066",type:"xs:QName",description:" A static error is raised if a Prolog contains more than one default\n element/type namespace declaration, or more than one default function\n namespace declaration.\n"},{name:"err:XQST0067",type:"xs:QName",description:" A static error is raised if a Prolog contains more than one construction\n declaration.\n"},{name:"err:XQST0068",type:"xs:QName",description:" A static error is raised if a Prolog contains more than one\n boundary-space declaration.\n"},{name:"err:XQST0069",type:"xs:QName",description:" A static error is raised if a Prolog contains more than one empty order\n declaration.\n"},{name:"err:XPTY0019",type:"xs:QName",description:" It is a type error if the result of a step (other than the last step) in a\n path expression contains an atomic value.\n"},{name:"err:XPST0001",type:"xs:QName",description:" It is a static error if analysis of an expression relies on some\n component of the static context that has not been assigned a value.\n"},{name:"err:XPST0003",type:"xs:QName",description:" It is a static error if an expression is not a valid instance of the\n grammar.\n"},{name:"err:XPST0005",type:"xs:QName",description:" During the analysis phase, it is a static error if the static type\n assigned to an expression other than the expression \\c () or \\c data(())\n is \\c empty-sequence().\n"},{name:"err:XPST0008",type:"xs:QName",description:" It is a static error if an expression refers to an element name,\n attribute name, schema type name, namespace prefix, or variable name\n that is not defined in the static context, except for an ElementName in\n an ElementTest or an AttributeName in an AttributeTest.\n"},{name:"err:XPST0017",type:"xs:QName",description:" It is a static error if the expanded QName and number of arguments in a\n function call do not match the name and arity of a function signature in\n the static context.\n"},{name:"err:XPST0051",type:"xs:QName",description:" It is a static error if a QName that is used as an AtomicType in a\n SequenceType is not defined in the in-scope schema types as an atomic\n type.\n"},{name:"err:XPST0080",type:"xs:QName",description:" It is a static error if the target type of a \\c cast or \\c castable\n expression is \\c xs:NOTATION or \\c xs:anyAtomicType.\n"},{name:"err:XPST0081",type:"xs:QName",description:" It is a static error if a QName used in a query contains a namespace\n prefix that cannot be expanded into a namespace URI by using the\n statically known namespaces.\n"},{name:"err:XPST0083",type:"xs:QName",description:" It is a static error if the target type of a \\c cast expression or\n constructor function is \\c xs:QName or a type derived from \\c xs:QName\n or \\c xs:NOTATION, and the argument of the cast expression or\n constructor function is not a string literal.\n"},{name:"err:XPTY0004",type:"xs:QName",description:" It is a type error if, during the static analysis phase, an expression\n is found to have a static type that is not appropriate for the context\n in which the expression occurs, or during the dynamic evaluation phase,\n the dynamic type of a value does not match a required type as specified\n by the matching rules in 2.5.4 SequenceType Matching.\n"},{name:"err:XPTY0018",type:"xs:QName",description:" It is a type error if the result of the last step in a path expression\n contains both nodes and non-nodes.\n"},{name:"err:XQST0070",type:"xs:QName",description:" A static error is raised if one of the predefined prefixes \\c xml or \\c\n xmlns appears in a namespace declaration, or if any of the following\n conditions is statically detected in any expression or declaration:\n - The prefix \\c xml is bound to some namespace URI other than\n http://www.w3.org/XML/1998/namespace.\n - A prefix other than \\c xml is bound to the namespace URI\n http://www.w3.org/XML/1998/namespace.\n - The prefix \\c xmlns is bound to any namespace URI.\n - A prefix other than \\c xmlns is bound to the namespace URI\n http://www.w3.org/2000/xmlns/.\n"},{name:"err:XPTY0020",type:"xs:QName",description:" It is a type error if, in an axis step, the context item is not a node.\n"},{name:"err:XPTY0117",type:"xs:QName",description:" Attempt to cast to a namespace-sensitive type failed because the namespace\n bindings for the result can not be determined.\n"},{name:"err:XQTY0024",type:"xs:QName",description:" It is a type error if the content sequence in an element constructor\n contains an attribute node following a node that is not an attribute node.\n"},{name:"err:XQTY0030",type:"xs:QName",description:" It is a type error if the argument of a validate expression does not\n evaluate to exactly one document or element node.\n"},{name:"err:XQTY0086",type:"xs:QName",description:" It is a type error if the typed value of a copied element or attribute\n node is namespace-sensitive when construction mode is \\c preserve and\n copy-namespaces mode is \\c no-preserve.\n"},{name:"err:XQTY0105",type:"xs:QName",description:" It is a type error if the content sequence in an element constructor contains a function item.\n"},{name:"err:XQST0009",type:"xs:QName",description:" An implementation that does not support the Schema Import Feature must\n raise a static error if a Prolog contains a schema import.\n"},{name:"err:XQST0012",type:"xs:QName",description:" It is a static error if the set of definitions contained in all schemas\n imported by a Prolog do not satisfy the conditions for schema validity\n specified in Sections 3 and 5 of [XML Schema] Part 1--i.e., each\n definition must be valid, complete, and unique.\n"},{name:"err:XQST0013",type:"xs:QName",description:" It is a static error if an implementation recognizes a pragma but\n determines that its content is invalid.\n"},{name:"err:XQST0022",type:"xs:QName",description:" It is a static error if the value of a namespace declaration attribute is\n not a URILiteral.\n"},{name:"err:XQST0031",type:"xs:QName",description:" It is a static error if the version number specified in a version\n declaration is not supported by the implementation.\n"},{name:"err:XQDY0072",type:"xs:QName",description:" It is a dynamic error if the result of the content expression of a\n computed comment constructor contains two adjacent hyphens or ends with\n a hyphen.\n"},{name:"err:XQST0128",type:"xs:QName",description:" It is a static error if a feature name that an implementation supports appears\n in a prohibit-feature option declaration, and the implementation is unable to\n disable the feature.\n"},{name:"err:XPDY0002",type:"xs:QName",description:" It is a dynamic error if evaluation of an expression relies on some part\n of the dynamic context that has not been assigned a value.\n"},{name:"err:XPDY0050",type:"xs:QName",description:' It is a dynamic error if the dynamic type of the operand of a treat\n expression does not match the sequence type specified by the treat\n expression. This error might also be raised by a path expression\n beginning with "/" or "//" if the context node\n is not in a tree that is rooted at a document node. This is because a\n leading "/" or "//" in a path expression is an\n abbreviation for an initial step that includes the clause \\c treat as \\c\n document-node().\n'},{name:"err:XQDY0025",type:"xs:QName",description:" It is a dynamic error if any attribute of a constructed element does not\n have a name that is distinct from the names of all other attributes of\n the constructed element.\n"},{name:"err:XQDY0026",type:"xs:QName",description:' It is a dynamic error if the result of the content expression of a\n computed processing instruction constructor contains the string "?&gt;".\n'},{name:"err:XQDY0027",type:"xs:QName",description:" In a validate expression, it is a dynamic error if the root element\n information item in the PSVI resulting from validation does not have the\n expected validity property: \\c valid if validation mode is \\c strict, or\n either \\c valid or \\c notKnown if validation mode is \\c lax.\n"},{name:"err:XQDY0041",type:"xs:QName",description:" It is a dynamic error if the value of the name expression in a computed\n processing instruction constructor cannot be cast to the type\n \\c xs:NCName.\n"},{name:"err:XQDY0044",type:"xs:QName",description:" It is a static error the node-name of a node constructed by a computed\n attribute constructor has any of the following properties:\n - Its namespace prefix is \\c xmlns.\n - It has no namespace prefix and its local name is \\c xmlns.\n - Its namespace URI is http://www.w3.org/2000/xmlns/.\n - Its namespace prefix is \\c xml and its namespace URI is not\n http://www.w3.org/XML/1998/namespace.\n - Its namespace prefix is other than \\c xml and its namespace URI is\n http://www.w3.org/XML/1998/namespace.\n"},{name:"err:XQDY0054",type:"xs:QName",description:" It is a dynamic error if a cycle is encountered in the definition of a\n module's dynamic context components, for example because of a cycle in\n variable declarations.\n"},{name:"err:XQDY0061",type:"xs:QName",description:" It is a dynamic error if the operand of a validate expression is a\n document node whose children do not consist of exactly one element node\n and zero or more comment and processing instruction nodes, in any order.\n"},{name:"err:XQDY0064",type:"xs:QName",description:' It is a dynamic error if the value of the name expression in a computed\n processing instruction constructor is equal to "XML" (in any combination\n of upper and lower case).\n'},{name:"err:XQST0127",type:"xs:QName",description:" It is a static error if a given feature is both required and prohibited, directly or indirectly, in a module.\n"},{name:"err:XQDY0074",type:"xs:QName",description:" It is a dynamic error if the value of the name expression in a computed\n element or attribute constructor cannot be converted to an expanded\n QName (for example, because it contains a namespace prefix not found in\n statically known namespaces).\n"},{name:"err:XQDY0084",type:"xs:QName",description:" It is a dynamic error if the element validated by a \\c validate statement\n does not have a top-level element declaration in the in-scope element\n declarations, if validation mode is \\c strict.\n"},{name:"err:XQDY0091",type:"xs:QName",description:" An implementation MAY raise a dynamic error if an \\c xml:id error, as\n defined in [XML ID], is encountered during construction of an attribute\n named \\c xml:id.\n"},{name:"err:XQDY0092",type:"xs:QName",description:" An implementation MAY raise a dynamic error if a constructed attribute\n named \\c xml:space has a value other than \\c preserve or \\c default.\n"},{name:"err:XQDY0096",type:"xs:QName",description:" It is a dynamic error the node-name of a node constructed by a computed\n element constructor has any of the following properties:\n - Its namespace prefix is \\c xmlns.\n - Its namespace URI is http://www.w3.org/2000/xmlns/.\n - Its namespace prefix is \\c xml and its namespace URI is not\n http://www.w3.org/XML/1998/namespace.\n - Its namespace prefix is other than \\c xml and its namespace URI is\n http://www.w3.org/XML/1998/namespace.\n"},{name:"err:XQDY0101",type:"xs:QName",description:" Invalid prefix and/or uri in computed namespace constructor\n"},{name:"err:XQDY0102",type:"xs:QName",description:" In an element constructor, if two or more namespace bindings in the in-scope bindings would have the same prefix, then an error is raised if they have different URIs; if they would have the same prefix and URI, duplicate bindings are ignored.\n"},{name:"err:XTDE1310",type:"xs:QName",description:" It is a non-recoverable dynamic error if the picture string does not\n satisfy the format-number function rules.\n"},{name:"err:FOFD1340",type:"xs:QName",description:" It is a non-recoverable dynamic error if the $picture, $language,\n $calendar, or $place argument for fn:format-date, fn:format-time, or\n fn:format-dateTime is invalid.\n"},{name:"err:FOFD1350",type:"xs:QName",description:" It is a non-recoverable dynamic error if a component specifier within\n the picture refers to components that are not available in the given\n type of $value.\n"},{name:"err:FTST0008",type:"xs:QName",description:" It is a static error if, during the static analysis phase, the query is\n found to contain a stop word option that refers to a stop word list that\n is not found in the statically known stop word lists.\n"},{name:"err:XQST0098",type:"xs:QName",description:" It is a static error if, for any named or unnamed decimal format, the\n properties representing characters used in a picture string do not each\n have distinct values. These properties are decimal-separator-sign,\n grouping-separator, percent-sign, per-mille-sign, zero-digit,\n digit-sign, and pattern-separator-sign.\n"},{name:"err:XQST0071",type:"xs:QName",description:" A static error is raised if the namespace declaration attributes of a\n direct element constructor do not have distinct names.\n"},{name:"err:XQST0076",type:"xs:QName",description:" It is a static error if a \\c collation subclause in an order by clause\n of a FLWOR expression does not identify a collation that is present in\n statically known collations.\n"},{name:"err:XQST0079",type:"xs:QName",description:" It is a static error if an extension expression contains neither a\n pragma that is recognized by the implementation nor an expression\n enclosed in curly braces.\n"},{name:"err:XQST0085",type:"xs:QName",description:" It is a static error if the namespace URI in a namespace declaration\n attribute is a zero-length string, and the implementation does not\n support [XML Names 1.1].\n"},{name:"err:XQST0087",type:"xs:QName",description:" It is a static error if the encoding specified in a Version Declaration\n does not conform to the definition of \\c EncName specified in [XML 1.0]\n"},{name:"err:XQST0088",type:"xs:QName",description:" It is a static error if the literal that specifies the target namespace\n in a module import or a module declaration is of zero length.\n"},{name:"err:XQST0089",type:"xs:QName",description:" It is a static error if a variable bound in a \\c for or \\c window clause\n of a FLWOR expression, and its associated positional variable, do not\n have distinct names (expanded QNames).\n"},{name:"err:XQST0090",type:"xs:QName",description:" It is a static error if a character reference does not identify a valid\n character in the version of XML that is in use.\n"},{name:"err:XQST0093",type:"xs:QName",description:" It is a static error to import a module M1 if there exists a sequence of\n modules M1 ... Mi ... M1 such that each module directly depends on the\n next module in the sequence (informally, if M1 depends on itself through\n some chain of module dependencies.)\n"},{name:"err:XQST0094",type:"xs:QName",description:" In the group by clause of a FLWOR expression, it is a static error if the\n name of a grouping variable is not equal (by the eq operator on expanded\n QNames) to the name of a variable that is bound by a for or let clause\n that precedes the group by clause.\n"},{name:"err:XQST0097",type:"xs:QName",description:" It is a static error for a decimal-format to specify a value that is\n not valid for a given property.\n"},{name:"err:NS",type:"item()*",description:""},{name:"err:XQST0099",type:"xs:QName",description:" If a module contains more than one context item declaration, a static error is raised [err:XQST0099].\n"},{name:"err:XQST0103",type:"xs:QName",description:" All variables in a window clause must have distinct names.\n"},{name:"err:XQST0106",type:"xs:QName",description:" It is a static error if a function's annotations contain more than one\n annotation named \\c private or \\c public.  It is a static error if a\n function's annotations contain more than one annotation named \\c\n deterministic or \\c nondeterministic.\n"},{name:"err:XQST0111",type:"xs:QName",description:" It is a static error for a query prolog to contain two decimal formats\n with the same name, or to contain two default decimal formats.\n"},{name:"err:XQST0113",type:"xs:QName",description:" Specifying a VarValue or VarDefaultValue for a context item declaration\n in a library module is a static error.\n"},{name:"err:XQST0114",type:"xs:QName",description:" It is a static error for a decimal format declaration to define the\n same property more than once.\n"},{name:"err:XQST0116",type:"xs:QName",description:" It is a static error if a variable declaration contains both a %private\n and a %public annotation, more than one %private annotation, or more\n than one %public annotation.\n"},{name:"err:XQST0120",type:"xs:QName",description:" It is a static error if a feature required by require-feature is not\n supported by the implementation.\n"},{name:"err:XQST0122",type:"xs:QName",description:" It is a static error if the name of a feature in require-feature or\n prohibit-feature is not in the lexical space of QName.\n"},{name:"err:XQST0123",type:"xs:QName",description:" It is a static error if the name of a feature in require-feature is not\n recognized by the implementation.\n"},{name:"err:XQST0126",type:"xs:QName",description:" It is a static error if all-extensions appears in a require-feature option declaration.\n"}]},"http://zorba.io/modules/excel/math":{ns:"http://zorba.io/modules/excel/math",description:" This is a library module offering a part of the set of functions\n defined by Microsoft Excel 2003.\n",sees:['<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0"><a href="http://office.microsoft.com/en-us/excel/CH062528291033.aspx" target="_blank">Excel 2003 Documentation: Math Functions</a></xqdoc:see>'],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Daniel Turcanu</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/modules/excel/math",prefix:"excel"},{uri:"http://zorba.io/modules/excel/errors",prefix:"excel-err"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"abs",qname:"excel:abs",signature:"($arg as xs:anyAtomicType) as xs:anyAtomicType",description:" Compute the abs of a numeric value.\n The value can also be a string and it will be casted to the appropriate numeric first.\n",summary:"<p> Compute the abs of a numeric value.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The parameter can be a number, string, boolean value.</div>'}],returns:{type:"xs:anyAtomicType",description:"The abs value as a numeric type."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if arg cannot be casted to numeric type.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"cast-as-numeric",qname:"excel:cast-as-numeric",signature:"($number as xs:anyAtomicType) as xs:anyAtomicType",description:" Cast the xs:anyAtomicType to a numeric type.\n If the value is already of a numeric type then nothing is changed.\n Otherwise the value is casted to the numeric type that is most appropriate.\n",summary:"<p> Cast the xs:anyAtomicType to a numeric type.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"number",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The parameter can be a number, string, boolean value.</div>'}],returns:{type:"xs:anyAtomicType",description:"The casted value."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the value cannot be casted to numeric type.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"ceiling",qname:"excel:ceiling",signature:"($number as xs:anyAtomicType, $significance as xs:anyAtomicType) as xs:anyAtomicType",description:" Returns number rounded up, away from zero, to the nearest multiple of significance.\n Significance must have the same sign as number.\n Number and significance must be of a numeric type or castable to numeric.\n Significance must not be zero.\n",summary:"<p> Returns number rounded up, away from zero, to the nearest multiple of significance.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"number",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The value you want to round.</div>'},{name:"significance",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The multiple to which you want to round.</div>'}],returns:{type:"xs:anyAtomicType",description:"The rounded value."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if parameters cannot be casted to numeric type.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if significance is zero or it doesn\'t have the same sign as number.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"degrees",qname:"excel:degrees",signature:"($radian as xs:double) as xs:integer",description:" Converts radians into degrees.\n",summary:"<p> Converts radians into degrees.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"radian",type:"xs:double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The value in radians.</div>'}],returns:{type:"xs:integer",description:"The value in degrees 0 .. 360 or 0 .. -360."},errors:[]},{isDocumented:!0,arity:1,name:"even",qname:"excel:even",signature:"($number as xs:anyAtomicType) as xs:anyAtomicType",description:" Returns number rounded up to the nearest even integer.\n Regardless of the sign of number, a value is rounded up when adjusted away from zero.\n",summary:"<p> Returns number rounded up to the nearest even integer.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"number",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The value to round.</div>'}],returns:{type:"xs:anyAtomicType",description:"The rounded value casted as numeric type."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if parameters cannot be casted to numeric type.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"fact",qname:"excel:fact",signature:"($number as xs:anyAtomicType) as xs:integer",description:" Returns the factorial of a number.\n",summary:"<p> Returns the factorial of a number.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"number",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The nonnegative number you want the factorial of. If number is not an integer, it is truncated.</div>'}],returns:{type:"xs:integer",description:"Returns the factorial of a number. The factorial of a number is equal to 1*2*3*...* number."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if the number is smaller than zero</xqdoc:error>']},{isDocumented:!0,arity:1,name:"factdouble",qname:"excel:factdouble",signature:"($number as xs:integer) as xs:integer",description:" Returns the double factorial of a number.\n Computes the double factorial of n as n(n-2)(n-4)...\n",summary:"<p> Returns the double factorial of a number.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"number",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The positive integer value.</div>'}],returns:{type:"xs:integer",description:"The result as integer."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if the number is negative.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"floor",qname:"excel:floor",signature:"($number as xs:anyAtomicType, $significance as xs:anyAtomicType) as xs:anyAtomicType",description:" Rounds number down, toward zero, to the nearest multiple of significance.\n Significance must have the same sign as number.\n",summary:"<p> Rounds number down, toward zero, to the nearest multiple of significance.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"number",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The value you want to round. The value is casted to numeric.</div>'},{name:"significance",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The multiple to which you want to round.</div>'}],returns:{type:"xs:anyAtomicType",description:"The rounded value as numeric type."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if parameters cannot be casted to numeric type.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if significance is zero or it doesn\'t have the same sign as number.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"gcd",qname:"excel:gcd",signature:"($numbers as xs:integer+) as xs:integer",description:" Returns the greatest common divisor GCD of a sequence of integers.\n The sequence can have one or more positive integers.\n",summary:"<p> Returns the greatest common divisor GCD of a sequence of integers.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"xs:integer",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The sequence of positive integers.</div>'}],returns:{type:"xs:integer",description:"The GCD as integer."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if any number is smaller than zero.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"int",qname:"excel:int",signature:"($number as xs:anyAtomicType) as xs:integer",description:" Rounds a number down to the nearest integer.\n Positive numbers are rounded toward zero, negative numbers are rounded away from zero.\n",summary:"<p> Rounds a number down to the nearest integer.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"number",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The value to be rounded.</div>'}],returns:{type:"xs:integer",description:"The rounded integer."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if parameter cannot be casted to numeric type</xqdoc:error>']},{isDocumented:!0,arity:1,name:"is-a-number",qname:"excel:is-a-number",signature:"($value as xs:anyAtomicType) as xs:boolean",description:" Checks if the xs:anyAtomicType argument is actually a numeric type\n or can be converted to numeric.\n",summary:"<p> Checks if the xs:anyAtomicType argument is actually a numeric type\n or can be converted to numeric.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"value",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Parameter to be checked.</div>'}],returns:{type:"xs:boolean",description:"true if the value can be casted to numeric."},errors:[]},{isDocumented:!0,arity:1,name:"lcm",qname:"excel:lcm",signature:"($numbers as xs:integer+) as xs:integer",description:' Returns the least common multiple of integers.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n LCM for two numbers is computed by multiplying them and dividing with GCD. <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The function is applied recursively replacing the first two numbers in the sequence with their LCM.\n',summary:"<p> Returns the least common multiple of integers.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"xs:integer",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The sequence of one or more positive integers.</div>'}],returns:{type:"xs:integer",description:"The LCM as integer."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if any number is smaller than zero.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"mod",qname:"excel:mod",signature:"($number as xs:anyAtomicType, $divisor as xs:anyAtomicType) as xs:anyAtomicType",description:" Returns the remainder after number is divided by divisor.\n The result has the same sign as divisor.\n",summary:"<p> Returns the remainder after number is divided by divisor.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"number",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The number for which you want to find the remainder.</div>'},{name:"divisor",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The number by which you want to divide number. This cannot be zero.</div>'}],returns:{type:"xs:anyAtomicType",description:"The remainder from division as numeric type."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if parameters cannot be casted to numeric type.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Div0 if divisor is zero after casting to numeric.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"mround",qname:"excel:mround",signature:"($number as xs:anyAtomicType, $multiple as xs:anyAtomicType) as xs:anyAtomicType",description:" Returns a number rounded to the desired multiple.\n MROUND rounds up, away from zero, if the remainder of dividing number by multiple\n is greater than or equal to half the value of multiple.\n MROUND is computed through floor function.\n",summary:"<p> Returns a number rounded to the desired multiple.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"number",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The value to round, castable to numeric type.</div>'},{name:"multiple",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The multiple to which you want to round number.</div>'}],returns:{type:"xs:anyAtomicType",description:"The rounded number up to the desired multiple."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if parameters cannot be casted to numeric type.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"odd",qname:"excel:odd",signature:"($number as xs:anyAtomicType) as xs:integer",description:" Returns number rounded up to the nearest odd integer, away from zero.\n",summary:"<p> Returns number rounded up to the nearest odd integer, away from zero.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"number",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The value to round.</div>'}],returns:{type:"xs:integer",description:"The odd integer."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if parameter cannot be casted to numeric type.</xqdoc:error>']},{isDocumented:!0,arity:0,name:"pi",qname:"excel:pi",signature:"() as xs:decimal",description:" Return the value of PI as decimal with 15 digits.\n",summary:"<p> Return the value of PI as decimal with 15 digits.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:decimal",description:"The value of PI with 15 digits."},errors:[]},{isDocumented:!0,arity:2,name:"power",qname:"excel:power",signature:"($number as xs:anyAtomicType, $power as xs:integer) as xs:anyAtomicType",description:" Returns the result of a number raised to a power.\n The result is computed through successive multiplications.\n",summary:"<p> Returns the result of a number raised to a power.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"number",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The base number.</div>'},{name:"power",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The exponent as integer (cannot be floating point like in Excel).</div>'}],returns:{type:"xs:anyAtomicType",description:"The result as numeric type."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if parameter cannot be casted to numeric type.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if power is smaller than zero.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"product",qname:"excel:product",signature:"($numbers as xs:anyAtomicType*) as xs:anyAtomicType",description:" Multiplies all the numbers given as arguments and returns the product.\n",summary:"<p> Multiplies all the numbers given as arguments and returns the product.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The sequence of arguments convertable to numeric types. The sequence can be of any length.</div>'}],returns:{type:"xs:anyAtomicType",description:"The multiplication result as numeric type."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if parameters cannot be casted to numeric type.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"quotient",qname:"excel:quotient",signature:"($numerator as xs:anyAtomicType, $denominator as xs:anyAtomicType) as xs:integer",description:" Returns the integer portion of a division.\n",summary:"<p> Returns the integer portion of a division.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numerator",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The divident.</div>'},{name:"denominator",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The divisor. It cannot be zero.</div>'}],returns:{type:"xs:integer",description:"The result value as numeric type."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if parameters cannot be casted to numeric type.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Div0 if denominator casted as numeric type has value zero.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"radians",qname:"excel:radians",signature:"($degree as xs:integer) as xs:decimal",description:" Converts degrees to radians.\n",summary:"<p> Converts degrees to radians.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"degree",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An angle in degrees that you want to convert.</div>'}],returns:{type:"xs:decimal",description:"The value in radians."},errors:[]},{isDocumented:!0,arity:1,name:"roman",qname:"excel:roman",signature:"($number as xs:integer) as xs:string",description:' Converts an arabic numeral to roman, as text.\n Only the clasic format is supported (out of all formats Excel requires).<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n M is the largest digit, it represents 1000.\n Numbers bigger than 2000 will be represented by a sequence of "M".<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n D = 500, C = 100, L = 50, X = 10, V = 5, I = 1.\n',summary:"<p> Converts an arabic numeral to roman, as text.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"number",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A positive integer.</div>'}],returns:{type:"xs:string",description:"The roman string representation."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if the input integer is negative</xqdoc:error>']},{isDocumented:!0,arity:2,name:"round",qname:"excel:round",signature:"($number as xs:anyAtomicType, $precision as xs:integer) as xs:anyAtomicType",description:" Rounds a number to a specified number of digits.\n If precision is greater than 0 (zero), then number is rounded\n to the specified number of decimal places.\n If num_digits is 0, then number is rounded to the nearest integer.\n If num_digits is less than 0, then number is rounded to the left of the decimal point.\n The 0.5 is rounded away from zero.\n",summary:"<p> Rounds a number to a specified number of digits.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"number",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The number to round, castable to a numeric type.</div>'},{name:"precision",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The number of decimal places to keep.</div>'}],returns:{type:"xs:anyAtomicType",description:"The rounded number as numeric type."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if parameters cannot be casted to numeric type.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"rounddown",qname:"excel:rounddown",signature:"($number as xs:anyAtomicType, $precision as xs:integer) as xs:anyAtomicType",description:" Rounds a number down, toward zero.\n If num_digits is greater than 0 (zero), then number is rounded down\n to the specified number of decimal places.\n If num_digits is 0, then number is rounded down to the nearest integer.\n If num_digits is less than 0, then number is rounded down to the left of the decimal point.\n",summary:"<p> Rounds a number down, toward zero.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"number",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The number to round, castable to numeric type.</div>'},{name:"precision",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The number of decimal places to keep.</div>'}],returns:{type:"xs:anyAtomicType",description:"the truncated number toward zero, as numeric type."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if parameters cannot be casted to numeric type.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"roundup",qname:"excel:roundup",signature:"($number as xs:anyAtomicType, $precision as xs:integer) as xs:anyAtomicType",description:" Rounds a number up, away from 0 (zero).\n If num_digits is greater than 0 (zero), then number is rounded down\n to the specified number of decimal places.\n If num_digits is 0, then number is rounded down to the nearest integer.\n If num_digits is less than 0, then number is rounded down to the left of the decimal point.\n",summary:"<p> Rounds a number up, away from 0 (zero).</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"number",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The number to round, castable to numeric type.</div>'},{name:"precision",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The number of decimal places to keep.</div>'}],returns:{type:"xs:anyAtomicType",description:"The truncated number away from zero, as numeric type."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if parameters cannot be casted to numeric type.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"sign",qname:"excel:sign",signature:"($number as xs:anyAtomicType) as xs:integer",description:" Determines the sign of a number.\n Returns 1 if the number is positive, zero (0) if the number is 0,\n and -1 if the number is negative.\n",summary:"<p> Determines the sign of a number.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"number",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The argument castable to numeric type.</div>'}],returns:{type:"xs:integer",description:"The sign as (-1, 0, 1)."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if parameters cannot be casted to numeric type.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"sort-numbers",qname:"excel:sort-numbers",signature:"($numbers as xs:anyAtomicType*) as xs:anyAtomicType*",description:' Helper function.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Sorts a sequence of numbers or arguments castable to numeric.\n It first casts all arguments to numeric and then sorts ascending.\n',summary:"<p> Helper function.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The sequence of arguments castable to numeric.</div>'}],returns:{type:"xs:anyAtomicType*",description:"The sorted sequence as numeric types."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if parameters cannot be casted to numeric type.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"sum",qname:"excel:sum",signature:"($numbers as xs:anyAtomicType*) as xs:anyAtomicType",description:" Adds all the numbers in the sequence.\n",summary:"<p> Adds all the numbers in the sequence.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The sequence of arguments castable to numeric types. The sequence can be of any length.</div>'}],returns:{type:"xs:anyAtomicType",description:"The sum as numeric type."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if parameters cannot be casted to numeric type.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"trunc",qname:"excel:trunc",signature:"($number as xs:anyAtomicType) as xs:integer",description:" Truncates a number to an integer by removing the fractional part of the number.\n",summary:"<p> Truncates a number to an integer by removing the fractional part of the number.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"number",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The argument castable to numeric type.</div>'}],returns:{type:"xs:integer",description:"The integer value."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if parameter cannot be casted to numeric type.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"trunc",qname:"excel:trunc",signature:"($number as xs:anyAtomicType, $precision as xs:integer) as xs:anyAtomicType",description:" Truncates a number down to precision.\n This behaves exactly like rounddown.\n",summary:"<p> Truncates a number down to precision.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"number",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The argument castable to numeric type.</div>'},{name:"precision",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The number of decimal places to keep .</div>'}],returns:{type:"xs:anyAtomicType",description:"The integer value."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if parameter cannot be casted to numeric type.</xqdoc:error>']}],variables:[]},"http://api.28.io/browserview":{ns:"http://api.28.io/browserview",description:"",sees:[],authors:[],version:null,encoding:null,namespaces:[{uri:"",prefix:"an"},{uri:"http://api.28.io/browserview",prefix:"browserview"},{uri:"http://api.28.io/model",prefix:"model"},{uri:"http://zorba.io/modules/reference",prefix:"ref"}],functions:[{isDocumented:!1,arity:1,name:"node-path",qname:"browserview:node-path",signature:"($node)",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"node",type:null,occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:2,name:"node-reference",qname:"browserview:node-reference",signature:"($node, $short as xs:boolean)",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"node",type:null,occurrence:null,description:""},{name:"short",type:"xs:boolean",occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:1,name:"serialize",qname:"browserview:serialize",signature:"($json)",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"json",type:null,occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:1,name:"serializeMulti",qname:"browserview:serializeMulti",signature:"($json)",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"json",type:null,occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:1,name:"show-namespaces",qname:"browserview:show-namespaces",signature:"($namespaces)",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"namespaces",type:null,occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:3,name:"show-node",qname:"browserview:show-node",signature:"($node, $namespaces, $short as xs:boolean)",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"node",type:null,occurrence:null,description:""},{name:"namespaces",type:null,occurrence:null,description:""},{name:"short",type:"xs:boolean",occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:1,name:"show-nodes",qname:"browserview:show-nodes",signature:"($nodes)",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"nodes",type:null,occurrence:null,description:""}],returns:{type:null,description:""},errors:[]}],variables:[]},"http://zorba.io/modules/json-csv":{ns:"http://zorba.io/modules/json-csv",description:' This module provides an API for parsing and serializing CSV (comma-separated\n values) files.\n See RFC 4180,\n "Common Format and MIME Type for Comma-Separated Values (CSV) Files."\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Paul J. Lucas</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/modules/json-csv",prefix:"csv"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"parse",qname:"csv:parse",signature:"($csv as string) as object()*",description:' Parses a CSV (comma-separated values) string using the default options.\n A newline (U+000A), optionally preceeded by a carriage-return (U+000D),\n terminates lines, aka, "records."\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Quoted values are always considered strings;\n unquoted values are attempted to be cast to other types, e.g., integer\n (unless the <code xmlns:xqdoc="http://www.xqdoc.org/1.0">cast-unquoted-values</code> option is <code xmlns:xqdoc="http://www.xqdoc.org/1.0">false</code>).\n Casting is attempted in the following order:\n integer, decimal, double, and boolean.\n If casting fails, the value is considered a string.\n Header field names are always considered strings even if unquoted.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n In addition to the "normal" values of\n <code xmlns:xqdoc="http://www.xqdoc.org/1.0">true</code> and <code xmlns:xqdoc="http://www.xqdoc.org/1.0">false</code> for boolean,\n <code xmlns:xqdoc="http://www.xqdoc.org/1.0">T</code> and <code xmlns:xqdoc="http://www.xqdoc.org/1.0">Y</code> are also considered "true"\n and <code xmlns:xqdoc="http://www.xqdoc.org/1.0">F</code> and <code xmlns:xqdoc="http://www.xqdoc.org/1.0">N</code> are also considered "false."\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The default options are:\n  <dl xmlns:xqdoc="http://www.xqdoc.org/1.0">\n    <dt><code>cast-unquoted-values</code></dt>\n      <dd>\n        Whether to attempt to cast unquoted values to\n        integer, decimal, double, or boolean;\n        default: <code>true</code>.\n      </dd>\n    <dt><code>extra-name</code></dt>\n      <dd>\n        The field name for extra values, if any;\n        default: none (error <code>csv:EXTRA_VALUE</code> is raised).\n      </dd>\n    <dt><code>field-names</code></dt>\n      <dd>\n        A JSON array of strings denoting field names;\n        default: none.\n        The first CSV line is assumed to be a header line\n        and the field names are taken from this line.\n      </dd>\n    <dt><code>missing-value</code></dt>\n      <dd>\n        What should happen when a missing value is detected;\n        default: <code>"null"</code>.\n        A "missing" value is one of:\n        <ul>\n          <li>Two consecutive <code>quote-char</code> characters.</li>\n          <li>A <code>quote-char</code> character as either the first\n              or last character on a line.</li>\n          <li>Fewer values than the number of field names.</li>\n        </ul>\n        When a missing value is detected,\n        the value is set to <code>null</code>.\n      </dd>\n    <dt><code>quote-char</code></dt>\n      <dd>\n        The single ASCII character that may be used to quote values;\n        default: <code>"</code> (U+0022).\n      </dd>\n    <dt><code>quote-escape</code></dt>\n      <dd>\n        The single ASCII character used to escape <code>quote-char</code>;\n        default: same as <code>quote-char</code>.\n        This means that an escaped quote is doubled as <code>""</code>.\n      </dd>\n    <dt><code>separator</code></dt>\n      <dd>\n        The single ASCII character used to separate values;\n        default: <code>,</code> (U+002C).\n      </dd>\n  </dl>\n',summary:"<p> Parses a CSV (comma-separated values) string using the default options.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"csv",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The CSV string to parse.</div>'}],returns:{type:"object()*",description:"a sequence of zero or more JSON objects where each key is a field name and each value is a parsed value."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">csv:EXTRA_VALUE if an extra value is detected.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"parse",qname:"csv:parse",signature:"($csv as string, $options as object()) as object()* external",description:' Parses a CSV (comma-separated values) string using the given options.\n A newline (U+000A), optionally preceeded by a carriage-return (U+000D),\n terminates lines, aka, "records."\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Quoted values are always considered strings;\n unquoted values are attempted to be cast to other types, e.g., integer\n (unless the <code xmlns:xqdoc="http://www.xqdoc.org/1.0">cast-unquoted-values</code> option is <code xmlns:xqdoc="http://www.xqdoc.org/1.0">false</code>).\n Casting is attempted in the following order:\n integer, decimal, double, and boolean.\n If casting fails, the value is considered a string.\n Header field names are always considered strings even if unquoted.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n In addition to the "normal" values of\n <code xmlns:xqdoc="http://www.xqdoc.org/1.0">true</code> and <code xmlns:xqdoc="http://www.xqdoc.org/1.0">false</code> for boolean,\n <code xmlns:xqdoc="http://www.xqdoc.org/1.0">T</code> and <code xmlns:xqdoc="http://www.xqdoc.org/1.0">Y</code> are also considered "true"\n and <code xmlns:xqdoc="http://www.xqdoc.org/1.0">F</code> and <code xmlns:xqdoc="http://www.xqdoc.org/1.0">N</code> are also considered "false."\n',summary:"<p> Parses a CSV (comma-separated values) string using the given options.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"csv",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The CSV string to parse.</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The options to use: <dl> <dt><code>cast-unquoted-values</code></dt> <dd> Whether to attempt to cast unquoted values to integer, decimal, double, or boolean; default: <code>true</code>. </dd> <dt><code>extra-name</code></dt> <dd> The field name for extra values, if any; default: none (error <code>csv:EXTRA_VALUE</code> is raised). If this option is given and a line contains one or more extra values (that is, values that have no corresponding field names), then the extra values are assigned as the values for fields having <code>extra-name</code> as their names. <p/> If <code>extra-name</code> contains a <code>#</code> (U+0023), then the <code>#</code> is substituted with the field number (where field numbers start at 1). If <code>extra-name</code> does not contains a <code>#</code>, then the field number is appended. </dd> <dt><code>field-names</code></dt> <dd> A JSON array of strings denoting field names; default: none. If this option is given, then the first CSV line is assumed not to be a header line; if omitted, then the first CSV line is assumed to be a header line and the field names are taken from this line. </dd> <dt><code>missing-value</code></dt> <dd> What should happen when a missing value is detected; default: <code>"null"</code>. A "missing" value is one of: <ul> <li>Two consecutive <code>separator</code> characters.</li> <li>A <code>separator</code> character as either the first or last character on a line.</li> <li>Fewer values than the number of field names.</li> </ul> When a missing value is detected, the value of this option determines what happens: <dl> <dt><code>"error"</code></dt> <dd>Error <code>csv:MISSING_VALUE</code> is raised.</dd> <dt><code>"omit"</code></dt> <dd>Both the value and its key are omitted from the result object.</dd> <dt><code>"null"</code></dt> <dd>The value is set to <code>null</code>.</dd> </dl> </dd> <dt><code>quote-char</code></dt> <dd> The single ASCII character that may be used to quote values; default: <code>"</code> (U+0022). </dd> <dt><code>quote-escape</code></dt> <dd> The single ASCII character used to escape <code>quote-char</code>; default: same as <code>quote-char</code>. If <code>quote-escape</code> equals <code>quote-char</code>, it means that <code>quote-char</code> must be doubled to escape it. If <code>quote-escape</code> does not equal <code>quote-char</code>, it means that <code>quote-escape</code> is used to escape <code>quote-char</code>. For example, a <code>quote-char</code> of <code>"</code> (U+0022) and a <code>quote-escape</code> of <code>\\</code> (U+005C) means that quotes will be escaped by <code>\\"</code>. </dd> <dt><code>separator</code></dt> <dd> The single ASCII character used to separate values; default: <code>,</code> (U+002C). </dd> </dl></div>'}],returns:{type:"object()*",description:"a sequence of zero or more JSON objects where each key is a field name and each value is a parsed value."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">csv:INVALID_OPTION if the <code>quote-char</code>, <code>quote-escape</code>, or <code>separator</code> option is given and it\'s not a single ASCII character.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">csv:MISSING_VALUE if a missing value is detected and the <code>missing-value</code> option is "<code>error</code>".</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">csv:EXTRA_VALUE if an extra value is detected and the <code>extra-name</code> option is not set.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"serialize",qname:"csv:serialize",signature:"($obj as object()*) as string*",description:' Serializes a sequence of JSON objects as CSV (comma-separated values) using\n the default options.\n The default options are:\n  <dl xmlns:xqdoc="http://www.xqdoc.org/1.0">\n    <dt><code>field-names</code></dt>\n      <dd>\n        A JSON array of strings denoting field names;\n        default: none.\n        The field names are taken from the first JSON object\n        and the order of the fields is implementation dependent.\n      </dd>\n    <dt><code>serialize-boolean-as</code></dt>\n      <dd>\n        What strings to serialize <code>true</code> and <code>false</code> as;\n        default: <code>true</code> and <code>false</code>.\n      </dd>\n    <dt><code>serialize-header</code></dt>\n      <dd>\n        Whether a header line is included;\n        default: <code>true</code>.\n        The first string result is the header line\n        comprised of all the objects\' keys\' names.\n      </dd>\n    <dt><code>serialize-null-as</code></dt>\n      <dd>\n        What string to serialize JSON <code>null</code> values as;\n        default: <code>null</code>.\n      </dd>\n    <dt><code>quote-char</code></dt>\n      <dd>\n        The single ASCII character that may be used to quote values;\n        default: <code>"</code> (U+0022).\n      </dd>\n    <dt><code>quote-escape</code></dt>\n      <dd>\n        The single ASCII character used to escape <code>quote-char</code>;\n        default: same as <code>quote-char</code>.\n        This means that <code>quote-char</code> is doubled to escape it.\n      </dd>\n    <dt><code>separator</code></dt>\n      <dd>\n        The single ASCII character used to separate values;\n        default: <code>,</code> (U+002C).\n      </dd>\n  </dl>\n',summary:"<p> Serializes a sequence of JSON objects as CSV (comma-separated values) using\n the default options.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"obj",type:"object()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The sequence of JSON objects to serialize.</div>'}],returns:{type:"string*",description:'a sequence of strings where each string corresponds to a JSON object, aka, "record."'},errors:[]},{isDocumented:!0,arity:2,name:"serialize",qname:"csv:serialize",signature:"($obj as object()*, $options as object()) as string* external",description:" Serializes a sequence of JSON objects as CSV (comma-separated values) using\n the given options.\n",summary:"<p> Serializes a sequence of JSON objects as CSV (comma-separated values) using\n the given options.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"obj",type:"object()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The sequence of JSON objects to serialize.</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The options to use: <dl> <dt><code>field-names</code></dt> <dd> A JSON array of strings denoting field names; default: none. If this option is not set, the field names are taken from the first JSON object and the order of the fields is implementation dependent. If this option is set, the fields are serielized in the order they are in the array. In either case, every JSON object must have the same keys as the first object. </dd> <dt><code>serialize-boolean-as</code></dt> <dd> What strings to serialize <code>true</code> and <code>false</code> as; default: <code>true</code> and <code>false</code>. This must be a sub-object with the two keys <code>"true"</code> and <code>"false"</code>, e.g.: <code>{ "true" : "Y", "false" : "N" }</code>. </dd> <dt><code>serialize-header</code></dt> <dd> Whether a header line is included; default: <code>true</code>. If <code>true</code>, the first string result is the header line comprised of all the objects\' keys\' names; if <code>false</code>, the heder line is not returned. </dd> <dt><code>serialize-null-as</code></dt> <dd> What string to serialize JSON <code>null</code> values as; default: <code>null</code>. </dd> <dt><code>quote-char</code></dt> <dd> The single ASCII character that may be used to quote values; default: <code>"</code> (U+0022). </dd> <dt><code>quote-escape</code></dt> <dd> The single ASCII character used to escape <code>quote-char</code>; default: same as <code>quote-char</code>. If <code>quote-escape</code> equals <code>quote-char</code>, it means that <code>quote-char</code> must be doubled to escape it. If <code>quote-escape</code> does not equal <code>quote-char</code>, it means that <code>quote-escape</code> is used to escape <code>quote-char</code>. For example, a <code>quote-char</code> of <code>"</code> (U+0022) and a <code>quote-escape</code> of <code>\\</code> (U+005C) means that quotes will be escaped by <code>\\"</code>. </dd> <dt><code>separator</code></dt> <dd> The single ASCII character used to separate values; default: <code>,</code> (U+002C). </dd> </dl></div>'}],returns:{type:"string*",description:'a sequence of strings where each string corresponds to a JSON object, aka, "record."'},errors:[]}],variables:[]},"http://www.zorba-xquery.com/modules/email/imap":{ns:"http://www.zorba-xquery.com/modules/email/imap",description:' This module provides functions for accessing and manipulating emails on mail\n servers through the IMAP protocol.\n All functions in this module receive as the first argument the IMAP host and user\n information. This is an element with the type <code xmlns:xqdoc="http://www.xqdoc.org/1.0">hostInfoType</code> as defined\n in the email schema: <code xmlns:xqdoc="http://www.xqdoc.org/1.0">http://www.zorba-xquery.com/modules/email</code>.\n For example:\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static" ace-mode="xquery">\n &lt;email:hostInfo&gt;\n   &lt;email:hostName&gt;imap.example.com&lt;/email:hostName&gt;\n   &lt;email:userName&gt;myuser&lt;/email:userName&gt;\n   &lt;email:password&gt;mypassword&lt;/email:password&gt;\n &lt;/email:hostInfo&gt;\n </pre>\n The <code xmlns:xqdoc="http://www.xqdoc.org/1.0">hostInfoType</code> only needs to be in the email schema namespace\n (<code xmlns:xqdoc="http://www.xqdoc.org/1.0">http://www.zorba-xquery.com/modules/email</code>). It does not need\n to be validated since it\'s validated by the module.\n',sees:['<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0"><a href="http://www.washington.edu/imap/">c-client library part of UW IMAP toolkit</a></xqdoc:see>'],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Daniel Thomas, Gabriel Petrovay</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://www.zorba-xquery.com/modules/email",prefix:"email"},{uri:"http://www.zorba-xquery.com/modules/email/imap",prefix:"imap"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:5,name:"copy",qname:"imap:copy",signature:"($host-info as element(email:hostInfo), $mailbox-from as xs:string, $mailbox-to as xs:string, $messages as xs:long+, $uid as xs:boolean?) as empty-sequence()",description:' Copies messages between mailboxes.\n Depending on the value of <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$uid</code>, the messages are either specified\n through their sequence number or through their unique id. Both mailboxes must exist.\n',summary:"<p> Copies messages between mailboxes.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"host-info",type:"element(email:hostInfo)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The IMAP host, user name, and password.</div>'},{name:"mailbox-from",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The mailbox in which the messages reside.</div>'},{name:"mailbox-to",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The mailbox in to which the messages are copied.</div>'},{name:"messages",type:"xs:long",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The messages to be copied, specified either by their sequence number or their unique id.</div>'},{name:"uid",type:"xs:boolean",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> If true, <code>$messages</code> are treated as sequence numbers. Else as unique identifiers.</div>'}],returns:{type:"empty-sequence()",description:"The function is declared as sequential and has side-effects. It returns the empty sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0001 If the IMAP operation failed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0002 If the connection to the IMAP server is refused.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0003 If no message is found with the provided sequence number/unique identifier.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XQDY0027 If the value of <code>$host-info</code> is not valid according to the email schema: <code>http://www.zorba-xquery.com/modules/email</code></xqdoc:error>']},{isDocumented:!0,arity:2,name:"create",qname:"imap:create",signature:"($host-info as element(email:hostInfo), $mailbox-name as xs:string) as empty-sequence()",description:" Creates a new mailbox for the given user.\n",summary:"<p> Creates a new mailbox for the given user.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"host-info",type:"element(email:hostInfo)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The IMAP host, user name, and password.</div>'},{name:"mailbox-name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name for the new mailbox.</div>'}],returns:{type:"empty-sequence()",description:"The function is declared as sequential and has side-effects. It returns the empty sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0001 If the IMAP operation failed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0002 If the connection to the IMAP server is refused.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XQDY0027 If the value of <code>$host-info</code> is not valid according to the email schema: <code>http://www.zorba-xquery.com/modules/email</code></xqdoc:error>']},{isDocumented:!0,arity:2,name:"delete",qname:"imap:delete",signature:"($host-info as element(email:hostInfo), $mailbox-name as xs:string) as empty-sequence()",description:" Deletes a mailbox for the given user.\n",summary:"<p> Deletes a mailbox for the given user.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"host-info",type:"element(email:hostInfo)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The IMAP host, user name, and password.</div>'},{name:"mailbox-name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the mailbox to delete.</div>'}],returns:{type:"empty-sequence()",description:"The function is declared as sequential and has side-effects. It returns the empty sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0001 If the IMAP operation failed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0002 If the connection to the IMAP server is refused.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XQDY0027 If the value of <code>$host-info</code> is not valid according to the email schema: <code>http://www.zorba-xquery.com/modules/email</code></xqdoc:error>']},{isDocumented:!0,arity:2,name:"expunge",qname:"imap:expunge",signature:"($host-info as element(email:hostInfo), $mailbox as xs:string) as empty-sequence()",description:' Permanently deletes all messages of the given mailbox that have the "deleted" flag set.\n',summary:'<p> Permanently deletes all messages of the given mailbox that have the "deleted" flag set.</p>',annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"host-info",type:"element(email:hostInfo)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The IMAP host, user name, and password.</div>'},{name:"mailbox",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The mailbox for which all messages that have the \\Deleted flag set should be permanently deleted.</div>'}],returns:{type:"empty-sequence()",description:"The function is declared as sequential and has side-effects. It returns the empty sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0001 If the IMAP operation failed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0002 If the connection to the IMAP server is refused.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XQDY0027 If the value of <code>$host-info</code> is not valid according to the email schema: <code>http://www.zorba-xquery.com/modules/email</code></xqdoc:error>']},{isDocumented:!0,arity:4,name:"fetch-envelope",qname:"imap:fetch-envelope",signature:"($host-info as element(email:hostInfo), $mailbox as xs:string, $message-number as xs:long, $uid as xs:boolean?) as element(email:envelope)",description:" Fetches the envelope of a message.\n",summary:"<p> Fetches the envelope of a message.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"host-info",type:"element(email:hostInfo)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The IMAP host, user name, and password.</div>'},{name:"mailbox",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The mailbox in which to search for the message.</div>'},{name:"message-number",type:"xs:long",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The message for which to fetch the envelope (depending on <code>$uid</code> either as message sequence number or unique identifier).</div>'},{name:"uid",type:"xs:boolean",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> If true, <code>$message-number</code> is treated as sequence number. Else as unique identifier.</div>'}],returns:{type:"element(email:envelope)",description:'The <code xmlns:xqdoc="http://www.xqdoc.org/1.0">envelope</code> of the requested message. The result is validated against the schema: <code xmlns:xqdoc="http://www.xqdoc.org/1.0">http://www.zorba-xquery.com/modules/email</code>.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0001 If the IMAP operation failed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0002 If the connection to the IMAP server is refused.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0003 If no message is found with the provided sequence number/unique identifier.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XQDY0027 If the value of <code>$host-info</code> is not valid according to the email schema: <code>http://www.zorba-xquery.com/modules/email</code></xqdoc:error>']},{isDocumented:!0,arity:4,name:"fetch-flags",qname:"imap:fetch-flags",signature:"($host-info as element(email:hostInfo), $mailbox as xs:string, $message-number as xs:long, $uid as xs:boolean?) as element(email:flags)",description:" Fetches the flags of a message.\n",summary:"<p> Fetches the flags of a message.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"host-info",type:"element(email:hostInfo)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The IMAP host, user name, and password.</div>'},{name:"mailbox",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The mailbox containing the specified message.</div>'},{name:"message-number",type:"xs:long",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Either the message sequence number or the unique identifier of the message.</div>'},{name:"uid",type:"xs:boolean",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> If true, <code>$message-number</code> is treated as sequence number. Else as unique identifier.</div>'}],returns:{type:"element(email:flags)",description:'The <code xmlns:xqdoc="http://www.xqdoc.org/1.0">flags</code> of the specified message. The result is validated against the schema: <code xmlns:xqdoc="http://www.xqdoc.org/1.0">http://www.zorba-xquery.com/modules/email</code>.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0001 If the IMAP operation failed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0002 If the connection to the IMAP server is refused.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0003 If no message is found with the provided sequence number/unique identifier.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XQDY0027 If the value of <code>$host-info</code> is not valid according to the email schema: <code>http://www.zorba-xquery.com/modules/email</code></xqdoc:error>']},{isDocumented:!0,arity:3,name:"fetch-from",qname:"imap:fetch-from",signature:"($host-info as element(email:hostInfo), $mailbox as xs:string, $message-number as xs:long) as xs:string",description:" Fetches the 'from' string of a message.\n Please note that this function only words with message sequence numbers,\n not with unique identifiers. Only the first 255 characters of a 'from'\n string are fetched.\n",summary:"<p> Fetches the 'from' string of a message.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"host-info",type:"element(email:hostInfo)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The IMAP host, user name, and password.</div>'},{name:"mailbox",type:"xs:string",occurrence:null,description:"<div xmlns:xqdoc=\"http://www.xqdoc.org/1.0\"> The mailbox for which we want to get the 'from' string of a message.</div>"},{name:"message-number",type:"xs:long",occurrence:null,description:"<div xmlns:xqdoc=\"http://www.xqdoc.org/1.0\"> Denotes the message for which we want the 'from' string.</div>"}],returns:{type:"xs:string",description:"The 'from' string of the specified message."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0001 If the IMAP operation failed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0002 If the connection to the IMAP server is refused.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0003 If no message is found with the provided sequence number/unique identifier.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XQDY0027 If the value of <code>$host-info</code> is not valid according to the email schema: <code>http://www.zorba-xquery.com/modules/email</code></xqdoc:error>']},{isDocumented:!0,arity:3,name:"fetch-message-sequence-number",qname:"imap:fetch-message-sequence-number",signature:"($host-info as element(email:hostInfo), $mailbox as xs:string, $message-number as xs:long) as xs:long",description:" Fetches the message sequence number for a given unique identifier.\n",summary:"<p> Fetches the message sequence number for a given unique identifier.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"host-info",type:"element(email:hostInfo)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The IMAP host, user name, and password.</div>'},{name:"mailbox",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The mailbox for which we want to get the message sequence number of an unique identifier.</div>'},{name:"message-number",type:"xs:long",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The unique identifier for which we want the message sequence number.</div>'}],returns:{type:"xs:long",description:"The message sequence number of the of the given unique identifier."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0001 If the IMAP operation failed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0002 If the connection to the IMAP server is refused.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0003 If no message is found with the provided sequence number/unique identifier.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XQDY0027 If the value of <code>$host-info</code> is not valid according to the email schema: <code>http://www.zorba-xquery.com/modules/email</code></xqdoc:error>']},{isDocumented:!0,arity:4,name:"fetch-message",qname:"imap:fetch-message",signature:"($host-info as element(email:hostInfo), $mailbox as xs:string, $message-number as xs:long, $uid as xs:boolean) as element(email:message)",description:" Fetches a whole message.\n",summary:"<p> Fetches a whole message.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"host-info",type:"element(email:hostInfo)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The IMAP host, user name, and password.</div>'},{name:"mailbox",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The mailbox in which to search for the message.</div>'},{name:"message-number",type:"xs:long",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The message to fetch, denoted either by its sequence number or unique identifier.</div>'},{name:"uid",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> If true, <code>$message-number</code> is treated as sequence number. Else as unique identifier.</div>'}],returns:{type:"element(email:message)",description:'the <code xmlns:xqdoc="http://www.xqdoc.org/1.0">message</code> with the given <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$message-number</code>. The result is validated against the schema: <code xmlns:xqdoc="http://www.xqdoc.org/1.0">http://www.zorba-xquery.com/modules/email</code>.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0001 If the IMAP operation failed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0002 If the connection to the IMAP server is refused.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0003 If no message is found with the provided sequence number/unique identifier.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XQDY0027 If the value of <code>$host-info</code> is not valid according to the email schema: <code>http://www.zorba-xquery.com/modules/email</code></xqdoc:error>']},{isDocumented:!0,arity:3,name:"fetch-subject",qname:"imap:fetch-subject",signature:"($host-info as element(email:hostInfo), $mailbox as xs:string, $message-number as xs:long) as xs:string",description:" Fetches the subject for a message.\n Please note that this function only works with message sequence numbers,\n not with unique identifiers. Only the first 255 characters of a subject\n are fetched.\n",summary:"<p> Fetches the subject for a message.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"host-info",type:"element(email:hostInfo)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The IMAP host, user name, and password.</div>'},{name:"mailbox",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The mailbox for which we want to get the subject of a message.</div>'},{name:"message-number",type:"xs:long",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Denotes the message for which we want the subject.</div>'}],returns:{type:"xs:string",description:"The subject of the specified message."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0001 If the IMAP operation failed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0002 If the connection to the IMAP server is refused.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0003 If no message is found with the provided sequence number/unique identifier.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XQDY0027 If the value of <code>$host-info</code> is not valid according to the email schema: <code>http://www.zorba-xquery.com/modules/email</code></xqdoc:error>']},{isDocumented:!0,arity:3,name:"fetch-uid",qname:"imap:fetch-uid",signature:"($host-info as element(email:hostInfo), $mailbox as xs:string, $message-number as xs:long) as xs:long",description:" Fetches the unique identifier for a given message sequence number.\n",summary:"<p> Fetches the unique identifier for a given message sequence number.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"host-info",type:"element(email:hostInfo)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The IMAP host, user name, and password.</div>'},{name:"mailbox",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The mailbox for which we want to get the unique identifier of a message sequence number.</div>'},{name:"message-number",type:"xs:long",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The message sequence number for which we want the unique identifier.</div>'}],returns:{type:"xs:long",description:"The unique identifier of the given message sequence number."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0001 If the IMAP operation failed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0002 If the connection to the IMAP server is refused.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0003 If no message is found with the provided sequence number/unique identifier.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XQDY0027 If the value of <code>$host-info</code> is not valid according to the email schema: <code>http://www.zorba-xquery.com/modules/email</code></xqdoc:error>']},{isDocumented:!0,arity:4,name:"list",qname:"imap:list",signature:"($host-info as element(email:hostInfo), $mailbox-ref as xs:string, $pattern as xs:string, $only-subscribed as xs:boolean) as element(email:mailbox)*",description:" Lists IMAP folders for the specified user on the host that match the pattern.\n",summary:"<p> Lists IMAP folders for the specified user on the host that match the pattern.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"host-info",type:"element(email:hostInfo)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The IMAP host, user name, and password.</div>'},{name:"mailbox-ref",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is applied to pattern in an implementation dependent fashion to search for matching mailbox names.</div>'},{name:"pattern",type:"xs:string",occurrence:null,description:"<div xmlns:xqdoc=\"http://www.xqdoc.org/1.0\"> The pattern for mailboxes to look for (can include wildcards '*' and '%').</div>"},{name:"only-subscribed",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> If set true, only mailboxes are listed to which the user is subscribed.</div>'}],returns:{type:"element(email:mailbox)*",description:'A sequence of <code xmlns:xqdoc="http://www.xqdoc.org/1.0">mailbox</code> elements. The result elements are validated against the schema: <code xmlns:xqdoc="http://www.xqdoc.org/1.0">http://www.zorba-xquery.com/modules/email</code>.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0001 If the IMAP operation failed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0002 If the connection to the IMAP server is refused.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XQDY0027 If the value of <code>$host-info</code> is not valid according to the email schema: <code>http://www.zorba-xquery.com/modules/email</code></xqdoc:error>']},{isDocumented:!0,arity:5,name:"move",qname:"imap:move",signature:"($host-info as element(email:hostInfo), $mailbox-from as xs:string, $mailbox-to as xs:string, $messages as xs:long+, $uid as xs:boolean?) as empty-sequence()",description:' Moves messages between mailboxes.\n Depending on the value of <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$uid</code>, the messages are either specified through\n their sequence number or through their unique id. Both mailboxes must exist.\n',summary:"<p> Moves messages between mailboxes.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"host-info",type:"element(email:hostInfo)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The IMAP host, user name, and password.</div>'},{name:"mailbox-from",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The mailbox in which the messages reside.</div>'},{name:"mailbox-to",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The mailbox in to which the messages should be moved.</div>'},{name:"messages",type:"xs:long",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The messages to be copied, specified either by their sequence number or their unique id.</div>'},{name:"uid",type:"xs:boolean",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> If true, <code>$messages</code> are treated as sequence numbers. Else as unique identifiers.</div>'}],returns:{type:"empty-sequence()",description:"The function is declared as sequential and has side-effects. It returns the empty sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0001 If the IMAP operation failed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0002 If the connection to the IMAP server is refused.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0003 If no message is found with the provided sequence number/unique identifier.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XQDY0027 If the value of <code>$host-info</code> is not valid according to the email schema: <code>http://www.zorba-xquery.com/modules/email</code></xqdoc:error>']},{isDocumented:!0,arity:3,name:"rename",qname:"imap:rename",signature:"($host-info as element(email:hostInfo), $mailbox-old as xs:string, $mailbox-new as xs:string) as empty-sequence()",description:" Renames a mailbox.\n",summary:"<p> Renames a mailbox.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"host-info",type:"element(email:hostInfo)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The IMAP host, user name, and password.</div>'},{name:"mailbox-old",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the mailbox we want to rename.</div>'},{name:"mailbox-new",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The new name for the mailbox.</div>'}],returns:{type:"empty-sequence()",description:"The function is declared as sequential and has side-effects. It returns the empty sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0001 If the IMAP operation failed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0002 If the connection to the IMAP server is refused.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XQDY0027 If the value of <code>$host-info</code> is not valid according to the email schema: <code>http://www.zorba-xquery.com/modules/email</code></xqdoc:error>']},{isDocumented:!0,arity:4,name:"search",qname:"imap:search",signature:"($host-info as element(email:hostInfo), $mailbox as xs:string, $criteria as xs:string, $uid as xs:boolean?) as xs:long*",description:" Searches a mailbox for messages that match the given criteria.\n The criteria should be a string as defined in the RFC3501 (IMAP4rev1).\n A valid example would be: 'FROM zorba@gmail.com OR NOT SUBJECT Bug'.\n Depending on the value of <code xmlns:xqdoc=\"http://www.xqdoc.org/1.0\">$uid</code>, the function will either\n return matching sequence numbers or unique identifiers.\n",summary:"<p> Searches a mailbox for messages that match the given criteria.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"host-info",type:"element(email:hostInfo)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The IMAP host, user name, and password.</div>'},{name:"mailbox",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The mailbox to search.</div>'},{name:"criteria",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The searching criteria.</div>'},{name:"uid",type:"xs:boolean",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> If true, the function returns the sequence of unique identifiers corresponding to the matching mails, else the corresponding sequence numbers are returned.</div>'}],returns:{type:"xs:long*",description:"Either the sequence of matching sequence numbers or the sequence of matching unique identifiers."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0001 If the IMAP operation failed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0002 If the connection to the IMAP server is refused.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XQDY0027 If the value of <code>$host-info</code> is not valid according to the email schema: <code>http://www.zorba-xquery.com/modules/email</code></xqdoc:error>']},{isDocumented:!0,arity:5,name:"set-flags",qname:"imap:set-flags",signature:"($host-info as element(email:hostInfo), $mailbox as xs:string, $message-number as xs:long, $flags as element(email:flags), $uid as xs:boolean?) as empty-sequence()",description:' Sets the flags for a given message.\n The flags are set and unset according to the passed <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$flags</code>.\n',summary:"<p> Sets the flags for a given message.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"host-info",type:"element(email:hostInfo)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The IMAP host, user name, and password.</div>'},{name:"mailbox",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The mailbox containing the specified message.</div>'},{name:"message-number",type:"xs:long",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Either the message sequence number or the unique identifier of the message (depending on the value of <code>$uid</code>).</div>'},{name:"flags",type:"element(email:flags)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Defines which flags should be set for this message. The possibilities are "seen", "deleted", "flagged", "answered", and "draft". Setting all flags at once is done by passing the element: <code> &lt;email:flags&gt; &lt;email:seen/&gt; &lt;email:deleted/&gt; &lt;email:flagged/&gt; &lt;email:answered/&gt; &lt;email:draft/&gt; &lt;/email:flags&gt; </code>. Setting "flagged" only and unsetting all other at once can be done by passing: <code> &lt;email:flags&gt; &lt;email:flagged/&gt; &lt;/email:flags&gt; </code>.</div>'},{name:"uid",type:"xs:boolean",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> If true, <code>$message-number</code> is treated as sequence number. Else as unique identifier.</div>'}],returns:{type:"empty-sequence()",description:"The function is declared as sequential and has side-effects. It returns the empty sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0001 If the IMAP operation failed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0002 If the connection to the IMAP server is refused.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0003 If no message is found with the provided sequence number/unique identifier.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XQDY0027 If the value of <code>$host-info</code> is not valid according to the email schema: <code>http://www.zorba-xquery.com/modules/email</code></xqdoc:error>']},{isDocumented:!0,arity:2,name:"status",qname:"imap:status",signature:"($host-info as element(email:hostInfo), $mailbox as xs:string) as element(email:status)",description:' Returns the status of the given mailbox.\n The status of a mailbox contains:\n <ul xmlns:xqdoc="http://www.xqdoc.org/1.0">\n  <li><code>messages</code>: the number of messages in the mailbox</li>\n  <li><code>recent</code>: the number of messages flagged as recent</li>\n  <li><code>unseen</code>: the number of messages flagged as unseen</li>\n  <li><code>uidnext</code>: the next unique identifier that will be assigned to a message</li>\n  <li><code>uidvalidity</code>: a value that, together with the <code>uidnext</code> value\n    forms a 64 bit number that must be unique for the server</li>\n </ul>\n',summary:"<p> Returns the status of the given mailbox.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"host-info",type:"element(email:hostInfo)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The IMAP host, user name, and password.</div>'},{name:"mailbox",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The mailbox for which we want to have the status.</div>'}],returns:{type:"element(email:status)",description:'The <code xmlns:xqdoc="http://www.xqdoc.org/1.0">status</code> of the specified <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$mailbox</code>. The result is validated against the schema: <code xmlns:xqdoc="http://www.xqdoc.org/1.0">http://www.zorba-xquery.com/modules/email</code>.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0001 If the IMAP operation failed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0002 If the connection to the IMAP server is refused.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XQDY0027 If the value of <code>$host-info</code> is not valid according to the email schema: <code>http://www.zorba-xquery.com/modules/email</code></xqdoc:error>']},{isDocumented:!0,arity:2,name:"subscribe",qname:"imap:subscribe",signature:"($host-info as element(email:hostInfo), $mailbox as xs:string) as empty-sequence()",description:" Subscribes the user to the specified mailbox.\n",summary:"<p> Subscribes the user to the specified mailbox.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"host-info",type:"element(email:hostInfo)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The IMAP host, user name, and password.</div>'},{name:"mailbox",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The mailbox the user wants to subscribe to.</div>'}],returns:{type:"empty-sequence()",description:"The function is declared as sequential and has side-effects. It returns the empty sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0001 If the IMAP operation failed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0002 If the connection to the IMAP server is refused.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XQDY0027 If the value of <code>$host-info</code> is not valid according to the email schema: <code>http://www.zorba-xquery.com/modules/email</code></xqdoc:error>']},{isDocumented:!0,arity:2,name:"unsubscribe",qname:"imap:unsubscribe",signature:"($host-info as element(email:hostInfo), $mailbox as xs:string) as empty-sequence()",description:" Unsubscribes the user from the specified mailbox.\n",summary:"<p> Unsubscribes the user from the specified mailbox.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"host-info",type:"element(email:hostInfo)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The IMAP host, user name, and password.</div>'},{name:"mailbox",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The mailbox the user wants to unsubscribe from.</div>'}],returns:{type:"empty-sequence()",description:"The function is declared as sequential and has side-effects. It returns the empty sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0001 If the IMAP operation failed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">imap:IMAP0002 If the connection to the IMAP server is refused.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XQDY0027 If the value of <code>$host-info</code> is not valid according to the email schema: <code>http://www.zorba-xquery.com/modules/email</code></xqdoc:error>']}],variables:[]},"http://zorba.io/errors":{ns:"http://zorba.io/errors",description:" This module contains one variable declaration for each diagnostic of the\n http://zorba.io/errors namespace.\n The variables serves as documentation for the errors but can also\n be used in the code. For example, one useful scenario is to compare\n an error caught in the catch clause of a try-catch expression with one of\n the variables.\n",sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Carlos Lopez</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/errors",prefix:"zerr"}],functions:[],variables:[{name:"zerr:ZDST0032",type:"item()*",description:""},{name:"zerr:ZDST0004",type:"item()*",description:""},{name:"zerr:ZDST0006",type:"item()*",description:""},{name:"zerr:ZDST0007",type:"item()*",description:""},{name:"zerr:ZDST0021",type:"item()*",description:""},{name:"zerr:ZDST0022",type:"item()*",description:""},{name:"zerr:ZDST0023",type:"item()*",description:""},{name:"zerr:ZDST0024",type:"item()*",description:""},{name:"zerr:ZDST0025",type:"item()*",description:""},{name:"zerr:ZDST0026",type:"item()*",description:""},{name:"zerr:ZDST0027",type:"item()*",description:""},{name:"zerr:ZDST0028",type:"item()*",description:""},{name:"zerr:ZDST0029",type:"item()*",description:""},{name:"zerr:ZDST0030",type:"item()*",description:""},{name:"zerr:ZDST0031",type:"item()*",description:""},{name:"zerr:ZDST0003",type:"item()*",description:""},{name:"zerr:ZDST0033",type:"item()*",description:""},{name:"zerr:ZDST0034",type:"item()*",description:""},{name:"zerr:ZDST0035",type:"item()*",description:""},{name:"zerr:ZDST0036",type:"item()*",description:""},{name:"zerr:ZDST0041",type:"item()*",description:""},{name:"zerr:ZDST0044",type:"item()*",description:""},{name:"zerr:ZDST0048",type:"item()*",description:""},{name:"zerr:ZDST0060",type:"item()*",description:""},{name:"zerr:ZDTY0001",type:"item()*",description:""},{name:"zerr:ZDTY0010",type:"item()*",description:""},{name:"zerr:ZDTY0011",type:"item()*",description:""},{name:"zerr:ZDTY0012",type:"item()*",description:""},{name:"zerr:ZGDB0001",type:"item()*",description:""},{name:"zerr:ZOSE0001",type:"item()*",description:""},{name:"zerr:ZDDY0038",type:"item()*",description:""},{name:"zerr:ZDDY0024",type:"item()*",description:""},{name:"zerr:ZDDY0025",type:"item()*",description:""},{name:"zerr:ZDDY0026",type:"item()*",description:""},{name:"zerr:ZDDY0027",type:"item()*",description:""},{name:"zerr:ZDDY0028",type:"item()*",description:""},{name:"zerr:ZDDY0029",type:"item()*",description:""},{name:"zerr:ZDDY0030",type:"item()*",description:""},{name:"zerr:ZDDY0031",type:"item()*",description:""},{name:"zerr:ZDDY0032",type:"item()*",description:""},{name:"zerr:ZDDY0033",type:"item()*",description:""},{name:"zerr:ZDDY0034",type:"item()*",description:""},{name:"zerr:ZDDY0035",type:"item()*",description:""},{name:"zerr:ZDDY0036",type:"item()*",description:""},{name:"zerr:ZDDY0037",type:"item()*",description:""},{name:"zerr:ZOSE0002",type:"item()*",description:""},{name:"zerr:ZDDY0039",type:"item()*",description:""},{name:"zerr:ZDDY0040",type:"item()*",description:""},{name:"zerr:ZDDY0041",type:"item()*",description:""},{name:"zerr:ZDDY0042",type:"item()*",description:""},{name:"zerr:ZDDY0043",type:"item()*",description:""},{name:"zerr:ZDDY1000",type:"item()*",description:""},{name:"zerr:ZDDY1001",type:"item()*",description:""},{name:"zerr:ZDDY1003",type:"item()*",description:""},{name:"zerr:ZDDY1004",type:"item()*",description:""},{name:"zerr:ZDDY1005",type:"item()*",description:""},{name:"zerr:ZDDY1006",type:"item()*",description:""},{name:"zerr:ZDST0001",type:"item()*",description:""},{name:"zerr:ZDST0002",type:"item()*",description:""},{name:"zerr:ZJPE0005",type:"item()*",description:""},{name:"zerr:XSST0001",type:"item()*",description:""},{name:"zerr:XSST0002",type:"item()*",description:""},{name:"zerr:XSST0003",type:"item()*",description:""},{name:"zerr:XSST0004",type:"item()*",description:""},{name:"zerr:XSST0005",type:"item()*",description:""},{name:"zerr:XSST0006",type:"item()*",description:""},{name:"zerr:XSST0007",type:"item()*",description:""},{name:"zerr:XSST0008",type:"item()*",description:""},{name:"zerr:XSST0009",type:"item()*",description:""},{name:"zerr:XSST0010",type:"item()*",description:""},{name:"zerr:ZJPE0001",type:"item()*",description:""},{name:"zerr:ZJPE0002",type:"item()*",description:""},{name:"zerr:ZJPE0003",type:"item()*",description:""},{name:"zerr:ZJPE0004",type:"item()*",description:""},{name:"zerr:ZSTR0066",type:"item()*",description:""},{name:"zerr:ZJPE0006",type:"item()*",description:""},{name:"zerr:ZJPE0007",type:"item()*",description:""},{name:"zerr:ZJPE0008",type:"item()*",description:""},{name:"zerr:ZJPE0009",type:"item()*",description:""},{name:"zerr:ZJPE0010",type:"item()*",description:""},{name:"zerr:ZJSE0001",type:"item()*",description:""},{name:"zerr:ZJSE0002",type:"item()*",description:""},{name:"zerr:ZJSE0003",type:"item()*",description:""},{name:"zerr:ZJSE0004",type:"item()*",description:""},{name:"zerr:ZJSE0007",type:"item()*",description:""},{name:"zerr:ZJSE0008",type:"item()*",description:""},{name:"zerr:ZJSE0009",type:"item()*",description:""},{name:"zerr:ZJ2X0001",type:"item()*",description:""},{name:"zerr:ZSTR0012",type:"item()*",description:""},{name:"zerr:ZOSE0003",type:"item()*",description:""},{name:"zerr:ZOSE0004",type:"item()*",description:""},{name:"zerr:ZOSE0005",type:"item()*",description:""},{name:"zerr:ZOSE0006",type:"item()*",description:""},{name:"zerr:ZOSE0007",type:"item()*",description:""},{name:"zerr:ZSTR0001",type:"item()*",description:""},{name:"zerr:ZSTR0002",type:"item()*",description:""},{name:"zerr:ZSTR0003",type:"item()*",description:""},{name:"zerr:ZSTR0004",type:"item()*",description:""},{name:"zerr:ZSTR0007",type:"item()*",description:""},{name:"zerr:ZSTR0008",type:"item()*",description:""},{name:"zerr:ZSTR0009",type:"item()*",description:""},{name:"zerr:ZSTR0010",type:"item()*",description:""},{name:"zerr:ZSTR0011",type:"item()*",description:""},{name:"zerr:ZDDY0023",type:"item()*",description:""},{name:"zerr:ZSTR0013",type:"item()*",description:""},{name:"zerr:ZSTR0015",type:"item()*",description:""},{name:"zerr:ZSTR0016",type:"item()*",description:""},{name:"zerr:ZSTR0020",type:"item()*",description:""},{name:"zerr:ZSTR0021",type:"item()*",description:""},{name:"zerr:ZSTR0030",type:"item()*",description:""},{name:"zerr:ZSTR0040",type:"item()*",description:""},{name:"zerr:ZSTR0041",type:"item()*",description:""},{name:"zerr:ZSTR0045",type:"item()*",description:""},{name:"zerr:ZSTR0050",type:"item()*",description:""},{name:"zerr:ZSTR0055",type:"item()*",description:""},{name:"zerr:ZSTR0060",type:"item()*",description:""},{name:"zerr:ZSTR0065",type:"item()*",description:""},{name:"zerr:ZXQD0004",type:"item()*",description:""},{name:"zerr:ZXQP0036",type:"item()*",description:""},{name:"zerr:ZXQP0037",type:"item()*",description:""},{name:"zerr:ZXQP0038",type:"item()*",description:""},{name:"zerr:ZXQP0039",type:"item()*",description:""},{name:"zerr:ZXQP0040",type:"item()*",description:""},{name:"zerr:ZXQP0050",type:"item()*",description:""},{name:"zerr:ZXQP0060",type:"item()*",description:""},{name:"zerr:ZXQP0061",type:"item()*",description:""},{name:"zerr:ZXQP8401",type:"xs:QName",description:" The version of the thesaurus is not the expected version.\n"},{name:"zerr:ZXQP8402",type:"xs:QName",description:" The thesaurus data file's endianness does not match that of the CPU.\n"},{name:"zerr:ZXQP8403",type:"xs:QName",description:" The thesaurus data contains an unexpected value.\n"},{name:"zerr:ZXQD0001",type:"item()*",description:""},{name:"zerr:ZXQD0002",type:"item()*",description:""},{name:"zerr:ZXQD0003",type:"item()*",description:""},{name:"zerr:ZXQP0035",type:"item()*",description:""},{name:"zerr:ZXQD0005",type:"item()*",description:""},{name:"zerr:ZXQD0006",type:"item()*",description:""},{name:"zerr:ZAPI0002",type:"item()*",description:""},{name:"zerr:ZAPI0003",type:"item()*",description:""},{name:"zerr:ZAPI0004",type:"item()*",description:""},{name:"zerr:ZAPI0005",type:"item()*",description:""},{name:"zerr:ZAPI0006",type:"item()*",description:""},{name:"zerr:ZAPI0007",type:"item()*",description:""},{name:"zerr:ZAPI0008",type:"item()*",description:""},{name:"zerr:ZAPI0009",type:"item()*",description:""},{name:"zerr:ZAPI0011",type:"item()*",description:""},{name:"zerr:ZAPI0014",type:"item()*",description:""},{name:"zerr:ZAPI0015",type:"item()*",description:""},{name:"zerr:ZAPI0019",type:"item()*",description:""},{name:"zerr:ZXQP0014",type:"item()*",description:""},{name:"zerr:ZXQP0000",type:"xs:QName",description:' An "error" constant for "no error."\n'},{name:"zerr:ZXQP0001",type:"item()*",description:""},{name:"zerr:ZXQP0002",type:"xs:QName",description:" A Zorba programming assertion failed.  If this error occurs, it is a bug\n and should be reported.\n"},{name:"zerr:ZXQP0003",type:"xs:QName",description:" Something unexpected occurred in Zorba.  If this error occurs, it is a\n bug and should be reported.\n"},{name:"zerr:ZXQP0004",type:"xs:QName",description:" A particular XQuery feature has not been implemented by Zorba.\n"},{name:"zerr:ZXQP0005",type:"xs:QName",description:" A particular XQuery feature has been implemented by Zorba, but the\n feature has not been enabled in the current build.\n"},{name:"zerr:ZXQP0006",type:"item()*",description:""},{name:"zerr:ZXQP0007",type:"item()*",description:""},{name:"zerr:ZXQP0008",type:"item()*",description:""},{name:"zerr:ZXQP0009",type:"item()*",description:""},{name:"zerr:ZXQP0010",type:"item()*",description:""},{name:"zerr:ZXQP0011",type:"item()*",description:""},{name:"zerr:ZXQP0012",type:"item()*",description:""},{name:"zerr:ZXQP0013",type:"item()*",description:""},{name:"zerr:ZAPI0020",type:"item()*",description:""},{name:"zerr:ZXQP0016",type:"item()*",description:""},{name:"zerr:ZXQP0017",type:"item()*",description:""},{name:"zerr:ZXQP0020",type:"item()*",description:""},{name:"zerr:ZXQP0021",type:"item()*",description:""},{name:"zerr:ZXQP0024",type:"item()*",description:""},{name:"zerr:ZXQP0025",type:"item()*",description:""},{name:"zerr:ZXQP0026",type:"item()*",description:""},{name:"zerr:ZXQP0028",type:"item()*",description:""},{name:"zerr:ZXQP0029",type:"item()*",description:""},{name:"zerr:ZXQP0030",type:"item()*",description:""},{name:"zerr:ZXQP0031",type:"item()*",description:""},{name:"zerr:ZXQP0032",type:"item()*",description:""},{name:"zerr:ZXQP0033",type:"item()*",description:""},{name:"zerr:ZDDY0009",type:"item()*",description:""},{name:"zerr:ZCSE0012",type:"item()*",description:""},{name:"zerr:ZCSE0013",type:"item()*",description:""},{name:"zerr:ZCSE0014",type:"item()*",description:""},{name:"zerr:ZCSE0015",type:"item()*",description:""},{name:"zerr:ZCSE0016",type:"item()*",description:""},{name:"zerr:ZCSE0017",type:"item()*",description:""},{name:"zerr:ZDDY0001",type:"item()*",description:""},{name:"zerr:ZDDY0002",type:"item()*",description:""},{name:"zerr:ZDDY0003",type:"item()*",description:""},{name:"zerr:ZDDY0004",type:"item()*",description:""},{name:"zerr:ZDDY0005",type:"item()*",description:""},{name:"zerr:ZDDY0006",type:"item()*",description:""},{name:"zerr:ZDDY0007",type:"item()*",description:""},{name:"zerr:ZDDY0008",type:"item()*",description:""},{name:"zerr:ZCSE0011",type:"item()*",description:""},{name:"zerr:ZDDY0010",type:"item()*",description:""},{name:"zerr:ZDDY0011",type:"item()*",description:""},{name:"zerr:ZDDY0012",type:"item()*",description:""},{name:"zerr:ZDDY0013",type:"item()*",description:""},{name:"zerr:ZDDY0014",type:"item()*",description:""},{name:"zerr:ZDDY0015",type:"item()*",description:""},{name:"zerr:ZDDY0016",type:"item()*",description:""},{name:"zerr:ZDDY0017",type:"item()*",description:""},{name:"zerr:ZDDY0018",type:"item()*",description:""},{name:"zerr:ZDDY0020",type:"item()*",description:""},{name:"zerr:ZDDY0019",type:"item()*",description:""},{name:"zerr:ZDDY0021",type:"item()*",description:""},{name:"zerr:ZDDY0022",type:"item()*",description:""},{name:"zerr:ZAPI0045",type:"item()*",description:""},{name:"zerr:ZAPI0021",type:"item()*",description:""},{name:"zerr:ZAPI0023",type:"item()*",description:""},{name:"zerr:ZAPI0024",type:"item()*",description:""},{name:"zerr:ZAPI0025",type:"item()*",description:""},{name:"zerr:ZAPI0026",type:"item()*",description:""},{name:"zerr:ZAPI0027",type:"item()*",description:""},{name:"zerr:ZAPI0028",type:"item()*",description:""},{name:"zerr:ZAPI0029",type:"item()*",description:""},{name:"zerr:ZAPI0030",type:"item()*",description:""},{name:"zerr:ZAPI0039",type:"item()*",description:""},{name:"zerr:ZAPI0040",type:"item()*",description:""},{name:"zerr:ZAPI0041",type:"item()*",description:""},{name:"zerr:ZAPI0042",type:"item()*",description:""},{name:"zerr:ZAPI0043",type:"item()*",description:""},{name:"zerr:NS",type:"item()*",description:""},{name:"zerr:ZAPI0070",type:"item()*",description:""},{name:"zerr:ZAPI0080",type:"item()*",description:""},{name:"zerr:ZAPI0090",type:"item()*",description:""},{name:"zerr:ZCSE0001",type:"item()*",description:""},{name:"zerr:ZCSE0002",type:"item()*",description:""},{name:"zerr:ZCSE0003",type:"item()*",description:""},{name:"zerr:ZCSE0004",type:"item()*",description:""},{name:"zerr:ZCSE0005",type:"item()*",description:""},{name:"zerr:ZCSE0006",type:"item()*",description:""},{name:"zerr:ZCSE0007",type:"item()*",description:""},{name:"zerr:ZCSE0008",type:"item()*",description:""},{name:"zerr:ZCSE0009",type:"item()*",description:""},{name:"zerr:ZCSE0010",type:"item()*",description:""}]},"http://zorba.io/modules/sequence":{ns:"http://zorba.io/modules/sequence",description:" This module provides an XQuery API to perform set operations on sequences.\n",sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Paul J. Lucas</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/modules/sequence",prefix:"seq"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:2,name:"value-except",qname:"seq:value-except",signature:"($seq1 as xs:anyAtomicType*, $seq2 as xs:anyAtomicType*) as xs:anyAtomicType* external",description:" Filters the first sequence of atomic items such that they are not in the\n second sequence based on their values.\n",summary:"<p> Filters the first sequence of atomic items such that they are not in the\n second sequence based on their values.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"seq1",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The first sequence.</div>'},{name:"seq2",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The second sequence.</div>'}],returns:{type:"xs:anyAtomicType*",description:'a sequence only containing items from <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$seq1</code> that are not in <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$seq2</code>.'},errors:[]},{isDocumented:!0,arity:2,name:"value-intersect",qname:"seq:value-intersect",signature:"($seq1 as xs:anyAtomicType*, $seq2 as xs:anyAtomicType*) as xs:anyAtomicType* external",description:" Performs a set intersection of two sequences of atomic items based on their\n values.\n",summary:"<p> Performs a set intersection of two sequences of atomic items based on their\n values.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"seq1",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The first sequence.</div>'},{name:"seq2",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The second sequence.</div>'}],returns:{type:"xs:anyAtomicType*",description:'a sequence containing only items from <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$seq1</code> that are also in <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$seq2</code>.'},errors:[]},{isDocumented:!0,arity:2,name:"value-union",qname:"seq:value-union",signature:"($seq1 as xs:anyAtomicType*, $seq2 as xs:anyAtomicType*) as xs:anyAtomicType* external",description:" Performs a set union of two sequences of atomic items based on their values.\n",summary:"<p> Performs a set union of two sequences of atomic items based on their values.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"seq1",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The first sequence.</div>'},{name:"seq2",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The second sequence.</div>'}],returns:{type:"xs:anyAtomicType*",description:'a sequence containing all items from <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$seq1</code> and <code xmlns:xqdoc="http://www.xqdoc.org/1.0">seq2$</code> but without duplicates.'},errors:[]}],variables:[]},"http://api.28.io/functions":{ns:"http://api.28.io/functions",description:"",sees:[],authors:[],version:null,encoding:null,namespaces:[{uri:"",prefix:"an"},{uri:"http://api.28.io/functions",prefix:"functions"},{uri:"http://api.28.io/model",prefix:"model"},{uri:"http://www.zorba-xquery.com/schemas/pul",prefix:"pul"},{uri:"http://zorba.io/modules/reference",prefix:"ref"},{uri:"http://www.28msec.com/modules/http/request",prefix:"req"},{uri:"http://www.28msec.com/modules/http/response",prefix:"response"},{uri:"http://api.28.io/sandbox",prefix:"sandbox"},{uri:"http://www.zorba-xquery.com/schemas/xdm",prefix:"xdm"}],functions:[{isDocumented:!1,arity:1,name:"apply-pul",qname:"functions:apply-pul",signature:"($pul)",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"pul",type:null,occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:0,name:"collections",qname:"functions:collections",signature:"()",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:1,name:"decodeURI",qname:"functions:decodeURI",signature:"($str as xs:string) as xs:anyURI",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"str",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:anyURI",description:""},errors:[]},{isDocumented:!1,arity:1,name:"encode-for-js",qname:"functions:encode-for-js",signature:"($str as xs:string) as xs:string",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"str",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!1,arity:5,name:"entries",qname:"functions:entries",signature:"($collection as xs:string?, $node as xs:anyURI?, $index as xs:string?, $value as xs:string?, $format as xs:string)",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"collection",type:"xs:string",occurrence:"?",description:""},{name:"node",type:"xs:anyURI",occurrence:"?",description:""},{name:"index",type:"xs:string",occurrence:"?",description:""},{name:"value",type:"xs:string",occurrence:"?",description:""},{name:"format",type:"xs:string",occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:0,name:"indexes",qname:"functions:indexes",signature:"()",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:3,name:"key",qname:"functions:key",signature:"($collection as xs:string, $condition as xs:string, $namespaces)",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"collection",type:"xs:string",occurrence:null,description:""},{name:"condition",type:"xs:string",occurrence:null,description:""},{name:"namespaces",type:null,occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:3,name:"namesearch",qname:"functions:namesearch",signature:"($collection as xs:string, $path as xs:string, $namespaces)",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"collection",type:"xs:string",occurrence:null,description:""},{name:"path",type:"xs:string",occurrence:null,description:""},{name:"namespaces",type:null,occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:1,name:"node-to-js",qname:"functions:node-to-js",signature:"($node) as xs:string*",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"node",type:null,occurrence:null,description:""}],returns:{type:"xs:string*",description:""},errors:[]},{isDocumented:!1,arity:1,name:"parse-namespaces",qname:"functions:parse-namespaces",signature:"($namespaces as xs:string)",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"namespaces",type:"xs:string",occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:1,name:"pksearch",qname:"functions:pksearch",signature:"($collection as xs:string)",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"collection",type:"xs:string",occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:0,name:"startpage",qname:"functions:startpage",signature:"()",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:1,name:"strip-whitespaces",qname:"functions:strip-whitespaces",signature:"($xml)",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"xml",type:null,occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:3,name:"tuple",qname:"functions:tuple",signature:"($collection as xs:string, $condition as xs:string, $namespaces)",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"collection",type:"xs:string",occurrence:null,description:""},{name:"condition",type:"xs:string",occurrence:null,description:""},{name:"namespaces",type:null,occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:3,name:"valuesearch",qname:"functions:valuesearch",signature:"($collection as xs:string, $path as xs:string, $namespaces)",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"collection",type:"xs:string",occurrence:null,description:""},{name:"path",type:"xs:string",occurrence:null,description:""},{name:"namespaces",type:null,occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!0,arity:1,name:"xmltojs",qname:"functions:xmltojs",signature:"($content)",description:" Internal function. Converts the XML contents of a POST BODY to JavaScript calls that rebuild the given XML for the collection browser frontend\n",summary:"<p> Internal function.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"content",type:null,occurrence:null,description:""}],returns:{type:null,description:"JavaScript calls for collection browser frontend"},errors:[]}],variables:[]},"http://xbrl.io/modules/bizql/profiles/sec/companies":{ns:"http://xbrl.io/modules/bizql/profiles/sec/companies",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This module provides functionality for querying companies (XBRL entities)\n  submitting to the SEC.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">SEC Companies are nothing else than XBRL entities. For XBRL-generic requests on\n entities, use the generic entities module.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">With this module, you can retrieve a company with its CIK (without converting\n it to an EID). You can also retrieve companies by sector, by SIC code, by types,\n by tags, by tickers.</p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Charles Hoffman</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Matthias Brantner</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Dennis Knochenwefel</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Ghislain Fourny</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://xbrl.io/modules/bizql/archives",prefix:"archives"},{uri:"http://xbrl.io/modules/bizql/profiles/sec/companies",prefix:"companies"},{uri:"http://www.28msec.com/modules/credentials",prefix:"credentials"},{uri:"http://xbrl.io/modules/bizql/entities",prefix:"entities"},{uri:"http://www.28msec.com/modules/mongodb",prefix:"mongo"},{uri:"http://xbrl.io/modules/bizql/profiles/sec/core",prefix:"sec"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"companies-by-types",qname:"companies:companies-by-types",signature:"($company-types as string*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves all companies whose company type matches the passed string(s).</p>\n',summary:"<p>  Retrieves all companies whose company type matches the passed string(s).</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"company-types",type:"string",occurrence:"*",description:""}],returns:{type:"object()*",description:"all companies with matching company type."},errors:[]},{isDocumented:!0,arity:1,name:"companies-for-SIC",qname:"companies:companies-for-SIC",signature:"($sic-codes as string*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves all companies whose type of business\n matches the SIC (Standard Industrial Classification) code.</p>\n',summary:"<p>  Retrieves all companies whose type of business\n matches the SIC (Standard Industrial Classification) code.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"sic-codes",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of SIC codes.</div>'}],returns:{type:"object()*",description:"all companies with one of these SIC codes."},errors:[]},{isDocumented:!0,arity:1,name:"companies-for-sector",qname:"companies:companies-for-sector",signature:"($sectors as string*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves all companies in the given sectors.</p>\n',summary:"<p>  Retrieves all companies in the given sectors.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"sectors",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of sectors as strings.</div>'}],returns:{type:"object()*",description:"all companies in these sectors."},errors:[]},{isDocumented:!0,arity:1,name:"companies-for-tags",qname:"companies:companies-for-tags",signature:"($tags as string*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Return all companies with any of the given tags.</p>\n',summary:"<p>  Return all companies with any of the given tags.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"tags",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the tags to filter.</div>'}],returns:{type:"object()*",description:"all companies with the given tags."},errors:[]},{isDocumented:!0,arity:1,name:"companies-for-tickers",qname:"companies:companies-for-tickers",signature:"($tickers as string*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Return all companies with any of the given ticker symbols.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Tickers are case insensitive</p>\n',summary:"<p>  Return all companies with any of the given ticker symbols.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"tickers",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the tickers to filter.</div>'}],returns:{type:"object()*",description:"all companies with the given tickers."},errors:[]},{isDocumented:!0,arity:0,name:"companies",qname:"companies:companies",signature:"() as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Return all companies</p>\n',summary:"<p>  Return all companies \n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"object()*",description:"all companies."},errors:[]},{isDocumented:!0,arity:1,name:"companies",qname:"companies:companies",signature:"($companies-or-ids as item()*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Return the companies with the given identifiers.</p>\n',summary:"<p>  Return the companies with the given identifiers.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"companies-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the ids of the companies or the companies themselves.</div>'}],returns:{type:"object()*",description:"the companies with the given identifiers the empty sequence if no company was found or if the input is an empty sequence."},errors:[]},{isDocumented:!0,arity:1,name:"company-type",qname:"companies:company-type",signature:"($company-name as string) as string",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Return company type for a given company name. Company type can be one of:</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n   <ul>\n     <li>Corporation</li>\n     <li>Partnership</li>\n     <li>unknown</li>\n   </ul>\n </p>\n',summary:"<p>  Return company type for a given company name.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"company-name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of a company</div>'}],returns:{type:"string",description:'the company type string or "unknown" if the type can not be inferred'},errors:[]},{isDocumented:!0,arity:1,name:"eid",qname:"companies:eid",signature:"($companies-or-eids-or-ciks as item()*) as string*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Converts the input to a normalized CIK. The input\n can be either a pure CIK without scheme, or an already\n normalized CIK, or an entity object which contains a CIK\n in its id field.</p>\n',summary:"<p>  Converts the input to a normalized CIK.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"companies-or-eids-or-ciks",type:"item()",occurrence:"*",description:""}],returns:{type:"string*",description:"the normalized CIK."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">sec:INVALID_PARAMETER if the CIK or entity is not valid</xqdoc:error>']},{isDocumented:!0,arity:1,name:"types",qname:"companies:types",signature:"($companies-or-ciks as item()*) as string*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves the type of a company.</p>\n',summary:"<p>  Retrieves the type of a company.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"companies-or-ciks",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of companies or their identifiers (CIKs).</div>'}],returns:{type:"string*",description:"all company types."},errors:[]}],variables:[]},"http://api.28.io/collections":{ns:"http://api.28.io/collections",description:"",sees:[],authors:[],version:null,encoding:null,namespaces:[{uri:"",prefix:"an"},{uri:"http://api.28.io/collections",prefix:"cm"},{uri:"http://www.28msec.com/modules/http/request",prefix:"req"},{uri:"http://www.28msec.com/modules/http/response",prefix:"resp"},{uri:"http://api.28.io/util",prefix:"util"},{uri:"http://api.28.io/validation",prefix:"validate"}],functions:[{isDocumented:!1,arity:1,name:"definition-for-dynamic-collection",qname:"cm:definition-for-dynamic-collection",signature:"($name as xs:string) as object()",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"xs:string",occurrence:null,description:""}],returns:{type:"object()",description:""},errors:[]},{isDocumented:!1,arity:2,name:"delete-collection-property",qname:"cm:delete-collection-property",signature:"($name as xs:string, $property as xs:string) as empty-sequence()",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"name",type:"xs:string",occurrence:null,description:""},{name:"property",type:"xs:string",occurrence:null,description:""}],returns:{type:"empty-sequence()",description:""},errors:[]},{isDocumented:!1,arity:1,name:"delete-collection",qname:"cm:delete-collection",signature:"($name) as empty-sequence()",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"name",type:null,occurrence:null,description:""}],returns:{type:"empty-sequence()",description:""},errors:[]},{isDocumented:!1,arity:0,name:"dispatch",qname:"cm:dispatch",signature:"()",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:2,name:"get-collection-property",qname:"cm:get-collection-property",signature:"($name as xs:string, $property as xs:string)",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"name",type:"xs:string",occurrence:null,description:""},{name:"property",type:"xs:string",occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:1,name:"get-collection",qname:"cm:get-collection",signature:"($name as xs:string) as object()",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"name",type:"xs:string",occurrence:null,description:""}],returns:{type:"object()",description:""},errors:[]},{isDocumented:!1,arity:1,name:"get-or-create-collection-dynamic",qname:"cm:get-or-create-collection-dynamic",signature:"($name as xs:string) as object()",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"name",type:"xs:string",occurrence:null,description:""}],returns:{type:"object()",description:""},errors:[]},{isDocumented:!1,arity:0,name:"list-collections",qname:"cm:list-collections",signature:"() as array()",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[],returns:{type:"array()",description:""},errors:[]},{isDocumented:!1,arity:0,name:"metadata",qname:"cm:metadata",signature:"()",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:3,name:"put-collection-property",qname:"cm:put-collection-property",signature:"($name as xs:string, $property as xs:string, $value) as empty-sequence()",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"name",type:"xs:string",occurrence:null,description:""},{name:"property",type:"xs:string",occurrence:null,description:""},{name:"value",type:null,occurrence:null,description:""}],returns:{type:"empty-sequence()",description:""},errors:[]},{isDocumented:!1,arity:2,name:"put-collection",qname:"cm:put-collection",signature:"($name as xs:string, $collection as object()) as empty-sequence()",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"name",type:"xs:string",occurrence:null,description:""},{name:"collection",type:"object()",occurrence:null,description:""}],returns:{type:"empty-sequence()",description:""},errors:[]},{isDocumented:!1,arity:1,name:"validate-collection",qname:"cm:validate-collection",signature:"($collection as object()) as empty-sequence()",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"collection",type:"object()",occurrence:null,description:""}],returns:{type:"empty-sequence()",description:""},errors:[]}],variables:[]},"http://zorba.io/modules/excel/math-sumproduct":{ns:"http://zorba.io/modules/excel/math-sumproduct",description:" Module implementing the sumproduct functions from Excel 2003 math library.\n There are 30 functions defined, implementing the same function\n but with 1 to 30 parameters.\n Each parameter can be a sequence of infinite length.\n",sees:['<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0"><a href="http://office.microsoft.com/en-us/excel/HP052092931033.aspx" target="_blank">Excel 2003 Documentation: Math-sumproduct Functions</a></xqdoc:see>'],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Daniel Turcanu</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/modules/excel/math-sumproduct",prefix:"excel"},{uri:"http://zorba.io/modules/excel/errors",prefix:"excel-err"},{uri:"http://zorba.io/modules/excel/math",prefix:"excel-math"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"sumproduct",qname:"excel:sumproduct",signature:"($array1 as xs:anyAtomicType*) as xs:anyAtomicType",description:" Sums the values in the sequence.\n The sequence can be of any length.\n",summary:"<p> Sums the values in the sequence.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"array1",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of numbers or arguments castable to numeric</div>'}],returns:{type:"xs:anyAtomicType",description:"the sum"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>']},{isDocumented:!0,arity:10,name:"sumproduct",qname:"excel:sumproduct",signature:"($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*, $array9 as xs:anyAtomicType*, $array10 as xs:anyAtomicType*) as xs:anyAtomicType",description:" Multiplies the elements on the same position in each sequence\n and sums up the results.\n",summary:"<p> Multiplies the elements on the same position in each sequence\n and sums up the results.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"array1",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array2",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array3",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array4",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array5",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array6",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array7",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array8",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array9",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array10",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'}],returns:{type:"xs:anyAtomicType",description:"the sum of products"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>']},{isDocumented:!0,arity:11,name:"sumproduct",qname:"excel:sumproduct",signature:"($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*, $array9 as xs:anyAtomicType*, $array10 as xs:anyAtomicType*, $array11 as xs:anyAtomicType*) as xs:anyAtomicType",description:" Multiplies the elements on the same position in each sequence\n and sums up the results.\n",summary:"<p> Multiplies the elements on the same position in each sequence\n and sums up the results.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"array1",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array2",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array3",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array4",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array5",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array6",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array7",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array8",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array9",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array10",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array11",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'}],returns:{type:"xs:anyAtomicType",description:"the sum of products"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>']},{isDocumented:!0,arity:12,name:"sumproduct",qname:"excel:sumproduct",signature:"($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*, $array9 as xs:anyAtomicType*, $array10 as xs:anyAtomicType*, $array11 as xs:anyAtomicType*, $array12 as xs:anyAtomicType*) as xs:anyAtomicType",description:" Multiplies the elements on the same position in each sequence\n and sums up the results.\n",summary:"<p> Multiplies the elements on the same position in each sequence\n and sums up the results.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"array1",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array2",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array3",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array4",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array5",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array6",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array7",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array8",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array9",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array10",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array11",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array12",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'}],returns:{type:"xs:anyAtomicType",description:"the sum of products"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>']},{isDocumented:!0,arity:13,name:"sumproduct",qname:"excel:sumproduct",signature:"($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*, $array9 as xs:anyAtomicType*, $array10 as xs:anyAtomicType*, $array11 as xs:anyAtomicType*, $array12 as xs:anyAtomicType*, $array13 as xs:anyAtomicType*) as xs:anyAtomicType",description:" Multiplies the elements on the same position in each sequence\n and sums up the results.\n",summary:"<p> Multiplies the elements on the same position in each sequence\n and sums up the results.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"array1",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array2",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array3",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array4",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array5",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array6",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array7",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array8",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array9",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array10",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array11",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array12",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array13",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'}],returns:{type:"xs:anyAtomicType",description:"the sum of products"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>']},{isDocumented:!0,arity:14,name:"sumproduct",qname:"excel:sumproduct",signature:"($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*, $array9 as xs:anyAtomicType*, $array10 as xs:anyAtomicType*, $array11 as xs:anyAtomicType*, $array12 as xs:anyAtomicType*, $array13 as xs:anyAtomicType*, $array14 as xs:anyAtomicType*) as xs:anyAtomicType",description:" Multiplies the elements on the same position in each sequence\n and sums up the results.\n",summary:"<p> Multiplies the elements on the same position in each sequence\n and sums up the results.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"array1",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array2",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array3",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array4",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array5",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array6",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array7",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array8",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array9",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array10",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array11",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array12",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array13",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array14",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'}],returns:{type:"xs:anyAtomicType",description:"the sum of products"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>']},{isDocumented:!0,arity:15,name:"sumproduct",qname:"excel:sumproduct",signature:"($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*, $array9 as xs:anyAtomicType*, $array10 as xs:anyAtomicType*, $array11 as xs:anyAtomicType*, $array12 as xs:anyAtomicType*, $array13 as xs:anyAtomicType*, $array14 as xs:anyAtomicType*, $array15 as xs:anyAtomicType*) as xs:anyAtomicType",description:" Multiplies the elements on the same position in each sequence\n and sums up the results.\n",summary:"<p> Multiplies the elements on the same position in each sequence\n and sums up the results.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"array1",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array2",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array3",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array4",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array5",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array6",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array7",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array8",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array9",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array10",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array11",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array12",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array13",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array14",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array15",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'}],returns:{type:"xs:anyAtomicType",description:"the sum of products"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>']},{isDocumented:!0,arity:16,name:"sumproduct",qname:"excel:sumproduct",signature:"($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*, $array9 as xs:anyAtomicType*, $array10 as xs:anyAtomicType*, $array11 as xs:anyAtomicType*, $array12 as xs:anyAtomicType*, $array13 as xs:anyAtomicType*, $array14 as xs:anyAtomicType*, $array15 as xs:anyAtomicType*, $array16 as xs:anyAtomicType*) as xs:anyAtomicType",description:" Multiplies the elements on the same position in each sequence\n and sums up the results.\n",summary:"<p> Multiplies the elements on the same position in each sequence\n and sums up the results.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"array1",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array2",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array3",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array4",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array5",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array6",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array7",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array8",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array9",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array10",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array11",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array12",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array13",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array14",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array15",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array16",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'}],returns:{type:"xs:anyAtomicType",description:"the sum of products"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>']},{isDocumented:!0,arity:17,name:"sumproduct",qname:"excel:sumproduct",signature:"($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*, $array9 as xs:anyAtomicType*, $array10 as xs:anyAtomicType*, $array11 as xs:anyAtomicType*, $array12 as xs:anyAtomicType*, $array13 as xs:anyAtomicType*, $array14 as xs:anyAtomicType*, $array15 as xs:anyAtomicType*, $array16 as xs:anyAtomicType*, $array17 as xs:anyAtomicType*) as xs:anyAtomicType",description:" Multiplies the elements on the same position in each sequence\n and sums up the results.\n",summary:"<p> Multiplies the elements on the same position in each sequence\n and sums up the results.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"array1",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array2",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array3",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array4",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array5",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array6",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array7",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array8",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array9",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array10",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array11",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array12",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array13",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array14",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array15",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array16",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array17",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'}],returns:{type:"xs:anyAtomicType",description:"the sum of products"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>']},{isDocumented:!0,arity:18,name:"sumproduct",qname:"excel:sumproduct",signature:"($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*, $array9 as xs:anyAtomicType*, $array10 as xs:anyAtomicType*, $array11 as xs:anyAtomicType*, $array12 as xs:anyAtomicType*, $array13 as xs:anyAtomicType*, $array14 as xs:anyAtomicType*, $array15 as xs:anyAtomicType*, $array16 as xs:anyAtomicType*, $array17 as xs:anyAtomicType*, $array18 as xs:anyAtomicType*) as xs:anyAtomicType",description:" Multiplies the elements on the same position in each sequence\n and sums up the results.\n",summary:"<p> Multiplies the elements on the same position in each sequence\n and sums up the results.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"array1",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array2",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array3",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array4",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array5",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array6",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array7",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array8",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array9",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array10",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array11",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array12",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array13",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array14",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array15",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array16",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array17",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array18",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'}],returns:{type:"xs:anyAtomicType",description:"the sum of products"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>']},{isDocumented:!0,arity:19,name:"sumproduct",qname:"excel:sumproduct",signature:"($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*, $array9 as xs:anyAtomicType*, $array10 as xs:anyAtomicType*, $array11 as xs:anyAtomicType*, $array12 as xs:anyAtomicType*, $array13 as xs:anyAtomicType*, $array14 as xs:anyAtomicType*, $array15 as xs:anyAtomicType*, $array16 as xs:anyAtomicType*, $array17 as xs:anyAtomicType*, $array18 as xs:anyAtomicType*, $array19 as xs:anyAtomicType*) as xs:anyAtomicType",description:" Multiplies the elements on the same position in each sequence\n and sums up the results.\n",summary:"<p> Multiplies the elements on the same position in each sequence\n and sums up the results.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"array1",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array2",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array3",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array4",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array5",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array6",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array7",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array8",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array9",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array10",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array11",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array12",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array13",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array14",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array15",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array16",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array17",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array18",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array19",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'}],returns:{type:"xs:anyAtomicType",description:"the sum of products"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>']},{isDocumented:!0,arity:2,name:"sumproduct",qname:"excel:sumproduct",signature:"($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*) as xs:anyAtomicType",description:" Multiplies the elements on the same position in each sequence\n and sums up the results.\n",summary:"<p> Multiplies the elements on the same position in each sequence\n and sums up the results.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"array1",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array2",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'}],returns:{type:"xs:anyAtomicType",description:"the sum of products"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>']},{isDocumented:!0,arity:20,name:"sumproduct",qname:"excel:sumproduct",signature:"($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*, $array9 as xs:anyAtomicType*, $array10 as xs:anyAtomicType*, $array11 as xs:anyAtomicType*, $array12 as xs:anyAtomicType*, $array13 as xs:anyAtomicType*, $array14 as xs:anyAtomicType*, $array15 as xs:anyAtomicType*, $array16 as xs:anyAtomicType*, $array17 as xs:anyAtomicType*, $array18 as xs:anyAtomicType*, $array19 as xs:anyAtomicType*, $array20 as xs:anyAtomicType*) as xs:anyAtomicType",description:" Multiplies the elements on the same position in each sequence\n and sums up the results.\n",summary:"<p> Multiplies the elements on the same position in each sequence\n and sums up the results.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"array1",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array2",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array3",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array4",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array5",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array6",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array7",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array8",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array9",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array10",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array11",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array12",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array13",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array14",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array15",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array16",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array17",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array18",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array19",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array20",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'}],returns:{type:"xs:anyAtomicType",description:"the sum of products"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>']},{isDocumented:!0,arity:21,name:"sumproduct",qname:"excel:sumproduct",signature:"($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*, $array9 as xs:anyAtomicType*, $array10 as xs:anyAtomicType*, $array11 as xs:anyAtomicType*, $array12 as xs:anyAtomicType*, $array13 as xs:anyAtomicType*, $array14 as xs:anyAtomicType*, $array15 as xs:anyAtomicType*, $array16 as xs:anyAtomicType*, $array17 as xs:anyAtomicType*, $array18 as xs:anyAtomicType*, $array19 as xs:anyAtomicType*, $array20 as xs:anyAtomicType*, $array21 as xs:anyAtomicType*) as xs:anyAtomicType",description:" Multiplies the elements on the same position in each sequence\n and sums up the results.\n",summary:"<p> Multiplies the elements on the same position in each sequence\n and sums up the results.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"array1",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array2",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array3",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array4",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array5",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array6",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array7",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array8",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array9",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array10",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array11",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array12",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array13",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array14",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array15",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array16",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array17",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array18",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array19",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array20",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array21",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'}],returns:{type:"xs:anyAtomicType",description:"the sum of products"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>']},{isDocumented:!0,arity:22,name:"sumproduct",qname:"excel:sumproduct",signature:"($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*, $array9 as xs:anyAtomicType*, $array10 as xs:anyAtomicType*, $array11 as xs:anyAtomicType*, $array12 as xs:anyAtomicType*, $array13 as xs:anyAtomicType*, $array14 as xs:anyAtomicType*, $array15 as xs:anyAtomicType*, $array16 as xs:anyAtomicType*, $array17 as xs:anyAtomicType*, $array18 as xs:anyAtomicType*, $array19 as xs:anyAtomicType*, $array20 as xs:anyAtomicType*, $array21 as xs:anyAtomicType*, $array22 as xs:anyAtomicType*) as xs:anyAtomicType",description:" Multiplies the elements on the same position in each sequence\n and sums up the results.\n",summary:"<p> Multiplies the elements on the same position in each sequence\n and sums up the results.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"array1",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array2",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array3",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array4",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array5",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array6",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array7",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array8",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array9",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array10",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array11",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array12",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array13",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array14",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array15",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array16",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array17",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array18",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array19",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array20",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array21",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array22",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'}],returns:{type:"xs:anyAtomicType",description:"the sum of products"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>']},{isDocumented:!0,arity:23,name:"sumproduct",qname:"excel:sumproduct",signature:"($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*, $array9 as xs:anyAtomicType*, $array10 as xs:anyAtomicType*, $array11 as xs:anyAtomicType*, $array12 as xs:anyAtomicType*, $array13 as xs:anyAtomicType*, $array14 as xs:anyAtomicType*, $array15 as xs:anyAtomicType*, $array16 as xs:anyAtomicType*, $array17 as xs:anyAtomicType*, $array18 as xs:anyAtomicType*, $array19 as xs:anyAtomicType*, $array20 as xs:anyAtomicType*, $array21 as xs:anyAtomicType*, $array22 as xs:anyAtomicType*, $array23 as xs:anyAtomicType*) as xs:anyAtomicType",description:" Multiplies the elements on the same position in each sequence\n and sums up the results.\n",summary:"<p> Multiplies the elements on the same position in each sequence\n and sums up the results.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"array1",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array2",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array3",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array4",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array5",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array6",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array7",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array8",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array9",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array10",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array11",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array12",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array13",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array14",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array15",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array16",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array17",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array18",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array19",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array20",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array21",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array22",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array23",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'}],returns:{type:"xs:anyAtomicType",description:"the sum of products"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>']},{isDocumented:!0,arity:24,name:"sumproduct",qname:"excel:sumproduct",signature:"($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*, $array9 as xs:anyAtomicType*, $array10 as xs:anyAtomicType*, $array11 as xs:anyAtomicType*, $array12 as xs:anyAtomicType*, $array13 as xs:anyAtomicType*, $array14 as xs:anyAtomicType*, $array15 as xs:anyAtomicType*, $array16 as xs:anyAtomicType*, $array17 as xs:anyAtomicType*, $array18 as xs:anyAtomicType*, $array19 as xs:anyAtomicType*, $array20 as xs:anyAtomicType*, $array21 as xs:anyAtomicType*, $array22 as xs:anyAtomicType*, $array23 as xs:anyAtomicType*, $array24 as xs:anyAtomicType*) as xs:anyAtomicType",description:" Multiplies the elements on the same position in each sequence\n and sums up the results.\n",summary:"<p> Multiplies the elements on the same position in each sequence\n and sums up the results.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"array1",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array2",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array3",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array4",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array5",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array6",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array7",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array8",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array9",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array10",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array11",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array12",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array13",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array14",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array15",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array16",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array17",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array18",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array19",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array20",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array21",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array22",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array23",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array24",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'}],returns:{type:"xs:anyAtomicType",description:"the sum of products"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>']},{isDocumented:!0,arity:25,name:"sumproduct",qname:"excel:sumproduct",signature:"($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*, $array9 as xs:anyAtomicType*, $array10 as xs:anyAtomicType*, $array11 as xs:anyAtomicType*, $array12 as xs:anyAtomicType*, $array13 as xs:anyAtomicType*, $array14 as xs:anyAtomicType*, $array15 as xs:anyAtomicType*, $array16 as xs:anyAtomicType*, $array17 as xs:anyAtomicType*, $array18 as xs:anyAtomicType*, $array19 as xs:anyAtomicType*, $array20 as xs:anyAtomicType*, $array21 as xs:anyAtomicType*, $array22 as xs:anyAtomicType*, $array23 as xs:anyAtomicType*, $array24 as xs:anyAtomicType*, $array25 as xs:anyAtomicType*) as xs:anyAtomicType",description:" Multiplies the elements on the same position in each sequence\n and sums up the results.\n",summary:"<p> Multiplies the elements on the same position in each sequence\n and sums up the results.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"array1",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array2",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array3",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array4",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array5",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array6",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array7",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array8",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array9",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array10",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array11",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array12",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array13",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array14",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array15",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array16",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array17",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array18",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array19",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array20",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array21",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array22",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array23",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array24",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array25",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'}],returns:{type:"xs:anyAtomicType",description:"the sum of products"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>']},{isDocumented:!0,arity:26,name:"sumproduct",qname:"excel:sumproduct",signature:"($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*, $array9 as xs:anyAtomicType*, $array10 as xs:anyAtomicType*, $array11 as xs:anyAtomicType*, $array12 as xs:anyAtomicType*, $array13 as xs:anyAtomicType*, $array14 as xs:anyAtomicType*, $array15 as xs:anyAtomicType*, $array16 as xs:anyAtomicType*, $array17 as xs:anyAtomicType*, $array18 as xs:anyAtomicType*, $array19 as xs:anyAtomicType*, $array20 as xs:anyAtomicType*, $array21 as xs:anyAtomicType*, $array22 as xs:anyAtomicType*, $array23 as xs:anyAtomicType*, $array24 as xs:anyAtomicType*, $array25 as xs:anyAtomicType*, $array26 as xs:anyAtomicType*) as xs:anyAtomicType",description:" Multiplies the elements on the same position in each sequence\n and sums up the results.\n",summary:"<p> Multiplies the elements on the same position in each sequence\n and sums up the results.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"array1",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array2",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array3",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array4",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array5",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array6",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array7",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array8",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array9",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array10",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array11",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array12",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array13",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array14",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array15",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array16",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array17",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array18",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array19",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array20",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array21",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array22",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array23",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array24",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array25",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array26",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'}],returns:{type:"xs:anyAtomicType",description:"the sum of products"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>']},{isDocumented:!0,arity:27,name:"sumproduct",qname:"excel:sumproduct",signature:"($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*, $array9 as xs:anyAtomicType*, $array10 as xs:anyAtomicType*, $array11 as xs:anyAtomicType*, $array12 as xs:anyAtomicType*, $array13 as xs:anyAtomicType*, $array14 as xs:anyAtomicType*, $array15 as xs:anyAtomicType*, $array16 as xs:anyAtomicType*, $array17 as xs:anyAtomicType*, $array18 as xs:anyAtomicType*, $array19 as xs:anyAtomicType*, $array20 as xs:anyAtomicType*, $array21 as xs:anyAtomicType*, $array22 as xs:anyAtomicType*, $array23 as xs:anyAtomicType*, $array24 as xs:anyAtomicType*, $array25 as xs:anyAtomicType*, $array26 as xs:anyAtomicType*, $array27 as xs:anyAtomicType*) as xs:anyAtomicType",description:" Multiplies the elements on the same position in each sequence\n and sums up the results.\n",summary:"<p> Multiplies the elements on the same position in each sequence\n and sums up the results.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"array1",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array2",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array3",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array4",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array5",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array6",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array7",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array8",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array9",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array10",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array11",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array12",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array13",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array14",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array15",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array16",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array17",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array18",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array19",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array20",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array21",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array22",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array23",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array24",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array25",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array26",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array27",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'}],returns:{type:"xs:anyAtomicType",description:"the sum of products"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>']},{isDocumented:!0,arity:28,name:"sumproduct",qname:"excel:sumproduct",signature:"($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*, $array9 as xs:anyAtomicType*, $array10 as xs:anyAtomicType*, $array11 as xs:anyAtomicType*, $array12 as xs:anyAtomicType*, $array13 as xs:anyAtomicType*, $array14 as xs:anyAtomicType*, $array15 as xs:anyAtomicType*, $array16 as xs:anyAtomicType*, $array17 as xs:anyAtomicType*, $array18 as xs:anyAtomicType*, $array19 as xs:anyAtomicType*, $array20 as xs:anyAtomicType*, $array21 as xs:anyAtomicType*, $array22 as xs:anyAtomicType*, $array23 as xs:anyAtomicType*, $array24 as xs:anyAtomicType*, $array25 as xs:anyAtomicType*, $array26 as xs:anyAtomicType*, $array27 as xs:anyAtomicType*, $array28 as xs:anyAtomicType*) as xs:anyAtomicType",description:" Multiplies the elements on the same position in each sequence\n and sums up the results.\n",summary:"<p> Multiplies the elements on the same position in each sequence\n and sums up the results.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"array1",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array2",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array3",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array4",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array5",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array6",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array7",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array8",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array9",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array10",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array11",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array12",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array13",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array14",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array15",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array16",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array17",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array18",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array19",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array20",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array21",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array22",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array23",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array24",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array25",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array26",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array27",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array28",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'}],returns:{type:"xs:anyAtomicType",description:"the sum of products"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>']},{isDocumented:!0,arity:29,name:"sumproduct",qname:"excel:sumproduct",signature:"($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*, $array9 as xs:anyAtomicType*, $array10 as xs:anyAtomicType*, $array11 as xs:anyAtomicType*, $array12 as xs:anyAtomicType*, $array13 as xs:anyAtomicType*, $array14 as xs:anyAtomicType*, $array15 as xs:anyAtomicType*, $array16 as xs:anyAtomicType*, $array17 as xs:anyAtomicType*, $array18 as xs:anyAtomicType*, $array19 as xs:anyAtomicType*, $array20 as xs:anyAtomicType*, $array21 as xs:anyAtomicType*, $array22 as xs:anyAtomicType*, $array23 as xs:anyAtomicType*, $array24 as xs:anyAtomicType*, $array25 as xs:anyAtomicType*, $array26 as xs:anyAtomicType*, $array27 as xs:anyAtomicType*, $array28 as xs:anyAtomicType*, $array29 as xs:anyAtomicType*) as xs:anyAtomicType",description:" Multiplies the elements on the same position in each sequence\n and sums up the results.\n",summary:"<p> Multiplies the elements on the same position in each sequence\n and sums up the results.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"array1",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array2",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array3",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array4",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array5",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array6",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array7",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array8",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array9",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array10",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array11",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array12",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array13",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array14",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array15",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array16",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array17",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array18",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array19",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array20",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array21",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array22",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array23",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array24",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array25",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array26",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array27",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array28",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array29",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'}],returns:{type:"xs:anyAtomicType",description:"the sum of products"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>']},{isDocumented:!0,arity:3,name:"sumproduct",qname:"excel:sumproduct",signature:"($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*) as xs:anyAtomicType",description:" Multiplies the elements on the same position in each sequence\n and sums up the results.\n",summary:"<p> Multiplies the elements on the same position in each sequence\n and sums up the results.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"array1",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array2",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array3",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'}],returns:{type:"xs:anyAtomicType",description:"the sum of products"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>']},{isDocumented:!0,arity:30,name:"sumproduct",qname:"excel:sumproduct",signature:"($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*, $array9 as xs:anyAtomicType*, $array10 as xs:anyAtomicType*, $array11 as xs:anyAtomicType*, $array12 as xs:anyAtomicType*, $array13 as xs:anyAtomicType*, $array14 as xs:anyAtomicType*, $array15 as xs:anyAtomicType*, $array16 as xs:anyAtomicType*, $array17 as xs:anyAtomicType*, $array18 as xs:anyAtomicType*, $array19 as xs:anyAtomicType*, $array20 as xs:anyAtomicType*, $array21 as xs:anyAtomicType*, $array22 as xs:anyAtomicType*, $array23 as xs:anyAtomicType*, $array24 as xs:anyAtomicType*, $array25 as xs:anyAtomicType*, $array26 as xs:anyAtomicType*, $array27 as xs:anyAtomicType*, $array28 as xs:anyAtomicType*, $array29 as xs:anyAtomicType*, $array30 as xs:anyAtomicType*) as xs:anyAtomicType",description:" Multiplies the elements on the same position in each sequence\n and sums up the results.\n",summary:"<p> Multiplies the elements on the same position in each sequence\n and sums up the results.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"array1",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array2",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array3",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array4",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array5",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array6",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array7",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array8",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array9",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array10",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array11",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array12",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array13",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array14",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array15",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array16",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array17",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array18",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array19",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array20",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array21",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array22",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array23",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array24",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array25",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array26",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array27",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array28",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array29",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array30",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'}],returns:{type:"xs:anyAtomicType",description:"the sum of products"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>']},{isDocumented:!0,arity:4,name:"sumproduct",qname:"excel:sumproduct",signature:"($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*) as xs:anyAtomicType",description:" Multiplies the elements on the same position in each sequence\n and sums up the results.\n",summary:"<p> Multiplies the elements on the same position in each sequence\n and sums up the results.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"array1",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array2",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array3",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array4",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'}],returns:{type:"xs:anyAtomicType",description:"the sum of products"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>']},{isDocumented:!0,arity:5,name:"sumproduct",qname:"excel:sumproduct",signature:"($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*) as xs:anyAtomicType",description:" Multiplies the elements on the same position in each sequence\n and sums up the results.\n",summary:"<p> Multiplies the elements on the same position in each sequence\n and sums up the results.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"array1",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array2",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array3",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array4",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array5",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'}],returns:{type:"xs:anyAtomicType",description:"the sum of products"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>']},{isDocumented:!0,arity:6,name:"sumproduct",qname:"excel:sumproduct",signature:"($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*) as xs:anyAtomicType",description:" Multiplies the elements on the same position in each sequence\n and sums up the results.\n",summary:"<p> Multiplies the elements on the same position in each sequence\n and sums up the results.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"array1",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array2",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array3",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array4",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array5",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array6",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'}],returns:{type:"xs:anyAtomicType",description:"the sum of products"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>']},{isDocumented:!0,arity:7,name:"sumproduct",qname:"excel:sumproduct",signature:"($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*) as xs:anyAtomicType",description:" Multiplies the elements on the same position in each sequence\n and sums up the results.\n",summary:"<p> Multiplies the elements on the same position in each sequence\n and sums up the results.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"array1",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array2",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array3",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array4",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array5",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array6",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array7",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'}],returns:{type:"xs:anyAtomicType",description:"the sum of products"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>']},{isDocumented:!0,arity:8,name:"sumproduct",qname:"excel:sumproduct",signature:"($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*) as xs:anyAtomicType",description:" Multiplies the elements on the same position in each sequence\n and sums up the results.\n",summary:"<p> Multiplies the elements on the same position in each sequence\n and sums up the results.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"array1",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array2",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array3",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array4",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array5",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array6",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array7",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array8",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'}],returns:{type:"xs:anyAtomicType",description:"the sum of products"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>']},{isDocumented:!0,arity:9,name:"sumproduct",qname:"excel:sumproduct",signature:"($array1 as xs:anyAtomicType*, $array2 as xs:anyAtomicType*, $array3 as xs:anyAtomicType*, $array4 as xs:anyAtomicType*, $array5 as xs:anyAtomicType*, $array6 as xs:anyAtomicType*, $array7 as xs:anyAtomicType*, $array8 as xs:anyAtomicType*, $array9 as xs:anyAtomicType*) as xs:anyAtomicType",description:" Multiplies the elements on the same position in each sequence\n and sums up the results.\n",summary:"<p> Multiplies the elements on the same position in each sequence\n and sums up the results.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"array1",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array2",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array3",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array4",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array5",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array6",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array7",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array8",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'},{name:"array9",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequences of numbers or arguments castable to numeric</div>'}],returns:{type:"xs:anyAtomicType",description:"the sum of products"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>']},{isDocumented:!0,arity:1,name:"sumsq",qname:"excel:sumsq",signature:"($numbers as xs:anyAtomicType+) as xs:anyAtomicType",description:" Returns the sum of the squares of the arguments.\n It used the sumproduct function.\n",summary:"<p> Returns the sum of the squares of the arguments.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"xs:anyAtomicType",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of one or more numbers or arguments castable to numeric</div>'}],returns:{type:"xs:anyAtomicType",description:"the sum of squared values, as numeric type"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>']}],variables:[]},"http://zorba.io/modules/item":{ns:"http://zorba.io/modules/item",description:" This module provides utility functions on items. For example,\n it provides a function that allows estimating the size in bytes\n that a given item allocates in memory.\n",sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Matthias Brantner</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/modules/item",prefix:"item"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"size",qname:"item:size",signature:"($item as item()) as xs:integer external",description:' Computes the size in bytes of the given item in main memory.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n',summary:"<p> Computes the size in bytes of the given item in main memory.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"item",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the item whose size to compute.</div>'}],returns:{type:"xs:integer",description:"the size allocated by the item in bytes."},errors:[]}],variables:[]},"http://www.zorba-xquery.com/modules/xqdoc/menu":{ns:"http://www.zorba-xquery.com/modules/xqdoc/menu",description:" Generate navigation for XQDoc batches.\n",sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">William Candillon</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://www.zorba-xquery.com/modules/xqdoc/menu",prefix:"menu"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!1,arity:2,name:"categories-as-js",qname:"menu:categories-as-js",signature:"($url-prefix as xs:string, $cats as element(*)) as xs:string",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"url-prefix",type:"xs:string",occurrence:null,description:""},{name:"cats",type:"element(*)",occurrence:null,description:""}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!1,arity:1,name:"categories",qname:"menu:categories",signature:"($top as element(*)) as xs:string*",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"top",type:"element(*)",occurrence:null,description:""}],returns:{type:"xs:string*",description:""},errors:[]},{isDocumented:!1,arity:2,name:"closed-tabs",qname:"menu:closed-tabs",signature:"($item as element(section), $url-prefix as xs:string) as element(li)*",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"item",type:"element(section)",occurrence:null,description:""},{name:"url-prefix",type:"xs:string",occurrence:null,description:""}],returns:{type:"element(li)*",description:""},errors:[]},{isDocumented:!1,arity:3,name:"closed-tabs",qname:"menu:closed-tabs",signature:"($item as element(*)?, $result as element(*)*, $url-prefix as xs:string) as element(li)*",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"item",type:"element(*)",occurrence:"?",description:""},{name:"result",type:"element(*)",occurrence:"*",description:""},{name:"url-prefix",type:"xs:string",occurrence:null,description:""}],returns:{type:"element(li)*",description:""},errors:[]},{isDocumented:!1,arity:1,name:"item-uri",qname:"menu:item-uri",signature:"($item as element(*)) as xs:string",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"item",type:"element(*)",occurrence:null,description:""}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!1,arity:2,name:"item-uri",qname:"menu:item-uri",signature:"($item as element(*)?, $result as xs:string*) as xs:string+",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"item",type:"element(*)",occurrence:"?",description:""},{name:"result",type:"xs:string",occurrence:"*",description:""}],returns:{type:"xs:string+",description:""},errors:[]},{isDocumented:!1,arity:2,name:"item",qname:"menu:item",signature:"($ctx as element(*)?, $path as xs:string*) as element(*)?",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"ctx",type:"element(*)",occurrence:"?",description:""},{name:"path",type:"xs:string",occurrence:"*",description:""}],returns:{type:"element(*)?",description:""},errors:[]},{isDocumented:!1,arity:2,name:"menu",qname:"menu:menu",signature:"($item as element(*), $url-prefix as xs:string)",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"item",type:"element(*)",occurrence:null,description:""},{name:"url-prefix",type:"xs:string",occurrence:null,description:""}],returns:{type:null,description:""},errors:[]}],variables:[{name:"menu:not-found",type:"item()*",description:""}]},"http://zorba.io/modules/dbgp-message-handler":{ns:"http://zorba.io/modules/dbgp-message-handler",description:" Zorba debugger module.\n",sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Gabriel Petrovay</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/modules/base64",prefix:"base64"},{uri:"http://zorba.io/modules/dbgp-message-handler",prefix:"dmh"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"process",qname:"dmh:process",signature:"($message as element(*)) as xs:anyAtomicType*",description:" Process one message received from the Zorba debugger server.\n",summary:"<p> Process one message received from the Zorba debugger server.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"message",type:"element(*)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the message.</div>'}],returns:{type:"xs:anyAtomicType*",description:"()."},errors:[]}],variables:[{name:"dmh:debug",type:"xs:boolean",description:" Set this variale to true if you want to have mode debug information when\n an error occurs.\n"}]},"http://www.28msec.com/modules/ws/mailchimp":{ns:"http://www.28msec.com/modules/ws/mailchimp",description:" Mailchimp Client Module.\n",sees:['<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0"><a href="http://apidocs.mailchimp.com" target="_blank">http://apidocs.mailchimp.com</a></xqdoc:see>'],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">William Candillon {william.candillon@28msec.com}</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://expath.org/ns/http-client",prefix:"http-client"},{uri:"http://www.28msec.com/modules/ws/mailchimp",prefix:"mailchimp"},{uri:"http://zorba.io/options/versioning",prefix:"ver"},{uri:"http://www.28msec.com/modules/xmlrpc",prefix:"xmlrpc"}],functions:[{isDocumented:!0,arity:3,name:"apikey-add",qname:"mailchimp:apikey-add",signature:"($username as xs:string, $password as xs:string, $apikey as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#apikey-add-4">apikey-add#4</a>.\n',summary:"<p> Convenience function for  apikey-add#4 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"username",type:"xs:string",occurrence:null,description:""},{name:"password",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Your MailChimp password</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Any valid API Key</div>'}],returns:{type:"item()*",description:"A new API Key that can be immediately used."},errors:[]},{isDocumented:!0,arity:4,name:"apikey-add",qname:"mailchimp:apikey-add",signature:"($endpoint-url as xs:string, $username as xs:string, $password as xs:string, $apikey as xs:string) as item()*",description:" Add an API Key to your account. We will generate a new key for you and return it.\n",summary:"<p> Add an API Key to your account.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"username",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Your MailChimp user name</div>'},{name:"password",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Your MailChimp password</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Any valid API Key</div>'}],returns:{type:"item()*",description:"A new API Key that can be immediately used."},errors:[]},{isDocumented:!0,arity:3,name:"apikey-expire",qname:"mailchimp:apikey-expire",signature:"($username as xs:string, $password as xs:string, $apikey as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#apikey-expire-4">apikey-expire#4</a>.\n',summary:"<p> Convenience function for  apikey-expire#4 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"username",type:"xs:string",occurrence:null,description:""},{name:"password",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Your MailChimp password</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Any valid API Key that you wish to expire</div>'}],returns:{type:"item()*",description:"True if it worked, otherwise an error is thrown."},errors:[]},{isDocumented:!0,arity:4,name:"apikey-expire",qname:"mailchimp:apikey-expire",signature:"($endpoint-url as xs:string, $username as xs:string, $password as xs:string, $apikey as xs:string) as item()*",description:' Expire a Specific API Key. Note that if you expire all of your keys, just visit <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a> to create a new one. If you are trying to shut off access to your account for an old developer, change your MailChimp password, then expire all of the keys they had access to. Note that this takes effect immediately, so make sure you replace the keys in any working application before expiring them! Consider yourself warned...\n',summary:"<p> Expire a Specific API Key.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"username",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Your MailChimp user name</div>'},{name:"password",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Your MailChimp password</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Any valid API Key that you wish to expire</div>'}],returns:{type:"item()*",description:"True if it worked, otherwise an error is thrown."},errors:[]},{isDocumented:!0,arity:4,name:"apikeys",qname:"mailchimp:apikeys",signature:"($username as xs:string, $password as xs:string, $apikey as xs:string, $expired as xs:boolean) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#apikeys-5">apikeys#5</a>.\n',summary:"<p> Convenience function for  apikeys#5 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"username",type:"xs:string",occurrence:null,description:""},{name:"password",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Your MailChimp password</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Any valid API Key for your account</div>'},{name:"expired",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional - whether or not to include expired keys, defaults to false</div>'}],returns:{type:"item()*",description:"An array of API keys."},errors:[]},{isDocumented:!0,arity:5,name:"apikeys",qname:"mailchimp:apikeys",signature:"($endpoint-url as xs:string, $username as xs:string, $password as xs:string, $apikey as xs:string, $expired as xs:boolean) as item()*",description:" Retrieve a list of all MailChimp API Keys for this User.\n",summary:"<p> Retrieve a list of all MailChimp API Keys for this User.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"username",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Your MailChimp user name</div>'},{name:"password",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Your MailChimp password</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Any valid API Key for your account</div>'},{name:"expired",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional - whether or not to include expired keys, defaults to false</div>'}],returns:{type:"item()*",description:"An array of API keys."},errors:[]},{isDocumented:!0,arity:5,name:"campaign-abuse-reports",qname:"mailchimp:campaign-abuse-reports",signature:"($apikey as xs:string, $cid as xs:string, $since as xs:integer, $start as xs:integer, $limit as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#campaign-abuse-reports-6">campaign-abuse-reports#6</a>.\n',summary:"<p> Convenience function for  campaign-abuse-reports#6 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to pull abuse reports for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'},{name:"since",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)</div>'},{name:"start",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional for large data sets, the number of results to return - defaults to 500, upper limit set at 1000</div>'},{name:"limit",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional pull only messages since this time - use YYYY-MM-DD HH:II:SS format in <strong>GMT</strong></div>'}],returns:{type:"item()*",description:"Reports the abuse reports for this campaign"},errors:[]},{isDocumented:!0,arity:6,name:"campaign-abuse-reports",qname:"mailchimp:campaign-abuse-reports",signature:"($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string, $since as xs:integer, $start as xs:integer, $limit as xs:string) as item()*",description:" Get all email addresses that complained about a given campaign.\n",summary:"<p> Get all email addresses that complained about a given campaign.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to pull abuse reports for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'},{name:"since",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)</div>'},{name:"start",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional for large data sets, the number of results to return - defaults to 500, upper limit set at 1000</div>'},{name:"limit",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional pull only messages since this time - use YYYY-MM-DD HH:II:SS format in <strong>GMT</strong></div>'}],returns:{type:"item()*",description:"Reports the abuse reports for this campaign"},errors:[]},{isDocumented:!0,arity:2,name:"campaign-advice",qname:"mailchimp:campaign-advice",signature:"($apikey as xs:string, $cid as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#campaign-advice-3">campaign-advice#3</a>.\n',summary:"<p> Convenience function for  campaign-advice#3 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to pull advice text for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'}],returns:{type:"item()*",description:"Advice on the campaign's performance"},errors:[]},{isDocumented:!0,arity:3,name:"campaign-advice",qname:"mailchimp:campaign-advice",signature:"($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string) as item()*",description:" Retrieve the text presented in our app for how a campaign performed and any advice we may have for you - best suited for display in customized reports pages.\n Note: some messages will contain HTML - clean tags as necessary.\n",summary:"<p> Retrieve the text presented in our app for how a campaign performed and any advice we may have for you - best suited for display in customized reports pages.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to pull advice text for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'}],returns:{type:"item()*",description:"Advice on the campaign's performance"},errors:[]},{isDocumented:!0,arity:2,name:"campaign-analytics",qname:"mailchimp:campaign-analytics",signature:"($apikey as xs:string, $cid as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#campaign-analytics-3">campaign-analytics#3</a>.\n',summary:"<p> Convenience function for  campaign-analytics#3 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to pull bounces for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'}],returns:{type:"item()*",description:"Analytics we've collected for the passed campaign."},errors:[]},{isDocumented:!0,arity:3,name:"campaign-analytics",qname:"mailchimp:campaign-analytics",signature:"($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string) as item()*",description:" Retrieve the Google Analytics data we've collected for this campaign. Note, requires Google Analytics Add-on to be installed and configured.\n",summary:"<p> Retrieve the Google Analytics data we've collected for this campaign.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to pull bounces for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'}],returns:{type:"item()*",description:"Analytics we've collected for the passed campaign."},errors:[]},{isDocumented:!0,arity:3,name:"campaign-bounce-message",qname:"mailchimp:campaign-bounce-message",signature:"($apikey as xs:string, $cid as xs:string, $email as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#campaign-bounce-message-4">campaign-bounce-message#4</a>.\n',summary:"<p> Convenience function for  campaign-bounce-message#4 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to pull bounces for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'},{name:"email",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the email address or unique id of the member to pull a bounce message for.</div>'}],returns:{type:"item()*",description:"The full bounce message for this email+campaign along with some extra data."},errors:[]},{isDocumented:!0,arity:4,name:"campaign-bounce-message",qname:"mailchimp:campaign-bounce-message",signature:"($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string, $email as xs:string) as item()*",description:" Retrieve the most recent full bounce message for a specific email address on the given campaign. Messages over 30 days old are subject to being removed.\n",summary:"<p> Retrieve the most recent full bounce message for a specific email address on the given campaign.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to pull bounces for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'},{name:"email",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the email address or unique id of the member to pull a bounce message for.</div>'}],returns:{type:"item()*",description:"The full bounce message for this email+campaign along with some extra data."},errors:[]},{isDocumented:!0,arity:5,name:"campaign-bounce-messages",qname:"mailchimp:campaign-bounce-messages",signature:"($apikey as xs:string, $cid as xs:string, $start as xs:integer, $limit as xs:integer, $since as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#campaign-bounce-messages-6">campaign-bounce-messages#6</a>.\n',summary:"<p> Convenience function for  campaign-bounce-messages#6 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to pull bounces for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'},{name:"start",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)</div>'},{name:"limit",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional for large data sets, the number of results to return - defaults to 25, upper limit set at 50</div>'},{name:"since",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional pull only messages since this time - use YYYY-MM-DD format in <strong>GMT</strong> (we only store the date, not the time)</div>'}],returns:{type:"item()*",description:"Bounces the full bounce messages for this campaign"},errors:[]},{isDocumented:!0,arity:6,name:"campaign-bounce-messages",qname:"mailchimp:campaign-bounce-messages",signature:"($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string, $start as xs:integer, $limit as xs:integer, $since as xs:string) as item()*",description:" Retrieve the full bounce messages for the given campaign. Note that this can return very large amounts of data depending on how large the campaign was and how much cruft the bounce provider returned.\n",summary:"<p> Retrieve the full bounce messages for the given campaign.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to pull bounces for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'},{name:"start",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)</div>'},{name:"limit",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional for large data sets, the number of results to return - defaults to 25, upper limit set at 50</div>'},{name:"since",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional pull only messages since this time - use YYYY-MM-DD format in <strong>GMT</strong> (we only store the date, not the time)</div>'}],returns:{type:"item()*",description:"Bounces the full bounce messages for this campaign"},errors:[]},{isDocumented:!0,arity:5,name:"campaign-click-detail-AIM",qname:"mailchimp:campaign-click-detail-AIM",signature:"($apikey as xs:string, $cid as xs:string, $url as xs:string, $start as xs:integer, $limit as xs:integer) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#campaign-click-detail-AIM-6">campaign-click-detail-AIM#6</a>.\n',summary:"<p> Convenience function for  campaign-click-detail-AIM#6 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to get click stats for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'},{name:"url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the URL of the link that was clicked on</div>'},{name:"start",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> art optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)</div>'},{name:"limit",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> mit optional for large data sets, the number of results to return - defaults to 1000, upper limit set at 15000</div>'}],returns:{type:"item()*",description:"Array containing the total records matched and the specific records for this page"},errors:[]},{isDocumented:!0,arity:6,name:"campaign-click-detail-AIM",qname:"mailchimp:campaign-click-detail-AIM",signature:"($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string, $url as xs:string, $start as xs:integer, $limit as xs:integer) as item()*",description:" Return the list of email addresses that clicked on a given url, and how many times they clicked.\n",summary:"<p> Return the list of email addresses that clicked on a given url, and how many times they clicked.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to get click stats for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'},{name:"url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the URL of the link that was clicked on</div>'},{name:"start",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> art optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)</div>'},{name:"limit",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> mit optional for large data sets, the number of results to return - defaults to 1000, upper limit set at 15000</div>'}],returns:{type:"item()*",description:"Array containing the total records matched and the specific records for this page"},errors:[]},{isDocumented:!0,arity:2,name:"campaign-click-stats",qname:"mailchimp:campaign-click-stats",signature:"($apikey as xs:string, $cid as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#campaign-click-stats-3">campaign-click-stats#3</a>.\n',summary:"<p> Convenience function for  campaign-click-stats#3 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to pull stats for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'}],returns:{type:"item()*",description:"URLs will be keys and contain their associated statistics: clicks (number of times a specific link was clicked) and unique (number of unique people who clicked on the specific link)."},errors:[]},{isDocumented:!0,arity:3,name:"campaign-click-stats",qname:"mailchimp:campaign-click-stats",signature:"($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string) as item()*",description:" Get an array of the urls being tracked, and their click counts for a given campaign.\n",summary:"<p> Get an array of the urls being tracked, and their click counts for a given campaign.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to pull stats for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'}],returns:{type:"item()*",description:"URLs will be keys and contain their associated statistics: clicks (number of times a specific link was clicked) and unique (number of unique people who clicked on the specific link)."},errors:[]},{isDocumented:!0,arity:3,name:"campaign-content",qname:"mailchimp:campaign-content",signature:"($apikey as xs:string, $cid as xs:string, $for_archive as xs:boolean) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#campaign-content-4">campaign-content#4</a>.\n',summary:"<p> Convenience function for  campaign-content#4 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to get content for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'},{name:"for_archive",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional controls whether we return the Archive version (true) or the Raw version (false), defaults to true</div>'}],returns:{type:"item()*",description:"Struct containing all content for the campaign"},errors:[]},{isDocumented:!0,arity:4,name:"campaign-content",qname:"mailchimp:campaign-content",signature:"($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string, $for_archive as xs:boolean) as item()*",description:" Get the content (both html and text) for a campaign either as it would appear in the campaign archive or as the raw, original content.\n",summary:"<p> Get the content (both html and text) for a campaign either as it would appear in the campaign archive or as the raw, original content.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to get content for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'},{name:"for_archive",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional controls whether we return the Archive version (true) or the Raw version (false), defaults to true</div>'}],returns:{type:"item()*",description:"Struct containing all content for the campaign"},errors:[]},{isDocumented:!0,arity:6,name:"campaign-create",qname:"mailchimp:campaign-create",signature:"($apikey as xs:string, $type as xs:string, $options as element(array), $content as element(array), $segment_opts as element(array), $type_opts as element(array)) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#campaign-create-7">campaign-create#7</a>.\n',summary:"<p> Convenience function for  campaign-create#7 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"type",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the Campaign Type to create - one of "regular", "plaintext", "absplit", "rss", "trans", "auto"</div>'},{name:"options",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a hash of the standard options for this campaign. See <a href="http://apidocs.mailchimp.com/rtfm/campaigncreate.func.php">Mailchimp API documentation</a> for more information about the parameter structure.</div>'},{name:"content",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the content for this campaign - use a struct with the following keys. See <a href="http://apidocs.mailchimp.com/rtfm/campaigncreate.func.php">Mailchimp API documentation</a> for more information about the parameter structure.</div>'},{name:"segment_opts",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional - if you wish to do Segmentation with this campaign this array should contain: see <a href="#campaign-segment-test-3">campaign-segment-test()</a>. It\'s suggested that you test your options against <a href="#campaign-segment-test-3">campaign-segment-test()</a>. Also, "trans" campaigns <strong>do not</strong> support segmentation.</div>'},{name:"type_opts",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional -</div>'}],returns:{type:"item()*",description:"The ID for the created campaign"},errors:[]},{isDocumented:!0,arity:7,name:"campaign-create",qname:"mailchimp:campaign-create",signature:"($endpoint-url as xs:string, $apikey as xs:string, $type as xs:string, $options as element(array), $content as element(array), $segment_opts as element(array), $type_opts as element(array)) as item()*",description:" Create a new draft campaign to send. You can not have more than 32,000 campaigns in your account.\n",summary:"<p> Create a new draft campaign to send.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"type",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the Campaign Type to create - one of "regular", "plaintext", "absplit", "rss", "trans", "auto"</div>'},{name:"options",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a hash of the standard options for this campaign. See <a href="http://apidocs.mailchimp.com/rtfm/campaigncreate.func.php">Mailchimp API documentation</a> for more information about the parameter structure.</div>'},{name:"content",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the content for this campaign - use a struct with the following keys. See <a href="http://apidocs.mailchimp.com/rtfm/campaigncreate.func.php">Mailchimp API documentation</a> for more information about the parameter structure.</div>'},{name:"segment_opts",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional - if you wish to do Segmentation with this campaign this array should contain: see <a href="#campaign-segment-test-3"><a href="#campaign-segment-test-3">campaign-segment-test()</a></a>. It\'s suggested that you test your options against <a href="#campaign-segment-test-3">campaign-segment-test()</a>. Also, "trans" campaigns <strong>do not</strong> support segmentation.</div>'},{name:"type_opts",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional</div>'}],returns:{type:"item()*",description:"The ID for the created campaign"},errors:[]},{isDocumented:!0,arity:2,name:"campaign-delete",qname:"mailchimp:campaign-delete",signature:"($apikey as xs:string, $cid as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#campaign-delete-3">campaign-delete#3</a>.\n',summary:"<p> Convenience function for  campaign-delete#3 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the Campaign Id to delete</div>'}],returns:{type:"item()*",description:"True if the delete succeeds, otherwise an error will be thrown"},errors:[]},{isDocumented:!0,arity:3,name:"campaign-delete",qname:"mailchimp:campaign-delete",signature:"($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string) as item()*",description:' Delete a campaign. Seriously, "poof, gone!" - be careful!.\n',summary:"<p> Delete a campaign.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the Campaign Id to delete</div>'}],returns:{type:"item()*",description:"True if the delete succeeds, otherwise an error will be thrown"},errors:[]},{isDocumented:!0,arity:2,name:"campaign-ecomm-order-add",qname:"mailchimp:campaign-ecomm-order-add",signature:"($apikey as xs:string, $order as element(array)) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#campaign-ecomm-order-add-3">campaign-ecomm-order-add#3</a>.\n',summary:"<p> Convenience function for  campaign-ecomm-order-add#3 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"order",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> an array of information pertaining to the order that has completed. Use the following keys. See <a href="http://apidocs.mailchimp.com/rtfm/campaignecommorderadd.func.php">Mailchimp API documentation</a> for more information about the parameter structure.</div>'}],returns:{type:"item()*",description:"True if the data is saved, otherwise an error is thrown."},errors:[]},{isDocumented:!0,arity:3,name:"campaign-ecomm-order-add",qname:"mailchimp:campaign-ecomm-order-add",signature:"($endpoint-url as xs:string, $apikey as xs:string, $order as element(array)) as item()*",description:" Attach Ecommerce Order Information to a Campaign.\n",summary:"<p> Attach Ecommerce Order Information to a Campaign.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"order",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> an array of information pertaining to the order that has completed. Use the following keys. See <a href="http://apidocs.mailchimp.com/rtfm/campaignecommorderadd.func.php">Mailchimp API documentation</a> for more information about the parameter structure.</div>'}],returns:{type:"item()*",description:"True if the data is saved, otherwise an error is thrown."},errors:[]},{isDocumented:!0,arity:5,name:"campaign-ecomm-orders",qname:"mailchimp:campaign-ecomm-orders",signature:"($apikey as xs:string, $cid as xs:string, $start as xs:integer, $limit as xs:integer, $since as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#campaign-ecomm-orders-6">campaign-ecomm-orders#6</a>.\n',summary:"<p> Convenience function for  campaign-ecomm-orders#6 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to pull bounces for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'},{name:"start",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)</div>'},{name:"limit",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional for large data sets, the number of results to return - defaults to 100, upper limit set at 500</div>'},{name:"since",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional pull only messages since this time - use YYYY-MM-DD HH:II:SS format in <strong>GMT</strong></div>'}],returns:{type:"item()*",description:"The total matching orders and the specific orders for the requested page"},errors:[]},{isDocumented:!0,arity:6,name:"campaign-ecomm-orders",qname:"mailchimp:campaign-ecomm-orders",signature:"($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string, $start as xs:integer, $limit as xs:integer, $since as xs:string) as item()*",description:' Retrieve the Ecommerce Orders tracked by <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#campaign-ecomm-order-add-2">campaign-ecomm-order-add()</a>.\n',summary:"<p> Retrieve the Ecommerce Orders tracked by  campaign-ecomm-order-add() .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to pull bounces for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'},{name:"start",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)</div>'},{name:"limit",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional for large data sets, the number of results to return - defaults to 100, upper limit set at 500</div>'},{name:"since",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional pull only messages since this time - use YYYY-MM-DD HH:II:SS format in <strong>GMT</strong></div>'}],returns:{type:"item()*",description:"The total matching orders and the specific orders for the requested page"},errors:[]},{isDocumented:!0,arity:2,name:"campaign-eep-url-stats",qname:"mailchimp:campaign-eep-url-stats",signature:"($apikey as xs:string, $cid as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#campaign-eep-url-stats-3">campaign-eep-url-stats#3</a>.\n',summary:"<p> Convenience function for  campaign-eep-url-stats#3 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to pull bounces for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'}],returns:{type:"item()*",description:"Stats an array containing tweets, retweets, clicks, and referrer related to using the campaign's eepurl"},errors:[]},{isDocumented:!0,arity:3,name:"campaign-eep-url-stats",qname:"mailchimp:campaign-eep-url-stats",signature:"($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string) as item()*",description:" Retrieve the tracked eepurl mentions on Twitter.\n",summary:"<p> Retrieve the tracked eepurl mentions on Twitter.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to pull bounces for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'}],returns:{type:"item()*",description:"Stats an array containing tweets, retweets, clicks, and referrer related to using the campaign's eepurl"},errors:[]},{isDocumented:!0,arity:2,name:"campaign-email-domain-performance",qname:"mailchimp:campaign-email-domain-performance",signature:"($apikey as xs:string, $cid as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#campaign-email-domain-performance-3">campaign-email-domain-performance#3</a>.\n',summary:"<p> Convenience function for  campaign-email-domain-performance#3 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to pull email domain performance for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'}],returns:{type:"item()*",description:"Domains email domains and their associated stats"},errors:[]},{isDocumented:!0,arity:3,name:"campaign-email-domain-performance",qname:"mailchimp:campaign-email-domain-performance",signature:"($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string) as item()*",description:' Get the top 5 performing email domains for this campaign. Users want more than 5 should use campaign <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#campaign-email-stats-AIM-3">campaign-email-stats-AIM()</a> or <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#campaign-email-stats-AIM-all-4">campaign-email-stats-AIM-all()</a> and generate any additional stats they require.\n',summary:"<p> Get the top 5 performing email domains for this campaign.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to pull email domain performance for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'}],returns:{type:"item()*",description:"Domains email domains and their associated stats"},errors:[]},{isDocumented:!0,arity:4,name:"campaign-email-stats-AIM-all",qname:"mailchimp:campaign-email-stats-AIM-all",signature:"($apikey as xs:string, $cid as xs:string, $start as xs:integer, $limit as xs:integer) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#campaign-email-stats-AIM-all-5">campaign-email-stats-AIM-all#5</a>.\n',summary:"<p> Convenience function for  campaign-email-stats-AIM-all#5 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to get stats for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'},{name:"start",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)</div>'},{name:"limit",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional for large data sets, the number of results to return - defaults to 100, upper limit set at 1000</div>'}],returns:{type:"item()*",description:"Array containing a total record count and data including the actions (opens and clicks) for each email, with timestamps"},errors:[]},{isDocumented:!0,arity:5,name:"campaign-email-stats-AIM-all",qname:"mailchimp:campaign-email-stats-AIM-all",signature:"($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string, $start as xs:integer, $limit as xs:integer) as item()*",description:" Given a campaign and correct paging limits, return the entire click and open history with timestamps, ordered by time, for every user a campaign was delivered to.\n",summary:"<p> Given a campaign and correct paging limits, return the entire click and open history with timestamps, ordered by time, for every user a campaign was delivered to.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to get stats for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'},{name:"start",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)</div>'},{name:"limit",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional for large data sets, the number of results to return - defaults to 100, upper limit set at 1000</div>'}],returns:{type:"item()*",description:"Array containing a total record count and data including the actions (opens and clicks) for each email, with timestamps"},errors:[]},{isDocumented:!0,arity:3,name:"campaign-email-stats-AIM",qname:"mailchimp:campaign-email-stats-AIM",signature:"($apikey as xs:string, $cid as xs:string, $email_address as element(array)) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#campaign-email-stats-AIM-4">campaign-email-stats-AIM#4</a>.\n',summary:"<p> Convenience function for  campaign-email-stats-AIM#4 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to get stats for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'},{name:"email_address",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> an array of up to 50 email addresses to check OR the email "id" returned from listMemberInfo, Webhooks, and Campaigns. For backwards compatibility, if a string is passed, it will be treated as an array with a single element (will not work with XML-RPC).</div>'}],returns:{type:"item()*",description:"Array an array with the keys listed in Returned Fields below"},errors:[]},{isDocumented:!0,arity:4,name:"campaign-email-stats-AIM",qname:"mailchimp:campaign-email-stats-AIM",signature:"($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string, $email_address as element(array)) as item()*",description:" Given a campaign and email address, return the entire click and open history with timestamps, ordered by time.\n",summary:"<p> Given a campaign and email address, return the entire click and open history with timestamps, ordered by time.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to get stats for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'},{name:"email_address",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> an array of up to 50 email addresses to check OR the email "id" returned from listMemberInfo, Webhooks, and Campaigns. For backwards compatibility, if a string is passed, it will be treated as an array with a single element (will not work with XML-RPC).</div>'}],returns:{type:"item()*",description:"Array an array with the keys listed in Returned Fields below"},errors:[]},{isDocumented:!0,arity:3,name:"campaign-geo-opens-for-country",qname:"mailchimp:campaign-geo-opens-for-country",signature:"($apikey as xs:string, $cid as xs:string, $code as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#campaign-geo-opens-for-country-4">campaign-geo-opens-for-country#4</a>.\n',summary:"<p> Convenience function for  campaign-geo-opens-for-country#4 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to pull bounces for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'},{name:"code",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An ISO3166 2 digit country code</div>'}],returns:{type:"item()*",description:"Regions an array of regions within the provided country where opens occurred."},errors:[]},{isDocumented:!0,arity:4,name:"campaign-geo-opens-for-country",qname:"mailchimp:campaign-geo-opens-for-country",signature:"($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string, $code as xs:string) as item()*",description:" Retrieve the regions and number of opens tracked for a certain country. Email address are not returned.\n",summary:"<p> Retrieve the regions and number of opens tracked for a certain country.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to pull bounces for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'},{name:"code",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An ISO3166 2 digit country code</div>'}],returns:{type:"item()*",description:"Regions an array of regions within the provided country where opens occurred."},errors:[]},{isDocumented:!0,arity:2,name:"campaign-geo-opens",qname:"mailchimp:campaign-geo-opens",signature:"($apikey as xs:string, $cid as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#campaign-geo-opens-3">campaign-geo-opens#3</a>.\n',summary:"<p> Convenience function for  campaign-geo-opens#3 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to pull bounces for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'}],returns:{type:"item()*",description:"Countries an array of countries where opens occurred"},errors:[]},{isDocumented:!0,arity:3,name:"campaign-geo-opens",qname:"mailchimp:campaign-geo-opens",signature:"($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string) as item()*",description:" Retrieve the countries and number of opens tracked for each. Email address are not returned.\n",summary:"<p> Retrieve the countries and number of opens tracked for each.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to pull bounces for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'}],returns:{type:"item()*",description:"Countries an array of countries where opens occurred"},errors:[]},{isDocumented:!0,arity:4,name:"campaign-hard-bounces",qname:"mailchimp:campaign-hard-bounces",signature:"($apikey as xs:string, $cid as xs:string, $start as xs:integer, $limit as xs:integer) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#campaign-hard-bounces-5">campaign-hard-bounces#5</a>.\n',summary:"<p> Convenience function for  campaign-hard-bounces#5 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to pull bounces for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'},{name:"start",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> art optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)</div>'},{name:"limit",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> mit optional for large data sets, the number of results to return - defaults to 1000, upper limit set at 15000</div>'}],returns:{type:"item()*",description:"array a total of all hard bounced emails and the specific emails for this page"},errors:[]},{isDocumented:!0,arity:5,name:"campaign-hard-bounces",qname:"mailchimp:campaign-hard-bounces",signature:"($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string, $start as xs:integer, $limit as xs:integer) as item()*",description:' <strong xmlns:xqdoc="http://www.xqdoc.org/1.0">DEPRECATED</strong> Get all email addresses with Hard Bounces for a given campaign the email address that bounced.\n',summary:"<p>  DEPRECATED  Get all email addresses with Hard Bounces for a given campaign the email address that bounced.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to pull bounces for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'},{name:"start",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> art optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)</div>'},{name:"limit",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> mit optional for large data sets, the number of results to return - defaults to 1000, upper limit set at 15000</div>'}],returns:{type:"item()*",description:"array a total of all hard bounced emails and the specific emails for this page"},errors:[]},{isDocumented:!0,arity:5,name:"campaign-members",qname:"mailchimp:campaign-members",signature:"($apikey as xs:string, $cid as xs:string, $status as xs:string, $start as xs:integer, $limit as xs:integer) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#campaign-members-6">campaign-members#6</a>.\n',summary:"<p> Convenience function for  campaign-members#6 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to pull members for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'},{name:"status",type:"xs:string",occurrence:null,description:"<div xmlns:xqdoc=\"http://www.xqdoc.org/1.0\"> optional the status to pull - one of 'sent', 'hard' (bounce), or 'soft' (bounce). By default, all records are returned</div>"},{name:"start",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> art optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)</div>'},{name:"limit",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> mit optional for large data sets, the number of results to return - defaults to 1000, upper limit set at 15000</div>'}],returns:{type:"item()*",description:"A total of all matching emails and the specific emails for this page"},errors:[]},{isDocumented:!0,arity:6,name:"campaign-members",qname:"mailchimp:campaign-members",signature:"($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string, $status as xs:string, $start as xs:integer, $limit as xs:integer) as item()*",description:" Get all email addresses the campaign was successfully sent to (ie, no bounces).\n",summary:"<p> Get all email addresses the campaign was successfully sent to (ie, no bounces).</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to pull members for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'},{name:"status",type:"xs:string",occurrence:null,description:"<div xmlns:xqdoc=\"http://www.xqdoc.org/1.0\"> optional the status to pull - one of 'sent', 'hard' (bounce), or 'soft' (bounce). By default, all records are returned</div>"},{name:"start",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> art optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)</div>'},{name:"limit",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> mit optional for large data sets, the number of results to return - defaults to 1000, upper limit set at 15000</div>'}],returns:{type:"item()*",description:"A total of all matching emails and the specific emails for this page"},errors:[]},{isDocumented:!0,arity:4,name:"campaign-not-opened-AIM",qname:"mailchimp:campaign-not-opened-AIM",signature:"($apikey as xs:string, $cid as xs:string, $start as xs:integer, $limit as xs:integer) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#campaign-not-opened-AIM-5">campaign-not-opened-AIM#5</a>.\n',summary:"<p> Convenience function for  campaign-not-opened-AIM#5 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to get no opens for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'},{name:"start",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> art optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)</div>'},{name:"limit",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> mit optional for large data sets, the number of results to return - defaults to 1000, upper limit set at 15000</div>'}],returns:{type:"item()*",description:"Array containing the total records matched and the specific records for this page"},errors:[]},{isDocumented:!0,arity:5,name:"campaign-not-opened-AIM",qname:"mailchimp:campaign-not-opened-AIM",signature:"($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string, $start as xs:integer, $limit as xs:integer) as item()*",description:" Retrieve the list of email addresses that did not open a given campaign string email Email address that opened the campaign.\n",summary:"<p> Retrieve the list of email addresses that did not open a given campaign string email Email address that opened the campaign.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to get no opens for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'},{name:"start",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> art optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)</div>'},{name:"limit",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> mit optional for large data sets, the number of results to return - defaults to 1000, upper limit set at 15000</div>'}],returns:{type:"item()*",description:"array array containing the total records matched and the specific records for this page"},errors:[]},{isDocumented:!0,arity:4,name:"campaign-opened-AIM",qname:"mailchimp:campaign-opened-AIM",signature:"($apikey as xs:string, $cid as xs:string, $start as xs:integer, $limit as xs:integer) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#campaign-opened-AIM-5">campaign-openedAIM#5</a>.\n',summary:"<p> Convenience function for  campaign-openedAIM#5 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to get opens for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'},{name:"start",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> art optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)</div>'},{name:"limit",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> mit optional for large data sets, the number of results to return - defaults to 1000, upper limit set at 15000</div>'}],returns:{type:"item()*",description:"Array containing the total records matched and the specific records for this page"},errors:[]},{isDocumented:!0,arity:5,name:"campaign-opened-AIM",qname:"mailchimp:campaign-opened-AIM",signature:"($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string, $start as xs:integer, $limit as xs:integer) as item()*",description:" Retrieve the list of email addresses that opened a given campaign with how many times they opened.\n",summary:"<p> Retrieve the list of email addresses that opened a given campaign with how many times they opened.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to get opens for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'},{name:"start",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> art optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)</div>'},{name:"limit",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> mit optional for large data sets, the number of results to return - defaults to 1000, upper limit set at 15000</div>'}],returns:{type:"item()*",description:"Array containing the total records matched and the specific records for this page"},errors:[]},{isDocumented:!0,arity:2,name:"campaign-pause",qname:"mailchimp:campaign-pause",signature:"($apikey as xs:string, $cid as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#campaign-pause-3">campaign-pause#3</a>.\n',summary:"<p> Convenience function for  campaign-pause#3 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the id of the campaign to pause</div>'}],returns:{type:"item()*",description:"True on success"},errors:[]},{isDocumented:!0,arity:3,name:"campaign-pause",qname:"mailchimp:campaign-pause",signature:"($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string) as item()*",description:" Pause an AutoResponder or RSS campaign from sending.\n",summary:"<p> Pause an AutoResponder or RSS campaign from sending.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the id of the campaign to pause</div>'}],returns:{type:"item()*",description:"True on success"},errors:[]},{isDocumented:!0,arity:2,name:"campaign-replicate",qname:"mailchimp:campaign-replicate",signature:"($apikey as xs:string, $cid as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#campaign-replicate-3">campaign-replicate#3</a>.\n',summary:"<p> Convenience function for  campaign-replicate#3 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the Campaign Id to replicate</div>'}],returns:{type:"item()*",description:"The id of the replicated Campaign created, otherwise an error will be thrown"},errors:[]},{isDocumented:!0,arity:3,name:"campaign-replicate",qname:"mailchimp:campaign-replicate",signature:"($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string) as item()*",description:" Replicate a campaign.\n",summary:"<p> Replicate a campaign.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the Campaign Id to replicate</div>'}],returns:{type:"item()*",description:"The id of the replicated Campaign created, otherwise an error will be thrown"},errors:[]},{isDocumented:!0,arity:2,name:"campaign-resume",qname:"mailchimp:campaign-resume",signature:"($apikey as xs:string, $cid as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#campaign-resume-3">campaign-resume#3</a>.\n',summary:"<p> Convenience function for  campaign-resume#3 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the id of the campaign to pause</div>'}],returns:{type:"item()*",description:"True on success"},errors:[]},{isDocumented:!0,arity:3,name:"campaign-resume",qname:"mailchimp:campaign-resume",signature:"($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string) as item()*",description:" Resume sending an AutoResponder or RSS campaign.\n",summary:"<p> Resume sending an AutoResponder or RSS campaign.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the id of the campaign to pause</div>'}],returns:{type:"item()*",description:"True on success"},errors:[]},{isDocumented:!0,arity:4,name:"campaign-schedule",qname:"mailchimp:campaign-schedule",signature:"($apikey as xs:string, $cid as xs:string, $schedule_time as xs:string, $schedule_time_b as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#campaign-schedule-5">campaign-schedule#5</a>.\n',summary:"<p> Convenience function for  campaign-schedule#5 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the id of the campaign to schedule</div>'},{name:"schedule_time",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the time to schedule the campaign. For A/B Split "schedule" campaigns, the time for Group A - in YYYY-MM-DD HH:II:SS format in <strong>GMT</strong></div>'},{name:"schedule_time_b",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional -the time to schedule Group B of an A/B Split "schedule" campaign - in YYYY-MM-DD HH:II:SS format in <strong>GMT</strong></div>'}],returns:{type:"item()*",description:"boolean True on success"},errors:[]},{isDocumented:!0,arity:5,name:"campaign-schedule",qname:"mailchimp:campaign-schedule",signature:"($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string, $schedule_time as xs:string, $schedule_time_b as xs:string) as item()*",description:" Schedule a campaign to be sent in the future.\n",summary:"<p> Schedule a campaign to be sent in the future.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the id of the campaign to schedule</div>'},{name:"schedule_time",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the time to schedule the campaign. For A/B Split "schedule" campaigns, the time for Group A - in YYYY-MM-DD HH:II:SS format in <strong>GMT</strong></div>'},{name:"schedule_time_b",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional -the time to schedule Group B of an A/B Split "schedule" campaign - in YYYY-MM-DD HH:II:SS format in <strong>GMT</strong></div>'}],returns:{type:"item()*",description:"boolean True on success"},errors:[]},{isDocumented:!0,arity:3,name:"campaign-segment-test",qname:"mailchimp:campaign-segment-test",signature:"($apikey as xs:string, $list_id as xs:string, $options as element(array)) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#campaign-segment-test-4">campaign-segment-test#4</a>.\n',summary:"<p> Convenience function for  campaign-segment-test#4 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"list_id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list to test segmentation on - get lists using lists()</div>'},{name:"options",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> with 2 keys. See <a href="http://apidocs.mailchimp.com/rtfm/campaignsegmenttest.func.php">Mailchimp API documentation</a> for more information about the parameter structure.</div>'}],returns:{type:"item()*",description:"The total number of subscribers matching your segmentation options"},errors:[]},{isDocumented:!0,arity:4,name:"campaign-segment-test",qname:"mailchimp:campaign-segment-test",signature:"($endpoint-url as xs:string, $apikey as xs:string, $list_id as xs:string, $options as element(array)) as item()*",description:" Allows one to test their segmentation rules before creating a campaign using them.\n",summary:"<p> Allows one to test their segmentation rules before creating a campaign using them.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"list_id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list to test segmentation on - get lists using <a href="#lists-4">lists()</a></div>'},{name:"options",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> with 2 keys. See <a href="http://apidocs.mailchimp.com/rtfm/campaignsegmenttest.func.php">Mailchimp API documentation</a> for more information about the parameter structure.</div>'}],returns:{type:"item()*",description:"The total number of subscribers matching your segmentation options"},errors:[]},{isDocumented:!0,arity:2,name:"campaign-send-now",qname:"mailchimp:campaign-send-now",signature:"($apikey as xs:string, $cid as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#campaign-send-now-3">campaign-send-now#3</a>.\n',summary:"<p> Convenience function for  campaign-send-now#3 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the id of the campaign to send</div>'}],returns:{type:"item()*",description:"True on success"},errors:[]},{isDocumented:!0,arity:3,name:"campaign-send-now",qname:"mailchimp:campaign-send-now",signature:"($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string) as item()*",description:' Send a given campaign immediately. For RSS campaigns, this will "start" them.\n',summary:"<p> Send a given campaign immediately.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the id of the campaign to send</div>'}],returns:{type:"item()*",description:"True on success"},errors:[]},{isDocumented:!0,arity:4,name:"campaign-send-test",qname:"mailchimp:campaign-send-test",signature:"($apikey as xs:string, $cid as xs:string, $test_emails as element(array), $send_type as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#campaign-send-test-5">campaign-send-test#5</a>.\n',summary:"<p> Convenience function for  campaign-send-test#5 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the id of the campaign to test</div>'},{name:"test_emails",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> an array of email address to receive the test message</div>'},{name:"send_type",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional by default (null) both formats are sent - "html" or "text" send just that format</div>'}],returns:{type:"item()*",description:"True on success"},errors:[]},{isDocumented:!0,arity:5,name:"campaign-send-test",qname:"mailchimp:campaign-send-test",signature:"($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string, $test_emails as element(array), $send_type as xs:string) as item()*",description:" Send a test of this campaign to the provided email address.\n",summary:"<p> Send a test of this campaign to the provided email address.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the id of the campaign to test</div>'},{name:"test_emails",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> an array of email address to receive the test message</div>'},{name:"send_type",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional by default (null) both formats are sent - "html" or "text" send just that format</div>'}],returns:{type:"item()*",description:"True on success"},errors:[]},{isDocumented:!0,arity:3,name:"campaign-share-report",qname:"mailchimp:campaign-share-report",signature:"($apikey as xs:string, $cid as xs:string, $opts as element(array)) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#campaign-share-report-4">campaign-share-report#4</a>.\n',summary:"<p> Convenience function for  campaign-share-report#4 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to share a report for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'},{name:"opts",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> s optional various parameters which can be used to configure the shared report</div>'}],returns:{type:"item()*",description:"Struct containing details for the shared report"},errors:[]},{isDocumented:!0,arity:4,name:"campaign-share-report",qname:"mailchimp:campaign-share-report",signature:"($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string, $opts as element(array)) as item()*",description:' Get the URL to a customized <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://eepurl.com/gKmL" target="_blank">VIP Report</a> for the specified campaign and optionally send an email to someone with links to it. Note subsequent calls will overwrite anything already set for the same campign (eg, the password).\n',summary:"<p> Get the URL to a customized  VIP Report  for the specified campaign and optionally send an email to someone with links to it.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to share a report for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'},{name:"opts",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> s optional various parameters which can be used to configure the shared report</div>'}],returns:{type:"item()*",description:"Struct containing details for the shared report"},errors:[]},{isDocumented:!0,arity:4,name:"campaign-soft-bounces",qname:"mailchimp:campaign-soft-bounces",signature:"($apikey as xs:string, $cid as xs:string, $start as xs:integer, $limit as xs:integer) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#campaign-soft-bounces-5">campaign-soft-bounces#5</a>.\n',summary:"<p> Convenience function for  campaign-soft-bounces#5 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to pull bounces for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'},{name:"start",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> art optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)</div>'},{name:"limit",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> mit optional for large data sets, the number of results to return - defaults to 1000, upper limit set at 15000</div>'}],returns:{type:"item()*",description:"A total of all soft bounced emails and the specific emails for this page"},errors:[]},{isDocumented:!0,arity:5,name:"campaign-soft-bounces",qname:"mailchimp:campaign-soft-bounces",signature:"($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string, $start as xs:integer, $limit as xs:integer) as item()*",description:' <strong xmlns:xqdoc="http://www.xqdoc.org/1.0">DEPRECATED</strong> Get all email addresses with Soft Bounces for a given campaign the email address that bounced.\n',summary:"<p>  DEPRECATED  Get all email addresses with Soft Bounces for a given campaign the email address that bounced.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to pull bounces for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'},{name:"start",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> art optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)</div>'},{name:"limit",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> mit optional for large data sets, the number of results to return - defaults to 1000, upper limit set at 15000</div>'}],returns:{type:"item()*",description:"A total of all soft bounced emails and the specific emails for this page"},errors:[]},{isDocumented:!0,arity:2,name:"campaign-stats",qname:"mailchimp:campaign-stats",signature:"($apikey as xs:string, $cid as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#campaign-stats-3">campaign-stats#3</a>.\n',summary:"<p> Convenience function for  campaign-stats#3 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to pull stats for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'}],returns:{type:"item()*",description:"array struct of the statistics for this campaign"},errors:[]},{isDocumented:!0,arity:3,name:"campaign-stats",qname:"mailchimp:campaign-stats",signature:"($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string) as item()*",description:" Given a list and a campaign, get all the relevant campaign statistics (opens, bounces, clicks, etc.)\n",summary:"<p> Given a list and a campaign, get all the relevant campaign statistics (opens, bounces, clicks, etc.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to pull stats for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'}],returns:{type:"item()*",description:"array struct of the statistics for this campaign"},errors:[]},{isDocumented:!0,arity:2,name:"campaign-template-content",qname:"mailchimp:campaign-template-content",signature:"($apikey as xs:string, $cid as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#campaign-template-content-3">campaign-template-content#3</a>.\n',summary:"<p> Convenience function for  campaign-template-content#3 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to get content for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'}],returns:{type:"item()*",description:"Array containing all content section for the campaign -"},errors:[]},{isDocumented:!0,arity:3,name:"campaign-template-content",qname:"mailchimp:campaign-template-content",signature:"($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string) as item()*",description:' Get the HTML template content sections for a campaign. Note that this <strong xmlns:xqdoc="http://www.xqdoc.org/1.0">will</strong> return very jagged, non-standard results based on the template a campaign is using. You only want to use this if you want to allow editing template sections in your applicaton.\n',summary:"<p> Get the HTML template content sections for a campaign.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to get content for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'}],returns:{type:"item()*",description:"Array containing all content section for the campaign -"},errors:[]},{isDocumented:!0,arity:2,name:"campaign-unschedule",qname:"mailchimp:campaign-unschedule",signature:"($apikey as xs:string, $cid as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#campaign-unschedule-3">campaign-unschedule#3</a>.\n',summary:"<p> Convenience function for  campaign-unschedule#3 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the id of the campaign to unschedule</div>'}],returns:{type:"item()*",description:"True on success"},errors:[]},{isDocumented:!0,arity:3,name:"campaign-unschedule",qname:"mailchimp:campaign-unschedule",signature:"($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string) as item()*",description:" Unschedule a campaign that is scheduled to be sent in the future.\n",summary:"<p> Unschedule a campaign that is scheduled to be sent in the future.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the id of the campaign to unschedule</div>'}],returns:{type:"item()*",description:"True on success"},errors:[]},{isDocumented:!0,arity:4,name:"campaign-unsubscribes",qname:"mailchimp:campaign-unsubscribes",signature:"($apikey as xs:string, $cid as xs:string, $start as xs:integer, $limit as xs:integer) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#campaign-unsubscribes-5">campaign-unsubscribes#5</a>.\n',summary:"<p> Convenience function for  campaign-unsubscribes#5 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to pull bounces for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'},{name:"start",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> art optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)</div>'},{name:"limit",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> mit optional for large data sets, the number of results to return - defaults to 1000, upper limit set at 15000</div>'}],returns:{type:"item()*",description:"array email addresses that unsubscribed from this campaign along with reasons, if given array a total of all unsubscribed emails and the specific emails for this page"},errors:[]},{isDocumented:!0,arity:5,name:"campaign-unsubscribes",qname:"mailchimp:campaign-unsubscribes",signature:"($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string, $start as xs:integer, $limit as xs:integer) as item()*",description:" Get all unsubscribed email addresses for a given campaign.\n",summary:"<p> Get all unsubscribed email addresses for a given campaign.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the campaign id to pull bounces for (can be gathered using <a href="#campaigns-4">campaigns()</a>)</div>'},{name:"start",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> art optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)</div>'},{name:"limit",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> mit optional for large data sets, the number of results to return - defaults to 1000, upper limit set at 15000</div>'}],returns:{type:"item()*",description:"array email addresses that unsubscribed from this campaign along with reasons, if given array a total of all unsubscribed emails and the specific emails for this page"},errors:[]},{isDocumented:!0,arity:4,name:"campaign-update",qname:"mailchimp:campaign-update",signature:"($apikey as xs:string, $cid as xs:string, $name as xs:string, $value as item()) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#campaign-update-5">campaign-update#5</a>.\n',summary:"<p> Convenience function for  campaign-update#5 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the Campaign Id to update</div>'},{name:"name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the parameter name (see <a href="#campaign-create-6">campaigncreate()</a>). For items in the <strong>options</strong> array, this will be that parameter\'s name (subject, from_email, etc.). Additional parameters will be that option name (content, segment_opts). "type_opts" will be the name of the type - rss, auto, trans, etc.</div>'},{name:"value",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> e an appropriate value for the parameter ( see <a href="#campaign-create-6">campaigncreate()</a>). For items in the <strong>options</strong> array, this will be that parameter\'s value. For additional parameters, this is the same value passed to them.</div>'}],returns:{type:"item()*",description:"boolean true if the update succeeds, otherwise an error will be thrown"},errors:[]},{isDocumented:!0,arity:5,name:"campaign-update",qname:"mailchimp:campaign-update",signature:"($endpoint-url as xs:string, $apikey as xs:string, $cid as xs:string, $name as xs:string, $value as item()) as item()*",description:' Update just about any setting for a campaign that has <em xmlns:xqdoc="http://www.xqdoc.org/1.0">not</em> been sent. See <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#campaign-create-6">campaigncreate()</a> for details.\n Caveats: <br xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n  <ul xmlns:xqdoc="http://www.xqdoc.org/1.0">\n    <li>If you set list_id, all segmentation options will be deleted and must be re-added.</li>\n    <li>If you set template_id, you need to follow that up by setting it\'s \'content\'</li>\n    <li>If you set segment_opts, you should have tested your options against <a href="#campaign-segment-test-3">campaign-segment-test()</a> as <a href="#campaign-update-4">campaign-update()</a> will not allow you to set a segment that includes no members.</li>\n  </ul>.\n',summary:"<p> Update just about any setting for a campaign that has  not  been sent.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"cid",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the Campaign Id to update</div>'},{name:"name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the parameter name ( see <a href="#campaign-create-6">campaigncreate()</a>). For items in the <strong>options</strong> array, this will be that parameter\'s name (subject, from_email, etc.). Additional parameters will be that option name (content, segment_opts). "type_opts" will be the name of the type - rss, auto, trans, etc.</div>'},{name:"value",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An appropriate value for the parameter ( see <a href="#campaign-create-6">campaigncreate()</a>). For items in the <strong>options</strong> array, this will be that parameter\'s value. For additional parameters, this is the same value passed to them.</div>'}],returns:{type:"item()*",description:"True if the update succeeds, otherwise an error will be thrown"},errors:[]},{isDocumented:!0,arity:2,name:"campaigns-for-email",qname:"mailchimp:campaigns-for-email",signature:"($apikey as xs:string, $email_address as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#campaigns-for-email-3">campaigns-for-email#3</a>.\n',summary:"<p> Convenience function for  campaigns-for-email#3 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"email_address",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the email address to unsubscribe OR the email "id" returned from listMemberInfo, Webhooks, and Campaigns</div>'}],returns:{type:"item()*",description:"An array of campaign_ids the member received"},errors:[]},{isDocumented:!0,arity:3,name:"campaigns-for-email",qname:"mailchimp:campaigns-for-email",signature:"($endpoint-url as xs:string, $apikey as xs:string, $email_address as xs:string) as item()*",description:" Retrieve all Campaigns Ids a member was sent.\n",summary:"<p> Retrieve all Campaigns Ids a member was sent.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"email_address",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the email address to unsubscribe OR the email "id" returned from listMemberInfo, Webhooks, and Campaigns</div>'}],returns:{type:"item()*",description:"An array of campaign_ids the member received"},errors:[]},{isDocumented:!0,arity:4,name:"campaigns",qname:"mailchimp:campaigns",signature:"($apikey as xs:string, $filters as element(array), $start as xs:integer, $limit as xs:integer) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#campaigns-5">campaigns#5</a>.\n',summary:"<p> Convenience function for  campaigns#5 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"filters",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a hash of filters to apply to this query - all are optional. See <a href="http://apidocs.mailchimp.com/rtfm/campaigns.func.php">Mailchimp API documentation</a> for more information about the parameter structure.</div>'},{name:"start",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional - control paging of campaigns, start results at this campaign #, defaults to 1st page of data (page 0)</div>'},{name:"limit",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional - control paging of campaigns, number of campaigns to return with each call, defaults to 25 (max=1000)</div>'}],returns:{type:"item()*",description:'An array containing a count of all matching campaigns and the specific ones for the current page (see <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://apidocs.mailchimp.com/rtfm/campaigns.func.php">Mailchimp API documentation</a> for more information about the return type)'},errors:[]},{isDocumented:!0,arity:5,name:"campaigns",qname:"mailchimp:campaigns",signature:"($endpoint-url as xs:string, $apikey as xs:string, $filters as element(array), $start as xs:integer, $limit as xs:integer) as item()*",description:" Get the list of campaigns and their details matching the specified filters.\n",summary:"<p> Get the list of campaigns and their details matching the specified filters.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"filters",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a hash of filters to apply to this query - all are optional. See <a href="http://apidocs.mailchimp.com/rtfm/campaigns.func.php">Mailchimp API documentation</a> for more information about the parameter structure.</div>'},{name:"start",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional - control paging of campaigns, start results at this campaign #, defaults to 1st page of data (page 0)</div>'},{name:"limit",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional - control paging of campaigns, number of campaigns to return with each call, defaults to 25 (max=1000)</div>'}],returns:{type:"item()*",description:'An array containing a count of all matching campaigns and the specific ones for the current page (see <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://apidocs.mailchimp.com/rtfm/campaigns.func.php">Mailchimp API documentation</a> for more information about the return type)'},errors:[]},{isDocumented:!0,arity:1,name:"chimp-chatter",qname:"mailchimp:chimp-chatter",signature:"($apikey as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#chimp-chatter-2">chimp-chatter#2</a>.\n',summary:"<p> Convenience function for  chimp-chatter#2 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""}],returns:{type:"item()*",description:"An array of chatter messages and properties"},errors:[]},{isDocumented:!0,arity:2,name:"chimp-chatter",qname:"mailchimp:chimp-chatter",signature:"($endpoint-url as xs:string, $apikey as xs:string) as item()*",description:" Return the current Chimp Chatter messages for an account.\n",summary:"<p> Return the current Chimp Chatter messages for an account.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'}],returns:{type:"item()*",description:"An array of chatter messages and properties"},errors:[]},{isDocumented:!0,arity:2,name:"ecomm-order-add",qname:"mailchimp:ecomm-order-add",signature:"($apikey as xs:string, $order as element(array)) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#ecomm-order-add-3">ecomm-order-add#3</a>.\n',summary:"<p> Convenience function for  ecomm-order-add#3 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"order",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> an array of information pertaining to the order that has completed. Use the following keys. See <a href="http://apidocs.mailchimp.com/rtfm/ecommorderadd.func.php">Mailchimp API documentation</a> for more information about the parameter structure.</div>'}],returns:{type:"item()*",description:"True if the data is saved, otherwise an error is thrown."},errors:[]},{isDocumented:!0,arity:3,name:"ecomm-order-add",qname:"mailchimp:ecomm-order-add",signature:"($endpoint-url as xs:string, $apikey as xs:string, $order as element(array)) as item()*",description:" Import Ecommerce Order Information to be used for Segmentation.\n",summary:"<p> Import Ecommerce Order Information to be used for Segmentation.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"order",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> an array of information pertaining to the order that has completed. Use the following keys. See <a href="http://apidocs.mailchimp.com/rtfm/ecommorderadd.func.php">Mailchimp API documentation</a> for more information about the parameter structure.</div>'}],returns:{type:"item()*",description:"True if the data is saved, otherwise an error is thrown."},errors:[]},{isDocumented:!0,arity:3,name:"ecomm-order-del",qname:"mailchimp:ecomm-order-del",signature:"($apikey as xs:string, $store_id as xs:string, $order_id as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#ecomm-order-del-4">ecomm-order-del#4</a>.\n',summary:"<p> Convenience function for  ecomm-order-del#4 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"store_id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the store id the order belongs to</div>'},{name:"order_id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the order id (generated by the store) to delete</div>'}],returns:{type:"item()*",description:"True if an order is deleted, otherwise an error is thrown."},errors:[]},{isDocumented:!0,arity:4,name:"ecomm-order-del",qname:"mailchimp:ecomm-order-del",signature:"($endpoint-url as xs:string, $apikey as xs:string, $store_id as xs:string, $order_id as xs:string) as item()*",description:' Delete Ecommerce Order Information used for segmentation. This will generally be used by ecommerce package plugins <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="/plugins/ecomm360.phtml">that we provide</a> or by 3rd part system developers.\n',summary:"<p> Delete Ecommerce Order Information used for segmentation.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"store_id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the store id the order belongs to</div>'},{name:"order_id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the order id (generated by the store) to delete</div>'}],returns:{type:"item()*",description:"True if an order is deleted, otherwise an error is thrown."},errors:[]},{isDocumented:!0,arity:4,name:"ecomm-orders",qname:"mailchimp:ecomm-orders",signature:"($apikey as xs:string, $start as xs:integer, $limit as xs:integer, $since as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#ecomm-orders-5">ecomm-orders#5</a>.\n',summary:"<p> Convenience function for  ecomm-orders#5 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"start",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)</div>'},{name:"limit",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional for large data sets, the number of results to return - defaults to 100, upper limit set at 500</div>'},{name:"since",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional pull only messages since this time - use YYYY-MM-DD HH:II:SS format in <strong>GMT</strong></div>'}],returns:{type:"item()*",description:"Array the total matching orders and the specific orders for the requested page"},errors:[]},{isDocumented:!0,arity:5,name:"ecomm-orders",qname:"mailchimp:ecomm-orders",signature:"($endpoint-url as xs:string, $apikey as xs:string, $start as xs:integer, $limit as xs:integer, $since as xs:string) as item()*",description:" Retrieve the Ecommerce Orders for an account.\n",summary:"<p> Retrieve the Ecommerce Orders for an account.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"start",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)</div>'},{name:"limit",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional for large data sets, the number of results to return - defaults to 100, upper limit set at 500</div>'},{name:"since",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional pull only messages since this time - use YYYY-MM-DD HH:II:SS format in <strong>GMT</strong></div>'}],returns:{type:"item()*",description:"Array the total matching orders and the specific orders for the requested page"},errors:[]},{isDocumented:!0,arity:3,name:"folder-add",qname:"mailchimp:folder-add",signature:"($apikey as xs:string, $name as xs:string, $type as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#folder-add-4">folder-add#4</a>.\n',summary:"<p> Convenience function for  folder-add#4 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a unique name for a folder (max 100 bytes)</div>'},{name:"type",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional the type of folder to create - either "campaign" or "autoresponder". Defaults to "campaign"</div>'}],returns:{type:"item()*",description:"The folder_id of the newly created folder."},errors:[]},{isDocumented:!0,arity:4,name:"folder-add",qname:"mailchimp:folder-add",signature:"($endpoint-url as xs:string, $apikey as xs:string, $name as xs:string, $type as xs:string) as item()*",description:" Add a new folder to file campaigns or autoresponders in.\n",summary:"<p> Add a new folder to file campaigns or autoresponders in.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a unique name for a folder (max 100 bytes)</div>'},{name:"type",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional the type of folder to create - either "campaign" or "autoresponder". Defaults to "campaign"</div>'}],returns:{type:"item()*",description:"The folder_id of the newly created folder."},errors:[]},{isDocumented:!0,arity:3,name:"folder-del",qname:"mailchimp:folder-del",signature:"($apikey as xs:string, $fid as xs:integer, $type as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#folder-del-4">folder-del#4</a>.\n',summary:"<p> Convenience function for  folder-del#4 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"fid",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the folder id to update - retrieve from folders()</div>'},{name:"type",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional the type of folder to create - either "campaign" or "autoresponder". Defaults to "campaign"</div>'}],returns:{type:"item()*",description:"True if the delete worked, otherwise an exception is thrown"},errors:[]},{isDocumented:!0,arity:4,name:"folder-del",qname:"mailchimp:folder-del",signature:"($endpoint-url as xs:string, $apikey as xs:string, $fid as xs:integer, $type as xs:string) as item()*",description:" Delete a campaign or autoresponder folder. Note that this will simply make campaigns in the folder appear unfiled, they are not removed.\n",summary:"<p> Delete a campaign or autoresponder folder.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"fid",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the folder id to update - retrieve from folders()</div>'},{name:"type",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional the type of folder to create - either "campaign" or "autoresponder". Defaults to "campaign"</div>'}],returns:{type:"item()*",description:"True if the delete worked, otherwise an exception is thrown"},errors:[]},{isDocumented:!0,arity:4,name:"folder-update",qname:"mailchimp:folder-update",signature:"($apikey as xs:string, $fid as xs:integer, $name as xs:string, $type as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#folder-update-5">folder-update#5</a>.\n',summary:"<p> Convenience function for  folder-update#5 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"fid",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the folder id to update - retrieve from folders()</div>'},{name:"name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a new, unique name for the folder (max 100 bytes)</div>'},{name:"type",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional the type of folder to create - either "campaign" or "autoresponder". Defaults to "campaign"</div>'}],returns:{type:"item()*",description:"True if the update worked, otherwise an exception is thrown"},errors:[]},{isDocumented:!0,arity:5,name:"folder-update",qname:"mailchimp:folder-update",signature:"($endpoint-url as xs:string, $apikey as xs:string, $fid as xs:integer, $name as xs:string, $type as xs:string) as item()*",description:" Update the name of a folder for campaigns or autoresponders.\n",summary:"<p> Update the name of a folder for campaigns or autoresponders.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"fid",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the folder id to update - retrieve from folders()</div>'},{name:"name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a new, unique name for the folder (max 100 bytes)</div>'},{name:"type",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional the type of folder to create - either "campaign" or "autoresponder". Defaults to "campaign"</div>'}],returns:{type:"item()*",description:"True if the update worked, otherwise an exception is thrown"},errors:[]},{isDocumented:!0,arity:2,name:"folders",qname:"mailchimp:folders",signature:"($apikey as xs:string, $type as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#folders-3">folders#3</a>.\n',summary:"<p> Convenience function for  folders#3 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"type",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional the type of folders to return - either "campaign" or "autoresponder". Defaults to "campaign"</div>'}],returns:{type:"item()*",description:"Array of folder structs (see Returned Fields for details)"},errors:[]},{isDocumented:!0,arity:3,name:"folders",qname:"mailchimp:folders",signature:"($endpoint-url as xs:string, $apikey as xs:string, $type as xs:string) as item()*",description:" List all the folders for a user account.\n",summary:"<p> List all the folders for a user account.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"type",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional the type of folders to return - either "campaign" or "autoresponder". Defaults to "campaign"</div>'}],returns:{type:"item()*",description:"Array of folder structs (see Returned Fields for details)"},errors:[]},{isDocumented:!0,arity:3,name:"generate-text",qname:"mailchimp:generate-text",signature:"($apikey as xs:string, $type as xs:string, $content as item()) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#generate-text-4">generate-text#4</a>.\n',summary:"<p> Convenience function for  generate-text#4 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"type",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The type of content to parse. Must be one of: "html", "template", "url", "cid" (Campaign Id), or "tid" (Template Id)</div>'},{name:"content",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The content to use. For "html" expects a single string value, "template" expects an array like you send to campaignCreate, "url" expects a valid &amp; public URL to pull from, "cid" expects a valid Campaign Id, and "tid" expects a valid Template Id on your account.</div>'}],returns:{type:"item()*",description:"The content pass in converted to text."},errors:[]},{isDocumented:!0,arity:4,name:"generate-text",qname:"mailchimp:generate-text",signature:"($endpoint-url as xs:string, $apikey as xs:string, $type as xs:string, $content as item()) as item()*",description:' Have HTML content auto-converted to a text-only format. You can send: plain HTML, an array of Template content, an existing Campaign Id, or an existing Template Id. Note that this will <b xmlns:xqdoc="http://www.xqdoc.org/1.0">not</b> save anything to or update any of your lists, campaigns, or templates.\n',summary:"<p> Have HTML content auto-converted to a text-only format.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"type",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The type of content to parse. Must be one of: "html", "template", "url", "cid" (Campaign Id), or "tid" (Template Id)</div>'},{name:"content",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The content to use. For "html" expects a single string value, "template" expects an array like you send to campaignCreate, "url" expects a valid &amp; public URL to pull from, "cid" expects a valid Campaign Id, and "tid" expects a valid Template Id on your account.</div>'}],returns:{type:"item()*",description:"The content pass in converted to text."},errors:[]},{isDocumented:!0,arity:1,name:"get-account-details",qname:"mailchimp:get-account-details",signature:"($apikey as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#get-account-details-2">get-account-details#2</a>.\n',summary:"<p> Convenience function for  get-account-details#2 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""}],returns:{type:"item()*",description:"array containing the details for the account tied to this API Key"},errors:[]},{isDocumented:!0,arity:2,name:"get-account-details",qname:"mailchimp:get-account-details",signature:"($endpoint-url as xs:string, $apikey as xs:string) as item()*",description:" Retrieve lots of account information including payments made, plan info, some account stats, installed modules, contact info, and more.\n",summary:"<p> Retrieve lots of account information including payments made, plan info, some account stats, installed modules, contact info, and more.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'}],returns:{type:"item()*",description:"Array containing the details for the account tied to this API Key"},errors:[]},{isDocumented:!0,arity:3,name:"inline-css",qname:"mailchimp:inline-css",signature:"($apikey as xs:string, $html as xs:string, $strip_css as xs:boolean) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#inline-css-4">inline-css#4</a>.\n',summary:"<p> Convenience function for  inline-css#4 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"html",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Your HTML content</div>'},{name:"strip_css",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional Whether you want the CSS &amp;lt;style&amp;gt; tags stripped from the returned document. Defaults to false.</div>'}],returns:{type:"item()*",description:"Your HTML content with all CSS inlined, just like if we sent it."},errors:[]},{isDocumented:!0,arity:4,name:"inline-css",qname:"mailchimp:inline-css",signature:"($endpoint-url as xs:string, $apikey as xs:string, $html as xs:string, $strip_css as xs:boolean) as item()*",description:" Send your HTML content to have the CSS inlined and optionally remove the original styles.\n",summary:"<p> Send your HTML content to have the CSS inlined and optionally remove the original styles.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"html",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Your HTML content</div>'},{name:"strip_css",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional Whether you want the CSS &amp;lt;style&amp;gt; tags stripped from the returned document. Defaults to false.</div>'}],returns:{type:"item()*",description:"Your HTML content with all CSS inlined, just like if we sent it."},errors:[]},{isDocumented:!0,arity:5,name:"list-abuse-reports",qname:"mailchimp:list-abuse-reports",signature:"($apikey as xs:string, $id as xs:string, $start as xs:integer, $limit as xs:integer, $since as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#list-abuse-reports-6">list-abuse-reports#6</a>.\n',summary:"<p> Convenience function for  list-abuse-reports#6 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to pull abuse reports for (can be gathered using lists())</div>'},{name:"start",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)</div>'},{name:"limit",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional for large data sets, the number of results to return - defaults to 500, upper limit set at 1000</div>'},{name:"since",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional pull only messages since this time - use YYYY-MM-DD HH:II:SS format in <strong>GMT</strong></div>'}],returns:{type:"item()*",description:"The total of all reports and the specific reports reports this page"},errors:[]},{isDocumented:!0,arity:6,name:"list-abuse-reports",qname:"mailchimp:list-abuse-reports",signature:"($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $start as xs:integer, $limit as xs:integer, $since as xs:string) as item()*",description:" Get all email addresses that complained about a given campaign.\n",summary:"<p> Get all email addresses that complained about a given campaign.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to pull abuse reports for (can be gathered using lists())</div>'},{name:"start",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)</div>'},{name:"limit",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional for large data sets, the number of results to return - defaults to 500, upper limit set at 1000</div>'},{name:"since",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional pull only messages since this time - use YYYY-MM-DD HH:II:SS format in <strong>GMT</strong></div>'}],returns:{type:"item()*",description:"The total of all reports and the specific reports reports this page"},errors:[]},{isDocumented:!0,arity:2,name:"list-activity",qname:"mailchimp:list-activity",signature:"($apikey as xs:string, $id as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#list-activity-3">list-activity#3</a>.\n',summary:"<p> Convenience function for  list-activity#3 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'}],returns:{type:"item()*",description:"Array of array of daily values."},errors:[]},{isDocumented:!0,arity:3,name:"list-activity",qname:"mailchimp:list-activity",signature:"($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string) as item()*",description:" Access up to the previous 180 days of daily detailed aggregated activity stats for a given list.\n",summary:"<p> Access up to the previous 180 days of daily detailed aggregated activity stats for a given list.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'}],returns:{type:"item()*",description:"array array of array of daily values."},errors:[]},{isDocumented:!0,arity:6,name:"list-batch-subscribe",qname:"mailchimp:list-batch-subscribe",signature:"($apikey as xs:string, $id as xs:string, $batch as element(array), $double_optin as xs:boolean, $update_existing as xs:boolean, $replace_interests as xs:boolean) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#list-batch-subscribe-7">list-batch-subscribe#7</a>.\n',summary:"<p> Convenience function for  list-batch-subscribe#7 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'},{name:"batch",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> an array of structs for each address to import with two special keys: "EMAIL" for the email address, and "EMAIL_TYPE" for the email type option (html, text, or mobile)</div>'},{name:"double_optin",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> flag to control whether to send an opt-in confirmation email - defaults to true</div>'},{name:"update_existing",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> flag to control whether to update members that are already subscribed to the list or to return an error, defaults to false (return error)</div>'},{name:"replace_interests",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> flag to determine whether we replace the interest groups with the updated groups provided, or we add the provided groups to the member\'s interest groups (optional, defaults to true)</div>'}],returns:{type:"item()*",description:"Array of result counts and any errors that occurred"},errors:[]},{isDocumented:!0,arity:7,name:"list-batch-subscribe",qname:"mailchimp:list-batch-subscribe",signature:"($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $batch as element(array), $double_optin as xs:boolean, $update_existing as xs:boolean, $replace_interests as xs:boolean) as item()*",description:' Subscribe a batch of email addresses to a list at once. If you are using a serialized version of the API, we strongly suggest that you only run this method as a POST request, and <em xmlns:xqdoc="http://www.xqdoc.org/1.0">not</em> a GET request. Maximum batch sizes vary based on the amount of data in each record, though you should cap them at 5k - 10k records, depending on your experience. These calls are also long, so be sure you increase your timeout values.\n',summary:"<p> Subscribe a batch of email addresses to a list at once.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'},{name:"batch",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> an array of structs for each address to import with two special keys: "EMAIL" for the email address, and "EMAIL_TYPE" for the email type option (html, text, or mobile)</div>'},{name:"double_optin",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> flag to control whether to send an opt-in confirmation email - defaults to true</div>'},{name:"update_existing",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> flag to control whether to update members that are already subscribed to the list or to return an error, defaults to false (return error)</div>'},{name:"replace_interests",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> flag to determine whether we replace the interest groups with the updated groups provided, or we add the provided groups to the member\'s interest groups (optional, defaults to true)</div>'}],returns:{type:"item()*",description:"Array of result counts and any errors that occurred"},errors:[]},{isDocumented:!0,arity:6,name:"list-batch-unsubscribe",qname:"mailchimp:list-batch-unsubscribe",signature:"($apikey as xs:string, $id as xs:string, $emails as element(array), $delete_member as xs:boolean, $send_goodbye as xs:boolean, $send_notify as xs:boolean) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#list-batch-unsubscribe-7">list-batch-unsubscribe#7</a>.\n',summary:"<p> Convenience function for  list-batch-unsubscribe#7 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'},{name:"emails",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> array of email addresses to unsubscribe</div>'},{name:"delete_member",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> flag to completely delete the member from your list instead of just unsubscribing, default to false</div>'},{name:"send_goodbye",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> flag to send the goodbye email to the email addresses, defaults to true</div>'},{name:"send_notify",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> flag to send the unsubscribe notification email to the address defined in the list email notification settings, defaults to false</div>'}],returns:{type:"item()*",description:"Array of result counts and any errors that occurred"},errors:[]},{isDocumented:!0,arity:7,name:"list-batch-unsubscribe",qname:"mailchimp:list-batch-unsubscribe",signature:"($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $emails as element(array), $delete_member as xs:boolean, $send_goodbye as xs:boolean, $send_notify as xs:boolean) as item()*",description:" Unsubscribe a batch of email addresses to a list.\n",summary:"<p> Unsubscribe a batch of email addresses to a list.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'},{name:"emails",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> array of email addresses to unsubscribe</div>'},{name:"delete_member",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> flag to completely delete the member from your list instead of just unsubscribing, default to false</div>'},{name:"send_goodbye",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> flag to send the goodbye email to the email addresses, defaults to true</div>'},{name:"send_notify",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> flag to send the unsubscribe notification email to the address defined in the list email notification settings, defaults to false</div>'}],returns:{type:"item()*",description:"Array of result counts and any errors that occurred"},errors:[]},{isDocumented:!0,arity:2,name:"list-clients",qname:"mailchimp:list-clients",signature:"($apikey as xs:string, $id as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#list-clients-3">list-clients#3</a>.\n',summary:"<p> Convenience function for  list-clients#3 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'}],returns:{type:"item()*",description:"array the desktop and mobile user agents in use on the list"},errors:[]},{isDocumented:!0,arity:3,name:"list-clients",qname:"mailchimp:list-clients",signature:"($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string) as item()*",description:" Retrieve the clients that the list's subscribers have been tagged as being used based on user agents seen. Made possible by <a xmlns:xqdoc=\"http://www.xqdoc.org/1.0\" href=\"http://user-agent-string.info\" target=\"_blank\">user-agent-string.info</a> double penetration the percent of desktop clients in use array clients a record containing the 'client', an 'icon' image url, the 'percent' using the client, and the total 'members' represented double penetration the percent of mobile clients in use array clients a record containing the 'client', an 'icon' image url, the 'percent' using the client, and the total 'members' represented.\n",summary:"<p> Retrieve the clients that the list's subscribers have been tagged as being used based on user agents seen.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'}],returns:{type:"item()*",description:"Array the desktop and mobile user agents in use on the list"},errors:[]},{isDocumented:!0,arity:2,name:"list-growth-history",qname:"mailchimp:list-growth-history",signature:"($apikey as xs:string, $id as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#list-growth-history-3">list-growth-history#3</a>.\n',summary:"<p> Convenience function for  list-growth-history#3 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'}],returns:{type:"item()*",description:"Array of months and growth"},errors:[]},{isDocumented:!0,arity:3,name:"list-growth-history",qname:"mailchimp:list-growth-history",signature:"($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string) as item()*",description:" Access the Growth History by Month for a given list.\n",summary:"<p> Access the Growth History by Month for a given list.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'}],returns:{type:"item()*",description:"Array of months and growth"},errors:[]},{isDocumented:!0,arity:4,name:"list-interest-group-add",qname:"mailchimp:list-interest-group-add",signature:"($apikey as xs:string, $id as xs:string, $group_name as xs:string, $grouping_id as xs:integer) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#list-interest-group-add-5">list-interest-group-add#5</a>.\n',summary:"<p> Convenience function for  list-interest-group-add#5 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'},{name:"group_name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the interest group to add - group names must be unique within a grouping</div>'},{name:"grouping_id",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> ouping_id The grouping to add the new group to - get using <a href="#list-interest-groupings-2">list-interest-groupings()</a>. If not supplied, the first grouping on the list is used.</div>'}],returns:{type:"item()*",description:"True if the request succeeds, otherwise an error will be thrown"},errors:[]},{isDocumented:!0,arity:5,name:"list-interest-group-add",qname:"mailchimp:list-interest-group-add",signature:"($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $group_name as xs:string, $grouping_id as xs:integer) as item()*",description:" Add a single Interest Group - if interest groups for the List are not yet enabled, adding the first group will automatically turn them on.\n",summary:"<p> Add a single Interest Group - if interest groups for the List are not yet enabled, adding the first group will automatically turn them on.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'},{name:"group_name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the interest group to add - group names must be unique within a grouping</div>'},{name:"grouping_id",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> ouping_id The grouping to add the new group to - get using <a href="#list-interest-groupings-2">list-interest-groupings()</a> . If not supplied, the first grouping on the list is used.</div>'}],returns:{type:"item()*",description:"bool true if the request succeeds, otherwise an error will be thrown"},errors:[]},{isDocumented:!0,arity:4,name:"list-interest-group-del",qname:"mailchimp:list-interest-group-del",signature:"($apikey as xs:string, $id as xs:string, $group_name as xs:string, $grouping_id as xs:integer) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#list-interest-group-del-5">list-interest-group-del#5</a>.\n',summary:"<p> Convenience function for  list-interest-group-del#5 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'},{name:"group_name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the interest group to delete</div>'},{name:"grouping_id",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The grouping to delete the group from - get using <a href="#list-interest-groupings-2">list-interest-groupings()</a> . If not supplied, the first grouping on the list is used.</div>'}],returns:{type:"item()*",description:"True if the request succeeds, otherwise an error will be thrown"},errors:[]},{isDocumented:!0,arity:5,name:"list-interest-group-del",qname:"mailchimp:list-interest-group-del",signature:"($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $group_name as xs:string, $grouping_id as xs:integer) as item()*",description:" Delete a single Interest Group - if the last group for a list is deleted, this will also turn groups for the list off.\n",summary:"<p> Delete a single Interest Group - if the last group for a list is deleted, this will also turn groups for the list off.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'},{name:"group_name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the interest group to delete</div>'},{name:"grouping_id",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The grouping to delete the group from - get using <a href="#list-interest-groupings-2">list-interest-groupings()</a> . If not supplied, the first grouping on the list is used.</div>'}],returns:{type:"item()*",description:"True if the request succeeds, otherwise an error will be thrown"},errors:[]},{isDocumented:!0,arity:5,name:"list-interest-group-update",qname:"mailchimp:list-interest-group-update",signature:"($apikey as xs:string, $id as xs:string, $old_name as xs:string, $new_name as xs:string, $grouping_id as xs:integer) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#list-interest-group-update-6">list-interest-group-update#6</a>.\n',summary:"<p> Convenience function for  list-interest-group-update#6 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'},{name:"old_name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the interest group name to be changed</div>'},{name:"new_name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the new interest group name to be set</div>'},{name:"grouping_id",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> ouping_id The grouping to delete the group from - get using <a href="#list-interest-groupings-2">list-interest-groupings()</a> . If not supplied, the first grouping on the list is used.</div>'}],returns:{type:"item()*",description:"True if the request succeeds, otherwise an error will be thrown"},errors:[]},{isDocumented:!0,arity:6,name:"list-interest-group-update",qname:"mailchimp:list-interest-group-update",signature:"($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $old_name as xs:string, $new_name as xs:string, $grouping_id as xs:integer) as item()*",description:" Change the name of an Interest Group.\n",summary:"<p> Change the name of an Interest Group.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'},{name:"old_name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the interest group name to be changed</div>'},{name:"new_name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the new interest group name to be set</div>'},{name:"grouping_id",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> ouping_id The grouping to delete the group from - get using <a href="#list-interest-groupings-2">list-interest-groupings()</a> . If not supplied, the first grouping on the list is used.</div>'}],returns:{type:"item()*",description:"True if the request succeeds, otherwise an error will be thrown"},errors:[]},{isDocumented:!0,arity:5,name:"list-interest-grouping-add",qname:"mailchimp:list-interest-grouping-add",signature:"($apikey as xs:string, $id as xs:string, $name as xs:string, $type as xs:string, $groups as element(array)) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#list-interest-grouping-add-6">list-interest-grouping-add#6</a>.\n',summary:"<p> Convenience function for  list-interest-grouping-add#6 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'},{name:"name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the interest grouping to add - grouping names must be unique</div>'},{name:"type",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The type of the grouping to add - one of "checkboxes", "hidden", "dropdown", "radio"</div>'},{name:"groups",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The lists of initial group names to be added - at least 1 is required and the names must be unique within a grouping. If the number takes you over the 60 group limit, an error will be thrown.</div>'}],returns:{type:"item()*",description:"The new grouping id if the request succeeds, otherwise an error will be thrown"},errors:[]},{isDocumented:!0,arity:6,name:"list-interest-grouping-add",qname:"mailchimp:list-interest-grouping-add",signature:"($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $name as xs:string, $type as xs:string, $groups as element(array)) as item()*",description:" Add a new Interest Grouping - if interest groups for the List are not yet enabled, adding the first grouping will automatically turn them on.\n",summary:"<p> Add a new Interest Grouping - if interest groups for the List are not yet enabled, adding the first grouping will automatically turn them on.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'},{name:"name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the interest grouping to add - grouping names must be unique</div>'},{name:"type",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The type of the grouping to add - one of "checkboxes", "hidden", "dropdown", "radio"</div>'},{name:"groups",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The lists of initial group names to be added - at least 1 is required and the names must be unique within a grouping. If the number takes you over the 60 group limit, an error will be thrown.</div>'}],returns:{type:"item()*",description:"The new grouping id if the request succeeds, otherwise an error will be thrown"},errors:[]},{isDocumented:!0,arity:2,name:"list-interest-grouping-del",qname:"mailchimp:list-interest-grouping-del",signature:"($apikey as xs:string, $grouping_id as xs:integer) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#list-interest-grouping-del-3">list-interest-grouping-del#3</a>.\n',summary:"<p> Convenience function for  list-interest-grouping-del#3 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"grouping_id",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the interest grouping id - get from <a href="#list-interest-groupings-2">list-interest-groupings()</a></div>'}],returns:{type:"item()*",description:"True if the request succeeds, otherwise an error will be thrown"},errors:[]},{isDocumented:!0,arity:3,name:"list-interest-grouping-del",qname:"mailchimp:list-interest-grouping-del",signature:"($endpoint-url as xs:string, $apikey as xs:string, $grouping_id as xs:integer) as item()*",description:" Delete an existing Interest Grouping - this will permanently delete all contained interest groups and will remove those selections from all list members.\n",summary:"<p> Delete an existing Interest Grouping - this will permanently delete all contained interest groups and will remove those selections from all list members.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"grouping_id",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the interest grouping id - get from <a href="#list-interest-groupings-2">list-interest-groupings()</a></div>'}],returns:{type:"item()*",description:"True if the request succeeds, otherwise an error will be thrown"},errors:[]},{isDocumented:!0,arity:4,name:"list-interest-grouping-update",qname:"mailchimp:list-interest-grouping-update",signature:"($apikey as xs:string, $grouping_id as xs:integer, $name as xs:string, $value as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#list-interest-grouping-update-5">list-interest-grouping-update#5</a>.\n',summary:"<p> Convenience function for  list-interest-grouping-update#5 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"grouping_id",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the interest grouping id - get from <a href="#list-interest-groupings-2">list-interest-groupings()</a></div>'},{name:"name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the field to update - either "name" or "type". Groups with in the grouping should be manipulated using the standard listInterestGroup* methods</div>'},{name:"value",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The new value of the field. Grouping names must be unique - only "hidden" and "checkboxes" grouping types can be converted between each other.</div>'}],returns:{type:"item()*",description:"True if the request succeeds, otherwise an error will be thrown"},errors:[]},{isDocumented:!0,arity:5,name:"list-interest-grouping-update",qname:"mailchimp:list-interest-grouping-update",signature:"($endpoint-url as xs:string, $apikey as xs:string, $grouping_id as xs:integer, $name as xs:string, $value as xs:string) as item()*",description:" Update an existing Interest Grouping.\n",summary:"<p> Update an existing Interest Grouping.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"grouping_id",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the interest grouping id - get from <a href="#list-interest-groupings-2">list-interest-groupings()</a></div>'},{name:"name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the field to update - either "name" or "type". Groups with in the grouping should be manipulated using the standard listInterestGroup* methods</div>'},{name:"value",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The new value of the field. Grouping names must be unique - only "hidden" and "checkboxes" grouping types can be converted between each other.</div>'}],returns:{type:"item()*",description:"True if the request succeeds, otherwise an error will be thrown"},errors:[]},{isDocumented:!0,arity:2,name:"list-interest-groupings",qname:"mailchimp:list-interest-groupings",signature:"($apikey as xs:string, $id as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#list-interest-groupings-3">list-interest-groupings#3</a>.\n',summary:"<p> Convenience function for  list-interest-groupings#3 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'}],returns:{type:"item()*",description:"List of interest groups for the list"},errors:[]},{isDocumented:!0,arity:3,name:"list-interest-groupings",qname:"mailchimp:list-interest-groupings",signature:"($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string) as item()*",description:" Get the list of interest groupings for a given list, including the label, form information, and included groups for each.\n",summary:"<p> Get the list of interest groupings for a given list, including the label, form information, and included groups for each.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'}],returns:{type:"item()*",description:"List of interest groups for the list"},errors:[]},{isDocumented:!0,arity:2,name:"list-locations",qname:"mailchimp:list-locations",signature:"($apikey as xs:string, $id as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#list-locations-3">list-locations#3</a>.\n',summary:"<p> Convenience function for  list-locations#3 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'}],returns:{type:"item()*",description:"Array of locations"},errors:[]},{isDocumented:!0,arity:3,name:"list-locations",qname:"mailchimp:list-locations",signature:"($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string) as item()*",description:" Retrieve the locations (countries) that the list's subscribers have been tagged to based on geocoding their IP address.\n",summary:"<p> Retrieve the locations (countries) that the list's subscribers have been tagged to based on geocoding their IP address.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'}],returns:{type:"item()*",description:"Array of locations"},errors:[]},{isDocumented:!0,arity:3,name:"list-member-activity",qname:"mailchimp:list-member-activity",signature:"($apikey as xs:string, $id as xs:string, $email_address as element(array)) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#list-member-activity-4">list-member-activity#4</a>.\n',summary:"<p> Convenience function for  list-member-activity#4 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'},{name:"email_address",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> an array of up to 50 email addresses to get information for OR the "id"(s) for the member returned from listMembers, Webhooks, and Campaigns.</div>'}],returns:{type:"item()*",description:"Array of data and success/error counts"},errors:[]},{isDocumented:!0,arity:4,name:"list-member-activity",qname:"mailchimp:list-member-activity",signature:"($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $email_address as element(array)) as item()*",description:" Get the most recent 100 activities for particular list members (open, click, bounce, unsub, abuse, sent to).\n",summary:"<p> Get the most recent 100 activities for particular list members (open, click, bounce, unsub, abuse, sent to).</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'},{name:"email_address",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> an array of up to 50 email addresses to get information for OR the "id"(s) for the member returned from listMembers, Webhooks, and Campaigns.</div>'}],returns:{type:"item()*",description:"Array of data and success/error counts"},errors:[]},{isDocumented:!0,arity:3,name:"list-member-info",qname:"mailchimp:list-member-info",signature:"($apikey as xs:string, $id as xs:string, $email_address as element(array)) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#list-member-info-4">list-member-info#4</a>.\n',summary:"<p> Convenience function for  list-member-info#4 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'},{name:"email_address",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> an array of up to 50 email addresses to get information for OR the "id"(s) for the member returned from listMembers, Webhooks, and Campaigns. For backwards compatibility, if a string is passed, it will be treated as an array with a single element (will not work with XML-RPC).</div>'}],returns:{type:"item()*",description:"Array of list members with their info in an array (see Returned Fields for details)"},errors:[]},{isDocumented:!0,arity:4,name:"list-member-info",qname:"mailchimp:list-member-info",signature:"($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $email_address as element(array)) as item()*",description:" Get all the information for particular members of a list.\n",summary:"<p> Get all the information for particular members of a list.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'},{name:"email_address",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> an array of up to 50 email addresses to get information for OR the "id"(s) for the member returned from listMembers, Webhooks, and Campaigns. For backwards compatibility, if a string is passed, it will be treated as an array with a single element (will not work with XML-RPC).</div>'}],returns:{type:"item()*",description:"Array of list members with their info in an array (see Returned Fields for details)"},errors:[]},{isDocumented:!0,arity:6,name:"list-members",qname:"mailchimp:list-members",signature:"($apikey as xs:string, $id as xs:string, $status as xs:string, $since as xs:string, $start as xs:integer, $limit as xs:integer) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#list-members-7">list-members#7</a>.\n',summary:"<p> Convenience function for  list-members#7 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'},{name:"status",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the status to get members for - one of(subscribed, unsubscribed, <a target="_blank" href="http://eepurl.com/dwk1">cleaned</a>, updated), defaults to subscribed</div>'},{name:"since",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional pull all members whose status (subscribed/unsubscribed/cleaned) has changed or whose profile (updated) has changed since this date/time (in GMT) - format is YYYY-MM-DD HH:mm:ss (24hr)</div>'},{name:"start",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)</div>'},{name:"limit",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional for large data sets, the number of results to return - defaults to 100, upper limit set at 15000</div>'}],returns:{type:"item()*",description:"Array of a the total records match and matching list member data for this page (see Returned Fields for details)"},errors:[]},{isDocumented:!0,arity:7,name:"list-members",qname:"mailchimp:list-members",signature:"($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $status as xs:string, $since as xs:string, $start as xs:integer, $limit as xs:integer) as item()*",description:" Get all of the list members for a list that are of a particular status.\n",summary:"<p> Get all of the list members for a list that are of a particular status.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'},{name:"status",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the status to get members for - one of(subscribed, unsubscribed, <a target="_blank" href="http://eepurl.com/dwk1">cleaned</a>, updated), defaults to subscribed</div>'},{name:"since",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional pull all members whose status (subscribed/unsubscribed/cleaned) has changed or whose profile (updated) has changed since this date/time (in GMT) - format is YYYY-MM-DD HH:mm:ss (24hr)</div>'},{name:"start",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional for large data sets, the page number to start at - defaults to 1st page of data (page 0)</div>'},{name:"limit",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional for large data sets, the number of results to return - defaults to 100, upper limit set at 15000</div>'}],returns:{type:"item()*",description:"Array of a the total records match and matching list member data for this page (see Returned Fields for details)"},errors:[]},{isDocumented:!0,arity:5,name:"list-merge-var-add",qname:"mailchimp:list-merge-var-add",signature:"($apikey as xs:string, $id as xs:string, $tag as xs:string, $name as xs:string, $options as element(array)) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#list-merge-var-add-6">list-merge-var-add#6</a>.\n',summary:"<p> Convenience function for  list-merge-var-add#6 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'},{name:"tag",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The merge tag to add, e.g. FNAME</div>'},{name:"name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The long description of the tag being added, used for user displays</div>'},{name:"options",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional Various options for this merge var. <em>note:</em> for historical purposes this can also take a "boolean"</div>'}],returns:{type:"item()*",description:"True if the request succeeds, otherwise an error will be thrown"},errors:[]},{isDocumented:!0,arity:6,name:"list-merge-var-add",qname:"mailchimp:list-merge-var-add",signature:"($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $tag as xs:string, $name as xs:string, $options as element(array)) as item()*",description:" Add a new merge tag to a given list.\n",summary:"<p> Add a new merge tag to a given list.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'},{name:"tag",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The merge tag to add, e.g. FNAME</div>'},{name:"name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The long description of the tag being added, used for user displays</div>'},{name:"options",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional Various options for this merge var. <em>note:</em> for historical purposes this can also take a "boolean"</div>'}],returns:{type:"item()*",description:"True if the request succeeds, otherwise an error will be thrown"},errors:[]},{isDocumented:!0,arity:3,name:"list-merge-var-del",qname:"mailchimp:list-merge-var-del",signature:"($apikey as xs:string, $id as xs:string, $tag as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#list-merge-var-del-4">list-merge-var-del#4</a>.\n',summary:"<p> Convenience function for  list-merge-var-del#4 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'},{name:"tag",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The merge tag to delete</div>'}],returns:{type:"item()*",description:"bool true if the request succeeds, otherwise an error will be thrown"},errors:[]},{isDocumented:!0,arity:4,name:"list-merge-var-del",qname:"mailchimp:list-merge-var-del",signature:"($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $tag as xs:string) as item()*",description:" Delete a merge tag from a given list and all its members. Seriously - the data is removed from all members as well! Note that on large lists this method may seem a bit slower than calls you typically make.\n",summary:"<p> Delete a merge tag from a given list and all its members.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'},{name:"tag",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The merge tag to delete</div>'}],returns:{type:"item()*",description:"True if the request succeeds, otherwise an error will be thrown"},errors:[]},{isDocumented:!0,arity:4,name:"list-merge-var-update",qname:"mailchimp:list-merge-var-update",signature:"($apikey as xs:string, $id as xs:string, $tag as xs:string, $options as element(array)) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#list-merge-var-update-5">list-merge-var-update#5</a>.\n',summary:"<p> Convenience function for  list-merge-var-update#5 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'},{name:"tag",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The merge tag to update</div>'},{name:"options",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The options to change for a merge var. See <a href="#list-merge-var-add-5">list-merge-var-add()</a> for valid options</div>'}],returns:{type:"item()*",description:"True if the request succeeds, otherwise an error will be thrown"},errors:[]},{isDocumented:!0,arity:5,name:"list-merge-var-update",qname:"mailchimp:list-merge-var-update",signature:"($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $tag as xs:string, $options as element(array)) as item()*",description:" Update most parameters for a merge tag on a given list. You cannot currently change the merge type.\n",summary:"<p> Update most parameters for a merge tag on a given list.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'},{name:"tag",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The merge tag to update</div>'},{name:"options",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The options to change for a merge var. See <a href="#list-merge-var-add-5">list-merge-var-add()</a> for valid options</div>'}],returns:{type:"item()*",description:"True if the request succeeds, otherwise an error will be thrown"},errors:[]},{isDocumented:!0,arity:2,name:"list-merge-vars",qname:"mailchimp:list-merge-vars",signature:"($apikey as xs:string, $id as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#list-merge-vars-3">list-merge-vars#3</a>.\n',summary:"<p> Convenience function for  list-merge-vars#3 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'}],returns:{type:"item()*",description:"List of merge tags for the list"},errors:[]},{isDocumented:!0,arity:3,name:"list-merge-vars",qname:"mailchimp:list-merge-vars",signature:"($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string) as item()*",description:" Get the list of merge tags for a given list, including their name, tag, and required setting.\n",summary:"<p> Get the list of merge tags for a given list, including their name, tag, and required setting.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'}],returns:{type:"item()*",description:"List of merge tags for the list"},errors:[]},{isDocumented:!0,arity:3,name:"list-static-segment-add",qname:"mailchimp:list-static-segment-add",signature:"($apikey as xs:string, $id as xs:string, $name as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#list-static-segment-add-4">list-static-segment-add#4</a>.\n',summary:"<p> Convenience function for  list-static-segment-add#4 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'},{name:"name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a unique name per list for the segment - 50 byte maximum length, anything longer will throw an error</div>'}],returns:{type:"item()*",description:"The id of the new segment, otherwise an error will be thrown."},errors:[]},{isDocumented:!0,arity:4,name:"list-static-segment-add",qname:"mailchimp:list-static-segment-add",signature:"($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $name as xs:string) as item()*",description:' Save a segment against a list for later use. There is no limit to the number of segments which can be saved. Static Segments <strong xmlns:xqdoc="http://www.xqdoc.org/1.0">are not</strong> tied to any merge data, interest groups, etc. They essentially allow you to configure an unlimited number of custom segments which will have standard performance. When using proper segments, Static Segments are one of the available options for segmentation just as if you used a merge var (and they can be used with other segmentation options), though performance may degrade at that point.\n',summary:"<p> Save a segment against a list for later use.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'},{name:"name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a unique name per list for the segment - 50 byte maximum length, anything longer will throw an error</div>'}],returns:{type:"item()*",description:"The id of the new segment, otherwise an error will be thrown."},errors:[]},{isDocumented:!0,arity:3,name:"list-static-segment-del",qname:"mailchimp:list-static-segment-del",signature:"($apikey as xs:string, $id as xs:string, $seg_id as xs:integer) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#listStaticSegmentDel-4">list-static-segment-del#4</a>.\n',summary:"<p> Convenience function for  list-static-segment-del#4 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'},{name:"seg_id",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the id of the static segment to delete - get from <a href="#list-static-segments-2">list-static-segments()</a></div>'}],returns:{type:"item()*",description:"True if it worked, otherwise an error is thrown."},errors:[]},{isDocumented:!0,arity:4,name:"list-static-segment-del",qname:"mailchimp:list-static-segment-del",signature:"($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $seg_id as xs:integer) as item()*",description:" Delete a static segment. Note that this will, of course, remove any member affiliations with the segment.\n",summary:"<p> Delete a static segment.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'},{name:"seg_id",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the id of the static segment to delete - get from <a href="#list-static-segments-2">list-static-segments()</a></div>'}],returns:{type:"item()*",description:"True if it worked, otherwise an error is thrown."},errors:[]},{isDocumented:!0,arity:4,name:"list-static-segment-members-add",qname:"mailchimp:list-static-segment-members-add",signature:"($apikey as xs:string, $id as xs:string, $seg_id as xs:integer, $batch as element(array)) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#list-static-segment-members-add-5">list-static-segment-members-add#5</a>.\n',summary:"<p> Convenience function for  list-static-segment-members-add#5 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'},{name:"seg_id",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the id of the static segment to modify - get from <a href="#list-static-segments-2">list-static-segments()</a></div>'},{name:"batch",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> an array of email addresses and/or unique_ids to add to the segment</div>'}],returns:{type:"item()*",description:"An array with the results of the operation"},errors:[]},{isDocumented:!0,arity:5,name:"list-static-segment-members-add",qname:"mailchimp:list-static-segment-members-add",signature:"($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $seg_id as xs:integer, $batch as element(array)) as item()*",description:' Add list members to a static segment. It is suggested that you limit batch size to no more than 10,000 addresses per call. Email addresses must exist on the list in order to be included - this <strong xmlns:xqdoc="http://www.xqdoc.org/1.0">will not</strong> subscribe them to the list!.\n',summary:"<p> Add list members to a static segment.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'},{name:"seg_id",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the id of the static segment to modify - get from <a href="#list-static-segments-2">list-static-segments()</a></div>'},{name:"batch",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> an array of email addresses and/or unique_ids to add to the segment</div>'}],returns:{type:"item()*",description:"array an array with the results of the operation"},errors:[]},{isDocumented:!0,arity:4,name:"list-static-segment-members-del",qname:"mailchimp:list-static-segment-members-del",signature:"($apikey as xs:string, $id as xs:string, $seg_id as xs:integer, $batch as element(array)) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#list-static-segment-members-del-5">list-static-segment-members-del#5</a>.\n',summary:"<p> Convenience function for  list-static-segment-members-del#5 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'},{name:"seg_id",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the id of the static segment to delete - get from <a href="#list-static-segments-2">list-static-segments()</a></div>'},{name:"batch",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> an array of email addresses and/or unique_ids to remove from the segment</div>'}],returns:{type:"item()*",description:"An array with the results of the operation"},errors:[]},{isDocumented:!0,arity:5,name:"list-static-segment-members-del",qname:"mailchimp:list-static-segment-members-del",signature:"($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $seg_id as xs:integer, $batch as element(array)) as item()*",description:' Remove list members from a static segment. It is suggested that you limit batch size to no more than 10,000 addresses per call. Email addresses must exist on the list in order to be removed - this <strong xmlns:xqdoc="http://www.xqdoc.org/1.0">will not</strong> unsubscribe them from the list!.\n',summary:"<p> Remove list members from a static segment.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'},{name:"seg_id",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the id of the static segment to delete - get from <a href="#list-static-segments-2">list-static-segments()</a></div>'},{name:"batch",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> an array of email addresses and/or unique_ids to remove from the segment</div>'}],returns:{type:"item()*",description:"An array with the results of the operation"},errors:[]},{isDocumented:!0,arity:3,name:"list-static-segment-reset",qname:"mailchimp:list-static-segment-reset",signature:"($apikey as xs:string, $id as xs:string, $seg_id as xs:integer) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#list-static-segment-reset-4">list-static-segment-reset#4</a>.\n',summary:"<p> Convenience function for  list-static-segment-reset#4 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'},{name:"seg_id",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the id of the static segment to reset - get from <a href="#list-static-segments-2">list-static-segments()</a></div>'}],returns:{type:"item()*",description:"True if it worked, otherwise an error is thrown."},errors:[]},{isDocumented:!0,arity:4,name:"list-static-segment-reset",qname:"mailchimp:list-static-segment-reset",signature:"($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $seg_id as xs:integer) as item()*",description:' Resets a static segment - removes <strong xmlns:xqdoc="http://www.xqdoc.org/1.0">all</strong> members from the static segment. Note: does not actually affect list member data.\n',summary:"<p> Resets a static segment - removes  all  members from the static segment.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'},{name:"seg_id",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the id of the static segment to reset - get from <a href="#list-static-segments-2">list-static-segments()</a></div>'}],returns:{type:"item()*",description:"True if it worked, otherwise an error is thrown."},errors:[]},{isDocumented:!0,arity:2,name:"list-static-segments",qname:"mailchimp:list-static-segments",signature:"($apikey as xs:string, $id as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#list-static-segments-3">list-static-segments#3</a>.\n',summary:"<p> Convenience function for  list-static-segments#3 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'}],returns:{type:"item()*",description:"An array of parameters for each static segment"},errors:[]},{isDocumented:!0,arity:3,name:"list-static-segments",qname:"mailchimp:list-static-segments",signature:"($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string) as item()*",description:" Retrieve all of the Static Segments for a list.\n",summary:"<p> Retrieve all of the Static Segments for a list.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'}],returns:{type:"item()*",description:"An array of parameters for each static segment"},errors:[]},{isDocumented:!0,arity:10,name:"list-subscribe",qname:"mailchimp:list-subscribe",signature:"($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $email_address as xs:string, $merge_vars as element(array), $email_type as xs:string, $double_optin as xs:boolean, $update_existing as xs:boolean, $replace_interests as xs:boolean, $send_welcome as xs:boolean) as item()*",description:" Subscribe the provided email to a list.\n",summary:"<p> Subscribe the provided email to a list.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'},{name:"email_address",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the email address to subscribe</div>'},{name:"merge_vars",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional merges for the email (FNAME, LNAME, etc.) (see examples below for handling "blank" arrays). Note that a merge field can only hold up to 255 bytes. Also, there are a few "special" keys. See <a href="http://apidocs.mailchimp.com/rtfm/listsubscribe.func.php">Mailchimp API documentation</a> for more information about the parameter structure.</div>'},{name:"email_type",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional email type preference for the email (html, text, or mobile defaults to html)</div>'},{name:"double_optin",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional flag to control whether a double opt-in confirmation message is sent, defaults to true. <em>Abusing this may cause your account to be suspended.</em></div>'},{name:"update_existing",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional flag to control whether a existing subscribers should be updated instead of throwing and error, defaults to false</div>'},{name:"replace_interests",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional flag to determine whether we replace the interest groups with the groups provided, or we add the provided groups to the member\'s interest groups (optional, defaults to true)</div>'},{name:"send_welcome",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional if your double_optin is false and this is true, we will send your lists Welcome Email if this subscribe succeeds - this will *not* fire if we end up updating an existing subscriber. If double_optin is true, this has no effect. defaults to false.</div>'}],returns:{type:"item()*",description:"True on success, false on failure."},errors:[]},{isDocumented:!0,arity:9,name:"list-subscribe",qname:"mailchimp:list-subscribe",signature:"($apikey as xs:string, $id as xs:string, $email_address as xs:string, $merge_vars as element(array), $email_type as xs:string, $double_optin as xs:boolean, $update_existing as xs:boolean, $replace_interests as xs:boolean, $send_welcome as xs:boolean) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#list-subscribe-10">list-subscribe#10</a>.\n',summary:"<p> Convenience function for  list-subscribe#10 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'},{name:"email_address",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the email address to subscribe</div>'},{name:"merge_vars",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional merges for the email (FNAME, LNAME, etc.) (see examples below for handling "blank" arrays). Note that a merge field can only hold up to 255 bytes. Also, there are a few "special" keys. See <a href="http://apidocs.mailchimp.com/rtfm/listsubscribe.func.php">Mailchimp API documentation</a> for more information about the parameter structure.</div>'},{name:"email_type",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional email type preference for the email (html, text, or mobile defaults to html)</div>'},{name:"double_optin",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional flag to control whether a double opt-in confirmation message is sent, defaults to true. <em>Abusing this may cause your account to be suspended.</em></div>'},{name:"update_existing",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional flag to control whether a existing subscribers should be updated instead of throwing and error, defaults to false</div>'},{name:"replace_interests",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional flag to determine whether we replace the interest groups with the groups provided, or we add the provided groups to the member\'s interest groups (optional, defaults to true)</div>'},{name:"send_welcome",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional if your double_optin is false and this is true, we will send your lists Welcome Email if this subscribe succeeds - this will *not* fire if we end up updating an existing subscriber. If double_optin is true, this has no effect. defaults to false.</div>'}],returns:{type:"item()*",description:"True on success, false on failure."},errors:[]},{isDocumented:!0,arity:6,name:"list-unsubscribe",qname:"mailchimp:list-unsubscribe",signature:"($apikey as xs:string, $id as xs:string, $email_address as xs:string, $delete_member as xs:boolean, $send_goodbye as xs:boolean, $send_notify as xs:boolean) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#list-unsubscribe-7">list-unsubscribe#7</a>.\n',summary:"<p> Convenience function for  list-unsubscribe#7 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'},{name:"email_address",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the email address to unsubscribe OR the email "id" returned from listMemberInfo, Webhooks, and Campaigns</div>'},{name:"delete_member",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> flag to completely delete the member from your list instead of just unsubscribing, default to false</div>'},{name:"send_goodbye",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> flag to send the goodbye email to the email address, defaults to true</div>'},{name:"send_notify",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> flag to send the unsubscribe notification email to the address defined in the list email notification settings, defaults to true</div>'}],returns:{type:"item()*",description:"True on success, false on failure."},errors:[]},{isDocumented:!0,arity:7,name:"list-unsubscribe",qname:"mailchimp:list-unsubscribe",signature:"($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $email_address as xs:string, $delete_member as xs:boolean, $send_goodbye as xs:boolean, $send_notify as xs:boolean) as item()*",description:" Unsubscribe the given email address from the list.\n",summary:"<p> Unsubscribe the given email address from the list.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'},{name:"email_address",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the email address to unsubscribe OR the email "id" returned from listMemberInfo, Webhooks, and Campaigns</div>'},{name:"delete_member",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> flag to completely delete the member from your list instead of just unsubscribing, default to false</div>'},{name:"send_goodbye",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> flag to send the goodbye email to the email address, defaults to true</div>'},{name:"send_notify",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> flag to send the unsubscribe notification email to the address defined in the list email notification settings, defaults to true</div>'}],returns:{type:"item()*",description:"True on success, false on failure."},errors:[]},{isDocumented:!0,arity:6,name:"list-update-member",qname:"mailchimp:list-update-member",signature:"($apikey as xs:string, $id as xs:string, $email_address as xs:string, $merge_vars as element(array), $email_type as xs:string, $replace_interests as xs:boolean) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#list-update-member-7">list-update-member#7</a>.\n',summary:"<p> Convenience function for  list-update-member#7 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'},{name:"email_address",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the current email address of the member to update OR the "id" for the member returned from listMemberInfo, Webhooks, and Campaigns</div>'},{name:"merge_vars",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> array of new field values to update the member with. See merge_vars in <a href="#list-subscribe-10">list-subscribe()</a> for details.</div>'},{name:"email_type",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> change the email type preference for the member ("html", "text", or "mobile"). Leave blank to keep the existing preference (optional)</div>'},{name:"replace_interests",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> flag to determine whether we replace the interest groups with the updated groups provided, or we add the provided groups to the member\'s interest groups (optional, defaults to true)</div>'}],returns:{type:"item()*",description:"True on success, false on failure."},errors:[]},{isDocumented:!0,arity:7,name:"list-update-member",qname:"mailchimp:list-update-member",signature:"($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $email_address as xs:string, $merge_vars as element(array), $email_type as xs:string, $replace_interests as xs:boolean) as item()*",description:' Edit the email address, merge fields, and interest groups for a list member. If you are doing a batch update on lots of users, consider using <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#list-batch-subscribe-6">#list-batch-subscribe()</a> with the update_existing and possible replace_interests parameter.\n',summary:"<p> Edit the email address, merge fields, and interest groups for a list member.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'},{name:"email_address",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the current email address of the member to update OR the "id" for the member returned from listMemberInfo, Webhooks, and Campaigns</div>'},{name:"merge_vars",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> array of new field values to update the member with. See merge_vars in <a href="#list-subscribe-10">list-subscribe()</a> for details.</div>'},{name:"email_type",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> change the email type preference for the member ("html", "text", or "mobile"). Leave blank to keep the existing preference (optional)</div>'},{name:"replace_interests",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> flag to determine whether we replace the interest groups with the updated groups provided, or we add the provided groups to the member\'s interest groups (optional, defaults to true)</div>'}],returns:{type:"item()*",description:"True on success, false on failure."},errors:[]},{isDocumented:!0,arity:5,name:"list-webhook-add",qname:"mailchimp:list-webhook-add",signature:"($apikey as xs:string, $id as xs:string, $url as xs:string, $actions as element(array), $sources as element(array)) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#list-webhook-add-6">list-webhook-add#6</a>.\n',summary:"<p> Convenience function for  list-webhook-add#6 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'},{name:"url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid URL for the Webhook - it will be validated. note that a url may only exist on a list once.</div>'},{name:"actions",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional a hash of actions to fire this Webhook for</div>'},{name:"sources",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional a hash of sources to fire this Webhook for</div>'}],returns:{type:"item()*",description:"True if the call succeeds, otherwise an exception will be thrown"},errors:[]},{isDocumented:!0,arity:6,name:"list-webhook-add",qname:"mailchimp:list-webhook-add",signature:"($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $url as xs:string, $actions as element(array), $sources as element(array)) as item()*",description:" Add a new Webhook URL for the given list.\n",summary:"<p> Add a new Webhook URL for the given list.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'},{name:"url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid URL for the Webhook - it will be validated. note that a url may only exist on a list once.</div>'},{name:"actions",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional a hash of actions to fire this Webhook for</div>'},{name:"sources",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional a hash of sources to fire this Webhook for</div>'}],returns:{type:"item()*",description:"True if the call succeeds, otherwise an exception will be thrown"},errors:[]},{isDocumented:!0,arity:3,name:"list-webhook-del",qname:"mailchimp:list-webhook-del",signature:"($apikey as xs:string, $id as xs:string, $url as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#list-webhook-del-4">list-webhook-del#4</a>.\n',summary:"<p> Convenience function for  list-webhook-del#4 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'},{name:"url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the URL of a Webhook on this list</div>'}],returns:{type:"item()*",description:"True if the call succeeds, otherwise an exception will be thrown"},errors:[]},{isDocumented:!0,arity:4,name:"list-webhook-del",qname:"mailchimp:list-webhook-del",signature:"($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string, $url as xs:string) as item()*",description:" Delete an existing Webhook URL from a given list.\n",summary:"<p> Delete an existing Webhook URL from a given list.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'},{name:"url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the URL of a Webhook on this list</div>'}],returns:{type:"item()*",description:"True if the call succeeds, otherwise an exception will be thrown"},errors:[]},{isDocumented:!0,arity:2,name:"list-webhooks",qname:"mailchimp:list-webhooks",signature:"($apikey as xs:string, $id as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#list-webhooks-3">list-webhooks#3</a>.\n',summary:"<p> Convenience function for  list-webhooks#3 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'}],returns:{type:"item()*",description:"List of webhooks"},errors:[]},{isDocumented:!0,arity:3,name:"list-webhooks",qname:"mailchimp:list-webhooks",signature:"($endpoint-url as xs:string, $apikey as xs:string, $id as xs:string) as item()*",description:" Return the Webhooks configured for the given list.\n",summary:"<p> Return the Webhooks configured for the given list.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list id to connect to. Get by calling <a href="#lists-4">lists()</a></div>'}],returns:{type:"item()*",description:"List of webhooks"},errors:[]},{isDocumented:!0,arity:2,name:"lists-for-email",qname:"mailchimp:lists-for-email",signature:"($apikey as xs:string, $email_address as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#lists-for-email-3">lists-for-email#3</a>.\n',summary:"<p> Convenience function for  lists-for-email#3 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"email_address",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the email address to check OR the email "id" returned from listMemberInfo, Webhooks, and Campaigns</div>'}],returns:{type:"item()*",description:"An array of list_ids the member is subscribed to."},errors:[]},{isDocumented:!0,arity:3,name:"lists-for-email",qname:"mailchimp:lists-for-email",signature:"($endpoint-url as xs:string, $apikey as xs:string, $email_address as xs:string) as item()*",description:" Retrieve all List Ids a member is subscribed to.\n",summary:"<p> Retrieve all List Ids a member is subscribed to.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"email_address",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the email address to check OR the email "id" returned from listMemberInfo, Webhooks, and Campaigns</div>'}],returns:{type:"item()*",description:"An array of list_ids the member is subscribed to."},errors:[]},{isDocumented:!0,arity:4,name:"lists",qname:"mailchimp:lists",signature:"($apikey as xs:string, $filters as element(array), $start as xs:integer, $limit as xs:integer) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#lists-5">lists#5</a>.\n',summary:"<p> Convenience function for  lists#5 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"filters",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a hash of filters to apply to this query - all are optional. See <a href="http://apidocs.mailchimp.com/rtfm/lists.func.php">Mailchimp API documentation</a> for more information about the parameter structure.</div>'},{name:"start",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional - control paging of lists, start results at this list #, defaults to 1st page of data (page 0)</div>'},{name:"limit",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional - control paging of lists, number of lists to return with each call, defaults to 25 (max=100)</div>'}],returns:{type:"item()*",description:"Array with keys listed in Returned Fields below"},errors:[]},{isDocumented:!0,arity:5,name:"lists",qname:"mailchimp:lists",signature:"($endpoint-url as xs:string, $apikey as xs:string, $filters as element(array), $start as xs:integer, $limit as xs:integer) as item()*",description:" Retrieve all of the lists defined for your user account.\n",summary:"<p> Retrieve all of the lists defined for your user account.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"filters",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a hash of filters to apply to this query - all are optional. See <a href="http://apidocs.mailchimp.com/rtfm/lists.func.php">Mailchimp API documentation</a> for more information about the parameter structure.</div>'},{name:"start",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional - control paging of lists, start results at this list #, defaults to 1st page of data (page 0)</div>'},{name:"limit",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional - control paging of lists, number of lists to return with each call, defaults to 25 (max=100)</div>'}],returns:{type:"item()*",description:"Array with keys listed in Returned Fields below"},errors:[]},{isDocumented:!0,arity:1,name:"ping",qname:"mailchimp:ping",signature:"($apikey as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#ping-2">ping#2</a>.\n',summary:"<p> Convenience function for  ping#2 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""}],returns:{type:"item()*",description:'Returns "Everything\'s Chimpy!" if everything is chimpy, otherwise returns an error message'},errors:[]},{isDocumented:!0,arity:2,name:"ping",qname:"mailchimp:ping",signature:"($endpoint-url as xs:string, $apikey as xs:string) as item()*",description:' "Ping" the MailChimp API - a simple method you can call that will return a constant value as long as everything is good. Note than unlike most all of our methods, we don\'t throw an Exception if we are having issues. You will simply receive a different string back that will explain our view on what is going on.\n',summary:'<p> "Ping" the MailChimp API - a simple method you can call that will return a constant value as long as everything is good.</p>',annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'}],returns:{type:"item()*",description:'Returns "Everything\'s Chimpy!" if everything is chimpy, otherwise returns an error message'},errors:[]},{isDocumented:!0,arity:3,name:"template-add",qname:"mailchimp:template-add",signature:"($apikey as xs:string, $name as xs:string, $html as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#template-add-4">template-add#4</a>.\n',summary:"<p> Convenience function for  template-add#4 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name for the template - names must be unique and a max of 50 bytes</div>'},{name:"html",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a string specifying the entire template to be created. This is <strong>NOT</strong> campaign content. They are intended to utilize our <a href="http://www.mailchimp.com/resources/email-template-language/" target="_blank">template language</a>.</div>'}],returns:{type:"item()*",description:"The new template id, otherwise an error is thrown."},errors:[]},{isDocumented:!0,arity:4,name:"template-add",qname:"mailchimp:template-add",signature:"($endpoint-url as xs:string, $apikey as xs:string, $name as xs:string, $html as xs:string) as item()*",description:' Create a new user template, <strong xmlns:xqdoc="http://www.xqdoc.org/1.0">NOT</strong> campaign content. These templates can then be applied while creating campaigns.\n',summary:"<p> Create a new user template,  NOT  campaign content.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name for the template - names must be unique and a max of 50 bytes</div>'},{name:"html",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a string specifying the entire template to be created. This is <strong>NOT</strong> campaign content. They are intended to utilize our <a href="http://www.mailchimp.com/resources/email-template-language/" target="_blank">template language</a>.</div>'}],returns:{type:"item()*",description:"The new template id, otherwise an error is thrown."},errors:[]},{isDocumented:!0,arity:2,name:"template-del",qname:"mailchimp:template-del",signature:"($apikey as xs:string, $id as xs:integer) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#template-del-3">template-del#3</a>.\n',summary:"<p> Convenience function for  template-del#3 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"id",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the id of the user template to delete</div>'}],returns:{type:"item()*",description:"True if the template was deleted, otherwise an error will be thrown"},errors:[]},{isDocumented:!0,arity:3,name:"template-del",qname:"mailchimp:template-del",signature:"($endpoint-url as xs:string, $apikey as xs:string, $id as xs:integer) as item()*",description:" Delete (deactivate) a user template.\n",summary:"<p> Delete (deactivate) a user template.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"id",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the id of the user template to delete</div>'}],returns:{type:"item()*",description:"True if the template was deleted, otherwise an error will be thrown"},errors:[]},{isDocumented:!0,arity:3,name:"template-info",qname:"mailchimp:template-info",signature:"($apikey as xs:string, $tid as xs:integer, $type as xs:string) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#template-info-4">template-info#4</a>.\n',summary:"<p> Convenience function for  template-info#4 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"tid",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the template id - get from templates()</div>'},{name:"type",type:"xs:string",occurrence:null,description:"<div xmlns:xqdoc=\"http://www.xqdoc.org/1.0\"> the template type to load - one of 'user', 'gallery', 'base'</div>"}],returns:{type:"item()*",description:"An array of info to be used when editing"},errors:[]},{isDocumented:!0,arity:4,name:"template-info",qname:"mailchimp:template-info",signature:"($endpoint-url as xs:string, $apikey as xs:string, $tid as xs:integer, $type as xs:string) as item()*",description:" Pull details for a specific template to help support editing.\n",summary:"<p> Pull details for a specific template to help support editing.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"tid",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the template id - get from templates()</div>'},{name:"type",type:"xs:string",occurrence:null,description:"<div xmlns:xqdoc=\"http://www.xqdoc.org/1.0\"> the template type to load - one of 'user', 'gallery', 'base'</div>"}],returns:{type:"item()*",description:"An array of info to be used when editing"},errors:[]},{isDocumented:!0,arity:2,name:"template-undel",qname:"mailchimp:template-undel",signature:"($apikey as xs:string, $id as xs:integer) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#template-undel-3">template-undel#3</a>.\n',summary:"<p> Convenience function for  template-undel#3 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"id",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the id of the user template to reactivate</div>'}],returns:{type:"item()*",description:"boolean true if the template was deleted, otherwise an error will be thrown"},errors:[]},{isDocumented:!0,arity:3,name:"template-undel",qname:"mailchimp:template-undel",signature:"($endpoint-url as xs:string, $apikey as xs:string, $id as xs:integer) as item()*",description:" Undelete (reactivate) a user template.\n",summary:"<p> Undelete (reactivate) a user template.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"id",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the id of the user template to reactivate</div>'}],returns:{type:"item()*",description:"boolean true if the template was deleted, otherwise an error will be thrown"},errors:[]},{isDocumented:!0,arity:3,name:"template-update",qname:"mailchimp:template-update",signature:"($apikey as xs:string, $id as xs:integer, $values as element(array)) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#template-update-4">template-update#4</a>.\n',summary:"<p> Convenience function for  template-update#4 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"id",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the id of the user template to update</div>'},{name:"values",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> s the values to updates - while both are optional, at least one should be provided. Both can be updated at the same time.</div>'}],returns:{type:"item()*",description:"True if the template was updated, otherwise an error will be thrown"},errors:[]},{isDocumented:!0,arity:4,name:"template-update",qname:"mailchimp:template-update",signature:"($endpoint-url as xs:string, $apikey as xs:string, $id as xs:integer, $values as element(array)) as item()*",description:' Replace the content of a user template, <strong xmlns:xqdoc="http://www.xqdoc.org/1.0">NOT</strong> campaign content.\n',summary:"<p> Replace the content of a user template,  NOT  campaign content.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"id",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the id of the user template to update</div>'},{name:"values",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> s the values to updates - while both are optional, at least one should be provided. Both can be updated at the same time.</div>'}],returns:{type:"item()*",description:"True if the template was updated, otherwise an error will be thrown"},errors:[]},{isDocumented:!0,arity:4,name:"templates",qname:"mailchimp:templates",signature:"($apikey as xs:string, $types as element(array), $category as xs:string, $inactives as element(array)) as item()*",description:' Convenience function for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#templates-5">templates#5</a>.\n',summary:"<p> Convenience function for  templates#5 .</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"apikey",type:"xs:string",occurrence:null,description:""},{name:"types",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional the types of templates to return</div>'},{name:"category",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional for Gallery templates only, limit to a specific template category</div>'},{name:"inactives",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional options to control how inactive templates are returned, if at all</div>'}],returns:{type:"item()*",description:"An array of structs, one for each template (see Returned Fields for details)"},errors:[]},{isDocumented:!0,arity:5,name:"templates",qname:"mailchimp:templates",signature:"($endpoint-url as xs:string, $apikey as xs:string, $types as element(array), $category as xs:string, $inactives as element(array)) as item()*",description:' Retrieve various templates available in the system, allowing some thing similar to our template gallery to be created. boolean user Customer template for this user account. Defaults to true. boolean gallery Templates from our Gallery. Note that some templates that require extra configuration are withheld. (eg, the Etsy template). Defaults to false. boolean base Our "start from scratch" extremely basic templates boolean include user templates are not deleted, only set inactive. defaults to false. boolean only only include inactive templates. defaults to false.\n',summary:"<p> Retrieve various templates available in the system, allowing some thing similar to our template gallery to be created.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Mailchimp endpoint URL, e.g. http://us1.api.mailchimp.com/1.3/</div>'},{name:"apikey",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a valid API Key for your user account. Get by visiting <a href="http://admin.mailchimp.com/account/api" target="_blank">your API dashboard</a></div>'},{name:"types",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional the types of templates to return</div>'},{name:"category",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional for Gallery templates only, limit to a specific template category</div>'},{name:"inactives",type:"element(array)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> optional options to control how inactive templates are returned, if at all</div>'}],returns:{type:"item()*",description:"An array of structs, one for each template (see Returned Fields for details)"},errors:[]}],variables:[{name:"mailchimp:gateway",type:"item()*",description:" Mailchimp gateway where the client data is stored.\n"},{name:"mailchimp:version",type:"item()*",description:" Mailchimp API version.\n"},{name:"mailchimp:endpoint",type:"item()*",description:" Endpoint URL for the XML-RPC requests.\n"}]},"http://www.zorba-xquery.com/modules/couchbase":{ns:"http://www.zorba-xquery.com/modules/couchbase",description:" This module provides minimal functionality to interact with the\n Couchbase NoSQL database.\n The module is built using the libcouchbase C client library and\n exposes most of its functionality in XQuery with JSONiq extensions.\n Beyond just allowing for basic key-value store operations (e.g.\n put-/get-text or put-/get-binary, this module also allows to work\n with Couchbase views in order to allow for complex JSON query\n operations.\n",sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Juan Zacarias</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://www.zorba-xquery.com/modules/couchbase",prefix:"cb"},{uri:"http://jsoniq.org/functions",prefix:"jn"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"connect",qname:"cb:connect",signature:"($options as object()) as xs:anyURI external",description:" Connect to the Couchbase server and return an opaque identifier\n representing the established connection.\n",summary:"<p> Connect to the Couchbase server and return an opaque identifier\n representing the established connection.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a JSONiq object that contains the host, bucket, and user information.</div>'}],returns:{type:"xs:anyURI",description:'an identifier for the established connection. Example: <code xmlns:xqdoc="http://www.xqdoc.org/1.0"> { "host": "localhost:8091", "username" : null, "password" : null, "bucket" : "default" } </code>'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cb:LCB0001 if the connection to the given host/bucket could not be established.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cb:CB0001 if mandatory connection information is missing.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cb:CB0007 if a given option is not supported.</xqdoc:error>']},{isDocumented:!0,arity:4,name:"connect",qname:"cb:connect",signature:"($host as xs:string, $username as xs:string?, $password as xs:string?, $bucket as xs:string) as xs:anyURI",description:" Connect to the Couchbase server and return an opaque identifier\n representing the established connection.\n",summary:"<p> Connect to the Couchbase server and return an opaque identifier\n representing the established connection.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"host",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> address of the couchbase server (e.g. "localhost:8091")</div>'},{name:"username",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> username used for the connection</div>'},{name:"password",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> password used for the connection</div>'},{name:"bucket",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> name of the bucket to use (e.g. "default")</div>'}],returns:{type:"xs:anyURI",description:"an identifier for the established connection."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cb:LCB0001 if the connection to the given host/bucket could not be established.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"create-view",qname:"cb:create-view",signature:"($db as xs:anyURI, $doc-name as xs:string, $view-names as xs:string*) as xs:string* external",description:" Create a document/view.\n If the document already exists, it is replaced. A document can hold several\n views that must be specified in the same call of cb:create-view.\n",summary:"<p> Create a document/view.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"db",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> connection reference</div>'},{name:"doc-name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> name of the document to create.</div>'},{name:"view-names",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> names of the views to create in the document.</div>'}],returns:{type:"xs:string*",description:"the names of the paths for the views that have been created."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cb:LCB0002 if any error occurs in the communication with the server.</xqdoc:error>']},{isDocumented:!0,arity:4,name:"create-view",qname:"cb:create-view",signature:"($db as xs:anyURI, $doc-name as xs:string, $view-names as xs:string*, $options as object()*) as xs:string* external",description:" Create a document/view.\n If the document already exists, it is replaced. A document can hold several\n views that must be specified in the same call of cb:create-view.\n",summary:"<p> Create a document/view.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"db",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> connection reference</div>'},{name:"doc-name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> name of the document to create.</div>'},{name:"view-names",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> names of the views to create in the document.</div>'},{name:"options",type:"object()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> options describing how to create the view.</div>'}],returns:{type:"xs:string*",description:"the names of the paths for the views that have been created."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cb:LCB0002 if any error occurs in the communication with the server.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cb:CB0005 if the number of options doesn\'t match the number of view-names.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cb:CB0007 if any of the options is not supported.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cb:CB0010 if any of the given options has an invalid type.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"delete-view",qname:"cb:delete-view",signature:"($db as xs:anyURI, $doc as xs:string*) as xs:string* external",description:" Delete a document/view.\n If the document doesn't exists, function does nothing. All the views hold in the\n Document are deleted, this function can't delete single views.\n",summary:"<p> Delete a document/view.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"db",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> connection reference</div>'},{name:"doc",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0">-name name of the document to create.</div>'}],returns:{type:"xs:string*",description:"empty sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cb:LCB0002 if any error occurs in the communication with the server.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"flush",qname:"cb:flush",signature:"($db as xs:anyURI) as empty-sequence() external",description:" Remove all key/value pairs from the cluster\n",summary:"<p> Remove all key/value pairs from the cluster\n</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"db",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> connection reference</div>'}],returns:{type:"empty-sequence()",description:"a empty sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cb:LCB0002 if any error occurs in the communication with the server.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"get-binary",qname:"cb:get-binary",signature:"($db as xs:anyURI, $key as xs:string*) as xs:base64Binary* external",description:" Return the values of the given keys (type xs:string) as base64Binary.\n",summary:"<p> Return the values of the given keys (type xs:string) as base64Binary.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"db",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> connection reference</div>'},{name:"key",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the requested keys</div>'}],returns:{type:"xs:base64Binary*",description:"a sequence of xs:base64Binary items for the given keys."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cb:LCB0002 if any error occurs in the communication with the server.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"get-binary",qname:"cb:get-binary",signature:"($db as xs:anyURI, $key as xs:string*, $options as object()) as xs:base64Binary* external",description:" Return the values of the given keys (type xs:string) as base64Binary.\n",summary:"<p> Return the values of the given keys (type xs:string) as base64Binary.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"db",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> connection reference</div>'},{name:"key",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the requested keys</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> JSONiq object with additional options</div>'}],returns:{type:"xs:base64Binary*",description:"a sequence of xs:base64Binary items for the given keys."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cb:LCB0002 if any error occurs in the communication with the server.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cb:CB0007 if any of the options is not supported.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cb:CB0009 if the given expiration time is not an xs:integer.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"get-text",qname:"cb:get-text",signature:"($db as xs:anyURI, $key as xs:string*) as xs:string* external",description:" Return the values of the given keys (type xs:string) as string.\n",summary:"<p> Return the values of the given keys (type xs:string) as string.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"db",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> connection reference</div>'},{name:"key",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the requested keys</div>'}],returns:{type:"xs:string*",description:"A sequence of string Items corresponding to the key"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cb:LCB0002 if any error occurs in the communication with the server.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"get-text",qname:"cb:get-text",signature:"($db as xs:anyURI, $key as xs:string*, $options as object()) as xs:string* external",description:" Return the values of the given keys (type xs:string) as string.\n",summary:"<p> Return the values of the given keys (type xs:string) as string.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"db",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> connection reference</div>'},{name:"key",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the requested keys</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> JSONiq object with additional options</div>'}],returns:{type:"xs:string*",description:"a sequence of strings for the given keys."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cb:LCB0002 if any error occurs in the communication with the server.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cb:CB0006 if the given encoding is not supported.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cb:CB0007 if any of the options is not supported.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cb:CB0009 if the given expiration time is not an xs:integer.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"put-binary",qname:"cb:put-binary",signature:"($db as xs:anyURI, $key as xs:string*, $value as xs:base64Binary*) as empty-sequence()",description:" Store the given key-value bindings.\n",summary:"<p> Store the given key-value bindings.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"db",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> connection reference</div>'},{name:"key",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the keys to store</div>'},{name:"value",type:"xs:base64Binary",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the values (as xs:base64binary) to be stored.</div>'}],returns:{type:"empty-sequence()",description:"a empty sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cb:LCB0002 if any error occurs in the communication with the server.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cb:CB0005 if the number of keys doesn\'t match the number of values.</xqdoc:error>']},{isDocumented:!0,arity:4,name:"put-binary",qname:"cb:put-binary",signature:"($db as xs:anyURI, $key as xs:string*, $value as xs:base64Binary*, $options as object()) as empty-sequence() external",description:" Store the given key-value bindings.\n",summary:"<p> Store the given key-value bindings.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"db",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> connection reference</div>'},{name:"key",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the keys to store</div>'},{name:"value",type:"xs:base64Binary",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the values (as xs:base64binary) to be stored.</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> JSONiq object with additional options</div>'}],returns:{type:"empty-sequence()",description:"a empty sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cb:LCB0002 if any error occurs in the communication with the server.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cb:CB0005 if the number of keys doesn\'t match the number of values.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cb:CB0007 if any of the options is not supported.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cb:CB0009 if the given expiration time is not an xs:integer.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cb:CB0011 if the stored Variable was not stored</xqdoc:error>']},{isDocumented:!0,arity:3,name:"put-text",qname:"cb:put-text",signature:"($db as xs:anyURI, $key as xs:string*, $value as xs:string*) as empty-sequence()",description:" Store the given key-value bindings.\n The values are stored with the UTF-8 encoding and a default\n expiration time of 60 seconds.\n",summary:"<p> Store the given key-value bindings.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"db",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> connection reference</div>'},{name:"key",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the keys to store</div>'},{name:"value",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the values (as xs:string) to be stored.</div>'}],returns:{type:"empty-sequence()",description:"a empty sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cb:LCB0002 if any error occurs in the communication with the server.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cb:CB0005 if the number of keys doesn\'t match the number of values.</xqdoc:error>']},{isDocumented:!0,arity:4,name:"put-text",qname:"cb:put-text",signature:"($db as xs:anyURI, $key as xs:string*, $value as xs:string*, $options as object()) as empty-sequence() external",description:" Store the given key-value bindings.\n",summary:"<p> Store the given key-value bindings.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"db",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> connection reference</div>'},{name:"key",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the keys to store</div>'},{name:"value",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the values (as xs:string) to be stored.</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> JSONiq object with additional options</div>'}],returns:{type:"empty-sequence()",description:"a empty sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cb:LCB0002 if any error occurs in the communication with the server.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cb:CB0005 if the number of keys doesn\'t match the number of values.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cb:CB0006 if the given encoding is not supported.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cb:CB0007 if any of the options is not supported.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cb:CB0009 if the given expiration time is not an xs:integer.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cb:CB0011 if the stored Variable was not stored</xqdoc:error>']},{isDocumented:!0,arity:2,name:"remove",qname:"cb:remove",signature:"($db as xs:anyURI, $key as xs:string*) as empty-sequence() external",description:" Remove the values matching the given keys (xs:string) from the server.\n",summary:"<p> Remove the values matching the given keys (xs:string) from the server.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"db",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> connection reference</div>'},{name:"key",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the keys of the values that should be removed.</div>'}],returns:{type:"empty-sequence()",description:"a empty sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cb:LCB0002 if any error occurs in the communication with the server.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"touch",qname:"cb:touch",signature:"($db as xs:anyURI, $key as xs:string*, $exp-time as xs:integer) as empty-sequence() external",description:" Refresh the expiration time of the given keys.\n",summary:"<p> Refresh the expiration time of the given keys.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"db",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> connection reference</div>'},{name:"key",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the keys to touch</div>'},{name:"exp-time",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> new expieration time in seconds</div>'}],returns:{type:"empty-sequence()",description:"a empty sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cb:LCB0002 if any error occurs in the communication with the server.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"view",qname:"cb:view",signature:"($db as xs:anyURI, $path as xs:string*) as object()*",description:" Retrieve the content of existing views.\n",summary:"<p> Retrieve the content of existing views.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"db",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> connection reference</div>'},{name:"path",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> contains the string of a view path (e.g. "_design/test/_view/vies").</div>'}],returns:{type:"object()*",description:"a sequence of strings (as JSON) containing information of the views."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cb:LCB0002 if any error occurs in the communication with the server.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"view",qname:"cb:view",signature:"($db as xs:anyURI, $path as xs:string*, $options as object()) as object()*",description:" Retrieve the content of existing views.\n",summary:"<p> Retrieve the content of existing views.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"db",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> connection reference</div>'},{name:"path",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> contains the string of a view path (e.g. "_design/test/_view/vies").</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> JSONiq object with additional options</div>'}],returns:{type:"object()*",description:"a sequence of strings (as JSON) containing information of the views."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cb:LCB0002 if any error occurs in the communication with the server.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cb:CB0007 if any of the options is not supported.</xqdoc:error>']}],variables:[]},"http://zorba.io/modules/excel/text":{ns:"http://zorba.io/modules/excel/text",description:" This is a library module offering the same set of functions\n defined by Microsoft Excel, under Text and Data Functions.\n",sees:['<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0"><a href="http://office.microsoft.com/en-us/excel/CH062528321033.aspx" target="_blank">Excel Documentation: Text Functions</a></xqdoc:see>'],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Sorin Nasoi</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/modules/excel/errors",prefix:"excel-err"},{uri:"http://zorba.io/modules/excel/math",prefix:"excel-math"},{uri:"http://zorba.io/modules/excel/text",prefix:"excel-text"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"asc",qname:"excel-text:asc",signature:"($text as xs:string) as xs:string",description:" Returns the given $text unchanged.\n",summary:"<p> Returns the given $text unchanged.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"text",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the time</div>'}],returns:{type:"xs:string",description:"The given $text unchanged."},errors:[]},{isDocumented:!0,arity:1,name:"char",qname:"excel-text:char",signature:"($number as xs:integer) as xs:string",description:" Returns the character specified by a certain codepoint.\n",summary:"<p> Returns the character specified by a certain codepoint.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"number",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the codepoint.</div>'}],returns:{type:"xs:string",description:"the character specified by a certain codepoint."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value provided $number must be in range [1,255].</xqdoc:error>']},{isDocumented:!0,arity:1,name:"clean",qname:"excel-text:clean",signature:"($arg as xs:string?) as xs:string?",description:" Removes all nonprintable characters from text.\n",summary:"<p> Removes all nonprintable characters from text.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the string.</div>'}],returns:{type:"xs:string?",description:'Removes all nonprintable characters from text. The CLEAN function was designed. to remove the first 32 nonprinting characters in the 7-bit ASCII code (values 0 through 31) from text. <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/> In the Unicode character set, there are additional nonprinting characters (values 127, 129, 141, 143, 144, and 157). <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/> By itself, the CLEAN function does not remove these additional nonprinting characters.'},errors:[]},{isDocumented:!0,arity:1,name:"code",qname:"excel-text:code",signature:"($arg as xs:string) as xs:integer",description:" Returns a codepoint for the first character in a text string.\n",summary:"<p> Returns a codepoint for the first character in a text string.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the string.</div>'}],returns:{type:"xs:integer",description:"A codepoint for the first character in a text string."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value Provided $arg was empty.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"concatenate",qname:"excel-text:concatenate",signature:"($args as xs:anyAtomicType*) as xs:string",description:" Joins several text strings into one text string.\n",summary:"<p> Joins several text strings into one text string.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"args",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of strings.</div>'}],returns:{type:"xs:string",description:"Joins several text strings into one text string."},errors:[]},{isDocumented:!0,arity:2,name:"concatenate",qname:"excel-text:concatenate",signature:"($arg1 as xs:anyAtomicType?, $arg2 as xs:anyAtomicType?) as xs:string",description:" Joins two text strings into one text string.\n",summary:"<p> Joins two text strings into one text string.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg1",type:"xs:anyAtomicType",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the first string.</div>'},{name:"arg2",type:"xs:anyAtomicType",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the second string.</div>'}],returns:{type:"xs:string",description:"Joins two text strings into one text string."},errors:[]},{isDocumented:!0,arity:1,name:"dollar",qname:"excel-text:dollar",signature:"($number as xs:decimal) as xs:string",description:" Converts a number to text format and applies a currency symbol. The number of\ndigits to the right of the decimal point is 2.\n",summary:"<p> Converts a number to text format and applies a currency symbol.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"number",type:"xs:decimal",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is the number.</div>'}],returns:{type:"xs:string",description:"Converts a number to text format and applies a currency symbol. The number of digits to the right of the decimal point is 2."},errors:[]},{isDocumented:!0,arity:2,name:"dollar",qname:"excel-text:dollar",signature:"($number as xs:decimal, $decimals as xs:decimal) as xs:string",description:" Converts a number to text format and applies a currency symbol.\n",summary:"<p> Converts a number to text format and applies a currency symbol.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"number",type:"xs:decimal",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is the number.</div>'},{name:"decimals",type:"xs:decimal",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is the number of digits to the right of the decimal point. <p/> If decimals is negative, number is rounded to the left of the decimal point.</div>'}],returns:{type:"xs:string",description:"Converts a number to text format and applies a currency symbol."},errors:[]},{isDocumented:!0,arity:2,name:"exact",qname:"excel-text:exact",signature:"($arg1 as xs:string, $arg2 as xs:string) as xs:boolean",description:" Compares two text strings and returns TRUE if they are exactly the same,\nFALSE otherwise. EXACT is case-sensitive but ignores formatting differences.\n",summary:"<p> Compares two text strings and returns TRUE if they are exactly the same,\nFALSE otherwise.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg1",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the first string.</div>'},{name:"arg2",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the second string.</div>'}],returns:{type:"xs:boolean",description:"Compares two text strings and returns TRUE if they are exactly the same, FALSE otherwise. EXACT is case-sensitive but ignores formatting differences."},errors:[]},{isDocumented:!0,arity:2,name:"find",qname:"excel-text:find",signature:"($find_text as xs:string, $within_text as xs:string) as xs:integer?",description:' Locate one text string within a second text string, and return the number of the\n starting position of the first text string from the first character of the second text string. <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The search is case sensitive.\n',summary:"<p> Locate one text string within a second text string, and return the number of the\n starting position of the first text string from the first character of the second text string.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"find_text",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> text you want to find.</div>'},{name:"within_text",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> text in which you want to search for $find_text.</div>'}],returns:{type:"xs:integer?",description:'Locate one text string within a second text string, and return the number of the starting position of the first text string from the first character of the second text string. <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/> The search is case sensitive.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value the value is not greater than zero or is greater than the length of within_text.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value value was not found.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"find",qname:"excel-text:find",signature:"($find_text as xs:string, $within_text as xs:string, $start_num as xs:integer) as xs:integer?",description:' Locate one text string within a second text string, and return the number of the\n starting position of the first text string from the first character of the second text string.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The search is case sensitive.\n',summary:"<p> Locate one text string within a second text string, and return the number of the\n starting position of the first text string from the first character of the second text string.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"find_text",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> text you want to find.</div>'},{name:"within_text",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> text in which you want to search for $find_text.</div>'},{name:"start_num",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> specifies the character at which to start the search.</div>'}],returns:{type:"xs:integer?",description:'Locate one text string within a second text string, and return the number of the starting position of the first text string from the first character of the second text string.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/> The search is case sensitive.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value the value is not greater than zero or is greater than the length of within_text.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value value was not found.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"fixed",qname:"excel-text:fixed",signature:"($number as xs:decimal, $decimals as xs:decimal) as xs:string",description:" Rounds a number to the specified number of decimals, formats the number in\n decimal format using a period and commas, and returns the result as text.\n",summary:"<p> Rounds a number to the specified number of decimals, formats the number in\n decimal format using a period and commas, and returns the result as text.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"number",type:"xs:decimal",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is the number you want to round and convert to text.</div>'},{name:"decimals",type:"xs:decimal",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is the number of digits to the right of the decimal point.</div>'}],returns:{type:"xs:string",description:"Rounds a number to the specified number of decimals, formats the number in decimal format using a period and commas, and returns the result as text."},errors:[]},{isDocumented:!0,arity:3,name:"fixed",qname:"excel-text:fixed",signature:"($number as xs:decimal, $decimals as xs:decimal, $no_commas as xs:boolean) as xs:string",description:" Rounds a number to the specified number of decimals, formats the number in\ndecimal format using a period and commas, and returns the result as text.\n",summary:"<p> Rounds a number to the specified number of decimals, formats the number in\ndecimal format using a period and commas, and returns the result as text.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"number",type:"xs:decimal",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is the number you want to round and convert to text.</div>'},{name:"decimals",type:"xs:decimal",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is the number of digits to the right of the decimal point.</div>'},{name:"no_commas",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is a logical value that, if TRUE, prevents FIXED from including commas in the returned text.</div>'}],returns:{type:"xs:string",description:"Rounds a number to the specified number of decimals, formats the number in decimal format using a period and commas, and returns the result as text."},errors:[]},{isDocumented:!0,arity:1,name:"left",qname:"excel-text:left",signature:"($arg as xs:string) as xs:string",description:" Returns the first character in a text string.\n",summary:"<p> Returns the first character in a text string.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is the text string that contains the characters you want to extract.</div>'}],returns:{type:"xs:string",description:"The first character in a text string."},errors:[]},{isDocumented:!0,arity:2,name:"left",qname:"excel-text:left",signature:"($text as xs:string, $num_chars as xs:integer) as xs:string",description:" Returns the first character or characters in $text, based on the number of $num_chars you specify.\n",summary:"<p> Returns the first character or characters in $text, based on the number of $num_chars you specify.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"text",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is the text string that contains the characters you want to extract.</div>'},{name:"num_chars",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> specifies the number of characters you want to extract.</div>'}],returns:{type:"xs:string",description:"The first character or characters in $text, based on the number of $num_chars you specify."},errors:[]},{isDocumented:!0,arity:1,name:"len",qname:"excel-text:len",signature:"($arg as xs:string?) as xs:integer",description:" Returns the number of characters in a text string.\n",summary:"<p> Returns the number of characters in a text string.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the string.</div>'}],returns:{type:"xs:integer",description:"The number of characters in a text string."},errors:[]},{isDocumented:!0,arity:1,name:"lower",qname:"excel-text:lower",signature:"($arg as xs:string?) as xs:string?",description:" Converts all uppercase letters in a text string to lowercase.\n",summary:"<p> Converts all uppercase letters in a text string to lowercase.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the string.</div>'}],returns:{type:"xs:string?",description:"Converts all uppercase letters in a text string to lowercase."},errors:[]},{isDocumented:!0,arity:3,name:"mid",qname:"excel-text:mid",signature:"($text as xs:string?, $start_num as xs:integer, $num_chars as xs:integer) as xs:string?",description:" Returns a specific number of characters from a text string, starting at\nthe position you specify, based on the number of characters you specify.\n",summary:"<p> Returns a specific number of characters from a text string, starting at\nthe position you specify, based on the number of characters you specify.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"text",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the text string containing the characters you want to extract.</div>'},{name:"start_num",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the position of the first character you want to extract in text. The first character in text has start_num 1, and so on.</div>'},{name:"num_chars",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number of characters you want to return from text.</div>'}],returns:{type:"xs:string?",description:"A specific number of characters from a text string, starting at the position you specify, based on the number of characters you specify."},errors:[]},{isDocumented:!0,arity:3,name:"pad-integer-to-length",qname:"excel-text:pad-integer-to-length",signature:"($toPad as xs:anyAtomicType?, $padChar as xs:string, $length as xs:integer) as xs:string",description:" Returns $toPad appended with enough repetitions of $padChar to make its length $length, the characters are added before the string.\n",summary:"<p> Returns $toPad appended with enough repetitions of $padChar to make its length $length, the characters are added before the string.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"toPad",type:"xs:anyAtomicType",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the value to be padded.</div>'},{name:"padChar",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the character used for padding.</div>'},{name:"length",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the desired length.</div>'}],returns:{type:"xs:string",description:"$toPad appended with enough repetitions of $padChar to make its length $length, the characters are added before the string."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the length of the $toPad is greater than the desired length.</xqdoc:error>']},{isDocumented:!0,arity:4,name:"replace",qname:"excel-text:replace",signature:"($old_text as xs:string?, $start_num as xs:integer, $num_chars as xs:integer, $new_text as xs:string) as xs:string",description:" Replaces part of a text string, based on the number of characters you specify, with a different text string.\n",summary:"<p> Replaces part of a text string, based on the number of characters you specify, with a different text string.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"old_text",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is text in which you want to replace some characters.</div>'},{name:"start_num",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the position of the character in old_text that you want to replace with new_text.</div>'},{name:"num_chars",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number of characters in old_text that you want REPLACE to replace with new_text.</div>'},{name:"new_text",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the text that will replace characters in old_text.</div>'}],returns:{type:"xs:string",description:"Replaces part of a text string, based on the number of characters you specify, with a different text string."},errors:[]},{isDocumented:!0,arity:1,name:"right",qname:"excel-text:right",signature:"($arg as xs:string) as xs:string",description:" Returns the last character in a text string.\n",summary:"<p> Returns the last character in a text string.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the text string containing the characters you want to extract.</div>'}],returns:{type:"xs:string",description:"The last character in a text string."},errors:[]},{isDocumented:!0,arity:2,name:"right",qname:"excel-text:right",signature:"($text as xs:string, $num_chars as xs:integer) as xs:string",description:" Returns the last character or characters in a text string, based on the number of characters you specify.\n",summary:"<p> Returns the last character or characters in a text string, based on the number of characters you specify.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"text",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the text string containing the characters you want to extract.</div>'},{name:"num_chars",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> specifies the number of characters you want RIGHT to extract.</div>'}],returns:{type:"xs:string",description:"The last character or characters in a text string, based on the number of characters you specify."},errors:[]},{isDocumented:!0,arity:2,name:"search",qname:"excel-text:search",signature:"($find_text as xs:string, $within_text as xs:string) as xs:integer?",description:' Locate one text string within a second text string, and return the number of\n the starting position of the first text string from the first character of the\n second text string. <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/> The search starts at position 1, and it is not case sensitive.\n',summary:"<p> Locate one text string within a second text string, and return the number of\n the starting position of the first text string from the first character of the\n second text string.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"find_text",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> text you want to find.</div>'},{name:"within_text",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> text in which you want to search for $find_text.</div>'}],returns:{type:"xs:integer?",description:'Locate one text string within a second text string, and return the number of the starting position of the first text string from the first character of the second text string. <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/> The search starts at position 1, and it is not case sensitive.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value the value is not greater than zero or is greater than the length of within_text.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value value was not found.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"search",qname:"excel-text:search",signature:"($find_text as xs:string, $within_text as xs:string, $start_num as xs:integer) as xs:integer?",description:' Locate one text string within a second text string, and return the number of\n the starting position of the first text string from the first character of the\n second text string.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/> The search starts at $start_num, and it is not case sensitive.\n',summary:"<p> Locate one text string within a second text string, and return the number of\n the starting position of the first text string from the first character of the\n second text string.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"find_text",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> text you want to find.</div>'},{name:"within_text",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> text in which you want to search for $find_text.</div>'},{name:"start_num",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the character number in within_text at which you want to start searching.</div>'}],returns:{type:"xs:integer?",description:'Locate one text string within a second text string, and return the number of the starting position of the first text string from the first character of the second text string.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/> The search starts at $start_num, and it is not case sensitive.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value the value is not greater than zero or is greater than the length of within_text.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value value was not found.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"substitute",qname:"excel-text:substitute",signature:"($text as xs:string, $old_text as xs:string, $new_text as xs:string) as xs:string?",description:" Substitutes new_text for old_text in a text string. Every occurrence of old_text in text is changed to new_text.\n",summary:"<p> Substitutes new_text for old_text in a text string.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"text",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the text or the reference to a cell containing text for which you want to substitute characters.</div>'},{name:"old_text",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> text you want to replace.</div>'},{name:"new_text",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> text you want to replace old_text with.</div>'}],returns:{type:"xs:string?",description:"Substitutes new_text for old_text in a text string. Every occurrence of old_text in text is changed to new_text."},errors:[]},{isDocumented:!0,arity:4,name:"substitute",qname:"excel-text:substitute",signature:"($text as xs:string, $old_text as xs:string, $new_text as xs:string, $instance_num as xs:integer?) as xs:string",description:" Substitutes new_text for old_text in a text string.\n",summary:"<p> Substitutes new_text for old_text in a text string.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"text",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the text or the reference to a cell containing text for which you want to substitute characters.</div>'},{name:"old_text",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> text you want to replace.</div>'},{name:"new_text",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> text you want to replace old_text with.</div>'},{name:"instance_num",type:"xs:integer",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> specifies which occurrence of old_text you want to replace with new_text. <p/> Only that instance of old_text is replaced.</div>'}],returns:{type:"xs:string",description:'Substitutes new_text for old_text in a text string. <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/> Use SUBSTITUTE when you want to replace specific text in a text string; use REPLACE when you want to replace any text that occurs in a specific location in a text string.'},errors:[]},{isDocumented:!0,arity:1,name:"t",qname:"excel-text:t",signature:"($value as xs:anyAtomicType?) as xs:string",description:" Converts the $value to string.\n",summary:"<p> Converts the $value to string.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"value",type:"xs:anyAtomicType",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the value</div>'}],returns:{type:"xs:string",description:"Converts the $value to string."},errors:[]},{isDocumented:!0,arity:1,name:"trim",qname:"excel-text:trim",signature:"($text as xs:string?) as xs:string?",description:" Removes all spaces from text except for single spaces between words.\n",summary:"<p> Removes all spaces from text except for single spaces between words.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"text",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> from which you want spaces removed.</div>'}],returns:{type:"xs:string?",description:"Removes all spaces from text except for single spaces between words."},errors:[]},{isDocumented:!0,arity:1,name:"upper",qname:"excel-text:upper",signature:"($text as xs:string?) as xs:string?",description:" Converts text to uppercase.\n",summary:"<p> Converts text to uppercase.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"text",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> text you want converted to uppercase.</div>'}],returns:{type:"xs:string?",description:"Converts text to uppercase."},errors:[]},{isDocumented:!0,arity:2,name:"value-except",qname:"excel-text:value-except",signature:"($arg1 as xs:anyAtomicType*, $arg2 as xs:anyAtomicType*) as xs:anyAtomicType*",description:" Returns the values in one sequence that do not appear in the second sequence in an implementation-defined order.\n",summary:"<p> Returns the values in one sequence that do not appear in the second sequence in an implementation-defined order.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg1",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the first sequence.</div>'},{name:"arg2",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the second sequence.</div>'}],returns:{type:"xs:anyAtomicType*",description:"The values in one sequence that do not appear in the second sequence in an implementation-defined order."},errors:[]},{isDocumented:!0,arity:1,name:"value",qname:"excel-text:value",signature:"($arg as xs:anyAtomicType?) as xs:anyAtomicType?",description:" Converts a text string that represents a number to a number.\n",summary:"<p> Converts a text string that represents a number to a number.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:anyAtomicType",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the value.</div>'}],returns:{type:"xs:anyAtomicType?",description:"Converts a text string that represents a number to a number."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value provided value is not a number.</xqdoc:error>']}],variables:[]},"http://www.28msec.com/modules/http/response":{ns:"http://www.28msec.com/modules/http/response",description:' The Sausalito response module can be used to modify the HTTP response\n that will be send as a result of this request. For example, the\n <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">set-content-type</tt> function can be used to set the Content-Type\n header and determine the encoding of data in the response.\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">28msec</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://www.28msec.com/modules/http/response",prefix:"http"},{uri:"http://www.w3.org/2010/xslt-xquery-serialization",prefix:"output"},{uri:"http://www.28msec.com/modules/http/response",prefix:"resp"},{uri:"http://zorba.io/modules/schema",prefix:"s"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"code-for-status",qname:"resp:code-for-status",signature:"($status as xs:QName) as xs:int",description:" Convert between the HTTP status code as QName and\n the integer value of that status code.\n",summary:"<p> Convert between the HTTP status code as QName and\n the integer value of that status code.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"status",type:"xs:QName",occurrence:null,description:""}],returns:{type:"xs:int",description:"the integer value of the given QName as xs:int"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:invalid-status if the given QName does not represent a valid http status code</xqdoc:error>']},{isDocumented:!0,arity:1,name:"content-type-binary",qname:"resp:content-type-binary",signature:"($type as xs:string) as xs:boolean external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Test if a given content-type is a binary content-type. A\n content-type is considered to be binary if it\'s not a text\n content-type.</p>\n',summary:"<p>  Test if a given content-type is a binary content-type.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"type",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the content-type to test.</div>'}],returns:{type:"xs:boolean",description:"true if the given content-type is a binary content-type, false otherwise."},errors:[]},{isDocumented:!0,arity:1,name:"content-type-html",qname:"resp:content-type-html",signature:"($type as xs:string) as xs:boolean external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Test if a given content-type is a HTML content-type, i.e.\n the content-type is the string "text/html".</p>\n',summary:"<p>  Test if a given content-type is a HTML content-type, i.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"type",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the content-type to test.</div>'}],returns:{type:"xs:boolean",description:"true if the given content-type is the HTML content-type, false otherwise."},errors:[]},{isDocumented:!0,arity:1,name:"content-type-json",qname:"resp:content-type-json",signature:"($type as xs:string) as xs:boolean external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Test if a given content-type is a JSON content-type, i.e.\n the content-type is the string "application/json".</p>\n',summary:"<p>  Test if a given content-type is a JSON content-type, i.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"type",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the content-type to test.</div>'}],returns:{type:"xs:boolean",description:"true if the given content-type is the JSON content-type, false otherwise."},errors:[]},{isDocumented:!0,arity:1,name:"content-type-mixed-json-xml",qname:"resp:content-type-mixed-json-xml",signature:"($type as xs:string) as xs:boolean external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Test if a given content-type is a mixed JSON-XML content-type, i.e.\n the content-type is the string "application/mixed-json-xml".</p>\n',summary:"<p>  Test if a given content-type is a mixed JSON-XML content-type, i.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"type",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the content-type to test.</div>'}],returns:{type:"xs:boolean",description:"true if the given content-type is a mixed JSON-XML content-type, false otherwise."},errors:[]},{isDocumented:!0,arity:1,name:"content-type-text",qname:"resp:content-type-text",signature:"($type as xs:string) as xs:boolean external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Test if a given content-type is a text content-type.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">A text content-type starts with "text/" or contains either of\n the strings "xml" or "json".</p>\n',summary:"<p>  Test if a given content-type is a text content-type.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"type",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the content-type to test.</div>'}],returns:{type:"xs:boolean",description:"true if the given content-type is a text content-type, false otherwise."},errors:[]},{isDocumented:!0,arity:1,name:"content-type-xhtml",qname:"resp:content-type-xhtml",signature:"($type as xs:string) as xs:boolean external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Test if a given content-type is a XHTML content-type, i.e.\n the content-type is the string "application/xhtml+xml".</p>\n',summary:"<p>  Test if a given content-type is a XHTML content-type, i.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"type",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the content-type to test.</div>'}],returns:{type:"xs:boolean",description:"true if the given content-type is the XHTML content-type, false otherwise."},errors:[]},{isDocumented:!0,arity:1,name:"content-type-xml",qname:"resp:content-type-xml",signature:"($type as xs:string) as xs:boolean external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Test if a given content-type is a XML content-type</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">A XML content-type is a content-type that is "application/xml"\n or ends : with the string "+xml".</p>\n',summary:'<p>  Test if a given content-type is a XML content-type \n  A XML content-type is a content-type that is "application/xml"\n or ends : with the string "+xml".</p>',annotation_str:"",annotations:[],updating:!1,parameters:[{name:"type",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the content-type to test.</div>'}],returns:{type:"xs:boolean",description:"true if the given content-type is a XML content-type, false otherwise."},errors:[]},{isDocumented:!0,arity:0,name:"decode-binary",qname:"resp:decode-binary",signature:"() as xs:boolean external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the boolean indiciating whether base64Binaries returned by\n this request will be decoded.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The default if not modified using resp:set-decode-binary is false.</p>\n',summary:"<p>  Returns the boolean indiciating whether base64Binaries returned by\n this request will be decoded.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[],returns:{type:"xs:boolean",description:"the said boolean value"},errors:[]},{isDocumented:!0,arity:1,name:"message-for-status",qname:"resp:message-for-status",signature:"($status as xs:QName) as xs:string",description:" Convert between the HTTP status code as QName and\n the name/message of that status code.\n",summary:"<p> Convert between the HTTP status code as QName and\n the name/message of that status code.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"status",type:"xs:QName",occurrence:null,description:""}],returns:{type:"xs:string",description:"the message of the given QName as xs:string"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:invalid-status if the given QName does not represent a valid http status code</xqdoc:error>']},{isDocumented:!0,arity:0,name:"serialization-parameters",qname:"resp:serialization-parameters",signature:"() as element(output:serialization-parameters)",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the serialization parameters that are currently\n active, i.e. the ones that will be used to serialize the result\n of this request.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This will either be the default, the defaults set when\n calling resp:set-content-type(), or the ones set by\n resp:set-serialization-parameters().</p>\n',summary:"<p>  Returns the serialization parameters that are currently\n active, i.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"element(output:serialization-parameters)",description:"the said serialization parameters"},errors:[]},{isDocumented:!0,arity:0,name:"serializer-defaults-html",qname:"resp:serializer-defaults-html",signature:"() as element(*)*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns an element that can be used to specify the\n settings of serialization parameters for the HTML serialization\n method.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The defaults are\n <ul>\n  <li>encoding: UTF-8</li>\n  <li>indent: yes</li>\n  <li>version: 4.01</li>\n  <li>doctype-system: http://www.w3.org/TR/html4/loose.dtd</li>\n  <li>doctype-public: -//W3C//DTD HTML 4.01 Transitional//EN</li>\n  <li>include-content-type: yes</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example, those defaults are used when setting\n the content-type to some HTML content-type (i.e. text/html).</p>\n',summary:"<p>  Returns an element that can be used to specify the\n settings of serialization parameters for the HTML serialization\n method.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"element(*)*",description:"an element that can be used to specify the above serialization parameters."},errors:[]},{isDocumented:!0,arity:0,name:"serializer-defaults-json-xml-hybrid",qname:"resp:serializer-defaults-json-xml-hybrid",signature:"() as element(output:serialization-parameters)",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns an element that can be used to specify the\n settings of serialization parameters for the json-xml-hybrid\n serialization method.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The defaults are\n <ul>\n  <li>encoding: UTF-8</li>\n  <li>indent: yes</li>\n  <li>method: json-xml-hybrid</li>\n  <li>omit-xml-declaration: yes</li>\n  <li>version: 1.0</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example, those defaults are used when setting\n the content-type to application/mixed-json-xml.</p>\n',summary:"<p>  Returns an element that can be used to specify the\n settings of serialization parameters for the json-xml-hybrid\n serialization method.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"element(output:serialization-parameters)",description:"an element that can be used to specify the above serialization parameters."},errors:[]},{isDocumented:!0,arity:0,name:"serializer-defaults-json",qname:"resp:serializer-defaults-json",signature:"() as element(output:serialization-parameters)",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns an element that can be used to specify the\n settings of serialization parameters for the json\n serialization method.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The defaults are\n <ul>\n  <li>encoding: UTF-8</li>\n  <li>indent: yes</li>\n  <li>method: json</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example, those defaults are used when setting\n the content-type to some JSON content-type (e.g. application/json).</p>\n',summary:"<p>  Returns an element that can be used to specify the\n settings of serialization parameters for the json\n serialization method.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"element(output:serialization-parameters)",description:"an element that can be used to specify the above serialization parameters."},errors:[]},{isDocumented:!0,arity:0,name:"serializer-defaults-text",qname:"resp:serializer-defaults-text",signature:"() as element(*)*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns an element that can be used to specify the\n settings of serialization parameters for the text serialization\n method.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The only default used is\n <ul>\n  <li>encoding: UTF-8</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example, this default is used when setting\n the content-type to some text content-type (e.g. text/plain).</p>\n',summary:"<p>  Returns an element that can be used to specify the\n settings of serialization parameters for the text serialization\n method.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"element(*)*",description:"an element that can be used to specify the above serialization parameters."},errors:[]},{isDocumented:!0,arity:0,name:"serializer-defaults-xhtml",qname:"resp:serializer-defaults-xhtml",signature:"() as element(*)*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns an element that can be used to specify the\n settings of serialization parameters for the XHTML serialization\n method.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The defaults are\n <ul>\n  <li>encoding: UTF-8</li>\n  <li>indent: yes</li>\n  <li>omit-xml-declaration: yes</li>\n  <li>version: 1.0</li>\n  <li>doctype-system: http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</li>\n  <li>doctype-public: -//W3C//DTD XHTML 1.0 Transitional//EN</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example, those defaults are used when setting\n the content-type to some XHTML content-type (i.e. application/xhtml+xml).</p>\n',summary:"<p>  Returns an element that can be used to specify the\n settings of serialization parameters for the XHTML serialization\n method.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"element(*)*",description:"an element that can be used to specify the above serialization parameters."},errors:[]},{isDocumented:!0,arity:0,name:"serializer-defaults-xml",qname:"resp:serializer-defaults-xml",signature:"() as element(output:serialization-parameters)",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns an element that can be used to specify the\n settings of serialization parameters for the XML serialization\n method.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The defaults are\n <ul>\n  <li>encoding: UTF-8</li>\n  <li>indent: yes</li>\n  <li>omit-xml-declaration: yes</li>\n  <li>version: 1.0</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example, those defaults are used when setting\n the content-type to some XML content-type (e.g. application/atom+xml).</p>\n',summary:"<p>  Returns an element that can be used to specify the\n settings of serialization parameters for the XML serialization\n method.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"element(output:serialization-parameters)",description:"an element that can be used to specify the above serialization parameters."},errors:[]},{isDocumented:!0,arity:1,name:"set-content-type",qname:"resp:set-content-type",signature:"($type as xs:string) as empty-sequence()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Sets the Content-Type header for the response.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n For example,\n <tt>resp:set-content-type("text/plain")</tt> will cause the\n header\n <tt>Content-Type: text/plain</tt> to be added for the response.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">In addtion to setting the Content-Type header, the function also\n sets the serialization parameters to the default values for serialization\n method for the given content-type. For example, if the content-type is set to\n text/plain, the default serialization parameters for the text\n serialization method will be used. For application/atom+xml, the default\n serialization parameters for the XML serialization method will be used.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The functions resp:content-type-text/xml/html/xhtml/binary may be used\n to figure out which serialization method will be used for a specific\n content-type.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If the given content-type contains a charset declaration (e.g.\n <tt>resp:set-content-type("text/plain;charset=ISO-8859-1")</tt>), the\n content of the response will be transcoded to the given encoding.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The default serialization parameters set by this function can\n be overwritten using the resp:set-serialization-parameters() function.</p>\n',summary:"<p>  Sets the Content-Type header for the response.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"type",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the content-type to be set</div>'}],returns:{type:"empty-sequence()",description:"the function is sequential and returns the empty sequence"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:invalid-encoding if the given encoding is invalid or not supported.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"set-content-type",qname:"resp:set-content-type",signature:"($type as xs:string, $params as element(output:serialization-parameters)) as empty-sequence()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Sets the Content-Type header for the response.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <tt>resp:set-content-type("text/plain")</tt> will cause the\n header\n <tt>Content-Type: text/plain</tt> to be added for the response.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">In addition to the content-type, the function also allows to\n specify the serialization method and parameters that will be used\n for serializing the result. For details about this parameter, please\n refer to resp:set-serialization-parameters().</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If the given content-type contains a charset declaration (e.g.\n <tt>resp:set-content-type("text/plain;charset=ISO-8859-1")</tt>), the\n content of the response will be transcoded to the given encoding.\n If the serialization parameters also contain a charset declaration,\n the charset contained in the content-type will be used. to transcode\n the result.</p>\n',summary:"<p>  Sets the Content-Type header for the response.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"type",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the content-type to be set</div>'},{name:"params",type:"element(output:serialization-parameters)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the serialization parameters that will be used for serialization the result.</div>'}],returns:{type:"empty-sequence()",description:"the function is sequential and returns the empty sequence"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:invalid-encoding if the given encoding is invalid or not supported.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"set-decode-binary",qname:"resp:set-decode-binary",signature:"($decode as xs:boolean) as empty-sequence() external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If this function is invoked with true, the result of the request\n will not be serialized. Instead, the result will be the binary values\n of any item that is of type xs:base64Binary. The values of all other\n items will not be part of the result.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Please note that all serialization parameters which have been set using\n resp:set-serialization-parameters will be ignored. Also, the output encoding\n is ignored for binaries.</p>\n',summary:"<p>  If this function is invoked with true, the result of the request\n will not be serialized.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"decode",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> boolean value indicating whether base64Binaries should be decoded.</div>'}],returns:{type:"empty-sequence()",description:"the function is sequential and returns the empty sequence."},errors:[]},{isDocumented:!0,arity:1,name:"set-encoding",qname:"resp:set-encoding",signature:"($encoding as xs:string) as empty-sequence() external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function sets the output encoding that will be\n used for the payload of the response.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <tt>resp:set-encoding("ISO-8859-1")</tt> will cause the\n content in the response to be encoded using ISO-8859-1.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Please note that the encoding only applies to textual data.\n It is not used if the function <tt>set-decode-binary()</tt>\n was invoked passing true as parameter.</p>\n',summary:"<p>  The function sets the output encoding that will be\n used for the payload of the response.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"encoding",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the encoding to be used for the payload of the response.</div>'}],returns:{type:"empty-sequence()",description:"the function is sequential and returns the empty sequence"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:invalid-encoding if the given encoding is invalid or not supported.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"set-header-impl",qname:"resp:set-header-impl",signature:"($name as xs:string, $value as xs:string) as xs:string? external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Set an HTTP header in the response.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is only used for internal purposes and should\n not be called by the user.</p>\n',summary:"<p>  Set an HTTP header in the response.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name for the header to set</div>'},{name:"value",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the value for the header to set</div>'}],returns:{type:"xs:string?",description:"the value of the header previously set or the empty sequence if no header has been set with the same name."},errors:[]},{isDocumented:!0,arity:2,name:"set-header",qname:"resp:set-header",signature:"($name as xs:string, $value as xs:string) as xs:string?",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Set a HTTP header in the response.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If a header with the same name was already set, the\n value is overwritten and the function returns the old value. As defined\n in the HTTP specification, multiple headers with the same name\n can be combined into one header whose value is a comma-separated\n list of the values.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The following headers must not be set using this function.\n Instead, other functions of this module should be used in order\n to implemented the required semantics:\n <ul>\n   <li>Status: use set-status() instead</li>\n   <li>Content-Type: use set-content-type() instead</li>\n </ul>\n </p>\n',summary:"<p>  Set a HTTP header in the response.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the header to set</div>'},{name:"value",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the value of the header to set `</div>'}],returns:{type:"xs:string?",description:"the value of the header previously set or the empty sequence if no header has been set with the same name."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">resp:invalid-header-name if an invalid name is used for the header.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"set-redirect",qname:"resp:set-redirect",signature:"($url as xs:string) as empty-sequence()",description:" This function sets the HTTP 302 redirect status code in the response. As\n a result, a redirect to the URL given as parameter will be made.\n",summary:"<p> This function sets the HTTP 302 redirect status code in the response.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The URL to which the redirect will be made.</div>'}],returns:{type:"empty-sequence()",description:"The empty-sequence is returned."},errors:[]},{isDocumented:!0,arity:1,name:"set-serialization-parameters",qname:"resp:set-serialization-parameters",signature:"($params as element(output:serialization-parameters)) as empty-sequence()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Set the serialization parameters used for serializing the result\n of the request.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The following example shows how to set several options\n for the HTML serialization method. Specifically, it sets the\n HTML method to HTML 4.01, set the doctype-system and\n doctype-public makes sure that the output is indented. In addition,\n the output is UTF-8 encoded and\n <pre>\n &lt;output:serialization-parameters&gt;\n   &lt;output:encoding value="UTF-8"/&gt;\n   &lt;output:doctype-system value="http://www.w3.org/TR/html4/loose.dtd"/&gt;\n   &lt;output:doctype-public value="-//W3C//DTD HTML 4.01 Transitional//EN"/&gt;\n &lt;/output:serialization-parameters&gt;\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The element passed as parameter need to be valid according\n to the schema http://www.w3.org/2010/xslt-xquery-serialization. This\n function validates its input (if it has not already been validated)\n and may raise an error if the input is not valid.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Please note that serialization options set by this function can\n be overwritten by a subsequent call to resp:set-content-type. In this\n case, the options will be reset to the default for the given\n content-type. Also note, that the output encoding can be overwritten\n by subsequently calling the resp:set-encoding function.</p>\n',summary:"<p>  Set the serialization parameters used for serializing the result\n of the request.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"params",type:"element(output:serialization-parameters)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the serialization parameters that will be used to serialize the result of the request</div>'}],returns:{type:"empty-sequence()",description:"the function is sequential and, on success, returns the empty sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XQDY0027 if the input is not valid according to the schema http://www.w3.org/2010/xslt-xquery-serialization.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:invalid-encoding if the encoding specified in the serialization options is invalid or not supported.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"set-status-code",qname:"resp:set-status-code",signature:"($status as xs:integer) as empty-sequence() external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Sets the status code of the HTTP response to the integer given as\n parameter.</p>\n For example,\n <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">resp:set-status(204)</tt>\n will result in "HTTP/1.1 204 No Content".\n',summary:"<p>  Sets the status code of the HTTP response to the integer given as\n parameter.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"status",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The status code of the HTTP response as integer.</div>'}],returns:{type:"empty-sequence()",description:"On success, the empty-sequence is returned"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:invalid-status-code if the given integer does not reflect a valid HTTP status code</xqdoc:error>']},{isDocumented:!0,arity:1,name:"set-status",qname:"resp:set-status",signature:"($status as xs:QName) as empty-sequence()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Sets the status code of the HTTP response to the QName given as\n parameter.</p>\n For example,\n <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">resp:set-status($http:no-content)</tt>\n will result in "HTTP/1.1 204 No Content".\n',summary:"<p>  Sets the status code of the HTTP response to the QName given as\n parameter.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"status",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The status code of the HTTP response as a QName (e.g. $http:no-content)</div>'}],returns:{type:"empty-sequence()",description:"On success, the empty-sequence is returned"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:invalid-status if the given QName does not represent a valid HTTP status code;</xqdoc:error>']},{isDocumented:!0,arity:1,name:"valid-status",qname:"resp:valid-status",signature:"($status as xs:QName) as xs:boolean",description:" Test whether the given QName refers to a valid HTTP status code.\n",summary:"<p> Test whether the given QName refers to a valid HTTP status code.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"status",type:"xs:QName",occurrence:null,description:""}],returns:{type:"xs:boolean",description:"true if the given QName refers to a valid HTTP status code, false otherwise."},errors:[]}],variables:[{name:"http:precondition-required",type:"xs:QName",description:" QName representing the HTTP Status Code 428 Precondition Required (RFC 6585)\n"},{name:"http:gone",type:"xs:QName",description:" QName representing the HTTP Status Code 410 GONE\n"},{name:"http:length-required",type:"xs:QName",description:" QName representing the HTTP Status Code 411 Length Required\n"},{name:"http:precondition-failed",type:"xs:QName",description:" QName representing the HTTP Status Code 412 Precondition Failed\n"},{name:"http:request-entity-too-large",type:"xs:QName",description:" QName representing the HTTP Status Code 413 Request Entity Too Large\n"},{name:"http:request-entity-too-long",type:"xs:QName",description:" QName representing the HTTP Status Code 414 Request Entity Too Long\n"},{name:"http:unsupported-media-type",type:"xs:QName",description:" QName representing the HTTP Status Code 415 Unsupported Media Type\n"},{name:"http:request-range-not-satisfiable",type:"xs:QName",description:" QName representing the HTTP Status Code 416 Request Range Not Satisfiable\n"},{name:"http:expectation-failed",type:"xs:QName",description:" QName representing the HTTP Status Code 417 Expectation Failed\n"},{name:"http:im-a-teapot",type:"xs:QName",description:" QName representing the HTTP Status Code 418 I'm a teapot (RFC 2324)\n"},{name:"http:enhance-your-calm",type:"xs:QName",description:" QName representing the HTTP Status Code 420 Enhance Your Calm\n"},{name:"http:unprocessable-entity",type:"xs:QName",description:" QName representing the HTTP Status Code 422 Unprocessable Entity (WebDAV; RFC 4918)\n"},{name:"http:locked",type:"xs:QName",description:" QName representing the HTTP Status Code 423 Locked (WebDAV; RFC 4918)\n"},{name:"http:failed-dependency",type:"xs:QName",description:" QName representing the HTTP Status Code 424 Failed Dependency (WebDAV; RFC 4918)\n"},{name:"http:unordered-collection",type:"xs:QName",description:" QName representing the HTTP Status Code 425 Unordered Collection\n"},{name:"http:upgrade-required",type:"xs:QName",description:" QName representing the HTTP Status Code 426 Upgrade Required\n"},{name:"http:conflict",type:"xs:QName",description:" QName representing the HTTP Status Code 409 Conflict\n"},{name:"http:too-many-requests",type:"xs:QName",description:" QName representing the HTTP Status Code 429 Too Many Requests (RFC 6585)\n"},{name:"http:request-header-fields-too-large",type:"xs:QName",description:" QName representing the HTTP Status Code 431 Request Header Fields Too Large (RFC 6585)\n"},{name:"http:internal-server-error",type:"xs:QName",description:" QName representing the HTTP Status Code 500 Internal Server Error\n"},{name:"http:not-implemented",type:"xs:QName",description:" QName representing the HTTP Status Code 501 Not Implemented\n"},{name:"http:bad-gateway",type:"xs:QName",description:" QName representing the HTTP Status Code 502 Bad Gateway\n"},{name:"http:service-unavailable",type:"xs:QName",description:" QName representing the HTTP Status Code 503 Service Unavailable\n"},{name:"http:gateway-timeout",type:"xs:QName",description:" QName representing the HTTP Status Code 504 Gateway Timeout\n"},{name:"http:http-version-not-supported",type:"xs:QName",description:" QName representing the HTTP Status Code 505 HTTP Version Not Supported\n"},{name:"http:variant-also-negotiates",type:"xs:QName",description:" QName representing the HTTP Status Code 506 Variant Also Negotiates (RFC 2295)\n"},{name:"http:insufficient-storage",type:"xs:QName",description:" QName representing the HTTP Status Code 507 Insufficient Storage (WebDAV; RFC 4918)\n"},{name:"http:loop-detected",type:"xs:QName",description:" QName representing the HTTP status code 508 Loop Detected (webdav; rfc 5842)\n"},{name:"http:not-extended",type:"xs:QName",description:" QName representing the HTTP status code 510 Not Extended (RFC 2774)\n"},{name:"http:network-authentication-required",type:"xs:QName",description:" QName representing the HTTP status code 511 Network Authentication Required (RFC 6585)\n"},{name:"resp:status-info",type:"item()*",description:" Variable containing a description for all the HTTP Status Codes\n"},{name:"http:see-other",type:"xs:QName",description:" QName representing the HTTP Status Code 303 See Other\n"},{name:"http:switching-protocols",type:"xs:QName",description:" QName representing the HTTP Status Code 101 Switching Protocols\n"},{name:"http:processing",type:"xs:QName",description:" QName representing the HTTP Status Code 102 Processing (Web; RFC 2518)\n"},{name:"http:ok",type:"xs:QName",description:" QName representing the HTTP Status Code 200 OK\n"},{name:"http:created",type:"xs:QName",description:" QName representing the HTTP Status Code 201 Created\n"},{name:"http:accepted",type:"xs:QName",description:" QName representing the HTTP Status Code 202 Accepted\n"},{name:"http:non-authoritative",type:"xs:QName",description:" QName representing the HTTP Status Code 203 Non-Authoritative\n"},{name:"http:no-content",type:"xs:QName",description:" QName representing the HTTP Status Code 204 No Content\n"},{name:"http:reset-content",type:"xs:QName",description:" QName representing the HTTP Status Code 205 Reset Content\n"},{name:"http:partial-content",type:"xs:QName",description:" QName representing the HTTP Status Code 206 Partial Content\n"},{name:"http:multi-status",type:"xs:QName",description:" QName representing the HTTP Status Code 207 Multi-Status (WebDAV; RFC 5842)\n"},{name:"http:already-reported",type:"xs:QName",description:" QName representing the HTTP Status Code 208 Already Reported (WebDAV; RFC 5842)\n"},{name:"http:im-used",type:"xs:QName",description:" QName representing the HTTP Status Code 226 IM Used (RFC 3229)\n"},{name:"http:multiple-choices",type:"xs:QName",description:" QName representing the HTTP Status Code 300 Multiple Choices\n"},{name:"http:moved-permanently",type:"xs:QName",description:" QName representing the HTTP Status Code 301 Moved Permantently\n"},{name:"http:found",type:"xs:QName",description:" QName representing the HTTP Status Code 302 Found\n"},{name:"http:continue",type:"xs:QName",description:" QName representing the HTTP Status Code 100 Continue\n"},{name:"http:not-modified",type:"xs:QName",description:" QName representing the HTTP Status Code 304 Not Modified\n"},{name:"http:use-proxy",type:"xs:QName",description:" QName representing the HTTP Status Code 305 Use Proxy\n"},{name:"http:switch-proxy",type:"xs:QName",description:" QName representing the HTTP Status Code 306 Switch Proxy\n"},{name:"http:temporary-redirect",type:"xs:QName",description:" QName representing the HTTP Status Code 307 Temporary Redirect\n"},{name:"http:permanent-redirect",type:"xs:QName",description:" QName representing the HTTP Status Code 308 Permanent Redirect (http://tools.ietf.org/html/draft-reschke-http-status-308-07)\n"},{name:"http:bad-request",type:"xs:QName",description:" QName representing the HTTP Status Code 400 Bad Request\n"},{name:"http:unauthorized",type:"xs:QName",description:" QName representing the HTTP Status Code 401 Unauthorized\n"},{name:"http:payment-required",type:"xs:QName",description:" QName representing the HTTP Status Code 402 Payment Required\n"},{name:"http:forbidden",type:"xs:QName",description:" QName representing the HTTP Status Code 403 Forbidden\n"},{name:"http:not-found",type:"xs:QName",description:" QName representing the HTTP Status Code 404 Not Found\n"},{name:"http:not-allowed",type:"xs:QName",description:" QName representing the HTTP Status Code 405 Not Allowed\n"},{name:"http:not-acceptable",type:"xs:QName",description:" QName representing the HTTP Status Code 406 Not Acceptable\n"},{name:"http:proxy-authentication-required",type:"xs:QName",description:" QName representing the HTTP Status Code 407 Proxy Authentication Required\n"},{name:"http:request-timeout",type:"xs:QName",description:" QName representing the HTTP Status Code 408 Request Timeout\n"}]},"http://zorba.io/modules/uri":{ns:"http://zorba.io/modules/uri",description:" This module provides functions for processing URIs and URLs.\n",sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Matthias Brantner, Luis Rodriguez Gonzalez</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/modules/uri",prefix:"uri"},{uri:"http://zorba.io/options/versioning",prefix:"ver"},{uri:"http://zorba.io/errors",prefix:"zerr"}],functions:[{isDocumented:!0,arity:1,name:"decode",qname:"uri:decode",signature:"($u as xs:string) as xs:string",description:" Percent-decodes (aka URL decoding) the given string.\n All percent encoded octets will be translated into their\n decoded UTF-8 representation.\n Please note that the percent encoding guarantees that a string\n consists of ASCII characters only. Passing a string that contains\n non-ASCII characters results in undefined behavior.\n",summary:"<p> Percent-decodes (aka URL decoding) the given string.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"u",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:string",description:"the percent decoded string"},errors:[]},{isDocumented:!0,arity:2,name:"decode",qname:"uri:decode",signature:"($u as xs:string, $decode-plus as xs:boolean) as xs:string",description:" Percent-decodes (aka URL decoding) the given string.\n All percent encoded octets will be translated into their\n decoded UTF-8 representation.\n If $decode-plus is specified all occurrences of the char '+'\n will be replaced with a space ' ' before the percent decoding\n happens.\n Please note that the percent encoding guarantees that a string\n consists of ASCII characters only. Passing a string that contains\n non-ASCII characters results in undefined behavior.\n",summary:"<p> Percent-decodes (aka URL decoding) the given string.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"u",type:"xs:string",occurrence:null,description:""},{name:"decode-plus",type:"xs:boolean",occurrence:null,description:"<div xmlns:xqdoc=\"http://www.xqdoc.org/1.0\"> whether '+' chars will be replaced with spaces</div>"}],returns:{type:"xs:string",description:"the percent decoded string"},errors:[]},{isDocumented:!0,arity:3,name:"decode",qname:"uri:decode",signature:"($s as xs:string, $decode-plus as xs:boolean, $charset as xs:string) as xs:string external",description:" Percent-decodes (aka URL decoding) the given string.\n All percent encoded octets will be translated into their\n decoded UTF-8 representation.\n If $decode-plus is specified all occurrences of the char '+'\n will be replaced with a space ' ' before the percent decoding\n happens.\n The $charset parameter specifies the source charset after precent\n decoding. It is used to convert the decoded string into UTF-8.\n Please note that the percent encoding guarantees that a string\n consists of ASCII characters only. Passing a string that contains\n non-ASCII characters results in undefined behavior.\n",summary:"<p> Percent-decodes (aka URL decoding) the given string.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the string to decode</div>'},{name:"decode-plus",type:"xs:boolean",occurrence:null,description:"<div xmlns:xqdoc=\"http://www.xqdoc.org/1.0\"> whether '+' chars will be replaced with spaces</div>"},{name:"charset",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the source charset of the string after percent decoding</div>'}],returns:{type:"xs:string",description:"the percent decoded string"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">uri:CHARSET_UNKNOWN if the given charset is unknown or not supported</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZOSE0006 if there is an error transcoding the string</xqdoc:error>']},{isDocumented:!0,arity:1,name:"parse",qname:"uri:parse",signature:"($uri as xs:string) as object() external",description:' Parses the URI passed as string. The returned object\n contains only members with field names declared as constants in\n this module.\n For example,\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static" ace-mode="xquery">\n let my-uri := "http://www.my.project.com/a/b/c?user=john;pass=1234#profile"\n return uri:parse(my-uri)\n </pre>\n returns\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static" ace-mode="java">\n { "squeme" : "http", "host" : "www.my.project.com", "path" : "/a/b/c",\n   "query" : "user=john;pass=123", "fragment" : "profile" }\n </pre>\n',summary:"<p> Parses the URI passed as string.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"uri",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the URI to parse</div>'}],returns:{type:"object()",description:"the JSON object"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XQST0046 if the URI is textually invalid</xqdoc:error>']},{isDocumented:!0,arity:1,name:"serialize",qname:"uri:serialize",signature:"($uri as object()) as xs:string external",description:" Serialize the URI passed as object into a string.\n",summary:"<p> Serialize the URI passed as object into a string.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"uri",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the object representing the URI</div>'}],returns:{type:"xs:string",description:"the URI as string"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">uri:OPAQUE_COMB_NOT_VALID if opaque part is specified in conjunction with host/port/path/user-info/query.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">uri:OPAQUE_WITHOUT_SCHEME if opaque part is present but no scheme is present.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">uri:INVALID_ABSOLUTE_PATH if a path component for an absolute URI doesn\'t start with "/".</xqdoc:error>']}],variables:[{name:"uri:SCHEME",type:"xs:string",description:' Constant for the "scheme" part of a URI object.\n'},{name:"uri:AUTHORITY",type:"xs:string",description:' Constant for the "authority" part of a URI object.\n'},{name:"uri:USER-INFO",type:"xs:string",description:' Constant for the "user-info" part of a URI object.\n'},{name:"uri:HOST",type:"xs:string",description:' Constant for the "host" part of a URI object.\n'},{name:"uri:PORT",type:"xs:string",description:' Constant for the "port" part of a URI object.\n'},{name:"uri:PATH",type:"xs:string",description:' Constant for the "path" part of a URI object.\n'},{name:"uri:QUERY",type:"xs:string",description:' Constant for the "query" part of a URI object.\n'},{name:"uri:FRAGMENT",type:"xs:string",description:' Constant for the "fragment" part of a URI object.\n'},{name:"uri:OPAQUE-PART",type:"xs:string",description:' Constant for the "opaque-part" part of a URI object.\n If this is set in a URI object, then none of $uri:PATH, $uri:HOST,\n $uri:PORT, $uri:USER-INFO, or : $uri:QUERY may be specified.\n If this is set in a URI object, $uri:SCHEME must also be specified\n (ie, it must be an absolute URI).\n'}]},"http://xbrl.io/modules/bizql/profiles/sec/fiscal/core":{ns:"http://xbrl.io/modules/bizql/profiles/sec/fiscal/core",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This module provides functionality for querying fiscal reports (10-K, 10-Q)\n submitted to the SEC.</p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Charles Hoffman</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Matthias Brantner</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Dennis Knochenwefel</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Ghislain Fourny</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://xbrl.io/modules/bizql/archives",prefix:"archives"},{uri:"http://xbrl.io/modules/bizql/profiles/sec/companies",prefix:"companies"},{uri:"http://xbrl.io/modules/bizql/components",prefix:"components"},{uri:"http://www.28msec.com/modules/credentials",prefix:"credentials"},{uri:"http://xbrl.io/modules/bizql/facts",prefix:"facts"},{uri:"http://xbrl.io/modules/bizql/profiles/sec/filings",prefix:"filings"},{uri:"http://xbrl.io/modules/bizql/profiles/sec/fiscal/core",prefix:"fiscal-core"},{uri:"http://jsoniq.org/function-library",prefix:"j"},{uri:"http://www.28msec.com/modules/mongodb",prefix:"mongo"},{uri:"http://xbrl.io/modules/bizql/profiles/sec/core",prefix:"sec"},{uri:"http://xbrl.io/modules/bizql/profiles/sec/networks",prefix:"sec-networks"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:3,name:"balance-sheets-for-fiscal-periods-and-years",qname:"fiscal-core:balance-sheets-for-fiscal-periods-and-years",signature:"($entity-or-ids as item()*, $fiscal-period-focus as string*, $fiscal-year-focus as integer*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves the balance sheet for the given entities and fiscal periods and years.</p>\n',summary:"<p>  Retrieves the balance sheet for the given entities and fiscal periods and years.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"entity-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a list of entities or their EIDs.</div>'},{name:"fiscal-period-focus",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the periods (YTD1, YTD2, YTD3, Q1, Q2, Q3 or FY) or $fiscal-core:ALL_FISCAL_PERIODS to accept all.</div>'},{name:"fiscal-year-focus",type:"integer",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the years (2012) or $fiscal-core:ALL_FISCAL_YEARS to accept all.</div>'}],returns:{type:"object()*",description:"the balance sheet at that date and for that formType."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">entities:INVALID_PARAMETER if the CIK or entity is not valid.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"facts-for-aspects-and-fiscal-periods-and-years",qname:"fiscal-core:facts-for-aspects-and-fiscal-periods-and-years",signature:"($aspects as object()?, $fiscal-period-focus as string*, $fiscal-year-focus as integer*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves facts for the given aspects, fiscal periods and years.</p>\n',summary:"<p>  Retrieves facts for the given aspects, fiscal periods and years.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"aspects",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> an object containing aspects to filter, among which xbrl:Concept, xbrl:Entity and xbrl:Period (all optional).</div>'},{name:"fiscal-period-focus",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the periods (YTD1, YTD2, YTD3, Q1, Q2, Q3 or FY).</div>'},{name:"fiscal-year-focus",type:"integer",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the years (2012)</div>'}],returns:{type:"object()*",description:"all facts matching the given aspects, fiscal period and year."},errors:[]},{isDocumented:!0,arity:4,name:"facts-for-aspects-and-fiscal-periods-and-years",qname:"fiscal-core:facts-for-aspects-and-fiscal-periods-and-years",signature:"($aspects as object()?, $fiscal-period-focus as string*, $fiscal-year-focus as integer*, $options as object()?) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves facts for the given aspects, fiscal periods and years.</p>\n',summary:"<p>  Retrieves facts for the given aspects, fiscal periods and years.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"aspects",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> an object containing aspects to filter, among which xbrl:Concept, xbrl:Entity and xbrl:Period (all optional).</div>'},{name:"fiscal-period-focus",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the periods (YTD1, YTD2, YTD3, Q1, Q2, Q3 or FY) or $fiscal-core:ALL_FISCAL_PERIODS to accept all.</div>'},{name:"fiscal-year-focus",type:"integer",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the years (2012) or $fiscal-core:ALL_FISCAL_YEARS to accept all.</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> <a href="../core#standard_options">standard SEC BizQL options</a>.</div>'}],returns:{type:"object()*",description:"all facts matching the given aspects, fiscal period and year."},errors:[]},{isDocumented:!0,arity:4,name:"facts-for-entities-and-concepts-and-fiscal-periods-and-years",qname:"fiscal-core:facts-for-entities-and-concepts-and-fiscal-periods-and-years",signature:"($entities-or-ids as item()*, $concepts as string*, $fiscal-period-focus as string*, $fiscal-year-focus as integer*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves facts for the given entities, concepts, fiscal periods and years.</p>\n',summary:"<p>  Retrieves facts for the given entities, concepts, fiscal periods and years.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"entities-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a list of entities or their EIDs.</div>'},{name:"concepts",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a list of concept names (us-gaap:Assets)</div>'},{name:"fiscal-period-focus",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the periods (YTD1, YTD2, YTD3, Q1, Q2, Q3 or FY) or $fiscal-core:ALL_FISCAL_PERIODS to accept all.</div>'},{name:"fiscal-year-focus",type:"integer",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the years (2012) or $fiscal-core:ALL_FISCAL_YEARS to accept all.</div>'}],returns:{type:"object()*",description:"all facts matching entities, concepts, fiscal periods and years"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">entities:INVALID_PARAMETER if the CIK or entity is not valid.</xqdoc:error>']},{isDocumented:!0,arity:5,name:"facts-for-entities-and-concepts-and-fiscal-periods-and-years",qname:"fiscal-core:facts-for-entities-and-concepts-and-fiscal-periods-and-years",signature:"($entities-or-ids as item()*, $concepts as string*, $fiscal-period-focus as string*, $fiscal-year-focus as integer*, $options as object()?) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves facts for the given entities, concepts, fiscal periods and years.</p>\n',summary:"<p>  Retrieves facts for the given entities, concepts, fiscal periods and years.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"entities-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a list of entities or their EIDs.</div>'},{name:"concepts",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a list of concept names (us-gaap:Assets)</div>'},{name:"fiscal-period-focus",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the periods (YTD1, YTD2, YTD3, Q1, Q2, Q3 or FY) or $fiscal-core:ALL_FISCAL_PERIODS to accept all.</div>'},{name:"fiscal-year-focus",type:"integer",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the years (2012) or $fiscal-core:ALL_FISCAL_YEARS to accept all.</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> <a href="../core#standard_options">standard SEC BizQL options</a>.</div>'}],returns:{type:"object()*",description:"all facts matching entities, concepts, fiscal periods and years"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">entities:INVALID_PARAMETER if the CIK or entity is not valid.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"filings-for-entities-and-fiscal-periods-and-years",qname:"fiscal-core:filings-for-entities-and-fiscal-periods-and-years",signature:"($entities-or-ids as item()*, $fiscal-period-focus as string*, $fiscal-year-focus as integer*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves all filings by entities and for given fiscal periods and years.</p>\n',summary:"<p>  Retrieves all filings by entities and for given fiscal periods and years.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"entities-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> entities or their ids.</div>'},{name:"fiscal-period-focus",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> fiscal periods (FY, YTD1, YTD2, YTD3, Q1, Q2, Q3, Q4) or $fiscal-core:ALL_FISCAL_PERIODS to accept all..</div>'},{name:"fiscal-year-focus",type:"integer",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> fiscal years or $fiscal-core:ALL_FISCAL_YEARS to accept all..</div>'}],returns:{type:"object()*",description:"all filings that match the criteria."},errors:[]},{isDocumented:!0,arity:1,name:"fiscal-period",qname:"fiscal-core:fiscal-period",signature:"($filing-fact-or-id as item()?) as string?",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves the fiscal period of a filing or a fact.</p>\n',summary:"<p>  Retrieves the fiscal period of a filing or a fact.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"filing-fact-or-id",type:"item()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a filing, a fact, or its id.</div>'}],returns:{type:"string?",description:"the fiscal period (FY, YTD2, YTD3, Q1, Q2 or Q3)."},errors:[]},{isDocumented:!0,arity:1,name:"fiscal-year",qname:"fiscal-core:fiscal-year",signature:"($filing-fact-or-id as item()?) as integer?",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves the fiscal year of a filing or a fact.</p>\n',summary:"<p>  Retrieves the fiscal year of a filing or a fact.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"filing-fact-or-id",type:"item()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a filing, a fact, or its id.</div>'}],returns:{type:"integer?",description:"the fiscal year (e.g., 2012)."},errors:[]},{isDocumented:!0,arity:1,name:"latest-reported-fiscal-period",qname:"fiscal-core:latest-reported-fiscal-period",signature:"($entity-or-id as item()) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves the latest reported fiscal period and year for the\n supplied entity.</p>\n',summary:"<p>  Retrieves the latest reported fiscal period and year for the\n supplied entity.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"entity-or-id",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> an entity or its EID.</div>'}],returns:{type:"object()*",description:"an object with two fields: period and year."},errors:[]},{isDocumented:!0,arity:2,name:"latest-reported-fiscal-period",qname:"fiscal-core:latest-reported-fiscal-period",signature:"($entity-or-id as item(), $type as string) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves the latest fiscal period and year for the\n supplied entity.</p>\n',summary:"<p>  Retrieves the latest fiscal period and year for the\n supplied entity.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"entity-or-id",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> an entity or its EID.</div>'},{name:"type",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> 10-K or 10-Q or FY, YTD1, YTD2, YTD3, Q1, Q2, or Q3.</div>'}],returns:{type:"object()*",description:"an object with two fields: period and year."},errors:[]}],variables:[{name:"fiscal-core:ALL_FISCAL_PERIODS",type:"string",description:" Joker for all fiscal periods.\n"},{name:"fiscal-core:ALL_FISCAL_YEARS",type:"integer",description:" Joker for all fiscal years.\n"}]},"http://zorba.io/modules/base64":{ns:"http://zorba.io/modules/base64",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Base64 encoding and decoding.</p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Matthias Brantner</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/modules/base64",prefix:"base64"},{uri:"http://zorba.io/options/versioning",prefix:"ver"},{uri:"http://zorba.io/errors",prefix:"zerr"}],functions:[{isDocumented:!0,arity:1,name:"decode",qname:"base64:decode",signature:"($base64 as base64Binary) as string external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Decode a base64Binary.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function assumes that the content after decoding is valid\n UTF-8.</p>\n',summary:"<p>  Decode a base64Binary.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"base64",type:"base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The base64Binary item to decode</div>'}],returns:{type:"string",description:"the base64-decoded value as string"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZOSE0006 if $base64 contains invalid base-64 data.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"decode",qname:"base64:decode",signature:"($base64 as base64Binary, $encoding as string) as string external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Decode a base64Binary.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function assumes that the content after decoding has\n the given encoding.</p>\n',summary:"<p>  Decode a base64Binary.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"base64",type:"base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The base64Binary item to decode</div>'},{name:"encoding",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The encoding of the string after base64-decoding it. The encoding parameter is case insensitive.</div>'}],returns:{type:"string",description:"the base64-decoded value as a string"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZXQP0006 if the given encoding is invalid or not supported. "ASCII" and "UTF-8" are guaranteed to be supported; other encodings may be supported depending on the installation.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZOSE0006 if $base64 contains invalid base-64 data.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"encode",qname:"base64:encode",signature:"($string as string) as base64Binary external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Encode a string as base64Binary.</p>\n',summary:"<p>  Encode a string as base64Binary.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"string",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The item whose string-value should be encoded</div>'}],returns:{type:"base64Binary",description:"the base64-encoded string-value of the item parameter"},errors:[]}],variables:[]},"http://xbrl.io/modules/bizql/networks":{ns:"http://xbrl.io/modules/bizql/networks",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This module provides functionality for handling networks.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">A network is a graph of concepts and resources, of which the edges\n share the same semantics.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">There are several kinds of networks.\n A network can be a tree or a DAG of concepts. It can be a bipartite\n graph mapping concepts to resources.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">XBRL defines a number of standard networks: presentation, calculation,\n definition (essence-alias, general-special, requires-element, similar-tuples, domain-member),\n and label networks.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">With this module, you can retrieve the networks contained in a component, and you\n can retrieve a standard XBRL network with the provided short names.</p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Charles Hoffman</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Matthias Brantner</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Dennis Knochenwefel</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Ghislain Fourny</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://xbrl.io/modules/bizql/components",prefix:"components"},{uri:"http://xbrl.io/modules/bizql/networks",prefix:"networks"}],functions:[{isDocumented:!0,arity:2,name:"networks-for-components-and-short-names",qname:"networks:networks-for-components-and-short-names",signature:"($components as item()*, $short-name as string*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves the standardized networks in the supplied components with the given short names.</p>\n',summary:"<p>  Retrieves the standardized networks in the supplied components with the given short names.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"components",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of components.</div>'},{name:"short-name",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the short names of the networks.</div>'}],returns:{type:"object()*",description:"the standardized networks with these short names."},errors:[]},{isDocumented:!0,arity:1,name:"networks-for-components",qname:"networks:networks-for-components",signature:"($components as item()*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves all networks in the supplied components.</p>\n',summary:"<p>  Retrieves all networks in the supplied components.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"components",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of components.</div>'}],returns:{type:"object()*",description:"all networks."},errors:[]}],variables:[{name:"networks:PRESENTATION_NETWORK",type:"xs:string",description:" Short name of the presentation network.\n"},{name:"networks:CALCULATION_NETWORK",type:"xs:string",description:" Short name of the calculation network.\n"},{name:"networks:ESSENCE_ALIAS_NETWORK",type:"xs:string",description:" Short name of the essence-alias definition network.\n"},{name:"networks:GENERAL_SPECIAL_NETWORK",type:"xs:string",description:" Short name of the general-special definition network.\n"},{name:"networks:REQUIRES_ELEMENT_NETWORK",type:"xs:string",description:" Short name of the requires-element definition network.\n"},{name:"networks:SIMILAR_TUPLES_NETWORK",type:"xs:string",description:" Short name of the similar-tuples definition network.\n"},{name:"networks:DOMAIN_MEMBER_NETWORK",type:"xs:string",description:" Short name of the domain-member definition network.\n"}]},"http://jsound.io/modules/validate/map":{ns:"http://jsound.io/modules/validate/map",description:" Map utility\n",sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Chris Hillery, Cezar Andrei</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://jsound.io/modules/validate/map",prefix:"map"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:2,name:"get",qname:"map:get",signature:"($map as object(), $key as string) as item()",description:" Returns the value under the key.\n",summary:"<p> Returns the value under the key.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"map",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the map JSON object</div>'},{name:"key",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the key</div>'}],returns:{type:"item()",description:"the value under the $key, () if empty Example:"},errors:[]},{isDocumented:!0,arity:2,name:"has-key",qname:"map:has-key",signature:"($map as object(), $key as string) as boolean",description:" Returns true if $key exists in the map.\n",summary:"<p> Returns true if $key exists in the map.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"map",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the map JSON object</div>'},{name:"key",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the key</div>'}],returns:{type:"boolean",description:"true if $key exists, false otherwise Example:"},errors:[]},{isDocumented:!0,arity:3,name:"set-if-empty",qname:"map:set-if-empty",signature:"($map as object(), $key as xs:string, $value as item()) as boolean",description:" Only if key doesn't exist, inserts new key and value into the map and\n returns true. Otherwise returns false.\n",summary:"<p> Only if key doesn't exist, inserts new key and value into the map and\n returns true.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"map",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the map JSON object</div>'},{name:"key",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the key</div>'},{name:"value",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the value</div>'}],returns:{type:"boolean",description:"true if $key is empty, false otherwise Example:"},errors:[]},{isDocumented:!0,arity:3,name:"set",qname:"map:set",signature:"($map as object(), $key as xs:string, $value as item()) as boolean",description:" Inserts new key and value into the map or replaces value under the exiting key.\n Returns true all the time.\n",summary:"<p> Inserts new key and value into the map or replaces value under the exiting key.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"map",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the map JSON object</div>'},{name:"key",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the key</div>'},{name:"value",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the value</div>'}],returns:{type:"boolean",description:"true Example:"},errors:[]}],variables:[]},"http://zorba.io/modules/xml":{ns:"http://zorba.io/modules/xml",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This module provides functions for reading XML files from string inputs.\n It allows reading of well-formed XML documents as well as well-formed\n external parsed entities, described by\n <a href="http://www.w3.org/TR/xml/#wf-entities">XML 1.0 Well-Formed\n Parsed Entities</a>. The functions can also perform Schema and DTD\n validation of the input documents.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The following example parses a sequence of XML elements and returns\n them in a streaming fashion - each at a time:</p>\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static" ace-mode="xquery">\n import module namespace x = "http://zorba.io/modules/xml";\n import schema namespace opt = "http://zorba.io/modules/xml-options";\n x:parse(\n   "&lt;from1&gt;Jani&lt;/from1&gt;&lt;from2&gt;Jani&lt;/from2&gt;&lt;from3&gt;Jani&lt;/from3&gt;",\n   &lt;opt:options&gt;\n     &lt;opt:parse-external-parsed-entity/&gt;\n   &lt;/opt:options&gt;\n )\n </pre>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Another useful option allows to skip an arbitrary number of levels\n before returning a sequence of nodes as shown in the following example:</p>\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static" ace-mode="xquery">\n import module namespace x = "http://zorba.io/modules/xml";\n import schema namespace opt = "http://zorba.io/modules/xml-options";\n x:parse(\n   "&lt;root&gt;\n     &lt;from1&gt;Jani1&lt;/from1&gt;\n     &lt;from2&gt;Jani2&lt;/from2&gt;\n     &lt;from3&gt;Jani3&lt;/from3&gt;\n   &lt;/root&gt;",\n   &lt;opt:options&gt;\n     &lt;opt:parse-external-parsed-entity opt:skip-root-nodes="1"/&gt;\n   &lt;/opt:options&gt;\n )\n </pre>\n',sees:['<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0"><a href="http://www.w3.org/TR/xml/#wf-entities">XML 1.0 Well-Formed Parsed Entities</a></xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0"><a href="http://www.w3.org/TR/xpath-functions-30/#func-parse-xml"> fn:parse-xml() function in XPath and XQuery Functions and Operators 3.0</a></xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0"><a href="http://xmlsoft.org/html/libxml-parser.html">LibXml2 parser</a></xqdoc:see>'],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Nicolae Brinza, Juan Zacarias</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://www.w3.org/xqt-errors",prefix:"err"},{uri:"http://zorba.io/modules/xml-options",prefix:"opt"},{uri:"http://zorba.io/modules/schema",prefix:"schema"},{uri:"http://zorba.io/options/versioning",prefix:"ver"},{uri:"http://zorba.io/modules/xml",prefix:"x"},{uri:"http://zorba.io/errors",prefix:"zerr"}],functions:[{isDocumented:!0,arity:1,name:"canonicalize",qname:"x:canonicalize",signature:"($xml-string as xs:string) as xs:string",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">A function to canonicalize the given XML string, that is, transform\n it into Canonical XML as defined by <a href="http://www.w3.org/TR/xml-c14n">Canonical XML</a>.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Note: This function is not streamable. If a streamable string is used\n as input for the function it will be materialized.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Note: This function sets the\n <a href="http://xmlsoft.org/html/libxml-parser.html#xmlParserOption">XML_PARSE_NOERROR</a>\n option when parsing the XML input.</p>\n',summary:"<p>  A function to canonicalize the given XML string, that is, transform\n it into Canonical XML as defined by  Canonical XML .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"xml-string",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a string representation of a well formed XML to canonicalize. XML fragments are not allowed.</div>'}],returns:{type:"xs:string",description:"the canonicalized XML string."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:CANO0001 invalid input.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"canonicalize",qname:"x:canonicalize",signature:"($xml-string as xs:string, $options as element(opt:options)) as xs:string",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">A function to canonicalize the given XML string, that is, transform\n it into Canonical XML as defined by <a href="http://www.w3.org/TR/xml-c14n">Canonical XML</a>.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This version of the function allows specifying certain options to be\n used when initially parsing the XML string. These are of the same form\n as the options to x:parse#2(), although the following options are\n currently ignored for this function:\n <ul>\n <li>&lt;opt:no-error/&gt;</li>\n <li>&lt;opt:base-uri/&gt;</li>\n <li>&lt;opt:schema-validate/&gt;</li>\n <li>&lt;opt:parse-external-parsed-entity/&gt;</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Note: This function is not streamable, if a streamable string is used\n as input for the function it will be materialized.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Note: This function sets the\n <a href="http://xmlsoft.org/html/libxml-parser.html#xmlParserOption">XML_PARSE_NOERROR</a>\n option when parsing the XML input.</p>\n',summary:"<p>  A function to canonicalize the given XML string, that is, transform\n it into Canonical XML as defined by  Canonical XML .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"xml-string",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a string representation of a well formed XML to canonicalize. XML fragments are not allowed.</div>'},{name:"options",type:"element(opt:options)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> an XML containg options for the canonicalize function.</div>'}],returns:{type:"xs:string",description:"the canonicalized XML string."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:CANO0001 invalid input.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"parse",qname:"x:parse",signature:"($xml-string as xs:string?, $options as element(opt:options)?) as node()* external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">A function to parse XML files and fragments (i.e.\n <a href="http://www.w3.org/TR/xml/#wf-entities">external general parsed\n entities</a>).</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The functions takes two arguments: the first one is the\n string to be parsed and the second argument is an &lt;options/&gt; element that\n passes a list of options to the parsing function. They are described below.\n The options element must conform to the xml-options:options element type\n from the xml-options.xsd schema. Some of these\n will be passed to the underlying library (LibXml2) and further documentation\n for them can be found at <a href="http://xmlsoft.org/html/libxml-parser.html">\n LibXml2 parser</a>.</p>\n The list of available options:\n <ul xmlns:xqdoc="http://www.xqdoc.org/1.0">\n <li>\n &lt;base-uri/&gt; - the element must have a "value" attribute, which will provide\n the baseURI that will be used as the baseURI for every node returned by this\n function.\n </li>\n <li>\n &lt;no-error/&gt; - if present, the option will disable fatal error processing. Any\n failure to parse or validate the input in the requested manner will result\n in the function returning an empty sequence and no error will raised.\n </li>\n <li>\n &lt;schema-validate/&gt; - if present, it will request that the input string be Schema\n validated. The element accepts an attribute named "mode" which can have two\n values: "strict and "lax". Enabling the option will produce a result that is\n equivalent to processing the input with the option disabled, and then copying\n the result using the XQuery "validate strict|lax" expression. This option can not\n be used together with either the &lt;DTD-validate/&gt; or the &lt;parse-external-parsed-entity/&gt;\n option. Doing so will raise a zerr:ZXQD0003 error.\n </li>\n <li>\n &lt;DTD-validate/&gt; - the option will enable the DTD-based validation. If this\n option is enabled and the input references a DTD, then the input must be a\n well-formed and DTD-valid XML document. The &lt;DTD-load/&gt; option must be used for\n external DTD files to be loaded. If the option is enabled and the input does\n not reference a DTD then the option is ignored. If the option is disabled, the\n input is not required to reference a DTD and if it does reference a DTD then\n the DTD is ignored for validation purposes. This option can not\n be used together with either the &lt;schema-validate/&gt; or the &lt;parse-external-parsed-entity&gt;\n option. Doing so will raise a zerr:ZXQD0003 error.\n </li>\n <li>\n &lt;DTD-load/&gt; - if present, it will enable loading of external DTD files.\n </li>\n <li>\n &lt;default-DTD-attributes/&gt; - if present, it will enable the default DTD attributes.\n </li>\n <li>\n &lt;parse-external-parsed-entity/&gt; - if present, it will enable the processing of XML\n external entities. If the option\n is enabled, the input must conform to the syntax extParsedEnt (production\n [78] in XML 1.0, see <a href="http://www.w3.org/TR/xml/#wf-entities">\n Well-Formed Parsed Entities</a>). In addition, by default a DOCTYPE declaration is allowed,\n as described by the [28] doctypedecl production, see <a href="http://www.w3.org/TR/xml/#NT-doctypedecl">\n Document Type Definition</a>. A parameter is available to forbid the appearance of the DOCTYPE.\n The result of the function call is a list\n of nodes corresponding to the top-level components of the content of the\n external entity: that is, elements, processing instructions, comments, and\n text nodes. CDATA sections and character references are expanded, and\n adjacent characters are merged so the result contains no adjacent text\n nodes. If the option is disabled, the input must be a well-formed XML\n document conforming to the Document production\n (<a href="http://www.w3.org/TR/xml/#sec-well-formed">production [1] in XML 1.0</a>).\n This option can not be used together with either the &lt;schema-validate/&gt; or the &lt;DTD-validate/&gt;\n option. Doing so will raise a zerr:ZXQD0003 error.\n The &lt;parse-external-parsed-entity/&gt; option has three parameters, given by attributes. The first\n attribute is "skip-root-nodes" and it can have a non-negative value. Specifying the paramter\n tells the parser to skip the given number of root nodes and return only their children. E.g.\n skip-root-nodes="1" is equivalent to parse-xml($xml-string)/node()/node() . skip-root-nodes="2" is equivalent\n to parse-xml($xml-string)/node()/node()/node() , etc. The second attribute is "skip-top-level-text-nodes" with a\n boolean value. Specifying "true" will tell the parser to skip top level text nodes, returning\n only the top level elements, comments, PIs, etc. This parameter works in combination with\n the "skip-root-nodes" paramter, thus top level text nodes are skipped after "skip-root-nodes" has\n been applied. The third paramter is "error-on-doctype" and will generate an error if a DOCTYPE\n declaration appears in the input, which by default is allowed.\n </li>\n <li>\n &lt;substitute-entities/&gt; - if present, it will enable the XML entities substitutions.\n </li>\n <li>\n &lt;remove-redundant-ns/&gt; - if present, the parser will remove redundant namespaces declarations.\n </li>\n <li>\n &lt;no-CDATA/&gt; - if present, the parser will merge CDATA nodes as text nodes.\n </li>\n <li>\n &lt;xinclude-substitutions/&gt; - if present, it will enable the XInclude substitutions.\n </li>\n <li>\n &lt;no-xinclude-nodes/&gt; - if present, the parser will not generate XInclude START/END nodes.\n </li>\n </ul>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n An example that sets the base-uri of the parsed external entities:\n </p>\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static" ace-mode="xquery">\n   import module namespace x = "http://zorba.io/modules/xml";\n   import schema namespace opt = "http://zorba.io/modules/xml-options";\n   x:parse("&lt;from1&gt;Jani&lt;/from1&gt;&lt;from2&gt;Jani&lt;/from2&gt;&lt;from3&gt;Jani&lt;/from3&gt;",\n     &lt;opt:options&gt;\n       &lt;opt:base-uri opt:value="urn:test"/&gt;\n       &lt;opt:parse-external-parsed-entity/&gt;\n     &lt;/opt:options&gt;\n   )\n </pre>\n',summary:"<p>  A function to parse XML files and fragments (i.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"xml-string",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The string that holds the XML to be parsed. If empty, the function will return an empty sequence</div>'},{name:"options",type:"element(opt:options)",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The options for the parsing</div>'}],returns:{type:"node()*",description:"The parsed XML as a document node or a list of nodes, or an empty sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZXQD0003 The error will be raised if the options to the function are inconsistent.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FODC0006 The error will be raised if the input string is not a valid XML document or fragment (external general parsed entity) or if DTD validation was enabled and the document has not passed it.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XQDY0027 The error will be raised if schema validation was enabled and the input document has not passed it or if the parsing options are not conformant to the xml-options.xsd schema.</xqdoc:error>']}],variables:[]},"http://www.zorba-xquery.com/modules/process":{ns:"http://www.zorba-xquery.com/modules/process",description:' This module provides functions to create a native process and return the result\n (i.e. exit code, result on standard out and error).\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n Example:\n<pre class="ace-static" ace-mode="xquery">\n  import module namespace proc = "http://www.zorba-xquery.com/modules/process";\n  proc:exec("ls")\n</pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n Potential result:\n <pre class="ace-static" ace-mode="xquery">\n &lt;result xmlns="http://www.zorba-xquery.com/modules/process"&gt;\n   &lt;stdout&gt;myfile.txt&lt;/stout&gt;\n   &lt;stderr/&gt;\n   &lt;exit-code&gt;0&lt;/exit-code&gt;\n &lt;/result&gt;\n </pre>\n </p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Cezar Andrei</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://www.zorba-xquery.com/modules/process",prefix:"process"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"exec",qname:"process:exec",signature:"($cmd as xs:string) as element(process:result) external",description:" Executes the specified string command in a separate process.\n This function does not allow arguments to be passed to\n the command.\n",summary:"<p> Executes the specified string command in a separate process.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"cmd",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> command to be executed (without arguments)</div>'}],returns:{type:"element(process:result)",description:"the result of the execution as an element as shown in the documentation of this module. The exit-code element returns the exit code of the child process. For POSIX compliant platforms: returns the process exit code. If process is terminated or stopped: 128 + termination signal code. For Windows platforms: returns the return value of the process or the exit or terminate process specified value."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">process:PROC01 if an error occurred while communicating with the executed process.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"exec",qname:"process:exec",signature:"($cmd as xs:string, $args as xs:string*) as element(process:result) external",description:" Executes the specified string command in a separate process.\n Each of the strings in the sequence passed in as the second\n argument is passed as an argument to the executed command.\n",summary:"<p> Executes the specified string command in a separate process.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"cmd",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> command to be executed (without arguments)</div>'},{name:"args",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the arguments passed to the executed command (e.g. "-la")</div>'}],returns:{type:"element(process:result)",description:"the result of the execution as an element as shown in the documentation of this module. The exit-code element returns the exit code of the child process. For POSIX compliant platforms: returns the process exit code. If process is terminated or stopped: 128 + termination signal code. For Windows platforms: returns the return value of the process or the exit or terminate process specified value."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">process:PROC01 if an error occurred while communicating with the executed process.</xqdoc:error>']}],variables:[]},"http://www.28msec.com/modules/maps":{ns:"http://www.28msec.com/modules/maps",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This module defines a set of functions for working with maps. A map\n is identified by a string and can be created using the map:create function\n and dropped using the map:drop function.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">It is possible to create persistent and transient maps. The lifetime of a\n transient map is limited by the execution of the current query.\n A persistent map lives until it is explicitly dropped.\n Accordingly, it is also available to other requests.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre class="ace-static" ace-mode="xquery">map:create("my-map", ["string", "integer"], { "persistent" : false })</pre>\n will create a transient map named my-map having two keys.\n The types of the keys are string and integer.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The key of a particular entry in the map can consist of a tuple of\n atomic values (called key attributes). The actual type of each attribute\n is determined when the map is created. The value of each entry is a\n sequence of items. If an item in this sequence is a object or array,\n this item needs to belong to a collection, otherwise, an error is raised.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For every persistent map, 28.io will create a new collection\n in your MongoDB database. The collection will have the prefix <em>_28.map</em>.\n For example, if your map is called foo, the according collection will\n be named <em>_28.map.foo</em>.</p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">28msec</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://www.28msec.com/modules/maps",prefix:"map"},{uri:"http://zorba.io/options/versioning",prefix:"ver"},{uri:"http://zorba.io/errors",prefix:"zerr"}],functions:[{isDocumented:!0,arity:0,name:"available-maps",qname:"map:available-maps",signature:"() as string* external",description:" The function returns a sequence of names of the maps that are\n available (persistent and non-persistent). The sequence will be\n empty if there are no maps.\n",summary:"<p> The function returns a sequence of names of the maps that are\n available (persistent and non-persistent).</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"string*",description:"A sequence of string, one for each available map, or an emtpy sequence."},errors:[]},{isDocumented:!0,arity:2,name:"create",qname:"map:create",signature:"($name as string, $key-types as item()) as empty-sequence() external",description:' Create a persistent map with a given name and type identifiers for the key\n attributes.\n If the map has only one key attribute, a single type identifier is given,\n for more than one key attribute an array of type identifiers is given.\n Calling this function is equivalent to calling create with the options\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0">{ "persistent" : true }</pre>\n Note that the function is sequential and immediately creates the map.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Each key-type should be specified as string (e.g. "integer",\n "string", "boolean", "double", or "datetime").</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>map:create("my-map", "string")</pre> or\n <pre>map:create("my-map", ["string", "integer"])</pre>.</p>\n',summary:"<p> Create a persistent map with a given name and type identifiers for the key\n attributes.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the map (the restrictons on collection names apply)</div>'},{name:"key-types",type:"item()",occurrence:null,description:""}],returns:{type:"empty-sequence()",description:"the function is sequential and immediately creates the corresponding map. It returns the empty-sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XPTY0004 if any of the key attribute types is not a subtype of anyAtomicType.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZSTR0001 if a map with the given name already exists.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY1000 if the given name is not a legal collection name</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0043 if any of the given options has an invalid type</xqdoc:error>']},{isDocumented:!0,arity:3,name:"create",qname:"map:create",signature:"($name as string, $key-types as item(), $options as object()) as empty-sequence() external",description:' Create a map with a given name, type identifiers for the key attributes, and\n options.\n If the map has only one key attribute, a single type identifier is given,\n for more than one key attribute an array of type identifiers is given.\n Currently only one option is supported: To create a transient map the object\n <code xmlns:xqdoc="http://www.xqdoc.org/1.0">{ "persistent" : false }</code>\n has to be passed to the $options parameter.\n Note that the function is sequential and immediately creates the map in the\n store.\n',summary:"<p> Create a map with a given name, type identifiers for the key attributes, and\n options.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the map (the restrictons on collection names apply)</div>'},{name:"key-types",type:"item()",occurrence:null,description:""},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> an object describing options for the map</div>'}],returns:{type:"empty-sequence()",description:"the function is sequential and immediately creates the corresponding map but returns the empty-sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XPTY0004 if any of the attribute types is not a subtype of anyAtomicType.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZSTR0001 if a map with the given name already exists.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY1000 if the given name is not a legal collection name</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0043 if any of the given options has an invalid type</xqdoc:error>']},{isDocumented:!0,arity:2,name:"delete",qname:"map:delete",signature:"($name as string, $key as item()) as empty-sequence() external",description:' Removes an entry identified by the given key from the map.\n If the map has only one key attribute, a single key value is given, for\n more than one key attribute an array of key values is given.\n Note that it is possible to insert entries with empty key attributes.\n However as the removing the entries is based on the "eq" comparison and\n as "eq" with an empty sequence always return false, it is not possible\n to delete these entries.\n',summary:"<p> Removes an entry identified by the given key from the map.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the map</div>'},{name:"key",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> either a single attribute key or an array of keys</div>'}],returns:{type:"empty-sequence()",description:"the function is sequential and immediately deletes the entry into the map but returns the empty-sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0023 if a map with the given name does not exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0025 if the given number of key attributes does not match the number of key attributes specified when creating the map (see the map:create function).</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZXQD0005 if any of the given key attributes can not be cast (or is not a subtype) of the corresponding key attribute specified when creating the map.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"drop",qname:"map:drop",signature:"($name as string) as empty-sequence() external",description:" Deletes the map with the given name.\n",summary:"<p> Deletes the map with the given name.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the map to drop</div>'}],returns:{type:"empty-sequence()",description:"the function is sequential and immediately drops the map. It returns the empty-sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0023 if a map with the given name does not exist.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"get",qname:"map:get",signature:"($name as string, $key as item()) as item()* external",description:' Returns the value of the entry with the given key from the map.\n If the map has only one key attribute, a single key value is given, for\n more than one key attribute an array of key values is given.\n Note that it is possible to insert entries with empty key attributes.\n However as the getting the entries is based on the "eq" comparison and\n as "eq" with an empty sequence always return false, it is not possible\n to retrieve these entries.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>map:get("my-map", "key")</pre> or\n <pre>map:get("my-map", [ "key1", "key2" ])</pre>.</p>\n',summary:"<p> Returns the value of the entry with the given key from the map.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the map</div>'},{name:"key",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> either a single attribute key or an array of keys</div>'}],returns:{type:"item()*",description:"the value of the entry in the map identified by the given key. The empty-sequence will be returned if no entry with the given key is contained in the map."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0023 if a map with the given name does not exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0025 if the given number of key attributes does not match the number of key attributes specified when creating the map (see the map:create function).</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZXQD0005 if any of the given key attributes can not be cast (or is not a subtype) of the corresponding key attribute specified when creating the map.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"insert",qname:"map:insert",signature:"($name as string, $key as item(), $value as item()*) as empty-sequence() external",description:' Inserts a new entry into the map with the given name.\n If the map has only one key attribute, a single key value is given, for\n more than one key attribute an array of key values is given.\n If an entry with the given key already exists in the map, the value\n sequences of the existing entry and the sequence passed using $value\n argument are concatenated.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If a map is persistent and if an item in the value sequence\n is an object or array, this item needs to belong to a collection,\n otherwise, an an error is raised.</p>\n Note that it is possible to insert entries with empty key attributes\n or key attributes having the value <code xmlns:xqdoc="http://www.xqdoc.org/1.0">null</code>. However, as\n the comparison with an empty sequence or null always returns false,\n it is not possible to retrieve these entries.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>map:insert("my-map", "key", "value")</pre> or\n <pre>map:insert("my-map", [ "key1", "key2" ] , (42, "value"))</pre>.</p>\n',summary:"<p> Inserts a new entry into the map with the given name.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the map</div>'},{name:"key",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> either a single attribute key or an array of keys</div>'},{name:"value",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the value of the entry to insert</div>'}],returns:{type:"empty-sequence()",description:"the function is sequential and immediately inserts the entry into the map. It returns the empty-sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0023 if a map with the given name does not exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0025 if the given number of key attributes does not match the number of key attributes specified when creating the map (see the map:create function).</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZXQD0005 if any of the given key attributes can not be cast (or is not a subtype) of the corresponding key attribute specified when creating the map.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY1003 if the value to insert is an object or array it must belong to a collection.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"keys",qname:"map:keys",signature:"($name as string) as array()* external",description:' Returns the keys of all entries of a map. The keys\n are returned as sequence of arrays.\n The following condition always holds:\n <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">map:size($name) eq count(map:keys($name))</tt>\n',summary:"<p> Returns the keys of all entries of a map.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the map</div>'}],returns:{type:"array()*",description:"an sequence of arrays each array containing the values of all attributes of one key."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0023 if a map with the given name does not exist.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"options",qname:"map:options",signature:"($name as string) as object() external",description:" The function returns the options that were passed during creation or the\n default options if no options were passed.\n",summary:"<p> The function returns the options that were passed during creation or the\n default options if no options were passed.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the map</div>'}],returns:{type:"object()",description:"an options object"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0023 if a map with the given name does not exist.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"size",qname:"map:size",signature:"($name as string) as integer external",description:' The number of entries in a map.\n The following condition always holds:\n <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">map:size($name) eq count(map:keys($name))</tt>\n',summary:"<p> The number of entries in a map.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the map</div>'}],returns:{type:"integer",description:"the number of entries in the map."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0023 if a map with the given name does not exist.</xqdoc:error>']}],variables:[]},"http://www.w3.org/2005/xpath-functions/math":{ns:"http://www.w3.org/2005/xpath-functions/math",description:' This module contains all the functions part of the\n W3C XPath and XQuery Functions and Operators 3.0\n section "4.7 Trigonometric and exponential functions".\n',sees:['<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://www.w3.org/TR/xpath-functions-30/#trigonometry</xqdoc:see>'],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">www.w3c.org</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://www.w3.org/2005/xpath-functions/math",prefix:"math"}],functions:[{isDocumented:!0,arity:1,name:"acos",qname:"math:acos",signature:"($arg as xs:double?) as xs:double? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the arc cosine of the argument, the result being in the range zero to\n                +<var>π</var> radians.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="acos" return-type="xs:double?" isOp="no" prefix="math" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:double?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, the function returns the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="G">Otherwise the result is the arc cosine of <code>$</code><var>θ</var>,\n             treated as an angle in radians, as defined in the <bibref ref="ieee754-2008"/>\n             specification of the <code>acos</code> function applied to 64-bit binary floating point\n             values.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The treatment of the <code>invalidOperation</code> exception is defined in <specref ref="op.numeric"/>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is <code>NaN</code>, or if its absolute value is greater than one,\n             then the result is <code>NaN</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">In other cases the result is an <code>xs:double</code> value representing an angle\n                <var>θ</var> in radians in the range <code>0 &lt;= $</code><var>θ</var><code> &lt;=\n                +</code><var>π</var>. </p></div>\n',summary:"<p>  Returns the arc cosine of the argument, the result being in the range zero to\n                + π  radians.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:double",occurrence:"?",description:""}],returns:{type:"xs:double?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"asin",qname:"math:asin",signature:"($arg as xs:double?) as xs:double? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the arc sine of the argument, the result being in the range\n                -<var>π</var>/2 to +<var>π</var>/2 radians.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="asin" return-type="xs:double?" isOp="no" prefix="math" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:double?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, the function returns the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="G">Otherwise the result is the arc sine of <code>$</code><var>θ</var>,\n             treated as an angle in radians, as defined in the <bibref ref="ieee754-2008"/>\n             specification of the <code>asin</code> function applied to 64-bit binary floating point\n             values.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The treatment of the <code>invalidOperation</code> and <code>underflow</code> exceptions\n             is defined in <specref ref="op.numeric"/>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is positive or negative zero, the result is <code>$arg</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is <code>NaN</code>, or if its absolute value is greater than one,\n             then the result is <code>NaN</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">In other cases the result is an <code>xs:double</code> value representing an angle\n                <var>θ</var> in radians in the range -<var>π</var><code>/2 &lt;=\n                $</code><var>θ</var><code> &lt;= +</code><var>π</var><code>/2</code>. </p></div>\n',summary:"<p>  Returns the arc sine of the argument, the result being in the range\n                - π /2 to + π /2 radians.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:double",occurrence:"?",description:""}],returns:{type:"xs:double?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"atan",qname:"math:atan",signature:"($arg as xs:double?) as xs:double? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the arc tangent of the argument, the result being in the range\n                -<var>π</var>/2 to +<var>π</var>/2 radians.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="atan" return-type="xs:double?" isOp="no" prefix="math" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:double?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, the function returns the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="G">Otherwise the result is the arc tangent of <code>$</code><var>θ</var>,\n             treated as an angle in radians, as defined in the <bibref ref="ieee754-2008"/>\n             specification of the <code>atan</code> function applied to 64-bit binary floating point\n             values.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The treatment of the <code>underflow</code> exception is defined in <specref ref="op.numeric"/>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is positive or negative zero, the result is <code>$arg</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is <code>NaN</code> then the result is <code>NaN</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">In other cases the result is an <code>xs:double</code> value representing an angle\n                <var>θ</var> in radians in the range -<var>π</var><code>/2 &lt;=\n                $</code><var>θ</var><code> &lt;= +</code><var>π</var><code>/2</code>. </p></div>\n',summary:"<p>  Returns the arc tangent of the argument, the result being in the range\n                - π /2 to + π /2 radians.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:double",occurrence:"?",description:""}],returns:{type:"xs:double?",description:""},errors:[]},{isDocumented:!0,arity:2,name:"atan2",qname:"math:atan2",signature:"($y as xs:double, $x as xs:double) as xs:double external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the angle in radians subtended at the origin by the point on a plane\n             with coordinates (x, y) and the positive x-axis, the result being in the range\n                -<var>π</var> to +<var>π</var>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="atan2" return-type="xs:double" isOp="no" prefix="math" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="y" type="xs:double"/><arg name="x" type="xs:double"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="G">The result is the value of <code>atan2(y, x)</code> as defined in the\n                <bibref ref="ieee754-2008"/> specification of the <code>atan2</code> function applied\n             to 64-bit binary floating point values.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The treatment of the <code>underflow</code> exception is defined in <specref ref="op.numeric"/>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <phrase diff="chg" at="L">either argument</phrase> is <code>NaN</code>\n             then the result is <code>NaN</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$y</code> is positive and <code>$x</code> is positive and finite, then\n             (subject to rules for overflow, underflow and approximation)\n          the value of <code>atan2($y, $x)</code> is <code>atan($y div $x)</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$y</code> is positive and <code>$x</code> is negative and finite, then\n             (subject to the same caveats)\n             the value of <code>atan2($y, $x)</code> is <var>π</var> <code>- atan($y div $x)</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Some results for special values of the arguments are shown in the examples below.</p></div>\n',summary:"<p>  Returns the angle in radians subtended at the origin by the point on a plane\n             with coordinates (x, y) and the positive x-axis, the result being in the range\n                - π  to + π .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"y",type:"xs:double",occurrence:null,description:""},{name:"x",type:"xs:double",occurrence:null,description:""}],returns:{type:"xs:double",description:""},errors:[]},{isDocumented:!0,arity:1,name:"cos",qname:"math:cos",signature:"($theta as xs:double?) as xs:double? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the cosine of the argument, expressed in radians.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="cos" return-type="xs:double?" isOp="no" prefix="math" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="θ" type="xs:double?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$</code><var>θ</var> is the empty sequence, the function returns the empty\n             sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$</code><var>θ</var> is positive or negative infinity, or <code>NaN</code>,\n             then the result is <code>NaN</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="G">Otherwise the result is the cosine of <code>$</code><var>θ</var>,\n             treated as an angle in radians, as defined in the <bibref ref="ieee754-2008"/>\n             specification of the <code>cos</code> function applied to 64-bit binary floating point\n             values.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The treatment of the <code>invalidOperation</code> exception is defined in <specref ref="op.numeric"/>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$</code><var>θ</var> is positive or negative zero, the result is\n                <code>$</code><var>θ</var>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$</code><var>θ</var> is positive or negative infinity, or <code>NaN</code>,\n             then the result is <code>NaN</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise the result is always in the range -1.0e0 to +1.0e0</p></div>\n',summary:"<p>  Returns the cosine of the argument, expressed in radians.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"theta",type:"xs:double",occurrence:"?",description:""}],returns:{type:"xs:double?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"exp",qname:"math:exp",signature:"($arg as xs:double?) as xs:double? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the value of <var>e</var><sup><var>x</var></sup>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="exp" return-type="xs:double?" isOp="no" prefix="math" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:double?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, the function returns the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="G">Otherwise the result is the mathematical constant <var>e</var>\n             raised to the power of <code>$arg</code>, as defined in the <bibref ref="ieee754-2008"/>\n             specification of the <code>exp</code> function applied to 64-bit binary floating point\n             values.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The treatment of overflow and underflow is defined in <specref ref="op.numeric"/>.</p></div>\n',summary:"<p>  Returns the value of  e x .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:double",occurrence:"?",description:""}],returns:{type:"xs:double?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"exp10",qname:"math:exp10",signature:"($arg as xs:double?) as xs:double? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the value of <code>10</code><sup><var>x</var></sup>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="exp10" return-type="xs:double?" isOp="no" prefix="math" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:double?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, the function returns the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="G">Otherwise the result is ten raised to the power of <code>$arg</code>,\n             as defined in the <bibref ref="ieee754-2008"/> specification of the <code>exp10</code>\n             function applied to 64-bit binary floating point values.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The treatment of overflow and underflow is defined in <specref ref="op.numeric"/>.</p></div>\n',summary:"<p>  Returns the value of  10 x .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:double",occurrence:"?",description:""}],returns:{type:"xs:double?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"log",qname:"math:log",signature:"($arg as xs:double?) as xs:double? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the natural logarithm of the argument.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="log" return-type="xs:double?" isOp="no" prefix="math" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:double?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, the function returns the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="G">Otherwise the result is the natural logarithm of <code>$arg</code>, as\n             defined in the <bibref ref="ieee754-2008"/> specification of the <code>log</code>\n             function applied to 64-bit binary floating point values.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The treatment of <code>divideByZero</code> and <code>invalidOperation</code> exceptions\n             is defined in <specref ref="op.numeric"/>. The effect is that if the argument is less\n             than or equal to zero, the result is <code>NaN</code>.</p></div>\n',summary:"<p>  Returns the natural logarithm of the argument.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:double",occurrence:"?",description:""}],returns:{type:"xs:double?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"log10",qname:"math:log10",signature:"($arg as xs:double?) as xs:double? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the base-ten logarithm of the argument.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="log10" return-type="xs:double?" isOp="no" prefix="math" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:double?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, the function returns the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="G">Otherwise the result is the base-10 logarithm of <code>$arg</code>, as\n             defined in the <bibref ref="ieee754-2008"/> specification of the <code>log10</code>\n             function applied to 64-bit binary floating point values.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The treatment of <code>divideByZero</code> and <code>invalidOperation</code> exceptions\n             is defined in <specref ref="op.numeric"/>. The effect is that if the argument is less\n             than or equal to zero, the result is <code>NaN</code>.</p></div>\n',summary:"<p>  Returns the base-ten logarithm of the argument.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:double",occurrence:"?",description:""}],returns:{type:"xs:double?",description:""},errors:[]},{isDocumented:!0,arity:0,name:"pi",qname:"math:pi",signature:"() as xs:double external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns an approximation to the mathematical constant <var>π</var>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="pi" return-type="xs:double" isOp="no" prefix="math" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"/></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function returns the <code>xs:double</code> value whose lexical representation is\n             3.141592653589793e0</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>2*math:pi()</code> returns <code>6.283185307179586e0</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The expression <code>60 * (math:pi() div 180)</code> converts an angle of 60 degrees\n                to radians. </p></div>\n',summary:"<p>  Returns an approximation to the mathematical constant  π .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:double",description:""},errors:[]},{isDocumented:!0,arity:2,name:"pow",qname:"math:pow",signature:"($x as xs:double?, $y as numeric) as xs:double? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the result of raising the first argument to the power of the\n             second.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="pow" return-type="xs:double?" isOp="no" prefix="math" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="x" type="xs:double?"/><arg name="y" type="numeric"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$x</code> is the empty sequence, the function returns the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$y</code> is an instance of <code>xs:integer</code>, the result is\n                <code>$x</code> raised to the power of <code>$y</code> as defined in the <bibref ref="ieee754-2008"/> specification of the <code>pown</code> function applied to a\n             64-bit binary floating point value and an integer.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise <code>$y</code> is converted to an <code>xs:double</code> by numeric\n             promotion, and the result is the value of <code>$x</code> raised to the power of\n                <code>$y</code> as defined in the <bibref ref="ieee754-2008"/> specification of the\n                <code>pow</code> function applied to two 64-bit binary floating point values.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The treatment of the <code>divideByZero</code> and <code>invalidOperation</code>\n             exceptions is defined in <specref ref="op.numeric"/>. Some of the consequences are\n             illustrated in the examples below.</p></div>\n',summary:"<p>  Returns the result of raising the first argument to the power of the\n             second.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"x",type:"xs:double",occurrence:"?",description:""},{name:"y",type:"numeric",occurrence:null,description:""}],returns:{type:"xs:double?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"sin",qname:"math:sin",signature:"($theta as xs:double?) as xs:double? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the sine of the argument, expressed in radians.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="sin" return-type="xs:double?" isOp="no" prefix="math" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="θ" type="xs:double?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$</code><var>θ</var> is the empty sequence, the function returns the empty\n             sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="G">Otherwise the result is the sine of <code>$</code><var>θ</var>,\n             treated as an angle in radians, as defined in the <bibref ref="ieee754-2008"/>\n             specification of the <code>sin</code> function applied to 64-bit binary floating point\n             values.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The treatment of the <code>invalidOperation</code> and <code>underflow</code> exceptions\n             is defined in <specref ref="op.numeric"/>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$</code><var>θ</var> is positive or negative zero, the result is\n                <code>$</code><var>θ</var>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$</code><var>θ</var> is positive or negative infinity, or <code>NaN</code>,\n             then the result is <code>NaN</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Otherwise the result is always in the range -1.0e0 to +1.0e0</p></div>\n',summary:"<p>  Returns the sine of the argument, expressed in radians.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"theta",type:"xs:double",occurrence:"?",description:""}],returns:{type:"xs:double?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"sqrt",qname:"math:sqrt",signature:"($arg as xs:double?) as xs:double? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the non-negative square root of the argument.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="sqrt" return-type="xs:double?" isOp="no" prefix="math" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="arg" type="xs:double?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is the empty sequence, the function returns the empty sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="G">Otherwise the result is the mathematical non-negative square root of\n                <code>$arg</code> as defined in the <bibref ref="ieee754-2008"/> specification of the\n                <code>squareRoot</code> function applied to 64-bit binary floating point values.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The treatment of the <code>invalidOperation</code> exception is defined in <specref ref="op.numeric"/>. The effect is that if the argument is less than zero, the result\n             is <code>NaN</code>.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$arg</code> is positive or negative zero, positive infinity, or\n                <code>NaN</code>, then the result is <code>$arg</code>. (Negative zero is the only\n             case where the result can have negative sign)</p></div>\n',summary:"<p>  Returns the non-negative square root of the argument.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:double",occurrence:"?",description:""}],returns:{type:"xs:double?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"tan",qname:"math:tan",signature:"($theta as xs:double?) as xs:double? external",description:' <div xmlns:xqdoc="http://www.xqdoc.org/1.0"><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">Returns the tangent of the argument, expressed in radians.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax"><example role="signature"><proto name="tan" return-type="xs:double?" isOp="no" prefix="math" returnEmptyOk="no" returnSeq="no" returnVaries="no" isSchema="no" isDatatype="no" isSpecial="no"><arg name="θ" type="xs:double?"/></proto></example></p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">This function is <termref def="dt-deterministic">deterministic</termref>, <termref def="dt-context-independent">context-independent</termref>,  and <termref def="dt-focus-independent">focus-independent</termref>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$</code><var>θ</var> is the empty sequence, the function returns the empty\n             sequence.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax" diff="chg" at="G">Otherwise the result is the tangent of <code>$</code><var>θ</var>,\n             treated as an angle in radians, as defined in the <bibref ref="ieee754-2008"/>\n             specification of the <code>tan</code> function applied to 64-bit binary floating point\n             values.</p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">The treatment of the <code>invalidOperation</code> and <code>underflow</code> exceptions\n             is defined in <specref ref="op.numeric"/>. </p><p xmlns:e="http://www.w3.org/1999/XSL/Spec/ElementSyntax">If <code>$</code><var>θ</var> is positive or negative infinity, or <code>NaN</code>,\n             then the result is <code>NaN</code>.</p></div>\n',summary:"<p>  Returns the tangent of the argument, expressed in radians.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"theta",type:"xs:double",occurrence:"?",description:""}],returns:{type:"xs:double?",description:""},errors:[]}],variables:[]},"http://www.zorba-xquery.com/modules/oauth/client":{ns:"http://www.zorba-xquery.com/modules/oauth/client",description:' This module provides the functions necessary to acquire access to the personal\n resources of a user through the open standard called\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://oauth.net/" target="_blank">OAuth</a>.\n The application/mashup creator does not need to know the\n specifics of <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://oauth.net/" target="_blank">OAuth</a> to use this module.\n',sees:['<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0"><a href="http://oauth.net/" target="_blank">OAuth Website</a></xqdoc:see>'],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Stephanie Russell</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0"><a href="mailto:william.candillon@28msec.com">William Candillon</a></xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://zorba.io/modules/base64",prefix:"base64"},{uri:"http://zorba.io/features",prefix:"f"},{uri:"http://zorba.io/modules/hmac",prefix:"hmac"},{uri:"http://expath.org/ns/http-client",prefix:"http"},{uri:"http://expath.org/ns/http-client",prefix:"http-client"},{uri:"http://www.zorba-xquery.com/modules/oauth/client",prefix:"oauth"},{uri:"http://www.zorba-xquery.com/modules/oauth/error",prefix:"oerr"},{uri:"http://zorba.io/options/features",prefix:"op"},{uri:"http://www.zorba-xquery.com/schemas/oauth/parameters",prefix:"p"},{uri:"http://zorba.io/modules/random",prefix:"ra"},{uri:"http://www.zorba-xquery.com/schemas/oauth/service-provider",prefix:"sp"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:2,name:"access-token",qname:"oauth:access-token",signature:"($service-provider as schema-element(sp:service-provider), $parameters as schema-element(p:parameters)) as schema-element(p:parameters)",description:" This function allows the client to obtain a set of token credentials from the service provider by making an authenticated HTTP request to the Token Request endpoint.\n This function is provided for convenience.\n",summary:"<p> This function allows the client to obtain a set of token credentials from the service provider by making an authenticated HTTP request to the Token Request endpoint.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"service-provider",type:"schema-element(sp:service-provider)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Contains service provider information</div>'},{name:"parameters",type:"schema-element(p:parameters)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> parameters</div>'}],returns:{type:"schema-element(p:parameters)",description:'token credentials correctly parsed as parameter elements, or an error if http response status is not 200 OK <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static" ace-mode="xquery"> let $service-provider := oauth:service-provider(...) let $parameters := oauth:parameters("oauth_token", "#") let $parameters := oauth:add-parameter($parameters, "oauth_token_secret", "#") let $tokens := oauth:access-token($service-provider, $parameters) ... </pre>'},errors:[]},{isDocumented:!0,arity:3,name:"add-parameter",qname:"oauth:add-parameter",signature:"($parameters as schema-element(p:parameters)?, $name as xs:string, $value as xs:string) as schema-element(p:parameters)",description:' Adds an OAuth parameter to an OAuth Parameters instance.\n Instances of OAuth parameters are used to\n contain value/pair data such as <em xmlns:xqdoc="http://www.xqdoc.org/1.0">oauth_token</em>\n and <em xmlns:xqdoc="http://www.xqdoc.org/1.0">oauth_token_secret</em>.\n For instance the following code snippet:\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static" ace-mode="xquery">\n  let $params := oauth:parameters("oauth_token", "#")\n  let $params := oauth:add-parameter($params, "oauth_token_secret", "#")\n  return $params\n </pre>\n Returns the following XML schema instance:\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static" ace-mode="xquery">\n <p:parameters xmlns:p="http://www.zorba-xquery.com/schemas/oauth/parameters">\n   <p:parameter name="oauth_token" value="#"/>\n   <p:parameter name="oauth_token_secret" value="#"/>\n </p:parameters>\n </pre>\n',summary:"<p> Adds an OAuth parameter to an OAuth Parameters instance.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"parameters",type:"schema-element(p:parameters)",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> parameters</div>'},{name:"name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> parameter name</div>'},{name:"value",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> parameter value</div>'}],returns:{type:"schema-element(p:parameters)",description:"instance of the OAuth parameters XML schema."},errors:[]},{isDocumented:!0,arity:2,name:"parameter",qname:"oauth:parameter",signature:"($params as schema-element(p:parameters), $string as xs:string) as xs:string",description:" This function returns the string value of the parameters whose key matches a $string input.\n",summary:"<p> This function returns the string value of the parameters whose key matches a $string input.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"params",type:"schema-element(p:parameters)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> element parameters</div>'},{name:"string",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> string as the "key" name</div>'}],returns:{type:"xs:string",description:'string value of the parameter with key $string <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static" ace-mode="xquery"> let $params := oauth:parameters("oauth_token", "token") let $params := oauth:add-parameter($params, "oauth_token_secret", "secret") let $token-secret := oauth:parameter($params, "oauth_token_secret") return $token-secret </pre>'},errors:[]},{isDocumented:!0,arity:2,name:"parameters",qname:"oauth:parameters",signature:"($name as xs:string, $value as xs:string) as element(p:parameters)",description:' Create an OAuth Parameters instance.\n Instances of OAuth parameters are used to\n contain value/pair data such as <em xmlns:xqdoc="http://www.xqdoc.org/1.0">oauth_token</em>\n and <em xmlns:xqdoc="http://www.xqdoc.org/1.0">oauth_token_secret</em>.\n For instance the following code snippet:\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static" ace-mode="xquery">\n  oauth:parameters("oauth_token", "#")\n </pre>\n Returns the following XML schema instance:\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static" ace-mode="xml">\n <p:parameters xmlns:p="http://www.zorba-xquery.com/schemas/oauth/parameters">\n   <p:parameter name="oauth_token" value="#"/>\n </p:parameters>\n </pre>\n',summary:"<p> Create an OAuth Parameters instance.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> parameter name</div>'},{name:"value",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> parameter value</div>'}],returns:{type:"element(p:parameters)",description:"instance of the OAuth parameters XML schema."},errors:[]},{isDocumented:!0,arity:3,name:"protected-resource",qname:"oauth:protected-resource",signature:"($protected-resource as schema-element(http:request), $service-provider as schema-element(sp:service-provider), $parameters as schema-element(p:parameters)) as item()*",description:" This function allows the client access to the protected resources of the user.\n This function is provided for convenience.\n",summary:"<p> This function allows the client access to the protected resources of the user.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"protected-resource",type:"schema-element(http:request)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> (Not schema-validated) http:request element with http method and href.</div>'},{name:"service-provider",type:"schema-element(sp:service-provider)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Information about the service provider</div>'},{name:"parameters",type:"schema-element(p:parameters)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> parameters</div>'}],returns:{type:"item()*",description:'protected resources parsed as parameter elements, or an error if http response status is not 200 OK <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static" ace-mode="xquery"> let $tokens := oauth:parameters("oauth_token", "#") let $tokens := oauth:add-parameter($tokens, "oauth_token_secret", "#") let $service-provider := oauth:service-provider(...) let $request := validate { <request xmlns="http://expath.org/ns/http-client" href="http://twitter.com/account/verify_credentials.xml" method="GET"/> } return oauth:protected-resource($request, $service-provider, $tokens) </pre>'},errors:[]},{isDocumented:!0,arity:1,name:"request-token",qname:"oauth:request-token",signature:"($service-provider as schema-element(sp:service-provider)) as schema-element(p:parameters)",description:' This function allows the client to obtain a set of temporary credentials from the service provider by making an authenticated HTTP request to the Temporary Credential Request endpoint.\n This function is provided for convenience for <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#request-token-2">request-token#2</a>.\n Invoking this function is equivalent to:\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static" ace-mode="xquery">\n oauth:request-token($service-provider, ())\n </pre>\n',summary:"<p> This function allows the client to obtain a set of temporary credentials from the service provider by making an authenticated HTTP request to the Temporary Credential Request endpoint.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"service-provider",type:"schema-element(sp:service-provider)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Information about the service provider</div>'}],returns:{type:"schema-element(p:parameters)",description:"temporary credentials correctly parsed as parameter elements, or an error if http response status is not 200 OK"},errors:[]},{isDocumented:!0,arity:2,name:"request-token",qname:"oauth:request-token",signature:"($service-provider as schema-element(sp:service-provider), $parameters as schema-element(p:parameters)?) as schema-element(p:parameters)",description:" This function allows the client to obtain a set of temporary credentials from the service provider by making an authenticated HTTP request to the Temporary Credential Request endpoint.\n This function is provided for convenience.\n",summary:"<p> This function allows the client to obtain a set of temporary credentials from the service provider by making an authenticated HTTP request to the Temporary Credential Request endpoint.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"service-provider",type:"schema-element(sp:service-provider)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Information about the service provider</div>'},{name:"parameters",type:"schema-element(p:parameters)",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Additionnal parameters to the request</div>'}],returns:{type:"schema-element(p:parameters)",description:'temporary credentials correctly parsed as parameter elements, or an error if http response status is not 200 OK <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static" ace-mode="xquery"> let $twitter-config := oauth:service-provider(...) let $additional-parameter := oauth:parameters("foo", "bar") let $tokens := oauth:request-token($twitter-config, $additional-parameter) let $token := oauth:parameter($tokens, "oauth_token") let $token-secret := oauth:parameter($tokens, "oauth_token_secret") ... </pre>'},errors:[]},{isDocumented:!0,arity:10,name:"service-provider",qname:"oauth:service-provider",signature:"($consumer-key as xs:string, $consumer-secret as xs:string, $signature-method as xs:string, $realm as xs:string, $authorize-url as xs:string, $request-token-method as xs:string, $request-token-url as xs:string, $request-token-callback-url as xs:string, $access-token-method as xs:string, $access-token-url as xs:string) as schema-element(sp:service-provider)",description:' Utility function to build a service provider object.\n This object contains the information required by the\n OAuth client to interact with an OAuth service provider.\n For instance the following expression:\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static" ace-mode="xquery">\n let $consumer-key     := "#"\n let $consumer-secret  := "#"\n let $signature-method := "HMAC-SHA1"\n let $realm            := "twitter.com"\n let $authorize-url    := "http://api.twitter.com/oauth/authorize"\n let $request-token-method := "POST"\n let $request-token-url := "https://twitter.com/oauth/request_token"\n let $request-token-callback-url := "https://twitter.com/oauth/request_token"\n let $access-token-method := "POST"\n let $access-token-url := "https://api.twitter.com/oauth/access_token"\n return oauth:service-provider(\n   $consumer-key, $consumer-secret, $signature-method,\n   $realm, $authorize-url, $request-token-method,\n   $request-token-url, $request-token-callback-url,\n   $access-token-method, $access-token-url\n )\n </pre>\n Will return the following XML schema instance:\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static" ace-mode="xml">\n <sp:service-provider xmlns:sp="http://www.zorba-xquery.com/schemas/oauth/service-provider" consumer-key="#" consumer-secret="#" signature-method="HMAC-SHA1" realm="twitter.com" authorize-url="http://api.twitter.com/oauth/authorize">\n   <sp:request-token method="POST" href="https://twitter.com/oauth/request_token" callback-url="https://twitter.com/oauth/request_token"/>\n   <sp:access-token method="POST" href="https://api.twitter.com/oauth/access_token"/>\n </sp:service-provider>\n </pre>\n',summary:"<p> Utility function to build a service provider object.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"consumer-key",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Client Identifier, also known as the consumer-key</div>'},{name:"consumer-secret",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Client Shared-Secret, also known as the consumer-secret</div>'},{name:"signature-method",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Method with which the signing key is signed (typically HMAC-SHA1)</div>'},{name:"realm",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Realm that defines the protection space</div>'},{name:"authorize-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> authorize-url</div>'},{name:"request-token-method",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> request-token-method</div>'},{name:"request-token-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> request-token-url</div>'},{name:"request-token-callback-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> request-token-callback-url</div>'},{name:"access-token-method",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> access-token-method</div>'},{name:"access-token-url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> access-token-url</div>'}],returns:{type:"schema-element(sp:service-provider)",description:"instance of the OAuth service provider XML schema."},errors:[]}],variables:[]},"http://www.28msec.com/modules/http/util/multipart":{ns:"http://www.28msec.com/modules/http/util/multipart",description:" This module provides utility functions to help dealing with the\n content of multipart requests.\n In their implementation, all the functions use the multipart\n related functions of the request module (e.g. parts() or text-part()).\n",sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">28msec</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://www.28msec.com/modules/http/util/multipart",prefix:"multipart"},{uri:"http://www.28msec.com/modules/http/request",prefix:"req"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"binary-content",qname:"multipart:binary-content",signature:"($name as xs:string) as xs:base64Binary*",description:" Returns the contents of the parts/files in the multipart requests with\n the given part name as xs:base64Binary.\n",summary:"<p> Returns the contents of the parts/files in the multipart requests with\n the given part name as xs:base64Binary.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the requested part.</div>'}],returns:{type:"xs:base64Binary*",description:"the said content or the empty sequence if no part with the given name exists."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:non-multipart if the current request does not contain multipart content</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:invalid-multipart if the multipart content is invalid (e.g. the boundary is missing)</xqdoc:error>']},{isDocumented:!0,arity:1,name:"binary-file",qname:"multipart:binary-file",signature:"($filename as xs:string) as xs:base64Binary*",description:" Returns the contents of the part/file in the multipart requests with\n the given filename as xs:base64Binary.\n Please note that the file is identified by the filename (and not the\n name of the part) that is contained in the Content-Disposition header\n of the part.\n",summary:"<p> Returns the contents of the part/file in the multipart requests with\n the given filename as xs:base64Binary.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"filename",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the requested file.</div>'}],returns:{type:"xs:base64Binary*",description:"the said content or the empty sequence if no part with the given filename exists."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:non-multipart if the current request does not contain multipart content</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:invalid-multipart if the multipart content is invalid (e.g. the boundary is missing)</xqdoc:error>']},{isDocumented:!0,arity:1,name:"content-length",qname:"multipart:content-length",signature:"($name as xs:string) as xs:integer*",description:" Returns the content length of the parts/files in the multipart requests with\n the given part name as xs:integer.\n",summary:"<p> Returns the content length of the parts/files in the multipart requests with\n the given part name as xs:integer.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the requested part.</div>'}],returns:{type:"xs:integer*",description:"The content-length in bytes of the parts/files or the empty sequence if the part does not exist"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:non-multipart if the current request does not contain multipart content</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:invalid-multipart if the multipart content is invalid (e.g. the boundary is missing)</xqdoc:error>']},{isDocumented:!0,arity:1,name:"content-type",qname:"multipart:content-type",signature:"($name as xs:string) as xs:string*",description:" Returns the content type of the parts/files in the multipart requests with\n the given part name as xs:string.\n",summary:"<p> Returns the content type of the parts/files in the multipart requests with\n the given part name as xs:string.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the requested part.</div>'}],returns:{type:"xs:string*",description:"The content-types of the parts/files or the empty sequence if the part does not exist"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:non-multipart if the current request does not contain multipart content</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:invalid-multipart if the multipart content is invalid (e.g. the boundary is missing)</xqdoc:error>']},{isDocumented:!0,arity:1,name:"filename",qname:"multipart:filename",signature:"($name as xs:string) as xs:string*",description:" Returns the filenames of the parts/files in the multipart requests with\n the given part name as xs:string.\n",summary:"<p> Returns the filenames of the parts/files in the multipart requests with\n the given part name as xs:string.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the requested part.</div>'}],returns:{type:"xs:string*",description:"The filename of the parts/files or the empty sequence if the part does not exist"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:non-multipart if the current request does not contain multipart content</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:invalid-multipart if the multipart content is invalid (e.g. the boundary is missing)</xqdoc:error>']},{isDocumented:!0,arity:0,name:"filenames",qname:"multipart:filenames",signature:"() as xs:string*",description:" Returns the filenames of all the parts contained in the multipart\n content of the given request.\n",summary:"<p> Returns the filenames of all the parts contained in the multipart\n content of the given request.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:string*",description:"the said filenames"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:non-multipart if the current request does not contain multipart content</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:invalid-multipart if the multipart content is invalid (e.g. the boundary is missing)</xqdoc:error>']},{isDocumented:!0,arity:0,name:"names",qname:"multipart:names",signature:"() as xs:string*",description:" Returns the names of all the parts contained in the multipart\n content of the given request.\n",summary:"<p> Returns the names of all the parts contained in the multipart\n content of the given request.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:string*",description:"the said names"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:non-multipart if the current request does not contain multipart content</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:invalid-multipart if the multipart content is invalid (e.g. the boundary is missing)</xqdoc:error>']},{isDocumented:!0,arity:1,name:"part",qname:"multipart:part",signature:"($name as xs:string) as element(req:part)*",description:' Returns the <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">req:part</tt> element among all the parts contained\n in the multipart requests with the given name.\n',summary:"<p> Returns the  req:part  element among all the parts contained\n in the multipart requests with the given name.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the requested part.</div>'}],returns:{type:"element(req:part)*",description:"the said part elements or the empty sequence if no part with the given name exists."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:non-multipart if the current request does not contain multipart content</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:invalid-multipart if the multipart content is invalid (e.g. the boundary is missing)</xqdoc:error>']},{isDocumented:!0,arity:1,name:"text-content",qname:"multipart:text-content",signature:"($name as xs:string) as xs:string*",description:" Returns the contents of the parts/files in the multipart requests with\n the given part name as a string.\n It is assumed that the character set of the file is UTF-8.\n",summary:"<p> Returns the contents of the parts/files in the multipart requests with\n the given part name as a string.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the requested part.</div>'}],returns:{type:"xs:string*",description:"the said content or the empty sequence if no part with the given filename exists."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:no-text-content if the value of the part cannot be treated as text</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:non-multipart if the current request does not contain multipart content</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:invalid-multipart if the multipart content is invalid (e.g. the boundary is missing)</xqdoc:error>']},{isDocumented:!0,arity:1,name:"text-file",qname:"multipart:text-file",signature:"($filename as xs:string) as xs:string*",description:" Returns the contents of the part/file in the multipart requests with\n the given filename as a string.\n It is assumed that the character set of the file is UTF-8.\n Please note that the file is identified by the filename (and not the\n name of the part) that is contained in the Content-Disposition header\n of the part.\n",summary:"<p> Returns the contents of the part/file in the multipart requests with\n the given filename as a string.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"filename",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the requested file.</div>'}],returns:{type:"xs:string*",description:"the said content or the empty sequence if no part with the given filename exists."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:no-text-content if the value of the part cannot be treated as text</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:non-multipart if the current request does not contain multipart content</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:invalid-multipart if the multipart content is invalid (e.g. the boundary is missing)</xqdoc:error>']}],variables:[]},"http://zorba.io/modules/excel/statistical-zorba":{ns:"http://zorba.io/modules/excel/statistical-zorba",description:" This module implements some Excel 2003 statistical functions\n that cannot be implemented with standard XQuery functions.\n It uses Zorba specific functions.\n",sees:['<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://office.microsoft.com/en-us/excel/CH062528311033.aspx</xqdoc:see>'],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Daniel Turcanu</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/modules/excel/statistical-zorba",prefix:"excel"},{uri:"http://zorba.io/modules/excel/errors",prefix:"excel-err"},{uri:"http://zorba.io/modules/excel/math",prefix:"excel-math"},{uri:"http://zorba.io/modules/excel/statistical",prefix:"excel-statistical"},{uri:"http://www.w3.org/2005/xpath-functions/math",prefix:"math"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"stdev",qname:"excel:stdev",signature:"($numbers as xs:anyAtomicType+) as xs:anyAtomicType",description:" Estimates standard deviation based on a sample.\n The standard deviation is a measure of how widely values are dispersed\n   from the average value (the mean).\n It is computed with formula:\n sqrt( sum((x-average_x)^2) / (n-1) )    = sqrt ( VAR(numbers) )\n",summary:"<p> Estimates standard deviation based on a sample.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"xs:anyAtomicType",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of numbers or values castable to numeric The sequence can be of any length, from 1 up.</div>'}],returns:{type:"xs:anyAtomicType",description:"the standard deviation, as numeric type"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>']},{isDocumented:!0,arity:1,name:"stdeva",qname:"excel:stdeva",signature:"($numbers as xs:anyAtomicType+) as xs:anyAtomicType",description:" Estimates standard deviation based on a sample.\n The standard deviation is a measure of how widely values are dispersed\n   from the average value (the mean).\n It is computed with formula:\n sqrt( sum((x-average_x)^2) / (n-1) )    = sqrt ( VARA(numbers) )\n",summary:"<p> Estimates standard deviation based on a sample.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"xs:anyAtomicType",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of numbers or values castable to numeric The sequence can be of any length, from 1 up.</div>'}],returns:{type:"xs:anyAtomicType",description:"the standard deviation, as numeric type"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>']},{isDocumented:!0,arity:1,name:"stdevp",qname:"excel:stdevp",signature:"($numbers as xs:anyAtomicType+) as xs:anyAtomicType",description:" Calculates standard deviation based on the entire population given as arguments.\n The standard deviation is a measure of how widely values are dispersed from\n   the average value (the mean).\n It is computed with formula:\n sqrt( sum((x-average_x)^2) / n )    = sqrt ( VARP(numbers) )\n",summary:"<p> Calculates standard deviation based on the entire population given as arguments.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"xs:anyAtomicType",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of numbers or values castable to numeric The sequence can be of any length, from 1 up.</div>'}],returns:{type:"xs:anyAtomicType",description:"the standard deviation, as numeric type"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>']},{isDocumented:!0,arity:1,name:"stdevpa",qname:"excel:stdevpa",signature:"($numbers as xs:anyAtomicType+) as xs:anyAtomicType",description:" Calculates standard deviation based on the entire population given as arguments.\n The standard deviation is a measure of how widely values are dispersed from\n   the average value (the mean).\n It is computed with formula:\n sqrt( sum((x-average_x)^2) / n )    = sqrt ( VARPA(numbers) )\n",summary:"<p> Calculates standard deviation based on the entire population given as arguments.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"numbers",type:"xs:anyAtomicType",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of numbers or values castable to numeric The sequence can be of any length, from 1 up.</div>'}],returns:{type:"xs:anyAtomicType",description:"the standard deviation, as numeric type"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if the parameters cannot be casted to numeric type</xqdoc:error>']},{isDocumented:!0,arity:2,name:"subtotal",qname:"excel:subtotal",signature:"($function_num as xs:integer, $numbers as xs:anyAtomicType*) as xs:anyAtomicType",description:" Moved from math module.\n Returns a subtotal in a sequence of numbers.\n The function applied is given by $function_num.\n",summary:"<p> Moved from math module.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"function_num",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> <dl>defines the function to be applied on sequence values. The possible values are: <dt>1 or 101</dt> <dd> AVERAGE</dd> <dt>2 or 102</dt> <dd> COUNT</dd> <dt>3 or 103</dt> <dd> COUNTA</dd> <dt>4 or 104</dt> <dd> MAX</dd> <dt>5 or 105</dt> <dd> MIN</dd> <dt>6 or 106</dt> <dd> PRODUCT</dd> <dt>7 or 107</dt> <dd> STDEV</dd> <dt>8 or 108</dt> <dd> STDEVP</dd> <dt>9 or 109</dt> <dd> SUM</dd> <dt>10 or 110</dt> <dd> VAR</dd> <dt>11 or 111</dt> <dd> VARP</dd></dl> In this implementation there is no difference between x and 10x.<p/></div>'},{name:"numbers",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of numbers or values castable to numeric. The sequence can be of any length.</div>'}],returns:{type:"xs:anyAtomicType",description:"The function result, as numeric type"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">depends on the function called</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if $function_num is not a value between 1 .. 11 or 101 .. 111</xqdoc:error>']}],variables:[]},"http://www.28msec.com/modules/debug":{ns:"http://www.28msec.com/modules/debug",description:" This module contains internal debug functions.\n",sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Federico Cavalieri</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://www.28msec.com/modules/debug",prefix:"debug"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:0,name:"non-seeakable-streamable-string",qname:"debug:non-seeakable-streamable-string",signature:"() as string external",description:" Returns a non seekable streamable string\n",summary:"<p> Returns a non seekable streamable string\n</p>",annotation_str:" %an:deterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"deterministic",value:""}],updating:!1,parameters:[],returns:{type:"string",description:"a non seekable streamable string"},errors:[]},{isDocumented:!0,arity:1,name:"test-01-cache",qname:"debug:test-01-cache",signature:"($arg as xs:integer) as item()* external",description:' Equivalent to:\n declare %an:cache function local:test-01-cache($x as xs:integer)\n {\n  if ($x &lt; 10)\n  then $x * $x\n  else if ($x &lt; 20)\n  then ()\n  else ($x, " == ", $x * $x)\n };\n',summary:'<p> Equivalent to:\n declare %an:cache function local:test-01-cache($x as xs:integer)\n {\n  if ($x &lt; 10)\n  then $x * $x\n  else if ($x &lt; 20)\n  then ()\n  else ($x, " == ", $x * $x)\n };\n</p>',annotation_str:" %an:cache",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"cache",value:""}],updating:!1,parameters:[{name:"arg",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> as described above</div>'}],returns:{type:"item()*",description:"as described above"},errors:[]},{isDocumented:!0,arity:1,name:"test-01-sd",qname:"debug:test-01-sd",signature:"($arg as xs:integer) as item()* external",description:' Equivalent to:\n declare %an:strictlydeterministic function local:test-01-sd($x as xs:integer)\n {\n  if ($x &lt; 10)\n  then $x * $x\n  else if ($x &lt; 20)\n  then ()\n  else ($x, " == ", $x * $x)\n };\n',summary:'<p> Equivalent to:\n declare %an:strictlydeterministic function local:test-01-sd($x as xs:integer)\n {\n  if ($x &lt; 10)\n  then $x * $x\n  else if ($x &lt; 20)\n  then ()\n  else ($x, " == ", $x * $x)\n };\n</p>',annotation_str:" %an:strictlydeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"strictlydeterministic",value:""}],updating:!1,parameters:[{name:"arg",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> as described above</div>'}],returns:{type:"item()*",description:"as described above"},errors:[]},{isDocumented:!0,arity:1,name:"test-02-cache",qname:"debug:test-02-cache",signature:"($arg) as item()* external",description:" Equivalent to:\n declare %an:cache function local:test-02-cache($arg)\n {\n   serialize($arg),\n   uuid:uuid()\n };\n",summary:"<p> Equivalent to:\n declare %an:cache function local:test-02-cache($arg)\n {\n   serialize($arg),\n   uuid:uuid()\n };\n</p>",annotation_str:" %an:cache",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"cache",value:""}],updating:!1,parameters:[{name:"arg",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> as described above</div>'}],returns:{type:"item()*",description:"as described above"},errors:[]},{isDocumented:!0,arity:1,name:"test-02-sd",qname:"debug:test-02-sd",signature:"($arg) as item()* external",description:" Equivalent to:\n declare %an:strictlydeterministic function local:test-02-sd($arg)\n {\n   serialize($arg),\n   uuid:uuid()\n };\n",summary:"<p> Equivalent to:\n declare %an:strictlydeterministic function local:test-02-sd($arg)\n {\n   serialize($arg),\n   uuid:uuid()\n };\n</p>",annotation_str:" %an:strictlydeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"strictlydeterministic",value:""}],updating:!1,parameters:[{name:"arg",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> as described above</div>'}],returns:{type:"item()*",description:"as described above"},errors:[]},{isDocumented:!0,arity:0,name:"test-03-cache",qname:"debug:test-03-cache",signature:"() as item()* external",description:' Equivalent to:\n declare %an:cache function local:test-03-cache()\n {\n   { "a" : 1 },\n   [1],\n   &lt;a/&gt;,\n   1\n };\n',summary:'<p> Equivalent to:\n declare %an:cache function local:test-03-cache()\n {\n   { "a" : 1 },\n   [1],\n   &lt;a/&gt;,\n   1\n };\n</p>',annotation_str:" %an:cache",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"cache",value:""}],updating:!1,parameters:[],returns:{type:"item()*",description:"as described above"},errors:[]},{isDocumented:!0,arity:0,name:"test-03-sd",qname:"debug:test-03-sd",signature:"() as item()* external",description:' Equivalent to:\n declare %an:strictlydeterministic function local:test-03-sd()\n {\n   { "a" : 1 },\n   [1],\n   &lt;a/&gt;,\n   1\n };\n',summary:'<p> Equivalent to:\n declare %an:strictlydeterministic function local:test-03-sd()\n {\n   { "a" : 1 },\n   [1],\n   &lt;a/&gt;,\n   1\n };\n</p>',annotation_str:" %an:strictlydeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"strictlydeterministic",value:""}],updating:!1,parameters:[],returns:{type:"item()*",description:"as described above"},errors:[]},{isDocumented:!0,arity:2,name:"test-04-cache",qname:"debug:test-04-cache",signature:"($x, $y) as item()* external",description:' Equivalent to:\n declare %an:cache function local:test-04-cache($x, $y)\n {\n   debug:non-seeakable-streamable-string(),\n   {"key" : debug:non-seeakable-streamable-string()},\n   [debug:non-seeakable-streamable-string()],\n   &lt;a&gt;{debug:non-seeakable-streamable-string()}&lt;/a&gt;\n   serialize($x),\n   serialize($y)\n };\n',summary:'<p> Equivalent to:\n declare %an:cache function local:test-04-cache($x, $y)\n {\n   debug:non-seeakable-streamable-string(),\n   {"key" : debug:non-seeakable-streamable-string()},\n   [debug:non-seeakable-streamable-string()],\n   &lt;a&gt;{debug:non-seeakable-streamable-string()}&lt;/a&gt;\n   serialize($x),\n   serialize($y)\n };\n</p>',annotation_str:" %an:cache",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"cache",value:""}],updating:!1,parameters:[{name:"x",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> as described above</div>'},{name:"y",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> as described above</div>'}],returns:{type:"item()*",description:"as described above"},errors:[]},{isDocumented:!0,arity:2,name:"test-04-sd",qname:"debug:test-04-sd",signature:"($x, $y) as item()* external",description:' Equivalent to:\n declare %an:strictlydeterministic function local:test-04-sd($x, $y)\n {\n   debug:non-seeakable-streamable-string(),\n   {"key" : debug:non-seeakable-streamable-string()},\n   [debug:non-seeakable-streamable-string()],\n   &lt;a&gt;{debug:non-seeakable-streamable-string()}&lt;/a&gt;\n   serialize($x),\n   serialize($y)\n };\n',summary:'<p> Equivalent to:\n declare %an:strictlydeterministic function local:test-04-sd($x, $y)\n {\n   debug:non-seeakable-streamable-string(),\n   {"key" : debug:non-seeakable-streamable-string()},\n   [debug:non-seeakable-streamable-string()],\n   &lt;a&gt;{debug:non-seeakable-streamable-string()}&lt;/a&gt;\n   serialize($x),\n   serialize($y)\n };\n</p>',annotation_str:" %an:strictlydeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"strictlydeterministic",value:""}],updating:!1,parameters:[{name:"x",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> as described above</div>'},{name:"y",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> as described above</div>'}],returns:{type:"item()*",description:"as described above"},errors:[]},{isDocumented:!0,arity:2,name:"test-05-cache",qname:"debug:test-05-cache",signature:"($x as xs:boolean, $y) as item()* external",description:" Equivalent to:\n declare %an:cache function local:test-05-cache($x as xs:boolean, $y)\n {\n   if ($x)\n   then $y\n   else $x\n };\n",summary:"<p> Equivalent to:\n declare %an:cache function local:test-05-cache($x as xs:boolean, $y)\n {\n   if ($x)\n   then $y\n   else $x\n };\n</p>",annotation_str:" %an:cache",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"cache",value:""}],updating:!1,parameters:[{name:"x",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> as described above</div>'},{name:"y",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> as described above</div>'}],returns:{type:"item()*",description:"as described above"},errors:[]},{isDocumented:!0,arity:2,name:"test-05-sd",qname:"debug:test-05-sd",signature:"($x as xs:boolean, $y) as item()* external",description:" Equivalent to:\n declare %an:strictlydeterministic function local:test-05-sd($x as xs:boolean, $y)\n {\n   if ($x)\n   then $y\n   else $x\n };\n",summary:"<p> Equivalent to:\n declare %an:strictlydeterministic function local:test-05-sd($x as xs:boolean, $y)\n {\n   if ($x)\n   then $y\n   else $x\n };\n</p>",annotation_str:" %an:strictlydeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"strictlydeterministic",value:""}],updating:!1,parameters:[{name:"x",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> as described above</div>'},{name:"y",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> as described above</div>'}],returns:{type:"item()*",description:"as described above"},errors:[]},{isDocumented:!0,arity:0,name:"uuid",qname:"debug:uuid",signature:"() as string external",description:" This function is not deterministic despite the annotation\n",summary:"<p> This function is not deterministic despite the annotation\n</p>",annotation_str:" %an:deterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"deterministic",value:""}],updating:!1,parameters:[],returns:{type:"string",description:"a uuid"},errors:[]}],variables:[]},"http://zorba.io/modules/json-xml":{ns:"http://zorba.io/modules/json-xml",description:' Using this module, you can parse JSON data into XML, manipulate it like any\n other XML data using XQuery, and serialize the result back as JSON.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n There are many ways to represent JSON data in XML, some loss-less ("round\n tripable") and some lossy ("one way").  Loss-less representations preserve\n the JSON data types <i xmlns:xqdoc="http://www.xqdoc.org/1.0">boolean</i>, <i xmlns:xqdoc="http://www.xqdoc.org/1.0">number</i>, and <i xmlns:xqdoc="http://www.xqdoc.org/1.0">null</i>; lossy\n representations convert all data to strings.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n For a loss-less representation, this module implements that proposed by\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://john.snelson.org.uk/parsing-json-into-xquery">John Snelson</a>.\n For example:\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static" ace-mode="java">\n   {\n     "firstName" : "John",\n     "lastName" : "Smith",\n     "address" : {\n       "streetAddress" : "21 2nd Street",\n       "city" : "New York",\n       "state" : "NY",\n       "postalCode" : 10021\n     },\n     "phoneNumbers" : [ "212 732-1234", "646 123-4567" ]\n   }\n </pre>\n would be represented as:\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static" ace-mode="xquery">\n   &lt;json type="object"&gt;\n     &lt;pair name="firstName" type="string"&gt;John&lt;/pair&gt;\n     &lt;pair name="lastName" type="string"&gt;Smith&lt;/pair&gt;\n     &lt;pair name="address" type="object"&gt;\n       &lt;pair name="streetAddress" type="string"&gt;21 2nd Street&lt;/pair&gt;\n       &lt;pair name="city" type="string"&gt;New York&lt;/pair&gt;\n       &lt;pair name="state" type="string"&gt;NY&lt;/pair&gt;\n       &lt;pair name="postalCode" type="number"&gt;10021&lt;/pair&gt;\n     &lt;/pair&gt;\n     &lt;pair name="phoneNumbers" type="array"&gt;\n       &lt;item type="string"&gt;212 732-1234&lt;/item&gt;\n       &lt;item type="string"&gt;646 123-4567&lt;/item&gt;\n     &lt;/pair&gt;\n   &lt;/json&gt;\n </pre>\n For a lossy representation, this module implements\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://jsonml.org/">JsonML</a> (the array form).\n For example:\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static" ace-mode="java">\n   [ "person",\n     { "created" : "2006-11-11T19:23",\n       "modified" : "2006-12-31T23:59" },\n     [ "firstName", "Robert" ],\n     [ "lastName", "Smith" ],\n     [ "address",\n       { "type" : "home" },\n       [ "street", "12345 Sixth Ave" ],\n       [ "city", "Anytown" ],\n       [ "state", "CA" ],\n       [ "postalCode", "98765-4321" ]\n     ]\n   ]\n </pre>\n would be represented as:\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static" ace-mode="xquery">\n   &lt;person created="2006-11-11T19:23" modified="2006-12-31T23:59"&gt;\n     &lt;firstName&gt;Robert&lt;/firstName&gt;\n     &lt;lastName&gt;Smith&lt;/lastName&gt;\n     &lt;address type="home"&gt;\n       &lt;street&gt;12345 Sixth Ave&lt;/street&gt;\n       &lt;city&gt;Anytown&lt;/city&gt;\n       &lt;state&gt;CA&lt;/state&gt;\n       &lt;postalCode&gt;98765-4321&lt;/postalCode&gt;\n     &lt;/address&gt;\n   &lt;/person&gt;\n </pre>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Paul J. Lucas</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://www.w3.org/2005/xqt-errors",prefix:"err"},{uri:"http://zorba.io/modules/json-xml",prefix:"jx"},{uri:"http://zorba.io/options/versioning",prefix:"ver"},{uri:"http://zorba.io/errors",prefix:"zerr"}],functions:[{isDocumented:!0,arity:1,name:"json-to-xml",qname:"jx:json-to-xml",signature:"($json as json-item()?) as element(*,xs:untyped)?",description:' Converts JSON data into an XDM instance using the Snelson representation\n described above.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n',summary:"<p> Converts JSON data into an XDM instance using the Snelson representation\n described above.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"json",type:"json-item()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The JSON data.</div>'}],returns:{type:"element(*,xs:untyped)?",description:"said XDM instance."},errors:[]},{isDocumented:!0,arity:2,name:"json-to-xml",qname:"jx:json-to-xml",signature:"($json as json-item()?, $options as object()) as element(*,xs:untyped)?",description:' Converts JSON data into an XDM instance using one of the representations\n described above.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n',summary:"<p> Converts JSON data into an XDM instance using one of the representations\n described above.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"json",type:"json-item()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The JSON data.</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The JSON conversion options, for example: <pre> { "json-format" : "JsonML-array" } </pre></div>'}],returns:{type:"element(*,xs:untyped)?",description:"said XDM instance."},errors:[]},{isDocumented:!0,arity:1,name:"xml-to-json",qname:"jx:xml-to-json",signature:"($xml as item()*) as json-item()*",description:' Converts XML data into a JSON item using the Snelson representation\n described above.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n',summary:"<p> Converts XML data into a JSON item using the Snelson representation\n described above.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"xml",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The XML data to convert.</div>'}],returns:{type:"json-item()*",description:"said JSON items."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZJSE0001 if $xml is not a document or element node.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZJSE0002 if $xml contains an element that is missing a required attribute.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZJSE0003 if $xml contains an attribute having an illegal value.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZJSE0004 if $xml contains an illegal element. type.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZJSE0007 if $xml contains an element that is missing a required value.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZJSE0008 if $xml contains an illegal value for a JSON type.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"xml-to-json",qname:"jx:xml-to-json",signature:"($xml as item()*, $options as object()) as json-item()*",description:' Converts XML data into a JSON item using one of the respresentations\n described above.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n',summary:"<p> Converts XML data into a JSON item using one of the respresentations\n described above.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"xml",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The XML data to convert.</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The conversion options, for example: <pre> { "json-format" : "JsonML-array" } </pre></div>'}],returns:{type:"json-item()*",description:"said JSON items."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZJSE0001 if $xml is not a document or element node.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZJSE0002 if $xml contains an element that is missing a required attribute.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZJSE0003 if $xml contains an attribute having an illegal value.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZJSE0004 if $xml contains an illegal element. type.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZJSE0007 if $xml contains an element that is missing a required value.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZJSE0008 if $xml contains an illegal value for a JSON type.</xqdoc:error>']}],variables:[]},"http://www.zorba-xquery.com/modules/image/manipulation":{ns:"http://www.zorba-xquery.com/modules/image/manipulation",description:' This module provides functions to handle image manipulations like resizing, zooming,\n special effects etc.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The errors raised by functions of this module have the namespace\n <tt>http://www.zorba-xquery.com/modules/image/error</tt> (associated with prefix ierr).</p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Daniel Thomas</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://www.w3.org/2005/xqt-errors",prefix:"err"},{uri:"http://www.zorba-xquery.com/modules/image/error",prefix:"ierr"},{uri:"http://www.zorba-xquery.com/modules/image/image",prefix:"image"},{uri:"http://www.zorba-xquery.com/modules/image/manipulation",prefix:"man"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:2,name:"add-noise",qname:"man:add-noise",signature:"($image as xs:base64Binary, $noise-type as xs:string) as xs:base64Binary",description:' Add noise to an image.\n Allowed noise types are:\n <ul xmlns:xqdoc="http://www.xqdoc.org/1.0">\n  <li>UniformNoise</li>\n  <li>GaussianNoise</li>\n  <li>MultiplicativeGaussianNoise</li>\n  <li>ImpulseNoise</li>\n  <li>LaplaceianNoise</li>\n  <li>PoissonNoise</li>\n </ul>\n',summary:"<p> Add noise to an image.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"image",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the source image</div>'},{name:"noise-type",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> specifies the type of noise to add</div>'}],returns:{type:"xs:base64Binary",description:"A copy of $image with added noise"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ierr:IM001 passed image is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FORG0001 unsupported noise type</xqdoc:error>']},{isDocumented:!0,arity:3,name:"blur",qname:"man:blur",signature:"($image as xs:base64Binary, $radius as xs:int, $sigma as xs:int) as xs:base64Binary external",description:" Blur an image.\n",summary:"<p> Blur an image.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"image",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the source image</div>'},{name:"radius",type:"xs:int",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is the radius of the Gaussian in pixels.</div>'},{name:"sigma",type:"xs:int",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is the standard deviation of the Laplacian in pixels.</div>'}],returns:{type:"xs:base64Binary",description:"A blured copy of $image"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ierr:IM001 passed image is invalid</xqdoc:error>']},{isDocumented:!0,arity:3,name:"charcoal",qname:"man:charcoal",signature:"($image as xs:base64Binary, $radius as xs:double, $sigma as xs:double) as xs:base64Binary external",description:" Apply a charcoal effect to the image (looks like a charcoal sketch).\n",summary:"<p> Apply a charcoal effect to the image (looks like a charcoal sketch).</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"image",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the source image</div>'},{name:"radius",type:"xs:double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> radius of the Gaussian in pixels</div>'},{name:"sigma",type:"xs:double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> standard deviation of the Laplacian in pixels</div>'}],returns:{type:"xs:base64Binary",description:"A charcoaled copy of $image"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ierr:IM001 passed image is invalid</xqdoc:error>']},{isDocumented:!0,arity:3,name:"chop",qname:"man:chop",signature:"($image as xs:base64Binary, $upper-left-x as xs:unsignedInt, $upper-left-y as xs:unsignedInt) as xs:base64Binary external",description:" Copy a part of a source image as new image.\n The copied part is all right of $upper-left-x and below $upper-left-y.\n",summary:"<p> Copy a part of a source image as new image.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"image",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> source image</div>'},{name:"upper-left-x",type:"xs:unsignedInt",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> x position of the upper left corner of the part to copy</div>'},{name:"upper-left-y",type:"xs:unsignedInt",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> y position of the upper left corner of the part to copy</div>'}],returns:{type:"xs:base64Binary",description:"A new image copied from a part of source image"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ierr:IM001 passed image is invalid</xqdoc:error>']},{isDocumented:!0,arity:2,name:"contrast",qname:"man:contrast",signature:"($image as xs:base64Binary, $sharpen as xs:double) as xs:base64Binary external",description:" Contrast an image (enhances image intensity differences) by a given value.\n",summary:"<p> Contrast an image (enhances image intensity differences) by a given value.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"image",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the source image</div>'},{name:"sharpen",type:"xs:double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> defines how much the image is contrasted.</div>'}],returns:{type:"xs:base64Binary",description:"A contrasted copy of $image"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ierr:IM001 passed image is invalid</xqdoc:error>']},{isDocumented:!0,arity:3,name:"crop",qname:"man:crop",signature:"($image as xs:base64Binary, $lower-right-x as xs:unsignedInt, $lower-right-y as xs:unsignedInt) as xs:base64Binary external",description:" Copy a part of a source image as new image.\n The copied part is all left of $lower-right-x and above $lower-right-y.\n",summary:"<p> Copy a part of a source image as new image.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"image",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> source image</div>'},{name:"lower-right-x",type:"xs:unsignedInt",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> x position of the lower right corner of the part to copy</div>'},{name:"lower-right-y",type:"xs:unsignedInt",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> y position of the lower right corner of the part to copy</div>'}],returns:{type:"xs:base64Binary",description:"A new image copied from a part of source image"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ierr:IM001 passed image is invalid</xqdoc:error>']},{isDocumented:!0,arity:1,name:"despeckle",qname:"man:despeckle",signature:"($image as xs:base64Binary) as xs:base64Binary external",description:" Despeckle an image.\n",summary:"<p> Despeckle an image.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"image",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the source image</div>'}],returns:{type:"xs:base64Binary",description:"A despeckled copy of $image"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ierr:IM001 passed image is invalid</xqdoc:error>']},{isDocumented:!0,arity:2,name:"edge",qname:"man:edge",signature:"($image as xs:base64Binary, $radius as xs:unsignedInt) as xs:base64Binary external",description:" Highlight edges in an image.\n",summary:"<p> Highlight edges in an image.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"image",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the source image</div>'},{name:"radius",type:"xs:unsignedInt",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> radius of the pixel neighborhood (0 for automatic selection)</div>'}],returns:{type:"xs:base64Binary",description:"An edged copy of $image"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ierr:IM001 passed image is invalid</xqdoc:error>']},{isDocumented:!0,arity:3,name:"emboss",qname:"man:emboss",signature:"($image as xs:base64Binary, $radius as xs:double, $sigma as xs:double) as xs:base64Binary external",description:" Emboss an images (highlights edges with 3D effect).\n",summary:"<p> Emboss an images (highlights edges with 3D effect).</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"image",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the source image</div>'},{name:"radius",type:"xs:double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> radius of the Gaussian in pixels</div>'},{name:"sigma",type:"xs:double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> standard deviation of the Laplacian in pixels</div>'}],returns:{type:"xs:base64Binary",description:"An embossed copy of $image"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ierr:IM001 passed image is invalid</xqdoc:error>']},{isDocumented:!0,arity:1,name:"enhance",qname:"man:enhance",signature:"($image as xs:base64Binary) as xs:base64Binary external",description:" Enhance an images (minimizes noise).\n",summary:"<p> Enhance an images (minimizes noise).</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"image",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the source image</div>'}],returns:{type:"xs:base64Binary",description:"An enhanced copy of $image."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ierr:IM001 passed image is invalid</xqdoc:error>']},{isDocumented:!0,arity:1,name:"equalize",qname:"man:equalize",signature:"($image as xs:base64Binary) as xs:base64Binary external",description:" Equalize an images (histogramm equalization).\n",summary:"<p> Equalize an images (histogramm equalization).</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"image",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the source image</div>'}],returns:{type:"xs:base64Binary",description:"An equalized copy of $image."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ierr:IM001 passed image is invalid</xqdoc:error>']},{isDocumented:!0,arity:1,name:"erase",qname:"man:erase",signature:"($image as xs:base64Binary) as xs:base64Binary external",description:" Set all pixels of the image to the current backround color.\n In most cases, this will result in all pixels to be set to white.\n",summary:"<p> Set all pixels of the image to the current backround color.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"image",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> image to erase</div>'}],returns:{type:"xs:base64Binary",description:"A copy of image with all pixels set to the current background color"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ierr:IM001 passed image is invalid</xqdoc:error>']},{isDocumented:!0,arity:1,name:"flip",qname:"man:flip",signature:"($image as xs:base64Binary) as xs:base64Binary external",description:" Flip an image (vertical rotation).\n",summary:"<p> Flip an image (vertical rotation).</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"image",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> source image</div>'}],returns:{type:"xs:base64Binary",description:"A vertically rotated copy of $image"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ierr:IM001 passed image is invalid</xqdoc:error>']},{isDocumented:!0,arity:1,name:"flop",qname:"man:flop",signature:"($image as xs:base64Binary) as xs:base64Binary external",description:" Flop an image (horizontal rotation).\n",summary:"<p> Flop an image (horizontal rotation).</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"image",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> source image</div>'}],returns:{type:"xs:base64Binary",description:"A horizontally rotated copy of $image"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ierr:IM001 passed image is invalid</xqdoc:error>']},{isDocumented:!0,arity:2,name:"gamma",qname:"man:gamma",signature:"($image as xs:base64Binary, $gamma-value as xs:double) as xs:base64Binary external",description:" Gamma correct an image.\n Gamma values less than zero will erase the image.\n",summary:"<p> Gamma correct an image.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"image",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the source image</div>'},{name:"gamma-value",type:"xs:double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> value for which to gamma correct the image</div>'}],returns:{type:"xs:base64Binary",description:"A gamma corrected copy of $image"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ierr:IM001 passed image is invalid</xqdoc:error>']},{isDocumented:!0,arity:4,name:"gamma",qname:"man:gamma",signature:"($image as xs:base64Binary, $gamma-red as xs:double, $gamma-green as xs:double, $gamma-blue as xs:double) as xs:base64Binary external",description:" Gamma correct an image for every color channel seperately.\n Gamma values less than zero for any color will erase the corresponding color.\n",summary:"<p> Gamma correct an image for every color channel seperately.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"image",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the source image</div>'},{name:"gamma-red",type:"xs:double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> value to gamma correct the red channel of the image</div>'},{name:"gamma-green",type:"xs:double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> value to gamma correct the green channel of the image</div>'},{name:"gamma-blue",type:"xs:double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> value to gamma correct the blue channel of the image</div>'}],returns:{type:"xs:base64Binary",description:"A gamma corrected copy of $image"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ierr:IM001 passed image is invalid</xqdoc:error>']},{isDocumented:!0,arity:2,name:"implode",qname:"man:implode",signature:"($image as xs:base64Binary, $factor as xs:double) as xs:base64Binary external",description:" Apply an implode effect to an image (a sort of special effect).\n",summary:"<p> Apply an implode effect to an image (a sort of special effect).</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"image",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the source image</div>'},{name:"factor",type:"xs:double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> factor to implode to</div>'}],returns:{type:"xs:base64Binary",description:"An imploded copy of $image."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ierr:IM001 passed image is invalid</xqdoc:error>']},{isDocumented:!0,arity:2,name:"oil-paint",qname:"man:oil-paint",signature:"($image as xs:base64Binary, $radius as xs:double) as xs:base64Binary external",description:" Apply an oil paint effect to an image (makes the image look as if it was\n an oil paint).\n",summary:"<p> Apply an oil paint effect to an image (makes the image look as if it was\n an oil paint).</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"image",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the source image</div>'},{name:"radius",type:"xs:double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> radius with which to oil paint</div>'}],returns:{type:"xs:base64Binary",description:"A oil-painted copy of $image"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ierr:IM001 passed image is invalid</xqdoc:error>']},{isDocumented:!0,arity:5,name:"overlay",qname:"man:overlay",signature:"($image as xs:base64Binary, $overlay-image as xs:base64Binary, $overlay-upper-left-x as xs:unsignedInt, $overlay-upper-left-y as xs:unsignedInt, $operator as xs:string) as xs:base64Binary",description:' Overlay $image with $overlay-image at the specfied position.\n The $operator defines the details of the overlay and can have one of the\n following values:\n <ul xmlns:xqdoc="http://www.xqdoc.org/1.0">\n   <li>OverCompositeOp: The result is the union of the two image shapes\n       with the overlay image obscuring image in the region of overlap.</li>\n   <li>InCompositeOp: The result is a simple overlay image cut by the shape\n       of image. None of the image data of image is included in the result.</li>\n   <li>OutCompositeOp: The resulting image is the overlay image with the shape\n       of image cut out.</li>\n   <li>AtopCompositeOp: The result is the same shape as image, with overlay\n       image obscuring image there the image shapes overlap. Note that this\n       differs from OverCompositeOp because the portion of composite image\n       outside of image\'s shape does not appear in the result.</li>\n   <li>XorCompositeOp: The result is the image data from both overlay image\n       and image that is outside the overlap region. The overlap region will\n       be blank.</li>\n   <li>PlusCompositeOp: The result is just the sum of the image data of both\n       images. Output values are cropped to 255 (no overflow). This operation\n       is independent of the matte channels.</li>\n   <li>MinusCompositeOp: The result of overlay image - image, with overflow\n       cropped to zero. The matte chanel is ignored (set to 255, full\n       coverage).</li>\n   <li>AddCompositeOp: The result of overlay image + image, with overflow\n       wrapping around (mod 256).</li>\n   <li>SubtractCompositeOp: The result of overlay image - image, with underflow\n       wrapping around (mod 256). The add and subtract operators can be used to\n       perform reverible transformations.</li>\n   <li>DifferenceCompositeOp: The result of abs(overlay image - image). This is\n       useful for comparing two very similar images.</li>\n   <li>BumpmapCompositeOp: The result image shaded by overlay image.</li>\n </ul>\n',summary:"<p> Overlay $image with $overlay-image at the specfied position.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"image",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> base image</div>'},{name:"overlay-image",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> image to overlay.</div>'},{name:"overlay-upper-left-x",type:"xs:unsignedInt",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> horizontal position within $image where the left upper edge of the $overlay-image is placed</div>'},{name:"overlay-upper-left-y",type:"xs:unsignedInt",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> vertical position within $image where the left upper edge of the $overlay-image is placed</div>'},{name:"operator",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> defines how the overlay image should be overlayed (see details in operator listing above)</div>'}],returns:{type:"xs:base64Binary",description:"A new image consisting of $image overlayed with $overlay-image."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ierr:IM001 passed image is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FORG0001 unsupported operator</xqdoc:error>']},{isDocumented:!0,arity:2,name:"reduce-noise",qname:"man:reduce-noise",signature:"($image as xs:base64Binary, $order as xs:double) as xs:base64Binary external",description:" Reduce noise of an image using a noise peak elemination filter.\n",summary:"<p> Reduce noise of an image using a noise peak elemination filter.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"image",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the source image</div>'},{name:"order",type:"xs:double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> defines how much the noise is reduced</div>'}],returns:{type:"xs:base64Binary",description:"A copy of $image with reduced noise"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ierr:IM001 passed image is invalid</xqdoc:error>']},{isDocumented:!0,arity:3,name:"resize",qname:"man:resize",signature:"($image as xs:base64Binary, $width as xs:unsignedInt, $height as xs:unsignedInt) as xs:base64Binary external",description:" Get a copy of the passed image with changed width and height (without\n zooming the image's content).\n To change the size of the actual contents of an image, use the zoom function.\n More in detail: If the new dimensions are greater than the current dimensions\n the new image will have the passed image in the upper left corner and the rest\n will be filled with the current background color.\n If the passed dimensions are less than the current dimensions, the new image\n will contain the specified rectangle of the passed image beginning at the upper\n left corner.\n",summary:"<p> Get a copy of the passed image with changed width and height (without\n zooming the image's content).</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"image",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> image to resize</div>'},{name:"width",type:"xs:unsignedInt",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> new width</div>'},{name:"height",type:"xs:unsignedInt",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> new height</div>'}],returns:{type:"xs:base64Binary",description:"resized copy of the source image"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ierr:IM001 passed image is invalid.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"rotate",qname:"man:rotate",signature:"($image as xs:base64Binary, $angle as xs:int) as xs:base64Binary external",description:" Get a new image as rotated copy of a passed source image (rotated by -360 to\n 360 degrees).\n The image is enlarged if this is required for containing the rotated image,\n but never shrunk even if the rotation would make a smaller image possible.\n",summary:"<p> Get a new image as rotated copy of a passed source image (rotated by -360 to\n 360 degrees).</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"image",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> source image.</div>'},{name:"angle",type:"xs:int",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> between -360 to 360 degrees. Other values will be adjusted by modulo 360</div>'}],returns:{type:"xs:base64Binary",description:"A rotated copy of $image"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ierr:IM001 passed image is invalid</xqdoc:error>']},{isDocumented:!0,arity:2,name:"solarize",qname:"man:solarize",signature:"($image as xs:base64Binary, $factor as xs:double) as xs:base64Binary external",description:" Apply a solarize effect to the image (similar to the effect seen when\n exposing a photographic film to light during the development process).\n",summary:"<p> Apply a solarize effect to the image (similar to the effect seen when\n exposing a photographic film to light during the development process).</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"image",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the source image</div>'},{name:"factor",type:"xs:double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> strength of the solarization (0 to 65535; 65535=100%)</div>'}],returns:{type:"xs:base64Binary",description:"A solarized copy of $image."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ierr:IM001 passed image is invalid</xqdoc:error>']},{isDocumented:!0,arity:2,name:"stereo",qname:"man:stereo",signature:"($left-image as xs:base64Binary, $right-image as xs:base64Binary) as xs:base64Binary external",description:" Make two passed images appear as stereo image when viewed with red-blue glasses.\n Both images should be same but from a slightly different angle for this to work.\n Both images should have the same size, if not, the size of the left image will\n be taken.\n",summary:"<p> Make two passed images appear as stereo image when viewed with red-blue glasses.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"left-image",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> left image for the stereo image.</div>'},{name:"right-image",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> right image for the stereo image.</div>'}],returns:{type:"xs:base64Binary",description:"A new image as combined stereo image of both source images"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ierr:IM001 one of the passed images is invalid</xqdoc:error>']},{isDocumented:!0,arity:5,name:"sub-image",qname:"man:sub-image",signature:"($image as xs:base64Binary, $left-upper-x as xs:unsignedInt, $left-upper-y as xs:unsignedInt, $width as xs:unsignedInt, $height as xs:unsignedInt) as xs:base64Binary external",description:" Copy a part of the source image specified by a rectangle.\n If the passed parameters for the sub-image specify a rectangle that isn't\n entirely within the source image only the area that lies within the image\n boundaries will be returned.\n",summary:"<p> Copy a part of the source image specified by a rectangle.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"image",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the image from which to extract a sub-image</div>'},{name:"left-upper-x",type:"xs:unsignedInt",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is the x value of the upper left corner of the rectangle to cut out</div>'},{name:"left-upper-y",type:"xs:unsignedInt",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is the y value of the upper left corner of the rectangle to cut out.</div>'},{name:"width",type:"xs:unsignedInt",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> width of the rectangle to cut out</div>'},{name:"height",type:"xs:unsignedInt",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> height of the rectangle to cut out</div>'}],returns:{type:"xs:base64Binary",description:"A new image containing parts of the source image"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ierr:IM001 passed image is invalid</xqdoc:error>']},{isDocumented:!0,arity:2,name:"swirl",qname:"man:swirl",signature:"($image as xs:base64Binary, $degree as xs:double) as xs:base64Binary external",description:" Swirl an image (image pixels are rotated by degree).\n",summary:"<p> Swirl an image (image pixels are rotated by degree).</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"image",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the source image</div>'},{name:"degree",type:"xs:double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> degree to swirl image pixels</div>'}],returns:{type:"xs:base64Binary",description:"A swirled copy of $image"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ierr:IM001 passed image is invalid</xqdoc:error>']},{isDocumented:!0,arity:2,name:"transparent",qname:"man:transparent",signature:"($image as xs:base64Binary, $color as xs:string) as xs:base64Binary",description:" Make all pixels of the specfied color transparent.\n This works correctly only with image types supporting transparency\n (e.g GIF or PNG).\n",summary:"<p> Make all pixels of the specfied color transparent.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"image",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the source image</div>'},{name:"color",type:"xs:string",occurrence:null,description:"<div xmlns:xqdoc=\"http://www.xqdoc.org/1.0\"> color to make transparent (e.g. '#FFFFFF')</div>"}],returns:{type:"xs:base64Binary",description:"A copy of $image with the specified color made transparent."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ierr:IM001 passed image is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FORG0001 unsupported color</xqdoc:error>']},{isDocumented:!0,arity:1,name:"trim",qname:"man:trim",signature:"($image as xs:base64Binary) as xs:base64Binary external",description:" Trim edges of the image's background color from the image.\n",summary:"<p> Trim edges of the image's background color from the image.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"image",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the source image</div>'}],returns:{type:"xs:base64Binary",description:"A trimmed copy of $image"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ierr:IM001 passed image is invalid</xqdoc:error>']},{isDocumented:!0,arity:2,name:"watermark",qname:"man:watermark",signature:"($image as xs:base64Binary, $watermark as xs:base64Binary) as xs:base64Binary external",description:" Add a $watermark image to $image.\n",summary:"<p> Add a $watermark image to $image.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"image",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the source image</div>'},{name:"watermark",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the watermark image</div>'}],returns:{type:"xs:base64Binary",description:"A watermarked copy of $image"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ierr:IM001 one of the passed images is invalid</xqdoc:error>']},{isDocumented:!0,arity:2,name:"zoom-by-height",qname:"man:zoom-by-height",signature:"($image as xs:base64Binary, $height as xs:unsignedInt) as xs:base64Binary external",description:" Zoom the passed image to a given new height while keeping the ratio between\n width and height.\n So, the width is scaled accordingly.\n Important note: this function does not change the size information stored\n in the image (e.g. basic:width will not show a different value).\n",summary:"<p> Zoom the passed image to a given new height while keeping the ratio between\n width and height.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"image",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> image to resize</div>'},{name:"height",type:"xs:unsignedInt",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> new height for the image in pixels</div>'}],returns:{type:"xs:base64Binary",description:"A copy of $image with given $height and width adjusted accordingly"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ierr:IM001 passed image is invalid</xqdoc:error>']},{isDocumented:!0,arity:2,name:"zoom-by-width",qname:"man:zoom-by-width",signature:"($image as xs:base64Binary, $width as xs:unsignedInt) as xs:base64Binary external",description:" Zoom the passed image to a given new width while keeping the ratio between\n width and height.\n So, the height is scaled accordingly.\n Important note: this function does not change the size information stored\n in the image (e.g. basic:width will not show a different value).\n",summary:"<p> Zoom the passed image to a given new width while keeping the ratio between\n width and height.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"image",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> image to resize</div>'},{name:"width",type:"xs:unsignedInt",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> new width for the image in pixels</div>'}],returns:{type:"xs:base64Binary",description:"A copy of $image with given $width and height changed accordingly"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ierr:IM001 passed image is invalid</xqdoc:error>']},{isDocumented:!0,arity:2,name:"zoom",qname:"man:zoom",signature:"($image as xs:base64Binary, $ratio as xs:double) as xs:base64Binary external",description:" Zoom the passed image by the specified factor while keeping the ratio between\n width and height.\n A ratio of less than 1 will make the image smaller.\n A ratio of less or equal than 0 will not effect the image.\n Important note: this function does not change the size information stored in the\n image (e.g. basic:width will not show a different value).\n",summary:"<p> Zoom the passed image by the specified factor while keeping the ratio between\n width and height.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"image",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> image to resize</div>'},{name:"ratio",type:"xs:double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> ratio to zoom width and height by</div>'}],returns:{type:"xs:base64Binary",description:"A copy of $image with resized content"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ierr:IM001 passed image is invalid</xqdoc:error>']}],variables:[]},"http://zorba.io/modules/http-client-wrapper":{ns:"http://zorba.io/modules/http-client-wrapper",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This module provides conversion functions between the\n XML Expath http-client request and response formats and the\n JSON http-client request and response formats used by the\n <code>http://zorba.io/modules/http-client</code> module.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This module is reserved for internal use by the\n <code>http://www.zorba-xquery.com/modules/http-client</code> and the\n <code>http://expath.org/ns/http-client</code> modules.\n This module may be removed at any time. Method signature and\n semantics may change.\n </p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Federico Cavalieri</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://www.w3.org/2005/xqt-errors",prefix:"err"},{uri:"http://expath.org/ns/error",prefix:"error"},{uri:"http://expath.org/ns/http-client",prefix:"http-schema"},{uri:"http://zorba.io/modules/http-client-wrapper",prefix:"http-wrapper"},{uri:"http://jsoniq.org/functions",prefix:"jn"},{uri:"http://zorba.io/modules/http-client",prefix:"json-http"},{uri:"http://jsoniq.org/function-library",prefix:"libjn"},{uri:"http://www.w3.org/2010/xslt-xquery-serialization",prefix:"ser"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:3,name:"http-nondeterministic-request",qname:"http-wrapper:http-nondeterministic-request",signature:"($request as element(*)?, $href as xs:string?, $bodies as item()*) as item()+",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function sends an HTTP request and returns the corresponding response.\n This function is declared non-deterministic and should only be used to issue\n requests which do not change the state of the server.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Its inputs, outputs, and behavior are identical to the\n <a href="http://expath.org/spec/http-client">EXPath http-client</a>\'s\n send-request() function (except that HTML responses are not tidied\n into XML - see <a href="#expath_relation">the note above</a>). It\n is provided here for use in Zorba installations that do not have\n the EXPath module available. If you have the option of using the\n EXPath module instead of this function, please do so, as it will\n allow your application to be more interoperable between different\n XQuery engines.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Full documentation of the $request parameter can be found in\n <a href="http://expath.org/spec/http-client#d2e183">the EXPath\n specification</a>.</p>\n',summary:"<p>  This function sends an HTTP request and returns the corresponding response.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"request",type:"element(*)",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Contains the various parameters of the request (see above).</div>'},{name:"href",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The URL to which the request will be made (see <a href="#url_string">note</a> above). If this parameter is specified, it will override the "href" attribute of $request.</div>'},{name:"bodies",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is the request body content, for HTTP methods that can contain a body in the request (i.e. POST and PUT). It is an error if this param is not the empty sequence for methods</div>'}],returns:{type:"item()+",description:'<a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#standard_return">standard http-client return type</a>.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC001 An HTTP error occurred.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC002 Error parsing the response content as XML.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC003 With a multipart response, the override-media-type must be either a multipart media type or application/octet-stream.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC004 The src attribute on the body element is mutually exclusive with all other attribute (except the media-type).</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC005 The input request element is not valid.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC006 A timeout occurred waiting for the response.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HCV02 Trying to follow a redirect of a POST, PUT, or DELETE request</xqdoc:error>']},{isDocumented:!0,arity:3,name:"http-sequential-request",qname:"http-wrapper:http-sequential-request",signature:"($request as element(*)?, $href as xs:string?, $bodies as item()*) as item()+",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function sends an HTTP request and returns the corresponding response.\n This function is declared sequential and can be used to issue\n requests which change the state of the server.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Its inputs, outputs, and behavior are identical to the\n <a href="http://expath.org/spec/http-client">EXPath http-client</a>\'s\n send-request() function (except that HTML responses are not tidied\n into XML - see <a href="#expath_relation">the note above</a>). It\n is provided here for use in Zorba installations that do not have\n the EXPath module available. If you have the option of using the\n EXPath module instead of this function, please do so, as it will\n allow your application to be more interoperable between different\n XQuery engines.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Full documentation of the $request parameter can be found in\n <a href="http://expath.org/spec/http-client#d2e183">the EXPath\n specification</a>.</p>\n',summary:"<p>  This function sends an HTTP request and returns the corresponding response.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"request",type:"element(*)",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Contains the various parameters of the request (see above).</div>'},{name:"href",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The URL to which the request will be made (see <a href="#url_string">note</a> above). If this parameter is specified, it will override the "href" attribute of $request.</div>'},{name:"bodies",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is the request body content, for HTTP methods that can contain a body in the request (i.e. POST and PUT). It is an error if this param is not the empty sequence for methods</div>'}],returns:{type:"item()+",description:'<a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#standard_return">standard http-client return type</a>.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC001 An HTTP error occurred.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC002 Error parsing the response content as XML.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC003 With a multipart response, the override-media-type must be either a multipart media type or application/octet-stream.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC004 The src attribute on the body element is mutually exclusive with all other attribute (except the media-type).</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC005 The input request element is not valid.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HC006 A timeout occurred waiting for the response.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">error:HCV02 Trying to follow a redirect of a POST, PUT, or DELETE request</xqdoc:error>']}],variables:[]},"http://www.28msec.com/modules/cloudsearch":{ns:"http://www.28msec.com/modules/cloudsearch",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This module offers functionality to search, add, update and remove documents in\n an Amazon CloudSearch domain.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For each functionality two methods are provided\n <ul>\n  <li>one which accepts a single $options parameter. In this case the default\n      credentials for the "CloudSearch" category will be used to determine the\n      CloudSearch endpoint to use.</li>\n  <li>one which accepts both an $endpoint and an $options parameter.\n      In this case, if the $endpoint parameter is of type string, it will be\n      interpreted as the name of a credentials in the "CloudSearch" category.\n      Otherwise, if the $endpoint parameter is of type anyURI, it will be\n      interpreted as the endpoint URI.</li>\n </ul>\n </p>\n <h2 xmlns:xqdoc="http://www.xqdoc.org/1.0" id="determinism">Important Notice Regarding Function Determinism</h2>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The search functions (<a href="?anchor=search-1">search#1</a> and\n <a href="?anchor=search-2">search#2</a>) are declared deterministic, which means that\n their results could be cached when invoked multiple times with the same arguments\n in the same query execution.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">To not use cached results you can use two alternative search functions\n (<a href="?anchor=search-nondeterministic-1">search-nondeterministic#1</a> and\n <a href="?anchor=search-nondeterministic-2">search-nondeterministic#2</a>), which have\n been declared as being non deterministic.</p>\n <h2 xmlns:xqdoc="http://www.xqdoc.org/1.0" id="search-options">Search options</h2>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The search settings are specified by means of an object whose form\n is described in the following. The two most important fields are the\n "q" and "bq" fields. At least one of them must be specified. If the "bq"\n field is specified in conjunction with the "q" parameter, the values\n are joined with a top-level AND.\n <ul>\n   <li>bq: one or more match expressions that define a Boolean search. Multiple\n       expressions are joined with a top-level AND.\n       <p>Type: string</p>\n   </li>\n   <li>q: the string to search for. You use the q parameter to perform simple text\n       searches. This searches the default search field for the specified text.\n       <p>Type: string</p>\n   </li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Additional documentation on the format of the query and boolean query strings can\n be found at:\n <a href="http://docs.aws.amazon.com/cloudsearch/latest/developerguide/Search.Requests.html#Search.MatchSetExpression">\n Expression Syntax for Boolean Queries</a>.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The following additional optional parameters can be specified.\n <ul>\n   <li>facet: a comma-separated list of the fields for which you want to compute facets.\n       The specified fields must be numeric fields or defined as facet enabled in the\n       domain configuration.\n       <p>Type: string</p>\n   </li>\n   <li>facet-<i>FIELD</i>-constraints: the field values (facet constraints) that\n       you want to count for a particular field. FIELD is the name of the field.\n       Constraints are specified as a comma-separated list of ranges or\n       single-quoted strings. If you don\'t specify facet constraints, counts\n       are computed for all field values.\n       <p>Type: string</p>\n   </li>\n   <li>facet-<i>FIELD</i>-sort: how you want to sort facet values for a\n       particular field. FIELD is the name of the field. There are four sorting options:\n       <ul>\n         <li>alpha: Sort the facet values alphabetically (in ascending order).</li>\n         <li>count: Sort the facet values by their counts (in descending order).</li>\n         <li>max: Sort the facet values according to the maximum values in the specified\n             field. This option is specified as <code>max(FIELD)</code>. By default, the\n             facet values are sorted in ascending order. To sort in descending order,\n             prefix the sort option with - (minus): <code>-max(FIELD)</code>.\n         </li>\n         <li>sum: Sort the facet values according to the sum of the values in the\n             specified field (in ascending order). This option is specified as\n             <code>sum(FIELD)</code>.\n         </li>\n       </ul>\n   </li>\n   <li>facet-<i>FIELD</i>-top-n: set the maximum number of facet constraints to\n       be included for the specified field in the search results. By default,\n       the results include counts for the top 40 constraints.\n        <p>Type: integer</p>\n   </li>\n   <li>no-cache: if false, a cached result can be returned. If true, a revalidation of the\n        results is forced. Default is false.\n        <p>Type: boolean</p>\n   </li>\n   <li>rank: a comma-separated list of fields or rank expressions to use for ranking. A\n        maximum of 10 fields and rank expressions can be specified. You can use any uint\n        field to rank results numerically. Any result-enabled text or literal field can be\n        used to rank results alphabetically. To rank results by relevance, you can specify\n        the name of a custom rank expression or text_relevance. Hits are ordered according\n        to the specified rank field(s). By default, hits are ranked in ascending order.\n        <p>You can prefix a field name with a minus (-) to rank in descending order. If no\n        rank parameter is specified, it defaults to <code>rank=-text_relevance</code>, which\n        lists results according to their text_relevance scores with the highest-scoring\n        documents first.</p>\n       <p>Type: string</p>\n   </li>\n   <li>rank-<i>RANKNAME</i>: define a rank expression that can be used with the\n       rank parameter. You can also specify the new rank expression as a return\n       field and use it to set thresholds for the search results with the\n       t-<i>FIELD</i> parameter. For more information about constructing\n       rank expressions, see\n       <a href="http://docs.aws.amazon.com/cloudsearch/latest/developerguide/tuneranking.html">\n       Customizing Result Ranking with Amazon CloudSearch</a>.\n       <p>Type: string</p>\n   </li>\n   <li>return-fields: the document fields to include in the response. Up to 2 KB\n       of data can be returned from a text field. If the field contents exceed\n       2 KB, only the first 2 KB is included in the results. Specified as a\n       comma-separated list of field names. If no return-fields are specified,\n       only the document ids of the hits are returned.\n       <p>Type: string</p>\n   </li>\n   <li>size: the maximum number of search hits to return. The default is 10.\n       <p>Type: integer</p>\n   </li>\n   <li>start: the offset of the first search hit you want to return. The default is 0\n       (the first hit).\n       <p>Type: integer</p>\n   </li>\n   <li>t-<i>FIELD</i>: restrict the match set used in subsequent post-processing\n       steps according to the specified rank expression. Only hits that have a\n       score within the specified range are included. Ranges are specified as\n       described in\n       <a href="http://docs.aws.amazon.com/cloudsearch/latest/developerguide/Search.Requests.html#Search.MatchSetExpression">\n       Expression Syntax for Boolean Queries</a>.\n       <p>Type: integer</p>\n   </li>\n </ul>\n For additional details on the search parameters you can refer to the\n <a href="http://docs.aws.amazon.com/cloudsearch/latest/developerguide/Search.Requests.html">\n Amazon CloudSearch search requests documentation</a>.</p>\n <h2 xmlns:xqdoc="http://www.xqdoc.org/1.0" id="search-results">Search Results</h2>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The format of the returned object is the following:\n <pre>\n {\n   "rank" : "-text_relevance",\n   "match-expr" : "(label \'star wars\')",\n   "hits" :\n   {\n     "found" : 2,\n     "start" : 0,\n     "hit" :\n     [\n       {\n         "id" : "tt1185834",\n         "data" :\n         {\n           "actor" : ["Abercrombie, Ian","Baker, Dee","Burton, Corey"],\n           "title" : ["Star Wars: The Clone Wars"]\n         }\n       },\n       {\n         "id" :"tt0121766",\n         "data" :\n         {\n           "actor" : ["Bai, Ling","Bryant, Gene","Castle-Hughes, Keisha"],\n           "title" : ["Star Wars: Episode III - Revenge of the Sith"]\n         }\n       }\n     ]\n   },\n   "info" :\n   {\n     "rid" : "b7c167f6c2da6d93531b9a7b314ad030b3a74803b4b7797edb905ba5a6a08",\n     "time-ms" : 2,\n     "cpu-time-ms" : 0\n   }\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The returned object fields have the following meaning:\n <ul>\n   <li>match-expr: Shows the match expression constructed from the search\n       parameters.</li>\n   <li>hits: Contains hit statistics (found, start) and a hit array that lists\n       the document ids and data for each hit.</li>\n   <li>found: The total number of hits that match the search request after\n       Amazon CloudSearch finished processing the match set.</li>\n   <li>start: The index of the first hit returned in this response.</li>\n   <li>hit: An array that lists the document ids and data for each hit.</li>\n   <li>id: The unique identifier for a document.</li>\n   <li>data: A list of returned fields.</li>\n   <li>facets: Contains facet information and facet counts.</li>\n   <li><i>FacetFieldName</i>: A field for which facets were calculated.</li>\n   <li>constraints: An array of the facet values and counts.</li>\n   <li>value: The facet value being counted.</li>\n   <li>count: The number of hits that contain the facet value in <i>FacetFieldName</i>.\n       </li>\n   <li>info: Contains information about the request processing.</li>\n   <li>rank: Lists the fields that were used to rank the search hits.</li>\n   <li>rid: The encrypted Resource ID.</li>\n   <li>time-ms: How long it took to process the search request in milliseconds.\n       </li>\n   <li>cpu-time-ms: The CPU time required to process the search request in\n       milliseconds.</li>\n   <li>messages: Contains any error messages returned by the search service.\n       The severity, code, and message properties are included for each item.</li>\n   <li>severity: The severity of the message. It is always warning, which indicates\n       a problem with the query string that did not prevent the request from being\n       processed.</li>\n   <li>code: The error code. The search service returns the following error codes:\n     <ul>\n       <li>CS-InvalidFieldOrRankAliasInRankParameter: the specified ranking field\n           could not be found.</li>\n       <li>CS-RankExpressionParseError: one of the specified rank expressions could\n           not be parsed. No query-time rank expressions will be used. </li>\n       <li>CS-RankExpressionValidationError: one of the specified rank expressions\n           could not be validated. No query-time rank expressions will be used.</li>\n       <li>CS-UndefinedField: an unknown field was specified in the match\n           expression.</li>\n       <li>CS-UnknownFieldInMatchExpression: a field specified in the bq parameter\n           could not be found.</li>\n       <li>CS-WildcardTermLimit: more than 2000 terms matched the wildcard in the\n           search request. The number of terms matched was limited to 2000.</li>\n     </ul>\n   </li>\n   <li>message: A description of the error that was returned by the search service.</li>\n </ul>\n </p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Federico Cavalieri</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://www.28msec.com/modules/cloudsearch",prefix:"cloudsearch"},{uri:"http://www.28msec.com/modules/credentials",prefix:"credentials"},{uri:"http://zorba.io/modules/http-client",prefix:"http"}],functions:[{isDocumented:!0,arity:1,name:"add-document",qname:"cloudsearch:add-document",signature:"($options as object()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Adds or replaces a document in the default Amazon CloudSearch domain.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">An add operation is applied only if a document with the same id is not\n present or if the version number specified in the operation is greater than\n the existing document\'s version number.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The document to add or replace is specified through an object with\n the following form:\n <pre>\n {\n   "id" : "tt0484562",\n   "version" : 1,\n   "lang" : "en",\n   "fields" :\n   {\n     "title" : "The Seeker: The Dark Is Rising",\n     "genre" : ["Adventure","Drama","Fantasy","Thriller"]\n   }\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Specifically, the fields in the request object have the following meaning:\n <ul>\n   <li>id: An alphanumeric string. Allowed characters are: a-z, 0-9, and _.\n       Document IDs cannot begin with an underscore. The max length is 128\n       characters.</li>\n   <li>version: Any non-negative number less than 2^32.</li>\n   <li>lang: An ISO-639-1 two-letter language code.</li>\n   <li>fields: An object containing one or more fields. Each field specifies\n       a field within the document being added. Field names must begin with a\n       lowercase letter and can contain the following characters: a-z, 0-9,\n       and _. Field names must be at least 3 and no more than 64 characters.\n       The names "body", "docid", and "text_relevance" are reserved names and\n       cannot be used as field names. To specify multiple values for a field,\n       you can specify an array of values instead of a single value.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The returned object lists all warnings that were generated.\n <pre>\n {\n   "status" : "success",\n   "warning" :\n   [\n     {"message" : "Warning message."}\n   ]\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Specifically, the fields in the response object have the following meaning:\n <ul>\n   <li>status: the result status, always "success". In case an error occurred\n       processing the request, an error is raised.</li>\n   <li>warning: provides information about warnings generated during parsing\n       or validation. The field is not present if no warning were generated.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example, specifying endpoint URI:\n <pre>\n cloudsearch:add-document(\n anyURI("http://doc-movies-h2pc7ftfnsdlqh6pqqawbftrhu.us-east-1.cloudsearch.amazonaws.com"),\n {\n   "id" : "tt0484562",\n   "version" : 1,\n   "lang" : "en",\n   "fields" :\n   {\n     "title" : "The Seeker: The Dark Is Rising",\n     "genre" : ["Adventure","Drama","Fantasy","Thriller"]\n   }\n });\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example, using stored credentials:\n <pre>\n cloudsearch:add-document("movies",\n {\n   "id" : "tt0484562",\n   "version" : 1,\n   "lang" : "en",\n   "fields" :\n   {\n     "title" : "The Seeker: The Dark Is Rising",\n     "genre" : ["Adventure","Drama","Fantasy","Thriller"]\n   }\n });\n </pre>\n </p>\n',summary:"<p>  Adds or replaces a document in the default Amazon CloudSearch domain.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object specifying the request options</div>'}],returns:{type:"object()",description:"The request response"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:ENDPOINT if the default credentials endpoint is invalid or not present</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:AUTHORIZATION if the request was unauthorized</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:HTTP if an HTTP error has occurred</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:REQUEST if the request is malformed</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:RESOURCES if the server storage or bandwidth resources are insufficient to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:INTERNAL if an internal server error occurred</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:RESPONSE if the CloudSearch response cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:2,name:"add-document",qname:"cloudsearch:add-document",signature:"($endpoint as atomic, $options as object()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Adds or replaces a document in the specified Amazon CloudSearch domain.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">An add operation is applied only if a document with the same id is not\n present or if the version number specified in the operation is greater than\n the existing document\'s version number.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The document to add or replace is specified through an object with\n the following form:\n <pre>\n {\n   "id" : "tt0484562",\n   "version" : 1,\n   "lang" : "en",\n   "fields" :\n   {\n     "title" : "The Seeker: The Dark Is Rising",\n     "genre" : ["Adventure","Drama","Fantasy","Thriller"]\n   }\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Specifically, the fields in the request object have the following meaning:\n <ul>\n   <li>id: An alphanumeric string. Allowed characters are: a-z, 0-9, and _.\n       Document IDs cannot begin with an underscore. The max length is 128\n       characters.</li>\n   <li>version: Any non-negative number less than 2^32.</li>\n   <li>lang: An ISO-639-1 two-letter language code.</li>\n   <li>fields: An object containing one or more fields. Each field specifies\n       a field within the document being added. Field names must begin with a\n       lowercase letter and can contain the following characters: a-z, 0-9,\n       and _. Field names must be at least 3 and no more than 64 characters.\n       The names "body", "docid", and "text_relevance" are reserved names and\n       cannot be used as field names. To specify multiple values for a field,\n       you can specify an array of values instead of a single value.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The returned object lists all warnings that were generated.\n <pre>\n {\n   "status" : "success",\n   "warning" :\n   [\n     {"message" : "Warning message."}\n   ]\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Specifically, the fields in the response object have the following meaning:\n <ul>\n   <li>status: the result status, always "success". In case an error occurred\n       processing the request, an error is raised.</li>\n   <li>warning: provides information about warnings generated during parsing\n       or validation. The field is not present if no warning were generated.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example, specifying endpoint URI:\n <pre>\n cloudsearch:add-document(\n anyURI("http://doc-movies-h2pc7ftfnsdlqh6pqqawbftrhu.us-east-1.cloudsearch.amazonaws.com"),\n {\n   "id" : "tt0484562",\n   "version" : 1,\n   "lang" : "en",\n   "fields" :\n   {\n     "title" : "The Seeker: The Dark Is Rising",\n     "genre" : ["Adventure","Drama","Fantasy","Thriller"]\n   }\n });\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example, using stored credentials:\n <pre>\n cloudsearch:add-document("movies",\n {\n   "id" : "tt0484562",\n   "version" : 1,\n   "lang" : "en",\n   "fields" :\n   {\n     "title" : "The Seeker: The Dark Is Rising",\n     "genre" : ["Adventure","Drama","Fantasy","Thriller"]\n   }\n });\n </pre>\n </p>\n',summary:"<p>  Adds or replaces a document in the specified Amazon CloudSearch domain.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint",type:"atomic",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The endpoint URI or the name of a stored CloudSearch credentials</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object specifying the request options</div>'}],returns:{type:"object()",description:"The request response"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:ENDPOINT if the specified endpoint is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:AUTHORIZATION if the request was unauthorized</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:HTTP if an HTTP error has occurred</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:REQUEST if the request is malformed</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:RESOURCES if the server storage or bandwidth resources are insufficient to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:INTERNAL if an internal server error occurred</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:RESPONSE if the CloudSearch response cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:1,name:"batch-document",qname:"cloudsearch:batch-document",signature:"($options as array()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Adds, replaces or removes one or more documents from the default Amazon\n CloudSearch domain.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">An add or delete operation is only applied to an existing document if the\n version number specified in the operation is greater than the existing document\n version number.\n If multiple add or delete operations for the same document are specified, the\n operation with the highest version number is applied. If multiple operations in\n a batch specify the same document and version number, the document service\n arbitrarily picks which one to apply.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The documents to add, replace or delete can be specified through an array with\n the following form:\n <pre>\n [\n   {\n     "type" : "add",\n     "id" :   "tt0484562",\n     "version" : 1,\n     "lang" : "en",\n     "fields" :\n     {\n       "title" : "The Seeker: The Dark Is Rising",\n       "genre" : ["Adventure","Drama","Fantasy","Thriller"],\n     }\n   },\n   {\n     "type" : "delete",\n     "id" :   "tt0484575",\n     "version" : 2\n   }\n ]\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Specifically, the fields in the request array have the following meaning:\n <ul>\n   <li>type: The operation type, "add" or "delete".</li>\n   <li>id: An alphanumeric string. Allowed characters are: a-z, 0-9, and _.\n       Document IDs cannot begin with an underscore. The max length is 128\n       characters.</li>\n   <li>version: Any non-negative number less than 2^32.</li>\n   <li>lang: An ISO-639-1 two-letter language code.</li>\n   <li>fields: An object containing one or more fields. Each field specifies\n       a field within the document being added. Field names must begin with a\n       lowercase letter and can contain the following characters: a-z, 0-9,\n       and _. Field names must be at least 3 and no more than 64 characters.\n       The names "body", "docid", and "text_relevance" are reserved names and\n       cannot be used as field names. To specify multiple values for a field,\n       you can specify an array of values instead of a single value.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The response body lists any warning that was generated.\n <pre>\n {\n   "status" : "success",\n   "adds" : 1,\n   "deletes: 1,\n   "warning" :\n   [\n     {"message" : "Warning message."}\n   ]\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Specifically, the fields in the response object have the following meaning:\n <ul>\n   <li>status: the result status, which is either success or error.</li>\n   <li>adds: the number of add document operations that were performed.</li>\n   <li>deletes: the number of delete document operations that were performed.</li>\n   <li>warning: provides information about a warning generated during parsing\n       or validation. The field is not present if no warning was generated.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example, using specified endpoint URI:\n <pre>\n cloudsearch:batch-document(\n anyURI("http://doc-movies-h2pc7ftfnsdlqh6pqqawbftrhu.us-east-1.cloudsearch.amazonaws.com"),\n [\n   {\n     "type" : "add",\n     "id" :   "tt0484562",\n     "version" : 1,\n     "lang" : "en",\n     "fields" :\n     {\n       "title" : "The Seeker: The Dark Is Rising",\n       "genre" : ["Adventure","Drama","Fantasy","Thriller"],\n     }\n   },\n   {\n     "type" : "delete",\n     "id" :   "tt0484575",\n     "version" : 2\n   }\n ]);\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example, using specified endpoint URI:\n <pre>\n cloudsearch:batch-document("movies",\n [\n   {\n     "type" : "add",\n     "id" :   "tt0484562",\n     "version" : 1,\n     "lang" : "en",\n     "fields" :\n     {\n       "title" : "The Seeker: The Dark Is Rising",\n       "genre" : ["Adventure","Drama","Fantasy","Thriller"],\n     }\n   },\n   {\n     "type" : "delete",\n     "id" :   "tt0484575",\n     "version" : 2\n   }\n ]);\n </pre>\n </p>\n',summary:"<p>  Adds, replaces or removes one or more documents from the default Amazon\n CloudSearch domain.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"options",type:"array()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object specifying the request options</div>'}],returns:{type:"object()",description:"The request response"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:ENDPOINT if the default credentials endpoint is invalid or not present</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:AUTHORIZATION if the request was unauthorized</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:HTTP if an HTTP error has occurred</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:REQUEST if the request is malformed</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:RESOURCES if the server storage or bandwidth resources are insufficient to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:INTERNAL if an internal server error occurred</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:RESPONSE if the CloudSearch response cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:2,name:"batch-document",qname:"cloudsearch:batch-document",signature:"($endpoint as atomic, $options as array()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Adds, replaces or removes one or more documents from the specified Amazon\n CloudSearch domain.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">An add or delete operation is only applied to an existing document if the\n version number specified in the operation is greater than the existing document\n version number.\n If multiple add or delete operations for the same document are specified, the\n operation with the highest version number is applied. If multiple operations in\n a batch specify the same document and version number, the document service\n arbitrarily picks which one to apply.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The documents to add, replace or delete can be specified through an array with\n the following form:\n <pre>\n [\n   {\n     "type" : "add",\n     "id" :   "tt0484562",\n     "version" : 1,\n     "lang" : "en",\n     "fields" :\n     {\n       "title" : "The Seeker: The Dark Is Rising",\n       "genre" : ["Adventure","Drama","Fantasy","Thriller"],\n     }\n   },\n   {\n     "type" : "delete",\n     "id" :   "tt0484575",\n     "version" : 2\n   }\n ]\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Specifically, the fields in the request array have the following meaning:\n <ul>\n   <li>type: The operation type, "add" or "delete".</li>\n   <li>id: An alphanumeric string. Allowed characters are: a-z, 0-9, and _.\n       Document IDs cannot begin with an underscore. The max length is 128\n       characters.</li>\n   <li>version: Any non-negative number less than 2^32.</li>\n   <li>lang: An ISO-639-1 two-letter language code.</li>\n   <li>fields: An object containing one or more fields. Each field specifies\n       a field within the document being added. Field names must begin with a\n       lowercase letter and can contain the following characters: a-z, 0-9,\n       and _. Field names must be at least 3 and no more than 64 characters.\n       The names "body", "docid", and "text_relevance" are reserved names and\n       cannot be used as field names. To specify multiple values for a field,\n       you can specify an array of values instead of a single value.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The response body lists any warning that was generated.\n <pre>\n {\n   "status" : "success",\n   "adds" : 1,\n   "deletes: 1,\n   "warning" :\n   [\n     {"message" : "Warning message."}\n   ]\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Specifically, the fields in the response object have the following meaning:\n <ul>\n   <li>status: the result status, which is either success or error.</li>\n   <li>adds: the number of add document operations that were performed.</li>\n   <li>deletes: the number of delete document operations that were performed.</li>\n   <li>warning: provides information about a warning generated during parsing\n       or validation. The field is not present if no warning was generated.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example, using specified endpoint URI:\n <pre>\n cloudsearch:batch-document(\n anyURI("http://doc-movies-h2pc7ftfnsdlqh6pqqawbftrhu.us-east-1.cloudsearch.amazonaws.com"),\n [\n   {\n     "type" : "add",\n     "id" :   "tt0484562",\n     "version" : 1,\n     "lang" : "en",\n     "fields" :\n     {\n       "title" : "The Seeker: The Dark Is Rising",\n       "genre" : ["Adventure","Drama","Fantasy","Thriller"],\n     }\n   },\n   {\n     "type" : "delete",\n     "id" :   "tt0484575",\n     "version" : 2\n   }\n ]);\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example, using specified endpoint URI:\n <pre>\n cloudsearch:batch-document("movies",\n [\n   {\n     "type" : "add",\n     "id" :   "tt0484562",\n     "version" : 1,\n     "lang" : "en",\n     "fields" :\n     {\n       "title" : "The Seeker: The Dark Is Rising",\n       "genre" : ["Adventure","Drama","Fantasy","Thriller"],\n     }\n   },\n   {\n     "type" : "delete",\n     "id" :   "tt0484575",\n     "version" : 2\n   }\n ]);\n </pre>\n </p>\n',summary:"<p>  Adds, replaces or removes one or more documents from the specified Amazon\n CloudSearch domain.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint",type:"atomic",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The endpoint URI or the name of a stored CloudSearch credentials</div>'},{name:"options",type:"array()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object specifying the request options</div>'}],returns:{type:"object()",description:"The request response"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:ENDPOINT if the specified endpoint is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:AUTHORIZATION if the request was unauthorized</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:HTTP if an HTTP error has occurred</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:REQUEST if the request is malformed</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:RESOURCES if the server storage or bandwidth resources are insufficient to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:INTERNAL if an internal server error occurred</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:RESPONSE if the CloudSearch response cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:1,name:"delete-document",qname:"cloudsearch:delete-document",signature:"($options as object()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Deletes a document from the default Amazon CloudSearch domain.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">A delete operation is only applied to an existing document if the\n version number specified in the operation is greater than the existing\n document\'s version number.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The document to remove is specified through an object with the\n following form:\n <pre>\n {\n   "id" : "tt0484562",\n   "version" : 2\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Specifically, the fields in the request object have the following meaning:\n <ul>\n   <li>id: An alphanumeric string. Allowed characters are: a-z, 0-9, and _.\n       Document IDs cannot begin with an underscore. The max length is 128\n       characters.</li>\n   <li>version: Any non-negative number less than 2^32.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The response body lists any warning that was generated.\n <pre>\n {\n   "status" : "success",\n   "warning" :\n   [\n     {"message" : "Warning message."}\n   ]\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Specifically, the fields in the response object have the following meaning:\n <ul>\n   <li>status: the result status, always "success". In case of errors an error is\n       raised.</li>\n   <li>warning: provides information about a warning generated during parsing or\n       validation. The field is not present if no warning was generated.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example, using specified endpoint URI:\n <pre>\n cloudsearch:delete-document(\n anyURI("http://doc-movies-h2pc7ftfnsdlqh6pqqawbftrhu.us-east-1.cloudsearch.amazonaws.com"),\n {\n   "id" : "tt0484562",\n   "version" : 2\n });\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example, using specified stored endpoing:\n <pre>\n cloudsearch:delete-document("movies",\n {\n   "id" : "tt0484562",\n   "version" : 2\n });\n </pre>\n </p>\n',summary:"<p>  Deletes a document from the default Amazon CloudSearch domain.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object specifying the request options</div>'}],returns:{type:"object()",description:"The request response"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:ENDPOINT if the default credentials endpoint is invalid or not present</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:AUTHORIZATION if the request was unauthorized</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:HTTP if an HTTP error has occurred</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:REQUEST if the request is malformed</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:RESOURCES if the server storage or bandwidth resources are insufficient to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:INTERNAL if an internal server error occurred</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:RESPONSE if the CloudSearch response cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:2,name:"delete-document",qname:"cloudsearch:delete-document",signature:"($endpoint as atomic, $options as object()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Deletes a document from the specified Amazon CloudSearch domain.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">A delete operation is only applied to an existing document if the\n version number specified in the operation is greater than the existing\n document\'s version number.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The document to remove is specified through an object with the\n following form:\n <pre>\n {\n   "id" : "tt0484562",\n   "version" : 2\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Specifically, the fields in the request object have the following meaning:\n <ul>\n   <li>id: An alphanumeric string. Allowed characters are: a-z, 0-9, and _.\n       Document IDs cannot begin with an underscore. The max length is 128\n       characters.</li>\n   <li>version: Any non-negative number less than 2^32.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The response body lists any warning that was generated.\n <pre>\n {\n   "status" : "success",\n   "warning" :\n   [\n     {"message" : "Warning message."}\n   ]\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Specifically, the fields in the response object have the following meaning:\n <ul>\n   <li>status: the result status, always "success". In case of errors an error is\n       raised.</li>\n   <li>warning: provides information about a warning generated during parsing or\n       validation. The field is not present if no warning was generated.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example, using specified endpoint URI:\n <pre>\n cloudsearch:delete-document(\n anyURI("http://doc-movies-h2pc7ftfnsdlqh6pqqawbftrhu.us-east-1.cloudsearch.amazonaws.com"),\n {\n   "id" : "tt0484562",\n   "version" : 2\n });\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example, using specified stored endpoing:\n <pre>\n cloudsearch:delete-document("movies",\n {\n   "id" : "tt0484562",\n   "version" : 2\n });\n </pre>\n </p>\n',summary:"<p>  Deletes a document from the specified Amazon CloudSearch domain.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"endpoint",type:"atomic",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The endpoint URI or the name of a stored CloudSearch credentials</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object specifying the request options</div>'}],returns:{type:"object()",description:"The request response"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:ENDPOINT if the specified endpoint is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:AUTHORIZATION if the request was unauthorized</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:HTTP if an HTTP error has occurred</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:REQUEST if the request is malformed</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:RESOURCES if the server storage or bandwidth resources are insufficient to execute the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:INTERNAL if an internal server error occurred</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:RESPONSE if the CloudSearch response cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:1,name:"search-nondeterministic",qname:"cloudsearch:search-nondeterministic",signature:"($options as object()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Searches the documents in the default Amazon CloudSearch domain.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as <a href="#search-1">search#1</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Searches the documents in the default Amazon CloudSearch domain.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The <a href="#search-options">search options</a> object</div>'}],returns:{type:"object()",description:'The <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#search-results">search results</a> object'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:ENDPOINT if the default credentials endpoint is invalid or not present</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:AUTHORIZATION if the request was unauthorized</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:HTTP if an HTTP error has occurred</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:REQUEST if the request is malformed</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:INTERNAL if an internal server error occurred</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:RESPONSE if the CloudSearch response cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:2,name:"search-nondeterministic",qname:"cloudsearch:search-nondeterministic",signature:"($endpoint as atomic, $options as object()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Searches the documents in the specified Amazon CloudSearch domain.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as <a href="#search-2">search#2</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Searches the documents in the specified Amazon CloudSearch domain.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"endpoint",type:"atomic",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The endpoint URI or the name of a stored CloudSearch credentials</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The <a href="search-options">search options</a> object</div>'}],returns:{type:"object()",description:'The <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="search-results">search results</a> object'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:ENDPOINT if the specified endpoint is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:AUTHORIZATION if the request was unauthorized</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:HTTP if an HTTP error has occurred</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:REQUEST if the request is malformed</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:INTERNAL if an internal server error occurred</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:RESPONSE if the CloudSearch response cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:1,name:"search",qname:"cloudsearch:search",signature:"($options as object()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Searches the documents in the default Amazon CloudSearch domain.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The format of the <a href="search-options">search options</a> object and\n of the <a href="search-results">search results</a> object is documented in\n the module introduction.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:\n <pre>\n cloudsearch:search({"q" : "star+wars", "return-fields" : "title"})\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example returned object:\n <pre>\n {\n   "rank" : "-text_relevance",\n   "match-expr" : "(label \'star wars\')",\n   "hits" :\n   {\n     "found" : 2,\n     "start" : 0,\n     "hit" :\n     [\n       {\n         "id" : "tt1185834",\n         "data" :\n         {\n           "actor" : ["Abercrombie, Ian","Baker, Dee","Burton, Corey"],\n           "title" : ["Star Wars: The Clone Wars"]\n         }\n       },\n       {\n         "id" :"tt0121766",\n         "data" :\n         {\n           "actor" : ["Bai, Ling","Bryant, Gene","Castle-Hughes, Keisha"],\n           "title" : ["Star Wars: Episode III - Revenge of the Sith"]\n         }\n       }\n     ]\n   },\n   "info" :\n   {\n     "rid" : "b7c167f6c2da6d93531b9a7b314ad030b3a74803b4b7797edb905ba5a6a08",\n     "time-ms" : 2,\n     "cpu-time-ms" : 0\n   }\n }\n </pre>\n </p>\n',summary:"<p>  Searches the documents in the default Amazon CloudSearch domain.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The <a href="search-options">search options</a> object</div>'}],returns:{type:"object()",description:'The <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="search-results">search results</a> object'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:ENDPOINT if the default credentials endpoint is invalid or not present</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:AUTHORIZATION if the request was unauthorized</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:HTTP if an HTTP error has occurred</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:REQUEST if the request is malformed</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:INTERNAL if an internal server error occurred</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:RESPONSE if the CloudSearch response cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:2,name:"search",qname:"cloudsearch:search",signature:"($endpoint as atomic, $options as object()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Searches the documents in the specified Amazon CloudSearch domain.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The format of the <a href="search-options">search options</a> object and\n of the <a href="search-results">search results</a> object is documented in\n the module introduction.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The following examples performs a simple text search for all documents\n containing both the word "star" and "trek" and returns the matching document\n title field.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example, using specified endpoint URI:\n <pre>\n cloudsearch:search(\n anyURI("http://doc-movies-h2pc7ftfnsdlqh6pqqawbftrhu.us-east-1.cloudsearch.amazonaws.com"),\n {"q" : "star+wars", "return-fields" : "title"})\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example, using a stored endpoint:\n <pre>\n cloudsearch:search("movies",\n {"q" : "star+wars", "return-fields" : "title"})\n </pre>\n </p>\n',summary:"<p>  Searches the documents in the specified Amazon CloudSearch domain.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"endpoint",type:"atomic",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The endpoint URI or the name of a stored CloudSearch credentials</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The <a href="search-options">search options</a> object</div>'}],returns:{type:"object()",description:'The <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="search-results">search results</a> object'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:ENDPOINT if the specified endpoint is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:AUTHORIZATION if the request was unauthorized</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:HTTP if an HTTP error has occurred</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:REQUEST if the request is malformed</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:INTERNAL if an internal server error occurred</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudsearch:RESPONSE if the CloudSearch response cannot be parsed</xqdoc:error>']}],variables:[]},"http://zorba.io/modules/store/static/indexes/ddl":{ns:"http://zorba.io/modules/store/static/indexes/ddl",description:' This modules defines a set of functions for managing indexes that are\n declared in the prolog of a module.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n This module is part of\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="../zorba/xqddf.html">Zorba\'s XQuery Data Definition Facility</a>.\n All the indexes managed by this module have to be pre-declared in the prolog\n of a module.\n Please refer to the\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="../zorba/data_lifecycle.html">general documentation</a>\n for more information and examples.\n',sees:['<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0"><a href="../zorba/data_lifecycle.html">Data Lifecycle</a></xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0"><a href="../zorba/xqddf.html">XQuery Data Definition Facility</a></xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://zorba.io/modules/store/static/indexes/dml</xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://zorba.io/modules/store/static/collections/dml</xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://zorba.io/modules/store/static/collections/ddl</xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://zorba.io/modules/store/static/integrity-constraints/ddl</xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://zorba.io/modules/store/static/integrity-constraints/dml</xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://zorba.io/errors</xqdoc:see>'],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Nicolae Brinza, Matthias Brantner, David Graf, Till Westmann, Markos Zaharioudakis</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/modules/store/static/indexes/ddl",prefix:"iddl"},{uri:"http://zorba.io/options/versioning",prefix:"ver"},{uri:"http://zorba.io/errors",prefix:"zerr"}],functions:[{isDocumented:!0,arity:0,name:"available-indexes",qname:"iddl:available-indexes",signature:"() as xs:QName* external",description:" Gets the available indexes.\n",summary:"<p> Gets the available indexes.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:QName*",description:"A sequence of QNames, one for each available index, or an empty sequence if none are."},errors:[]},{isDocumented:!0,arity:1,name:"create",qname:"iddl:create",signature:"($name as xs:QName) external",description:" Creates an index.\n",summary:"<p> Creates an index.</p>",annotation_str:"",annotations:[],updating:!0,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the index to create.</div>'}],returns:{type:null,description:"An empty XDM instance and a pending update list that, once applied, creates the index with the given name."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0021 if <code>$name</code> is not equal to the name of any resource in the statically known indexes.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0022 if an index with <code>$name</code> already exists.</xqdoc:error>']},{isDocumented:!0,arity:0,name:"declared-indexes",qname:"iddl:declared-indexes",signature:"() as xs:QName* external",description:" Gets a sequence of QNames representing the indexes that have been declared\n in the prolog of the static context.\n",summary:"<p> Gets a sequence of QNames representing the indexes that have been declared\n in the prolog of the static context.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:QName*",description:"A sequence of QNames, one for each created collection, or an emtpy sequence."},errors:[]},{isDocumented:!0,arity:1,name:"delete",qname:"iddl:delete",signature:"($name as xs:QName) external",description:" Deletes an index.\n",summary:"<p> Deletes an index.</p>",annotation_str:"",annotations:[],updating:!0,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the index to delete.</div>'}],returns:{type:null,description:"An empty XDM instance and a pending update list that, once applied, deletes the index with the given name."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0009 if the index does not exist.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"is-available-index",qname:"iddl:is-available-index",signature:"($name as xs:QName) as xs:boolean external",description:" Gets whether an index exists.\n",summary:"<p> Gets whether an index exists.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the index that is being checked.</div>'}],returns:{type:"xs:boolean",description:"true if the index is available; false otherwise."},errors:[]},{isDocumented:!0,arity:1,name:"is-declared-index",qname:"iddl:is-declared-index",signature:"($name as xs:QName) as xs:boolean external",description:" Gets whether an index has been declared in the prolog of the static context.\n",summary:"<p> Gets whether an index has been declared in the prolog of the static context.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the index that is being checked.</div>'}],returns:{type:"xs:boolean",description:"true if the index was declared; false otherwise."},errors:[]}],variables:[]},"http://zorba.io/modules/excel/datetime":{ns:"http://zorba.io/modules/excel/datetime",description:" This is a library module offering the same set of functions\n defined by Microsoft Excel.\n",sees:['<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0"><a href="http://office.microsoft.com/en-us/excel/CH062528231033.aspx" target="_blank">Excel Documentation: Datetime Functions</a></xqdoc:see>'],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Sorin Nasoi</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/modules/excel/datetime",prefix:"excel-datetime"},{uri:"http://zorba.io/modules/excel/errors",prefix:"excel-err"},{uri:"http://zorba.io/modules/excel/text",prefix:"excel-text"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:3,name:"date",qname:"excel-datetime:date",signature:"($year as xs:integer, $month as xs:integer, $day as xs:integer) as xs:date?",description:" Constructs a date given the hours, months and days.\n",summary:"<p> Constructs a date given the hours, months and days.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"year",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the year</div>'},{name:"month",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the month</div>'},{name:"day",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the day</div>'}],returns:{type:"xs:date?",description:"A date given the hours, months and days"},errors:[]},{isDocumented:!0,arity:1,name:"day",qname:"excel-datetime:day",signature:"($date as xs:date) as xs:integer?",description:" Returns the day of a $date, represented by a serial number.\n",summary:"<p> Returns the day of a $date, represented by a serial number.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"date",type:"xs:date",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the date.</div>'}],returns:{type:"xs:integer?",description:"The day of a $date, represented by a serial number. The day is given as an integer ranging from 1 to 31."},errors:[]},{isDocumented:!0,arity:2,name:"days360",qname:"excel-datetime:days360",signature:"($start_date as xs:date, $end_date as xs:date) as xs:integer",description:" Returns the number of days between two dates based on a 360-day year.\n",summary:"<p> Returns the number of days between two dates based on a 360-day year.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"start_date",type:"xs:date",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the start date.</div>'},{name:"end_date",type:"xs:date",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the end date.</div>'}],returns:{type:"xs:integer",description:'The number of days between two dates based on a 360-day year (twelve 30-day months), which is used in some accounting calculations.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/> Use this function to help compute payments if your accounting system is based on twelve 30-day months.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/> The metod used is U.S. (NASD). If the starting date is the last day of a month, it becomes equal to the 30th of the same month. <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/> If the ending date is the last day of a month and the starting date is earlier than the 30th of a month, the ending date becomes equal to the 1st of the next month; otherwise the ending date becomes equal to the 30th of the same month.'},errors:[]},{isDocumented:!0,arity:3,name:"days360",qname:"excel-datetime:days360",signature:"($start_date as xs:date, $end_date as xs:date, $method as xs:boolean) as xs:integer",description:" Returns the number of days between two dates based on a 360-day year.\n",summary:"<p> Returns the number of days between two dates based on a 360-day year.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"start_date",type:"xs:date",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the start date.</div>'},{name:"end_date",type:"xs:date",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the end date.</div>'},{name:"method",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> if false then US/NASD Method is used, otherwise the European Method is used.</div>'}],returns:{type:"xs:integer",description:'The number of days between two dates based on a 360-day year (twelve 30-day months), which is used in some accounting calculations. Use this function to help compute payments if your accounting system is based on twelve 30-day months. <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/> The European Method (30E/360)<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/> - If either date A or B falls on the 31st of the month, that date will be changed to the 30th;<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/> - Where date B falls on the last day of February, the actual date B will be used.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/> The US/NASD Method (30US/360)<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/> - If both date A and B fall on the last day of February, then date B will be changed to the 30th.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/> - If date A falls on the 31st of a month or last day of February, then date A will be changed to the 30th.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/> - If date A falls on the 30th of a month after applying (2) above and date B falls on the 31st of a month, then date B will be changed to the 30th.'},errors:[]},{isDocumented:!0,arity:1,name:"hour",qname:"excel-datetime:hour",signature:"($time as xs:time) as xs:integer?",description:" Returns the hour of a time value.\n",summary:"<p> Returns the hour of a time value.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"time",type:"xs:time",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the time.</div>'}],returns:{type:"xs:integer?",description:"The hour of a time value. The hour is as an integer, ranging from 0 (12:00 A.M.) to 23 (11:00 P.M.)."},errors:[]},{isDocumented:!0,arity:1,name:"minute",qname:"excel-datetime:minute",signature:"($time as xs:time) as xs:integer?",description:" Returns the minutes of a time value.\n",summary:"<p> Returns the minutes of a time value.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"time",type:"xs:time",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the time.</div>'}],returns:{type:"xs:integer?",description:"The minutes of a time value. The minute is given as an integer, ranging from 0 to 59."},errors:[]},{isDocumented:!0,arity:1,name:"month",qname:"excel-datetime:month",signature:"($date as xs:date) as xs:integer?",description:" Returns the month of a $date.\n",summary:"<p> Returns the month of a $date.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"date",type:"xs:date",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the date.</div>'}],returns:{type:"xs:integer?",description:"the month of a $date. The month is given as an integer, ranging from 1 (January) to 12 (December)."},errors:[]},{isDocumented:!0,arity:2,name:"networkdays",qname:"excel-datetime:networkdays",signature:"($start_date as xs:date, $end_date as xs:date) as xs:integer*",description:" Returns the number of whole working days between $start_date and $end_date.\n",summary:"<p> Returns the number of whole working days between $start_date and $end_date.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"start_date",type:"xs:date",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the start date.</div>'},{name:"end_date",type:"xs:date",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the end date.</div>'}],returns:{type:"xs:integer*",description:'The number of whole working days between start_date and end_date.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/> Working days exclude weekends and any dates identified in holidays.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/> Use NETWORKDAYS to calculate employee benefits that accrue based on the number of days worked during a specific term.'},errors:[]},{isDocumented:!0,arity:3,name:"networkdays",qname:"excel-datetime:networkdays",signature:"($start_date as xs:date, $end_date as xs:date, $holidays as xs:date*) as xs:integer*",description:" Returns the number of whole working days between $start_date and $end_date.\n",summary:"<p> Returns the number of whole working days between $start_date and $end_date.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"start_date",type:"xs:date",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the start date.</div>'},{name:"end_date",type:"xs:date",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the end date.</div>'},{name:"holidays",type:"xs:date",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> one or more dates to exclude from the working calendar, such as state and federal holidays and floating holidays.</div>'}],returns:{type:"xs:integer*",description:'The number of whole working days between start_date and end_date.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/> Working days exclude weekends and any dates identified in holidays.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/> Use NETWORKDAYS to calculate employee benefits that accrue based on the number of days worked during a specific term.'},errors:[]},{isDocumented:!0,arity:0,name:"now",qname:"excel-datetime:now",signature:"() as xs:dateTime?",description:" Returns the current date and time.\n",summary:"<p> Returns the current date and time.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:dateTime?",description:"The current date and time."},errors:[]},{isDocumented:!0,arity:1,name:"second",qname:"excel-datetime:second",signature:"($time as xs:time) as xs:decimal?",description:" Returns the seconds of a $time value.\n",summary:"<p> Returns the seconds of a $time value.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"time",type:"xs:time",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the time.</div>'}],returns:{type:"xs:decimal?",description:"The seconds of a $time value. The second is given as an integer in the range 0 (zero) to 59."},errors:[]},{isDocumented:!0,arity:3,name:"time",qname:"excel-datetime:time",signature:"($hour as xs:integer, $minute as xs:integer, $second as xs:integer) as xs:time?",description:" Constructs a time given the hours, minutes and seconds.\n",summary:"<p> Constructs a time given the hours, minutes and seconds.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"hour",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the hour.</div>'},{name:"minute",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the minute.</div>'},{name:"second",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the second.</div>'}],returns:{type:"xs:time?",description:"A time given the hours, minutes and seconds."},errors:[]},{isDocumented:!0,arity:0,name:"today",qname:"excel-datetime:today",signature:"() as xs:date?",description:" Returns the current date.\n",summary:"<p> Returns the current date.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:date?",description:"The current date."},errors:[]},{isDocumented:!0,arity:1,name:"weekday",qname:"excel-datetime:weekday",signature:"($date as xs:date) as xs:integer?",description:" Returns the day of the week corresponding to a $date.\n",summary:"<p> Returns the day of the week corresponding to a $date.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"date",type:"xs:date",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the date.</div>'}],returns:{type:"xs:integer?",description:"The day of the week corresponding to a $date. The day is given as an integer, ranging from 1 (Sunday) to 7 (Saturday)."},errors:[]},{isDocumented:!0,arity:2,name:"weekday",qname:"excel-datetime:weekday",signature:"($date as xs:date, $return_type as xs:integer) as xs:integer?",description:" Returns the day of the week corresponding to a $date depending on $return_type.\n",summary:"<p> Returns the day of the week corresponding to a $date depending on $return_type.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"date",type:"xs:date",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the date.</div>'},{name:"return_type",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> 1 for Numbers 1 (Sunday) through 7 (Saturday). 2 for Numbers 1 (Monday) through 7 (Sunday). 3 for Numbers 0 (Monday) through 6 (Sunday).</div>'}],returns:{type:"xs:integer?",description:"The day of the week corresponding to a $date depending on $return_type."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if $return_type is outside the range [1,3].</xqdoc:error>']},{isDocumented:!0,arity:1,name:"year",qname:"excel-datetime:year",signature:"($date as xs:date) as xs:integer?",description:" Returns the year corresponding to a date.\n",summary:"<p> Returns the year corresponding to a date.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"date",type:"xs:date",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the date.</div>'}],returns:{type:"xs:integer?",description:"The year corresponding to a date."},errors:[]}],variables:[]},"http://xbrl.io/modules/bizql/profiles/sec/filings":{ns:"http://xbrl.io/modules/bizql/profiles/sec/filings",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This module provides functionality for querying financial reports (filings)\n submitted to the SEC.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">SEC Filings are nothing else than XBRL archives. For XBRL-generic requests on archives,\n use the generic archives module.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">With this module, you can access a number of properties of an SEC filing, such as\n its document type. You can also retrieve an SEC filing given an SEC company (or its CIK).</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">You can also access SEC filings statistics (the number of SEC Networks, of SEC Axes, etc).</p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Charles Hoffman</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Matthias Brantner</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Dennis Knochenwefel</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Ghislain Fourny</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://xbrl.io/modules/bizql/archives",prefix:"archives"},{uri:"http://xbrl.io/modules/bizql/profiles/sec/companies",prefix:"companies"},{uri:"http://www.28msec.com/modules/credentials",prefix:"credentials"},{uri:"http://zorba.io/modules/datetime",prefix:"datetime"},{uri:"http://xbrl.io/modules/bizql/facts",prefix:"facts"},{uri:"http://xbrl.io/modules/bizql/profiles/sec/filings",prefix:"filings"},{uri:"http://www.28msec.com/modules/mongodb",prefix:"mongo"},{uri:"http://xbrl.io/modules/bizql/profiles/sec/core",prefix:"sec"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"acceptance-dateTimes",qname:"filings:acceptance-dateTimes",signature:"($filings-or-ids as item()*) as dateTime*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves the acceptance date of filings.</p>\n',summary:"<p>  Retrieves the acceptance date of filings.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"filings-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of filings or their IDs.</div>'}],returns:{type:"dateTime*",description:"the acceptance dateTimes."},errors:[]},{isDocumented:!0,arity:1,name:"document-types",qname:"filings:document-types",signature:"($filings-or-ids as item()*) as string?",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves the document type of the filings.</p>\n',summary:"<p>  Retrieves the document type of the filings.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"filings-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of filings or their ids.</div>'}],returns:{type:"string?",description:"the document types (10-K, 10-Q)."},errors:[]},{isDocumented:!0,arity:1,name:"filing-dates",qname:"filings:filing-dates",signature:"($filings-or-ids as item()*) as date*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves the submission date of filings.</p>\n',summary:"<p>  Retrieves the submission date of filings.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"filings-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of filings or their IDs.</div>'}],returns:{type:"date*",description:"the submission dates."},errors:[]},{isDocumented:!0,arity:1,name:"filings-for-companies",qname:"filings:filings-for-companies",signature:"($companies-or-ciks as item()*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Return all filings submitted by the supplied companies.</p>\n',summary:"<p>  Return all filings submitted by the supplied companies.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"companies-or-ciks",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> arbitrary number of company objects or CIKs.</div>'}],returns:{type:"object()*",description:"all filings submitted by these companies."},errors:[]},{isDocumented:!0,arity:1,name:"generators",qname:"filings:generators",signature:"($filings-or-ids as item()*) as string*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves the generators of filings.</p>\n',summary:"<p>  Retrieves the generators of filings.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"filings-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of filings or their IDs.</div>'}],returns:{type:"string*",description:"the generators used."},errors:[]},{isDocumented:!0,arity:1,name:"num-abstracts",qname:"filings:num-abstracts",signature:"($filings-or-ids) as integer*",description:" Return the number of (distinct) abstracts in each of the given filings.\n",summary:"<p> Return the number of (distinct) abstracts in each of the given filings.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"filings-or-ids",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> list of filings or IDs</div>'}],returns:{type:"integer*",description:"the said number of abstracts"},errors:[]},{isDocumented:!0,arity:1,name:"num-axes",qname:"filings:num-axes",signature:"($filings-or-ids) as integer*",description:" Return the number of (distinct) axes in each of the given filings.\n",summary:"<p> Return the number of (distinct) axes in each of the given filings.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"filings-or-ids",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> list of filings or IDs</div>'}],returns:{type:"integer*",description:"the said number of axes"},errors:[]},{isDocumented:!0,arity:1,name:"num-concepts",qname:"filings:num-concepts",signature:"($filings-or-ids) as integer*",description:" Return the number of (distinct) concepts in each of the given filings.\n",summary:"<p> Return the number of (distinct) concepts in each of the given filings.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"filings-or-ids",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> list of filings or IDs</div>'}],returns:{type:"integer*",description:"the said number of concepts"},errors:[]},{isDocumented:!0,arity:1,name:"num-extension-abstracts",qname:"filings:num-extension-abstracts",signature:"($filings-or-ids) as integer*",description:" Return the number of extension abstracts in each of the given filings.\n",summary:"<p> Return the number of extension abstracts in each of the given filings.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"filings-or-ids",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> list of filings or IDs</div>'}],returns:{type:"integer*",description:"the said number of abstracts"},errors:[]},{isDocumented:!0,arity:1,name:"num-extension-concepts",qname:"filings:num-extension-concepts",signature:"($filings-or-ids) as integer*",description:" Return the number of extension concepts in each of the given filings.\n",summary:"<p> Return the number of extension concepts in each of the given filings.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"filings-or-ids",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> list of filings or IDs</div>'}],returns:{type:"integer*",description:"the said number of concepts"},errors:[]},{isDocumented:!0,arity:1,name:"num-extension-facts",qname:"filings:num-extension-facts",signature:"($filings-or-ids) as integer*",description:" Return the number of extension facts in each of the given filings.\n",summary:"<p> Return the number of extension facts in each of the given filings.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"filings-or-ids",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> list of filings or IDs</div>'}],returns:{type:"integer*",description:"the said number of facts"},errors:[]},{isDocumented:!0,arity:1,name:"num-facts",qname:"filings:num-facts",signature:"($filings-or-ids) as integer*",description:" Return the number of facts in each of the given filings.\n",summary:"<p> Return the number of facts in each of the given filings.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"filings-or-ids",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> list of filings or IDs</div>'}],returns:{type:"integer*",description:"the said number of facts"},errors:[]},{isDocumented:!0,arity:1,name:"num-footnotes",qname:"filings:num-footnotes",signature:"($filings-or-ids) as integer*",description:" Return the number of footnotes in each of the given filings.\n",summary:"<p> Return the number of footnotes in each of the given filings.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"filings-or-ids",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> list of filings or IDs</div>'}],returns:{type:"integer*",description:"the said number of facts"},errors:[]},{isDocumented:!0,arity:1,name:"num-line-items",qname:"filings:num-line-items",signature:"($filings-or-ids) as integer*",description:" Return the number of (distinct) line items in each of the given filings.\n",summary:"<p> Return the number of (distinct) line items in each of the given filings.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"filings-or-ids",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> list of filings or IDs</div>'}],returns:{type:"integer*",description:"the said number of line items"},errors:[]},{isDocumented:!0,arity:1,name:"num-members",qname:"filings:num-members",signature:"($filings-or-ids) as integer*",description:" Return the number of (distinct) members in each of the given filings.\n",summary:"<p> Return the number of (distinct) members in each of the given filings.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"filings-or-ids",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> list of filings or IDs</div>'}],returns:{type:"integer*",description:"the said number of members"},errors:[]},{isDocumented:!0,arity:1,name:"num-networks",qname:"filings:num-networks",signature:"($filings-or-ids) as integer*",description:" Return the number of networks in each of the given filings.\n",summary:"<p> Return the number of networks in each of the given filings.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"filings-or-ids",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> list of filings or IDs</div>'}],returns:{type:"integer*",description:"the said number of networks"},errors:[]},{isDocumented:!0,arity:1,name:"num-report-elements",qname:"filings:num-report-elements",signature:"($filings-or-ids) as integer*",description:" Return the number of (distinct) report elements in each of the given filings.\n",summary:"<p> Return the number of (distinct) report elements in each of the given filings.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"filings-or-ids",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> list of filings or IDs</div>'}],returns:{type:"integer*",description:"the said number of report elements"},errors:[]},{isDocumented:!0,arity:1,name:"num-tables",qname:"filings:num-tables",signature:"($filings-or-ids) as integer*",description:" Return the number of tables in each of the given filings.\n",summary:"<p> Return the number of tables in each of the given filings.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"filings-or-ids",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> list of filings or IDs</div>'}],returns:{type:"integer*",description:"the said number of tables"},errors:[]}],variables:[]},"http://zorba.io/modules/string":{ns:"http://zorba.io/modules/string",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This module provides string related functions.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Mostly, the functions in this module provide primitives\n to work with streamable strings. For example, it allows to\n check whether a given string is streamable or seekable.</p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Matthias Brantner</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/modules/string",prefix:"string"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:2,name:"analyze-string",qname:"string:analyze-string",signature:"($input as xs:string?, $pattern as xs:string) as array()",description:' Analyzes a string using a regular expression, returning sequence of JSON\n objects that identify which parts of the input string matched or failed to\n match the regular expression; and in the case of matched substrings, which\n substrings matched each capturing group in the regular expression.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n This function behaves like\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xpath-functions-30/#func-analyze-string"><code>fn:analyze-string</code></a>\n but returns a JSON array rather than an XML element.\n',summary:"<p> Analyzes a string using a regular expression, returning sequence of JSON\n objects that identify which parts of the input string matched or failed to\n match the regular expression; and in the case of matched substrings, which\n substrings matched each capturing group in the regular expression.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"input",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The string to analyze. If the empty sequence, the function behaves as if <code>$input</code> were a zero-length string.</div>'},{name:"pattern",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The regular expression.</div>'}],returns:{type:"array()",description:'a JSON array of objects where each object contains a single key/value pair. Each key is either <code xmlns:xqdoc="http://www.xqdoc.org/1.0">match</code> or <code xmlns:xqdoc="http://www.xqdoc.org/1.0">non-match</code>. For <code xmlns:xqdoc="http://www.xqdoc.org/1.0">non-match</code>, the value is a string that is the part of <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$input</code> that did not match; for <code xmlns:xqdoc="http://www.xqdoc.org/1.0">match</code>, the value is either a string that is the part of <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$input</code> that matched (when <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$pattern</code> contains no capturing groups) or an array containing values for both capturing groups and other matches. <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/> Capturing group matches are themselves arrays where the first element is the group number (1-based) and subsequent elements are either a string that is the part of <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$input</code> that matched or sub-arrays for nested capturing groups.'},errors:[]},{isDocumented:!0,arity:3,name:"analyze-string",qname:"string:analyze-string",signature:"($input as xs:string?, $pattern as xs:string, $flags as xs:string) as array() external",description:' Analyzes a string using a regular expression, returning sequence of JSON\n objects that identify which parts of the input string matched or failed to\n match the regular expression; and in the case of matched substrings, which\n substrings matched each capturing group in the regular expression.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n This function behaves like\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xpath-functions-30/#func-analyze-string"><code>fn:analyze-string</code></a>\n but returns a JSON array rather than an XML element.\n',summary:"<p> Analyzes a string using a regular expression, returning sequence of JSON\n objects that identify which parts of the input string matched or failed to\n match the regular expression; and in the case of matched substrings, which\n substrings matched each capturing group in the regular expression.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"input",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The string to analyze. If the empty sequence, the function behaves as if <code>$input</code> were a zero-length string.</div>'},{name:"pattern",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The regular expression.</div>'},{name:"flags",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The  argument is interpreted in the same way as for the <a href="http://www.w3.org/TR/xpath-functions-30/#func-matches"><code>fn:matches</code></a> function.</div>'}],returns:{type:"array()",description:'a JSON array of objects where each object contains a single key/value pair. Each key is either <code xmlns:xqdoc="http://www.xqdoc.org/1.0">match</code> or <code xmlns:xqdoc="http://www.xqdoc.org/1.0">non-match</code>. For <code xmlns:xqdoc="http://www.xqdoc.org/1.0">non-match</code>, the value is a string that is the part of <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$input</code> that did not match; for <code xmlns:xqdoc="http://www.xqdoc.org/1.0">match</code>, the value is either a string that is the part of <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$input</code> that matched (when <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$pattern</code> contains no capturing groups) or an array containing values for both capturing groups and other matches. <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/> Capturing group matches are themselves arrays where the first element is the group number (1-based) and subsequent elements are either a string that is the part of <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$input</code> that matched or sub-arrays for nested capturing groups.'},errors:[]},{isDocumented:!0,arity:1,name:"is-seekable",qname:"string:is-seekable",signature:"($s as string) as boolean external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function checks whether a given string item is a\n seekable stream string.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example, a seekable streamable string is returned by the\n file module.</p>\n',summary:"<p>  This function checks whether a given string item is a\n seekable stream string.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the string to check</div>'}],returns:{type:"boolean",description:"true if the given item is a seekable stream string or false otherwise."},errors:[]},{isDocumented:!0,arity:1,name:"is-streamable",qname:"string:is-streamable",signature:"($s as string) as boolean external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function checks whether a given string item is implemented by a\n streamable string.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">A streamable string is produced by some functions of a module.\n It\'s an optimized implementation of an string to handle arbitrary\n sized data. The drawback is that its value can only be consumed once.\n That is, only one function can access the value of a streamable string\n item.</p>\n',summary:"<p>  This function checks whether a given string item is implemented by a\n streamable string.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the string to check</div>'}],returns:{type:"boolean",description:"true if the given item is implemented using a streamable string or false otherwise."},errors:[]},{isDocumented:!0,arity:1,name:"materialize",qname:"string:materialize",signature:"($s as string) as string external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function materializes a streamable string.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The drawback of a streamable (non-seekable) string is that\n its value can only be consumed once. That is, only one function\n can access the value of a streamable string item.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">In order to remedy this situation, this function can be used to\n convert a streamable string into its non-streamable counterpart. As a\n result, the string returned by this function has the same value as its\n input but is materialized and, hence, can be consumed multiple times.</p>\n',summary:"<p>  This function materializes a streamable string.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the streamable string item to materialize</div>'}],returns:{type:"string",description:"a materialized string of its input or the input if the input item was not a streamable string."},errors:[]},{isDocumented:!0,arity:2,name:"split",qname:"string:split",signature:"($s as string, $separator as string) as string* external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns a sequence of strings constructed by splitting the input wherever\n the given separator is found.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function is different from tokenize. It doesn\'t allow\n the separator to be a regular expression. This restriction allows for more\n performant implementation. Specifically, the function processes\n streamable strings as input in a streamable way which is particularly useful\n to tokenize huge strings.</p>\n',summary:"<p>  Returns a sequence of strings constructed by splitting the input wherever\n the given separator is found.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the input string to split</div>'},{name:"separator",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the separator used for splitting the input string $s</div>'}],returns:{type:"string*",description:"a sequence of strings constructed by splitting the input"},errors:[]}],variables:[]},"http://www.28msec.com/modules/store":{ns:"http://www.28msec.com/modules/store",description:" This module provides functions to perform MongoDB query operations\n (i.e. find and aggregate) on the database associated with the\n project.\n <p xmlns:xqdoc=\"http://www.xqdoc.org/1.0\">The module is always imported so you don't need to import it explicitly.\n Also, you don't need to fully qualify the function if you want to invoke it.</p>\n",sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">28msec</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://www.28msec.com/modules/mongodb/types",prefix:"mongo"},{uri:"http://www.28msec.com/modules/store",prefix:"store"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:2,name:"aggregate",qname:"store:aggregate",signature:"($collection as string, $pipeline as array()) as object() external",description:' Performs a MongoDB aggregation framework job on the given collection.\n The <em xmlns:xqdoc="http://www.xqdoc.org/1.0">$pipeline</em> parameter needs to specify a valid aggregation\n framework pipeline. For example,\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0">\n  [\n    { $project : {\n       author : 1,\n       tags : 1,\n    } },\n    { $unwind : "$tags" },\n    { $group : {\n       _id : { tags : "$tags" },\n       authors : { $addToSet : "$author" }\n    } }\n ]\n </pre>\n The function returns the result as one object. The object contains\n the field named "ok" with value 0 if the execution failed or 1 if\n it succeeded. If it succeeded, the result is contained as an array\n in the result field. Otherwise, the errmsg field contains the description\n of the error. For exampl,e\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0">\n {\n   "result" : [ ... ],\n   "ok" : 1\n }\n </pre>\n',summary:"<p> Performs a MongoDB aggregation framework job on the given collection.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"collection",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the collection to execute the job on</div>'},{name:"pipeline",type:"array()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the specification of the pipeline to execute</div>'}],returns:{type:"object()",description:"an object with the result or the error message."},errors:[]},{isDocumented:!1,arity:1,name:"clear-if",qname:"store:clear-if",signature:"($cond as boolean) as integer",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"cond",type:"boolean",occurrence:null,description:""}],returns:{type:"integer",description:""},errors:[]},{isDocumented:!1,arity:0,name:"clear",qname:"store:clear",signature:"() as integer external",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[],returns:{type:"integer",description:""},errors:[]},{isDocumented:!1,arity:1,name:"collection-chunk-specs",qname:"store:collection-chunk-specs",signature:"($name as string) as object()*",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"string",occurrence:null,description:""}],returns:{type:"object()*",description:""},errors:[]},{isDocumented:!1,arity:2,name:"collection-chunk-specs",qname:"store:collection-chunk-specs",signature:"($name as string, $chunk-size as integer) as object()* external",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"string",occurrence:null,description:""},{name:"chunk-size",type:"integer",occurrence:null,description:""}],returns:{type:"object()*",description:""},errors:[]},{isDocumented:!1,arity:2,name:"collection-chunk",qname:"store:collection-chunk",signature:"($name as string, $chunk as object()) as item()* external",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"string",occurrence:null,description:""},{name:"chunk",type:"object()",occurrence:null,description:""}],returns:{type:"item()*",description:""},errors:[]},{isDocumented:!0,arity:2,name:"find",qname:"store:find",signature:"($coll as string, $query as object()) as object()*",description:" Performs a MongoDB query operation on the given collection and\n returns all matches.\n",summary:"<p> Performs a MongoDB query operation on the given collection and\n returns all matches.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"coll",type:"string",occurrence:null,description:""},{name:"query",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the query operation to perform</div>'}],returns:{type:"object()*",description:"all matches returned by the given query operation"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZSTR0009 if the given collection does not exist</xqdoc:error>']},{isDocumented:!0,arity:3,name:"find",qname:"store:find",signature:"($coll as string, $query as object(), $options as object()) as object()* external",description:' Performs a MongoDB query operation on the given collection and\n returns all matches.\n Available options:\n <ul xmlns:xqdoc="http://www.xqdoc.org/1.0">\n   <li>to-return: the maximum number of objects to return (0 = unlimited)</li>\n   <li>to-skip: start with the n-th object</li>\n   <li>batch-size: the number of objects to return in one batch</li>\n   <li>slave-ok: allow this query to be run against a replica secondary</li>\n   <li>await-data: the server will block for some extra time before returning,\n   waiting for more data to return</li>\n   <li>partial-results: return partial results if some shards are down instead\n   of returning an error</li>\n </ul>\n',summary:"<p> Performs a MongoDB query operation on the given collection and\n returns all matches.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"coll",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the collection</div>'},{name:"query",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the query operation to perform</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the options for this operation</div>'}],returns:{type:"object()*",description:"all matches returned by the given query operation"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZSTR0009 if the given collection does not exist</xqdoc:error>']},{isDocumented:!1,arity:1,name:"flush-if",qname:"store:flush-if",signature:"($cond as boolean) as empty-sequence()",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"cond",type:"boolean",occurrence:null,description:""}],returns:{type:"empty-sequence()",description:""},errors:[]},{isDocumented:!1,arity:0,name:"flush",qname:"store:flush",signature:"() as empty-sequence() external",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[],returns:{type:"empty-sequence()",description:""},errors:[]}],variables:[]},"http://zorba.io/modules/hash":{ns:"http://zorba.io/modules/hash",description:" This module provides functions that perform different hash operations.\n For example, they compute MD5 and various SHA functions on either\n strings or binary. The result is the base64 encoded value of the hash.\n",sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Gabriel Petrovay, Markus Pilman, Matthias Brantner</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/modules/hash",prefix:"hash"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:2,name:"hash-binary",qname:"hash:hash-binary",signature:"($value as xs:base64Binary, $alg as xs:string) as xs:base64Binary external",description:" This function computes a hash value of the binary form of the given\n base64Binary item, i.e. the item is base64-decoded before hashing.\n",summary:"<p> This function computes a hash value of the binary form of the given\n base64Binary item, i.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"value",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The binary item to be hashed.</div>'},{name:"alg",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The algorithm to use for this hashing operation. Supported algorithms are "md5", "sha1", and "sha256".</div>'}],returns:{type:"xs:base64Binary",description:"The hash as xs:base64Binary of the provided binary"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">hash:UNSUPPORTED-ALGORITHM if the given hash algorithm is not supported</xqdoc:error>']},{isDocumented:!0,arity:2,name:"hash",qname:"hash:hash",signature:"($value as xs:string, $alg as xs:string) as xs:base64Binary external",description:" This function computes a hash value of the string provided as parameter.\n The function expects the hash algorithm to be used as parameter.\n",summary:"<p> This function computes a hash value of the string provided as parameter.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"value",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The string to be hashed.</div>'},{name:"alg",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The algorithm to use for this hashing operation. Supported algorithms are "md5", "sha1", and "sha256".</div>'}],returns:{type:"xs:base64Binary",description:"The hash as xs:base64binary of the provided string"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">hash:UNSUPPORTED-ALGORITHM if the given hash algorithm is not supported</xqdoc:error>']},{isDocumented:!0,arity:1,name:"md5-binary",qname:"hash:md5-binary",signature:"($value as xs:base64Binary) as xs:base64Binary",description:" This function computes the MD5 hash value of the binary form of the given\n base64Binary item, i.e. the item is base64-decoded before hashing.\n",summary:"<p> This function computes the MD5 hash value of the binary form of the given\n base64Binary item, i.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"value",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The binary item to hash.</div>'}],returns:{type:"xs:base64Binary",description:"The MD5 hash of the provided binary."},errors:[]},{isDocumented:!0,arity:1,name:"md5",qname:"hash:md5",signature:"($value as xs:string) as xs:base64Binary",description:" Computes the MD5 hash of the string provided as parameter.\n",summary:"<p> Computes the MD5 hash of the string provided as parameter.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"value",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The string to hash</div>'}],returns:{type:"xs:base64Binary",description:"The MD5 hash as xs:base64Binary"},errors:[]},{isDocumented:!0,arity:1,name:"sha1-binary",qname:"hash:sha1-binary",signature:"($value as xs:base64Binary) as xs:base64Binary",description:" This function computes the SHA1 hash value of the binary form of the given\n base64Binary item, i.e. the item is base64-decoded before hashing.\n",summary:"<p> This function computes the SHA1 hash value of the binary form of the given\n base64Binary item, i.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"value",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The binary item to hash.</div>'}],returns:{type:"xs:base64Binary",description:"The base64 encoded SHA1 hash of the provided binary."},errors:[]},{isDocumented:!0,arity:1,name:"sha1",qname:"hash:sha1",signature:"($value as xs:string) as xs:base64Binary",description:" Computes the SHA1 hash of the string provided as parameter.\n",summary:"<p> Computes the SHA1 hash of the string provided as parameter.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"value",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The string to hash.</div>'}],returns:{type:"xs:base64Binary",description:"The SHA1 hash as xs:base64Binary"},errors:[]}],variables:[]},"http://zorba.io/modules/xsl-fo":{ns:"http://zorba.io/modules/xsl-fo",description:' This module converts <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3schools.com/xslfo/default.asp">XSL-FO</a> documents\n to various formats such as PDF, EPS, PCL, AFP, Text, PNG, Postscript, RTF, and TIFF.\n For instance, the following example converts a simple XSL-FO document to PDF:\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static" ace-mode="xquery">import module namespace fop = "http://zorba.io/modules/xsl-fo";\n import module namespace file = "http://expath.org/ns/file";\n declare namespace fo = "http://www.w3.org/1999/XSL/Format";\n let $xsl-fo := &lt;fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"&gt;\n   &lt;fo:layout-master-set&gt;\n     &lt;fo:simple-page-master master-name="my-page"&gt;\n       &lt;fo:region-body margin="1in"/&gt;\n     &lt;/fo:simple-page-master&gt;\n   &lt;/fo:layout-master-set&gt;\n   &lt;fo:page-sequence master-reference="my-page"&gt;\n     &lt;fo:flow flow-name="xsl-region-body"&gt;\n       &lt;fo:block&gt;Hello, world!&lt;/fo:block&gt;\n     &lt;/fo:flow&gt;\n   &lt;/fo:page-sequence&gt;\n  &lt;/fo:root&gt;\n let $pdf := fop:generator($fop:PDF, $xsl-fo)\n return file:write-binary("simple.pdf", $pdf)</pre>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n This module uses Apache-FOP to generate content from an XSL-FO document.\n See <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://xmlgraphics.apache.org/fop/">the Apache FOP documentation</a> for further information.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <b xmlns:xqdoc="http://www.xqdoc.org/1.0">Note for Windows users</b>: On Windows, this module won\'t work out of the box, since\n this module uses Java. But the Java VM dll is not in the system path by default. To make\n this module work, you need to add the directory where the jvm.dll is located to the\n system path. This dll is located at JRE_DIR\\bin\\client. On a standard installation, this would\n be something a path like "C:\\Program Files\\Java\\jre6\\bin\\client".\n',sees:['<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://xmlgraphics.apache.org/fop/</xqdoc:see>'],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Markus Pilman</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://www.w3.org/2005/xqt-errors",prefix:"err"},{uri:"http://www.zorba-xquery.com/modules/util-jvm",prefix:"util-jvm"},{uri:"http://zorba.io/options/versioning",prefix:"ver"},{uri:"http://zorba.io/modules/xsl-fo",prefix:"xsl-fo"}],functions:[{isDocumented:!0,arity:2,name:"generator",qname:"xsl-fo:generator",signature:"($output-format as xs:string, $xsl-fo-document as node()) as xs:base64Binary",description:' The generator function takes an XSL-FO document as input and generates output\n in the format given as input.\n The output format can be given as a MIME type - for example "application/pdf"\n - or one of the predefined variables can be used - like $xsl-fo:PDF. Please\n refer to the Apache FOP documentation for\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://xmlgraphics.apache.org/fop/0.95/output.html">supported output formats</a>.\n Apache FOP does not support 100% of the XSL-FO standard.\n Please consult the <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://xmlgraphics.apache.org/fop/">official\n documentation for further information</a>.\n This function tries to find the needed Java libraries itself.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n On a Mac OS X computer, it should be sufficient to install Apache FOP via Mac\n Ports.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n On Ubuntu it should be sufficient to install the fop packages via apt-get.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n On Windows, the classpath needs to be set manually using\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#generator#3">generator#3</a>.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n This function tries to find the jar files via environment variables. The user can set the\n variable FOP_HOME to the root directory of an Apache FOP distribution. If you have all\n JAR files in the same directory, you can set the environment variable FOP_LIB_DIR to this\n directory.\n',summary:"<p> The generator function takes an XSL-FO document as input and generates output\n in the format given as input.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"output-format",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The mime of the output format, to tell Apache FOP which kind of document it should create.</div>'},{name:"xsl-fo-document",type:"node()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The XSL-FO document from which the output should be generated.</div>'}],returns:{type:"xs:base64Binary",description:"The generated output document."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">xsl-fo:JVM-NOT-STARTED If zorba was unable to start the JVM.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">xsl-fo:JAVA-EXCEPTION If Apache FOP throws an exception - i.e. if the input format is not correct/supported.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">xsl-fo:JAR-NOT-FOUND If a needed Java library could not be found.</xqdoc:error>']}],variables:[{name:"xsl-fo:AFP",type:"xs:string",description:" The mime type of IBMs AFP format (application/x-afp).\n"},{name:"xsl-fo:EPS",type:"xs:string",description:" The mime type of the EPS format (application/postscript).\n"},{name:"xsl-fo:PCL",type:"xs:string",description:" The mime type of the PCL format (application/x-pcl).\n"},{name:"xsl-fo:PDF",type:"xs:string",description:" The mime type of the PDF format (application/pdf).\n"},{name:"xsl-fo:PLAIN_TEXT",type:"xs:string",description:" The mime type for plain text files (text/plain).\n"},{name:"xsl-fo:PNG",type:"xs:string",description:" The mime type of the PNG format (image/png).\n"},{name:"xsl-fo:POSTSCRIPT",type:"xs:string",description:" The mime type of the postscript format (application/postscript).\n"},{name:"xsl-fo:RTF",type:"xs:string",description:" The mime type of the RTF format (application/rtf).\n"},{name:"xsl-fo:TIFF",type:"xs:string",description:" The mime type of TIFF format (application/tiff).\n"}]},"http://zorba.io/warnings":{ns:"http://zorba.io/warnings",description:" This module contains one variable declaration for each diagnostic of the\n http://zorba.io/warnings namespace.\n The variables serves as documentation for the errors but can also\n be used in the code. For example, one useful scenario is to compare\n an error caught in the catch clause of a try-catch expression with one of\n the variables.\n",sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Carlos Lopez</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/warnings",prefix:"zwarn"}],functions:[],variables:[{name:"zwarn:NS",type:"item()*",description:""},{name:"zwarn:ZWST0002",type:"xs:QName",description:" This warning is reported if the declaration of a function, variable,\n collection, or index contains an annotation that is not in the\n http://zorba.io/annotations namespace and Zorba doesn't know how to\n handle.\n"},{name:"zwarn:ZWST0003",type:"item()*",description:""},{name:"zwarn:ZWST0004",type:"item()*",description:""},{name:"zwarn:ZWST0005",type:"xs:QName",description:" This warning is raised if the user explicitly enables caching\n of function results (using the %an:cache or %an:strictlydeterministic\n annotation) but the function cannot be cached.\n For %an:cache this happens if the function is updating or variadic.\n For %an:strictlydeterministic this happens if the function is updating,\n variadic or sequential.\n"},{name:"zwarn:ZWST0006",type:"xs:QName",description:" This warning is raised if the user explicitly enables caching\n of function results (using the %an:cache annotation) and the function\n is annotated as sequential or nondeterministic.\n"},{name:"zwarn:ZWST0007",type:"item()*",description:""},{name:"zwarn:ZWST0008",type:"item()*",description:""},{name:"zwarn:ZWST0009",type:"xs:QName",description:' This warning is enabled when the "common-language" option is employed. It will raise warnings\n for language features that are not supported by both XQuery and JSONiq grammars.\n'}]},"http://www.28msec.com/modules/sparql":{ns:"http://www.28msec.com/modules/sparql",description:' This module contains functions to interact with a SPARQL endpoint.\n Requests to an endpoint are made using HTTP.\n Specifically, this module allows SELECT, ASK, CONSTRUCT and DESCRIBE queries. Additionally, it also allows for UPDATE statements.\n Various result formats are supported (e.g. XML, JSON, CSV)\n <h2 xmlns:xqdoc="http://www.xqdoc.org/1.0">Configuration</h2>\n For this module you may use a preconfigured default or named datasource of the SPARQL category.\n You can also provide a configuration object directly.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">As config parameter you can either pass a string that will be interpreted as a SPARQL endpoint datasource name or\n  an object with the following properties:\n <ul>\n  <li><tt>href</tt>: The URL of the SPARQL endpoint to use. Required.</li>\n  <li><tt>auth_method</tt>: The HTTP authentication method to use.</li>\n  <li><tt>username</tt>: The username to use for HTTP authentication.</li>\n  <li><tt>password</tt>: The password to use for HTTP authentication.</li>\n </ul>\n </p>\n <h2 xmlns:xqdoc="http://www.xqdoc.org/1.0">Options</h2>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The options object that can be passed to plenty of the functions in this module. It may have the following properties:\n <ul>\n   <li><tt>default-graph-uri</tt>: A string or an array of strings with the graph URIs to be used by the query.</li>\n   <li><tt>named-graph-uri</tt>: A string or an array of strings with the named graph URIs to be used by the query.</li>\n   <li><tt>using-graph-uri</tt>: A string or an array of strings with the graph URIs to be used by an update statement.</li>\n   <li><tt>using-named-graph-uri</tt>: A string or an array of strings with the named graph URIs to be used by an update statement.</li>\n   <li><tt>method</tt>: The request method to be used. Available method values are $sparql:METHOD-GET, $sparql:METHOD-POST-URLENCODED or $sparql:METHOD-POST-SPARQL.</li>\n   <li><tt>format</tt> : The result format to request. Possible format values are $sparql:FORMAT-XML, $sparql:FORMAT-JSON, $sparql:FORMAT-CSV, $sparql:FORMAT-TSV, $sparql:FORMAT-ANY. For CONSTRUCT or DESCRIBE queries $sparql:FORMAT-RDF is available.</li>\n   <li><tt>parameters</tt>: Many SPARQL endpoints support additional parameters which are not part of the SPARQL endpoint specification. They can be provided here.</li>\n   <li><tt>http-headers</tt>: object that will be used as the headers property for the requests made by the http-client.</li>\n   <li><tt>http-options</tt>: object that will be used as the options property for the requests made by the http-client.</li>\n  </ul>\n <p>All those properties are optional.</p>\n </p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Alexander.Kreutz@28msec.com</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"",prefix:"an"},{uri:"http://www.28msec.com/modules/credentials",prefix:"credentials"},{uri:"http://zorba.io/modules/http-client",prefix:"http-client"},{uri:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",prefix:"rdf"},{uri:"http://www.w3.org/2005/sparql-results#",prefix:"s"},{uri:"http://www.28msec.com/modules/sparql",prefix:"sparql"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"ask",qname:"sparql:ask",signature:"($query as string) as xs:boolean",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This function sends a SPARQL ASK query to an endpoint and returns the result as boolean value.\n The default datasource for SPARQL will be used.\n </p>\n',summary:"<p>  \n This function sends a SPARQL ASK query to an endpoint and returns the result as boolean value.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"query",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A SPARQL ASK query as string.</div>'}],returns:{type:"xs:boolean",description:"The boolean ASK query result."},errors:[]},{isDocumented:!0,arity:2,name:"ask",qname:"sparql:ask",signature:"($query as string, $options as object()?) as xs:boolean",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This function sends a SPARQL ASK query to an endpoint and returns the result as boolean value.\n The default datasource for SPARQL will be used.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n   <ul>\n    <li>The <tt>default-graph-uri</tt> and <tt>named-graph-uri</tt> properties of the options object may be used to pass default graph URIs or named graph URIs to the endpoint.</li>\n    <li>The <tt>method</tt> property of the options object may be used to set the request method to be used. GET will be used as default.</li>\n    <li>The <tt>format</tt> property of the options object may be used to request a specific result format. However this function will try to extract only the boolean answer from the result.</li>\n   </ul>\n </p>\n',summary:"<p>  \n This function sends a SPARQL ASK query to an endpoint and returns the result as boolean value.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"query",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A SPARQL ASK query as string.</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An optional options object as described in the module description.</div>'}],returns:{type:"xs:boolean",description:"The boolean ASK query result."},errors:[]},{isDocumented:!0,arity:3,name:"ask",qname:"sparql:ask",signature:"($config as item()?, $query as string, $options as object()?) as xs:boolean",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This function sends a SPARQL ASK query to an endpoint and returns the result as boolean value.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n   <ul>\n    <li>The <tt>default-graph-uri</tt> and <tt>named-graph-uri</tt> properties of the options object may be used to pass default graph URIs or named graph URIs to the endpoint.</li>\n    <li>The <tt>method</tt> property of the options object may be used to set the request method to be used. GET will be used as default.</li>\n    <li>The <tt>format</tt> property of the options object may be used to request a specific result format. However this function will try to extract only the boolean answer from the result.</li>\n   </ul>\n </p>\n',summary:"<p>  \n This function sends a SPARQL ASK query to an endpoint and returns the result as boolean value.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"config",type:"item()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the credentials to use as string or a config object as described in the module description.</div>'},{name:"query",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A SPARQL ASK query as string.</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An optional options object as described in the module description.</div>'}],returns:{type:"xs:boolean",description:"The boolean ASK query result."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">sparql:INVALID-RESPONSE-TYPE if the response format cannot be handled by this function</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">sparql:ERROR if any http or endpoint error occurs</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">sparql:INVALID-PARAMETER invalid option specification</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">sparql:CREDENTIALS-NOT-FOUND credential information not found</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">sparql:CREDENTIALS-INVALID credential information not valid</xqdoc:error>']},{isDocumented:!0,arity:1,name:"query-json",qname:"sparql:query-json",signature:"($query as string) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This function sends a SPARQL SELECT or ASK query to an endpoint and returns the query response as SPARQL JSON format object.\n If the endpoint fails to deliver SPARQL JSON result format this function will try to convert the results to JSON if possible.\n The default datasource for SPARQL will be used.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Link to the specification of the result format at W3C: <a href="http://www.w3.org/TR/sparql11-results-json" target="_blank">SPARQL 1.1 Query Results JSON Format</a></p>\n',summary:"<p>  \n This function sends a SPARQL SELECT or ASK query to an endpoint and returns the query response as SPARQL JSON format object.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"query",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A SPARQL SELECT or ASK query as string.</div>'}],returns:{type:"object()",description:"The query result in SPARQL JSON format."},errors:[]},{isDocumented:!0,arity:2,name:"query-json",qname:"sparql:query-json",signature:"($query as string, $options as object()?) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This function sends a SPARQL SELECT or ASK query to an endpoint and returns the query response as SPARQL JSON format object.\n If the endpoint fails to deliver SPARQL JSON result format this function will try to convert the results to JSON if possible.\n The default datasource for SPARQL will be used.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Link to the specification of the result format at W3C: <a href="http://www.w3.org/TR/sparql11-results-json" target="_blank">SPARQL 1.1 Query Results JSON Format</a></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n   <ul>\n    <li>The <tt>default-graph-uri</tt> and <tt>named-graph-uri</tt> properties of the options object may be used to pass default graph URIs or named graph URIs to the endpoint.</li>\n    <li>The <tt>method</tt> property of the options object may be used to set the request method to be used. GET will be used as default.</li>\n    <li>The <tt>format</tt> property of the options object will be ignored. "application/sparql-results+json" will be requested as result format. </li>\n   </ul>\n </p>\n',summary:"<p>  \n This function sends a SPARQL SELECT or ASK query to an endpoint and returns the query response as SPARQL JSON format object.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"query",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A SPARQL SELECT or ASK query as string.</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An optional options object as described in the module description.</div>'}],returns:{type:"object()",description:"The query result in SPARQL JSON format."},errors:[]},{isDocumented:!0,arity:3,name:"query-json",qname:"sparql:query-json",signature:"($config as item()?, $query as string, $options as object()?) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This function sends a SPARQL SELECT or ASK query to an endpoint and returns the query response as SPARQL JSON format object.\n If the endpoint fails to deliver SPARQL JSON result format this function will try to convert the results to JSON if possible.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Link to the specification of the result format at W3C: <a href="http://www.w3.org/TR/sparql11-results-json" target="_blank">SPARQL 1.1 Query Results JSON Format</a></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n   <ul>\n    <li>The <tt>default-graph-uri</tt> and <tt>named-graph-uri</tt> properties of the options object may be used to pass default graph URIs or named graph URIs to the endpoint.</li>\n    <li>The <tt>method</tt> property of the options object may be used to set the request method to be used. GET will be used as default.</li>\n    <li>The <tt>format</tt> property of the options object will be ignored. "application/sparql-results+json" will be requested as result format. </li>\n   </ul>\n </p>\n',summary:"<p>  \n This function sends a SPARQL SELECT or ASK query to an endpoint and returns the query response as SPARQL JSON format object.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"config",type:"item()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the credentials to use as string or a config object as described in the module description.</div>'},{name:"query",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A SPARQL SELECT or ASK query as string.</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An optional options object as described in the module description.</div>'}],returns:{type:"object()",description:"The query result in SPARQL JSON format."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">sparql:INVALID-RESPONSE-TYPE if the response format cannot be handled by this function</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">sparql:ERROR if any http or endpoint error occurs</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">sparql:INVALID-PARAMETER invalid option specification</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">sparql:CREDENTIALS-NOT-FOUND credential information not found</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">sparql:CREDENTIALS-INVALID credential information not valid</xqdoc:error>']},{isDocumented:!0,arity:1,name:"query-rdf",qname:"sparql:query-rdf",signature:"($query as string) as element(rdf:RDF)",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This function sends a SPARQL CONSTRUCT or DESCRIBE query to an endpoint and returns the query response as RDF.\n The default datasource for SPARQL will be used.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Link to the specification of the result format at W3C: <a href="http://www.w3.org/TR/rdf-syntax-grammar" target="_blank">RDF/XML Syntax Specification</a></p>\n',summary:"<p>  \n This function sends a SPARQL CONSTRUCT or DESCRIBE query to an endpoint and returns the query response as RDF.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"query",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A SPARQL CONSTRUCT or DESCRIBE query as string.</div>'}],returns:{type:"element(rdf:RDF)",description:"The query result as RDF XML element."},errors:[]},{isDocumented:!0,arity:2,name:"query-rdf",qname:"sparql:query-rdf",signature:"($query as string, $options as object()?) as element(rdf:RDF)",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This function sends a SPARQL CONSTRUCT or DESCRIBE query to an endpoint and returns the query response as RDF.\n The default datasource for SPARQL will be used.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Link to the specification of the result format at W3C: <a href="http://www.w3.org/TR/rdf-syntax-grammar" target="_blank">RDF/XML Syntax Specification</a></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n   <ul>\n    <li>The <tt>default-graph-uri</tt> and <tt>named-graph-uri</tt> properties of the options object may be used to pass default graph URIs or named graph URIs to the endpoint.</li>\n    <li>The <tt>method</tt> property of the options object may be used to set the request method to be used. GET will be used as default.</li>\n    <li>The <tt>format</tt> property of the options object will be ignored. "application/rdf+xml" will be requested as result format. </li>\n   </ul>\n </p>\n',summary:"<p>  \n This function sends a SPARQL CONSTRUCT or DESCRIBE query to an endpoint and returns the query response as RDF.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"query",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A SPARQL CONSTRUCT or DESCRIBE query as string.</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An optional options object as described in the module description.</div>'}],returns:{type:"element(rdf:RDF)",description:"The query result as RDF XML element."},errors:[]},{isDocumented:!0,arity:3,name:"query-rdf",qname:"sparql:query-rdf",signature:"($config as item()?, $query as string, $options as object()?) as element(rdf:RDF)",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This function sends a SPARQL CONSTRUCT or DESCRIBE query to an endpoint and returns the query response as RDF.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Link to the specification of the result format at W3C: <a href="http://www.w3.org/TR/rdf-syntax-grammar" target="_blank">RDF/XML Syntax Specification</a></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n   <ul>\n    <li>The <tt>default-graph-uri</tt> and <tt>named-graph-uri</tt> properties of the options object may be used to pass default graph URIs or named graph URIs to the endpoint.</li>\n    <li>The <tt>method</tt> property of the options object may be used to set the request method to be used. GET will be used as default.</li>\n    <li>The <tt>format</tt> property of the options object will be ignored. "application/rdf+xml" will be requested as result format. </li>\n   </ul>\n </p>\n',summary:"<p>  \n This function sends a SPARQL CONSTRUCT or DESCRIBE query to an endpoint and returns the query response as RDF.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"config",type:"item()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the credentials to use as string or a config object as described in the module description.</div>'},{name:"query",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A SPARQL CONSTRUCT or DESCRIBE query as string.</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An optional options object as described in the module description.</div>'}],returns:{type:"element(rdf:RDF)",description:"The query result as RDF XML element."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">sparql:INVALID-RESPONSE-TYPE if the response format cannot be handled by this function</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">sparql:ERROR if any http or endpoint error occurs</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">sparql:INVALID-PARAMETER invalid option specification</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">sparql:CREDENTIALS-NOT-FOUND credential information not found</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">sparql:CREDENTIALS-INVALID credential information not valid</xqdoc:error>']},{isDocumented:!0,arity:1,name:"query-xml",qname:"sparql:query-xml",signature:"($query as string) as element(s:sparql)",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This function sends a SPARQL SELECT or ASK query to an endpoint and returns the query response as SPARQL XML format element.\n If the endpoint fails to deliver SPARQL XML result format this function will try to convert the results to XML if possible.\n The default datasource for SPARQL will be used.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Link to the specification of the result format at W3C: <a href="http://www.w3.org/TR/rdf-sparql-XMLres/" target="_blank">SPARQL Query Results XML Format</a></p>\n',summary:"<p>  \n This function sends a SPARQL SELECT or ASK query to an endpoint and returns the query response as SPARQL XML format element.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"query",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A SPARQL SELECT or ASK query as string.</div>'}],returns:{type:"element(s:sparql)",description:"The query result in SPARQL XML format."},errors:[]},{isDocumented:!0,arity:2,name:"query-xml",qname:"sparql:query-xml",signature:"($query as string, $options as object()?) as element(s:sparql)",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This function sends a SPARQL SELECT or ASK query to an endpoint and returns the query response as SPARQL XML format element.\n If the endpoint fails to deliver SPARQL XML result format this function will try to convert the results to XML if possible.\n The default datasource for SPARQL will be used.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Link to the specification of the result format at W3C: <a href="http://www.w3.org/TR/rdf-sparql-XMLres/" target="_blank">SPARQL Query Results XML Format</a></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n   <ul>\n    <li>The <tt>default-graph-uri</tt> and <tt>named-graph-uri</tt> properties of the options object may be used to pass default graph URIs or named graph URIs to the endpoint.</li>\n    <li>The <tt>method</tt> property of the options object may be used to set the request method to be used. GET will be used as default.</li>\n    <li>The <tt>format</tt> property of the options object will be ignored. "application/sparql-results+xml" will be requested as result format. </li>\n   </ul>\n </p>\n',summary:"<p>  \n This function sends a SPARQL SELECT or ASK query to an endpoint and returns the query response as SPARQL XML format element.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"query",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A SPARQL SELECT or ASK query as string.</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An optional options object as described in the module description.</div>'}],returns:{type:"element(s:sparql)",description:"The query result in SPARQL XML format."},errors:[]},{isDocumented:!0,arity:3,name:"query-xml",qname:"sparql:query-xml",signature:"($config as item()?, $query as string, $options as object()?) as element(s:sparql)",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This function sends a SPARQL SELECT or ASK query to an endpoint and returns the query response as SPARQL XML format element.\n If the endpoint fails to deliver SPARQL XML result format this function will try to convert the results to XML if possible.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Link to the specification of the result format at W3C: <a href="http://www.w3.org/TR/rdf-sparql-XMLres/" target="_blank">SPARQL Query Results XML Format</a></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n   <ul>\n    <li>The <tt>default-graph-uri</tt> and <tt>named-graph-uri</tt> properties of the options object may be used to pass default graph URIs or named graph URIs to the endpoint.</li>\n    <li>The <tt>method</tt> property of the options object may be used to set the request method to be used. GET will be used as default.</li>\n    <li>The <tt>format</tt> property of the options object will be ignored. "application/sparql-results+xml" will be requested as result format. </li>\n   </ul>\n </p>\n',summary:"<p>  \n This function sends a SPARQL SELECT or ASK query to an endpoint and returns the query response as SPARQL XML format element.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"config",type:"item()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the credentials to use as string or a config object as described in the module description.</div>'},{name:"query",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A SPARQL SELECT or ASK query as string.</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An optional options object as described in the module description.</div>'}],returns:{type:"element(s:sparql)",description:"The query result in SPARQL XML format."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">sparql:INVALID-RESPONSE-TYPE if the response format cannot be handled by this function</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">sparql:ERROR if any http or endpoint error occurs</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">sparql:INVALID-PARAMETER invalid option specification</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">sparql:CREDENTIALS-NOT-FOUND credential information not found</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">sparql:CREDENTIALS-INVALID credential information not valid</xqdoc:error>']},{isDocumented:!0,arity:1,name:"query",qname:"sparql:query",signature:"($query as string) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This function sends a SPARQL query to an endpoint and directly returns the corresponding HTTP response.\n The default datasource for SPARQL will be used.\n </p>\n',summary:"<p>  \n This function sends a SPARQL query to an endpoint and directly returns the corresponding HTTP response.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"query",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A SPARQL query as string. May be any kind of query but not an update.</div>'}],returns:{type:"object()",description:"The endpoints response. This function returns the plain response object from the http-client."},errors:[]},{isDocumented:!0,arity:2,name:"query",qname:"sparql:query",signature:"($query as string, $options as object()?) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This function sends a SPARQL query to an endpoint and directly returns the corresponding HTTP response.\n The default datasource for SPARQL will be used.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n   <ul>\n    <li>The <tt>default-graph-uri</tt> and <tt>named-graph-uri</tt> properties of the options object may be used to pass default graph URIs or named graph URIs to the endpoint.</li>\n    <li>The <tt>method</tt> property of the options object may be used to set the request method to be used. GET will be used as default.</li>\n    <li>The <tt>format</tt> property of the options object may be used to request a specific result format. XML will be used as default. However, note that this function does not interpret the result.</li>\n   </ul>\n </p>\n',summary:"<p>  \n This function sends a SPARQL query to an endpoint and directly returns the corresponding HTTP response.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"query",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A SPARQL query as string. May be any kind of query but not an update.</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An optional options object as described in the module description.</div>'}],returns:{type:"object()",description:"The endpoints response. This function returns the plain response object from the http-client."},errors:[]},{isDocumented:!0,arity:3,name:"query",qname:"sparql:query",signature:"($config as item()?, $query as string, $options as object()?) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This function sends a SPARQL query to an endpoint and directly returns the corresponding HTTP response.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n   <ul>\n    <li>The <tt>default-graph-uri</tt> and <tt>named-graph-uri</tt> properties of the options object may be used to pass default graph URIs or named graph URIs to the endpoint.</li>\n    <li>The <tt>method</tt> property of the options object may be used to set the request method to be used. GET will be used as default.</li>\n    <li>The <tt>format</tt> property of the options object may be used to request a specific result format. XML will be used as default. However, note that this function does not interpret the result.</li>\n   </ul>\n </p>\n',summary:"<p>  \n This function sends a SPARQL query to an endpoint and directly returns the corresponding HTTP response.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"config",type:"item()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the credentials to use as string or a config object as described in the module description.</div>'},{name:"query",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A SPARQL query as string. May be any kind of query but not an update.</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An optional options object as described in the module description.</div>'}],returns:{type:"object()",description:"The endpoints response. This function returns the plain response object from the http-client."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">sparql:INVALID-PARAMETER invalid option specification</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">sparql:CREDENTIALS-NOT-FOUND credential information not found</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">sparql:CREDENTIALS-INVALID credential information not valid</xqdoc:error>']},{isDocumented:!0,arity:1,name:"update",qname:"sparql:update",signature:"($update-statement as string) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This function sends a SPARQL update statement to an endpoint and directly returns the corresponding HTTP response.\n The default datasource for SPARQL will be used.\n </p>\n',summary:"<p>  \n This function sends a SPARQL update statement to an endpoint and directly returns the corresponding HTTP response.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"update-statement",type:"string",occurrence:null,description:""}],returns:{type:"object()",description:"The endpoints response. This function returns the plain response object from the http-client."},errors:[]},{isDocumented:!0,arity:2,name:"update",qname:"sparql:update",signature:"($update-statement as string, $options as object()?) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This function sends a SPARQL update statement to an endpoint and directly returns the corresponding HTTP response.\n The default datasource for SPARQL will be used.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n   <ul>\n    <li>The <tt>using-graph-uri</tt> and <tt>using-named-graph-uri</tt> properties of the options object may be used to pass graph URIs or named graph URIs to the endpoint.</li>\n    <li>The <tt>method</tt> property of the options object may be used to set the request method to be used. POST-URLENCODED will be used as default.</li>\n    <li>The <tt>format</tt> property of the options object may be used to request a specific result format. XML will be used as default. However, note that this function does not interpret the result.</li>\n   </ul>\n </p>\n',summary:"<p>  \n This function sends a SPARQL update statement to an endpoint and directly returns the corresponding HTTP response.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"update-statement",type:"string",occurrence:null,description:""},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An optional options object as described in the module description.</div>'}],returns:{type:"object()",description:"The endpoints response. This function returns the plain response object from the http-client."},errors:[]},{isDocumented:!0,arity:3,name:"update",qname:"sparql:update",signature:"($config as item()?, $update-statement as string, $options as object()?) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This function sends a SPARQL update statement to an endpoint and directly returns the corresponding HTTP response.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n   <ul>\n    <li>The <tt>using-graph-uri</tt> and <tt>using-named-graph-uri</tt> properties of the options object may be used to pass graph URIs or named graph URIs to the endpoint.</li>\n    <li>The <tt>method</tt> property of the options object may be used to set the request method to be used. POST-URLENCODED will be used as default.</li>\n    <li>The <tt>format</tt> property of the options object may be used to request a specific result format. XML will be used as default. However, note that this function does not interpret the result.</li>\n   </ul>\n </p>\n',summary:"<p>  \n This function sends a SPARQL update statement to an endpoint and directly returns the corresponding HTTP response.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"config",type:"item()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the credentials to use as string or a config object as described in the module description.</div>'},{name:"update-statement",type:"string",occurrence:null,description:""},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An optional options object as described in the module description.</div>'}],returns:{type:"object()",description:"The endpoints response. This function returns the plain response object from the http-client."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">sparql:INVALID-PARAMETER invalid option specification</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">sparql:CREDENTIALS-NOT-FOUND credential information not found</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">sparql:CREDENTIALS-INVALID credential information not valid</xqdoc:error>']}],variables:[{name:"sparql:CREDENTIALS-CATEGORY",type:"string",description:" This variable represents the category of the datasource.\n"},{name:"sparql:METHOD-GET",type:"string",description:' This variable represents the request method using HTTP GET requests. May be used for the <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">method</tt> property of the options object.\n'},{name:"sparql:METHOD-POST-URLENCODED",type:"string",description:' This variable represents the request method using HTTP POST with URL-encoded parameters. May be used for the <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">method</tt> property of the options object.\n'},{name:"sparql:METHOD-POST-SPARQL",type:"string",description:' This variable represents the request method using HTTP POST with the application/sparql-query content type. May be used for the <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">method</tt> property of the options object.\n'},{name:"sparql:FORMAT-XML",type:"string",description:' This variable represents the SPARQL XML result format.May be used for the <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">format</tt> property of the options object.\n'},{name:"sparql:FORMAT-JSON",type:"string",description:' This variable represents the SPARQL JSON result format.May be used for the <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">format</tt> property of the options object.\n'},{name:"sparql:FORMAT-RDF",type:"string",description:' This variable represents the RDF+XML result format.May be used for the <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">format</tt> property of the options object.\n'},{name:"sparql:FORMAT-CSV",type:"string",description:' This variable represents the CSV result format.May be used for the <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">format</tt> property of the options object.\n'},{name:"sparql:FORMAT-TSV",type:"string",description:' This variable represents the TSV result format.May be used for the <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">format</tt> property of the options object.\n'},{name:"sparql:FORMAT-ANY",type:"string",description:' This variable represents any result format. May be used for the <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">format</tt> property of the options object to not specify a requested format.\n'}]},"http://api.28.io/dispatcher":{ns:"http://api.28.io/dispatcher",description:"",sees:[],authors:[],version:null,encoding:null,namespaces:[{uri:"",prefix:"an"},{uri:"http://api.28.io/browserview",prefix:"browserview"},{uri:"http://api.28.io/csvview",prefix:"csvview"},{uri:"http://api.28.io/dispatcher",prefix:"dispatcher"},{uri:"http://api.28.io/functions",prefix:"functions"},{uri:"http://api.28.io/model",prefix:"model"},{uri:"http://zorba.io/modules/xml",prefix:"parse-xml"},{uri:"http://www.zorba-xquery.com/schemas/pul",prefix:"pul"},{uri:"http://www.28msec.com/modules/http/request",prefix:"req"},{uri:"http://www.28msec.com/modules/http/response",prefix:"response"},{uri:"http://www.zorba-xquery.com/schemas/xdm",prefix:"xdm"},{uri:"http://api.28.io/xdmview",prefix:"xdmview"}],functions:[{isDocumented:!0,arity:0,name:"restapi",qname:"dispatcher:restapi",signature:"()",description:" Main function for the collection browser. May be called from a handler function.\n Uses the call URL to determine which page needs to be returned.\n The URL for the initial page needs to end with /index\n",summary:"<p> Main function for the collection browser.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[],returns:{type:null,description:"the requested page of the collection browser"},errors:[]}],variables:[]},"http://zorba.io/modules/store/static/collections/ddl":{ns:"http://zorba.io/modules/store/static/collections/ddl",description:' This modules defines a set of functions for managing collections that are\n declared in the prolog of a module.\n For example, it provides functions to create, delete, or introspect\n collections.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n This module is part of <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="../zorba/xqddf.html">Zorba\'s XQuery Data\n Definition Facility</a>. All the collections managed by this module\n have to be pre-declared in the prolog of a module. Please refer to the\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="../zorba/data_lifecycle.html">general documentation</a>\n for more information and examples.\n',sees:['<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0"><a href="../zorba/data_lifecycle.html">Data Lifecycle</a></xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0"><a href="../zorba/xqddf.html">XQuery Data Definition Facility</a></xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://zorba.io/modules/store/static/collections/dml</xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://zorba.io/modules/store/static/indexes/ddl</xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://zorba.io/modules/store/static/indexes/dml</xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://zorba.io/modules/store/static/integrity-constraints/ddl</xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://zorba.io/modules/store/static/integrity-constraints/dml</xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://zorba.io/errors</xqdoc:see>'],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Nicolae Brinza, Matthias Brantner, David Graf, Till Westmann, Markos Zaharioudakis</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/modules/store/static/collections/ddl",prefix:"cddl"},{uri:"http://zorba.io/options/versioning",prefix:"ver"},{uri:"http://zorba.io/errors",prefix:"zerr"}],functions:[{isDocumented:!0,arity:0,name:"available-collections",qname:"cddl:available-collections",signature:"() as xs:QName* external",description:" Gets the QNames of the collections that have been statically declared and\n are available, if any.\n",summary:"<p> Gets the QNames of the collections that have been statically declared and\n are available, if any.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:QName*",description:"A sequence comprising one QName for each statically declared and available collection or an emtpy sequence if no such collections are available."},errors:[]},{isDocumented:!0,arity:1,name:"create",qname:"cddl:create",signature:"($name as xs:QName) external",description:" Creates a collection.\n",summary:"<p> Creates a collection.</p>",annotation_str:"",annotations:[],updating:!0,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The of the collection to create.</div>'}],returns:{type:null,description:"An empty XDM instance and a pending update list that, once applied, creates a collection with the given name."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0001 if <code>$name</code> is not equal to any of the declared collections in the static context.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0002 if a collection with <code>$name</code> already exists.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"create",qname:"cddl:create",signature:"($name as xs:QName, $content as item()*) external",description:" Creates a collection and adds the given sequence as content to the new\n collection.\n",summary:"<p> Creates a collection and adds the given sequence as content to the new\n collection.</p>",annotation_str:"",annotations:[],updating:!0,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the collection to create.</div>'},{name:"content",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The sequences of items (nodes or JSON items) to be added to the new collection.</div>'}],returns:{type:null,description:"An empty XDM instance and a pending update list that, once applied, creates a collection with the given name and inserts the given items into it."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0001 if <code>$name</code> is not equal to any of the declared collections in the static context.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0002 if a collection with <code>$name</code> already exists.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDTY0001 if <code>$content</code> does not match the expected type declared by the collection according to the rules for SequenceType Matching.</xqdoc:error>']},{isDocumented:!0,arity:0,name:"declared-collections",qname:"cddl:declared-collections",signature:"() as xs:QName* external",description:" Gets the collections that have been declared in the prolog of the static\n context.\n",summary:"<p> Gets the collections that have been declared in the prolog of the static\n context.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:QName*",description:"A sequence of QNames, one for each collection created in the static context, or an emtpy sequence."},errors:[]},{isDocumented:!0,arity:1,name:"delete",qname:"cddl:delete",signature:"($name as xs:QName) external",description:" Deletes a collection.\n",summary:"<p> Deletes a collection.</p>",annotation_str:"",annotations:[],updating:!0,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The collection to delete.</div>'}],returns:{type:null,description:"An empty XDM instance and a pending update list that, once applied, deletes the collection with the given name."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0001 if <code>$name</code> is not equal to any of the declared collections in the static context.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0003 if the collection identified by <code>$name</code> is not available.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0013 if the domain or key expression of any of the available indexes access the collection having <code>$name</code>.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0015 if any of the in-scope variables references an item that belongs to the collection having <code>$name</code></xqdoc:error>']},{isDocumented:!0,arity:1,name:"is-available-collection",qname:"cddl:is-available-collection",signature:"($name as xs:QName) as xs:boolean external",description:" Gets whether a collection is statically declared and available.\n",summary:"<p> Gets whether a collection is statically declared and available.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the collection to check.</div>'}],returns:{type:"xs:boolean",description:"true if the collection was statically declared and is available; false otherwise."},errors:[]},{isDocumented:!0,arity:1,name:"is-declared-collection",qname:"cddl:is-declared-collection",signature:"($name as xs:QName) as xs:boolean external",description:" Gers whether a collection was declared in the prolog of the static context.\n",summary:"<p> Gers whether a collection was declared in the prolog of the static context.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the collection to check.</div>'}],returns:{type:"xs:boolean",description:"true if the collection was declared; false otherwise."},errors:[]}],variables:[]},"http://www.28msec.com/modules/math":{ns:"http://www.28msec.com/modules/math",description:' The functions in this module perform trigonometric and other mathematical\n calculations on double values.\n For a more detailed description of the semantics of each function, please\n refer to <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xpath-functions-30/#trigonometry">\n Trigonometric and exponential functions</a>.\n',sees:[],authors:[],version:null,encoding:"utf-8",namespaces:[{uri:"http://www.w3.org/2005/xpath-functions/math",prefix:"fnmath"},{uri:"http://www.28msec.com/modules/math",prefix:"math"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"acos",qname:"math:acos",signature:"($arg as double?) as double?",description:" Returns the arc cosine of the argument, the result being in the range zero to +π radians.\n",summary:"<p> Returns the arc cosine of the argument, the result being in the range zero to +π radians.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"double",occurrence:"?",description:""}],returns:{type:"double?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"asin",qname:"math:asin",signature:"($arg as double?) as double?",description:" Returns the arc sine of the argument, the result being in the range -π/2 to +π/2 radians.\n",summary:"<p> Returns the arc sine of the argument, the result being in the range -π/2 to +π/2 radians.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"double",occurrence:"?",description:""}],returns:{type:"double?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"atan",qname:"math:atan",signature:"($arg as double?) as double?",description:" Returns the arc tangent of the argument, the result being in the range -π/2 to +π/2 radians.\n",summary:"<p> Returns the arc tangent of the argument, the result being in the range -π/2 to +π/2 radians.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"double",occurrence:"?",description:""}],returns:{type:"double?",description:""},errors:[]},{isDocumented:!0,arity:2,name:"atan2",qname:"math:atan2",signature:"($y as double, $x as double) as double",description:" Returns the angle in radians subtended at the origin by the point on a plane with\n coordinates (x, y) and the positive x-axis, the result being in the range -π to +π.\n",summary:"<p> Returns the angle in radians subtended at the origin by the point on a plane with\n coordinates (x, y) and the positive x-axis, the result being in the range -π to +π.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"y",type:"double",occurrence:null,description:""},{name:"x",type:"double",occurrence:null,description:""}],returns:{type:"double",description:""},errors:[]},{isDocumented:!0,arity:1,name:"cos",qname:"math:cos",signature:"($theta as double?) as double?",description:" Returns the cosine of the argument, expressed in radians.\n",summary:"<p> Returns the cosine of the argument, expressed in radians.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"theta",type:"double",occurrence:"?",description:""}],returns:{type:"double?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"exp",qname:"math:exp",signature:"($arg as double?) as double?",description:" Returns the value of ex.\n",summary:"<p> Returns the value of ex.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"double",occurrence:"?",description:""}],returns:{type:"double?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"exp10",qname:"math:exp10",signature:"($arg as double?) as double?",description:" Returns the value of 10x.\n",summary:"<p> Returns the value of 10x.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"double",occurrence:"?",description:""}],returns:{type:"double?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"log",qname:"math:log",signature:"($arg as double?) as double?",description:" Returns the natural logarithm of the argument.\n",summary:"<p> Returns the natural logarithm of the argument.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"double",occurrence:"?",description:""}],returns:{type:"double?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"log10",qname:"math:log10",signature:"($arg as double?) as double?",description:" Returns the base-ten logarithm of the argument.\n",summary:"<p> Returns the base-ten logarithm of the argument.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"double",occurrence:"?",description:""}],returns:{type:"double?",description:""},errors:[]},{isDocumented:!0,arity:0,name:"pi",qname:"math:pi",signature:"() as double",description:" Returns an approximation to the mathematical constant π.\n",summary:"<p> Returns an approximation to the mathematical constant π.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"double",description:""},errors:[]},{isDocumented:!0,arity:2,name:"pow",qname:"math:pow",signature:"($x as double?, $y) as double?",description:" Returns the result of raising the first argument to the power of the second.\n",summary:"<p> Returns the result of raising the first argument to the power of the second.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"x",type:"double",occurrence:"?",description:""},{name:"y",type:null,occurrence:null,description:""}],returns:{type:"double?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"sin",qname:"math:sin",signature:"($theta as double?) as double?",description:" Returns the sine of the argument, expressed in radians.\n",summary:"<p> Returns the sine of the argument, expressed in radians.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"theta",type:"double",occurrence:"?",description:""}],returns:{type:"double?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"sqrt",qname:"math:sqrt",signature:"($arg as double?) as double?",description:" Returns the non-negative square root of the argument.\n",summary:"<p> Returns the non-negative square root of the argument.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"double",occurrence:"?",description:""}],returns:{type:"double?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"tan",qname:"math:tan",signature:"($theta as double?) as double?",description:" Returns the tangent of the argument, expressed in radians.\n",summary:"<p> Returns the tangent of the argument, expressed in radians.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"theta",type:"double",occurrence:"?",description:""}],returns:{type:"double?",description:""},errors:[]}],variables:[]},"http://zorba.io/modules/data-cleaning/normalization":{ns:"http://zorba.io/modules/data-cleaning/normalization",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This library module provides data normalization functions for processing calendar dates,\n temporal values, currency values, units of measurement, location names and postal addresses.\n These functions are particularly useful for converting different data representations into cannonical formats.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The logic contained in this module is not specific to any particular XQuery implementation.</p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Bruno Martins and Diogo Simões</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://www.zorba-xquery.com/modules/http-client",prefix:"http"},{uri:"http://zorba.io/modules/data-cleaning/normalization",prefix:"normalization"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"normalize-address",qname:"normalization:normalize-address",signature:"($addr as xs:string*) as xs:string*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Uses an address normalization Web service to convert a postal address given as input into a\n cannonical representation format.</p>\n',summary:"<p>  Uses an address normalization Web service to convert a postal address given as input into a\n cannonical representation format.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"addr",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A sequence of strings encoding an address, where each string in the sequence corresponds to a different component (e.g., street, city, country, etc.) of the address.</div>'}],returns:{type:"xs:string*",description:"A sequence of strings with the address encoded in a cannonical format, where each string in the sequence corresponds to a different component (e.g., street, city, country, etc.) of the address."},errors:[]},{isDocumented:!0,arity:1,name:"normalize-phone",qname:"normalization:normalize-phone",signature:"($addr as xs:string*) as xs:string*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Uses an phone number normalization Web service to convert a phone number given as input into a\n cannonical representation.</p>\n',summary:"<p>  Uses an phone number normalization Web service to convert a phone number given as input into a\n cannonical representation.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"addr",type:"xs:string",occurrence:"*",description:""}],returns:{type:"xs:string*",description:'A strings with the phone number encoded in a cannonical format. <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/> <p xmlns:xqdoc="http://www.xqdoc.org/1.0"><b> Attention : This function is still not implemented. </b></p>'},errors:[]},{isDocumented:!0,arity:2,name:"to-date",qname:"normalization:to-date",signature:"($sd as xs:string, $format as xs:string?) as xs:string",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Converts a given string representation of a date value into a date representation valid according\n to the corresponding XML Schema type.</p>\n',summary:"<p>  Converts a given string representation of a date value into a date representation valid according\n to the corresponding XML Schema type.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"sd",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The string representation for the date</div>'},{name:"format",type:"xs:string",occurrence:"?",description:"<div xmlns:xqdoc=\"http://www.xqdoc.org/1.0\"> An optional parameter denoting the format used to represent the date in the string, according to a sequence of conversion specifications. In the format string, a conversion specification is introduced by '%', usually followed by a single letter or 'O' or 'E' and then a single letter. Any character in the format string that is not part of a conversion specification is interpreted literally, and the string '%%' gives '%'. The supported conversion specifications are as follows: <pre> '%b' Abbreviated month name in the current locale. '%B' Full month name in the current locale. '%d' Day of the month as decimal number (01-31). '%m' Month as decimal number (01-12). '%x' Date, locale-specific. '%y' Year without century (00-99). '%Y' Year with century. '%C' Century (00-99): the integer part of the year divided by 100. '%D' Locale-specific date format such as '%m/%d/%y'. '%e' Day of the month as decimal number (1-31), with a leading pace for a single-digit number. '%F' Equivalent to %Y-%m-%d (the ISO 8601 date format). '%h' Equivalent to '%b'. </pre></div>"}],returns:{type:"xs:string",description:"The date value resulting from the conversion."},errors:[]},{isDocumented:!0,arity:2,name:"to-dateTime",qname:"normalization:to-dateTime",signature:"($sd as xs:string, $format as xs:string?) as xs:string",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Converts a given string representation of a dateTime value into a dateTime representation\n valid according to the corresponding XML Schema type.</p>\n',summary:"<p>  Converts a given string representation of a dateTime value into a dateTime representation\n valid according to the corresponding XML Schema type.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"sd",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The string representation for the dateTime.</div>'},{name:"format",type:"xs:string",occurrence:"?",description:"<div xmlns:xqdoc=\"http://www.xqdoc.org/1.0\"> An optional parameter denoting the format used to represent the dateTime in the string, according to a sequence of conversion specifications. In the format string, a conversion specification is introduced by '%', usually followed by a single letter or 'O' or 'E' and then a single letter. Any character in the format string that is not part of a conversion specification is interpreted literally, and the string '%%' gives '%'. The supported conversion specifications are as follows: <p/> <pre class=\"ace-static\"> '%b' Abbreviated month name in the current locale. '%B' Full month name in the current locale. '%c' Date and time, locale-specific. '%C' Century (00-99): the integer part of the year divided by 100. '%d' Day of the month as decimal number (01-31). '%H' Hours as decimal number (00-23). '%I' Hours as decimal number (01-12). '%j' Day of year as decimal number (001-366). '%m' Month as decimal number (01-12). '%M' Minute as decimal number (00-59). '%p' AM/PM indicator in the locale. Used in conjunction with '%I' and *not* with '%H'. '%S' Second as decimal number (00-61), allowing for up to two leap-seconds. '%x' Date, locale-specific. '%X' Time, locale-specific. '%y' Year without century (00-99). '%Y' Year with century. '%z' Offset from Greenwich, so '-0900' is 9 hours west of Greenwich. '%Z' Time zone as a character string. '%D' Locale-specific date format such as '%m/%d/%y': ISO C99 says it should be that exact format. '%e' Day of the month as decimal number (1-31), with a leading pace for a single-digit number. '%F' Equivalent to %Y-%m-%d (the ISO 8601 date format). '%g' The last two digits of the week-based year (see '%V'). '%G' The week-based year (see '%V') as a decimal number. '%h' Equivalent to '%b'. '%k' The 24-hour clock time with single digits preceded by a blank. '%l' The 12-hour clock time with single digits preceded by a blank. '%r' The 12-hour clock time (using the locale's AM or PM). '%R' Equivalent to '%H:%M'. '%T' Equivalent to '%H:%M:%S'. </pre></div>"}],returns:{type:"xs:string",description:"The dateTime value resulting from the conversion."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">normalization:NOTSUPPORTED if the dateTime type is not known to the service.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"to-time",qname:"normalization:to-time",signature:"($sd as xs:string, $format as xs:string?) as xs:string?",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Converts a given string representation of a time value into a time representation valid according to\n the corresponding XML Schema type.</p>\n',summary:"<p>  Converts a given string representation of a time value into a time representation valid according to\n the corresponding XML Schema type.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"sd",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The string representation for the time.</div>'},{name:"format",type:"xs:string",occurrence:"?",description:"<div xmlns:xqdoc=\"http://www.xqdoc.org/1.0\"> An optional parameter denoting the format used to represent the time in the string, according to a sequence of conversion specifications. In the format string, a conversion specification is introduced by '%', usually followed by a single letter or 'O' or 'E' and then a single letter. Any character in the format string that is not part of a conversion specification is interpreted literally, and the string '%%' gives '%'. The supported conversion specifications are as follows: <p/> <pre class=\"ace-static\"> '%H' Hours as decimal number (00-23). '%I' Hours as decimal number (01-12). '%M' Minute as decimal number (00-59). '%p' AM/PM indicator in the locale. Used in conjunction with '%I' and *not* with '%H'. '%S' Second as decimal number (00-61), allowing for up to two leap-seconds. '%X' Time, locale-specific. '%z' Offset from Greenwich, so '-0900' is 9 hours west of Greenwich. '%Z' Time zone as a character string. '%k' The 24-hour clock time with single digits preceded by a blank. '%l' The 12-hour clock time with single digits preceded by a blank. '%r' The 12-hour clock time (using the locale's AM or PM). '%R' Equivalent to '%H:%M'. '%T' Equivalent to '%H:%M:%S'. </pre></div>"}],returns:{type:"xs:string?",description:"The time value resulting from the conversion."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">normalization:NOTSUPPORTED if the date type is not known to the service.</xqdoc:error>']}],variables:[]},"http://zorba.io/modules/excel/engineering":{ns:"http://zorba.io/modules/excel/engineering",description:"  This is a library module offering the same set of functions\n defined by Microsoft Excel, under Engineering Functions.\n",sees:['<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0"><a href="http://office.microsoft.com/en-us/excel/CH062528241033.aspx" target="_blank">Excel Documentation: Engineering Functions</a></xqdoc:see>'],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Sorin Nasoi</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/modules/excel/engineering",prefix:"excel-engineering"},{uri:"http://zorba.io/modules/excel/errors",prefix:"excel-err"},{uri:"http://zorba.io/modules/excel/math",prefix:"excel-math"},{uri:"http://zorba.io/modules/excel/text",prefix:"excel-text"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"bin2dec",qname:"excel-engineering:bin2dec",signature:"($arg as xs:anyAtomicType) as xs:integer",description:" Converts a binary number to decimal.\n",summary:"<p> Converts a binary number to decimal.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number.</div>'}],returns:{type:"xs:integer",description:"A decimal representation of a number given it's binary representation."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value for $arg is not a binary representation of a number.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value for $arg contains more than 10 characters.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"bin2hex",qname:"excel-engineering:bin2hex",signature:"($arg as xs:anyAtomicType) as xs:string",description:" Converts a binary number to hexadecimal.\n",summary:"<p> Converts a binary number to hexadecimal.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number.</div>'}],returns:{type:"xs:string",description:"A hexadecimal representation of a number given it's binary representation."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value for $arg is not a binary representation of a number.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value for $arg contains more than 10 characters.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"bin2hex",qname:"excel-engineering:bin2hex",signature:"($arg as xs:anyAtomicType, $places as xs:anyAtomicType) as xs:string",description:" Converts a binary number to hexadecimal.\n",summary:"<p> Converts a binary number to hexadecimal.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number.</div>'},{name:"places",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is the number of characters to use. Places is useful for padding the return value with leading 0s (zeros).</div>'}],returns:{type:"xs:string",description:"A hexadecimal representation of a number given it's binary representation."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value for $arg is not a binary representation of a number.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value for $arg contains more than 10 characters.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value for $places is not numeric.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if provided value for $places is zero or negative.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if provided value for $places is too small.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"bin2oct",qname:"excel-engineering:bin2oct",signature:"($arg as xs:anyAtomicType) as xs:string",description:" Converts a binary number to octal.\n",summary:"<p> Converts a binary number to octal.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number.</div>'}],returns:{type:"xs:string",description:"A octal representation of a number given it's binary representation."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value for $arg is not a binary representation of a number.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value for $arg contains more than 10 characters.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"bin2oct",qname:"excel-engineering:bin2oct",signature:"($arg as xs:anyAtomicType, $places as xs:anyAtomicType) as xs:string",description:" Converts a binary number to octal.\n",summary:"<p> Converts a binary number to octal.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number.</div>'},{name:"places",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is the number of characters to use. Places is useful for padding the return value with leading 0s (zeros).</div>'}],returns:{type:"xs:string",description:"A octal representation of a number given it's binary representation."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value for $arg is not a binary representation of a number.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value for $arg contains more than 10 characters.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value for $places is not numeric.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if provided value for $places is zero or negative.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if provided value for $places is too small.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"dec2bin",qname:"excel-engineering:dec2bin",signature:"($arg as xs:anyAtomicType) as xs:string",description:" Converts a decimal number to binary.\n",summary:"<p> Converts a decimal number to binary.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number.</div>'}],returns:{type:"xs:string",description:"A binary representation of a number given it's decimal representation."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value for $arg is not numeric.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if provided value for $arg is smaller than -512 or bigger than 511.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"dec2bin",qname:"excel-engineering:dec2bin",signature:"($arg as xs:anyAtomicType, $places as xs:anyAtomicType) as xs:string",description:" Converts a decimal number to binary.\n",summary:"<p> Converts a decimal number to binary.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number.</div>'},{name:"places",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is the number of characters to use. Places is useful for padding the return value with leading 0s (zeros).</div>'}],returns:{type:"xs:string",description:"A binary representation of a number given it's decimal representation."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value for $arg is not numeric.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value for $places is not numeric.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if provided value for $places is zero or negative.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if provided value for $places is too small.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if provided value for $arg is smaller than -512 or bigger than 511.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"dec2hex",qname:"excel-engineering:dec2hex",signature:"($arg as xs:anyAtomicType) as xs:string",description:" Converts a decimal number to hexadecimal.\n",summary:"<p> Converts a decimal number to hexadecimal.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number.</div>'}],returns:{type:"xs:string",description:"A hexadecimal representation of a number given it's decimal representation."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value for $arg is not numeric.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if provided value for $arg is smaller than -549755813888 or bigger than 549755813887</xqdoc:error>']},{isDocumented:!0,arity:2,name:"dec2hex",qname:"excel-engineering:dec2hex",signature:"($arg as xs:anyAtomicType, $places as xs:anyAtomicType) as xs:string",description:" Converts a decimal number to hexadecimal.\n",summary:"<p> Converts a decimal number to hexadecimal.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number.</div>'},{name:"places",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is the number of characters to use. Places is useful for padding the return value with leading 0s (zeros).</div>'}],returns:{type:"xs:string",description:"A hexadecimal representation of a number given it's decimal representation."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value for $arg is not numeric.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value for $places is not numeric.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if provided value for $places is zero or negative.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if provided value for $places is too small.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if provided value for $arg is smaller than -549755813888 or bigger than 549755813887.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"dec2oct",qname:"excel-engineering:dec2oct",signature:"($arg as xs:anyAtomicType) as xs:string",description:" Converts a decimal number to octal.\n",summary:"<p> Converts a decimal number to octal.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number.</div>'}],returns:{type:"xs:string",description:"An octal representation of a number given it's decimal representation."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value for $arg is not numeric.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if provided value for $arg is smaller than -536870912 or bigger than 536870911.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"dec2oct",qname:"excel-engineering:dec2oct",signature:"($arg as xs:anyAtomicType, $places as xs:anyAtomicType) as xs:string",description:" Converts a decimal number to octal.\n",summary:"<p> Converts a decimal number to octal.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number</div>'},{name:"places",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is the number of characters to use. Places is useful for padding the return value with leading 0s (zeros).</div>'}],returns:{type:"xs:string",description:"An octal representation of a number given it's decimal representation."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value for $arg is not numeric</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value for $places is not numeric</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if provided value for $places is zero or negative</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if provided value for $places is too small</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if provided value for $arg is smaller than -536870912 or bigger than 536870911</xqdoc:error>']},{isDocumented:!0,arity:1,name:"hex2bin",qname:"excel-engineering:hex2bin",signature:"($arg as xs:anyAtomicType) as xs:string",description:" Converts a hexadecimal number to binary.\n",summary:"<p> Converts a hexadecimal number to binary.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number.</div>'}],returns:{type:"xs:string",description:"A binary representation of a number given it's hexadecimal representation."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value for $arg is not a hexadecimal representation of a number.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value for $arg contains more than 10 characters.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"hex2bin",qname:"excel-engineering:hex2bin",signature:"($arg as xs:anyAtomicType, $places as xs:anyAtomicType) as xs:string",description:" Converts a hexadecimal number to binary.\n",summary:"<p> Converts a hexadecimal number to binary.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number.</div>'},{name:"places",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is the number of characters to use. Places is useful for padding the return value with leading 0s (zeros).</div>'}],returns:{type:"xs:string",description:"A binary representation of a number given it's hexadecimal representation."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value for $arg is not a hexadecimal representation of a number.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value for $arg contains more than 10 characters.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value for $places is not numeric.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if provided value for $places is zero or negative.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if provided value for $places is too small.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"hex2dec",qname:"excel-engineering:hex2dec",signature:"($arg as xs:string) as xs:integer",description:" Converts a hexadecimal number to decimal.\n",summary:"<p> Converts a hexadecimal number to decimal.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number.</div>'}],returns:{type:"xs:integer",description:"A decimal representation of a number given it's hexadecimal representation."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value for $arg is not a hexadecimal representation of a number.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value for $arg contains more than 10 characters.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"hex2oct",qname:"excel-engineering:hex2oct",signature:"($arg as xs:anyAtomicType) as xs:string",description:" Converts a hexadecimal number to octal.\n",summary:"<p> Converts a hexadecimal number to octal.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number.</div>'}],returns:{type:"xs:string",description:"A octal representation of a number given it's hexadecimal representation."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value for $arg is not a hexadecimal representation of a number.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value for $arg contains more than 10 characters.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"hex2oct",qname:"excel-engineering:hex2oct",signature:"($arg as xs:anyAtomicType, $places as xs:anyAtomicType) as xs:string",description:" Converts a hexadecimal number to octal.\n",summary:"<p> Converts a hexadecimal number to octal.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number.</div>'},{name:"places",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is the number of characters to use. Places is useful for padding the return value with leading 0s (zeros).</div>'}],returns:{type:"xs:string",description:"A octal representation of a number given it's hexadecimal representation."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value for $arg is not a hexadecimal representation of a number.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value for $arg contains more than 10 characters.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value for $places is not numeric.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if provided value for $places is zero or negative.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if provided value for $places is too small.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"oct2bin",qname:"excel-engineering:oct2bin",signature:"($arg as xs:anyAtomicType) as xs:string",description:" Converts an octal number to binary.\n",summary:"<p> Converts an octal number to binary.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number.</div>'}],returns:{type:"xs:string",description:"A binary representation of a number given it's octal representation."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value for $arg is not an octal representation of a number.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value for $arg contains more than 10 characters.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"oct2bin",qname:"excel-engineering:oct2bin",signature:"($arg as xs:anyAtomicType, $places as xs:anyAtomicType) as xs:string",description:" Converts an octal number to binary.\n",summary:"<p> Converts an octal number to binary.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number.</div>'},{name:"places",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is the number of characters to use. Places is useful for padding the return value with leading 0s (zeros).</div>'}],returns:{type:"xs:string",description:"A binary representation of a number given it's octal representation."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value for $arg is not an octal representation of a number.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value for $arg contains more than 10 characters.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value for $places is not numeric.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if provided value for $places is zero or negative.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if provided value for $places is too small.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"oct2dec",qname:"excel-engineering:oct2dec",signature:"($arg as xs:anyAtomicType) as xs:integer",description:" Converts an octal number to decimal.\n",summary:"<p> Converts an octal number to decimal.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number.</div>'}],returns:{type:"xs:integer",description:"A decimal representation of a number given it's octal representation."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value for $arg is not an octal representation of a number.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value for $arg contains more than 10 characters.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"oct2hex",qname:"excel-engineering:oct2hex",signature:"($arg as xs:anyAtomicType) as xs:string",description:" Converts an octal number to hexadecimal.\n",summary:"<p> Converts an octal number to hexadecimal.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number.</div>'}],returns:{type:"xs:string",description:"A hexadecimal representation of a number given it's octal representation."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value for $arg is not an octal representation of a number.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value for $arg contains more than 10 characters.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"oct2hex",qname:"excel-engineering:oct2hex",signature:"($arg as xs:anyAtomicType, $places as xs:anyAtomicType) as xs:string",description:" Converts an octal number to hexadecimal.\n",summary:"<p> Converts an octal number to hexadecimal.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number.</div>'},{name:"places",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is the number of characters to use. Places is useful for padding the return value with leading 0s (zeros).</div>'}],returns:{type:"xs:string",description:"A hexadecimal representation of a number given it's octal representation."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value for $arg is not an octal representation of a number.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value for $arg contains more than 10 characters.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value for $places is not numeric.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if provided value for $places is zero or negative.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Num if provided value for $places is too small.</xqdoc:error>']}],variables:[]},"http://www.zorba-xquery.com/modules/util-jvm":{ns:"http://www.zorba-xquery.com/modules/util-jvm",description:' This module provides common functionality for modules that use java\n implementations.\n <br xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <br xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Modules using java implementations must import this module\n to specify the dependency.\n <br xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <br xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <b xmlns:xqdoc="http://www.xqdoc.org/1.0">Note:</b> Since this module has a Java library dependency a JVM is required\n to be installed on the system. For Windows: jvm.dll is required on the system\n path (usually located in "C:\\Program Files\\Java\\jre\\bin\\client").\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Cezar Andrei</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://www.zorba-xquery.com/modules/util-jvm",prefix:"util-jvm"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[],variables:[]},"http://www.28msec.com/modules/asynchronous-jobs":{ns:"http://www.28msec.com/modules/asynchronous-jobs",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This module provides functionality for executing asynchronous jobs.\n There are three kinds of jobs: (1) a job for executing a (public or private)\n query of your project, (2) a job for mapping an input\n collection into an output collection, and (3) a job for shuffling the items\n of an input collection to several output collections.\n Map and Shuffle jobs are mostly used within\n the parallelism framework and are not meant to be created directly.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Jobs that have been scheduled for execution can be referred to by\n an opaque identifier being returned by the corresponding scheduling\n function (e.g. job:execute or job:map). Specifically,\n the job\'s identifier can be used to retrieve the status of a job\n (e.g. job:status) or the names of its input and output collections.</p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Ghislain Fourny</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Julien Ribon</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Matthias Brantner</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"",prefix:"an"},{uri:"http://zorba.io/modules/base64",prefix:"base64"},{uri:"http://zorba.io/modules/fetch",prefix:"fetch"},{uri:"http://www.zorba-xquery.com/modules/http-client",prefix:"http-client"},{uri:"http://www.28msec.com/modules/asynchronous-jobs",prefix:"job"},{uri:"http://www.28msec.com/modules/project",prefix:"project"},{uri:"http://zorba.io/modules/random",prefix:"rand"},{uri:"http://www.28msec.com/modules/http/request",prefix:"request"},{uri:"http://www.28msec.com/modules/store",prefix:"store"}],functions:[{isDocumented:!0,arity:2,name:"build-map-shuffle",qname:"job:build-map-shuffle",signature:"($input-collection as xs:string, $options as object()?) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Builds an object describing an asynchronous job (map or shuffle).</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This object can then be sent to the scheduler.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The $options parameter allows for the specification of properties for\n the shuffle job. Allowed options are:\n <ul>\n   <li><tt>kind</tt>: the kind of job ("map" or "shuffle").</li>\n   <li><tt>map-function</tt> (map jobs only): a function with any signature\n   (item()* to item()*),\n   and that is used to map the input collection to the output collection.</li>\n   <li><tt>shuffle-function</tt> (shuffle jobs only): a function taking an item\n   and returning an integer.\n   It is used to select the output collection to which each item is sent.</li>\n   <li><tt>output-collection as string</tt> (map jobs only): the name of the collection in\n     which the output of the executed query is stored. If not specified,\n     the result of the query will be stored in a collection withing the\n     MongoDB database associated with the project. The name of the\n     collection is randomly generated and starts with <tt>_28.temporary</tt>\n   </li>\n   <li><tt>output-collections as array</tt> (shuffle jobs only): an array with the names of the collections in\n     which the items of the input collections are shuffled. Compulsory.\n   </li>\n   <li><tt>chunk-info as object</tt>: an object containing the specification of a chunk\n     of the input collection. The shuffling will only occur on this chunk.\n     If not specified, the entire input collection will be mapped.\n   </li>\n   <li><tt>allow-streaming as boolean</tt> (map jobs only): a boolean indicating if calling the map function can\n     be distributed over partitions of the input collection. If false, the map function will\n     be called only once on the entire input collection. This might result\n     in a cache overflow if the number of items is too big. If true,\n     the input will be arbitrarily partitioned and the map function will be called for each\n     partition. The size of a partition is chosen in order to be smaller than the cache size.\n     The default is false.\n   </li>\n   <li><tt>dependencies as array</tt>: an array containing the ids of all asynchronous jobs that must\n     be completed before this job starts. This job will be hold pending until all these dependencies\n     are completed.\n   </li>\n </ul>\n </p>\n',summary:"<p>  Builds an object describing an asynchronous job (map or shuffle).</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"input-collection",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the collection that the job processes.</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object specifying above options for the asynchronous job.</div>'}],returns:{type:"object()",description:"the id of the scheduled job, which can be used to pull for the status and results."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XPTY0004 if the type of a supplied option is incorrect.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">job:JBDY0005 if the supplied function does not have a name.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">job:JBDY0006 if the supplied function is in the local namespace.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">job:JBDY0008 if the supplied input collection is not available.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"error",qname:"job:error",signature:"($id as xs:string) as object()?",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the error object output by an asynchronous job, in case of a failed job.</p>\n',summary:"<p>  Returns the error object output by an asynchronous job, in case of a failed job.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the id of the asynchronous job to query.</div>'}],returns:{type:"object()?",description:"the error object output by the corresponding asynchronous job."},errors:[]},{isDocumented:!0,arity:1,name:"execute",qname:"job:execute",signature:"($query as xs:string) as xs:string",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Schedules an asynchronous job executing the given (public or private)\n query from your project.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The result of the query will be stored in a collection withing the\n MongoDB database associated with the project. The name of the collection\n is randomly generated and starts with <tt>_28.temporary</tt>.</p>\n',summary:"<p>  Schedules an asynchronous job executing the given (public or private)\n query from your project.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"query",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The path of the query to execute, which must begin with /public or /private. (examples: /public/query.xq, /private/query.jq).</div>'}],returns:{type:"xs:string",description:"The id of the scheduled job."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">job:JBDY0003 if the supplied query path does not begin with /public or /private.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">job:JBDY0004 if the supplied query path cannot be resolved.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"execute",qname:"job:execute",signature:"($query as xs:string, $options as object()?) as xs:string",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Schedules an asynchronous job executing the given (public or private)\n query from your project.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The $options parameter allows for the specification of properties for\n the asynchronously executed job. Allowed options are:\n <ul>\n   <li><tt>output-collection as string</tt>: the name of the collection in\n     which the output of the executed query is stored. If not specified,\n     the result of the query will be stored in a collection withing the\n     MongoDB database associated with the project. The name of the\n     collection is randomly generated and starts with <tt>_28.temporary</tt>\n   </li>\n </ul>\n </p>\n',summary:"<p>  Schedules an asynchronous job executing the given (public or private)\n query from your project.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"query",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The path of the query to execute, which must begin with /public or /private. (examples: /public/query.xq, /private/query.jq).</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object specifying above options for the asynchronous job.</div>'}],returns:{type:"xs:string",description:"The id of the scheduled job."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XPTY0004 if the type of a supplied option is incorrect.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">job:JBDY0003 if the supplied query path does not begin with /public or /private.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">job:JBDY0004 if the supplied query path cannot be resolved.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"function",qname:"job:function",signature:"($id as xs:string) as xs:string?",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the name of the map or shuffle function used by an asynchronous job.</p>\n',summary:"<p>  Returns the name of the map or shuffle function used by an asynchronous job.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the id of the asynchronous job to query.</div>'}],returns:{type:"xs:string?",description:"the name of the map or shuffle function of the corresponding asynchronous job."},errors:[]},{isDocumented:!0,arity:1,name:"get",qname:"job:get",signature:"($id as xs:string) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the asynchronous job associated with the supplied asynchronous job id,\n or the asynchronous jobs associated with the supplied parallel job id.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is internal and should only be used by the parallelism module.</p>\n',summary:"<p>  Returns the asynchronous job associated with the supplied asynchronous job id,\n or the asynchronous jobs associated with the supplied parallel job id.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the id of the asynchronous or parallel job to query.</div>'}],returns:{type:"object()*",description:"the objects describing the asynchronous jobs."},errors:[]},{isDocumented:!0,arity:1,name:"input-collection",qname:"job:input-collection",signature:"($id as xs:string) as xs:string?",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the name of the input collection of a mapping asynchronous job.</p>\n',summary:"<p>  Returns the name of the input collection of a mapping asynchronous job.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the id of the asynchronous job to query.</div>'}],returns:{type:"xs:string?",description:"the name of the input collection of the corresponding asynchronous job."},errors:[]},{isDocumented:!0,arity:0,name:"jobs",qname:"job:jobs",signature:"() as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the ids of all jobs created by this project.</p>\n',summary:"<p>  Returns the ids of all jobs created by this project.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"",name:"nondeterministic",value:""}],updating:!1,parameters:[],returns:{type:"object()*",description:"the sequence of the ids of all jobs created so far."},errors:[]},{isDocumented:!0,arity:1,name:"kind",qname:"job:kind",signature:"($id as xs:string) as xs:string?",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the kind of the asynchronous job.</p>\n',summary:"<p>  Returns the kind of the asynchronous job.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the id of the asynchronous job to query.</div>'}],returns:{type:"xs:string?",description:"the kind of the asynchronous job."},errors:[]},{isDocumented:!0,arity:2,name:"map",qname:"job:map",signature:"($input-collection as xs:string, $map-function as function (item()*) as item()*) as xs:string",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Schedules an asynchronous job mapping the input collection\n to an output collection with the specified function.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The name of the output collection is randomly generated and\n starts with <tt>_28.temporary</tt>.</p>\n',summary:"<p>  Schedules an asynchronous job mapping the input collection\n to an output collection with the specified function.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"input-collection",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the collection that the job processes.</div>'},{name:"map-function",type:"function (item()*) as item()*",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The function which is run on the input collection\'s contents.</div>'}],returns:{type:"xs:string",description:"The id of the scheduled job, which can be used to pull for the status and results."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">job:JBDY0005 if the supplied function does not have a name.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">job:JBDY0006 if the supplied function is in the local namespace.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">job:JBDY0008 if the supplied input collection does not exist.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"map",qname:"job:map",signature:"($input-collection as xs:string, $map-function as function (item()*) as item()*, $options as object()?) as xs:string",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Schedules an asynchronous job mapping the input collection\n to an output collection with the specified function.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The $options parameter allows for the specification of properties for\n the map job. Allowed options are:\n <ul>\n   <li><tt>output-collection as string</tt>: the name of the collection in\n     which the output of the executed query is stored. If not specified,\n     the result of the query will be stored in a collection withing the\n     MongoDB database associated with the project. The name of the\n     collection is randomly generated and starts with <tt>_28.temporary</tt>\n   </li>\n   <li><tt>chunk-info as object</tt>: an object containing the specification of a chunk\n     of the input collection. The mapping will only occur on this chunk.\n     If not specified, the entire input collection will be mapped.\n   </li>\n   <li><tt>allow-streaming as boolean</tt>: a boolean indicating if calling the map function can\n     be distributed over partitions of the input collection. If false, the map function will\n     be called only once on the entire input collection. This might result\n     in a cache overflow if the number of items is too big. If true,\n     the input will be arbitrarily partitioned and the map function will be called for each\n     partition. The size of a partition is chosen in order to be smaller than the cache size.\n     The default is false.\n   </li>\n   <li><tt>dependencies as array</tt>: an array containing the ids of all asynchronous jobs that must\n     be completed before this job starts. This job will be hold pending until all these dependencies\n     are completed.\n   </li>\n </ul>\n </p>\n',summary:"<p>  Schedules an asynchronous job mapping the input collection\n to an output collection with the specified function.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"input-collection",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the collection that the job processes.</div>'},{name:"map-function",type:"function (item()*) as item()*",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The function which is run on the collection\'s contents.</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object specifying above options for the asynchronous job.</div>'}],returns:{type:"xs:string",description:"the id of the scheduled job, which can be used to pull for the status and results."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XPTY0004 if the type of a supplied option is incorrect.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">job:JBDY0005 if the supplied function does not have a name.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">job:JBDY0006 if the supplied function is in the local namespace.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">job:JBDY0008 if the supplied input collection does not exist.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"output-collection",qname:"job:output-collection",signature:"($id as xs:string) as xs:string?",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the name of the output collection of a mapping or executing asynchronous job.</p>\n',summary:"<p>  Returns the name of the output collection of a mapping or executing asynchronous job.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the id of the asynchronous job to query.</div>'}],returns:{type:"xs:string?",description:"the name of the output collection of the corresponding asynchronous job."},errors:[]},{isDocumented:!0,arity:1,name:"output-collections",qname:"job:output-collections",signature:"($id as xs:string) as xs:string*",description:" Returns the name of the output collections of a shuffle asynchronous job.\n",summary:"<p> Returns the name of the output collections of a shuffle asynchronous job.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"id",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:string*",description:"the name of the output collections of the corresponding asynchronous job."},errors:[]},{isDocumented:!0,arity:1,name:"properties",qname:"job:properties",signature:"($id as xs:string) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the properties of an asynchronous job as an object with the following\n fields:</p>\n <ul xmlns:xqdoc="http://www.xqdoc.org/1.0">\n  <li><tt>accessed</tt>: the time at which the job was last accessed.</li>\n  <li><tt>completed</tt>: the time at which the job was completed.</li>\n  <li><tt>created</tt>: the time at which the job was created.</li>\n  <li><tt>lock-acquired</tt>: the time at which a processing lock was taken on the job.</li>\n  <li><tt>status</tt>: the status of the job. One of <tt>pending</tt>, <tt>in progress</tt>,\n  <tt>completed</tt>, <tt>failed</tt>, <tt>timed out</tt>.</li>\n  <li><tt>error</tt>: An object containing error information in case of failure.</li>\n </ul>\n',summary:"<p>  Returns the properties of an asynchronous job as an object with the following\n fields: \n  \n   accessed : the time at which the job was last accessed.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the id of the asynchronous job to query.</div>'}],returns:{type:"object()",description:"the time at which the corresponding asynchronous job was last accessed."},errors:[]},{isDocumented:!0,arity:1,name:"query-name",qname:"job:query-name",signature:"($id as xs:string) as xs:string?",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the name of the query executed by an executing asynchronous job.</p>\n',summary:"<p>  Returns the name of the query executed by an executing asynchronous job.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"id",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the id of the asynchronous job to query.</div>'}],returns:{type:"xs:string?",description:"the name of the query executed by the corresponding asynchronous job."},errors:[]},{isDocumented:!0,arity:1,name:"schedule",qname:"job:schedule",signature:"($jobs as object()*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Sends jobs to the job queue.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is internal and should only be used by this and the parallelism module.</p>\n',summary:"<p>  Sends jobs to the job queue.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"jobs",type:"object()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The job to send, as generated by job:build-map-shuffle().</div>'}],returns:{type:"object()*",description:"Objects containing the new ids."},errors:[]},{isDocumented:!0,arity:3,name:"shuffle",qname:"job:shuffle",signature:"($input-collection as xs:string, $shuffle-function as function (item()) as xs:integer, $options as object()?) as xs:string",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Schedules an asynchronous job shuffling the items of the input collections to output collections\n using the specified shuffle function.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The $options parameter allows for the specification of properties for\n the shuffle job. Allowed options are:\n <ul>\n   <li><tt>output-collections as array</tt>: an array with the names of the collections in\n     which the items of the input collections are shuffled. Compulsory.\n   </li>\n   <li><tt>chunk-info as object</tt>: an object containing the specification of a chunk\n     of the input collection. The shuffling will only occur on this chunk.\n     If not specified, the entire input collection will be mapped.\n   </li>\n   <li><tt>dependencies as array</tt>: an array containing the ids of all asynchronous jobs that must\n     be completed before this job starts. This job will be hold pending until all these dependencies\n     are completed.\n   </li>\n </ul>\n </p>\n',summary:"<p>  Schedules an asynchronous job shuffling the items of the input collections to output collections\n using the specified shuffle function.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"input-collection",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the collection that the job processes.</div>'},{name:"shuffle-function",type:"function (item()) as xs:integer",occurrence:null,description:""},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object specifying above options for the asynchronous job.</div>'}],returns:{type:"xs:string",description:"the id of the scheduled job, which can be used to pull for the status and results."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XPTY0004 if the type of a supplied option is incorrect.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">job:JBDY0005 if the supplied function does not have a name.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">job:JBDY0006 if the supplied function is in the local namespace.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">job:JBDY0008 if the supplied input collection does not exist.</xqdoc:error>']}],variables:[]},"http://www.28msec.com/modules/datetime":{ns:"http://www.28msec.com/modules/datetime",description:" This modules contains function that operate on items of type date, time,\n dateTime, and duration.\n <p xmlns:xqdoc=\"http://www.xqdoc.org/1.0\">The module is always imported so you don't need to import it explicitly.\n Also, you don't need to fully qualify a function to invoke it.</p>\n",sees:[],authors:[],version:null,encoding:"utf-8",namespaces:[{uri:"http://www.28msec.com/modules/datetime",prefix:"datetime"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"adjust-date-to-timezone",qname:"datetime:adjust-date-to-timezone",signature:"($arg as date?) as date?",description:" Adjusts a date value to the implicit timezone.\n",summary:"<p> Adjusts a date value to the implicit timezone.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"date",occurrence:"?",description:""}],returns:{type:"date?",description:'the date in the implicit timezone that contains the starting instant of the supplied date. For a detailed description of the semantics of this function, please see <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xpath-functions-30/#func-adjust-date-to-timezone">adjust-date-to-timezone</a>.'},errors:[]},{isDocumented:!0,arity:2,name:"adjust-date-to-timezone",qname:"datetime:adjust-date-to-timezone",signature:"($arg as date?, $timezone as dayTimeDuration?) as date?",description:" Adjusts a date value to a specific timezone, or to no timezone at all.\n",summary:"<p> Adjusts a date value to a specific timezone, or to no timezone at all.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"date",occurrence:"?",description:""},{name:"timezone",type:"dayTimeDuration",occurrence:"?",description:""}],returns:{type:"date?",description:'the date in the target timezone that contains the starting instant of the supplied date. <ul xmlns:xqdoc="http://www.xqdoc.org/1.0"> <li><code>adjust-date-to-timezone(date("2002-03-07"), dayTimeDuration("-PT10H"))</code> returns <code>date("2002-03-06-10:00")</code>.</li> <li><code>adjust-date-to-timezone(date("2002-03-07-07:00"), ())</code> returns <code>date("2002-03-07")</code>.</li> </ul> For a detailed description of the semantics of this function, please see <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xpath-functions-30/#func-adjust-date-to-timezone">adjust-date-to-timezone</a>'},errors:[]},{isDocumented:!0,arity:1,name:"adjust-dateTime-to-timezone",qname:"datetime:adjust-dateTime-to-timezone",signature:"($arg as dateTime?) as dateTime",description:" Adjusts a dateTime value to the implicit timezone.\n",summary:"<p> Adjusts a dateTime value to the implicit timezone.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"dateTime",occurrence:"?",description:""}],returns:{type:"dateTime",description:'the dateTime in the implicit timezone. For a detailed description of the semantics of this function, please see <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xpath-functions-30/#func-adjust-dateTime-to-timezone">adjust-dateTime-to-timezone</a>'},errors:[]},{isDocumented:!0,arity:2,name:"adjust-dateTime-to-timezone",qname:"datetime:adjust-dateTime-to-timezone",signature:"($arg as dateTime?, $timezone as dayTimeDuration?) as dateTime",description:" Adjusts a dateTime value to the specified timezone, or to no timezone at all.\n",summary:"<p> Adjusts a dateTime value to the specified timezone, or to no timezone at all.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"dateTime",occurrence:"?",description:""},{name:"timezone",type:"dayTimeDuration",occurrence:"?",description:""}],returns:{type:"dateTime",description:"the dateTime in the specified timezone. <ul xmlns:xqdoc=\"http://www.xqdoc.org/1.0\"> <li><code>adjust-dateTime-to-timezone(dateTime('2002-03-07T10:00:00-07:00'), dayTimeDuration(\"-PT10H\"))</code> returns <code>dateTime('2002-03-07T07:00:00-10:00')</code>.</li> <li><code>adjust-dateTime-to-timezone(dateTime('2002-03-07T10:00:00'), ())</code> returns <code>dateTime('2002-03-07T10:00:00')</code>.</li> </ul> For a detailed description of the semantics of this function, please see <a xmlns:xqdoc=\"http://www.xqdoc.org/1.0\" href=\"http://www.w3.org/TR/xpath-functions-30/#func-adjust-dateTime-to-timezone\">adjust-dateTime-to-timezone</a>"},errors:[]},{isDocumented:!0,arity:1,name:"adjust-time-to-timezone",qname:"datetime:adjust-time-to-timezone",signature:"($arg as time?) as time?",description:" Adjusts a time value to an implicit timezone.\n",summary:"<p> Adjusts a time value to an implicit timezone.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"time",occurrence:"?",description:""}],returns:{type:"time?",description:'the time in the implicit timezone. For a detailed description of the semantics of this function, please see <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xpath-functions-30/#func-adjust-time-to-timezone">adjust-time-to-timezone</a>'},errors:[]},{isDocumented:!0,arity:2,name:"adjust-time-to-timezone",qname:"datetime:adjust-time-to-timezone",signature:"($arg as time?, $timezone as dayTimeDuration?) as time?",description:" Adjusts a time value to a specific timezone, or to no timezone at all.\n",summary:"<p> Adjusts a time value to a specific timezone, or to no timezone at all.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"time",occurrence:"?",description:""},{name:"timezone",type:"dayTimeDuration",occurrence:"?",description:""}],returns:{type:"time?",description:'the time in the specified timezone. <ul xmlns:xqdoc="http://www.xqdoc.org/1.0"> <li><code>adjust-time-to-timezone(time("10:00:00"), dayTimeDuration("-PT10H"))</code> returns <code>time("07:00:00-10:00")</code>.</li> <li><code>adjust-time-to-timezone(time("10:00:00-07:00"), ())</code> returns <code>time("10:00:00")</code>.</li> </ul> For a detailed description of the semantics of this function, please see <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xpath-functions-30/#func-adjust-time-to-timezone">adjust-time-to-timezone</a>'},errors:[]},{isDocumented:!0,arity:0,name:"current-date",qname:"datetime:current-date",signature:"() as date external",description:' Returns the current date.\n For a detailed description of the semantics of this function, please see\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xpath-functions-30/#func-current-date">current-date</a>\n',summary:"<p> Returns the current date.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"date",description:""},errors:[]},{isDocumented:!0,arity:0,name:"current-dateTime",qname:"datetime:current-dateTime",signature:"() as dateTimeStamp external",description:' Returns the current dateTime.\n For a detailed description of the semantics of this function, please see\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xpath-functions-30/#func-current-dateTime">current-dateTime</a>\n',summary:"<p> Returns the current dateTime.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"dateTimeStamp",description:""},errors:[]},{isDocumented:!0,arity:0,name:"current-time",qname:"datetime:current-time",signature:"() as time external",description:' Returns the current time.\n For a detailed description of the semantics of this function, please see\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xpath-functions-30/#func-current-time">current-time</a>\n',summary:"<p> Returns the current time.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"time",description:""},errors:[]},{isDocumented:!0,arity:2,name:"dateTime",qname:"datetime:dateTime",signature:"($arg1 as date?, $arg2 as time?) as dateTime?",description:" Returns a dateTime value created by combining a date and a time.\n",summary:"<p> Returns a dateTime value created by combining a date and a time.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg1",type:"date",occurrence:"?",description:""},{name:"arg2",type:"time",occurrence:"?",description:""}],returns:{type:"dateTime?",description:'the dateTime value created by combinding the given date and time. <ul xmlns:xqdoc="http://www.xqdoc.org/1.0"> <li><code>dateTime(date("1999-12-31"), time("12:00:00"))</code> returns <code>dateTime("1999-12-31T12:00:00")</code>.</li> </ul> For a detailed description of the semantics of this function, please see <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xpath-functions-30/#func-dateTime">dateTime</a>'},errors:[]},{isDocumented:!0,arity:1,name:"day-from-date",qname:"datetime:day-from-date",signature:"($arg as date?) as integer?",description:" Returns the day component of a date.\n",summary:"<p> Returns the day component of a date.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"date",occurrence:"?",description:""}],returns:{type:"integer?",description:'the day component of the given date. <ul xmlns:xqdoc="http://www.xqdoc.org/1.0"> <li><code>day-from-date(date("1999-05-31-05:00"))</code> returns <code>31</code>.</li> </ul> For a detailed description of the semantics of this function, please see <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xpath-functions-30/#func-day-from-date">day-from-date</a>'},errors:[]},{isDocumented:!0,arity:1,name:"day-from-dateTime",qname:"datetime:day-from-dateTime",signature:"($arg as dateTime?) as integer?",description:" Returns the day component of a dateTime.\n",summary:"<p> Returns the day component of a dateTime.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"dateTime",occurrence:"?",description:""}],returns:{type:"integer?",description:'the day component of the given dateTime. <ul xmlns:xqdoc="http://www.xqdoc.org/1.0"> <li><code>day-from-dateTime(dateTime("1999-12-31T20:00:00-05:00"))</code> returns <code>31</code>.</li> </ul> For a detailed description of the semantics of this function, please see <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xpath-functions-30/#func-day-from-dateTime">day-from-dateTime</a>'},errors:[]},{isDocumented:!0,arity:1,name:"days-from-duration",qname:"datetime:days-from-duration",signature:"($arg as duration?) as integer?",description:" Returns the number of days in a duration.\n",summary:"<p> Returns the number of days in a duration.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"duration",occurrence:"?",description:""}],returns:{type:"integer?",description:'the number of days in the given duration. <ul xmlns:xqdoc="http://www.xqdoc.org/1.0"> <li><code>days-from-duration(dayTimeDuration("P3DT55H"))</code> returns <code>5</code>.</li> </ul> For a detailed description of the semantics of this function, please see <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xpath-functions-30/#func-days-from-duration">days-from-duration</a>'},errors:[]},{isDocumented:!0,arity:2,name:"format-date",qname:"datetime:format-date",signature:"($value as date?, $picture as string) as string?",description:" Returns a string containing a date value formatted for display.\n",summary:"<p> Returns a string containing a date value formatted for display.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"value",type:"date",occurrence:"?",description:""},{name:"picture",type:"string",occurrence:null,description:""}],returns:{type:"string?",description:'the string formatted according to the given picture. The following examples assume <code xmlns:xqdoc="http://www.xqdoc.org/1.0">let $d := date("2002-12-31")</code> and the Gregorian calendar as the default calendar. <ul xmlns:xqdoc="http://www.xqdoc.org/1.0"> <li><code>format-date($d, "[Y0001]-[M01]-[D01]")</code> returns <code>2002-12-31</code>.</li> <li><code>format-date($d, "[D1] [MI] [Y]")</code> returns <code>31 XII 2002</code>.</li> </ul> For a detailed description of the semantics of this function, please see <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xpath-functions-30/#func-format-date">format-date</a>'},errors:[]},{isDocumented:!0,arity:5,name:"format-date",qname:"datetime:format-date",signature:"($value as date?, $picture as string, $language as string?, $calendar as string?, $place as string?) as string?",description:" Returns a string containing a date value formatted for display.\n",summary:"<p> Returns a string containing a date value formatted for display.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"value",type:"date",occurrence:"?",description:""},{name:"picture",type:"string",occurrence:null,description:""},{name:"language",type:"string",occurrence:"?",description:""},{name:"calendar",type:"string",occurrence:"?",description:""},{name:"place",type:"string",occurrence:"?",description:""}],returns:{type:"string?",description:'the string formatted according to the given picture. The following examples assume <code xmlns:xqdoc="http://www.xqdoc.org/1.0">let $d := date("2002-12-31")</code> and the Gregorian calendar as the default calendar. <ul xmlns:xqdoc="http://www.xqdoc.org/1.0"> <li><code>format-date($d, "[YWw]", "en", (), ())</code> returns <code>Two Thousand and Three</code>.</li> <li><code>format-date($d, "[D] [MNn], [Y]", "de", (), ())</code> returns <code>31 Dezember, 2002</code>.</li> <li><code>format-date($d, "[D\\u0E51] [Mn] [Y\\u0E51]", "th", "BE", ())</code> returns <code>๓๑ ธันวาคม ๒๐๐๒</code>.</li> </ul> For a detailed description of the semantics of this function, please see <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xpath-functions-30/#func-format-date">format-date</a>'},errors:[]},{isDocumented:!0,arity:2,name:"format-dateTime",qname:"datetime:format-dateTime",signature:"($value as dateTime?, $picture as string) as string?",description:" Returns a string containing a dateTime value formatted for display.\n",summary:"<p> Returns a string containing a dateTime value formatted for display.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"value",type:"dateTime",occurrence:"?",description:""},{name:"picture",type:"string",occurrence:null,description:""}],returns:{type:"string?",description:'the string formatted according to the given picture. The following examples assume <code xmlns:xqdoc="http://www.xqdoc.org/1.0">let $dt := dateTime("2002-12-31T15:58:45")</code> and the Gregorian calendar as the default calendar. <ul xmlns:xqdoc="http://www.xqdoc.org/1.0"> <li><code>format-dateTime($dt, "[h].[m01][Pn] on [FNn], [D1o] [MNn]")</code> returns <code>3.58pm on Tuesday, 31st December</code>.</li> <li><code>format-dateTime($dt, "[M01]/[D01]/[Y0001] at [H01]:[m01]:[s01]")</code> returns <code>12/31/2002 at 15:58:45</code>.</li> </ul> For a detailed description of the semantics of this function, please see <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xpath-functions-30/#func-format-dateTime">format-dateTime</a>'},errors:[]},{isDocumented:!0,arity:5,name:"format-dateTime",qname:"datetime:format-dateTime",signature:"($value as dateTime?, $picture as string, $language as string?, $calendar as string?, $place as string?) as string?",description:" Returns a string containing a dateTime value formatted for display.\n",summary:"<p> Returns a string containing a dateTime value formatted for display.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"value",type:"dateTime",occurrence:"?",description:""},{name:"picture",type:"string",occurrence:null,description:""},{name:"language",type:"string",occurrence:"?",description:""},{name:"calendar",type:"string",occurrence:"?",description:""},{name:"place",type:"string",occurrence:"?",description:""}],returns:{type:"string?",description:'the string formatted according to the given picture. For a detailed description of the semantics of this function, please see <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xpath-functions-30/#func-format-dateTime">format-dateTime</a>'},errors:[]},{isDocumented:!0,arity:1,name:"hours-from-dateTime",qname:"datetime:hours-from-dateTime",signature:"($arg as dateTime?) as integer?",description:" Returns the hours component of a dateTime.\n",summary:"<p> Returns the hours component of a dateTime.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"dateTime",occurrence:"?",description:""}],returns:{type:"integer?",description:'the hours component of the given dateTime. <ul xmlns:xqdoc="http://www.xqdoc.org/1.0"> <li><code>hours-from-dateTime(dateTime("1999-12-31T21:20:00-05:00"))</code> returns <code>21</code>.</li> <li><code>hours-from-dateTime(adjust-dateTime-to-timezone(dateTime("1999-12-31T21:20:00-05:00"), dayTimeDuration("PT0S")))</code> returns <code>2</code>.</li> </ul> For a detailed description of the semantics of this function, please see <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xpath-functions-30/#func-hours-from-time">hours-from-dateTime</a>'},errors:[]},{isDocumented:!0,arity:1,name:"hours-from-duration",qname:"datetime:hours-from-duration",signature:"($arg as duration?) as integer?",description:" Returns the number of hours in a duration.\n",summary:"<p> Returns the number of hours in a duration.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"duration",occurrence:"?",description:""}],returns:{type:"integer?",description:'the number of hours in the given duration. <ul xmlns:xqdoc="http://www.xqdoc.org/1.0"> <li><code>hours-from-duration(dayTimeDuration("P3DT10H"))</code> returns <code>10</code>.</li> <li><code>hours-from-duration(dayTimeDuration("-P3DT10H"))</code> returns <code>-10</code>.</li> </ul> For a detailed description of the semantics of this function, please see <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xpath-functions-30/#func-hours-from-duration">hours-from-duration</a>'},errors:[]},{isDocumented:!0,arity:1,name:"hours-from-time",qname:"datetime:hours-from-time",signature:"($arg as time?) as integer?",description:" Returns the hours component of a time.\n",summary:"<p> Returns the hours component of a time.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"time",occurrence:"?",description:""}],returns:{type:"integer?",description:'the hours component of the given time. <ul xmlns:xqdoc="http://www.xqdoc.org/1.0"> <li><code>hours-from-time(time("11:23:00"))</code> returns <code>11</code>.</li> <li><code>hours-from-time(time("24:00:00"))</code> returns <code>0</code>.</li> <li><code>hours-from-time(adjust-time-to-timezone(time("01:23:00+05:00"), dayTimeDuration("PT0S")))</code> returns <code>20</code>.</li> </ul> For a detailed description of the semantics of this function, please see <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xpath-functions-30/#func-hours-from-time">hours-from-time</a>'},errors:[]},{isDocumented:!0,arity:0,name:"implicit-timezone",qname:"datetime:implicit-timezone",signature:"() as dayTimeDuration",description:" Returns the value of the implicit timezone property set in the platform.\n",summary:"<p> Returns the value of the implicit timezone property set in the platform.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"dayTimeDuration",description:'the implicit timezone property. For a detailed description of the semantics of this function, please see <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xpath-functions-30/#func-implicit-timezone">implicit-timezone</a>'},errors:[]},{isDocumented:!0,arity:1,name:"minutes-from-dateTime",qname:"datetime:minutes-from-dateTime",signature:"($arg as dateTime?) as integer?",description:" Returns the minute component of a dateTime.\n",summary:"<p> Returns the minute component of a dateTime.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"dateTime",occurrence:"?",description:""}],returns:{type:"integer?",description:'the minute component of the given dateTime. <ul xmlns:xqdoc="http://www.xqdoc.org/1.0"> <li><code>minutes-from-dateTime(dateTime("1999-05-31T13:20:00-05:00"))</code> returns <code>20</code>.</li> </ul> For a detailed description of the semantics of this function, please see <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xpath-functions-30/#func-minutes-from-dateTime">minutes-from-dateTime</a>'},errors:[]},{isDocumented:!0,arity:1,name:"minutes-from-duration",qname:"datetime:minutes-from-duration",signature:"($arg as duration?) as integer?",description:" Returns the number of minutes in a duration.\n",summary:"<p> Returns the number of minutes in a duration.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"duration",occurrence:"?",description:""}],returns:{type:"integer?",description:'the number of minutes of the given duration. <ul xmlns:xqdoc="http://www.xqdoc.org/1.0"> <li><code>minutes-from-duration(dayTimeDuration("P3DT10H"))</code> returns <code>0</code>.</li> <li><code>minutes-from-duration(dayTimeDuration("-P5DT12H30M"))</code> returns <code>-30</code>.</li> </ul> For a detailed description of the semantics of this function, please see <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xpath-functions-30/#func-minutes-from-duration">minutes-from-duration</a>'},errors:[]},{isDocumented:!0,arity:1,name:"minutes-from-time",qname:"datetime:minutes-from-time",signature:"($arg as time?) as integer?",description:" Returns the minutes component of a time.\n",summary:"<p> Returns the minutes component of a time.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"time",occurrence:"?",description:""}],returns:{type:"integer?",description:'the minutes component of the given time. <ul xmlns:xqdoc="http://www.xqdoc.org/1.0"> <li><code>minutes-from-time(time("13:00:00Z"))</code> returns <code>0</code>.</li> </ul> For a detailed description of the semantics of this function, please see <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xpath-functions-30/#func-minutes-from-time">minutes-from-time</a>'},errors:[]},{isDocumented:!0,arity:1,name:"month-from-date",qname:"datetime:month-from-date",signature:"($arg as date?) as integer?",description:" Returns the month component of a date.\n",summary:"<p> Returns the month component of a date.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"date",occurrence:"?",description:""}],returns:{type:"integer?",description:'the month component of the given date. <ul xmlns:xqdoc="http://www.xqdoc.org/1.0"> <li><code>month-from-date(date("1999-05-31-05:00"))</code> returns <code>5</code>.</li> <li><code>month-from-date(date("2000-01-01+05:00"))</code> returns <code>1</code>.</li> </ul> For a detailed description of the semantics of this function, please see <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xpath-functions-30/#func-month-from-date">month-from-date</a>'},errors:[]},{isDocumented:!0,arity:1,name:"month-from-dateTime",qname:"datetime:month-from-dateTime",signature:"($arg as dateTime?) as integer?",description:" Returns the month component of a dateTime.\n",summary:"<p> Returns the month component of a dateTime.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"dateTime",occurrence:"?",description:""}],returns:{type:"integer?",description:'the month component of the given dateTime. <ul xmlns:xqdoc="http://www.xqdoc.org/1.0"> <li><code>month-from-dateTime(dateTime("1999-05-31T21:20:00-05:00"))</code> returns <code>5</code>.</li> <li><code>month-from-dateTime(dateTime("2000-01-01T11:05:00+05:00"))</code> returns <code>1</code>.</li> </ul> For a detailed description of the semantics of this function, please see <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xpath-functions-30/#func-month-from-dateTime">month-from-dateTime</a>'},errors:[]},{isDocumented:!0,arity:1,name:"months-from-duration",qname:"datetime:months-from-duration",signature:"($arg as duration?) as integer?",description:" Returns the number of months in a duration.\n",summary:"<p> Returns the number of months in a duration.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"duration",occurrence:"?",description:""}],returns:{type:"integer?",description:'the number of months in the given duration. <ul xmlns:xqdoc="http://www.xqdoc.org/1.0"> <li><code>months-from-duration(yearMonthDuration("P20Y15M"))</code> returns <code>3</code>.</li> <li><code>months-from-duration(yearMonthDuration("-P20Y18M"))</code> returns <code>6</code>.</li> </ul> For a detailed description of the semantics of this function, please see <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xpath-functions-30/#func-months-from-duration">months-from-duration</a>'},errors:[]},{isDocumented:!0,arity:1,name:"seconds-from-dateTime",qname:"datetime:seconds-from-dateTime",signature:"($arg as dateTime?) as decimal?",description:" Returns the seconds component of a dateTime.\n",summary:"<p> Returns the seconds component of a dateTime.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"dateTime",occurrence:"?",description:""}],returns:{type:"decimal?",description:'the seconds component of the given dateTime. <ul xmlns:xqdoc="http://www.xqdoc.org/1.0"> <li><code>seconds-from-dateTime(dateTime("1999-05-31T13:20:00-05:00"))</code> returns <code>0</code>.</li> </ul> For a detailed description of the semantics of this function, please see <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xpath-functions-30/#func-seconds-from-dateTime">seconds-from-dateTime</a>'},errors:[]},{isDocumented:!0,arity:1,name:"seconds-from-duration",qname:"datetime:seconds-from-duration",signature:"($arg as duration?) as decimal?",description:" Returns the number of seconds in a duration.\n",summary:"<p> Returns the number of seconds in a duration.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"duration",occurrence:"?",description:""}],returns:{type:"decimal?",description:'the number of seconds in the given duration. <ul xmlns:xqdoc="http://www.xqdoc.org/1.0"> <li><code>seconds-from-duration(dayTimeDuration("P3DT10H12.5S"))</code> returns <code>12.5</code>.</li> <li><code>seconds-from-duration(dayTimeDuration("-PT256S"))</code> returns <code>-16.0</code>.</li> </ul> For a detailed description of the semantics of this function, please see <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xpath-functions-30/#func-seconds-from-duration">seconds-from-duration</a>'},errors:[]},{isDocumented:!0,arity:1,name:"seconds-from-time",qname:"datetime:seconds-from-time",signature:"($arg as time?) as decimal?",description:" Returns the seconds component of a time.\n",summary:"<p> Returns the seconds component of a time.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"time",occurrence:"?",description:""}],returns:{type:"decimal?",description:'the seconds component of the given time. <ul xmlns:xqdoc="http://www.xqdoc.org/1.0"> <li><code>seconds-from-time(time("13:20:10.5"))</code> returns <code>10.5</code>.</li> </ul> For a detailed description of the semantics of this function, please see <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xpath-functions-30/#func-seconds-from-time">seconds-from-time</a>'},errors:[]},{isDocumented:!0,arity:1,name:"timezone-from-date",qname:"datetime:timezone-from-date",signature:"($arg as date?) as dayTimeDuration?",description:" Returns the timezone component of a date.\n",summary:"<p> Returns the timezone component of a date.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"date",occurrence:"?",description:""}],returns:{type:"dayTimeDuration?",description:'the timezone component of the given date. <ul xmlns:xqdoc="http://www.xqdoc.org/1.0"> <li><code>timezone-from-date(date("1999-05-31-05:00"))</code> returns <code>dayTimeDuration("-PT5H")</code>.</li> <li><code>timezone-from-date(date("2000-06-12Z"))</code> returns <code>dayTimeDuration("PT0S")</code>.</li> </ul> For a detailed description of the semantics of this function, please see <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xpath-functions-30/#func-timezone-from-date">timezone-from-date</a>'},errors:[]},{isDocumented:!0,arity:1,name:"timezone-from-dateTime",qname:"datetime:timezone-from-dateTime",signature:"($arg as dateTime?) as dayTimeDuration?",description:" Returns the timezone component of a dateTime.\n",summary:"<p> Returns the timezone component of a dateTime.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"dateTime",occurrence:"?",description:""}],returns:{type:"dayTimeDuration?",description:'the timezone component of the given dateTime. <ul xmlns:xqdoc="http://www.xqdoc.org/1.0"> <li><code>timezone-from-dateTime(dateTime("1999-05-31T13:20:00-05:00"))</code> returns <code>dayTimeDuration("-PT5H")</code>.</li> <li><code>timezone-from-dateTime(dateTime("2000-06-12T13:20:00Z"))</code> returns <code>dayTimeDuration("PT0S")</code>.</li> </ul> For a detailed description of the semantics of this function, please see <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xpath-functions-30/#func-timezone-from-dateTime">timezone-from-dateTime</a>'},errors:[]},{isDocumented:!0,arity:1,name:"timezone-from-time",qname:"datetime:timezone-from-time",signature:"($arg as time?) as dayTimeDuration?",description:" Returns the timezone component of a time.\n",summary:"<p> Returns the timezone component of a time.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"time",occurrence:"?",description:""}],returns:{type:"dayTimeDuration?",description:'the timezone component of the given time. <ul xmlns:xqdoc="http://www.xqdoc.org/1.0"> <li><code>timezone-from-time(time("13:20:00-05:00"))</code> returns <code>dayTimeDuration("-PT5H")</code>.</li> <li><code>timezone-from-time(time("13:20:00"))</code> returns <code>()</code>.</li> </ul> For a detailed description of the semantics of this function, please see <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xpath-functions-30/#func-timezone-from-time">timezone-from-time</a>'},errors:[]},{isDocumented:!0,arity:1,name:"year-from-date",qname:"datetime:year-from-date",signature:"($arg as date?) as integer?",description:" Returns the year component of a date.\n",summary:"<p> Returns the year component of a date.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"date",occurrence:"?",description:""}],returns:{type:"integer?",description:'the year component of the given date. <ul xmlns:xqdoc="http://www.xqdoc.org/1.0"> <li><code>year-from-date(date("2000-01-01+05:00"))</code> returns <code>2000</code>.</li> </ul> For a detailed description of the semantics of this function, please see <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xpath-functions-30/#func-year-from-date">year-from-date</a>'},errors:[]},{isDocumented:!0,arity:1,name:"year-from-dateTime",qname:"datetime:year-from-dateTime",signature:"($arg as dateTime?) as integer?",description:" Returns the year component of a dateTime.\n",summary:"<p> Returns the year component of a dateTime.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"dateTime",occurrence:"?",description:""}],returns:{type:"integer?",description:'the year component of the given dateTime. <ul xmlns:xqdoc="http://www.xqdoc.org/1.0"> <li><code>year-from-dateTime(dateTime("1999-05-31T13:20:00-05:00"))</code> returns <code>1999</code>.</li> <li><code>year-from-dateTime(dateTime("1999-12-31T24:00:00"))</code> returns <code>2000</code>.</li> </ul> For a detailed description of the semantics of this function, please see <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xpath-functions-30/#func-year-from-dateTime">year-from-dateTime</a>'},errors:[]},{isDocumented:!0,arity:1,name:"years-from-duration",qname:"datetime:years-from-duration",signature:"($arg as duration?) as integer?",description:" Returns the number of years in a duration.\n",summary:"<p> Returns the number of years in a duration.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"duration",occurrence:"?",description:""}],returns:{type:"integer?",description:'the number of years in the given duration. <ul xmlns:xqdoc="http://www.xqdoc.org/1.0"> <li><code>years-from-duration(yearMonthDuration("P20Y15M"))</code> returns <code>21</code>.</li> <li><code>years-from-duration(yearMonthDuration("-P15M"))</code> returns <code>-1</code>.</li> </ul> For a detailed description of the semantics of this function, please see <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xpath-functions-30/#func-years-from-duration">years-from-duration</a>'},errors:[]}],variables:[]},"http://api.28.io/jdbc":{ns:"http://api.28.io/jdbc",description:"",sees:[],authors:[],version:null,encoding:null,namespaces:[{uri:"",prefix:"an"},{uri:"http://api.28.io/jdbc",prefix:"api"},{uri:"http://www.28msec.com/modules/jdbc",prefix:"jdbc"},{uri:"http://www.28msec.com/modules/http/request",prefix:"req"},{uri:"http://www.28msec.com/modules/http/response",prefix:"res"},{uri:"http://www.28msec.com/modules/store",prefix:"store"},{uri:"http://zorba.io/errors",prefix:"zerr"}],functions:[{isDocumented:!1,arity:0,name:"dispatch",qname:"api:dispatch",signature:"()",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:0,name:"import",qname:"api:import",signature:"()",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:0,name:"tables",qname:"api:tables",signature:"()",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[],returns:{type:null,description:""},errors:[]}],variables:[]},"http://zorba.io/modules/excel/information":{ns:"http://zorba.io/modules/excel/information",description:" This is a library module offering the same set of functions\n defined by Microsoft Excel, under Information Functions.\n",sees:['<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0"><a href="http://office.microsoft.com/en-us/excel/CH062528261033.aspx" target="_blank">Excel Documentation: Information Functions</a></xqdoc:see>'],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Sorin Nasoi</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/modules/excel/errors",prefix:"excel-err"},{uri:"http://zorba.io/modules/excel/information",prefix:"excel-information"},{uri:"http://zorba.io/modules/excel/math",prefix:"excel-math"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"is-blank",qname:"excel-information:is-blank",signature:"($value as xs:anyAtomicType?) as xs:boolean",description:" Test if the passed argument is empty of not.\n",summary:"<p> Test if the passed argument is empty of not.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"value",type:"xs:anyAtomicType",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the value.</div>'}],returns:{type:"xs:boolean",description:"If the value of $arg is the empty sequence, the function returns true, otherwise the function returns false."},errors:[]},{isDocumented:!0,arity:1,name:"is-even",qname:"excel-information:is-even",signature:"($value as xs:anyAtomicType?) as xs:boolean",description:" Test is a number is even.\n",summary:"<p> Test is a number is even.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"value",type:"xs:anyAtomicType",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the value.</div>'}],returns:{type:"xs:boolean",description:"TRUE if number is even, FALSE if number is odd."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value is not a number.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"is-odd",qname:"excel-information:is-odd",signature:"($value as xs:anyAtomicType?) as xs:boolean",description:" Test is a number is odd.\n",summary:"<p> Test is a number is odd.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"value",type:"xs:anyAtomicType",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the value.</div>'}],returns:{type:"xs:boolean",description:"TRUE if number is odd, FALSE if number is even."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value if provided value is not a number.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"islogical",qname:"excel-information:islogical",signature:"($value as xs:anyAtomicType?) as xs:boolean",description:" Tests if the passed $value is a logical value.\n",summary:"<p> Tests if the passed $value is a logical value.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"value",type:"xs:anyAtomicType",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the value.</div>'}],returns:{type:"xs:boolean",description:"TRUE if $value refers to a logical value."},errors:[]},{isDocumented:!0,arity:1,name:"isnumber",qname:"excel-information:isnumber",signature:"($value as xs:anyAtomicType?) as xs:boolean",description:" Tests if the passed $value is a number.\n",summary:"<p> Tests if the passed $value is a number.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"value",type:"xs:anyAtomicType",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the value.</div>'}],returns:{type:"xs:boolean",description:"TRUE if $value refers to a number."},errors:[]},{isDocumented:!0,arity:1,name:"istext",qname:"excel-information:istext",signature:"($value as xs:anyAtomicType?) as xs:boolean",description:" Tests if the passed $value is a string.\n",summary:"<p> Tests if the passed $value is a string.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"value",type:"xs:anyAtomicType",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the value.</div>'}],returns:{type:"xs:boolean",description:"TRUE if $value refers to text."},errors:[]},{isDocumented:!0,arity:1,name:"n",qname:"excel-information:n",signature:"($value as xs:anyAtomicType?) as xs:anyAtomicType",description:" Converts a $value to a number.\n",summary:"<p> Converts a $value to a number.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"value",type:"xs:anyAtomicType",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the value.</div>'}],returns:{type:"xs:anyAtomicType",description:"A $value converted to a number."},errors:[]},{isDocumented:!0,arity:0,name:"na",qname:"excel-information:na",signature:"() as xs:anyAtomicType",description:" Raises the error value #N/A.\n",summary:"<p> Raises the error value #N/A.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:anyAtomicType",description:'The error value #N/A. #N/A is the error value that means "no value is available."'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:NA the purpose of this function is to raise this error</xqdoc:error>']}],variables:[]},"http://www.zorba-xquery.com/modules/image/animation":{ns:"http://www.zorba-xquery.com/modules/image/animation",description:" This module provides functions to create animated GIF images.\n",sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Daniel Thomas</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://www.zorba-xquery.com/modules/image/animation",prefix:"anim"},{uri:"http://www.zorba-xquery.com/modules/image/error",prefix:"ierr"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:3,name:"create-animated-gif",qname:"anim:create-animated-gif",signature:"($images as xs:base64Binary+, $delay as xs:unsignedInt, $iterations as xs:unsignedInt) as xs:base64Binary external",description:" Creates an animated GIF image.\n The resulting animated GIF shows the passed images consecutively.\n It has the same width and height as the first passed image.\n",summary:"<p> Creates an animated GIF image.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"images",type:"xs:base64Binary",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the image sequence</div>'},{name:"delay",type:"xs:unsignedInt",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the hundredths of seconds an image is shown</div>'},{name:"iterations",type:"xs:unsignedInt",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the amount of times all images are shown. 0 for infinite.</div>'}],returns:{type:"xs:base64Binary",description:"the animated GIF"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ierr:IM001 one of the passed images is invalid.</xqdoc:error>']},{isDocumented:!0,arity:4,name:"create-morphed-gif",qname:"anim:create-morphed-gif",signature:"($images as xs:base64Binary+, $delay as xs:unsignedInt, $iterations as xs:unsignedInt, $nr-of-morph-images as xs:unsignedInt) as xs:base64Binary external",description:" Creates an animated GIF image with morph effect.\n The resulting animated GIF shows the passed images consecutively with morph effect between the changes.\n It has the same width and height as the first passed image.\n",summary:"<p> Creates an animated GIF image with morph effect.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"images",type:"xs:base64Binary",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the image sequence</div>'},{name:"delay",type:"xs:unsignedInt",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the hundredths of seconds an image is shown</div>'},{name:"iterations",type:"xs:unsignedInt",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the amount of times all images are shown. 0 for infinite.</div>'},{name:"nr-of-morph-images",type:"xs:unsignedInt",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number of additionally added images to create the morph effect between two passed images.</div>'}],returns:{type:"xs:base64Binary",description:"the animated GIF"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ierr:IM001 one of the passed images is invalid.</xqdoc:error>']}],variables:[]},"http://28.io/modules/error":{ns:"http://28.io/modules/error",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Applications written with Sausalito use this default error module\n if an error happens inside a Sausalito project.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">An error can occur during the run time of a Sausalito project on one\n of the following cases:</p>\n <ol xmlns:xqdoc="http://www.xqdoc.org/1.0">\n   <li>If the XQuery code raises a dynamic error that is not caught in a\n     try-catch block.</li>\n   <li>If the given XQuery program is syntactically incorrect or contains\n     other static errors.</li>\n   <li>If an explicit call to fn:error() was made and the error is not\n     caught in a try-catch block.</li>\n   <li>If a request is made to a module or a function which does\n     not exist.</li>\n   <li>If any other unexpected error happens during the processing of\n     the request.</li>\n </ol>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">28msec</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://28.io/modules/error",prefix:"err"},{uri:"http://www.28msec.com/modules/http/request",prefix:"request"},{uri:"http://www.28msec.com/modules/http/response",prefix:"resp"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:4,name:"handle",qname:"err:handle",signature:"($code as xs:QName, $description as xs:string?, $value as item()*, $stack) as item()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This is the default function that is called if an error happens.\n The default can be overridden by adding an error.xq library module\n into the Sausalito project. This module needs to declare a function\n with the same signature as the err:handle function in this module.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The value returned by this function is sent to the client. If the\n default is overridden, the implementation is free to define all\n parameters of the response (e.g. set the corresponding HTTP status\n code or an arbitrary header).</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If the default is used, the status code is 500 if the $code QName\n is not equal to one of the status code QNames declared in HTTP module.\n Otherwise, the corresponding status code is set.</p>\n',summary:"<p>  This is the default function that is called if an error happens.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"code",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the error code that triggered the problem as a QName</div>'},{name:"description",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a description of the error</div>'},{name:"value",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a potentially empty list of items that were involved in causing the error</div>'},{name:"stack",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the stacktrace leading to the error as an element. For example, <tt> &lt;stack&gt; &lt;call ns="http://www.example.com/" localName="my-function" arity="3"/&gt; &lt;/stack&gt; </tt></div>'}],returns:{type:"item()*",description:"content of the response message"},errors:[]}],variables:[]},"http://www.zorba-xquery.com/modules/internal-debug":{ns:"http://www.zorba-xquery.com/modules/internal-debug",description:" This internal module provides functions for testing error handling and\n internal function caching.\n",sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Federico Cavalieri</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://www.zorba-xquery.com/modules/internal-debug",prefix:"debug"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:0,name:"cpp-error",qname:"debug:cpp-error",signature:"() as empty-sequence() external",description:" Raises a c++ exception.\n",summary:"<p> Raises a c++ exception.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"empty-sequence()",description:"empty sequence"},errors:[]},{isDocumented:!0,arity:0,name:"cpp-exit",qname:"debug:cpp-exit",signature:"() as empty-sequence() external",description:" C++ exit is invoked.\n",summary:"<p> C++ exit is invoked.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"empty-sequence()",description:"empty sequence"},errors:[]},{isDocumented:!0,arity:0,name:"user-error-no-location",qname:"debug:user-error-no-location",signature:"() as empty-sequence() external",description:" Raises a user error without query location.\n",summary:"<p> Raises a user error without query location.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"empty-sequence()",description:"empty sequence"},errors:[]},{isDocumented:!0,arity:0,name:"user-error",qname:"debug:user-error",signature:"() as empty-sequence() external",description:" Raises a user error.\n",summary:"<p> Raises a user error.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"empty-sequence()",description:"empty sequence"},errors:[]},{isDocumented:!0,arity:0,name:"zorba-error",qname:"debug:zorba-error",signature:"() as empty-sequence() external",description:" Raises a zorba error.\n",summary:"<p> Raises a zorba error.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"empty-sequence()",description:"empty sequence"},errors:[]}],variables:[]},"http://zorba.io/modules/reflection":{ns:"http://zorba.io/modules/reflection",description:" This module provides functions to dynamically invoke functions or main modules,\n respectively. Each of the functions (invoke or eval) come in four variants depending\n whether the expression being invoked is simple, nondeterministic, updating,\n or sequential.\n",sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Nicolae Brinza</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://www.w3.org/2005/xqt-errors",prefix:"err"},{uri:"http://zorba.io/modules/reflection",prefix:"reflection"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"eval-n",qname:"reflection:eval-n",signature:"($query as xs:string) as item()* external",description:" See documentation of reflection:eval() except the main module that is to\n be executed may be nondeterministc.\n",summary:"<p> See documentation of reflection:eval() except the main module that is to\n be executed may be nondeterministc.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"query",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the query string to be evaluated</div>'}],returns:{type:"item()*",description:"the result of evaluating the query"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">whatever error the evaluated XQuery may return</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XQST0031 If the XQuery version of the inner program is greater than the version of the outer program.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"eval-s",qname:"reflection:eval-s",signature:"($query as xs:string) as item()* external",description:" See documentation of reflection:eval() except the main module that is to\n be executed may be sequential, i.e. may have side-effects.\n",summary:"<p> See documentation of reflection:eval() except the main module that is to\n be executed may be sequential, i.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"query",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the query string to be evaluated</div>'}],returns:{type:"item()*",description:"the result of evaluating the query (the result is not supposed to contain any PUL)."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">whatever error the evaluated XQuery may return</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XQST0031 If the XQuery version of the inner program is greater than the version of the outer program.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"eval-u",qname:"reflection:eval-u",signature:"($query as xs:string) external",description:" See documentation of reflection:eval() except the main module that is to\n be executed may be updating, i.e. return a pending update list.\n",summary:"<p> See documentation of reflection:eval() except the main module that is to\n be executed may be updating, i.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!0,parameters:[{name:"query",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the query string to be evaluated</div>'}],returns:{type:null,description:"the PUL resulting from evaluating the query"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">whatever error the evaluated XQuery may return</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XQST0031 If the XQuery version of the inner program is greater than the version of the outer program.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"eval",qname:"reflection:eval",signature:"($query as xs:string) as item()* external",description:' The purpose of this function is to (dynamically) execute an XQuery program\n from inside another XQuery program.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The XQuery program that invokes the\n eval function will be referred to as the "outer" program and the XQuery\n program that is executed by the eval invocation will be referred to as\n the "inner" program. The function is given as a string argument.\n Typically, the outer program constructs this string dynamically,\n e.g., based on data extracted from documents and/or the values of\n external variables. The eval function treats this string as\n an XQuery main module. That is, it parses the string, compiles the\n resulting parse tree, executes the resulting execution plan, and finally\n returns the result or error (if any) to the outer program.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The given XQuery program needs to be a valid according to XQuery\'s\n MainModule production (see <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xquery/#doc-xquery-MainModule">\n http://www.w3.org/TR/xquery/#doc-xquery-MainModule</a>. Please note\n that the inner pogram must at least have the XQuery version of the\n outer program [err:XQST0031].<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The inner program "inherits" the static and dynamic context of the outer\n program. Specifically, evaluation of the inner program is done in static and\n dynamic contextes that are initialized as copies of the static and dynamic\n contextes of the outer program at the place where the eval invocation appears\n at. This means that, for example, all variables that are in-scope at the place\n where the eval function is invoked from, are also in-scope inside the inner\n program and can be referenced there without having to be re-declared. On the other\n hand, declarations that appear in the prolog of the inner main module or are\n imported by the inner main module from library modules, hide their corresponding\n inherited declarations. For example, if the inner main module declares\n a variable or function with the same name as an inherited variable or function,\n the inner variable/function hides the inherited one.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n If the inner program declares an external variable with the same name as an\n inherited variable, the value of the inherited variable is used to initialize\n the inner external variable. If, however, an inner external variable has no\n default initializer and no corresponding inherited variable, it will remain\n uninitialized, causing the inner program to raise an error when executed.\n',summary:"<p> The purpose of this function is to (dynamically) execute an XQuery program\n from inside another XQuery program.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"query",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the query string to be evaluated</div>'}],returns:{type:"item()*",description:"the result of evaluating the query"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">whatever error the evaluated XQuery may return.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XQST0031 If the XQuery version of the inner program is greater than the version of the outer program.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"invoke-n",qname:"reflection:invoke-n",signature:"($name as xs:QName) as item()* external",description:" See documentation for reflection:invoke except the function that\n is to be invoked may be nondeterministic.\n",summary:"<p> See documentation for reflection:invoke except the function that\n is to be invoked may be nondeterministic.</p>",annotation_str:" %an:nondeterministic %an:variadic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""},{prefix:"an",ns:"http://zorba.io/annotations",name:"variadic",value:""}],updating:!0,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the QName of the function that is to be invoked</div>'}],returns:{type:"item()*",description:"the result that is returned by the invoked function"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">whatever error the invoked function may return</xqdoc:error>']},{isDocumented:!0,arity:1,name:"invoke-s",qname:"reflection:invoke-s",signature:"($name as xs:QName) as item()* external",description:" See documentation for reflection:invoke except the function that\n is to be invoked may be sequential, i.e. may have side-effects.\n",summary:"<p> See documentation for reflection:invoke except the function that\n is to be invoked may be sequential, i.</p>",annotation_str:" %an:variadic %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"variadic",value:""},{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the QName of the function that is to be invoked</div>'}],returns:{type:"item()*",description:"the result that is returned by the invoked function"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">whatever error the invoked function may return</xqdoc:error>']},{isDocumented:!0,arity:1,name:"invoke-u",qname:"reflection:invoke-u",signature:"($name as xs:QName) external",description:" See documentation for reflection:invoke-n except the function that\n is to be invoked may be updating, i.e. return a pending update list.\n",summary:"<p> See documentation for reflection:invoke-n except the function that\n is to be invoked may be updating, i.</p>",annotation_str:" %an:nondeterministic %an:variadic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""},{prefix:"an",ns:"http://zorba.io/annotations",name:"variadic",value:""}],updating:!0,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the QName of the function that is to be invoked</div>'}],returns:{type:null,description:"the result that is returned by the invoked function"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">whatever error the invoked function may return</xqdoc:error>']},{isDocumented:!0,arity:1,name:"invoke",qname:"reflection:invoke",signature:"($name as xs:QName) as item()* external",description:' The invoke function allows to dynamically call a function given its QName\n and parameters.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n It is possible to invoke a function whose name is not known\n at compilation time -- it can be computed, passed through an external\n variable, taken from a file, etc. The first parameter must always be a\n QName identifying a known function.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The function is declared with the %an:variadic annotation. Hence, it allows\n for an arbitrary number of parameters. All of these parameters (except the\n first one) will be passed to the function that is called.\n <br xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Example usage : <pre xmlns:xqdoc="http://www.xqdoc.org/1.0"> reflection:invoke ( xs:QName("fn:max"), (1,2,3) ) </pre>\n <br xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Returns <pre xmlns:xqdoc="http://www.xqdoc.org/1.0"> 3 </pre>.\n',summary:"<p> The invoke function allows to dynamically call a function given its QName\n and parameters.</p>",annotation_str:" %an:variadic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"variadic",value:""}],updating:!1,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the QName of the function that is to be invoked</div>'}],returns:{type:"item()*",description:"the result that is returned by the invoked function"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">whatever error the invoked function may return</xqdoc:error>']}],variables:[]},"http://zorba.io/modules/hmac":{ns:"http://zorba.io/modules/hmac",description:" This module provides functions that perform HMAC\n (hash-based message authentication code) operations.\n For example, they calculate message codes involving hash functions such\n as MD5 and various SHA variants. The result is the base64 encoded value\n of the hash. A hash may be used to verify the data integrity and\n the authenticity of a message.\n",sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">William Candillon, Matthias Brantner</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/modules/hmac",prefix:"hmac"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:3,name:"compute-binary",qname:"hmac:compute-binary",signature:"($message as xs:base64Binary, $secret-key as xs:string, $hash-algo as xs:string) as xs:base64Binary external",description:" Calculate the HMAC for the given message and secret-key involving\n an custom hash function. Before calculating the code, the given\n base64-encoded message is base64-decoded.\n",summary:"<p> Calculate the HMAC for the given message and secret-key involving\n an custom hash function.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"message",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the message to be authenticated</div>'},{name:"secret-key",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the secret key used for calculating the authentication</div>'},{name:"hash-algo",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:base64Binary",description:"the base64 encoded message authentication code"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">hash:UNSUPPORTED-ALGORITHM if the given hash algorithm is not supported</xqdoc:error>']},{isDocumented:!0,arity:3,name:"compute",qname:"hmac:compute",signature:"($message as xs:string, $secret-key as xs:string, $alg as xs:string) as xs:base64Binary external",description:" Calculate the HMAC for the given message and secret-key involving\n an custom hash function.\n",summary:"<p> Calculate the HMAC for the given message and secret-key involving\n an custom hash function.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"message",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the message to be authenticated</div>'},{name:"secret-key",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the secret key used for calculating the authentication</div>'},{name:"alg",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The algorithm to use for the hashing operation. Supported algorithms are "md5", "sha1", and "sha256".</div>'}],returns:{type:"xs:base64Binary",description:"the base64 encoded message authentication code"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">hash:UNSUPPORTED-ALGORITHM if the given hash algorithm is not supported</xqdoc:error>']},{isDocumented:!0,arity:2,name:"md5-binary",qname:"hmac:md5-binary",signature:"($message as xs:base64Binary, $secret-key as xs:string) as xs:base64Binary",description:" Calculate the HMAC for the given message and secret-key involving\n the MD5 hash function. Before calculating the code, the given\n base64-encoded message is base64-decoded.\n",summary:"<p> Calculate the HMAC for the given message and secret-key involving\n the MD5 hash function.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"message",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the message to be authenticated</div>'},{name:"secret-key",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the secret key used for calculating the authentication</div>'}],returns:{type:"xs:base64Binary",description:"the base64 encoded message authentication code"},errors:[]},{isDocumented:!0,arity:2,name:"md5",qname:"hmac:md5",signature:"($message as xs:string, $secret-key as xs:string) as xs:base64Binary",description:" Calculate the HMAC for the given message and secret-key involving\n the MD5 hash function.\n",summary:"<p> Calculate the HMAC for the given message and secret-key involving\n the MD5 hash function.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"message",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the message to be authenticated</div>'},{name:"secret-key",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the secret key used for calculating the authentication</div>'}],returns:{type:"xs:base64Binary",description:"the base64 encoded message authentication code"},errors:[]},{isDocumented:!0,arity:2,name:"sha1-binary",qname:"hmac:sha1-binary",signature:"($message as xs:base64Binary, $secret-key as xs:string) as xs:base64Binary",description:" Calculate the HMAC for the given message and secret-key involving\n the SHA1 hash function. Before calculating the code, the given\n base64-encoded message is base64-decoded.\n",summary:"<p> Calculate the HMAC for the given message and secret-key involving\n the SHA1 hash function.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"message",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the message to be authenticated</div>'},{name:"secret-key",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the secret key used for calculating the authentication</div>'}],returns:{type:"xs:base64Binary",description:"the base64 encoded message authentication code"},errors:[]},{isDocumented:!0,arity:2,name:"sha1",qname:"hmac:sha1",signature:"($message as xs:string, $secret-key as xs:string) as xs:base64Binary",description:" Calculate the HMAC for the given message and secret-key involving\n the SHA1 hash function.\n",summary:"<p> Calculate the HMAC for the given message and secret-key involving\n the SHA1 hash function.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"message",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the message to be authenticated</div>'},{name:"secret-key",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the secret key used for calculating the authentication</div>'}],returns:{type:"xs:base64Binary",description:"the base64 encoded message authentication code"},errors:[]}],variables:[]},"http://www.28msec.com/modules/sleep":{ns:"http://www.28msec.com/modules/sleep",description:" This module provides a function to put the currently executing request\n to sleep.\n",sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">28msec</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://www.28msec.com/modules/sleep",prefix:"sleep"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"millis",qname:"sleep:millis",signature:"($millis as xs:integer) as empty-sequence() external",description:' Puts the currently executing request to sleep.\n This function is mainly useful in development e.g. to simulate the\n effects of long-running tasks wrt. the concurrent execution of\n requests.\n Here the function is used to simulate a request that runs for 1 second\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0">\n declare $acquired := lock:try-acquire("my-lock");\n if ($acquired)\n   sleep:millis(1000);\n else\n   fn:error(xs:QName("..."), "failed to acquire lock");\n </pre>\n',summary:"<p> Puts the currently executing request to sleep.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"millis",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number of milliseconds to sleep</div>'}],returns:{type:"empty-sequence()",description:"the function is sequential and returns the empty sequence"},errors:[]}],variables:[]},"http://www.28msec.com/modules/cloudant":{ns:"http://www.28msec.com/modules/cloudant",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This module provides functionality for creating, reading, updating,\n deleting and searching data in <a href="https://cloudant.com/">Cloudant</a>\n databases.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Before issuing a request to Cloudant it is mandatory to create\n a new connection through one of the <code>connect</code> functions.\n These functions return a connection identifier which needs to be used\n to access data in Cloudant through the other functions.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">In these functions Cloudant databases will be identified through\n their names. By default, the functions will assume that the database is owned by\n the user for which the given connection has been created.\n To specify a different database owner, most functions accept an\n <code>$options</code> parameter that allows a <code>database-owner</code>\n option to specify a different database owner for a single request.\n Moreover, when connecting, it is possible to specify the default\n database owner using the <code>connect#3</code> function.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Additional information on the Cloudant APIs can be found\n <a href="https://cloudant.com/for-developers/">on the Cloudant website</a>.</p>\n <h2 xmlns:xqdoc="http://www.xqdoc.org/1.0" id="determinism">Important Notice Regarding Function Determinism</h2>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The non side-effecting functions:\n <ul>\n   <li><a href="?anchor=list-databases-1">list-databases#1</a></li>\n   <li><a href="?anchor=list-databases-2">list-databases#2</a></li>\n   <li><a href="?anchor=database-info-2">database-info#2</a></li>\n   <li><a href="?anchor=database-info-3">database-info#3</a></li>\n   <li><a href="?anchor=all-documents-2">all-documents#2</a></li>\n   <li><a href="?anchor=all-documents-3">all-documents#3</a></li>\n   <li><a href="?anchor=multiple-documents-3">multiple-documents#3</a></li>\n   <li><a href="?anchor=multiple-documents-4">multiple-documents#4</a></li>\n   <li><a href="?anchor=document-3">document#3</a></li>\n   <li><a href="?anchor=document-4">document#4</a></li>\n   <li><a href="?anchor=document-info-3">document-info#3</a></li>\n   <li><a href="?anchor=document-info-4">document-info#4</a></li>\n   <li><a href="?anchor=attachment-4">attachment#4</a></li>\n   <li><a href="?anchor=attachment-5">attachment#5</a></li>\n   <li><a href="?anchor=all-view-documents-4">all-view-documents#4</a></li>\n   <li><a href="?anchor=all-view-documents-5">all-view-documents#5</a></li>\n   <li><a href="?anchor=multiple-view-documents-5">multiple-view-documents#5</a></li>\n   <li><a href="?anchor=multiple-view-documents-6">multiple-view-documents#6</a></li>\n   <li><a href="?anchor=lucene-query-5">lucene-query#5</a></li>\n   <li><a href="?anchor=lucene-query-6">lucene-query#6</a></li>\n </ul>\n are declared deterministic, which means that their results could be cached\n when invoked multiple times with the same arguments in the same query execution.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">To not use cached results you can use the following alternative functions:\n <ul>\n   <li><a href="?anchor=list-databases-nondeterministic-1">list-databases-nondeterministic#1</a></li>\n   <li><a href="?anchor=list-databases-nondeterministic-2">list-databases-nondeterministic#2</a></li>\n   <li><a href="?anchor=database-info-nondeterministic-2">database-info-nondeterministic#2</a></li>\n   <li><a href="?anchor=database-info-nondeterministic-3">database-info-nondeterministic#3</a></li>\n   <li><a href="?anchor=all-documents-nondeterministic-2">all-documents-nondeterministic#2</a></li>\n   <li><a href="?anchor=all-documents-nondeterministic-3">all-documents-nondeterministic#3</a></li>\n   <li><a href="?anchor=multiple-documents-nondeterministic-3">multiple-documents-nondeterministic#3</a></li>\n   <li><a href="?anchor=multiple-documents-nondeterministic-4">multiple-documents-nondeterministic#4</a></li>\n   <li><a href="?anchor=document-nondeterministic-3">document-nondeterministic#3</a></li>\n   <li><a href="?anchor=document-nondeterministic-4">document-nondeterministic#4</a></li>\n   <li><a href="?anchor=document-info-nondeterministic-3">document-info-nondeterministic#3</a></li>\n   <li><a href="?anchor=document-info-nondeterministic-4">document-info-nondeterministic#4</a></li>\n   <li><a href="?anchor=attachment-nondeterministic-4">attachment-nondeterministic#4</a></li>\n   <li><a href="?anchor=attachment-nondeterministic-5">attachment-nondeterministic#5</a></li>\n   <li><a href="?anchor=all-view-documents-nondeterministic-4">all-view-documents-nondeterministic#4</a></li>\n   <li><a href="?anchor=all-view-documents-nondeterministic-5">all-view-documents-nondeterministic#5</a></li>\n   <li><a href="?anchor=multiple-view-documents-nondeterministic-5">multiple-view-documents-nondeterministic#5</a></li>\n   <li><a href="?anchor=multiple-view-documents-nondeterministic-6">multiple-view-documents-nondeterministic#6</a></li>\n   <li><a href="?anchor=lucene-query-nondeterministic-5">lucene-query-nondeterministic#5</a></li>\n   <li><a href="?anchor=lucene-query-nondeterministic-6">lucene-query-nondeterministic#6</a></li>\n </ul>\n which have been declared as being non deterministic.</p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Federico Cavalieri</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://www.28msec.com/modules/cloudant",prefix:"cloudant"},{uri:"http://www.28msec.com/modules/credentials",prefix:"credentials"},{uri:"http://www.w3.org/2005/xqt-errors",prefix:"err"},{uri:"http://zorba.io/modules/http-client",prefix:"http"},{uri:"http://www.28msec.com/modules/maps",prefix:"map"},{uri:"http://zorba.io/modules/random",prefix:"random"},{uri:"http://www.zorba-xquery.com/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:2,name:"all-documents-nondeterministic",qname:"cloudant:all-documents-nondeterministic",signature:"($connection as anyURI, $database as string) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Lists all the documents in a given database.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#all-documents-2">all-documents#2</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Lists all the documents in a given database.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'}],returns:{type:"object()",description:"An object listing the documents in the specified database"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>']},{isDocumented:!0,arity:3,name:"all-documents-nondeterministic",qname:"cloudant:all-documents-nondeterministic",signature:"($connection as anyURI, $database as string, $options as object()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Lists all the documents in a given database.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#all-documents-3">all-documents#3</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Lists all the documents in a given database.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object specifying additional request options</div>'}],returns:{type:"object()",description:"An object listing the documents in the specified database"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:OPTIONS Malformed options object</xqdoc:error>']},{isDocumented:!0,arity:2,name:"all-documents",qname:"cloudant:all-documents",signature:"($connection as anyURI, $database as string) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Lists all the documents in a given database.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The information is returned as a JSON structure containing meta information\n about the return structure, and the list of documents each with its ID, revision\n and key. The key is generated from the document ID.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>cloudant:all-documents($connection, "db")</pre>.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">An object with the following format is returned:\n <pre>\n {\n   "total_rows":3,\n   "offset":0,\n   "rows":[\n   {\n     "id":"5a049246-179f-42ad-87ac-8f080426c17c",\n     "key":"5a049246-179f-42ad-87ac-8f080426c17c",\n     "value":\n     {\n       "rev":"2-9d5401898196997853b5ac4163857a29"\n     }\n   },\n   {\n     "id":"96f898f0-f6ff-4a9b-aac4-503992f31b01",\n     "key":"96f898f0-f6ff-4a9b-aac4-503992f31b01",\n     "value":\n     {\n       "rev":"2-ff7b85665c4c297838963c80ecf481a3"\n      }\n   },\n   {\n     "id":"d1f61e66-7708-4da6-aa05-7cbc33b44b7e",\n     "key":"d1f61e66-7708-4da6-aa05-7cbc33b44b7e",\n     "value":\n     {\n       "rev":"2-cbdef49ef3ddc127eff86350844a6108"\n     }\n   }]\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The fields have the following meaning:\n <ul>\n  <li>offset: offset where the document list started.</li>\n  <li>rows: array of document objects, each containing id, key and revision number.</li>\n  <li>total_rows: number of documents in the database.</li>\n  <li>update_seq: current update sequence database.</li>\n </ul>\n </p>\n',summary:"<p>  Lists all the documents in a given database.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'}],returns:{type:"object()",description:"An object listing the documents in the specified database"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>']},{isDocumented:!0,arity:3,name:"all-documents",qname:"cloudant:all-documents",signature:"($connection as anyURI, $database as string, $options as object()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Lists all the documents in a given database.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The information is returned as a JSON structure containing meta information\n about the return structure, and the list of documents each with its ID, revision\n and key. The key is generated from the document ID.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function allows to specify an additional options object.\n The following options are supported:\n <ul>\n   <li>descending: return the documents in descending by key order (boolean,\n   default: false).</li>\n   <li>endkey: stop returning records when the specified key is reached (string).</li>\n   <li>endkey_docid: stop returning records when the specified document ID is\n   reached (string).</li>\n   <li>group: group the results using the reduce function to a group or single\n   row (boolean, default: false).</li>\n   <li>group_level: specify the group level to be used (numeric).</li>\n   <li>include_docs: include the full content of the documents in the return\n   (boolean, default: false).</li>\n   <li>inclusive_end: specifies whether the specified end key should be included\n   in the result (boolean, default: true).</li>\n   <li>key: return only documents that match the specified key (string).</li>\n   <li>limit: limit the number of the returned documents to the specified number\n   (numeric).</li>\n   <li>reduce: use the reduction function (boolean, default: true).</li>\n   <li>skip: skip this number of records before starting to return the results\n   (numeric, default: 0).</li>\n   <li>stale: allow the results from a stale view to be used (string, allowed\n   value: "ok").</li>\n   <li>startkey: start returning records when the specified key is reached (string).</li>\n   <li>startkey_docid: start returning records when the specified document ID\n   is reached (string).</li>\n   <li>database-owner: specifies the database owner (string, default: connection\n   user).</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>cloudant:all-documents($connection, "db", {"database-owner": "username"})</pre>.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">An object with the following format is returned:\n <pre>\n {\n   "total_rows":3,\n   "offset":0,\n   "rows":[\n   {\n     "id":"5a049246-179f-42ad-87ac-8f080426c17c",\n     "key":"5a049246-179f-42ad-87ac-8f080426c17c",\n     "value":\n     {\n       "rev":"2-9d5401898196997853b5ac4163857a29"\n     }\n   },\n   {\n     "id":"96f898f0-f6ff-4a9b-aac4-503992f31b01",\n     "key":"96f898f0-f6ff-4a9b-aac4-503992f31b01",\n     "value":\n     {\n       "rev":"2-ff7b85665c4c297838963c80ecf481a3"\n      }\n   },\n   {\n     "id":"d1f61e66-7708-4da6-aa05-7cbc33b44b7e",\n     "key":"d1f61e66-7708-4da6-aa05-7cbc33b44b7e",\n     "value":\n     {\n       "rev":"2-cbdef49ef3ddc127eff86350844a6108"\n     }\n   }]\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The fields have the following meaning:\n <ul>\n  <li>offset: offset where the document list started.</li>\n  <li>rows: array of document objects, each containing id, key and revision number.</li>\n  <li>total_rows: number of documents in the database.</li>\n  <li>update_seq: current update sequence database.</li>\n </ul>\n </p>\n',summary:"<p>  Lists all the documents in a given database.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object specifying additional request options</div>'}],returns:{type:"object()",description:"An object listing the documents in the specified database"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:OPTIONS Malformed options object</xqdoc:error>']},{isDocumented:!0,arity:4,name:"all-view-documents-nondeterministic",qname:"cloudant:all-view-documents-nondeterministic",signature:"($connection as anyURI, $database as string, $design-document as string, $view as string) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns a JSON object describing all the documents in a given view.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#all-view-documents-4">all-view-documents#4</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Returns a JSON object describing all the documents in a given view.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'},{name:"design-document",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A design document name</div>'},{name:"view",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A view name</div>'}],returns:{type:"object()",description:"An object listing all documents in the specified view"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>']},{isDocumented:!0,arity:5,name:"all-view-documents-nondeterministic",qname:"cloudant:all-view-documents-nondeterministic",signature:"($connection as anyURI, $database as string, $design-document as string, $view as string, $options as object()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns a JSON object describing all the documents in a given view.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#all-view-documents-5">all-view-documents#5</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Returns a JSON object describing all the documents in a given view.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'},{name:"design-document",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A design document name</div>'},{name:"view",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A view name</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object specifying additional request options</div>'}],returns:{type:"object()",description:"An object listing all documents in the specified view"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:OPTIONS Malformed options object</xqdoc:error>']},{isDocumented:!0,arity:4,name:"all-view-documents",qname:"cloudant:all-view-documents",signature:"($connection as anyURI, $database as string, $design-document as string, $view as string) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns a JSON object describing all the documents in a given view.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The information is returned as a JSON structure containing meta information\n about the return structure, and the list of documents each with its ID, revision\n and key. The key is generated from the document ID.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>cloudant:all-view-documents($connection, "db", "recipes", "by_title")</pre>.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">An object with the following format is returned:\n <pre>\n {\n   "offset" : 0,\n   "rows" :\n   [\n     {\n       "id" : "3-tiersalmonspinachandavocadoterrine",\n       "key" : "3-tier salmon, spinach and avocado terrine",\n       "value" : ["3-tier salmon, spinach and avocado terrine"]\n     },\n     {\n       "id" : "Aberffrawcake",\n       "key" : "Aberffraw cake",\n       "value" : ["Aberffraw cake"]\n     },\n     {\n       "id" : "Adukiandorangecasserole-microwave",\n       "key" : "Aduki and orange casserole - microwave",\n       "value" : ["Aduki and orange casserole - microwave"]\n     }\n   ],\n   "total_rows" : 3\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The fields have the following meaning:\n <ul>\n  <li>offset: offset where the document list started.</li>\n  <li>rows: array of document objects, each containing id, key and revision number.</li>\n  <li>total_rows: number of documents in the database.</li>\n </ul>\n </p>\n',summary:"<p>  Returns a JSON object describing all the documents in a given view.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'},{name:"design-document",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A design document name</div>'},{name:"view",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A view name</div>'}],returns:{type:"object()",description:"An object listing all documents in the specified view"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>']},{isDocumented:!0,arity:5,name:"all-view-documents",qname:"cloudant:all-view-documents",signature:"($connection as anyURI, $database as string, $design-document as string, $view as string, $options as object()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns a JSON object describing all the documents in a given view.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The information is returned as a JSON structure containing meta information\n about the return structure, and the list of documents each with its ID, revision\n and key. The key is generated from the document ID.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function allows to specify an additional options object.\n The following options are supported:\n <ul>\n   <li>descending: return the documents in descending by key order (boolean,\n   default: false)</li>\n   <li>endkey: stop returning records when the specified key is reached (string)</li>\n   <li>endkey_docid: stop returning records when the specified document ID is\n   reached (string)</li>\n   <li>group: group the results using the reduce function to a group or single\n   row (boolean, default: false)</li>\n   <li>group_level: specify the group level to be used (numeric)</li>\n   <li>include_docs: include the full content of the documents in the return\n   (boolean, default: false)</li>\n   <li>inclusive_end: specifies whether the specified end key should be included\n   in the result (boolean, default: true)</li>\n   <li>key: return only documents that match the specified key (string)</li>\n   <li>limit: limit the number of the returned documents to the specified number\n   (numeric)</li>\n   <li>reduce: use the reduction function (boolean, default: true)</li>\n   <li>skip: skip this number of records before starting to return the results\n   (numeric, default: 0)</li>\n   <li>stale: allow the results from a stale view to be used (string, allowed\n   value: "ok")</li>\n   <li>startkey: start returning records when the specified key is reached\n   (string)</li>\n   <li>startkey_docid: start returning records when the specified document ID\n   is reached (string)</li>\n   <li>database-owner: specifies the database owner (string, default:\n   connection user).</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>cloudant:all-view-documents($connection, "db", "recipes", "by_title",\n   {"database-owner" : "username"})</pre>.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">An object with the following format is returned:\n <pre>\n {\n   "offset" : 0,\n   "rows" :\n   [\n     {\n       "id" : "3-tiersalmonspinachandavocadoterrine",\n       "key" : "3-tier salmon, spinach and avocado terrine",\n       "value" : ["3-tier salmon, spinach and avocado terrine"]\n     },\n     {\n       "id" : "Aberffrawcake",\n       "key" : "Aberffraw cake",\n       "value" : ["Aberffraw cake"]\n     },\n     {\n       "id" : "Adukiandorangecasserole-microwave",\n       "key" : "Aduki and orange casserole - microwave",\n       "value" : ["Aduki and orange casserole - microwave"]\n     }\n   ],\n   "total_rows" : 3\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The fields have the following meaning:\n <ul>\n  <li>offset: offset where the document list started.</li>\n  <li>rows: array of document objects, each containing id, key and revision\n  number.</li>\n  <li>total_rows: number of documents in the database.</li>\n </ul>\n </p>\n',summary:"<p>  Returns a JSON object describing all the documents in a given view.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'},{name:"design-document",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A design document name</div>'},{name:"view",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A view name</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object specifying additional request options</div>'}],returns:{type:"object()",description:"An object listing all documents in the specified view"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:OPTIONS Malformed options object</xqdoc:error>']},{isDocumented:!0,arity:4,name:"attachment-nondeterministic",qname:"cloudant:attachment-nondeterministic",signature:"($connection as anyURI, $database as string, $document-id as string, $attachment-name as string) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves the specified document attachment.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#attachment-4">attachment#4</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Retrieves the specified document attachment.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'},{name:"document-id",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A document identifier</div>'},{name:"attachment-name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An attchment name</div>'}],returns:{type:"object()",description:"The specified document attachment"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:DATABASE-NAME Invalid database name</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>']},{isDocumented:!0,arity:5,name:"attachment-nondeterministic",qname:"cloudant:attachment-nondeterministic",signature:"($connection as anyURI, $database as string, $document-id as string, $attachment-name as string, $options as object()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves the specified document attachment.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as <a href="#attachment-5">attachment#5</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Retrieves the specified document attachment.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'},{name:"document-id",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A document identifier</div>'},{name:"attachment-name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An attchment name</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object specifying additional request options</div>'}],returns:{type:"object()",description:"The specified document attachment"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:DATABASE-NAME Invalid database name</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:ATTACHMENT-NOT-EXISTS Attachment does not exists</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:OPTIONS Malformed options object</xqdoc:error>']},{isDocumented:!0,arity:4,name:"attachment",qname:"cloudant:attachment",signature:"($connection as anyURI, $database as string, $document-id as string, $attachment-name as string) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves the specified document attachment.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>cloudant:attachment($connection, "db", "DocID", "Attachment")</pre>.\n </p>\n <h4 xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieving a design document attachment.</h4>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">To retrieve a design document attachment the document id must\n start with <code>_design/</code>.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>cloudant:attachment($connection, "db", "_design/DocID", "Attachment")</pre>.\n </p>\n <h4 xmlns:xqdoc="http://www.xqdoc.org/1.0">Return value</h4>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The returned object reports the media-type of the attachment as\n it was specified when the attachment was submitted to the database and\n its raw content.\n The format of the returned object is the following:\n <pre>\n {\n   "media-type": "text/plain",\n   "content" : "Hello World"\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The type of the content field is determined by the media-type returned by the\n server. If the media-type indicates that the body content is textual,\n then the content has type string, base64Binary otherwise.\n Specifically, the body content is considered textual only if the MIME-type specified in\n the media-type is one of:\n <ul>\n   <li>"application/json"</li>\n   <li>"application/x-javascript"</li>\n   <li>"application/xml"</li>\n   <li>"application/xml-external-parsed-entity"</li>\n </ul>\n or if the MIME-type starts with "text/" or ends with "+xml".</p>\n',summary:"<p>  Retrieves the specified document attachment.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'},{name:"document-id",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A document identifier</div>'},{name:"attachment-name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An attchment name</div>'}],returns:{type:"object()",description:"The specified document attachment"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:DATABASE-NAME Invalid database name</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>']},{isDocumented:!0,arity:5,name:"attachment",qname:"cloudant:attachment",signature:"($connection as anyURI, $database as string, $document-id as string, $attachment-name as string, $options as object()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves the specified document attachment.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function allows to specify an additional options object.\n The following options are supported:\n <ul>\n   <li>database-owner: specifies the database owner (string, default: connection user).</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>cloudant:attachment($connection, "db", "DocID", "Attachment",\n   {"database-owner": "username"})</pre>.\n </p>\n <h4 xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieving a design document attachment.</h4>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">To retrieve a design document attachment the document id must\n start with <code>_design/</code>.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>cloudant:attachment($connection, "db", "_design/DocID", "Attachment",\n   {"database-owner": "username"})</pre>.\n </p>\n <h4 xmlns:xqdoc="http://www.xqdoc.org/1.0">Return value</h4>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The returned object reports the media-type of the attachment as\n it was specified when the attachment was submitted to the database and\n its raw content.\n The format of the returned object is the following:\n <pre>\n {\n   "media-type": "text/plain",\n   "content" : "Hello World"\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The type of the content field is determined by the media-type returned by the\n server. If the media-type indicates that the body content is textual,\n then the content has type string, base64Binary otherwise.\n Specifically, the body content is considered textual only if the MIME-type specified in\n the media-type is one of:\n <ul>\n   <li>"application/json"</li>\n   <li>"application/x-javascript"</li>\n   <li>"application/xml"</li>\n   <li>"application/xml-external-parsed-entity"</li>\n </ul>\n or if the MIME-type starts with "text/" or ends with "+xml".</p>\n',summary:"<p>  Retrieves the specified document attachment.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'},{name:"document-id",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A document identifier</div>'},{name:"attachment-name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An attchment name</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object specifying additional request options</div>'}],returns:{type:"object()",description:"The specified document attachment"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:DATABASE-NAME Invalid database name</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:ATTACHMENT-NOT-EXISTS Attachment does not exists</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:OPTIONS Malformed options object</xqdoc:error>']},{isDocumented:!0,arity:3,name:"bulk-crud",qname:"cloudant:bulk-crud",signature:"($connection as anyURI, $database as string, $documents as object()*) as array()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Creates, updates or deletes multiple documents with a single request.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">When creating new documents the document ID is optional. For updating\n existing documents, you must provide the document ID, revision information,\n and new document values. To delete existing documents, you must provide the\n document ID, revision information and add a field <code>_deleted</code> having\n value <code>true</code>.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>cloudant:bulk-crud($connection, "db",\n (\n   {\n     "name":"Nicholas",\n     "age":45,\n     "gender":"male",\n   },\n   {\n     "name":"Taylor",\n     "age":50,\n     "gender":"male",\n     "_id":"5a049246-179f-42ad-87ac-8f080426c17c",\n   },\n   {\n     "name":"Owen",\n     "age":51,\n     "gender":"male",\n     "_id":"d1f61e66-7708-4da6-aa05-7cbc33b44b7e",\n     "_rev":"2-f29c836d0bedc4b4b95cfaa6d99e95df",\n   },\n   {\n     "_id":"b675e932-9bb6-4fc9-b889-50238ac3512b",\n     "_rev":"2-abd3942fdab3515bfed224abed2451feb",\n     "_deleted": true\n   }\n ))\n </pre>\n requires to insert the first document with a system-generated identifier, to\n insert the second one with a user-specified identifier, to update the third\n one and, finally,to delete the last one.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n The JSON returned by the_bulk_docs operation consists of an array\n of JSON structures, one for each submitted document.\n The returned JSON structure should be examined to ensure that all of\n the documents submitted in the original request were successfully added\n to the database. When no errors are raised, the revision of the new\n document is reported for all documents.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n <pre>\n [{\n    "id":"96f898f0-f6ff-4a9b-aac4-503992f31b01",\n    "rev":"2-ff7b85665c4c297838963c80ecf481a3"\n  },\n  {\n    "id":"5a049246-179f-42ad-87ac-8f080426c17c",\n    "rev":"2-9d5401898196997853b5ac4163857a29"\n  },\n  {\n    "id":"d1f61e66-7708-4da6-aa05-7cbc33b44b7e",\n    "rev":"2-cbdef49ef3ddc127eff86350844a6108"\n  },\n  {\n    "id": "b675e932-9bb6-4fc9-b889-50238ac3512b",\n    "rev":"2-12356bafb1232167befabb32127823943d"\n  }]\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Cloudant will only guarantee that some of the documents will be\n saved when you send the request. The response will contain the list of\n documents successfully inserted or updated during the process.\n In the event of a crash, some of the documents may have been successfully\n saved, and some will have been lost.\n The response structure will indicate whether the document was updated by\n supplying the <code>rev</code> parameter indicating a new document revision\n was created. If the update failed, then you will get an error of type\n <code>conflict</code>.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example:\n <pre>\n [\n   {\n     "id":"FishStew",\n     "error":"conflict",\n     "reason":"Document update conflict."\n   },\n   {\n     "id":"LambStew",\n     "error":"conflict",\n     "reason":"Document update conflict."\n   },\n   {\n     "id":"7f7638c86173eb440b8890839ff35433",\n     "error":"conflict",\n     "reason":"Document update conflict."\n   }\n ]\n </pre>\n In this case no new revision has been created and you will need to submit\n the document update with the correct revision tag, to update the document.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The exact structure of each document in the returned array is:\n <ul>\n   <li>id: the document ID</li>\n   <li>rev: the new document revision, if a new revision was created</li>\n   <li>error: the error type, if an error was raised</li>\n   <li>reason: a description of the raised error, if an error was raised</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The error type can either be conflict or forbidden. The first type means that\n the document as submitted is in conflict. The new revision has not been created\n and you will need to re-submit the document to the database. Entries with forbidden\n error type indicate that the validation routine applied to the document during submission\n has returned an error.</p>\n',summary:"<p>  Creates, updates or deletes multiple documents with a single request.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'},{name:"documents",type:"object()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An sequence of documents</div>'}],returns:{type:"array()",description:"An object describing the performed operations"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>']},{isDocumented:!0,arity:4,name:"bulk-crud",qname:"cloudant:bulk-crud",signature:"($connection as anyURI, $database as string, $documents as object()*, $options as object()) as array()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Creates, updates or deletes multiple documents with a single request.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">When creating new documents the document ID is optional. For updating\n existing documents, you must provide the document ID, revision information,\n and new document values. To delete existing documents, you must provide the\n document ID, revision information and add a field <code>_deleted</code> having\n value <code>true</code>.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function allows to specify an additional options object.\n The following options are supported:\n <ul>\n   <li>all_or_nothing: sets the database commit mode to use all-or-nothing\n   semantics (boolean, default: false).</li>\n   <li>database-owner: specifies the database owner (string, default: connection\n   user).</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>cloudant:bulk-crud($connection, "db",\n (\n   {\n     "name":"Nicholas",\n     "age":45,\n     "gender":"male",\n   },\n   {\n     "name":"Taylor",\n     "age":50,\n     "gender":"male",\n     "_id":"5a049246-179f-42ad-87ac-8f080426c17c",\n   },\n   {\n     "name":"Owen",\n     "age":51,\n     "gender":"male",\n     "_id":"d1f61e66-7708-4da6-aa05-7cbc33b44b7e",\n     "_rev":"2-f29c836d0bedc4b4b95cfaa6d99e95df",\n   },\n   {\n     "_id":"b675e932-9bb6-4fc9-b889-50238ac3512b",\n     "_rev":"2-abd3942fdab3515bfed224abed2451feb",\n     "_deleted": true\n   }\n ),{"database-owner": "username"})\n </pre>\n requires to insert the first document with a system-generated identifier, to\n insert the second one with a user-specified identifier, to update the third\n one and, finally, to delete the last one.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n The JSON returned by the_bulk_docs operation consists of an array\n of JSON structures, one for each document in the original submission.\n The returned JSON structure should be examined to ensure that all of\n the documents submitted in the original request were successfully added\n to the database. When no errors are raised, the revision of the new\n document is reported for all documents.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n <pre>\n [{\n    "id":"96f898f0-f6ff-4a9b-aac4-503992f31b01",\n    "rev":"2-ff7b85665c4c297838963c80ecf481a3"\n  },\n  {\n    "id":"5a049246-179f-42ad-87ac-8f080426c17c",\n    "rev":"2-9d5401898196997853b5ac4163857a29"\n  },\n  {\n    "id":"d1f61e66-7708-4da6-aa05-7cbc33b44b7e",\n    "rev":"2-cbdef49ef3ddc127eff86350844a6108"\n  },\n  {\n    "id": "b675e932-9bb6-4fc9-b889-50238ac3512b",\n    "rev":"2-12356bafb1232167befabb32127823943d"\n  }]\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Cloudant will only guarantee that some of the documents will be\n saved when you send the request. The response will contain the list of\n documents successfully inserted or updated during the process.\n In the event of a crash, some of the documents may have been successfully\n saved, and some will have been lost.\n The response structure will indicate whether the document was updated by\n supplying the <code>rev</code> parameter indicating a new document revision\n was created. If the update failed, then you will get an error of type\n <code>conflict</code>.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example:\n <pre>\n [\n   {\n     "id":"FishStew",\n     "error":"conflict",\n     "reason":"Document update conflict."\n   },\n   {\n     "id":"LambStew",\n     "error":"conflict",\n     "reason":"Document update conflict."\n   },\n   {\n     "id":"7f7638c86173eb440b8890839ff35433",\n     "error":"conflict",\n     "reason":"Document update conflict."\n   }\n ]\n </pre>\n In this case no new revision has been created and you will need to submit\n the document update with the correct revision tag, to update the document.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The exact structure of each document in the returned array is:\n <ul>\n   <li>id: the document ID</li>\n   <li>rev: the new document revision, if a new revision was created</li>\n   <li>error: the error type, if an error was raised</li>\n   <li>reason: a description of the raised error, if an error was raised</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The error type can either be conflict or forbidden. The first type means that\n the document as submitted is in conflict. The new revision has not been created\n and you will need to re-submit the document to the database. Entries with forbidden\n error type indicate that the validation routine applied to the document during submission\n has returned an error.</p>\n',summary:"<p>  Creates, updates or deletes multiple documents with a single request.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'},{name:"documents",type:"object()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An sequence of documents</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object specifying additional request options</div>'}],returns:{type:"array()",description:"An object describing the performed operations"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:OPTIONS Malformed options object</xqdoc:error>']},{isDocumented:!0,arity:2,name:"commit-changes",qname:"cloudant:commit-changes",signature:"($connection as anyURI, $database as string) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Commits any recent changes to the specified database to disk.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>cloudant:commit-changes($connection, "db")</pre>.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">An object with the following format is returned:\n <pre>\n {\n   "ok" : true,\n   "instance_start_time" : "0"\n }\n </pre>\n </p>\n',summary:"<p>  Commits any recent changes to the specified database to disk.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'}],returns:{type:"object()",description:"An object reporting the instance start time"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:DATABASE-NOT-EXISTS The specified database does not exists</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>']},{isDocumented:!0,arity:3,name:"commit-changes",qname:"cloudant:commit-changes",signature:"($connection as anyURI, $database as string, $options as object()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Commits any recent changes to the specified database to disk.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function allows to specify an additional options object.\n The following options are supported:\n <ul>\n   <li>database-owner: specifies the database owner (string, default: connection\n   user).</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>\n cloudant:commit-changes($connection, "db", {"database-owner": "username"})\n </pre>.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">An object with the following format is returned:\n <pre>\n {\n   "ok" : true,\n   "instance_start_time" : "0"\n }\n </pre>\n </p>\n',summary:"<p>  Commits any recent changes to the specified database to disk.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object specifying additional request options</div>'}],returns:{type:"object()",description:"An object reporting the instance start time"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:DATABASE-NOT-EXISTS The specified database does not exists</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:OPTIONS Malformed options object</xqdoc:error>']},{isDocumented:!0,arity:0,name:"connect",qname:"cloudant:connect",signature:"() as anyURI",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Opens a connection to Cloudant using the default credentials.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function returns an opaque URI that can represents the connection.\n This URI has to be passed to other functions of this module that require\n a <code>$connection</code> parameter as a first argument.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function requires to specify an options object.\n The following options are supported:\n <ul>\n   <li>username: the username used for connecting (string, mandatory).</li>\n   <li>password: the password used for connecting (string, mandatory).</li>\n   <li>default-database-owner: the default database owner which will be\n       used when calling the other module functions (string).</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>cloudant:connect()</pre>.\n </p>\n',summary:"<p>  Opens a connection to Cloudant using the default credentials.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[],returns:{type:"anyURI",description:"An identifier that represents the connection to the server"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CREDENTIALS Missing or invalid credentials</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authentication error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>']},{isDocumented:!0,arity:1,name:"connect",qname:"cloudant:connect",signature:"($credentials as item()) as anyURI",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Opens a connection to Cloudant using the specified credentials.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function returns an opaque URI that can represents the connection.\n This URI has to be passed to other functions of this module that require\n a <code>$connection</code> parameter as a first argument.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The $credentials parameter is used to specify the connection information.\n If a string is used, then the function will interpret it as the name of\n a credential in the Cloudant category.\n If an object is used, then the function will open a connection using it.\n The object structure is the following:\n <ul>\n   <li>username: the username used for connecting (string, mandatory).</li>\n   <li>password: the password used for connecting (string, mandatory).</li>\n   <li>default-database-owner: the default database owner which will be\n       used when calling the other module functions (string, optional).</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example, using stored credential:\n <pre>cloudant:connect("credentials-name")</pre>\n For example, specifying the connection information:\n <pre>cloudant:connect(\n   {\n     "username": "user",\n     "password: "pass",\n     "owner": "another-user"\n   })</pre>.\n </p>\n',summary:"<p>  Opens a connection to Cloudant using the specified credentials.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"credentials",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The connection specification</div>'}],returns:{type:"anyURI",description:"An identifier that represents the connection to the server"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authentication error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CREDENTIALS Missing or malformed credentials</xqdoc:error>']},{isDocumented:!0,arity:2,name:"create-database",qname:"cloudant:create-database",signature:"($connection as anyURI, $database as string) as empty-sequence()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Creates a new database.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The database name must be composed of one or more of the following\n characters:\n <ul>\n  <li>Lowercase characters (a-z).</li>\n  <li>Digits (0-9).</li>\n  <li>Any of the characters: _,$,(,),+,- and /.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>cloudant:create-database($connection, "db")</pre>.\n </p>\n',summary:"<p>  Creates a new database.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'}],returns:{type:"empty-sequence()",description:"Empty sequence"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:DATABASE-NAME Invalid database name</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:DATABASE-EXISTS Database already exists</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>']},{isDocumented:!0,arity:3,name:"create-document",qname:"cloudant:create-document",signature:"($connection as anyURI, $database as string, $document as object()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Creates a new document in the specified database.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Creates a new document in the specified database,\n using the supplied JSON document structure. If the JSON\n structure includes the _id field, then the document will\n be created with the specified document ID. If the _id\n field is not specified, a new unique ID will be generated.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">You can include one or more attachments with a given document\n by incorporating the attachment information within the JSON of\n the document. This provides a simpler alternative to loading\n documents with attachments than making a separate call.\n To do so add you can add the <code>_attachments</code> object\n field to the document. It can have one ore more fields, each\n defining a different attachment.\n The name of the field is the name of the attachment.\n Its value is an object containing the following fields:\n <ul>\n  <li>content_type: MIME Content type string</li>\n  <li>data: File attachment content, Base64 encoded</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>cloudant:create-document($connection, "db",\n   {\n     "_id" : "FishStew",\n     "servings" : 4,\n     "subtitle" : "Delicious with fresh bread",\n     "title" : "Fish Stew"\n     "_attachments" : {\n       "styling.css" : {\n       "content-type" : "text/css",\n       "data" : "cCB7IGZvbnQtc2l6ZTogMTJwdDsgfQo="\n       }\n     }\n   })\n </pre>\n creates a document with an attachment named <code>styling.css</code>.\n </p>\n <h4 xmlns:xqdoc="http://www.xqdoc.org/1.0">Creating a design document</h4>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">To create a design document the <code>_id</code> field must be present and must\n start with <code>_design/</code>.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example, the following expression creates a design document\n <pre>cloudant:create-document($connection, "db",\n   {\n     "_id": "_design/DesDocID",\n     "views": {\n       "view1": {\n       "map":"function(doc){emit(doc.field, 1)}",\n       "reduce": "function(key, value, rereduce){return sum(values)}"\n       }\n     },\n     "indexes": {\n       "mysearch" : {\n         "analyzer": {"name": "portuguese", "stopwords":["foo", "bar, "baz"]},\n         "index": "function(doc){ ... }"\n       },\n     }\n   }, {"database-owner": "username"})\n </pre>.\n </p>\n <h4 xmlns:xqdoc="http://www.xqdoc.org/1.0">Return value</h4>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The returned JSON object will report the new document revision\n and has the following form:\n <pre>\n {\n   "id":"64575eef70ab90a2b8d55fc09e00440d",\n   "ok":true,\n   "rev":"1-9c65296036141e575d32ba9c034dd3ee"\n }\n </pre>\n </p>\n',summary:"<p>  Creates a new document in the specified database.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'},{name:"document",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A document</div>'}],returns:{type:"object()",description:"An object which contains the document id and revision"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:DATABASE-NAME Invalid database name</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:DOCUMENT Document creation conflict</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>']},{isDocumented:!0,arity:4,name:"create-document",qname:"cloudant:create-document",signature:"($connection as anyURI, $database as string, $document as object(), $options as object()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Creates a new document in the specified database</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Creates a new document in the specified database,\n using the supplied JSON document structure. If the JSON\n structure includes the _id field, then the document will\n be created with the specified document ID. If the _id\n field is not specified, a new unique ID will be generated.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">You can include one or more attachments with a given document\n by incorporating the attachment information within the JSON of\n the document. This provides a simpler alternative to loading\n documents with attachments than making a separate call.\n To do so add you can add the <code>_attachments</code> object\n field to the document. It can have one ore more fields, each\n defining a different attachment.\n The name of the field is the name of the attachment.\n Its value is an object containing the following fields:\n <ul>\n  <li>content_type: MIME Content type string</li>\n  <li>data: File attachment content, Base64 encoded</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>cloudant:create-document($connection, "db",\n   {\n     "_id" : "FishStew",\n     "servings" : 4,\n     "subtitle" : "Delicious with fresh bread",\n     "title" : "Fish Stew"\n     "_attachments" : {\n       "styling.css" : {\n       "content-type" : "text/css",\n       "data" : "cCB7IGZvbnQtc2l6ZTogMTJwdDsgfQo="\n       }\n     }\n   }, {"database-owner": "username"})\n </pre>\n creates a document with an attachment named <code>styling.css</code>.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function allows to specify an additional options object.\n The following options are supported:\n <ul>\n   <li>batch: requires batch mode for insertions (string, allowed value: "ok")</li>\n   <li>database-owner: specifies the database owner (string, default: connection user).</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">You can write documents to the database at a higher rate\n by using the batch option. This collects document writes\n together in memory (on a user-by-user basis) before they are\n committed to disk. This increases the risk of the documents\n not being stored in the event of a failure, since the documents\n are not written to disk immediately.</p>\n <h4 xmlns:xqdoc="http://www.xqdoc.org/1.0">Creating a design document</h4>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">To create a design document the <code>_id</code> field must be present and must\n start with <code>_design/</code>.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example, the following expression creates a design document\n <pre>cloudant:create-document($connection, "db",\n   {\n     "_id": "_design/DesDocID",\n     "views": {\n       "view1": {\n       "map":"function(doc){emit(doc.field, 1)}",\n       "reduce": "function(key, value, rereduce){return sum(values)}"\n       }\n     },\n     "indexes": {\n       "mysearch" : {\n         "analyzer": {"name": "portuguese", "stopwords":["foo", "bar, "baz"]},\n         "index": "function(doc){ ... }"\n       },\n     }\n   }, {"database-owner": "username"})\n </pre>.\n </p>\n <h4 xmlns:xqdoc="http://www.xqdoc.org/1.0">Return value</h4>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The returned JSON object will report the new document revision\n and has the following form:\n <pre>\n {\n   "id":"64575eef70ab90a2b8d55fc09e00440d",\n   "ok":true,\n   "rev":"1-9c65296036141e575d32ba9c034dd3ee"\n }\n </pre>\n </p>\n',summary:"<p>  Creates a new document in the specified database \n  Creates a new document in the specified database,\n using the supplied JSON document structure.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'},{name:"document",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A document</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object specifying additional request options</div>'}],returns:{type:"object()",description:"An object which contains the document id and revision"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:DATABASE-NAME Invalid database name</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:DOCUMENT Document creation conflict</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:OPTIONS Malformed options object</xqdoc:error>']},{isDocumented:!0,arity:7,name:"create-or-update-attachment",qname:"cloudant:create-or-update-attachment",signature:"($connection as anyURI, $database as string, $document-id as string, $document-rev as string, $attachment-name as string, $media-type as string, $attachment as atomic) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Creates or updates a document attachment.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The latest document revision must be specified.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>cloudant:create-or-update-attachment($connection, "db", "FishStew",\n   "8-7c4740b4dcf26683e941d6641c00c39d", "AttachmentName", "text/plain",\n   "AttachmentContent")</pre>.\n </p>\n <h4 xmlns:xqdoc="http://www.xqdoc.org/1.0">Creating or updating a design document attachment.</h4>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">To create or update a design document attachment the document id must\n start with <code>_design/</code>.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>cloudant:create-or-update-attachment($connection, "db", "_design/DesDocId",\n   "8-7c4740b4dcf26683e941d6641c00c39d", "AttachmentName", "text/plain",\n   "AttachmentContent")</pre>.\n </p>\n <h4 xmlns:xqdoc="http://www.xqdoc.org/1.0">Return value</h4>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The returned object reports the document id and its new\n revision, as follows:\n <pre>\n {\n   "id":"FishStew",\n   "ok":true,\n   "rev":"9-247bb19a41bfd9bfdaf5ee6e2e05be74"\n }\n </pre>\n </p>\n',summary:"<p>  Creates or updates a document attachment.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'},{name:"document-id",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A document identifier</div>'},{name:"document-rev",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A document revision</div>'},{name:"attachment-name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the attachment</div>'},{name:"media-type",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The media-type of the attachment</div>'},{name:"attachment",type:"atomic",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0">-name The name of the attachment</div>'}],returns:{type:"object()",description:"An object containing the document id and its new revision"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:DATABASE-NAME Invalid database name</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:ATTACHMENT-TYPE Attachment type must be string, base64Binary or hexBinary</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>']},{isDocumented:!0,arity:8,name:"create-or-update-attachment",qname:"cloudant:create-or-update-attachment",signature:"($connection as anyURI, $database as string, $document-id as string, $document-rev as string, $attachment-name as string, $media-type as string, $attachment as atomic, $options as object()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Creates or updates a document attachment.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The latest document revision must be specified.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function allows to specify an additional options object.\n The following options are supported:\n <ul>\n   <li>database-owner: specifies the database owner (string, default: connection user).</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>cloudant:create-or-update-attachment($connection, "db", "FishStew",\n   "8-7c4740b4dcf26683e941d6641c00c39d", "AttachmentName", "text/plain",\n   "AttachmentContent", {"database-owner": "username"})</pre>.\n </p>\n <h4 xmlns:xqdoc="http://www.xqdoc.org/1.0">Creating or updating a design document attachment.</h4>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">To create or update a design document attachment the document id must\n start with <code>_design/</code>.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>cloudant:create-or-update-attachment($connection, "db", "_design/DesDocId",\n   "8-7c4740b4dcf26683e941d6641c00c39d", "AttachmentName", "text/plain",\n   "AttachmentContent", {"database-owner": "username"})</pre>.\n </p>\n <h4 xmlns:xqdoc="http://www.xqdoc.org/1.0">Return value</h4>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The returned object reports the document id and its new\n revision, as follows:\n <pre>\n {\n   "id":"FishStew",\n   "ok":true,\n   "rev":"9-247bb19a41bfd9bfdaf5ee6e2e05be74"\n }\n </pre>\n </p>\n',summary:"<p>  Creates or updates a document attachment.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'},{name:"document-id",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A document identifier</div>'},{name:"document-rev",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A document revision</div>'},{name:"attachment-name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the attachment</div>'},{name:"media-type",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The media-type of the attachment</div>'},{name:"attachment",type:"atomic",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0">-name The name of the attachment</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object specifying additional request options</div>'}],returns:{type:"object()",description:"An object containing the document id and its new revision"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:DATABASE-NAME Invalid database name</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:ATTACHMENT-TYPE Attachment type must be string, base64Binary or hexBinary</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:OPTIONS Malformed options object</xqdoc:error>']},{isDocumented:!0,arity:3,name:"create-or-update-document",qname:"cloudant:create-or-update-document",signature:"($connection as anyURI, $database as string, $document as object()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Creates or updates a document.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">When creating a new document, the <code>_id</code> field must\n be specified.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>cloudant:create-or-update-document($connection, "db",\n   {\n     "name":"Hannah",\n     "age":120,\n     "gender":"female",\n     "_id":"DocID"\n   })</pre>.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">When updating a document, the <code>_id</code> and the\n <code>_rev</code> field, which contains the last document revision,\n must be specified.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>cloudant:create-or-update-document($connection, "db",\n   {\n     "name":"Hannah",\n     "age":40,\n     "gender":"female",\n     "_id":"DocID",\n     "_rev":"1-764b9b11845fd0b73cfa0e61acc74ecf"\n   })</pre>.\n </p>\n <h4 xmlns:xqdoc="http://www.xqdoc.org/1.0">Creating or updating a design document</h4>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">To create or update a design document the document id must\n start with <code>_design/</code>.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example, the following expression creates a design document\n <pre>cloudant:create-or-update-document($connection, "db",\n   {\n     "_id": "_design/DesDocID",\n     "views": {\n       "view1": {\n       "map":"function(doc){emit(doc.field, 1)}",\n       "reduce": "function(key, value, rereduce){return sum(values)}"\n       }\n     },\n     "indexes": {\n       "mysearch" : {\n         "analyzer": {"name": "portuguese", "stopwords":["foo", "bar, "baz"]},\n         "index": "function(doc){ ... }"\n       },\n     }\n   })\n </pre>.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example, the following expression updates a design document\n <pre>cloudant:create-or-update-document($connection, "db",\n   {\n     "_id": "_design/DesDocID",\n     "_rev": "2-f29c836d0bedc4b4b95cfaa6d99e95df",\n     "views": {\n       "view1": {\n       "map":"function(doc){emit(doc.field, 1)}",\n       "reduce": "function(key, value, rereduce){return sum(values)}"\n       }\n     },\n     "indexes": {\n       "mysearch" : {\n         "analyzer": {"name": "portuguese", "stopwords":["foo", "bar, "baz"]},\n         "index": "function(doc){ ... }"\n       },\n     }\n   })\n </pre>.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n The meaning of the fields in the design document is the following:\n <ul>\n   <li>_id: document ID</li>\n   <li>_rev: document revision</li>\n   <li>views: object defining the views. Each field defines a different view.\n       The field name is the name of the view and has the following content:\n     <ul>\n       <li>map: view map function</li>\n       <li>reduce: view reduce function (optional)</li>\n     </ul>\n   </li>\n   <li>indexes: object defining the view indexes. Each field defines a different index.\n       The field name is the name of the index and has the following content:\n     <ul>\n       <li>analyzer: Name of the analyzer to be used or an object with the\n       following fields:\n         <ul>\n           <li>name: Name of the analyzer</li>\n           <li>stopwords: An array of stop words. Stop words are words that\n           should not be indexed.</li>\n         </ul>\n       </li>\n       <li>index: Function that handles the indexing</li>\n     </ul>\n   </li>\n </ul>\n </p>\n <h4 xmlns:xqdoc="http://www.xqdoc.org/1.0">Return value</h4>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The format of the returned object is the following and contains\n the document id and revision.\n <pre>\n {\n   "ok":true,\n   "id":"DocID",\n   "rev":"1-764b9b11845fd0b73cfa0e61acc74ecf"\n }\n </pre>\n </p>\n',summary:"<p>  Creates or updates a document.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'},{name:"document",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A document</div>'}],returns:{type:"object()",description:"An object which specifies the document id and its new revision"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:DATABASE-NAME Invalid database name</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:DOCUMENT-MALFORMED Malformed document object</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>']},{isDocumented:!0,arity:4,name:"create-or-update-document",qname:"cloudant:create-or-update-document",signature:"($connection as anyURI, $database as string, $document as object(), $options as object()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Creates or updates a document.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">When creating a new document, the <code>_id</code> field must\n be specified.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>cloudant:create-or-update-document($connection, "db", "DocID",\n   {\n     "name":"Hannah",\n     "age":120,\n     "gender":"female",\n     "_id":"DocID"\n   }, {"database-owner": "username"})</pre>.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">When updating a document, the <code>_id</code> and the\n <code>_rev</code> field, which contains the last document revision,\n must be specified.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>cloudant:create-or-update-document($connection, "db", "DocID",\n   {\n     "name":"Hannah",\n     "age":40,\n     "gender":"female",\n     "_id":"DocID",\n     "_rev":"1-764b9b11845fd0b73cfa0e61acc74ecf"\n   }, {"database-owner": "username"})</pre>.\n </p>\n <h4 xmlns:xqdoc="http://www.xqdoc.org/1.0">Creating or updating a design document</h4>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">To create or update a design document the document id must\n start with <code>_design/</code>.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example, the following expression creates a design document\n <pre>cloudant:create-or-update-document($connection, "db",\n   {\n     "_id": "_design/DesDocID",\n     "views": {\n       "view1": {\n       "map":"function(doc){emit(doc.field, 1)}",\n       "reduce": "function(key, value, rereduce){return sum(values)}"\n       }\n     },\n     "indexes": {\n       "mysearch" : {\n         "analyzer": {"name": "portuguese", "stopwords":["foo", "bar, "baz"]},\n         "index": "function(doc){ ... }"\n       },\n     }\n   }, {"database-owner": "username"})\n </pre>.\n </p>\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:create-or-update-document($connection, "db",\n   {\n     "_id": "_design/DesDocID",\n     "_rev": "2-f29c836d0bedc4b4b95cfaa6d99e95df",\n     "views": {\n       "view1": {\n       "map":"function(doc){emit(doc.field, 1)}",\n       "reduce": "function(key, value, rereduce){return sum(values)}"\n       }\n     },\n     "indexes": {\n       "mysearch" : {\n         "analyzer": {"name": "portuguese", "stopwords":["foo", "bar, "baz"]},\n         "index": "function(doc){ ... }"\n       },\n     }\n   }, {"database-owner": "username"})\n </pre>.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n The meaning of the fields in the design document is the following:\n <ul>\n   <li>_id: document ID</li>\n   <li>_rev: document revision</li>\n   <li>views: object defining the views. Each field defines a different view.\n       The field name is the name of the view and has the following content:\n     <ul>\n       <li>map: view map function</li>\n       <li>reduce: view reduce function (optional)</li>\n     </ul>\n   </li>\n   <li>indexes: object defining the view indexes. Each field defines a different index.\n       The field name is the name of the index and has the following content:\n     <ul>\n       <li>analyzer: Name of the analyzer to be used or an object with the\n       following fields:\n         <ul>\n           <li>name: Name of the analyzer</li>\n           <li>stopwords: An array of stop words. Stop words are words that\n           should not be indexed.</li>\n         </ul>\n       </li>\n       <li>index: Function that handles the indexing</li>\n     </ul>\n   </li>\n </ul>\n </p>\n <h4 xmlns:xqdoc="http://www.xqdoc.org/1.0">Return value</h4>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The format of the returned object is the following and contains\n the document id and revision.\n <pre>\n {\n   "ok":true,\n   "id":"DocID",\n   "rev":"1-764b9b11845fd0b73cfa0e61acc74ecf"\n }\n </pre>\n </p>\n',summary:"<p>  Creates or updates a document.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'},{name:"document",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A document</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object specifying additional request options</div>'}],returns:{type:"object()",description:"An object which specifies the document id and its new revision"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:DATABASE-NAME Invalid database name</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:DOCUMENT-MALFORMED Malformed document object</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:OPTIONS Malformed options object</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>']},{isDocumented:!0,arity:2,name:"database-info-nondeterministic",qname:"cloudant:database-info-nondeterministic",signature:"($connection as anyURI, $database as string) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns information about a database.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as <a href="#database-info-2">database-info#2</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Returns information about a database.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'}],returns:{type:"object()",description:"An object describing the specified database"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>']},{isDocumented:!0,arity:3,name:"database-info-nondeterministic",qname:"cloudant:database-info-nondeterministic",signature:"($connection as anyURI, $database as string, $options as object()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns information about a database.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#database-info-3">database-info#3</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Returns information about a database.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a database name</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object specifying additional request options</div>'}],returns:{type:"object()",description:"An object describing the specified database"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:OPTIONS Malformed options object</xqdoc:error>']},{isDocumented:!0,arity:2,name:"database-info",qname:"cloudant:database-info",signature:"($connection as anyURI, $database as string) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns information about a database.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>cloudant:database-info($connection, "db")</pre>.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">An object with the following format is returned:\n <pre>\n {\n   "update_seq": "0-g1AAAADneJzLYWBg...",\n   "db_name": "db",\n   "purge_seq": 0,\n   "other": {\n     "data_size": 0\n   },\n   "doc_del_count": 0,\n   "doc_count": 0,\n   "disk_size": 316,\n   "disk_format_version": 5,\n   "compact_running": false,\n   "instance_start_time": "0"\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The fields have the following meaning:\n <ul>\n  <li>compact_running: set to true if the database compaction routine is\n  operating on this database.</li>\n  <li>db_name: the name of the database.</li>\n  <li>disk_format_version: the version of the physical format used for the data\n  when it is stored on disk.</li>\n  <li>disk_size: size in bytes of the data as stored on the disk. Views indexes\n  are not included in the calculation.</li>\n  <li>doc_count: a count of the documents in the specified database.</li>\n  <li>doc_del_count: number of deleted documents.</li>\n  <li>instance_start_time: always 0.</li>\n  <li>purge_seq: the number of purge operations on the database.</li>\n  <li>update_seq: the current number of updates to the database.</li>\n  <li>other: JSON object containing a data_size field.</li>\n </ul>\n </p>\n',summary:"<p>  Returns information about a database.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'}],returns:{type:"object()",description:"An object describing the specified database"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>']},{isDocumented:!0,arity:3,name:"database-info",qname:"cloudant:database-info",signature:"($connection as anyURI, $database as string, $options as object()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns information about a database.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function allows to specify an additional options object.\n The following options are supported:\n <ul>\n   <li>database-owner: specifies the database owner (string, default: connection user).</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>cloudant:database-info($connection, "db", {"database-owner": "username"})</pre>.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">An object with the following format is returned:\n <pre>\n {\n   "update_seq": "0-g1AAAADneJzLYWBg...",\n   "db_name": "db",\n   "purge_seq": 0,\n   "other": {\n     "data_size": 0\n   },\n   "doc_del_count": 0,\n   "doc_count": 0,\n   "disk_size": 316,\n   "disk_format_version": 5,\n   "compact_running": false,\n   "instance_start_time": "0"\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The fields have the following meaning:\n <ul>\n  <li>compact_running: set to true if the database compaction routine is\n  operating on this database.</li>\n  <li>db_name: the name of the database.</li>\n  <li>disk_format_version: the version of the physical format used for the data\n  when it is stored on disk.</li>\n  <li>disk_size: size in bytes of the data as stored on the disk. Views indexes\n  are not included in the calculation.</li>\n  <li>doc_count: a count of the documents in the specified database.</li>\n  <li>doc_del_count: number of deleted documents.</li>\n  <li>instance_start_time: always 0.</li>\n  <li>purge_seq: the number of purge operations on the database.</li>\n  <li>update_seq: the current number of updates to the database.</li>\n  <li>other: JSON object containing a data_size field.</li>\n </ul>\n </p>\n',summary:"<p>  Returns information about a database.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a database name</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object specifying additional request options</div>'}],returns:{type:"object()",description:"An object describing the specified database"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:OPTIONS Malformed options object</xqdoc:error>']},{isDocumented:!0,arity:5,name:"delete-attachment",qname:"cloudant:delete-attachment",signature:"($connection as anyURI, $database as string, $document-id as string, $document-rev as string, $attachment-name as string) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Deletes the specified attachment.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The latest document revision must be specified.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>cloudant:delete-attachment($connection, "db", "FishStew",\n   "8-7c4740b4dcf26683e941d6641c00c39d", "AttachmentName")</pre>.\n </p>\n <h4 xmlns:xqdoc="http://www.xqdoc.org/1.0">Deleting a design document attachment.</h4>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">To delete a design document attachment the document id must\n start with <code>_design/</code>.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>cloudant:delete-attachment($connection, "db", "_design/DesDocId",\n   "8-7c4740b4dcf26683e941d6641c00c39d",\n   "AttachmentName", "text/plain", "AttachmentContent")</pre>.\n </p>\n <h4 xmlns:xqdoc="http://www.xqdoc.org/1.0">Return value</h4>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The returned object reports the document id and its new\n revision, as follows:\n <pre>\n {\n   "id":"FishStew",\n   "ok":true,\n   "rev":"9-247bb19a41bfd9bfdaf5ee6e2e05be74"\n }\n </pre>\n </p>\n',summary:"<p>  Deletes the specified attachment.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'},{name:"document-id",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A document identifier</div>'},{name:"document-rev",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A document revision</div>'},{name:"attachment-name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the attachment</div>'}],returns:{type:"object()",description:"An object containing the document id and its new revision"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:DATABASE-NAME Invalid database name</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:ATTACHMENT-NOT-EXISTS Attachment does not exists</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:ATTACHMENT-TYPE Attachment type must be string, base64Binary or hexBinary</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>']},{isDocumented:!0,arity:6,name:"delete-attachment",qname:"cloudant:delete-attachment",signature:"($connection as anyURI, $database as string, $document-id as string, $document-rev as string, $attachment-name as string, $options as object()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Deletes the specified attachment.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The latest document revision must be specified.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function allows to specify an additional options object.\n The following options are supported:\n <ul>\n   <li>database-owner: specifies the database owner (string, default: connection user).</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>cloudant:delete-attachment($connection, "db", "FishStew",\n "8-7c4740b4dcf26683e941d6641c00c39d", "AttachmentName",\n {"database-owner": "username"})</pre>.\n </p>\n <h4 xmlns:xqdoc="http://www.xqdoc.org/1.0">Deleting a design document attachment.</h4>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">To delete a design document attachment the document id must\n start with <code>_design/</code>.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>cloudant:delete-attachment($connection, "db", "_design/DesDocId",\n   "8-7c4740b4dcf26683e941d6641c00c39d", "AttachmentName", "text/plain",\n   "AttachmentContent", {"database-owner": "username"})</pre>.\n </p>\n <h4 xmlns:xqdoc="http://www.xqdoc.org/1.0">Return value</h4>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The returned object reports the document id and its new\n revision, as follows:\n <pre>\n {\n   "id":"FishStew",\n   "ok":true,\n   "rev":"9-247bb19a41bfd9bfdaf5ee6e2e05be74"\n }\n </pre>\n </p>\n',summary:"<p>  Deletes the specified attachment.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'},{name:"document-id",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A document identifier</div>'},{name:"document-rev",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A document revision</div>'},{name:"attachment-name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the attachment</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object specifying additional request options</div>'}],returns:{type:"object()",description:"An object containing the document id and its new revision"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:DATABASE-NAME Invalid database name</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:ATTACHMENT-NOT-EXISTS Attachment does not exists</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:ATTACHMENT-TYPE Attachment type must be string, base64Binary or hexBinary</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:OPTIONS Malformed options object</xqdoc:error>']},{isDocumented:!0,arity:2,name:"delete-database",qname:"cloudant:delete-database",signature:"($connection as anyURI, $database as string) as empty-sequence()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Deletes a database and all the documents and attachments contained in it.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The database name must be composed of one or more of the following characters:\n <ul>\n  <li>Lowercase characters (a-z).</li>\n  <li>Digits (0-9).</li>\n  <li>Any of the characters: _,$,(,),+,- and /.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>cloudant:delete-database($connection, "db")</pre>.\n </p>\n',summary:"<p>  Deletes a database and all the documents and attachments contained in it.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'}],returns:{type:"empty-sequence()",description:"Empty sequence"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:DATABASE-NAME Invalid database name</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:DATABASE-NOT-EXISTS Database does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>']},{isDocumented:!0,arity:4,name:"delete-document",qname:"cloudant:delete-document",signature:"($connection as anyURI, $database as string, $document-id as string, $document-rev as string) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Deletes the specified document from a database.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The latest document revision must be specified.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>\n cloudant:delete-document($connection, "db", "DocID", "3-7c4740b4dcf26683e941d6641c00c39d")\n </pre>.\n </p>\n <h4 xmlns:xqdoc="http://www.xqdoc.org/1.0">Deleting a design document</h4>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">To delete a design document the document id must\n start with <code>_design/</code>.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>\n cloudant:delete-document($connection, "db", "_design/DesDocID", "3-7c4740b4dcf26683e941d6641c00c39d")\n </pre>.\n </p>\n <h4 xmlns:xqdoc="http://www.xqdoc.org/1.0">Return value</h4>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The returned object reports the document id and its\n new revision, as follows:\n <pre>\n {\n   "id":"DocID",\n   "ok":true,\n   "rev":"4-2719fd41187c60762ff584761b714cfb"\n }\n </pre>\n </p>\n',summary:"<p>  Deletes the specified document from a database.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'},{name:"document-id",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A document identifier</div>'},{name:"document-rev",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A document revision</div>'}],returns:{type:"object()",description:"An object which specifies the document id and its new revision"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:DATABASE-NAME Invalid database name</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:REVISION Specified revision is missing, invalid or not the latest.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>']},{isDocumented:!0,arity:5,name:"delete-document",qname:"cloudant:delete-document",signature:"($connection as anyURI, $database as string, $document-id as string, $document-rev as string, $options as object()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Deletes the specified document from a database.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The latest document revision must be specified.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function allows to specify an additional options object.\n The following options are supported:\n <ul>\n   <li>database-owner: specifies the database owner (string, default: connection user).</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>\n cloudant:delete-document($connection, "db", "DocID", "3-7c4740b4dcf26683e941d6641c00c39d",\n   {"database-owner": "username"})\n </pre>.\n </p>\n <h4 xmlns:xqdoc="http://www.xqdoc.org/1.0">Deleting a design document</h4>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">To delete a design document the document id must\n start with <code>_design/</code>.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>\n cloudant:delete-document($connection, "db", "_design/DesDocID", "3-7c4740b4dcf26683e941d6641c00c39d",\n   {"database-owner": "username"})\n </pre>.\n </p>\n <h4 xmlns:xqdoc="http://www.xqdoc.org/1.0">Return value</h4>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The returned object reports the document id and its\n new revision, as follows:\n <pre>\n {\n   "id":"DocID",\n   "ok":true,\n   "rev":"4-2719fd41187c60762ff584761b714cfb"\n }\n </pre>\n </p>\n',summary:"<p>  Deletes the specified document from a database.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'},{name:"document-id",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A document identifier</div>'},{name:"document-rev",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A document revision</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object specifying additional request options</div>'}],returns:{type:"object()",description:"An object which specifies the document id and its new revision"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:DATABASE-NAME Invalid database name</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:REVISION Specified revision is missing, invalid or not the latest.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:OPTIONS Malformed options object</xqdoc:error>']},{isDocumented:!0,arity:3,name:"document-info-nondeterministic",qname:"cloudant:document-info-nondeterministic",signature:"($connection as anyURI, $database as string, $document-id as string) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the latest revision and size for a given document.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#document-info-3">document-info#3</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Returns the latest revision and size for a given document.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'},{name:"document-id",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A document identifier</div>'}],returns:{type:"object()",description:"An object specifying the document id, revision and size"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:DOCUMENT The specified document or revision cannot be found</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>']},{isDocumented:!0,arity:4,name:"document-info-nondeterministic",qname:"cloudant:document-info-nondeterministic",signature:"($connection as anyURI, $database as string, $document-id as string, $options as object()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the latest revision and size for a given document.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#document-info-4">document-info#4</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Returns the latest revision and size for a given document.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'},{name:"document-id",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A document identifier</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object specifying additional request options</div>'}],returns:{type:"object()",description:"An object specifying the document id, revision and size"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:DOCUMENT The specified document or revision cannot be found</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:OPTIONS Malformed options object</xqdoc:error>']},{isDocumented:!0,arity:3,name:"document-info",qname:"cloudant:document-info",signature:"($connection as anyURI, $database as string, $document-id as string) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the latest revision and size for a given document.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>cloudant:document-info($connection, "db", "DocID")</pre>.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The format of the returned object is the following and contains\n the document id, latest revision and size.\n <pre>\n {\n   "ok": true,\n   "id": "DocID",\n   "rev": "1-764b9b11845fd0b73cfa0e61acc74ecf",\n   "size": 500\n }\n </pre>\n </p>\n <h4 xmlns:xqdoc="http://www.xqdoc.org/1.0">Returning the latest revision and size for a given design document</h4>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">To return the latest revision and size of a design document the document\n id must start with\n <code>_design/</code>.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>cloudant:document-info($connection, "db", "_design/DesDocID")</pre>.\n </p>\n',summary:"<p>  Returns the latest revision and size for a given document.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'},{name:"document-id",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A document identifier</div>'}],returns:{type:"object()",description:"An object specifying the document id, revision and size"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:DOCUMENT The specified document or revision cannot be found</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>']},{isDocumented:!0,arity:4,name:"document-info",qname:"cloudant:document-info",signature:"($connection as anyURI, $database as string, $document-id as string, $options as object()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the latest revision and size for a given document.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function allows to specify an additional options object.\n The following options are supported:\n <ul>\n   <li>database-owner: specifies the database owner (string, default: connection user).</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>\n cloudant:document-info($connection, "db", "DocID", {"database-owner": "username"})\n </pre>.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The format of the returned object is the following and contains\n the document id, latest revision and size.\n <pre>\n {\n   "ok": true,\n   "id": "DocID",\n   "rev": "1-764b9b11845fd0b73cfa0e61acc74ecf",\n   "size": 500\n }\n </pre>\n </p>\n <h4 xmlns:xqdoc="http://www.xqdoc.org/1.0">Returning the latest revision and size for a given design document</h4>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">To return the latest revision and size of a design document the document\n id must start with <code>_design/</code>.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>\n cloudant:document-info($connection, "db", "_design/DesDocID", {"database-owner": "username"})\n </pre>.\n </p>\n',summary:"<p>  Returns the latest revision and size for a given document.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'},{name:"document-id",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A document identifier</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object specifying additional request options</div>'}],returns:{type:"object()",description:"An object specifying the document id, revision and size"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:DOCUMENT The specified document or revision cannot be found</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:OPTIONS Malformed options object</xqdoc:error>']},{isDocumented:!0,arity:3,name:"document-nondeterministic",qname:"cloudant:document-nondeterministic",signature:"($connection as anyURI, $database as string, $document-id as string) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves a document from the specified database.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as <a href="#document-3">document#3</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Retrieves a document from the specified database.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'},{name:"document-id",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A document identifier</div>'}],returns:{type:"object()",description:"The specified document"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:DATABASE-NAME Invalid database name</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:DOCUMENT The specified document or revision cannot be found</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>']},{isDocumented:!0,arity:4,name:"document-nondeterministic",qname:"cloudant:document-nondeterministic",signature:"($connection as anyURI, $database as string, $document-id as string, $options as object()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves a document from the specified database</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as <a href="#document-4">document#4</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Retrieves a document from the specified database \n  This function has the same semantics as  document#4 ,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'},{name:"document-id",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A document identifier</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object specifying additional request options</div>'}],returns:{type:"object()",description:"The specified document"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:DATABASE-NAME Invalid database name</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:DOCUMENT The specified document or revision cannot be found</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:OPTIONS Malformed options object</xqdoc:error>']},{isDocumented:!0,arity:3,name:"document",qname:"cloudant:document",signature:"($connection as anyURI, $database as string, $document-id as string) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves a document from the specified database.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The latest revision of the document will be returned.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If the document includes attachments, then the\n returned structure will contain a summary of the\n attachments associated with the document, but not the\n attachment data itself.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>cloudant:document($connection, "db", "DocID")</pre>.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The returned JSON object will contain the document\n and has the following format:\n <pre>\n {\n   "_id": "DocID",\n   "_rev": "2-f29c836d0bedc4b4b95cfaa6d99e95df",\n   "name": "Anna",\n   "age": 89,\n   "gender": "female",\n   "_attachments": {\n     "my attachment": {\n       "content_type": "application/json; charset=UTF-8",\n       "revpos": 2,\n       "digest": "md5-37IZysiyWLRWx31J/1WQHw==",\n       "length": 12,\n       "stub": true\n       }\n     }\n   }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n The meaning of the fields in the returned object is the following:\n <ul>\n   <li>_id: document ID</li>\n   <li>_rev: document revision</li>\n   <li>attachments: document attachments (optional), each field denotes the name\n       of a different attachment\n     <ul>\n       <li>content_type: attachment MIME Content type string</li>\n       <li>length: attachment length in bytes</li>\n       <li>revpos: revision where this attachment exists</li>\n       <li>digest: MD5 checksum of the attachment</li>\n       <li>stub: indicates whether the attachment is a stub</li>\n    </ul>\n  </li>\n </ul>\n </p>\n <h4 xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieving a design document from the specified database</h4>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">To retrieve a design document the document id must start with\n <code>_design/</code>.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>cloudant:document($connection, "db", "_design/DesDocID")</pre>.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">A JSON object with the following format is returned:\n <pre>\n {\n  "_id": "_design/DesDocID",\n   "views": {\n     "view1": {\n       "map":"function(doc){emit(doc.field, 1)}",\n       "reduce": "function(key, value, rereduce){return sum(values)}"\n     }\n   },\n   "indexes": {\n     "mysearch" : {\n       "analyzer": {"name": "portuguese", "stopwords":["foo", "bar, "baz"]},\n       "index": "function(doc){ ... }"\n     },\n   }\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n The meaning of the fields in the returned object is the following:\n <ul>\n   <li>_id: document ID</li>\n   <li>_rev: document revision</li>\n   <li>views: object defining the views. Each field defines a different view.\n       The field name is the name of the view and has the following content:\n     <ul>\n       <li>map: view map function</li>\n       <li>reduce: view reduce function (optional)</li>\n     </ul>\n   </li>\n   <li>indexes: object defining the view indexes. Each field defines a different index.\n       The field name is the name of the index and has the following content:\n     <ul>\n       <li>analyzer: Name of the analyzer to be used or an object with the\n       following fields:\n         <ul>\n           <li>name: Name of the analyzer</li>\n           <li>stopwords: An array of stop words. Stop words are words that\n           should not be indexed.</li>\n         </ul>\n       </li>\n       <li>index: Function that handles the indexing</li>\n     </ul>\n   </li>\n </ul>\n </p>\n',summary:"<p>  Retrieves a document from the specified database.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'},{name:"document-id",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A document identifier</div>'}],returns:{type:"object()",description:"The specified document"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:DATABASE-NAME Invalid database name</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:DOCUMENT The specified document or revision cannot be found</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>']},{isDocumented:!0,arity:4,name:"document",qname:"cloudant:document",signature:"($connection as anyURI, $database as string, $document-id as string, $options as object()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves a document from the specified database</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Unless you request a specific revision, the latest\n revision of the document will always be returned.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function allows to specify an additional options object.\n The following options are supported:\n <ul>\n   <li>conflict: returns the conflict tree for the document (boolean)</li>\n   <li>rev: specifies the revision to return (string)</li>\n   <li>revs: return a list of the revisions for the document (boolean)</li>\n   <li>revs_info: return a list of detailed revision information for the document\n   (boolean, allowed value: true)</li>\n   <li>database-owner: specifies the database owner (string, default: connection user).</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If the document includes attachments, then the\n returned structure will contain a summary of the\n attachments associated with the document, but not the\n attachment data itself.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>\n cloudant:document($connection, "db", "DocID", {"database-owner": "username"})\n </pre>.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The returned JSON object will contain the document\n and has the following format:\n <pre>\n {\n   "_id": "DocID",\n   "_rev": "2-f29c836d0bedc4b4b95cfaa6d99e95df",\n   "name": "Anna",\n   "age": 89,\n   "gender": "female",\n   "_attachments": {\n     "my attachment": {\n       "content_type": "application/json; charset=UTF-8",\n       "revpos": 2,\n       "digest": "md5-37IZysiyWLRWx31J/1WQHw==",\n       "length": 12,\n       "stub": true\n       }\n     }\n   }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n The meaning of the fields in the returned object is the following:\n <ul>\n   <li>_id: document ID</li>\n   <li>_rev: document revision</li>\n   <li>attachments: document attachments (optional), each field denotes the name\n       of a different attachment:\n   <ul>\n     <li>content_type: attachment MIME Content type string</li>\n     <li>length: attachment length in bytes</li>\n     <li>revpos: revision where this attachment exists</li>\n     <li>digest: MD5 checksum of the attachment</li>\n     <li>stub: indicates whether the attachment is a stub</li>\n  </ul>\n  </li>\n </ul>\n </p>\n <h4 xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieving a design document from the specified database</h4>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">To retrieve a design document the document id must start with\n <code>_design/</code>.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>cloudant:document($connection, "db", "_design/DesDocID", {"database-owner": "username"})</pre>.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">A JSON object with the following format is returned:\n <pre>\n {\n  "_id": "_design/DesDocID",\n  "_rev": "2-f29c836d0bedc4b4b95cfaa6d99e95df",\n   "views": {\n     "view1": {\n       "map":"function(doc){emit(doc.field, 1)}",\n       "reduce": "function(key, value, rereduce){return sum(values)}"\n     }\n   },\n   "indexes": {\n     "mysearch" : {\n       "analyzer": {"name": "portuguese", "stopwords":["foo", "bar, "baz"]},\n       "index": "function(doc){ ... }"\n     },\n   }\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n The meaning of the fields in the returned object is the following:\n <ul>\n   <li>_id: document ID</li>\n   <li>_rev: document revision</li>\n   <li>views: object defining the views. Each field defines a different view.\n       The field name is the name of the view and has the following content:\n     <ul>\n       <li>map: view map function</li>\n       <li>reduce: view reduce function (optional)</li>\n     </ul>\n   </li>\n   <li>indexes: object defining the view indexes. Each field defines a different index.\n       The field name is the name of the index and has the following content:\n     <ul>\n       <li>analyzer: Name of the analyzer to be used or an object with the\n       following fields:\n         <ul>\n           <li>name: Name of the analyzer</li>\n           <li>stopwords: An array of stop words. Stop words are words that\n           should not be indexed.</li>\n         </ul>\n       </li>\n       <li>index: Function that handles the indexing</li>\n     </ul>\n   </li>\n </ul>\n </p>\n <h4 xmlns:xqdoc="http://www.xqdoc.org/1.0">Getting a List of Revisions</h4>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">You can obtain a list of the revisions for a given document\n by the revs option.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>cloudant:document($connection, "db", "DocID", {"revs": true})</pre>.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The returned JSON object includes the original document and\n a <code>_revisions</code> structure that includes the revision\n information:\n <pre>\n {\n   "servings":4,\n   "subtitle":"Delicious with a green salad",\n   "_id":"FishStew",\n   "title":"Irish Fish Stew",\n   "_revisions":\n   {\n     "ids": [\n       "a1a9b39ee3cc39181b796a69cb48521c",\n       "7c4740b4dcf26683e941d6641c00c39d",\n       "9c65296036141e575d32ba9c034dd3ee"\n      ],\n     "start":3\n  },\n  "_rev":"3-a1a9b39ee3cc39181b796a69cb48521c"\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The meaning of the additional fields is the following:\n <ul>\n   <li>_revisions: document revisions</li>\n   <li>_ids: array of valid revision IDs, in reverse order (latest first)</li>\n   <li>start: prefix number for the latest revision</li>\n </ul>\n </p>\n <h4 xmlns:xqdoc="http://www.xqdoc.org/1.0">Obtaining an Extended Revision History</h4>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">You can get additional information about the revisions for a given document\n with the <code>revs_info</code> option.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>cloudant:document($connection, "db", "DocID", {"revs_info": true})</pre>.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This returns extended revision information, including the availability and status\n of each revision:\n <pre>\n {\n   "servings":4,\n   "subtitle":"Delicious with a green salad",\n   "_id":"FishStew",\n   "_revs_info":[\n     {\n       "status":"available",\n       "rev":"3-a1a9b39ee3cc39181b796a69cb48521c"\n     },\n     {\n       "status":"available",\n       "rev":"2-7c4740b4dcf26683e941d6641c00c39d"\n     },\n     {\n       "status":"available",\n       "rev":"1-9c65296036141e575d32ba9c034dd3ee"\n     }\n   ],\n   "title":"Irish Fish Stew",\n   "_rev":"3-a1a9b39ee3cc39181b796a69cb48521c"\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The meaning of the additional fields is the following:\n <ul>\n   <li>_revs_info: document extended revision info</li>\n   <li>rev: revision ID</li>\n   <li>status: revision status</li>\n </ul>\n </p>\n',summary:"<p>  Retrieves a document from the specified database \n  This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'},{name:"document-id",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A document identifier</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object specifying additional request options</div>'}],returns:{type:"object()",description:"The specified document"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:DATABASE-NAME Invalid database name</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:DOCUMENT The specified document or revision cannot be found</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:OPTIONS Malformed options object</xqdoc:error>']},{isDocumented:!0,arity:1,name:"list-databases-nondeterministic",qname:"cloudant:list-databases-nondeterministic",signature:"($connection as anyURI) as array()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns an array containing the names of all the user\'s databases.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#list-databases-1">list-databases#1</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Returns an array containing the names of all the user's databases.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'}],returns:{type:"array()",description:"An array of all the database names"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>']},{isDocumented:!0,arity:2,name:"list-databases-nondeterministic",qname:"cloudant:list-databases-nondeterministic",signature:"($connection as anyURI, $options as object()) as array()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns an array containing the names of all the user\'s databases.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#list-databases-2">list-databases#2</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Returns an array containing the names of all the user's databases.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object specifying additional request options</div>'}],returns:{type:"array()",description:"An array of all the databases names"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:OPTIONS Malformed options object</xqdoc:error>']},{isDocumented:!0,arity:1,name:"list-databases",qname:"cloudant:list-databases",signature:"($connection as anyURI) as array()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns an array containing the names of all the user\'s databases.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>cloudant:list-databases($connection)</pre>.\n </p>\n',summary:"<p>  Returns an array containing the names of all the user's databases.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'}],returns:{type:"array()",description:"An array of all the database names"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>']},{isDocumented:!0,arity:2,name:"list-databases",qname:"cloudant:list-databases",signature:"($connection as anyURI, $options as object()) as array()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns an array containing the names of all the user\'s databases.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function allows to specify an additional options object.\n The following options are supported:\n <ul>\n   <li>database-owner: specifies the database owner (string, default: connection user).</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>cloudant:list-databases($connection, {"database-owner" : "username"})</pre>.\n </p>\n',summary:"<p>  Returns an array containing the names of all the user's databases.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object specifying additional request options</div>'}],returns:{type:"array()",description:"An array of all the databases names"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:OPTIONS Malformed options object</xqdoc:error>']},{isDocumented:!0,arity:5,name:"lucene-query-nondeterministic",qname:"cloudant:lucene-query-nondeterministic",signature:"($connection as anyURI, $database as string, $design-document as string, $index as string, $query as string) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Executes a Lucene query against a view and returns the query result.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#lucene-query-5">lucene-query#5</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Executes a Lucene query against a view and returns the query result.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'},{name:"design-document",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A design document name</div>'},{name:"index",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An index name</div>'},{name:"query",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A Lucene query</div>'}],returns:{type:"object()",description:"The Lucene query results"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>']},{isDocumented:!0,arity:6,name:"lucene-query-nondeterministic",qname:"cloudant:lucene-query-nondeterministic",signature:"($connection as anyURI, $database as string, $design-document as string, $index as string, $query as string, $options as object()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Executes a Lucene query against a view and returns the query result.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as <a href="#lucene-query-6">lucene-query#6</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Executes a Lucene query against a view and returns the query result.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'},{name:"design-document",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A design document name</div>'},{name:"index",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An index name</div>'},{name:"query",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A Lucene query</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object specifying additional request options</div>'}],returns:{type:"object()",description:"The Lucene query results"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:OPTIONS Malformed options object</xqdoc:error>']},{isDocumented:!0,arity:5,name:"lucene-query",qname:"cloudant:lucene-query",signature:"($connection as anyURI, $database as string, $design-document as string, $index as string, $query as string) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Executes a Lucene query against a view and returns the query result.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This method searches for documents whose index fields match the Lucene query.\n Which fields of a document are indexed and how is determined by the index functions\n in the design document.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The information is returned as a JSON structure containing meta information\n about the return structure, and the list of documents each with its ID, revision\n and key. The key is generated from the document ID.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>cloudant:lucene-query($connection, "db", "designdoc", "view", "a*")</pre>.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">An object with the following format is returned:\n <pre>\n {\n   "total_rows": 3,\n   "bookmark": "g1AAAACWeJzLYWBgYMpgTmFQSElKzi9KdUhJMtbLTS3KLElMT9VLzskvTUnMK9HLSy3JAalMcgCSSfX____PAvPdQHwQSGTIIt6UPBaQlgNA6j_CJPsPcJOyANNEKzY",\n   "rows":\n   [\n     {\n       "id": "dd828eb4-c3f1-470f-aeff-c375ef70e4ad",\n       "order": [0.0, 1],\n       "fields":\n       {\n         "default": "aa",\n         "foo": 0.0\n       }\n     },\n     {\n       "id": "ea522cf1-eb8e-4477-aa92-d1fa459bb216",\n       "order": [1.0, 0],\n       "fields":\n       {\n         "default": "ab",\n         "foo": 1.0\n       }\n     },\n     {\n       "id": "c838baed-d573-43ea-9c34-621cf0f13301",\n       "order": [2.0, 0],\n       "fields":\n       {\n         "default": "ac",\n         "foo": 2.0\n       }\n     }\n   ]\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The fields have the following meaning:\n <ul>\n  <li>total_rows: number of results returned.</li>\n  <li>bookmark: string to be submitted in the next query to page through results.\n      If this response contained no results, the bookmark will be the same as the\n      one used to obtain this response.</li>\n  <li>rows: array of document objects, each document contains the following fields:\n    <ul>\n      <li>order: specifies the order with regard to the indexed fields.</li>\n      <li>fields: Object containing other search indexes.</li>\n    </ul>\n  </li>\n </ul>\n </p>\n',summary:"<p>  Executes a Lucene query against a view and returns the query result.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'},{name:"design-document",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A design document name</div>'},{name:"index",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An index name</div>'},{name:"query",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A Lucene query</div>'}],returns:{type:"object()",description:"The Lucene query results"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>']},{isDocumented:!0,arity:6,name:"lucene-query",qname:"cloudant:lucene-query",signature:"($connection as anyURI, $database as string, $design-document as string, $index as string, $query as string, $options as object()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Executes a Lucene query against a view and returns the query result.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This method searches for documents whose index fields match the Lucene query.\n Which fields of a document are indexed and how is determined by the index functions\n in the design document.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function allows to specify an additional options object.\n The following options are supported:\n <ul>\n   <li>bookmark: A bookmark that was received from a previous search. This\n   allows you to page through the results. If there are no more results after\n   the bookmark, you will get a response with an empty rows array and the\n   same bookmark. That way you can determine that you have reached the end\n   of the result list (string).</li>\n   <li>stale: allow the results from a stale view to be used (string, allowed\n   value: "ok").</li>\n   <li>limit: limit the number of the returned documents to the specified\n   number (numeric).</li>\n   <li>include_docs: include the full content of the documents in the return\n   (boolean, default: false).</li>\n   <li>sort: specifies the sort order of the results. A JSON string of the\n   form <code>"fieldname&lt;type&gt;"</code> or <code>-fieldname&lt;type&gt;</code>\n   for descending order, where fieldname is the name of a string or number field\n   and type is either number or string. The type part is optional and defaults\n   to number. Some examples are <code>"foo"</code>, <code>"-foo"</code>,\n   <code>"bar&lt;string&gt;"</code>, <code>"-foo&lt;number&gt;"</code>. String\n   fields used for sorting must not be analyzed fields. The field(s) used for\n   sorting must be indexed by the same indexer used for the search query.\n   Alternatively, a JSON array of such strings is allowed.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The information is returned as a JSON structure containing meta information\n about the return structure, and the list of documents each with its ID, revision\n and key. The key is generated from the document ID.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>cloudant:lucene-query($connection, "db", "designdoc", "view", "a*",\n {"database-owner": "username"})</pre>.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">An object with the following format is returned:\n <pre>\n {\n   "total_rows": 3,\n   "bookmark": "g1AAAACWeJzLYWBgYMpgTmFQSElKzi9KdUhJMtbLTS3KLElMT9VLzskvTUnMK9HLSy3JAalMcgCSSfX____PAvPdQHwQSGTIIt6UPBaQlgNA6j_CJPsPcJOyANNEKzY",\n   "rows":\n   [\n     {\n       "id": "dd828eb4-c3f1-470f-aeff-c375ef70e4ad",\n       "order": [0.0, 1],\n       "fields":\n       {\n         "default": "aa",\n         "foo": 0.0\n       }\n     },\n     {\n       "id": "ea522cf1-eb8e-4477-aa92-d1fa459bb216",\n       "order": [1.0, 0],\n       "fields":\n       {\n         "default": "ab",\n         "foo": 1.0\n       }\n     },\n     {\n       "id": "c838baed-d573-43ea-9c34-621cf0f13301",\n       "order": [2.0, 0],\n       "fields":\n       {\n         "default": "ac",\n         "foo": 2.0\n       }\n     }\n   ]\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The fields have the following meaning:\n <ul>\n  <li>total_rows: number of results returned.</li>\n  <li>bookmark: string to be submitted in the next query to page through results.\n      If this response contained no results, the bookmark will be the same as the\n      one used to obtain this response.</li>\n  <li>rows: array of document objects, each document contains the following fields:\n    <ul>\n      <li>order: specifies the order with regard to the indexed fields.</li>\n      <li>fields: Object containing other search indexes.</li>\n    </ul>\n  </li>\n </ul>\n </p>\n',summary:"<p>  Executes a Lucene query against a view and returns the query result.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'},{name:"design-document",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A design document name</div>'},{name:"index",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An index name</div>'},{name:"query",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A Lucene query</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object specifying additional request options</div>'}],returns:{type:"object()",description:"The Lucene query results"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:OPTIONS Malformed options object</xqdoc:error>']},{isDocumented:!0,arity:3,name:"multiple-documents-nondeterministic",qname:"cloudant:multiple-documents-nondeterministic",signature:"($connection as anyURI, $database as string, $keys as string*) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">List the specified documents in a given database.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#multiple-documents-3">multiple-documents#3</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  List the specified documents in a given database.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'},{name:"keys",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The keys of the documents which must be retrieved</div>'}],returns:{type:"object()",description:"An object listing the specified documents in the specified database"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>']},{isDocumented:!0,arity:4,name:"multiple-documents-nondeterministic",qname:"cloudant:multiple-documents-nondeterministic",signature:"($connection as anyURI, $database as string, $keys as string*, $options as object()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Lists the specified documents in a given database.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#multiple-documents-4">multiple-documents#4</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Lists the specified documents in a given database.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'},{name:"keys",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The keys of the documents which must be retrieved</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object specifying additional request options</div>'}],returns:{type:"object()",description:"An object listing the specified documents in the specified database"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:OPTIONS Malformed options object</xqdoc:error>']},{isDocumented:!0,arity:3,name:"multiple-documents",qname:"cloudant:multiple-documents",signature:"($connection as anyURI, $database as string, $keys as string*) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">List the specified documents in a given database.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The information is returned as a JSON structure containing meta information\n about the return structure, and the list of documents each with its ID, revision\n and key. The key is generated from the document ID.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>cloudant:multiple-documents($connection, "db",\n   ("5a049246-179f-42ad-87ac-8f080426c17c",\n    "d1f61e66-7708-4da6-aa05-7cbc33b44b7e",\n    "96f898f0-f6ff-4a9b-aac4-503992f31b01"))</pre>.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">An object with the following format is returned:\n <pre>\n {\n   "total_rows":3,\n   "offset":0,\n   "rows":[\n   {\n     "id":"5a049246-179f-42ad-87ac-8f080426c17c",\n     "key":"5a049246-179f-42ad-87ac-8f080426c17c",\n     "value":\n     {\n       "rev":"2-9d5401898196997853b5ac4163857a29"\n     }\n   },\n   {\n     "id":"96f898f0-f6ff-4a9b-aac4-503992f31b01",\n     "key":"96f898f0-f6ff-4a9b-aac4-503992f31b01",\n     "value":\n     {\n       "rev":"2-ff7b85665c4c297838963c80ecf481a3"\n      }\n   },\n   {\n     "id":"d1f61e66-7708-4da6-aa05-7cbc33b44b7e",\n     "key":"d1f61e66-7708-4da6-aa05-7cbc33b44b7e",\n     "value":\n     {\n       "rev":"2-cbdef49ef3ddc127eff86350844a6108"\n     }\n   }]\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The fields have the following meaning:\n <ul>\n  <li>offset: offset where the document list started.</li>\n  <li>rows: array of document objects, each containing id, key and revision number.</li>\n  <li>total_rows: number of documents in the database.</li>\n  <li>update_seq: current update sequence database.</li>\n </ul>\n </p>\n',summary:"<p>  List the specified documents in a given database.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'},{name:"keys",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The keys of the documents which must be retrieved</div>'}],returns:{type:"object()",description:"An object listing the specified documents in the specified database"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>']},{isDocumented:!0,arity:4,name:"multiple-documents",qname:"cloudant:multiple-documents",signature:"($connection as anyURI, $database as string, $keys as string*, $options as object()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Lists the specified documents in a given database.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The information is returned as a JSON structure containing meta information\n about the return structure, and the list of documents each with its ID, revision\n and key. The key is generated from the document ID.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function allows to specify an additional options object.\n The following options are supported:\n <ul>\n   <li>descending: return the documents in descending by key order (boolean,\n   default: false).</li>\n   <li>endkey: stop returning records when the specified key is reached (string).</li>\n   <li>endkey_docid: stop returning records when the specified document ID is\n   reached (string).</li>\n   <li>group: group the results using the reduce function to a group or single\n   row (boolean, default: false).</li>\n   <li>group_level: specify the group level to be used (numeric).</li>\n   <li>include_docs: include the full content of the documents in the return\n   (boolean, default: false).</li>\n   <li>inclusive_end: specifies whether the specified end key should be included\n   in the result (boolean, default: true).</li>\n   <li>key: return only documents that match the specified key (string).</li>\n   <li>limit: limit the number of the returned documents to the specified number\n   (numeric).</li>\n   <li>reduce: use the reduction function (boolean, default: true).</li>\n   <li>skip: skip this number of records before starting to return the results\n   (numeric, default: 0).</li>\n   <li>stale: allow the results from a stale view to be used (string, allowed\n   value: "ok").</li>\n   <li>startkey: start returning records when the specified key is reached\n   (string).</li>\n   <li>startkey_docid: start returning records when the specified document ID\n   is reached (string).</li>\n   <li>database-owner: specifies the database owner (string, default: connection\n   user).</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>cloudant:multiple-documents($connection, "db",\n   ("5a049246-179f-42ad-87ac-8f080426c17c",\n    "d1f61e66-7708-4da6-aa05-7cbc33b44b7e",\n    "96f898f0-f6ff-4a9b-aac4-503992f31b01"),\n   {"database-owner": "username"})</pre>.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">An object with the following format is returned:\n <pre>\n {\n   "total_rows":3,\n   "offset":0,\n   "rows":[\n   {\n     "id":"5a049246-179f-42ad-87ac-8f080426c17c",\n     "key":"5a049246-179f-42ad-87ac-8f080426c17c",\n     "value":\n     {\n       "rev":"2-9d5401898196997853b5ac4163857a29"\n     }\n   },\n   {\n     "id":"96f898f0-f6ff-4a9b-aac4-503992f31b01",\n     "key":"96f898f0-f6ff-4a9b-aac4-503992f31b01",\n     "value":\n     {\n       "rev":"2-ff7b85665c4c297838963c80ecf481a3"\n      }\n   },\n   {\n     "id":"d1f61e66-7708-4da6-aa05-7cbc33b44b7e",\n     "key":"d1f61e66-7708-4da6-aa05-7cbc33b44b7e",\n     "value":\n     {\n       "rev":"2-cbdef49ef3ddc127eff86350844a6108"\n     }\n   }]\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The fields have the following meaning:\n <ul>\n  <li>offset: offset where the document list started.</li>\n  <li>rows: array of document objects, each containing id, key and revision number.</li>\n  <li>total_rows: number of documents in the database.</li>\n  <li>update_seq: current update sequence database.</li>\n </ul>\n </p>\n',summary:"<p>  Lists the specified documents in a given database.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'},{name:"keys",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The keys of the documents which must be retrieved</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object specifying additional request options</div>'}],returns:{type:"object()",description:"An object listing the specified documents in the specified database"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:OPTIONS Malformed options object</xqdoc:error>']},{isDocumented:!0,arity:5,name:"multiple-view-documents-nondeterministic",qname:"cloudant:multiple-view-documents-nondeterministic",signature:"($connection as anyURI, $database as string, $design-document as string, $view as string, $keys as string*) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">List the specified documents in a given view.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#multiple-view-documents-5">multiple-view-documents#5</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  List the specified documents in a given view.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'},{name:"design-document",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A design document name</div>'},{name:"view",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A view name</div>'},{name:"keys",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The keys of the documents which must be retrieved</div>'}],returns:{type:"object()",description:"An object listing all the specified documents in the specified view"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>']},{isDocumented:!0,arity:6,name:"multiple-view-documents-nondeterministic",qname:"cloudant:multiple-view-documents-nondeterministic",signature:"($connection as anyURI, $database as string, $design-document as string, $view as string, $keys as string*, $options as object()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Lists the specified documents in a given view.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#multiple-view-documents-6">multiple-view-documents#6</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p>  Lists the specified documents in a given view.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'},{name:"design-document",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A design document name</div>'},{name:"view",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A view name</div>'},{name:"keys",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The keys of the documents which must be retrieved</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object specifying additional request options</div>'}],returns:{type:"object()",description:"An object listing all the specified documents in the specified view"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:OPTIONS Malformed options object</xqdoc:error>']},{isDocumented:!0,arity:5,name:"multiple-view-documents",qname:"cloudant:multiple-view-documents",signature:"($connection as anyURI, $database as string, $design-document as string, $view as string, $keys as string*) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">List the specified documents in a given view.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The information is returned as a JSON structure containing meta information\n about the return structure, and the list of documents each with its ID, revision\n and key. The key is generated from the document ID.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>cloudant:multiple-view-documents($connection, "db", "recipes", "by_ingredient",\n ("claret", "clear apple juice"))\n </pre>.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">An object with the following format is returned:\n <pre>\n {\n   "total_rows" : 26484,\n   "rows" : [\n     {\n       "value" : ["Scotch collops"]],\n       "id" : "Scotchcollops",\n       "key" : "claret"\n     },\n     {\n       "value" : ["Stand pie"],\n       "id" : "Standpie",\n       "key" : "clear apple juice"\n     }\n   ],\n   "offset" : 6324\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The fields have the following meaning:\n <ul>\n  <li>offset: offset where the document list started.</li>\n  <li>rows: array of document objects, each containing id, key and revision\n  number.</li>\n  <li>total_rows: number of documents in the database.</li>\n  <li>update_seq: current update sequence database.</li>\n </ul>\n </p>\n',summary:"<p>  List the specified documents in a given view.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'},{name:"design-document",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A design document name</div>'},{name:"view",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A view name</div>'},{name:"keys",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The keys of the documents which must be retrieved</div>'}],returns:{type:"object()",description:"An object listing all the specified documents in the specified view"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>']},{isDocumented:!0,arity:6,name:"multiple-view-documents",qname:"cloudant:multiple-view-documents",signature:"($connection as anyURI, $database as string, $design-document as string, $view as string, $keys as string*, $options as object()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Lists the specified documents in a given view.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The information is returned as a JSON structure containing meta information\n about the return structure, and the list of documents each with its ID, revision\n and key. The key is generated from the document ID.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function allows to specify an additional options object.\n The following options are supported:\n <ul>\n   <li>descending: return the documents in descending by key order (boolean,\n   default: false).</li>\n   <li>endkey: stop returning records when the specified key is reached (string).</li>\n   <li>endkey_docid: stop returning records when the specified document ID is\n   reached (string).</li>\n   <li>group: group the results using the reduce function to a group or single\n   row (boolean, default: false).</li>\n   <li>group_level: specify the group level to be used (numeric).</li>\n   <li>include_docs: include the full content of the documents in the return\n   (boolean, default: false).</li>\n   <li>inclusive_end: specifies whether the specified end key should be included\n   in the result (boolean, default: true).</li>\n   <li>key: return only documents that match the specified key (string).</li>\n   <li>limit: limit the number of the returned documents to the specified number\n   (numeric).</li>\n   <li>reduce: use the reduction function (boolean, default: true).</li>\n   <li>skip: skip this number of records before starting to return the results\n   (numeric, default: 0).</li>\n   <li>stale: allow the results from a stale view to be used (string, allowed\n   value: "ok").</li>\n   <li>startkey: start returning records when the specified key is reached\n   (string).</li>\n   <li>startkey_docid: start returning records when the specified document ID\n   is reached (string).</li>\n   <li>database-owner: specifies the database owner (string, default: connection\n   user).</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <pre>cloudant:multiple-view-documents($connection, "db", "recipes",\n   "by_ingredient", ("claret", "clear apple juice"),\n   {"database-owner": "username"})\n </pre>.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">An object with the following format is returned:\n <pre>\n {\n   "total_rows" : 26484,\n   "rows" : [\n     {\n       "value" : ["Scotch collops"]],\n       "id" : "Scotchcollops",\n       "key" : "claret"\n     },\n     {\n       "value" : ["Stand pie"],\n       "id" : "Standpie",\n       "key" : "clear apple juice"\n     }\n   ],\n   "offset" : 6324\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The fields have the following meaning:\n <ul>\n  <li>offset: offset where the document list started.</li>\n  <li>rows: array of document objects, each containing id, key and revision number.</li>\n  <li>total_rows: number of documents in the database.</li>\n  <li>update_seq: current update sequence database.</li>\n </ul>\n </p>\n',summary:"<p>  Lists the specified documents in a given view.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"connection",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A connection identifier</div>'},{name:"database",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A database name</div>'},{name:"design-document",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A design document name</div>'},{name:"view",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A view name</div>'},{name:"keys",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The keys of the documents which must be retrieved</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An object specifying additional request options</div>'}],returns:{type:"object()",description:"An object listing all the specified documents in the specified view"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:AUTHORIZATION Authorization error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:HTTP An HTTP error occurred when issuing the request</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:RESPONSE An error occurred parsing the server response</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:CONNECTION The specified connection does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:INTERNAL Cloudant internal error</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">cloudant:OPTIONS Malformed options object</xqdoc:error>']}],variables:[]},"http://api.28.io/exportimport":{ns:"http://api.28.io/exportimport",description:"",sees:[],authors:[],version:null,encoding:null,namespaces:[{uri:"",prefix:"an"},{uri:"http://api.28.io/collections",prefix:"cm"},{uri:"http://api.28.io/exportimport",prefix:"exportimport"},{uri:"http://zorba.io/modules/fetch",prefix:"fetch"},{uri:"http://api.28.io/indices",prefix:"in"},{uri:"http://www.28msec.com/modules/maps",prefix:"map"},{uri:"http://www.28msec.com/modules/http/request",prefix:"req"},{uri:"http://www.28msec.com/modules/http/response",prefix:"resp"},{uri:"http://www.28msec.com/modules/store",prefix:"store"},{uri:"http://api.28.io/validation",prefix:"validate"}],functions:[{isDocumented:!1,arity:1,name:"create-map",qname:"exportimport:create-map",signature:"($map as object())",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"map",type:"object()",occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:0,name:"export",qname:"exportimport:export",signature:"()",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:0,name:"import",qname:"exportimport:import",signature:"()",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:2,name:"import",qname:"exportimport:import",signature:"($import as object(), $overwrite as xs:boolean)",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"import",type:"object()",occurrence:null,description:""},{name:"overwrite",type:"xs:boolean",occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:1,name:"is-system-collection",qname:"exportimport:is-system-collection",signature:"($name as xs:string) as xs:boolean",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!1,arity:1,name:"validate-map",qname:"exportimport:validate-map",signature:"($map as object()) as empty-sequence()",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"map",type:"object()",occurrence:null,description:""}],returns:{type:"empty-sequence()",description:""},errors:[]}],variables:[]},"http://jsoniq.org/errors":{ns:"http://jsoniq.org/errors",description:" This module contains one variable declaration for each diagnostic of the\n http://jsoniq.org/errors namespace.\n The variables serves as documentation for the errors but can also\n be used in the code. For example, one useful scenario is to compare\n an error caught in the catch clause of a try-catch expression with one of\n the variables.\n",sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Carlos Lopez</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://jsoniq.org/errors",prefix:"jerr"}],functions:[],variables:[{name:"jerr:JNSE0013",type:"xs:QName",description:"It is a dynamic error to serialize an atomic value not\n supported by JSON or a node with the JSON output method and with\n the jsoniq-serialization-extensions serialization parameter\n set to false.\n"},{name:"jerr:JNDY0021",type:"xs:QName",description:"parser error raised by jn:parse-json\n"},{name:"jerr:JNTY0021",type:"xs:QName",description:"array or object selector on heterogeneous sequence\n"},{name:"jerr:JNTY0020",type:"xs:QName",description:"parser error for invalid option type\n"},{name:"jerr:JNTY0024",type:"xs:QName",description:"objects or arrays don't have a string value\n"},{name:"jerr:JNTY0023",type:"xs:QName",description:"It is a type error if the prefix is not a string or if the\n serialization parameters are not an element.\n"},{name:"jerr:JNUP0019",type:"xs:QName",description:"It is a dynamic error if the content expression, in an object insert expression, does not evaluate to a sequence of objects.\n"},{name:"jerr:JNTY0018",type:"xs:QName",description:"It is a dynamic error if there is not exactly one supplied parameter for an object or array selector.\n"},{name:"jerr:JNUP0017",type:"xs:QName",description:" It is a dynamic error if the value in a replace expression is not exactly a single item.\n"},{name:"jerr:JNUP0016",type:"xs:QName",description:"It is a dynamic error if it is attempted to create a replace, delete or rename update primitive with a selector that cannot be resolved against the target array or object.\n"},{name:"jerr:JNSE0022",type:"xs:QName",description:"It is a dynamic error to serialize a sequence that does\n not exist of exactly one document node with XML, HTML, XHTML, Text.\n"},{name:"jerr:JNSE0014",type:"xs:QName",description:"It is a dynamic error to serialize a function or a node with the\n JSON output method.\n"},{name:"jerr:NS",type:"item()*",description:""},{name:"jerr:JNSE0012",type:"xs:QName",description:"It is a dynamic error to serialize a sequence of less\n or more than one item with the JSON output method if the\n jsoniq-serialization-multiple-items is set to no.\n"},{name:"jerr:JNTY0011",type:"xs:QName",description:"It is a type error if the content sequence in a node constructor or in an XQUF insert or replace update expression contains an object or an array.\n"},{name:"jerr:JNUP0010",type:"xs:QName",description:"It is a dynamic error if a pending update list contains two renaming update primitives on the same object and with the same selector.\n"},{name:"jerr:JNUP0009",type:"xs:QName",description:"It is a dynamic error if a pending update list contains two replacing update primitives on the same object or array, and with the same selector.\n"},{name:"jerr:JNUP0008",type:"xs:QName",description:"It is a dynamic error if the target of a deleting or replacing expression is not an array or an object.\n It is a dynamic error if the target of a renaming expression is not an object.\n It is a dynamic error if the target of an appending expression is not an array.\n It is a dynamic error if the target of a position-inserting expression is not an array.\n It is a dynamic error if the target of a non-position-inserting expression is not an object.\n"},{name:"jerr:JNUP0007",type:"xs:QName",description:"It is a type error if, in an updating expression, an array selector cannot be cast to xs:integer or if an object selector cannot be cast to xs:string.\n"},{name:"jerr:JNUP0006",type:"xs:QName",description:"It is a dynamic error if upd:applyUpdates causes an object to contain two pairs with the same name.\n"},{name:"jerr:JNUP0005",type:"xs:QName",description:"It is a dynamic error if a pending update list contains two inserting update primitives on the same object and pair name.\n"},{name:"jerr:JNTY0004",type:"xs:QName",description:"It is a type error to call fn:data on a sequence containing an array or an object.\n"},{name:"jerr:JNDY0003",type:"xs:QName",description:"It is a dynamic error if two pairs in an object constructor or in a simple object union have the same name.\n"},{name:"jerr:JNTY0002",type:"xs:QName",description:"It is a type error if the right-hand-side expression of a pair constructor does not return exactly one item.\n"}]},"http://zorba.io/modules/sctx":{ns:"http://zorba.io/modules/sctx",description:" This module provides functions that gets components of the static context.\n",sees:['<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://www.w3.org/TR/xquery/#id-xq-static-context-components</xqdoc:see>'],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Nicolae Brinza</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/modules/sctx",prefix:"sctx"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:0,name:"base-uri",qname:"sctx:base-uri",signature:"() as xs:string? external",description:" Gets the base URI.\n",summary:"<p> Gets the base URI.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:string?",description:"The base URI."},errors:[]},{isDocumented:!0,arity:0,name:"boundary-space-policy",qname:"sctx:boundary-space-policy",signature:"() as xs:string external",description:" Gets the boundary whitespace policy used by direct element constructors.\n",summary:"<p> Gets the boundary whitespace policy used by direct element constructors.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:string",description:'Either <code xmlns:xqdoc="http://www.xqdoc.org/1.0">preserve</code> or <code xmlns:xqdoc="http://www.xqdoc.org/1.0">strip</code>.'},errors:[]},{isDocumented:!0,arity:0,name:"construction-mode",qname:"sctx:construction-mode",signature:"() as xs:string external",description:" Gets the static context construction mode of element and document nodes.\n",summary:"<p> Gets the static context construction mode of element and document nodes.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:string",description:'Either <code xmlns:xqdoc="http://www.xqdoc.org/1.0">preserve</code> or <code xmlns:xqdoc="http://www.xqdoc.org/1.0">strip</code>.'},errors:[]},{isDocumented:!0,arity:0,name:"copy-namespaces-mode",qname:"sctx:copy-namespaces-mode",signature:"() as xs:string+ external",description:" Gets the static context components that control the the namespace bindings\n that are assigned when an existing element node is copied\n by an element constructor.\n",summary:"<p> Gets the static context components that control the the namespace bindings\n that are assigned when an existing element node is copied\n by an element constructor.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:string+",description:'A sequence of two strings: the first is either <code xmlns:xqdoc="http://www.xqdoc.org/1.0">preserve</code> or <code xmlns:xqdoc="http://www.xqdoc.org/1.0">no-preserve</code> and the second is either <code xmlns:xqdoc="http://www.xqdoc.org/1.0">inherit</code> or <code xmlns:xqdoc="http://www.xqdoc.org/1.0">no-inherit</code>.'},errors:[]},{isDocumented:!0,arity:0,name:"default-collation",qname:"sctx:default-collation",signature:"() as xs:string external",description:' Gets one of statically known collations used by functions and operators\n for comparing and ordering values of type <code xmlns:xqdoc="http://www.xqdoc.org/1.0">xs:string</code>\n or <code xmlns:xqdoc="http://www.xqdoc.org/1.0">xs:anyURI</code> when no explicit collation is specified.\n',summary:"<p> Gets one of statically known collations used by functions and operators\n for comparing and ordering values of type  xs:string \n or  xs:anyURI  when no explicit collation is specified.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:string",description:"The collations that is used by default."},errors:[]},{isDocumented:!0,arity:0,name:"default-collection-type",qname:"sctx:default-collection-type",signature:"() as xs:string external",description:' Gets the statically known default collection type.\n This is the type of the sequence of nodes that would result from calling the\n <code xmlns:xqdoc="http://www.xqdoc.org/1.0">fn:collection</code> function with no arguments.\n',summary:"<p> Gets the statically known default collection type.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:string",description:"The type of the default collection."},errors:[]},{isDocumented:!0,arity:0,name:"default-function-namespace",qname:"sctx:default-function-namespace",signature:"() as xs:string external",description:" Gets the URI of the default function namespace.\n",summary:"<p> Gets the URI of the default function namespace.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:string",description:"The URI of the of the default function namespace."},errors:[]},{isDocumented:!0,arity:0,name:"default-order",qname:"sctx:default-order",signature:"() as xs:string external",description:' Gets the component that controls the processing of empty sequences and NaN\n values as ordering keys in an <code xmlns:xqdoc="http://www.xqdoc.org/1.0">order by</code> clause\n in a FLWOR expression.\n',summary:"<p> Gets the component that controls the processing of empty sequences and NaN\n values as ordering keys in an  order by  clause\n in a FLWOR expression.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:string",description:'Either <code xmlns:xqdoc="http://www.xqdoc.org/1.0">greatest</code> or <code xmlns:xqdoc="http://www.xqdoc.org/1.0">least</code>.'},errors:[]},{isDocumented:!0,arity:2,name:"function-annotations",qname:"sctx:function-annotations",signature:"($name as xs:QName, $arity as xs:integer) as xs:QName* external",description:" Gets the list of annotations declared for the given function.\n",summary:"<p> Gets the list of annotations declared for the given function.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the function.</div>'},{name:"arity",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The number of arguments the function takes.</div>'}],returns:{type:"xs:QName*",description:"the list of annotations"},errors:[]},{isDocumented:!0,arity:1,name:"function-arguments-count",qname:"sctx:function-arguments-count",signature:"($function as xs:QName) as xs:int* external",description:" Gets the number of arguments the given XQuery function takes.\n",summary:"<p> Gets the number of arguments the given XQuery function takes.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"function",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A QName identifying a function.</div>'}],returns:{type:"xs:int*",description:"Either a sequence of zero or more integers (one for each overloaded version of the given function) or an empty sequence if the function is not defined."},errors:[]},{isDocumented:!0,arity:0,name:"function-names",qname:"sctx:function-names",signature:"() as xs:QName* external",description:" Gets a sequence containing the QNames of all defined functions\n that are available to be called from within an expression.\n",summary:"<p> Gets a sequence containing the QNames of all defined functions\n that are available to be called from within an expression.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:QName*",description:"A sequence for QNames identifying all functions."},errors:[]},{isDocumented:!0,arity:0,name:"functions",qname:"sctx:functions",signature:"() as object()* external",description:" Gets a sequence of JSON objects containing the name, arity, and annotations\n of all defined functions that are available to be called form within an\n expression.\n",summary:"<p> Gets a sequence of JSON objects containing the name, arity, and annotations\n of all defined functions that are available to be called form within an\n expression.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"object()*",description:"A sequence of objects."},errors:[]},{isDocumented:!0,arity:0,name:"in-scope-attribute-declarations",qname:"sctx:in-scope-attribute-declarations",signature:"() as xs:QName* external",description:" Gets a sequence of QNames identifying declared attributes\n in the imported schemas.\n",summary:"<p> Gets a sequence of QNames identifying declared attributes\n in the imported schemas.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:QName*",description:"A sequence of QNames, one for each attribute."},errors:[]},{isDocumented:!0,arity:0,name:"in-scope-attribute-groups",qname:"sctx:in-scope-attribute-groups",signature:"() as xs:QName* external",description:" Gets a sequence of QNames identifying declared in-scope\n schema attribute groups.\n",summary:"<p> Gets a sequence of QNames identifying declared in-scope\n schema attribute groups.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:QName*",description:"A sequence of QNames, one for each attribute group."},errors:[]},{isDocumented:!0,arity:0,name:"in-scope-element-declarations",qname:"sctx:in-scope-element-declarations",signature:"() as xs:QName* external",description:" Gets a sequence of QNames identifying declared elements\n in the imported schemas.\n",summary:"<p> Gets a sequence of QNames identifying declared elements\n in the imported schemas.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:QName*",description:"A sequence of QNames, one for each declared element."},errors:[]},{isDocumented:!0,arity:0,name:"in-scope-element-groups",qname:"sctx:in-scope-element-groups",signature:"() as xs:QName* external",description:" Gets a sequence of QNames identifying declared in-scope\n schema element groups.\n",summary:"<p> Gets a sequence of QNames identifying declared in-scope\n schema element groups.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:QName*",description:"A sequence of QNames, one for each element group."},errors:[]},{isDocumented:!0,arity:0,name:"in-scope-schema-types",qname:"sctx:in-scope-schema-types",signature:"() as xs:QName* external",description:" Gets a sequence of QNames identifying in-scope schema types\n including all the predefined schema types and all definitions\n found in imported schemas.\n",summary:"<p> Gets a sequence of QNames identifying in-scope schema types\n including all the predefined schema types and all definitions\n found in imported schemas.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:QName*",description:"A sequence of QNames, one for each defined type."},errors:[]},{isDocumented:!0,arity:0,name:"in-scope-variables",qname:"sctx:in-scope-variables",signature:"() as xs:QName* external",description:" Gets a sequence of QNames identifying declared variables\n from the static context.\n",summary:"<p> Gets a sequence of QNames identifying declared variables\n from the static context.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:QName*",description:"A sequence of QNames, one for each variable."},errors:[]},{isDocumented:!0,arity:1,name:"option",qname:"sctx:option",signature:"($name as xs:QName) as xs:string? external",description:" Gets the value of an option that is declared in the prolog of the module.\n",summary:"<p> Gets the value of an option that is declared in the prolog of the module.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the option value to retrieve</div>'}],returns:{type:"xs:string?",description:"the value of the option if contained in the static context or the empty sequence otherwise."},errors:[]},{isDocumented:!0,arity:0,name:"ordering-mode",qname:"sctx:ordering-mode",signature:"() as xs:string external",description:" Gets the ordering mode that affects the ordering of the result sequences\n returned by certain expressions.\n",summary:"<p> Gets the ordering mode that affects the ordering of the result sequences\n returned by certain expressions.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:string",description:'Either <code xmlns:xqdoc="http://www.xqdoc.org/1.0">ordered</code> or <code xmlns:xqdoc="http://www.xqdoc.org/1.0">unordered</code>.'},errors:[]},{isDocumented:!0,arity:0,name:"statically-known-collations",qname:"sctx:statically-known-collations",signature:"() as xs:anyURI* external",description:" Gets a sequence that contains the statically known collations.\n",summary:"<p> Gets a sequence that contains the statically known collations.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:anyURI*",description:"The sequence of collations."},errors:[]},{isDocumented:!0,arity:1,name:"statically-known-document-type",qname:"sctx:statically-known-document-type",signature:"($document as xs:string) as xs:QName external",description:" For the given document, returns the static type of its root node.\n",summary:"<p> For the given document, returns the static type of its root node.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"document",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A URI of a document.</div>'}],returns:{type:"xs:QName",description:"The static type of the given document."},errors:[]},{isDocumented:!0,arity:0,name:"statically-known-documents",qname:"sctx:statically-known-documents",signature:"() as xs:anyURI* external",description:" Gets a sequence that contains the URIs of all statically known documents.\n",summary:"<p> Gets a sequence that contains the URIs of all statically known documents.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:anyURI*",description:"The sequence of document URIs."},errors:[]},{isDocumented:!0,arity:1,name:"statically-known-namespace-binding",qname:"sctx:statically-known-namespace-binding",signature:"($prefix as xs:string) as xs:string? external",description:" Gets the bound URI for the given prefix.\n",summary:"<p> Gets the bound URI for the given prefix.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"prefix",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The prefix of the known namespace for which the bound URI is being requested.</div>'}],returns:{type:"xs:string?",description:"The URI bound to the prefix is returned, or an empty sequence if the prefix is not known."},errors:[]},{isDocumented:!0,arity:0,name:"statically-known-namespaces",qname:"sctx:statically-known-namespaces",signature:"() as xs:string* external",description:" Gets a list of known statically known namespaces as prefixes\n (fn, xml, xs, xsi, etc).\n",summary:"<p> Gets a list of known statically known namespaces as prefixes\n (fn, xml, xs, xsi, etc).</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:string*",description:"A sequence of xs:strings, one for each known namespace prefix."},errors:[]},{isDocumented:!0,arity:0,name:"xpath10-compatibility-mode",qname:"sctx:xpath10-compatibility-mode",signature:"() as xs:boolean external",description:" Gets true or false depending on whether rules for compatibility\n with XPath 1.0 are in effect.\n XQuery set the value of this component to false.\n",summary:"<p> Gets true or false depending on whether rules for compatibility\n with XPath 1.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:boolean",description:'The function should return <code xmlns:xqdoc="http://www.xqdoc.org/1.0">false</code>.'},errors:[]}],variables:[]},"http://xbrl.io/modules/bizql/profiles/sec/import":{ns:"http://xbrl.io/modules/bizql/profiles/sec/import",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This module provides functionality for querying XBRL Infosets of financial reports submitted to the SEC.\n </p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Charles Hoffman</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Matthias Brantner</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Dennis Knochenwefel</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Ghislain Fourny</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://xbrl.io/modules/bizql/archives",prefix:"archives"},{uri:"http://www.28msec.com/modules/credentials",prefix:"credentials"},{uri:"http://xbrl.io/modules/bizql/entities",prefix:"entities"},{uri:"http://xbrl.io/modules/bizql/profiles/sec/import",prefix:"imp"},{uri:"http://www.28msec.com/modules/mongodb",prefix:"m"},{uri:"http://zorba.io/modules/string",prefix:"string"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"disclosure-for-network-label",qname:"imp:disclosure-for-network-label",signature:"($component as object()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n Compute the disclore for a component\'s network label.\n </p>\n',summary:"<p>  \n Compute the disclore for a component's network label.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"component",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the component</div>'}],returns:{type:"object()",description:"returns the given component ammended with the disclosure"},errors:[]}],variables:[{name:"imp:disclosure-matching",type:"object()",description:" Declarative description of the disclosure matching heuristics.\n"}]},"http://xbrl.io/modules/bizql/profiles/sec/core":{ns:"http://xbrl.io/modules/bizql/profiles/sec/core",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This module provides functionality for querying XBRL Models of financial reports submitted to the SEC.\n </p>\n <h2 xmlns:xqdoc="http://www.xqdoc.org/1.0" id="standard_options">Standard <code>$options</code> Parameter</h2>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Most functions in the BizQL package allow an additional <code>$options</code>\n    parameter. The options parameter is a JSON object which is defined in the documentation\n    of the <a href="../../facts#standard_options">facts module</a>.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">In addition to the option fields defined in the\n    <a href="../../facts#standard_options">facts module</a> the following\n    fields can be used in the options of a function in the SEC profile:</p>\n <ul xmlns:xqdoc="http://www.xqdoc.org/1.0">\n <li><b>HideAmendedFacts</b>: if set to true (default behavior) all facts that have been\n     amended are not included in the result.</li>\n <li><b>IncludeImpliedTable</b>: set to true in order to output the implied table if\n     there is no Table (default is false).</li>\n </ul>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Charles Hoffman</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Matthias Brantner</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Dennis Knochenwefel</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Ghislain Fourny</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://xbrl.io/modules/bizql/archives",prefix:"archives"},{uri:"http://xbrl.io/modules/bizql/concept-maps",prefix:"concept-maps"},{uri:"http://www.28msec.com/modules/credentials",prefix:"credentials"},{uri:"http://xbrl.io/modules/bizql/entities",prefix:"entities"},{uri:"http://xbrl.io/modules/bizql/facts",prefix:"facts"},{uri:"http://xbrl.io/modules/bizql/hypercubes",prefix:"hypercubes"},{uri:"http://www.28msec.com/modules/mongodb",prefix:"m"},{uri:"http://xbrl.io/modules/bizql/report-schemas",prefix:"report-schemas"},{uri:"http://xbrl.io/modules/bizql/profiles/sec/core",prefix:"sec"},{uri:"http://zorba.io/modules/string",prefix:"string"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"edgar-facts-for-archives",qname:"sec:edgar-facts-for-archives",signature:"($archive_or_ids as item()*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Return all facts for concepts that are defined by one of the common\n edgar taxonomies. In particular, this function returns facts for concepts\n having one of the following prefixes:</p>\n <ul xmlns:xqdoc="http://www.xqdoc.org/1.0">\n   <li>xbrli</li>\n   <li>link</li>\n   <li>xl</li>\n   <li>xlink</li>\n   <li>xbrldt</li>\n   <li>xbrldi</li>\n   <li>nonnum</li>\n   <li>num</li>\n   <li>ref</li>\n   <li>us-gaap</li>\n   <li>dei</li>\n   <li>us-types</li>\n   <li>invest</li>\n   <li>country</li>\n   <li>currency</li>\n   <li>exch</li>\n   <li>naics</li>\n   <li>sic</li>\n   <li>stpr</li>\n   <li>rr</li>\n   <li>rr-ent</li>\n   <li>rr-cal</li>\n   <li>rr-def</li>\n   <li>rr-pre</li>\n </ul>\n',summary:"<p>  Return all facts for concepts that are defined by one of the common\n edgar taxonomies.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"archive_or_ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of archive or archive IDs to filter.</div>'}],returns:{type:"object()*",description:"all facts having one of the above prefixes."},errors:[]},{isDocumented:!0,arity:1,name:"end-date",qname:"sec:end-date",signature:"($filing-fact-or-id as item()?) as xs:date?",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves the document end date of a filing or a fact.</p>\n',summary:"<p>  Retrieves the document end date of a filing or a fact.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"filing-fact-or-id",type:"item()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a filing, a fact, or its id.</div>'}],returns:{type:"xs:date?",description:'the document end date (e.g., xs:date("2011-04-30")).'},errors:[]},{isDocumented:!0,arity:1,name:"extension-facts-for-archives",qname:"sec:extension-facts-for-archives",signature:"($archive_or_ids as item()*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Return all facts for concepts that are NOT defined by one of the common\n edgar taxonomies. In particular, this function returns facts for concepts\n having none of the prefixes listed under function\n sec:edgar-facts-for-archives.</p>\n',summary:"<p>  Return all facts for concepts that are NOT defined by one of the common\n edgar taxonomies.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"archive_or_ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of archive or archive IDs to filter.</div>'}],returns:{type:"object()*",description:"all facts having none of the common edgar prefixes."},errors:[]},{isDocumented:!0,arity:2,name:"fact-table-for-schema",qname:"sec:fact-table-for-schema",signature:"($schema as item(), $archives as item()*) as array()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves all facts from the supplied archives, that are relevant to the\n supplied schema, and populates them with the default dimension values\n when missing.</p>\n',summary:"<p>  Retrieves all facts from the supplied archives, that are relevant to the\n supplied schema, and populates them with the default dimension values\n when missing.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"schema",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a report schema or its RID.</div>'},{name:"archives",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of archives or their AIDs or $sec:ALL_OF_THEM for no filtering.</div>'}],returns:{type:"array()",description:"a sequence of facts with populated dimension values."},errors:[]},{isDocumented:!0,arity:2,name:"facts-for-archives-and-concepts",qname:"sec:facts-for-archives-and-concepts",signature:"($archive_or_ids as item()*, $concepts as item()*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves the facts associated with the supplied concepts\n from the supplied archive, that match the fiscal focus of the archive.</p>\n',summary:"<p>  Retrieves the facts associated with the supplied concepts\n from the supplied archive, that match the fiscal focus of the archive.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"archive_or_ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of archives or their ids or $sec:ALL_OF_THEM for no filtering.</div>'},{name:"concepts",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the concepts or $sec:ALL_OF_THEM for no filtering.</div>'}],returns:{type:"object()*",description:"the latest facts associated with the supplied concept."},errors:[]},{isDocumented:!0,arity:3,name:"facts-for-archives-and-concepts",qname:"sec:facts-for-archives-and-concepts",signature:"($archive_or_ids as item()*, $concepts as item()*, $options as object()?) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves the facts associated with the supplied concepts\n from the supplied archive, that match the fiscal focus of the archive.</p>\n',summary:"<p>  Retrieves the facts associated with the supplied concepts\n from the supplied archive, that match the fiscal focus of the archive.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"archive_or_ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of archives or their ids or $sec:ALL_OF_THEM for no filtering.</div>'},{name:"concepts",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the concepts or $sec:ALL_OF_THEM for no filtering.</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> <a href="#standard_options">standard SEC BizQL options</a>.</div>'}],returns:{type:"object()*",description:"the latest facts associated with the supplied concept."},errors:[]},{isDocumented:!0,arity:2,name:"facts-for-schema",qname:"sec:facts-for-schema",signature:"($schema as item(), $archives as item()*) as item()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves all facts from the supplied archives, that are relevant to the\n supplied schema and to the fiscal focus, and populates\n them with the default dimension values when missing.</p>\n',summary:"<p>  Retrieves all facts from the supplied archives, that are relevant to the\n supplied schema and to the fiscal focus, and populates\n them with the default dimension values when missing.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"schema",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a schema.</div>'},{name:"archives",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of archives or their AIDs or $sec:ALL_OF_THEM for no filtering.</div>'}],returns:{type:"item()*",description:"a sequence of facts with populated dimension values."},errors:[]},{isDocumented:!0,arity:1,name:"hide-amended-facts",qname:"sec:hide-amended-facts",signature:"($facts as object()*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Filters a list of facts and returns only the latest amending facts.\n    Accordingly, all amended facts are filtered out.</p>\n',summary:"<p>  Filters a list of facts and returns only the latest amending facts.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"facts",type:"object()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a list of facts.</div>'}],returns:{type:"object()*",description:"a sequence of facts without amended facts."},errors:[]},{isDocumented:!0,arity:2,name:"populate-schema-with-facts",qname:"sec:populate-schema-with-facts",signature:"($schema as item(), $archives as item()*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Populates a concept-tree network with all facts from the supplied archives,\n that are relevant to the\n supplied schema. Default dimension values are added to the facts\n when missing.</p>\n',summary:"<p>  Populates a concept-tree network with all facts from the supplied archives,\n that are relevant to the\n supplied schema.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"schema",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a report schema or its RID.</div>'},{name:"archives",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of archives or their AIDs.</div>'}],returns:{type:"object()*",description:"a sequence of facts with populated dimension values."},errors:[]},{isDocumented:!0,arity:3,name:"populate-schema-with-facts",qname:"sec:populate-schema-with-facts",signature:"($schema as item(), $archives as item()*, $options as object()?) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Populates a concept-tree network with all facts from the supplied archives,\n that are relevant to the\n supplied schema. Default dimension values are added to the facts\n when missing.</p>\n',summary:"<p>  Populates a concept-tree network with all facts from the supplied archives,\n that are relevant to the\n supplied schema.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"schema",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a report schema or its RID.</div>'},{name:"archives",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of archives or their AIDs or $sec:ALL_OF_THEM for no filtering.</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> <a href="#standard_options">standard SEC BizQL options</a>.</div>'}],returns:{type:"object()*",description:"a sequence of facts with populated dimension values."},errors:[]}],variables:[{name:"sec:CIK",type:"xs:string",description:" Scheme for the SEC entity identifiers (i.e. http://www.sec.gov/CIK)\n"},{name:"sec:ALL_OF_THEM",type:"boolean",description:" Joker value for all archives or all concepts.\n"},{name:"sec:EDGAR_PREFIXES",type:"item()*",description:" All prefixes pre-declared in SEC's EDGAR.\n"}]},"http://zorba.io/modules/excel/logical":{ns:"http://zorba.io/modules/excel/logical",description:" This is a library module offering the same set of functions\n defined by Microsoft Excel, under Logical Functions.\n",sees:['<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0"><a href="http://office.microsoft.com/en-us/excel/CH062528271033.aspx" target="_blank">Excel Documentation: Logical Functions</a></xqdoc:see>'],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Sorin Nasoi</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/modules/excel/errors",prefix:"excel-err"},{uri:"http://zorba.io/modules/excel/logical",prefix:"excel-logical"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"and",qname:"excel-logical:and",signature:"($values as xs:anyAtomicType*) as xs:boolean",description:" Returns TRUE if all its arguments are TRUE; FALSE if one or more arguments are FALSE.\n",summary:"<p> Returns TRUE if all its arguments are TRUE; FALSE if one or more arguments are FALSE.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"values",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of arguments.</div>'}],returns:{type:"xs:boolean",description:"TRUE if all its arguments are TRUE; FALSE if one or more arguments are FALSE."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value provided sequence is empty.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"and",qname:"excel-logical:and",signature:"($arg1 as xs:anyAtomicType, $arg2 as xs:anyAtomicType) as xs:boolean",description:" Returns TRUE if all its arguments are TRUE; FALSE if one or more arguments are FALSE.\n",summary:"<p> Returns TRUE if all its arguments are TRUE; FALSE if one or more arguments are FALSE.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg1",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the first argument.</div>'},{name:"arg2",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the second argument.</div>'}],returns:{type:"xs:boolean",description:"TRUE if all its arguments are TRUE; FALSE if one or more arguments are FALSE."},errors:[]},{isDocumented:!0,arity:3,name:"if",qname:"excel-logical:if",signature:"($logical_test as xs:boolean, $value_if_true as item()*, $value_if_false as item()*) as item()*",description:" Returns one value if a condition you specify evaluates to TRUE and another value if it evaluates to FALSE.\n",summary:"<p> Returns one value if a condition you specify evaluates to TRUE and another value if it evaluates to FALSE.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"logical_test",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> is any value or expression that can be evaluated to TRUE or FALSE.</div>'},{name:"value_if_true",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the value that is returned if logical_test is TRUE.</div>'},{name:"value_if_false",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the value that is returned if logical_test is FALSE.</div>'}],returns:{type:"item()*",description:"One value if a condition you specify evaluates to TRUE and another value if it evaluates to FALSE."},errors:[]},{isDocumented:!0,arity:1,name:"or",qname:"excel-logical:or",signature:"($values as xs:anyAtomicType*) as xs:boolean",description:" Returns TRUE if any argument is TRUE; FALSE if all arguments are FALSE.\n",summary:"<p> Returns TRUE if any argument is TRUE; FALSE if all arguments are FALSE.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"values",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of arguments.</div>'}],returns:{type:"xs:boolean",description:"TRUE if any argument is TRUE; FALSE if all arguments are FALSE."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">excel-err:Value provided sequence is empty.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"or",qname:"excel-logical:or",signature:"($arg1 as xs:anyAtomicType, $arg2 as xs:anyAtomicType) as xs:boolean",description:" Returns TRUE if any argument is TRUE; FALSE if all arguments are FALSE.\n",summary:"<p> Returns TRUE if any argument is TRUE; FALSE if all arguments are FALSE.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg1",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the first argument.</div>'},{name:"arg2",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the second argument.</div>'}],returns:{type:"xs:boolean",description:"TRUE if any argument is TRUE; FALSE if all arguments are FALSE."},errors:[]}],variables:[]},"http://www.28msec.com/modules/sequence":{ns:"http://www.28msec.com/modules/sequence",description:" The sequence module allows you to generate consecutive\n application-unique xs:integer ids. This is required e.g. in accounting\n applications as some legislations require consecutive invoice numbers.\n",sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">28msec</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://zorba.io/modules/store/static/collections/dml",prefix:"cdml"},{uri:"http://zorba.io/modules/store/static/indexes/dml",prefix:"idml"},{uri:"http://www.28msec.com/modules/lock",prefix:"lock"},{uri:"http://www.28msec.com/modules/sequence",prefix:"seq"},{uri:"http://www.28msec.com/modules/sleep",prefix:"sleep"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"id",qname:"seq:id",signature:"($uri as xs:string) as xs:integer",description:' Returns a unique (sequentially incremented) id for the\n uri specified as parameter.\n Here the function is used to create consecutive invoice numbers:\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0">\n if (order:fulfilled($order-id))\n then\n   {\n     variable $invoice-id := seq:id("invoice");\n     invoice:create($invoice-id, $order-id);\n   }\n else\n   ...\n </pre>\n',summary:"<p> Returns a unique (sequentially incremented) id for the\n uri specified as parameter.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"uri",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the sequence counter as uri.</div>'}],returns:{type:"xs:integer",description:"A sequentially incremented id."},errors:[]},{isDocumented:!0,arity:1,name:"reset",qname:"seq:reset",signature:"($uri as xs:string) as empty-sequence()",description:" Resets the unique (sequentially incremented) id generation\n for the uri specified as parameter.\n",summary:"<p> Resets the unique (sequentially incremented) id generation\n for the uri specified as parameter.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"uri",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the sequence counter as uri.</div>'}],returns:{type:"empty-sequence()",description:"empty-sequence()"},errors:[]},{isDocumented:!0,arity:1,name:"value",qname:"seq:value",signature:"($uri as xs:string) as xs:integer",description:" Returns the id for the uri specified as parameter without incrementing it.\n",summary:"<p> Returns the id for the uri specified as parameter without incrementing it.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"uri",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the sequence counter as uri.</div>'}],returns:{type:"xs:integer",description:"The current value"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">seq:not-found if no counter with the given $uri was found</xqdoc:error>']}],variables:[{name:"seq:counters",type:"item()*",description:" The QName for the counters collection.\n"},{name:"seq:counters-by-uri",type:"item()*",description:" The QName for the counters-by-uri collection.\n"}]},"http://api.28.io/databrowser":{ns:"http://api.28.io/databrowser",description:"",sees:[],authors:[],version:null,encoding:null,namespaces:[{uri:"",prefix:"an"},{uri:"http://api.28.io/databrowser",prefix:"api"},{uri:"http://zorba.io/modules/base64",prefix:"base64"},{uri:"http://zorba.io/modules/store/static/collections/dml",prefix:"dml"},{uri:"http://www.zorba-xquery.com/extensions",prefix:"ext"},{uri:"http://www.functx.com",prefix:"functx"},{uri:"http://expath.org/ns/http-client",prefix:"http"},{uri:"http://www.zorba-xquery.com/modules/http-client",prefix:"http-client"},{uri:"http://zorba.io/modules/xml-options",prefix:"opt"},{uri:"http://www.28msec.com/modules/project",prefix:"project"},{uri:"http://zorba.io/modules/reflection",prefix:"r"},{uri:"http://zorba.io/modules/reference",prefix:"ref"},{uri:"http://www.28msec.com/modules/http/request",prefix:"req"},{uri:"http://www.28msec.com/modules/http/response",prefix:"res"},{uri:"http://zorba.io/modules/xml",prefix:"xmlmod"},{uri:"http://zorba.io/errors",prefix:"zerr"}],functions:[{isDocumented:!1,arity:1,name:"collection",qname:"api:collection",signature:"($name as xs:string)",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"name",type:"xs:string",occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:0,name:"delete",qname:"api:delete",signature:"()",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[],returns:{type:null,description:""},errors:[]},{isDocumented:!0,arity:0,name:"dispatch",qname:"api:dispatch",signature:"()",description:" Data Browser API dispatched.\n Handles API authorization to the portal and dispatching.\n",summary:"<p> Data Browser API dispatched.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:0,name:"edit",qname:"api:edit",signature:"()",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:0,name:"options",qname:"api:options",signature:"()",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:1,name:"run",qname:"api:run",signature:"($sequential as xs:boolean) as object()",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"sequential",type:"xs:boolean",occurrence:null,description:""}],returns:{type:"object()",description:""},errors:[]},{isDocumented:!1,arity:1,name:"serialize",qname:"api:serialize",signature:"($items as item()*) as object()",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"items",type:"item()",occurrence:"*",description:""}],returns:{type:"object()",description:""},errors:[]},{isDocumented:!1,arity:0,name:"upload",qname:"api:upload",signature:"()",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[],returns:{type:null,description:""},errors:[]}],variables:[]},"http://xbrl.io/modules/bizql/footnotes":{ns:"http://xbrl.io/modules/bizql/footnotes",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This module provides functions for retrieving XBRL footnotes\n (see section 4.11 Footnotes of the XBRL 2.1 specification).</p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Charles Hoffman</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Matthias Brantner</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Dennis Knochenwefel</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Ghislain Fourny</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://xbrl.io/modules/bizql/archives",prefix:"archives"},{uri:"http://www.28msec.com/modules/credentials",prefix:"credentials"},{uri:"http://xbrl.io/modules/bizql/entities",prefix:"entities"},{uri:"http://xbrl.io/modules/bizql/facts",prefix:"facts"},{uri:"http://xbrl.io/modules/bizql/footnotes",prefix:"footnotes"},{uri:"http://www.28msec.com/modules/mongodb/types",prefix:"m"},{uri:"http://www.28msec.com/modules/mongodb",prefix:"mongo"},{uri:"http://zorba.io/modules/string",prefix:"string"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"fnid",qname:"footnotes:fnid",signature:"($footnote-or-id as item()) as atomic",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Converts the input to a normalized footnote id (FNID). The input\n can be either an FNID, or a footnote object which contains an _id.</p>\n',summary:"<p>  Converts the input to a normalized footnote id (FNID).</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"footnote-or-id",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> an footnote object or FNID.</div>'}],returns:{type:"atomic",description:"the normalized FNID."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">footnotes:INVALID-PARAMETER if the FNID or footnote is not valid.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"footnotes-for-archives",qname:"footnotes:footnotes-for-archives",signature:"($archive-or-ids as item()*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Return all footnotes reported within a given archive.</p>\n',summary:"<p>  Return all footnotes reported within a given archive.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"archive-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of archives or AIDs to filter.</div>'}],returns:{type:"object()*",description:"all footnotes reported in these archives."},errors:[]},{isDocumented:!0,arity:1,name:"footnotes-for-facts",qname:"footnotes:footnotes-for-facts",signature:"($facts-or-ids as item()*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Return all footnotes associated with the given facts.</p>\n',summary:"<p>  Return all footnotes associated with the given facts.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"facts-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of facts or fact IDs to filter</div>'}],returns:{type:"object()*",description:"all footnotes associated with these facts."},errors:[]},{isDocumented:!0,arity:2,name:"footnotes-for-facts",qname:"footnotes:footnotes-for-facts",signature:"($facts-or-ids as item()*, $options as object()?) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Return all footnotes associated with the given facts.</p>\n',summary:"<p>  Return all footnotes associated with the given facts.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"facts-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of facts or fact IDs to filter</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> <a href="facts#standard_options">standard fact retrieving options</a>.</div>'}],returns:{type:"object()*",description:"all footnotes associated with these facts."},errors:[]},{isDocumented:!0,arity:1,name:"footnotes-search",qname:"footnotes:footnotes-search",signature:"($search as string) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Return all footnotes that match the given search term.</p>\n',summary:"<p>  Return all footnotes that match the given search term.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"search",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the search query</div>'}],returns:{type:"object()*",description:"all footnotes matching the given search query"},errors:[]},{isDocumented:!0,arity:0,name:"footnotes",qname:"footnotes:footnotes",signature:"() as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Return all footnotes.</p>\n',summary:"<p>  Return all footnotes.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"object()*",description:"all footnotes."},errors:[]},{isDocumented:!0,arity:1,name:"footnotes",qname:"footnotes:footnotes",signature:"($footnote-or-ids as item()*) as object()?",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Return the footnote with the given FNIDs.</p>\n',summary:"<p>  Return the footnote with the given FNIDs.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"footnote-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the FNIDs or the footnotes themselves.</div>'}],returns:{type:"object()?",description:"the footnotes with the given FNIDs the empty sequence if no footnote was found or if the input is an empty sequence."},errors:[]}],variables:[{name:"footnotes:col",type:"string",description:" Name of the collection the footnotes are stored in.\n"},{name:"footnotes:ARCHIVE",type:"string",description:" Name of the field that points to the archive.\n"},{name:"footnotes:FACTS",type:"string",description:" Name of the field that points to the facts linked to this footnote.\n"},{name:"footnotes:LANG",type:"string",description:" Name of the field that holds the language attribute of the footnote.\n"}]},"http://zorba.io/modules/store/static/indexes/dml":{ns:"http://zorba.io/modules/store/static/indexes/dml",description:' This module defines a set of functions to probe and refresh indexes which are\n declared in the prolog of a module.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n This module is part of\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="../zorba/xqddf.html">Zorba\'s XQuery Data Definition Facility</a>.\n All the indexes managed by this module have to be pre-declared in the prolog\n of a library module.\n Please refer to the\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="../zorba/data_lifecycle.html">general documentation</a>\n for more information and examples.\n',sees:['<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0"><a href="../zorba/data_lifecycle.html">Data Lifecycle</a></xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0"><a href="../zorba/xqddf.html">XQuery Data Definition Facility</a></xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://zorba.io/modules/store/static/indexes/ddl</xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://zorba.io/modules/store/static/collections/dml</xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://zorba.io/modules/store/static/collections/ddl</xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://zorba.io/modules/store/static/integrity-constraints/ddl</xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://zorba.io/modules/store/static/integrity-constraints/dml</xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://zorba.io/errors</xqdoc:see>'],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Zorba Team</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://zorba.io/modules/store/static/indexes/dml",prefix:"idml"},{uri:"http://zorba.io/options/versioning",prefix:"ver"},{uri:"http://zorba.io/errors",prefix:"zerr"}],functions:[{isDocumented:!0,arity:1,name:"keys",qname:"idml:keys",signature:"($name as xs:QName) as node()* external",description:' Gets a sequence of all keys contained in the index with the given name.\n Each element has the following structure:\n  <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="brush: xml;">\n   &lt;key xmlns="http://zorba.io/modules/store/static/indexes/dml"&gt;\n     &lt;attribute value="key1_value"/&gt;\n     &lt;attribute value="key2_value"/&gt;\n     &lt;attribute value="key3_value"/&gt;\n   &lt;/key&gt;\n  </pre>\n Note that the order of the attribute elements reflects the order of\n the keys in the index specification. Also note that the values in\n these attributes have the type that is declared in the corresponding\n index specification.\n',summary:"<p> Gets a sequence of all keys contained in the index with the given name.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the index to get the keys for.</div>'}],returns:{type:"node()*",description:"A sequence of elements comprising the keys in the index."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0021 if the index was not declared.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0023 if the index does not exist.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"probe-index-point-general",qname:"idml:probe-index-point-general",signature:"($name as xs:QName, $key as xs:anyAtomicType*) as node()* external",description:' Gets from an index the domain nodes associated by general equality with a\n given <em xmlns:xqdoc="http://www.xqdoc.org/1.0">search sequence </em>.\n The search sequence consists of an arbitrary number of <em xmlns:xqdoc="http://www.xqdoc.org/1.0">search keys</em>\n where each search key is an atomic item.\n The function is supported by general indexes only.\n',summary:"<p> Gets from an index the domain nodes associated by general equality with a\n given  search sequence  .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the index to probe.</div>'},{name:"key",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The search sequence.</div>'}],returns:{type:"node()*",description:'The set of domain nodes for which the following XQuery expression returns true: <pre xmlns:xqdoc="http://www.xqdoc.org/1.0"> $keys = $node/keyExpr </pre> where keyExpr is the expression specified in the keyspec of the index (remember that for general indexes, there can be only one keyspec).'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XPTY0004 if the search sequence contains a search key whose type does not match the sequence type specified in the keyspec of the index.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0021 if the index with name $name is not declared.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0023 if the index with name $name does not exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0029 if the index is not general.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"probe-index-point-value-skip",qname:"idml:probe-index-point-value-skip",signature:"($name as xs:QName, $skip as xs:integer, $key_i as xs:anyAtomicType?) as node()* external",description:' This is an extension of the <code xmlns:xqdoc="http://www.xqdoc.org/1.0">probe-index-point-value()</code> function\n in that it allows index items to be skipped.\n',summary:"<p> This is an extension of the  probe-index-point-value()  function\n in that it allows index items to be skipped.</p>",annotation_str:" %an:variadic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"variadic",value:""}],updating:!1,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the index to probe.</div>'},{name:"skip",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The number of index items to skip.</div>'},{name:"key_i",type:"xs:anyAtomicType",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The search keys used to probe the index with. The i-th search key corresponds to the i-th key expression in the index declaration.</div>'}],returns:{type:"node()*",description:"The set of domain nodes that satisfy the search condition."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0021 if the index is not declared.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0023 if the index does not exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0025 if the number of search keys passed as arguments is not the same as the number of keys declared for the index.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XPTY0004 if a non-empty seach key is given whose type does not match the sequence type specified in the corresponding keyspec.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"probe-index-point-value",qname:"idml:probe-index-point-value",signature:"($name as xs:QName, $key_i as xs:anyAtomicType?) as node()* external",description:' Gets the domain nodes from an index associated by value equality with a\n given <em xmlns:xqdoc="http://www.xqdoc.org/1.0">search tuple</em>.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The search tuple consists of a number of <em xmlns:xqdoc="http://www.xqdoc.org/1.0">search keys</em> where each\n search key is either an atomic item or the empty sequence.  The number of\n search keys given must be equal to the number of keys declared for the\n index. Since the number of keys differs from one index to another, this\n function is variadic.\n',summary:"<p> Gets the domain nodes from an index associated by value equality with a\n given  search tuple .</p>",annotation_str:" %an:variadic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"variadic",value:""}],updating:!1,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The of the index to probe.</div>'},{name:"key_i",type:"xs:anyAtomicType",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A search key used to probe the index with. The i-th search key corresponds to the i-th key expression in the index declaration.</div>'}],returns:{type:"node()*",description:'The set of domain nodes for which the following XQuery expression returns true: <pre xmlns:xqdoc="http://www.xqdoc.org/1.0"> $key1 eq $node/keyExpr1 and ... and $keyM eq $node/keyExprM </pre> where <i xmlns:xqdoc="http://www.xqdoc.org/1.0">keyExpr<sub>i</sub></i> is the expression specified in the i-th keyspec of the index.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0021 if the index is not declared.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0023 if the index does not exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0025 if the number of search keys passed as arguments is not the same as the number of keys declared for the index.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XPTY0004 if a non-empty seach key is given whose type does not match the sequence type specified in the corresponding keyspec.</xqdoc:error>']},{isDocumented:!0,arity:7,name:"probe-index-range-general",qname:"idml:probe-index-range-general",signature:"($name as xs:QName, $lowerBound as xs:anyAtomicType*, $upperBound as xs:anyAtomicType*, $haveLowerBound as xs:boolean, $haveUpperBound as xs:boolean, $lowerBoundIncluded as xs:boolean, $upperBoundIncluded as xs:boolean) as node()* external",description:' Gets the domain nodes associated by general order-comparison (operators\n <code xmlns:xqdoc="http://www.xqdoc.org/1.0">&lt;=</code>, <code xmlns:xqdoc="http://www.xqdoc.org/1.0">&lt;</code>, <code xmlns:xqdoc="http://www.xqdoc.org/1.0">&gt;=</code>,\n <code xmlns:xqdoc="http://www.xqdoc.org/1.0">&gt;</code>) with one or two <em xmlns:xqdoc="http://www.xqdoc.org/1.0">search sequences</em>.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Each search sequence consists of an arbitrary number of\n <em xmlns:xqdoc="http://www.xqdoc.org/1.0">search keys</em> where each search key is an atomic item.\n This method is supported by general range indexes only.\n Its result is either an error or the set of domain nodes for which the\n following XQuery expression returns true:\n  <pre xmlns:xqdoc="http://www.xqdoc.org/1.0">\n    if ( $haveLowerBound and $haveUpperBound ) then\n      $lowerBoundKeys lop $node/keyExpr and $node/keyExpr uop $upperBoundKeys\n    else if ( $haveLowerBound ) then\n      $lowerBoundKeys lop $node/keyExpr\n    else if ( $haveUpperBound ) then\n      $node/keyExpr uop $upperBoundKeys\n    else\n      fn:true()\n  </pre>\n where <i xmlns:xqdoc="http://www.xqdoc.org/1.0">keyExpr</i> is the expression specified in the keyspec of the\n index, <i xmlns:xqdoc="http://www.xqdoc.org/1.0">lop</i> is either the <code xmlns:xqdoc="http://www.xqdoc.org/1.0">&lt;=</code> or the <code xmlns:xqdoc="http://www.xqdoc.org/1.0">&lt;</code>\n operator depending on whether <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$lowerBoundsIncluded</code> is true or\n false, and <i xmlns:xqdoc="http://www.xqdoc.org/1.0">uop</i> is either the <code xmlns:xqdoc="http://www.xqdoc.org/1.0">&lt;=</code> or the\n <code xmlns:xqdoc="http://www.xqdoc.org/1.0">&lt;</code> operator depending on whether\n <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$upperBoundsIncluded</code> is true or false.\n',summary:"<p> Gets the domain nodes associated by general order-comparison (operators\n  &lt;= ,  &lt; ,  &gt;= ,\n  &gt; ) with one or two  search sequences .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The of the index to probe.</div>'},{name:"lowerBound",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The lower bound search sequence.</div>'},{name:"upperBound",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The upper bound search sequence.</div>'},{name:"haveLowerBound",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Whether a lower bound search sequence exists or not.</div>'},{name:"haveUpperBound",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Whether an upper bound search sequence exists or not.</div>'},{name:"lowerBoundIncluded",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Whether to use the <code>&lt;=</code> or the <code>&lt;</code> operator when comparing a search key from <code>$lowerBound</code> with an index key.</div>'},{name:"upperBoundIncluded",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Whether to use the <code>&lt;=</code> or the <code>&lt;</code> operator when comparing an index key with a search key from <code>$upperBound</code>.</div>'}],returns:{type:"node()*",description:"The set of domain nodes that satisfy the search condition."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0021 if the index was not declared.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0023 if the index does not exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0030 if the index is not a general range index.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XPTY0004 if <code>$haveLowerBound</code> is true and <code>$lowerBoundKeys</code> contains an atomic item whose type does not match the sequence type specified by the index keyspec, or <code>$haveUpperBound</code> is true and <code>$upperBoundKeys</code> contains an atomic item whose type does not match the sequence type specified by the index keyspec.</xqdoc:error>']},{isDocumented:!0,arity:8,name:"probe-index-range-value-skip",qname:"idml:probe-index-range-value-skip",signature:"($name as xs:QName, $skip as xs:integer, $lowerBound-i as xs:anyAtomicType?, $upperBound-i as xs:anyAtomicType?, $haveLowerBound-i as xs:boolean, $haveUpperBound-i as xs:boolean, $lowerBoundIncluded-i as xs:boolean, $upperBoundIncluded-i as xs:boolean) as node()* external",description:' This function is an extension of the <code xmlns:xqdoc="http://www.xqdoc.org/1.0">probe-index-range-value()</code>\n function that index items to be skipped.\n',summary:"<p> This function is an extension of the  probe-index-range-value() \n function that index items to be skipped.</p>",annotation_str:" %an:variadic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"variadic",value:""}],updating:!1,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The QName of the index to probe</div>'},{name:"skip",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The number of index items to skip.</div>'},{name:"lowerBound-i",type:"xs:anyAtomicType",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The lower bound in a range of key values.</div>'},{name:"upperBound-i",type:"xs:anyAtomicType",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The upper bound in a range of key values.</div>'},{name:"haveLowerBound-i",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> If false, then there is no lower bound, or equivalently, the lower bound is -INFINITY. Otherwise, the lower bound is the one given by the <code>$lowerBound-i</code> value.</div>'},{name:"haveUpperBound-i",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> If false, then there is no upper bound, or equivalently, the upper bound is +INFINITY. Otherwise, the upper bound is the one given by the <code>$upperBound-i</code> value.</div>'},{name:"lowerBoundIncluded-i",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> If false, then the range is open from below, i.e., the lowerBound-i value is not considered part of the range. Otherwise, the range is closed from below, i.e., the <code>$lowerBound-i</code> value is part of the range.</div>'},{name:"upperBoundIncluded-i",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> If false, then the range is open from above, i.e., the upperBound-i value is not considered part of the range. Otherwise, the range is closed from above, i.e., the <code>$upperBound-i</code> value is part of the range.</div>'}],returns:{type:"node()*",description:"The set of domain nodes that satisfy the search condition."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0021 if the index with name $name is not declared.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0023 if the index with name $name does not exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0025 if the number of rangespecs passed as arguments is zero or greater than the number of keys declared for the index.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0026 if the index is not a range index.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XPTY0004 if <code>$haveLowerBound-i</code> is true and <code>$lowerBound-i</code> is an atomic item whose type does not match the sequence type specified by the i<sup>th</sup> keyspec, or <code>$haveUpperBound-i</code> is true and <code>$upperBound-i</code> is an atomic item whose type does not match the sequence type specified by the i<sup>th</sup> keyspec.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0034 if (a) the index is general (in which case there is only one rangespac), (b) the index is untyped, (c) there is both a lower and an upper bound, and (d) if T1 and T2 are the types of the lower and upper bound, neither T1 is a subtype of T2 nor T2 is a subtype of T1.</xqdoc:error>']},{isDocumented:!0,arity:7,name:"probe-index-range-value",qname:"idml:probe-index-range-value",signature:"($name as xs:QName, $lowerBound-i as xs:anyAtomicType?, $upperBound-i as xs:anyAtomicType?, $haveLowerBound-i as xs:boolean, $haveUpperBound-i as xs:boolean, $lowerBoundIncluded-i as xs:boolean, $upperBoundIncluded-i as xs:boolean) as node()* external",description:' Gets the domain nodes associated by value order-comparison (operators\n <code xmlns:xqdoc="http://www.xqdoc.org/1.0">le</code>, <code xmlns:xqdoc="http://www.xqdoc.org/1.0">lt</code>, <code xmlns:xqdoc="http://www.xqdoc.org/1.0">ge</code>, <code xmlns:xqdoc="http://www.xqdoc.org/1.0">gt</code>) with a\n given <em xmlns:xqdoc="http://www.xqdoc.org/1.0">search box</em>.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The search box is specified as a number <i xmlns:xqdoc="http://www.xqdoc.org/1.0">M</i> of <em xmlns:xqdoc="http://www.xqdoc.org/1.0">rangespecs</em>\n where each rangespec consists of six values.\n The number <i xmlns:xqdoc="http://www.xqdoc.org/1.0">M</i> must be greater than 0 and less than or equal to the\n number <i xmlns:xqdoc="http://www.xqdoc.org/1.0">N</i> of keyspecs found in the index declaration.\n If <i xmlns:xqdoc="http://www.xqdoc.org/1.0">M</i> &lt; <i xmlns:xqdoc="http://www.xqdoc.org/1.0">N</i>, then the "missing" rangespecs are assumed to have\n the following value: [(), (), false, false, false, false].\n As a result, we can assume that <i xmlns:xqdoc="http://www.xqdoc.org/1.0">M</i> = <i xmlns:xqdoc="http://www.xqdoc.org/1.0">N</i>.\n Remember that for general indexes, there can be only one IndexKeySpec and,\n as a result for general indexes, <i xmlns:xqdoc="http://www.xqdoc.org/1.0">M</i> = <i xmlns:xqdoc="http://www.xqdoc.org/1.0">N</i> = 1.\n Since the number of keys differs from one index to another,\n this function is variadic.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The i<sup xmlns:xqdoc="http://www.xqdoc.org/1.0">th</sup> rangespec corresponds to the i<sup xmlns:xqdoc="http://www.xqdoc.org/1.0">th</sup> keyspec, and\n specifies a search condition on the key values that are produced by\n evaluating that keyspec for every domain node.\n Specifically, we define the i<sup xmlns:xqdoc="http://www.xqdoc.org/1.0">th</sup> <em xmlns:xqdoc="http://www.xqdoc.org/1.0">rangespec result</em> as the\n set of domain nodes for which the following XQuery expression returns\n true:\n  <pre xmlns:xqdoc="http://www.xqdoc.org/1.0">\n    if ( $haveLowerBound-i and $haveUpperBound-i ) then\n      $lowerBound-i lop $node/keyExpr-i and $node/keyExpr-i uop $upperBound-i\n    else if ( $haveLowerBound-i ) then\n      $lowerBound-i lop $node/keyExpr-i\n    else if ( $haveUpperBound-i ) then\n      $node/keyExpr-i uop $upperBound-i\n    else\n      fn:true()\n  </pre>\n where <i xmlns:xqdoc="http://www.xqdoc.org/1.0">keyExpr-i</i> is the expression specified by the i<sup xmlns:xqdoc="http://www.xqdoc.org/1.0">th</sup>\n keyspec of the index, <i xmlns:xqdoc="http://www.xqdoc.org/1.0">lop</i> is either the <code xmlns:xqdoc="http://www.xqdoc.org/1.0">le</code> or the\n <code xmlns:xqdoc="http://www.xqdoc.org/1.0">lt</code> operator depending on whether\n <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$lowerBoundsIncluded-i</code> is true or false, and <i xmlns:xqdoc="http://www.xqdoc.org/1.0">uop</i> is\n either the <i xmlns:xqdoc="http://www.xqdoc.org/1.0">le</i> or the <i xmlns:xqdoc="http://www.xqdoc.org/1.0">lt</i> operator depending on whether\n <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$upperBoundsIncluded-i</code> is true or false.\n',summary:"<p> Gets the domain nodes associated by value order-comparison (operators\n  le ,  lt ,  ge ,  gt ) with a\n given  search box .</p>",annotation_str:" %an:variadic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"variadic",value:""}],updating:!1,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the index to probe.</div>'},{name:"lowerBound-i",type:"xs:anyAtomicType",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The lower bound in a range of key values.</div>'},{name:"upperBound-i",type:"xs:anyAtomicType",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The upper bound in a range of key values.</div>'},{name:"haveLowerBound-i",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> If false, then there is no lower bound, or equivalently, the lower bound is -INFINITY. Otherwise, the lower bound is the one given by the <code>$lowerBound-i</code> value.</div>'},{name:"haveUpperBound-i",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> If false, then there is no upper bound, or equivalently, the upper bound is +INFINITY. Otherwise, the upper bound is the one given by the <code>$upperBound-i</code> value.</div>'},{name:"lowerBoundIncluded-i",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> If false, then the range is open from below, i.e., the <code>$lowerBound-i</code> value is not considered part of the range. Otherwise, the range is closed from below, i.e., the <code>$lowerBound-i</code> value is part of the range.</div>'},{name:"upperBoundIncluded-i",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> If false, then the range is open from above, i.e., the <code>$upperBound-i</code> value is not considered part of the range. Otherwise, the range is closed from above, i.e., the <code>$upperBound-i</code> value is part of the range.</div>'}],returns:{type:"node()*",description:"The intersection of all the rangespec results."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0021 if the index is not declared.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0023 if the index does not exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0025 if the number of rangespecs passed as arguments is zero or greater than the number of keys declared for the index.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0026 if the index is not a range index.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XPTY0004 if <code>$haveLowerBound-i</code> is true and <code>$lowerBound-i</code> is an atomic item whose type does not match the sequence type specified by the i<sup>th</sup> keyspec, or <code>$haveUpperBound-i</code> is true and <code>$upperBound-i</code> is an atomic item whose type does not match the sequence type specified by the i<sup>th</sup> keyspec.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0034 if (a) the index is general (in which case there is only one rangespac), (b) the index is untyped, (c) there is both a lower and an upper bound, and (d) if T1 and T2 are the types of the lower and upper bound, neither T1 is a subtype of T2 nor T2 is a subtype of T1.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"refresh-index",qname:"idml:refresh-index",signature:"($name as xs:QName) external",description:" Updates the index with the given name.  Note that if the maintenance\n property of the index is automatic, this function does nothing.\n",summary:"<p> Updates the index with the given name.</p>",annotation_str:"",annotations:[],updating:!0,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the index to refresh.</div>'}],returns:{type:null,description:"An empty XDM instance and a pending update list that, when applied, refreshes the contents of the index."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0021 if the index is not declared.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0023 if the index does not exist.</xqdoc:error>']}],variables:[]},"http://www.28msec.com/modules/full-text":{ns:"http://www.28msec.com/modules/full-text",description:' This module provides an API to full-text functions such as tokenization,\n stemming, or stop word detection. The default language is set to english\n for all functions that don\'t take an explicit language parameter.\n <h2 xmlns:xqdoc="http://www.xqdoc.org/1.0">Notes on stemming</h2>\n The <code xmlns:xqdoc="http://www.xqdoc.org/1.0">stem()</code> functions return the\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://en.wikipedia.org/wiki/Word_stem">stem</a>\n of a word.\n On 28.io,\n the stem of a word itself, however, is not guaranteed to be a word.\n It is best to consider a stem as an opaque byte sequence.\n All that is guaranteed about a stem is that,\n for a given word,\n the stem of that word will always be the same byte sequence.\n Hence,\n you sould never compare the result of one of the <code xmlns:xqdoc="http://www.xqdoc.org/1.0">stem()</code>\n functions against a non-stemmed string,\n for example:\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static">\n  if ( ft:stem( "apples" ) eq "apple" )             ** WRONG **\n </pre>\n Instead do:\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static">\n  if ( ft:stem( "apples" ) eq ft:stem( "apple" ) )  ** CORRECT **\n </pre>\n <h2 xmlns:xqdoc="http://www.xqdoc.org/1.0">Notes on the thesaurus</h2>\n 28msec uses the\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://wordnet.princeton.edu/">WordNet lexical database</a> version 3.0,\n In WordNet, the number of "levels" that two phrases are apart\n are how many hierarchical meanings apart they are.\n For example,\n "canary" is 5 levels away from "vertebrate"\n (carary &gt; finch &gt; oscine &gt; passerine &gt; bird &gt; vertebrate).\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n When using the WordNet implementation,\n 28msec supports all of the relationships (and their abbreviations)\n specified by\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=7776">ISO 2788</a>\n and\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.niso.org/kst/reports/standards?step=2&amp;gid=&amp;project_key=7cc9b583cb5a62e8c15d3099e0bb46bbae9cf38a">ANSI/NISO Z39.19-2005</a>\n with the exceptions of "HN" (history note)\n and "X SN" (see scope note for).\n These relationships are:\n  <table xmlns:xqdoc="http://www.xqdoc.org/1.0" class="table table-bordered">\n    <tr>\n      <th>Rel.</th>\n      <th>Meaning</th>\n      <th>WordNet Rel.</th>\n    </tr>\n    <tr>\n      <td>BT</td>\n      <td>broader term</td>\n      <td>hypernym</td>\n    </tr>\n    <tr>\n      <td>BTG</td>\n      <td>broader term generic</td>\n      <td>hypernym</td>\n    </tr>\n    <tr>\n      <td>BTI</td>\n      <td>broader term instance</td>\n      <td>instance hypernym</td>\n    </tr>\n    <tr>\n      <td>BTP</td>\n      <td>broader term partitive</td>\n      <td>part meronym</td>\n    </tr>\n    <tr>\n      <td>NT</td>\n      <td>narrower term</td>\n      <td>hyponym</td>\n    </tr>\n    <tr>\n      <td>NTG</td>\n      <td>narrower term generic</td>\n      <td>hyponym</td>\n    </tr>\n    <tr>\n      <td>NTI</td>\n      <td>narrower term instance</td>\n      <td>instance hyponym</td>\n    </tr>\n    <tr>\n      <td>NTP</td>\n      <td>narrower term partitive</td>\n      <td>part holonym</td>\n    </tr>\n    <tr>\n      <td>RT</td>\n      <td>related term</td>\n      <td>also see</td>\n    </tr>\n    <tr>\n      <td>SN</td>\n      <td>scope note</td>\n      <td>n/a</td>\n    </tr>\n    <tr>\n      <td>TT</td>\n      <td>top term</td>\n      <td>hypernym</td>\n    </tr>\n    <tr>\n      <td>UF</td>\n      <td>non-preferred term</td>\n      <td>n/a</td>\n    </tr>\n    <tr>\n      <td>USE</td>\n      <td>preferred term</td>\n      <td>n/a</td>\n    </tr>\n  </table>\n Note that you can specify relationships\n either by their abbreviation\n or their meaning.\n Relationships are case-insensitive.\n In addition to the\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=7776">ISO 2788</a>\n and\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.niso.org/kst/reports/standards?step=2&amp;gid=&amp;project_key=7cc9b583cb5a62e8c15d3099e0bb46bbae9cf38a">ANSI/NISO Z39.19-2005</a>\n relationships,\n 28msec also supports all of the relationships offered by WordNet.\n These relationships are:\n  <table xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ft_rels table table-bordered">\n    <tr>\n      <th>Relationship</th>\n      <th>Meaning</th>\n    </tr>\n    <tr>\n      <td nowrap="nowrap">also see</td>\n      <td>\n        A word that is related to another,\n        e.g., for "varnished" (furniture)\n        one should <em>also see</em> "finished."\n      </td>\n    </tr>\n    <tr>\n      <td>antonym</td>\n      <td>\n        A word opposite in meaning to another,\n        e.g., "light" is an <em>antonym</em> for "heavy."\n      </td>\n    </tr>\n    <tr>\n      <td>attribute</td>\n      <td>\n        A noun for which adjectives express values,\n        e.g., "weight" is an <em>attribute</em>\n        for which the adjectives "light" and "heavy"\n        express values.\n      </td>\n    </tr>\n    <tr>\n      <td>cause</td>\n      <td>\n        A verb that causes another,\n        e.g., "show" is a <em>cause</em> of "see."\n      </td>\n    </tr>\n    <tr>\n      <td nowrap="nowrap">derivationally related form</td>\n      <td>\n        A word that is derived from a root word,\n        e.g., "metric" is a <em>derivationally related form</em> of "meter."\n      </td>\n    </tr>\n    <tr>\n      <td nowrap="nowrap">derived from adjective</td>\n      <td>\n        An adverb that is derived from an adjective,\n        e.g., "correctly" is <em>derived from the adjective</em> "correct."\n      </td>\n    </tr>\n    <tr>\n      <td>entailment</td>\n      <td>\n        A verb that presupposes another,\n        e.g., "snoring" <em>entails</em> "sleeping."\n      </td>\n    </tr>\n    <tr>\n      <td>hypernym</td>\n      <td>\n        A word with a broad meaning that more specific words fall under,\n        e.g., "meal" is a <em>hypernym</em> of "breakfast."\n      </td>\n    </tr>\n    <tr>\n      <td>hyponym</td>\n      <td>\n        A word of more specific meaning than a general term applicable to it,\n        e.g., "breakfast" is a <em>hyponym</em> of "meal."\n      </td>\n    </tr>\n    <tr>\n      <td nowrap="nowrap">instance hypernym</td>\n      <td>\n        A word that denotes a category of some specific instance,\n        e.g., "author" is an <em>instance hypernym</em> of "Asimov."\n      </td>\n    </tr>\n    <tr>\n      <td nowrap="nowrap">instance hyponym</td>\n      <td>\n        A term that donotes a specific instance of some general category,\n        e.g., "Asimov" is an <em>instance hyponym</em> of "author."\n      </td>\n    </tr>\n    <tr>\n      <td nowrap="nowrap">member holonym</td>\n      <td>\n        A word that denotes a collection of individuals,\n        e.g., "faculty" is a <em>member holonym</em> of "professor."\n      </td>\n    </tr>\n    <tr>\n      <td nowrap="nowrap">member meronym</td>\n      <td>\n        A word that denotes a member of a larger group,\n        e.g., a "person" is a <em>member meronym</em> of a "crowd."\n      </td>\n    </tr>\n    <tr>\n      <td nowrap="nowrap">part holonym</td>\n      <td>\n        A word that denotes a larger whole comprised of some part,\n        e.g., "car" is a <em>part holonym</em> of "engine."\n      </td>\n    </tr>\n    <tr>\n      <td nowrap="nowrap">part meronym</td>\n      <td>\n        A word that denotes a part of a larger whole,\n        e.g., an "engine" is <em>part meronym</em> of a "car."\n      </td>\n    </tr>\n    <tr>\n      <td nowrap="nowrap">participle of verb</td>\n      <td>\n        An adjective that is the participle of some verb,\n        e.g., "breaking" is the <em>participle of the verb</em> "break."\n      </td>\n    </tr>\n    <tr>\n      <td>pertainym</td>\n      <td>\n        An adjective that classifies its noun,\n        e.g., "musical" is a <em>pertainym</em> in "musical instrument."\n      </td>\n    </tr>\n    <tr>\n      <td nowrap="nowrap">similar to</td>\n      <td>\n        Similar, though not necessarily interchangeable, adjectives.\n        For example, "shiny" is <em>similar to</em> "bright",\n        but they have subtle differences.\n      </td>\n    </tr>\n    <tr>\n      <td nowrap="nowrap">substance holonym</td>\n      <td>\n        A word that denotes a larger whole containing some constituent\n        substance, e.g., "bread" is a <em>substance holonym</em> of "flour."\n      </td>\n    </tr>\n    <tr>\n      <td nowrap="nowrap">substance meronym</td>\n      <td>\n        A word that denotes a constituant substance of some larger whole,\n        e.g., "flour" is a <em>substance meronym</em> of "bread."\n      </td>\n    </tr>\n    <tr>\n      <td nowrap="nowrap">verb group</td>\n      <td>\n        A verb that is a member of a group of similar verbs,\n        e.g., "live" is in the <em>verb group</em>\n        of "dwell", "live", "inhabit", etc.\n      </td>\n    </tr>\n  </table>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Paul J. Lucas</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://www.w3.org/2005/xqt-errors",prefix:"err"},{uri:"http://www.28msec.com/modules/full-text",prefix:"ft"},{uri:"http://zorba.io/options/versioning",prefix:"ver"},{uri:"http://zorba.io/errors",prefix:"zerr"},{uri:"http://zorba.io/modules/full-text",prefix:"zft"}],functions:[{isDocumented:!0,arity:1,name:"is-stem-lang-supported",qname:"ft:is-stem-lang-supported",signature:"($lang as language) as boolean",description:" Checks whether the given language is supported for stemming.\n",summary:"<p> Checks whether the given language is supported for stemming.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"lang",type:"language",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The language to check.</div>'}],returns:{type:"boolean",description:'<code xmlns:xqdoc="http://www.xqdoc.org/1.0">true</code> only if the language is supported.'},errors:[]},{isDocumented:!0,arity:1,name:"is-stop-word-lang-supported",qname:"ft:is-stop-word-lang-supported",signature:"($lang as language) as boolean",description:" Checks whether the given language\n is supported for stop words.\n",summary:"<p> Checks whether the given language\n is supported for stop words.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"lang",type:"language",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The language to check.</div>'}],returns:{type:"boolean",description:'<code xmlns:xqdoc="http://www.xqdoc.org/1.0">true</code> only if the language is supported.'},errors:[]},{isDocumented:!0,arity:1,name:"is-stop-word",qname:"ft:is-stop-word",signature:"($word as string) as boolean",description:" Checks whether the given word is a stop-word.\n",summary:"<p> Checks whether the given word is a stop-word.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"word",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The word to check. The word\'s language is assumed to be the one returned by <code>ft:current-lang()</code>.</div>'}],returns:{type:"boolean",description:'<code xmlns:xqdoc="http://www.xqdoc.org/1.0">true</code> only if <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$word</code> is a stop-word.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FTST0009 if <code>ft:current-lang()</code> is not supported.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"is-stop-word",qname:"ft:is-stop-word",signature:"($word as string, $lang as language) as boolean",description:" Checks whether the given word is a stop-word.\n",summary:"<p> Checks whether the given word is a stop-word.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"word",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The word to check.</div>'},{name:"lang",type:"language",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The language of <code>$word</code>.</div>'}],returns:{type:"boolean",description:'<code xmlns:xqdoc="http://www.xqdoc.org/1.0">true</code> only if <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$word</code> is a stop-word.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FTST0009 if <code>$lang</code> is not supported.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"is-thesaurus-lang-supported",qname:"ft:is-thesaurus-lang-supported",signature:"($lang as language) as boolean",description:" Checks whether the given language\n is supported for look-up using the Wordnet thesaurus.\n",summary:"<p> Checks whether the given language\n is supported for look-up using the Wordnet thesaurus.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"lang",type:"language",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The language to check.</div>'}],returns:{type:"boolean",description:'<code xmlns:xqdoc="http://www.xqdoc.org/1.0">true</code> only if the language is supported.'},errors:[]},{isDocumented:!0,arity:1,name:"is-tokenizer-lang-supported",qname:"ft:is-tokenizer-lang-supported",signature:"($lang as language) as boolean",description:" Checks whether the given language\n is supported for tokenization.\n",summary:"<p> Checks whether the given language\n is supported for tokenization.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"lang",type:"language",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The language to check.</div>'}],returns:{type:"boolean",description:'<code xmlns:xqdoc="http://www.xqdoc.org/1.0">true</code> only if the language is supported.'},errors:[]},{isDocumented:!0,arity:1,name:"stem",qname:"ft:stem",signature:"($word as string) as string",description:" Stems the given word.\n",summary:"<p> Stems the given word.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"word",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The word to stem. The word\'s language is assumed to be the one returned by <code>ft:current-lang()</code>.</div>'}],returns:{type:"string",description:'the stem of <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$word</code>.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FTST0009 if <code>ft:current-lang()</code> is not supported.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"stem",qname:"ft:stem",signature:"($word as string, $lang as language) as string",description:" Stems the given word.\n",summary:"<p> Stems the given word.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"word",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The word to stem.</div>'},{name:"lang",type:"language",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The language of <code>$word</code>.</div>'}],returns:{type:"string",description:'the stem of <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$word</code>.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FTST0009 if <code>$lang</code> is not supported.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"strip-diacritics",qname:"ft:strip-diacritics",signature:"($string as string) as string",description:" Strips all diacritical marks from all characters.\n",summary:"<p> Strips all diacritical marks from all characters.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"string",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The string to strip diacritical marks from.</div>'}],returns:{type:"string",description:'<code xmlns:xqdoc="http://www.xqdoc.org/1.0">$string</code> with diacritical marks stripped.'},errors:[]},{isDocumented:!0,arity:1,name:"thesaurus-lookup",qname:"ft:thesaurus-lookup",signature:"($phrase as string) as string*",description:" Looks-up the given phrase in the Wordnet thesaurus.\n",summary:"<p> Looks-up the given phrase in the Wordnet thesaurus.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"phrase",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The phrase to look up.</div>'}],returns:{type:"string*",description:'the related phrases if <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$phrase</code> is found in the thesaurus or the empty sequence if not.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FTST0009 if <code>ft:current-lang()</code> is not supported.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZXQP8401 if the thesaurus data file\'s version is not supported by the currently running version of Zorba.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZXQP8402 if the thesaurus data file\'s endianness does not match that of the CPU on which Zorba is currently running.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZXQP8403 if there was an error reading the thesaurus data.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"thesaurus-lookup",qname:"ft:thesaurus-lookup",signature:"($phrase as string, $relationship as string) as string*",description:" Looks-up the given phrase in a thesaurus.\n",summary:"<p> Looks-up the given phrase in a thesaurus.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"phrase",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The phrase to look up.</div>'},{name:"relationship",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The relationship the results are to have to <code>$phrase</code>.</div>'}],returns:{type:"string*",description:'the related phrases if <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$phrase</code> is found in the thesaurus or the empty sequence if not.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FTST0018 if <code>$uri</code> refers to a thesaurus that is not found in the statically known thesauri.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FTST0009 if <code>$lang</code> is not supported.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZOSE0001 if the thesaurus data file could not be found.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZOSE0002 if the thesaurus data file is not a plain file.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZXQP8401 if the thesaurus data file\'s version is not supported by the currently running version of Zorba.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZXQP8402 if the thesaurus data file\'s endianness does not match that of the CPU on which Zorba is currently running.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZXQP8403 if there was an error reading the thesaurus data file.</xqdoc:error>']},{isDocumented:!0,arity:4,name:"thesaurus-lookup",qname:"ft:thesaurus-lookup",signature:"($phrase as string, $relationship as string, $level-least as integer, $level-most as integer) as string*",description:" Looks-up the given phrase in a thesaurus.\n",summary:"<p> Looks-up the given phrase in a thesaurus.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"phrase",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The phrase to look up.</div>'},{name:"relationship",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The relationship the results are to have to <code>$phrase</code>.</div>'},{name:"level-least",type:"integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The minimum number of levels within the thesaurus to be traversed.</div>'},{name:"level-most",type:"integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The maximum number of levels within the thesaurus to be traversed.</div>'}],returns:{type:"string*",description:'the related phrases if <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$phrase</code> is found in the thesaurus or the empty sequence if not.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FOCA0003 if either <code>$level-least</code> or <code>$level-most</code> is either negative or too large.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FTST0018 if <code>$uri</code> refers to a thesaurus that is not found in the statically known thesauri.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FTST0009 if <code>$lang</code> is not supported.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZOSE0001 if the thesaurus data file could not be found.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZOSE0002 if the thesaurus data file is not a plain file.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZXQP8401 if the thesaurus data file\'s version is not supported by the currently running version of Zorba.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZXQP8402 if the thesaurus data file\'s endianness does not match that of the CPU on which Zorba is currently running.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZXQP8403 if there was an error reading the thesaurus data file.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"tokenize",qname:"ft:tokenize",signature:"($string as string) as string*",description:" Tokenizes the given string.\n",summary:"<p> Tokenizes the given string.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"string",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The string to tokenize. The string\'s language is assumed to be the one returned by <code>ft:current-lang()</code>.</div>'}],returns:{type:"string*",description:"a (possibly empty) sequence of tokens."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FTST0009 if <code>ft:current-lang()</code> is not supported.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"tokenize",qname:"ft:tokenize",signature:"($string as string, $lang as language) as string*",description:" Tokenizes the given string.\n",summary:"<p> Tokenizes the given string.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"string",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The string to tokenize.</div>'},{name:"lang",type:"language",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The language of <code>$string</code>.</div>'}],returns:{type:"string*",description:"a (possibly empty) sequence of tokens."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FTST0009 if <code>$lang</code> is not supported.</xqdoc:error>']}],variables:[{name:"ft:lang-da",type:"language",description:" Predeclared constant for the Danish language.\n"},{name:"ft:lang-de",type:"language",description:" Predeclared constant for the German language.\n"},{name:"ft:lang-en",type:"language",description:" Predeclared constant for the English language.\n"},{name:"ft:lang-es",type:"language",description:" Predeclared constant for the Spanish language.\n"},{name:"ft:lang-fi",type:"language",description:" Predeclared constant for the Finnish language.\n"},{name:"ft:lang-fr",type:"language",description:" Predeclared constant for the French language.\n"},{name:"ft:lang-hu",type:"language",description:" Predeclared constant for the Hungarian language.\n"},{name:"ft:lang-it",type:"language",description:" Predeclared constant for the Italian language.\n"},{name:"ft:lang-nl",type:"language",description:" Predeclared constant for the Dutch language.\n"},{name:"ft:lang-no",type:"language",description:" Predeclared constant for the Norwegian language.\n"},{name:"ft:lang-pt",type:"language",description:" Predeclared constant for the Portuguese language.\n"},{name:"ft:lang-ro",type:"language",description:" Predeclared constant for the Romanian language.\n"},{name:"ft:lang-ru",type:"language",description:" Predeclared constant for the Russian language.\n"},{name:"ft:lang-sv",type:"language",description:" Predeclared constant for the Swedish language.\n"},{name:"ft:lang-tr",type:"language",description:" Predeclared constant for the Turkish language.\n"}]},"http://xbrl.io/modules/bizql/report-schemas":{ns:"http://xbrl.io/modules/bizql/report-schemas",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This module provides functions for storing, retrieving, and modifying\n report schemas. Report schemas can be used in BizQL queries. They can be\n instantiated generating a business report.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Report schemas are nothing else than a user-defined component. However,\n one of their hypercubes (the default hypercube), as well as two of their\n networks (presentation, concept-map) are special. A report schema is identified\n with an RID (Report schema ID).</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">With this module, you can retrieve facts from an archive according to a report\n schema. You can retrieve them as a (2D) fact table, or populate the presentation\n network of the report schema with them. The concept map network will be used\n by default to map the report schema concepts to reported concepts.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Report schemas are stored in the collection reportschemas in\n the project\'s MongoDB database.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">A report schema needs to be a syntactically valid JSound document.</p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Charles Hoffman</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Matthias Brantner</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Dennis Knochenwefel</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Ghislain Fourny</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"",prefix:"an"},{uri:"http://xbrl.io/modules/bizql/hypercubes",prefix:"hypercubes"},{uri:"http://xbrl.io/modules/bizql/networks",prefix:"networks"},{uri:"http://xbrl.io/modules/bizql/report-schemas",prefix:"report-schemas"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"add",qname:"report-schemas:add",signature:"($report-schema as object()) as empty-sequence()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Adds the given report schema to the database.</p>\n',summary:"<p>  Adds the given report schema to the database.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"report-schema",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the report schema to add.</div>'}],returns:{type:"empty-sequence()",description:"the empty sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">report-schemas:INVALID-SCHEMA if the given report schema object does not contain a name field</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">report-schemas:EXISTS if a report schema with the given name already exists</xqdoc:error>']},{isDocumented:!0,arity:1,name:"delete",qname:"report-schemas:delete",signature:"($report-schema-or-id as item()) as empty-sequence()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Deletes a report schema from the database.</p>\n',summary:"<p>  Deletes a report schema from the database.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"report-schema-or-id",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the report schema to delete or its RID.</div>'}],returns:{type:"empty-sequence()",description:"the empty sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">report-schemas:DOES-NOT-EXIST if no report schema with the given RID exists.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"fact-table",qname:"report-schemas:fact-table",signature:"($schema as item(), $archives as item()*) as array()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves all facts from the supplied archives, that are relevant to the\n supplied schema, and populates them with the default dimension values\n when missing.</p>\n',summary:"<p>  Retrieves all facts from the supplied archives, that are relevant to the\n supplied schema, and populates them with the default dimension values\n when missing.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"schema",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a schema or its RID,</div>'},{name:"archives",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of archives or their AIDs.</div>'}],returns:{type:"array()",description:"a sequence of facts with populated dimension values."},errors:[]},{isDocumented:!0,arity:3,name:"fact-table",qname:"report-schemas:fact-table",signature:"($schema as item(), $archives as item()*, $options as object()?) as array()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves all facts from the supplied archives, that are relevant to the\n supplied schema, and populates them with the default dimension values\n when missing.</p>\n',summary:"<p>  Retrieves all facts from the supplied archives, that are relevant to the\n supplied schema, and populates them with the default dimension values\n when missing.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"schema",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a schema or its RID,</div>'},{name:"archives",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of archives or their AIDs or $report-schemas:ALL_ARCHIVES for no filtering.</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> <a href="facts#standard_options">standard fact retrieving options</a>.</div>'}],returns:{type:"array()",description:"a sequence of facts with populated dimension values."},errors:[]},{isDocumented:!0,arity:2,name:"facts",qname:"report-schemas:facts",signature:"($schema as item(), $archives as item()*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves all facts from the supplied archives, that are relevant to the\n supplied schema, and populates them with the default dimension values\n when missing.</p>\n',summary:"<p>  Retrieves all facts from the supplied archives, that are relevant to the\n supplied schema, and populates them with the default dimension values\n when missing.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"schema",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a report schema or its RID,</div>'},{name:"archives",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of archives or their AIDs or $report-schemas:ALL_ARCHIVES for no filtering.</div>'}],returns:{type:"object()*",description:"a sequence of facts with populated dimension values."},errors:[]},{isDocumented:!0,arity:3,name:"facts",qname:"report-schemas:facts",signature:"($schema as item(), $archives as item()*, $options as object()?) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves all facts from the supplied archives, that are relevant to the\n supplied schema, and populates them with the default dimension values\n when missing.</p>\n',summary:"<p>  Retrieves all facts from the supplied archives, that are relevant to the\n supplied schema, and populates them with the default dimension values\n when missing.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"schema",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a report schema or its RID,</div>'},{name:"archives",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of archives or their AIDs or $report-schemas:ALL_ARCHIVES for no filtering.</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> <a href="facts#standard_options">standard fact retrieving options</a>.</div>'}],returns:{type:"object()*",description:"a sequence of facts with populated dimension values."},errors:[]},{isDocumented:!0,arity:2,name:"populate-with-facts",qname:"report-schemas:populate-with-facts",signature:"($schema as item(), $archives as item()*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Populates a concept-tree network with all facts from the supplied archives,\n that are relevant to the\n supplied schema. Default dimension values are added to the facts\n when missing.</p>\n',summary:"<p>  Populates a concept-tree network with all facts from the supplied archives,\n that are relevant to the\n supplied schema.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"schema",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0">.</div>'},{name:"archives",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of archives or their AIDs or $report-schemas:ALL_ARCHIVES for no filtering.</div>'}],returns:{type:"object()*",description:"a sequence of facts with populated dimension values."},errors:[]},{isDocumented:!0,arity:3,name:"populate-with-facts",qname:"report-schemas:populate-with-facts",signature:"($schema as item(), $archives as item()*, $options as object()?) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Populates a concept-tree network with all facts from the supplied archives,\n that are relevant to the\n supplied schema. Default dimension values are added to the facts\n when missing.</p>\n',summary:"<p>  Populates a concept-tree network with all facts from the supplied archives,\n that are relevant to the\n supplied schema.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"schema",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0">.</div>'},{name:"archives",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of archives or their AIDs or $report-schemas:ALL_ARCHIVES for no filtering.</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> <a href="facts#standard_options">standard fact retrieving options</a>.</div>'}],returns:{type:"object()*",description:"a sequence of facts with populated dimension values."},errors:[]},{isDocumented:!0,arity:0,name:"report-schemas",qname:"report-schemas:report-schemas",signature:"() as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves all report schemas.</p>\n',summary:"<p>  Retrieves all report schemas.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"object()*",description:"all report schemas."},errors:[]},{isDocumented:!0,arity:1,name:"report-schemas",qname:"report-schemas:report-schemas",signature:"($report-schemas-or-ids as item()*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Return the report schemas with the given names (RIDs).</p>\n',summary:"<p>  Return the report schemas with the given names (RIDs).</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"report-schemas-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the ids of the report schemas (RIDs) or the report schemas themselves.</div>'}],returns:{type:"object()*",description:"the report schemas with the given RIDs or the empty sequence if no report schema was found or the input is an empty sequence."},errors:[]},{isDocumented:!0,arity:1,name:"rid",qname:"report-schemas:rid",signature:"($report-schema-or-id as item()) as atomic",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Converts the input to a normalized report schema identifier (RID). The input\n can be either a pure RID, or a report schema object which contains an RID.</p>\n',summary:"<p>  Converts the input to a normalized report schema identifier (RID).</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"report-schema-or-id",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a report schema identifier (RID)) or a report schema object.</div>'}],returns:{type:"atomic",description:"the normalized RID."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">report-schemas:INVALID_PARAMETER if the RID or report schema is not valid</xqdoc:error>']},{isDocumented:!0,arity:1,name:"update",qname:"report-schemas:update",signature:"($report-schema as object()) as empty-sequence()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Updates a report schema.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Replaces a report schema in the database with the given schema.\n The schema to be replaced is identified by the value of the _id\n field of the given schema (RID).</p>\n',summary:"<p>  Updates a report schema.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"report-schema",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the new report schema</div>'}],returns:{type:"empty-sequence()",description:"the empty sequence"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">report-schemas:DOES-NOT-EXIST if a report schema with the given name does not exist.</xqdoc:error>']}],variables:[{name:"report-schemas:col",type:"string",description:" Name of the collection the report schemas are stored in.\n"},{name:"report-schemas:ALL_ARCHIVES",type:"boolean",description:" Joker for all archives.\n"}]},"http://zorba.io/modules/store/static/integrity-constraints/ddl":{ns:"http://zorba.io/modules/store/static/integrity-constraints/ddl",description:' This module defines a set of functions to manage integrity constraints\n that are declared in the prolog of a module.\n For example, it provides functions to activate or deactivate integrity\n constraints.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n This module is part of\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="../zorba/xqddf.html">Zorba\'s XQuery Data Definition Facility</a>.\n All the integrity constraints managed by this module have to be pre-declared\n in the prolog of a module.\n Please refer to the\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="../zorba/data_lifecycle.html">general documentation</a>\n for more information and examples.\n',sees:['<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0"><a href="../zorba/data_lifecycle.html">Data Lifecycle</a></xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0"><a href="../zorba/xqddf.html">XQuery Data Definition Facility</a></xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://zorba.io/modules/store/static/collections/dml</xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://zorba.io/modules/store/static/collections/ddl</xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://zorba.io/modules/store/static/indexes/ddl</xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://zorba.io/modules/store/static/indexes/dml</xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://zorba.io/modules/store/static/integrity-constraints/dml</xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://zorba.io/errors</xqdoc:see>'],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Nicolae Brinza, Matthias Brantner, David Graf, Till Westmann, Markos Zaharioudakis</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/modules/store/static/integrity-constraints/ddl",prefix:"icddl"},{uri:"http://zorba.io/options/versioning",prefix:"ver"},{uri:"http://zorba.io/errors",prefix:"zerr"}],functions:[{isDocumented:!0,arity:1,name:"activate",qname:"icddl:activate",signature:"($name as xs:QName) external",description:" Activates an integrity constraint in the dynamic context.\n",summary:"<p> Activates an integrity constraint in the dynamic context.</p>",annotation_str:"",annotations:[],updating:!0,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the integrity constraint to activate.</div>'}],returns:{type:null,description:'An empty XDM instance and a pending update list that consists of a <code xmlns:xqdoc="http://www.xqdoc.org/1.0">upd:activateIntegrityConstraint($name)</code> update primitive.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0031 if the integrity constraint does not exist in the static context.</xqdoc:error>']},{isDocumented:!0,arity:0,name:"activated-integrity-constraints",qname:"icddl:activated-integrity-constraints",signature:"() as xs:QName* external",description:" Gets the integrity constraints that are activated, if any.\n",summary:"<p> Gets the integrity constraints that are activated, if any.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:QName*",description:"A sequence of QNames, one for each activated integrity constraint, or an empty sequence if none."},errors:[]},{isDocumented:!0,arity:1,name:"deactivate",qname:"icddl:deactivate",signature:"($name as xs:QName) external",description:" Deactivates the integrity constraint.\n",summary:"<p> Deactivates the integrity constraint.</p>",annotation_str:"",annotations:[],updating:!0,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the integrity constraint to deactivate.</div>'}],returns:{type:null,description:"An empty XDM instance and a pending update list that, once applied, deactivates the integrity constraint."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0032 if the integrity constraint was not declared in the the static context.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0032 if the integrity constraints is not activated.</xqdoc:error>']},{isDocumented:!0,arity:0,name:"declared-integrity-constraints",qname:"icddl:declared-integrity-constraints",signature:"() as xs:QName* external",description:" Gets the sequence of QNames representing the integrity constraints that have\n been declared in the prolog of the static context.\n",summary:"<p> Gets the sequence of QNames representing the integrity constraints that have\n been declared in the prolog of the static context.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:QName*",description:"A sequence of QNames, one for each created integrity constraints, or an emtpy sequence if none."},errors:[]},{isDocumented:!0,arity:1,name:"is-activated-integrity-constraint",qname:"icddl:is-activated-integrity-constraint",signature:"($name as xs:QName) as xs:boolean external",description:" Gets whether an integrity constraints is activated.\n",summary:"<p> Gets whether an integrity constraints is activated.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the constraint to check.</div>'}],returns:{type:"xs:boolean",description:"true if the integrity constraint is activated; false otherwise."},errors:[]},{isDocumented:!0,arity:1,name:"is-declared-integrity-constraint",qname:"icddl:is-declared-integrity-constraint",signature:"($name as xs:QName) as xs:boolean external",description:" Gets whether an integrity constraint is declared in the prolog of the static\n context.\n",summary:"<p> Gets whether an integrity constraint is declared in the prolog of the static\n context.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the constraint to check.</div>'}],returns:{type:"xs:boolean",description:"true if the constraint is declared; false otherwise."},errors:[]}],variables:[]},"http://www.functx.com":{ns:"http://www.functx.com",description:" --------------------------------\n The FunctX XQuery Function Library\n --------------------------------\n Copyright (C) 2007 Datypic\n This library is free software; you can redistribute it and/or\n modify it under the terms of the GNU Lesser General Public\n License as published by the Free Software Foundation; either\n version 2.1 of the License.\n This library is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n Lesser General Public License for more details.\n You should have received a copy of the GNU Lesser General Public\n License along with this library; if not, write to the Free Software\n Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n For more information on the FunctX XQuery library, contact contrib@functx.com.\n",sees:['<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://www.xqueryfunctions.com</xqdoc:see>'],authors:[],version:null,encoding:"utf-8",namespaces:[{uri:"http://www.functx.com",prefix:"functx"}],functions:[{isDocumented:!0,arity:3,name:"add-attributes",qname:"functx:add-attributes",signature:"($elements as element(*)*, $attrNames as xs:QName*, $attrValues as xs:anyAtomicType*) as element(*)?",description:" Adds attributes to XML elements\n",summary:"<p> Adds attributes to XML elements\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"elements",type:"element(*)",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the element(s) to which you wish to add the attribute</div>'},{name:"attrNames",type:"xs:QName",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name(s) of the attribute(s) to add</div>'},{name:"attrValues",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the value(s) of the attribute(s) to add</div>'}],returns:{type:"element(*)?",description:""},errors:[]},{isDocumented:!0,arity:2,name:"add-months",qname:"functx:add-months",signature:"($date as xs:anyAtomicType?, $months as xs:integer) as xs:date?",description:" Adds months to a date\n",summary:"<p> Adds months to a date\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"date",type:"xs:anyAtomicType",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the date</div>'},{name:"months",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number of months to add</div>'}],returns:{type:"xs:date?",description:""},errors:[]},{isDocumented:!0,arity:3,name:"add-or-update-attributes",qname:"functx:add-or-update-attributes",signature:"($elements as element(*)*, $attrNames as xs:QName*, $attrValues as xs:anyAtomicType*) as element(*)?",description:" Adds attributes to XML elements\n",summary:"<p> Adds attributes to XML elements\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"elements",type:"element(*)",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the element(s) to which you wish to add the attribute</div>'},{name:"attrNames",type:"xs:QName",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name(s) of the attribute(s) to add</div>'},{name:"attrValues",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the value(s) of the attribute(s) to add</div>'}],returns:{type:"element(*)?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"all-whitespace",qname:"functx:all-whitespace",signature:"($arg as xs:string?) as xs:boolean",description:" Whether a value is all whitespace or a zero-length string\n",summary:"<p> Whether a value is all whitespace or a zero-length string\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the string (or node) to test</div>'}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:1,name:"are-distinct-values",qname:"functx:are-distinct-values",signature:"($seq as xs:anyAtomicType*) as xs:boolean",description:" Whether all the values in a sequence are distinct\n",summary:"<p> Whether all the values in a sequence are distinct\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"seq",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of values</div>'}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:1,name:"atomic-type",qname:"functx:atomic-type",signature:"($values as xs:anyAtomicType*) as xs:string*",description:" The built-in type of an atomic value\n",summary:"<p> The built-in type of an atomic value\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"values",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the value(s) whose type you want to determine</div>'}],returns:{type:"xs:string*",description:""},errors:[]},{isDocumented:!0,arity:2,name:"avg-empty-is-zero",qname:"functx:avg-empty-is-zero",signature:"($values as xs:anyAtomicType*, $allNodes as node()*) as xs:double",description:' The average, counting "empty" values as zero\n',summary:'<p> The average, counting "empty" values as zero\n</p>',annotation_str:"",annotations:[],updating:!1,parameters:[{name:"values",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the values to be averaged</div>'},{name:"allNodes",type:"node()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of all nodes to find the average over</div>'}],returns:{type:"xs:double",description:""},errors:[]},{isDocumented:!0,arity:3,name:"between-exclusive",qname:"functx:between-exclusive",signature:"($value as xs:anyAtomicType?, $minValue as xs:anyAtomicType, $maxValue as xs:anyAtomicType) as xs:boolean",description:" Whether a value is between two provided values\n",summary:"<p> Whether a value is between two provided values\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"value",type:"xs:anyAtomicType",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the value to be tested</div>'},{name:"minValue",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the minimum value</div>'},{name:"maxValue",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the maximum value</div>'}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:3,name:"between-inclusive",qname:"functx:between-inclusive",signature:"($value as xs:anyAtomicType?, $minValue as xs:anyAtomicType, $maxValue as xs:anyAtomicType) as xs:boolean",description:" Whether a value is between two provided values, or equal to one of them\n",summary:"<p> Whether a value is between two provided values, or equal to one of them\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"value",type:"xs:anyAtomicType",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the value to be tested</div>'},{name:"minValue",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the minimum value</div>'},{name:"maxValue",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the maximum value</div>'}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:2,name:"camel-case-to-words",qname:"functx:camel-case-to-words",signature:"($arg as xs:string?, $delim as xs:string) as xs:string",description:" Turns a camelCase string into space-separated words\n",summary:"<p> Turns a camelCase string into space-separated words\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the string to modify</div>'},{name:"delim",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the delimiter for the words (e.g. a space)</div>'}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:1,name:"capitalize-first",qname:"functx:capitalize-first",signature:"($arg as xs:string?) as xs:string?",description:" Capitalizes the first character of a string\n",summary:"<p> Capitalizes the first character of a string\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the word or phrase to capitalize</div>'}],returns:{type:"xs:string?",description:""},errors:[]},{isDocumented:!0,arity:3,name:"change-element-names-deep",qname:"functx:change-element-names-deep",signature:"($nodes as node()*, $oldNames as xs:QName*, $newNames as xs:QName*) as node()*",description:" Changes the names of elements in an XML fragment\n",summary:"<p> Changes the names of elements in an XML fragment\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"nodes",type:"node()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the element(s) to change</div>'},{name:"oldNames",type:"xs:QName",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of names to change from</div>'},{name:"newNames",type:"xs:QName",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of names to change to</div>'}],returns:{type:"node()*",description:""},errors:[]},{isDocumented:!0,arity:3,name:"change-element-ns-deep",qname:"functx:change-element-ns-deep",signature:"($nodes as node()*, $newns as xs:string, $prefix as xs:string) as node()*",description:" Changes the namespace of XML elements and its descendants\n",summary:"<p> Changes the namespace of XML elements and its descendants\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"nodes",type:"node()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the nodes to change</div>'},{name:"newns",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the new namespace</div>'},{name:"prefix",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the prefix to use for the new namespace</div>'}],returns:{type:"node()*",description:""},errors:[]},{isDocumented:!0,arity:3,name:"change-element-ns",qname:"functx:change-element-ns",signature:"($elements as element(*)*, $newns as xs:string, $prefix as xs:string) as element(*)?",description:" Changes the namespace of XML elements\n",summary:"<p> Changes the namespace of XML elements\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"elements",type:"element(*)",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the elements to change</div>'},{name:"newns",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the new namespace</div>'},{name:"prefix",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the prefix to use for the new namespace</div>'}],returns:{type:"element(*)?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"chars",qname:"functx:chars",signature:"($arg as xs:string?) as xs:string*",description:" Converts a string to a sequence of characters\n",summary:"<p> Converts a string to a sequence of characters\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the string to split</div>'}],returns:{type:"xs:string*",description:""},errors:[]},{isDocumented:!0,arity:2,name:"contains-any-of",qname:"functx:contains-any-of",signature:"($arg as xs:string?, $searchStrings as xs:string*) as xs:boolean",description:" Whether a string contains any of a sequence of strings\n",summary:"<p> Whether a string contains any of a sequence of strings\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the string to test</div>'},{name:"searchStrings",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the strings to look for</div>'}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:2,name:"contains-case-insensitive",qname:"functx:contains-case-insensitive",signature:"($arg as xs:string?, $substring as xs:string) as xs:boolean?",description:" Whether one string contains another, without regard to case\n",summary:"<p> Whether one string contains another, without regard to case\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the string to search</div>'},{name:"substring",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the substring to find</div>'}],returns:{type:"xs:boolean?",description:""},errors:[]},{isDocumented:!0,arity:2,name:"contains-word",qname:"functx:contains-word",signature:"($arg as xs:string?, $word as xs:string) as xs:boolean",description:" Whether one string contains another, as a separate word\n",summary:"<p> Whether one string contains another, as a separate word\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the string to search</div>'},{name:"word",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the word to find</div>'}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:2,name:"copy-attributes",qname:"functx:copy-attributes",signature:"($copyTo as element(*), $copyFrom as element(*)) as element(*)",description:" Copies attributes from one element to another\n",summary:"<p> Copies attributes from one element to another\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"copyTo",type:"element(*)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the element to copy attributes to</div>'},{name:"copyFrom",type:"element(*)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the element to copy attributes from</div>'}],returns:{type:"element(*)",description:""},errors:[]},{isDocumented:!0,arity:3,name:"date",qname:"functx:date",signature:"($year as xs:anyAtomicType, $month as xs:anyAtomicType, $day as xs:anyAtomicType) as xs:date",description:" Construct a date from a year, month and day\n",summary:"<p> Construct a date from a year, month and day\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"year",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the year</div>'},{name:"month",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the month</div>'},{name:"day",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the day</div>'}],returns:{type:"xs:date",description:""},errors:[]},{isDocumented:!0,arity:6,name:"dateTime",qname:"functx:dateTime",signature:"($year as xs:anyAtomicType, $month as xs:anyAtomicType, $day as xs:anyAtomicType, $hour as xs:anyAtomicType, $minute as xs:anyAtomicType, $second as xs:anyAtomicType) as xs:dateTime",description:" Construct a date/time from individual components\n",summary:"<p> Construct a date/time from individual components\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"year",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the year</div>'},{name:"month",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the month</div>'},{name:"day",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the day</div>'},{name:"hour",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the hour</div>'},{name:"minute",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the minute</div>'},{name:"second",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the second</div>'}],returns:{type:"xs:dateTime",description:""},errors:[]},{isDocumented:!0,arity:1,name:"day-in-year",qname:"functx:day-in-year",signature:"($date as xs:anyAtomicType?) as xs:integer?",description:" The day of the year (a number between 1 and 366)\n",summary:"<p> The day of the year (a number between 1 and 366)\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"date",type:"xs:anyAtomicType",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the date</div>'}],returns:{type:"xs:integer?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"day-of-week-abbrev-en",qname:"functx:day-of-week-abbrev-en",signature:"($date as xs:anyAtomicType?) as xs:string?",description:" The abbreviated day of the week, from a date, in English\n",summary:"<p> The abbreviated day of the week, from a date, in English\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"date",type:"xs:anyAtomicType",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the date</div>'}],returns:{type:"xs:string?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"day-of-week-name-en",qname:"functx:day-of-week-name-en",signature:"($date as xs:anyAtomicType?) as xs:string?",description:" The name of the day of the week, from a date, in English\n",summary:"<p> The name of the day of the week, from a date, in English\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"date",type:"xs:anyAtomicType",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the date</div>'}],returns:{type:"xs:string?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"day-of-week",qname:"functx:day-of-week",signature:"($date as xs:anyAtomicType?) as xs:integer?",description:" The day of the week, from a date\n",summary:"<p> The day of the week, from a date\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"date",type:"xs:anyAtomicType",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the date</div>'}],returns:{type:"xs:integer?",description:""},errors:[]},{isDocumented:!0,arity:4,name:"dayTimeDuration",qname:"functx:dayTimeDuration",signature:"($days as xs:decimal?, $hours as xs:decimal?, $minutes as xs:decimal?, $seconds as xs:decimal?) as xs:dayTimeDuration",description:" Construct a dayTimeDuration from a number of days, hours, etc.\n",summary:"<p> Construct a dayTimeDuration from a number of days, hours, etc.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"days",type:"xs:decimal",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number of days</div>'},{name:"hours",type:"xs:decimal",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number of hours</div>'},{name:"minutes",type:"xs:decimal",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number of minutes</div>'},{name:"seconds",type:"xs:decimal",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number of seconds</div>'}],returns:{type:"xs:dayTimeDuration",description:""},errors:[]},{isDocumented:!0,arity:1,name:"days-in-month",qname:"functx:days-in-month",signature:"($date as xs:anyAtomicType?) as xs:integer?",description:" Number of days in the month\n",summary:"<p> Number of days in the month\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"date",type:"xs:anyAtomicType",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the date</div>'}],returns:{type:"xs:integer?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"depth-of-node",qname:"functx:depth-of-node",signature:"($node as node()?) as xs:integer",description:" The depth (level) of a node in an XML tree\n",summary:"<p> The depth (level) of a node in an XML tree\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"node",type:"node()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the node to check</div>'}],returns:{type:"xs:integer",description:""},errors:[]},{isDocumented:!0,arity:1,name:"distinct-attribute-names",qname:"functx:distinct-attribute-names",signature:"($nodes as node()*) as xs:string*",description:" The distinct names of all attributes in an XML fragment\n",summary:"<p> The distinct names of all attributes in an XML fragment\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"nodes",type:"node()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the root to start from</div>'}],returns:{type:"xs:string*",description:""},errors:[]},{isDocumented:!0,arity:1,name:"distinct-deep",qname:"functx:distinct-deep",signature:"($nodes as node()*) as node()*",description:" The XML nodes with distinct values, taking into account attributes and descendants\n",summary:"<p> The XML nodes with distinct values, taking into account attributes and descendants\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"nodes",type:"node()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of nodes to test</div>'}],returns:{type:"node()*",description:""},errors:[]},{isDocumented:!0,arity:1,name:"distinct-element-names",qname:"functx:distinct-element-names",signature:"($nodes as node()*) as xs:string*",description:" The distinct names of all elements in an XML fragment\n",summary:"<p> The distinct names of all elements in an XML fragment\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"nodes",type:"node()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the root(s) to start from</div>'}],returns:{type:"xs:string*",description:""},errors:[]},{isDocumented:!0,arity:1,name:"distinct-element-paths",qname:"functx:distinct-element-paths",signature:"($nodes as node()*) as xs:string*",description:" The distinct paths of all descendant elements in an XML fragment\n",summary:"<p> The distinct paths of all descendant elements in an XML fragment\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"nodes",type:"node()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the root(s) to start from</div>'}],returns:{type:"xs:string*",description:""},errors:[]},{isDocumented:!0,arity:1,name:"distinct-nodes",qname:"functx:distinct-nodes",signature:"($nodes as node()*) as node()*",description:" The distinct XML nodes in a sequence (by node identity)\n",summary:"<p> The distinct XML nodes in a sequence (by node identity)\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"nodes",type:"node()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the node sequence</div>'}],returns:{type:"node()*",description:""},errors:[]},{isDocumented:!0,arity:1,name:"duration-from-timezone",qname:"functx:duration-from-timezone",signature:"($timezone as xs:string) as xs:dayTimeDuration",description:' Converts a timezone like "-05:00" or "Z" into xs:dayTimeDuration\n',summary:'<p> Converts a timezone like "-05:00" or "Z" into xs:dayTimeDuration\n</p>',annotation_str:"",annotations:[],updating:!1,parameters:[{name:"timezone",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the time zone, in (+|-)HH:MM format</div>'}],returns:{type:"xs:dayTimeDuration",description:""},errors:[]},{isDocumented:!0,arity:2,name:"dynamic-path",qname:"functx:dynamic-path",signature:"($parent as node(), $path as xs:string) as item()*",description:" Dynamically evaluates a simple XPath path\n",summary:"<p> Dynamically evaluates a simple XPath path\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"parent",type:"node()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the root to start from</div>'},{name:"path",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the path expression</div>'}],returns:{type:"item()*",description:""},errors:[]},{isDocumented:!0,arity:1,name:"escape-for-regex",qname:"functx:escape-for-regex",signature:"($arg as xs:string?) as xs:string",description:" Escapes regex special characters\n",summary:"<p> Escapes regex special characters\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the string to escape</div>'}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:2,name:"exclusive-or",qname:"functx:exclusive-or",signature:"($arg1 as xs:boolean?, $arg2 as xs:boolean?) as xs:boolean?",description:" Whether one (and only one) of two boolean values is true\n",summary:"<p> Whether one (and only one) of two boolean values is true\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg1",type:"xs:boolean",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the first boolean value</div>'},{name:"arg2",type:"xs:boolean",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the second boolean value</div>'}],returns:{type:"xs:boolean?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"first-day-of-month",qname:"functx:first-day-of-month",signature:"($date as xs:anyAtomicType?) as xs:date?",description:" The first day of the month of a date\n",summary:"<p> The first day of the month of a date\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"date",type:"xs:anyAtomicType",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the date</div>'}],returns:{type:"xs:date?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"first-day-of-year",qname:"functx:first-day-of-year",signature:"($date as xs:anyAtomicType?) as xs:date?",description:" The first day of the year of a date\n",summary:"<p> The first day of the year of a date\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"date",type:"xs:anyAtomicType",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the date</div>'}],returns:{type:"xs:date?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"first-node",qname:"functx:first-node",signature:"($nodes as node()*) as node()?",description:" The XML node in a sequence that appears first in document order\n",summary:"<p> The XML node in a sequence that appears first in document order\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"nodes",type:"node()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of nodes</div>'}],returns:{type:"node()?",description:""},errors:[]},{isDocumented:!0,arity:2,name:"follows-not-descendant",qname:"functx:follows-not-descendant",signature:"($a as node()?, $b as node()?) as xs:boolean",description:" Whether an XML node follows another without being its descendant\n",summary:"<p> Whether an XML node follows another without being its descendant\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"a",type:"node()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the first node</div>'},{name:"b",type:"node()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the second node</div>'}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:1,name:"format-as-title-en",qname:"functx:format-as-title-en",signature:"($titles as xs:string*) as xs:string*",description:' Moves title words like "the" and "a" to the end of strings\n',summary:'<p> Moves title words like "the" and "a" to the end of strings\n</p>',annotation_str:"",annotations:[],updating:!1,parameters:[{name:"titles",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the titles to format</div>'}],returns:{type:"xs:string*",description:""},errors:[]},{isDocumented:!0,arity:1,name:"fragment-from-uri",qname:"functx:fragment-from-uri",signature:"($uri as xs:string?) as xs:string?",description:" Returns the fragment from a URI\n",summary:"<p> Returns the fragment from a URI\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"uri",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the URI</div>'}],returns:{type:"xs:string?",description:""},errors:[]},{isDocumented:!0,arity:2,name:"get-matches-and-non-matches",qname:"functx:get-matches-and-non-matches",signature:"($string as xs:string?, $regex as xs:string) as element(*)*",description:" Splits a string into matching and non-matching regions\n",summary:"<p> Splits a string into matching and non-matching regions\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"string",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the string to split</div>'},{name:"regex",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the pattern</div>'}],returns:{type:"element(*)*",description:""},errors:[]},{isDocumented:!0,arity:2,name:"get-matches",qname:"functx:get-matches",signature:"($string as xs:string?, $regex as xs:string) as xs:string*",description:" Return the matching regions of a string\n",summary:"<p> Return the matching regions of a string\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"string",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the string to split</div>'},{name:"regex",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the pattern</div>'}],returns:{type:"xs:string*",description:""},errors:[]},{isDocumented:!0,arity:1,name:"has-element-only-content",qname:"functx:has-element-only-content",signature:"($element as element(*)) as xs:boolean",description:" Whether an element has element-only content\n",summary:"<p> Whether an element has element-only content\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"element",type:"element(*)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the XML element to test</div>'}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:1,name:"has-empty-content",qname:"functx:has-empty-content",signature:"($element as element(*)) as xs:boolean",description:" Whether an element has empty content\n",summary:"<p> Whether an element has empty content\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"element",type:"element(*)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the XML element to test</div>'}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:1,name:"has-mixed-content",qname:"functx:has-mixed-content",signature:"($element as element(*)) as xs:boolean",description:" Whether an element has mixed content\n",summary:"<p> Whether an element has mixed content\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"element",type:"element(*)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the XML element to test</div>'}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:1,name:"has-simple-content",qname:"functx:has-simple-content",signature:"($element as element(*)) as xs:boolean",description:" Whether an element has simple content\n",summary:"<p> Whether an element has simple content\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"element",type:"element(*)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the XML element to test</div>'}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:1,name:"id-from-element",qname:"functx:id-from-element",signature:"($element as element(*)?) as xs:string?",description:" Gets the ID of an XML element\n",summary:"<p> Gets the ID of an XML element\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"element",type:"element(*)",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the element</div>'}],returns:{type:"xs:string?",description:""},errors:[]},{isDocumented:!0,arity:2,name:"id-untyped",qname:"functx:id-untyped",signature:"($node as node()*, $id as xs:anyAtomicType) as element(*)*",description:" Gets XML element(s) that have an attribute with a particular value\n",summary:"<p> Gets XML element(s) that have an attribute with a particular value\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"node",type:"node()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the root node(s) to start from</div>'},{name:"id",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the "id" to find</div>'}],returns:{type:"element(*)*",description:""},errors:[]},{isDocumented:!0,arity:2,name:"if-absent",qname:"functx:if-absent",signature:"($arg as item()*, $value as item()*) as item()*",description:" The first argument if it is not empty, otherwise the second argument\n",summary:"<p> The first argument if it is not empty, otherwise the second argument\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the item(s) that may be absent</div>'},{name:"value",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the item(s) to use if the item is absent</div>'}],returns:{type:"item()*",description:""},errors:[]},{isDocumented:!0,arity:2,name:"if-empty",qname:"functx:if-empty",signature:"($arg as item()?, $value as item()*) as item()*",description:" The first argument if it is not blank, otherwise the second argument\n",summary:"<p> The first argument if it is not blank, otherwise the second argument\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"item()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the node that may be empty</div>'},{name:"value",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the item(s) to use if the node is empty</div>'}],returns:{type:"item()*",description:""},errors:[]},{isDocumented:!0,arity:2,name:"index-of-deep-equal-node",qname:"functx:index-of-deep-equal-node",signature:"($nodes as node()*, $nodeToFind as node()) as xs:integer*",description:" The position of a node in a sequence, based on contents and attributes\n",summary:"<p> The position of a node in a sequence, based on contents and attributes\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"nodes",type:"node()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the node sequence</div>'},{name:"nodeToFind",type:"node()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the node to find in the sequence</div>'}],returns:{type:"xs:integer*",description:""},errors:[]},{isDocumented:!0,arity:2,name:"index-of-match-first",qname:"functx:index-of-match-first",signature:"($arg as xs:string?, $pattern as xs:string) as xs:integer?",description:" The first position of a matching substring\n",summary:"<p> The first position of a matching substring\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the string</div>'},{name:"pattern",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the pattern to match</div>'}],returns:{type:"xs:integer?",description:""},errors:[]},{isDocumented:!0,arity:2,name:"index-of-node",qname:"functx:index-of-node",signature:"($nodes as node()*, $nodeToFind as node()) as xs:integer*",description:" The position of a node in a sequence, based on node identity\n",summary:"<p> The position of a node in a sequence, based on node identity\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"nodes",type:"node()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the node sequence</div>'},{name:"nodeToFind",type:"node()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the node to find in the sequence</div>'}],returns:{type:"xs:integer*",description:""},errors:[]},{isDocumented:!0,arity:2,name:"index-of-string-first",qname:"functx:index-of-string-first",signature:"($arg as xs:string?, $substring as xs:string) as xs:integer?",description:" The first position of a substring\n",summary:"<p> The first position of a substring\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the string</div>'},{name:"substring",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the substring to find</div>'}],returns:{type:"xs:integer?",description:""},errors:[]},{isDocumented:!0,arity:2,name:"index-of-string-last",qname:"functx:index-of-string-last",signature:"($arg as xs:string?, $substring as xs:string) as xs:integer?",description:" The last position of a substring\n",summary:"<p> The last position of a substring\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the string</div>'},{name:"substring",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the substring to find</div>'}],returns:{type:"xs:integer?",description:""},errors:[]},{isDocumented:!0,arity:2,name:"index-of-string",qname:"functx:index-of-string",signature:"($arg as xs:string?, $substring as xs:string) as xs:integer*",description:" The position(s) of a substring\n",summary:"<p> The position(s) of a substring\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the string</div>'},{name:"substring",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the substring to find</div>'}],returns:{type:"xs:integer*",description:""},errors:[]},{isDocumented:!0,arity:3,name:"insert-string",qname:"functx:insert-string",signature:"($originalString as xs:string?, $stringToInsert as xs:string?, $pos as xs:integer) as xs:string",description:" Inserts a string at a specified position\n",summary:"<p> Inserts a string at a specified position\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"originalString",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the original string to insert into</div>'},{name:"stringToInsert",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the string to insert</div>'},{name:"pos",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the position</div>'}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:1,name:"is-a-number",qname:"functx:is-a-number",signature:"($value as xs:anyAtomicType?) as xs:boolean",description:" Whether a value is numeric\n",summary:"<p> Whether a value is numeric\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"value",type:"xs:anyAtomicType",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the value to test</div>'}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:1,name:"is-absolute-uri",qname:"functx:is-absolute-uri",signature:"($uri as xs:string?) as xs:boolean",description:" Whether a URI is absolute\n",summary:"<p> Whether a URI is absolute\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"uri",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the URI to test</div>'}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:2,name:"is-ancestor",qname:"functx:is-ancestor",signature:"($node1 as node(), $node2 as node()) as xs:boolean",description:" Whether an XML node is an ancestor of another node\n",summary:"<p> Whether an XML node is an ancestor of another node\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"node1",type:"node()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the first node</div>'},{name:"node2",type:"node()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the second node</div>'}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:2,name:"is-descendant",qname:"functx:is-descendant",signature:"($node1 as node(), $node2 as node()) as xs:boolean",description:" Whether an XML node is a descendant of another node\n",summary:"<p> Whether an XML node is a descendant of another node\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"node1",type:"node()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the first node</div>'},{name:"node2",type:"node()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the second node</div>'}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:1,name:"is-leap-year",qname:"functx:is-leap-year",signature:"($date as xs:anyAtomicType?) as xs:boolean",description:" Whether a date falls in a leap year\n",summary:"<p> Whether a date falls in a leap year\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"date",type:"xs:anyAtomicType",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the date or year</div>'}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:2,name:"is-node-among-descendants-deep-equal",qname:"functx:is-node-among-descendants-deep-equal",signature:"($node as node()?, $seq as node()*) as xs:boolean",description:" Whether an XML node is among the descendants of a sequence, based on contents and attributes\n",summary:"<p> Whether an XML node is among the descendants of a sequence, based on contents and attributes\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"node",type:"node()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the node to test</div>'},{name:"seq",type:"node()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of nodes to search</div>'}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:2,name:"is-node-among-descendants",qname:"functx:is-node-among-descendants",signature:"($node as node()?, $seq as node()*) as xs:boolean",description:" Whether an XML node is among the descendants of a sequence, based on node identity\n",summary:"<p> Whether an XML node is among the descendants of a sequence, based on node identity\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"node",type:"node()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the node to test</div>'},{name:"seq",type:"node()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of nodes to search</div>'}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:2,name:"is-node-in-sequence-deep-equal",qname:"functx:is-node-in-sequence-deep-equal",signature:"($node as node()?, $seq as node()*) as xs:boolean",description:" Whether an XML node is in a sequence, based on contents and attributes\n",summary:"<p> Whether an XML node is in a sequence, based on contents and attributes\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"node",type:"node()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the node to test</div>'},{name:"seq",type:"node()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of nodes to search</div>'}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:2,name:"is-node-in-sequence",qname:"functx:is-node-in-sequence",signature:"($node as node()?, $seq as node()*) as xs:boolean",description:" Whether an XML node is in a sequence, based on node identity\n",summary:"<p> Whether an XML node is in a sequence, based on node identity\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"node",type:"node()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the node to test</div>'},{name:"seq",type:"node()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of nodes to search</div>'}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:2,name:"is-value-in-sequence",qname:"functx:is-value-in-sequence",signature:"($value as xs:anyAtomicType?, $seq as xs:anyAtomicType*) as xs:boolean",description:" Whether an atomic value appears in a sequence\n",summary:"<p> Whether an atomic value appears in a sequence\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"value",type:"xs:anyAtomicType",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the atomic value to test</div>'},{name:"seq",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of values to search</div>'}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:1,name:"last-day-of-month",qname:"functx:last-day-of-month",signature:"($date as xs:anyAtomicType?) as xs:date?",description:" The last day of the month of a date\n",summary:"<p> The last day of the month of a date\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"date",type:"xs:anyAtomicType",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the date</div>'}],returns:{type:"xs:date?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"last-day-of-year",qname:"functx:last-day-of-year",signature:"($date as xs:anyAtomicType?) as xs:date?",description:" The last day of the month of a date\n",summary:"<p> The last day of the month of a date\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"date",type:"xs:anyAtomicType",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the date</div>'}],returns:{type:"xs:date?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"last-node",qname:"functx:last-node",signature:"($nodes as node()*) as node()?",description:" The XML node in a sequence that is last in document order\n",summary:"<p> The XML node in a sequence that is last in document order\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"nodes",type:"node()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of nodes</div>'}],returns:{type:"node()?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"leaf-elements",qname:"functx:leaf-elements",signature:"($root as node()?) as element(*)*",description:" All XML elements that don't have any child elements\n",summary:"<p> All XML elements that don't have any child elements\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"root",type:"node()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the root</div>'}],returns:{type:"element(*)*",description:""},errors:[]},{isDocumented:!0,arity:1,name:"left-trim",qname:"functx:left-trim",signature:"($arg as xs:string?) as xs:string",description:" Trims leading whitespace\n",summary:"<p> Trims leading whitespace\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the string to trim</div>'}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:1,name:"line-count",qname:"functx:line-count",signature:"($arg as xs:string?) as xs:integer",description:" The number of lines\n",summary:"<p> The number of lines\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the string to test</div>'}],returns:{type:"xs:integer",description:""},errors:[]},{isDocumented:!0,arity:1,name:"lines",qname:"functx:lines",signature:"($arg as xs:string?) as xs:string*",description:" Split a string into separate lines\n",summary:"<p> Split a string into separate lines\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the string to split</div>'}],returns:{type:"xs:string*",description:""},errors:[]},{isDocumented:!0,arity:1,name:"max-depth",qname:"functx:max-depth",signature:"($root as node()?) as xs:integer?",description:" The maximum depth of elements in an XML tree\n",summary:"<p> The maximum depth of elements in an XML tree\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"root",type:"node()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the root to start from</div>'}],returns:{type:"xs:integer?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"max-determine-type",qname:"functx:max-determine-type",signature:"($seq as xs:anyAtomicType*) as xs:anyAtomicType?",description:" The maximum value in a sequence, figuring out its type (numeric or string)\n",summary:"<p> The maximum value in a sequence, figuring out its type (numeric or string)\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"seq",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of values to test</div>'}],returns:{type:"xs:anyAtomicType?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"max-line-length",qname:"functx:max-line-length",signature:"($arg as xs:string?) as xs:integer",description:" The maximum line length\n",summary:"<p> The maximum line length\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the string to test</div>'}],returns:{type:"xs:integer",description:""},errors:[]},{isDocumented:!0,arity:1,name:"max-node",qname:"functx:max-node",signature:"($nodes as node()*) as node()*",description:" The XML node whose typed value is the maximum\n",summary:"<p> The XML node whose typed value is the maximum\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"nodes",type:"node()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of nodes to test</div>'}],returns:{type:"node()*",description:""},errors:[]},{isDocumented:!0,arity:1,name:"max-string",qname:"functx:max-string",signature:"($strings as xs:anyAtomicType*) as xs:string?",description:" The maximum of a sequence of values, treating them like strings\n",summary:"<p> The maximum of a sequence of values, treating them like strings\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"strings",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of values</div>'}],returns:{type:"xs:string?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"min-determine-type",qname:"functx:min-determine-type",signature:"($seq as xs:anyAtomicType*) as xs:anyAtomicType?",description:" The minimum value in a sequence, figuring out its type (numeric or string)\n",summary:"<p> The minimum value in a sequence, figuring out its type (numeric or string)\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"seq",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of values to test</div>'}],returns:{type:"xs:anyAtomicType?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"min-node",qname:"functx:min-node",signature:"($nodes as node()*) as node()*",description:" The XML node whose typed value is the minimum\n",summary:"<p> The XML node whose typed value is the minimum\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"nodes",type:"node()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of nodes to test</div>'}],returns:{type:"node()*",description:""},errors:[]},{isDocumented:!0,arity:1,name:"min-non-empty-string",qname:"functx:min-non-empty-string",signature:"($strings as xs:string*) as xs:string?",description:' The minimum of a sequence of strings, ignoring "empty" values\n',summary:'<p> The minimum of a sequence of strings, ignoring "empty" values\n</p>',annotation_str:"",annotations:[],updating:!1,parameters:[{name:"strings",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of strings to search</div>'}],returns:{type:"xs:string?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"min-string",qname:"functx:min-string",signature:"($strings as xs:anyAtomicType*) as xs:string?",description:" The minimum of a sequence of values, treating them like strings\n",summary:"<p> The minimum of a sequence of values, treating them like strings\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"strings",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of strings</div>'}],returns:{type:"xs:string?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"mmddyyyy-to-date",qname:"functx:mmddyyyy-to-date",signature:"($dateString as xs:string?) as xs:date?",description:" Converts a string with format MMDDYYYY (with any delimiters) to a date\n",summary:"<p> Converts a string with format MMDDYYYY (with any delimiters) to a date\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"dateString",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the MMDDYYYY string</div>'}],returns:{type:"xs:date?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"month-abbrev-en",qname:"functx:month-abbrev-en",signature:"($date as xs:anyAtomicType?) as xs:string?",description:" The month of a date as an abbreviated word (Jan, Feb, etc.)\n",summary:"<p> The month of a date as an abbreviated word (Jan, Feb, etc.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"date",type:"xs:anyAtomicType",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the date</div>'}],returns:{type:"xs:string?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"month-name-en",qname:"functx:month-name-en",signature:"($date as xs:anyAtomicType?) as xs:string?",description:" The month of a date as a word (January, February, etc.)\n",summary:"<p> The month of a date as a word (January, February, etc.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"date",type:"xs:anyAtomicType",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the date</div>'}],returns:{type:"xs:string?",description:""},errors:[]},{isDocumented:!0,arity:2,name:"name-test",qname:"functx:name-test",signature:"($testname as xs:string?, $names as xs:string*) as xs:boolean",description:" Whether a name matches a list of names or name wildcards\n",summary:"<p> Whether a name matches a list of names or name wildcards\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"testname",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name to test</div>'},{name:"names",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the list of names or name wildcards</div>'}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:1,name:"namespaces-in-use",qname:"functx:namespaces-in-use",signature:"($root as node()?) as xs:anyURI*",description:" A list of namespaces used in element/attribute names in an XML fragment\n",summary:"<p> A list of namespaces used in element/attribute names in an XML fragment\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"root",type:"node()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the root node to start from</div>'}],returns:{type:"xs:anyURI*",description:""},errors:[]},{isDocumented:!0,arity:1,name:"next-day",qname:"functx:next-day",signature:"($date as xs:anyAtomicType?) as xs:date?",description:" The next day\n",summary:"<p> The next day\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"date",type:"xs:anyAtomicType",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the date</div>'}],returns:{type:"xs:date?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"node-kind",qname:"functx:node-kind",signature:"($nodes as node()*) as xs:string*",description:" The XML node kind (element, attribute, text, etc.)\n",summary:"<p> The XML node kind (element, attribute, text, etc.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"nodes",type:"node()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the node(s) whose kind you want to determine</div>'}],returns:{type:"xs:string*",description:""},errors:[]},{isDocumented:!0,arity:1,name:"non-distinct-values",qname:"functx:non-distinct-values",signature:"($seq as xs:anyAtomicType*) as xs:anyAtomicType*",description:" Returns any values that appear more than once in a sequence\n",summary:"<p> Returns any values that appear more than once in a sequence\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"seq",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of values</div>'}],returns:{type:"xs:anyAtomicType*",description:""},errors:[]},{isDocumented:!0,arity:2,name:"number-of-matches",qname:"functx:number-of-matches",signature:"($arg as xs:string?, $pattern as xs:string) as xs:integer",description:" The number of regions that match a pattern\n",summary:"<p> The number of regions that match a pattern\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the string to test</div>'},{name:"pattern",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the regular expression</div>'}],returns:{type:"xs:integer",description:""},errors:[]},{isDocumented:!0,arity:1,name:"ordinal-number-en",qname:"functx:ordinal-number-en",signature:"($num as xs:integer?) as xs:string",description:" Reformats a number as an ordinal number, e.g. 1st, 2nd, 3rd.\n",summary:"<p> Reformats a number as an ordinal number, e.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"num",type:"xs:integer",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number</div>'}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:2,name:"pad-integer-to-length",qname:"functx:pad-integer-to-length",signature:"($integerToPad as xs:anyAtomicType?, $length as xs:integer) as xs:string",description:" Pads an integer to a desired length by adding leading zeros\n",summary:"<p> Pads an integer to a desired length by adding leading zeros\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"integerToPad",type:"xs:anyAtomicType",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the integer to pad</div>'},{name:"length",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the desired length</div>'}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:3,name:"pad-string-to-length",qname:"functx:pad-string-to-length",signature:"($stringToPad as xs:string?, $padChar as xs:string, $length as xs:integer) as xs:string",description:" Pads a string to a desired length\n",summary:"<p> Pads a string to a desired length\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"stringToPad",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the string to pad</div>'},{name:"padChar",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the character(s) to use as padding</div>'},{name:"length",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the desired length</div>'}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:1,name:"path-to-node-with-pos",qname:"functx:path-to-node-with-pos",signature:"($node as node()?) as xs:string",description:" A unique path to an XML node (or sequence of nodes)\n",summary:"<p> A unique path to an XML node (or sequence of nodes)\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"node",type:"node()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the node sequence</div>'}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:1,name:"path-to-node",qname:"functx:path-to-node",signature:"($nodes as node()*) as xs:string*",description:" A path to an XML node (or sequence of nodes)\n",summary:"<p> A path to an XML node (or sequence of nodes)\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"nodes",type:"node()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the node sequence</div>'}],returns:{type:"xs:string*",description:""},errors:[]},{isDocumented:!0,arity:2,name:"precedes-not-ancestor",qname:"functx:precedes-not-ancestor",signature:"($a as node()?, $b as node()?) as xs:boolean",description:" Whether an XML node precedes another without being its ancestor\n",summary:"<p> Whether an XML node precedes another without being its ancestor\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"a",type:"node()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the first node</div>'},{name:"b",type:"node()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the second node</div>'}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:1,name:"previous-day",qname:"functx:previous-day",signature:"($date as xs:anyAtomicType?) as xs:date?",description:" The previous day\n",summary:"<p> The previous day\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"date",type:"xs:anyAtomicType",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the date</div>'}],returns:{type:"xs:date?",description:""},errors:[]},{isDocumented:!0,arity:2,name:"remove-attributes-deep",qname:"functx:remove-attributes-deep",signature:"($nodes as node()*, $names as xs:string*) as node()*",description:" Removes attributes from an XML fragment, based on name\n",summary:"<p> Removes attributes from an XML fragment, based on name\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"nodes",type:"node()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the root(s) to start from</div>'},{name:"names",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the names of the attributes to remove, or * for all attributes</div>'}],returns:{type:"node()*",description:""},errors:[]},{isDocumented:!0,arity:2,name:"remove-attributes",qname:"functx:remove-attributes",signature:"($elements as element(*)*, $names as xs:string*) as element(*)",description:" Removes attributes from an XML element, based on name\n",summary:"<p> Removes attributes from an XML element, based on name\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"elements",type:"element(*)",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the element(s) from which to remove the attributes</div>'},{name:"names",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the names of the attributes to remove, or * for all attributes</div>'}],returns:{type:"element(*)",description:""},errors:[]},{isDocumented:!0,arity:2,name:"remove-elements-deep",qname:"functx:remove-elements-deep",signature:"($nodes as node()*, $names as xs:string*) as node()*",description:" Removes descendant elements from an XML node, based on name\n",summary:"<p> Removes descendant elements from an XML node, based on name\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"nodes",type:"node()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> root(s) to start from</div>'},{name:"names",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the names of the elements to remove</div>'}],returns:{type:"node()*",description:""},errors:[]},{isDocumented:!0,arity:2,name:"remove-elements-not-contents",qname:"functx:remove-elements-not-contents",signature:"($nodes as node()*, $names as xs:string*) as node()*",description:" Removes descendant XML elements but keeps their content\n",summary:"<p> Removes descendant XML elements but keeps their content\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"nodes",type:"node()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the root(s) to start from</div>'},{name:"names",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the names of the elements to remove</div>'}],returns:{type:"node()*",description:""},errors:[]},{isDocumented:!0,arity:2,name:"remove-elements",qname:"functx:remove-elements",signature:"($elements as element(*)*, $names as xs:string*) as element(*)*",description:" Removes child elements from an XML node, based on name\n",summary:"<p> Removes child elements from an XML node, based on name\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"elements",type:"element(*)",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the element(s) from which you wish to remove the children</div>'},{name:"names",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the names of the child elements to remove</div>'}],returns:{type:"element(*)*",description:""},errors:[]},{isDocumented:!0,arity:2,name:"repeat-string",qname:"functx:repeat-string",signature:"($stringToRepeat as xs:string?, $count as xs:integer) as xs:string",description:" Repeats a string a given number of times\n",summary:"<p> Repeats a string a given number of times\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"stringToRepeat",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the string to repeat</div>'},{name:"count",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the desired number of copies</div>'}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:3,name:"replace-beginning",qname:"functx:replace-beginning",signature:"($arg as xs:string?, $pattern as xs:string, $replacement as xs:string) as xs:string",description:" Replaces the beginning of a string, up to a matched pattern\n",summary:"<p> Replaces the beginning of a string, up to a matched pattern\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the entire string to change</div>'},{name:"pattern",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the pattern of characters to replace up to</div>'},{name:"replacement",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the replacement string</div>'}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:2,name:"replace-element-values",qname:"functx:replace-element-values",signature:"($elements as element(*)*, $values as xs:anyAtomicType*) as element(*)*",description:" Updates the content of one or more elements\n",summary:"<p> Updates the content of one or more elements\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"elements",type:"element(*)",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the elements whose content you wish to replace</div>'},{name:"values",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the replacement values</div>'}],returns:{type:"element(*)*",description:""},errors:[]},{isDocumented:!0,arity:3,name:"replace-first",qname:"functx:replace-first",signature:"($arg as xs:string?, $pattern as xs:string, $replacement as xs:string) as xs:string",description:" Replaces the first match of a pattern\n",summary:"<p> Replaces the first match of a pattern\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the entire string to change</div>'},{name:"pattern",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the pattern of characters to replace</div>'},{name:"replacement",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the replacement string</div>'}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:3,name:"replace-multi",qname:"functx:replace-multi",signature:"($arg as xs:string?, $changeFrom as xs:string*, $changeTo as xs:string*) as xs:string?",description:" Performs multiple replacements, using pairs of replace parameters\n",summary:"<p> Performs multiple replacements, using pairs of replace parameters\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the string to manipulate</div>'},{name:"changeFrom",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of strings or patterns to change from</div>'},{name:"changeTo",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence of strings to change to</div>'}],returns:{type:"xs:string?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"reverse-string",qname:"functx:reverse-string",signature:"($arg as xs:string?) as xs:string",description:" Reverses the order of characters\n",summary:"<p> Reverses the order of characters\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the string to reverse</div>'}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:1,name:"right-trim",qname:"functx:right-trim",signature:"($arg as xs:string?) as xs:string",description:" Trims trailing whitespace\n",summary:"<p> Trims trailing whitespace\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the string to trim</div>'}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:1,name:"scheme-from-uri",qname:"functx:scheme-from-uri",signature:"($uri as xs:string?) as xs:string?",description:" Returns the scheme from a URI\n",summary:"<p> Returns the scheme from a URI\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"uri",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the URI</div>'}],returns:{type:"xs:string?",description:""},errors:[]},{isDocumented:!0,arity:2,name:"sequence-deep-equal",qname:"functx:sequence-deep-equal",signature:"($seq1 as item()*, $seq2 as item()*) as xs:boolean",description:" Whether two sequences have the same XML node content and/or values\n",summary:"<p> Whether two sequences have the same XML node content and/or values\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"seq1",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the first sequence</div>'},{name:"seq2",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the second sequence</div>'}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:2,name:"sequence-node-equal-any-order",qname:"functx:sequence-node-equal-any-order",signature:"($seq1 as node()*, $seq2 as node()*) as xs:boolean",description:" Whether two sequences contain the same XML nodes, regardless of order\n",summary:"<p> Whether two sequences contain the same XML nodes, regardless of order\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"seq1",type:"node()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the first sequence of nodes</div>'},{name:"seq2",type:"node()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the second sequence of nodes</div>'}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:2,name:"sequence-node-equal",qname:"functx:sequence-node-equal",signature:"($seq1 as node()*, $seq2 as node()*) as xs:boolean",description:" Whether two sequences contain the same XML nodes, in the same order\n",summary:"<p> Whether two sequences contain the same XML nodes, in the same order\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"seq1",type:"node()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the first sequence of nodes</div>'},{name:"seq2",type:"node()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the second sequence of nodes</div>'}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!0,arity:1,name:"sequence-type",qname:"functx:sequence-type",signature:"($items as item()*) as xs:string",description:" The sequence type that represents a sequence of nodes or values\n",summary:"<p> The sequence type that represents a sequence of nodes or values\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"items",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the items whose sequence type you want to determine</div>'}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:1,name:"siblings-same-name",qname:"functx:siblings-same-name",signature:"($element as element(*)?) as element(*)*",description:" The siblings of an XML element that have the same name\n",summary:"<p> The siblings of an XML element that have the same name\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"element",type:"element(*)",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the node</div>'}],returns:{type:"element(*)*",description:""},errors:[]},{isDocumented:!0,arity:1,name:"siblings",qname:"functx:siblings",signature:"($node as node()?) as node()*",description:" The siblings of an XML node\n",summary:"<p> The siblings of an XML node\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"node",type:"node()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the node</div>'}],returns:{type:"node()*",description:""},errors:[]},{isDocumented:!0,arity:1,name:"sort-as-numeric",qname:"functx:sort-as-numeric",signature:"($seq as item()*) as item()*",description:" Sorts a sequence of numeric values or nodes\n",summary:"<p> Sorts a sequence of numeric values or nodes\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"seq",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence to sort</div>'}],returns:{type:"item()*",description:""},errors:[]},{isDocumented:!0,arity:1,name:"sort-case-insensitive",qname:"functx:sort-case-insensitive",signature:"($seq as item()*) as item()*",description:" Sorts a sequence of values or nodes regardless of capitalization\n",summary:"<p> Sorts a sequence of values or nodes regardless of capitalization\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"seq",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence to sort</div>'}],returns:{type:"item()*",description:""},errors:[]},{isDocumented:!0,arity:1,name:"sort-document-order",qname:"functx:sort-document-order",signature:"($seq as node()*) as node()*",description:" Sorts a sequence of nodes in document order\n",summary:"<p> Sorts a sequence of nodes in document order\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"seq",type:"node()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence to sort</div>'}],returns:{type:"node()*",description:""},errors:[]},{isDocumented:!0,arity:1,name:"sort",qname:"functx:sort",signature:"($seq as item()*) as item()*",description:" Sorts a sequence of values or nodes\n",summary:"<p> Sorts a sequence of values or nodes\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"seq",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence to sort</div>'}],returns:{type:"item()*",description:""},errors:[]},{isDocumented:!0,arity:2,name:"substring-after-if-contains",qname:"functx:substring-after-if-contains",signature:"($arg as xs:string?, $delim as xs:string) as xs:string?",description:" Performs substring-after, returning the entire string if it does not contain the delimiter\n",summary:"<p> Performs substring-after, returning the entire string if it does not contain the delimiter\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the string to substring</div>'},{name:"delim",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the delimiter</div>'}],returns:{type:"xs:string?",description:""},errors:[]},{isDocumented:!0,arity:2,name:"substring-after-last-match",qname:"functx:substring-after-last-match",signature:"($arg as xs:string?, $regex as xs:string) as xs:string",description:" The substring after the last text that matches a regex\n",summary:"<p> The substring after the last text that matches a regex\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the string to substring</div>'},{name:"regex",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the regular expression</div>'}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:2,name:"substring-after-last",qname:"functx:substring-after-last",signature:"($arg as xs:string?, $delim as xs:string) as xs:string",description:" The substring after the last occurrence of a delimiter\n",summary:"<p> The substring after the last occurrence of a delimiter\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the string to substring</div>'},{name:"delim",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the delimiter</div>'}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:2,name:"substring-after-match",qname:"functx:substring-after-match",signature:"($arg as xs:string?, $regex as xs:string) as xs:string?",description:" The substring after the first text that matches a regex\n",summary:"<p> The substring after the first text that matches a regex\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the string to substring</div>'},{name:"regex",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the regular expression</div>'}],returns:{type:"xs:string?",description:""},errors:[]},{isDocumented:!0,arity:2,name:"substring-before-if-contains",qname:"functx:substring-before-if-contains",signature:"($arg as xs:string?, $delim as xs:string) as xs:string?",description:" Performs substring-before, returning the entire string if it does not contain the delimiter\n",summary:"<p> Performs substring-before, returning the entire string if it does not contain the delimiter\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the string to substring</div>'},{name:"delim",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the delimiter</div>'}],returns:{type:"xs:string?",description:""},errors:[]},{isDocumented:!0,arity:2,name:"substring-before-last-match",qname:"functx:substring-before-last-match",signature:"($arg as xs:string?, $regex as xs:string) as xs:string?",description:" The substring after the first text that matches a regex\n",summary:"<p> The substring after the first text that matches a regex\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the string to substring</div>'},{name:"regex",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the regular expression</div>'}],returns:{type:"xs:string?",description:""},errors:[]},{isDocumented:!0,arity:2,name:"substring-before-last",qname:"functx:substring-before-last",signature:"($arg as xs:string?, $delim as xs:string) as xs:string",description:" The substring before the last occurrence of a delimiter\n",summary:"<p> The substring before the last occurrence of a delimiter\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the string to substring</div>'},{name:"delim",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the delimiter</div>'}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:2,name:"substring-before-match",qname:"functx:substring-before-match",signature:"($arg as xs:string?, $regex as xs:string) as xs:string",description:" The substring before the last text that matches a regex\n",summary:"<p> The substring before the last text that matches a regex\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the string to substring</div>'},{name:"regex",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the regular expression</div>'}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:3,name:"time",qname:"functx:time",signature:"($hour as xs:anyAtomicType, $minute as xs:anyAtomicType, $second as xs:anyAtomicType) as xs:time",description:" Construct a time from an hour, minute and second\n",summary:"<p> Construct a time from an hour, minute and second\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"hour",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the hour</div>'},{name:"minute",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the minute</div>'},{name:"second",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the second</div>'}],returns:{type:"xs:time",description:""},errors:[]},{isDocumented:!0,arity:1,name:"timezone-from-duration",qname:"functx:timezone-from-duration",signature:"($duration as xs:dayTimeDuration) as xs:string",description:' Converts an xs:dayTimeDuration into a timezone like "-05:00" or "Z"\n',summary:'<p> Converts an xs:dayTimeDuration into a timezone like "-05:00" or "Z"\n</p>',annotation_str:"",annotations:[],updating:!1,parameters:[{name:"duration",type:"xs:dayTimeDuration",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the duration</div>'}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:1,name:"total-days-from-duration",qname:"functx:total-days-from-duration",signature:"($duration as xs:dayTimeDuration?) as xs:decimal?",description:" The total number of days in a dayTimeDuration\n",summary:"<p> The total number of days in a dayTimeDuration\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"duration",type:"xs:dayTimeDuration",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the duration</div>'}],returns:{type:"xs:decimal?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"total-hours-from-duration",qname:"functx:total-hours-from-duration",signature:"($duration as xs:dayTimeDuration?) as xs:decimal?",description:" The total number of hours in a dayTimeDuration\n",summary:"<p> The total number of hours in a dayTimeDuration\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"duration",type:"xs:dayTimeDuration",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the duration</div>'}],returns:{type:"xs:decimal?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"total-minutes-from-duration",qname:"functx:total-minutes-from-duration",signature:"($duration as xs:dayTimeDuration?) as xs:decimal?",description:" The total number of minutes in a dayTimeDuration\n",summary:"<p> The total number of minutes in a dayTimeDuration\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"duration",type:"xs:dayTimeDuration",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the duration</div>'}],returns:{type:"xs:decimal?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"total-months-from-duration",qname:"functx:total-months-from-duration",signature:"($duration as xs:yearMonthDuration?) as xs:decimal?",description:" The total number of months in a yearMonthDuration\n",summary:"<p> The total number of months in a yearMonthDuration\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"duration",type:"xs:yearMonthDuration",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the duration</div>'}],returns:{type:"xs:decimal?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"total-seconds-from-duration",qname:"functx:total-seconds-from-duration",signature:"($duration as xs:dayTimeDuration?) as xs:decimal?",description:" The total number of seconds in a dayTimeDuration\n",summary:"<p> The total number of seconds in a dayTimeDuration\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"duration",type:"xs:dayTimeDuration",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the duration</div>'}],returns:{type:"xs:decimal?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"total-years-from-duration",qname:"functx:total-years-from-duration",signature:"($duration as xs:yearMonthDuration?) as xs:decimal?",description:" The total number of years in a yearMonthDuration\n",summary:"<p> The total number of years in a yearMonthDuration\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"duration",type:"xs:yearMonthDuration",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the duration</div>'}],returns:{type:"xs:decimal?",description:""},errors:[]},{isDocumented:!0,arity:1,name:"trim",qname:"functx:trim",signature:"($arg as xs:string?) as xs:string",description:" Trims leading and trailing whitespace\n",summary:"<p> Trims leading and trailing whitespace\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the string to trim</div>'}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:3,name:"update-attributes",qname:"functx:update-attributes",signature:"($elements as element(*)*, $attrNames as xs:QName*, $attrValues as xs:anyAtomicType*) as element(*)?",description:" Updates the attribute value of an XML element\n",summary:"<p> Updates the attribute value of an XML element\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"elements",type:"element(*)",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the element(s) for which you wish to update the attribute</div>'},{name:"attrNames",type:"xs:QName",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name(s) of the attribute(s) to add</div>'},{name:"attrValues",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the value(s) of the attribute(s) to add</div>'}],returns:{type:"element(*)?",description:""},errors:[]},{isDocumented:!0,arity:2,name:"value-except",qname:"functx:value-except",signature:"($arg1 as xs:anyAtomicType*, $arg2 as xs:anyAtomicType*) as xs:anyAtomicType*",description:" The values in one sequence that aren't in another sequence\n",summary:"<p> The values in one sequence that aren't in another sequence\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg1",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the first sequence</div>'},{name:"arg2",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the second sequence</div>'}],returns:{type:"xs:anyAtomicType*",description:""},errors:[]},{isDocumented:!0,arity:2,name:"value-intersect",qname:"functx:value-intersect",signature:"($arg1 as xs:anyAtomicType*, $arg2 as xs:anyAtomicType*) as xs:anyAtomicType*",description:" The intersection of two sequences of values\n",summary:"<p> The intersection of two sequences of values\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg1",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the first sequence</div>'},{name:"arg2",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the second sequence</div>'}],returns:{type:"xs:anyAtomicType*",description:""},errors:[]},{isDocumented:!0,arity:2,name:"value-union",qname:"functx:value-union",signature:"($arg1 as xs:anyAtomicType*, $arg2 as xs:anyAtomicType*) as xs:anyAtomicType*",description:" The union of two sequences of values\n",summary:"<p> The union of two sequences of values\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg1",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the first sequence</div>'},{name:"arg2",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the second sequence</div>'}],returns:{type:"xs:anyAtomicType*",description:""},errors:[]},{isDocumented:!0,arity:1,name:"word-count",qname:"functx:word-count",signature:"($arg as xs:string?) as xs:integer",description:" The number of words\n",summary:"<p> The number of words\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the string to measure</div>'}],returns:{type:"xs:integer",description:""},errors:[]},{isDocumented:!0,arity:1,name:"words-to-camel-case",qname:"functx:words-to-camel-case",signature:"($arg as xs:string?) as xs:string",description:" Turns a string of words into camelCase\n",summary:"<p> Turns a string of words into camelCase\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the string to modify</div>'}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:2,name:"wrap-values-in-elements",qname:"functx:wrap-values-in-elements",signature:"($values as xs:anyAtomicType*, $elementName as xs:QName) as element(*)*",description:" Wraps a sequence of atomic values in XML elements\n",summary:"<p> Wraps a sequence of atomic values in XML elements\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"values",type:"xs:anyAtomicType",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the values to wrap in elements</div>'},{name:"elementName",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the elements to construct</div>'}],returns:{type:"element(*)*",description:""},errors:[]},{isDocumented:!0,arity:2,name:"yearMonthDuration",qname:"functx:yearMonthDuration",signature:"($years as xs:decimal?, $months as xs:integer?) as xs:yearMonthDuration",description:" Construct a yearMonthDuration from a number of years and months\n",summary:"<p> Construct a yearMonthDuration from a number of years and months\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"years",type:"xs:decimal",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number of years</div>'},{name:"months",type:"xs:integer",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the number of months</div>'}],returns:{type:"xs:yearMonthDuration",description:""},errors:[]}],variables:[]},"http://zorba.io/modules/zorba-query":{ns:"http://zorba.io/modules/zorba-query",description:" This module contains functions to compile and evaluate queries\n written in either JSONiq or XQuery. Also, it contains function that\n allow to parameterize the static or dynamic evaluation phase.\n",sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Juan Zacarias</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://zorba.io/features",prefix:"f"},{uri:"http://zorba.io/options/features",prefix:"op"},{uri:"http://zorba.io/options/versioning",prefix:"ver"},{uri:"http://zorba.io/modules/zorba-query",prefix:"zq"}],functions:[{isDocumented:!0,arity:2,name:"bind-context-item",qname:"zq:bind-context-item",signature:"($query-key as xs:anyURI, $dot as item()) as empty-sequence() external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function binds the context-item of the prepared query\n identified by the given key to the $dot argument.</p>\n',summary:"<p>  This function binds the context-item of the prepared query\n identified by the given key to the $dot argument.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"query-key",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the identifier for a compiled query</div>'},{name:"dot",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the context item to bind</div>'}],returns:{type:"empty-sequence()",description:"the function has side effects and returns the empty sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zq:NO_QUERY_MATCH if no query with the given identifier was prepared.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"bind-variable",qname:"zq:bind-variable",signature:"($query-key as xs:anyURI, $var as xs:QName, $value as item()*) as empty-sequence() external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function binds the variable with name $name of\n the prepared query identified by $query-key to the given sequence.</p>\n',summary:"<p>  This function binds the variable with name $name of\n the prepared query identified by $query-key to the given sequence.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"query-key",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the identifier for a compiled query</div>'},{name:"var",type:"xs:QName",occurrence:null,description:""},{name:"value",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the sequence to which the external variable $name should be bound</div>'}],returns:{type:"empty-sequence()",description:"the function has side effects and returns the empty sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zq:NO_QUERY_MATCH if no query with the given identifier was prepared.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zq:UNDECLARED_VARIABLE if the given variable is not declared in the query.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"delete-query",qname:"zq:delete-query",signature:"($query-key as xs:anyURI) as empty-sequence() external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Deletes the prepared query associated with the given identifier.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">After the query is deleted, the corresponding identifier should\n not be used as argument to any of the functions of this module.</p>\n',summary:"<p>  Deletes the prepared query associated with the given identifier.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"query-key",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the identifier for a compiled query</div>'}],returns:{type:"empty-sequence()",description:"the function has side effects and returns the empty sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zq:NO_QUERY_MATCH if no query with the given identifier was prepared.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"evaluate-sequential",qname:"zq:evaluate-sequential",signature:"($query-key as xs:string) as item()* external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Evaluates the given prepared query and returns the result\n of the evaluation. The query must be sequential.</p>\n',summary:"<p>  Evaluates the given prepared query and returns the result\n of the evaluation.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"query-key",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the identifier for a compiled query</div>'}],returns:{type:"item()*",description:"the result of evaluating the query."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zq:NO_QUERY_MATCH if no query with the given identifier was prepared.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zq:QUERY_NOT_SEQUENTIAL if the query is not sequential.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zq:QUERY_IS_UPDATING if the query is an updating query.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">any dynamic error that is raised by evaluating the given query.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"evaluate-updating",qname:"zq:evaluate-updating",signature:"($query-key as xs:anyURI) external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Evaluates the given prepared query and applies the updates\n computed by this query. The query must be an updating query.</p>\n',summary:"<p>  Evaluates the given prepared query and applies the updates\n computed by this query.</p>",annotation_str:"",annotations:[],updating:!0,parameters:[{name:"query-key",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the identifier for a compiled query</div>'}],returns:{type:null,description:"the function has side effects because it applies the updates of the query. It returns the empty sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zq:NO_QUERY_MATCH if no query with the given identifier was prepared.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zq:QUERY_NOT_UPDATING if the query is not an updating query.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zq:QUERY_IS_SEQUENTIAL if the query is sequential.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">any dynamic error that is raised by evaluating the given query or applying its updates.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"evaluate",qname:"zq:evaluate",signature:"($query-key as xs:anyURI) as item()* external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Evaluates the given prepared query and returns the result\n of the evaluation. The query must not be sequential or\n updating.</p>\n',summary:"<p>  Evaluates the given prepared query and returns the result\n of the evaluation.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"query-key",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the identifier for a compiled query</div>'}],returns:{type:"item()*",description:"the result of evaluating the given query"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zq:NO_QUERY_MATCH if no query with the given identifier was prepared.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zq:QUERY_IS_UPDATING if the query is an updating query.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zq:QUERY_IS_SEQUENTIAL if the query is sequential.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">any dynamic error that is raised by evaluating the given query.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"external-variables",qname:"zq:external-variables",signature:"($query-key as xs:anyURI) as xs:QName* external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function returns the names of the external variables that\n are declared in the given query (either in the main module or\n in any of the imported library modules).</p>\n',summary:"<p>  The function returns the names of the external variables that\n are declared in the given query (either in the main module or\n in any of the imported library modules).</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"query-key",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the identifier for a compiled query</div>'}],returns:{type:"xs:QName*",description:"the sequence of names of the said external variables."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zq:NO_QUERY_MATCH if no query with the given identifier was prepared.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"is-bound-context-item",qname:"zq:is-bound-context-item",signature:"($query-key as xs:anyURI) as xs:boolean external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function tests if the context-item is bound for the\n execution of the query referred to by the given query identifier.</p>\n',summary:"<p>  The function tests if the context-item is bound for the\n execution of the query referred to by the given query identifier.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"query-key",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the identifier for a compiled query</div>'}],returns:{type:"xs:boolean",description:"true if the context-item is bound, false otherwise."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zq:NO_QUERY_MATCH if no query with the given identifier was prepared.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"is-bound-variable",qname:"zq:is-bound-variable",signature:"($query-key as xs:anyURI, $var-name as xs:QName) as xs:boolean external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function tests if the given variable is bound for the\n execution of the query referred to by the given query identifier.</p>\n',summary:"<p>  The function tests if the given variable is bound for the\n execution of the query referred to by the given query identifier.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"query-key",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the identifier for a compiled query</div>'},{name:"var-name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the variable</div>'}],returns:{type:"xs:boolean",description:"true if the variable is bound, false otherwise."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zq:NO_QUERY_MATCH if no query with the given identifier was prepared.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zq:UNDECLARED_VARIABLE if the given variable is not declared in the query.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"is-sequential",qname:"zq:is-sequential",signature:"($query-key as xs:anyURI) as xs:boolean external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function tests if the query identified by the given key\n is sequential query.</p>\n',summary:"<p>  The function tests if the query identified by the given key\n is sequential query.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"query-key",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the identifier for a compiled query</div>'}],returns:{type:"xs:boolean",description:"true if the query is a sequential, false otherwise."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zq:NO_QUERY_MATCH if no query with the given identifier was prepared.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"is-updating",qname:"zq:is-updating",signature:"($query-key as xs:anyURI) as xs:boolean external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function tests if the query identified by the given key\n is an updating query.</p>\n',summary:"<p>  The function tests if the query identified by the given key\n is an updating query.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"query-key",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the identifier for a compiled query</div>'}],returns:{type:"xs:boolean",description:"true if the query is an updating query, false otherwise."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zq:NO_QUERY_MATCH if no query with the given identifier was prepared.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"load-from-query-plan",qname:"zq:load-from-query-plan",signature:"($plan as xs:base64Binary) as xs:anyURI external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function loads a given query for execution from a\n xs:base64Binary query plan, obtained through the zq:query-plan function.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If the query was successfully loaded, the function returns an\n identifier as xs:anyURI. This URI can be passed to other functions\n of this module (e.g. to actually evaluate the query). The URI\n is opaque and its lifetime is bound by the lifetime of the query\n that invoked this function. Further reference or uses\n of the identifier lead to unexpected results.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Successfully prepared queries need to be deleted by passing the resulting\n identifier to the zq:delete-query function of this module.</p>\n',summary:"<p>  The function loads a given query for execution from a\n xs:base64Binary query plan, obtained through the zq:query-plan function.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"plan",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the binary query plan.</div>'}],returns:{type:"xs:anyURI",description:"an identifier for the compiled query that can be passed as arguments to other functions of this module."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">any (static or type) error that may be raised during the compilation of the query. For example, err:XPST0003 if the given query could not be parsed.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"load-from-query-plan",qname:"zq:load-from-query-plan",signature:"($plan as xs:base64Binary, $resolver as item()?, $mapper as item()?) as xs:anyURI external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function loads a given query for execution from a\n xs:base64Binary query plan, obtained through the zq:query-plan function.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If the query was successfully loaded, the function returns an\n identifier as xs:anyURI. This URI can be passed to other functions\n of this module (e.g. to actually evaluate the query). The URI\n is opaque and its lilfetime is bound by the lifetime of the query\n that invoked this function. Further reference or uses\n of the identifier lead to unexpected results.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For important notes regarding the second and third parameters of the\n function, review the comments in zq:prepare-main-module#3.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Successfully prepared queries need to be deleted by passing the resulting\n identifier to the zq:delete-query function of this module.</p>\n',summary:"<p>  The function loads a given query for execution from a\n xs:base64Binary query plan, obtained through the zq:query-plan function.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"plan",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the binary query plan.</div>'},{name:"resolver",type:"item()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the URL resolver function.</div>'},{name:"mapper",type:"item()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the URI mapper function.</div>'}],returns:{type:"xs:anyURI",description:"an identifier for the compiled query that can be passed as arguments to other functions of this module."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">any (static or type) error that may be raised during the compilation of the query. For example, err:XPST0003 if the given query could not be parsed.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"prepare-library-module",qname:"zq:prepare-library-module",signature:"($library-module-text as xs:string) as empty-sequence() external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function compiles a given XQuery or JSONiq library module.\n It can be used to compile-check a module.</p>\n',summary:"<p>  This function compiles a given XQuery or JSONiq library module.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"library-module-text",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the library module that should be prepared.</div>'}],returns:{type:"empty-sequence()",description:"the empty-sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">any (static or type) error that may be raised during the compilation of the library module. For example, err:XPST0003 if the given library module could not be parsed.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"prepare-main-module",qname:"zq:prepare-main-module",signature:"($main-module-text as xs:string) as xs:anyURI external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function prepares a given a query for execution.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If the query was successfully compiled, the function returns an\n identifier as xs:anyURI. This URI can be passed to other functions\n of this module (e.g. to actually evaluate the query). The URI\n is opaque and its lifetime is bound by the lifetime of the query\n that invoked this function. Further reference or uses\n of the identifier lead to unexpected results.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Successfully prepared queries need to be deleted by passing the resulting\n identifier to the zq:delete-query function of this module.</p>\n',summary:"<p>  The function prepares a given a query for execution.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"main-module-text",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the query that should be prepared. The query needs to be a XQuery or JSONiq main module.</div>'}],returns:{type:"xs:anyURI",description:"an identifier for the compiled query that can be passed as arguments to other functions of this module."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">any (static or type) error that may be raised during the compilation of the query. For example, err:XPST0003 if the given query could not be parsed.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"prepare-main-module",qname:"zq:prepare-main-module",signature:"($main-module-text as xs:string, $resolver as function (xs:string, xs:string) as item()??, $mapper as function (xs:string, xs:string) as xs:string*?) as xs:anyURI external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function prepares a given query for execution.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If the query was successfully compiled, the function returns an\n identifier as xs:anyURI. This URI can be passed to other functions\n of this module (e.g. to actually evaluate the query). The URI\n is opaque and its lifetime is bound by the lifetime of the query\n that invoked this function. Further reference or uses\n of the identifier lead to unexpected results.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Important notes regarding the second and third parameters of the function:</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">--------------------------------------------------------------------------</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">These parameters allow you to specify a URL resolver and a URI mapper\n for Zorba to use when executing this query. See\n <a href="http://www.zorba-xquery.com/html/documentation/2.7.0/zorba/uriresolvers">here</a></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <ul xmlns:xqdoc="http://www.xqdoc.org/1.0">The second parameter is a function item for a URL\n resolver. The URL resolver function must recive 2 parameters:\n <li>A $namespace as xs:string that will contain the url to be resolved.</li>\n <li>A $entity as xs:string that will contain the type of resolving needed.\n   This can be one of two values: "module" or "schema".</li>\n </ul>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function must return the empty sequence when the specified $namespace\n or $entity are not the ones to be resolved.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static" ace-mode="xquery">declare function mymod:url-resolver($namespace as xs:string, $entity as xs:string) as item()?\n {\n  if($namespace = \'http://test.xq\')\n  then "module namespace test = \'http://test\'; declare function test:foo(){\'foo\'};"\n  else ()\n };</pre>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The URL resolver function\'s namespace, name, and parameter naming are\n not restricted by ZQ.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The URL resolver function\'s return type is not restricted, it could be a string, a sequence,\n a node, etc. All the outputs types are to be serialized as a string.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The third parameter is a function item for a URI mapper.</p>\n <ul xmlns:xqdoc="http://www.xqdoc.org/1.0">The URI mapper function, just like the URL resolver, receives 2 parameters:\n <li>A $namespace as xs:string that will contain the URI to be mapped.</li>\n <li>A $entity as xs:string that will contain the type of resolving needed.\n   This can be one of two values: "module" or "schema".</li>\n </ul>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The URI mapper must return an empty sequence when the specified $namesapce or $entity\n are not to be mapped. Unlike the URL resolver this function must return a sequence of strings.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example:</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static" ace-mode="xquery">declare function mymod:uri-mapper($namespace as xs:string, $entity as xs:string)\n {\n  if($namespace = \'http://test\')\n  then ("http://zorba.io/test", "http://foo.com/schema/test")\n  else ()\n };</pre>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The URI mapper function\'s namespace, name, and parameter naming are\n not restricted by ZQ.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">In order to pass the above URL resolver and URI mapper to this function,\n use the following syntax:</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n   <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static" ace-mode="xquery">variable $queryID := zq:prepare-main-module("..query text..",\n      mymod:url-resolver#2, mymod:uri-mapper#2);</pre>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">That is, the QName of the function followed by "#2". This is XQuery\n "higher-order function" syntax, meaning the function with the specified\n QName which takes two arguments. Since URL resolvers and URI mappers\n must take two arguments, both will always be specified with "#2".</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Both the URL resolver and URI mapper functions are optional, meaning you\n may pass the empty-sequence () for either.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Successfully prepared queries need to be deleted by passing the resulting\n identifier to the zq:delete-query function of this module.</p>\n',summary:"<p>  The function prepares a given query for execution.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"main-module-text",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the query that should be prepared. The query needs to be a XQuery or JSONiq main module.</div>'},{name:"resolver",type:"function (xs:string, xs:string) as item()?",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the URL resolver function.</div>'},{name:"mapper",type:"function (xs:string, xs:string) as xs:string*",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the URI mapper function.</div>'}],returns:{type:"xs:anyURI",description:"an identifier for the compiled query that can be passed as arguments to other functions of this module."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">any (static or type) error that may be raised during the compilation of the query. For example, err:XPST0003 if the given query could not be parsed.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"query-plan",qname:"zq:query-plan",signature:"($query-key as xs:anyURI) as xs:base64Binary external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the compiled query identified by the given query-key\n as binary data.</p>\n',summary:"<p>  Returns the compiled query identified by the given query-key\n as binary data.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"query-key",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the identifier of a compiled query.</div>'}],returns:{type:"xs:base64Binary",description:"the query as xs:base64Binary."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zq:NO_QUERY_MATCH if no query with the given identifier was prepared.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zq:NO_QUERY_PLAN if there is an error serializing the query.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"variable-value",qname:"zq:variable-value",signature:"($query-key as xs:anyURI, $var-name as xs:QName) as item()* external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function returns the value of a variable that is bound in the\n given query.</p>\n',summary:"<p>  This function returns the value of a variable that is bound in the\n given query.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"query-key",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the identifier of a compiled query.</div>'},{name:"var-name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the variable whose value should be returned.</div>'}],returns:{type:"item()*",description:"the value bound to the given variable."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zq:NO_QUERY_MATCH if no query with the given identifier was prepared.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zq:UNDECLARED_VARIABLE if the given variable is not declared in the query.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zq:UNBOUND_VARIABLE if the given variable doesn\'t have a value.</xqdoc:error>']}],variables:[]},"http://xbrl.io/modules/bizql/hypercubes":{ns:"http://xbrl.io/modules/bizql/hypercubes",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This module provides functionality for manipulating hypercubes.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">A hypercube provides a multi-dimensional structure to organize facts.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The dimensions of a hypercube correspond to XBRL aspects (concepts, entities, periods,\n units, further XBRL dimensions). An XBRL hypercube only is made of XBRL dimensions, however\n including the other aspects as well is very useful in the context of NOLAP, so that xbrl.io\n does so.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">xbrl.io introduces the notion of default hypercube. A default hypercube is implicitly added\n to each component, and only contains the concept, entity, period and unit aspects.\n In other words, the default hypercube\n of a component contains all these facts that do not have any XBRL dimensions.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">With this module, you can retrieve all hypercubes contained in a component. You can\n retrieve all facts contained in a hypercube (default dimension values are processed automatically),\n either in raw form, or organized as a (2D) fact table. You can also populate a network (for example,\n a presentation network) with the facts contained in a hypercube.</p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Charles Hoffman</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Matthias Brantner</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Dennis Knochenwefel</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Ghislain Fourny</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://xbrl.io/modules/bizql/archives",prefix:"archives"},{uri:"http://xbrl.io/modules/bizql/concept-maps",prefix:"concept-maps"},{uri:"http://xbrl.io/modules/bizql/entities",prefix:"entities"},{uri:"http://xbrl.io/modules/bizql/facts",prefix:"facts"},{uri:"http://xbrl.io/modules/bizql/hypercubes",prefix:"hypercubes"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:0,name:"dimensionless-hypercube",qname:"hypercubes:dimensionless-hypercube",signature:"() as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns an instantiation of a dimensionless Hypercube containing only the basic\n    characteristics (xbrl:Concept, xbrl:Period, xbrl:Entity, and xbrl:Unit).\n    For each of those included aspects the value space is not limited.</p>\n',summary:"<p>  Returns an instantiation of a dimensionless Hypercube containing only the basic\n    characteristics (xbrl:Concept, xbrl:Period, xbrl:Entity, and xbrl:Unit).</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"object()",description:"dimensionless hypercube instantiation."},errors:[]},{isDocumented:!0,arity:1,name:"dimensionless-hypercube",qname:"hypercubes:dimensionless-hypercube",signature:"($options as object()?) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns an instantiation of a dimensionless Hypercube containing only the basic\n    characteristics (xbrl:Concept, xbrl:Period, xbrl:Entity, and xbrl:Unit).\n    For each of those included aspects the value space is not limited.</p>\n',summary:"<p>  Returns an instantiation of a dimensionless Hypercube containing only the basic\n    characteristics (xbrl:Concept, xbrl:Period, xbrl:Entity, and xbrl:Unit).</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0">: additional options among which: - Concepts: an array of concept names to include in the hypercube. - Periods: an array of periods to include in the hypercube. - Entities: an array of EIDs to include in the hypercube. - Units: an array of units to include in the hypercube.</div>'}],returns:{type:"object()",description:"dimensionless hypercube instantiation."},errors:[]},{isDocumented:!0,arity:2,name:"fact-table-for-hypercube",qname:"hypercubes:fact-table-for-hypercube",signature:"($hypercube as object(), $archives as item()*) as array()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves all facts from the supplied archives, that are relevant to the\n supplied hypercube, and populates them with the default dimension values\n when missing.</p>\n',summary:"<p>  Retrieves all facts from the supplied archives, that are relevant to the\n supplied hypercube, and populates them with the default dimension values\n when missing.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"hypercube",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a hypercube.</div>'},{name:"archives",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of archives or their AIDs or $hypercubes:ALL_ARCHIVES for no filtering.</div>'}],returns:{type:"array()",description:"a sequence of facts with populated dimension values."},errors:[]},{isDocumented:!0,arity:3,name:"fact-table-for-hypercube",qname:"hypercubes:fact-table-for-hypercube",signature:"($hypercube as object(), $archives as item()*, $options as object()?) as array()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves all facts from the supplied archives, that are relevant to the\n supplied hypercube, and populates them with the default dimension values\n when missing.</p>\n',summary:"<p>  Retrieves all facts from the supplied archives, that are relevant to the\n supplied hypercube, and populates them with the default dimension values\n when missing.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"hypercube",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a hypercube.</div>'},{name:"archives",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of archives or their AIDs</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> <a href="facts#standard_options">standard fact retrieving options</a>.</div>'}],returns:{type:"array()",description:"a sequence of facts with populated dimension values."},errors:[]},{isDocumented:!0,arity:2,name:"facts-for-hypercube",qname:"hypercubes:facts-for-hypercube",signature:"($hypercube as object(), $archives as item()*) as item()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves all facts from the supplied archives, that are relevant to the\n supplied hypercube, and populates them with the default dimension values\n when missing.</p>\n',summary:"<p>  Retrieves all facts from the supplied archives, that are relevant to the\n supplied hypercube, and populates them with the default dimension values\n when missing.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"hypercube",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a hypercube.</div>'},{name:"archives",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of archives or their AIDs or $hypercubes:ALL_ARCHIVES for no filtering.</div>'}],returns:{type:"item()*",description:"a sequence of facts with populated dimension values."},errors:[]},{isDocumented:!0,arity:3,name:"facts-for-hypercube",qname:"hypercubes:facts-for-hypercube",signature:"($hypercube as object(), $archives as item()*, $options as object()?) as item()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves all facts from the supplied archives, that are relevant to the\n supplied hypercube, and populates them with the default dimension values\n when missing.</p>\n',summary:"<p>  Retrieves all facts from the supplied archives, that are relevant to the\n supplied hypercube, and populates them with the default dimension values\n when missing.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"hypercube",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a hypercube.</div>'},{name:"archives",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of archives or their AIDs or $hypercubes:ALL_ARCHIVES for no filtering.</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> <a href="facts#standard_options">standard fact retrieving options</a>.</div>'}],returns:{type:"item()*",description:"a sequence of facts with populated dimension values."},errors:[]},{isDocumented:!0,arity:1,name:"hypercubes-for-components",qname:"hypercubes:hypercubes-for-components",signature:"($components as object()*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves all hypercubes in the supplied components.</p>\n',summary:"<p>  Retrieves all hypercubes in the supplied components.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"components",type:"object()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of components.</div>'}],returns:{type:"object()*",description:"all hypercubes."},errors:[]},{isDocumented:!0,arity:2,name:"hypercubes-for-components",qname:"hypercubes:hypercubes-for-components",signature:"($components as object()*, $names as string*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves all hypercubes in the supplied components and\n with the given names.</p>\n',summary:"<p>  Retrieves all hypercubes in the supplied components and\n with the given names.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"components",type:"object()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of components.</div>'},{name:"names",type:"string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of names.</div>'}],returns:{type:"object()*",description:"all hypercubes."},errors:[]},{isDocumented:!0,arity:3,name:"populate-networks-with-facts",qname:"hypercubes:populate-networks-with-facts",signature:"($networks as object()*, $hypercube as object(), $archives as item()*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Populates a concept-tree network with all facts from the supplied archives,\n that are relevant to the\n supplied hypercube. Default dimension values are added to the facts\n when missing.</p>\n',summary:"<p>  Populates a concept-tree network with all facts from the supplied archives,\n that are relevant to the\n supplied hypercube.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"networks",type:"object()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> networks.</div>'},{name:"hypercube",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a hypercube.</div>'},{name:"archives",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of archives or their AIDs or $hypercubes:ALL_ARCHIVES for no filtering.</div>'}],returns:{type:"object()*",description:"a sequence of facts with populated dimension values."},errors:[]},{isDocumented:!0,arity:4,name:"populate-networks-with-facts",qname:"hypercubes:populate-networks-with-facts",signature:"($networks as object()*, $hypercube as object(), $archives as item()*, $options as object()?) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Populates a concept-tree network with all facts from the supplied archives,\n that are relevant to the\n supplied hypercube. Default dimension values are added to the facts\n when missing.</p>\n',summary:"<p>  Populates a concept-tree network with all facts from the supplied archives,\n that are relevant to the\n supplied hypercube.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"networks",type:"object()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> networks.</div>'},{name:"hypercube",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a hypercube.</div>'},{name:"archives",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of archives or their AIDs.</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> <a href="facts#standard_options">standard fact retrieving options</a>.</div>'}],returns:{type:"object()*",description:"a sequence of facts with populated dimension values."},errors:[]}],variables:[{name:"hypercubes:ALL_ARCHIVES",type:"boolean",description:" Joker for all archives.\n"}]},"http://www.zorba-xquery.com/modules/xqdoc/batch":{ns:"http://www.zorba-xquery.com/modules/xqdoc/batch",description:" Process XQDoc batches.\n This module generates XQDoc HTML documentation from multiple\n XQuery modules.\n",sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">William Candillon <a href="?anchor=">wcandillon at gmail dot com</a></xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://www.zorba-xquery.com/modules/xqdoc/batch",prefix:"batch"},{uri:"http://www.w3.org/2005/xqt-errors",prefix:"err"},{uri:"http://expath.org/ns/file",prefix:"file"},{uri:"http://www.functx.com",prefix:"functx"},{uri:"http://www.w3.org/1999/xhtml",prefix:"h"},{uri:"http://www.zorba-xquery.com/modules/xqdoc/html",prefix:"html"},{uri:"http://www.zorba-xquery.com/modules/xqdoc/menu",prefix:"menu"},{uri:"http://www.w3.org/2010/xslt-xquery-serialization",prefix:"out"},{uri:"http://zorba.io/options/versioning",prefix:"ver"},{uri:"http://www.xqdoc.org/1.0",prefix:"xq"},{uri:"http://zorba.io/modules/xqdoc",prefix:"xqdoc"}],functions:[{isDocumented:!1,arity:2,name:"add-predeclared-namespaces",qname:"batch:add-predeclared-namespaces",signature:"($xqdoc as element(xq:xqdoc), $namespaces as element(namespace)*) as element(xq:xqdoc)",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"xqdoc",type:"element(xq:xqdoc)",occurrence:null,description:""},{name:"namespaces",type:"element(namespace)",occurrence:"*",description:""}],returns:{type:"element(xq:xqdoc)",description:""},errors:[]},{isDocumented:!1,arity:1,name:"add-trailing-slash",qname:"batch:add-trailing-slash",signature:"($path as xs:string) as xs:string",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"path",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!0,arity:4,name:"build-xqdoc",qname:"batch:build-xqdoc",signature:"($output-folder as xs:string, $static-folders as xs:string*, $template as element(*), $modules as element(modules))",description:" Run an XQDoc batch.\n",summary:"<p> Run an XQDoc batch.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"output-folder",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Where to write the generated files.</div>'},{name:"static-folders",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Where to copy the static files from.</div>'},{name:"template",type:"element(*)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> HTML layout of the generated files. The layount can contains different variables. For instance: <pre class="ace-static" ace-mode="xml"><body><var name="page"/></body></pre> is a valid example. Three variable names are available: <code>page</code>, <code>title</code>, and <code>menu</code>.</div>'},{name:"modules",type:"element(modules)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Document describing the documentation project. For instance: <pre class="ace-static" ace-mode="xml"> <modules> <namespace prefix="ann" uri="http://zorba.io/annotations"/> <section id="modules" label="My Modules"> <!-- Location hints are optionnals --> <module ns="http://example.com/mymodule" label="My Module" id="module" file="module.xq"/> </section> </modules> </pre></div>'}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:2,name:"copy-static-folders",qname:"batch:copy-static-folders",signature:"($output-folder as xs:string, $static-folders as xs:string*)",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"output-folder",type:"xs:string",occurrence:null,description:""},{name:"static-folders",type:"xs:string",occurrence:"*",description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:3,name:"create-page",qname:"batch:create-page",signature:"($output-folder as xs:string, $page-name as xs:string, $page as element(h:html))",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"output-folder",type:"xs:string",occurrence:null,description:""},{name:"page-name",type:"xs:string",occurrence:null,description:""},{name:"page",type:"element(h:html)",occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:1,name:"create-xml-folder",qname:"batch:create-xml-folder",signature:"($folder as xs:string)",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"folder",type:"xs:string",occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:3,name:"page",qname:"batch:page",signature:"($template as element(*), $menu as element(ul), $section as element(*)) as element(h:html)",description:"",summary:"",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"template",type:"element(*)",occurrence:null,description:""},{name:"menu",type:"element(ul)",occurrence:null,description:""},{name:"section",type:"element(*)",occurrence:null,description:""}],returns:{type:"element(h:html)",description:""},errors:[]},{isDocumented:!1,arity:2,name:"save-xml",qname:"batch:save-xml",signature:"($output-file, $page)",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"output-file",type:null,occurrence:null,description:""},{name:"page",type:null,occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:1,name:"section",qname:"batch:section",signature:"($sections as element(section)+) as element(section)+",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"sections",type:"element(section)",occurrence:"+",description:""}],returns:{type:"element(section)+",description:""},errors:[]},{isDocumented:!1,arity:2,name:"section",qname:"batch:section",signature:"($sections as element(section)+, $level as xs:integer) as element(section)+",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"sections",type:"element(section)",occurrence:"+",description:""},{name:"level",type:"xs:integer",occurrence:null,description:""}],returns:{type:"element(section)+",description:""},errors:[]},{isDocumented:!1,arity:1,name:"xqdoc",qname:"batch:xqdoc",signature:"($module as element(module)) as element(xq:xqdoc)",description:"",summary:"",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"module",type:"element(module)",occurrence:null,description:""}],returns:{type:"element(xq:xqdoc)",description:""},errors:[]}],variables:[]},"http://zorba.io/modules/data-cleaning/hybrid-string-similarity":{ns:"http://zorba.io/modules/data-cleaning/hybrid-string-similarity",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This library module provides hybrid string similarity functions, combining the properties of\n character-based string similarity functions and token-based string similarity functions.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The logic contained in this module is not specific to any particular XQuery implementation,\n although the module requires the trigonometic functions of XQuery 3.0 or a math extension\n function such as sqrt($x as numeric) for computing the square root.</p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Bruno Martins and Diogo Simões</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://www.w3.org/2005/xpath-functions/math",prefix:"math"},{uri:"http://zorba.io/modules/data-cleaning/set-similarity",prefix:"set"},{uri:"http://zorba.io/modules/data-cleaning/character-based-string-similarity",prefix:"simc"},{uri:"http://zorba.io/modules/data-cleaning/hybrid-string-similarity",prefix:"simh"},{uri:"http://zorba.io/modules/data-cleaning/phonetic-string-similarity",prefix:"simp"},{uri:"http://zorba.io/modules/data-cleaning/token-based-string-similarity",prefix:"simt"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:4,name:"monge-elkan-jaro-winkler",qname:"simh:monge-elkan-jaro-winkler",signature:"($s1 as xs:string, $s2 as xs:string, $prefix as xs:integer, $fact as xs:double) as xs:double",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the Monge-Elkan similarity coefficient between two strings, using the Jaro-Winkler</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">similarity function to discover token identity.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery"> monge-elkan-jaro-winkler("Comput. Sci. and Eng. Dept., University of California, San Diego", "Department of Computer Scinece, Univ. Calif., San Diego", 4, 0.1) </pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery"> 0.992 </pre></p>\n',summary:"<p>  Returns the Monge-Elkan similarity coefficient between two strings, using the Jaro-Winkler \n  similarity function to discover token identity.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s1",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The first string.</div>'},{name:"s2",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The second string.</div>'},{name:"prefix",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The number of characters to consider when testing for equal prefixes with the Jaro-Winkler metric.</div>'},{name:"fact",type:"xs:double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The weighting factor to consider when the input strings have equal prefixes with the Jaro-Winkler metric.</div>'}],returns:{type:"xs:double",description:"The Monge-Elkan similarity coefficient between the two strings."},errors:[]},{isDocumented:!0,arity:4,name:"soft-cosine-tokens-edit-distance",qname:"simh:soft-cosine-tokens-edit-distance",signature:"($s1 as xs:string, $s2 as xs:string, $r as xs:string, $t as xs:integer) as xs:double",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the cosine similarity coefficient between sets of tokens extracted from two strings.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The tokens from each string are weighted according to their occurence frequency (i.e., weighted according to the\n term-frequency heuristic from Information Retrieval).</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The Edit Distance similarity function is used to discover token identity, and tokens having an edit distance\n bellow a given threshold are considered as matching tokens.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery"> soft-cosine-tokens-edit-distance("The FLWOR Foundation", "FLWOR Found.", " +", 0 ) </pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery"> 0.408248290463863 </pre></p>\n',summary:"<p>  Returns the cosine similarity coefficient between sets of tokens extracted from two strings.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s1",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The first string.</div>'},{name:"s2",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The second string.</div>'},{name:"r",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A regular expression forming the delimiter character(s) which mark the boundaries between adjacent tokens.</div>'},{name:"t",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A threshold for the similarity function used to discover token identity.</div>'}],returns:{type:"xs:double",description:"The cosine similarity coefficient between the sets tokens extracted from the two strings."},errors:[]},{isDocumented:!0,arity:6,name:"soft-cosine-tokens-jaro-winkler",qname:"simh:soft-cosine-tokens-jaro-winkler",signature:"($s1 as xs:string, $s2 as xs:string, $r as xs:string, $t as xs:double, $prefix as xs:integer?, $fact as xs:double?) as xs:double",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the cosine similarity coefficient between sets of tokens extracted from two strings.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The tokens from each string are weighted according to their occurence frequency (i.e., weighted according to the\n term-frequency heuristic from Information Retrieval).</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The Jaro-Winkler similarity function is used to discover token identity, and tokens having a Jaro-Winkler\n similarity above a given threshold are considered as matching tokens.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery"> soft-cosine-tokens-jaro-winkler("The FLWOR Foundation", "FLWOR Found.", " +", 1, 4, 0.1 ) </pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery"> 0.45 </pre></p>\n',summary:"<p>  Returns the cosine similarity coefficient between sets of tokens extracted from two strings.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s1",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The first string.</div>'},{name:"s2",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The second string.</div>'},{name:"r",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A regular expression forming the delimiter character(s) which mark the boundaries between adjacent tokens.</div>'},{name:"t",type:"xs:double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A threshold for the similarity function used to discover token identity.</div>'},{name:"prefix",type:"xs:integer",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The number of characters to consider when testing for equal prefixes with the Jaro-Winkler metric.</div>'},{name:"fact",type:"xs:double",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The weighting factor to consider when the input strings have equal prefixes with the Jaro-Winkler metric.</div>'}],returns:{type:"xs:double",description:"The cosine similarity coefficient between the sets tokens extracted from the two strings."},errors:[]},{isDocumented:!0,arity:4,name:"soft-cosine-tokens-jaro",qname:"simh:soft-cosine-tokens-jaro",signature:"($s1 as xs:string, $s2 as xs:string, $r as xs:string, $t as xs:double) as xs:double",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the cosine similarity coefficient between sets of tokens extracted from two strings.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The tokens from each string are weighted according to their occurence frequency (i.e., weighted according to the\n term-frequency heuristic from Information Retrieval).</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The Jaro similarity function is used to discover token identity, and tokens having a Jaro similarity above\n a given threshold are considered as matching tokens.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery"> soft-cosine-tokens-jaro("The FLWOR Foundation", "FLWOR Found.", " +", 1 ) </pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery"> 0.5 </pre></p>\n',summary:"<p>  Returns the cosine similarity coefficient between sets of tokens extracted from two strings.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s1",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The first string.</div>'},{name:"s2",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The second string.</div>'},{name:"r",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A regular expression forming the delimiter character(s) which mark the boundaries between adjacent tokens.</div>'},{name:"t",type:"xs:double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A threshold for the similarity function used to discover token identity.</div>'}],returns:{type:"xs:double",description:"The cosine similarity coefficient between the sets tokens extracted from the two strings."},errors:[]},{isDocumented:!0,arity:3,name:"soft-cosine-tokens-metaphone",qname:"simh:soft-cosine-tokens-metaphone",signature:"($s1 as xs:string, $s2 as xs:string, $r as xs:string) as xs:double",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the cosine similarity coefficient between sets of tokens extracted from two strings.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The tokens from each string are weighted according to their occurence frequency (i.e., weighted according to the\n term-frequency heuristic from Information Retrieval).</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The Metaphone phonetic similarity function is used to discover token identity, which is equivalent to saying that\n this function returns the cosine similarity coefficient between sets of Metaphone keys.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery"> soft-cosine-tokens-metaphone("ALEKSANDER SMITH", "ALEXANDER SMYTH", " +" ) </pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery"> 1.0 </pre></p>\n',summary:"<p>  Returns the cosine similarity coefficient between sets of tokens extracted from two strings.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s1",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The first string.</div>'},{name:"s2",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The second string.</div>'},{name:"r",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A regular expression forming the delimiter character(s) which mark the boundaries between adjacent tokens.</div>'}],returns:{type:"xs:double",description:"The cosine similarity coefficient between the sets Metaphone keys extracted from the two strings."},errors:[]},{isDocumented:!0,arity:3,name:"soft-cosine-tokens-soundex",qname:"simh:soft-cosine-tokens-soundex",signature:"($s1 as xs:string, $s2 as xs:string, $r as xs:string) as xs:double",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the cosine similarity coefficient between sets of tokens extracted from two strings.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The tokens from each string are weighted according to their occurence frequency (i.e., weighted according to the\n term-frequency heuristic from Information Retrieval).</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The Soundex phonetic similarity function is used to discover token identity, which is equivalent to saying that\n this function returns the cosine similarity coefficient between sets of Soundex keys.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery"> soft-cosine-tokens-soundex("ALEKSANDER SMITH", "ALEXANDER SMYTH", " +") </pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery"> 1.0 </pre></p>\n',summary:"<p>  Returns the cosine similarity coefficient between sets of tokens extracted from two strings.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s1",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The first string.</div>'},{name:"s2",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The second string.</div>'},{name:"r",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A regular expression forming the delimiter character(s) which mark the boundaries between adjacent tokens.</div>'}],returns:{type:"xs:double",description:"The cosine similarity coefficient between the sets of Soundex keys extracted from the two strings."},errors:[]}],variables:[]},"http://xbrl.io/modules/bizql/rules":{ns:"http://xbrl.io/modules/bizql/rules",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This module provides functions for storing, retrieving, and modifying\n rules. Rules can be used in BizQL queries to:</p>\n <ul xmlns:xqdoc="http://www.xqdoc.org/1.0">\n   <li>Impute Facts that were not reported within an instance, yet can be\n       derived from reported facts.</li>\n   <li>Compute arbitrary new Facts (Ratios, Calculated Facts, Facts from different\n       Datasources/Instances, etc.).</li>\n   <li>Run validation and/or verification rules</li>\n </ul>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">A Rule is an object containing a BizQL fomula to execute if a condition is met.\n For example if a user queries for a certain concept and a rule exists for this\n concept then the rule is applied to get the fact.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">With this module, you can retrieve the rules associated with each report\n schema. You can also query for facts by making implicitly use of the mapping.</p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Charles Hoffman</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Matthias Brantner</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Dennis Knochenwefel</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Ghislain Fourny</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://xbrl.io/modules/bizql/archives",prefix:"archives"},{uri:"http://xbrl.io/modules/bizql/facts",prefix:"facts"},{uri:"http://xbrl.io/modules/bizql/networks",prefix:"networks"},{uri:"http://xbrl.io/modules/bizql/report-schemas",prefix:"report-schemas"},{uri:"http://xbrl.io/modules/bizql/rules",prefix:"rules"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:7,name:"create-computed-fact",qname:"rules:create-computed-fact",signature:"($template-fact as object(), $concept-name-or-aspects as item(), $value as item(), $rule as object(), $audit-trail-message as string, $source-facts as object()*, $options as object()?) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Helper function to create a new fact within a rule.</p>\n',summary:"<p>  Helper function to create a new fact within a rule.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"template-fact",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a fact object that will be used as a template for the newly created fact</div>'},{name:"concept-name-or-aspects",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> either a name of the concept for the newly created fact or a complete aspects object to be used in the new fact.</div>'},{name:"value",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a value for the newly created fact</div>'},{name:"rule",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the rule in which this fact has been created</div>'},{name:"audit-trail-message",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a verbose string message explaining how and why this fact has been created</div>'},{name:"source-facts",type:"object()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> sequence of facts that have been used to compute the new fact (this will only be added to the AuditTrails if the audit-trail option is set to "debug")</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> <a href="facts#standard_options">standard fact retrieving options</a>.</div>'}],returns:{type:"object()",description:"the decimal value of the fact or 0."},errors:[]},{isDocumented:!0,arity:1,name:"fact-trail",qname:"rules:fact-trail",signature:"($fact as object()?) as string",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Serializes a fact to a simple string format that can be used in\n    audit trail messages to trail the value of the fact.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The returned string follows the pattern: fact-concept-name[fact-value]</p>\n',summary:"<p>  Serializes a fact to a simple string format that can be used in\n    audit trail messages to trail the value of the fact.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"fact",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a single fact to serialize to a simple informative string</div>'}],returns:{type:"string",description:"the string with key information about the fact."},errors:[]},{isDocumented:!0,arity:2,name:"fact-trail",qname:"rules:fact-trail",signature:"($fact as object()?, $name as string) as string",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Serializes a fact to a simple string format that can be used in\n    audit trail messages to trail the value of the fact.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The returned string follows the pattern: fact-concept-name[fact-value]</p>\n',summary:"<p>  Serializes a fact to a simple string format that can be used in\n    audit trail messages to trail the value of the fact.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"fact",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> an empty-sequence or a single fact to serialize to a simple informative string</div>'},{name:"name",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> an alternative name to use if the $fact is an empty-sequence otherwise the name will be taken from the fact</div>'}],returns:{type:"string",description:"the string with key information about the fact."},errors:[]},{isDocumented:!0,arity:0,name:"rules",qname:"rules:rules",signature:"() as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Retrieves all rules from all report schemas.</p>\n',summary:"<p>  Retrieves all rules from all report schemas.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"object()*",description:"all rules."},errors:[]},{isDocumented:!0,arity:1,name:"rules",qname:"rules:rules",signature:"($report-schemas-or-ids as item()*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Return the rules from the given report schemas.</p>\n',summary:"<p>  Return the rules from the given report schemas.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"report-schemas-or-ids",type:"item()",occurrence:"*",description:""}],returns:{type:"object()*",description:"the rules from the report schemas."},errors:[]}],variables:[]},"http://www.28msec.com/modules/lock":{ns:"http://www.28msec.com/modules/lock",description:" Sausalito provides a an application level locking mechanism that can be\n used e.g. to ensure exclusive access to data.\n As the store ensures atomicity of of single document updates, atomic\n updates to multiple documents are implemented using this mechanism.\n Locks can be acquired and re-acquired at any time during a request and\n are released at the end of the request.\n",sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">28msec</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://www.28msec.com/modules/lock",prefix:"lock"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"try-acquire",qname:"lock:try-acquire",signature:"($lock-name as xs:string) as xs:boolean external",description:' Tries to acquire a lock.\n This operation is non-blocking if the lock cannot be acquired immediately.\n To check and modify the stock of a product wihtout interference from\n concurrent requests a lock could be used like this:\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0">\n if (lock:try-acquire("stock-update"))\n then\n   if (stock:check($product-id))\n   then\n     {\n       order:finalize($order-id);\n       stock:decrement($product-id);\n     }\n   else\n     order:hold($order-id);\n else\n   ...\n </pre>\n',summary:"<p> Tries to acquire a lock.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"lock-name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the lock.</div>'}],returns:{type:"xs:boolean",description:"true if the lock could be acquired, false otherwise."},errors:[]},{isDocumented:!0,arity:2,name:"try-acquire",qname:"lock:try-acquire",signature:"($lock-name as xs:string, $reason as xs:string) as xs:boolean external",description:" tries to acquire a lock\n",summary:"<p> tries to acquire a lock\n</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"lock-name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the lock.</div>'},{name:"reason",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a reason for the acquisition of the lock that can be used for</div>'}],returns:{type:"xs:boolean",description:"true if the lock could be acquired, false otherwise."},errors:[]}],variables:[]},"http://www.zorba-xquery.com/modules/xqdoc/html":{ns:"http://www.zorba-xquery.com/modules/xqdoc/html",description:' Convert an XQDoc document into an HTML document.\n This module contains a single <code xmlns:xqdoc="http://www.xqdoc.org/1.0">convert()</code> function\n that transform an XQDoc document into an HTML document.\n Usage:\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static" ace-mode="xquery">\n let $xqdoc := xqdoc:xqdoc("http://expath.org/ns/file")\n return html:convert($xqdoc)\n </pre>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">William Candillon <a href="?anchor=">wcandillon at gmail dot com</a></xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://www.zorba-xquery.com/modules/xqdoc/html",prefix:"html"},{uri:"http://www.w3.org/2010/xslt-xquery-serialization",prefix:"o"},{uri:"http://zorba.io/options/versioning",prefix:"ver"},{uri:"http://www.xqdoc.org/1.0",prefix:"xq"}],functions:[{isDocumented:!1,arity:1,name:"convert",qname:"html:convert",signature:"($xqdoc as element(xq:xqdoc)) as element(div)",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"xqdoc",type:"element(xq:xqdoc)",occurrence:null,description:""}],returns:{type:"element(div)",description:""},errors:[]}],variables:[]},"http://api.28.io/model":{ns:"http://api.28.io/model",description:"",sees:[],authors:[],version:null,encoding:null,namespaces:[{uri:"",prefix:"an"},{uri:"http://zorba.io/modules/store/static/collections/ddl",prefix:"cddl"},{uri:"http://zorba.io/modules/store/static/collections/dml",prefix:"cdml"},{uri:"http://zorba.io/modules/store/static/indexes/ddl",prefix:"iddl"},{uri:"http://zorba.io/modules/store/static/indexes/dml",prefix:"idml"},{uri:"http://api.28.io/model",prefix:"model"},{uri:"http://www.zorba-xquery.com/schemas/pul",prefix:"pul"},{uri:"http://zorba.io/modules/reference",prefix:"ref"},{uri:"http://www.zorba-xquery.com/schemas/xdm",prefix:"xdm"}],functions:[{isDocumented:!1,arity:1,name:"applyPUL",qname:"model:applyPUL",signature:"($pul as schema-element(pul:pending-update-list))",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"pul",type:"schema-element(pul:pending-update-list)",occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:1,name:"applyPULOp",qname:"model:applyPULOp",signature:"($pul)",description:"",summary:"",annotation_str:"",annotations:[],updating:!0,parameters:[{name:"pul",type:null,occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:1,name:"build-nodes",qname:"model:build-nodes",signature:"($definition)",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"definition",type:null,occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!0,arity:1,name:"collection-qname",qname:"model:collection-qname",signature:"($name as xs:string) as xs:QName",description:" Returns the QName for a collection. Returns the empty sequence if no collection with the given name exists.\n",summary:"<p> Returns the QName for a collection.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the collection as string</div>'}],returns:{type:"xs:QName",description:"the QName for the collection or the empty sequence"},errors:[]},{isDocumented:!1,arity:2,name:"delete-node-collection",qname:"model:delete-node-collection",signature:"($collection as xs:QName, $noderef as xs:anyURI?)",description:"",summary:"",annotation_str:"",annotations:[],updating:!0,parameters:[{name:"collection",type:"xs:QName",occurrence:null,description:""},{name:"noderef",type:"xs:anyURI",occurrence:"?",description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:1,name:"delete-node",qname:"model:delete-node",signature:"($noderef as xs:anyURI)",description:"",summary:"",annotation_str:"",annotations:[],updating:!0,parameters:[{name:"noderef",type:"xs:anyURI",occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:1,name:"element-node",qname:"model:element-node",signature:"($definition as schema-element(xdm:element))",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"definition",type:"schema-element(xdm:element)",occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:1,name:"find-keys",qname:"model:find-keys",signature:"($collection)",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"collection",type:null,occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!0,arity:0,name:"get-collection-names",qname:"model:get-collection-names",signature:"() as xs:string*",description:" Returns all collection names\n",summary:"<p> Returns all collection names\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:string*",description:"collection names as a sequence of strings"},errors:[]},{isDocumented:!0,arity:1,name:"get-collection-size",qname:"model:get-collection-size",signature:"($name as xs:string) as xs:integer",description:" Returns the size of a collection\n",summary:"<p> Returns the size of a collection\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the collection as string</div>'}],returns:{type:"xs:integer",description:"the size of the collection"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">if the collection chosen by $name does not exist</xqdoc:error>']},{isDocumented:!0,arity:1,name:"get-collection",qname:"model:get-collection",signature:"($name as xs:string) as node()*",description:" Returns the whole collection with a given name\n",summary:"<p> Returns the whole collection with a given name\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> name of collection to return</div>'}],returns:{type:"node()*",description:"sequence of nodes of the collection"},errors:[]},{isDocumented:!0,arity:4,name:"get-collection",qname:"model:get-collection",signature:"($name as xs:string, $first-noderef as xs:anyURI?, $offset as xs:integer?, $limit as xs:integer)",description:' Returns "a page" of the collection (a part)\n',summary:'<p> Returns "a page" of the collection (a part)\n</p>',annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the collection as string</div>'},{name:"first-noderef",type:"xs:anyURI",occurrence:"?",description:""},{name:"offset",type:"xs:integer",occurrence:"?",description:""},{name:"limit",type:"xs:integer",occurrence:null,description:""}],returns:{type:null,description:"a sequence of nodes from the collection"},errors:[]},{isDocumented:!1,arity:4,name:"get-column-id",qname:"model:get-column-id",signature:"($basepath as xs:string?, $name as xs:string, $isattribute as xs:boolean, $columns) as xs:integer",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"basepath",type:"xs:string",occurrence:"?",description:""},{name:"name",type:"xs:string",occurrence:null,description:""},{name:"isattribute",type:"xs:boolean",occurrence:null,description:""},{name:"columns",type:null,occurrence:null,description:""}],returns:{type:"xs:integer",description:""},errors:[]},{isDocumented:!0,arity:0,name:"get-index-names",qname:"model:get-index-names",signature:"() as xs:string*",description:" Returns all index names\n",summary:"<p> Returns all index names\n</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:string*",description:"index names as a sequence of strings"},errors:[]},{isDocumented:!1,arity:2,name:"get-index-point",qname:"model:get-index-point",signature:"($index-name as xs:string, $index-key)",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"index-name",type:"xs:string",occurrence:null,description:""},{name:"index-key",type:null,occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:1,name:"get-node-group",qname:"model:get-node-group",signature:"($noderef as xs:anyURI)",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"noderef",type:"xs:anyURI",occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:1,name:"get-node-path",qname:"model:get-node-path",signature:"($node)",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"node",type:null,occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:1,name:"get-node",qname:"model:get-node",signature:"($noderef as xs:anyURI)",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"noderef",type:"xs:anyURI",occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!0,arity:1,name:"index-qname",qname:"model:index-qname",signature:"($name as xs:string) as xs:QName",description:" Returns the QName for an index. Returns the empty sequence if no index with the given name exists.\n",summary:"<p> Returns the QName for an index.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the index as string</div>'}],returns:{type:"xs:QName",description:"the QName for the index or the empty sequence"},errors:[]},{isDocumented:!1,arity:3,name:"insert-attribute",qname:"model:insert-attribute",signature:"($noderef as xs:anyURI, $attribute as xs:string, $value)",description:"",summary:"",annotation_str:"",annotations:[],updating:!0,parameters:[{name:"noderef",type:"xs:anyURI",occurrence:null,description:""},{name:"attribute",type:"xs:string",occurrence:null,description:""},{name:"value",type:null,occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:4,name:"insert-node-collection-ordered",qname:"model:insert-node-collection-ordered",signature:"($collection as xs:QName, $noderef as xs:anyURI?, $position as xs:string, $nodes)",description:"",summary:"",annotation_str:"",annotations:[],updating:!0,parameters:[{name:"collection",type:"xs:QName",occurrence:null,description:""},{name:"noderef",type:"xs:anyURI",occurrence:"?",description:""},{name:"position",type:"xs:string",occurrence:null,description:""},{name:"nodes",type:null,occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:4,name:"insert-node-collection",qname:"model:insert-node-collection",signature:"($collection as xs:QName, $noderef as xs:anyURI?, $position as xs:string, $nodes)",description:"",summary:"",annotation_str:"",annotations:[],updating:!0,parameters:[{name:"collection",type:"xs:QName",occurrence:null,description:""},{name:"noderef",type:"xs:anyURI",occurrence:"?",description:""},{name:"position",type:"xs:string",occurrence:null,description:""},{name:"nodes",type:null,occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:5,name:"insert-node-collection",qname:"model:insert-node-collection",signature:"($collection as xs:QName, $noderef as xs:anyURI?, $position as xs:string, $nodes, $validate as xs:boolean)",description:"",summary:"",annotation_str:"",annotations:[],updating:!0,parameters:[{name:"collection",type:"xs:QName",occurrence:null,description:""},{name:"noderef",type:"xs:anyURI",occurrence:"?",description:""},{name:"position",type:"xs:string",occurrence:null,description:""},{name:"nodes",type:null,occurrence:null,description:""},{name:"validate",type:"xs:boolean",occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:3,name:"insert-node",qname:"model:insert-node",signature:"($noderef as xs:anyURI, $position as xs:string, $newnodes)",description:"",summary:"",annotation_str:"",annotations:[],updating:!0,parameters:[{name:"noderef",type:"xs:anyURI",occurrence:null,description:""},{name:"position",type:"xs:string",occurrence:null,description:""},{name:"newnodes",type:null,occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:4,name:"make-table-row",qname:"model:make-table-row",signature:"($idx, $node, $columns, $namespaces)",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"idx",type:null,occurrence:null,description:""},{name:"node",type:null,occurrence:null,description:""},{name:"columns",type:null,occurrence:null,description:""},{name:"namespaces",type:null,occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:5,name:"make-table-row",qname:"model:make-table-row",signature:"($node, $path as xs:string?, $row, $columns, $namespaces)",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"node",type:null,occurrence:null,description:""},{name:"path",type:"xs:string",occurrence:"?",description:""},{name:"row",type:null,occurrence:null,description:""},{name:"columns",type:null,occurrence:null,description:""},{name:"namespaces",type:null,occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:2,name:"make-table",qname:"model:make-table",signature:"($nodes, $namespaces)",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"nodes",type:null,occurrence:null,description:""},{name:"namespaces",type:null,occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:2,name:"node-name",qname:"model:node-name",signature:"($node as element(*), $namespaces) as xs:string",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"node",type:"element(*)",occurrence:null,description:""},{name:"namespaces",type:null,occurrence:null,description:""}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!1,arity:2,name:"node-path-index",qname:"model:node-path-index",signature:"($node as node(), $parent as node()) as xs:integer?",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"node",type:"node()",occurrence:null,description:""},{name:"parent",type:"node()",occurrence:null,description:""}],returns:{type:"xs:integer?",description:""},errors:[]},{isDocumented:!1,arity:2,name:"node-prefix",qname:"model:node-prefix",signature:"($node as element(*), $namespaces) as xs:string?",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"node",type:"element(*)",occurrence:null,description:""},{name:"namespaces",type:null,occurrence:null,description:""}],returns:{type:"xs:string?",description:""},errors:[]},{isDocumented:!1,arity:1,name:"node-reference",qname:"model:node-reference",signature:"($node) as xs:string",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"node",type:null,occurrence:null,description:""}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!1,arity:1,name:"node",qname:"model:node",signature:"($definition)",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"definition",type:null,occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:2,name:"rename-node",qname:"model:rename-node",signature:"($noderef as xs:anyURI, $name as xs:QName)",description:"",summary:"",annotation_str:"",annotations:[],updating:!0,parameters:[{name:"noderef",type:"xs:anyURI",occurrence:null,description:""},{name:"name",type:"xs:QName",occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:2,name:"replace-node",qname:"model:replace-node",signature:"($noderef as xs:anyURI, $nodes)",description:"",summary:"",annotation_str:"",annotations:[],updating:!0,parameters:[{name:"noderef",type:"xs:anyURI",occurrence:null,description:""},{name:"nodes",type:null,occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:2,name:"replace-value",qname:"model:replace-value",signature:"($noderef as xs:anyURI, $value)",description:"",summary:"",annotation_str:"",annotations:[],updating:!0,parameters:[{name:"noderef",type:"xs:anyURI",occurrence:null,description:""},{name:"value",type:null,occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:2,name:"resolve-qname",qname:"model:resolve-qname",signature:"($name as xs:QName, $namespaces) as xs:string",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:""},{name:"namespaces",type:null,occurrence:null,description:""}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!1,arity:1,name:"type-save",qname:"model:type-save",signature:"($val) as xs:string",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"val",type:null,occurrence:null,description:""}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!1,arity:1,name:"type",qname:"model:type",signature:"($val as xs:anyAtomicType?) as xs:string",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"val",type:"xs:anyAtomicType",occurrence:"?",description:""}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!1,arity:1,name:"unused-prefix",qname:"model:unused-prefix",signature:"($namespaces) as xs:string",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"namespaces",type:null,occurrence:null,description:""}],returns:{type:"xs:string",description:""},errors:[]}],variables:[]},"http://api.28.io/validation":{ns:"http://api.28.io/validation",description:"",sees:[],authors:[],version:null,encoding:null,namespaces:[{uri:"http://zorba.io/modules/reflection",prefix:"reflection"},{uri:"http://www.28msec.com/modules/http/response",prefix:"resp"},{uri:"http://api.28.io/validation",prefix:"validate"}],functions:[{isDocumented:!1,arity:3,name:"by-schema-array",qname:"validate:by-schema-array",signature:"($obj, $schema as array(), $path as xs:string)",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"obj",type:null,occurrence:null,description:""},{name:"schema",type:"array()",occurrence:null,description:""},{name:"path",type:"xs:string",occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:3,name:"by-schema-obj",qname:"validate:by-schema-obj",signature:"($obj as object(), $schema as object(), $path as xs:string)",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"obj",type:"object()",occurrence:null,description:""},{name:"schema",type:"object()",occurrence:null,description:""},{name:"path",type:"xs:string",occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:3,name:"by-schema-primitive",qname:"validate:by-schema-primitive",signature:"($obj, $schema-type as xs:string, $path)",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"obj",type:null,occurrence:null,description:""},{name:"schema-type",type:"xs:string",occurrence:null,description:""},{name:"path",type:null,occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:2,name:"by-schema",qname:"validate:by-schema",signature:"($obj as object(), $schema as object())",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"obj",type:"object()",occurrence:null,description:""},{name:"schema",type:"object()",occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:2,name:"expression",qname:"validate:expression",signature:"($expression as xs:string, $is-domain-expr as xs:boolean) as xs:boolean",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"expression",type:"xs:string",occurrence:null,description:""},{name:"is-domain-expr",type:"xs:boolean",occurrence:null,description:""}],returns:{type:"xs:boolean",description:""},errors:[]},{isDocumented:!1,arity:1,name:"type",qname:"validate:type",signature:"($type as xs:string) as xs:boolean",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"type",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:boolean",description:""},errors:[]}],variables:[]},"http://api.28.io/sandbox":{ns:"http://api.28.io/sandbox",description:"",sees:[],authors:[],version:null,encoding:null,namespaces:[{uri:"http://zorba.io/modules/reference",prefix:"ref"},{uri:"http://zorba.io/modules/reflection",prefix:"reflection"},{uri:"http://api.28.io/sandbox",prefix:"sandbox"}],functions:[{isDocumented:!1,arity:3,name:"filter",qname:"sandbox:filter",signature:"($nodes, $xpath as xs:string, $namespaces)",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"nodes",type:null,occurrence:null,description:""},{name:"xpath",type:"xs:string",occurrence:null,description:""},{name:"namespaces",type:null,occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:3,name:"get-names",qname:"sandbox:get-names",signature:"($nodes, $path as xs:string, $namespaces)",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"nodes",type:null,occurrence:null,description:""},{name:"path",type:"xs:string",occurrence:null,description:""},{name:"namespaces",type:null,occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:3,name:"get-values",qname:"sandbox:get-values",signature:"($nodes, $path as xs:string, $namespaces)",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"nodes",type:null,occurrence:null,description:""},{name:"path",type:"xs:string",occurrence:null,description:""},{name:"namespaces",type:null,occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:3,name:"key-constraint",qname:"sandbox:key-constraint",signature:"($nodes, $condition as xs:string, $namespaces)",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"nodes",type:null,occurrence:null,description:""},{name:"condition",type:"xs:string",occurrence:null,description:""},{name:"namespaces",type:null,occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:1,name:"ns-declarations",qname:"sandbox:ns-declarations",signature:"($namespaces) as xs:string",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"namespaces",type:null,occurrence:null,description:""}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!1,arity:4,name:"order",qname:"sandbox:order",signature:"($nodes, $path as xs:string, $descending as xs:boolean, $namespaces)",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"nodes",type:null,occurrence:null,description:""},{name:"path",type:"xs:string",occurrence:null,description:""},{name:"descending",type:"xs:boolean",occurrence:null,description:""},{name:"namespaces",type:null,occurrence:null,description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:3,name:"tuple-constraint",qname:"sandbox:tuple-constraint",signature:"($nodes, $condition as xs:string, $namespaces)",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"nodes",type:null,occurrence:null,description:""},{name:"condition",type:"xs:string",occurrence:null,description:""},{name:"namespaces",type:null,occurrence:null,description:""}],returns:{type:null,description:""},errors:[]}],variables:[]},"http://zorba.io/modules/store/static/collections/dml":{ns:"http://zorba.io/modules/store/static/collections/dml",description:' This modules provides a set of functions to modify a collection\n and retrieve the items contained in a particular collection.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n This module is part of\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="../zorba/xqddf.html">Zorba\'s XQuery Data Definition Facility</a>.\n All the collections managed by this module have to be pre-declared in the\n prolog of a module.\n Please refer to the\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="../zorba/data_lifecycle.html">general documentation</a>\n for more information and examples.\n',sees:['<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0"><a href="../zorba/data_lifecycle.html">Data Lifecycle</a></xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0"><a href="../zorba/xqddf.html">XQuery Data Definition Facility</a></xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://zorba.io/modules/store/static/collections/ddl</xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://zorba.io/modules/store/static/indexes/ddl</xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://zorba.io/modules/store/static/indexes/dml</xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://zorba.io/modules/store/static/integrity-constraints/ddl</xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://zorba.io/modules/store/static/integrity-constraints/dml</xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://zorba.io/errors</xqdoc:see>'],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Nicolae Brinza, Matthias Brantner, David Graf, Till Westmann, Markos Zaharioudakis</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://zorba.io/modules/store/static/collections/dml",prefix:"cdml"},{uri:"http://zorba.io/options/versioning",prefix:"ver"},{uri:"http://zorba.io/errors",prefix:"zerr"}],functions:[{isDocumented:!0,arity:3,name:"apply-insert-after",qname:"cdml:apply-insert-after",signature:"($name as xs:QName, $pos as item(), $content as item()*) as item()* external",description:' This function does the same thing as the <code xmlns:xqdoc="http://www.xqdoc.org/1.0">insert-after()</code>\n function except it immediately applies the resulting pending updates and\n returns the items that have been inserted.\n',summary:"<p> This function does the same thing as the  insert-after() \n function except it immediately applies the resulting pending updates and\n returns the items that have been inserted.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the collection to insert into.</div>'},{name:"pos",type:"item()",occurrence:null,description:""},{name:"content",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The sequence of items whose copies to insert.</div>'}],returns:{type:"item()*",description:"The sequence of items that have been inserted."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0001 if the collection is not declared.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0003 if the collection is not available.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0006 if the collection is const, append-only, or queue.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0012 if the collection is unordered.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDTY0001 if <code>$content</code> does not match the expected type as specified in the collection declaration according to the rules for SequenceType Matching.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0011 if <code>$target</code> is not in the collection.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"apply-insert-before",qname:"cdml:apply-insert-before",signature:"($name as xs:QName, $target as item(), $content as item()*) as item()* external",description:' This function does the same thing as <code xmlns:xqdoc="http://www.xqdoc.org/1.0">insert-before()</code> except it\n immediately applies the resulting pending updates and returns the items that\n have been inserted.\n',summary:"<p> This function does the same thing as  insert-before()  except it\n immediately applies the resulting pending updates and returns the items that\n have been inserted.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the collection to insert into.</div>'},{name:"target",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The item in the collection before which <code>$content</code> will be inserted.</div>'},{name:"content",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The sequence of items whose copies to insert.</div>'}],returns:{type:"item()*",description:"The sequence of items that have been inserted."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0001 if the collection is not declared.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0003 if the collection is not available.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0006 if the collection $name is const, append-only, or queue.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0012 if the collection is unordered.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDTY0001 if <code>$content</code> does not match the expected type as specified in the collection declaration according to the rules for SequenceType Matching.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0011 if <code>$target</code> is not an item that is contained in the collection.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"apply-insert-first",qname:"cdml:apply-insert-first",signature:"($name as xs:QName, $content as item()*) as item()* external",description:' This function does the same thing as <code xmlns:xqdoc="http://www.xqdoc.org/1.0">insert-first()</code> except it\n immediately applies the resulting pending updates and returns the items that\n have been inserted.\n',summary:"<p> This function does the same thing as  insert-first()  except it\n immediately applies the resulting pending updates and returns the items that\n have been inserted.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the collection to insert into.</div>'},{name:"content",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The sequence of items whose copies to insert.</div>'}],returns:{type:"item()*",description:"The Sequence of items that have been inserted."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0001 if the collection is not declared.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0003 if the collection is not available.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0006 if the collection $name is append-only, const, or queue.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0012 if the collection is unordered.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDTY0001 if <code>$content</code> does not match the expected type as specified in the collection declaration according to the rules for SequenceType Matching.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"apply-insert-last",qname:"cdml:apply-insert-last",signature:"($name as xs:QName, $content as item()*) as item()* external",description:' This function does the same thing as <code xmlns:xqdoc="http://www.xqdoc.org/1.0">insert-last()</code> except it\n immediately applies the resulting pending updates and returns the items that\n have been inserted.\n',summary:"<p> This function does the same thing as  insert-last()  except it\n immediately applies the resulting pending updates and returns the items that\n have been inserted.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the collection to insert into.</div>'},{name:"content",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The sequence of items whose copies to insert.</div>'}],returns:{type:"item()*",description:"The sequence of items that have been inserted."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0001 if the collection is not declared.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0003 if the collection is not available.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0006 if the collection is const.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0012 if the collection is unordered.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDTY0001 if <code>$content</code> does not match the expected type as specified in the collection declaration according to the rules for SequenceType Matching.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"apply-insert",qname:"cdml:apply-insert",signature:"($name as xs:QName, $content as item()*) as item()* external",description:' This function does the same thing as <code xmlns:xqdoc="http://www.xqdoc.org/1.0">insert()</code> except it\n immediately applies the resulting pending updates and returns the items that\n have been inserted.\n',summary:"<p> This function does the same thing as  insert()  except it\n immediately applies the resulting pending updates and returns the items that\n have been inserted.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the collection to insert into.</div>'},{name:"content",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The sequence of items whose copies to insert.</div>'}],returns:{type:"item()*",description:"The sequence of items that have been inserted."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0001 if the collection is not declared.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0003 if the collection is not available.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0006 if the collection is append-only, const, or queue.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDTY0001 if <code>$content</code> does not match the expected type as specified in the collection declaration according to the rules for SequenceType Matching.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"collection-name",qname:"cdml:collection-name",signature:"($item as item()) as xs:QName external",description:" Gets the name of the collection the given item (node or JSON item) belongs\n to.\n",summary:"<p> Gets the name of the collection the given item (node or JSON item) belongs\n to.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"item",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The item for which to get the name of its collection.</div>'}],returns:{type:"xs:QName",description:"The name of the collection to which the given item belongs."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0011 if <code>$item</code> does not belong to a collection.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"collection",qname:"cdml:collection",signature:"($name as xs:QName) as item()* external",description:" Gets the sequence of nodes or JSON items from a collection.\n",summary:"<p> Gets the sequence of nodes or JSON items from a collection.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the collection.</div>'}],returns:{type:"item()*",description:"The seqnence of items from the collection."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0001 if the collection is not declared.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0003 if the collection is not available.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"collection",qname:"cdml:collection",signature:"($name as xs:QName, $skip as xs:integer) as item()* external",description:" Gets the sequence of nodes or JSON items from a collection.\n",summary:"<p> Gets the sequence of nodes or JSON items from a collection.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the collection.</div>'},{name:"skip",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The initial number of items to skip.</div>'}],returns:{type:"item()*",description:"The (sub)sequence of items from the collection."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0001 if the collection is not declared.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0003 if the collection is not available.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"collection",qname:"cdml:collection",signature:"($name as xs:QName, $start as xs:anyURI, $skip as xs:integer) as item()* external",description:' Gets the sequence of items (nodes or JSON items) from a collection.\n The parameters <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$start</code> and <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$skip</code> can be used to\n skip over some items at the beginning of the collection.\n If both are given, both are applied:\n first <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$start</code> to skip to the referenced item\n and then <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$skip</code> to skip that additional number of items.\n',summary:"<p> Gets the sequence of items (nodes or JSON items) from a collection.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the collection.</div>'},{name:"start",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The reference to the first item to return.</div>'},{name:"skip",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The number of additional items to skip.</div>'}],returns:{type:"item()*",description:"The sub-sequence from the collection."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZAPI0028 If the given URI is not a valid node position computed by the <code>np:node-position</code> function.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0001 if the collection is not declared.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0003 if the collection is not available.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZSTR0066 if <code>$start</code> does not reference a node from the collection.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"delete-first",qname:"cdml:delete-first",signature:"($name as xs:QName) external",description:" Deletes the first item from a collection.\n",summary:"<p> Deletes the first item from a collection.</p>",annotation_str:"",annotations:[],updating:!0,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the collection to delete from.</div>'}],returns:{type:null,description:"An empty XDM instance and a pending update list that, once applied, deletes the first item from the collection."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0001 if the collection is not declared.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0003 if the collection is not available.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0006 if the collection is const or append-only.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0012 if the collection is unordered.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0011 if the collection is empty.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"delete-first",qname:"cdml:delete-first",signature:"($name as xs:QName, $number as xs:integer) external",description:' Deletes the first <i xmlns:xqdoc="http://www.xqdoc.org/1.0">N</i> items from a collection.\n',summary:"<p> Deletes the first  N  items from a collection.</p>",annotation_str:"",annotations:[],updating:!0,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the collection to delete from.</div>'},{name:"number",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The number of items to delete.</div>'}],returns:{type:null,description:"An empty XDM instance and a pending update list that, once applied, deletes the items from the collection."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0001 if the collection is not declared.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0003 if the collection is not available.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0006 if the collection is const or append-only.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0012 if the collection is unordered.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0011 if the collection contains less than <code>$number</code> items.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"delete-last",qname:"cdml:delete-last",signature:"($name as xs:QName) external",description:" Deletes the last item from a collection.\n",summary:"<p> Deletes the last item from a collection.</p>",annotation_str:"",annotations:[],updating:!0,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the collection to delete from.</div>'}],returns:{type:null,description:"An empty XDM instance and a pending update list that, once applied, deletes the last item from the collection."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0001 if the collection is not declared.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0003 if the collection is not available.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0006 if the collection is const, append-only, or queue.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0012 if the collection is unordered.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0011 if the collection is empty.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"delete-last",qname:"cdml:delete-last",signature:"($name as xs:QName, $number as xs:integer) external",description:' Deletes the last <i xmlns:xqdoc="http://www.xqdoc.org/1.0">N</i> items from a collection.\n',summary:"<p> Deletes the last  N  items from a collection.</p>",annotation_str:"",annotations:[],updating:!0,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the collection to delete from.</div>'},{name:"number",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The number of items to delete.</div>'}],returns:{type:null,description:"An empty XDM instance and a pending update list that, once applied, deletes the items."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0001 if the collection is not declared.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0003 if the collection is not available.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0012 if the collection is unordered.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0011 if the collection contains less than <code>$number</code> items.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"delete",qname:"cdml:delete",signature:"($items as item()*) external",description:" Deletes items (nodes or JSON items) from a collection.\n",summary:"<p> Deletes items (nodes or JSON items) from a collection.</p>",annotation_str:"",annotations:[],updating:!0,parameters:[{name:"items",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The items in the collection to delete.</div>'}],returns:{type:null,description:"An empty XDM instance and a pending update list that, once applied, deletes the items from their collections."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0001 if the collection is not declared.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0003 if the collection is not available.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0006 if the collection is const, append-only, or queue.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0011 if any item in <code>$items</code> is not a member of a collection or not all items belong to the same collection.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"edit",qname:"cdml:edit",signature:"($target as item(), $content as item()) external",description:" Edits the first supplied item so as to make it look exactly like a copy of\n the second supplied item while retaining its original identity.\n",summary:"<p> Edits the first supplied item so as to make it look exactly like a copy of\n the second supplied item while retaining its original identity.</p>",annotation_str:"",annotations:[],updating:!0,parameters:[{name:"target",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The target item to be edited.</div>'},{name:"content",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The item that serves as an edit goal.</div>'}],returns:{type:null,description:"An empty XDM instance and a pending update list that, once applied, performs the edit."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0001 if the collection to which <code>$target</code> belongs is not declared.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0003 if the collection to which <code>$target</code> belongs is not available.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0006 if the collection to which <code>$target</code> belongs is append-only, const, or queue.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0017 if <code>$target</code> is not a member of a collection.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0037 if the collection is append-only.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0038 if the collection is a queue.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0039 if <code>$target</code> is not a root.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0040 if <code>$target</code> cannot be updated to match the content (for example, because the target is a node and the content is an object).</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDTY0001 if <code>$content</code> does not match the expected type (as specified in the collection declaration) according to the rules for SequenceType Matching.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"index-of",qname:"cdml:index-of",signature:"($item as item()) as xs:integer external",description:" Gets the position of the given item (node or JSON item) within its\n collection.\n",summary:"<p> Gets the position of the given item (node or JSON item) within its\n collection.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"item",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The item to get the index of.</div>'}],returns:{type:"xs:integer",description:'The position of <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$item</code> in its collection.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0011 if <code>$item</code> does not belong to a collection.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0012 if the collection is unordered.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"insert-after",qname:"cdml:insert-after",signature:"($name as xs:QName, $target as item(), $content as item()*) external",description:" The insert-after function is an updating function that inserts copies of the\n given items (nodes or JSON items) into a collection at the position\n directly following the given target item.\n",summary:"<p> The insert-after function is an updating function that inserts copies of the\n given items (nodes or JSON items) into a collection at the position\n directly following the given target item.</p>",annotation_str:"",annotations:[],updating:!0,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the collection to insert into.</div>'},{name:"target",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The item in the collection after which <code>$content</code> will be inserted.</div>'},{name:"content",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The sequence of items whose copies to insert.</div>'}],returns:{type:null,description:"An empty XDM instance and a pending update list that, once applied, inserts the items into the collection."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0001 if the collection is not declared.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0003 if the collection is not available.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0006 if the collection is const, append-only, or queue.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0012 if the collection is unordered.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDTY0001 if <code>$content</code> does not match the expected type as specified in the collection declaration according to the rules for SequenceType Matching.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0011 if <code>$target</code> is not a node that is contained in the collection.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"insert-before",qname:"cdml:insert-before",signature:"($name as xs:QName, $target as item(), $content as item()*) external",description:" Inserts copies of the given items (nodes or JSON items) into a collection at\n the position directly preceding the given target item.\n",summary:"<p> Inserts copies of the given items (nodes or JSON items) into a collection at\n the position directly preceding the given target item.</p>",annotation_str:"",annotations:[],updating:!0,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the collection to insert into.</div>'},{name:"target",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The item in the collection before which <code>$content</code> will be inserted.</div>'},{name:"content",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The sequence of items whose copies to insert.</div>'}],returns:{type:null,description:"An empty XDM instance and a pending update list that, once applied, inserts the items into the collection."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0001 if the collection is not declared.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0003 if the collection is not available.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0006 if the collection is const, append-only, or queue.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0012 if the collection is unordered.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDTY0001 if <code>$content</code> does not match the expected type as specified in the collection declaration according to the rules for SequenceType Matching.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0011 if <code>$target</code> is not an item that is contained in the collection.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"insert-first",qname:"cdml:insert-first",signature:"($name as xs:QName, $content as item()*) external",description:" Inserts copies of the given items (nodes or JSON items) at the beginning of\n a collection.\n",summary:"<p> Inserts copies of the given items (nodes or JSON items) at the beginning of\n a collection.</p>",annotation_str:"",annotations:[],updating:!0,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the collection to insert into.</div>'},{name:"content",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The sequence of items whose copies to insert.</div>'}],returns:{type:null,description:"An empty XDM instance and a pending update list that, once applied, inserts the items into the collection."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0001 if the collection is not declared.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0003 if the collection is not available.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0006 if the collection is append-only, const, or queue.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0012 if the collection is unordered.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDTY0001 if <code>$content</code> does not match the expected type as specified in the collection declaration according to the rules for SequenceType Matching.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"insert-last",qname:"cdml:insert-last",signature:"($name as xs:QName, $content as item()*) external",description:" Inserts copies of the given items (nodes or JSON items) at the end of a\n collection.\n",summary:"<p> Inserts copies of the given items (nodes or JSON items) at the end of a\n collection.</p>",annotation_str:"",annotations:[],updating:!0,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the collection to insert into.</div>'},{name:"content",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The sequence of itemss whose copies to insert.</div>'}],returns:{type:null,description:"An empty XDM instance and a pending update list that, once applied, inserts the items into the collection."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0001 if the collection is not declared.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0003 if the collection is not available.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0006 if the collection is const.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0012 if the collection is unordered.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDTY0001 if <code>$content</code> does not match the expected type as specified in the collection declaration according to the rules for SequenceType Matching.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"insert",qname:"cdml:insert",signature:"($name as xs:QName, $content as item()*) external",description:" Inserts copies of the given items (nodes or JSON items) into a collection.\n Note that the insertion position of the items in the collection is not\n defined.\n",summary:"<p> Inserts copies of the given items (nodes or JSON items) into a collection.</p>",annotation_str:"",annotations:[],updating:!0,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the collection to insert into.</div>'},{name:"content",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The sequence of items whose copies to insert.</div>'}],returns:{type:null,description:"An empty XDM instance and a pending update list that, once applied, inserts the items into the collection."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0001 if the collection is not declared.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0003 if the collection is not available.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0006 if the collection is append-only, const, or queue.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDTY0001 if <code>$content</code> does not match the expected type as specified in the collection declaration according to the rules for SequenceType Matching.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"truncate",qname:"cdml:truncate",signature:"($name as xs:QName) external",description:" Deletes the entire contents of collection.\n Please note that applying this function can not be undone in case\n an error happens during the application of the containing PUL.\n",summary:"<p> Deletes the entire contents of collection.</p>",annotation_str:"",annotations:[],updating:!0,parameters:[{name:"name",type:"xs:QName",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the collection whose content to delete.</div>'}],returns:{type:null,description:"An empty XDM instance and a pending update list that, once applied, deletes the nodes."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0001 if the collection is not declared.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZDDY0003 if the collection is not available.</xqdoc:error>']}],variables:[]},"http://www.28msec.com/modules/http-request":{ns:"http://www.28msec.com/modules/http-request",description:' The request module provides functions for accessing\n information contained in the HTTP request used to evaluate the current\n query. For example, the <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">param-names</tt> function can be used to\n retrieve all the names of the parameters contained in a request.\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Matthias Brantner</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://www.w3.org/2005/xqt-errors",prefix:"err"},{uri:"http://www.28msec.com/modules/http/request#2.0",prefix:"req"},{uri:"http://www.28msec.com/modules/http-request",prefix:"request"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:0,name:"binary-content",qname:"request:binary-content",signature:"() as xs:base64Binary",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the content of the request as base64Binary.</p>\n',summary:"<p>  Returns the content of the request as base64Binary.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:base64Binary",description:"The content of the request as base64Binary."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:no-binary-content if the content contained in the body of the request cannot be treated as binary because it is a request with multipart or url-encoded content.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"binary-part",qname:"request:binary-part",signature:"($ref as xs:string) as xs:base64Binary",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the value of a part as base64Binary.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">A part is identified by a reference that is the value of a\n <tt>src</tt> field returned by the <tt>request:parts</tt> function.</p>\n',summary:"<p>  Returns the value of a part as base64Binary.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"ref",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the part</div>'}],returns:{type:"xs:base64Binary",description:"the value of the part as base64Binary"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:invalid-part if the part with the given name ($ref) does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:non-multipart if the current request does not contain multipart content</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:invalid-multipart if the multipart content is invalid (e.g. the boundary is missing)</xqdoc:error>']},{isDocumented:!0,arity:0,name:"content-length",qname:"request:content-length",signature:"() as xs:integer?",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the length of the content in bytes.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The value returned corresponds to the value of the HTTP\n content-length header. The function returns an empty sequence\n if this header does not exist in the request or its value\n could not be converted to item of type xs:integer</p>.\n',summary:"<p>  Returns the length of the content in bytes.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:integer?",description:"The content-length in bytes of the content sent with this request or the empty sequence if the content-length header does not exist in the request."},errors:[]},{isDocumented:!0,arity:0,name:"content-type",qname:"request:content-type",signature:"() as xs:string?",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the content-type of the data sent with this request.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Note that the content-type is only set for PUT and POST requests.</p>\n',summary:"<p>  Returns the content-type of the data sent with this request.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:string?",description:"The content-type of the request if it is a PUT or POST request. Otherwise, it returns the empty sequence."},errors:[]},{isDocumented:!0,arity:0,name:"header-accept",qname:"request:header-accept",signature:"() as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the values of the HTTP ACCEPT header.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The data is returned as a sequence of objects\n as shown in the following example.</p>\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0">\n {\n   "type" : "text",\n   "subtype" : "html",\n   "quality" : 1\n }\n </pre>\n',summary:"<p>  Returns the values of the HTTP ACCEPT header.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"object()*",description:"The header values of the header ACCEPT or the empty sequence if the header is not contained in the request. The order of the returned objects reflects the order of the components in the header."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:invalid-header if the accept header cannot be parsed</xqdoc:error>']},{isDocumented:!0,arity:0,name:"header-names",qname:"request:header-names",signature:"() as xs:string*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the names of all the HTTP headers in this request.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Header fields are colon-separated name-value pairs, terminated\n by a carriage return (CR) and line feed (LF) character sequence. The\n names and values of each header are allowed to consist of US-ASCII\n characters only.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The names of the headers are returned using upper-case letters.\n If a header with the same name is contained multiple times in a request,\n its name is only returned once. The order of the names in the resulting\n sequence does not reflect the order of the headers in the request. If\n a header does not have a value, it is as if the header does not exist\n in the request.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Note that the header names user-agent and content-type are not\n returned by this function. They are returned by the corresponding\n functions of this module module\n (e.g. <a href="#user-agent-0">user-agent</a>).</p>\n',summary:"<p>  Returns the names of all the HTTP headers in this request.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:string*",description:"The names of the headers of this request or the empty sequence if no headers are contained in the request."},errors:[]},{isDocumented:!0,arity:1,name:"header-value",qname:"request:header-value",signature:"($name as xs:string) as xs:string?",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the value of the HTTP header with the given name.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Header fields are colon-separated name-value pairs, terminated\n by a carriage return (CR) and line feed (LF) character sequence. The\n names and values of each header are allowed to consist of US-ASCII\n characters only.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Please note that header names are considered case-insensitive.\n Also note, that only one value is returned if multiple headers with the\n same names exist in the request. This value is a comma-separated list\n of the values of the headers in the order in which the headers appeared\n in the request.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">All headers having a name that starts with SAUSALITO_ are reserved\n and will not be returned by this function.</p>\n',summary:"<p>  Returns the value of the HTTP header with the given name.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The header name for which the value should be returned.</div>'}],returns:{type:"xs:string?",description:'The header value of the header with the <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">$name</tt> argument or the empty sequence if no header with that name is contained in the request.'},errors:[]},{isDocumented:!0,arity:0,name:"headers",qname:"request:headers",signature:"() as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns an object containing the request\'s HTTP header names and\n values.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Header fields are colon-separated name-value pairs, terminated\n by a carriage return (CR) and line feed (LF) character sequence. The\n names and values of each header are allowed to consist of US-ASCII\n characters only.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The structure of the object is as shown in the following example:\n <pre>\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">All headers having a name that starts with SAUSALITO_ are reserved\n and will not be returned by this function.</p>\n',summary:"<p>  Returns an object containing the request's HTTP header names and\n values.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"object()",description:'The header value of the header with the <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">$name</tt> argument or the empty sequence if no header with that name is contained in the request.'},errors:[]},{isDocumented:!0,arity:0,name:"method-delete",qname:"request:method-delete",signature:"() as xs:boolean",description:" Returns true if the HTTP method of this request is DELETE.\n",summary:"<p> Returns true if the HTTP method of this request is DELETE.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:boolean",description:"true if the HTTP method of this request is DELETE, false otherwise."},errors:[]},{isDocumented:!0,arity:0,name:"method-get",qname:"request:method-get",signature:"() as xs:boolean",description:" Returns true if the HTTP method of this request is GET.\n",summary:"<p> Returns true if the HTTP method of this request is GET.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:boolean",description:"true if the HTTP method of this request is GET, false otherwise."},errors:[]},{isDocumented:!0,arity:0,name:"method-head",qname:"request:method-head",signature:"() as xs:boolean",description:" Returns true if the HTTP method of this request is HEAD.\n",summary:"<p> Returns true if the HTTP method of this request is HEAD.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:boolean",description:"true if the HTTP method of this request is HEAD, false otherwise."},errors:[]},{isDocumented:!0,arity:0,name:"method-options",qname:"request:method-options",signature:"() as xs:boolean",description:" Returns true if the HTTP method of this request is OPTION.\n",summary:"<p> Returns true if the HTTP method of this request is OPTION.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:boolean",description:"true if the HTTP method of this request is OPTION, false otherwise."},errors:[]},{isDocumented:!0,arity:0,name:"method-post",qname:"request:method-post",signature:"() as xs:boolean",description:" Returns true if the HTTP method of this request is POST.\n",summary:"<p> Returns true if the HTTP method of this request is POST.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:boolean",description:"true if the HTTP method of this request is POST, false otherwise."},errors:[]},{isDocumented:!0,arity:0,name:"method-put",qname:"request:method-put",signature:"() as xs:boolean",description:" Returns true if the HTTP method of this request is PUT.\n",summary:"<p> Returns true if the HTTP method of this request is PUT.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:boolean",description:"true if the HTTP method of this request is PUT, false otherwise."},errors:[]},{isDocumented:!0,arity:0,name:"method",qname:"request:method",signature:"() as xs:string",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the name of the HTTP method used to make this request.</p>\n',summary:"<p>  Returns the name of the HTTP method used to make this request.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:string",description:"The request method used to make this request (i.e. GET, POST, PUT, DELETE or HEAD)."},errors:[]},{isDocumented:!0,arity:0,name:"param-names",qname:"request:param-names",signature:"() as xs:string*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the names of the parameters contained in the current request.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Parameters are name-value pairs contained in the query string of the URL\n used to make this request. As defined in RFC 1738, the query string of a\n URL starts with a "?" character and ends with the character (if any).\n Additionally, such name-value pairs may be part of the request\'s body if\n it is a PUT or POST request and the content-type of the request is\n "application/x-www-form-urlencoded". Name-value pairs are separated\n using either the "&amp;" or the ";" character.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">In general, the names and the values  are precent-encoded. This function\n does the decoding of the parameters, i.e. it returns the values being\n not percent-encoded.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Also, the names of each parameter (after being precent-decoded) are\n treated as UTF-8. Please see the <tt>http:param-names#1</tt> function\n for retrieving parameter names submitted using a encoding other than UTF-8.\n </p>\n',summary:"<p>  Returns the names of the parameters contained in the current request.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:string*",description:"The names of all parameters in this request. The empty sequence is returned if there are none."},errors:[]},{isDocumented:!0,arity:1,name:"param-names",qname:"request:param-names",signature:"($encoding as xs:string) as xs:string*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the names of the parameters contained in the current request.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is similar to the <tt>request:param-names#0</tt> function.\n However, the names are treated (after precent-decoding) using the\n given encoding supplied as parameter. For example, parameters might\n be encoded using the ISO-8859-1 encoding.</p>\n',summary:"<p>  Returns the names of the parameters contained in the current request.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"encoding",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The encoding of the parameters in the request (e.g. ISO-8859-1).</div>'}],returns:{type:"xs:string*",description:"The names of all parameters in this request. The empty sequence is returned if there are none."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:invalid-encoding if the given encoding is invalid or not supported.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"param-values",qname:"request:param-values",signature:"($name as xs:string) as xs:string*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns a sequence of parameter values for the given parameter name\n which are contained in the URL\'s query string or the body of a POST or PUT\n request.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Parameters are name-value pairs contained in the query string of the URL\n used to make this request. As defined in RFC 1738, the query string of a\n URL starts with a "?" character and ends with the character (if any).\n Additionally, such name-value pairs may be part of the request\'s body if\n it is a PUT or POST request and the content-type of the request is\n "application/x-www-form-urlencoded". Name-value pairs are separated\n using either the "&amp;" or the ";" character.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">In general, the names and the values  are precent-encoded. This function\n does the decoding of the parameters, i.e. it returns the values being\n not percent-encoded.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Also, the names and the values of each parameter (after being precent-decoded)\n are treated as UTF-8. Please see the <tt>http:param-values#3</tt> function\n for retrieving parameters submitted using a encoding other than UTF-8.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function returns the empty-sequence if no parameter with the\n given name exists in this request. If you want the function to return\n a default value other than the empty sequence, use the\n <tt>http:param-values#2</tt> function.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">A URL could contain the following query string:\n <tt>name1=value1&amp;name2=value2;name1=value3&amp;name3</tt>.\n <tt>name1=value1&amp;name2=value2&amp;name1=value3&amp;name3</tt>.\n The name value pairs in this query string are\n <ul>\n   <li> name: <tt>name1</tt>; values: <tt>value1</tt> and <tt>value3</tt></li>\n   <li> name: <tt>name2</tt>; value: <tt>value2</tt></li>\n   <li> name: <tt>name3</tt>; value: <tt/></li>\n </ul>\n </p>\n',summary:"<p>  Returns a sequence of parameter values for the given parameter name\n which are contained in the URL's query string or the body of a POST or PUT\n request.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the parameter whose value(s) should be returned.</div>'}],returns:{type:"xs:string*",description:"A sequence of values for the parameter with the given name. The empty sequence is returned if no parameter exists with the given name."},errors:[]},{isDocumented:!0,arity:2,name:"param-values",qname:"request:param-values",signature:"($name as xs:string, $default-values as xs:string*) as xs:string*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns a sequence of parameter values for the given parameter name\n which are contained in the URL\'s query string or the body of a POST or PUT\n request.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is similar to the <tt>request:param-values#1</tt> function.\n However, instead of returning the empty-sequence as a default value it returns\n the given default-values sequence if no parameter with the given name is found\n in this request.</p>\n',summary:"<p>  Returns a sequence of parameter values for the given parameter name\n which are contained in the URL's query string or the body of a POST or PUT\n request.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the parameter whose value(s) should be returned.</div>'},{name:"default-values",type:"xs:string",occurrence:"*",description:""}],returns:{type:"xs:string*",description:"A sequence of values for the parameter with the given name. The sequence given as $default-values parameter is returned if no parameter exists with the given name."},errors:[]},{isDocumented:!0,arity:3,name:"param-values",qname:"request:param-values",signature:"($name as xs:string, $default-values as xs:string*, $encoding as xs:string) as xs:string*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns a sequence of parameter values for the given parameter name\n which are contained in the URL\'s query string or the body of a POST or PUT\n request.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is similar to the <tt>request:param-values#2</tt> function.\n However, the names and values are treated (after precent-decoding) using the\n given encoding supplied as third parameter. For example, parameters might\n be encoded using the ISO-8859-1 encoding.</p>\n',summary:"<p>  Returns a sequence of parameter values for the given parameter name\n which are contained in the URL's query string or the body of a POST or PUT\n request.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of the parameter whose value(s) should be returned.</div>'},{name:"default-values",type:"xs:string",occurrence:"*",description:""},{name:"encoding",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The encoding of the parameters in the request (e.g. ISO-8859-1)</div>'}],returns:{type:"xs:string*",description:"A sequence of values for the parameter with the given name. The sequence given as $default-values parameter is returned if no parameter exists with the given name."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:invalid-encoding if the given encoding is invalid or not supported.</xqdoc:error>']},{isDocumented:!0,arity:0,name:"params",qname:"request:params",signature:"() as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns an object containg the parameter names and values contained\n in the URL\'s query string or the body of a POST or PUT\n request.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The structure of the object for the query string\n "param1=value1;param2&amp;param2=value2"\n <pre>\n {\n   "param1" : "value1",\n   "param2" : [ "", "value2" ]\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Parameters are name-value pairs contained in the query string of the URL\n used to make this request. As defined in RFC 1738, the query string of a\n URL starts with a "?" character and ends with the character (if any).\n Additionally, such name-value pairs may be part of the request\'s body if\n it is a PUT or POST request and the content-type of the request is\n "application/x-www-form-urlencoded". Name-value pairs are separated\n using either the "&amp;" or the ";" character.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">In general, the names and the values  are precent-encoded. This function\n does the decoding of the parameters, i.e. it returns the values being\n not percent-encoded.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Also, the names and the values of each parameter (after being precent-decoded)\n are treated as UTF-8. Please see the <tt>http:params#1</tt> function\n for retrieving parameters submitted using a encoding other than UTF-8.</p>\n',summary:"<p>  Returns an object containg the parameter names and values contained\n in the URL's query string or the body of a POST or PUT\n request.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"object()",description:"An object containing all the parameter names and values. An empty object is returned if the request doesn't contain any parameters."},errors:[]},{isDocumented:!0,arity:1,name:"params",qname:"request:params",signature:"($encoding as xs:string) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns an object containg the parameter names and values contained\n in the URL\'s query string or the body of a POST or PUT\n request.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The structure of the object for the query string\n "param1=value1;param2&amp;param2=value2"\n <pre>\n {\n   "param1" : "value1",\n   "param2" : [ "", "value2" ]\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Parameters are name-value pairs contained in the query string of the URL\n used to make this request. As defined in RFC 1738, the query string of a\n URL starts with a "?" character and ends with the character (if any).\n Additionally, such name-value pairs may be part of the request\'s body if\n it is a PUT or POST request and the content-type of the request is\n "application/x-www-form-urlencoded". Name-value pairs are separated\n using either the "&amp;" or the ";" character.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">In general, the names and the values  are precent-encoded. This function\n does the decoding of the parameters, i.e. it returns the values being\n not percent-encoded.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The name and value of each parameter (after being percent-decoded) are treated\n in the encoding given by the <tt>$encoding</tt> paramter.</p>\n',summary:"<p>  Returns an object containg the parameter names and values contained\n in the URL's query string or the body of a POST or PUT\n request.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"encoding",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The encoding of the parameters in the request (e.g. ISO-8859-1)</div>'}],returns:{type:"object()",description:"An object containing all the parameter names and values. An empty object is returned if the request doesn't contain any parameters."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:invalid-encoding if the given encoding is invalid or not supported.</xqdoc:error>']},{isDocumented:!0,arity:0,name:"parts",qname:"request:parts",signature:"() as object()?",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the metadata of all parts contained in a multipart request.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The metadata is returned as an object\n as shown in the following example.</p>\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0">\n {\n   "media-type" : "multipart/form-data; boundary=----------------------------93298e7a66a4",\n   "parts" : [ {\n     "headers" : {\n       "Content-Disposition" : "form-data; name=\\"upload\\"; filename=\\"tmp.txt\\"",\n       "Content-Type" : "text/plain"\n     },\n     "filename" : "tmp.txt",\n     "name" : "upload",\n     "src" : "urn:uuid:09be48d1-da0e-42c1-a115-a697e1779c45",\n     "size" : "153"\n   }, {\n     "headers" : {\n       "Content-Disposition" : "form-data; name=\\"press\\""\n     },\n     "name" : "press",\n     "src" : "urn:uuid:c80e0609-b703-4d47-9171-441eb397a562",\n     "size" : "2"\n   } ]\n }\n </pre>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The <tt>media-type</tt> field describes the content-type as given in the\n request. Specifically, its value is equal to the value returned by\n <tt>request:header-values("Content-Type")</tt>).</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Each of the array members of the <tt>parts</tt> field represents one\n part of the multipart request. Each such part contains a header field\n containing one field for each headers belonging to that part.\n The value of the <tt>src</tt> field can be used to retrieve the actual value\n of the part by passing it to the <tt>http:text-part</tt> or\n <tt>http:binary-part</tt> functions. The remaining fields represent a\n parameter of the Content-Disposition header as described in RFC 2183\n (e.g. filename, name, creation-date).</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Please note that recursive multipart content is not supported.</p>\n',summary:"<p>  Returns the metadata of all parts contained in a multipart request.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"object()?",description:"an object representing the metadata of the multipart content or an empty sequence if there is no content."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:non-multipart if the current request does not contain multipart content</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:invalid-multipart if the multipart content is invalid (e.g. the boundary is missing)</xqdoc:error>']},{isDocumented:!0,arity:0,name:"path",qname:"request:path",signature:"() as xs:string",description:" Return the path component of the request URI. The path starts after the\n host and ends before the query string starts.\n",summary:"<p> Return the path component of the request URI.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:string",description:"The path component of the request URI"},errors:[]},{isDocumented:!0,arity:0,name:"query",qname:"request:query",signature:"() as xs:string",description:" <p xmlns:xqdoc=\"http://www.xqdoc.org/1.0\">Returns the query string that was used to make this request.</p>\n <p xmlns:xqdoc=\"http://www.xqdoc.org/1.0\">The query string contains the part of the request URL that\n starts with the '?' character to the end or the starting of the\n fragment (i.e. the '#' character).</p>\n",summary:"<p>  Returns the query string that was used to make this request.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:string",description:"The query string part of the request's URL"},errors:[]},{isDocumented:!0,arity:0,name:"remote-addr",qname:"request:remote-addr",signature:"() as xs:string",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the IP address of the client to which this request\n is connected.</p>\n',summary:"<p>  Returns the IP address of the client to which this request\n is connected.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:string",description:"The IP address on the client side to which this request is connected."},errors:[]},{isDocumented:!0,arity:0,name:"remote-port",qname:"request:remote-port",signature:"() as xs:int",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the port of the client to which this request is connected.</p>\n',summary:"<p>  Returns the port of the client to which this request is connected.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:int",description:"The port on the client side to which this request is connected."},errors:[]},{isDocumented:!0,arity:0,name:"server-name",qname:"request:server-name",signature:"() as xs:string",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the server name of the server running the application.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The web server\'s hostname or IP address.</p>\n',summary:"<p>  Returns the server name of the server running the application.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:string",description:"The name of the server that runs the application accepting this request."},errors:[]},{isDocumented:!0,arity:0,name:"server-port",qname:"request:server-port",signature:"() as xs:int",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the sever port to which the client making the current request\n is connected.</p>\n',summary:"<p>  Returns the sever port to which the client making the current request\n is connected.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:int",description:"The server port to which the client is connected."},errors:[]},{isDocumented:!0,arity:0,name:"text-content",qname:"request:text-content",signature:"() as xs:string",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the content of the request as string.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function returns the content of the request only\n if the content-type refers to a type that can be treated\n as text (e.g. text/* or application/xml). The function raises\n an error if the content cannot be treated as text.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The text content is interpreted using the encoding/charset\n that is specified in the Content-Type header of the request. If\n no charset is specified, the default ISO-8859-1 is used. If a encoding\n other than the specified or default one should be used, the\n <tt>request:text-content#1</tt> function should be used.</p>\n',summary:"<p>  Returns the content of the request as string.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:string",description:"The content of the request as a string."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:invalid-encoding if the encoding specified in the Content-Type header is invalid or not supported.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:no-text-content if the content contained in the body of the request cannot be treated as text.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"text-content",qname:"request:text-content",signature:"($overwrite-encoding as xs:string) as xs:string",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the content of the request as string interpreting\n it with the given encoding.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function returns the content of the request only\n if the content-type refers to a type that can be treated\n as text (e.g. text/* or application/xml). The function raises\n an error if the content cannot be treated as text.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The text content is interpreted using the given encoding/charset.\n That is, the charset specified in the Content-Type header of the request\n is ignored. An error is raised if the given encoding is invalid\n or not supported.</p>\n',summary:"<p>  Returns the content of the request as string interpreting\n it with the given encoding.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"overwrite-encoding",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:string",description:"The content of the request as a string."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:invalid-encoding if the encoding specified in the Content-Type header or the $overwrite-encoding parameter is invalid or not supported.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:no-text-content if the content contained in the body of the request cannot be treated as text.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"text-part",qname:"request:text-part",signature:"($ref as xs:string) as xs:string",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the value of a part as string</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">A part is identified by a reference that is the value of a\n <tt>src</tt> field returned by the <tt>request:parts</tt> function.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The value of the text part is interpreted using the encoding/charset\n given in the headers of the part. If no encoding is given, the default\n US-ASCII is assumed.</p>\n',summary:"<p>  Returns the value of a part as string \n  A part is identified by a reference that is the value of a\n  src  field returned by the  request:parts  function.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"ref",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the part</div>'}],returns:{type:"xs:string",description:"the value of the part as string"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:invalid-encoding if the encoding given in the headers of the part is invalid or not supported.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:no-text-content if the value of the part cannot be treated as text</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:invalid-part if the part with the given name ($ref) does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:non-multipart if the current request does not contain multipart content</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:invalid-multipart if the multipart content is invalid (e.g. the boundary is missing)</xqdoc:error>']},{isDocumented:!0,arity:2,name:"text-part",qname:"request:text-part",signature:"($ref as xs:string, $overwrite-encoding as xs:string) as xs:string",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the value of a part as string interpreting\n it with the given encoding.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">A part is identified by a reference that is the value of a\n <tt>src</tt> field returned by the <tt>request:parts</tt> function.</p>\n',summary:"<p>  Returns the value of a part as string interpreting\n it with the given encoding.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"ref",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the part</div>'},{name:"overwrite-encoding",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:string",description:"the value of the part as string"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:invalid-encoding if the encoding given using the $overwrite-encoding parameter is invalid or not supported.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:no-text-content if the value of the part cannot be treated as text</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:invalid-part if the part with the given name ($ref) does not exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:non-multipart if the current request does not contain multipart content</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">request:invalid-multipart if the multipart content is invalid (e.g. the boundary is missing)</xqdoc:error>']},{isDocumented:!0,arity:0,name:"uri",qname:"request:uri",signature:"() as xs:string",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the URI that was used to make this request.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The value returned contains the part of the URL starting\n from the path to the end or the starting of the fragment (i.e.\n the \'#\' character).</p>\n',summary:"<p>  Returns the URI that was used to make this request.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:string",description:"The path and query string part of the request's URL"},errors:[]},{isDocumented:!0,arity:0,name:"user-agent",qname:"request:user-agent",signature:"() as xs:string?",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the user agent that made to perform the current request.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function returns the value of the User-Agent header\n contained in the current request.</p>\n',summary:"<p>  Returns the user agent that made to perform the current request.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:string?",description:"The user agent used to perform this request of the empty sequence if there was no User-Agent header in the request."},errors:[]}],variables:[]},"http://www.28msec.com/modules/physical-reference":{ns:"http://www.28msec.com/modules/physical-reference",description:' The module provides functions to compute an immutable and opaque reference\n for nodes, objects, or arrays and to retrieve such items given their\n identifier, respectively.\n The identifiers are immutable, i.e. a identifier does not change\n during the items lifetime and cannot be reused for another item after the\n original item gets deleted.\n Identifiers are unique, in that, two different items will never have the same\n identifier. A item, at any time during its lifetime, can be retrieved by its\n identifier. Identifiers can only be computed for items stored in a MongoDB\n collection.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Please see the <a href="../../html/data_lifecycle.html">data lifecycle\n documentation</a> about details on storing items.</p>\n',sees:['<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0"><a href="../../html/data_lifecycle.html">Data Lifecycle</a></xqdoc:see>'],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Federico Cavalieri</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://www.28msec.com/modules/physical-reference",prefix:"ref"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"dereference",qname:"ref:dereference",signature:"($arg as object()) as item()? external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the node, object, or array identified by the given reference.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function returns the empty sequence if the item\n that is referenced does not exist.</p>\n',summary:"<p>  Returns the node, object, or array identified by the given reference.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the identifier of the item to retrieve.</div>'}],returns:{type:"item()?",description:"the item identified by the identifier passed as parameter or the empty-sequence if no item with that URI is found."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ref::REFERENCE is if the given identifier is invalid.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"reference",qname:"ref:reference",signature:"($arg as item()) as object() external",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns an immutable and opaque reference (with type xs:anyURI) for\n a given node, object, or array.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The generated identifier is immutable, i.e. a identifier does not\n change during the item\'s lifetime and cannot be reused for another node after\n the original item gets deleted.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Identifiers are also unique, in that, two different items will never\n have the same identifier.</p>\n A item, at any time during its lifetime, can be retrieved by its\n identifier, using the <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">ref:dereference</tt> function.\n Please note that a reference can only be retrieved for a JSON object or JSON\n array if the item is a member of a collection.\n',summary:"<p>  Returns an immutable and opaque reference (with type xs:anyURI) for\n a given node, object, or array.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"arg",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the node, object, or array for which the URI should be computed</div>'}],returns:{type:"object()",description:"the opaque URI of the item."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">ref::COLLECTION is raised if the object or array passed as argument is not a member of a collection.</xqdoc:error>']}],variables:[]},"http://zorba.io/modules/data-cleaning/conversion":{ns:"http://zorba.io/modules/data-cleaning/conversion",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This library module provides data conversion functions for processing calendar dates,\n temporal values, currency values, units of measurement, location names and postal addresses.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The logic contained in this module is not specific to any particular XQuery implementation.</p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Bruno Martins and Diogo Simões</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://zorba.io/modules/data-cleaning/conversion",prefix:"conversion"},{uri:"http://www.ecb.int/vocabulary/2002-08-01/eurofxref",prefix:"exref"},{uri:"http://www.zorba-xquery.com/modules/http-client",prefix:"http"},{uri:"http://zorba.io/modules/reflection",prefix:"reflection"},{uri:"http://zorba.io/options/versioning",prefix:"ver"},{uri:"http://api.whitepages.com/schema/",prefix:"wp"}],functions:[{isDocumented:!0,arity:1,name:"address-from-domain",qname:"conversion:address-from-domain",signature:"($domain as xs:string) as xs:string*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Uses a whois service to discover information about a given domain name, returning a sequence of strings\n for the addresses associated to the name.</p>\n',summary:"<p>  Uses a whois service to discover information about a given domain name, returning a sequence of strings\n for the addresses associated to the name.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"domain",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:string*",description:'A sequence of strings for the addresses associated to the domain name. <p xmlns:xqdoc="http://www.xqdoc.org/1.0"><b> Attention : This function is still not implemented. </b></p>'},errors:[]},{isDocumented:!0,arity:2,name:"address-from-geocode",qname:"conversion:address-from-geocode",signature:"($lat as xs:double, $lon as xs:double) as xs:string*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Geospatial coordinates to placename converter, acting as a wrapper over the Yahoo! reverse geocoder service.</p>\n',summary:"<p>  Geospatial coordinates to placename converter, acting as a wrapper over the Yahoo! reverse geocoder service.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"lat",type:"xs:double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Geospatial latitude.</div>'},{name:"lon",type:"xs:double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Geospatial longitude.</div>'}],returns:{type:"xs:string*",description:"The sequence of strings corresponding to the different components (e.g., street, city, country, etc.) of the place name that corresponds to the input geospatial coordinates."},errors:[]},{isDocumented:!0,arity:1,name:"address-from-phone",qname:"conversion:address-from-phone",signature:"($phone-number as xs:string) as xs:string*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Uses a White-pages Web service to discover information about a given phone number,\n returning a string for the address associated to the phone number.</p>\n',summary:"<p>  Uses a White-pages Web service to discover information about a given phone number,\n returning a string for the address associated to the phone number.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"phone-number",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A string with 10 digits corresponding to the phone number.</div>'}],returns:{type:"xs:string*",description:"A string for the addresses associated to the phone number."},errors:[]},{isDocumented:!0,arity:1,name:"address-from-user",qname:"conversion:address-from-user",signature:"($name as xs:string) as xs:string*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Uses a White-pages Web service to discover information about a given name,\n returning a sequence of strings for the addresses associated to the name.</p>\n',summary:"<p>  Uses a White-pages Web service to discover information about a given name,\n returning a sequence of strings for the addresses associated to the name.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of person or organization.</div>'}],returns:{type:"xs:string*",description:"A sequence of strings for the addresses associated to the name."},errors:[]},{isDocumented:!0,arity:4,name:"currency-convert",qname:"conversion:currency-convert",signature:"($v as xs:double, $m1 as xs:string, $m2 as xs:string, $date as xs:string) as xs:double",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Currency conversion function, acting as a wrapper over the WebService from the European Central Bank.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">WebService documentation at <a src="http://www.ecb.int/stats/exchange/eurofxref/html/index.en.html">http://www.ecb.int/stats/exchange/eurofxref/html/index.en.html</a></p>\n',summary:"<p>  Currency conversion function, acting as a wrapper over the WebService from the European Central Bank.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"v",type:"xs:double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The amount we wish to convert.</div>'},{name:"m1",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The source currency (e.g., "EUR").</div>'},{name:"m2",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The target currency (e.g., "USD").</div>'},{name:"date",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The reference date.</div>'}],returns:{type:"xs:double",description:"The value resulting from the conversion."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">conversion:NOTSUPPORTED if the date, the source currency type or the target currency type are not known to the service.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"geocode-from-address",qname:"conversion:geocode-from-address",signature:"($q as xs:string*) as xs:double*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Placename to geospatial coordinates converter, acting as a wrapper over the Yahoo! geocoder service.</p>\n',summary:"<p>  Placename to geospatial coordinates converter, acting as a wrapper over the Yahoo! geocoder service.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"q",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A sequence of strings corresponding to the different components (e.g., street, city, country, etc.) of the place name.</div>'}],returns:{type:"xs:double*",description:"The pair of latitude and longitude coordinates associated with the input address."},errors:[]},{isDocumented:!0,arity:1,name:"name-from-domain",qname:"conversion:name-from-domain",signature:"($domain as xs:string) as xs:string*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Uses a whois service to discover information about a given domain name, returning a sequence of strings\n for the person or organization names associated to the name.</p>\n',summary:"<p>  Uses a whois service to discover information about a given domain name, returning a sequence of strings\n for the person or organization names associated to the name.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"domain",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:string*",description:'A sequence of strings for the person or organization names associated to the domain name. <p xmlns:xqdoc="http://www.xqdoc.org/1.0"><b> Attention : This function is still not implemented. </b></p>'},errors:[]},{isDocumented:!0,arity:1,name:"phone-from-address",qname:"conversion:phone-from-address",signature:"($address as xs:string) as xs:string*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Uses a White-pages Web service to discover information about a given address,\n returning a sequence of strings for the phone number associated to the address.</p>\n',summary:"<p>  Uses a White-pages Web service to discover information about a given address,\n returning a sequence of strings for the phone number associated to the address.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"address",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A string corresponding to the address (ex: 5655 E Gaskill Rd, Willcox, AZ, US).</div>'}],returns:{type:"xs:string*",description:"A sequence of strings for the phone number or organization's names associated to the address."},errors:[]},{isDocumented:!0,arity:1,name:"phone-from-domain",qname:"conversion:phone-from-domain",signature:"($domain as xs:string) as xs:string*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Uses a whois service to discover information about a given domain name, returning a sequence of strings\n for the phone numbers associated to the name.</p>\n',summary:"<p>  Uses a whois service to discover information about a given domain name, returning a sequence of strings\n for the phone numbers associated to the name.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"domain",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:string*",description:'A sequence of strings for the phone numbers associated to the domain name. <p xmlns:xqdoc="http://www.xqdoc.org/1.0"><b> Attention : This function is still not implemented. </b></p>'},errors:[]},{isDocumented:!0,arity:1,name:"phone-from-user",qname:"conversion:phone-from-user",signature:"($name as xs:string) as xs:string*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Uses a White-pages Web service to discover information about a given name,\n returning a sequence of strings for the phone numbers associated to the name.</p>\n',summary:"<p>  Uses a White-pages Web service to discover information about a given name,\n returning a sequence of strings for the phone numbers associated to the name.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The name of person or organization.</div>'}],returns:{type:"xs:string*",description:"A sequence of strings for the phone numbers associated to the name."},errors:[]},{isDocumented:!0,arity:4,name:"unit-convert",qname:"conversion:unit-convert",signature:"($v as xs:double, $t as xs:string, $m1 as xs:string, $m2 as xs:string) as xs:double",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Conversion function for units of measurement, acting as a wrapper over the CuppaIT WebService.</p>\n',summary:"<p>  Conversion function for units of measurement, acting as a wrapper over the CuppaIT WebService.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"v",type:"xs:double",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The amount we wish to convert.</div>'},{name:"t",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The type of metric (e.g., "Distance")</div>'},{name:"m1",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The source measurement unit metric (e.g., "meter")</div>'},{name:"m2",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The target measurement unit metric (e.g., "mile")</div>'}],returns:{type:"xs:double",description:"The value resulting from the conversion"},errors:[]},{isDocumented:!0,arity:1,name:"user-from-address",qname:"conversion:user-from-address",signature:"($address as xs:string) as xs:string*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Uses a White-pages Web service to discover information about a given address,\n returning a sequence of strings for the names associated to the address.</p>\n',summary:"<p>  Uses a White-pages Web service to discover information about a given address,\n returning a sequence of strings for the names associated to the address.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"address",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A string corresponding to the address (ex: 5655 E Gaskill Rd, Willcox, AZ, US).</div>'}],returns:{type:"xs:string*",description:"A sequence of strings for the person or organization's names associated to the address."},errors:[]},{isDocumented:!0,arity:1,name:"user-from-phone",qname:"conversion:user-from-phone",signature:"($phone-number as xs:string) as xs:string*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Uses a White-pages Web service to discover information about a given phone number,\n returning a sequence of strings for the name associated to the phone number.</p>\n',summary:"<p>  Uses a White-pages Web service to discover information about a given phone number,\n returning a sequence of strings for the name associated to the phone number.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"phone-number",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A string with 10 digits corresponding to the phone number.</div>'}],returns:{type:"xs:string*",description:"A sequence of strings for the person or organization's name associated to the phone number."},errors:[]}],variables:[{name:"conversion:key",type:"item()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The key to be used when accessing the White Pages Web service</p>\n'}]},"http://www.28msec.com/modules/jdbc":{ns:"http://www.28msec.com/modules/jdbc",description:' This module allows connecting, querying, and updating JDBC datasources.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The results of a query are returned as a sequence of objects:\n <code> { column: value } </code>.\n The type of the value depends on the type of the column in the database:\n <table class="table table-bordered">\n   <tr><th>JDBC Types</th><th>JSONiq Type</th></tr>\n   <tr><td>integer, bigint, smallint, tinyint</td><td>integer</td></tr>\n   <tr><td>decimal, double, float, numeric, real</td><td>double</td></tr>\n   <tr><td>boolean, bit</td><td>boolean</td></tr>\n   <tr><td>char, blob, longvarchar, longnvarchar, nchar, nclob, nvarchar,\n  varchar, sqlxml, date, time, timestamp</td><td>string</td></tr>\n   <tr><td>binary, blob, longvarbinary, varbinary, array, datalink,\n  java_object, other, ref</td><td>base64Binary</td></tr>\n </table>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n If the value of a column is null, it is mapped to the JSONiq null value.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Connecting to a JDBC source requires the following options:\n <ul>\n   <li><tt>url</tt>: the JDBC connection URI (mandatory)</li>\n   <li><tt>user</tt>: the user used for connecting (optional)</li>\n   <li><tt>password</tt>: the password used for connecting (optional)</li>\n </ul></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Examples:\n <ul>\n  <li><pre>\n {\n   "url" : "jdbc:mysql://localhost/testdb",\n   "user" : "root",\n   "password" : ""\n }</pre></li>\n  <li><pre>\n {\n   "url" : "jdbc:sqlserver://192.168.1.1;databaseName=testdb",\n   "user" : "sa",\n   "password" : ""\n }</pre></li>\n  <li><pre>\n {\n   "url" : "jdbc:postgresql://localhost/testdb",\n   "user" : "root",\n   "password" : ""\n }</pre></li>\n </ul></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Currently, the 28.io platform supports connections to\n <ul>\n   <li>MySQL using the mariadb-java-client.jar version 1.1.2,</li>\n   <li>PostgreSQL using postgresql.jar version 9.2, and </li>\n   <li>Microsoft SQL Server using sqljdbc4.jar version 4.0.</li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If you are interested in connecting to other JDBC datasources,\n please contact us at support@28.io.</p>\n <h2 xmlns:xqdoc="http://www.xqdoc.org/1.0" id="determinism">Important Notice Regarding Function Determinism</h2>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The non side-effecting functions:\n <ul>\n   <li><a href="?anchor=connect-0">connect#0</a></li>\n   <li><a href="?anchor=connect-1">connect#1</a></li>\n   <li><a href="?anchor=connect-2">connect#2</a></li>\n   <li><a href="?anchor=execute-query-2">execute-query#2</a></li>\n   <li><a href="?anchor=execute-query-prepared-1">execute-query-prepared#1</a></li>\n   <li><a href="?anchor=tables-1">tables#1</a></li>\n   <li><a href="?anchor=tables-4">tables#4</a></li>\n </ul>\n are declared deterministic, which means that their results could be cached\n when invoked multiple times with the same arguments in the same query execution.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">To not use cached results you can use the following alternative functions:\n <ul>\n   <li><a href="?anchor=connect-notdeterministic-0">connect-notdeterministic#0</a></li>\n   <li><a href="?anchor=connect-notdeterministic-1">connect-notdeterministic#1</a></li>\n   <li><a href="?anchor=connect-notdeterministic-2">connect-notdeterministic#2</a></li>\n   <li><a href="?anchor=execute-query-notdeterministic-2">execute-query-notdeterministic#2</a></li>\n   <li><a href="?anchor=execute-query-prepared-notdeterministic-1">execute-query-prepared-notdeterministic#1</a></li>\n   <li><a href="?anchor=tables-notdeterministic-1">tables-notdeterministic#1</a></li>\n   <li><a href="?anchor=tables-notdeterministic-4">tables-notdeterministic#4</a></li>\n </ul>\n which have been declared as being non deterministic.</p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Cristi Dumitru</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Federico Cavalieri</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://www.28msec.com/modules/credentials",prefix:"credentials"},{uri:"http://www.28msec.com/modules/jdbc",prefix:"jdbc"},{uri:"http://zorba.io/options/versioning",prefix:"ver"},{uri:"http://www.zorba-xquery.com/modules/jdbc",prefix:"zjdbc"}],functions:[{isDocumented:!0,arity:1,name:"affected-rows",qname:"jdbc:affected-rows",signature:"($dataset as anyURI) as integer",description:" Return the number of affected rows of an updating DataSet.\n",summary:"<p> Return the number of affected rows of an updating DataSet.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"dataset",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier of the DataSet.</div>'}],returns:{type:"integer",description:"the number of affected rows."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL008 DataSet doesn\'t exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"clear-params",qname:"jdbc:clear-params",signature:"($prepared-statement as anyURI) as empty-sequence()",description:" Clear all the parameters of the statement.\n",summary:"<p> Clear all the parameters of the statement.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"prepared-statement",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier of the prepared statement.</div>'}],returns:{type:"empty-sequence()",description:"an empty-sequence()"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL003 Prepared statement doesn\'t exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"commit",qname:"jdbc:commit",signature:"($conn as anyURI) as empty-sequence()",description:" Commit current transaction from an active connection.\n",summary:"<p> Commit current transaction from an active connection.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"conn",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier of the connection with a transaction to be commited.</div>'}],returns:{type:"empty-sequence()",description:"an empty-sequence()"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08003 Connection doesn\'t exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message</xqdoc:error>']},{isDocumented:!0,arity:0,name:"connect-nondeterministic",qname:"jdbc:connect-nondeterministic",signature:"() as anyURI",description:' Open a connection to a database using the default credentials.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#connect-0">connect#0</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p> Open a connection to a database using the default credentials.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[],returns:{type:"anyURI",description:"an identifier that represents the connection to the server."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">NOT-FOUND The default credentials not found.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL28000 Authentication failed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08001 Connection error.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL40003 Isolation level not supported.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see attached message.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"connect-nondeterministic",qname:"jdbc:connect-nondeterministic",signature:"($connection-config as item()) as anyURI",description:' Open a connection to a database.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#connect-1">connect#1</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p> Open a connection to a database.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"connection-config",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> object containing the configuration information.</div>'}],returns:{type:"anyURI",description:"an identifier that represents the connection to the server."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">NOT-FOUND The specified credentials have not been found.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">NOT-VALID Invalid connection information.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL28000 Authentication failed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08001 Connection error.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL40003 Isolation level not supported.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see attached message.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"connect-nondeterministic",qname:"jdbc:connect-nondeterministic",signature:"($connection-config as item(), $options as object()?) as anyURI",description:' Open a connection to a database.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#connect-2">connect#2</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p> Open a connection to a database.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"connection-config",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> object containing the configuration information.</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> object to specify additional connection options.</div>'}],returns:{type:"anyURI",description:"an identifier that represents the connection to the server."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">NOT-FOUND The specified credentials have not been found.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">NOT-VALID Invalid connection information.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL28000 Authentication failed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08001 Connection error.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL40003 Isolation level not supported.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:0,name:"connect",qname:"jdbc:connect",signature:"() as anyURI",description:' Open a connection to a database using the default credentials.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function returns an opaque URI that can represents the connection.\n This URI has to be passed to other functions of this module that require\n the <tt>$conn</tt> parameter as a first argument.</p>\n',summary:"<p> Open a connection to a database using the default credentials.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"anyURI",description:"an identifier that represents the connection to the server."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">NOT-FOUND The default credentials not found.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL28000 Authentication failed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08001 Connection error.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL40003 Isolation level not supported.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see attached message.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"connect",qname:"jdbc:connect",signature:"($connection-config as item()) as anyURI",description:' Open a connection to a database.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The input to the function contains the connection information.\n If a string is used, then the function will interpret it as credential name\n and will connect using the JDBC credentials with the specified name.\n If an object is used, then the function will open a connection using it.\n The object\'s required structure is described in the module\'s description.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function returns an opaque URI that can represents the connection.\n This URI has to be passed to other functions of this module that require\n the <tt>$conn</tt> parameter as a first argument.</p>\n',summary:"<p> Open a connection to a database.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"connection-config",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> object containing the configuration information.</div>'}],returns:{type:"anyURI",description:"an identifier that represents the connection to the server."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">NOT-FOUND The specified credentials have not been found.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">NOT-VALID Invalid connection information.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL28000 Authentication failed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08001 Connection error.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL40003 Isolation level not supported.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see attached message.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"connect",qname:"jdbc:connect",signature:"($connection-config as item(), $options as object()?) as anyURI",description:' Open a connection to a database.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The input to the function contains the connection information.\n If a string is used, then the function will interpret it as credential name\n and will connect using the JDBC credentials with the specified name.\n If an object is used, then the function will open a connection using it.\n The object\'s required structure is described in the module\'s description.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">In addition to the connection configuration, the function allows to\n specify several options:\n <ul>\n   <li><tt>autocommit</tt>: <tt>true/false</tt> turn on/off auto commit\n (default: true)</li>\n   <li><tt>readonly</tt>: <tt>true/false</tt> configure readonly/write on this\n connection (default: false)</li>\n   <li><tt>isolation-level</tt>: configure the isolation level for this connection\n     <ul>\n       <li><tt>READ-COMMITTED</tt>: set the isolation level read-committed</li>\n       <li><tt>READ-UNCOMMITTED</tt>: set the isolation level read-uncommitted</li>\n       <li><tt>READ-REPEATABLE</tt>: set the isolation level repeatable-read</li>\n       <li><tt>SERIALIZABLE</tt>: set the isolation level serializable</li>\n     </ul>\n   If no isolation level is provided by the user the connection will be created\n   with the default isolation level of the database.</li>\n </ul></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function returns an opaque URI that represents the connection.\n This URI has to be passed to other functions of this module that require\n the <tt>$conn</tt> parameter as a first argument.</p>\n',summary:"<p> Open a connection to a database.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"connection-config",type:"item()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> object containing the configuration information.</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> object to specify additional connection options.</div>'}],returns:{type:"anyURI",description:"an identifier that represents the connection to the server."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">NOT-FOUND The specified credentials have not been found.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">NOT-VALID Invalid connection information.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL28000 Authentication failed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08001 Connection error.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL40003 Isolation level not supported.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"connection-options",qname:"jdbc:connection-options",signature:"($conn as anyURI) as object()",description:' Return a set with options for a specified connection.\n The returned options are equal to the options specified in function jdbc:connect.\n Consequently, the options are specified as follows:\n <ul xmlns:xqdoc="http://www.xqdoc.org/1.0">\n   <li><tt>autocommit</tt>: <tt>true/false</tt> shows auto commit</li>\n   <li><tt>readonly</tt>: <tt>true/false</tt> shows if the connection is readonly/write</li>\n   <li><tt>isolation-level</tt>: shows the isolation level for this connection\n     <ul>\n       <li><tt>READ-COMMITTED</tt>: isolation level is read-committed</li>\n       <li><tt>READ-UNCOMMITTED</tt>: isolation level is read-uncommitted</li>\n       <li><tt>READ-REPEATABLE</tt>: isolation level is repeatable-read</li>\n       <li><tt>SERIALIZABLE</tt>: isolation level is serializable</li>\n     </ul></li>\n </ul>\n',summary:"<p> Return a set with options for a specified connection.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"conn",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier of the connection.</div>'}],returns:{type:"object()",description:"an object with the connection options."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08003 Connection doesn\'t exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message</xqdoc:error>']},{isDocumented:!0,arity:1,name:"execute-prepared",qname:"jdbc:execute-prepared",signature:"($prepared-statement as anyURI) as anyURI",description:" Execute SQL statements prepared with jdbc:prepare-statement,\n after setting the parameters values accordingly and returns an identifier to\n a Dataset.\n",summary:"<p> Execute SQL statements prepared with jdbc:prepare-statement,\n after setting the parameters values accordingly and returns an identifier to\n a Dataset.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"prepared-statement",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier of the prepared statement.</div>'}],returns:{type:"anyURI",description:"the identifier of a DataSet."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL003 Prepared statement doesn\'t exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"execute-query-nondeterministic",qname:"jdbc:execute-query-nondeterministic",signature:"($conn as anyURI, $sql as string) as object()*",description:' Execute non-updating SQL statements.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#execute-query-2">execute-query#2</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p> Execute non-updating SQL statements.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"conn",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier of the active connection.</div>'},{name:"sql",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The query string to be executed.</div>'}],returns:{type:"object()*",description:"an object with the result data rows from the query provided."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08003 Connection doesn\'t exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL005 The statement is Updating type.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"execute-query-prepared-nondeterministic",qname:"jdbc:execute-query-prepared-nondeterministic",signature:"($prepared-statement as anyURI) as object()*",description:' Execute non-updating SQL statements prepared with jdbc:prepare-statement,\n after setting the parameters values accordingly.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#execute-query-prepared-1">execute-query-prepared#1</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p> Execute non-updating SQL statements prepared with jdbc:prepare-statement,\n after setting the parameters values accordingly.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"prepared-statement",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier of the prepared statement.</div>'}],returns:{type:"object()*",description:"an object with the result data rows from the query processed with the parameters provided."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL003 Prepared statement doesn\'t exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL005 The prepared statement is an updating query.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"execute-query-prepared",qname:"jdbc:execute-query-prepared",signature:"($prepared-statement as anyURI) as object()*",description:' Execute non-updating SQL statements prepared with jdbc:prepare-statement,\n after setting the parameters values accordingly.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Every row is represented by an object of column-value representation, as\n in the module description.</p>\n',summary:"<p> Execute non-updating SQL statements prepared with jdbc:prepare-statement,\n after setting the parameters values accordingly.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"prepared-statement",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier of the prepared statement.</div>'}],returns:{type:"object()*",description:"an object with the result data rows from the query processed with the parameters provided."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL003 Prepared statement doesn\'t exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL005 The prepared statement is an updating query.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"execute-query",qname:"jdbc:execute-query",signature:"($conn as anyURI, $sql as string) as object()*",description:' Execute non-updating SQL statements.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Every row is represented by an object of column-value representation, as in\n the module description.</p>\n',summary:"<p> Execute non-updating SQL statements.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"conn",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier of the active connection.</div>'},{name:"sql",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The query string to be executed.</div>'}],returns:{type:"object()*",description:"an object with the result data rows from the query provided."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08003 Connection doesn\'t exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL005 The statement is Updating type.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"execute-update-prepared",qname:"jdbc:execute-update-prepared",signature:"($prepared-statement as anyURI) as integer",description:" Execute updating SQL statements prepared with jdbc:prepare-statement.\n",summary:"<p> Execute updating SQL statements prepared with jdbc:prepare-statement.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"prepared-statement",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier of the prepared statement.</div>'}],returns:{type:"integer",description:"the number of affected rows."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL003 Prepared statement doesn\'t exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL006 The prepared statement is a non-updating query.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"execute-update",qname:"jdbc:execute-update",signature:"($conn as anyURI, $sql as string) as integer",description:" Execute updating SQL statements.\n",summary:"<p> Execute updating SQL statements.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"conn",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier of the active connection.</div>'},{name:"sql",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The query string to be executed.</div>'}],returns:{type:"integer",description:"the number of affected rows."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08003 Connection doesn\'t exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL005 The statement is Read-only type.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"execute",qname:"jdbc:execute",signature:"($conn as anyURI, $sql as string) as anyURI",description:" Execute any kind of SQL statement.\n",summary:"<p> Execute any kind of SQL statement.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"conn",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier of the active connection.</div>'},{name:"sql",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The query string to be executed.</div>'}],returns:{type:"anyURI",description:"an identifier of a DataSet."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08003 Connection doesn\'t exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"is-connected",qname:"jdbc:is-connected",signature:"($conn as anyURI) as boolean",description:" Verify if a connection is still active.\n",summary:"<p> Verify if a connection is still active.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"conn",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier of the connection to be verified.</div>'}],returns:{type:"boolean",description:"true if connected, false otherwise"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08003 Connection doesn\'t exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message</xqdoc:error>']},{isDocumented:!0,arity:1,name:"metadata",qname:"jdbc:metadata",signature:"($dataset as anyURI) as object()",description:' Return the metadata of the result of a DataSet.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n More in detail, it returns information about column names, types, and whether\n a column can contain a null value.\n The metadata information can only be returned for DataSets that have been\n executed explicitly using the jdbc:execute function.\n The metadata node returned has the following structure:\n <pre>{\n   "columns": [ {\n       "name": string,\n       "type": string,\n       "autoincrement"? = boolean,\n       "nillable"? = boolean } * ]\n }</pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n If the query is an updating query, then the result object will return the\n number of affected rows like:\n <pre>{ "affectedrows": integer }</pre>\n </p>\n',summary:"<p> Return the metadata of the result of a DataSet.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"dataset",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier of the DataSet.</div>'}],returns:{type:"object()",description:"the metadata associated with an executed DataSet."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL008 DataSet doesn\'t exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"parameter-metadata",qname:"jdbc:parameter-metadata",signature:"($prepared-statement as anyURI) as object()",description:' Retrieve the names and types of the prepared statement parameters.\n The metadata returned has the following structure:\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0">  {\n     columns: [{\n       "name": string,\n       "type": string\n       }]\n   } </pre>\n',summary:"<p> Retrieve the names and types of the prepared statement parameters.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"prepared-statement",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier of the prepared statement.</div>'}],returns:{type:"object()",description:"parameters metadata (name and type) associated with a prepared statement."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL003 Prepared statement doesn\'t exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"prepare-statement",qname:"jdbc:prepare-statement",signature:"($conn as anyURI, $sql as string) as anyURI",description:' Create a prepared statement for multiple executions with diferent parameters.\n Example:\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0">\n jdbc:prepare-statement($connection, "SELECT * FROM users WHERE id=? AND age&gt;?")\n </pre>\n',summary:"<p> Create a prepared statement for multiple executions with diferent parameters.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"conn",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier of the active connection.</div>'},{name:"sql",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The query string to be executed.</div>'}],returns:{type:"anyURI",description:"the identifier of the prepared statement."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08003 Connection doesn\'t exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"result-set",qname:"jdbc:result-set",signature:"($dataset as anyURI) as object()*",description:" Extract the data rows from a non-updating DataSet.\n Every row is represented by an object of column-value representation, as in\n the module description.\n",summary:"<p> Extract the data rows from a non-updating DataSet.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"dataset",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier of the DataSet.</div>'}],returns:{type:"object()*",description:"an object with the result data rows from the DataSet provided."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL008 DataSet doesn\'t exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"rollback",qname:"jdbc:rollback",signature:"($conn as anyURI) as empty-sequence()",description:" Rollback the current transaction of a connection.\n",summary:"<p> Rollback the current transaction of a connection.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"conn",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier of the connection with a transaction to be rollbacked.</div>'}],returns:{type:"empty-sequence()",description:"an empty-sequence()"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08003 Connection doesn\'t exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message</xqdoc:error>']},{isDocumented:!0,arity:3,name:"set-boolean",qname:"jdbc:set-boolean",signature:"($prepared-statement as anyURI, $parameter-index as integer, $value as boolean) as empty-sequence()",description:' Set the value of the designated parameter with a <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">boolean</tt> value.\n',summary:"<p> Set the value of the designated parameter with a  boolean  value.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"prepared-statement",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier of the prepared statement.</div>'},{name:"parameter-index",type:"integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The index from the parameter to be set.</div>'},{name:"value",type:"boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The value to be set.</div>'}],returns:{type:"empty-sequence()",description:"an empty-sequence()"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL003 Prepared statement doesn\'t exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL007 Parameter casting error.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"set-null",qname:"jdbc:set-null",signature:"($prepared-statement as anyURI, $parameter-index as integer) as empty-sequence()",description:' Set the value of the designated parameter with a <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">NULL</tt> value.\n',summary:"<p> Set the value of the designated parameter with a  NULL  value.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"prepared-statement",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier of the prepared statement.</div>'},{name:"parameter-index",type:"integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The index from the parameter to be set.</div>'}],returns:{type:"empty-sequence()",description:"an empty-sequence()"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL003 Prepared statement doesn\'t exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL007 Parameter casting error.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"set-numeric",qname:"jdbc:set-numeric",signature:"($prepared-statement as anyURI, $parameter-index as decimal, $value as anyAtomicType) as empty-sequence()",description:' Set the value of the designated parameter with a <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">numeric</tt> value.\n',summary:"<p> Set the value of the designated parameter with a  numeric  value.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"prepared-statement",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier of the prepared statement.</div>'},{name:"parameter-index",type:"decimal",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The index from the parameter to be set.</div>'},{name:"value",type:"anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The value to be set.</div>'}],returns:{type:"empty-sequence()",description:"an empty-sequence()"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL003 Prepared statement doesn\'t exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL007 Parameter casting error.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"set-string",qname:"jdbc:set-string",signature:"($prepared-statement as anyURI, $parameter-index as integer, $value as string) as empty-sequence()",description:' Set the value of the designated parameter with a <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">string</tt> value.\n',summary:"<p> Set the value of the designated parameter with a  string  value.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"prepared-statement",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier of the prepared statement.</div>'},{name:"parameter-index",type:"integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The index from the parameter to be set.</div>'},{name:"value",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The value to be set.</div>'}],returns:{type:"empty-sequence()",description:"an empty-sequence()"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL003 Prepared statement doesn\'t exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL007 Parameter casting error.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"set-value",qname:"jdbc:set-value",signature:"($prepared-statement as anyURI, $parameter-index as decimal, $value as anyAtomicType) as empty-sequence()",description:" Set the value of the designated parameter with the given value.\n The function will try to cast the value to the correct data type and assign\n it to the parameter.\n",summary:"<p> Set the value of the designated parameter with the given value.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"prepared-statement",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier of the prepared statement.</div>'},{name:"parameter-index",type:"decimal",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The index from the parameter to be set.</div>'},{name:"value",type:"anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The value to be set.</div>'}],returns:{type:"empty-sequence()",description:"an empty-sequence()"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL003 Prepared statement doesn\'t exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL007 Parameter casting error.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"tables-nondeterministic",qname:"jdbc:tables-nondeterministic",signature:"($conn as anyURI) as object()*",description:' Return the list of tables from a connection.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#tables-1">tables#1</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p> Return the list of tables from a connection.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"conn",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier to a connection.</div>'}],returns:{type:"object()*",description:"Return an object with the result data rows from the query provided, the data rows are defined as follows: { column:value* }* Every row is represented by an object of column-value representation of the returned SQL result."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:4,name:"tables-nondeterministic",qname:"jdbc:tables-nondeterministic",signature:"($conn as anyURI, $catalog as string?, $schema as string?, $table as string?) as object()*",description:' Return the list of tables from a connection.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as <a href="#tables-4">tables#4</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p> Return the list of tables from a connection.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"conn",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier to a connection.</div>'},{name:"catalog",type:"string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A filter of the catalog name of the tables. Send empty-sequence for all tables.</div>'},{name:"schema",type:"string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A filter of the schema name of the tables. Send empty-sequence for all tables.</div>'},{name:"table",type:"string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A filter of the name of the tables. Send empty-sequence for all tables.</div>'}],returns:{type:"object()*",description:"Return an object with the result data rows from the query provided, the data rows are defined as follows: { column:value* }* Every row is represented by an object of column-value representation of the returned SQL result."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"tables",qname:"jdbc:tables",signature:"($conn as anyURI) as object()*",description:' Return the list of tables from a connection.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n',summary:"<p> Return the list of tables from a connection.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"conn",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier to a connection.</div>'}],returns:{type:"object()*",description:"Return an object with the result data rows from the query provided, the data rows are defined as follows: { column:value* }* Every row is represented by an object of column-value representation of the returned SQL result."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:4,name:"tables",qname:"jdbc:tables",signature:"($conn as anyURI, $catalog as string?, $schema as string?, $table as string?) as object()*",description:' Return the list of tables from a connection.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n',summary:"<p> Return the list of tables from a connection.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"conn",type:"anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier to a connection.</div>'},{name:"catalog",type:"string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A filter of the catalog name of the tables. Send empty-sequence for all tables.</div>'},{name:"schema",type:"string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A filter of the schema name of the tables. Send empty-sequence for all tables.</div>'},{name:"table",type:"string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A filter of the name of the tables. Send empty-sequence for all tables.</div>'}],returns:{type:"object()*",description:"Return an object with the result data rows from the query provided, the data rows are defined as follows: { column:value* }* Every row is represented by an object of column-value representation of the returned SQL result."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']}],variables:[{name:"jdbc:READ-COMMITTED",type:"item()*",description:" This variable represents the READ-COMMITTED Isolation Level.\n"},{name:"jdbc:READ-UNCOMMITTED",type:"item()*",description:" This variable represents the READ-UNCOMMITTED Isolation Level.\n"},{name:"jdbc:REPEATABLE-READ",type:"item()*",description:" This variable represents the REPEATABLE-READ Isolation Levels.\n"},{name:"jdbc:SERIALIZABLE",type:"item()*",description:" This variable represents the SERIALIZABLE Isolation Levels.\n"},{name:"jdbc:CREDENTIALS-CATEGORY",type:"item()*",description:" This variable represents the category for the credentials used.\n"}]},"http://zorba.io/modules/full-text":{ns:"http://zorba.io/modules/full-text",description:' This module provides an XQuery API to full-text functions.\n For general information about this implementation of the\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xpath-full-text-10/">XQuery and XPath Full Text 1.0 specification</a>\n as well as instructions for building an installing a thesaurus,\n see the <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="../zorba/ft_thesaurus.html">Full Text Thesaurus documentation</a>.\n <h2 xmlns:xqdoc="http://www.xqdoc.org/1.0">Notes on languages</h2>\n To refer to particular human languages,\n uses either the\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://en.wikipedia.org/wiki/ISO_639-1">ISO 639-1</a>\n or\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://en.wikipedia.org/wiki/ISO_639-2">ISO 639-2</a>\n languages codes.\n Note that only a subset of the\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes">complete list of language codes</a>\n are supported and not every function supports the same subset.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Most functions in this module take a language as a parameter\n using the\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xmlschema-2/#language"><code>xs:language</code></a>\n XML schema data type.\n <h2 xmlns:xqdoc="http://www.xqdoc.org/1.0">Notes on stemming</h2>\n The <code xmlns:xqdoc="http://www.xqdoc.org/1.0">stem()</code> functions return the\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://en.wikipedia.org/wiki/Word_stem">stem</a>\n of a word.\n The stem of a word itself, however, is not guaranteed to be a word.\n It is best to consider a stem as an opaque byte sequence.\n All that is guaranteed about a stem is that,\n for a given word,\n the stem of that word will always be the same byte sequence.\n Hence,\n you should never compare the result of one of the <code xmlns:xqdoc="http://www.xqdoc.org/1.0">stem()</code>\n functions against a non-stemmed string,\n for example:\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0">\n  if ( ft:stem( "apples" ) eq "apple" )             ** WRONG **\n </pre>\n Instead do:\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0">\n  if ( ft:stem( "apples" ) eq ft:stem( "apple" ) )  ** CORRECT **\n </pre>\n <h2 xmlns:xqdoc="http://www.xqdoc.org/1.0">Notes on the thesaurus</h2>\n The <code xmlns:xqdoc="http://www.xqdoc.org/1.0">thesaurus-lookup()</code> functions have "levels"\n and "relationship" parameters.\n The values for these are implementation-defined.\n The default implementation uses the\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://wordnet.princeton.edu/">WordNet lexical database</a>,\n version 3.0.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n In WordNet,\n the number of "levels" that two phrases are apart\n are how many hierarchical meanings apart they are.\n For example,\n "canary" is 5 levels away from "vertebrate"\n (carary &gt; finch &gt; oscine &gt; passerine &gt; bird &gt; vertebrate).\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n When using the WordNet implementation,\n all of the relationships (and their abbreviations)\n specified by\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=7776">ISO 2788</a>\n and\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.niso.org/kst/reports/standards?step=2&amp;gid=&amp;project_key=7cc9b583cb5a62e8c15d3099e0bb46bbae9cf38a">ANSI/NISO Z39.19-2005</a>\n with the exceptions of "HN" (history note)\n and "X SN" (see scope note for) are supported.\n These relationships are:\n  <table xmlns:xqdoc="http://www.xqdoc.org/1.0">\n    <tr>\n      <th>Rel.</th>\n      <th>Meaning</th>\n      <th>WordNet Rel.</th>\n    </tr>\n    <tr>\n      <td>BT</td>\n      <td>broader term</td>\n      <td>hypernym</td>\n    </tr>\n    <tr>\n      <td>BTG</td>\n      <td>broader term generic</td>\n      <td>hypernym</td>\n    </tr>\n    <tr>\n      <td>BTI</td>\n      <td>broader term instance</td>\n      <td>instance hypernym</td>\n    </tr>\n    <tr>\n      <td>BTP</td>\n      <td>broader term partitive</td>\n      <td>part meronym</td>\n    </tr>\n    <tr>\n      <td>NT</td>\n      <td>narrower term</td>\n      <td>hyponym</td>\n    </tr>\n    <tr>\n      <td>NTG</td>\n      <td>narrower term generic</td>\n      <td>hyponym</td>\n    </tr>\n    <tr>\n      <td>NTI</td>\n      <td>narrower term instance</td>\n      <td>instance hyponym</td>\n    </tr>\n    <tr>\n      <td>NTP</td>\n      <td>narrower term partitive</td>\n      <td>part holonym</td>\n    </tr>\n    <tr>\n      <td>RT</td>\n      <td>related term</td>\n      <td>also see</td>\n    </tr>\n    <tr>\n      <td>SN</td>\n      <td>scope note</td>\n      <td>n/a</td>\n    </tr>\n    <tr>\n      <td>TT</td>\n      <td>top term</td>\n      <td>hypernym</td>\n    </tr>\n    <tr>\n      <td>UF</td>\n      <td>non-preferred term</td>\n      <td>n/a</td>\n    </tr>\n    <tr>\n      <td>USE</td>\n      <td>preferred term</td>\n      <td>n/a</td>\n    </tr>\n  </table>\n Note that you can specify relationships\n either by their abbreviation\n or their meaning.\n Relationships are case-insensitive.\n In addition to the\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=7776">ISO 2788</a>\n and\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.niso.org/kst/reports/standards?step=2&amp;gid=&amp;project_key=7cc9b583cb5a62e8c15d3099e0bb46bbae9cf38a">ANSI/NISO Z39.19-2005</a>\n relationships,\n All of the relationships offered by WordNet are also supported.\n These relationships are:\n  <table xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ft_rels">\n    <tr>\n      <th>Relationship</th>\n      <th>Meaning</th>\n    </tr>\n    <tr>\n      <td nowrap="nowrap">also see</td>\n      <td>\n        A word that is related to another,\n        e.g., for "varnished" (furniture)\n        one should <em>also see</em> "finished."\n      </td>\n    </tr>\n    <tr>\n      <td>antonym</td>\n      <td>\n        A word opposite in meaning to another,\n        e.g., "light" is an <em>antonym</em> for "heavy."\n      </td>\n    </tr>\n    <tr>\n      <td>attribute</td>\n      <td>\n        A noun for which adjectives express values,\n        e.g., "weight" is an <em>attribute</em>\n        for which the adjectives "light" and "heavy"\n        express values.\n      </td>\n    </tr>\n    <tr>\n      <td>cause</td>\n      <td>\n        A verb that causes another,\n        e.g., "show" is a <em>cause</em> of "see."\n      </td>\n    </tr>\n    <tr>\n      <td nowrap="nowrap">derivationally related form</td>\n      <td>\n        A word that is derived from a root word,\n        e.g., "metric" is a <em>derivationally related form</em> of "meter."\n      </td>\n    </tr>\n    <tr>\n      <td nowrap="nowrap">derived from adjective</td>\n      <td>\n        An adverb that is derived from an adjective,\n        e.g., "correctly" is <em>derived from the adjective</em> "correct."\n      </td>\n    </tr>\n    <tr>\n      <td>entailment</td>\n      <td>\n        A verb that presupposes another,\n        e.g., "snoring" <em>entails</em> "sleeping."\n      </td>\n    </tr>\n    <tr>\n      <td>hypernym</td>\n      <td>\n        A word with a broad meaning that more specific words fall under,\n        e.g., "meal" is a <em>hypernym</em> of "breakfast."\n      </td>\n    </tr>\n    <tr>\n      <td>hyponym</td>\n      <td>\n        A word of more specific meaning than a general term applicable to it,\n        e.g., "breakfast" is a <em>hyponym</em> of "meal."\n      </td>\n    </tr>\n    <tr>\n      <td nowrap="nowrap">instance hypernym</td>\n      <td>\n        A word that denotes a category of some specific instance,\n        e.g., "author" is an <em>instance hypernym</em> of "Asimov."\n      </td>\n    </tr>\n    <tr>\n      <td nowrap="nowrap">instance hyponym</td>\n      <td>\n        A term that donotes a specific instance of some general category,\n        e.g., "Asimov" is an <em>instance hyponym</em> of "author."\n      </td>\n    </tr>\n    <tr>\n      <td nowrap="nowrap">member holonym</td>\n      <td>\n        A word that denotes a collection of individuals,\n        e.g., "faculty" is a <em>member holonym</em> of "professor."\n      </td>\n    </tr>\n    <tr>\n      <td nowrap="nowrap">member meronym</td>\n      <td>\n        A word that denotes a member of a larger group,\n        e.g., a "person" is a <em>member meronym</em> of a "crowd."\n      </td>\n    </tr>\n    <tr>\n      <td nowrap="nowrap">part holonym</td>\n      <td>\n        A word that denotes a larger whole comprised of some part,\n        e.g., "car" is a <em>part holonym</em> of "engine."\n      </td>\n    </tr>\n    <tr>\n      <td nowrap="nowrap">part meronym</td>\n      <td>\n        A word that denotes a part of a larger whole,\n        e.g., an "engine" is <em>part meronym</em> of a "car."\n      </td>\n    </tr>\n    <tr>\n      <td nowrap="nowrap">participle of verb</td>\n      <td>\n        An adjective that is the participle of some verb,\n        e.g., "breaking" is the <em>participle of the verb</em> "break."\n      </td>\n    </tr>\n    <tr>\n      <td>pertainym</td>\n      <td>\n        An adjective that classifies its noun,\n        e.g., "musical" is a <em>pertainym</em> in "musical instrument."\n      </td>\n    </tr>\n    <tr>\n      <td nowrap="nowrap">similar to</td>\n      <td>\n        Similar, though not necessarily interchangeable, adjectives.\n        For example, "shiny" is <em>similar to</em> "bright",\n        but they have subtle differences.\n      </td>\n    </tr>\n    <tr>\n      <td nowrap="nowrap">substance holonym</td>\n      <td>\n        A word that denotes a larger whole containing some constituent\n        substance, e.g., "bread" is a <em>substance holonym</em> of "flour."\n      </td>\n    </tr>\n    <tr>\n      <td nowrap="nowrap">substance meronym</td>\n      <td>\n        A word that denotes a constituant substance of some larger whole,\n        e.g., "flour" is a <em>substance meronym</em> of "bread."\n      </td>\n    </tr>\n    <tr>\n      <td nowrap="nowrap">verb group</td>\n      <td>\n        A verb that is a member of a group of similar verbs,\n        e.g., "live" is in the <em>verb group</em>\n        of "dwell", "live", "inhabit", etc.\n      </td>\n    </tr>\n  </table>\n <h2 xmlns:xqdoc="http://www.xqdoc.org/1.0">Notes on tokenization</h2>\n For general information about the implementation of tokenization,\n including what constitutes a token,\n see the <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="../zorba/ft_tokenizer.html">Full Text Tokenizer</a> documentation.\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Paul J. Lucas</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://www.w3.org/2005/xqt-errors",prefix:"err"},{uri:"http://zorba.io/modules/full-text",prefix:"ft"},{uri:"http://zorba.io/options/versioning",prefix:"ver"},{uri:"http://zorba.io/errors",prefix:"zerr"}],functions:[{isDocumented:!0,arity:0,name:"current-compare-options",qname:"ft:current-compare-options",signature:"() as object() external",description:" Gets the current compare options.\n",summary:"<p> Gets the current compare options.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"object()",description:"said compare options."},errors:[]},{isDocumented:!0,arity:0,name:"current-lang",qname:"ft:current-lang",signature:"() as xs:language external",description:' Gets the current\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xmlschema-2/#language">language</a>:\n either the language specified by the\n <code xmlns:xqdoc="http://www.xqdoc.org/1.0"><a href="http://www.w3.org/TR/xpath-full-text-10/#doc-xquery10-FTOptionDecl">declare ft-option using</a>\n <a href="http://www.w3.org/TR/xpath-full-text-10/#ftlanguageoption">language</a></code>\n statement (if any)\n or the one returned by <code xmlns:xqdoc="http://www.xqdoc.org/1.0">ft:host-lang()</code> (if none).\n',summary:"<p> Gets the current\n  language :\n either the language specified by the\n  declare ft-option using \n  language \n statement (if any)\n or the one returned by  ft:host-lang()  (if none).</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:language",description:"said language."},errors:[]},{isDocumented:!0,arity:0,name:"host-lang",qname:"ft:host-lang",signature:"() as xs:language external",description:' Gets the host\'s current\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xmlschema-2/#language">language</a>.\n The "host" is the computer on which the software is running.\n The host\'s current language is obtained as follows:\n  <ul xmlns:xqdoc="http://www.xqdoc.org/1.0">\n    <li>\n      For *nix systems:\n      <ol>\n        <li>\n          If <a ref="http://www.cplusplus.com/reference/clibrary/clocale/setlocale/"><code>setlocale</code>(3)</a> returns non-null,\n          the language corresponding to that locale is used.\n        </li>\n        <li>\n          Else, if the <code>LANG</code> environment variable is set,\n          that language is ued.\n        </li>\n        <li>\n          Otherwise, there is no default language.\n        </li>\n      </ol>\n    </li>\n    <li>\n      For Windows systems,\n      the language corresponding to the locale returned by the\n      <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/dd318101(v=vs.85).aspx"><code>GetLocaleInfo()</code></a>\n      function is used.\n    </li>\n  </ul>\n',summary:"<p> Gets the host's current\n  language .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"xs:language",description:"said language."},errors:[]},{isDocumented:!0,arity:1,name:"is-stem-lang-supported",qname:"ft:is-stem-lang-supported",signature:"($lang as xs:language) as xs:boolean external",description:' Checks whether the given\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xmlschema-2/#language">language</a>\n is supported for stemming.\n',summary:"<p> Checks whether the given\n  language \n is supported for stemming.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"lang",type:"xs:language",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The language to check.</div>'}],returns:{type:"xs:boolean",description:'<code xmlns:xqdoc="http://www.xqdoc.org/1.0">true</code> only if the language is supported.'},errors:[]},{isDocumented:!0,arity:1,name:"is-stop-word-lang-supported",qname:"ft:is-stop-word-lang-supported",signature:"($lang as xs:language) as xs:boolean external",description:' Checks whether the given\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xmlschema-2/#language">language</a>\n is supported for stop words.\n',summary:"<p> Checks whether the given\n  language \n is supported for stop words.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"lang",type:"xs:language",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The language to check.</div>'}],returns:{type:"xs:boolean",description:'<code xmlns:xqdoc="http://www.xqdoc.org/1.0">true</code> only if the language is supported.'},errors:[]},{isDocumented:!0,arity:1,name:"is-stop-word",qname:"ft:is-stop-word",signature:"($word as xs:string) as xs:boolean external",description:" Checks whether the given word is a stop-word.\n",summary:"<p> Checks whether the given word is a stop-word.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"word",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The word to check. The word\'s <a href="http://www.w3.org/TR/xmlschema-2/#language">language</a> is assumed to be the one returned by <code>ft:current-lang()</code>.</div>'}],returns:{type:"xs:boolean",description:'<code xmlns:xqdoc="http://www.xqdoc.org/1.0">true</code> only if <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$word</code> is a stop-word.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FTST0009 if <code>ft:current-lang()</code> is not supported.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"is-stop-word",qname:"ft:is-stop-word",signature:"($word as xs:string, $lang as xs:language) as xs:boolean external",description:" Checks whether the given word is a stop-word.\n",summary:"<p> Checks whether the given word is a stop-word.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"word",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The word to check.</div>'},{name:"lang",type:"xs:language",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The <a href="http://www.w3.org/TR/xmlschema-2/#language">language</a> of <code>$word</code>.</div>'}],returns:{type:"xs:boolean",description:'<code xmlns:xqdoc="http://www.xqdoc.org/1.0">true</code> only if <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$word</code> is a stop-word.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FTST0009 if <code>$lang</code> is not supported.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"is-thesaurus-lang-supported",qname:"ft:is-thesaurus-lang-supported",signature:"($lang as xs:language) as xs:boolean external",description:' Checks whether the given\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xmlschema-2/#language">language</a>\n is supported for look-up using the default thesaurus.\n',summary:"<p> Checks whether the given\n  language \n is supported for look-up using the default thesaurus.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"lang",type:"xs:language",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The language to check.</div>'}],returns:{type:"xs:boolean",description:'<code xmlns:xqdoc="http://www.xqdoc.org/1.0">true</code> only if the language is supported.'},errors:[]},{isDocumented:!0,arity:2,name:"is-thesaurus-lang-supported",qname:"ft:is-thesaurus-lang-supported",signature:"($uri as xs:string, $lang as xs:language) as xs:boolean external",description:' Checks whether the given\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xmlschema-2/#language">language</a>\n is supported for look-up using the thesaurus specified by the given URI.\n',summary:"<p> Checks whether the given\n  language \n is supported for look-up using the thesaurus specified by the given URI.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"uri",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The URI specifying the thesaurus to use.</div>'},{name:"lang",type:"xs:language",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The language to check.</div>'}],returns:{type:"xs:boolean",description:'<code xmlns:xqdoc="http://www.xqdoc.org/1.0">true</code> only if the language is supported.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FTST0018 if <code>$uri</code> refers to a thesaurus that is not found in the statically known thesauri.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"is-tokenizer-lang-supported",qname:"ft:is-tokenizer-lang-supported",signature:"($lang as xs:language) as xs:boolean external",description:' Checks whether the given\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xmlschema-2/#language">language</a>\n is supported for tokenization.\n',summary:"<p> Checks whether the given\n  language \n is supported for tokenization.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"lang",type:"xs:language",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The language to check.</div>'}],returns:{type:"xs:boolean",description:'<code xmlns:xqdoc="http://www.xqdoc.org/1.0">true</code> only if the language is supported.'},errors:[]},{isDocumented:!0,arity:1,name:"stem",qname:"ft:stem",signature:"($word as xs:string) as xs:string external",description:" Stems the given word.\n",summary:"<p> Stems the given word.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"word",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The word to stem. The word\'s <a href="http://www.w3.org/TR/xmlschema-2/#language">language</a> is assumed to be the one returned by <code>ft:current-lang()</code>.</div>'}],returns:{type:"xs:string",description:'the stem of <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$word</code>.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FTST0009 if <code>ft:current-lang()</code> is not supported.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"stem",qname:"ft:stem",signature:"($word as xs:string, $lang as xs:language) as xs:string external",description:" Stems the given word.\n",summary:"<p> Stems the given word.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"word",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The word to stem.</div>'},{name:"lang",type:"xs:language",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The <a href="http://www.w3.org/TR/xmlschema-2/#language">language</a> of <code>$word</code>.</div>'}],returns:{type:"xs:string",description:'the stem of <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$word</code>.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FTST0009 if <code>$lang</code> is not supported.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"strip-diacritics",qname:"ft:strip-diacritics",signature:"($string as xs:string) as xs:string external",description:" Strips all diacritical marks from all characters.\n",summary:"<p> Strips all diacritical marks from all characters.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"string",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The string to strip diacritical marks from.</div>'}],returns:{type:"xs:string",description:'<code xmlns:xqdoc="http://www.xqdoc.org/1.0">$string</code> with diacritical marks stripped.'},errors:[]},{isDocumented:!0,arity:1,name:"thesaurus-lookup",qname:"ft:thesaurus-lookup",signature:"($phrase as xs:string) as xs:string* external",description:" Looks-up the given phrase in the default thesaurus.\n",summary:"<p> Looks-up the given phrase in the default thesaurus.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"phrase",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The phrase to look up. The phrase\'s <a href="http://www.w3.org/TR/xmlschema-2/#language">language</a> is assumed to be the one returned by <code>ft:current-lang()</code>.</div>'}],returns:{type:"xs:string*",description:'the related phrases if <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$phrase</code> is found in the thesaurus or the empty sequence if not.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FTST0009 if <code>ft:current-lang()</code> is not supported.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZXQP8401 if the thesaurus data file\'s version is not supported by the currently running version of the software.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZXQP8402 if the thesaurus data file\'s endianness does not match that of the CPU on which the software is currently running.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZXQP8403 if there was an error reading the thesaurus data.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"thesaurus-lookup",qname:"ft:thesaurus-lookup",signature:"($uri as xs:string, $phrase as xs:string) as xs:string* external",description:" Looks-up the given phrase in a thesaurus.\n",summary:"<p> Looks-up the given phrase in a thesaurus.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"uri",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The URI specifying the thesaurus to use.</div>'},{name:"phrase",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The phrase to look up. The phrase\'s <a href="http://www.w3.org/TR/xmlschema-2/#language">language</a> is assumed to be the one the one returned by <code>ft:current-lang()</code>.</div>'}],returns:{type:"xs:string*",description:'the related phrases if <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$phrase</code> is found in the thesaurus or the empty sequence if not.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FTST0009 if <code>ft:current-lang()</code> is unsupported.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FTST0018 if <code>$uri</code> refers to a thesaurus that is not found in the statically known thesauri.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZOSE0001 if the thesaurus data file could not be found.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZOSE0002 if the thesaurus data file is not a plain file.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZXQP8401 if the thesaurus data file\'s version is not supported by the currently running version of the software.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZXQP8402 if the thesaurus data file\'s endianness does not match that of the CPU on which the software is currently running.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZXQP8403 if there was an error reading the thesaurus data file.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"thesaurus-lookup",qname:"ft:thesaurus-lookup",signature:"($uri as xs:string, $phrase as xs:string, $lang as xs:language) as xs:string* external",description:" Looks-up the given phrase in the thesaurus specified by the given URI.\n",summary:"<p> Looks-up the given phrase in the thesaurus specified by the given URI.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"uri",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The URI specifying the thesaurus to use.</div>'},{name:"phrase",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The phrase to look up.</div>'},{name:"lang",type:"xs:language",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The <a href="http://www.w3.org/TR/xmlschema-2/#language">language</a> of <code>$phrase</code>.</div>'}],returns:{type:"xs:string*",description:'the related phrases if <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$phrase</code> is found in the thesaurus or the empty sequence if not.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FTST0009 if <code>$lang</code> is not supported.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FTST0018 if <code>$uri</code> refers to a thesaurus that is not found in the statically known thesauri.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZOSE0001 if the thesaurus data file could not be found.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZOSE0002 if the thesaurus data file is not a plain file.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZXQP8401 if the thesaurus data file\'s version is not supported by the currently running version of the software.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZXQP8402 if the thesaurus data file\'s endianness does not match that of the CPU on which the software is currently running.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZXQP8403 if there was an error reading the thesaurus data file.</xqdoc:error>']},{isDocumented:!0,arity:4,name:"thesaurus-lookup",qname:"ft:thesaurus-lookup",signature:"($uri as xs:string, $phrase as xs:string, $lang as xs:language, $relationship as xs:string) as xs:string* external",description:" Looks-up the given phrase in a thesaurus.\n",summary:"<p> Looks-up the given phrase in a thesaurus.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"uri",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The URI specifying the thesaurus to use.</div>'},{name:"phrase",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The phrase to look up.</div>'},{name:"lang",type:"xs:language",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The <a href="http://www.w3.org/TR/xmlschema-2/#language">language</a> of <code>$phrase</code>.</div>'},{name:"relationship",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The relationship the results are to have to <code>$phrase</code>.</div>'}],returns:{type:"xs:string*",description:'the related phrases if <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$phrase</code> is found in the thesaurus or the empty sequence if not.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FTST0018 if <code>$uri</code> refers to a thesaurus that is not found in the statically known thesauri.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FTST0009 if <code>$lang</code> is not supported.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZOSE0001 if the thesaurus data file could not be found.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZOSE0002 if the thesaurus data file is not a plain file.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZXQP8401 if the thesaurus data file\'s version is not supported by the currently running version of the software.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZXQP8402 if the thesaurus data file\'s endianness does not match that of the CPU on which the software is currently running.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZXQP8403 if there was an error reading the thesaurus data file.</xqdoc:error>']},{isDocumented:!0,arity:6,name:"thesaurus-lookup",qname:"ft:thesaurus-lookup",signature:"($uri as xs:string, $phrase as xs:string, $lang as xs:language, $relationship as xs:string, $level-least as xs:integer, $level-most as xs:integer) as xs:string* external",description:" Looks-up the given phrase in a thesaurus.\n",summary:"<p> Looks-up the given phrase in a thesaurus.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"uri",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The URI specifying the thesaurus to use.</div>'},{name:"phrase",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The phrase to look up.</div>'},{name:"lang",type:"xs:language",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The <a href="http://www.w3.org/TR/xmlschema-2/#language">language</a> of <code>$phrase</code>.</div>'},{name:"relationship",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The relationship the results are to have to <code>$phrase</code>.</div>'},{name:"level-least",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The minimum number of levels within the thesaurus to be traversed.</div>'},{name:"level-most",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The maximum number of levels within the thesaurus to be traversed.</div>'}],returns:{type:"xs:string*",description:'the related phrases if <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$phrase</code> is found in the thesaurus or the empty sequence if not.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FOCA0003 if either <code>$level-least</code> or <code>$level-most</code> is either negative or too large.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FTST0018 if <code>$uri</code> refers to a thesaurus that is not found in the statically known thesauri.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FTST0009 if <code>$lang</code> is not supported.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZOSE0001 if the thesaurus data file could not be found.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZOSE0002 if the thesaurus data file is not a plain file.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZXQP8401 if the thesaurus data file\'s version is not supported by the currently running version of the software.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZXQP8402 if the thesaurus data file\'s endianness does not match that of the CPU on which the software is currently running.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">zerr:ZXQP8403 if there was an error reading the thesaurus data file.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"tokenize-node",qname:"ft:tokenize-node",signature:"($node as node()) as object()* external",description:" Tokenizes the given node and all of its descendants.\n",summary:"<p> Tokenizes the given node and all of its descendants.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"node",type:"node()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The node to tokenize. The node\'s default <a href="http://www.w3.org/TR/xmlschema-2/#language">language</a> is assumed to be the one returned by <code>ft:current-lang()</code>.</div>'}],returns:{type:"object()*",description:"a (possibly empty) sequence of tokens."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FTST0009 if <code>ft:current-lang()</code> is not supported.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"tokenize-node",qname:"ft:tokenize-node",signature:"($node as node(), $lang as xs:language) as object()* external",description:" Tokenizes the given node and all of its decendants.\n",summary:"<p> Tokenizes the given node and all of its decendants.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"node",type:"node()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The node to tokenize.</div>'},{name:"lang",type:"xs:language",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The default <a href="http://www.w3.org/TR/xmlschema-2/#language">language</a> of <code>$node</code>.</div>'}],returns:{type:"object()*",description:"a (possibly empty) sequence of tokens."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FTST0009 if <code>$lang</code> is not supported.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"tokenize-nodes",qname:"ft:tokenize-nodes",signature:"($includes as node()+, $excludes as node()*) as object()* external",description:' Tokenizes the set of nodes comprising <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$includes</code> (and all of its\n descendants) but excluding <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$excludes</code> (and all of its\n descendants), if any.\n',summary:"<p> Tokenizes the set of nodes comprising  $includes  (and all of its\n descendants) but excluding  $excludes  (and all of its\n descendants), if any.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"includes",type:"node()",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The set of nodes (and its descendants) to include. The default <a href="http://www.w3.org/TR/xmlschema-2/#language">language</a> is assumed to be the one returned by <code>ft:current-lang()</code>.</div>'},{name:"excludes",type:"node()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The set of nodes (and its descendants) to exclude.</div>'}],returns:{type:"object()*",description:"a (possibly empty) sequence of tokens."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FTST0009 if <code>ft:current-lang()</code> is not supported.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"tokenize-nodes",qname:"ft:tokenize-nodes",signature:"($includes as node()+, $excludes as node()*, $lang as xs:language) as object()* external",description:' Tokenizes the set of nodes comprising <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$includes</code> (and all of its\n descendants) but excluding <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$excludes</code> (and all of its\n descendants), if any.\n',summary:"<p> Tokenizes the set of nodes comprising  $includes  (and all of its\n descendants) but excluding  $excludes  (and all of its\n descendants), if any.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"includes",type:"node()",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The set of nodes (and its descendants) to include.</div>'},{name:"excludes",type:"node()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The set of nodes (and its descendants) to exclude.</div>'},{name:"lang",type:"xs:language",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The default <a href="http://www.w3.org/TR/xmlschema-2/#language">language</a> for nodes.</div>'}],returns:{type:"object()*",description:"a (possibly empty) sequence of tokens."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FTST0009 if <code>$lang</code> is not supported.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"tokenize-string",qname:"ft:tokenize-string",signature:"($string as xs:string) as xs:string* external",description:" Tokenizes the given string.\n",summary:"<p> Tokenizes the given string.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"string",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The string to tokenize. The string\'s <a href="http://www.w3.org/TR/xmlschema-2/#language">language</a> is assumed to be the one returned by <code>ft:current-lang()</code>.</div>'}],returns:{type:"xs:string*",description:"a (possibly empty) sequence of tokens."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FTST0009 if <code>ft:current-lang()</code> is not supported.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"tokenize-string",qname:"ft:tokenize-string",signature:"($string as xs:string, $lang as xs:language) as xs:string* external",description:" Tokenizes the given string.\n",summary:"<p> Tokenizes the given string.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"string",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The string to tokenize.</div>'},{name:"lang",type:"xs:language",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The <a href="http://www.w3.org/TR/xmlschema-2/#language">language</a> of <code>$string</code>.</div>'}],returns:{type:"xs:string*",description:"a (possibly empty) sequence of tokens."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FTST0009 if <code>$lang</code> is not supported.</xqdoc:error>']},{isDocumented:!0,arity:0,name:"tokenizer-properties",qname:"ft:tokenizer-properties",signature:"() as object() external",description:' Gets properties of the tokenizer for the\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xmlschema-2/#language">language</a>\n returned by <code xmlns:xqdoc="http://www.xqdoc.org/1.0">ft:current-lang()</code>.\n',summary:"<p> Gets properties of the tokenizer for the\n  language \n returned by  ft:current-lang() .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"object()",description:"said properties."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FTST0009 if <code>ft:current-lang()</code> is not supported.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"tokenizer-properties",qname:"ft:tokenizer-properties",signature:"($lang as xs:language) as object() external",description:' Gets properties of the tokenizer for the given\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xmlschema-2/#language">language</a>.\n',summary:"<p> Gets properties of the tokenizer for the given\n  language .</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"lang",type:"xs:language",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The language of the tokenizer to get the properties of.</div>'}],returns:{type:"object()",description:"said properties."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FTST0009 if <code>$lang</code> is not supported. tokenization specifically.</xqdoc:error>']}],variables:[{name:"ft:LANG-DA",type:"xs:language",description:' Predeclared constant for the Danish\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xmlschema-2/#language"><code>xs:language</code></a>.\n'},{name:"ft:LANG-DE",type:"xs:language",description:' Predeclared constant for the German\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xmlschema-2/#language"><code>xs:language</code></a>.\n'},{name:"ft:LANG-EN",type:"xs:language",description:' Predeclared constant for the English\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xmlschema-2/#language"><code>xs:language</code></a>.\n'},{name:"ft:LANG-ES",type:"xs:language",description:' Predeclared constant for the Spanish\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xmlschema-2/#language"><code>xs:language</code></a>.\n'},{name:"ft:LANG-FI",type:"xs:language",description:' Predeclared constant for the Finnish\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xmlschema-2/#language"><code>xs:language</code></a>.\n'},{name:"ft:LANG-FR",type:"xs:language",description:' Predeclared constant for the French\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xmlschema-2/#language"><code>xs:language</code></a>.\n'},{name:"ft:LANG-HU",type:"xs:language",description:' Predeclared constant for the Hungarian\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xmlschema-2/#language"><code>xs:language</code></a>.\n'},{name:"ft:LANG-IT",type:"xs:language",description:' Predeclared constant for the Italian\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xmlschema-2/#language"><code>xs:language</code></a>.\n'},{name:"ft:LANG-NL",type:"xs:language",description:' Predeclared constant for the Dutch\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xmlschema-2/#language"><code>xs:language</code></a>.\n'},{name:"ft:LANG-NO",type:"xs:language",description:' Predeclared constant for the Norwegian\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xmlschema-2/#language"><code>xs:language</code></a>.\n'},{name:"ft:LANG-PT",type:"xs:language",description:' Predeclared constant for the Portuguese\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xmlschema-2/#language"><code>xs:language</code></a>.\n'},{name:"ft:LANG-RO",type:"xs:language",description:' Predeclared constant for the Romanian\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xmlschema-2/#language"><code>xs:language</code></a>.\n'},{name:"ft:LANG-RU",type:"xs:language",description:' Predeclared constant for the Russian\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xmlschema-2/#language"><code>xs:language</code></a>.\n'},{name:"ft:LANG-SV",type:"xs:language",description:' Predeclared constant for the Swedish\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xmlschema-2/#language"><code>xs:language</code></a>.\n'},{name:"ft:LANG-TR",type:"xs:language",description:' Predeclared constant for the Turkish\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.w3.org/TR/xmlschema-2/#language"><code>xs:language</code></a>.\n'}]},"http://www.zorba-xquery.com/modules/jdbc":{ns:"http://www.zorba-xquery.com/modules/jdbc",description:' This module contains functions to connect to any JDBC datasource\n using jvm-util module to handle Java interaction.\n <h2 xmlns:xqdoc="http://www.xqdoc.org/1.0" id="determinism">Important Notice Regarding Function Determinism</h2>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The non side-effecting functions:\n <ul>\n   <li><a href="?anchor=connect-1">connect#1</a></li>\n   <li><a href="?anchor=connect-2">connect#2</a></li>\n   <li><a href="?anchor=execute-query-2">execute-query#2</a></li>\n   <li><a href="?anchor=execute-query-prepared-1">execute-query-prepared#1</a></li>\n   <li><a href="?anchor=tables-1">tables#1</a></li>\n   <li><a href="?anchor=tables-4">tables#4</a></li>\n </ul>\n are declared deterministic, which means that their results could be cached\n when invoked multiple times with the same arguments in the same query execution.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">To not use cached results you can use the following alternative functions:\n <ul>\n   <li><a href="?anchor=connect-notdeterministic-0">connect-notdeterministic#0</a></li>\n   <li><a href="?anchor=connect-notdeterministic-1">connect-notdeterministic#1</a></li>\n   <li><a href="?anchor=connect-notdeterministic-2">connect-notdeterministic#2</a></li>\n   <li><a href="?anchor=execute-query-notdeterministic-2">execute-query-notdeterministic#2</a></li>\n   <li><a href="?anchor=execute-query-prepared-notdeterministic-1">execute-query-prepared-notdeterministic#1</a></li>\n   <li><a href="?anchor=tables-notdeterministic-1">tables-notdeterministic#1</a></li>\n   <li><a href="?anchor=tables-notdeterministic-4">tables-notdeterministic#4</a></li>\n </ul>\n which have been declared as being non deterministic.</p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Rodolfo Ochoa</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Federico Cavalieri</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://www.w3.org/2005/xqt-errors",prefix:"err"},{uri:"http://www.zorba-xquery.com/modules/jdbc",prefix:"jdbc"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"affected-rows",qname:"jdbc:affected-rows",signature:"($dataset-id as xs:anyURI) as xs:integer external",description:" Return the number of affected rows of a particular DataSet.\n",summary:"<p> Return the number of affected rows of a particular DataSet.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"dataset-id",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier to a DataSet.</div>'}],returns:{type:"xs:integer",description:"Returns an xs:integer with the number of affected rows."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL008 DataSet doesn\'t exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"clear-params",qname:"jdbc:clear-params",signature:"($prepared-statement as xs:anyURI) as empty-sequence() external",description:" Clears the current parameter values immediately.\n",summary:"<p> Clears the current parameter values immediately.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"prepared-statement",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier to a prepared statement.</div>'}],returns:{type:"empty-sequence()",description:"This function returns an empty-sequence()"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL003 Prepared statement doesn\'t exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"close-dataset",qname:"jdbc:close-dataset",signature:"($dataset-id as xs:anyURI) as empty-sequence() external",description:" Closes and free resources from a particular DataSet.\n",summary:"<p> Closes and free resources from a particular DataSet.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"dataset-id",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier to a DataSet.</div>'}],returns:{type:"empty-sequence()",description:"This function returns an empty-sequence()"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL008 DataSet doesn\'t exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"close-prepared",qname:"jdbc:close-prepared",signature:"($prepared-statement as xs:anyURI) as empty-sequence() external",description:" Closes and frees from memory any prepared SQL statement created with jdbc:prepare-statement\n",summary:"<p> Closes and frees from memory any prepared SQL statement created with jdbc:prepare-statement\n</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"prepared-statement",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier to a prepared statement.</div>'}],returns:{type:"empty-sequence()",description:"This function returns an empty-sequence()"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL003 Prepared statement doesn\'t exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"commit",qname:"jdbc:commit",signature:"($connection-id as xs:anyURI) as empty-sequence() external",description:" Commit current transaction from an active connection.\n",summary:"<p> Commit current transaction from an active connection.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"connection-id",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier to the connection to be commited.</div>'}],returns:{type:"empty-sequence()",description:"This function returns an empty-sequence()"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08003 Connection doesn\'t exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message</xqdoc:error>']},{isDocumented:!0,arity:1,name:"connect-nondeterministic",qname:"jdbc:connect-nondeterministic",signature:"($connection-config as object()) as xs:anyURI external",description:' Opens a connection to a database.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as <a href="#connect-1">connect#1</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p> Opens a connection to a database.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"connection-config",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> json object that has the host and user informations.</div>'}],returns:{type:"xs:anyURI",description:"Return an identifier that represents the connection to the server."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL28000 Authentication failed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08001 Connection error.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL40003 Isolation level not supported.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see attached message.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"connect-nondeterministic",qname:"jdbc:connect-nondeterministic",signature:"($connection-config as object(), $options as object()?) as xs:anyURI external",description:' Opens a connection to a database with specified options.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as <a href="#connect-2">connect#2</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p> Opens a connection to a database with specified options.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"connection-config",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> json object that has the host and user informations.</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> json object that specifies the connection options.</div>'}],returns:{type:"xs:anyURI",description:"Return an identifier that represents the connection to the server."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL28000 Authentication failed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08001 Connection error.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL40003 Isolation level not supported.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"connect",qname:"jdbc:connect",signature:"($connection-config as object()) as xs:anyURI external",description:' Opens a connection to a database.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns a URI identifying the connection that has been opened. The\n implementing code determines from the $connection-config either explicitly\n (interpreting the driver attribute) or implicitly (using the type attribute)\n which driver it has to load.</p>\n',summary:"<p> Opens a connection to a database.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"connection-config",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> json object that has the host and user informations.</div>'}],returns:{type:"xs:anyURI",description:'Return an identifier that represents the connection to the server. Connection coonfiguration example: { "url" : "jdbc:mysql://localhost/", "user" : "root", "password" : "" }'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL28000 Authentication failed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08001 Connection error.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL40003 Isolation level not supported.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see attached message.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"connect",qname:"jdbc:connect",signature:"($connection-config as object(), $options as object()?) as xs:anyURI external",description:' Opens a connection to a database with specified options.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns a URI identifying the connection that has been opened. The\n implementing code determines from the $connection-config either explicitly\n (interpreting the driver attribute) or implicitly (using the type attribute)\n which driver it has to load.</p>\n',summary:"<p> Opens a connection to a database with specified options.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"connection-config",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> json object that has the host and user informations.</div>'},{name:"options",type:"object()",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> json object that specifies the connection options.</div>'}],returns:{type:"xs:anyURI",description:'Return an identifier that represents the connection to the server. Connection options example: { "autocommit" : false, "readonly"? : true, "isolation-level"? : $jdbc:READ-COMMITTED }'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL28000 Authentication failed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08001 Connection error.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL40003 Isolation level not supported.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"connection-options",qname:"jdbc:connection-options",signature:"($connection-id as xs:anyURI) as object() external",description:" Returns a set with options for a specified connection.\n",summary:"<p> Returns a set with options for a specified connection.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"connection-id",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier to the connection to be verify.</div>'}],returns:{type:"object()",description:'Returns and object with the connection options. The returned options are equal to the options specified in function jdbc:connect. Consequently, the options are specified as follows: { "autocommit" : xs:boolean, "readonly" : xs:boolean, "isolation-level" : xs:string }'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08003 Connection doesn\'t exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message</xqdoc:error>']},{isDocumented:!0,arity:1,name:"execute-prepared",qname:"jdbc:execute-prepared",signature:"($prepared-statement as xs:anyURI) as xs:anyURI external",description:" Executes SQL statements prepared with 5.1 jsql:prepare-statement with values set\n and returns an identifier to a Dataset.\n",summary:"<p> Executes SQL statements prepared with 5.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"prepared-statement",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier to a prepared statement.</div>'}],returns:{type:"xs:anyURI",description:"Return an identifier that represents a DataSet."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL003 Prepared statement doesn\'t exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"execute-query-nondeterministic",qname:"jdbc:execute-query-nondeterministic",signature:"($connection-id as xs:anyURI, $sql as xs:string) as object()* external",description:' Executes non-updating SQL statements.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#execute-query-2">execute-query#2</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p> Executes non-updating SQL statements.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"connection-id",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier to an active connection.</div>'},{name:"sql",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The query string to be executed.</div>'}],returns:{type:"object()*",description:"Return an object with the result data rows from the query provided, the data rows are defined as follows: { column:value* }* Every row is represented by an object of column-value representation of the returned SQL result."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08003 Connection doesn\'t exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL005 The statement is Updating type.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"execute-query-prepared-nondeterministic",qname:"jdbc:execute-query-prepared-nondeterministic",signature:"($prepared-statement as xs:anyURI) as object()* external",description:' Executes a non-updating SQL statement prepared with 5.1 jsql:prepare-statement.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as\n <a href="#execute-query-prepared-1">execute-query-prepared#1</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p> Executes a non-updating SQL statement prepared with 5.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"prepared-statement",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier to a prepared statement.</div>'}],returns:{type:"object()*",description:"Return an object with the result data rows from the query processed with the parameter values provided, the data rows are defined as follows: { column:value* }* Every row is represented by an object of column-value representation of the returned SQL result."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL003 Prepared statement doesn\'t exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL005 The prepared statement is an updating query.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"execute-query-prepared",qname:"jdbc:execute-query-prepared",signature:"($prepared-statement as xs:anyURI) as object()* external",description:' Executes a non-updating SQL statement prepared with 5.1 jsql:prepare-statement.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n',summary:"<p> Executes a non-updating SQL statement prepared with 5.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"prepared-statement",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier to a prepared statement.</div>'}],returns:{type:"object()*",description:"Return an object with the result data rows from the query processed with the parameter values provided, the data rows are defined as follows: { column:value* }* Every row is represented by an object of column-value representation of the returned SQL result."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL003 Prepared statement doesn\'t exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL005 The prepared statement is an updating query.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"execute-query",qname:"jdbc:execute-query",signature:"($connection-id as xs:anyURI, $sql as xs:string) as object()* external",description:' Executes non-updating SQL statements.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n',summary:"<p> Executes non-updating SQL statements.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"connection-id",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier to an active connection.</div>'},{name:"sql",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The query string to be executed.</div>'}],returns:{type:"object()*",description:"Return an object with the result data rows from the query provided, the data rows are defined as follows: { column:value* }* Every row is represented by an object of column-value representation of the returned SQL result."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08003 Connection doesn\'t exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL005 The statement is Updating type.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"execute-update-prepared",qname:"jdbc:execute-update-prepared",signature:"($prepared-statement as xs:anyURI) as xs:integer external",description:" Executes an updating SQL statement prepared with 5.1 jsql:prepare-statement.\n",summary:"<p> Executes an updating SQL statement prepared with 5.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"prepared-statement",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier to a prepared statement.</div>'}],returns:{type:"xs:integer",description:"Returns an xs:integer with the number of affected rows."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL003 Prepared statement doesn\'t exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL006 The prepared statement is a non-updating query.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"execute-update",qname:"jdbc:execute-update",signature:"($connection-id as xs:anyURI, $sql as xs:string) as xs:integer external",description:" Executes updating SQL statements.\n",summary:"<p> Executes updating SQL statements.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"connection-id",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier to an active connection.</div>'},{name:"sql",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The query string to be executed.</div>'}],returns:{type:"xs:integer",description:"Returns an xs:integer with the number of affected rows."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08003 Connection doesn\'t exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL005 The statement is Read-only type.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"execute",qname:"jdbc:execute",signature:"($connection-id as xs:anyURI, $sql as xs:string) as xs:anyURI external",description:" Executes any kind of SQL statement.\n",summary:"<p> Executes any kind of SQL statement.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"connection-id",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier to an active connection.</div>'},{name:"sql",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The query string to be executed.</div>'}],returns:{type:"xs:anyURI",description:"Return an identifier that represents a DataSet."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08003 Connection doesn\'t exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"is-connected",qname:"jdbc:is-connected",signature:"($connection-id as xs:anyURI) as xs:boolean external",description:" Verify if a connection is still active.\n",summary:"<p> Verify if a connection is still active.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"connection-id",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier to the connection to be verify.</div>'}],returns:{type:"xs:boolean",description:"Returns true if connected."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08003 Connection doesn\'t exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message</xqdoc:error>']},{isDocumented:!0,arity:1,name:"metadata",qname:"jdbc:metadata",signature:"($dataset-id as xs:anyURI) as object() external",description:" Return the metadata of the result of a particular DataSet.\n",summary:"<p> Return the metadata of the result of a particular DataSet.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"dataset-id",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier to a DataSet.</div>'}],returns:{type:"object()",description:'This function returns the metadata associated with an executed DataSet. More in detail, it returns information about column names, types, and whether a column can contain a null value. The metadata information can only be returned for DataSets that have been executed explicitly using the jsql:execute function. The metadata node returned by this function is defined as follows: { "columns": [ { "name": xs:string, "type": xs:string, "autoincrement"? = xs:boolean, "nillable"? = xs:boolean } * ] }'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL008 DataSet doesn\'t exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"parameter-metadata",qname:"jdbc:parameter-metadata",signature:"($prepared-statement as xs:anyURI) as object() external",description:" Retrieves the number, types and properties of the prepared statement parameters.\n",summary:"<p> Retrieves the number, types and properties of the prepared statement parameters.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"prepared-statement",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier to a prepared statement.</div>'}],returns:{type:"object()",description:'This function returns the parameters metadata associated with a prepared statement. In other words, it returns information about the column name associated with the parameter, the type, etc. The metadata node returned by this function is defined as follows: { columns: [{ "name": xs:string, "type": xs:string }] }'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL003 Prepared statement doesn\'t exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"prepare-statement",qname:"jdbc:prepare-statement",signature:"($connection-id as xs:anyURI, $sql as xs:string) as xs:anyURI external",description:"  Creates a prepared statement for multiple executions with diferent values.\n",summary:"<p>  Creates a prepared statement for multiple executions with diferent values.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"connection-id",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier to an active connection.</div>'},{name:"sql",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The query string to be executed.</div>'}],returns:{type:"xs:anyURI",description:'Return an identifier that represents the prepared statement. Example: jsql:prepare-statement($connection, "SELECT * FROM users WHERE id=? AND age&gt;?")'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08003 Connection doesn\'t exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"result-set",qname:"jdbc:result-set",signature:"($dataset-id as xs:anyURI) as object()* external",description:" This function returns a sequence of objects representing the rows of data from a non-updating query.\n",summary:"<p> This function returns a sequence of objects representing the rows of data from a non-updating query.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"dataset-id",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier to a DataSet.</div>'}],returns:{type:"object()*",description:"Return an object with the result data rows from the DataSet provided, the data rows are defined as follows: { column:value* }* Every row is represented by an object of column-value representation of the returned SQL result."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL008 DataSet doesn\'t exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"rollback",qname:"jdbc:rollback",signature:"($connection-id as xs:anyURI) as empty-sequence() external",description:" Rollback the current transaction of a connection.\n",summary:"<p> Rollback the current transaction of a connection.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"connection-id",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier to the connection to be rollbacked.</div>'}],returns:{type:"empty-sequence()",description:"This function returns an empty-sequence()"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08003 Connection doesn\'t exist</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message</xqdoc:error>']},{isDocumented:!0,arity:3,name:"set-boolean",qname:"jdbc:set-boolean",signature:"($prepared-statement as xs:anyURI, $parameter-index as xs:integer, $value as xs:boolean) as empty-sequence() external",description:" Set the value of the designated parameter with the given value, this function will assign only boolean values.\n",summary:"<p> Set the value of the designated parameter with the given value, this function will assign only boolean values.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"prepared-statement",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier to a prepared statement.</div>'},{name:"parameter-index",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The index from the parameter to be set.</div>'},{name:"value",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The value to be set.</div>'}],returns:{type:"empty-sequence()",description:"This function returns an empty-sequence()"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL003 Prepared statement doesn\'t exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL007 Parameter casting error.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"set-null",qname:"jdbc:set-null",signature:"($prepared-statement as xs:anyURI, $parameter-index as xs:integer) as empty-sequence() external",description:" Set the value of the designated parameter with the given value, this function\n will assign only null values if possible.\n",summary:"<p> Set the value of the designated parameter with the given value, this function\n will assign only null values if possible.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"prepared-statement",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier to a prepared statement.</div>'},{name:"parameter-index",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The index from the parameter to be set.</div>'}],returns:{type:"empty-sequence()",description:"This function returns an empty-sequence()"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL003 Prepared statement doesn\'t exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL007 Parameter casting error.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"set-numeric",qname:"jdbc:set-numeric",signature:"($prepared-statement as xs:anyURI, $parameter-index as xs:decimal, $value as xs:anyAtomicType) as empty-sequence() external",description:" Set the value of the designated parameter with the given value, this function will assign only numeric values.\n",summary:"<p> Set the value of the designated parameter with the given value, this function will assign only numeric values.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"prepared-statement",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier to a prepared statement.</div>'},{name:"parameter-index",type:"xs:decimal",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The index from the parameter to be set.</div>'},{name:"value",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The value to be set.</div>'}],returns:{type:"empty-sequence()",description:"This function returns an empty-sequence()"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL003 Prepared statement doesn\'t exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL007 Parameter casting error.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"set-string",qname:"jdbc:set-string",signature:"($prepared-statement as xs:anyURI, $parameter-index as xs:integer, $value as xs:string) as empty-sequence() external",description:" Set the value of the designated parameter with the given value, this function will assign only string values.\n",summary:"<p> Set the value of the designated parameter with the given value, this function will assign only string values.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"prepared-statement",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier to a prepared statement.</div>'},{name:"parameter-index",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The index from the parameter to be set.</div>'},{name:"value",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The value to be set.</div>'}],returns:{type:"empty-sequence()",description:"This function returns an empty-sequence()"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL003 Prepared statement doesn\'t exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL007 Parameter casting error.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"set-value",qname:"jdbc:set-value",signature:"($prepared-statement as xs:anyURI, $parameter-index as xs:decimal, $value as xs:anyAtomicType) as empty-sequence() external",description:" Set the value of the designated parameter with the given value,\n this function will assign any value you send\n and it will try to cast to the correct type.\n",summary:"<p> Set the value of the designated parameter with the given value,\n this function will assign any value you send\n and it will try to cast to the correct type.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"prepared-statement",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier to a prepared statement.</div>'},{name:"parameter-index",type:"xs:decimal",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The index from the parameter to be set.</div>'},{name:"value",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The value to be set.</div>'}],returns:{type:"empty-sequence()",description:"This function returns an empty-sequence()"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL003 Prepared statement doesn\'t exist.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL007 Parameter casting error.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"tables-nondeterministic",qname:"jdbc:tables-nondeterministic",signature:"($connection-id as xs:anyURI) as object()*",description:' Return the list of tables from a connection\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as <a href="#tables-1">tables#1</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p> Return the list of tables from a connection\n  This function has the same semantics as  tables#1 ,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"connection-id",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier to a connection.</div>'}],returns:{type:"object()*",description:"Return an object with the result data rows from the query provided, the data rows are defined as follows: { column:value* }* Every row is represented by an object of column-value representation of the returned SQL result."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:4,name:"tables-nondeterministic",qname:"jdbc:tables-nondeterministic",signature:"($connection-id as xs:anyURI, $catalog as xs:string?, $schema as xs:string?, $table as xs:string?) as object()* external",description:' Return the list of tables from a connection.\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function has the same semantics as <a href="#tables-4">tables#4</a>,\n but is declared as being non deterministic and thus should only be used when\n result caching is not desired.</p>\n',summary:"<p> Return the list of tables from a connection.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"connection-id",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier to a connection.</div>'},{name:"catalog",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A filter of the catalog name of the tables. Send empty-sequence for all tables.</div>'},{name:"schema",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A filter of the schema name of the tables. Send empty-sequence for all tables.</div>'},{name:"table",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A filter of the name of the tables. Send empty-sequence for all tables.</div>'}],returns:{type:"object()*",description:"Return an object with the result data rows from the query provided, the data rows are defined as follows: { column:value* }* Every row is represented by an object of column-value representation of the returned SQL result."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"tables",qname:"jdbc:tables",signature:"($connection-id as xs:anyURI) as object()*",description:' Return the list of tables from a connection\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n',summary:"<p> Return the list of tables from a connection\n  This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"connection-id",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier to a connection.</div>'}],returns:{type:"object()*",description:"Return an object with the result data rows from the query provided, the data rows are defined as follows: { column:value* }* Every row is represented by an object of column-value representation of the returned SQL result."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']},{isDocumented:!0,arity:4,name:"tables",qname:"jdbc:tables",signature:"($connection-id as xs:anyURI, $catalog as xs:string?, $schema as xs:string?, $table as xs:string?) as object()* external",description:' Return the list of tables from a connection\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>\n',summary:"<p> Return the list of tables from a connection\n  This function is declared as deterministic and should be used whenever result\n caching is acceptable.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"connection-id",type:"xs:anyURI",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The identifier to a connection.</div>'},{name:"catalog",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A filter of the catalog name of the tables. Send empty-sequence for all tables.</div>'},{name:"schema",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A filter of the schema name of the tables. Send empty-sequence for all tables.</div>'},{name:"table",type:"xs:string",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A filter of the name of the tables. Send empty-sequence for all tables.</div>'}],returns:{type:"object()*",description:"Return an object with the result data rows from the query provided, the data rows are defined as follows: { column:value* }* Every row is represented by an object of column-value representation of the returned SQL result."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL08000 Connection is closed.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">SQL001 Descriptive error, see error in attached message.</xqdoc:error>']}],variables:[{name:"jdbc:NOT-SUPPORTED",type:"item()*",description:" This variable represents the NOT-SUPPORTED level for Isolation Levels in $options for 2.2 connect function.\n"},{name:"jdbc:READ-COMMITTED",type:"item()*",description:" This variable represents the READ-COMMITTED level for Isolation Levels in $options for 2.2 connect function.\n"},{name:"jdbc:READ-UNCOMMITTED",type:"item()*",description:" This variable represents the READ-UNCOMMITTED level for Isolation Levels in $options for 2.2 connect function.\n"},{name:"jdbc:REPEATABLE-READ",type:"item()*",description:" This variable represents the REPEATABLE-READ level for Isolation Levels in $options for 2.2 connect function.\n"},{name:"jdbc:SERIALIZABLE",type:"item()*",description:" This variable represents the SERIALIZABLE level for Isolation Levels in $options for 2.2 connect function.\n"}]},"http://www.28msec.com/modules/http-response":{ns:"http://www.28msec.com/modules/http-response",description:' The response module can be used to modify the HTTP response\n that will be send as a result. For example, the\n <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">content-type</tt> function can be used to set the\n Content-Type header and determine the encoding of data in the\n response.\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Matthias Brantner</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://www.28msec.com/modules/http-response",prefix:"http"},{uri:"http://www.w3.org/2010/xslt-xquery-serialization",prefix:"output"},{uri:"http://www.28msec.com/modules/http/response#2.0",prefix:"res"},{uri:"http://www.28msec.com/modules/http-response",prefix:"resp"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"code-for-status",qname:"resp:code-for-status",signature:"($status as xs:string) as xs:integer",description:" Convert between the name of the HTTP status code and\n the integer value of that status code.\n",summary:"<p> Convert between the name of the HTTP status code and\n the integer value of that status code.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"status",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:integer",description:"the integer value of the given status code."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:invalid-status if the given name does not represent a valid http status code</xqdoc:error>']},{isDocumented:!0,arity:1,name:"content-type-binary",qname:"resp:content-type-binary",signature:"($type as xs:string) as xs:boolean",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Test if a given content-type is a binary content-type. A\n content-type is considered to be binary if it\'s not a text\n content-type.</p>\n',summary:"<p>  Test if a given content-type is a binary content-type.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"type",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the content-type to test.</div>'}],returns:{type:"xs:boolean",description:"true if the given content-type is a binary content-type, false otherwise."},errors:[]},{isDocumented:!0,arity:1,name:"content-type-html",qname:"resp:content-type-html",signature:"($type as xs:string) as xs:boolean",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Test if a given content-type is a HTML content-type, i.e.\n the content-type is the string "text/html".</p>\n',summary:"<p>  Test if a given content-type is a HTML content-type, i.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"type",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the content-type to test.</div>'}],returns:{type:"xs:boolean",description:"true if the given content-type is the HTML content-type, false otherwise."},errors:[]},{isDocumented:!0,arity:1,name:"content-type-json",qname:"resp:content-type-json",signature:"($type as xs:string) as xs:boolean",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Test if a given content-type is a JSON content-type, i.e.\n the content-type is the string "application/json".</p>\n',summary:"<p>  Test if a given content-type is a JSON content-type, i.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"type",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the content-type to test.</div>'}],returns:{type:"xs:boolean",description:"true if the given content-type is the JSON content-type, false otherwise."},errors:[]},{isDocumented:!0,arity:1,name:"content-type-mixed-json-xml",qname:"resp:content-type-mixed-json-xml",signature:"($type as xs:string) as xs:boolean",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Test if a given content-type is a mixed JSON-XML content-type, i.e.\n the content-type is the string "application/mixed-json-xml".</p>\n',summary:"<p>  Test if a given content-type is a mixed JSON-XML content-type, i.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"type",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the content-type to test.</div>'}],returns:{type:"xs:boolean",description:"true if the given content-type is a mixed JSON-XML content-type, false otherwise."},errors:[]},{isDocumented:!0,arity:1,name:"content-type-text",qname:"resp:content-type-text",signature:"($type as xs:string) as xs:boolean",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Test if a given content-type is a text content-type.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">A text content-type starts with "text/" or contains either of\n the strings "xml" or "json".</p>\n',summary:"<p>  Test if a given content-type is a text content-type.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"type",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the content-type to test.</div>'}],returns:{type:"xs:boolean",description:"true if the given content-type is a text content-type, false otherwise."},errors:[]},{isDocumented:!0,arity:1,name:"content-type-xhtml",qname:"resp:content-type-xhtml",signature:"($type as xs:string) as xs:boolean",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Test if a given content-type is a XHTML content-type, i.e.\n the content-type is the string "application/xhtml+xml".</p>\n',summary:"<p>  Test if a given content-type is a XHTML content-type, i.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"type",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the content-type to test.</div>'}],returns:{type:"xs:boolean",description:"true if the given content-type is the XHTML content-type, false otherwise."},errors:[]},{isDocumented:!0,arity:1,name:"content-type-xml",qname:"resp:content-type-xml",signature:"($type as xs:string) as xs:boolean",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Test if a given content-type is a XML content-type</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">A XML content-type is a content-type that is "application/xml"\n or ends : with the string "+xml".</p>\n',summary:'<p>  Test if a given content-type is a XML content-type \n  A XML content-type is a content-type that is "application/xml"\n or ends : with the string "+xml".</p>',annotation_str:"",annotations:[],updating:!1,parameters:[{name:"type",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the content-type to test.</div>'}],returns:{type:"xs:boolean",description:"true if the given content-type is a XML content-type, false otherwise."},errors:[]},{isDocumented:!0,arity:1,name:"content-type",qname:"resp:content-type",signature:"($type as xs:string) as empty-sequence()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Sets the Content-Type header for the response.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n For example,\n <tt>resp:content-type("text/plain")</tt> will cause the\n header\n <tt>Content-Type: text/plain</tt> to be added for the response.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">In addtion to setting the Content-Type header, the function also\n sets the serialization parameters to the default values for serialization\n method for the given content-type. For example, if the content-type is set to\n text/plain, the default serialization parameters for the text\n serialization method will be used.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The functions resp:content-type-text/xml/html/xhtml/binary may be used\n to figure out which serialization method will be used for a specific\n content-type.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If the given content-type contains a charset declaration (e.g.\n <tt>resp:content-type("text/plain;charset=ISO-8859-1")</tt>), the\n content of the response will be transcoded to the given encoding.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The default serialization parameters set by this function can\n be overwritten using the resp:serialization-parameters() function.</p>\n',summary:"<p>  Sets the Content-Type header for the response.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"type",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the content-type to be set</div>'}],returns:{type:"empty-sequence()",description:"the function is sequential and returns the empty sequence"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:invalid-encoding if the given encoding is invalid or not supported.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"content-type",qname:"resp:content-type",signature:"($type as xs:string, $params as object()) as empty-sequence()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Sets the Content-Type header for the response.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <tt>resp:content-type("text/plain")</tt> will cause the\n header\n <tt>Content-Type: text/plain</tt> to be added for the response.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">In addition to the content-type, the function also allows to\n specify the serialization method and parameters that will be used\n for serializing the result. For details about this parameter, please\n refer to resp:serialization-parameters#1.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If the content-type suggest using a binary serialization,\n resp:decode-binary#1 will be called and set to true except if\n the serialization method is specified at the same time. In this\n case, the serialization method will be used as specified.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If the given content-type contains a charset declaration (e.g.\n <tt>resp:content-type("text/plain;charset=ISO-8859-1")</tt>), the\n content of the response will be transcoded to the given encoding.\n If the serialization parameters also contain a charset declaration,\n the charset contained in the content-type will be used. to transcode\n the result.</p>\n',summary:"<p>  Sets the Content-Type header for the response.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"type",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the content-type to be set</div>'},{name:"params",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the serialization parameters that will be used for serialization the result.</div>'}],returns:{type:"empty-sequence()",description:"the function is sequential and returns the empty sequence"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:invalid-encoding if the given encoding is invalid or not supported.</xqdoc:error>']},{isDocumented:!0,arity:0,name:"decode-binary",qname:"resp:decode-binary",signature:"() as xs:boolean",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the boolean indiciating whether base64Binary returned by\n this request will be decoded.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The default if not modified using resp:decode-binary is false.</p>\n',summary:"<p>  Returns the boolean indiciating whether base64Binary returned by\n this request will be decoded.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[],returns:{type:"xs:boolean",description:"the said boolean value"},errors:[]},{isDocumented:!0,arity:1,name:"decode-binary",qname:"resp:decode-binary",signature:"($decode as xs:boolean) as empty-sequence()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If this function is invoked with true, the result of the request\n will not be serialized. Instead, the result will be the binary values\n of any item that is of type base64Binary. The values of all other\n items will not be part of the result.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Please note that all serialization parameters which have been set using\n resp:serialization-parameters will be ignored. Also, the output encoding\n is ignored for binaries.</p>\n',summary:"<p>  If this function is invoked with true, the result of the request\n will not be serialized.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"decode",type:"xs:boolean",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> boolean value indicating whether base64Binary should be decoded.</div>'}],returns:{type:"empty-sequence()",description:"the function is sequential and returns the empty sequence."},errors:[]},{isDocumented:!0,arity:1,name:"encoding",qname:"resp:encoding",signature:"($encoding as xs:string) as empty-sequence()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function sets the output encoding that will be\n used for the payload of the response.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <tt>resp:encoding("ISO-8859-1")</tt> will cause the\n content in the response to be encoded using ISO-8859-1.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Please note that the encoding only applies to textual data.\n It is not used if the function <tt>decode-binary()</tt>\n was invoked passing true as parameter.</p>\n',summary:"<p>  The function sets the output encoding that will be\n used for the payload of the response.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"encoding",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the encoding to be used for the payload of the response.</div>'}],returns:{type:"empty-sequence()",description:"the function is sequential and returns the empty sequence"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:invalid-encoding if the given encoding is invalid or not supported.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"header",qname:"resp:header",signature:"($name as xs:string, $value as xs:string) as xs:string?",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Set a HTTP header in the response.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If a header with the same name was already set, the\n value is overwritten and the function returns the old value. As defined\n in the HTTP specification, multiple headers with the same name\n can be combined into one header whose value is a comma-separated\n list of the values.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The following headers must not be set using this function.\n Instead, other functions of this module should be used in order\n to implemented the required semantics:\n <ul>\n   <li>Status: use status() instead</li>\n   <li>Content-Type: use content-type() instead</li>\n </ul>\n </p>\n',summary:"<p>  Set a HTTP header in the response.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"name",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the name of the header to set</div>'},{name:"value",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the value of the header to set `</div>'}],returns:{type:"xs:string?",description:"the value of the header previously set or the empty sequence if no header has been set with the same name."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">resp:invalid-header-name if an invalid name is used for the header.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"message-for-status",qname:"resp:message-for-status",signature:"($status as xs:string) as xs:string",description:" Convert between the HTTP status code as string and\n the name/message of that status code.\n",summary:"<p> Convert between the HTTP status code as string and\n the name/message of that status code.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"status",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:string",description:"the message for the given name"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:invalid-status if the given name does not represent a valid http status code</xqdoc:error>']},{isDocumented:!0,arity:1,name:"redirect",qname:"resp:redirect",signature:"($url as xs:string) as empty-sequence()",description:" This function sets the HTTP 302 redirect status code in the response. As\n a result, a redirect to the URL given as parameter will be made.\n",summary:"<p> This function sets the HTTP 302 redirect status code in the response.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"url",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The URL to which the redirect will be made.</div>'}],returns:{type:"empty-sequence()",description:"The empty-sequence is returned."},errors:[]},{isDocumented:!0,arity:0,name:"serialization-parameters",qname:"resp:serialization-parameters",signature:"() as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the serialization parameters that are currently\n active, i.e. the ones that will be used to serialize the result\n of this request.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This will either be the default, the defaults set when\n calling resp:content-type(), or the ones set by\n resp:serialization-parameters().</p>\n',summary:"<p>  Returns the serialization parameters that are currently\n active, i.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"object()",description:"the said serialization parameters"},errors:[]},{isDocumented:!0,arity:1,name:"serialization-parameters",qname:"resp:serialization-parameters",signature:"($params as object()) as empty-sequence()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Set the serialization parameters used for serializing the result\n of the request.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The following example shows how to set several options\n for the JSON serialization method.\n <pre>\n {\n   "method" : "json",\n   "indent" : false,\n   "encoding" : "UTF-16"\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Please note that serialization options set by this function can\n be overwritten by a subsequent call to resp:content-type. In this\n case, the options will be reset to the default for the given\n content-type. Also note, that the output encoding can be overwritten\n by subsequently calling the resp:encoding function.</p>\n',summary:"<p>  Set the serialization parameters used for serializing the result\n of the request.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"params",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the serialization parameters that will be used to serialize the result of the request</div>'}],returns:{type:"empty-sequence()",description:"the function is sequential and, on success, returns the empty sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XQDY0027 if the input is not valid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:invalid-encoding if the encoding specified in the serialization options is invalid or not supported.</xqdoc:error>']},{isDocumented:!0,arity:0,name:"serializer-defaults-html",qname:"resp:serializer-defaults-html",signature:"() as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns an object that can be used to specify the\n settings of serialization parameters for the HTML serialization\n method.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The defaults are\n <pre>\n {\n   "encoding" : "UTF-8",\n   "indent" : true,\n   "method" : "html",\n   "version" : "4.01",\n   "doctype-system" : "http://www.w3.org/TR/html4/loose.dtd",\n   "doctype-public" : "-//W3C//DTD HTML 4.01 Transitional//EN"\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example, those defaults are used when setting\n the content-type to some HTML content-type (i.e. text/html).</p>\n',summary:"<p>  Returns an object that can be used to specify the\n settings of serialization parameters for the HTML serialization\n method.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"object()",description:"an object that can be used to specify the above serialization parameters."},errors:[]},{isDocumented:!0,arity:0,name:"serializer-defaults-json-xml-hybrid",qname:"resp:serializer-defaults-json-xml-hybrid",signature:"() as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns an object that can be used to specify the\n settings of serialization parameters for the json\n serialization method.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The defaults are\n <pre>\n {\n   "encoding" : "UTF-8",\n   "indent" : "yes",\n   "method" : "json"\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example, those defaults are used when setting\n the content-type to some XML content-type (e.g. application/atom+xml).</p>\n',summary:"<p>  Returns an object that can be used to specify the\n settings of serialization parameters for the json\n serialization method.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"object()",description:"an object that can be used to specify the above serialization parameters."},errors:[]},{isDocumented:!0,arity:0,name:"serializer-defaults-json",qname:"resp:serializer-defaults-json",signature:"() as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns an object that can be used to specify the\n settings of serialization parameters for the json-xml hybrid\n serialization method.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The defaults are\n <pre>\n {\n   "encoding" : "UTF-8",\n   "indent" : "yes",\n   "method" : "json"\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example, those defaults are used when setting\n the content-type to application/mixed-json-xml.</p>\n',summary:"<p>  Returns an object that can be used to specify the\n settings of serialization parameters for the json-xml hybrid\n serialization method.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"object()",description:"an object that can be used to specify the above serialization parameters."},errors:[]},{isDocumented:!0,arity:0,name:"serializer-defaults-text",qname:"resp:serializer-defaults-text",signature:"() as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns an object that can be used to specify the\n settings of serialization parameters for the text serialization\n method.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The only default used is\n <pre>\n {\n  "method" : "text",\n  "encoding" : "UTF-8",\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example, this default is used when setting\n the content-type to some text content-type (e.g. text/plain).</p>\n',summary:"<p>  Returns an object that can be used to specify the\n settings of serialization parameters for the text serialization\n method.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"object()",description:"an object that can be used to specify the above serialization parameters."},errors:[]},{isDocumented:!0,arity:0,name:"serializer-defaults-xhtml",qname:"resp:serializer-defaults-xhtml",signature:"() as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns an object that can be used to specify the\n settings of serialization parameters for the XHTML serialization\n method.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The defaults are\n <pre>\n {\n   "encoding" : "UTF-8",\n   "indent" : true,\n   "method" : "xhtml",\n   "omit-xml-declaration" : true,\n   "version" : "1.0",\n   "doctype-system" : "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd",\n   "doctype-public" : "-//W3C//DTD XHTML 1.0 Transitional//EN"\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example, those defaults are used when setting\n the content-type to some XHTML content-type (i.e. application/xhtml+xml).</p>\n',summary:"<p>  Returns an object that can be used to specify the\n settings of serialization parameters for the XHTML serialization\n method.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"object()",description:"an object that can be used to specify the above serialization parameters."},errors:[]},{isDocumented:!0,arity:0,name:"serializer-defaults-xml",qname:"resp:serializer-defaults-xml",signature:"() as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns an object that can be used to specify the\n settings of serialization parameters for the XML serialization\n method.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The defaults are\n <pre>\n {\n  "method" : "xml",\n  "encoding" : "UTF-8",\n  "indent" : true,\n  "omit-xml-declaration" : true,\n  "version" : "1.0"\n }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example, those defaults are used when setting\n the content-type to some XML content-type (e.g. application/atom+xml).</p>\n',summary:"<p>  Returns an object that can be used to specify the\n settings of serialization parameters for the XML serialization\n method.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"object()",description:"an object that can be used to specify the above serialization parameters."},errors:[]},{isDocumented:!0,arity:1,name:"status-code",qname:"resp:status-code",signature:"($status as xs:integer) as empty-sequence()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Sets the status code of the HTTP response to the integer given as\n parameter.</p>\n For example,\n <tt xmlns:xqdoc="http://www.xqdoc.org/1.0">resp:status(204)</tt>\n will result in "HTTP/1.1 204 No Content".\n',summary:"<p>  Sets the status code of the HTTP response to the integer given as\n parameter.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"status",type:"xs:integer",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The status code of the HTTP response as integer.</div>'}],returns:{type:"empty-sequence()",description:"On success, the empty-sequence is returned"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:invalid-status-code if the given integer does not reflect a valid HTTP status code</xqdoc:error>']},{isDocumented:!0,arity:1,name:"status",qname:"resp:status",signature:"($status as xs:string) as empty-sequence()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Sets the status code of the HTTP response to code associated\n with the given string.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For example,\n <tt>resp:status($http:no-content)</tt>\n will result in "HTTP/1.1 204 No Content".</p>\n',summary:"<p>  Sets the status code of the HTTP response to code associated\n with the given string.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"status",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The status code of the HTTP response as a string (e.g. $http:no-content)</div>'}],returns:{type:"empty-sequence()",description:"On success, the empty-sequence is returned"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:invalid-status if the given string does not represent a valid HTTP status code;</xqdoc:error>']},{isDocumented:!0,arity:1,name:"valid-status",qname:"resp:valid-status",signature:"($status as xs:string) as xs:boolean",description:" Test whether the given name refers to a valid HTTP status code.\n",summary:"<p> Test whether the given name refers to a valid HTTP status code.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"status",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:boolean",description:"true if the given name refers to a valid HTTP status code, false otherwise."},errors:[]}],variables:[{name:"http:precondition-required",type:"item()*",description:" A string representing the HTTP Status Code 428 Precondition Required (RFC 6585)\n"},{name:"http:gone",type:"item()*",description:" A string representing the HTTP Status Code 410 GONE\n"},{name:"http:length-required",type:"item()*",description:" A string representing the HTTP Status Code 411 Length Required\n"},{name:"http:precondition-failed",type:"item()*",description:" A string representing the HTTP Status Code 412 Precondition Failed\n"},{name:"http:request-entity-too-large",type:"item()*",description:" A string representing the HTTP Status Code 413 Request Entity Too Large\n"},{name:"http:request-entity-too-long",type:"item()*",description:" A string representing the HTTP Status Code 414 Request Entity Too Long\n"},{name:"http:unsupported-media-type",type:"item()*",description:" A string representing the HTTP Status Code 415 Unsupported Media Type\n"},{name:"http:request-range-not-satisfiable",type:"item()*",description:" A string representing the HTTP Status Code 416 Request Range Not Satisfiable\n"},{name:"http:expectation-failed",type:"item()*",description:" A string representing the HTTP Status Code 417 Expectation Failed\n"},{name:"http:im-a-teapot",type:"item()*",description:" A string representing the HTTP Status Code 418 I'm a teapot (RFC 2324)\n"},{name:"http:enhance-your-calm",type:"item()*",description:" A string representing the HTTP Status Code 420 Enhance Your Calm\n"},{name:"http:unprocessable-entity",type:"item()*",description:" A string representing the HTTP Status Code 422 Unprocessable Entity (WebDAV; RFC 4918)\n"},{name:"http:locked",type:"item()*",description:" A string representing the HTTP Status Code 423 Locked (WebDAV; RFC 4918)\n"},{name:"http:failed-dependency",type:"item()*",description:" A string representing the HTTP Status Code 424 Failed Dependency (WebDAV; RFC 4918)\n"},{name:"http:unordered-collection",type:"item()*",description:" A string representing the HTTP Status Code 425 Unordered Collection\n"},{name:"http:upgrade-required",type:"item()*",description:" A string representing the HTTP Status Code 426 Upgrade Required\n"},{name:"http:conflict",type:"item()*",description:" A string representing the HTTP Status Code 409 Conflict\n"},{name:"http:too-many-requests",type:"item()*",description:" A string representing the HTTP Status Code 429 Too Many Requests (RFC 6585)\n"},{name:"http:request-header-fields-too-large",type:"item()*",description:" A string representing the HTTP Status Code 431 Request Header Fields Too Large (RFC 6585)\n"},{name:"http:internal-server-error",type:"item()*",description:" A string representing the HTTP Status Code 500 Internal Server Error\n"},{name:"http:not-implemented",type:"item()*",description:" A string representing the HTTP Status Code 501 Not Implemented\n"},{name:"http:bad-gateway",type:"item()*",description:" A string representing the HTTP Status Code 502 Bad Gateway\n"},{name:"http:service-unavailable",type:"item()*",description:" A string representing the HTTP Status Code 503 Service Unavailable\n"},{name:"http:gateway-timeout",type:"item()*",description:" A string representing the HTTP Status Code 504 Gateway Timeout\n"},{name:"http:http-version-not-supported",type:"item()*",description:" A string representing the HTTP Status Code 505 HTTP Version Not Supported\n"},{name:"http:variant-also-negotiates",type:"item()*",description:" A string representing the HTTP Status Code 506 Variant Also Negotiates (RFC 2295)\n"},{name:"http:insufficient-storage",type:"item()*",description:" A string representing the HTTP Status Code 507 Insufficient Storage (WebDAV; RFC 4918)\n"},{name:"http:loop-detected",type:"item()*",description:" A string representing the HTTP status code 508 Loop Detected (webdav; rfc 5842)\n"},{name:"http:not-extended",type:"item()*",description:" A string representing the HTTP status code 510 Not Extended (RFC 2774)\n"},{name:"http:network-authentication-required",type:"item()*",description:" A string representing the HTTP status code 511 Network Authentication Required (RFC 6585)\n"},{name:"resp:status-info",type:"object()",description:" Variable containing a description for all the HTTP Status Codes\n"},{name:"http:see-other",type:"item()*",description:" A string representing the HTTP Status Code 303 See Other\n"},{name:"http:switching-protocols",type:"item()*",description:" A string representing the HTTP Status Code 101 Switching Protocols\n"},{name:"http:processing",type:"item()*",description:" A string representing the HTTP Status Code 102 Processing (Web; RFC 2518)\n"},{name:"http:ok",type:"item()*",description:" A string representing the HTTP Status Code 200 OK\n"},{name:"http:created",type:"item()*",description:" A string representing the HTTP Status Code 201 Created\n"},{name:"http:accepted",type:"item()*",description:" A string representing the HTTP Status Code 202 Accepted\n"},{name:"http:non-authoritative",type:"item()*",description:" A string representing the HTTP Status Code 203 Non-Authoritative\n"},{name:"http:no-content",type:"item()*",description:" A string representing the HTTP Status Code 204 No Content\n"},{name:"http:reset-content",type:"item()*",description:" A string representing the HTTP Status Code 205 Reset Content\n"},{name:"http:partial-content",type:"item()*",description:" A string representing the HTTP Status Code 206 Partial Content\n"},{name:"http:multi-status",type:"item()*",description:" A string representing the HTTP Status Code 207 Multi-Status (WebDAV; RFC 5842)\n"},{name:"http:already-reported",type:"item()*",description:" A string representing the HTTP Status Code 208 Already Reported (WebDAV; RFC 5842)\n"},{name:"http:im-used",type:"item()*",description:" A string representing the HTTP Status Code 226 IM Used (RFC 3229)\n"},{name:"http:multiple-choices",type:"item()*",description:" A string representing the HTTP Status Code 300 Multiple Choices\n"},{name:"http:moved-permanently",type:"item()*",description:" A string representing the HTTP Status Code 301 Moved Permantently\n"},{name:"http:found",type:"item()*",description:" A string representing the HTTP Status Code 302 Found\n"},{name:"http:continue",type:"item()*",description:" A string representing the HTTP Status Code 100 Continue\n"},{name:"http:not-modified",type:"item()*",description:" A string representing the HTTP Status Code 304 Not Modified\n"},{name:"http:use-proxy",type:"item()*",description:" A string representing the HTTP Status Code 305 Use Proxy\n"},{name:"http:switch-proxy",type:"item()*",description:" A string representing the HTTP Status Code 306 Switch Proxy\n"},{name:"http:temporary-redirect",type:"item()*",description:" A string representing the HTTP Status Code 307 Temporary Redirect\n"},{name:"http:permanent-redirect",type:"item()*",description:" A string representing the HTTP Status Code 308 Permanent Redirect (http://tools.ietf.org/html/draft-reschke-http-status-308-07)\n"},{name:"http:bad-request",type:"item()*",description:" A string representing the HTTP Status Code 400 Bad Request\n"},{name:"http:unauthorized",type:"item()*",description:" A string representing the HTTP Status Code 401 Unauthorized\n"},{name:"http:payment-required",type:"item()*",description:" A string representing the HTTP Status Code 402 Payment Required\n"},{name:"http:forbidden",type:"item()*",description:" A string representing the HTTP Status Code 403 Forbidden\n"},{name:"http:not-found",type:"item()*",description:" A string representing the HTTP Status Code 404 Not Found\n"},{name:"http:not-allowed",type:"item()*",description:" A string representing the HTTP Status Code 405 Not Allowed\n"},{name:"http:not-acceptable",type:"item()*",description:" A string representing the HTTP Status Code 406 Not Acceptable\n"},{name:"http:proxy-authentication-required",type:"item()*",description:" A string representing the HTTP Status Code 407 Proxy Authentication Required\n"},{name:"http:request-timeout",type:"item()*",description:" A string representing the HTTP Status Code 408 Request Timeout\n"}]},"http://www.zorba-xquery.com/modules/email/smtp":{ns:"http://www.zorba-xquery.com/modules/email/smtp",description:' This module can be used for sending emails.\n The SMTP module contains only one public function that receives two parameters.\n The SMTP server access information passed as an <code xmlns:xqdoc="http://www.xqdoc.org/1.0">hostInfo</code> element\n and the email message representation as a <code xmlns:xqdoc="http://www.xqdoc.org/1.0">message</code> element.\n For a quick start see the examples associates with the <code xmlns:xqdoc="http://www.xqdoc.org/1.0">send(...)</code>\n function. For a complete specification read, the description and the\n documentation associated with this function.\n',sees:['<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0"><a href="http://www.washington.edu/imap/">c-client Library part of UW IMAP toolkit</a></xqdoc:see>'],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Sorin Nasoi, Daniel Thomas</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://www.zorba-xquery.com/modules/email",prefix:"email"},{uri:"http://www.zorba-xquery.com/modules/email/smtp",prefix:"smtp"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:2,name:"send",qname:"smtp:send",signature:"($host-info as element(email:hostInfo), $message as element(email:message)) as empty-sequence()",description:' This function sends an email message from the specified account.\n The <code xmlns:xqdoc="http://www.xqdoc.org/1.0">hostName</code> child element of <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$host-info</code> must have the form:\n <code xmlns:xqdoc="http://www.xqdoc.org/1.0"><b>remote_system_name</b> [":" <b>port</b>] [<b>flags</b>]</code>. This syntax is part of the\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://www.washington.edu/imap/documentation/naming.txt.html" target="_blank">Remote names</a>\n syntax defined in the UW IMAP toolkit. The <code xmlns:xqdoc="http://www.xqdoc.org/1.0"><b>remote_system_name</b></code> and\n <code xmlns:xqdoc="http://www.xqdoc.org/1.0"><b>flags</b></code> fragments are explained in the section <code xmlns:xqdoc="http://www.xqdoc.org/1.0">III</code> of this document.\n For example the hostName could look like:\n <ul xmlns:xqdoc="http://www.xqdoc.org/1.0">\n   <li><code>&lt;hostName&gt;smtp.gmail.com:587/tls/novalidate-cert&lt;hostName&gt;</code></li>\n   <li><code>&lt;hostName&gt;[209.85.129.111]:587/tls/novalidate-cert&lt;hostName&gt;</code></li>\n </ul>\n The <code xmlns:xqdoc="http://www.xqdoc.org/1.0">$host-info</code> parameter could then look like this:\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static" ace-mode="xquery">\n &lt;hostInfo&gt;\n   &lt;hostName&gt;smtp.gmail.com:587/tls/novalidate-cert&lt;/hostName&gt;\n   &lt;userName&gt;username&lt;/userName&gt;\n   &lt;password&gt;password&lt;/password&gt;\n &lt;/hostInfo&gt;\n </pre>\n For a complete of the structure of an email message, see the imported email\n schema: <code xmlns:xqdoc="http://www.xqdoc.org/1.0">http://www.zorba-xquery.com/modules/email</code>\n All the data passed to this function does not need to be validated.\n The only requirement is that they have a valid format and are in the\n correct namespace according to the schema:\n <code xmlns:xqdoc="http://www.xqdoc.org/1.0">http://www.zorba-xquery.com/modules/email</code>.\n',summary:"<p> This function sends an email message from the specified account.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"host-info",type:"element(email:hostInfo)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The SMTP host, user name, and password.</div>'},{name:"message",type:"element(email:message)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The message to send as defined in the email XML schema.</div>'}],returns:{type:"empty-sequence()",description:"The function is declared as sequential and has side-effects. It returns the empty sequence."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">smtp:SMTP0001 The message format is invalid.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">smtp:SMTP0002 The message has no recipient.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">smtp:SMTP0003 The message could not be sent.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">smtp:SMTP9999 If any other error occurs.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XQDY0027 If the values of the arguments are not not valid according to the email schema: <code>http://www.zorba-xquery.com/modules/email</code></xqdoc:error>']}],variables:[]},"http://www.28msec.com/modules/project":{ns:"http://www.28msec.com/modules/project",description:" This module contains functions to introspect a project.\n",sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">28msec</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://zorba.io/modules/base64",prefix:"base64"},{uri:"http://zorba.io/modules/hmac",prefix:"hmac"},{uri:"http://www.28msec.com/modules/project",prefix:"project"},{uri:"http://zorba.io/modules/random",prefix:"random"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:0,name:"create-seed",qname:"project:create-seed",signature:"() as string",description:" Creates and return new random project seed.\n",summary:"<p> Creates and return new random project seed.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[],returns:{type:"string",description:"the project seed"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">project:SEED-EXISTS the project already has a seed file</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">project:SEED-FILE error writing the seed file</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">project:SEED the specified seed is not at least 8 characters long</xqdoc:error>']},{isDocumented:!0,arity:1,name:"create-seed",qname:"project:create-seed",signature:"($seed as string) as empty-sequence()",description:" Creates a new project seed.\n The specified seed must be at least 8 characters long.\n",summary:"<p> Creates a new project seed.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"seed",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The new project seed.</div>'}],returns:{type:"empty-sequence()",description:"the empty sequence"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">project:SEED-EXISTS the project already has a seed file</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">project:SEED-FILE error writing the seed file</xqdoc:error>']},{isDocumented:!0,arity:0,name:"has-seed",qname:"project:has-seed",signature:"() as boolean external",description:" Checks if the project has a seed file.\n",summary:"<p> Checks if the project has a seed file.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[],returns:{type:"boolean",description:"whether the project has a seed file or not"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">project:SEED-FILE error accessing the seed file</xqdoc:error>']},{isDocumented:!0,arity:0,name:"name",qname:"project:name",signature:"() as string external",description:" Returns the name of the project.\n",summary:"<p> Returns the name of the project.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"string",description:"the said name"},errors:[]},{isDocumented:!0,arity:0,name:"read-or-create-seed",qname:"project:read-or-create-seed",signature:"() as string",description:" Returns the project seed. If the project has no seed a new random one is created.\n",summary:"<p> Returns the project seed.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[],returns:{type:"string",description:"the project seed"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">project:SEED-FILE error reading or writing the seed file</xqdoc:error>']},{isDocumented:!0,arity:0,name:"scheduler-host",qname:"project:scheduler-host",signature:"() as string external",description:" Returns the host of the scheduler.\n",summary:"<p> Returns the host of the scheduler.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"string",description:"the scheduler host."},errors:[]},{isDocumented:!0,arity:0,name:"seed",qname:"project:seed",signature:"() as string external",description:" Returns the project seed.\n",summary:"<p> Returns the project seed.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[],returns:{type:"string",description:"the project seed"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">project:NO-SEED the project seed file cannot be found</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">project:SEED-FILE error reading the seed file</xqdoc:error>']},{isDocumented:!0,arity:0,name:"set-seed",qname:"project:set-seed",signature:"() as string",description:" Sets a new random project seed.\n",summary:"<p> Sets a new random project seed.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[],returns:{type:"string",description:"the project seed"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">project:SEED-FILE error reading or writing the seed file</xqdoc:error>']},{isDocumented:!0,arity:1,name:"set-seed",qname:"project:set-seed",signature:"($seed as string) as empty-sequence()",description:" Sets the project seed.\n The specified seed must be at least 8 characters long.\n",summary:"<p> Sets the project seed.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"seed",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The new project seed.</div>'}],returns:{type:"empty-sequence()",description:"the project seed"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">project:SEED-FILE error reading or writing the seed file</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">project:SEED the specified seed is not at least 8 characters long</xqdoc:error>']},{isDocumented:!0,arity:0,name:"token",qname:"project:token",signature:"() as xs:base64Binary",description:" Creates a new project token, that expires after 12 hours.\n",summary:"<p> Creates a new project token, that expires after 12 hours.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[],returns:{type:"xs:base64Binary",description:"the project token"},errors:[]},{isDocumented:!0,arity:1,name:"token",qname:"project:token",signature:"($expiration as xs:anyAtomicType) as xs:base64Binary",description:" Creates a new project token, that expires at the desired date.\n The input to the function contains the expiration information.\n If a duration is used, then the function will create a token expiring after the specified duration.\n If a dateTime is used, then the function will create a token expiring that date.\n If an integer is used, then the function will create a token expiring after the specified number of seconds.\n",summary:"<p> Creates a new project token, that expires at the desired date.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"expiration",type:"xs:anyAtomicType",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> describes the expiration date of the token.</div>'}],returns:{type:"xs:base64Binary",description:"the new project token"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">project:INVALID-PARAMETER expiration information is invalid (not a duration, date or number of seconds)</xqdoc:error>']}],variables:[]},"http://zorba.io/modules/http-client":{ns:"http://zorba.io/modules/http-client",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This module provides functions for performing HTTP requests.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">A simple GET request using the get#1 convenience function</p>\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static" ace-mode="xquery">\n import module namespace http="http://zorba.io/modules/http-client";\n http:get("http://www.example.com")\n </pre>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This example makes a GET request to example.com and returns the server\'s response\n as a JSON object.\n </p>\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static" ace-mode="java">\n {\n   "status" : 200,\n   "message" : "OK",\n   "headers" : {\n     "Content-Length" : "1270",\n     "Date" : "Tue, 11 Jun 2013 22:27:10 GMT",\n     ...\n   },\n   "body" : {\n     "media-type" : "text/html",\n     "content" : "..."\n   }\n }\n </pre>\n <h2 xmlns:xqdoc="http://www.xqdoc.org/1.0" id="standard_return">Response format</h2>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Most functions in this module (all except <a href="?anchor=options-1">options#1</a>)\n return a single JSON item, describing the server\'s response, as in the previous\n example.\n The server status (integer) and message (string) fields are always present.\n If the server replied sending one or more headers, they are reported\n in an optional headers object. Each header is represented as a single (string)\n field.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For non-multipart responses, as in the previous example, the response body,\n if any, is reported as a body object. This object contains both the (string)\n media-type returned by the server and its content.\n The type of the content field is determined by the media-type returned by the\n server. If the media-type indicates that the body content is textual,\n then the content has type string, base64Binary otherwise.\n Specifically, the body content is considered textual only if the MIME-type specified in\n the media-type is one of:\n <ul>\n   <li>"application/json"</li>\n   <li>"application/x-javascript"</li>\n   <li>"application/xml"</li>\n   <li>"application/xml-external-parsed-entity"</li>\n </ul>\n or if the MIME-type starts with "text/" or ends with "+xml".</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For multipart responses, multiple bodies are returned, as in the following example: </p>\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static" ace-mode="java">\n {\n   "status" : 200,\n   "message" : "OK",\n   "headers" : {\n     "Date" : "Tue, 11 Jun 2013 22:34:13 GMT",\n     ...\n   },\n   "multipart" : {\n     "boundary": "--AaB03x",\n     "parts": [\n       {\n         "headers" : {\n            "Content Disposition: file",\n            ...\n         },\n         "body": {\n           "media-type" : "image/gif",\n           "content" : "..."\n         }\n       },\n       {\n         "body" : {\n           "media-type" : "text/html",\n           "content" : "..."\n         }\n       }\n    ]\n }\n </pre>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The multipart field contains both the boundary used to separate parts\n and an array containing all parts. Each part contains its specific headers,\n if any, and the corresponding body.</p>\n <h2 xmlns:xqdoc="http://www.xqdoc.org/1.0" id="nondeterministic_warning">Important Notice Regarding Nondeterministic Functions</h2>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n The following functions in this module -\n <a href="?anchor=get-1">get#1</a>,\n <a href="?anchor=get-text-1">get-text#1</a>,\n <a href="?anchor=get-binary-1">get-binary#1</a>,\n <a href="?anchor=send-nondeterministic-request-1">send-nondeterministic-request-1</a>,\n <a href="?anchor=head-1">head#1</a>, and\n <a href="?anchor=options-1">options#1</a>\n are declared to be <i>nondeterministic</i>, which means that their results\n will not be cached.\n However, they are <b>not</b> declared to be\n <i>sequential</i>, which means that they may be re-ordered during query optimization.\n According to the HTTP RFC, GET, HEAD an OPTIONS requests should not have any side-effects.\n However, in practice it is not uncommon, especially for GET requests, to have side-effects.\n If your application depends on the ordering of side-effects from requests issued through\n these functions, you should either use the <a href="?anchor=send-request-1">send-request()</a>\n function (which is declared <i>sequential</i>), or alternatively\n wrap each call to get() in your own sequential function, to ensure\n that the requests are not reordered.\n Conversely, if you want their results to be cached you can use the\n <a href="?anchor=send-deterministic-request-3">send-deterministic-request()</a>\n function (which is declared <i>deterministic</i>).\n </p>\n <h2 xmlns:xqdoc="http://www.xqdoc.org/1.0" id="url_string">$href Arguments to Functions</h2>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Several functions in this module accept a URL argument named $href. In\n all cases, the value passed to $href must be a valid anyURI.\n However, all functions declare $href to be of type string. This\n is for convenience, since you can pass a string literal value (that\n is, a URL in double-quotes spelled out explicitly in your query)\n to an string parameter.</p>\n <h2 xmlns:xqdoc="http://www.xqdoc.org/1.0" id="expath_relation">Relation to the EXPath http-client module</h2>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"><a href="http://expath.org/">EXPath</a> defines its own http-client\n module, which is available separately.\n There are two primary differences between EXPath\'s http-client and\n this module:\n <ol>\n   <li>EXPath does not include the simpler get(), post(), put(), delete(),\n head(), options() and patch() functions defined by this module.</li>\n <li>EXPath uses XML to represent request for its send-request() function,\n whereas this module uses JSON.</li>\n <li>EXPath specifies that all XML content returned by an HTTP server\n will be parsed and returned as an XML document, whereas all HTML content\n will be <i>tidied up</i> into valid XML, and then parsed into an element.\n This module returns any textual content as string and any binary content\n as base6Binary.</li>\n <li>EXPath accepts XML nodes as body in the send-request() function and\n automatically serializes them into a string. The send-request() function\n defined in this module only allows string, base64Binary, and hexBinary\n as body types.\n </li>\n </ol>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n See <a href="http://www.expath.org/spec/http-client">the full spec\n of the EXPath http-client module</a> for more information.\n </p>\n',sees:['<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0"><a href="http://www.w3.org/TR/xquery-11/#FunctionDeclns">XQuery 1.1: Function Declaration</a></xqdoc:see>'],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Federico Cavalieri</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://www.w3.org/2005/xqt-errors",prefix:"err"},{uri:"http://zorba.io/modules/http-client",prefix:"http"},{uri:"http://jsoniq.org/function-library",prefix:"libjn"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"delete",qname:"http:delete",signature:"($href as string) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This function makes an HTTP DELETE request to a given URL.\n </p>\n',summary:"<p>  \n This function makes an HTTP DELETE request to a given URL.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"href",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The URL to which the request will be made (see <a href="#url_string">note</a> above).</div>'}],returns:{type:"object()",description:'<a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#standard_return">standard http-client return type</a>.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:HTTP An HTTP error occurred.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:REQUEST The specified request is not valid.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:TIMEOUT A timeout occurred waiting for the response.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"get-binary",qname:"http:get-binary",signature:"($href as string) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This function makes a GET request on a given URL. All returned bodies\n are forced to be interpreted as binary data, and will be returned\n as base64Binary items.\n </p>\n',summary:"<p>  \n This function makes a GET request on a given URL.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"href",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The URL to which the request will be made (see <a href="#url_string">note</a> above).</div>'}],returns:{type:"object()",description:'<a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#standard_return">standard http-client return type</a>.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:HTTP An HTTP error occurred.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:REQUEST The specified href is not valid.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:TIMEOUT A timeout occurred waiting for the response.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"get-text",qname:"http:get-text",signature:"($href as string) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This function makes a GET request to a given URL. All returned bodies\n are forced to be interpreted as textual, with a UTF-8 charset and will\n be returned as string items.\n </p>\n',summary:"<p>  \n This function makes a GET request to a given URL.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"href",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The URL to which the request will be made (see <a href="#url_string">note</a> above).</div>'}],returns:{type:"object()",description:'<a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#standard_return">standard http-client return type</a>.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:HTTP An HTTP error occurred.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:REQUEST The specified href is not valid.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:TIMEOUT A timeout occurred waiting for the response.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"get",qname:"http:get",signature:"($href as string) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This function makes a GET request to a given URL.\n </p>\n',summary:"<p>  \n This function makes a GET request to a given URL.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"href",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The URL to which the request will be made (see <a href="#url_string">note</a> above).</div>'}],returns:{type:"object()",description:'<a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#standard_return">standard http-client return type</a>.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:HTTP An HTTP error occurred.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:REQUEST The specified href is not valid.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:TIMEOUT A timeout occurred waiting for the response.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"head",qname:"http:head",signature:"($href as string) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This function makes an HTTP HEAD request on a given URL.\n </p>\n',summary:"<p>  \n This function makes an HTTP HEAD request on a given URL.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"href",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The URL to which the request will be made (see <a href="#url_string">note</a> above).</div>'}],returns:{type:"object()",description:'<a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#standard_return">standard http-client return type</a>.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:HTTP An HTTP error occurred.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:REQUEST The specified href is not valid.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:TIMEOUT A timeout occurred waiting for the response.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"options",qname:"http:options",signature:"($href as string) as string*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This function makes an HTTP OPTIONS request, which asks the server\n which operations it supports.\n </p>\n',summary:"<p>  \n This function makes an HTTP OPTIONS request, which asks the server\n which operations it supports.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"href",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The URL to which the request will be made (see <a href="#url_string">note</a> above).</div>'}],returns:{type:"string*",description:"A sequence of string values of the allowed operations."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:HTTP An HTTP error occurred.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:REQUEST The specified href is not valid.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:TIMEOUT A timeout occurred waiting for the response.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"patch",qname:"http:patch",signature:"($href as string, $body as atomic) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This function makes an HTTP PATCH request to a given URL.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n The body passed to this function must be either a string, a base64Binary or\n an hexBinary.\n If it is a string, the Content-Type sent to the server will be "text/plain",\n "application/octet-stream" otherwise.\n </p>\n',summary:"<p>  \n This function makes an HTTP PATCH request to a given URL.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"href",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The URL to which the request will be made (see <a href="#url_string">note</a> above).</div>'},{name:"body",type:"atomic",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The body which will be sent to the server.</div>'}],returns:{type:"object()",description:'<a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#standard_return">standard http-client return type</a>.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:HTTP An HTTP error occurred.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:REQUEST The specified request is not valid.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:TIMEOUT A timeout occurred waiting for the response.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"patch",qname:"http:patch",signature:"($href as string, $body as atomic, $content-type as string) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This function makes an HTTP PATCH request to a given URL.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n The body passed to this function must be either a string, a base64Binary, or\n an hexBinary.\n In any case, Content-Type of the request sent to the server will\n be $content-type.\n </p>\n',summary:"<p>  \n This function makes an HTTP PATCH request to a given URL.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"href",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The URL to which the request will be made (see <a href="#url_string">note</a> above).</div>'},{name:"body",type:"atomic",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The body which will be sent to the server.</div>'},{name:"content-type",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The content type of $body to send to the server.</div>'}],returns:{type:"object()",description:'<a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#standard_return">standard http-client return type</a>.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:HTTP An HTTP error occurred.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:REQUEST The specified request is not valid.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:TIMEOUT A timeout occurred waiting for the response.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:CHARSET The specified charset is unsupported.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"post",qname:"http:post",signature:"($href as string, $body as atomic) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This function makes an HTTP POST request to a given URL.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n The body passed to this function must be either a string, a base64Binary, or an\n hexBinary.\n If it is a string, the Content-Type sent to the server will be "text/plain",\n "application/octet-stream" otherwise.\n </p>\n',summary:"<p>  \n This function makes an HTTP POST request to a given URL.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"href",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The URL to which the request will be made (see <a href="#url_string">note</a> above).</div>'},{name:"body",type:"atomic",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The body which will be sent to the server.</div>'}],returns:{type:"object()",description:'<a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#standard_return">standard http-client return type</a>.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:HTTP An HTTP error occurred.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:REQUEST The specified request is not valid.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:TIMEOUT A timeout occurred waiting for the response.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"post",qname:"http:post",signature:"($href as string, $body as atomic, $content-type as string) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This function makes an HTTP POST request to a given URL.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n The body passed to this function must be either a string, a base64Binary,\n or an hexBinary.\n In any case, Content-Type of the request sent to the server will\n be $content-type.\n </p>\n',summary:"<p>  \n This function makes an HTTP POST request to a given URL.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"href",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The URL to which the request will be made (see <a href="#url_string">note</a> above).</div>'},{name:"body",type:"atomic",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The body which will be sent to the server</div>'},{name:"content-type",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The content type of the body as described above.</div>'}],returns:{type:"object()",description:'<a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#standard_return">standard http-client return type</a>.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:HTTP An HTTP error occurred.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:REQUEST The specified request is not valid.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:TIMEOUT A timeout occurred waiting for the response.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:CHARSET The specified charset is unsupported.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"put",qname:"http:put",signature:"($href as string, $body as atomic) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This function makes an HTTP PUT request to a given URL.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n The body passed to this function must be either a string, a base64Binary or\n an hexBinary.\n If it is a string, the Content-Type sent to the server will be "text/plain",\n "application/octet-stream" otherwise.\n </p>\n',summary:"<p>  \n This function makes an HTTP PUT request to a given URL.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"href",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The URL to which the request will be made (see <a href="#url_string">note</a> above).</div>'},{name:"body",type:"atomic",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The body which will be sent to the server.</div>'}],returns:{type:"object()",description:'<a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#standard_return">standard http-client return type</a>.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:HTTP An HTTP error occurred.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:REQUEST The specified request is not valid.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:TIMEOUT A timeout occurred waiting for the response.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"put",qname:"http:put",signature:"($href as string, $body as atomic, $content-type as string) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This function makes an HTTP PUT request to a given URL.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n The body passed to this function must be either a string, a base64Binary, or\n an hexBinary.\n In any case, Content-Type of the request sent to the server will\n be $content-type.\n </p>\n',summary:"<p>  \n This function makes an HTTP PUT request to a given URL.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"href",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The URL to which the request will be made (see <a href="#url_string">note</a> above).</div>'},{name:"body",type:"atomic",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The body which will be sent to the server.</div>'},{name:"content-type",type:"string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The content type of $body to send to the server.</div>'}],returns:{type:"object()",description:'<a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#standard_return">standard http-client return type</a>.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:HTTP An HTTP error occurred.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:REQUEST The specified request is not valid.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:TIMEOUT A timeout occurred waiting for the response.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:CHARSET The specified charset is unsupported.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"send-deterministic-request",qname:"http:send-deterministic-request",signature:"($request as object()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This function sends an HTTP request and returns the corresponding response.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This function has the same semantics as <a href="#send-request-1">send-request-1</a>,\n but is declared as deterministic and thus should only be used when\n the request has no side-effects and behaves deterministic as required by the\n application.\n </p>\n',summary:"<p>  \n This function sends an HTTP request and returns the corresponding response.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"request",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> see request parameter of <a href="#send-request-1">send-request#1</a></div>'}],returns:{type:"object()",description:'<a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#standard_return">standard http-client return type</a>.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:HTTP An HTTP error occurred.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:REQUEST The specified request is not valid.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:TIMEOUT A timeout occurred waiting for the response.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:FOLLOW Cannot follow a redirect of a POST, PUT, or DELETE request.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:CHARSET The specified charset is unsupported.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"send-nondeterministic-request",qname:"http:send-nondeterministic-request",signature:"($request as object()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This function sends an HTTP request and returns the corresponding response.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This function has the same semantics as <a href="#send-request-1">send-request-1</a>,\n but is declared as being non deterministic and thus should only be used when\n the request has no side-effects.\n </p>\n',summary:"<p>  \n This function sends an HTTP request and returns the corresponding response.</p>",annotation_str:" %an:nondeterministic",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"nondeterministic",value:""}],updating:!1,parameters:[{name:"request",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> see request parameter of <a href="#send-request-1">send-request#1</a></div>'}],returns:{type:"object()",description:'<a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#standard_return">standard http-client return type</a>.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:HTTP An HTTP error occurred.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:REQUEST The specified request is not valid.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:TIMEOUT A timeout occurred waiting for the response.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:FOLLOW Cannot follow a redirect of a POST, PUT, or DELETE request.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:CHARSET The specified charset is unsupported.</xqdoc:error>']},{isDocumented:!0,arity:1,name:"send-request",qname:"http:send-request",signature:"($request as object()) as object()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This function sends an HTTP request and returns the corresponding response.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This function is declared as sequential and should be used whenever the\n request may have side-effects.\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n The request parameters are specified in the $request JSON object, which\n has the following minimal structure:\n <pre class="ace-static" ace-mode="java">\n   {\n     "href": "http://www.example.com"\n   }\n </pre>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This object specifies a GET request of the URI "http://www.example.com"</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Additional optional parameters can be specified when issuing a request,\n using the following structure:</p>\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static" ace-mode="java">\n  {\n    "method": "POST",\n    "href": "http://www.example.com",\n    "authentication":\n    {\n      "username" : "user",\n      "password" : "pass",\n      "auth-method" : "Basic"\n    },\n    "options":\n    {\n      "status-only": true,\n      "override-media-type": "text/plain",\n      "follow-redirect": false,\n      "timeout": 30,\n      "user-agent": "Mozilla/5.0",\n      "retry":\n      {\n        "delay": [1000, 2000, 5000],\n        "on-connection-error": false,\n        "on-statuses": [500, 501]\n      }\n    },\n    "headers":\n    {\n      "name": "value",\n      ...\n    },\n    "body":\n    {\n      "media-type": "text/plain",\n      "content": "..."\n    }\n  }\n</pre>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n The method field (string) defines the HTTP verb to use in the HTTP request (i.e., GET, HEAD, OPTIONS,\n POST, PUT, DELETE). If not specified GET will be used.\n The authentication field can be used to specify the credentials and authentication method\n used when issuing a request (e.g, Basic). If the authentication field is specified, all its (string)\n subfields must be specified. If an authentication object is provided, it overrides any\n Authorization header specified in the request.\n Additionally, the following options can be specified:\n <ul>\n    <li>status-only. If true, the response body contents are omitted from the response object.</li>\n    <li>override-media-type. Is a MIME type that will override the Content-Type header returned\n        by the server. It affects the type of the result body content.</li>\n    <li>follow-redirect. Control whether an http redirect is automatically followed or not. If\n        it is false, the http redirect is returned as the response. If it is\n        true (the default) the function tries to follow the redirect, by\n        sending the same request to the new address (including body, headers,\n         and authentication credentials.) Maximum one redirect is followed\n        (there is no attempt to follow a redirect in response to following a\n          first redirect).</li>\n    <li>timeout. Is the maximum number of seconds to wait for the server to respond.\n         If no response is received withing this time duration, an error is thrown.</li>\n    <li>user-agent. The user agent sent to the server when issuing the request.\n        If not specified libcurl-agent/1.0 is used.</li>\n    <li>retry. The request will be automatically retried in case of connection error\n        following mandatory suboptions:\n        <ul>\n            <li>delay: an array specifying the milliseconds of wait before each retry.</li>\n            <li>on-connection-error: whether to retry the request if a connection to the\n                server cannot be estabilished</li>\n            <li>on-statuses: an array containing the statuses which will trigger a retry</li>\n        </ul></li>\n </ul>\n </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">One or more headers can be sent to the server, specifying them in an optional headers object.\n Each header is represented as a single (string) field. These headers are overridden if the corresponding\n option/authentication has been specified in the request.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For non-multipart request a body object can be specified.\n This object must contain both the desired (string) media-type and its content.\n The type of the content field must be either string, base64Binary, or hexBinary. </p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">For multipart requests, multipart object can be specified in place of the body object.\n The multipart object has the following structure: </p>\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static" ace-mode="java">\n  "multipart" : {\n    "boundary": "--AaB03x",\n    "parts": [\n      {\n        "headers" : {\n           "Content Disposition: file",\n           ...\n        },\n        "body": {\n          "media-type" : "image/gif",\n          "content" : "..."\n        }\n      },\n      {\n        "body" : {\n          "media-type" : "text/html",\n          "content" : "..."\n        }\n      }\n   ]\n }\n </pre>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The multipart field contains an optional (string) field which specifies\n the boundary used to separate each part and an array containing all parts.\n Each part contains its specific headers, if any, and the corresponding body.\n </p>\n',summary:"<p>  \n This function sends an HTTP request and returns the corresponding response.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[{name:"request",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a JSON http-client request object</div>'}],returns:{type:"object()",description:'<a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="#standard_return">standard http-client return type</a>.'},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:HTTP An HTTP error occurred.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:REQUEST The specified request is not valid.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:TIMEOUT A timeout occurred waiting for the response.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:FOLLOW Cannot follow a redirect of a POST, PUT, or DELETE request.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">http:CHARSET The specified charset is unsupported.</xqdoc:error>']}],variables:[]},"http://zorba.io/modules/data-cleaning/consolidation":{ns:"http://zorba.io/modules/data-cleaning/consolidation",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This library module provides data consolidation functions that generally take as input a sequence of XML nodes\n and apply some rule in order do decide which node is better suited to represent the entire sequence.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The logic contained in this module is not specific to any particular XQuery implementation,\n although the consolidation functions based on matching sequences against XPath expressions require\n some form of dynamic evaluation for XPath expressions.</p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Bruno Martins</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/modules/data-cleaning/consolidation",prefix:"con"},{uri:"http://zorba.io/modules/data-cleaning/set-similarity",prefix:"set"},{uri:"http://zorba.io/modules/data-cleaning/character-based-string-similarity",prefix:"simc"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:2,name:"all-xpaths",qname:"con:all-xpaths",signature:"($s as element(*)*, $paths as xs:string*) as element(*)*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the elements from an input sequence of elements that, when matched to a given set of XPath expressions,\n produce a non-empty set of nodes in all the cases.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery"> all-xpaths( ( &lt;a&gt;&lt;b/&gt;&lt;/a&gt;, &lt;c&gt;&lt;d/&gt;&lt;/c&gt;, &lt;d/&gt;), (".//b") ) </pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery"> (&lt;a&gt;&lt;b/&gt;&lt;/a&gt;) </pre></p>\n',summary:"<p>  Returns the elements from an input sequence of elements that, when matched to a given set of XPath expressions,\n produce a non-empty set of nodes in all the cases.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s",type:"element(*)",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A sequence of elements.</div>'},{name:"paths",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A sequence of strings denoting XPath expressions.</div>'}],returns:{type:"element(*)*",description:"The elements that, when matched to the given set of XPath expressions, always return a non-empty set of nodes."},errors:[]},{isDocumented:!0,arity:1,name:"least-attributes",qname:"con:least-attributes",signature:"($s) as element(*)",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the single node having the smallest number of descending attributes (attributes at any given depth)\n in a sequence of nodes provided as input.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If more then one answer is possible, return the first node according to the order of the input sequence.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery">least-attributes( ( &lt;a att1="a1" att2="a2"/&gt;, &lt;b att1="a1" /&gt;, &lt;c/&gt; ) )</pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery">(&lt;c/&gt;)</pre></p>\n',summary:"<p>  Returns the single node having the smallest number of descending attributes (attributes at any given depth)\n in a sequence of nodes provided as input.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A sequence of nodes.</div>'}],returns:{type:"element(*)",description:"The node having the smallest number of descending attributes in the input sequence."},errors:[]},{isDocumented:!0,arity:1,name:"least-distinct-attributes",qname:"con:least-distinct-attributes",signature:"($s) as element(*)",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the single node having the smallest number of distinct descending attributes (attributes at any\n given depth) in a sequence of nodes provided as input.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If more then one answer is possible, return the first node according to the order of the input sequence.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery"> least-distinct-attributes( ( &lt;a att1="a1" att2="a2"/&gt;, &lt;b att1="a1" /&gt;, &lt;c/&gt; ) ) </pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery"> (&lt;c/&gt;) </pre></p>\n',summary:"<p>  Returns the single node having the smallest number of distinct descending attributes (attributes at any\n given depth) in a sequence of nodes provided as input.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A sequence of nodes.</div>'}],returns:{type:"element(*)",description:"The node having the smallest number of distinct descending attributes in the input sequence."},errors:[]},{isDocumented:!0,arity:1,name:"least-distinct-elements",qname:"con:least-distinct-elements",signature:"($s) as element(*)",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the single node having the smallest number of distinct descending elements (sub-elements at any\n given depth) in a sequence of nodes provided as input.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If more then one answer is possible, return the first node according to the order of the input sequence.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery"> least-distinct-elements( ( &lt;a&gt;&lt;b/&gt;&lt;/a&gt;, &lt;b&gt;&lt;c/&gt;&lt;/b&gt;, &lt;d/&gt;) ) </pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery"> (&lt;d/&gt;) </pre></p>\n',summary:"<p>  Returns the single node having the smallest number of distinct descending elements (sub-elements at any\n given depth) in a sequence of nodes provided as input.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A sequence of nodes.</div>'}],returns:{type:"element(*)",description:"The node having the smallest number of distinct descending elements in the input sequence."},errors:[]},{isDocumented:!0,arity:1,name:"least-distinct-nodes",qname:"con:least-distinct-nodes",signature:"($s) as element(*)",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the single node having the smallest number of distinct descending nodes (sub-nodes at any given depth)\n in a sequence of nodes provided as input.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If more then one answer is possible, return the first node according to the order of the input sequence.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery"> least-distinct-nodes( ( &lt;a&gt;&lt;b/&gt;&lt;/a&gt;, &lt;b&gt;&lt;c/&gt;&lt;/b&gt;, &lt;d/&gt;) ) </pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery"> (&lt;d/&gt;) </pre></p>\n',summary:"<p>  Returns the single node having the smallest number of distinct descending nodes (sub-nodes at any given depth)\n in a sequence of nodes provided as input.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A sequence of nodes.</div>'}],returns:{type:"element(*)",description:"The node having the smallest number of distinct descending nodes in the input sequence."},errors:[]},{isDocumented:!0,arity:1,name:"least-elements",qname:"con:least-elements",signature:"($s) as element(*)",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the single node having the smallest number of descending elements (sub-elements at any given depth)\n in a sequence of nodes provided as input.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If more then one answer is possible, return the first node according to the order of the input sequence.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery">least-elements( ( &lt;a&gt;&lt;b/&gt;&lt;/a&gt;, &lt;b&gt;&lt;c/&gt;&lt;/b&gt;, &lt;d/&gt;) )</pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery">(&lt;d/&gt;)</pre></p>\n',summary:"<p>  Returns the single node having the smallest number of descending elements (sub-elements at any given depth)\n in a sequence of nodes provided as input.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A sequence of nodes.</div>'}],returns:{type:"element(*)",description:"The node having the smallest number of descending elements in the input sequence."},errors:[]},{isDocumented:!0,arity:1,name:"least-frequent",qname:"con:least-frequent",signature:"($s) as item()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the single less frequent node in a sequence of nodes provided as input.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If more then one answer is possible, return the first node according to the order of the input sequence.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery">least-frequent( ( "a", "a", "b") )</pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery">("b")</pre></p>\n',summary:"<p>  Returns the single less frequent node in a sequence of nodes provided as input.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A sequence of nodes.</div>'}],returns:{type:"item()",description:"The least frequent node in the input sequence."},errors:[]},{isDocumented:!0,arity:1,name:"least-nodes",qname:"con:least-nodes",signature:"($s) as element(*)",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the single node having the smallest number of descending nodes (sub-nodes at any given depth)\n in a sequence of nodes provided as input.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If more then one answer is possible, return the first node according to the order of the input sequence.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery">least-nodes( ( &lt;a&gt;&lt;b/&gt;&lt;/a&gt;, &lt;b&gt;&lt;c/&gt;&lt;/b&gt;, &lt;d/&gt;) )</pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery">(&lt;d/&gt;)</pre></p>\n',summary:"<p>  Returns the single node having the smallest number of descending nodes (sub-nodes at any given depth)\n in a sequence of nodes provided as input.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A sequence of nodes.</div>'}],returns:{type:"element(*)",description:"The node having the smallest number of descending nodes in the input sequence."},errors:[]},{isDocumented:!0,arity:2,name:"least-similar-edit-distance",qname:"con:least-similar-edit-distance",signature:"($s as xs:string*, $m as xs:string) as xs:string?",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the single least similar string, in terms of the edit distance metric towards an input string,\n in a sequence of strings provided as input. If more than one string has a minimum similarity (a maximum\n value for the edit distance metric), return the first string according to the order of the input sequence.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery">least-similar-edit-distance( ( "aaabbbccc", "aaabbb", "eeefff" ), "aaab" )</pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery">( "eeefff" )</pre></p>\n',summary:"<p>  Returns the single least similar string, in terms of the edit distance metric towards an input string,\n in a sequence of strings provided as input.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A sequence of strings.</div>'},{name:"m",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The string towards which we want to measure the edit distance.</div>'}],returns:{type:"xs:string?",description:"The least similar string in the input sequence."},errors:[]},{isDocumented:!0,arity:2,name:"least-tokens",qname:"con:least-tokens",signature:"($s as xs:string*, $r as xs:string) as xs:string?",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the single shortest string, in terms of the number of tokens, in a sequence of strings provided as input.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If more then one answer is possible, return the first string according to the order of the input sequence.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery">least-tokens( ( "a b c", "a b", "a"), " +" )</pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery">("a")</pre></p>\n',summary:"<p>  Returns the single shortest string, in terms of the number of tokens, in a sequence of strings provided as input.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A sequence of strings.</div>'},{name:"r",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A regular expression forming the delimiter character(s) which mark the boundaries between adjacent tokens.</div>'}],returns:{type:"xs:string?",description:"The shortest string in the input sequence, in terms of the number of tokens."},errors:[]},{isDocumented:!0,arity:2,name:"least-xpaths",qname:"con:least-xpaths",signature:"($s as element(*)*, $paths as xs:string*) as element(*)*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the single element from an input sequence of elements that matches the smallest number of\n XPath expressions from a given set, producing a non-empty set of nodes.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If more then one answer is possible, return the first element according to the order of the input sequence.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery"> least-xpaths( ( &lt;a&gt;&lt;b/&gt;&lt;/a&gt;, &lt;d&gt;&lt;c/&gt;&lt;b/&gt;&lt;/d&gt;, &lt;d/&gt;) , (".//b", ".//c") ) </pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery"> ( $lt;d/&gt; ) </pre></p>\n',summary:"<p>  Returns the single element from an input sequence of elements that matches the smallest number of\n XPath expressions from a given set, producing a non-empty set of nodes.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s",type:"element(*)",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A sequence of elements.</div>'},{name:"paths",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A sequence of strings denoting XPath expressions.</div>'}],returns:{type:"element(*)*",description:"The element that matches the smallest number of XPath expressions producing a non-empty set of nodes."},errors:[]},{isDocumented:!0,arity:1,name:"longest",qname:"con:longest",signature:"($s as xs:string*) as xs:string?",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the single longest string, in terms of the number of characters, in a sequence of strings provided as input.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If more then one answer is possible, return the first string according to the order of the input sequence.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery">con:longest( ( "a", "aa", "aaa") )</pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery">("aaa")</pre></p>\n',summary:"<p>  Returns the single longest string, in terms of the number of characters, in a sequence of strings provided as input.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A sequence of strings.</div>'}],returns:{type:"xs:string?",description:"The longest string in the input sequence."},errors:[]},{isDocumented:!0,arity:2,name:"matching",qname:"con:matching",signature:"($s as xs:string*, $r as xs:string) as xs:string*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the strings from an input sequence of strings that match a particular regular expression.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery">matching( ( "a A b", "c AAA d", "e BB f"), "A+" )</pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery">( "a A b", "c AAA d")</pre></p>\n',summary:"<p>  Returns the strings from an input sequence of strings that match a particular regular expression.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A sequence of strings.</div>'},{name:"r",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The regular expression to be used in the matching.</div>'}],returns:{type:"xs:string*",description:"The strings in the input sequence that match the input regular expression."},errors:[]},{isDocumented:!0,arity:1,name:"most-attributes",qname:"con:most-attributes",signature:"($s) as element(*)",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the single node having the largest number of descending attributes (attributes at any given depth)\n in a sequence of nodes provided as input.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If more then one answer is possible, return the first node according to the order of the input sequence.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery">most-attributes( ( &lt;a att1="a1" att2="a2"/&gt;, &lt;b att1="a1" /&gt;, &lt;c/&gt; ) )</pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery">(&lt;a att1="a1" att2="a2"/&gt;)</pre></p>\n',summary:"<p>  Returns the single node having the largest number of descending attributes (attributes at any given depth)\n in a sequence of nodes provided as input.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A sequence of nodes.</div>'}],returns:{type:"element(*)",description:"The node having the largest number of descending attributes in the input sequence."},errors:[]},{isDocumented:!0,arity:1,name:"most-distinct-attributes",qname:"con:most-distinct-attributes",signature:"($s) as element(*)",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the single node having the largest number of distinct descending attributes (attributes at any\n given depth) in a sequence of nodes provided as input.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If more then one answer is possible, return the first node according to the order of the input sequence.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery">most-distinct-attributes( ( &lt;a att1="a1" att2="a2" att3="a3"/&gt;, &lt;a att1="a1" att2="a2"&gt;&lt;b att2="a2" /&gt;&lt;/a&gt;, &lt;c/&gt; ) )</pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery">(&lt;a att1="a1" att2="a2" att3="a3"/&gt;)</pre></p>\n',summary:"<p>  Returns the single node having the largest number of distinct descending attributes (attributes at any\n given depth) in a sequence of nodes provided as input.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A sequence of nodes.</div>'}],returns:{type:"element(*)",description:"The node having the largest number of distinct descending attributes in the input sequence."},errors:[]},{isDocumented:!0,arity:1,name:"most-distinct-elements",qname:"con:most-distinct-elements",signature:"($s) as element(*)",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the single node having the largest number of distinct descending elements (sub-elements at any\n given depth) in a sequence of nodes provided as input.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If more then one answer is possible, return the first node according to the order of the input sequence.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery">most-distinct-elements( ( &lt;a&gt;&lt;b/&gt;&lt;c/&gt;&lt;d/&gt;&lt;/a&gt;, &lt;a&gt;&lt;b/&gt;&lt;b/&gt;&lt;c/&gt;&lt;/a&gt;, &lt;a/&gt; ) )</pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery">(&lt;a&gt;&lt;b/&gt;&lt;c/&gt;&lt;d/&gt;&lt;/a&gt;)</pre></p>\n',summary:"<p>  Returns the single node having the largest number of distinct descending elements (sub-elements at any\n given depth) in a sequence of nodes provided as input.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A sequence of nodes.</div>'}],returns:{type:"element(*)",description:"The node having the largest number of distinct descending elements in the input sequence."},errors:[]},{isDocumented:!0,arity:1,name:"most-distinct-nodes",qname:"con:most-distinct-nodes",signature:"($s) as element(*)",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the single node having the largest number of distinct descending nodes (sub-nodes at any given depth) in\n a sequence of nodes provided as input.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If more then one answer is possible, return the first node according to the order of the input sequence.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery">most-distinct-nodes( ( &lt;a&gt;&lt;b/&gt;&lt;/a&gt;, &lt;a&gt;&lt;a/&gt;&lt;/a&gt;, &lt;b/&gt;) )</pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery">(&lt;a&gt;&lt;b/&gt;&lt;/a&gt;)</pre></p>\n',summary:"<p>  Returns the single node having the largest number of distinct descending nodes (sub-nodes at any given depth) in\n a sequence of nodes provided as input.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A sequence of nodes.</div>'}],returns:{type:"element(*)",description:"The node having the largest number of distinct descending nodes in the input sequence."},errors:[]},{isDocumented:!0,arity:1,name:"most-elements",qname:"con:most-elements",signature:"($s) as element(*)",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the single node having the largest number of descending elements (sub-elements at any given depth)\n in a sequence of nodes provided as input.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If more then one answer is possible, return the first node according to the order of the input sequence.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery">most-elements( ( &lt;a&gt;&lt;b/&gt;&lt;/a&gt;, &lt;a/&gt;, &lt;b/&gt;) )</pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery">(&lt;a&gt;&lt;b/&gt;&lt;/a&gt;)</pre></p>\n',summary:"<p>  Returns the single node having the largest number of descending elements (sub-elements at any given depth)\n in a sequence of nodes provided as input.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A sequence of nodes.</div>'}],returns:{type:"element(*)",description:"The node having the largest number of descending elements in the input sequence."},errors:[]},{isDocumented:!0,arity:1,name:"most-frequent",qname:"con:most-frequent",signature:"($s) as item()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the single most frequent node in a sequence of nodes provided as input.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If more then one answer is possible, returns the first node according to the order of the input sequence.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery">most-frequent( ( "a", "a", "b") )</pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery">("a")</pre></p>\n',summary:"<p>  Returns the single most frequent node in a sequence of nodes provided as input.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A sequence of nodes.</div>'}],returns:{type:"item()",description:"The most frequent node in the input sequence."},errors:[]},{isDocumented:!0,arity:1,name:"most-nodes",qname:"con:most-nodes",signature:"($s) as element(*)",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the single node having the largest number of descending nodes (sub-nodes at any given depth) in a\n sequence of nodes provided as input.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If more then one answer is possible, return the first node according to the order of the input sequence.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery">most-nodes( ( &lt;a&gt;&lt;b/&gt;&lt;/a&gt;, &lt;a/&gt;, &lt;b/&gt;) )</pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery">(&lt;a&gt;&lt;b/&gt;&lt;/a&gt;)</pre></p>\n',summary:"<p>  Returns the single node having the largest number of descending nodes (sub-nodes at any given depth) in a\n sequence of nodes provided as input.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A sequence of nodes.</div>'}],returns:{type:"element(*)",description:"The node having the largest number of descending nodes in the input sequence."},errors:[]},{isDocumented:!0,arity:2,name:"most-similar-edit-distance",qname:"con:most-similar-edit-distance",signature:"($s as xs:string*, $m as xs:string) as xs:string?",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the single most similar string, in terms of the edit distance metric towards an input string,\n in a sequence of strings provided as input. If more than one string has a maximum similarity (a minimum\n value for the edit distance metric), the function return the first string according to the order of the\n input sequence.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery">most-similar-edit-distance( ( "aaabbbccc", "aaabbb", "eeefff" ), "aaab" )</pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery">( "aaabbb" )</pre></p>\n',summary:"<p>  Returns the single most similar string, in terms of the edit distance metric towards an input string,\n in a sequence of strings provided as input.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A sequence of strings.</div>'},{name:"m",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The string towards which we want to measure the edit distance.</div>'}],returns:{type:"xs:string?",description:"The most similar string in the input sequence."},errors:[]},{isDocumented:!0,arity:2,name:"most-tokens",qname:"con:most-tokens",signature:"($s as xs:string*, $r as xs:string) as xs:string?",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the single longest string, in terms of the number of tokens, in a sequence of strings provided as input.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If more then one answer is possible, return the first string according to the order of the input sequence.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery">most-tokens( ( "a b c", "a b", "a"), " +" )</pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery">("a b c")</pre></p>\n',summary:"<p>  Returns the single longest string, in terms of the number of tokens, in a sequence of strings provided as input.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A sequence of strings.</div>'},{name:"r",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A regular expression forming the delimiter character(s) which mark the boundaries between adjacent tokens.</div>'}],returns:{type:"xs:string?",description:"The longest string in the input sequence, in terms of the number of tokens."},errors:[]},{isDocumented:!0,arity:2,name:"most-xpaths",qname:"con:most-xpaths",signature:"($s as element(*)*, $paths as xs:string*) as element(*)*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the single element from an input sequence of elements that matches the largest number of\n XPath expressions from a given set, producing a non-empty set of nodes.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If more then one answer is possible, return the first element according to the order of the input sequence.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery"> most-xpaths( ( &lt;a&gt;&lt;b/&gt;&lt;/a&gt;, &lt;d&gt;&lt;c/&gt;&lt;b/&gt;&lt;/d&gt;, &lt;d/&gt;) , (".//b", ".//c") ) </pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery"> ( &lt;d&gt;&lt;c/&gt;&lt;b/&gt;&lt;/d&gt; ) </pre></p>\n',summary:"<p>  Returns the single element from an input sequence of elements that matches the largest number of\n XPath expressions from a given set, producing a non-empty set of nodes.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s",type:"element(*)",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A sequence of elements.</div>'},{name:"paths",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A sequence of strings denoting XPath expressions.</div>'}],returns:{type:"element(*)*",description:"The element that matches the largest number of XPath expressions producing a non-empty set of nodes."},errors:[]},{isDocumented:!0,arity:1,name:"shortest",qname:"con:shortest",signature:"($s as xs:string*) as xs:string?",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the single shortest string, in terms of the number of characters, in a sequence of strings provided as input.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If more then one answer is possible, return the first string according to the order of the input sequence.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery">shortest( ( "a", "aa", "aaa") )</pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery">("a")</pre></p>\n',summary:"<p>  Returns the single shortest string, in terms of the number of characters, in a sequence of strings provided as input.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A sequence of strings.</div>'}],returns:{type:"xs:string?",description:"The shortest string in the input sequence."},errors:[]},{isDocumented:!0,arity:2,name:"some-xpaths",qname:"con:some-xpaths",signature:"($s as element(*)*, $paths as xs:string*) as element(*)*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the elements from a sequence of elements that, when matched to a given set of XPath expressions,\n produce a non-empty set of nodes for some of the cases.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery"> some-xpaths( ( &lt;a&gt;&lt;b/&gt;&lt;/a&gt;, &lt;d&gt;&lt;c/&gt;&lt;/d&gt;, &lt;d/&gt;), (".//b", ".//c") ) </pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery"> ( &lt;a&gt;&lt;b/&gt;&lt;/a&gt; , &lt;d&gt;&lt;c/&gt;&lt;/d&gt; ) </pre></p>\n',summary:"<p>  Returns the elements from a sequence of elements that, when matched to a given set of XPath expressions,\n produce a non-empty set of nodes for some of the cases.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s",type:"element(*)",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A sequence of elements.</div>'},{name:"paths",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A sequence of strings denoting XPath expressions.</div>'}],returns:{type:"element(*)*",description:"The elements that, when matched to the given set of XPath expressions, return a non-empty set of nodes for at least one of the cases."},errors:[]},{isDocumented:!0,arity:1,name:"superstring",qname:"con:superstring",signature:"($s as xs:string*) as xs:string?",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the single string, from an input sequence of strings, that appears more frequently as part\n of the other strings in the sequence. If no such string exists, the function returns an empty sequence.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">If more then one answer is possible, the function returns the first string according to the order of the input sequence.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery">super-string( ( "aaa bbb ccc", "aaa bbb", "aaa ddd", "eee fff" ) )</pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery">( "aaa bbb" )</pre></p>\n',summary:"<p>  Returns the single string, from an input sequence of strings, that appears more frequently as part\n of the other strings in the sequence.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A sequence of strings.</div>'}],returns:{type:"xs:string?",description:"The string that appears more frequently as part of the other strings in the sequence."},errors:[]},{isDocumented:!0,arity:2,name:"validating-schema",qname:"con:validating-schema",signature:"($s as element(*)*, $schema as element(*)) as element(*)*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the nodes from an input sequence of nodes that validate against a given XML Schema.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery"> validating-schema ( ( &lt;a/&gt; , &lt;b/&gt; ), &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt;&lt;xs:element name="a" /&gt;&lt;/xs:schema&gt; ) </pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery"> ( &lt;a/&gt; ) </pre></p>\n',summary:"<p>  Returns the nodes from an input sequence of nodes that validate against a given XML Schema.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s",type:"element(*)",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A sequence of elements.</div>'},{name:"schema",type:"element(*)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> An element encoding an XML Schema.</div>'}],returns:{type:"element(*)*",description:'The nodes that validate against the XML Schema. <b xmlns:xqdoc="http://www.xqdoc.org/1.0"> Attention : This function is still not implemented. </b>'},errors:[]}],variables:[]},"http://zorba.io/modules/node":{ns:"http://zorba.io/modules/node",description:" This module defines a set of function which can be used\n to determine (1) the relationship between two nodes (e.g. if one\n is the ancestor if another) and (2) properties of given\n nodes (e.g. their level in the tree).\n The same functionality can be achieved with simple XPath expressions.\n However, please note that using the functions in this modules instead\n of path expressions guarantees better performance.\n",sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Matthias Brantner</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/modules/node",prefix:"node"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:2,name:"ancestor-of",qname:"node:ancestor-of",signature:"($node1 as node(), $node2 as node()) as xs:boolean external",description:" Determines whether the node given as second argument is an\n ancestor of the node given as first argument.\n",summary:"<p> Determines whether the node given as second argument is an\n ancestor of the node given as first argument.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"node1",type:"node()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the potential descendant</div>'},{name:"node2",type:"node()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the potential ancestor</div>'}],returns:{type:"xs:boolean",description:"true if $node2 is an ancestor of $node1; false otherwise."},errors:[]},{isDocumented:!0,arity:2,name:"child-of",qname:"node:child-of",signature:"($node1 as node(), $node2 as node()) as xs:boolean external",description:" Determines whether the node given as second argument is a\n child of the node given as first argument.\n",summary:"<p> Determines whether the node given as second argument is a\n child of the node given as first argument.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"node1",type:"node()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the potential parent</div>'},{name:"node2",type:"node()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the potential child</div>'}],returns:{type:"xs:boolean",description:"true if $node2 is a child of $node1; false otherwise."},errors:[]},{isDocumented:!0,arity:1,name:"copy",qname:"node:copy",signature:"($input as node()*) as node()* external",description:' Return a deep copy of every given node according to the properties\n specified in the static context of the invoking module.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Please note that a copy of a node is parentless.\n',summary:"<p> Return a deep copy of every given node according to the properties\n specified in the static context of the invoking module.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"input",type:"node()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the node to copy</div>'}],returns:{type:"node()*",description:"a deep copy of every node in the input sequence or the empty sequence if $input is the empty sequence."},errors:[]},{isDocumented:!0,arity:2,name:"descendant-of",qname:"node:descendant-of",signature:"($node1 as node(), $node2 as node()) as xs:boolean external",description:" Determines whether the node given as second argument is a\n descendant of the node given as first argument.\n",summary:"<p> Determines whether the node given as second argument is a\n descendant of the node given as first argument.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"node1",type:"node()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the potential ancestor</div>'},{name:"node2",type:"node()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the potential descendant</div>'}],returns:{type:"xs:boolean",description:"true if $node2 is a descendant of $node1; false otherwise."},errors:[]},{isDocumented:!0,arity:2,name:"following-of",qname:"node:following-of",signature:"($node1 as node(), $node2 as node()) as xs:boolean external",description:" Determines whether the node given as second argument is\n following the node given as first argument.\n",summary:"<p> Determines whether the node given as second argument is\n following the node given as first argument.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"node1",type:"node()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the potential preceding node</div>'},{name:"node2",type:"node()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the potential following node</div>'}],returns:{type:"xs:boolean",description:"true if $node2 is following the node $node1; false otherwise."},errors:[]},{isDocumented:!0,arity:2,name:"following-sibling-of",qname:"node:following-sibling-of",signature:"($node1 as node(), $node2 as node()) as xs:boolean external",description:" Determines whether the node given as second argument is a\n following-sibling of the node given as first argument.\n",summary:"<p> Determines whether the node given as second argument is a\n following-sibling of the node given as first argument.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"node1",type:"node()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the potential preceding-sibling</div>'},{name:"node2",type:"node()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the potential following-sibling</div>'}],returns:{type:"xs:boolean",description:"true if $node2 is a following-sibling of $node1; false otherwise."},errors:[]},{isDocumented:!0,arity:2,name:"least-common-ancestor",qname:"node:least-common-ancestor",signature:"($node1 as node(), $node2 as node()) as node()? external",description:" Computes the least common ancestor of two given nodes in\n the tree.\n",summary:"<p> Computes the least common ancestor of two given nodes in\n the tree.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"node1",type:"node()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the first node</div>'},{name:"node2",type:"node()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the second node</div>'}],returns:{type:"node()?",description:"the least common ancestor of the two given nodes or the empty sequence if the two nodes are not part of the same tree."},errors:[]},{isDocumented:!0,arity:1,name:"level",qname:"node:level",signature:"($node as node()) as xs:integer external",description:" Computes the level of a given node in the tree.\n Note: The first level has the number one.\n",summary:"<p> Computes the level of a given node in the tree.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"node",type:"node()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the node for which the level should be computed</div>'}],returns:{type:"xs:integer",description:"The level as xs:integer of the given node in the tree."},errors:[]},{isDocumented:!0,arity:2,name:"parent-of",qname:"node:parent-of",signature:"($node1 as node(), $node2 as node()) as xs:boolean external",description:" Determines whether the node given as second argument is a\n parent of the node given as first argument.\n",summary:"<p> Determines whether the node given as second argument is a\n parent of the node given as first argument.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"node1",type:"node()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the potential child</div>'},{name:"node2",type:"node()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the potential parent</div>'}],returns:{type:"xs:boolean",description:"true if $node2 is a parent of $node1; false otherwise."},errors:[]},{isDocumented:!0,arity:2,name:"preceding-of",qname:"node:preceding-of",signature:"($node1 as node(), $node2 as node()) as xs:boolean external",description:" Determines whether the node given as second argument is\n preceding the node given as first argument.\n",summary:"<p> Determines whether the node given as second argument is\n preceding the node given as first argument.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"node1",type:"node()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the potential following node</div>'},{name:"node2",type:"node()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the potential preceding node</div>'}],returns:{type:"xs:boolean",description:"true if $node2 is preceding the node $node1; false otherwise."},errors:[]},{isDocumented:!0,arity:2,name:"preceding-sibling-of",qname:"node:preceding-sibling-of",signature:"($node1 as node(), $node2 as node()) as xs:boolean external",description:" Determines whether the node given as second argument is a\n preceding-sibling of the node given as first argument.\n",summary:"<p> Determines whether the node given as second argument is a\n preceding-sibling of the node given as first argument.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"node1",type:"node()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the potential following-sibling</div>'},{name:"node2",type:"node()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the potential preceding-sibling</div>'}],returns:{type:"xs:boolean",description:"true if $node2 is a preceding-sibling of $node1; false otherwise."},errors:[]}],variables:[]},"http://zorba.io/modules/archive":{ns:"http://zorba.io/modules/archive",description:' This module provides functionality to work with (possibly compressed)\n archives. For example, it provides functions to retrieve the names or\n extract the values of several entries in a ZIP archive. Moreover,\n there exist functions that allow to create or update archives.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The following archive formats and compression algorithms are supported:\n <ul xmlns:xqdoc="http://www.xqdoc.org/1.0">\n   <li>ZIP (with compression DEFLATE or STORE)</li>\n   <li>TAR (with compression GZIP)</li>\n </ul>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Luis Rodgriguez, Juan Zacarias, and Matthias Brantner</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/modules/archive",prefix:"a"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:2,name:"create",qname:"a:create",signature:"($entries as item()*, $contents as item()*) as xs:base64Binary external",description:' Creates a new ZIP archive out of the given entries and contents. <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n All entries are compressed with the DEFLATE compression algorithm.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The parameters $entries and $contents have the same meaning as for\n the function a:create with three arguments.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Entry entries can include a type element, this element can have one\n of two possible values: "regular" or "directory". If "regular" is\n specified then the entry will be created as a regular file; if "directory"\n is specified then the entry will be created as a directory, no contents\n will be read from $contents in this case. If no value is specified for type\n then it will be set to "regular". <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Example:\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0">\n $zip-file := a:create(\n    ({ "encoding" : "ISO-8859-1", "type" : "directory", "name" : "dir1" }, "dir1/file1"),\n    ("file contents"))\n </pre>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n',summary:"<p> Creates a new ZIP archive out of the given entries and contents.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"entries",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the meta data for the entries in the archive. Each entry can be of type xs:string or a JSON oibject describing the entry.</div>'},{name:"contents",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the content for the archive. Each item in the sequence can be of type xs:string or xs:base64Binary.</div>'}],returns:{type:"xs:base64Binary",description:"the generated archive as xs:base64Binary"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">a:ENTRY-COUNT-MISMATCH if the number of entries that don\'t describe directories differs from the number of items in the $contents sequence: count($non-directory-entries) ne count($contents)</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">a:INVALID-ENTRY-VALS if a values in an entry object are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">a:INVALID-ENCODING if a given encoding is invalid or not supported</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FORG0006 if an item in the contents sequence is not of type xs:string or xs:base64Binary</xqdoc:error>']},{isDocumented:!0,arity:3,name:"create",qname:"a:create",signature:"($entries as item()*, $contents as item()*, $options as object()) as xs:base64Binary external",description:' Creates a new archive out of the given entries and contents. <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The $entries arguments provides meta data for each entry in the archive.\n For example, the name of the entry (mandatory) or the last-modified date\n (optional). An entry can either be of type xs:string to describe the entry\n name or of type xs:base64Binary to provide additional meta data.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The $contents sequence provides the data (xs:string or xs:base64Binary) for\n the entries that should be included in the archive. Its length needs to\n match the length of the entries in the $entries sequence that don\'t describe\n directory entries (a:ARCH0001). All items of type xs:base64Binary are decoded\n before being added to the archive.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n For each entry, the name, last-modified date and time, and compression\n can be specified. In addition, an encoding can be specified which is used to\n store entries of type xs:string. If no last-modified attribute is given, the\n default is the current date and time. The compression is useful if various\n entries in a ZIP archive are compressed using different compression\n algorithms (i.e. store or deflate).<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n For example, the following sequence may be used to describe an archive\n containing two elements: <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static" ace-mode="xquery">{\n   "last-modified" : "{fn:current-dateTime()}"\n   "name" : "myfile.txt"\n },\n {\n   "encoding" : "ISO-8859-1",\n   "compression" : "store",\n   "name" : "dir/myfile.xml"\n }\n </pre>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The $options argument may be used to describe general options for the\n archive.  For example, the following options can be used to create a ZIP\n archive in which all entries are compressed with the DEFLATE compression\n algorithm: <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static" ace-mode="xquery">{\n   "format" : "ZIP",\n   "compression" : "DEFLATE"\n }\n </pre>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The result of the function is the generated archive as a item of type\n xs:base64Binary.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n',summary:"<p> Creates a new archive out of the given entries and contents.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"entries",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the meta data for the entries in the archive. Each entry can be of type xs:string or an JSON object describing the entry.</div>'},{name:"contents",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the content for the archive. Each item in the sequence can be of type xs:string or xs:base64Binary.</div>'},{name:"options",type:"object()",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the options used to generate the archive.</div>'}],returns:{type:"xs:base64Binary",description:"the generated archive as xs:base64Binary"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">a:ENTRY-COUNT-MISMATCH if the number of entries describing non-directories differs from the number of items in the $contents sequence: count($non-directoy-entries) ne count($contents)</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">a:INVALID-OPTIONS if the options argument contains invalid values</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">a:INVALID-ENTRY-VALS if any values in an entry are invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">a:INVALID-ENCODING if a given encoding is invalid or not supported</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">a:DIFFERENT-COMPRESSIONS-NOT-SUPPORTED if different compression algorithms were selected but the actual version of libarchive doesn\'t support it.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FORG0006 if an item in the contents sequence is not of type xs:string or xs:base64Binary</xqdoc:error>']},{isDocumented:!0,arity:2,name:"delete",qname:"a:delete",signature:"($archive as xs:base64Binary, $entry-names as xs:string*) as xs:base64Binary external",description:' Deletes entries from an archive. <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n',summary:"<p> Deletes entries from an archive.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"archive",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the archive to extract the entries from as xs:base64Binary</div>'},{name:"entry-names",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of names for entries which should be deleted</div>'}],returns:{type:"xs:base64Binary",description:"the updated base64Binary"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">a:CORRUPTED-ARCHIVE if $archive is not an archive or corrupted</xqdoc:error>']},{isDocumented:!0,arity:1,name:"entries",qname:"a:entries",signature:"($archive as xs:base64Binary) as object()* external",description:' Returns the header information of all entries in the given archive as a JSON\n objects sequence. <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Such information includes the name of the entry, the uncompressed size,\n as well as the last-modified timestamp. Note that not all values are\n available in every archive.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n',summary:"<p> Returns the header information of all entries in the given archive as a JSON\n objects sequence.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"archive",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the archive to list the entries from as xs:base64Binary</div>'}],returns:{type:"object()*",description:"a sequence of strings, one for each entry in the archive"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">a:CORRUPTED-ARCHIVE if $archive is not an archive or corrupted</xqdoc:error>']},{isDocumented:!0,arity:1,name:"extract-binary",qname:"a:extract-binary",signature:"($archive as xs:base64Binary) as xs:base64Binary* external",description:' Returns the entries identified by the given paths from the archive\n as base64Binary. <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n',summary:"<p> Returns the entries identified by the given paths from the archive\n as base64Binary.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"archive",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the archive to extract the entries from as xs:base64Binary</div>'}],returns:{type:"xs:base64Binary*",description:"one xs:base64Binary item for the contents of each entry in the archive"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">a:CORRUPTED-ARCHIVE if $archive is not an archive or corrupted</xqdoc:error>']},{isDocumented:!0,arity:2,name:"extract-binary",qname:"a:extract-binary",signature:"($archive as xs:base64Binary, $entry-names as xs:string*) as xs:base64Binary* external",description:' Returns the entries identified by the given paths from the archive\n as base64Binary. <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n',summary:"<p> Returns the entries identified by the given paths from the archive\n as base64Binary.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"archive",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the archive to extract the entries from as xs:base64Binary</div>'},{name:"entry-names",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of names for entries which should be extracted</div>'}],returns:{type:"xs:base64Binary*",description:"a sequence of xs:base64Binary itmes for the given sequence of names or the empty sequence if no entries match the given names."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">a:CORRUPTED-ARCHIVE if $archive is not an archive or corrupted</xqdoc:error>']},{isDocumented:!0,arity:1,name:"extract-text",qname:"a:extract-text",signature:"($archive as xs:base64Binary) as xs:string* external",description:' Extracts the contents of all entries in the given archive as text\n using UTF-8 as default encoding. <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n',summary:"<p> Extracts the contents of all entries in the given archive as text\n using UTF-8 as default encoding.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"archive",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the archive to extract the entries from as xs:base64Binary</div>'}],returns:{type:"xs:string*",description:"one string for the contents of each entry in the archive"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">a:CORRUPTED-ARCHIVE if $archive is not an archive or corrupted</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FOCH0001 if any of the entries contains invalid utf-8 characters</xqdoc:error>']},{isDocumented:!0,arity:2,name:"extract-text",qname:"a:extract-text",signature:"($archive as xs:base64Binary, $entry-names as xs:string*) as xs:string* external",description:' Extracts the contets of the entries identified by a given sequence of\n names as text.\n The default encoding used to read the string is UTF-8. <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n',summary:"<p> Extracts the contets of the entries identified by a given sequence of\n names as text.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"archive",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the archive to extract the entries from as xs:base64Binary</div>'},{name:"entry-names",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of names for entries which should be extracted</div>'}],returns:{type:"xs:string*",description:"a sequence of strings for the given sequence of names or the empty sequence if no entries match the given names."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">a:CORRUPTED-ARCHIVE if $archive is not an archive or corrupted</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FOCH0001 if any of the entries requested contains invalid utf-8 characters</xqdoc:error>']},{isDocumented:!0,arity:3,name:"extract-text",qname:"a:extract-text",signature:"($archive as xs:base64Binary, $entry-names as xs:string*, $encoding as xs:string) as xs:string* external",description:' Extracts the contets of the entries identified by a given sequence of\n names as text. Each entry is treated with the given encoding. <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n',summary:"<p> Extracts the contets of the entries identified by a given sequence of\n names as text.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"archive",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the archive to extract the entries from as xs:base64Binary</div>'},{name:"entry-names",type:"xs:string",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a sequence of entry names that should be extracted</div>'},{name:"encoding",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a encoding for transcoding each of the extracted entries</div>'}],returns:{type:"xs:string*",description:"a sequence of strings for the given sequence of names or the empty sequence if no entries match the given names."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">a:CORRUPTED-ARCHIVE if $archive is not an archive or corrupted</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">a:INVALID-ENCODING if the given $encoding is invalid or not supported</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FOCH0001 if a transcoding error happens</xqdoc:error>']},{isDocumented:!0,arity:1,name:"options",qname:"a:options",signature:"($archive as xs:base64Binary) as object() external",description:' Returns the algorithm and format options as a JSON object for a given archive.\n For example, for a ZIP archive, the following options element\n would be returned: <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static" ace-mode="xquery">{\n   "format" : "ZIP",\n   "compression" : "DEFLATE"\n }\n </pre>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n',summary:"<p> Returns the algorithm and format options as a JSON object for a given archive.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"archive",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the archive as xs:base64Binary</div>'}],returns:{type:"object()",description:"the algorithm and format options as a JSON object"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">a:CORRUPTED-ARCHIVE if $archive is not an archive or corrupted</xqdoc:error>']},{isDocumented:!0,arity:3,name:"update",qname:"a:update",signature:"($archive as xs:base64Binary, $entries as item()*, $contents as item()*) as xs:base64Binary external",description:' Adds and replaces entries in an archive according to\n the given spec. The contents can be string and base64Binary items. <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n The parameters $entries and $contents have the same meaning as for\n the function a:create with three arguments.<p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n',summary:"<p> Adds and replaces entries in an archive according to\n the given spec.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"archive",type:"xs:base64Binary",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the archive to add or replace content</div>'},{name:"entries",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the meta data for the entries in the archive. Each entry can be of type xs:string or a JSON object. For mandatory fields in the JSON object see create function.</div>'},{name:"contents",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the content for the archive. Each item in the sequence can be of type xs:string or xs:base64Binary.</div>'}],returns:{type:"xs:base64Binary",description:"the updated xs:base64Binary"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">a:ENTRY-COUNT-MISMATCH if the number of entry elements differs from the number of items in the $contents sequence: count($non-directory-entries) ne count($contents)</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">a:INVALID-ENTRY-VALS if a value for an entry element is invalid</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">a:INVALID-ENCODING if a given encoding is invalid or not supported</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">a:DIFFERENT-COMPRESSIONS-NOT-SUPPORTED if different compression algorithms were selected but the actual version of libarchive doesn\'t support it.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:FORG0006 if an item in the contents sequence is not of type xs:string or xs:base64Binary</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">a:CORRUPTED-ARCHIVE if $archive is not an archive or corrupted</xqdoc:error>']}],variables:[]},"http://www.zorba-xquery.com/modules/converters/html":{ns:"http://www.zorba-xquery.com/modules/converters/html",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">\n This module provides functions to <a href="http://www.w3.org/People/Raggett/tidy/" target="_blank">tidy</a> a HTML document. <br/>\n The functions in this module take an HTML document (a string) as parameter,\n tidy it in order to result in valid XHTML, and return this XHTML document as a document-node.\n </p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Sorin Nasoi</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://ww.w3.org/2005/xqt-errors",prefix:"err"},{uri:"http://www.zorba-xquery.com/modules/converters/html",prefix:"html"},{uri:"http://www.zorba-xquery.com/modules/converters/html-options",prefix:"html-options"},{uri:"http://zorba.io/modules/schema",prefix:"schema"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"parse",qname:"html:parse",signature:"($html as xs:string) as document()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function tidies the given HTML string and returns\n a valid XHTML document node.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This functions automatically sets the following tidying parameters:\n   <ul>\n    <li>output-xml=yes</li>\n    <li>doctype=omit</li>\n    <li>quote-nbsp=no</li>\n    <li>char-encoding=utf8</li>\n    <li>newline=LF</li>\n    <li>tidy-mark=no</li>\n   </ul>\n </p>\n',summary:"<p>  This function tidies the given HTML string and returns\n a valid XHTML document node.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"html",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the HTML string to tidy</div>'}],returns:{type:"document()",description:"the tidied XML document"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">html:InternalError if an internal error occurred while tidying the string.</xqdoc:error>']},{isDocumented:!0,arity:2,name:"parse",qname:"html:parse",signature:"($html as xs:string, $options as element(html-options:options)) as document()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This function tidies the given HTML string and returns\n a valid XHTML document node.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The second parameter allows to specify options that\n configure the tidy process. This parameter is a sequence\n of name=value pairs. Allowed parameter names and values\n are documented at <a href="http://tidy.sourceforge.net/docs/quickref.html">\n http://tidy.sourceforge.net/docs/quickref.html</a>.</p>\n',summary:"<p>  This function tidies the given HTML string and returns\n a valid XHTML document node.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"html",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the HTML string to tidy</div>'},{name:"options",type:"element(html-options:options)",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> a set of name and value pairs that provide options to configure the tidy process that have to be validated against the "http://www.zorba-xquery.com/modules/converters/html-options" schema.</div>'}],returns:{type:"document()",description:"the tidied XHTML document node"},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">err:XQDY0027 if $options can not be validated against the html-options schema</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">html:TidyOption if there was an error with one of the options in the $options parameter that couldn\'t have been caught by validating against the schema</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">html:InternalError if an internal error occurred while tidying the string.</xqdoc:error>']}],variables:[]},"http://zorba.io/modules/data-cleaning/set-similarity":{ns:"http://zorba.io/modules/data-cleaning/set-similarity",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This library module provides similarity functions for comparing sets of XML\n nodes (e.g., sets of XML elements, attributes or atomic values).</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">These functions are particularly useful for matching near duplicate sets of XML nodes.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The logic contained in this module is not specific to any particular XQuery implementation.</p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Bruno Martins</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/modules/data-cleaning/set-similarity",prefix:"set"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:2,name:"deep-intersect",qname:"set:deep-intersect",signature:"($s1, $s2) as item()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the intersection between two sets, using the deep-equal() function to compare the XML nodes from the sets.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery"> deep-intersect ( ( "a", "b", "c") , ( "a", "a", <d/> ) ) </pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery"> ("a") </pre></p>\n',summary:"<p>  Returns the intersection between two sets, using the deep-equal() function to compare the XML nodes from the sets.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s1",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The first set.</div>'},{name:"s2",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The second set.</div>'}],returns:{type:"item()*",description:"The intersection of both sets."},errors:[]},{isDocumented:!0,arity:2,name:"deep-union",qname:"set:deep-union",signature:"($s1, $s2) as item()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the union between two sets, using the deep-equal() function to compare the XML nodes from the sets.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery"> deep-union ( ( "a", "b", "c") , ( "a", "a", <d/> ) ) </pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery"> ("a", "b", "c", <d/> ) </pre></p>\n',summary:"<p>  Returns the union between two sets, using the deep-equal() function to compare the XML nodes from the sets.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s1",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The first set.</div>'},{name:"s2",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The second set.</div>'}],returns:{type:"item()*",description:"The union of both sets."},errors:[]},{isDocumented:!0,arity:2,name:"dice",qname:"set:dice",signature:"($s1, $s2) as xs:double",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the Dice similarity coefficient between two sets of XML nodes.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The Dice coefficient is defined as defined as twice the shared information between the input sets\n (i.e., the size of the intersection) over the sum of the cardinalities for the input sets.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery"> dice ( ( "a", "b", <c/> ) , ( "a", "a", "d") ) </pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery"> 0.4 </pre></p>\n',summary:"<p>  Returns the Dice similarity coefficient between two sets of XML nodes.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s1",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The first set.</div>'},{name:"s2",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The second set.</div>'}],returns:{type:"xs:double",description:"The Dice similarity coefficient between the two sets."},errors:[]},{isDocumented:!0,arity:1,name:"distinct",qname:"set:distinct",signature:"($s) as item()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Removes exact duplicates from a set, using the deep-equal() function to compare the XML nodes from the sets.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery"> distinct ( ( "a", "a", <b/> ) ) </pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery"> ("a", <b/> ) </pre></p>\n',summary:"<p>  Removes exact duplicates from a set, using the deep-equal() function to compare the XML nodes from the sets.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> A set.</div>'}],returns:{type:"item()*",description:"The set provided as input without the exact duplicates (i.e., returns the distinct nodes from the set provided as input)."},errors:[]},{isDocumented:!0,arity:2,name:"jaccard",qname:"set:jaccard",signature:"($s1, $s2) as xs:double",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the Jaccard similarity coefficient between two sets of XML nodes.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The Jaccard coefficient is defined as the size of the intersection divided by the size of the\n union of the input sets.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery"> jaccard ( ( "a", "b", <c/> ) , ( "a", "a", "d") ) </pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery"> 0.25 </pre></p>\n',summary:"<p>  Returns the Jaccard similarity coefficient between two sets of XML nodes.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s1",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The first set.</div>'},{name:"s2",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The second set.</div>'}],returns:{type:"xs:double",description:"The Jaccard similarity coefficient between the two sets."},errors:[]},{isDocumented:!0,arity:2,name:"overlap",qname:"set:overlap",signature:"($s1, $s2) as xs:double",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Returns the overlap coefficient between two sets of XML nodes.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The overlap coefficient is defined as the shared information between the input sets\n (i.e., the size of the intersection) over the size of the smallest input set.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Example usage : <pre class="ace-static" ace-mode="xquery"> overlap ( ( "a", "b", <c/> ) , ( "a", "a", "b" ) ) </pre></p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">The function invocation in the example above returns : <pre class="ace-static" ace-mode="xquery"> 1.0 </pre></p>\n',summary:"<p>  Returns the overlap coefficient between two sets of XML nodes.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"s1",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The first set.</div>'},{name:"s2",type:null,occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The second set.</div>'}],returns:{type:"xs:double",description:"The overlap coefficient between the two sets."},errors:[]}],variables:[]},"http://www.28msec.com/modules/http/util/cache":{ns:"http://www.28msec.com/modules/http/util/cache",description:" This module contains a collection of convenience functions to help\n developers work with HTTP caching options.\n",sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">28msec</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://zorba.io/annotations",prefix:"an"},{uri:"http://www.28msec.com/modules/http/util/cache",prefix:"cache"},{uri:"http://www.28msec.com/modules/http/response",prefix:"resp"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:0,name:"no-cache",qname:"cache:no-cache",signature:"() as empty-sequence()",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Forces a client not to cache the response by setting the appropriate\n HTTP headers.</p>\n In detail, the following HTTP headers will be set in the response:\n <ul xmlns:xqdoc="http://www.xqdoc.org/1.0">\n   <li><tt>Cache-Control: no-cache</tt></li>\n   <li><tt>Pragma: no-cache</tt></li>\n   <li><tt>Expires: 0</tt></li>\n </ul>\n',summary:"<p>  Forces a client not to cache the response by setting the appropriate\n HTTP headers.</p>",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"http://zorba.io/annotations",name:"sequential",value:""}],updating:!1,parameters:[],returns:{type:"empty-sequence()",description:"On success, the empty-sequence is returned"},errors:[]}],variables:[]},"http://www.zorba-xquery.com/modules/schema-tools":{ns:"http://www.zorba-xquery.com/modules/schema-tools",description:' This module provides funtionality to get sample XMLSchema from XML instances\n and sample XML instances from XMLSchema.\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://xmlbeans.apache.org/">Apache XMLBeans</a> library is used to implement\n inst2xsd and xsd2inst functions.\n <br xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <br xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n <b xmlns:xqdoc="http://www.xqdoc.org/1.0">Note:</b> Since this module has a Java library dependency a JVM required\n to be installed on the system. For Windows: jvm.dll is required on the system\n path ( usually located in "C:\\Program Files\\Java\\jre6\\bin\\client".\n',sees:['<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://xmlbeans.apache.org/</xqdoc:see>','<xqdoc:see xmlns:xqdoc="http://www.xqdoc.org/1.0">http://xmlbeans.apache.org</xqdoc:see>'],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Cezar Andrei</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://www.w3.org/2005/xqt-errors",prefix:"err"},{uri:"http://zorba.io/modules/schema",prefix:"schema-options"},{uri:"http://www.zorba-xquery.com/modules/schema-tools",prefix:"schema-tools"},{uri:"http://www.zorba-xquery.com/modules/schema-tools/schema-tools-options",prefix:"st-options"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:2,name:"inst2xsd",qname:"schema-tools:inst2xsd",signature:"($instances as element(*)+, $options as element(st-options:inst2xsd-options)?) as document()*",description:' The inst2xsd function takes a set of sample XML instance elements as input and\n generates a set of sample XMLSchema documents that define\n the content of the given input.\n <br xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Please consult the\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://xmlbeans.apache.org/">official documentation for further\n information</a>.\n <br xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Example:<pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static" ace-mode="xquery">\n  import module namespace st = "http://www.zorba-xquery.com/modules/schema-tools";\n  declare namespace sto =\n      "http://www.zorba-xquery.com/modules/schema-tools/schema-tools-options";\n  let $instances := (&lt;a&gt;&lt;b/&gt;&lt;c/&gt;&lt;/a&gt;, &lt;b/&gt;, &lt;c&gt;ccc&lt;/c&gt;)\n  let $options  :=\n     &lt;sto:inst2xsd-options xmlns:sto=\n       "http://www.zorba-xquery.com/modules/schema-tools/schema-tools-options"&gt;\n       &lt;sto:design&gt;vbd&lt;/sto:design&gt;\n       &lt;sto:simple-content-types&gt;smart&lt;/sto:simple-content-types&gt;\n       &lt;sto:use-enumeration&gt;10&lt;/sto:use-enumeration&gt;\n     &lt;/sto:inst2xsd-options&gt;\n  return\n      st:inst2xsd($instances, $options)\n </pre>\n <br xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n',summary:"<p> The inst2xsd function takes a set of sample XML instance elements as input and\n generates a set of sample XMLSchema documents that define\n the content of the given input.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"instances",type:"element(*)",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The input XML instance elements</div>'},{name:"options",type:"element(st-options:inst2xsd-options)",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Options:<br/> <ul> <li>design: Choose the generated schema design<br/> - rdd: Russian Doll Design - local elements and local types<br/> - ssd: Salami Slice Design - global elements and local types<br/> - vbd (default): Venetian Blind Design - local elements and global complex types</li> <li>simple-content-types: type of leaf nodes<br/> - smart (default): try to find the right simple XMLSchema type<br/> - always-string: use xsd:string for all simple types</li> <li>use-enumeration: - when there are multiple valid values in a list<br/> - 1: never use enumeration<br/> - 2 or more (default 10): use enumeration if less than this number of occurrences - number option</li> <li>verbose: - stdout verbose info<br/> - true: - output type holder information<br/> - false (default): no output</li></ul></div>'}],returns:{type:"document()*",description:"The generated XMLSchema documents."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">schema-tools:VM001 If Zorba was unable to start the JVM.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">schema-tools:JAVA-EXCEPTION If Apache XMLBeans throws an exception.</xqdoc:error>']},{isDocumented:!0,arity:3,name:"xsd2inst",qname:"schema-tools:xsd2inst",signature:"($schemas as element(*)+, $rootElementName as xs:string, $options as element(st-options:xsd2inst-options)?) as document()",description:' The xsd2inst function takes a set of XML Schema elements as input and the\n local name of the root element and\n generates a document that represents one sample XML instance of the given\n input schemas. The local name is searched in schema global element definitions\n in the order of schemas parameter.\n <br xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Please consult the\n <a xmlns:xqdoc="http://www.xqdoc.org/1.0" href="http://xmlbeans.apache.org/">official documentation for further\n   information</a>.\n <br xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n Example: <pre xmlns:xqdoc="http://www.xqdoc.org/1.0" class="ace-static" ace-static="xquery">\n  import module namespace st = "http://www.zorba-xquery.com/modules/schema-tools";\n  declare namespace sto =\n      "http://www.zorba-xquery.com/modules/schema-tools/schema-tools-options";\n  let $xsds  :=\n     ( &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"\n           attributeFormDefault="unqualified"\n           elementFormDefault="qualified"&gt;\n         &lt;xs:element name="a" type="aType"/&gt;\n         &lt;xs:complexType name="aType"&gt;\n           &lt;xs:sequence&gt;\n             &lt;xs:element type="xs:string" name="b"/&gt;\n             &lt;xs:element type="xs:string" name="c"/&gt;\n           &lt;/xs:sequence&gt;\n         &lt;/xs:complexType&gt;\n       &lt;/xs:schema&gt; )\n  let $options :=\n    &lt;sto:xsd2inst-options xmlns:sto=\n      "http://www.zorba-xquery.com/modules/schema-tools/schema-tools-options"&gt;\n      &lt;sto:network-downloads&gt;false&lt;/sto:network-downloads&gt;\n      &lt;sto:no-pvr&gt;false&lt;/sto:no-pvr&gt;\n      &lt;sto:no-upa&gt;false&lt;/sto:no-upa&gt;\n    &lt;/sto:xsd2inst-options&gt;\n  return\n      st:xsd2inst($xsds, "a", $options)\n </pre><br xmlns:xqdoc="http://www.xqdoc.org/1.0"/>\n',summary:"<p> The xsd2inst function takes a set of XML Schema elements as input and the\n local name of the root element and\n generates a document that represents one sample XML instance of the given\n input schemas.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"schemas",type:"element(*)",occurrence:"+",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> elements representing XMLSchema definitions</div>'},{name:"rootElementName",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> The local name of the instance root element. If multiple target namespaces are used, first one found - using the sequence order - will be used.</div>'},{name:"options",type:"element(st-options:xsd2inst-options)",occurrence:"?",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> Options:<br/><ul> <li>network-downloads: boolean (default false)<br/> - true allows XMLBeans to use network when resolving schema imports and includes</li> <li>no-pvr: boolean (default false)<br/> - true to disable particle valid (restriction) rule, false otherwise</li> <li>no-upa: boolean (default false)<br/> - true to disable unique particle attribution rule, false otherwise</li></ul></div>'}],returns:{type:"document()",description:"The generated output document, representing a sample XML instance."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">schema-tools:VM001 If Zorba was unable to start the JVM.</xqdoc:error>','<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">schema-tools:JAVA-EXCEPTION If Apache XMLBeans throws an exception.</xqdoc:error>']}],variables:[]},"http://xbrl.io/modules/bizql/entities":{ns:"http://xbrl.io/modules/bizql/entities",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">This module provides functions for retrieving information about entities.\n Entities submit archives (see archives module),\n for example, to a reporting authority. Entities\n are identified with an EID (Entity ID).</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">With this module, you can retrieve all entities, or a certain number of entities\n with their EIDs, or obtain the EID of entities you already have.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Entities are stored in a MongoDB datasource called <b>xbrl</b>.</p>\n <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Each entity can be associated with a set of tags that makes it easier\n to manage them. The e:entities#1 function\n allows to retrieve all entities with a given tag.</p>\n',sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Charles Hoffman</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Matthias Brantner</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Dennis Knochenwefel</xqdoc:author>','<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">Ghislain Fourny</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://www.28msec.com/modules/credentials",prefix:"credentials"},{uri:"http://xbrl.io/modules/bizql/entities",prefix:"entities"},{uri:"http://www.28msec.com/modules/mongodb",prefix:"mongo"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:1,name:"eid",qname:"entities:eid",signature:"($entities-or-ids as item()*) as atomic*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Converts the input to a normalized entity identifier (EID). The input\n can be either an EID, or an entity object which contains an _id.</p>\n',summary:"<p>  Converts the input to a normalized entity identifier (EID).</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"entities-or-ids",type:"item()",occurrence:"*",description:""}],returns:{type:"atomic*",description:"the normalized EIDs."},errors:['<xqdoc:error xmlns:xqdoc="http://www.xqdoc.org/1.0">entities:INVALID_PARAMETER if the EID or entity is not valid.</xqdoc:error>']},{isDocumented:!0,arity:0,name:"entities",qname:"entities:entities",signature:"() as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Return all entities.</p>\n',summary:"<p>  Return all entities.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[],returns:{type:"object()*",description:"all entities."},errors:[]},{isDocumented:!0,arity:1,name:"entities",qname:"entities:entities",signature:"($entities-or-ids as item()*) as object()*",description:' <p xmlns:xqdoc="http://www.xqdoc.org/1.0">Return the entities with the given EIDs.</p>\n',summary:"<p>  Return the entities with the given EIDs.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"entities-or-ids",type:"item()",occurrence:"*",description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the ids of the entities (EIDs) or the entities themselves.</div>'}],returns:{type:"object()*",description:"the entities with the given EIDs the empty sequence if no entity was found or if the input is an empty sequence."},errors:[]}],variables:[{name:"entities:col",type:"string",description:" Name of the collection the entities are stored in.\n"}]},"http://www.zorba-xquery.com/modules/cryptography/hmac":{ns:"http://www.zorba-xquery.com/modules/cryptography/hmac",description:" This module provides a function to generate hash-based\n message authentication codes (HMAC) involving a cryptographic\n hash function (e.g. SHA1).\n",sees:[],authors:['<xqdoc:author xmlns:xqdoc="http://www.xqdoc.org/1.0">William Candillon</xqdoc:author>'],version:null,encoding:"utf-8",namespaces:[{uri:"http://www.zorba-xquery.com/modules/cryptography/hmac",prefix:"hmac"},{uri:"http://zorba.io/options/versioning",prefix:"ver"}],functions:[{isDocumented:!0,arity:2,name:"sha1",qname:"hmac:sha1",signature:"($message as xs:string, $secret-key as xs:string) as xs:string external",description:" This function provides hash-based message authentication code using\n the SHA1 algorithm.\n",summary:"<p> This function provides hash-based message authentication code using\n the SHA1 algorithm.</p>",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"message",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the message to be authenticated</div>'},{name:"secret-key",type:"xs:string",occurrence:null,description:'<div xmlns:xqdoc="http://www.xqdoc.org/1.0"> the secret key used for calculating the authentication</div>'}],returns:{type:"xs:string",description:"hash-based base64 encoded message authentication code"},errors:[]}],variables:[]},"http://api.28.io/csvview":{ns:"http://api.28.io/csvview",description:"",sees:[],authors:[],version:null,encoding:null,namespaces:[{uri:"",prefix:"an"},{uri:"http://api.28.io/csvview",prefix:"csvview"},{uri:"http://api.28.io/model",prefix:"model"}],functions:[{isDocumented:!1,arity:1,name:"column",qname:"csvview:column",signature:"($data) as xs:string",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"data",type:null,occurrence:null,description:""}],returns:{type:"xs:string",description:""},errors:[]},{isDocumented:!1,arity:1,name:"line",qname:"csvview:line",signature:"($entries as xs:string*)",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"entries",type:"xs:string",occurrence:"*",description:""}],returns:{type:null,description:""},errors:[]},{isDocumented:!1,arity:2,name:"show-nodes",qname:"csvview:show-nodes",signature:"($nodes, $show-headers as xs:boolean)",description:"",summary:"",annotation_str:" %an:sequential",annotations:[{prefix:"an",ns:"",name:"sequential",value:""}],updating:!1,parameters:[{name:"nodes",type:null,occurrence:null,description:""},{name:"show-headers",type:"xs:boolean",occurrence:null,description:""}],returns:{type:null,description:""},errors:[]}],variables:[]},"http://api.28.io/util":{ns:"http://api.28.io/util",description:"",sees:[],authors:[],version:null,encoding:null,namespaces:[{uri:"http://www.28msec.com/modules/http/request",prefix:"req"},{uri:"http://api.28.io/util",prefix:"util"}],functions:[{isDocumented:!1,arity:1,name:"param-or-body",qname:"util:param-or-body",signature:"($param-name as xs:string) as xs:string?",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"param-name",type:"xs:string",occurrence:null,description:""}],returns:{type:"xs:string?",description:""},errors:[]},{isDocumented:!1,arity:1,name:"path",qname:"util:path",signature:"($from as xs:integer) as xs:string*",description:"",summary:"",annotation_str:"",annotations:[],updating:!1,parameters:[{name:"from",type:"xs:integer",occurrence:null,description:""}],returns:{type:"xs:string*",description:""},errors:[]}],variables:[{name:"util:collection-namespace",type:"item()*",description:""}]}}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,t,n){var r={},i=function(){this.propagationStopped=!0},s=function(){this.defaultPrevented=!0};r._emit=r._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],r=this._defaultHandlers[e];if(!n.length&&!r)return;if(typeof t!="object"||!t)t={};t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=i),t.preventDefault||(t.preventDefault=s),n=n.slice();for(var o=0;o<n.length;o++){n[o](t,this);if(t.propagationStopped)break}if(r&&!t.defaultPrevented)return r(t,this)},r._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(!n)return;n=n.slice();for(var r=0;r<n.length;r++)n[r](t,this)},r.once=function(e,t){var n=this;t&&this.addEventListener(e,function r(){n.removeEventListener(e,r),t.apply(null,arguments)})},r.setDefaultHandler=function(e,t){var n=this._defaultHandlers;n||(n=this._defaultHandlers={_disabled_:{}});if(n[e]){var r=n[e],i=n._disabled_[e];i||(n._disabled_[e]=i=[]),i.push(r);var s=i.indexOf(t);s!=-1&&i.splice(s,1)}n[e]=t},r.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(!n)return;var r=n._disabled_[e];if(n[e]==t){var i=n[e];r&&this.setDefaultHandler(e,r.pop())}else if(r){var s=r.indexOf(t);s!=-1&&r.splice(s,1)}},r.on=r.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[e];return r||(r=this._eventRegistry[e]=[]),r.indexOf(t)==-1&&r[n?"unshift":"push"](t),t},r.off=r.removeListener=r.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(!n)return;var r=n.indexOf(t);r!==-1&&n.splice(r,1)},r.removeAllListeners=function(e){this._eventRegistry&&(this._eventRegistry[e]=[])},t.EventEmitter=r})
\ No newline at end of file
diff --git a/app/assets/main.html b/app/assets/main.html
index b0fac676c..b77636a8f 100644
--- a/app/assets/main.html
+++ b/app/assets/main.html
@@ -37,141 +37,33 @@
   <script src="/javascripts/aether.js"></script>
   <script src="/javascripts/app.js"></script> <!-- it's all Backbone! -->
   
+  <script>
+    window.linkedInAsyncInit = function() {
+      console.log("Linkedin Async Init!");
+      Backbone.Mediator.publish('linkedin-loaded');
+    };
+    
+  </script>
+  <script type="text/javascript" async src="http://platform.linkedin.com/in.js">
+    api_key: 75v8mv4ictvmx6
+    onLoad: linkedInAsyncInit
+    authorize: true
+  </script>
+  
   <script>
     window.userObject = "userObjectTag";
   </script>
   
   <script>require('initialize');</script>
 
-  <!-- begin LinkedIn code -->
-  <script>
-    window.linkedInAsyncInit = function() {
-      Backbone.Mediator.publish('linkedin-loaded');
-    };
-  </script>
-  <script type="text/javascript" src="http://platform.linkedin.com/in.js">
-    api_key: 75v8mv4ictvmx6
-    onLoad: linkedInAsyncInit
-    authorize: true
-  </script>
-  <!-- end LinkedIn code -->
-  <!-- begin segment.io code -->
-  <script type="text/javascript">
-  var analytics=analytics||[];(function(){var e=["identify","track","trackLink","trackForm","trackClick","trackSubmit","page","pageview","ab","alias","ready","group"],t=function(e){return function(){analytics.push([e].concat(Array.prototype.slice.call(arguments,0)))}};for(var n=0;n<e.length;n++)analytics[e[n]]=t(e[n])})(),analytics.load=function(e){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src=("https:"===document.location.protocol?"https://":"http://")+"d2dq2ahtl5zl1z.cloudfront.net/analytics.js/v1/"+e+"/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(t,n)};
-  analytics.load("jsjzx9n4d2");
-  </script>
-  <!-- end segment.io code -->
-
-  <!-- begin olark code -->
-  <script data-cfasync="false" type='text/javascript'>/*<![CDATA[*/window.olark||(function(c){var f=window,d=document,l=f.location.protocol=="https:"?"https:":"http:",z=c.name,r="load";var nt=function(){
-    f[z]=function(){
-    (a.s=a.s||[]).push(arguments)};var a=f[z]._={
-    },q=c.methods.length;while(q--){(function(n){f[z][n]=function(){
-    f[z]("call",n,arguments)}})(c.methods[q])}a.l=c.loader;a.i=nt;a.p={
-    0:+new Date};a.P=function(u){
-    a.p[u]=new Date-a.p[0]};function s(){
-    a.P(r);f[z](r)}f.addEventListener?f.addEventListener(r,s,false):f.attachEvent("on"+r,s);var ld=function(){function p(hd){
-    hd="head";return["<",hd,"></",hd,"><",i,' onl' + 'oad="var d=',g,";d.getElementsByTagName('head')[0].",j,"(d.",h,"('script')).",k,"='",l,"//",a.l,"'",'"',"></",i,">"].join("")}var i="body",m=d[i];if(!m){
-    return setTimeout(ld,100)}a.P(1);var j="appendChild",h="createElement",k="src",n=d[h]("div"),v=n[j](d[h](z)),b=d[h]("iframe"),g="document",e="domain",o;n.style.display="none";m.insertBefore(n,m.firstChild).id=z;b.frameBorder="0";b.id=z+"-loader";if(/MSIE[ ]+6/.test(navigator.userAgent)){
-    b.src="javascript:false"}b.allowTransparency="true";v[j](b);try{
-    b.contentWindow[g].open()}catch(w){
-    c[e]=d[e];o="javascript:var d="+g+".open();d.domain='"+d.domain+"';";b[k]=o+"void(0);"}try{
-    var t=b.contentWindow[g];t.write(p());t.close()}catch(x){
-    b[k]=o+'d.write("'+p().replace(/"/g,String.fromCharCode(92)+'"')+'");d.close();'}a.P(2)};ld()};nt()})({
-    loader: "static.olark.com/jsclient/loader0.js",name:"olark",methods:["configure","extend","declare","identify"]});
-    /* custom configuration goes here (www.olark.com/documentation) */
-    olark.identify('1451-787-10-5544');/*]]>*/</script>
-  <!-- end olark code -->
-    
-
 </head>
 <body class="nano clearfix">
   <div id="fb-root"></div>
 
-<!-- begin facebook code -->
-  <script>
-    // Additional JS functions here
-    window.fbAsyncInit = function() {
-      Backbone.Mediator.publish('fbapi-loaded');
-      FB.init({
-        appId      : document.location.origin === 'http://localhost:3000' ? '607435142676437' : '148832601965463', // App ID
-        channelUrl : document.location.origin +'/channel.html', // Channel File
-        status     : true, // check login status
-        cookie     : true, // enable cookies to allow the server to access the session
-        xfbml      : true  // parse XFBML
-      });
-
-      // This is fired for any auth related change, such as login, logout or session refresh.
-      FB.Event.subscribe('auth.authResponseChange', function(response) {
-        // Here we specify what we do with the response anytime this event occurs. 
-        if (response.status === 'connected') {
-          // They have logged in to the app.
-          Backbone.Mediator.publish('facebook-logged-in', {response:response});
-        } else if (response.status === 'not_authorized') {
-          // The person is logged into Facebook, but not into the app.
-        } else {
-          // The person is not logged into Facebook
-        }
-      });
-    };
-
-    // Load the SDK asynchronously
-    (function(d){
-      var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
-      if (d.getElementById(id)) {return;}
-      js = d.createElement('script'); js.id = id; js.async = true;
-      js.src = "//connect.facebook.net/en_US/all.js";
-      //js.src = "//connect.facebook.net/en_US/all/debug.js";
-      ref.parentNode.insertBefore(js, ref);
-    }(document));
-  </script>
-  <!-- end facebook code -->
-
-
   <header class="header-container" id="header-container"></header>
   
   <div id="page-container" class="nano-content"></div>
 
   <div id="modal-wrapper" class="modal-content"></div>
-
-  <!-- begin google api/plus code -->
-  <script type="text/javascript">
-    (function() {
-      var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
-      po.src = 'https://apis.google.com/js/client:plusone.js?onload=onGPlusLoaded';
-      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
-    })();
-    
-    function onGPlusLoaded() {
-      Backbone.Mediator.publish('gapi-loaded');
-    }
-
-    function signinCallback(authResult) {
-      if (authResult['access_token']) {
-        Backbone.Mediator.publish('gplus-logged-in', authResult)
-      }
-    }
-  </script>
-  <!-- end google api/plus code -->
-
-  <!-- begin twitter code -->
-  <script>
-    (function (d,s,id) {
-      var js, fjs = d.getElementsByTagName(s)[0], p = /^http:/.test(d.location) ? 'http' : 'https';
-      if(!d.getElementById(id)) {
-        js = d.createElement(s);
-        js.id = id;
-        js.src = p + '://platform.twitter.com/widgets.js';
-        fjs.parentNode.insertBefore(js, fjs);
-      }
-    })(document, 'script', 'twitter-wjs');
-  </script>
-  <!-- end twitter code -->
-
-  <!-- begin filepicker.io code -->
-  <script type="text/javascript">
-    (function(a){if(window.filepicker){return}var b=a.createElement("script");b.type="text/javascript";b.async=!0;b.src=("https:"===a.location.protocol?"https:":"http:")+"//api.filepicker.io/v1/filepicker.js";var c=a.getElementsByTagName("script")[0];c.parentNode.insertBefore(b,c);var d={};d._queue=[];var e="pick,pickMultiple,pickAndStore,read,write,writeUrl,export,convert,store,storeUrl,remove,stat,setKey,constructWidget,makeDropPane".split(",");var f=function(a,b){return function(){b.push([a,arguments])}};for(var g=0;g<e.length;g++){d[e[g]]=f(e[g],d._queue)}window.filepicker=d})(document);
-  </script>
-  <!-- end filepicker.io code -->
 </body>
 </html>
diff --git a/app/collections/CocoCollection.coffee b/app/collections/CocoCollection.coffee
index 817b0700f..bb051811c 100644
--- a/app/collections/CocoCollection.coffee
+++ b/app/collections/CocoCollection.coffee
@@ -1,7 +1,12 @@
+CocoModel = require 'models/CocoModel'
+
 module.exports = class CocoCollection extends Backbone.Collection
   loaded: false
+  model: null
 
   initialize: ->
+    if not @model
+      console.error @constructor.name, 'does not have a model defined. This will not do!'
     super()
     @once 'sync', =>
       @loaded = true
diff --git a/app/collections/ComponentsCollection.coffee b/app/collections/ComponentsCollection.coffee
index 1f930576b..32f2748ca 100644
--- a/app/collections/ComponentsCollection.coffee
+++ b/app/collections/ComponentsCollection.coffee
@@ -2,5 +2,5 @@ LevelComponent = require 'models/LevelComponent'
 CocoCollection = require 'collections/CocoCollection'
 
 module.exports = class ComponentsCollection extends CocoCollection
-  url: '/db/level.component/search'
+  url: '/db/level.component'
   model: LevelComponent
diff --git a/app/collections/DocumentFiles.coffee b/app/collections/DocumentFiles.coffee
index b4ab7559d..a91ee0bbd 100644
--- a/app/collections/DocumentFiles.coffee
+++ b/app/collections/DocumentFiles.coffee
@@ -3,9 +3,9 @@ File = require 'models/File'
 
 module.exports = class ModelFiles extends CocoCollection
   model: File
-  
+
   constructor: (model) ->
     super()
     url = model.constructor.prototype.urlRoot
     url += "/#{model.get('original') or model.id}/files"
-    @url = url 
\ No newline at end of file
+    @url = url
diff --git a/app/collections/NewAchievementCollection.coffee b/app/collections/NewAchievementCollection.coffee
new file mode 100644
index 000000000..7b33d7d75
--- /dev/null
+++ b/app/collections/NewAchievementCollection.coffee
@@ -0,0 +1,7 @@
+CocoCollection = require 'collections/CocoCollection'
+
+class NewAchievementCollection extends CocoCollection
+  initialize: (me = require('lib/auth').me) ->
+    @url = "/db/user/#{me.id}/achievements?notified=false"
+
+module.exports = NewAchievementCollection
diff --git a/app/collections/PatchesCollection.coffee b/app/collections/PatchesCollection.coffee
index f3f1a6d8e..cb03c3486 100644
--- a/app/collections/PatchesCollection.coffee
+++ b/app/collections/PatchesCollection.coffee
@@ -3,8 +3,7 @@ CocoCollection = require 'collections/CocoCollection'
 
 module.exports = class PatchesCollection extends CocoCollection
   model: PatchModel
-  
+
   initialize: (models, options, forModel, @status='pending') ->
     super(arguments...)
     @url = "#{forModel.urlRoot}/#{forModel.get('original')}/patches?status=#{@status}"
-    
diff --git a/app/collections/ThangNamesCollection.coffee b/app/collections/ThangNamesCollection.coffee
index 414628d84..3e98fb02e 100644
--- a/app/collections/ThangNamesCollection.coffee
+++ b/app/collections/ThangNamesCollection.coffee
@@ -7,7 +7,7 @@ module.exports = class ThangNamesCollection extends CocoCollection
   isCachable: false
 
   constructor: (@ids) -> super()
-    
+
   fetch: (options) ->
     options ?= {}
     _.extend options, {type:'POST', data:{ids:@ids}}
diff --git a/app/initialize.coffee b/app/initialize.coffee
index 76d4174c5..5462242f4 100644
--- a/app/initialize.coffee
+++ b/app/initialize.coffee
@@ -18,6 +18,11 @@ definitionSchemas =
   'misc': require './schemas/definitions/misc'
 
 init = ->
+  path = document.location.pathname
+  testing = path.startsWith '/test'
+  demoing = path.startsWith '/demo'
+  initializeServices() unless testing or demoing
+
   # Set up Backbone.Mediator schemas
   setUpDefinitions()
   setUpChannels()
@@ -28,13 +33,12 @@ init = ->
 
   treemaExt = require 'treema-ext'
   treemaExt.setup()
-  filepicker.setKey('AvlkNoldcTOU4PvKi2Xm7z')
 
 $ -> init()
-  
+
 handleNormalUrls = ->
   # http://artsy.github.com/blog/2012/06/25/replacing-hashbang-routes-with-pushstate/
-  $(document).on "click", "a[href^='/']", (event) ->
+  $(document).on 'click', "a[href^='/']", (event) ->
 
     href = $(event.currentTarget).attr('href')
 
@@ -59,4 +63,19 @@ setUpChannels = ->
 
 setUpDefinitions = ->
   for definition of definitionSchemas
-    Backbone.Mediator.addDefSchemas definitionSchemas[definition]
\ No newline at end of file
+    Backbone.Mediator.addDefSchemas definitionSchemas[definition]
+
+initializeServices = ->
+  services = [
+    './lib/services/filepicker'
+    './lib/services/segmentio'
+    './lib/services/olark'
+    './lib/services/facebook'
+    './lib/services/google'
+    './lib/services/twitter'
+    './lib/services/linkedin'
+  ]
+
+  for service in services
+    service = require service
+    service()
diff --git a/app/lib/Angel.coffee b/app/lib/Angel.coffee
index fbdb252db..4beeffa97 100644
--- a/app/lib/Angel.coffee
+++ b/app/lib/Angel.coffee
@@ -8,14 +8,14 @@ CocoClass = require 'lib/CocoClass'
 module.exports = class Angel extends CocoClass
   @nicks: ['Archer', 'Lana', 'Cyril', 'Pam', 'Cheryl', 'Woodhouse', 'Ray', 'Krieger']
 
-  infiniteLoopIntervalDuration: 7500  # check this often
-  infiniteLoopTimeoutDuration: 5000  # wait this long for a response when checking
+  infiniteLoopIntervalDuration: 10000  # check this often; must be longer than other two combined
+  infiniteLoopTimeoutDuration: 7500  # wait this long for a response when checking
   abortTimeoutDuration: 500  # give in-process or dying workers this long to give up
 
   constructor: (@shared) ->
     super()
     @say 'Got my wings.'
-    if window.navigator and (window.navigator.userAgent.search("MSIE") isnt -1 or window.navigator.appName is 'Microsoft Internet Explorer')
+    if window.navigator and (window.navigator.userAgent.search('MSIE') isnt -1 or window.navigator.appName is 'Microsoft Internet Explorer')
       @infiniteLoopIntervalDuration *= 10  # since it's so slow to serialize without transferable objects, we can't trust it
       @infiniteLoopTimeoutDuration *= 10
       @abortTimeoutDuration *= 10
@@ -34,13 +34,13 @@ module.exports = class Angel extends CocoClass
 
   # say: debugging stuff, usually off; log: important performance indicators, keep on
   say: (args...) -> #@log args...
-  log: (args...) -> console.log "|#{@shared.godNick}'s #{@nick}|", args...
+  log: (args...) -> console.info "|#{@shared.godNick}'s #{@nick}|", args...
 
   testWorker: =>
     return if @destroyed
     clearTimeout @condemnTimeout
     @condemnTimeout = _.delay @infinitelyLooped, @infiniteLoopTimeoutDuration
-    @say "Let's give it", @infiniteLoopTimeoutDuration, "to not loop."
+    @say 'Let\'s give it', @infiniteLoopTimeoutDuration, 'to not loop.'
     @worker.postMessage func: 'reportIn'
 
   onWorkerMessage: (event) =>
@@ -58,6 +58,7 @@ module.exports = class Angel extends CocoClass
       when 'start-load-frames'
         clearTimeout @condemnTimeout
       when 'report-in'
+        @say 'Worker reported in.'
         clearTimeout @condemnTimeout
       when 'end-load-frames'
         clearTimeout @condemnTimeout
@@ -83,7 +84,7 @@ module.exports = class Angel extends CocoClass
       when 'new-world'
         @beholdWorld event.data.serialized, event.data.goalStates
       when 'abort'
-        @say "Aborted.", event.data
+        @say 'Aborted.', event.data
         clearTimeout @abortTimeout
         @aborting = false
         @running = false
@@ -91,7 +92,7 @@ module.exports = class Angel extends CocoClass
         @doWork()
 
       else
-        @log "Received unsupported message:", event.data
+        @log 'Received unsupported message:', event.data
 
   beholdGoalStates: (goalStates) ->
     return if @aborting
@@ -124,37 +125,37 @@ module.exports = class Angel extends CocoClass
     @doWork()
 
   finalizePreload: ->
-    @say "Finalize preload."
+    @say 'Finalize preload.'
     @worker.postMessage func: 'finalizePreload'
 
   infinitelyLooped: =>
-    @say "On infinitely looped! Aborting?", @aborting
+    @say 'On infinitely looped! Aborting?', @aborting
     return if @aborting
-    problem = type: "runtime", level: "error", id: "runtime_InfiniteLoop", message: "Code never finished. It's either really slow or has an infinite loop."
+    problem = type: 'runtime', level: 'error', id: 'runtime_InfiniteLoop', message: 'Code never finished. It\'s either really slow or has an infinite loop.'
     Backbone.Mediator.publish 'god:user-code-problem', problem: problem
     Backbone.Mediator.publish 'god:infinite-loop', firstWorld: @shared.firstWorld
     @fireWorker()
 
   doWork: ->
     return if @aborting
-    return @say "Not initialized for work yet." unless @initialized
+    return @say 'Not initialized for work yet.' unless @initialized
     if @shared.workQueue.length
       @work = @shared.workQueue.shift()
       return _.defer @simulateSync, @work if @work.synchronous
-      @say "Running world..."
+      @say 'Running world...'
       @running = true
       @shared.busyAngels.push @
       @worker.postMessage func: 'runWorld', args: @work
       clearTimeout @purgatoryTimer
-      @say "Infinite loop timer started at interval of", @infiniteLoopIntervalDuration
+      @say 'Infinite loop timer started at interval of', @infiniteLoopIntervalDuration
       @purgatoryTimer = setInterval @testWorker, @infiniteLoopIntervalDuration
     else
-      @say "No work to do."
+      @say 'No work to do.'
       @hireWorker()
 
   abort: ->
     return unless @worker and @running
-    @say "Aborting..."
+    @say 'Aborting...'
     @running = false
     @work = null
     _.remove @shared.busyAngels, @
@@ -171,14 +172,14 @@ module.exports = class Angel extends CocoClass
     @worker = null
     clearTimeout @condemnTimeout
     clearInterval @purgatoryTimer
-    @say "Fired worker."
+    @say 'Fired worker.'
     @initialized = false
     @work = null
     @hireWorker() if rehire
 
   hireWorker: ->
     return if @worker
-    @say "Hiring worker."
+    @say 'Hiring worker.'
     @worker = new Worker @shared.workerCode
     @worker.addEventListener 'message', @onWorkerMessage
     @worker.creationTime = new Date()
@@ -198,7 +199,7 @@ module.exports = class Angel extends CocoClass
       testWorld.setGoalManager testGM
     @doSimulateWorld work
     console?.profileEnd?() if imitateIE9?
-    console.log "Construction:", (work.t1 - work.t0).toFixed(0), "ms. Simulation:", (work.t2 - work.t1).toFixed(0), "ms --", ((work.t2 - work.t1) / testWorld.frames.length).toFixed(3), "ms per frame, profiled."
+    console.log 'Construction:', (work.t1 - work.t0).toFixed(0), 'ms. Simulation:', (work.t2 - work.t1).toFixed(0), 'ms --', ((work.t2 - work.t1) / testWorld.frames.length).toFixed(3), 'ms per frame, profiled.'
 
     # If performance was really a priority in IE9, we would rework things to be able to skip this step.
     goalStates = testGM?.getGoalStates()
@@ -211,6 +212,7 @@ module.exports = class Angel extends CocoClass
   doSimulateWorld: (work) ->
     work.t1 = now()
     Math.random = work.testWorld.rand.randf  # so user code is predictable
+    Aether.replaceBuiltin('Math', Math)
     i = 0
     while i < work.testWorld.totalFrames
       frame = work.testWorld.getFrame i++
diff --git a/app/lib/AsyncCloner.coffee b/app/lib/AsyncCloner.coffee
index 7050d3452..9af166286 100644
--- a/app/lib/AsyncCloner.coffee
+++ b/app/lib/AsyncCloner.coffee
@@ -6,17 +6,17 @@
 #    super()
 #    @indexLists = []
 #    @initClone()
-#  
+#
 #  initClone: () ->
 #    @target = AsyncCloner.cloneToDepth(@source, @depth)
 #    @indexLists = [_.keys(@target)] if _.isObject @target
-#    
+#
 #  @cloneToDepth: (value, depth) ->
 #    value = _.clone(value)
 #    return value unless depth and _.isObject value
 #    value[key] = @cloneToDepth(value[key], depth-1) for key in _.keys value
 #    value
-#    
+#
 #  clone: ->
 #    while @indexLists.length
 #      #console.log 'Clone loop:', JSON.stringify @indexLists
@@ -25,7 +25,7 @@
 #      @cloneOne()
 #      @moveIndexForwardOne()
 #      break if @done() or @timeToSleep()
-#      
+#
 #  moveIndexForward: ->
 #    while @indexLists.length
 #      nextValue = @getNextValue()
@@ -34,7 +34,7 @@
 #          # push a new list if it's a collection
 #          @indexLists.push _.keys(nextValue)
 #          continue
-#        else 
+#        else
 #          break # we done, the next value needs to be deep cloned
 #      #console.log 'Skipping:', @getNextPath()
 #      @moveIndexForwardOne() # move past this value otherwise
@@ -44,15 +44,15 @@
 #    value = @target
 #    value = value[indexList[0]] for indexList in @indexLists
 #    value
-#    
+#
 #  getNextParent: ->
 #    parent = @target
 #    parent = parent[indexList[0]] for indexList in @indexLists[...-1]
 #    parent
-#    
+#
 #  getNextPath: ->
 #    (indexList[0] for indexList in @indexLists when indexList.length).join '.'
-#    
+#
 #  moveIndexForwardOne: ->
 #    @indexLists[@indexLists.length-1].shift() # move the index forward one
 #    # if we reached the end of an index list, trim down through all finished lists
@@ -69,7 +69,7 @@
 #    #console.log 'Deep Cloned:', @getNextPath()
 #
 #  done: -> not @indexLists.length
-#    
+#
 #  timeToSleep: -> false
 
 
@@ -79,4 +79,4 @@
     Clone that one, popping it off the list.
     If the last list is now empty, pop that list and every subsequent list if needed.
     Check for doneness, or timeout.
-###
\ No newline at end of file
+###
diff --git a/app/lib/AudioPlayer.coffee b/app/lib/AudioPlayer.coffee
index 40b07974d..3c6c73992 100644
--- a/app/lib/AudioPlayer.coffee
+++ b/app/lib/AudioPlayer.coffee
@@ -1,11 +1,11 @@
 CocoClass = require 'lib/CocoClass'
 cache = {}
-{me} = require('lib/auth')
+{me} = require 'lib/auth'
 
 # Top 20 obscene words (plus 'fiddlesticks') will trigger swearing Simlish with *beeps*.
 # Didn't like leaving so much profanity lying around in the source, so rot13'd.
-rot13 = (s) -> s.replace /[A-z]/g, (c) -> String.fromCharCode c.charCodeAt(0) + (if c.toUpperCase() <= "M" then 13 else -13)
-swears = (rot13 s for s in ["nefrubyr", "nffubyr", "onfgneq", "ovgpu", "oybbql", "obyybpxf", "ohttre", "pbpx", "penc", "phag", "qnza", "qnea", "qvpx", "qbhpur", "snt", "shpx", "cvff", "chffl", "fuvg", "fyhg", "svqqyrfgvpxf"])
+rot13 = (s) -> s.replace /[A-z]/g, (c) -> String.fromCharCode c.charCodeAt(0) + (if c.toUpperCase() <= 'M' then 13 else -13)
+swears = (rot13 s for s in ['nefrubyr', 'nffubyr', 'onfgneq', 'ovgpu', 'oybbql', 'obyybpxf', 'ohttre', 'pbpx', 'penc', 'phag', 'qnza', 'qnea', 'qvpx', 'qbhpur', 'snt', 'shpx', 'cvff', 'chffl', 'fuvg', 'fyhg', 'svqqyrfgvpxf'])
 
 createjs.Sound.registerPlugins([createjs.WebAudioPlugin, createjs.FlashPlugin, createjs.HTMLAudioPlugin])
 
@@ -129,7 +129,7 @@ class AudioPlayer extends CocoClass
     console.error 'Could not load sound', e
 
   notifyProgressChanged: ->
-    Backbone.Mediator.publish('audio-player:loaded', {sender:@})
+    Backbone.Mediator.publish('audio-player:loaded', {sender: @})
 
   getStatus: (src) ->
     return cache[src] or null
diff --git a/app/lib/Bus.coffee b/app/lib/Bus.coffee
index 63caba7f0..a79f6a67c 100644
--- a/app/lib/Bus.coffee
+++ b/app/lib/Bus.coffee
@@ -26,9 +26,9 @@ module.exports = Bus = class Bus extends CocoClass
     @notifyStateChanges()
 
   connect: ->
-    Backbone.Mediator.publish 'bus:connecting', {bus:@}
+    Backbone.Mediator.publish 'bus:connecting', {bus: @}
     Firebase.goOnline()
-    @fireRef = new Firebase(Bus.fireHost + "/" + @docName)
+    @fireRef = new Firebase(Bus.fireHost + '/' + @docName)
     @fireRef.once 'value', @onFireOpen
 
   onFireOpen: (snapshot) =>
@@ -36,7 +36,7 @@ module.exports = Bus = class Bus extends CocoClass
       console.log("Leaving '#{@docName}' because class has been destroyed.")
       return
     @init()
-    Backbone.Mediator.publish 'bus:connected', {bus:@}
+    Backbone.Mediator.publish 'bus:connected', {bus: @}
 
   disconnect: ->
     Firebase.goOffline()
@@ -49,7 +49,7 @@ module.exports = Bus = class Bus extends CocoClass
     @myConnection?.off()
     @myConnection = null
     @joined = false
-    Backbone.Mediator.publish 'bus:disconnected', {bus:@}
+    Backbone.Mediator.publish 'bus:disconnected', {bus: @}
 
   init: ->
     """
@@ -59,7 +59,7 @@ module.exports = Bus = class Bus extends CocoClass
     @firePlayersRef = @fireRef.child('players')
     @join()
     @listenForChanges()
-    @sendMessage("/me joined.", true)
+    @sendMessage('/me joined.', true)
 
   join: ->
     @joined = true
@@ -75,13 +75,13 @@ module.exports = Bus = class Bus extends CocoClass
     @firePlayersRef.on 'child_changed', @onPlayerChanged
 
   onChatAdded: (snapshot) =>
-    Backbone.Mediator.publish('bus:new-message', {message:snapshot.val(), bus:@})
+    Backbone.Mediator.publish('bus:new-message', {message: snapshot.val(), bus: @})
 
   onPlayerJoined: (snapshot) =>
     player = snapshot.val()
     return unless player.connected
     @players[player.id] = player
-    Backbone.Mediator.publish('bus:player-joined', {player:player, bus:@})
+    Backbone.Mediator.publish('bus:player-joined', {player: player, bus: @})
 
   onPlayerLeft: (snapshot) =>
     val = snapshot.val()
@@ -89,7 +89,7 @@ module.exports = Bus = class Bus extends CocoClass
     player = @players[val.id]
     return unless player
     delete @players[player.id]
-    Backbone.Mediator.publish('bus:player-left', {player:player, bus:@})
+    Backbone.Mediator.publish('bus:player-left', {player: player, bus: @})
 
   onPlayerChanged: (snapshot) =>
     player = snapshot.val()
@@ -97,7 +97,7 @@ module.exports = Bus = class Bus extends CocoClass
     @players[player.id] = player
     @onPlayerLeft(snapshot) if wasConnected and not player.connected
     @onPlayerJoined(snapshot) if player.connected and not wasConnected
-    Backbone.Mediator.publish('bus:player-states-changed', {states:@players, bus:@})
+    Backbone.Mediator.publish('bus:player-states-changed', {states: @players, bus: @})
 
   onMeSynced: =>
     @myConnection?.child('name').set(me.get('name'))
@@ -118,9 +118,9 @@ module.exports = Bus = class Bus extends CocoClass
   sendMessage: (content, system=false) ->
     MAX_MESSAGE_LENGTH = 400
     message =
-      content:content[... MAX_MESSAGE_LENGTH]
-      authorName:me.displayName()
-      authorID:me.id
+      content: content[... MAX_MESSAGE_LENGTH]
+      authorName: me.displayName()
+      authorID: me.id
       dateMade: new Date()
     message.system = system if system
     @fireChatRef.push(message)
@@ -128,7 +128,7 @@ module.exports = Bus = class Bus extends CocoClass
   # TEARDOWN
 
   destroy: ->
-    @sendMessage("/me left.", true) if @joined
+    @sendMessage('/me left.', true) if @joined
     delete Bus.activeBuses[@docName] if @docName of Bus.activeBuses
     @disconnect()
     super()
diff --git a/app/lib/CocoClass.coffee b/app/lib/CocoClass.coffee
index e29298b18..4922f9e5e 100644
--- a/app/lib/CocoClass.coffee
+++ b/app/lib/CocoClass.coffee
@@ -9,7 +9,7 @@ module.exports = class CocoClass
   @nicksUsed: {}
   @remainingNicks: []
   @nextNick: ->
-    return (@name or "CocoClass") + " " + classCount unless @nicks.length
+    return (@name or 'CocoClass') + ' ' + classCount unless @nicks.length
     @remainingNicks = if @remainingNicks.length then @remainingNicks else @nicks.slice()
     baseNick = @remainingNicks.splice(Math.floor(Math.random() * @remainingNicks.length), 1)[0]
     i = 0
diff --git a/app/lib/FacebookHandler.coffee b/app/lib/FacebookHandler.coffee
index 10a59c40c..61553d946 100644
--- a/app/lib/FacebookHandler.coffee
+++ b/app/lib/FacebookHandler.coffee
@@ -13,9 +13,6 @@ userPropsToSave =
 
 
 module.exports = FacebookHandler = class FacebookHandler extends CocoClass
-  constructor: ->
-    super()
-
   subscriptions:
     'facebook-logged-in':'onFacebookLogin'
     'facebook-logged-out': 'onFacebookLogout'
@@ -42,22 +39,18 @@ module.exports = FacebookHandler = class FacebookHandler extends CocoClass
       return
 
     oldEmail = me.get('email')
-    patch = {}
-    patch.firstName = r.first_name if r.first_name
-    patch.lastName = r.last_name if r.last_name
-    patch.gender = r.gender if r.gender
-    patch.email = r.email if r.email
-    patch.facebookID = r.id if r.id
-    me.set(patch)
-    patch._id = me.id
+    me.set('firstName', r.first_name) if r.first_name
+    me.set('lastName', r.last_name) if r.last_name
+    me.set('gender', r.gender) if r.gender
+    me.set('email', r.email) if r.email
+    me.set('facebookID', r.id) if r.id
 
     Backbone.Mediator.publish('logging-in-with-facebook')
     window.tracker?.trackEvent 'Facebook Login'
     window.tracker?.identify()
-    me.save(patch, {
-      patch: true
+    me.patch({
       error: backboneFailure,
-      url: "/db/user?facebookID=#{r.id}&facebookAccessToken=#{@authResponse.accessToken}"
+      url: "/db/user/#{me.id}?facebookID=#{r.id}&facebookAccessToken=#{@authResponse.accessToken}"
       success: (model) ->
         window.location.reload() if model.get('email') isnt oldEmail
     })
diff --git a/app/lib/GPlusHandler.coffee b/app/lib/GPlusHandler.coffee
index 4b8637b8c..997a25ab4 100644
--- a/app/lib/GPlusHandler.coffee
+++ b/app/lib/GPlusHandler.coffee
@@ -14,8 +14,8 @@ userPropsToSave =
 fieldsToFetch = 'displayName,gender,image,name(familyName,givenName),id'
 plusURL = '/plus/v1/people/me?fields='+fieldsToFetch
 revokeUrl = 'https://accounts.google.com/o/oauth2/revoke?token='
-clientID = "800329290710-j9sivplv2gpcdgkrsis9rff3o417mlfa.apps.googleusercontent.com"
-scope = "https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/userinfo.email"
+clientID = '800329290710-j9sivplv2gpcdgkrsis9rff3o417mlfa.apps.googleusercontent.com'
+scope = 'https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/userinfo.email'
 
 module.exports = GPlusHandler = class GPlusHandler extends CocoClass
   constructor: ->
@@ -32,7 +32,7 @@ module.exports = GPlusHandler = class GPlusHandler extends CocoClass
       # We need to check the current state, given our access token
       gapi.auth.setToken 'token', @accessToken
       session_state = @accessToken.session_state
-      gapi.auth.checkSessionState({client_id:clientID, session_state:session_state}, @onCheckedSessionState)
+      gapi.auth.checkSessionState({client_id: clientID, session_state: session_state}, @onCheckedSessionState)
     else
       # If we ran checkSessionState, it might return true, that the user is logged into Google, but has not authorized us
       @loggedIn = false
@@ -57,7 +57,7 @@ module.exports = GPlusHandler = class GPlusHandler extends CocoClass
 
     # email and profile data loaded separately
     @responsesComplete = 0
-    gapi.client.request(path:plusURL, callback:@onPersonEntityReceived)
+    gapi.client.request(path: plusURL, callback: @onPersonEntityReceived)
     gapi.client.load('oauth2', 'v2', =>
       gapi.client.oauth2.userinfo.get().execute(@onEmailReceived))
 
@@ -108,7 +108,7 @@ module.exports = GPlusHandler = class GPlusHandler extends CocoClass
   loadFriends: (friendsCallback) ->
     return friendsCallback() unless @loggedIn
     expiresIn = if @accessToken then parseInt(@accessToken.expires_at) - new Date().getTime()/1000 else -1
-    onReauthorized = => gapi.client.request({path:'/plus/v1/people/me/people/visible', callback: friendsCallback})
+    onReauthorized = => gapi.client.request({path: '/plus/v1/people/me/people/visible', callback: friendsCallback})
     if expiresIn < 0
       # TODO: this tries to open a popup window, which might not ever finish or work, so the callback may never be called.
       @reauthorize()
diff --git a/app/lib/God.coffee b/app/lib/God.coffee
index 622552e1b..ffe2ad726 100644
--- a/app/lib/God.coffee
+++ b/app/lib/God.coffee
@@ -8,7 +8,7 @@ CocoClass = require 'lib/CocoClass'
 Angel = require 'lib/Angel'
 
 module.exports = class God extends CocoClass
-  @nicks: ['Athena', 'Baldr', 'Crom', 'Dagr', 'Eris', 'Freyja', 'Great Gish', 'Hades', 'Ishtar', 'Janus', 'Khronos', 'Loki', 'Marduk', 'Negafook', 'Odin', 'Poseidon', 'Quetzalcoatl', 'Ra', 'Shiva', 'Thor', 'Umvelinqangi', 'Týr', 'Vishnu', 'Wepwawet', 'Xipe Totec', 'Yahweh', 'Zeus', '上帝', 'Tiamat', '盘古', 'Phoebe', 'Artemis', 'Osiris', "嫦娥", 'Anhur', 'Teshub', 'Enlil', 'Perkele', 'Chaos', 'Hera', 'Iris', 'Theia', 'Uranus', 'Stribog', 'Sabazios', 'Izanagi', 'Ao', 'Tāwhirimātea', 'Tengri', 'Inmar', 'Torngarsuk', 'Centzonhuitznahua', 'Hunab Ku', 'Apollo', 'Helios', 'Thoth', 'Hyperion', 'Alectrona', 'Eos', 'Mitra', 'Saranyu', 'Freyr', 'Koyash', 'Atropos', 'Clotho', 'Lachesis', 'Tyche', 'Skuld', 'Urðr', 'Verðandi', 'Camaxtli', 'Huhetotl', 'Set', 'Anu', 'Allah', 'Anshar', 'Hermes', 'Lugh', 'Brigit', 'Manannan Mac Lir', 'Persephone', 'Mercury', 'Venus', 'Mars', 'Azrael', 'He-Man', 'Anansi', 'Issek', 'Mog', 'Kos', 'Amaterasu Omikami', 'Raijin', 'Susanowo', 'Blind Io', 'The Lady', 'Offler', 'Ptah', 'Anubis', 'Ereshkigal', 'Nergal', 'Thanatos', 'Macaria', 'Angelos', 'Erebus', 'Hecate', 'Hel', 'Orcus', 'Ishtar-Deela Nakh', 'Prometheus', 'Hephaestos', 'Sekhmet', 'Ares', 'Enyo', 'Otrera', 'Pele', 'Hadúr', 'Hachiman', 'Dayisun Tngri', 'Ullr', 'Lua', 'Minerva']
+  @nicks: ['Athena', 'Baldr', 'Crom', 'Dagr', 'Eris', 'Freyja', 'Great Gish', 'Hades', 'Ishtar', 'Janus', 'Khronos', 'Loki', 'Marduk', 'Negafook', 'Odin', 'Poseidon', 'Quetzalcoatl', 'Ra', 'Shiva', 'Thor', 'Umvelinqangi', 'Týr', 'Vishnu', 'Wepwawet', 'Xipe Totec', 'Yahweh', 'Zeus', '上帝', 'Tiamat', '盘古', 'Phoebe', 'Artemis', 'Osiris', '嫦娥', 'Anhur', 'Teshub', 'Enlil', 'Perkele', 'Chaos', 'Hera', 'Iris', 'Theia', 'Uranus', 'Stribog', 'Sabazios', 'Izanagi', 'Ao', 'Tāwhirimātea', 'Tengri', 'Inmar', 'Torngarsuk', 'Centzonhuitznahua', 'Hunab Ku', 'Apollo', 'Helios', 'Thoth', 'Hyperion', 'Alectrona', 'Eos', 'Mitra', 'Saranyu', 'Freyr', 'Koyash', 'Atropos', 'Clotho', 'Lachesis', 'Tyche', 'Skuld', 'Urðr', 'Verðandi', 'Camaxtli', 'Huhetotl', 'Set', 'Anu', 'Allah', 'Anshar', 'Hermes', 'Lugh', 'Brigit', 'Manannan Mac Lir', 'Persephone', 'Mercury', 'Venus', 'Mars', 'Azrael', 'He-Man', 'Anansi', 'Issek', 'Mog', 'Kos', 'Amaterasu Omikami', 'Raijin', 'Susanowo', 'Blind Io', 'The Lady', 'Offler', 'Ptah', 'Anubis', 'Ereshkigal', 'Nergal', 'Thanatos', 'Macaria', 'Angelos', 'Erebus', 'Hecate', 'Hel', 'Orcus', 'Ishtar-Deela Nakh', 'Prometheus', 'Hephaestos', 'Sekhmet', 'Ares', 'Enyo', 'Otrera', 'Pele', 'Hadúr', 'Hachiman', 'Dayisun Tngri', 'Ullr', 'Lua', 'Minerva']
 
   subscriptions:
     'tome:cast-spells': 'onTomeCast'
@@ -98,7 +98,7 @@ module.exports = class God extends CocoClass
   retrieveValueFromFrame: (args) =>
     return if @destroyed
     return unless args.thangID and args.spellID and args.variableChain
-    return console.error "Tried to retrieve debug value with no currentUserCodeMap" unless @currentUserCodeMap
+    return console.error 'Tried to retrieve debug value with no currentUserCodeMap' unless @currentUserCodeMap
     @debugWorker ?= @createDebugWorker()
     args.frame ?= @angelsShare.world.age / @angelsShare.world.dt
     @debugWorker.postMessage
@@ -124,6 +124,8 @@ module.exports = class God extends CocoClass
         console.log "|#{@nick}'s debugger|", event.data.args...
       when 'debug-value-return'
         Backbone.Mediator.publish 'god:debug-value-return', event.data.serialized
+      when 'debug-world-load-progress-changed'
+        Backbone.Mediator.publish 'god:debug-world-load-progress-changed', event.data
 
   onNewWorldCreated: (e) ->
     @currentUserCodeMap = @filterUserCodeMapWhenFromWorld e.world.userCodeMap
diff --git a/app/lib/LevelBus.coffee b/app/lib/LevelBus.coffee
index 9693df01c..845020c8d 100644
--- a/app/lib/LevelBus.coffee
+++ b/app/lib/LevelBus.coffee
@@ -22,13 +22,13 @@ module.exports = class LevelBus extends Bus
     'tome:spell-changed': 'onSpellChanged'
     'tome:spell-created': 'onSpellCreated'
     'application:idle-changed': 'onIdleChanged'
-    
+
   constructor: ->
     super(arguments...)
     @changedSessionProperties = {}
     @saveSession = _.debounce(@saveSession, 1000, {maxWait: 5000})
     @playerIsIdle = false
-    
+
   init: ->
     super()
     @fireScriptsRef = @fireRef?.child('scripts')
@@ -36,15 +36,15 @@ module.exports = class LevelBus extends Bus
   setSession: (@session) ->
     @listenTo(@session, 'change:multiplayer', @onMultiplayerChanged)
     @timerIntervalID = setInterval(@incrementSessionPlaytime, 1000)
-    
+
   onIdleChanged: (e) ->
     @playerIsIdle = e.idle
 
   incrementSessionPlaytime: =>
     if @playerIsIdle then return
     @changedSessionProperties.playtime = true
-    @session.set("playtime",@session.get("playtime") + 1)
-    
+    @session.set('playtime', @session.get('playtime') + 1)
+
   onPoint: ->
     return true unless @session?.get('multiplayer')
     super()
@@ -123,7 +123,7 @@ module.exports = class LevelBus extends Bus
     @changedSessionProperties.teamSpells = true
     @session.set({'teamSpells': @teamSpellMap})
     @saveSession()
-    if spellTeam is me.team or spellTeam is "common"
+    if spellTeam is me.team or spellTeam is 'common'
       @onSpellChanged e  # Save the new spell to the session, too.
 
   onScriptStateChanged: (e) ->
@@ -224,7 +224,7 @@ module.exports = class LevelBus extends Bus
 
   saveSession: ->
     return if _.isEmpty @changedSessionProperties
-    # don't let peaking admins mess with the session accidentally
+    # don't let peeking admins mess with the session accidentally
     return unless @session.get('multiplayer') or @session.get('creator') is me.id
     Backbone.Mediator.publish 'level:session-will-save', session: @session
     patch = {}
@@ -233,7 +233,7 @@ module.exports = class LevelBus extends Bus
 
     # since updates are coming fast and loose for session objects
     # don't let what the server returns overwrite changes since the save began
-    tempSession = new LevelSession _id:@session.id
+    tempSession = new LevelSession _id: @session.id
     tempSession.save(patch, {patch: true})
 
   destroy: ->
diff --git a/app/lib/LevelLoader.coffee b/app/lib/LevelLoader.coffee
index 2c0b98fff..59332b64e 100644
--- a/app/lib/LevelLoader.coffee
+++ b/app/lib/LevelLoader.coffee
@@ -48,7 +48,7 @@ module.exports = class LevelLoader extends CocoClass
     # Apparently the jingle, when it tries to play immediately during all this loading, you can't hear it.
     # Add the timeout to fix this weird behavior.
     f = ->
-      jingles = ["ident_1", "ident_2"]
+      jingles = ['ident_1', 'ident_2']
       AudioPlayer.playInterfaceSound jingles[Math.floor Math.random() * jingles.length]
     setTimeout f, 500
 
@@ -63,7 +63,7 @@ module.exports = class LevelLoader extends CocoClass
       url += "?team=#{@team}" if @team
 
     session = new LevelSession().setURL url
-    @sessionResource = @supermodel.loadModel(session, 'level_session', {cache:false})
+    @sessionResource = @supermodel.loadModel(session, 'level_session', {cache: false})
     @session = @sessionResource.model
     @session.once 'sync', -> @url = -> '/db/level.session/' + @id
 
@@ -151,7 +151,7 @@ module.exports = class LevelLoader extends CocoClass
       continue if thangType.isFullyLoaded()
       thangType.fetch()
       thangType = @supermodel.loadModel(thangType, 'thang').model
-      res = @supermodel.addSomethingResource "sprite_sheet", 5
+      res = @supermodel.addSomethingResource 'sprite_sheet', 5
       res.thangType = thangType
       res.markLoading()
       @spriteSheetsToBuild.push res
@@ -246,7 +246,7 @@ module.exports = class LevelLoader extends CocoClass
         break
     unless @teamConfigs
       # Hack: pulled from Alliance System code. TODO: put in just one place.
-      @teamConfigs = {"humans":{"superteam":"humans","color":{"hue":0,"saturation":0.75,"lightness":0.5},"playable":true},"ogres":{"superteam":"ogres","color":{"hue":0.66,"saturation":0.75,"lightness":0.5},"playable":false},"neutral":{"superteam":"neutral","color":{"hue":0.33,"saturation":0.75,"lightness":0.5}}}
+      @teamConfigs = {'humans': {'superteam': 'humans', 'color': {'hue': 0, 'saturation': 0.75, 'lightness': 0.5}, 'playable': true}, 'ogres': {'superteam': 'ogres', 'color': {'hue': 0.66, 'saturation': 0.75, 'lightness': 0.5}, 'playable': false}, 'neutral': {'superteam': 'neutral', 'color': {'hue': 0.33, 'saturation': 0.75, 'lightness': 0.5}}}
     @teamConfigs
 
   buildSpriteSheet: (thangType, options) ->
@@ -263,13 +263,13 @@ module.exports = class LevelLoader extends CocoClass
     @world.levelSessionIDs = if @opponentSessionID then [@sessionID, @opponentSessionID] else [@sessionID]
     serializedLevel = @level.serialize(@supermodel)
     @world.loadFromLevel serializedLevel, false
-    console.log "World has been initialized from level loader."
+    console.log 'World has been initialized from level loader.'
 
   # Initial Sound Loading
 
   loadAudio: ->
     return if @headless
-    AudioPlayer.preloadInterfaceSounds ["victory"]
+    AudioPlayer.preloadInterfaceSounds ['victory']
 
   loadLevelSounds: ->
     return if @headless
diff --git a/app/lib/LinkedInHandler.coffee b/app/lib/LinkedInHandler.coffee
index 69f9cb473..ed322f2c2 100644
--- a/app/lib/LinkedInHandler.coffee
+++ b/app/lib/LinkedInHandler.coffee
@@ -12,13 +12,20 @@ module.exports = LinkedInHandler = class LinkedInHandler extends CocoClass
     'linkedin-loaded': 'onLinkedInLoaded'
 
   onLinkedInLoaded: (e) ->
-    IN.Event.on IN, "auth", @onLinkedInAuth
+    IN.Event.on IN, 'auth', @onLinkedInAuth
 
-  onLinkedInAuth: (e) => console.log "Authorized with LinkedIn"
+  onLinkedInAuth: (e) => console.log 'Authorized with LinkedIn'
 
   constructEmployerAgreementObject: (cb) =>
-    IN.API.Profile("me")
-    .fields(["positions","public-profile-url","id","first-name","last-name","email-address"])
+    IN.API.Profile('me')
+    .fields(['positions', 'public-profile-url', 'id', 'first-name', 'last-name', 'email-address'])
+    .error(cb)
+    .result (profiles) =>
+      cb null, profiles.values[0]
+
+  getProfileData: (cb) =>
+    IN.API.Profile('me')
+    .fields(['formatted-name', 'educations', 'skills', 'headline', 'summary', 'positions', 'public-profile-url'])
     .error(cb)
     .result (profiles) =>
       cb null, profiles.values[0]
diff --git a/app/lib/LocalMongo.coffee b/app/lib/LocalMongo.coffee
new file mode 100644
index 000000000..2027e1c70
--- /dev/null
+++ b/app/lib/LocalMongo.coffee
@@ -0,0 +1,47 @@
+LocalMongo = module.exports
+
+# Checks whether func(l, r) is true for at least one value of left for at least one value of right
+mapred = (left, right, func) ->
+  _.reduce(left, ((result, singleLeft) ->
+    result or (_.reduce (_.map right, (singleRight) -> func(singleLeft, singleRight)),
+      ((intermediate, value) -> intermediate or value), false)), false)
+
+doQuerySelector = (value, operatorObj) ->
+  value = [value] unless _.isArray value # left hand can be an array too
+  for operator, body of operatorObj
+    body = [body] unless _.isArray body # right hand can be an array too
+    switch operator
+      when '$gt' then return false unless mapred value, body, (l, r) -> l > r
+      when '$gte' then return false unless mapred value, body, (l, r) -> l >= r
+      when '$lt' then return false unless mapred value, body, (l, r) -> l < r
+      when '$lte' then return false unless mapred value, body, (l, r) -> l <= r
+      when '$ne' then return false if mapred value, body, (l, r) -> l == r
+      when '$in' then return false unless _.reduce value, ((result, val) -> result or val in body), false
+      when '$nin' then return false if _.reduce value, ((result, val) -> result or val in body), false
+      when '$exists' then return false if value[0]? isnt body[0]
+      else return false
+  true
+
+matchesQuery = (target, queryObj) ->
+  return true unless queryObj
+  for prop, query of queryObj
+    if prop[0] == '$'
+      switch prop
+        when '$or' then return false unless _.reduce query, ((res, obj) -> res or matchesQuery target, obj), false
+        when '$and' then return false unless _.reduce query, ((res, obj) -> res and matchesQuery target, obj), true
+        else return false
+    else
+      # Do nested properties
+      pieces = prop.split('.')
+      obj = target
+      for piece in pieces
+        unless piece of obj
+          obj = null
+          break
+        obj = obj[piece]
+      if typeof query != 'object' or _.isArray query
+        return false unless obj == query or (query in obj if _.isArray obj)
+      else return false unless doQuerySelector obj, query
+  true
+
+LocalMongo.matchesQuery = matchesQuery
diff --git a/app/lib/NameLoader.coffee b/app/lib/NameLoader.coffee
index ce3fe5520..122becf7e 100644
--- a/app/lib/NameLoader.coffee
+++ b/app/lib/NameLoader.coffee
@@ -4,12 +4,12 @@ namesCache = {}
 
 class NameLoader extends CocoClass
   loadNames: (ids) ->
-    toLoad = (id for id in ids when not namesCache[id])
+    toLoad = _.uniq (id for id in ids when not namesCache[id])
     return false unless toLoad.length
     jqxhrOptions = {
-      url: '/db/user/x/names', 
-      type:'POST', 
-      data:{ids:toLoad}, 
+      url: '/db/user/x/names',
+      type: 'POST',
+      data: {ids: toLoad},
       success: @loadedNames
     }
 
@@ -17,7 +17,7 @@ class NameLoader extends CocoClass
 
   loadedNames: (newNames) =>
     _.extend namesCache, newNames
-    
-  getName: (id) -> namesCache[id].name
+
+  getName: (id) -> namesCache[id]?.name or id
 
 module.exports = new NameLoader()
diff --git a/app/lib/Router.coffee b/app/lib/Router.coffee
index ed689780c..357c56ddc 100644
--- a/app/lib/Router.coffee
+++ b/app/lib/Router.coffee
@@ -1,4 +1,4 @@
-gplusClientID = "800329290710-j9sivplv2gpcdgkrsis9rff3o417mlfa.apps.googleusercontent.com"
+gplusClientID = '800329290710-j9sivplv2gpcdgkrsis9rff3o417mlfa.apps.googleusercontent.com'
 
 go = (path) -> -> @routeDirectly path, arguments
 
@@ -16,7 +16,9 @@ module.exports = class CocoRouter extends Backbone.Router
     # editor views tend to have the same general structure
     'editor/:model(/:slug_or_id)(/:subview)': 'editorModelView'
 
-    # Experimenting with direct links
+    # Direct links
+    'test/*subpath': go('TestView')
+    'demo/*subpath': go('DemoView')
     'play/ladder/:levelID': go('play/ladder/ladder_view')
     'play/ladder': go('play/ladder_home')
 
@@ -73,16 +75,16 @@ module.exports = class CocoRouter extends Backbone.Router
     gapi.plusone.go?()  # Handles +1 button
     for gplusButton in $('.gplus-login-button')
       params = {
-        callback:"signinCallback",
-        clientid:gplusClientID,
-        cookiepolicy:"single_host_origin",
-        scope:"https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/userinfo.email",
-        height: "short",
+        callback: 'signinCallback',
+        clientid: gplusClientID,
+        cookiepolicy: 'single_host_origin',
+        scope: 'https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/userinfo.email',
+        height: 'short',
       }
       if gapi.signin?.render
         gapi.signin.render(gplusButton, params)
       else
-        console.warn "Didn't have gapi.signin to render G+ login button. (DoNotTrackMe extension?)"
+        console.warn 'Didn\'t have gapi.signin to render G+ login button. (DoNotTrackMe extension?)'
 
   getViewFromCache: (route) ->
     if route of @cache
@@ -93,6 +95,8 @@ module.exports = class CocoRouter extends Backbone.Router
     return view
 
   routeDirectly: (path, args) ->
+    if window.currentView?.reloadOnClose
+      return document.location.reload()
     path = "views/#{path}"
     ViewClass = @tryToLoadModule path
     return @showNotFound() if not ViewClass
@@ -102,7 +106,7 @@ module.exports = class CocoRouter extends Backbone.Router
 
   getView: (route, suffix='_view') ->
     # iteratively breaks down the url pieces looking for the view
-    # passing the broken off pieces as args. This way views like "resource/14394893"
+    # passing the broken off pieces as args. This way views like 'resource/14394893'
     # will get passed to the resource view with arg '14394893'
     pieces = _.string.words(route, '/')
     split = Math.max(1, pieces.length-1)
diff --git a/app/lib/SystemNameLoader.coffee b/app/lib/SystemNameLoader.coffee
index f23dbe491..c25abb914 100644
--- a/app/lib/SystemNameLoader.coffee
+++ b/app/lib/SystemNameLoader.coffee
@@ -5,6 +5,6 @@ namesCache = {}
 class SystemNameLoader extends CocoClass
   getName: (id) -> namesCache[id]?.name
 
-  setName: (system) -> namesCache[system.get('original')] = {name:system.get('name')}
+  setName: (system) -> namesCache[system.get('original')] = {name: system.get('name')}
 
 module.exports = new SystemNameLoader()
diff --git a/app/lib/Tracker.coffee b/app/lib/Tracker.coffee
index a21a7820c..fd51ecead 100644
--- a/app/lib/Tracker.coffee
+++ b/app/lib/Tracker.coffee
@@ -5,14 +5,14 @@ debugAnalytics = false
 module.exports = class Tracker
   constructor: ->
     if window.tracker
-      console.error "Overwrote our Tracker!", window.tracker
+      console.error 'Overwrote our Tracker!', window.tracker
     window.tracker = @
-    @isProduction = document.location.href.search("codecombat.com") isnt -1
+    @isProduction = document.location.href.search('codecombat.com') isnt -1
     @identify()
     @updateOlark()
 
   identify: (traits) ->
-    console.log "Would identify", traits if debugAnalytics
+    console.log 'Would identify', traits if debugAnalytics
     return unless me and @isProduction and analytics?
     # https://segment.io/docs/methods/identify
     traits ?= {}
@@ -23,8 +23,8 @@ module.exports = class Tracker
   updateOlark: ->
     return unless me and olark?
     olark 'api.chat.updateVisitorStatus', snippet: ["User ID: #{me.id}"]
-    return if me.get("anonymous")
-    olark 'api.visitor.updateEmailAddress', emailAddress: me.get("email") if me.get('email')
+    return if me.get('anonymous')
+    olark 'api.visitor.updateEmailAddress', emailAddress: me.get('email') if me.get('email')
     olark 'api.chat.updateVisitorNickname', snippet: me.displayName()
 
   updatePlayState: (level, session) ->
@@ -41,13 +41,13 @@ module.exports = class Tracker
   trackPageView: ->
     return unless @isProduction and analytics?
     url = Backbone.history.getFragment()
-    console.log "Going to track visit for", "/#{url}" if debugAnalytics
+    console.log 'Going to track visit for', "/#{url}" if debugAnalytics
     analytics.pageview "/#{url}"
 
   trackEvent: (event, properties, includeProviders=null) =>
-    console.log "Would track analytics event:", event, properties if debugAnalytics
+    console.log 'Would track analytics event:', event, properties if debugAnalytics
     return unless me and @isProduction and analytics?
-    console.log "Going to track analytics event:", event, properties if debugAnalytics
+    console.log 'Going to track analytics event:', event, properties if debugAnalytics
     properties = properties or {}
     context = {}
     if includeProviders
@@ -60,5 +60,5 @@ module.exports = class Tracker
   trackTiming: (duration, category, variable, label, samplePercentage=5) ->
     # https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingTiming
     return console.warn "Duration #{duration} invalid for trackTiming call." unless duration >= 0 and duration < 60 * 60 * 1000
-    console.log "Would track timing event:", arguments if debugAnalytics
+    console.log 'Would track timing event:', arguments if debugAnalytics
     window._gaq?.push ['_trackTiming', category, variable, duration, label, samplePercentage]
diff --git a/app/lib/auth.coffee b/app/lib/auth.coffee
index acc899af5..b19fbc668 100644
--- a/app/lib/auth.coffee
+++ b/app/lib/auth.coffee
@@ -5,19 +5,20 @@ BEEN_HERE_BEFORE_KEY = 'beenHereBefore'
 
 init = ->
   module.exports.me = window.me = new User(window.userObject) # inserted into main.html
+  module.exports.me.onLoaded()
   trackFirstArrival()
   if me and not me.get('testGroupNumber')?
     # Assign testGroupNumber to returning visitors; new ones in server/routes/auth
     me.set 'testGroupNumber', Math.floor(Math.random() * 256)
-    me.save()
+    me.patch()
 
-  Backbone.listenTo(me, 'sync', Backbone.Mediator.publish('me:synced', {me:me}))
+  Backbone.listenTo(me, 'sync', Backbone.Mediator.publish('me:synced', {me: me}))
 
 module.exports.createUser = (userObject, failure=backboneFailure, nextURL=null) ->
   user = new User(userObject)
   user.notyErrors = false
   user.save({}, {
-    error: (model,jqxhr,options) ->
+    error: (model, jqxhr, options) ->
       error = parseServerError(jqxhr.responseText)
       property = error.property if error.property
       if jqxhr.status is 409 and property is 'name'
@@ -33,14 +34,14 @@ module.exports.createUserWithoutReload = (userObject, failure=backboneFailure) -
   user.save({}, {
     error: failure
     success: ->
-      Backbone.Mediator.publish("created-user-without-reload")
+      Backbone.Mediator.publish('created-user-without-reload')
   })
 
 module.exports.loginUser = (userObject, failure=genericFailure) ->
   jqxhr = $.post('/auth/login',
     {
-      username:userObject.email,
-      password:userObject.password
+      username: userObject.email,
+      password: userObject.password
     },
     (model) -> window.location.reload()
   )
diff --git a/app/lib/contact.coffee b/app/lib/contact.coffee
index ade94f2e9..4e1422b59 100644
--- a/app/lib/contact.coffee
+++ b/app/lib/contact.coffee
@@ -2,8 +2,8 @@ module.exports.sendContactMessage = (contactMessageObject, modal) ->
   modal.find('.sending-indicator').show()
   jqxhr = $.post '/contact', contactMessageObject, (response) ->
     modal.find('.sending-indicator').hide()
-    modal.find('#contact-message').val("Thanks!")
+    modal.find('#contact-message').val('Thanks!')
     _.delay ->
-      modal.find('#contact-message').val("")
+      modal.find('#contact-message').val('')
       modal.modal 'hide'
     , 1000
diff --git a/app/lib/deltas.coffee b/app/lib/deltas.coffee
index e97d659e9..48ea32cfa 100644
--- a/app/lib/deltas.coffee
+++ b/app/lib/deltas.coffee
@@ -1,23 +1,23 @@
 SystemNameLoader = require 'lib/SystemNameLoader'
-### 
+###
   Good-to-knows:
     dataPath: an array of keys that walks you up a JSON object that's being patched
       ex: ['scripts', 0, 'description']
     deltaPath: an array of keys that walks you up a JSON Diff Patch object.
       ex: ['scripts', '_0', 'description']
 ###
-  
+
 module.exports.expandDelta = (delta, left, schema) ->
   flattenedDeltas = flattenDelta(delta)
   (expandFlattenedDelta(fd, left, schema) for fd in flattenedDeltas)
-  
+
 
 flattenDelta = (delta, dataPath=null, deltaPath=null) ->
   # takes a single jsondiffpatch delta and returns an array of objects with
   return [] unless delta
   dataPath ?= []
   deltaPath ?= []
-  return [{dataPath:dataPath, deltaPath: deltaPath, o:delta}] if _.isArray delta
+  return [{dataPath: dataPath, deltaPath: deltaPath, o: delta}] if _.isArray delta
 
   results = []
   affectingArray = delta._t is 'a'
@@ -27,12 +27,12 @@ flattenDelta = (delta, dataPath=null, deltaPath=null) ->
     results = results.concat flattenDelta(
       childDelta, dataPath.concat([dataIndex]), deltaPath.concat([deltaIndex]))
   results
-  
+
 
 expandFlattenedDelta = (delta, left, schema) ->
   # takes a single flattened delta and converts into an object that can be
   # easily formatted into something human readable.
-  
+
   delta.action = '???'
   o = delta.o # the raw jsondiffpatch delta
 
@@ -80,58 +80,72 @@ expandFlattenedDelta = (delta, left, schema) ->
     humanPath.push humanKey
     parentLeft = childLeft
     parentSchema = childSchema
-    
+
   delta.humanPath = humanPath.join(' :: ')
   delta.schema = childSchema
   delta.left = childLeft
   delta.right = jsondiffpatch.patch childLeft, delta.o unless delta.action is 'moved-index'
-  
+
   delta
-  
+
 module.exports.makeJSONDiffer = ->
   hasher = (obj) -> obj.name || obj.id || obj._id || JSON.stringify(_.keys(obj))
-  jsondiffpatch.create({objectHash:hasher})
-    
+  jsondiffpatch.create({objectHash: hasher})
+
 module.exports.getConflicts = (headDeltas, pendingDeltas) ->
-  # headDeltas and pendingDeltas should be lists of deltas returned by interpretDelta
+  # headDeltas and pendingDeltas should be lists of deltas returned by expandDelta
   # Returns a list of conflict objects with properties:
   #   headDelta
   #   pendingDelta
   # The deltas that have conflicts also have conflict properties pointing to one another.
-  
+
   headPathMap = groupDeltasByAffectingPaths(headDeltas)
   pendingPathMap = groupDeltasByAffectingPaths(pendingDeltas)
   paths = _.keys(headPathMap).concat(_.keys(pendingPathMap))
-  
+
   # Here's my thinking: conflicts happen when one delta path is a substring of another delta path
   # So, sort paths from both deltas together, which will naturally make conflicts adjacent,
-  # and if one is identified, one path is from the headDeltas, the other is from pendingDeltas
+  # and if one is identified AND one path is from the headDeltas AND the other is from pendingDeltas
   # This is all to avoid an O(nm) brute force search.
-  
+
   conflicts = []
   paths.sort()
   for path, i in paths
-    continue if i + 1 is paths.length
-    nextPath = paths[i+1]
-    if nextPath.startsWith path
-      headDelta = (headPathMap[path] or headPathMap[nextPath])[0].delta
-      pendingDelta = (pendingPathMap[path] or pendingPathMap[nextPath])[0].delta
-      conflicts.push({headDelta:headDelta, pendingDelta:pendingDelta})
-      pendingDelta.conflict = headDelta
-      headDelta.conflict = pendingDelta
+    offset = 1
+    while i + offset < paths.length
+      # Look at the neighbor
+      nextPath = paths[i+offset]
+      offset += 1
+
+      # these stop being substrings of each other? Then conflict DNE
+      if not (nextPath.startsWith path) then break
+
+      # check if these two are from the same group, but we still need to check for more beyond
+      unless headPathMap[path] or headPathMap[nextPath] then continue
+      unless pendingPathMap[path] or pendingPathMap[nextPath] then continue
+
+      # Okay, we found two deltas from different groups which conflict
+      for headMetaDelta in (headPathMap[path] or headPathMap[nextPath])
+        headDelta = headMetaDelta.delta
+        for pendingMetaDelta in (pendingPathMap[path] or pendingPathMap[nextPath])
+          pendingDelta = pendingMetaDelta.delta
+          conflicts.push({headDelta: headDelta, pendingDelta: pendingDelta})
+          pendingDelta.conflict = headDelta
+          headDelta.conflict = pendingDelta
 
   return conflicts if conflicts.length
-  
+
 groupDeltasByAffectingPaths = (deltas) ->
   metaDeltas = []
   for delta in deltas
     conflictPaths = []
+    # We're being fairly liberal with what's a conflict, because the alternative is worse
     if delta.action is 'moved-index'
-      # every other action affects just the data path, but moved indexes affect a swath
-      indices = [delta.originalIndex, delta.destinationIndex]
-      indices.sort()
-      for index in _.range(indices[0], indices[1]+1)
-        conflictPaths.push delta.dataPath.slice(0, delta.dataPath.length-1).concat(index)
+      # If you moved items around in an array, mark the whole array as a gonner
+      conflictPaths.push delta.dataPath.slice(0, delta.dataPath.length-1)
+    else if delta.action in ['deleted', 'added'] and _.isNumber(delta.dataPath[delta.dataPath.length-1])
+      # If you remove or add items in an array, mark the whole thing as a gonner
+      conflictPaths.push delta.dataPath.slice(0, delta.dataPath.length-1)
     else
       conflictPaths.push delta.dataPath
     for path in conflictPaths
@@ -139,35 +153,21 @@ groupDeltasByAffectingPaths = (deltas) ->
         delta: delta
         path: (item.toString() for item in path).join('/')
       }
-  
+
   map = _.groupBy metaDeltas, 'path'
+  return map
 
-  # Turns out there are cases where a single delta can include paths
-  # that 'conflict' with each other, ie one is a substring of the other
-  # because of moved indices. To handle this case, go through and prune
-  # out all deeper paths that conflict with more shallow paths, so
-  # getConflicts path checking works properly.
-
-  paths = _.keys(map)
-  return map unless paths.length
-  paths.sort()
-  prunedMap = {}
-  previousPath = paths[0]
-  for path, i in paths
-    continue if i is 0
-    continue if path.startsWith previousPath
-    prunedMap[path] = map[path]
-    previousPath = path
-  
-  prunedMap
-  
 module.exports.pruneConflictsFromDelta = (delta, conflicts) ->
+  expandedDeltas = (conflict.pendingDelta for conflict in conflicts)
+  module.exports.pruneExpandedDeltasFromDelta delta, expandedDeltas
+
+module.exports.pruneExpandedDeltasFromDelta = (delta, expandedDeltas) ->
   # the jsondiffpatch delta mustn't include any dangling nodes,
   # or else things will get removed which shouldn't be, or errors will occur
-  for conflict in conflicts
-    prunePath delta, conflict.pendingDelta.deltaPath
+  for expandedDelta in expandedDeltas
+    prunePath delta, expandedDelta.deltaPath
   if _.isEmpty delta then undefined else delta
-    
+
 prunePath = (delta, path) ->
   if path.length is 1
     delete delta[path]
diff --git a/app/lib/errors.coffee b/app/lib/errors.coffee
index 8e7fe4203..04a0c8fd5 100644
--- a/app/lib/errors.coffee
+++ b/app/lib/errors.coffee
@@ -1,16 +1,16 @@
-errorModalTemplate = require('templates/modal/error')
-{applyErrorsToForm} = require('lib/forms')
+errorModalTemplate = require 'templates/modal/error'
+{applyErrorsToForm} = require 'lib/forms'
 
 module.exports.parseServerError = (text) ->
   try
-    error = JSON.parse(text) or {message:"Unknown error."}
+    error = JSON.parse(text) or {message: 'Unknown error.'}
   catch SyntaxError
-    error = {message:text or "Unknown error."}
+    error = {message: text or 'Unknown error.'}
   error = error[0] if _.isArray(error)
   error
 
 module.exports.genericFailure = (jqxhr) ->
-  Backbone.Mediator.publish('server-error', {response:jqxhr})
+  Backbone.Mediator.publish('server-error', {response: jqxhr})
   return connectionFailure() if not jqxhr.status
 
   error = module.exports.parseServerError(jqxhr.responseText)
@@ -24,8 +24,8 @@ module.exports.genericFailure = (jqxhr) ->
       existingForm.append($('<div class="alert alert-danger"></div>').text(error.message))
   else
     res = errorModalTemplate(
-      status:jqxhr.status
-      statusText:jqxhr.statusText
+      status: jqxhr.status
+      statusText: jqxhr.statusText
       message: message
     )
     showErrorModal(res)
@@ -36,7 +36,7 @@ module.exports.backboneFailure = (model, jqxhr, options) ->
 module.exports.connectionFailure = connectionFailure = ->
   html = errorModalTemplate(
     status: 0
-    statusText:'Connection Gone'
+    statusText: 'Connection Gone'
     message: 'No response from the CoCo servers, captain.'
   )
   showErrorModal(html)
diff --git a/app/lib/forms.coffee b/app/lib/forms.coffee
index fd1e795c2..cd8eb7e13 100644
--- a/app/lib/forms.coffee
+++ b/app/lib/forms.coffee
@@ -16,13 +16,13 @@ module.exports.applyErrorsToForm = (el, errors) ->
     if error.dataPath
       prop = error.dataPath[1..]
       message = error.message
-      
+
     else
       message = "#{error.property} #{error.message}."
       message = message[0].toUpperCase() + message[1..]
       message = error.message if error.formatted
       prop = error.property
-      
+
     input = $("[name='#{prop}']", el)
     if not input.length
       missingErrors.push(error)
@@ -34,5 +34,5 @@ module.exports.applyErrorsToForm = (el, errors) ->
 
 module.exports.clearFormAlerts = (el) ->
   $('.has-error', el).removeClass('has-error')
-  $('.alert', el).remove()
-  el.find('.help-block.error-help-block').remove()
\ No newline at end of file
+  $('.alert.alert-danger', el).remove()
+  el.find('.help-block.error-help-block').remove()
diff --git a/app/lib/image_filter.coffee b/app/lib/image_filter.coffee
index 4c1a5f93e..11bf70d76 100644
--- a/app/lib/image_filter.coffee
+++ b/app/lib/image_filter.coffee
@@ -6,9 +6,9 @@ Filters.getPixels = (img) ->
   c = @getCanvas(img.naturalWidth, img.naturalHeight)
   ctx = c.getContext('2d')
   ctx.drawImage(img, 0, 0)
-  return ctx.getImageData(0,0,c.width,c.height)
+  return ctx.getImageData(0, 0, c.width, c.height)
 
-Filters.getCanvas = (w,h) ->
+Filters.getCanvas = (w, h) ->
   c = document.createElement('canvas')
   c.width = w
   c.height = h
@@ -34,7 +34,7 @@ module.exports.darkenImage = darkenImage = (img, pct=0.5) ->
   return img.src = cachedValue if cachedValue
   jqimg.data('original', img.src) unless jqimg.data('original')
   if not (img.naturalWidth > 0 and img.naturalHeight > 0)
-    console.warn "Tried to darken image", img, "but it has natural dimensions", img.naturalWidth, img.naturalHeight
+    console.warn 'Tried to darken image', img, 'but it has natural dimensions', img.naturalWidth, img.naturalHeight
     return img
   imageData = Filters.filterImage(Filters.brightness, img, pct)
   c = Filters.getCanvas(img.naturalWidth, img.naturalHeight)
diff --git a/app/lib/requireUtils.coffee b/app/lib/requireUtils.coffee
new file mode 100644
index 000000000..66940517a
--- /dev/null
+++ b/app/lib/requireUtils.coffee
@@ -0,0 +1,48 @@
+module.exports.getParentFolders = (subPath, urlPrefix='/test/') ->
+  return [] unless subPath
+  paths = []
+  parts = subPath.split('/')
+  while parts.length
+    parts.pop()
+    paths.unshift {
+      name: parts[parts.length-1] or 'All'
+      url: urlPrefix + parts.join('/')
+    }
+  paths
+
+module.exports.parseImmediateChildren = (allChildren, subPath, baseRequirePath='test/app/', urlPrefix='/test/') ->
+  return [] unless allChildren
+  folders = {}
+  files = {}
+
+  requirePrefix = baseRequirePath + subPath
+  if requirePrefix[requirePrefix.length-1] isnt '/'
+    requirePrefix += '/'
+
+  for f in allChildren
+    f = f[requirePrefix.length..]
+    continue unless f
+    parts = f.split('/')
+    name = parts[0]
+    group = if parts.length is 1 then files else folders
+    group[name] ?= 0
+    group[name] += 1
+
+  children = []
+  urlPrefix += subPath
+  urlPrefix += '/' if urlPrefix[urlPrefix.length-1] isnt '/'
+
+  for name in _.keys(folders)
+    children.push {
+      type: 'folder',
+      url: urlPrefix+name
+      name: name+'/'
+      size: folders[name]
+    }
+  for name in _.keys(files)
+    children.push {
+      type: 'file',
+      url: urlPrefix+name
+      name: name
+    }
+  children
diff --git a/app/lib/scripts/DOMScriptModule.coffee b/app/lib/scripts/DOMScriptModule.coffee
index a74af6930..041dbcc7c 100644
--- a/app/lib/scripts/DOMScriptModule.coffee
+++ b/app/lib/scripts/DOMScriptModule.coffee
@@ -15,8 +15,8 @@ module.exports = class DOMScriptModule extends ScriptModule
 
   endNotes: ->
     notes = []
-    notes.push({ 'channel': 'end-level-highlight-dom' }) if @noteGroup.dom.highlight?
-    notes.push({ 'channel': 'level-enable-controls' }) if @noteGroup.dom.lock?
+    notes.push({'channel': 'end-level-highlight-dom'}) if @noteGroup.dom.highlight?
+    notes.push({'channel': 'level-enable-controls'}) if @noteGroup.dom.lock?
     return notes
 
   skipNotes: ->
@@ -60,7 +60,7 @@ module.exports = class DOMScriptModule extends ScriptModule
     lock = @noteGroup.dom.lock
     event.controls = lock if _.isArray lock  # array: subset of controls
     channel = if lock then 'level-disable-controls' else 'level-enable-controls'
-    return { channel: channel, event: event }
+    return {channel: channel, event: event}
 
   letterboxNote: ->
-    return { channel: 'level-set-letterbox', event: { on: @noteGroup.dom.letterbox } }
\ No newline at end of file
+    return {channel: 'level-set-letterbox', event: {on: @noteGroup.dom.letterbox}}
diff --git a/app/lib/scripts/ScriptManager.coffee b/app/lib/scripts/ScriptManager.coffee
index e50e392d1..0ba6ae9bd 100644
--- a/app/lib/scripts/ScriptManager.coffee
+++ b/app/lib/scripts/ScriptManager.coffee
@@ -2,6 +2,7 @@
 
 
 CocoClass = require 'lib/CocoClass'
+CocoView = require 'views/kinds/CocoView'
 {scriptMatchesEventPrereqs} = require './../world/script_event_prereqs'
 
 allScriptModules = []
@@ -47,9 +48,8 @@ module.exports = ScriptManager = class ScriptManager extends CocoClass
   constructor: (options) ->
     super(options)
     @originalScripts = options.scripts
-    @view = options.view
     @session = options.session
-    @debugScripts = @view.getQueryVariable 'dev'
+    @debugScripts = CocoView.getQueryVariable 'dev'
     @initProperties()
     @addScriptSubscriptions()
     @beginTicking()
@@ -76,10 +76,10 @@ module.exports = ScriptManager = class ScriptManager extends CocoClass
       script.id = (idNum++).toString() unless script.id
       callback = makeCallback(script.channel) # curry in the channel argument
       @addNewSubscription(script.channel, callback)
-      
+
   beginTicking: ->
     @tickInterval = setInterval @tick, 5000
-    
+
   tick: =>
     scriptStates = {}
     now = new Date()
@@ -87,7 +87,7 @@ module.exports = ScriptManager = class ScriptManager extends CocoClass
       scriptStates[script.id] =
         timeSinceLastEnded: (if script.lastEnded then now - script.lastEnded else 0) / 1000
         timeSinceLastTriggered: (if script.lastTriggered then now - script.lastTriggered else 0) / 1000
-    
+
     stateEvent =
       scriptRunning: @currentNoteGroup?.scriptID or ''
       noteGroupRunning: @currentNoteGroup?.name or ''
@@ -123,7 +123,7 @@ module.exports = ScriptManager = class ScriptManager extends CocoClass
     for scriptID in scriptsToSkip
       script = _.find @scripts, {id: scriptID}
       unless script
-        console.warn "Couldn't find script for", scriptID, "from scripts", @scripts, "when restoring session scripts."
+        console.warn 'Couldn\'t find script for', scriptID, 'from scripts', @scripts, 'when restoring session scripts.'
         continue
       continue if script.repeats # repeating scripts are not 'rerun'
       @triggered.push(scriptID)
@@ -210,7 +210,7 @@ module.exports = ScriptManager = class ScriptManager extends CocoClass
     noteGroup.script ?= {}
     noteGroup.script.yields ?= true
     noteGroup.script.skippable ?= true
-    noteGroup.modules = (new Module(noteGroup, @view) for Module in allScriptModules when Module.neededFor(noteGroup))
+    noteGroup.modules = (new Module(noteGroup) for Module in allScriptModules when Module.neededFor(noteGroup))
 
   endYieldingNote: ->
     if @scriptInProgress and @currentNoteGroup?.script.yields
diff --git a/app/lib/scripts/ScriptModule.coffee b/app/lib/scripts/ScriptModule.coffee
index 169122799..466e0ebc7 100644
--- a/app/lib/scripts/ScriptModule.coffee
+++ b/app/lib/scripts/ScriptModule.coffee
@@ -1,31 +1,31 @@
 CocoClass = require 'lib/CocoClass'
 
 module.exports = class ScriptModule extends CocoClass
-  
+
   scrubbingTime = 0
   movementTime = 0
-  
-  constructor: (@noteGroup, @view) ->
+
+  constructor: (@noteGroup) ->
     super()
     if not @noteGroup.prepared
       @analyzeNoteGroup(noteGroup)
       @noteGroup.notes ?= []
       @noteGroup.prepared = true
-  
+
   # subclass should overwrite these
-  
+
   @neededFor: -> false
   startNotes: -> []
   endNotes: -> []
   skipNotes: -> @endNotes()
-  
+
   # common logic
-  
+
   analyzeNoteGroup: ->
     # some notes need to happen after others. Calculate the delays
     @movementTime = @calculateMovementMax(@noteGroup)
     @scrubbingTime = @noteGroup.playback?.scrub?.duration or 0
-        
+
   calculateMovementMax: ->
     sums = {}
     for sprite in @noteGroup.sprites
@@ -36,4 +36,4 @@ module.exports = class ScriptModule extends CocoClass
     Math.max(0, sums...)
 
   maybeApplyDelayToNote: (note) ->
-    note.delay = (@scrubbingTime + @movementTime) or 0
\ No newline at end of file
+    note.delay = (@scrubbingTime + @movementTime) or 0
diff --git a/app/lib/scripts/SoundScriptModule.coffee b/app/lib/scripts/SoundScriptModule.coffee
index 4c9282c2a..616c07f88 100644
--- a/app/lib/scripts/SoundScriptModule.coffee
+++ b/app/lib/scripts/SoundScriptModule.coffee
@@ -26,7 +26,7 @@ module.exports = class SoundScriptModule extends ScriptModule
       channel: 'level-suppress-selection-sounds'
       event: {suppress: @noteGroup.sound.suppressSelectionSounds}
     return note
-    
+
   addMusicNote: ->
     note =
       channel: 'level-play-music'
diff --git a/app/lib/scripts/SpriteScriptModule.coffee b/app/lib/scripts/SpriteScriptModule.coffee
index 84585e0f3..bff0d3c28 100644
--- a/app/lib/scripts/SpriteScriptModule.coffee
+++ b/app/lib/scripts/SpriteScriptModule.coffee
@@ -45,7 +45,7 @@ module.exports = class SpritesScriptModule extends ScriptModule
       event:
         message: text
         blurb: blurb
-        mood: sprite.say.mood or "explain"
+        mood: sprite.say.mood or 'explain'
         responses: responses
         spriteID: sprite.id
         sound: sound
diff --git a/app/lib/services/facebook.coffee b/app/lib/services/facebook.coffee
new file mode 100644
index 000000000..e4e08d52d
--- /dev/null
+++ b/app/lib/services/facebook.coffee
@@ -0,0 +1,42 @@
+module.exports = initializeFacebook = ->
+  # Additional JS functions here
+  window.fbAsyncInit = ->
+    FB.init
+      appId: (if document.location.origin is 'http://localhost:3000' then '607435142676437' else '148832601965463') # App ID
+      channelUrl: document.location.origin + '/channel.html' # Channel File
+      status: true # check login status
+      cookie: true # enable cookies to allow the server to access the session
+      xfbml: true # parse XFBML
+
+    Backbone.Mediator.publish 'fbapi-loaded'
+
+    # This is fired for any auth related change, such as login, logout or session refresh.
+    FB.Event.subscribe 'auth.authResponseChange', (response) ->
+
+      # Here we specify what we do with the response anytime this event occurs.
+      if response.status is 'connected'
+
+        # They have logged in to the app.
+        Backbone.Mediator.publish 'facebook-logged-in',
+          response: response
+
+      else if response.status is 'not_authorized'
+        #
+      else
+	      #
+
+  # Load the SDK asynchronously
+  ((d) ->
+    js = undefined
+    id = 'facebook-jssdk'
+    ref = d.getElementsByTagName('script')[0]
+    return  if d.getElementById(id)
+    js = d.createElement('script')
+    js.id = id
+    js.async = true
+    js.src = '//connect.facebook.net/en_US/all.js'
+
+    #js.src = '//connect.facebook.net/en_US/all/debug.js'
+    ref.parentNode.insertBefore js, ref
+    return
+  ) document
diff --git a/app/lib/services/filepicker.coffee b/app/lib/services/filepicker.coffee
new file mode 100644
index 000000000..d3b0f6c9b
--- /dev/null
+++ b/app/lib/services/filepicker.coffee
@@ -0,0 +1,29 @@
+module.exports = initializeFilepicker = ->
+  ((a) ->
+    return if window.filepicker
+    b = a.createElement('script')
+    b.type = 'text/javascript'
+    b.async = not 0
+    b.src = ((if 'https:' is a.location.protocol then 'https:' else 'http:')) + '//api.filepicker.io/v1/filepicker.js'
+    c = a.getElementsByTagName('script')[0]
+    c.parentNode.insertBefore b, c
+    d = {}
+    d._queue = []
+    e = 'pick,pickMultiple,pickAndStore,read,write,writeUrl,export,convert,store,storeUrl,remove,stat,setKey,constructWidget,makeDropPane'.split(',')
+    f = (a, b) ->
+      ->
+        b.push [
+          a
+          arguments
+        ]
+        return
+
+    g = 0
+
+    while g < e.length
+      d[e[g]] = f(e[g], d._queue)
+      g++
+    d.setKey('AvlkNoldcTOU4PvKi2Xm7z')
+    window.filepicker = d
+    return
+  ) document
diff --git a/app/lib/services/google.coffee b/app/lib/services/google.coffee
new file mode 100644
index 000000000..0e470a375
--- /dev/null
+++ b/app/lib/services/google.coffee
@@ -0,0 +1,16 @@
+module.exports = initializeGoogle = ->
+  window.onGPlusLoaded = ->
+    Backbone.Mediator.publish 'gapi-loaded'
+    return
+  window.signinCallback = (authResult) ->
+    Backbone.Mediator.publish 'gplus-logged-in', authResult if authResult['access_token']
+    return
+  (->
+    po = document.createElement('script')
+    po.type = 'text/javascript'
+    po.async = true
+    po.src = 'https://apis.google.com/js/client:plusone.js?onload=onGPlusLoaded'
+    s = document.getElementsByTagName('script')[0]
+    s.parentNode.insertBefore po, s
+    return
+  )()
diff --git a/app/lib/services/linkedin.coffee b/app/lib/services/linkedin.coffee
new file mode 100644
index 000000000..9a6f0b37f
--- /dev/null
+++ b/app/lib/services/linkedin.coffee
@@ -0,0 +1,9 @@
+module.exports = initializeLinkedIn = ->
+  window.linkedInAsyncInit = ->
+    console.log 'Linkedin async init success!'
+    Backbone.Mediator.publish 'linkedin-loaded'
+
+  linkedInSnippet =
+    ''
+
+  $('head').append(linkedInSnippet)
diff --git a/app/lib/services/olark.coffee b/app/lib/services/olark.coffee
new file mode 100644
index 000000000..c91f3a89f
--- /dev/null
+++ b/app/lib/services/olark.coffee
@@ -0,0 +1,115 @@
+module.exports = initializeOlark = ->
+  window.olark or ((c) -> #<![CDATA[
+    f = window
+    d = document
+    l = (if f.location.protocol is 'https:' then 'https:' else 'http:')
+    z = c.name
+    r = 'load'
+    nt = ->
+      s = ->
+        a.P r
+        f[z] r
+        return
+      f[z] = ->
+        (a.s = a.s or []).push arguments
+        return
+
+      a = f[z]._ = {}
+      q = c.methods.length
+      while q--
+        ((n) ->
+          f[z][n] = ->
+            f[z] 'call', n, arguments
+            return
+
+          return
+        ) c.methods[q]
+      a.l = c.loader
+      a.i = nt
+      a.p = 0: +new Date
+      a.P = (u) ->
+        a.p[u] = new Date - a.p[0]
+        return
+
+      (if f.addEventListener then f.addEventListener(r, s, false) else f.attachEvent('on' + r, s))
+      ld = ->
+        p = (hd) ->
+          hd = 'head'
+          [
+            '<'
+            hd
+            '></'
+            hd
+            '><'
+            i
+            ' onl' + 'oad=\"var d='
+            g
+            ";d.getElementsByTagName('head')[0]."
+            j
+            '(d.'
+            h
+            "('script'))."
+            k
+            "='"
+            l
+            '//'
+            a.l
+            "'"
+            '\"'
+            '></'
+            i
+            '>'
+          ].join ''
+        i = 'body'
+        m = d[i]
+        return setTimeout(ld, 100)  unless m
+        a.P 1
+        j = 'appendChild'
+        h = 'createElement'
+        k = 'src'
+        n = d[h]('div')
+        v = n[j](d[h](z))
+        b = d[h]('iframe')
+        g = 'document'
+        e = 'domain'
+        o = undefined
+        n.style.display = 'none'
+        m.insertBefore(n, m.firstChild).id = z
+        b.frameBorder = '0'
+        b.id = z + '-loader'
+        b.src = 'javascript:false' if /MSIE[ ]+6/.test(navigator.userAgent)
+        b.allowTransparency = 'true'
+        v[j] b
+        try
+          b.contentWindow[g].open()
+        catch w
+          c[e] = d[e]
+          o = 'javascript:var d=' + g + ".open();d.domain='" + d.domain + "';"
+          b[k] = o + 'void(0);'
+        try
+          t = b.contentWindow[g]
+          t.write p()
+          t.close()
+        catch x
+          b[k] = o + 'd.write(\"' + p().replace(/"/g, String.fromCharCode(92) + '\"') + '\");d.close();'
+        a.P 2
+        return
+
+      ld()
+      return
+
+    nt()
+    return
+  )(
+    loader: 'static.olark.com/jsclient/loader0.js'
+    name: 'olark'
+    methods: [
+      'configure'
+      'extend'
+      'declare'
+      'identify'
+    ]
+  )
+
+  # custom configuration goes here (www.olark.com/documentation)
+  olark.identify '1451-787-10-5544' #]]>
diff --git a/app/lib/services/segmentio.coffee b/app/lib/services/segmentio.coffee
new file mode 100644
index 000000000..565959690
--- /dev/null
+++ b/app/lib/services/segmentio.coffee
@@ -0,0 +1,40 @@
+module.exports = initializeSegmentio = ->
+  analytics = analytics or []
+  (->
+    e = [
+      'identify'
+      'track'
+      'trackLink'
+      'trackForm'
+      'trackClick'
+      'trackSubmit'
+      'page'
+      'pageview'
+      'ab'
+      'alias'
+      'ready'
+      'group'
+    ]
+    t = (e) ->
+      ->
+        analytics.push [e].concat(Array::slice.call(arguments, 0))
+        return
+
+    n = 0
+
+    while n < e.length
+      analytics[e[n]] = t(e[n])
+      n++
+    return
+  )()
+  analytics.load = (e) ->
+    t = document.createElement('script')
+    t.type = 'text/javascript'
+    t.async = not 0
+    t.src = ((if 'https:' is document.location.protocol then 'https://' else 'http://')) + 'd2dq2ahtl5zl1z.cloudfront.net/analytics.js/v1/' + e + '/analytics.min.js'
+
+    n = document.getElementsByTagName('script')[0]
+    n.parentNode.insertBefore t, n
+    return
+
+  analytics.load 'jsjzx9n4d2'
diff --git a/app/lib/services/twitter.coffee b/app/lib/services/twitter.coffee
new file mode 100644
index 000000000..a78c9e748
--- /dev/null
+++ b/app/lib/services/twitter.coffee
@@ -0,0 +1,12 @@
+module.exports = initializeTwitter = ->
+  ((d, s, id) ->
+    js = undefined
+    fjs = d.getElementsByTagName(s)[0]
+    p = (if /^http:/.test(d.location) then 'http' else 'https')
+    unless d.getElementById(id)
+      js = d.createElement(s)
+      js.id = id
+      js.src = p + '://platform.twitter.com/widgets.js'
+      fjs.parentNode.insertBefore js, fjs
+    return
+  ) document, 'script', 'twitter-wjs'
diff --git a/app/lib/simulator/Simulator.coffee b/app/lib/simulator/Simulator.coffee
index 31e456355..fbc235d02 100644
--- a/app/lib/simulator/Simulator.coffee
+++ b/app/lib/simulator/Simulator.coffee
@@ -8,7 +8,6 @@ Aether.addGlobal 'Vector', require 'lib/world/vector'
 Aether.addGlobal '_', _
 
 module.exports = class Simulator extends CocoClass
-
   constructor: (@options) ->
     @options ?= {}
     _.extend @, Backbone.Events
@@ -27,16 +26,20 @@ module.exports = class Simulator extends CocoClass
   fetchAndSimulateOneGame: (humanGameID, ogresGameID) =>
     return if @destroyed
     $.ajax
-      url: "/queue/scoring/getTwoGames"
-      type: "POST"
+      url: '/queue/scoring/getTwoGames'
+      type: 'POST'
       parse: true
       data:
-        "humansGameID": humanGameID
-        "ogresGameID": ogresGameID
+        'humansGameID': humanGameID
+        'ogresGameID': ogresGameID
       error: (errorData) ->
         console.warn "There was an error fetching two games! #{JSON.stringify errorData}"
       success: (taskData) =>
         return if @destroyed
+        unless taskData
+          @trigger 'statusUpdate', "No games to simulate. Trying another game in #{@retryDelayInSeconds} seconds."
+          @simulateAnotherTaskAfterDelay()
+          return
         @trigger 'statusUpdate', 'Setting up simulation...'
         #refactor this
         @task = new SimulationTask(taskData)
@@ -67,67 +70,64 @@ module.exports = class Simulator extends CocoClass
     @god.createWorld @generateSpellsObject()
 
   handleSingleSimulationError: (error) ->
-    console.error "There was an error simulating a single game!", error
-    if @options.headlessClient
-      console.log "GAMERESULT:tie"
+    console.error 'There was an error simulating a single game!', error
+    if @options.headlessClient and @options.simulateOnlyOneGame
+      console.log 'GAMERESULT:tie'
       process.exit(0)
-    @cleanupSimulation()
+    @cleanupAndSimulateAnotherTask()
 
   handleSingleSimulationInfiniteLoop: ->
-    console.log "There was an infinite loop in the single game!"
-    if @options.headlessClient
-      console.log "GAMERESULT:tie"
+    console.log 'There was an infinite loop in the single game!'
+    if @options.headlessClient and @options.simulateOnlyOneGame
+      console.log 'GAMERESULT:tie'
       process.exit(0)
-    @cleanupSimulation()
+    @cleanupAndSimulateAnotherTask()
 
   processSingleGameResults: (simulationResults) ->
     taskResults = @formTaskResultsObject simulationResults
-    console.log "Processing results:", taskResults
+    console.log 'Processing results:', taskResults
     humanSessionRank = taskResults.sessions[0].metrics.rank
     ogreSessionRank = taskResults.sessions[1].metrics.rank
-    if @options.headlessClient
+    if @options.headlessClient and @options.simulateOnlyOneGame
       if humanSessionRank is ogreSessionRank
-        console.log "GAMERESULT:tie"
+        console.log 'GAMERESULT:tie'
       else if humanSessionRank < ogreSessionRank
-        console.log "GAMERESULT:humans"
+        console.log 'GAMERESULT:humans'
       else if ogreSessionRank < humanSessionRank
-        console.log "GAMERESULT:ogres"
+        console.log 'GAMERESULT:ogres'
       process.exit(0)
     else
       @sendSingleGameBackToServer(taskResults)
 
-    @cleanupAndSimulateAnotherTask()
-
   sendSingleGameBackToServer: (results) ->
     @trigger 'statusUpdate', 'Simulation completed, sending results back to server!'
 
     $.ajax
-      url: "/queue/scoring/recordTwoGames"
+      url: '/queue/scoring/recordTwoGames'
       data: results
-      type: "PUT"
+      type: 'PUT'
       parse: true
       success: @handleTaskResultsTransferSuccess
       error: @handleTaskResultsTransferError
       complete: @cleanupAndSimulateAnotherTask
 
-
   fetchAndSimulateTask: =>
     return if @destroyed
 
     if @options.headlessClient
       if @dumpThisTime # The first heapdump would be useless to find leaks.
-        console.log "Writing snapshot."
+        console.log 'Writing snapshot.'
         @options.heapdump.writeSnapshot()
       @dumpThisTime = true if @options.heapdump
 
       if @options.testing
-        _.delay @setupSimulationAndLoadLevel, 0, @options.testFile, "Testing...", status: 400
+        _.delay @setupSimulationAndLoadLevel, 0, @options.testFile, 'Testing...', status: 400
         return
 
     @trigger 'statusUpdate', 'Fetching simulation data!'
     $.ajax
       url: @taskURL
-      type: "GET"
+      type: 'GET'
       parse: true
       error: @handleFetchTaskError
       success: @setupSimulationAndLoadLevel
@@ -137,13 +137,12 @@ module.exports = class Simulator extends CocoClass
     @trigger 'statusUpdate', 'There was an error fetching games to simulate. Retrying in 10 seconds.'
     @simulateAnotherTaskAfterDelay()
 
-
   handleNoGamesResponse: ->
     info = 'Finding game to simulate...'
     console.log info
     @trigger 'statusUpdate', info
     @fetchAndSimulateOneGame()
-    application.tracker?.trackEvent 'Simulator Result', label: "No Games"
+    application.tracker?.trackEvent 'Simulator Result', label: 'No Games', ['Google Analytics']
 
   simulateAnotherTaskAfterDelay: =>
     console.log "Retrying in #{@retryDelayInSeconds}"
@@ -182,7 +181,7 @@ module.exports = class Simulator extends CocoClass
     try
       @commenceSimulationAndSetupCallback()
     catch err
-      console.log "There was an error in simulation(#{err}). Trying again in #{@retryDelayInSeconds} seconds"
+      console.error 'There was an error in simulation:', err, "-- trying again in #{@retryDelayInSeconds} seconds"
       @simulateAnotherTaskAfterDelay()
 
   assignWorldAndLevelFromLevelLoaderAndDestroyIt: ->
@@ -203,11 +202,11 @@ module.exports = class Simulator extends CocoClass
     Backbone.Mediator.subscribeOnce 'god:goals-calculated', @processResults, @
     @god.createWorld @generateSpellsObject()
 
-    #Search for leaks, headless-client only.
+    # Search for leaks, headless-client only.
     if @options.headlessClient and @options.leakTest and not @memwatch?
       leakcount = 0
       maxleakcount = 0
-      console.log "Setting leak callbacks."
+      console.log 'Setting leak callbacks.'
       @memwatch = require 'memwatch'
 
       @memwatch.on 'leak', (info) =>
@@ -218,36 +217,40 @@ module.exports = class Simulator extends CocoClass
             @hd = new @memwatch.HeapDiff()
 
             @memwatch.on 'stats', (stats) =>
-              console.warn "stats callback: " + stats
+              console.warn 'stats callback: ' + stats
               diff = @hd.end()
               console.warn "HeapDiff:\n" + JSON.stringify(diff)
 
               if @options.exitOnLeak
-                console.warn "Exiting because of Leak."
+                console.warn 'Exiting because of Leak.'
                 process.exit()
               @hd = new @memwatch.HeapDiff()
 
   onInfiniteLoop: ->
-    console.warn "Skipping infinitely looping game."
+    console.warn 'Skipping infinitely looping game.'
     @trigger 'statusUpdate', "Infinite loop detected; grabbing a new game in #{@retryDelayInSeconds} seconds."
     _.delay @cleanupAndSimulateAnotherTask, @retryDelayInSeconds * 1000
 
   processResults: (simulationResults) ->
     taskResults = @formTaskResultsObject simulationResults
-    console.error "*** Error: taskResults has no taskID ***\ntaskResults:", taskResults, "\ntask:", @task unless taskResults.taskID
-    @sendResultsBackToServer taskResults
+    unless taskResults.taskID
+      console.error "*** Error: taskResults has no taskID ***\ntaskResults:", taskResults
+      @cleanupAndSimulateAnotherTask()
+    else
+      @sendResultsBackToServer taskResults
 
   sendResultsBackToServer: (results) ->
     @trigger 'statusUpdate', 'Simulation completed, sending results back to server!'
-    console.log "Sending result back to server:", results
+    console.log 'Sending result back to server:'
+    console.log JSON.stringify results
 
     if @options.headlessClient and @options.testing
       return @fetchAndSimulateTask()
 
     $.ajax
-      url: "/queue/scoring"
+      url: '/queue/scoring'
       data: results
-      type: "PUT"
+      type: 'PUT'
       parse: true
       success: @handleTaskResultsTransferSuccess
       error: @handleTaskResultsTransferError
@@ -257,12 +260,12 @@ module.exports = class Simulator extends CocoClass
     return if @destroyed
     console.log "Task registration result: #{JSON.stringify result}"
     @trigger 'statusUpdate', 'Results were successfully sent back to server!'
-    console.log "Simulated by you:", @simulatedByYou
+    console.log 'Simulated by you:', @simulatedByYou
     @simulatedByYou++
     unless @options.headlessClient
       simulatedBy = parseInt($('#simulated-by-you').text(), 10) + 1
       $('#simulated-by-you').text(simulatedBy)
-    application.tracker?.trackEvent 'Simulator Result', label: "Success"
+    application.tracker?.trackEvent 'Simulator Result', label: 'Success', ['Google Analytics']
 
   handleTaskResultsTransferError: (error) =>
     return if @destroyed
@@ -310,11 +313,11 @@ module.exports = class Simulator extends CocoClass
     humansWon = _.all humanGoals, {status: 'success'}
     if ogresWon is humansWon
       return 0
-    else if ogresWon and teamSessionMap["ogres"] is sessionID
+    else if ogresWon and teamSessionMap['ogres'] is sessionID
       return 0
-    else if ogresWon and teamSessionMap["ogres"] isnt sessionID
+    else if ogresWon and teamSessionMap['ogres'] isnt sessionID
       return 1
-    else if humansWon and teamSessionMap["humans"] is sessionID
+    else if humansWon and teamSessionMap['humans'] is sessionID
       return 0
     else
       return 1
@@ -365,14 +368,18 @@ module.exports = class Simulator extends CocoClass
     spellTeam = @task.getSpellKeyToTeamMap()[spellKey]
     playerTeams = @task.getPlayerTeams()
     useProtectAPI = true
-    if spellTeam not in playerTeams then useProtectAPI = false
-    @spells[spellKey].thangs[thang.id].aether = @createAether @spells[spellKey].name, method, useProtectAPI
-
+    if spellTeam not in playerTeams
+      useProtectAPI = false
+    else
+      spellSession = _.filter(@task.getSessions(), {team: spellTeam})[0]
+      unless codeLanguage = spellSession?.submittedCodeLanguage
+        console.warn 'Session', spellSession.creatorName, spellSession.team, 'didn\'t have submittedCodeLanguage, just:', spellSession
+    @spells[spellKey].thangs[thang.id].aether = @createAether @spells[spellKey].name, method, useProtectAPI, codeLanguage ? 'javascript'
 
   transpileSpell: (thang, spellKey, methodName) ->
     slugifiedThangID = _.string.slugify thang.id
     generatedSpellKey = [slugifiedThangID,methodName].join '/'
-    source = @currentUserCodeMap[generatedSpellKey] ? ""
+    source = @currentUserCodeMap[generatedSpellKey] ? ''
     aether = @spells[spellKey].thangs[thang.id].aether
     unless _.contains(@task.spellKeysToTranspile, generatedSpellKey)
       aether.pure = source
@@ -383,25 +390,26 @@ module.exports = class Simulator extends CocoClass
         console.log "Couldn't transpile #{spellKey}:\n#{source}\n", e
         aether.transpile ''
 
-  createAether: (methodName, method, useProtectAPI) ->
+  createAether: (methodName, method, useProtectAPI, codeLanguage) ->
     aetherOptions =
       functionName: methodName
       protectAPI: useProtectAPI
       includeFlow: false
-      yieldConditionally: methodName is "plan"
+      yieldConditionally: methodName is 'plan'
       globals: ['Vector', '_']
       problems:
-        jshint_W040: {level: "ignore"}
-        jshint_W030: {level: "ignore"}  # aether_NoEffect instead
+        jshint_W040: {level: 'ignore'}
+        jshint_W030: {level: 'ignore'}  # aether_NoEffect instead
         aether_MissingThis: {level: 'error'}
       #functionParameters: # TODOOOOO
       executionLimit: 1 * 1000 * 1000
-    if methodName is 'hear'
-      aetherOptions.functionParameters = ['speaker', 'message', 'data']
-    #console.log "creating aether with options", aetherOptions
+      language: codeLanguage
+    if methodName is 'hear' then aetherOptions.functionParameters = ['speaker', 'message', 'data']
+    if methodName is 'makeBid' then aetherOptions.functionParameters = ['tileGroupLetter']
+    if methodName is 'findCentroids' then aetherOptions.functionParameters = ['centroids']
+    #console.log 'creating aether with options', aetherOptions
     return new Aether aetherOptions
 
-
 class SimulationTask
   constructor: (@rawData) ->
     @spellKeyToTeamMap = {}
@@ -410,12 +418,12 @@ class SimulationTask
   getLevelName: ->
     levelName = @rawData.sessions?[0]?.levelID
     return levelName if levelName?
-    @throwMalformedTaskError "The level name couldn't be deduced from the task."
+    @throwMalformedTaskError 'The level name couldn\'t be deduced from the task.'
 
   generateTeamToSessionMap: ->
     teamSessionMap = {}
     for session in @rawData.sessions
-      @throwMalformedTaskError "Two players share the same team" if teamSessionMap[session.team]?
+      @throwMalformedTaskError 'Two players share the same team' if teamSessionMap[session.team]?
       teamSessionMap[session.team] = session.sessionID
 
     teamSessionMap
@@ -437,7 +445,6 @@ class SimulationTask
 
   setWorld: (@world) ->
 
-
   generateSpellKeyToSourceMap: ->
     playerTeams = _.pluck @rawData.sessions, 'team'
     spellKeyToSourceMap = {}
@@ -456,7 +463,7 @@ class SimulationTask
 
       for thangName, thangSpells of session.transpiledCode
         for spellName, spell of thangSpells
-          fullSpellName = [thangName,spellName].join '/'
+          fullSpellName = [thangName, spellName].join '/'
           if _.contains(teamSpells, fullSpellName)
             teamCode[fullSpellName]=spell
 
@@ -466,7 +473,6 @@ class SimulationTask
 
   getWorldProgrammableSource: (desiredSpellKey ,world) ->
     programmableThangs = _.filter world.thangs, 'isProgrammable'
-    language = @getSessions()[0]['codeLanguage'] ? me.get('aceConfig')?.language ? 'javascript'
     @spells ?= {}
     @thangSpells ?= {}
     for thang in programmableThangs
diff --git a/app/lib/sprites/SpriteBuilder.coffee b/app/lib/sprites/SpriteBuilder.coffee
index d0e73f17d..88639fe0d 100644
--- a/app/lib/sprites/SpriteBuilder.coffee
+++ b/app/lib/sprites/SpriteBuilder.coffee
@@ -14,7 +14,7 @@ module.exports = class SpriteBuilder
   buildMovieClip: (animationName, movieClipArgs...) ->
     animData = @animationStore[animationName]
     unless animData
-      console.error "couldn't find animData from", @animationStore, "for", animationName
+      console.error 'couldn\'t find animData from', @animationStore, 'for', animationName
       return null
     locals = {}
     _.extend locals, @buildMovieClipShapes(animData.shapes)
@@ -111,7 +111,7 @@ module.exports = class SpriteBuilder
     shape
 
   buildContainerFromStore: (containerKey) ->
-    console.error "Yo we don't have no", containerKey unless containerKey
+    console.error 'Yo we don\'t have no', containerKey unless containerKey
     contData = @containerStore[containerKey]
     cont = new createjs.Container()
     cont.initialize()
@@ -182,5 +182,4 @@ module.exports = class SpriteBuilder
       continue if (not shape.fc?) or not(colors[shape.fc])
       @colorMap[shapeKey] = hslToHex(colors[shape.fc])
 
-
 sum = (nums) -> _.reduce(nums, (s, num) -> s + num)
diff --git a/app/lib/sprites/SpriteParser.coffee b/app/lib/sprites/SpriteParser.coffee
index 0de48c013..ad6d74cb5 100644
--- a/app/lib/sprites/SpriteParser.coffee
+++ b/app/lib/sprites/SpriteParser.coffee
@@ -29,8 +29,8 @@ module.exports = class SpriteParser
   parse: (source) ->
     # Grab the library properties' width/height so we can subtract half of each from frame bounds
     properties = source.match(/.*lib\.properties = \{\n.*?width: (\d+),\n.*?height: (\d+)/im)
-    @width = parseInt(properties?[1] ? "0", 10)
-    @height = parseInt(properties?[2] ? "0", 10)
+    @width = parseInt(properties?[1] ? '0', 10)
+    @height = parseInt(properties?[2] ? '0', 10)
 
     options = {loc: false, range: true}
     ast = esprima.parse source, options
@@ -60,7 +60,7 @@ module.exports = class SpriteParser
         continue if gotIt
         for c in localContainers
           if c.bn is bn
-            instructions.push { t: c.t, gn: c.gn }
+            instructions.push {t: c.t, gn: c.gn}
             break
       @addContainer {c: instructions, b: container.bounds}, container.name
     for movieClip in movieClips
@@ -101,7 +101,7 @@ module.exports = class SpriteParser
     if not shortKey?
       shortKey = name
       if @thangType.containers[shortKey]?
-        shortKey = @animationName + ":" + name
+        shortKey = @animationName + ':' + name
       @thangType.containers[shortKey] = container
       @containerLongKeys[longKey] = shortKey
     @containerRenamings[name] = shortKey
@@ -115,7 +115,7 @@ module.exports = class SpriteParser
     else
       shortKey = name
       if @thangType.animations[shortKey]?
-        shortKey = @animationName + ":" + name
+        shortKey = @animationName + ':' + name
       @thangType.animations[shortKey] = animation
       @animationLongKeys[longKey] = shortKey
       @animationRenamings[name] = shortKey
@@ -173,7 +173,7 @@ module.exports = class SpriteParser
             frameBoundsRange = frameBoundsStatement.expression.right.range
             frameBoundsSource = @subSourceFromRange frameBoundsRange, source
             if frameBoundsSource.search(/\[rect/) is -1  # some other statement; we don't have multiframe bounds
-              console.log "Didn't have multiframe bounds for this movie clip."
+              console.log 'Didn\'t have multiframe bounds for this movie clip.'
               frameBounds = [nominalBounds]
             else
               lastRect = nominalBounds
@@ -204,10 +204,10 @@ module.exports = class SpriteParser
     functionExpressions
 
   ###
-    this.shape_1.graphics.f("#605E4A").s().p("AAOD/IgOgaIAEhkIgmgdIgMgBIgPgFIgVgJQA1h9g8jXQAQAHAOASQAQAUAKAeQARAuAJBJQAHA/gBA5IAAADIACAfIAFARIACAGIAEAHIAHAHQAVAXAQAUQAUAaANAUIABACIgsgdIgggXIAAAnIABAwIgBgBg");
+    this.shape_1.graphics.f('#605E4A').s().p('AAOD/IgOgaIAEhkIgmgdIgMgBIgPgFIgVgJQA1h9g8jXQAQAHAOASQAQAUAKAeQARAuAJBJQAHA/gBA5IAAADIACAfIAFARIACAGIAEAHIAHAHQAVAXAQAUQAUAaANAUIABACIgsgdIgggXIAAAnIABAwIgBgBg');
     this.shape_1.sett(23.2,30.1);
 
-    this.shape.graphics.f().s("#000000").ss(0.1,1,1).p("AAAAAQAAAAAAAA");
+    this.shape.graphics.f().s('#000000').ss(0.1,1,1).p('AAAAAQAAAAAAAA');
     this.shape.sett(3.8,22.4);
   ###
 
@@ -218,7 +218,7 @@ module.exports = class SpriteParser
       return unless node.type is 'NewExpression' and node.callee.property.name is 'Graphics'
       blockName = node.parent.parent.parent.id.name
       graphicsString = node.parent.parent.arguments[0].value
-      localGraphics.push({p:graphicsString, bn:blockName})
+      localGraphics.push {p:graphicsString, bn:blockName}
 
     @walk block, null, gatherShapeDefinitions
     return localGraphics
@@ -233,7 +233,7 @@ module.exports = class SpriteParser
       if not name
         name = node.parent?.parent?.id?.name
         return unless name and name.indexOf('mask') is 0 and node.property?.name is 'Shape'
-        shape = { bn: name, im: true }
+        shape = {bn: name, im: true}
         localShapes.push shape
         return
       return unless name.search('shape') is 0 and node.object.property?.name is 'graphics'
@@ -243,14 +243,14 @@ module.exports = class SpriteParser
         linearGradientFill = @grabFunctionArguments linearGradientFillSource.replace(/.*?lf\(/, 'lf('), true
       else
         fillColor = fillCall.arguments[0]?.value ? null
-        console.error "What is this?! Not a fill!" unless fillCall.callee.property.name is 'f'
+        console.error 'What is this?! Not a fill!' unless fillCall.callee.property.name is 'f'
       strokeCall = node.parent.parent.parent.parent
       if strokeCall.object.callee.property.name is 'ls'
         linearGradientStrokeSource = @subSourceFromRange strokeCall.parent.range, source
         linearGradientStroke = @grabFunctionArguments linearGradientStrokeSource.replace(/.*?ls\(/, 'ls(').replace(/\).ss\(.*/, ')'), true
       else
         strokeColor = strokeCall.object.arguments?[0]?.value ? null
-        console.error "What is this?! Not a stroke!" unless strokeCall.object.callee.property.name is 's'
+        console.error 'What is this?! Not a stroke!' unless strokeCall.object.callee.property.name is 's'
       strokeStyle = null
       graphicsStatement = strokeCall.parent
       if strokeColor or linearGradientStroke
@@ -264,7 +264,7 @@ module.exports = class SpriteParser
         drawEllipse = @grabFunctionArguments drawEllipseSource.replace(/.*?de\(/, 'de('), true
       else
         path = graphicsStatement.arguments?[0]?.value ? null
-        console.error "What is this?! Not a path!" unless graphicsStatement.callee.property.name is 'p'
+        console.error 'What is this?! Not a path!' unless graphicsStatement.callee.property.name is 'p'
       body = graphicsStatement.parent.parent.body
       graphicsStatementIndex = _.indexOf body, graphicsStatement.parent
       t = body[graphicsStatementIndex + 1].expression
@@ -295,8 +295,8 @@ module.exports = class SpriteParser
       shape.fc = fillColor if fillColor
       shape.lf = linearGradientFill if linearGradientFill
       shape.ls = linearGradientStroke if linearGradientStroke
-      if name.search('shape') isnt -1 and shape.fc is "rgba(0,0,0,0.451)" and not shape.ss and not shape.sc
-        console.log "Skipping a shadow", name, shape, "because we're doing shadows separately now."
+      if name.search('shape') isnt -1 and shape.fc is 'rgba(0,0,0,0.451)' and not shape.ss and not shape.sc
+        console.log 'Skipping a shadow', name, shape, 'because we\'re doing shadows separately now.'
         return
       shapeKeys.push shapeKey = @addShape shape
       localShape = {bn: name, gn: shapeKey}
@@ -372,17 +372,17 @@ module.exports = class SpriteParser
         return if name is 'get' and callExpressions.length # avoid Ease calls in the tweens
         flattenedRanges = _.flatten [a.range for a in node.arguments]
         range = [_.min(flattenedRanges), _.max(flattenedRanges)]
-        # Replace "this.<local>" references with just the "name"
+        # Replace 'this.<local>' references with just the 'name'
         argsSource = @subSourceFromRange(range, source)
         argsSource = argsSource.replace(/mask/g, 'this.mask') # so the mask thing will be handled correctly as a blockName in the next line
-        argsSource = argsSource.replace(/this\.([a-z_0-9]+)/ig, '"$1"') # turns this.shape literal to "shape" string
+        argsSource = argsSource.replace(/this\.([a-z_0-9]+)/ig, '"$1"') # turns this.shape literal to 'shape' string
         argsSource = argsSource.replace(/cjs(.+)\)/, '"createjs$1)"') # turns cjs.Ease.get(0.5)
 
         args = eval "[#{argsSource}]"
         shadowTween = args[0]?.search?('shape') is 0 and not _.find(localShapes, bn: args[0])
-        shadowTween = shadowTween or args[0]?.state?[0]?.t?.search?("shape") is 0 and not _.find(localShapes, bn: args[0].state[0].t)
+        shadowTween = shadowTween or args[0]?.state?[0]?.t?.search?('shape') is 0 and not _.find(localShapes, bn: args[0].state[0].t)
         if shadowTween
-          console.log "Skipping tween", name, argsSource, args, "from localShapes", localShapes, "presumably because it's a shadow we skipped."
+          console.log 'Skipping tween', name, argsSource, args, 'from localShapes', localShapes, 'presumably because it\'s a shadow we skipped.'
           return
         callExpressions.push {n: name, a: args}
       @walk node.parent.parent, null, gatherCallExpressions
@@ -395,7 +395,7 @@ module.exports = class SpriteParser
     block = block.expression.object.right.body
     localArgs = []
     gatherAddChildCalls = (node) =>
-      return unless node.type is "Identifier" and node.name is "addChild"
+      return unless node.type is 'Identifier' and node.name is 'addChild'
       args = node.parent.parent.arguments
       args = (arg.property.name for arg in args)
       localArgs.push arg for arg in args
@@ -427,18 +427,18 @@ var p; // shortcut to reference prototypes
 
   // Layer 7
   this.shape = new cjs.Shape();
-  this.shape.graphics.f("#4F6877").s().p("AgsAxQgSgVgB");
+  this.shape.graphics.f('#4F6877').s().p('AgsAxQgSgVgB');
   this.shape.setTransform(283.1,146.1);
 
   // Layer 7 2
   this.shape_1 = new cjs.Shape();
-  this.shape_1.graphics.f("rgba(255,255,255,0.4)").s().p("ArTs0QSMB7EbVGQhsBhiGBHQjg1IvVkhg");
+  this.shape_1.graphics.f('rgba(255,255,255,0.4)').s().p('ArTs0QSMB7EbVGQhsBhiGBHQjg1IvVkhg');
   this.shape_1.setTransform(400.2,185.5);
 
   this.timeline.addTween(cjs.Tween.get({}).to({state:[]}).to({state:[{t:this.shape}]},7).to({state:[]},2).wait(6));
 
   // Wing
-  this.instance_9 = new lib.Wing_Animation("synched",0);
+  this.instance_9 = new lib.Wing_Animation('synched',0);
   this.instance_9.setTransform(313.9,145.6,1,1,0,0,0,49,-83.5);
 
   this.timeline.addTween(cjs.Tween.get(this.instance_9).to({y:128,startPosition:7},7).wait(1));
@@ -455,11 +455,11 @@ p.nominalBounds = new cjs.Rectangle(7.1,48.9,528.7,431.1);
 
   // Isolation Mode
   this.shape = new cjs.Shape();
-  this.shape.graphics.f("#1D2226").s().p("AgVAwQgUgdgN");
+  this.shape.graphics.f('#1D2226').s().p('AgVAwQgUgdgN');
   this.shape.setTransform(75,25.8);
 
   this.shape_1 = new cjs.Shape();
-  this.shape_1.graphics.f("#1D2226").s().p("AgnBXQACABAF");
+  this.shape_1.graphics.f('#1D2226').s().p('AgnBXQACABAF');
   this.shape_1.setTransform(80.8,22);
 
   this.addChild(this.shape_1,this.shape);
@@ -471,15 +471,15 @@ p.nominalBounds = new cjs.Rectangle(5.8,0,87.9,85);
 
   // Layer 1
   this.shape = new cjs.Shape();
-  this.shape.graphics.f("#DBDDBC").s().p("Ag3BeQgCgRA");
+  this.shape.graphics.f('#DBDDBC').s().p('Ag3BeQgCgRA');
   this.shape.setTransform(10.6,19.7,1.081,1.081);
 
   this.shape_1 = new cjs.Shape();
-  this.shape_1.graphics.f("#1D2226").s().p("AB4CDQgGg");
+  this.shape_1.graphics.f('#1D2226').s().p('AB4CDQgGg');
   this.shape_1.setTransform(19.9,17.6,1.081,1.081);
 
   this.shape_2 = new cjs.Shape();
-  this.shape_2.graphics.f("#605E4A").s().p("AiECbQgRg");
+  this.shape_2.graphics.f('#605E4A').s().p('AiECbQgRg');
   this.shape_2.setTransform(19.5,18.4,1.081,1.081);
 
   this.addChild(this.shape_2,this.shape_1,this.shape);
diff --git a/app/lib/surface/Camera.coffee b/app/lib/surface/Camera.coffee
index 80817afb4..4a65f52db 100644
--- a/app/lib/surface/Camera.coffee
+++ b/app/lib/surface/Camera.coffee
@@ -8,7 +8,7 @@ d2r = (degrees) -> degrees / 180 * Math.PI
 MAX_ZOOM = 8
 MIN_ZOOM = 0.1
 DEFAULT_ZOOM = 2.0
-DEFAULT_TARGET = {x:0, y:0}
+DEFAULT_TARGET = {x: 0, y: 0}
 DEFAULT_TIME = 1000
 STANDARD_ZOOM_WIDTH = 924
 STANDARD_ZOOM_HEIGHT = 589
@@ -78,7 +78,7 @@ module.exports = class Camera extends CocoClass
       console.log "Restricted given horizontal field of view to #{r2d(hFOV)} to #{r2d(@hFOV)}."
     @vFOV = 2 * Math.atan(Math.tan(@hFOV / 2) * @canvasHeight / @canvasWidth)
     if @vFOV > Math.PI
-      console.log "Vertical field of view problem: expected canvas not to be taller than it is wide with high field of view."
+      console.log 'Vertical field of view problem: expected canvas not to be taller than it is wide with high field of view.'
       @vFOV = Math.PI - epsilon
 
   calculateAxisConversionFactors: ->
@@ -210,9 +210,9 @@ module.exports = class Camera extends CocoClass
     right = Math.max(worldBounds[0].x, worldBounds[1].x)
     bottom -= 1 if top is bottom
     right += 1 if left is right
-    p1 = @worldToSurface({x:left, y:top})
-    p2 = @worldToSurface({x:right, y:bottom})
-    {x:p1.x, y:p1.y, width:p2.x-p1.x, height:p2.y-p1.y}
+    p1 = @worldToSurface({x: left, y: top})
+    p2 = @worldToSurface({x: right, y: bottom})
+    {x: p1.x, y: p1.y, width: p2.x-p1.x, height: p2.y-p1.y}
 
   calculateMinMaxZoom: ->
     # Zoom targets are always done in Surface coordinates.
@@ -288,10 +288,13 @@ module.exports = class Camera extends CocoClass
   boundTarget: (pos, zoom) ->
     # Given an {x, y} in Surface coordinates, return one that will keep our viewport on the Surface.
     return pos unless @bounds
+    y = pos.y
+    if thang = pos.sprite?.thang
+      y = @worldToSurface(x: thang.pos.x, y: thang.pos.y).y  # ignore z
     marginX = (@canvasWidth / zoom / 2)
     marginY = (@canvasHeight / zoom / 2)
     x = Math.min(Math.max(marginX + @bounds.x, pos.x + @offset.x), @bounds.x + @bounds.width - marginX)
-    y = Math.min(Math.max(marginY + @bounds.y, pos.y + @offset.y), @bounds.y + @bounds.height - marginY)
+    y = Math.min(Math.max(marginY + @bounds.y, y + @offset.y), @bounds.y + @bounds.height - marginY)
     {x: x, y: y}
 
   updateViewports: (target) ->
@@ -311,6 +314,7 @@ module.exports = class Camera extends CocoClass
   lock: ->
     @target = @currentTarget
     @locked = true
+
   unlock: ->
     @locked = false
 
diff --git a/app/lib/surface/CameraBorder.coffee b/app/lib/surface/CameraBorder.coffee
index e315a25d8..16e7fbfe0 100644
--- a/app/lib/surface/CameraBorder.coffee
+++ b/app/lib/surface/CameraBorder.coffee
@@ -25,6 +25,6 @@ module.exports = class CameraBorder extends createjs.Container
     i = width
     while i
       opacity = 3 * (1 - (i/width)) / width
-      @border.graphics.setStrokeStyle(i,"round").beginStroke("rgba(0,0,0,#{opacity})").drawRect(bounds.x, bounds.y, bounds.width, bounds.height)
+      @border.graphics.setStrokeStyle(i, 'round').beginStroke("rgba(0,0,0,#{opacity})").drawRect(bounds.x, bounds.y, bounds.width, bounds.height)
       i -= 1
     @border.cache bounds.x, bounds.y, bounds.width, bounds.height
diff --git a/app/lib/surface/CastingScreen.coffee b/app/lib/surface/CastingScreen.coffee
index be4ac1f79..63eea858e 100644
--- a/app/lib/surface/CastingScreen.coffee
+++ b/app/lib/surface/CastingScreen.coffee
@@ -11,21 +11,21 @@ module.exports = class CastingScreen extends CocoClass
     options ?= {}
     @camera = options.camera
     @layer = options.layer
-    console.error @toString(), "needs a camera." unless @camera
-    console.error @toString(), "needs a layer." unless @layer
+    console.error @toString(), 'needs a camera.' unless @camera
+    console.error @toString(), 'needs a layer.' unless @layer
     @build()
 
   onCastingBegins: (e) -> @show() unless e.preload
   onCastingEnds: (e) -> @hide()
 
-  toString: -> "<CastingScreen>"
+  toString: -> '<CastingScreen>'
 
   build: ->
     @dimLayer = new createjs.Container()
     @dimLayer.mouseEnabled = @dimLayer.mouseChildren = false
     @dimLayer.layerIndex = -11
     @dimLayer.addChild @dimScreen = new createjs.Shape()
-    @dimScreen.graphics.beginFill("rgba(0,0,0,0.5)").rect 0, 0, @camera.canvasWidth, @camera.canvasHeight
+    @dimScreen.graphics.beginFill('rgba(0,0,0,0.5)').rect 0, 0, @camera.canvasWidth, @camera.canvasHeight
     @dimLayer.alpha = 0
     @layer.addChild @dimLayer
     @dimLayer.addChild @makeProgressBar()
@@ -34,7 +34,7 @@ module.exports = class CastingScreen extends CocoClass
   onWorldLoadProgressChanged: (e) ->
     if new Date().getTime() - @t0 > 500
       createjs.Tween.removeTweens @progressBar
-      createjs.Tween.get(@progressBar).to({scaleX:e.progress}, 200)
+      createjs.Tween.get(@progressBar).to({scaleX: e.progress}, 200)
 
   makeProgressBar: ->
     BAR_PIXEL_HEIGHT = 3
@@ -44,8 +44,8 @@ module.exports = class CastingScreen extends CocoClass
     barY = 3 * (@camera.canvasHeight / 5)
 
     g = new createjs.Graphics()
-    g.beginFill(createjs.Graphics.getRGB(255,255, 255))
-    g.drawRoundRect(0,0,pixelWidth, BAR_PIXEL_HEIGHT, 3)
+    g.beginFill(createjs.Graphics.getRGB(255, 255, 255))
+    g.drawRoundRect(0, 0, pixelWidth, BAR_PIXEL_HEIGHT, 3)
     @progressBar = new createjs.Shape(g)
     @progressBar.x = pixelMargin
     @progressBar.y = barY
@@ -54,7 +54,7 @@ module.exports = class CastingScreen extends CocoClass
 
   makeCastingText: ->
     size = @camera.canvasHeight / 15
-    text = new createjs.Text("Casting", "#{size}px cursive", "#aaaaaa")
+    text = new createjs.Text('Casting', "#{size}px cursive", '#aaaaaa')
     text.regX = text.getMeasuredWidth() / 2
     text.regY = text.getMeasuredHeight() / 2
     text.x = @camera.canvasWidth / 2
@@ -70,7 +70,7 @@ module.exports = class CastingScreen extends CocoClass
     @progressBar.scaleX = 0
     @dimLayer.alpha = 0
     createjs.Tween.removeTweens @dimLayer
-    createjs.Tween.get(@dimLayer).to({alpha:1}, 500)
+    createjs.Tween.get(@dimLayer).to({alpha: 1}, 500)
 
   hide: ->
     return unless @showing
@@ -78,4 +78,4 @@ module.exports = class CastingScreen extends CocoClass
 
     createjs.Tween.removeTweens @progressBar
     createjs.Tween.removeTweens @dimLayer
-    createjs.Tween.get(@dimLayer).to({alpha:0}, 500)
+    createjs.Tween.get(@dimLayer).to({alpha: 0}, 500)
diff --git a/app/lib/surface/CocoSprite.coffee b/app/lib/surface/CocoSprite.coffee
index 183d6aa65..1f18a4f6b 100644
--- a/app/lib/surface/CocoSprite.coffee
+++ b/app/lib/surface/CocoSprite.coffee
@@ -65,7 +65,7 @@ module.exports = CocoSprite = class CocoSprite extends CocoClass
     super()
     @options = _.extend($.extend(true, {}, @options), options)
     @setThang @options.thang
-    console.error @toString(), "has no ThangType!" unless @thangType
+    console.error @toString(), 'has no ThangType!' unless @thangType
 
     # this is a stub, use @setImageObject to swap it out for something else later
     @imageObject = new createjs.Container
@@ -94,7 +94,7 @@ module.exports = CocoSprite = class CocoSprite extends CocoClass
     else
       result = @buildSpriteSheet()
       if _.isString result # async build
-        @listenToOnce @thangType,  'build-complete', @setupSprite
+        @listenToOnce @thangType, 'build-complete', @setupSprite
       else
         @stillLoading = false
         @actions = @thangType.getActions()
@@ -171,7 +171,7 @@ module.exports = CocoSprite = class CocoSprite extends CocoClass
   onSurfaceTicked: (e) -> @age += e.dt
 
   playNextAction: =>
-    @playAction(@actionQueue.splice(0,1)[0]) if @actionQueue.length
+    @playAction(@actionQueue.splice(0, 1)[0]) if @actionQueue.length
 
   playAction: (action) ->
     return if @isRaster
@@ -180,7 +180,7 @@ module.exports = CocoSprite = class CocoSprite extends CocoClass
     @show()
     @updateBaseScale()
     return @updateActionDirection() unless action.animation or action.container
-    m = if action.container then "gotoAndStop" else "gotoAndPlay"
+    m = if action.container then 'gotoAndStop' else 'gotoAndPlay'
     @imageObject.framerate = action.framerate or 20
     @imageObject[m] action.name
     reg = @getOffset 'registration'
@@ -235,7 +235,7 @@ module.exports = CocoSprite = class CocoSprite extends CocoClass
 
       @handledDisplayEvents[event] = true
       args = JSON.parse(event[4...])
-      pos = @options.camera.worldToSurface {x:args[0], y:args[1]}
+      pos = @options.camera.worldToSurface {x: args[0], y: args[1]}
       circle = new createjs.Shape()
       circle.graphics.beginFill(args[3]).drawCircle(0, 0, args[2]*Camera.PPM)
       circle.x = pos.x
@@ -270,18 +270,17 @@ module.exports = CocoSprite = class CocoSprite extends CocoClass
       window.labels.push label
       label.alpha = 0
       createjs.Tween.get(label)
-        .to({y:label.y-2, alpha:1}, 200, createjs.Ease.linear)
-        .to({y:label.y-12}, 1000, createjs.Ease.linear)
-        .to({y:label.y-22, alpha:0}, 1000, createjs.Ease.linear)
+        .to({y: label.y-2, alpha: 1}, 200, createjs.Ease.linear)
+        .to({y: label.y-12}, 1000, createjs.Ease.linear)
+        .to({y: label.y-22, alpha: 0}, 1000, createjs.Ease.linear)
         .call =>
           return if @destroyed
           @options.floatingLayer.removeChild label
 
-
   cache: ->
     bounds = @imageObject.getBounds()
     @imageObject.cache 0, 0, bounds.width, bounds.height
-    #console.log "just cached", @thang.id, "which was at", @imageObject.x, @imageObject.y, bounds.width, bounds.height, "with scale", Math.max(@imageObject.scaleX, @imageObject.scaleY)
+    #console.log 'just cached', @thang.id, 'which was at', @imageObject.x, @imageObject.y, bounds.width, bounds.height, 'with scale', Math.max(@imageObject.scaleX, @imageObject.scaleY)
 
   getBobOffset: ->
     return 0 unless @thang.bobHeight
@@ -351,22 +350,25 @@ module.exports = CocoSprite = class CocoSprite extends CocoClass
       angle = 180 - angle if angle > 90
       scaleX = 0.5 + 0.5 * (90 - angle) / 90
 
-#    console.error "No thang for", @ unless @thang
+#    console.error 'No thang for', @ unless @thang
     # TODO: support using scaleFactorX/Y from the thang object
     @imageObject.scaleX = @baseScaleX * @scaleFactor * scaleX
     @imageObject.scaleY = @baseScaleY * @scaleFactor * scaleY
 
     if @thang and (@thang.scaleFactor or 1) isnt @targetScaleFactor
       createjs.Tween.removeTweens(@)
-      createjs.Tween.get(@).to({scaleFactor:@thang.scaleFactor or 1}, 2000, createjs.Ease.elasticOut)
+      createjs.Tween.get(@).to({scaleFactor: @thang.scaleFactor or 1}, 2000, createjs.Ease.elasticOut)
       @targetScaleFactor = @thang.scaleFactor or 1
 
   updateAlpha: ->
     @imageObject.alpha = if @hiding then 0 else 1
     return unless @thang?.alpha?
+    return if @imageObject.alpha is @thang.alpha
     @imageObject.alpha = @thang.alpha
     if @options.showInvisible
       @imageObject.alpha = Math.max 0.5, @imageObject.alpha
+    mark.updateAlpha @thang.alpha for name, mark of @marks
+    @healthBar?.alpha = @thang.alpha
 
   updateRotation: (imageObject) ->
     rotationType = @thangType.get('rotationType')
@@ -407,7 +409,7 @@ module.exports = CocoSprite = class CocoSprite extends CocoClass
     action = @determineAction()
     isDifferent = action isnt @currentRootAction or action is null
     if not action and @thang?.actionActivated and not @stopLogging
-      console.error "action is", action, "for", @thang?.id, "from", @currentRootAction, @thang.action, @thang.getActionName?()
+      console.error 'action is', action, 'for', @thang?.id, 'from', @currentRootAction, @thang.action, @thang.getActionName?()
       @stopLogging = true
     @queueAction(action) if action and (isDifferent or (@thang?.actionActivated and action.name isnt 'move'))
     @updateActionDirection()
@@ -436,7 +438,7 @@ module.exports = CocoSprite = class CocoSprite extends CocoClass
     rootAction ?= @currentRootAction
     return null unless relatedActions = rootAction?.relatedActions ? {}
     rotation = @getRotation()
-    if relatedActions["111111111111"]  # has grid-surrounding-wall-based actions
+    if relatedActions['111111111111']  # has grid-surrounding-wall-based actions
       if @wallGrid
         action = ''
         tileSize = 4
@@ -449,25 +451,25 @@ module.exports = CocoSprite = class CocoSprite extends CocoClass
               wallThangs = ['outside of the map yo']
             if wallThangs.length is 0
               if y is gy and x is gx
-                action += "1"  # the center wall we're placing
+                action += '1'  # the center wall we're placing
               else
-                action += "0"
+                action += '0'
             else if wallThangs.length is 1
-              action += "1"
+              action += '1'
             else
-              console.error "Overlapping walls at", x, y, "...", wallThangs
-              action += "1"
+              console.error 'Overlapping walls at', x, y, '...', wallThangs
+              action += '1'
         matchedAction = '111111111111'
         for relatedAction of relatedActions
           if action.match(relatedAction.replace(/\?/g, '.'))
             matchedAction = relatedAction
             break
-        #console.log "returning", matchedAction, "for", @thang.id, "at", gx, gy
+        #console.log 'returning', matchedAction, 'for', @thang.id, 'at', gx, gy
         return relatedActions[matchedAction]
       else
         keys = _.keys relatedActions
         index = Math.max 0, Math.floor((179 + rotation) / 360 * keys.length)
-        #console.log "Showing", relatedActions[keys[index]]
+        #console.log 'Showing', relatedActions[keys[index]]
         return relatedActions[keys[index]]
     value = Math.abs(rotation)
     direction = null
@@ -507,8 +509,8 @@ module.exports = CocoSprite = class CocoSprite extends CocoClass
     Backbone.Mediator.publish ourEventName, newEvent
 
   addHealthBar: ->
-    return unless @thang?.health? and "health" in (@thang?.hudProperties ? []) and @options.floatingLayer
-    healthColor = healthColors[@thang?.team] ? healthColors["neutral"]
+    return unless @thang?.health? and 'health' in (@thang?.hudProperties ? []) and @options.floatingLayer
+    healthColor = healthColors[@thang?.team] ? healthColors['neutral']
     healthOffset = @getOffset 'aboveHead'
     bar = @healthBar = createProgressBar(healthColor, healthOffset)
     bar.name = 'health bar'
@@ -657,7 +659,7 @@ module.exports = CocoSprite = class CocoSprite extends CocoClass
     sound = e.sound ? AudioPlayer.soundForDialogue e.message, @thangType.get 'soundTriggers'
     @instance?.stop()
     if @instance = @playSound sound, false
-      @instance.addEventListener "complete", -> Backbone.Mediator.publish 'dialogue-sound-completed'
+      @instance.addEventListener 'complete', -> Backbone.Mediator.publish 'dialogue-sound-completed'
     @notifySpeechUpdated e
 
   onClearDialogue: (e) ->
@@ -711,7 +713,7 @@ module.exports = CocoSprite = class CocoSprite extends CocoClass
     delay = if withDelay and sound.delay then 1000 * sound.delay / createjs.Ticker.getFPS() else 0
     name = AudioPlayer.nameForSoundReference sound
     instance = AudioPlayer.playSound name, volume, delay, @getWorldPosition()
-    #console.log @thang?.id, "played sound", name, "with delay", delay, "volume", volume, "and got sound instance", instance
+    #console.log @thang?.id, 'played sound', name, 'with delay', delay, 'volume', volume, 'and got sound instance', instance
     instance
 
   onMove: (e) ->
@@ -720,7 +722,7 @@ module.exports = CocoSprite = class CocoSprite extends CocoClass
     if _.isArray pos
       pos = new Vector pos...
     else if _.isString pos
-      return console.warn "Couldn't find target sprite", pos, "from", @options.sprites unless pos of @options.sprites
+      return console.warn 'Couldn\'t find target sprite', pos, 'from', @options.sprites unless pos of @options.sprites
       target = @options.sprites[pos].thang
       heading = Vector.subtract(target.pos, @thang.pos).normalize()
       distance = @thang.pos.distance target.pos
@@ -763,7 +765,7 @@ module.exports = CocoSprite = class CocoSprite extends CocoClass
 
     @lastTween = createjs.Tween
       .get(@shadow.pos)
-      .to({x:pos.x, y:pos.y}, duration, ease)
+      .to({x: pos.x, y: pos.y}, duration, ease)
       .call(endFunc)
 
   pointToward: (pos) ->
diff --git a/app/lib/surface/CoordinateDisplay.coffee b/app/lib/surface/CoordinateDisplay.coffee
index 032574983..448671ce3 100644
--- a/app/lib/surface/CoordinateDisplay.coffee
+++ b/app/lib/surface/CoordinateDisplay.coffee
@@ -11,7 +11,7 @@ module.exports = class CoordinateDisplay extends createjs.Container
     super()
     @initialize()
     @camera = options.camera
-    console.error "CoordinateDisplay needs camera." unless @camera
+    console.error 'CoordinateDisplay needs camera.' unless @camera
     @build()
     @show = _.debounce @show, 125
     Backbone.Mediator.subscribe(channel, @[func], @) for channel, func of @subscriptions
@@ -24,10 +24,10 @@ module.exports = class CoordinateDisplay extends createjs.Container
   build: ->
     @mouseEnabled = @mouseChildren = false
     @addChild @background = new createjs.Shape()
-    @addChild @label = new createjs.Text("", "bold 16px Arial", "#FFFFFF")
+    @addChild @label = new createjs.Text('', 'bold 16px Arial', '#FFFFFF')
     @label.name = 'Coordinate Display Text'
-    @label.shadow = new createjs.Shadow("#000000", 1, 1, 0)
-    @background.name = "Coordinate Display Background"
+    @label.shadow = new createjs.Shadow('#000000', 1, 1, 0)
+    @background.name = 'Coordinate Display Background'
 
   onMouseOver: (e) -> @mouseInBounds = true
   onMouseOut: (e) -> @mouseInBounds = false
@@ -71,8 +71,8 @@ module.exports = class CoordinateDisplay extends createjs.Container
     @label.regY = @background.regY = height / 2 - margin
     @background.graphics
       .clear()
-      .beginFill("rgba(0, 0, 0, 0.4)")
-      .beginStroke("rgba(0, 0, 0, 0.6)")
+      .beginFill('rgba(0,0,0,0.4)')
+      .beginStroke('rgba(0,0,0,0.6)')
       .setStrokeStyle(1)
       .drawRoundRect(0, 0, width, height, radius)
       .endFill()
diff --git a/app/lib/surface/DebugDisplay.coffee b/app/lib/surface/DebugDisplay.coffee
index a53059bf4..da287e6ed 100644
--- a/app/lib/surface/DebugDisplay.coffee
+++ b/app/lib/surface/DebugDisplay.coffee
@@ -8,7 +8,7 @@ module.exports = class DebugDisplay extends createjs.Container
     @initialize()
     @canvasWidth = options.canvasWidth
     @canvasHeight = options.canvasHeight
-    console.error "DebugDisplay needs canvasWidth/Height." unless @canvasWidth and @canvasHeight
+    console.error 'DebugDisplay needs canvasWidth/Height.' unless @canvasWidth and @canvasHeight
     @build()
     @onSetDebug debug: true
     Backbone.Mediator.subscribe(channel, @[func], @) for channel, func of @subscriptions
@@ -25,7 +25,7 @@ module.exports = class DebugDisplay extends createjs.Container
 
   build: ->
     @mouseEnabled = @mouseChildren = false
-    @addChild @frameText = new createjs.Text "...", "20px Arial", "#FFF"
+    @addChild @frameText = new createjs.Text '...', '20px Arial', '#FFF'
     @frameText.name = 'frame text'
     @frameText.x = @canvasWidth - 50
     @frameText.y = @canvasHeight - 25
@@ -41,5 +41,5 @@ module.exports = class DebugDisplay extends createjs.Container
       @lastFrameSecondStart = time
       @framesRenderedThisSecond = 0
 
-    @frameText.text = Math.round(currentFrame) + (if @fps? then " - " + @fps + ' fps' else '')
+    @frameText.text = Math.round(currentFrame) + (if @fps? then ' - ' + @fps + ' fps' else '')
     @frameText.x = @canvasWidth - @frameText.getMeasuredWidth() - 10
diff --git a/app/lib/surface/Dimmer.coffee b/app/lib/surface/Dimmer.coffee
index 566df7af4..a34740468 100644
--- a/app/lib/surface/Dimmer.coffee
+++ b/app/lib/surface/Dimmer.coffee
@@ -14,14 +14,14 @@ module.exports = class Dimmer extends CocoClass
     options ?= {}
     @camera = options.camera
     @layer = options.layer
-    console.error @toString(), "needs a camera." unless @camera
-    console.error @toString(), "needs a layer." unless @layer
+    console.error @toString(), 'needs a camera.' unless @camera
+    console.error @toString(), 'needs a layer.' unless @layer
     @build()
     @updateDimMask = _.throttle @updateDimMask, 10
     @highlightedThangIDs = []
     @sprites = {}
 
-  toString: -> "<Dimmer>"
+  toString: -> '<Dimmer>'
 
   build: ->
     @dimLayer = new createjs.Container()
@@ -29,7 +29,7 @@ module.exports = class Dimmer extends CocoClass
     @dimLayer.layerIndex = -10
     @dimLayer.addChild @dimScreen = new createjs.Shape()
     @dimLayer.addChild @dimMask = new createjs.Shape()
-    @dimScreen.graphics.beginFill("rgba(0,0,0,0.5)").rect 0, 0, @camera.canvasWidth, @camera.canvasHeight
+    @dimScreen.graphics.beginFill('rgba(0,0,0,0.5)').rect 0, 0, @camera.canvasWidth, @camera.canvasHeight
     @dimMask.compositeOperation = 'destination-out'
     @dimLayer.cache 0, 0, @camera.canvasWidth, @camera.canvasHeight
 
@@ -70,6 +70,6 @@ module.exports = class Dimmer extends CocoClass
       sup = x: sprite.imageObject.x, y: sprite.imageObject.y
       cap = @camera.surfaceToCanvas sup
       r = 50 * @camera.zoom  # TODO: find better way to get the radius based on the sprite's size
-      @dimMask.graphics.beginRadialGradientFill(["rgba(0,0,0,1)", "rgba(0,0,0,0)"], [0.5, 1], cap.x, cap.y, 0, cap.x, cap.y, r).drawCircle(cap.x, cap.y, r)
+      @dimMask.graphics.beginRadialGradientFill(['rgba(0,0,0,1)', 'rgba(0,0,0,0)'], [0.5, 1], cap.x, cap.y, 0, cap.x, cap.y, r).drawCircle(cap.x, cap.y, r)
 
     @dimLayer.updateCache 0, 0, @camera.canvasWidth, @camera.canvasHeight
diff --git a/app/lib/surface/Dropper.coffee b/app/lib/surface/Dropper.coffee
index 3dae5b7db..e7ea3c6cd 100644
--- a/app/lib/surface/Dropper.coffee
+++ b/app/lib/surface/Dropper.coffee
@@ -25,5 +25,4 @@ Dropper = class Dropper
   drop: ->
     return @drop_counter > 0
 
-
 module.exports = new Dropper()
diff --git a/app/lib/surface/Label.coffee b/app/lib/surface/Label.coffee
index 92e19c140..959c92c13 100644
--- a/app/lib/surface/Label.coffee
+++ b/app/lib/surface/Label.coffee
@@ -1,9 +1,9 @@
 CocoClass = require 'lib/CocoClass'
 
 module.exports = class Label extends CocoClass
-  @STYLE_DIALOGUE = "dialogue"  # A speech bubble from a script
-  @STYLE_SAY = "say"  # A piece of text generated from the world
-  @STYLE_NAME = "name"  # A name like Scott set up for the Wizard
+  @STYLE_DIALOGUE = 'dialogue'  # A speech bubble from a script
+  @STYLE_SAY = 'say'  # A piece of text generated from the world
+  @STYLE_NAME = 'name'  # A name like Scott set up for the Wizard
   # We might want to combine 'say' and 'name'; they're very similar
   # Nick designed 'say' based off of Scott's 'name' back when they were using two systems
 
@@ -16,9 +16,9 @@ module.exports = class Label extends CocoClass
     @camera = options.camera
     @layer = options.layer
     @style = options.style ? Label.STYLE_SAY
-    console.error @toString(), "needs a sprite." unless @sprite
-    console.error @toString(), "needs a camera." unless @camera
-    console.error @toString(), "needs a layer." unless @layer
+    console.error @toString(), 'needs a sprite.' unless @sprite
+    console.error @toString(), 'needs a camera.' unless @camera
+    console.error @toString(), 'needs a layer.' unless @layer
     @setText options.text if options.text
 
   destroy: ->
@@ -58,15 +58,15 @@ module.exports = class Label extends CocoClass
     st = {dialogue: 'D', say: 'S', name: 'N'}[@style]
     o.marginX = {D: 5, S: 6, N: 3}[st]
     o.marginY = {D: 6, S: 4, N: 3}[st]
-    o.fontWeight = {D: "bold", S: "bold", N: "bold"}[st]
+    o.fontWeight = {D: 'bold', S: 'bold', N: 'bold'}[st]
     o.shadow = {D: false, S: true, N: true}[st]
-    o.shadowColor = {D: "#FFF", S: "#000", N: "#FFF"}[st]
+    o.shadowColor = {D: '#FFF', S: '#000', N: '#FFF'}[st]
     o.fontSize = {D: 25, S: 12, N: 12}[st]
-    fontFamily = {D: "Arial", S: "Arial", N: "Arial"}[st]
+    fontFamily = {D: 'Arial', S: 'Arial', N: 'Arial'}[st]
     o.fontDescriptor = "#{o.fontWeight} #{o.fontSize}px #{fontFamily}"
-    o.fontColor = {D: "#000", S: "#FFF", N: "#00a"}[st]
-    o.backgroundFillColor = {D: "white", S: "rgba(0, 0, 0, 0.4)", N: "rgba(255, 255, 255, 0.5)"}[st]
-    o.backgroundStrokeColor = {D: "black", S: "rgba(0, 0, 0, .6)", N: "rgba(0, 0, 0, 0.0)"}[st]
+    o.fontColor = {D: '#000', S: '#FFF', N: '#00a'}[st]
+    o.backgroundFillColor = {D: 'white', S: 'rgba(0,0,0,0.4)', N: 'rgba(255,255,255,0.5)'}[st]
+    o.backgroundStrokeColor = {D: 'black', S: 'rgba(0,0,0,0.6)', N: 'rgba(0,0,0,0)'}[st]
     o.backgroundStrokeStyle = {D: 2, S: 1, N: 1}[st]
     o.backgroundBorderRadius = {D: 10, S: 3, N: 3}[st]
     o.layerPriority = {D: 10, S: 5, N: 5}[st]
@@ -169,7 +169,7 @@ module.exports = class Label extends CocoClass
     textWidth = 0
     for word in words
       row.push(word)
-      text = new createjs.Text(_.string.join(' ', row...), fontDescriptor, "#000")
+      text = new createjs.Text(_.string.join(' ', row...), fontDescriptor, '#000')
       width = text.getMeasuredWidth()
       if width > maxWidth
         if row.length is 1 # one long word, truncate it
@@ -186,5 +186,5 @@ module.exports = class Label extends CocoClass
         textWidth = Math.max(textWidth, width)
     rows.push(row) if row.length
     for row, i in rows
-      rows[i] = _.string.join(" ", row...)
+      rows[i] = _.string.join(' ', row...)
     text: _.string.join("\n", rows...), textWidth: textWidth
diff --git a/app/lib/surface/Layer.coffee b/app/lib/surface/Layer.coffee
index 1e438a2ea..b148be49c 100644
--- a/app/lib/surface/Layer.coffee
+++ b/app/lib/surface/Layer.coffee
@@ -18,10 +18,10 @@
 ###
 
 module.exports = class Layer extends createjs.Container
-  @TRANSFORM_CHILD = "child"  # Layer transform is managed by its parents
-  @TRANSFORM_SURFACE = "surface"  # Layer moves/scales/zooms with the Surface of the World
-  @TRANSFORM_SURFACE_TEXT = "surface_text"  # Layer moves with the Surface but is size-independent
-  @TRANSFORM_SCREEN = "screen"  # Layer stays fixed to the screen (different from child?)
+  @TRANSFORM_CHILD = 'child'  # Layer transform is managed by its parents
+  @TRANSFORM_SURFACE = 'surface'  # Layer moves/scales/zooms with the Surface of the World
+  @TRANSFORM_SURFACE_TEXT = 'surface_text'  # Layer moves with the Surface but is size-independent
+  @TRANSFORM_SCREEN = 'screen'  # Layer stays fixed to the screen (different from child?)
 
   subscriptions:
     'camera:zoom-updated': 'onZoomUpdated'
@@ -30,11 +30,11 @@ module.exports = class Layer extends createjs.Container
     super()
     @initialize()
     options ?= {}
-    @name = options.name ? "Unnamed"
+    @name = options.name ? 'Unnamed'
     @layerPriority = options.layerPriority ? 0
     @transformStyle = options.transform ? Layer.TRANSFORM_CHILD
     @camera = options.camera
-    console.error @toString(), "needs a camera." unless @camera
+    console.error @toString(), 'needs a camera.' unless @camera
     @updateLayerOrder = _.throttle @updateLayerOrder, 1000 / 30  # Don't call multiple times in one frame; 30 FPS is probably good enough
     Backbone.Mediator.subscribe(channel, @[func], @) for channel, func of @subscriptions
 
@@ -60,7 +60,7 @@ module.exports = class Layer extends createjs.Container
         child.scaleY *= @scaleY
 
   updateLayerOrder: =>
-    #console.log @, @toString(), "sorting children", _.clone @children if @name is 'Default'
+    #console.log @, @toString(), 'sorting children', _.clone @children if @name is 'Default'
     @sortChildren @layerOrderComparator
 
   layerOrderComparator: (a, b) ->
diff --git a/app/lib/surface/Letterbox.coffee b/app/lib/surface/Letterbox.coffee
index c5d2f86b7..1e829d3df 100644
--- a/app/lib/surface/Letterbox.coffee
+++ b/app/lib/surface/Letterbox.coffee
@@ -1,5 +1,4 @@
 module.exports = class Letterbox extends createjs.Container
-
   subscriptions:
     'level-set-letterbox': 'onSetLetterbox'
 
@@ -8,7 +7,7 @@ module.exports = class Letterbox extends createjs.Container
     @initialize()
     @canvasWidth = options.canvasWidth
     @canvasHeight = options.canvasHeight
-    console.error "Letterbox needs canvasWidth/Height." unless @canvasWidth and @canvasHeight
+    console.error 'Letterbox needs canvasWidth/Height.' unless @canvasWidth and @canvasHeight
     @build()
     Backbone.Mediator.subscribe(channel, @[func], @) for channel, func of @subscriptions
 
@@ -16,7 +15,7 @@ module.exports = class Letterbox extends createjs.Container
     @mouseEnabled = @mouseChildren = false
     @matteHeight = 0.10 * @canvasHeight
     @upperMatte = new createjs.Shape()
-    @upperMatte.graphics.beginFill("black").rect(0, 0, @canvasWidth, @matteHeight)
+    @upperMatte.graphics.beginFill('black').rect(0, 0, @canvasWidth, @matteHeight)
     @lowerMatte = @upperMatte.clone()
     @upperMatte.x = @lowerMatte.x = 0
     @upperMatte.y = -@matteHeight
diff --git a/app/lib/surface/Mark.coffee b/app/lib/surface/Mark.coffee
index d37b57b59..54853f506 100644
--- a/app/lib/surface/Mark.coffee
+++ b/app/lib/surface/Mark.coffee
@@ -5,6 +5,7 @@ markThangTypes = {}
 
 module.exports = class Mark extends CocoClass
   subscriptions: {}
+  alpha: 1
 
   constructor: (options) ->
     super()
@@ -14,9 +15,9 @@ module.exports = class Mark extends CocoClass
     @camera = options.camera
     @layer = options.layer
     @thangType = options.thangType
-    console.error @toString(), "needs a name." unless @name
-    console.error @toString(), "needs a camera." unless @camera
-    console.error @toString(), "needs a layer." unless @layer
+    console.error @toString(), 'needs a name.' unless @name
+    console.error @toString(), 'needs a camera.' unless @camera
+    console.error @toString(), 'needs a layer.' unless @layer
     @build()
 
   destroy: ->
@@ -57,7 +58,7 @@ module.exports = class Mark extends CocoClass
       else if @name is 'debug' then @buildDebug()
       else if @name.match(/.+(Range|Distance|Radius)$/) then @buildRadius(@name)
       else if @thangType then @buildSprite()
-      else console.error "Don't know how to build mark for", @name
+      else console.error 'Don\'t know how to build mark for', @name
       @mark?.mouseEnabled = false
     @
 
@@ -66,28 +67,40 @@ module.exports = class Mark extends CocoClass
     @mark.mouseChildren = false
 
     # Confusingly make some semi-random colors that'll be consistent based on the drawsBoundsIndex
-    index = @sprite.thang.drawsBoundsIndex
-    colors = (128 + Math.floor(('0.'+Math.sin(3 * index + i).toString().substr(6)) * 128) for i in [1 ... 4])
+    @drawsBoundsIndex = @sprite.thang.drawsBoundsIndex
+    colors = (128 + Math.floor(('0.'+Math.sin(3 * @drawsBoundsIndex + i).toString().substr(6)) * 128) for i in [1 ... 4])
     color = "rgba(#{colors[0]}, #{colors[1]}, #{colors[2]}, 0.5)"
-
-    shape = new createjs.Shape()
-    shape.graphics.setStrokeStyle 5
-    shape.graphics.beginStroke color
-    shape.graphics.beginFill color.replace('0.5', '0.25')
     [w, h] = [@sprite.thang.width * Camera.PPM, @sprite.thang.height * Camera.PPM * @camera.y2x]
-    if @sprite.thang.shape in ["ellipsoid", "disc"]
-      shape.drawEllipse 0, 0, w, h
+
+    if @sprite.thang.drawsBoundsStyle is 'border-text'
+      shape = new createjs.Shape()
+      shape.graphics.setStrokeStyle 5
+      shape.graphics.beginStroke color
+      shape.graphics.beginFill color.replace('0.5', '0.25')
+      if @sprite.thang.shape in ['ellipsoid', 'disc']
+        shape.drawEllipse 0, 0, w, h
+      else
+        shape.graphics.drawRect -w / 2, -h / 2, w, h
+      shape.graphics.endStroke()
+      shape.graphics.endFill()
+      @mark.addChild shape
+
+    if @sprite.thang.drawsBoundsStyle is 'border-text'
+      text = new createjs.Text '' + @drawsBoundsIndex, '20px Arial', color.replace('0.5', '1')
+      text.regX = text.getMeasuredWidth() / 2
+      text.regY = text.getMeasuredHeight() / 2
+      text.shadow = new createjs.Shadow('#000000', 1, 1, 0)
+      @mark.addChild text
+    else if @sprite.thang.drawsBoundsStyle is 'corner-text'
+      return if @sprite.thang.world.age is 0
+      letter = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'[@drawsBoundsIndex % 26]
+      text = new createjs.Text letter, '14px Arial', '#333333'   # color.replace('0.5', '1')
+      text.x = -w / 2 + 2
+      text.y = -h / 2 + 2
+      @mark.addChild text
     else
-      shape.graphics.drawRect -w / 2, -h / 2, w, h
-    shape.graphics.endStroke()
-    shape.graphics.endFill()
+      console.warn @sprite.thang.id, 'didn\'t know how to draw bounds style:', @sprite.thang.drawsBoundsStyle
 
-    text = new createjs.Text "" + index, "20px Arial", color.replace('0.5', '1')
-    text.regX = text.getMeasuredWidth() / 2
-    text.regY = text.getMeasuredHeight() / 2
-    text.shadow = new createjs.Shadow("#000000", 1, 1, 0)
-
-    @mark.addChild shape, text
     if w > 0 and h > 0
       @mark.cache -w / 2, -h / 2, w, h, 2
     @lastWidth = @sprite.thang.width
@@ -105,7 +118,7 @@ module.exports = class Mark extends CocoClass
     height *= Camera.PPM * @camera.y2x  # TODO: doesn't work with rotation
     @mark = new createjs.Shape()
     @mark.mouseEnabled = false
-    @mark.graphics.beginFill "rgba(0, 0, 0, #{alpha})"
+    @mark.graphics.beginFill "rgba(0,0,0,#{alpha})"
     if @sprite.thang.shape in ['ellipsoid', 'disc']
       @mark.graphics.drawEllipse 0, 0, width, height
     else
@@ -119,16 +132,16 @@ module.exports = class Mark extends CocoClass
   buildRadius: (range) ->
     alpha = 0.15
     colors =
-      voiceRange: "rgba(0, 145, 0, #{alpha})"
-      visualRange: "rgba(0, 0, 145, #{alpha})"
-      attackRange: "rgba(145, 0, 0, #{alpha})"
+      voiceRange: "rgba(0,145,0,#{alpha})"
+      visualRange: "rgba(0,0,145,#{alpha})"
+      attackRange: "rgba(145,0,0,#{alpha})"
 
     # Fallback colors which work on both dungeon and grass tiles
     extraColors = [
-      "rgba(145, 0, 145, #{alpha})"
-      "rgba(0, 145, 145, #{alpha})"
-      "rgba(145, 105, 0, #{alpha})"
-      "rgba(225, 125, 0, #{alpha})"
+      "rgba(145,0,145,#{alpha})"
+      "rgba(0,145,145,#{alpha})"
+      "rgba(145,105,0,#{alpha})"
+      "rgba(225,125,0,#{alpha})"
     ]
 
     # Find the index of this range, to find the next-smallest radius
@@ -166,7 +179,7 @@ module.exports = class Mark extends CocoClass
     [w, h] = [Math.max(PX, @sprite.thang.width * Camera.PPM), Math.max(PX, @sprite.thang.height * Camera.PPM) * @camera.y2x]
     @mark.alpha = 0.5
     @mark.graphics.beginFill '#abcdef'
-    if @sprite.thang.shape in ["ellipsoid", "disc"]
+    if @sprite.thang.shape in ['ellipsoid', 'disc']
       [w, h] = [Math.max(PX, w, h), Math.max(PX, w, h)]
       @mark.graphics.drawCircle 0, 0, w / 2
     else
@@ -216,11 +229,10 @@ module.exports = class Mark extends CocoClass
     true
 
   updatePosition: (pos) ->
-    if @name in ['shadow', 'debug']
+    if @sprite?.thang and @name in ['shadow', 'debug', 'target', 'selection', 'repair']
       pos = @camera.worldToSurface x: @sprite.thang.pos.x, y: @sprite.thang.pos.y
       if @name is 'shadow'
-        worldZ = @sprite.thang.pos.z - @sprite.thang.depth / 2 + @sprite.getBobOffset()
-        @mark.alpha = 0.451 / Math.sqrt(worldZ / 2 + 1)
+        @updateAlpha @alpha
     else
       pos ?= @sprite?.imageObject
     @mark.x = pos.x
@@ -231,23 +243,36 @@ module.exports = class Mark extends CocoClass
       @mark.y += offset.y
       @mark.y -= 3 if @statusEffect
 
+  updateAlpha: (@alpha) ->
+    return if not @mark or @name is 'debug'
+    if @name is 'shadow'
+      worldZ = @sprite.thang.pos.z - @sprite.thang.depth / 2 + @sprite.getBobOffset()
+      @mark.alpha = @alpha * 0.451 / Math.sqrt(worldZ / 2 + 1)
+    else if @name isnt 'bounds'
+      @mark.alpha = @alpha
+
   updateRotation: ->
-    if @name is 'debug' or (@name is 'shadow' and @sprite.thang?.shape in ["rectangle", "box"])
+    if @name is 'debug' or (@name is 'shadow' and @sprite.thang?.shape in ['rectangle', 'box'])
       @mark.rotation = @sprite.thang.rotation * 180 / Math.PI
 
   updateScale: ->
-    if @name is 'bounds' and (@sprite.thang.width isnt @lastWidth or @sprite.thang.height isnt @lastHeight)
+    if @name is 'bounds' and ((@sprite.thang.width isnt @lastWidth or @sprite.thang.height isnt @lastHeight) or (@sprite.thang.drawsBoundsIndex isnt @drawsBoundsIndex))
       oldMark = @mark
       @buildBounds()
       oldMark.parent.addChild @mark
       oldMark.parent.swapChildren oldMark, @mark
       oldMark.parent.removeChild oldMark
-    
+
     if @markSprite?
       @markSprite.scaleFactor = 1.2
       @markSprite.updateScale()
-    return unless @name in ["selection", "target", "repair", "highlight"]
-    
+
+    if @name is 'shadow' and thang = @sprite.thang
+      @mark.scaleX = thang.scaleFactor ? thang.scaleFactorX ? 1
+      @mark.scaleY = thang.scaleFactor ? thang.scaleFactorY ? 1
+
+    return unless @name in ['selection', 'target', 'repair', 'highlight']
+
     # scale these marks to 10m (100px). Adjust based on sprite size.
     factor = 0.3 # default size: 3m width, most commonly for target when pointing to a location
 
@@ -260,7 +285,7 @@ module.exports = class Mark extends CocoClass
       factor = Math.max(factor, 0.3) # lower bound
     @mark.scaleX *= factor
     @mark.scaleY *= factor
-      
+
     if @name in ['selection', 'target', 'repair']
       @mark.scaleY *= @camera.y2x  # code applies perspective
 
diff --git a/app/lib/surface/MusicPlayer.coffee b/app/lib/surface/MusicPlayer.coffee
index ac31992c7..e01f32372 100644
--- a/app/lib/surface/MusicPlayer.coffee
+++ b/app/lib/surface/MusicPlayer.coffee
@@ -25,7 +25,7 @@ module.exports = class MusicPlayer extends CocoClass
     if (not e.file) or src is @currentMusic?.src
       if e.play then @restartCurrentMusic() else @fadeOutCurrentMusic()
       return
-      
+
     media = AudioPlayer.getStatus(src)
     if not media?.loaded
       AudioPlayer.preloadSound(src)
@@ -35,23 +35,23 @@ module.exports = class MusicPlayer extends CocoClass
     @standingBy = null
     @fadeOutCurrentMusic()
     @startNewMusic(src) if e.play
-      
+
   restartCurrentMusic: ->
     return unless @currentMusic
     @currentMusic.play('none', 0, 0, -1, 0.3)
     @updateMusicVolume()
-    
+
   fadeOutCurrentMusic: ->
     return unless @currentMusic
     f = -> @stop()
-    createjs.Tween.get(@currentMusic).to({volume:0.0}, CROSSFADE_LENGTH).call(f)
-    
+    createjs.Tween.get(@currentMusic).to({volume: 0.0}, CROSSFADE_LENGTH).call(f)
+
   startNewMusic: (src) ->
     @currentMusic = createjs.Sound.play(src, 'none', 0, 0, -1, 0.3) if src
     return unless @currentMusic
     @currentMusic.volume = 0.0
     if me.get('music')
-      createjs.Tween.get(@currentMusic).to({volume:1.0}, CROSSFADE_LENGTH)
+      createjs.Tween.get(@currentMusic).to({volume: 1.0}, CROSSFADE_LENGTH)
 
   onMusicSettingChanged: ->
     @updateMusicVolume()
@@ -64,4 +64,3 @@ module.exports = class MusicPlayer extends CocoClass
   destroy: ->
     me.off 'change:music', @onMusicSettingChanged, @
     super()
-    
\ No newline at end of file
diff --git a/app/lib/surface/PlaybackOverScreen.coffee b/app/lib/surface/PlaybackOverScreen.coffee
index dba87def5..9bf05fe7b 100644
--- a/app/lib/surface/PlaybackOverScreen.coffee
+++ b/app/lib/surface/PlaybackOverScreen.coffee
@@ -6,18 +6,18 @@ module.exports = class PlaybackOverScreen extends CocoClass
     options ?= {}
     @camera = options.camera
     @layer = options.layer
-    console.error @toString(), "needs a camera." unless @camera
-    console.error @toString(), "needs a layer." unless @layer
+    console.error @toString(), 'needs a camera.' unless @camera
+    console.error @toString(), 'needs a layer.' unless @layer
     @build()
 
-  toString: -> "<PlaybackOverScreen>"
+  toString: -> '<PlaybackOverScreen>'
 
   build: ->
     @dimLayer = new createjs.Container()
     @dimLayer.mouseEnabled = @dimLayer.mouseChildren = false
     @dimLayer.layerIndex = -12
     @dimLayer.addChild @dimScreen = new createjs.Shape()
-    @dimScreen.graphics.beginFill("rgba(0,0,0,0.4)").rect 0, 0, @camera.canvasWidth, @camera.canvasHeight
+    @dimScreen.graphics.beginFill('rgba(0,0,0,0.4)').rect 0, 0, @camera.canvasWidth, @camera.canvasHeight
     @dimLayer.cache 0, 0, @camera.canvasWidth, @camera.canvasHeight
     @dimLayer.alpha = 0
     @layer.addChild @dimLayer
@@ -28,11 +28,11 @@ module.exports = class PlaybackOverScreen extends CocoClass
 
     @dimLayer.alpha = 0
     createjs.Tween.removeTweens @dimLayer
-    createjs.Tween.get(@dimLayer).to({alpha:1}, 500)
+    createjs.Tween.get(@dimLayer).to({alpha: 1}, 500)
 
   hide: ->
     return unless @showing
     @showing = false
 
     createjs.Tween.removeTweens @dimLayer
-    createjs.Tween.get(@dimLayer).to({alpha:0}, 500)
+    createjs.Tween.get(@dimLayer).to({alpha: 0}, 500)
diff --git a/app/lib/surface/PointChooser.coffee b/app/lib/surface/PointChooser.coffee
index 2c8e598e5..88c61db98 100644
--- a/app/lib/surface/PointChooser.coffee
+++ b/app/lib/surface/PointChooser.coffee
@@ -19,12 +19,12 @@ module.exports = class PointChooser extends CocoClass
     @shape = new createjs.Shape()
     @shape.alpha = 0.9
     @shape.mouseEnabled = false
-    @shape.graphics.setStrokeStyle(1, "round").beginStroke("#000000").beginFill('#fedcba')
+    @shape.graphics.setStrokeStyle(1, 'round').beginStroke('#000000').beginFill('#fedcba')
     @shape.graphics.drawCircle(0, 0, 4).endFill()
     @shape.layerIndex = 100
 
   onMouseDown: (e) =>
-    console.log "got stagemousedown", e, key.shift
+    console.log 'got stagemousedown', e, key.shift
     return unless key.shift
     @setPoint @options.camera.screenToWorld {x: e.stageX, y: e.stageY}
     Backbone.Mediator.publish 'choose-point', point: @point
diff --git a/app/lib/surface/SpriteBoss.coffee b/app/lib/surface/SpriteBoss.coffee
index 52bd11f45..1483481a7 100644
--- a/app/lib/surface/SpriteBoss.coffee
+++ b/app/lib/surface/SpriteBoss.coffee
@@ -51,12 +51,12 @@ module.exports = class SpriteBoss extends CocoClass
   createLayers: ->
     @spriteLayers = {}
     for [name, priority] in [
-      ["Land", -40]
-      ["Ground", -30]
-      ["Obstacle", -20]
-      ["Path", -10]
-      ["Default", 0]
-      ["Floating", 10]
+      ['Land', -40]
+      ['Ground', -30]
+      ['Obstacle', -20]
+      ['Path', -10]
+      ['Default', 0]
+      ['Floating', 10]
     ]
       @spriteLayers[name] = new Layer name: name, layerPriority: priority, transform: Layer.TRANSFORM_CHILD, camera: @camera
     @surfaceLayer.addChild _.values(@spriteLayers)...
@@ -66,36 +66,36 @@ module.exports = class SpriteBoss extends CocoClass
       # TODO: make better system
       child.layerPriority = 0 if sprite?.thang?.isSelectable
       child.layerPriority = -40 if sprite?.thang?.isLand
-    return @spriteLayers["Default"] unless child.layerPriority
+    return @spriteLayers['Default'] unless child.layerPriority
     layer = _.findLast @spriteLayers, (layer, name) ->
       layer.layerPriority <= child.layerPriority
-    #console.log "layer for", child, "is", (layer ? @spriteLayers["Default"])
-    layer ? @spriteLayers["Default"]
+    #console.log 'layer for', child, 'is', (layer ? @spriteLayers['Default'])
+    layer ? @spriteLayers['Default']
 
   addSprite: (sprite, id=null, layer=null) ->
     id ?= sprite.thang.id
-    console.error "Sprite collision! Already have:", id if @sprites[id]
+    console.error 'Sprite collision! Already have:', id if @sprites[id]
     @sprites[id] = sprite
     @spriteArray.push sprite
-    layer ?= @spriteLayers["Obstacle"] if sprite.thang?.spriteName.search(/(dungeon|indoor).wall/i) isnt -1
+    layer ?= @spriteLayers['Obstacle'] if sprite.thang?.spriteName.search(/(dungeon|indoor).wall/i) isnt -1
     layer ?= @layerForChild sprite.imageObject, sprite
     layer.addChild sprite.imageObject
     layer.updateLayerOrder()
     sprite
 
   createMarks: ->
-    @targetMark = new Mark name: 'target', camera: @camera, layer: @spriteLayers["Ground"], thangType: 'target'
-    @selectionMark = new Mark name: 'selection', camera: @camera, layer: @spriteLayers["Ground"], thangType: 'selection'
+    @targetMark = new Mark name: 'target', camera: @camera, layer: @spriteLayers['Ground'], thangType: 'target'
+    @selectionMark = new Mark name: 'selection', camera: @camera, layer: @spriteLayers['Ground'], thangType: 'selection'
 
   createSpriteOptions: (options) ->
-    _.extend options, camera: @camera, resolutionFactor: 4, groundLayer: @spriteLayers["Ground"], textLayer: @surfaceTextLayer, floatingLayer: @spriteLayers["Floating"], spriteSheetCache: @spriteSheetCache, showInvisible: @options.showInvisible
+    _.extend options, camera: @camera, resolutionFactor: 4, groundLayer: @spriteLayers['Ground'], textLayer: @surfaceTextLayer, floatingLayer: @spriteLayers['Floating'], spriteSheetCache: @spriteSheetCache, showInvisible: @options.showInvisible
 
   createIndieSprites: (indieSprites, withWizards) ->
     unless @indieSprites
       @indieSprites = []
       @indieSprites = (@createIndieSprite indieSprite for indieSprite in indieSprites) if indieSprites
     if withWizards and not @selfWizardSprite
-      @selfWizardSprite = @createWizardSprite thangID: "My Wizard", isSelf: true, sprites: @sprites
+      @selfWizardSprite = @createWizardSprite thangID: 'My Wizard', isSelf: true, sprites: @sprites
 
   createIndieSprite: (indieSprite) ->
     unless thangType = @thangTypeFor indieSprite.thangType
@@ -107,16 +107,16 @@ module.exports = class SpriteBoss extends CocoClass
   createOpponentWizard: (opponent) ->
     # TODO: colorize name and cloud by team, colorize wizard by user's color config, level-specific wizard spawn points
     sprite = @createWizardSprite thangID: opponent.id, name: opponent.name
-    if not opponent.levelSlug or opponent.levelSlug is "brawlwood"
+    if not opponent.levelSlug or opponent.levelSlug is 'brawlwood'
       sprite.targetPos = if opponent.team is 'ogres' then {x: 52, y: 52} else {x: 28, y: 28}
-    else if opponent.levelSlug is "dungeon-arena"
-      sprite.targetPos = if opponent.team is 'ogres' then {x:72, y: 39} else {x: 9, y:39}
+    else if opponent.levelSlug is 'dungeon-arena'
+      sprite.targetPos = if opponent.team is 'ogres' then {x: 72, y: 39} else {x: 9, y: 39}
     else
-      sprite.targetPos = if opponent.team is 'ogres' then {x:52, y: 28} else {x: 20, y:28}
+      sprite.targetPos = if opponent.team is 'ogres' then {x: 52, y: 28} else {x: 20, y: 28}
 
   createWizardSprite: (options) ->
-    sprite = new WizardSprite @thangTypeFor("Wizard"), @createSpriteOptions(options)
-    @addSprite sprite, sprite.thang.id, @spriteLayers["Floating"]
+    sprite = new WizardSprite @thangTypeFor('Wizard'), @createSpriteOptions(options)
+    @addSprite sprite, sprite.thang.id, @spriteLayers['Floating']
 
   onPlayerJoined: (e) ->
     # Create another WizardSprite, unless this player is just me
@@ -172,7 +172,7 @@ module.exports = class SpriteBoss extends CocoClass
     @adjustSpriteExistence() if frameChanged
     sprite.update frameChanged for sprite in @spriteArray
     @updateSelection()
-    @spriteLayers["Default"].updateLayerOrder()
+    @spriteLayers['Default'].updateLayerOrder()
     @cache()
 
   adjustSpriteExistence: ->
@@ -184,11 +184,11 @@ module.exports = class SpriteBoss extends CocoClass
       else
         sprite = @addThangToSprites(thang)
         Backbone.Mediator.publish 'surface:new-thang-added', thang:thang, sprite:sprite
-        updateCache = updateCache or sprite.imageObject.parent is @spriteLayers["Obstacle"]
+        updateCache = updateCache or sprite.imageObject.parent is @spriteLayers['Obstacle']
         sprite.playSounds()
     for thangID, sprite of @sprites
       missing = not (sprite.notOfThisWorld or @world.thangMap[thangID]?.exists)
-      isObstacle = sprite.imageObject.parent is @spriteLayers["Obstacle"]
+      isObstacle = sprite.imageObject.parent is @spriteLayers['Obstacle']
       updateCache = updateCache or (isObstacle and (missing or sprite.hasMoved))
       sprite.hasMoved = false
       @removeSprite sprite if missing
@@ -210,11 +210,11 @@ module.exports = class SpriteBoss extends CocoClass
       wallSprite.updateScale()
       wallSprite.updatePosition()
     #console.log @wallGrid.toString()
-    @spriteLayers["Obstacle"].uncache() if @spriteLayers["Obstacle"].cacheID  # might have changed sizes
-    @spriteLayers["Obstacle"].cache()
+    @spriteLayers['Obstacle'].uncache() if @spriteLayers['Obstacle'].cacheID  # might have changed sizes
+    @spriteLayers['Obstacle'].cache()
     # test performance of doing land layer, too, to see if it's faster
-#    @spriteLayers["Land"].uncache() if @spriteLayers["Land"].cacheID  # might have changed sizes
-#    @spriteLayers["Land"].cache()
+#    @spriteLayers['Land'].uncache() if @spriteLayers['Land'].cacheID  # might have changed sizes
+#    @spriteLayers['Land'].cache()
     # I don't notice much difference - Scott
     @cached = true
 
@@ -266,7 +266,7 @@ module.exports = class SpriteBoss extends CocoClass
     return if e and (@disabled or @selectLocked)  # Ignore clicks for selection/panning/wizard movement while disabled or select is locked
     worldPos = sprite?.thang?.pos
     worldPos ?= @camera.screenToWorld {x: e.originalEvent.rawX, y: e.originalEvent.rawY} if e
-    if worldPos and (@options.navigateToSelection or not sprite or treemaThangSelected)
+    if worldPos and (@options.navigateToSelection or not sprite or treemaThangSelected) and e?.originalEvent?.nativeEvent?.which isnt 3
       @camera.zoomTo(sprite?.imageObject or @camera.worldToSurface(worldPos), @camera.zoom, 1000, true)
     sprite = null if @options.choosing  # Don't select sprites while choosing
     if sprite isnt @selectedSprite
@@ -291,7 +291,6 @@ module.exports = class SpriteBoss extends CocoClass
         instance.addEventListener 'complete', ->
           Backbone.Mediator.publish 'thang-finished-talking', thang: sprite?.thang
 
-
   # Marks
 
   updateSelection: ->
diff --git a/app/lib/surface/Surface.coffee b/app/lib/surface/Surface.coffee
index 75fd686a9..fd745d8ec 100644
--- a/app/lib/surface/Surface.coffee
+++ b/app/lib/surface/Surface.coffee
@@ -90,7 +90,7 @@ module.exports = Surface = class Surface extends CocoClass
   destroy: ->
     @dead = true
     @camera?.destroy()
-    createjs.Ticker.removeEventListener("tick", @tick)
+    createjs.Ticker.removeEventListener('tick', @tick)
     createjs.Sound.stop()
     layer.destroy() for layer in @layers
     @spriteBoss.destroy()
@@ -160,12 +160,12 @@ module.exports = Surface = class Surface extends CocoClass
   addMeshRectanglesToContainer: (mesh, container) ->
     for rect in mesh
       shape = new createjs.Shape()
-      pos = @camera.worldToSurface {x:rect.x, y:rect.y}
-      dim = @camera.worldToSurface {x:rect.width, y:rect.height}
+      pos = @camera.worldToSurface {x: rect.x, y: rect.y}
+      dim = @camera.worldToSurface {x: rect.width, y: rect.height}
       shape.graphics
         .setStrokeStyle(3)
-        .beginFill('rgba(0, 0, 128, 0.3)')
-        .beginStroke('rgba(0, 0, 128, 0.7)')
+        .beginFill('rgba(0,0,128,0.3)')
+        .beginStroke('rgba(0,0,128,0.7)')
         .drawRect(pos.x - dim.x/2, pos.y - dim.y/2, dim.x, dim.y)
       container.addChild shape
 
@@ -181,7 +181,7 @@ module.exports = Surface = class Surface extends CocoClass
     shape.graphics
       .setStrokeStyle(1)
       .moveTo(v1.x, v1.y)
-      .beginStroke('rgba(128, 0, 0, 0.4)')
+      .beginStroke('rgba(128,0,0,0.4)')
       .lineTo(v2.x, v2.y)
       .endStroke()
     container.addChild shape
@@ -206,7 +206,7 @@ module.exports = Surface = class Surface extends CocoClass
     if scrubDuration
       t = createjs.Tween
         .get(@)
-        .to({currentFrame:@scrubbingTo}, scrubDuration, createjs.Ease.sineInOut)
+        .to({currentFrame: @scrubbingTo}, scrubDuration, createjs.Ease.sineInOut)
         .call(onTweenEnd)
       t.addEventListener('change', @onFramesScrubbed)
     else
@@ -309,7 +309,7 @@ module.exports = Surface = class Surface extends CocoClass
     return if @currentFrame is @lastFrame and not force
     progress = @getProgress()
     Backbone.Mediator.publish('surface:frame-changed',
-      type: "frame-changed"
+      type: 'frame-changed'
       selectedThang: @spriteBoss.selectedSprite?.thang
       progress: progress
       frame: @currentFrame
@@ -353,7 +353,7 @@ module.exports = Surface = class Surface extends CocoClass
     @setPaused false if @ended
     @casting = true
     @wasPlayingWhenCastingBegan = @playing
-    Backbone.Mediator.publish 'level-set-playing', { playing: false }
+    Backbone.Mediator.publish 'level-set-playing', {playing: false}
     @setPlayingCalled = false # don't overwrite playing settings if they changed by, say, scripts
 
     if @coordinateDisplay?
@@ -361,7 +361,7 @@ module.exports = Surface = class Surface extends CocoClass
       @coordinateDisplay.destroy()
 
     createjs.Tween.removeTweens(@surfaceLayer)
-    createjs.Tween.get(@surfaceLayer).to({alpha:0.9}, 1000, createjs.Ease.getPowOut(4.0))
+    createjs.Tween.get(@surfaceLayer).to({alpha: 0.9}, 1000, createjs.Ease.getPowOut(4.0))
 
   onNewWorld: (event) ->
     return unless event.world.name is @world.name
@@ -373,7 +373,7 @@ module.exports = Surface = class Surface extends CocoClass
 
     # This has a tendency to break scripts that are waiting for playback to change when the level is loaded
     # so only run it after the first world is created.
-    Backbone.Mediator.publish 'level-set-playing', { playing: @wasPlayingWhenCastingBegan } unless event.firstWorld or @setPlayingCalled
+    Backbone.Mediator.publish 'level-set-playing', {playing: @wasPlayingWhenCastingBegan} unless event.firstWorld or @setPlayingCalled
 
     fastForwardTo = null
     if @playing
@@ -391,9 +391,9 @@ module.exports = Surface = class Surface extends CocoClass
         @setProgress fastForwardToRatio, 1000 * fastForwardToTime / fastForwardSpeed
         @fastForwarding = true
     createjs.Tween.get(@surfaceLayer)
-      .to({alpha:0.0}, 50)
+      .to({alpha: 0.0}, 50)
       .call(f)
-      .to({alpha:1.0}, 2000, createjs.Ease.getPowOut(2.0))
+      .to({alpha: 1.0}, 2000, createjs.Ease.getPowOut(2.0))
 
   # initialization
 
@@ -405,9 +405,9 @@ module.exports = Surface = class Surface extends CocoClass
     @camera?.destroy()
     @camera = new Camera @canvas
     AudioPlayer.camera = @camera
-    @layers.push @surfaceLayer = new Layer name: "Surface", layerPriority: 0, transform: Layer.TRANSFORM_SURFACE, camera: @camera
-    @layers.push @surfaceTextLayer = new Layer name: "Surface Text", layerPriority: 1, transform: Layer.TRANSFORM_SURFACE_TEXT, camera: @camera
-    @layers.push @screenLayer = new Layer name: "Screen", layerPriority: 2, transform: Layer.TRANSFORM_SCREEN, camera: @camera
+    @layers.push @surfaceLayer = new Layer name: 'Surface', layerPriority: 0, transform: Layer.TRANSFORM_SURFACE, camera: @camera
+    @layers.push @surfaceTextLayer = new Layer name: 'Surface Text', layerPriority: 1, transform: Layer.TRANSFORM_SURFACE_TEXT, camera: @camera
+    @layers.push @screenLayer = new Layer name: 'Screen', layerPriority: 2, transform: Layer.TRANSFORM_SCREEN, camera: @camera
     @stage.addChild @layers...
     @surfaceLayer.addChild @cameraBorder = new CameraBorder bounds: @camera.bounds
     @screenLayer.addChild new Letterbox canvasWidth: canvasWidth, canvasHeight: canvasHeight
@@ -449,7 +449,7 @@ module.exports = Surface = class Surface extends CocoClass
     @updateState true
     @drawCurrentFrame()
     @showGrid() if @options.grid  # TODO: pay attention to world grid setting (which we only know when world simulates)
-    createjs.Ticker.addEventListener "tick", @tick
+    createjs.Ticker.addEventListener 'tick', @tick
     Backbone.Mediator.publish 'level:started'
 
   createOpponentWizard: (opponent) ->
@@ -469,10 +469,10 @@ module.exports = Surface = class Surface extends CocoClass
       @gridLayer.z = 90019001
       @gridLayer.mouseEnabled = false
       @gridShape.alpha = 0.125
-      @gridShape.graphics.beginStroke "blue"
+      @gridShape.graphics.beginStroke 'blue'
       gridSize = Math.round(@world.size()[0] / 20)
       unless gridSize > 0.1
-        return console.error "Grid size is", gridSize, "so we can't draw a grid."
+        return console.error 'Grid size is', gridSize, 'so we can\'t draw a grid.'
       wopStart = x: 0, y: 0
       wopEnd = x: @world.size()[0], y: @world.size()[1]
       supStart = @camera.worldToSurface wopStart
@@ -481,7 +481,7 @@ module.exports = Surface = class Surface extends CocoClass
       while wop.x < wopEnd.x
         sup = @camera.worldToSurface wop
         @gridShape.graphics.mt(sup.x, supStart.y).lt(sup.x, supEnd.y)
-        t = new createjs.Text(wop.x.toFixed(0), "16px Arial", "blue")
+        t = new createjs.Text(wop.x.toFixed(0), '16px Arial', 'blue')
         t.x = sup.x - t.getMeasuredWidth() / 2
         t.y = supStart.y - 10 - t.getMeasuredHeight() / 2
         t.alpha = 0.75
@@ -490,7 +490,7 @@ module.exports = Surface = class Surface extends CocoClass
       while wop.y < wopEnd.y
         sup = @camera.worldToSurface wop
         @gridShape.graphics.mt(supStart.x, sup.y).lt(supEnd.x, sup.y)
-        t = new createjs.Text(wop.y.toFixed(0), "16px Arial", "blue")
+        t = new createjs.Text(wop.y.toFixed(0), '16px Arial', 'blue')
         t.x = 10 - t.getMeasuredWidth() / 2
         t.y = sup.y - t.getMeasuredHeight() / 2
         t.alpha = 0.75
@@ -596,7 +596,7 @@ module.exports = Surface = class Surface extends CocoClass
     Backbone.Mediator.publish('surface:ticked', {dt: 1 / @options.frameRate})
     mib = @stage.mouseInBounds
     if @mouseInBounds isnt mib
-      Backbone.Mediator.publish('surface:mouse-' + (if mib then "over" else "out"), {})
+      Backbone.Mediator.publish('surface:mouse-' + (if mib then 'over' else 'out'), {})
       @mouseInBounds = mib
 
   restoreWorldState: ->
@@ -631,10 +631,10 @@ module.exports = Surface = class Surface extends CocoClass
     return if @world.showPaths is 'paused' and @playing
     return if @world.showPaths is 'selected' and not selectedThang
     @trailmaster ?= new path.Trailmaster @camera
-    selectedOnly = @playing and @world.showPaths is "selected"
+    selectedOnly = @playing and @world.showPaths is 'selected'
     @paths = @trailmaster.generatePaths @world, @getCurrentFrame(), selectedThang, @spriteBoss.sprites, selectedOnly
     @paths.name = 'paths'
-    @spriteBoss.spriteLayers["Path"].addChild @paths
+    @spriteBoss.spriteLayers['Path'].addChild @paths
 
   hidePaths: ->
     return if not @paths
@@ -647,8 +647,8 @@ module.exports = Surface = class Surface extends CocoClass
     margin = (1 - 1 / zoom) / 2
     @stage.cache margin * w, margin * h, w / zoom, h / zoom, scale * zoom
     imageData = @stage.cacheCanvas.toDataURL(format, quality)
-    #console.log "Screenshot with scale", scale, "format", format, "quality", quality, "was", Math.floor(imageData.length / 1024), "kB"
-    screenshot = document.createElement("img")
+    #console.log 'Screenshot with scale', scale, 'format', format, 'quality', quality, 'was', Math.floor(imageData.length / 1024), 'kB'
+    screenshot = document.createElement('img')
     screenshot.src = imageData
     @stage.uncache()
     imageData
diff --git a/app/lib/surface/WizardSprite.coffee b/app/lib/surface/WizardSprite.coffee
index b502cce4c..9c25c0c7f 100644
--- a/app/lib/surface/WizardSprite.coffee
+++ b/app/lib/surface/WizardSprite.coffee
@@ -63,7 +63,7 @@ module.exports = class WizardSprite extends IndieSprite
       continue unless state.wizard?
       @setColorHue state.wizard.wizardColor1
       if targetID = state.wizard.targetSprite
-        return console.warn "Wizard Sprite couldn't find target sprite", targetID unless targetID of @options.sprites
+        return console.warn 'Wizard Sprite couldn\'t find target sprite', targetID unless targetID of @options.sprites
         @setTarget @options.sprites[targetID]
       else
         @setTarget state.wizard.targetPos
@@ -129,7 +129,7 @@ module.exports = class WizardSprite extends IndieSprite
     @targetPos = @boundWizard targetPos
     @beginMoveTween(duration, isLinear)
     @shoveOtherWizards()
-    Backbone.Mediator.publish('self-wizard:target-changed', {sender:@}) if @isSelf
+    Backbone.Mediator.publish('self-wizard:target-changed', {sender: @}) if @isSelf
 
   boundWizard: (target) ->
     # Passed an {x, y} in world coordinates, returns {x, y} within world bounds
@@ -168,7 +168,7 @@ module.exports = class WizardSprite extends IndieSprite
 
     createjs.Tween
       .get(@)
-      .to({tweenPercentage:0.0}, duration, ease)
+      .to({tweenPercentage: 0.0}, duration, ease)
       .call(@endMoveTween)
     @reachedTarget = false
     @update true
@@ -176,7 +176,7 @@ module.exports = class WizardSprite extends IndieSprite
   shoveOtherWizards: (removeMe) ->
     return unless @targetSprite
     allWizards = []
-    Backbone.Mediator.publish('echo-all-wizard-sprites', {payload:allWizards})
+    Backbone.Mediator.publish('echo-all-wizard-sprites', {payload: allWizards})
     allOfUs = (wizard for wizard in allWizards when wizard.targetSprite is @targetSprite)
     allOfUs = (wizard for wizard in allOfUs when wizard isnt @) if removeMe
 
diff --git a/app/lib/surface/path.coffee b/app/lib/surface/path.coffee
index d289faeed..05654f906 100644
--- a/app/lib/surface/path.coffee
+++ b/app/lib/surface/path.coffee
@@ -121,12 +121,12 @@ module.exports.Trailmaster = class Trailmaster
     return unless thang.allTargets
     g = new createjs.Graphics()
     g.setStrokeStyle(0.5)
-    g.beginStroke(createjs.Graphics.getRGB(0,0,0))
+    g.beginStroke(createjs.Graphics.getRGB(0, 0, 0))
     color = colorForThang(thang.team)
 
     i = 0
     while i < thang.allTargets.length
-      g.beginStroke(createjs.Graphics.getRGB(0,0,0))
+      g.beginStroke(createjs.Graphics.getRGB(0, 0, 0))
       g.beginFill(createjs.Graphics.getRGB(color...))
       sup = @camera.worldToSurface x: thang.allTargets[i], y: thang.allTargets[i + 1]
       g.drawEllipse(sup.x - 5, sup.y - 3, 10, 6)
@@ -168,7 +168,7 @@ module.exports.Trailmaster = class Trailmaster
       clone.scaleY *= CLONE_SCALE
       if sprite.expandActions  # old Sprite
         sprite.updateRotation(clone, sprite.data)
-        animActions = sprite.expandActions(if thang.acts then thang.getActionName() else "idle")
+        animActions = sprite.expandActions(if thang.acts then thang.getActionName() else 'idle')
         sprite.applyActionsToSprites(animActions, [clone], true)
         animation = clone.spriteSheet.getAnimation(clone.currentAnimation)
         clone.currentAnimationFrame = Math.min(@clock % (animation.frames.length * 3), animation.frames.length - 1)
@@ -186,9 +186,6 @@ module.exports.Trailmaster = class Trailmaster
     @world.frames[@currentFrame].restoreStateForThang(thang)
     sprites
 
-
-
-
 createPath = (points, options={}, g=null) ->
   options = options or {}
   tailColor = options.tailColor ? options.headColor
@@ -290,5 +287,3 @@ colorForThang = (team, brightness=100, alpha=1.0) =>
   return color
 
 module.exports.createPath = createPath
-
-
diff --git a/app/lib/utils.coffee b/app/lib/utils.coffee
index 9b44dd320..a63a1274d 100644
--- a/app/lib/utils.coffee
+++ b/app/lib/utils.coffee
@@ -1,5 +1,5 @@
 module.exports.clone = (obj) ->
-  return obj if obj is null or typeof (obj) isnt "object"
+  return obj if obj is null or typeof (obj) isnt 'object'
   temp = obj.constructor()
   for key of obj
     temp[key] = module.exports.clone(obj[key])
@@ -25,7 +25,7 @@ module.exports.normalizeFunc = (func_thing, object) ->
   if _.isString(func_thing)
     func = object[func_thing]
     if not func
-      console.error("Could not find method", func_thing, 'in object', @)
+      console.error "Could not find method #{func_thing} in object #{@}"
       return => null # always return a func, or Mediator will go boom
     func_thing = func
   return func_thing
@@ -36,7 +36,7 @@ module.exports.hexToHSL = (hex) ->
 hexToR = (h) -> parseInt (cutHex(h)).substring(0, 2), 16
 hexToG = (h) -> parseInt (cutHex(h)).substring(2, 4), 16
 hexToB = (h) -> parseInt (cutHex(h)).substring(4, 6), 16
-cutHex = (h) -> (if (h.charAt(0) is "#") then h.substring(1, 7) else h)
+cutHex = (h) -> (if (h.charAt(0) is '#') then h.substring(1, 7) else h)
 
 module.exports.hslToHex = (hsl) ->
   '#' + (toHex(n) for n in hslToRgb(hsl...)).join('')
@@ -57,13 +57,43 @@ module.exports.i18n = (say, target, language=me.lang(), fallback='en') ->
     if target of locale
       result = locale[target]
     else continue
-    return result if localeName == language
-    generalResult = result if localeName == generalName
-    fallbackResult = result if localeName == fallback
-    fallforwardResult = result if localeName.indexOf(language) == 0 and not fallforwardResult?
+    return result if localeName is language
+    generalResult = result if localeName is generalName
+    fallbackResult = result if localeName is fallback
+    fallforwardResult = result if localeName.indexOf(language) is 0 and not fallforwardResult?
 
   return generalResult if generalResult?
   return fallforwardResult if fallforwardResult?
   return fallbackResult if fallbackResult?
   return say[target] if target of say
   null
+
+module.exports.getByPath = (target, path) ->
+  pieces = path.split('.')
+  obj = target
+  for piece in pieces
+    return undefined unless piece of obj
+    obj = obj[piece]
+  obj
+
+module.exports.round = _.curry (digits, n) ->
+  n = +n.toFixed(digits)
+
+positify = (func) -> (x) -> if x > 0 then func(x) else 0
+
+# f(x) = ax + b
+createLinearFunc = (params) ->
+  (x) -> (params.a or 1) * x + (params.b or 0)
+
+# f(x) = ax² + bx + c
+createQuadraticFunc = (params) ->
+  (x) -> (params.a or 1) * x * x + (params.b or 1) * x + (params.c or 0)
+
+# f(x) = a log(b (x + c)) + d
+createLogFunc = (params) ->
+  (x) -> if x > 0 then (params.a or 1) * Math.log((params.b or 1) * (x + (params.c or 0))) + (params.d or 0) else 0
+
+module.exports.functionCreators =
+  linear: positify(createLinearFunc)
+  quadratic: positify(createQuadraticFunc)
+  logarithmic: positify(createLogFunc)
diff --git a/app/lib/world/GoalManager.coffee b/app/lib/world/GoalManager.coffee
index b729ece4b..a758d9fc7 100644
--- a/app/lib/world/GoalManager.coffee
+++ b/app/lib/world/GoalManager.coffee
@@ -14,7 +14,7 @@ module.exports = class GoalManager extends CocoClass
   # If you want weird goals or hybrid goals, make a custom goal.
 
   nextGoalID: 0
-  nicks: ["GoalManager"]
+  nicks: ['GoalManager']
 
   constructor: (@world, @initialGoals, @team) ->
     super()
@@ -134,9 +134,9 @@ module.exports = class GoalManager extends CocoClass
       }
       @initGoalState(state, [goal.killThangs, goal.saveThangs], 'killed')
       for getTo in goal.getAllToLocations ? []
-        @initGoalState(state,[ getTo.getToLocation?.who , [] ], 'arrived')
+        @initGoalState(state, [getTo.getToLocation?.who, []], 'arrived')
       for keepFrom in goal.keepAllFromLocations ? []
-        @initGoalState(state,[ [] , keepFrom.keepFromLocation?.who], 'arrived')
+        @initGoalState(state, [[], keepFrom.keepFromLocation?.who], 'arrived')
       @initGoalState(state, [goal.getToLocations?.who, goal.keepFromLocations?.who], 'arrived')
       @initGoalState(state, [goal.leaveOffSides?.who, goal.keepFromLeavingOffSides?.who], 'left')
       @initGoalState(state, [goal.collectThangs?.who, goal.keepFromCollectingThangs?.who], 'collected')
@@ -229,8 +229,8 @@ module.exports = class GoalManager extends CocoClass
     if overallStatus = @checkOverallStatus true
       matchedGoals = (_.find(@goals, {id: goalID}) for goalID, goalState of @goalStates when goalState.status is overallStatus)
       mostEagerGoal = _.min matchedGoals, 'worldEndsAfter'
-      victory = overallStatus is "success"
-      tentative = overallStatus is "success"
+      victory = overallStatus is 'success'
+      tentative = overallStatus is 'success'
       @world.endWorld victory, mostEagerGoal.worldEndsAfter, tentative if mostEagerGoal isnt Infinity
 
   updateGoalState: (goalID, thangID, progressObjectName, frameNumber) ->
@@ -244,20 +244,20 @@ module.exports = class GoalManager extends CocoClass
     if success
       numNeeded = goal.howMany ? Math.max(1, _.size stateThangs)
     else
-      # saveThangs: by default we would want to save all the Thangs, which means that we would want none of them to be "done"
+      # saveThangs: by default we would want to save all the Thangs, which means that we would want none of them to be 'done'
       numNeeded = _.size(stateThangs) - Math.max((goal.howMany ? 1), _.size stateThangs) + 1
     numDone = _.filter(stateThangs).length
-    #console.log "needed", numNeeded, "done", numDone, "of total", _.size(stateThangs), "with how many", goal.howMany, "and stateThangs", stateThangs
+    #console.log 'needed', numNeeded, 'done', numDone, 'of total', _.size(stateThangs), 'with how many', goal.howMany, 'and stateThangs', stateThangs
     return unless numDone >= numNeeded
     return if state.status and not success  # already failed it; don't wipe keyframe
-    state.status = if success then "success" else "failure"
+    state.status = if success then 'success' else 'failure'
     state.keyFrame = frameNumber
-    #console.log goalID, "became", success, "on frame", frameNumber, "with overallStatus", @checkOverallStatus true
+    #console.log goalID, 'became', success, 'on frame', frameNumber, 'with overallStatus', @checkOverallStatus true
     if overallStatus = @checkOverallStatus true
       matchedGoals = (_.find(@goals, {id: goalID}) for goalID, goalState of @goalStates when goalState.status is overallStatus)
       mostEagerGoal = _.min matchedGoals, 'worldEndsAfter'
-      victory = overallStatus is "success"
-      tentative = overallStatus is "success"
+      victory = overallStatus is 'success'
+      tentative = overallStatus is 'success'
       @world.endWorld victory, mostEagerGoal.worldEndsAfter, tentative if mostEagerGoal isnt Infinity
 
   goalIsPositive: (goalID) ->
diff --git a/app/lib/world/Grid.coffee b/app/lib/world/Grid.coffee
index cdf85547e..edd383bfc 100644
--- a/app/lib/world/Grid.coffee
+++ b/app/lib/world/Grid.coffee
@@ -31,7 +31,7 @@ module.exports = class Grid
     for y in @columns gy - height / 2, gy + height / 2
       for x in @rows gx - width / 2, gx + width / 2
         for thang in @grid[y][x]
-          thangs.push thang if thang.collides and not (thang in thangs) and thang.id isnt "Add Thang Phantom"
+          thangs.push thang if thang.collides and not (thang in thangs) and thang.id isnt 'Add Thang Phantom'
     thangs
 
   clampColumn: (y) ->
@@ -51,4 +51,4 @@ module.exports = class Grid
   toString: ->
     upsideDown = _.clone @grid
     upsideDown.reverse()
-    (((if thangs.length then ("" + thangs.length) else " ") for thangs in row).join(" ") for row in upsideDown).join("\n")
+    (((if thangs.length then ('' + thangs.length) else ' ') for thangs in row).join(' ') for row in upsideDown).join("\n")
diff --git a/app/lib/world/component.coffee b/app/lib/world/component.coffee
index bbf0aa399..e0639b57b 100644
--- a/app/lib/world/component.coffee
+++ b/app/lib/world/component.coffee
@@ -1,7 +1,7 @@
 componentKeywords = ['attach', 'constructor', 'validateArguments', 'toString', 'isComponent']  # Array is faster than object
 
 module.exports = class Component
-  @className: "Component"
+  @className: 'Component'
   isComponent: true
   constructor: (config) ->
     for key, value of config
@@ -9,7 +9,7 @@ module.exports = class Component
 
   attach: (thang) ->
     # Optimize; this is much of the World constructor time
-    for key, value of @ when key not in componentKeywords and key[0] isnt "_"
+    for key, value of @ when key not in componentKeywords and key[0] isnt '_'
       oldValue = thang[key]
       if typeof oldValue is 'function'
         thang.appendMethod key, value
diff --git a/app/lib/world/errors.coffee b/app/lib/world/errors.coffee
index 32a5bc129..920db3251 100644
--- a/app/lib/world/errors.coffee
+++ b/app/lib/world/errors.coffee
@@ -1,23 +1,23 @@
 Vector = require './vector'
 
 module.exports.ArgumentError = class ArgumentError extends Error
-  @className: "ArgumentError"
+  @className: 'ArgumentError'
   constructor: (@message, @functionName, @argumentName, @intendedType, @actualValue, @numArguments) ->
     super message
-    @name = "ArgumentError"
+    @name = 'ArgumentError'
     if Error.captureStackTrace?
       Error.captureStackTrace @, @constructor
 
   toString: ->
     s = "#{@functionName}"
-    if @argumentName is "return"
+    if @argumentName is 'return'
       s += "'s return value"
-    else if @argumentName is "_excess"
+    else if @argumentName is '_excess'
       s += " takes only #{@numArguments} argument#{if @numArguments > 1 then 's' else ''}."
     else if @argumentName
       s += "'s argument #{@argumentName}"
     else
-      s += " takes no arguments."
+      s += ' takes no arguments.'
 
     actualType = typeof @actualValue
     if not @actualValue?
@@ -26,12 +26,12 @@ module.exports.ArgumentError = class ArgumentError extends Error
       actualType = 'array'
     typeMismatch = @intendedType and not @intendedType.match actualType
     if typeMismatch
-      v = ""
+      v = ''
       if actualType is 'string'
         v = "\"#{@actualValue}\""
-      else if actualType is "number"
+      else if actualType is 'number'
         if Math.round(@actualValue) is @actualValue then @actualValue else @actualValue.toFixed(2)
-      else if actualType is "boolean"
+      else if actualType is 'boolean'
         v = "#{@actualValue}"
       else if (@actualValue? and @actualValue.id and @actualValue.trackedPropertiesKeys)
         # (Don't import Thang, but determine whether it is Thang.)
@@ -40,7 +40,7 @@ module.exports.ArgumentError = class ArgumentError extends Error
         v = @actualValue.toString()
       showValue = showValue or @actualValue instanceof Vector
       s += " should have type #{@intendedType}, but got #{actualType}#{if v then ': ' + v else ''}."
-    else if @argumentName and @argumentName isnt "_excess"
-      s += " has a problem."
+    else if @argumentName and @argumentName isnt '_excess'
+      s += ' has a problem.'
     s += '\n' + @message if @message
     s
diff --git a/app/lib/world/names.coffee b/app/lib/world/names.coffee
index 6a01730e5..8cfa1a449 100644
--- a/app/lib/world/names.coffee
+++ b/app/lib/world/names.coffee
@@ -1,370 +1,375 @@
 module.exports.thangNames = thangNames =
-  "Soldier M": [
-    "William"
-    "Lucas"
-    "Marcus"
-    "Robert"
-    "Gordon"
-    "Kirin"
-    "Theo"
-    "Roger"
-    "Roderick"
-    "Samson"
-    "Silas"
-    "Richard"
-    "Max"
-    "Jax"
-    "Dax"
-    "Mischa"
-    "Ronald"
-    "Tyrone"
-    "Thelonious"
-    "Miles"
-    "Bill"
-    "Kumar"
-    "Ricardo"
-    "Maxwell"
-    "Jonah"
-    "Leopold"
-    "Phineas"
-    "Ferb"
-    "Felix"
-    "Ezra"
-    "Lucian"
-    "Augustus"
-    "Ronan"
-    "Pierce"
-    "Harry"
-    "Hirium"
-    "Hugo"
-    "Cecil"
-    "Barron"
-    "Huburt"
-    "Sterling"
-    "Alistair"
-    "Cid"
-    "Remy"
-    "Stormy"
-    "Halle"
-    "Sage"
-    "Ryan"
-    "Bond"
+  'Soldier M': [
+    'Duke'
+    'William'
+    'Lucas'
+    'Marcus'
+    'Robert'
+    'Gordon'
+    'Kirin'
+    'Theo'
+    'Roger'
+    'Roderick'
+    'Samson'
+    'Silas'
+    'Richard'
+    'Max'
+    'Jax'
+    'Dax'
+    'Mischa'
+    'Ronald'
+    'Tyrone'
+    'Thelonious'
+    'Miles'
+    'Bill'
+    'Kumar'
+    'Ricardo'
+    'Maxwell'
+    'Jonah'
+    'Leopold'
+    'Phineas'
+    'Ferb'
+    'Felix'
+    'Ezra'
+    'Lucian'
+    'Augustus'
+    'Ronan'
+    'Pierce'
+    'Harry'
+    'Hirium'
+    'Hugo'
+    'Cecil'
+    'Barron'
+    'Huburt'
+    'Sterling'
+    'Alistair'
+    'Cid'
+    'Remy'
+    'Stormy'
+    'Halle'
+    'Sage'
+    'Ryan'
+    'Bond'
   ]
-  "Soldier F": [
-    "Sarah"
-    "Alexandra"
-    "Holly"
-    "Trinity"
-    "Nikita"
-    "Alana"
-    "Lana"
-    "Joan"
-    "Helga"
-    "Annie"
-    "Lukaz"
-    "Gorgin"
-    "Coco"
-    "Buffy"
-    "Allankrita"
+  'Soldier F': [
+    'Sarah'
+    'Alexandra'
+    'Holly'
+    'Trinity'
+    'Nikita'
+    'Alana'
+    'Lana'
+    'Joan'
+    'Helga'
+    'Annie'
+    'Lukaz'
+    'Gorgin'
+    'Coco'
+    'Buffy'
+    'Allankrita'
+    'Kay'
   ]
-  "Peasant M": [
-    "Yorik"
-    "Hector"
-    "Thad"
-    "Victor"
-    "Lyle"
-    "Charles"
-    "Yusef"
-    "Hingle"
-    "Azgot"
-    "Piers"
-    "Carlton"
-    "Hershell"
-    "Gawain"
-    "Durfkor"
-    "Paps"
-    "Hodor"
+  'Peasant M': [
+    'Yorik'
+    'Hector'
+    'Thad'
+    'Victor'
+    'Lyle'
+    'Charles'
+    'Yusef'
+    'Hingle'
+    'Azgot'
+    'Piers'
+    'Carlton'
+    'Hershell'
+    'Gawain'
+    'Durfkor'
+    'Paps'
+    'Hodor'
   ]
-  "Peasant F": [
-    "Hilda"
-    "Icey"
-    "Matilda"
-    "Mertia"
-    "Mary"
-    "Brandy"
-    "Gwendolin"
-    "Tabitha"
-    "Regan"
-    "Giselle"
-    "Bernadette"
+  'Peasant F': [
+    'Hilda'
+    'Icey'
+    'Matilda'
+    'Mertia'
+    'Mary'
+    'Brandy'
+    'Gwendolin'
+    'Tabitha'
+    'Regan'
+    'Giselle'
+    'Bernadette'
   ]
-  "Archer F": [
-    "Phoebe"
-    "Mira"
-    "Agapi"
-    "Cecily"
-    "Tansy"
-    "Ivy"
-    "Gemma"
-    "Keturah"
-    "Korra"
-    "Kim"
-    "Odette"
-    "Orly"
-    "Mercedes"
-    "Rosaline"
-    "Vesper"
-    "Beverly"
-    "Natalie"
-    "Clare"
-    "Rowan"
-    "Omar"
-    "Alden"
-    "Cairn"
-    "Jensen"
-    "Yilitha"
-    "Mirana"
-    "Lina"
-    "Luna"
-    "Alleria"
-    "Vereesa"
-    "Beatrice"
+  'Archer F': [
+    'Phoebe'
+    'Mira'
+    'Agapi'
+    'Cecily'
+    'Tansy'
+    'Ivy'
+    'Gemma'
+    'Keturah'
+    'Korra'
+    'Kim'
+    'Odette'
+    'Orly'
+    'Mercedes'
+    'Rosaline'
+    'Vesper'
+    'Beverly'
+    'Natalie'
+    'Clare'
+    'Rowan'
+    'Omar'
+    'Alden'
+    'Cairn'
+    'Jensen'
+    'Yilitha'
+    'Mirana'
+    'Lina'
+    'Luna'
+    'Alleria'
+    'Vereesa'
+    'Beatrice'
   ]
-  "Archer M": [
-    "Brian"
-    "Cole"
-    "Roman"
-    "Hunter"
-    "Simon"
-    "Robin"
-    "Quinn"
-    "Arty"
-    "Gimsley"
-    "Fidsdale"
-    "Slyvos"
-    "Logos"
-    "Denin"
-    "Lycan"
-    "Loco"
-    "Vican"
-    "Mars"
-    "Dev"
-    "Oliver"
+  'Archer M': [
+    'Brian'
+    'Cole'
+    'Roman'
+    'Hunter'
+    'Simon'
+    'Robin'
+    'Quinn'
+    'Arty'
+    'Gimsley'
+    'Fidsdale'
+    'Slyvos'
+    'Logos'
+    'Denin'
+    'Lycan'
+    'Loco'
+    'Vican'
+    'Mars'
+    'Dev'
+    'Oliver'
   ]
-  "Ogre Munchkin M": [
-    "Brack"
-    "Gort"
-    "Weeb"
-    "Nerph"
-    "Kratt"
-    "Smerk"
-    "Raack"
-    "Dobo"
-    "Draff"
-    "Zozo"
-    "Kogpole"
-    "Leerer"
-    "Skoggen"
-    "Treg"
-    "Goreball"
-    "Gert"
-    "Thabt"
-    "Snortt"
-    "Kog"
-    "Ursa"
-    "Ragtime"
+  'Ogre Munchkin M': [
+    'Brack'
+    'Gort'
+    'Weeb'
+    'Nerph'
+    'Kratt'
+    'Smerk'
+    'Raack'
+    'Dobo'
+    'Draff'
+    'Zozo'
+    'Kogpole'
+    'Leerer'
+    'Skoggen'
+    'Treg'
+    'Goreball'
+    'Gert'
+    'Thabt'
+    'Snortt'
+    'Kog'
+    'Ursa'
+    'Ragtime'
   ]
-  "Ogre Munchkin F": [
-    "Iyert"
-    "Palt"
-    "Shmeal"
-    "Gurzunn"
-    "Yugark"
-    "Dosha"
-    "Inski"
-    "Lacos"
-    "Upfish"
+  'Ogre Munchkin F': [
+    'Iyert'
+    'Palt'
+    'Shmeal'
+    'Gurzunn'
+    'Yugark'
+    'Dosha'
+    'Inski'
+    'Lacos'
+    'Upfish'
   ]
-  "Ogre Peon M": [
-    "Durbo"
-    "Kurger"
-    "Mudwich"
-    "Ba Bo"
-    "Zugger"
-    "Toe Pod"
+  'Ogre Peon M': [
+    'Durbo'
+    'Kurger'
+    'Mudwich'
+    'Ba Bo'
+    'Zugger'
+    'Toe Pod'
   ]
-  "Ogre Peon F": [
-    "Iblet"
-    "Lorba"
-    "Zzoya"
-    "Yamra"
-    "Greeke"
-    "Vapa"
+  'Ogre Peon F': [
+    'Iblet'
+    'Lorba'
+    'Zzoya'
+    'Yamra'
+    'Greeke'
+    'Vapa'
   ]
-  "Ogre M": [
-    "Krogg"
-    "Dronck"
-    "Trogdor"
-    "Kulgor"
-    "Skrungt"
-    "Mak Fod"
-    "Trung"
-    "Axe Ox"
-    "Vargutt"
-    "Grumus"
-    "Gug"
-    "Tarlok"
-    "Gurulax"
-    "Mokrul"
-    "Polifemo"
-    "Muthyala"
-    "Saltporker"
+  'Ogre M': [
+    'Krogg'
+    'Dronck'
+    'Trogdor'
+    'Kulgor'
+    'Skrungt'
+    'Mak Fod'
+    'Trung'
+    'Axe Ox'
+    'Vargutt'
+    'Grumus'
+    'Gug'
+    'Tarlok'
+    'Gurulax'
+    'Mokrul'
+    'Polifemo'
+    'Muthyala'
+    'Saltporker'
   ]
-  "Ogre F": [
-    "Nareng"
-    "Morthrug"
-    "Glonc"
-    "Marghurk"
-    "Martha"
-    "Holkam"
-    "Alkaz"
-    "Gar'ah"
-    "Mak'rah"
-    "Marnag"
+  'Ogre F': [
+    'Nareng'
+    'Morthrug'
+    'Glonc'
+    'Marghurk'
+    'Martha'
+    'Holkam'
+    'Alkaz'
+    'Gar\'ah'
+    'Mak\'rah'
+    'Marnag'
   ]
-  "Ogre Brawler": [
-    "Grul'thock"
-    "Boz"
-    "Trod"
-    "Muul"
-    "Grumoll"
-    "Burobb"
-    "Arelt"
-    "Zagurk"
-    "Zeredd"
-    "Borgag"
-    "Grognar"
-    "Ironjaw"
-    "Tuguro"
-    "York"
-    "Ork'han"
-    "Roast Beefy"
-    "Haggar"
+  'Ogre Brawler': [
+    'Grul\'thock'
+    'Boz'
+    'Trod'
+    'Muul'
+    'Grumoll'
+    'Burobb'
+    'Arelt'
+    'Zagurk'
+    'Zeredd'
+    'Borgag'
+    'Grognar'
+    'Ironjaw'
+    'Tuguro'
+    'York'
+    'Ork\'han'
+    'Roast Beefy'
+    'Haggar'
   ]
-  "Ogre Fangrider": [
-    "Dreek"
-    "Flarsho"
-    "Mizzy"
-    "Secka"
-    "Arizard"
-    "Secka"
-    "Arizard"
-    "Morzgret"
-    "Doralt"
-    "Geggret"
-    "Gurzthrot"
-    "Murgark"
-    "Muttin"
-    "Bortrok"
+  'Ogre Fangrider': [
+    'Dreek'
+    'Flarsho'
+    'Mizzy'
+    'Secka'
+    'Arizard'
+    'Secka'
+    'Arizard'
+    'Morzgret'
+    'Doralt'
+    'Geggret'
+    'Gurzthrot'
+    'Murgark'
+    'Muttin'
+    'Bortrok'
   ]
-  "Ogre Shaman": [
-    "Sham'uk"
-    "Il'Du'duka"
-    "Ahst'durante"
-    "Poult"
-    "Aolian'Tak"
-    "Tuzell"
-    "Yamizeb"
-    "Yerong"
-    "Tuzang"
-    "Varreth"
-    "Yugargen"
-    "Turann"
-    "Ugoki"
-    "Zulabar"
-    "Zo'Goroth"
-    "Mogadishu"
-    "Nazgareth"
-    "Gror"
-    "Grek"
-    "Gom"
-    "Gogg"
-    "Ghuk"
-    "Makas"
-    "Drun"
+  'Ogre Shaman': [
+    'Sham\'uk'
+    'Il\'Du\'duka'
+    'Ahst\'durante'
+    'Poult'
+    'Aolian\'Tak'
+    'Tuzell'
+    'Yamizeb'
+    'Yerong'
+    'Tuzang'
+    'Varreth'
+    'Yugargen'
+    'Turann'
+    'Ugoki'
+    'Zulabar'
+    'Zo\'Goroth'
+    'Mogadishu'
+    'Nazgareth'
+    'Gror'
+    'Grek'
+    'Gom'
+    'Gogg'
+    'Ghuk'
+    'Makas'
+    'Drun'
   ]
-  "Ogre Thrower": [
-    "Kyrgg"
-    "Durnath"
-    "Kraggan"
-    "Rasha"
-    "Moza"
-    "Vujii"
-    "Esha"
-    "Zara"
-    "Hamedi"
-    "Jinjin"
-    "Yetu"
-    "Makas"
-    "Rakash"
-    "Drumbaa"
-    "Pinakin"
+  'Ogre Thrower': [
+    'Kyrgg'
+    'Durnath'
+    'Kraggan'
+    'Rasha'
+    'Moza'
+    'Vujii'
+    'Esha'
+    'Zara'
+    'Hamedi'
+    'Jinjin'
+    'Yetu'
+    'Makas'
+    'Rakash'
+    'Drumbaa'
+    'Pinakin'
   ]
-  "Burl": [
-    "Borlit"
-    "Burlosh"
-    "Dorf"
+  'Burl': [
+    'Borlit'
+    'Burlosh'
+    'Dorf'
   ]
-  "Griffin Rider": [
-    "Aeoldan"
-    "Bestarius"
+  'Griffin Rider': [
+    'Aeoldan'
+    'Bestarius'
 
   ]
-  "Potion Master": [
-    "Snake"
-    "Amaranth"
-    "Zander"
-    "Arora"
-    "Curie"
-    "Clause"
-    "Vanders"
+  'Potion Master': [
+    'Snake'
+    'Amaranth'
+    'Zander'
+    'Arora'
+    'Curie'
+    'Clause'
+    'Vanders'
   ]
-  "Librarian": [
-    "Hushbaum"
-    "Matilda"
-    "Agnes"
-    "Agathe"
-    "Satish"
+  'Librarian': [
+    'Hushbaum'
+    'Matilda'
+    'Agnes'
+    'Agathe'
+    'Satish'
   ]
-  "Equestrian": [
-    "Reynaldo"
-    "Ryder"
-    "Thoron"
-    "Mirial"
-    "Neely"
+  'Equestrian': [
+    'Reynaldo'
+    'Ryder'
+    'Thoron'
+    'Mirial'
+    'Neely'
   ]
-  "Knight": [
-    "Tharin"
-    "Arthur"
-    "Galahad"
-    "Mace"
-    "Drake"
-    "Duran"
-    "Almeric"
-    "Hunfray"
-    "Hank"
-    "Jeph"
-    "Neville"
+  'Knight': [
+    'Tharin'
+    'Arthur'
+    'Galahad'
+    'Mace'
+    'Drake'
+    'Duran'
+    'Almeric'
+    'Hunfray'
+    'Hank'
+    'Jeph'
+    'Neville'
+    'Alphonse'
+    'Edward'
   ]
-  "Captain": [
-    "Anya"
-    "Brigette"
-    "Sarre"
-    "Katana"
-    "Lily"
-    "Isa"
-    "Dimia"
-    "Jane"
-    "Lia"
-    "Hardcastle"
+  'Captain': [
+    'Anya'
+    'Brigette'
+    'Sarre'
+    'Katana'
+    'Lily'
+    'Isa'
+    'Dimia'
+    'Jane'
+    'Lia'
+    'Hardcastle'
+    'Leona'
   ]
diff --git a/app/lib/world/rand.coffee b/app/lib/world/rand.coffee
index 515019611..aa83a9b02 100644
--- a/app/lib/world/rand.coffee
+++ b/app/lib/world/rand.coffee
@@ -1,6 +1,6 @@
 # http://coffeescriptcookbook.com/chapters/math/generating-predictable-random-numbers
 class Rand
-  @className: "Rand"
+  @className: 'Rand'
   # If created without a seed, uses current time as seed.
   constructor: (@seed) ->
     # Knuth and Lewis' improvements to Park and Miller's LCPRNG
diff --git a/app/lib/world/rectangle.coffee b/app/lib/world/rectangle.coffee
index f4f5400a4..e3fec8d76 100644
--- a/app/lib/world/rectangle.coffee
+++ b/app/lib/world/rectangle.coffee
@@ -1,7 +1,7 @@
 Vector = require './vector'
 
 class Rectangle
-  @className: "Rectangle"
+  @className: 'Rectangle'
   # Class methods for nondestructively operating
   for name in ['add', 'subtract', 'multiply', 'divide']
     do (name) ->
diff --git a/app/lib/world/system.coffee b/app/lib/world/system.coffee
index 458366b21..74b26e7d8 100644
--- a/app/lib/world/system.coffee
+++ b/app/lib/world/system.coffee
@@ -3,7 +3,7 @@
 # Other Systems might be things like Attraction, EdgeBounce, EdgeWrap, and non-physics ones, too, like Rendering, Animation, ...
 
 module.exports = class System
-  @className: "System"
+  @className: 'System'
   constructor: (@world, config) ->
     # Unlike with Component, we don't automatically copy all our properties onto the World.
     # Subclasses can copy select properties here if they like.
diff --git a/app/lib/world/systems/collision.coffee b/app/lib/world/systems/collision.coffee
index efceab106..45b2bbeeb 100644
--- a/app/lib/world/systems/collision.coffee
+++ b/app/lib/world/systems/collision.coffee
@@ -1,16 +1,16 @@
 # http://codingowl.com/readblog.php?blogid=124
 module.exports.CollisionCategory = class CollisionCategory
-  @className: "CollisionCategory"
+  @className: 'CollisionCategory'
   constructor: (name, @superteamIndex=null, @collisionSystem) ->
-    # @superteamIndex is null for "none", "obstacles", and "dead".
-    # It's 0 for "ground", "air", and "ground_and_air" units with no superteams.
+    # @superteamIndex is null for 'none', 'obstacles', and 'dead'.
+    # It's 0 for 'ground', 'air', and 'ground_and_air' units with no superteams.
     # It's 1, 2, or 3 for the superteams it gets after that. We can only have 16 collision categories.
-    @ground = name.search("ground") isnt -1
-    @air = name.search("air") isnt -1
+    @ground = name.search('ground') isnt -1
+    @air = name.search('air') isnt -1
     @name = CollisionCategory.nameFor name, @superteamIndex
     @superteamIndex ?= 0 if @ground or @air
     @number = 1 << @collisionSystem.totalCategories++
-    if @collisionSystem.totalCategories > 16 then console.log "There should only be 16 collision categories!"
+    if @collisionSystem.totalCategories > 16 then console.log 'There should only be 16 collision categories!'
     @mask = 0
     @collisionSystem.allCategories[@name] = @
     for otherCatName, otherCat of @collisionSystem.allCategories
@@ -19,32 +19,32 @@ module.exports.CollisionCategory = class CollisionCategory
         otherCat.mask = otherCat.mask | @number
 
   collidesWith: (cat) ->
-    # "none" collides with nothing
-    return false if @name is "none" or cat.name is "none"
+    # 'none' collides with nothing
+    return false if @name is 'none' or cat.name is 'none'
 
-    # "obstacles" collides with everything; could also try letting air units (but not ground_and_air) fly over these
-    return true if cat.name is "obstacles" or @name is "obstacles"
+    # 'obstacles' collides with everything; could also try letting air units (but not ground_and_air) fly over these
+    return true if cat.name is 'obstacles' or @name is 'obstacles'
 
-    # "dead" collides only with obstacles
-    return cat.name is "obstacles" if @name is "dead"
-    return @name is "obstacles" if cat.name is "dead"
+    # 'dead' collides only with obstacles
+    return cat.name is 'obstacles' if @name is 'dead'
+    return @name is 'obstacles' if cat.name is 'dead'
 
-    # "ground_and_air_<team>" units don't hit ground or air units on their team (so missiles don't hit same team)
+    # 'ground_and_air_<team>' units don't hit ground or air units on their team (so missiles don't hit same team)
     sameTeam = @superteamIndex and cat.superteamIndex is @superteamIndex
     return false if sameTeam and @ground and @air
 
-    # actually, "ground_and_air<team>" units don't hit any ground_and_air units (temp missile collision fix)
+    # actually, 'ground_and_air<team>' units don't hit any ground_and_air units (temp missile collision fix)
     return false if @ground and @air and cat.ground and cat.air
 
-    # "ground" collides with "ground"
+    # 'ground' collides with 'ground'
     return true if cat.ground and @ground
 
-    # "air" collides with "air"
+    # 'air' collides with 'air'
     return true if cat.air and @air
 
-    # doesn't collide (probably "ground" and "air")
+    # doesn't collide (probably 'ground' and 'air')
     false
 
   @nameFor: (name, superteamIndex=null) ->
-    return name unless name.match("ground") or name.match("air")
-    name + "_" + (superteamIndex or 0)
+    return name unless name.match('ground') or name.match('air')
+    name + '_' + (superteamIndex or 0)
diff --git a/app/lib/world/thang.coffee b/app/lib/world/thang.coffee
index 248f30e60..63d544b1e 100644
--- a/app/lib/world/thang.coffee
+++ b/app/lib/world/thang.coffee
@@ -131,7 +131,7 @@ module.exports = class Thang
       source.original = chain.original.toString()
       source.user = chain.user?.toString()
     else
-      source.original = @[methodName]?.toString() ? ""
+      source.original = @[methodName]?.toString() ? ''
     source.original = Aether.getFunctionBody source.original
     source
 
diff --git a/app/lib/world/thang_state.coffee b/app/lib/world/thang_state.coffee
index f7c3b1f23..c4a1a540b 100644
--- a/app/lib/world/thang_state.coffee
+++ b/app/lib/world/thang_state.coffee
@@ -8,15 +8,15 @@ else
   bytesPerFloat = 4
 
 module.exports = class ThangState
-  @className: "ThangState"
+  @className: 'ThangState'
   @trackedPropertyTypes: [
-    "boolean"
-    "number"
-    "string"
-    "array"  # will turn everything into strings
-    "object"  # grrr
-    "Vector"
-    "Thang"  # serialized as ids, like strings
+    'boolean'
+    'number'
+    'string'
+    'array'  # will turn everything into strings
+    'object'  # grrr
+    'Vector'
+    'Thang'  # serialized as ids, like strings
   ]
 
   hasRestored: false
@@ -40,7 +40,7 @@ module.exports = class ThangState
     unless type
       type = @trackedPropertyTypes[propIndex]
       storage = @trackedPropertyValues[propIndex]
-    if type is "Vector"
+    if type is 'Vector'
       value = new Vector storage[3 * @frameIndex], storage[3 * @frameIndex + 1], storage[3 * @frameIndex + 2]
     else if type is 'string'
       specialKey = storage[@frameIndex]
@@ -78,7 +78,7 @@ module.exports = class ThangState
         type = @trackedPropertyTypes[propIndex]
         storage = @trackedPropertyValues[propIndex]
         props.push(@thang[prop] = @getStoredProp propIndex, type, storage)
-        #console.log @frameIndex, @thang.id, prop, propIndex, type, storage, "got", @thang[prop]
+        #console.log @frameIndex, @thang.id, prop, propIndex, type, storage, 'got', @thang[prop]
       @props = props
       @trackedPropertyTypes = @trackedPropertyValues = @specialKeysToValues = null  # leave @trackedPropertyKeys for indexing
       @hasRestored = true
@@ -90,14 +90,14 @@ module.exports = class ThangState
 
   restorePartial: (ratio) ->
     inverse = 1 - ratio
-    for prop, propIndex in @trackedPropertyKeys when prop is "pos" or prop is "rotation"
+    for prop, propIndex in @trackedPropertyKeys when prop is 'pos' or prop is 'rotation'
       if @hasRestored
         value = @props[propIndex]
       else
         type = @trackedPropertyTypes[propIndex]
         storage = @trackedPropertyValues[propIndex]
         value = @getStoredProp propIndex, type, storage
-      if prop is "pos"
+      if prop is 'pos'
         if @thang.teleport and @thang.pos.distanceSquared(value) > 900
           # Don't interpolate; it was probably a teleport. https://github.com/codecombat/codecombat/issues/738
           @thang.pos = value
@@ -106,7 +106,7 @@ module.exports = class ThangState
           @thang.pos.x = inverse * @thang.pos.x + ratio * value.x
           @thang.pos.y = inverse * @thang.pos.y + ratio * value.y
           @thang.pos.z = inverse * @thang.pos.z + ratio * value.z
-      else if prop is "rotation"
+      else if prop is 'rotation'
         @thang.rotation = inverse * @thang.rotation + ratio * value
       @thang.partialState = true
     @
@@ -119,7 +119,7 @@ module.exports = class ThangState
       value = @props[originalPropIndex]
       if value
         # undefined, null, false, 0 won't trigger in this serialization code scheme anyway, so we can't differentiate between them when deserializing
-        if type is "Vector"
+        if type is 'Vector'
           storage[3 * frameIndex] = value.x
           storage[3 * frameIndex + 1] = value.y
           storage[3 * frameIndex + 2] = value.z
@@ -157,7 +157,7 @@ module.exports = class ThangState
           storage[frameIndex] = specialKey
         else
           storage[frameIndex] = value
-        #console.log @thang.id, "assigned prop", originalPropIndex, newPropIndex, value, type, "at", frameIndex, "to", storage[frameIndex]
+        #console.log @thang.id, 'assigned prop', originalPropIndex, newPropIndex, value, type, 'at', frameIndex, 'to', storage[frameIndex]
     null
 
   @deserialize: (world, frameIndex, thang, trackedPropertyKeys, trackedPropertyTypes, trackedPropertyValues, specialKeysToValues) ->
@@ -173,12 +173,12 @@ module.exports = class ThangState
 
   @transferableBytesNeededForType: (type, nFrames) ->
     bytes = switch type
-      when "boolean" then 1
-      when "number" then bytesPerFloat
-      when "Vector" then bytesPerFloat * 3
-      when "string" then 4
-      when "Thang" then 4  # turn them into strings of their ids
-      when "array"  then 4  # turn them into strings and hope it doesn't explode?
+      when 'boolean' then 1
+      when 'number' then bytesPerFloat
+      when 'Vector' then bytesPerFloat * 3
+      when 'string' then 4
+      when 'Thang' then 4  # turn them into strings of their ids
+      when 'array'  then 4  # turn them into strings and hope it doesn't explode?
       else 0
     # We need to be a multiple of bytesPerFloat otherwise bigger-byte array (Float64Array, etc.) offsets won't work
     # http://www.kirupa.com/forum/showthread.php?378737-Typed-Arrays-Y-U-No-offset-at-values-other-than-multiples-of-element-size
@@ -187,17 +187,17 @@ module.exports = class ThangState
   @createArrayForType: (type, nFrames, buffer, offset) ->
     bytes = @transferableBytesNeededForType type, nFrames
     storage = switch type
-      when "boolean"
+      when 'boolean'
         new Uint8Array(buffer, offset, nFrames)
-      when "number"
+      when 'number'
         new FloatArrayType(buffer, offset, nFrames)
-      when "Vector"
+      when 'Vector'
         new FloatArrayType(buffer, offset, nFrames * 3)
-      when "string"
+      when 'string'
         new Uint32Array(buffer, offset, nFrames)
-      when "Thang"
+      when 'Thang'
         new Uint32Array(buffer, offset, nFrames)
-      when "array"
+      when 'array'
         new Uint32Array(buffer, offset, nFrames)
       else
         []
diff --git a/app/lib/world/vector.coffee b/app/lib/world/vector.coffee
index ed5112f2c..a17e5d077 100644
--- a/app/lib/world/vector.coffee
+++ b/app/lib/world/vector.coffee
@@ -1,6 +1,6 @@
 # https://github.com/hornairs/blog/blob/master/assets/coffeescripts/flocking/vector.coffee
 class Vector
-  @className: "Vector"
+  @className: 'Vector'
   # Class methods for nondestructively operating
   for name in ['add', 'subtract', 'multiply', 'divide', 'limit', 'normalize']
     do (name) ->
@@ -8,7 +8,7 @@ class Vector
         a.copy()[name](b, useZ)
 
   isVector: true
-  apiProperties: ['x', 'y', 'magnitude', 'heading', 'distance', 'dot', 'equals', 'copy', 'distanceSquared']
+  apiProperties: ['x', 'y', 'z', 'magnitude', 'heading', 'distance', 'dot', 'equals', 'copy', 'distanceSquared']
 
   constructor: (@x=0, @y=0, @z=0) ->
 
diff --git a/app/lib/world/world.coffee b/app/lib/world/world.coffee
index fa075995f..3e929ef77 100644
--- a/app/lib/world/world.coffee
+++ b/app/lib/world/world.coffee
@@ -12,7 +12,7 @@ PROGRESS_UPDATE_INTERVAL = 200
 DESERIALIZATION_INTERVAL = 20
 
 module.exports = class World
-  @className: "World"
+  @className: 'World'
   age: 0
   ended: false
   preloading: false  # Whether we are just preloading a world in case we soon cast it
@@ -63,12 +63,12 @@ module.exports = class World
     @thangMap[thang.id] = thang
 
   thangDialogueSounds: ->
-    if @frames.length < @totalFrames then throw new Error("World should be over before grabbing dialogue")
+    if @frames.length < @totalFrames then throw new Error('World should be over before grabbing dialogue')
     [sounds, seen] = [[], {}]
     for frame in @frames
       for thangID, state of frame.thangStateMap
-        continue unless state.thang.say and sayMessage = state.getStateForProp "sayMessage"
-        soundKey = state.thang.spriteName + ":" + sayMessage
+        continue unless state.thang.say and sayMessage = state.getStateForProp 'sayMessage'
+        soundKey = state.thang.spriteName + ':' + sayMessage
         unless seen[soundKey]
           sounds.push [state.thang.spriteName, sayMessage]
           seen[soundKey] = true
@@ -83,7 +83,7 @@ module.exports = class World
   loadFrames: (loadedCallback, errorCallback, loadProgressCallback, skipDeferredLoading, loadUntilFrame) ->
     return if @aborted
     unless @thangs.length
-      console.log "Warning: loadFrames called on empty World (no thangs)."
+      console.log 'Warning: loadFrames called on empty World (no thangs).'
     t1 = now()
     @t0 ?= t1
     if loadUntilFrame
@@ -96,7 +96,7 @@ module.exports = class World
         for thang in @thangs when thang.isProgrammable
           userCode = @userCodeMap[thang.id] ? {}
           for methodName, aether of userCode
-            framesToLoadFlowBefore = if methodName is 'plan' then 200 else 1  # Adjust if plan() is taking even longer
+            framesToLoadFlowBefore = if methodName is 'plan' or methodName is 'makeBid' then 200 else 1  # Adjust if plan() is taking even longer
             aether._shouldSkipFlow = i < loadUntilFrame - framesToLoadFlowBefore
       try
         @getFrame(i)
@@ -113,7 +113,7 @@ module.exports = class World
         loadProgressCallback? i / @totalFrames unless @preloading
         t1 = t2
         if t2 - @t0 > 1000
-          console.log('  Loaded', i, 'of', @totalFrames, "(+" + (t2 - @t0).toFixed(0) + "ms)")
+          console.log '  Loaded', i, 'of', @totalFrames, '(+' + (t2 - @t0).toFixed(0) + 'ms)'
           @t0 = t2
         continueFn = =>
           return if @destroyed
@@ -155,7 +155,7 @@ module.exports = class World
     for levelSystem in level.systems
       systemModel = levelSystem.model
       config = levelSystem.config
-      systemClass = @loadClassFromCode systemModel.js, systemModel.name, "system"
+      systemClass = @loadClassFromCode systemModel.js, systemModel.name, 'system'
       #console.log "using db system class ---\n", systemClass, "\n--- from code ---n", systemModel.js, "\n---"
       system = new systemClass @, config
       @addSystems system
@@ -169,15 +169,15 @@ module.exports = class World
     # Load new Thangs
     toAdd = []
     for d in level.thangs
-      continue if d.thangType is "Interface"  # ignore old Interface Thangs until we've migrated away
+      continue if d.thangType is 'Interface'  # ignore old Interface Thangs until we've migrated away
       components = []
       for component in d.components
         componentModel = _.find level.levelComponents, (c) -> c.original is component.original and c.version.major is (component.majorVersion ? 0)
-        #console.log "found model", componentModel, "from", component, "for", d.id, "from existing components", level.levelComponents
-        componentClass = @loadClassFromCode componentModel.js, componentModel.name, "component"
+        #console.log 'found model', componentModel, 'from', component, 'for', d.id, 'from existing components', level.levelComponents
+        componentClass = @loadClassFromCode componentModel.js, componentModel.name, 'component'
         components.push [componentClass, component.config]
-        #console.log "---", d.id, "using db component class ---\n", componentClass, "\n--- from code ---\n", componentModel.js, '\n---'
-        #console.log "(found", componentModel, "for id", component.original, "from", level.levelComponents, ")"
+        #console.log '---', d.id, "using db component class ---\n", componentClass, "\n--- from code ---\n", componentModel.js, '\n---'
+        #console.log '(found', componentModel, 'for id', component.original, 'from', level.levelComponents, ')'
       thangType = d.thangType
       thangTypeModel = _.find level.thangTypes, (t) -> t.original is thangType
       thangType = thangTypeModel.name if thangTypeModel
@@ -185,7 +185,7 @@ module.exports = class World
       try
         thang.addComponents components...
       catch e
-        console.error "couldn't load components for", d.thangType, d.id, "because", e, e.stack, e.stackTrace
+        console.error 'couldn\'t load components for', d.thangType, d.id, 'because', e, e.stack, e.stackTrace
       toAdd.push thang
     @extraneousThangs = consolidateThangs toAdd if willSimulate  # combine walls, for example; serialize the leftovers later
     for thang in toAdd
@@ -200,11 +200,11 @@ module.exports = class World
     @scripts = []
     @addScripts level.scripts...
 
-  loadClassFromCode: (js, name, kind="component") ->
+  loadClassFromCode: (js, name, kind='component') ->
     # Cache them based on source code so we don't have to worry about extra compilations
     @componentCodeClassMap ?= {}
     @systemCodeClassMap ?= {}
-    map = if kind is "component" then @componentCodeClassMap else @systemCodeClassMap
+    map = if kind is 'component' then @componentCodeClassMap else @systemCodeClassMap
     c = map[js]
     return c if c
     c = map[js] = eval js
@@ -285,7 +285,7 @@ module.exports = class World
 
   serialize: ->
     # Code hotspot; optimize it
-    if @frames.length < @totalFrames then throw new Error("World Should Be Over Before Serialization")
+    if @frames.length < @totalFrames then throw new Error('World Should Be Over Before Serialization')
     [transferableObjects, nontransferableObjects] = [0, 0]
     o = {totalFrames: @totalFrames, maxTotalFrames: @maxTotalFrames, frameRate: @frameRate, dt: @dt, victory: @victory, userCodeMap: {}, trackedProperties: {}}
     o.trackedProperties[prop] = @[prop] for prop in @trackedProperties or []
@@ -364,20 +364,20 @@ module.exports = class World
           flattened.push value
       o.storageBuffer = flattened
 
-    #console.log "Allocating memory:", (t1 - t0).toFixed(0), "ms; assigning values:", (t2 - t1).toFixed(0), "ms, so", ((t2 - t1) / @frames.length).toFixed(3), "ms per frame"
-    #console.log "Got", transferableObjects, "transferable objects and", nontransferableObjects, "nontransferable; stored", transferableStorageBytesNeeded, "bytes transferably"
+    #console.log 'Allocating memory:', (t1 - t0).toFixed(0), 'ms; assigning values:', (t2 - t1).toFixed(0), 'ms, so', ((t2 - t1) / @frames.length).toFixed(3), 'ms per frame'
+    #console.log 'Got', transferableObjects, 'transferable objects and', nontransferableObjects, 'nontransferable; stored', transferableStorageBytesNeeded, 'bytes transferably'
 
     o.thangs = (t.serialize() for t in @thangs.concat(@extraneousThangs ? []))
     o.scriptNotes = (sn.serialize() for sn in @scriptNotes)
     if o.scriptNotes.length > 200
-      console.log "Whoa, serializing a lot of WorldScriptNotes here:", o.scriptNotes.length
+      console.log 'Whoa, serializing a lot of WorldScriptNotes here:', o.scriptNotes.length
     {serializedWorld: o, transferableObjects: [o.storageBuffer]}
 
   @deserialize: (o, classMap, oldSerializedWorldFrames, finishedWorldCallback) ->
     # Code hotspot; optimize it
-    #console.log "Deserializing", o, "length", JSON.stringify(o).length
+    #console.log 'Deserializing', o, 'length', JSON.stringify(o).length
     #console.log JSON.stringify(o)
-    #console.log "Got special keys and values:", o.specialValuesToKeys, o.specialKeysToValues
+    #console.log 'Got special keys and values:', o.specialValuesToKeys, o.specialKeysToValues
     perf = {}
     perf.t0 = now()
     w = new World o.userCodeMap, classMap
@@ -424,13 +424,13 @@ module.exports = class World
     w.ended = true
     w.getFrame(w.totalFrames - 1).restoreState()
     perf.t5 = now()
-    console.log "Deserialization:", (perf.t5 - perf.t0).toFixed(0) + "ms (" + ((perf.t5 - perf.t0) / w.frames.length).toFixed(3) + "ms per frame).", perf.batches, "batches."
+    console.log 'Deserialization:', (perf.t5 - perf.t0).toFixed(0) + 'ms (' + ((perf.t5 - perf.t0) / w.frames.length).toFixed(3) + 'ms per frame).', perf.batches, 'batches.'
     if false
-      console.log "  Deserializing--constructing new World:", (perf.t1 - perf.t0).toFixed(2) + "ms"
-      console.log "  Deserializing--Thangs and ScriptNotes:", (perf.t2 - perf.t1).toFixed(2) + "ms"
-      console.log "  Deserializing--reallocating memory:", (perf.t3 - perf.t2).toFixed(2) + "ms"
-      console.log "  Deserializing--WorldFrames:", (perf.t4 - perf.t3).toFixed(2) + "ms"
-      console.log "  Deserializing--restoring last WorldFrame:", (perf.t5 - perf.t4).toFixed(2) + "ms"
+      console.log '  Deserializing--constructing new World:', (perf.t1 - perf.t0).toFixed(2) + 'ms'
+      console.log '  Deserializing--Thangs and ScriptNotes:', (perf.t2 - perf.t1).toFixed(2) + 'ms'
+      console.log '  Deserializing--reallocating memory:', (perf.t3 - perf.t2).toFixed(2) + 'ms'
+      console.log '  Deserializing--WorldFrames:', (perf.t4 - perf.t3).toFixed(2) + 'ms'
+      console.log '  Deserializing--restoring last WorldFrame:', (perf.t5 - perf.t4).toFixed(2) + 'ms'
     finishedWorldCallback w
 
   findFirstChangedFrame: (oldWorld) ->
@@ -440,9 +440,9 @@ module.exports = class World
       break unless oldFrame and newFrame.hash is oldFrame.hash
     @firstChangedFrame = i
     if @frames[i]
-      console.log "First changed frame is", @firstChangedFrame, "with hash", @frames[i].hash, "compared to", oldWorld.frames[i]?.hash
+      console.log 'First changed frame is', @firstChangedFrame, 'with hash', @frames[i].hash, 'compared to', oldWorld.frames[i]?.hash
     else
-      console.log "No frames were changed out of all", @frames.length
+      console.log 'No frames were changed out of all', @frames.length
     @firstChangedFrame
 
   pointsForThang: (thangID, frameStart=0, frameEnd=null, camera=null, resolution=4) ->
@@ -478,7 +478,7 @@ module.exports = class World
   actionsForThang: (thangID, keepIdle=false) ->
     # Optimized
     @actionsForThangCache ?= {}
-    cacheKey = thangID + "_" + Boolean(keepIdle)
+    cacheKey = thangID + '_' + Boolean(keepIdle)
     cached = @actionsForThangCache[cacheKey]
     return cached if cached
     states = (frame.thangStateMap[thangID] for frame in @frames)
diff --git a/app/lib/world/world_frame.coffee b/app/lib/world/world_frame.coffee
index fc21546e2..2ab99f153 100644
--- a/app/lib/world/world_frame.coffee
+++ b/app/lib/world/world_frame.coffee
@@ -1,10 +1,12 @@
 ThangState = require './thang_state'
 
 module.exports = class WorldFrame
-  @className: "WorldFrame"
+  @className: 'WorldFrame'
+
   constructor: (@world, @time=0) ->
     @thangStateMap = {}
     @setState() if @world
+
   getNextFrame: ->
     # Optimized. Must be called while thangs are current at this frame.
     nextTime = @time + @world.dt
@@ -22,7 +24,7 @@ module.exports = class WorldFrame
     thangState.restore() for thangID, thangState of @thangStateMap
     for thang in @world.thangs
       if not @thangStateMap[thang.id] and not thang.stateless
-        #console.log "Frame", @time, "restoring state for", thang.id, "and saying it don't exist"
+        #console.log 'Frame', @time, 'restoring state for', thang.id, 'and saying it don\'t exist'
         thang.exists = false
 
   restorePartialState: (ratio) ->
@@ -33,22 +35,22 @@ module.exports = class WorldFrame
     if not thangState
       if not thang.stateless
         thang.exists = false
-        #console.log "Frame", @time, "restoring state for", thang.id, "in particular and saying it don't exist"
+        #console.log 'Frame', @time, 'restoring state for', thang.id, 'in particular and saying it don\'t exist'
       return
     thangState.restore()
-    
+
   clearEvents: -> thang.currentEvents = [] for thang in @world.thangs
 
   toString: ->
     map = ((' ' for x in [0 .. @world.width])  \
            for y in [0 .. @world.height])
-    symbols = ".ox@dfga[]/D"
+    symbols = '.ox@dfga[]/D'
     for thang, i in @world.thangs when thang.rectangle
       rect = thang.rectangle().axisAlignedBoundingBox()
       for y in [Math.floor(rect.y - rect.height / 2) ... Math.ceil(rect.y + rect.height / 2)]
         for x in [Math.floor(rect.x - rect.width / 2) ... Math.ceil(rect.x + rect.width / 2)]
           map[y][x] = symbols[i % symbols.length] if 0 <= y < @world.height and 0 <= x < @world.width
-    @time + "\n" + (xs.join(' ') for xs in map).join('\n') + '\n'
+    @time + '\n' + (xs.join(' ') for xs in map).join('\n') + '\n'
 
   serialize: (frameIndex, trackedPropertiesThangIDs, trackedPropertiesPerThangIndices, trackedPropertiesPerThangTypes, trackedPropertiesPerThangValues, specialValuesToKeys, specialKeysToValues) ->
     # Optimize
diff --git a/app/lib/world/world_script_note.coffee b/app/lib/world/world_script_note.coffee
index 2786cee49..be342cee7 100644
--- a/app/lib/world/world_script_note.coffee
+++ b/app/lib/world/world_script_note.coffee
@@ -2,7 +2,7 @@
 {scriptMatchesEventPrereqs} = require './script_event_prereqs'
 
 module.exports = class WorldScriptNote
-  @className: "WorldScriptNote"
+  @className: 'WorldScriptNote'
   constructor: (script, @event, world) ->
     return unless script?
     @invalid = true
diff --git a/app/lib/world/world_utils.coffee b/app/lib/world/world_utils.coffee
index f38a55d74..d6d5c1171 100644
--- a/app/lib/world/world_utils.coffee
+++ b/app/lib/world/world_utils.coffee
@@ -78,17 +78,17 @@ module.exports.consolidateThangs = consolidateThangs = (thangs) ->
   topmost = _.max structural, (t) -> t.pos.y + t.height / 2
   leftmost = _.min structural, (t) -> t.pos.x - t.width / 2
   bottommost = _.min structural, (t) -> t.pos.y - t.height / 2
-  console.log "got rightmost", rightmost.id, "topmost", topmost.id, "lefmostmost", leftmost.id, "bottommost", bottommost.id, "out of", structural.length, "structural thangs" if debug
+  console.log 'got rightmost', rightmost.id, 'topmost', topmost.id, 'lefmostmost', leftmost.id, 'bottommost', bottommost.id, 'out of', structural.length, 'structural thangs' if debug
   left = Math.min 0, leftmost.pos.x - leftmost.width / 2
   bottom = Math.min 0, bottommost.pos.y - bottommost.height / 2
   if (left < 0) or (bottom < 0)
-    console.error "Negative structural Thangs aren't supported, sorry!"  # TODO: largestRectangle, AI System, and anything else that accesses grid directly need updating to finish this
+    console.error 'Negative structural Thangs aren\'t supported, sorry!'  # TODO: largestRectangle, AI System, and anything else that accesses grid directly need updating to finish this
   left = 0
   bottom = 0
   width = rightmost.pos.x + rightmost.width / 2 - left
   height = topmost.pos.y + topmost.height / 2 - bottom
   padding = 0
-  console.log "got max width", width, "height", height, "left", left, "bottom", bottom, "of thangs", thangs.length, "structural", structural.length if debug
+  console.log 'got max width', width, 'height', height, 'left', left, 'bottom', bottom, 'of thangs', thangs.length, 'structural', structural.length if debug
   grid = new Grid structural, width, height, padding, left, bottom
   console.log grid.toString() if debug
 
@@ -107,14 +107,14 @@ module.exports.consolidateThangs = consolidateThangs = (thangs) ->
           grid.grid[y2][x2] = []
       console.log grid.toString() if debug
       thang = structural[dissection.length]  # grab one we already know is configured properly
-      console.error "Hmm, our dissection has more Thangs than the original structural Thangs?", dissection.length unless thang
+      console.error 'Hmm, our dissection has more Thangs than the original structural Thangs?', dissection.length unless thang
       thang.width = rect.width
       thang.height = rect.height
       thang.pos.x = rect.x
       thang.pos.y = rect.y
       thang.createBodyDef()
       dissection.push thang
-  console.log "Turned", structural.length, "structural Thangs into", dissection.length, "dissecting Thangs."
+  console.log 'Turned', structural.length, 'structural Thangs into', dissection.length, 'dissecting Thangs.'
   thangs.push dissection...
   structural[dissection.length ... structural.length]
 
@@ -133,7 +133,7 @@ module.exports.largestRectangle = largestRectangle = (grid, bottomY, leftX, want
     break unless coveredRow
     coveredRows.push coveredRow
     shortestCoveredRow = Math.min(shortestCoveredRow, coveredRow)
-  console.log "largestRectangle() for", bottomY, leftX, "got coveredRows", coveredRows if debug
+  console.log 'largestRectangle() for', bottomY, leftX, 'got coveredRows', coveredRows if debug
   [maxArea, maxAreaRows, maxAreaRowLength, shortestRow] = [0, 0, 0, 0]
   for rowLength, rowIndex in coveredRows
     shortestRow ||= rowLength
@@ -143,7 +143,7 @@ module.exports.largestRectangle = largestRectangle = (grid, bottomY, leftX, want
       maxAreaRowLength = shortestRow
       maxArea = area
     shortestRow = Math.min(rowLength, shortestRow)
-  console.log "So largest rect has area", maxArea, "with", maxAreaRows, "rows of length", maxAreaRowLength if debug
+  console.log 'So largest rect has area', maxArea, 'with', maxAreaRows, 'rows of length', maxAreaRowLength if debug
   rect = new Rectangle leftX + maxAreaRowLength / 2, bottomY + maxAreaRows / 2, maxAreaRowLength, maxAreaRows
-  console.log "That corresponds to a rectangle", rect.toString() if debug
+  console.log 'That corresponds to a rectangle', rect.toString() if debug
   rect
diff --git a/app/locale/ar.coffee b/app/locale/ar.coffee
index f0cd1bbbb..d20da4015 100644
--- a/app/locale/ar.coffee
+++ b/app/locale/ar.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "العربية", englishDescription: "Arabi
 #    minutes: "minutes"
 #    hour: "hour"
 #    hours: "hours"
+#    day: "day"
+#    days: "days"
+#    week: "week"
+#    weeks: "weeks"
+#    month: "month"
+#    months: "months"
+#    year: "year"
+#    years: "years"
 
 #  modal:
 #    close: "Close"
@@ -185,25 +193,126 @@ module.exports = nativeDescription: "العربية", englishDescription: "Arabi
 #    view_profile: "View Your Profile"
 
 #  account_profile:
-#    edit_settings: "Edit Settings"
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
 #    profile_for_prefix: "Profile for "
 #    profile_for_suffix: ""
-#    approved: "Approved"
-#    not_approved: "Not Approved"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
 #    looking_for: "Looking for:"
 #    last_updated: "Last updated:"
 #    contact: "Contact"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+#    next_city: "city?"
+#    next_country: "pick your country."
+#    next_name: "name?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
 #    work_experience: "Work Experience"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
 #    education: "Education"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
 #    our_notes: "Our Notes"
 #    projects: "Projects"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
 #  employers:
-#    want_to_hire_our_players: "Want to hire expert CodeCombat players?"
+#    want_to_hire_our_players: "Hire CodeCombat Players"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-#    candidates_count_prefix: "We currently have "
-#    candidates_count_many: "many"
-#    candidates_count_suffix: "highly skilled and vetted developers looking for work."
 #    candidate_name: "Name"
 #    candidate_location: "Location"
 #    candidate_looking_for: "Looking For"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "العربية", englishDescription: "Arabi
 #    candidate_top_skills: "Top Skills"
 #    candidate_years_experience: "Yrs Exp"
 #    candidate_last_updated: "Last Updated"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
 #  play_level:
 #    done: "Done"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "العربية", englishDescription: "Arabi
 #    av_entities_sub_title: "Entities"
 #    av_entities_users_url: "Users"
 #    av_entities_active_instances_url: "Active Instances"
+#    av_entities_employer_list_url: "Employer List"
 #    av_other_sub_title: "Other"
 #    av_other_debug_base_url: "Base (for debugging base.jade)"
 #    u_title: "User List"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "العربية", englishDescription: "Arabi
 #    thang_description: "Build units, defining their default logic, graphics and audio. Currently only supports importing Flash exported vector graphics."
 #    level_title: "Level Editor"
 #    level_description: "Includes the tools for scripting, uploading audio, and constructing custom logic to create all sorts of levels. Everything we use ourselves!"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
 #    contact_us: "Contact us!"
 #    hipchat_prefix: "You can also find us in our"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "العربية", englishDescription: "Arabi
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
 #    article_search_title: "Search Articles Here"
 #    thang_search_title: "Search Thang Types Here"
 #    level_search_title: "Search Levels Here"
+#    achievement_search_title: "Search Achievements"
 #    read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
 #  article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "العربية", englishDescription: "Arabi
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "العربية", englishDescription: "Arabi
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/bg.coffee b/app/locale/bg.coffee
index f0ef0f2a4..583c3dbb9 100644
--- a/app/locale/bg.coffee
+++ b/app/locale/bg.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "български език", englishDescri
 #    minutes: "minutes"
 #    hour: "hour"
 #    hours: "hours"
+#    day: "day"
+#    days: "days"
+#    week: "week"
+#    weeks: "weeks"
+#    month: "month"
+#    months: "months"
+#    year: "year"
+#    years: "years"
 
   modal:
     close: "Затвори"
@@ -82,7 +90,7 @@ module.exports = nativeDescription: "български език", englishDescri
 #    required: "You need to log in before you can go that way."
 
   home:
-    slogan: "Научи се да програмираш на JavaScript, докато играеш игра "
+    slogan: "Научи се да програмираш, докато играеш игра "
     no_ie: "CodeCombat не работи под Internet Explorer 9 или по-стар. Съжалявам!"
     no_mobile: "CodeCombat не е направен за мобилни устройства и може да не работи!"
     play: "Играй"
@@ -184,26 +192,127 @@ module.exports = nativeDescription: "български език", englishDescri
 #    sample_profile: "See a sample profile"
 #    view_profile: "View Your Profile"
 
-  account_profile:
-    edit_settings: "Промени настройките"
+#  account_profile:
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
 #    profile_for_prefix: "Profile for "
 #    profile_for_suffix: ""
-#    approved: "Approved"
-#    not_approved: "Not Approved"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
 #    looking_for: "Looking for:"
 #    last_updated: "Last updated:"
 #    contact: "Contact"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+#    next_city: "city?"
+#    next_country: "pick your country."
+#    next_name: "name?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
 #    work_experience: "Work Experience"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
 #    education: "Education"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
 #    our_notes: "Our Notes"
 #    projects: "Projects"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
 #  employers:
-#    want_to_hire_our_players: "Want to hire expert CodeCombat players?"
+#    want_to_hire_our_players: "Hire CodeCombat Players"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-#    candidates_count_prefix: "We currently have "
-#    candidates_count_many: "many"
-#    candidates_count_suffix: "highly skilled and vetted developers looking for work."
 #    candidate_name: "Name"
 #    candidate_location: "Location"
 #    candidate_looking_for: "Looking For"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "български език", englishDescri
 #    candidate_top_skills: "Top Skills"
 #    candidate_years_experience: "Yrs Exp"
 #    candidate_last_updated: "Last Updated"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
   play_level:
     done: "Готово"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "български език", englishDescri
 #    av_entities_sub_title: "Entities"
 #    av_entities_users_url: "Users"
 #    av_entities_active_instances_url: "Active Instances"
+#    av_entities_employer_list_url: "Employer List"
 #    av_other_sub_title: "Other"
 #    av_other_debug_base_url: "Base (for debugging base.jade)"
 #    u_title: "User List"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "български език", englishDescri
 #    thang_description: "Build units, defining their default logic, graphics and audio. Currently only supports importing Flash exported vector graphics."
 #    level_title: "Level Editor"
 #    level_description: "Includes the tools for scripting, uploading audio, and constructing custom logic to create all sorts of levels. Everything we use ourselves!"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
 #    contact_us: "Contact us!"
 #    hipchat_prefix: "You can also find us in our"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "български език", englishDescri
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
 #    article_search_title: "Search Articles Here"
 #    thang_search_title: "Search Thang Types Here"
 #    level_search_title: "Search Levels Here"
+#    achievement_search_title: "Search Achievements"
 #    read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
   article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "български език", englishDescri
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "български език", englishDescri
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/ca.coffee b/app/locale/ca.coffee
index bc34a3c3c..458b6922b 100644
--- a/app/locale/ca.coffee
+++ b/app/locale/ca.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr
 #    minutes: "minutes"
 #    hour: "hour"
 #    hours: "hours"
+#    day: "day"
+#    days: "days"
+#    week: "week"
+#    weeks: "weeks"
+#    month: "month"
+#    months: "months"
+#    year: "year"
+#    years: "years"
 
   modal:
     close: "Tancar"
@@ -82,7 +90,7 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr
 #    required: "You need to log in before you can go that way."
 
   home:
-    slogan: "Aprén a programar JavaScript tot Jugant"
+    slogan: "Aprén a programar tot Jugant"
     no_ie: "CodeCombat no funciona en Internet Explorer 9 o versions anteriors. Perdó!"
     no_mobile: "CodeCombat no ha estat dissenyat per dispositius mòbils i per tant no funcionarà!"
     play: "Jugar"
@@ -185,25 +193,126 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr
 #    view_profile: "View Your Profile"
 
 #  account_profile:
-#    edit_settings: "Edit Settings"
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
 #    profile_for_prefix: "Profile for "
 #    profile_for_suffix: ""
-#    approved: "Approved"
-#    not_approved: "Not Approved"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
 #    looking_for: "Looking for:"
 #    last_updated: "Last updated:"
 #    contact: "Contact"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+#    next_city: "city?"
+#    next_country: "pick your country."
+#    next_name: "name?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
 #    work_experience: "Work Experience"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
 #    education: "Education"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
 #    our_notes: "Our Notes"
 #    projects: "Projects"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
 #  employers:
-#    want_to_hire_our_players: "Want to hire expert CodeCombat players?"
+#    want_to_hire_our_players: "Hire CodeCombat Players"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-#    candidates_count_prefix: "We currently have "
-#    candidates_count_many: "many"
-#    candidates_count_suffix: "highly skilled and vetted developers looking for work."
 #    candidate_name: "Name"
 #    candidate_location: "Location"
 #    candidate_looking_for: "Looking For"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr
 #    candidate_top_skills: "Top Skills"
 #    candidate_years_experience: "Yrs Exp"
 #    candidate_last_updated: "Last Updated"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
 #  play_level:
 #    done: "Done"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr
 #    av_entities_sub_title: "Entities"
 #    av_entities_users_url: "Users"
 #    av_entities_active_instances_url: "Active Instances"
+#    av_entities_employer_list_url: "Employer List"
 #    av_other_sub_title: "Other"
 #    av_other_debug_base_url: "Base (for debugging base.jade)"
 #    u_title: "User List"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr
 #    thang_description: "Build units, defining their default logic, graphics and audio. Currently only supports importing Flash exported vector graphics."
 #    level_title: "Level Editor"
 #    level_description: "Includes the tools for scripting, uploading audio, and constructing custom logic to create all sorts of levels. Everything we use ourselves!"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
 #    contact_us: "Contact us!"
 #    hipchat_prefix: "You can also find us in our"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
 #    article_search_title: "Search Articles Here"
 #    thang_search_title: "Search Thang Types Here"
 #    level_search_title: "Search Levels Here"
+#    achievement_search_title: "Search Achievements"
 #    read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
 #  article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/cs.coffee b/app/locale/cs.coffee
index 0e8eab681..038d1116e 100644
--- a/app/locale/cs.coffee
+++ b/app/locale/cs.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "čeština", englishDescription: "Czech", tr
 #    minutes: "minutes"
 #    hour: "hour"
 #    hours: "hours"
+#    day: "day"
+#    days: "days"
+#    week: "week"
+#    weeks: "weeks"
+#    month: "month"
+#    months: "months"
+#    year: "year"
+#    years: "years"
 
   modal:
     close: "Zavřít"
@@ -82,7 +90,7 @@ module.exports = nativeDescription: "čeština", englishDescription: "Czech", tr
 #    required: "You need to log in before you can go that way."
 
   home:
-    slogan: "Naučte se programování JavaScriptu při hraní více-hráčové programovací hry."
+    slogan: "Naučte se programování tu při hraní více-hráčové programovací hry."
     no_ie: "Omlouváme se, ale CodeCombat boužel nefunguje v Internet Exploreru 9 nebo starším."
     no_mobile: "CodeCombat není navržen pro mobilní zařízení a nemusí fungovat správně!"
     play: "Hrát"
@@ -185,25 +193,126 @@ module.exports = nativeDescription: "čeština", englishDescription: "Czech", tr
 #    view_profile: "View Your Profile"
 
   account_profile:
-    edit_settings: "Editovat Nastavení"
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
     profile_for_prefix: "Profil pro "
 #    profile_for_suffix: ""
-#    approved: "Approved"
-#    not_approved: "Not Approved"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
 #    looking_for: "Looking for:"
 #    last_updated: "Last updated:"
 #    contact: "Contact"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+#    next_city: "city?"
+#    next_country: "pick your country."
+#    next_name: "name?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
 #    work_experience: "Work Experience"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
 #    education: "Education"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
 #    our_notes: "Our Notes"
 #    projects: "Projects"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
 #  employers:
-#    want_to_hire_our_players: "Want to hire expert CodeCombat players?"
+#    want_to_hire_our_players: "Hire CodeCombat Players"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-#    candidates_count_prefix: "We currently have "
-#    candidates_count_many: "many"
-#    candidates_count_suffix: "highly skilled and vetted developers looking for work."
 #    candidate_name: "Name"
 #    candidate_location: "Location"
 #    candidate_looking_for: "Looking For"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "čeština", englishDescription: "Czech", tr
 #    candidate_top_skills: "Top Skills"
 #    candidate_years_experience: "Yrs Exp"
 #    candidate_last_updated: "Last Updated"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
   play_level:
     done: "Hotovo"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "čeština", englishDescription: "Czech", tr
     av_entities_sub_title: "Entity"
     av_entities_users_url: "Uživatelé"
     av_entities_active_instances_url: "Aktivní instance"
+#    av_entities_employer_list_url: "Employer List"
     av_other_sub_title: "Ostatní"
     av_other_debug_base_url: "Base (pro debugování base.jade)"
     u_title: "Seznam uživatelů"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "čeština", englishDescription: "Czech", tr
     thang_description: "Vytvořte jednotky, definujte jejich logiku, vlastnosti, grafiku a zvuk. Momentálně jsou podporovány pouze importy vektorové grafiky exportované z Flashe."
     level_title: "Editor úrovní"
     level_description: "Zahrnuje pomůcky pro skriptování, nahrávání audia a tvorbu vlastní logiky pro vytvoření vlastních úrovní. Obsahuje vše, čeho využíváme k tvorbě úrovní my!"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
     contact_us: "kontaktujte nás!"
     hipchat_prefix: "Můžete nás také najít v naší"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "čeština", englishDescription: "Czech", tr
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
 #    article_search_title: "Search Articles Here"
 #    thang_search_title: "Search Thang Types Here"
 #    level_search_title: "Search Levels Here"
+#    achievement_search_title: "Search Achievements"
 #    read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
   article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "čeština", englishDescription: "Czech", tr
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "čeština", englishDescription: "Czech", tr
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/da.coffee b/app/locale/da.coffee
index 1d0311a02..ac2f76026 100644
--- a/app/locale/da.coffee
+++ b/app/locale/da.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "dansk", englishDescription: "Danish", trans
 #    minutes: "minutes"
 #    hour: "hour"
 #    hours: "hours"
+#    day: "day"
+#    days: "days"
+#    week: "week"
+#    weeks: "weeks"
+#    month: "month"
+#    months: "months"
+#    year: "year"
+#    years: "years"
 
   modal:
     close: "Luk"
@@ -82,7 +90,7 @@ module.exports = nativeDescription: "dansk", englishDescription: "Danish", trans
 #    required: "You need to log in before you can go that way."
 
   home:
-    slogan: "Lær at Kode Javascript ved at Spille et Spil"
+    slogan: "Lær at Kode ved at Spille et Spil"
     no_ie: "CodeCombat kan desværre ikke køre i Internet Explorer 9 eller ældre. Beklager!"
     no_mobile: "CodeCombat er ikke designet til mobile enheder og vil måske ikke virke!"
     play: "Spil"
@@ -185,25 +193,126 @@ module.exports = nativeDescription: "dansk", englishDescription: "Danish", trans
 #    view_profile: "View Your Profile"
 
   account_profile:
-    edit_settings: "Redigér Indstillinger"
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
     profile_for_prefix: "Profil for "
 #    profile_for_suffix: ""
-#    approved: "Approved"
-#    not_approved: "Not Approved"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
 #    looking_for: "Looking for:"
 #    last_updated: "Last updated:"
 #    contact: "Contact"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+#    next_city: "city?"
+#    next_country: "pick your country."
+#    next_name: "name?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
 #    work_experience: "Work Experience"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
 #    education: "Education"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
 #    our_notes: "Our Notes"
 #    projects: "Projects"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
 #  employers:
-#    want_to_hire_our_players: "Want to hire expert CodeCombat players?"
+#    want_to_hire_our_players: "Hire CodeCombat Players"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-#    candidates_count_prefix: "We currently have "
-#    candidates_count_many: "many"
-#    candidates_count_suffix: "highly skilled and vetted developers looking for work."
 #    candidate_name: "Name"
 #    candidate_location: "Location"
 #    candidate_looking_for: "Looking For"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "dansk", englishDescription: "Danish", trans
 #    candidate_top_skills: "Top Skills"
 #    candidate_years_experience: "Yrs Exp"
 #    candidate_last_updated: "Last Updated"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
   play_level:
     done: "Færdig"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "dansk", englishDescription: "Danish", trans
 #    av_entities_sub_title: "Entities"
     av_entities_users_url: "Brugere"
 #    av_entities_active_instances_url: "Active Instances"
+#    av_entities_employer_list_url: "Employer List"
     av_other_sub_title: "Andre"
 #    av_other_debug_base_url: "Base (for debugging base.jade)"
     u_title: "Brugerliste"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "dansk", englishDescription: "Danish", trans
 #    thang_description: "Build units, defining their default logic, graphics and audio. Currently only supports importing Flash exported vector graphics."
     level_title: "Bane Redigeringsværktøj"
 #    level_description: "Includes the tools for scripting, uploading audio, and constructing custom logic to create all sorts of levels. Everything we use ourselves!"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
     contact_us: "kontact os!"
     hipchat_prefix: "Du kan også finde os på vores"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "dansk", englishDescription: "Danish", trans
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
     article_search_title: "Søg Artikler Her"
 #    thang_search_title: "Search Thang Types Here"
     level_search_title: "Søg Baner Her"
+#    achievement_search_title: "Search Achievements"
 #    read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
   article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "dansk", englishDescription: "Danish", trans
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "dansk", englishDescription: "Danish", trans
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/de-AT.coffee b/app/locale/de-AT.coffee
index 9ea9b6910..f8234ceb5 100644
--- a/app/locale/de-AT.coffee
+++ b/app/locale/de-AT.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "Deutsch (Österreich)", englishDescription:
 #    minutes: "minutes"
 #    hour: "hour"
 #    hours: "hours"
+#    day: "day"
+#    days: "days"
+#    week: "week"
+#    weeks: "weeks"
+#    month: "month"
+#    months: "months"
+#    year: "year"
+#    years: "years"
 
 #  modal:
 #    close: "Close"
@@ -185,25 +193,126 @@ module.exports = nativeDescription: "Deutsch (Österreich)", englishDescription:
 #    view_profile: "View Your Profile"
 
 #  account_profile:
-#    edit_settings: "Edit Settings"
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
 #    profile_for_prefix: "Profile for "
 #    profile_for_suffix: ""
-#    approved: "Approved"
-#    not_approved: "Not Approved"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
 #    looking_for: "Looking for:"
 #    last_updated: "Last updated:"
 #    contact: "Contact"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+#    next_city: "city?"
+#    next_country: "pick your country."
+#    next_name: "name?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
 #    work_experience: "Work Experience"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
 #    education: "Education"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
 #    our_notes: "Our Notes"
 #    projects: "Projects"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
 #  employers:
-#    want_to_hire_our_players: "Want to hire expert CodeCombat players?"
+#    want_to_hire_our_players: "Hire CodeCombat Players"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-#    candidates_count_prefix: "We currently have "
-#    candidates_count_many: "many"
-#    candidates_count_suffix: "highly skilled and vetted developers looking for work."
 #    candidate_name: "Name"
 #    candidate_location: "Location"
 #    candidate_looking_for: "Looking For"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "Deutsch (Österreich)", englishDescription:
 #    candidate_top_skills: "Top Skills"
 #    candidate_years_experience: "Yrs Exp"
 #    candidate_last_updated: "Last Updated"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
 #  play_level:
 #    done: "Done"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "Deutsch (Österreich)", englishDescription:
 #    av_entities_sub_title: "Entities"
 #    av_entities_users_url: "Users"
 #    av_entities_active_instances_url: "Active Instances"
+#    av_entities_employer_list_url: "Employer List"
 #    av_other_sub_title: "Other"
 #    av_other_debug_base_url: "Base (for debugging base.jade)"
 #    u_title: "User List"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "Deutsch (Österreich)", englishDescription:
 #    thang_description: "Build units, defining their default logic, graphics and audio. Currently only supports importing Flash exported vector graphics."
 #    level_title: "Level Editor"
 #    level_description: "Includes the tools for scripting, uploading audio, and constructing custom logic to create all sorts of levels. Everything we use ourselves!"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
 #    contact_us: "Contact us!"
 #    hipchat_prefix: "You can also find us in our"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "Deutsch (Österreich)", englishDescription:
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
 #    article_search_title: "Search Articles Here"
 #    thang_search_title: "Search Thang Types Here"
 #    level_search_title: "Search Levels Here"
+#    achievement_search_title: "Search Achievements"
 #    read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
 #  article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "Deutsch (Österreich)", englishDescription:
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "Deutsch (Österreich)", englishDescription:
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/de-CH.coffee b/app/locale/de-CH.coffee
index c56d8dd3d..87347663e 100644
--- a/app/locale/de-CH.coffee
+++ b/app/locale/de-CH.coffee
@@ -11,163 +11,171 @@ module.exports = nativeDescription: "Deutsch (Schweiz)", englishDescription: "Ge
     delay_1_sec: "1 sekunde"
     delay_3_sec: "3 sekunde"
     delay_5_sec: "5 sekunde"
-#    manual: "Manual"
+    manual: "Aleitig"
 #    fork: "Fork"
     play: "Spiele"
     retry: "nomol versuche"
 #    watch: "Watch"
 #    unwatch: "Unwatch"
-#    submit_patch: "Submit Patch"
+    submit_patch: "Patch ireiche"
 
   units:
-    second: "sekunde"
-    seconds: "sekunde"
-    minute: "minute"
-    minutes: "minute"
-    hour: "stund"
-    hours: "stunde"
+    second: "Sekunde"
+    seconds: "Sekunde"
+    minute: "Minute"
+    minutes: "Minute"
+    hour: "Stund"
+    hours: "Stunde"
+    day: "Tag"
+    days: "Täg"
+    week: "Wuche"
+    weeks: "Wuche"
+    month: "Monet"
+    months: "Mönet"
+    year: "Johr"
+    years: "Johr"
 
   modal:
-    close: "beende"
-    okay: "Okaz"
+    close: "Beende"
+    okay: "Okay"
 
   not_found:
     page_not_found: "Siite nöd gfunde"
 
   nav:
-#    play: "Levels"
-#    community: "Community"
-#    editor: "Editor"
-#    blog: "Blog"
-#    forum: "Forum"
-#    account: "Account"
-#    admin: "Admin"
-#    home: "Home"
+    play: "Levels"
+    community: "Community"
+    editor: "Editor"
+    blog: "Blog"
+    forum: "Forum"
+    account: "Account"
+    admin: "Admin"
+    home: "Home"
     contribute: "Spende"
 #    legal: "Legal"
     about: "Über"
     contact: "Kontakt"
     twitter_follow: "Folge"
-    employers: "agschtelti"
+    employers: "Mitarbeiter"
 
-#  versions:
-#    save_version_title: "Save New Version"
-#    new_major_version: "New Major Version"
+  versions:
+    save_version_title: "Neui Version speichere"
+    new_major_version: "Neui Hauptversion"
 #    cla_prefix: "To save changes, first you must agree to our"
 #    cla_url: "CLA"
 #    cla_suffix: "."
 #    cla_agree: "I AGREE"
 
-#  login:
-#    sign_up: "Create Account"
-#    log_in: "Log In"
-#    logging_in: "Logging In"
-#    log_out: "Log Out"
-#    recover: "recover account"
+  login:
+    sign_up: "Account erstelle"
+    log_in: "Ilogge"
+    logging_in: "Am Ilogge"
+    log_out: "Uslogge"
+    recover: "Account wiederherstelle"
 
-#  recover:
-#    recover_account_title: "Recover Account"
-#    send_password: "Send Recovery Password"
+  recover:
+    recover_account_title: "Account wiederherstelle"
+    send_password: "Recovery Password sende"
 
-#  signup:
-#    create_account_title: "Create Account to Save Progress"
-#    description: "It's free. Just need a couple things and you'll be good to go:"
-#    email_announcements: "Receive announcements by email"
-#    coppa: "13+ or non-USA "
-#    coppa_why: "(Why?)"
-#    creating: "Creating Account..."
-#    sign_up: "Sign Up"
-#    log_in: "log in with password"
-#    social_signup: "Or, you can sign up through Facebook or G+:"
-#    required: "You need to log in before you can go that way."
+  signup:
+    create_account_title: "Erstell en Account zum din Fortschritt speichere"
+    description: "Es isch gratis. Nur no es paar Sache und denn chas los goh:"
+    email_announcements: "Akündigunge per Mail erhalte"
+    coppa: "13+ or Nicht-Amerikaner "
+    coppa_why: "(Warum?)"
+    creating: "Account wird erstellt..."
+    sign_up: "Registriere"
+    log_in: "Mit Passwort ilogge"
+    social_signup: "Du chasch dich au mit Facebook oder G+ registriere:"
+    required: "Du muesch dich zersch ilogge befor du det dure chasch"
 
-#  home:
-#    slogan: "Learn to Code JavaScript by Playing a Game"
-#    no_ie: "CodeCombat does not run in Internet Explorer 9 or older. Sorry!"
-#    no_mobile: "CodeCombat wasn't designed for mobile devices and may not work!"
-#    play: "Play"
-#    old_browser: "Uh oh, your browser is too old to run CodeCombat. Sorry!"
-#    old_browser_suffix: "You can try anyway, but it probably won't work."
-#    campaign: "Campaign"
-#    for_beginners: "For Beginners"
-#    multiplayer: "Multiplayer"
-#    for_developers: "For Developers"
+  home:
+    slogan: "Lern, wiemer JavaScript programmiert indem du es Spiel spielsch!"
+    no_ie: "CodeCombat funktioniert uf InternetExplorer 9 und älter nid. Sorry!"
+    no_mobile: "CodeCombat isch nid für mobili Grät entwicklet worde und funktioniert vilicht nid!"
+    play: "Spiele"
+    old_browser: "Uh oh, din Browser isch z alt zum CodeCombat spiele. Sorry!"
+    old_browser_suffix: "Du chasches gliich probiere, aber es funktioniert worschinli nid."
+    campaign: "Kampagne"
+    for_beginners: "Für Afänger"
+    multiplayer: "Multiplayer"
+    for_developers: "Für Entwickler"
 
-#  play:
-#    choose_your_level: "Choose Your Level"
-#    adventurer_prefix: "You can jump to any level below, or discuss the levels on "
-#    adventurer_forum: "the Adventurer forum"
+  play:
+    choose_your_level: "Wähl dis Level us"
+    adventurer_prefix: "Du chasch zu de untere Level zrugg goh oder die kommende Level diskutiere "
+    adventurer_forum: "s Abentürer-Forum"
 #    adventurer_suffix: "."
-#    campaign_beginner: "Beginner Campaign"
-#    campaign_beginner_description: "... in which you learn the wizardry of programming."
-#    campaign_dev: "Random Harder Levels"
-#    campaign_dev_description: "... in which you learn the interface while doing something a little harder."
-#    campaign_multiplayer: "Multiplayer Arenas"
-#    campaign_multiplayer_description: "... in which you code head-to-head against other players."
+    campaign_beginner: "Afängerkampagne"
+    campaign_beginner_description: "... i dere du d Zauberkunst vom Programmiere lernsch."
+    campaign_dev: "Zuefälligi schwierigeri Level"
+    campaign_dev_description: "... i dene du s Interface kenne lernsch, während du öppis chli Schwierigers machsch."
+    campaign_multiplayer: "Multiplayer Arenas"
+    campaign_multiplayer_description: "... i dene du Chopf a Chopf geg anderi Spieler spielsch."
 #    campaign_player_created: "Player-Created"
 #    campaign_player_created_description: "... in which you battle against the creativity of your fellow <a href=\"/contribute#artisan\">Artisan Wizards</a>."
-#    level_difficulty: "Difficulty: "
-#    play_as: "Play As"
-#    spectate: "Spectate"
+    level_difficulty: "Schwierigkeit: "
+    play_as: "Spiel als"
+    spectate: "Zueluege"
 
-#  contact:
-#    contact_us: "Contact CodeCombat"
-#    welcome: "Good to hear from you! Use this form to send us email. "
-#    contribute_prefix: "If you're interested in contributing, check out our "
-#    contribute_page: "contribute page"
+  contact:
+    contact_us: "CodeCombat kontaktiere"
+    welcome: "Mir ghöred gern vo dir! Benutz das Formular zum üs e E-Mail schicke."
+    contribute_prefix: "Wenn du dra interessiert bisch, mitzhelfe denn lueg doch mol verbii uf üsere"
+    contribute_page: "Contribute Page"
 #    contribute_suffix: "!"
-#    forum_prefix: "For anything public, please try "
-#    forum_page: "our forum"
-#    forum_suffix: " instead."
-#    send: "Send Feedback"
+    forum_prefix: "Für öffentlichi Sache versuechs mol bi"
+    forum_page: "üsem Forum"
+    forum_suffix: " stattdesse."
+    send: "Feedback schicke"
 #    contact_candidate: "Contact Candidate"
 #    recruitment_reminder: "Use this form to reach out to candidates you are interested in interviewing. Remember that CodeCombat charges 15% of first-year salary. The fee is due upon hiring the employee and is refundable for 90 days if the employee does not remain employed. Part time, remote, and contract employees are free, as are interns."
 
   diplomat_suggestion:
-#    title: "Help translate CodeCombat!"
-#    sub_heading: "We need your language skills."
-    pitch_body: "We develop CodeCombat in English, but we already have players all over the world. Many of them want to play in Swiss German but don't speak English, so if you can speak both, please consider signing up to be a Diplomat and help translate both the CodeCombat website and all the levels into Swiss German."
+    title: "Hilf, CodeCombat z übersetze!"
+    sub_heading: "Mir bruuched dini Sprochfähigkeite."
+    pitch_body: "Mir entwickled CodeCombat in Englisch, aber mir hend scho Spieler uf de ganze Welt. Vieli devo würed gern uf Schwiizerdütsch spiele, aber chönd kei Englisch. Wenn du beides chasch, denk doch mol drüber noh, dich bi üs als Diplomat izträge und z helfe, d CodeCombat Websiite und alli Level uf Schwiizerdütsch z übersetze."
     missing_translations: "Until we can translate everything into Swiss German, you'll see generic German or English when Swiss German isn't available."
-#    learn_more: "Learn more about being a Diplomat"
-#    subscribe_as_diplomat: "Subscribe as a Diplomat"
+    learn_more: "Lern meh drüber, en Diplomat zsii"
+    subscribe_as_diplomat: "Abonnier als en Diplomat"
 
-#  wizard_settings:
-#    title: "Wizard Settings"
-#    customize_avatar: "Customize Your Avatar"
-#    active: "Active"
-#    color: "Color"
-#    group: "Group"
-#    clothes: "Clothes"
-#    trim: "Trim"
-#    cloud: "Cloud"
-#    team: "Team"
-#    spell: "Spell"
-#    boots: "Boots"
-#    hue: "Hue"
-#    saturation: "Saturation"
-#    lightness: "Lightness"
+  wizard_settings:
+    title: "Zaubereristellige"
+    customize_avatar: "Pass din Avatar ah"
+    active: "Aktiv"
+    color: "Farb"
+    group: "Gruppe"
+    clothes: "Chleider"
+    trim: "Zueschniide"
+    cloud: "Wolke"
+    team: "Team"
+    spell: "Zauberspruch"
+    boots: "Stiefel"
+    hue: "Färbig"
+    saturation: "Sättigung"
+    lightness: "Helligkeit"
 
-#  account_settings:
-#    title: "Account Settings"
-#    not_logged_in: "Log in or create an account to change your settings."
-#    autosave: "Changes Save Automatically"
-#    me_tab: "Me"
-#    picture_tab: "Picture"
-#    upload_picture: "Upload a picture"
-#    wizard_tab: "Wizard"
-#    password_tab: "Password"
-#    emails_tab: "Emails"
-#    admin: "Admin"
-#    wizard_color: "Wizard Clothes Color"
-#    new_password: "New Password"
-#    new_password_verify: "Verify"
-#    email_subscriptions: "Email Subscriptions"
-#    email_announcements: "Announcements"
-#    email_announcements_description: "Get emails on the latest news and developments at CodeCombat."
-#    email_notifications: "Notifications"
-#    email_notifications_summary: "Controls for personalized, automatic email notifications related to your CodeCombat activity."
-#    email_any_notes: "Any Notifications"
-#    email_any_notes_description: "Disable to stop all activity notification emails."
+  account_settings:
+    title: "Account Istellige"
+    not_logged_in: "Log dich ih oder erstelle en Account zum dini Istellige ändere."
+    autosave: "Änderige werded automatisch gspeicheret"
+    me_tab: "Ich"
+    picture_tab: "Bild"
+    upload_picture: "Es Bild ufelade"
+    wizard_tab: "Zauberer"
+    password_tab: "Passwort"
+    emails_tab: "E-Mails"
+    admin: "Admin"
+    wizard_color: "Zaubererchleid Farb"
+    new_password: "Neus Passwort"
+    new_password_verify: "Bestätige"
+    email_subscriptions: "E-Mail Abos"
+    email_announcements: "Akündigunge"
+    email_announcements_description: "Bechum Mails mit Neuigkeite und de neuste Entwicklige bi CodeCombat."
+    email_notifications: "Benachrichtigunge"
+    email_notifications_summary: "Istellige für personalisierti, automatischi E-Mail Notifikatione im Zemehang mit dine CodeCombat Aktivitäte"
+    email_any_notes: "Alli Notifikatione"
+    email_any_notes_description: "Deaktiviere zum kei Aktivitäts-Notifikatione meh per E-Mail becho."
 #    email_recruit_notes: "Job Opportunities"
 #    email_recruit_notes_description: "If you play really well, we may contact you about getting you a (better) job."
 #    contributor_emails: "Contributor Class Emails"
@@ -184,26 +192,126 @@ module.exports = nativeDescription: "Deutsch (Schweiz)", englishDescription: "Ge
 #    sample_profile: "See a sample profile"
 #    view_profile: "View Your Profile"
 
-#  account_profile:
-#    edit_settings: "Edit Settings"
-#    profile_for_prefix: "Profile for "
-#    profile_for_suffix: ""
-#    approved: "Approved"
-#    not_approved: "Not Approved"
+  account_profile:
+    settings: "Istellige"
+    edit_profile: "Profil bearbeite"
+    done_editing: "Fertig mit bearbeite"
+    profile_for_prefix: "Profil für "
+#   profile_for_suffix: ""
+#    featured: "Featured"
+#    not_featured: "Not Featured"
 #    looking_for: "Looking for:"
-#    last_updated: "Last updated:"
-#    contact: "Contact"
+    last_updated: "S letzte Update:"
+    contact: "Kontakt"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+    complete: "komplett"
+    next: "Nögst"
+    next_city: "Stadt?"
+    next_country: "wähl dis Land."
+    next_name: "Name?"
+    next_short_description: "schriibe e churzi Beschriibig."
+    next_long_description: "beschriib dini Wunschstell."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+    next_projects: "Zeig üs bis zu drü Projekt a dene du scho gschaffet hesch."
+    next_links: "füeg persönlichi oder Social Media Links ih."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+    example_blog: "Blog"
+    example_personal_site: "Eigeni Websiite"
+    links_header: "Eigeni Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
 #    work_experience: "Work Experience"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
 #    education: "Education"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
 #    our_notes: "Our Notes"
 #    projects: "Projects"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
 #  employers:
-#    want_to_hire_our_players: "Want to hire expert CodeCombat players?"
+#    want_to_hire_our_players: "Hire CodeCombat Players"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-#    candidates_count_prefix: "We currently have "
-#    candidates_count_many: "many"
-#    candidates_count_suffix: "highly skilled and vetted developers looking for work."
 #    candidate_name: "Name"
 #    candidate_location: "Location"
 #    candidate_looking_for: "Looking For"
@@ -211,42 +319,43 @@ module.exports = nativeDescription: "Deutsch (Schweiz)", englishDescription: "Ge
 #    candidate_top_skills: "Top Skills"
 #    candidate_years_experience: "Yrs Exp"
 #    candidate_last_updated: "Last Updated"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
-#  play_level:
-#    done: "Done"
-#    grid: "Grid"
-#    customize_wizard: "Customize Wizard"
-#    home: "Home"
-#    guide: "Guide"
-#    multiplayer: "Multiplayer"
-#    restart: "Restart"
-#    goals: "Goals"
-#    success: "Success!"
-#    incomplete: "Incomplete"
-#    timed_out: "Ran out of time"
-#    failing: "Failing"
-#    action_timeline: "Action Timeline"
-#    click_to_select: "Click on a unit to select it."
-#    reload_title: "Reload All Code?"
-#    reload_really: "Are you sure you want to reload this level back to the beginning?"
-#    reload_confirm: "Reload All"
+  play_level:
+    done: "Fertig"
+    grid: "Gitter"
+    customize_wizard: "Zauberer apasse"
+    home: "Home"
+    guide: "Aleitig"
+    multiplayer: "Multiplayer"
+    restart: "Neu starte"
+    goals: "Ziel"
+    success: "Erfolg!"
+    incomplete: "Unvollständig"
+    timed_out: "Ziit abglaufe"
+    failing: "Fehler"
+    action_timeline: "Aktionsziitleiste"
+    click_to_select: "Klick uf e Einheit zum sie uswähle."
+    reload_title: "De ganze Code neu lade?"
+    reload_really: "Bisch sicher du willsch level neu lade bis zrugg zum Afang?"
+    reload_confirm: "Alles neu lade"
 #    victory_title_prefix: ""
-#    victory_title_suffix: " Complete"
-#    victory_sign_up: "Sign Up to Save Progress"
-#    victory_sign_up_poke: "Want to save your code? Create a free account!"
-#    victory_rate_the_level: "Rate the level: "
-#    victory_return_to_ladder: "Return to Ladder"
-#    victory_play_next_level: "Play Next Level"
+    victory_title_suffix: " Vollständig"
+    victory_sign_up: "Meld dich ah zum din Fortschritt speichere"
+    victory_sign_up_poke: "Wötsch din Code speichere? Erstell gratis en Account!"
+    victory_rate_the_level: "Bewerte das Level: "
+    victory_return_to_ladder: "Zrugg zum letzte Level"
+    victory_play_next_level: "Spiel s nögste Level"
 #    victory_go_home: "Go Home"
-#    victory_review: "Tell us more!"
-#    victory_hour_of_code_done: "Are You Done?"
-#    victory_hour_of_code_done_yes: "Yes, I'm finished with my Hour of Code™!"
-#    multiplayer_title: "Multiplayer Settings"
-#    multiplayer_link_description: "Give this link to anyone to have them join you."
-#    multiplayer_hint_label: "Hint:"
-#    multiplayer_hint: " Click the link to select all, then press ⌘-C or Ctrl-C to copy the link."
+    victory_review: "Verzell üs meh!"
+    victory_hour_of_code_done: "Bisch fertig?"
+    victory_hour_of_code_done_yes: "Jo, ich bin fertig mit mim Hour of Code™!"
+    multiplayer_title: "Multiplayer Istellige"
+    multiplayer_link_description: "Gib de Link jedem, wo mit dir will spiele."
+    multiplayer_hint_label: "Hiiwis:"
+    multiplayer_hint: " Klick uf de Link zum alles uswähle und druck ⌘-C or Ctrl-C zum de Link kopiere"
 #    multiplayer_coming_soon: "More multiplayer features to come!"
 #    multiplayer_sign_in_leaderboard: "Sign in or create an account and get your solution on the leaderboard."
 #    guide_title: "Guide"
@@ -338,6 +447,7 @@ module.exports = nativeDescription: "Deutsch (Schweiz)", englishDescription: "Ge
 #    av_entities_sub_title: "Entities"
 #    av_entities_users_url: "Users"
 #    av_entities_active_instances_url: "Active Instances"
+#    av_entities_employer_list_url: "Employer List"
 #    av_other_sub_title: "Other"
 #    av_other_debug_base_url: "Base (for debugging base.jade)"
 #    u_title: "User List"
@@ -360,6 +470,7 @@ module.exports = nativeDescription: "Deutsch (Schweiz)", englishDescription: "Ge
 #    thang_description: "Build units, defining their default logic, graphics and audio. Currently only supports importing Flash exported vector graphics."
 #    level_title: "Level Editor"
 #    level_description: "Includes the tools for scripting, uploading audio, and constructing custom logic to create all sorts of levels. Everything we use ourselves!"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
 #    contact_us: "Contact us!"
 #    hipchat_prefix: "You can also find us in our"
@@ -405,9 +516,12 @@ module.exports = nativeDescription: "Deutsch (Schweiz)", englishDescription: "Ge
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
 #    article_search_title: "Search Articles Here"
 #    thang_search_title: "Search Thang Types Here"
 #    level_search_title: "Search Levels Here"
+#    achievement_search_title: "Search Achievements"
 #    read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
 #  article:
@@ -682,9 +796,12 @@ module.exports = nativeDescription: "Deutsch (Schweiz)", englishDescription: "Ge
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +880,7 @@ module.exports = nativeDescription: "Deutsch (Schweiz)", englishDescription: "Ge
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/de-DE.coffee b/app/locale/de-DE.coffee
index 00664ae71..76884e25e 100644
--- a/app/locale/de-DE.coffee
+++ b/app/locale/de-DE.coffee
@@ -3,18 +3,18 @@ module.exports = nativeDescription: "Deutsch (Deutschland)", englishDescription:
     loading: "Lade..."
     saving: "Speichere..."
     sending: "Übertrage..."
-#    send: "Send"
+    send: "Senden"
     cancel: "Abbrechen"
     save: "Speichern"
-#    publish: "Publish"
-#    create: "Create"
+    publish: "Publiziere"
+    create: "Erstelle"
     delay_1_sec: "1 Sekunde"
     delay_3_sec: "3 Sekunden"
     delay_5_sec: "5 Sekunden"
     manual: "Manuell"
-#    fork: "Fork"
+    fork: "Fork"
     play: "Abspielen"
-#    retry: "Retry"
+    retry: "Erneut versuchen"
 #    watch: "Watch"
 #    unwatch: "Unwatch"
 #    submit_patch: "Submit Patch"
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "Deutsch (Deutschland)", englishDescription:
     minutes: "Minuten"
     hour: "Stunde"
     hours: "Stunden"
+    day: "Tag"
+    days: "Tage"
+    week: "Woche"
+    weeks: "Wochen"
+    month: "Monat"
+    months: "Monate"
+    year: "Jahr"
+    years: "Jahre"
 
   modal:
     close: "Schließen"
@@ -61,7 +69,7 @@ module.exports = nativeDescription: "Deutsch (Deutschland)", englishDescription:
   login:
     sign_up: "Registrieren"
     log_in: "Einloggen"
-#    logging_in: "Logging In"
+    logging_in: "Logge ein"
     log_out: "Ausloggen"
     recover: "Account wiederherstellen"
 
@@ -78,11 +86,11 @@ module.exports = nativeDescription: "Deutsch (Deutschland)", englishDescription:
     creating: "Erzeuge Account..."
     sign_up: "Neuen Account anlegen"
     log_in: "mit Passwort einloggen"
-#    social_signup: "Or, you can sign up through Facebook or G+:"
+    social_signup: "oder, du registriest dich über Facebook oder G+:"
 #    required: "You need to log in before you can go that way."
 
   home:
-    slogan: "Lerne spielend JavaScript"
+    slogan: "Lerne spielend Programmieren"
     no_ie: "CodeCombat läuft nicht im IE8 oder älteren Browsern. Tut uns Leid!"
     no_mobile: "CodeCombat ist nicht für Mobilgeräte optimiert und funktioniert möglicherweise nicht."
     play: "Spielen"
@@ -120,8 +128,8 @@ module.exports = nativeDescription: "Deutsch (Deutschland)", englishDescription:
     forum_page: "unser Forum"
     forum_suffix: "."
     send: "Sende Feedback"
-#    contact_candidate: "Contact Candidate"
-#    recruitment_reminder: "Use this form to reach out to candidates you are interested in interviewing. Remember that CodeCombat charges 15% of first-year salary. The fee is due upon hiring the employee and is refundable for 90 days if the employee does not remain employed. Part time, remote, and contract employees are free, as are interns."
+    contact_candidate: "Kontaktiere Kandidaten"
+    recruitment_reminder: "Benutzen Sie dieses Formular um Kontakt zu Kandidaten aufzunehmen, an denen Sie interessiert sind. Bedenken Sie das CodeCombat 15% des ersten Jahresgehaltes berechnet. Diese Gebühr wird fällig wenn Sie den Kandidaten einstellen und ist für 90 Tage rückerstattungsfähig, sollte der Mitarbeiter nicht eingestellt bleiben. Mitarbeiter die für Teilzeit, Remote oder eine Auftragsarbeit eingestellt werden sind kostenlos, das gilt auch für Praktikanten."
 
   diplomat_suggestion:
     title: "Hilf CodeCombat zu übersetzen!"
@@ -134,13 +142,13 @@ module.exports = nativeDescription: "Deutsch (Deutschland)", englishDescription:
   wizard_settings:
     title: "Zauberer Einstellungen"
     customize_avatar: "Individualisiere deinen Avatar"
-#    active: "Active"
-#    color: "Color"
-#    group: "Group"
+    active: "Aktiv"
+    color: "Farbe"
+    group: "Gruppe"
     clothes: "Kleidung"
     trim: "Applikationen"
     cloud: "Wolke"
-#    team: "Team"
+    team: "Team"
     spell: "Zauber"
     boots: "Stiefel"
     hue: "Farbton"
@@ -153,7 +161,7 @@ module.exports = nativeDescription: "Deutsch (Deutschland)", englishDescription:
     autosave: "Sichere Änderungen automatisch"
     me_tab: "Ich"
     picture_tab: "Bild"
-#    upload_picture: "Upload a picture"
+    upload_picture: "Ein Bild hochladen"
     wizard_tab: "Zauberer"
     password_tab: "Passwort"
     emails_tab: "Emails"
@@ -168,7 +176,7 @@ module.exports = nativeDescription: "Deutsch (Deutschland)", englishDescription:
 #    email_notifications_summary: "Controls for personalized, automatic email notifications related to your CodeCombat activity."
 #    email_any_notes: "Any Notifications"
 #    email_any_notes_description: "Disable to stop all activity notification emails."
-#    email_recruit_notes: "Job Opportunities"
+    email_recruit_notes: "Job-Angebote"
 #    email_recruit_notes_description: "If you play really well, we may contact you about getting you a (better) job."
     contributor_emails: "Unterstützer Email"
     contribute_prefix: "Wir suchen nach Leuten, die mitmachen! Schau dir die"
@@ -178,41 +186,143 @@ module.exports = nativeDescription: "Deutsch (Deutschland)", englishDescription:
     error_saving: "Fehler beim Speichern"
     saved: "Änderungen gespeichert"
     password_mismatch: "Passwörter stimmen nicht überein."
-#    job_profile: "Job Profile"
-#    job_profile_approved: "Your job profile has been approved by CodeCombat. Employers will be able to see it until you either mark it inactive or it has not been changed for four weeks."
-#    job_profile_explanation: "Hi! Fill this out, and we will get in touch about finding you a software developer job."
-#    sample_profile: "See a sample profile"
-#    view_profile: "View Your Profile"
+    job_profile: "Jobprofil"
+    job_profile_approved: "Dein Jobprofil wurde von CodeCombat freigegeben. Arbeitgeber können dieses solange einsehen, bis du es als inaktiv markiert oder wenn innerhalb von vier Wochen keine Änderung daran vorgenommen wurde."
+    job_profile_explanation: "Hi! Fülle dies aus und wir melden uns bei dir bezüglich des Auffindens eines Jobs als Programmierer"
+    sample_profile: "Ein Beispielprofil ansehen"
+    view_profile: "Dein Profil ansehen"
 
   account_profile:
-    edit_settings: "Einstellungen ändern"
+    settings: "Einstellungen"
+    edit_profile: "Profil editieren"
+#    done_editing: "Done Editing"
     profile_for_prefix: "Profil von "
     profile_for_suffix: ""
-#    approved: "Approved"
-#    not_approved: "Not Approved"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
 #    looking_for: "Looking for:"
-#    last_updated: "Last updated:"
-#    contact: "Contact"
-#    work_experience: "Work Experience"
+    last_updated: "zuletzt geändert:"
+    contact: "Kontakt"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+    next_city: "Stadt?"
+    next_country: "Wähle dein Land."
+    next_name: "Name?"
+    next_short_description: "Schreibe eine kurze Beschreibung."
+    next_long_description: "Beschreibe deine gewünschte Position"
+    next_skills: "Liste mindestens fünf Fähigkeiten."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+    next_projects: "Zeige bis zu 3 Projekte an denen du gearbeitet hast."
+#    next_links: "add any personal or social links."
+    next_photo: "Füge ein optionales professionelles Foto hinzu."
+#    next_active: "mark yourself open to offers to show up in searches."
+    example_blog: "Blog"
+    example_personal_site: "Persönliche Seite"
+    links_header: "Persönliche Links"
+    links_blurb: "Verlinke zu anderen Seiten oder Profilen die du hervorheben möchtest, wie z.B. dein GitHub, dein LinkedIn oder deinen Blog."
+    links_name: "Link-Name"
+#    links_name_help: "What are you linking to?"
+    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+    basics_city: "Stadt"
+    basics_city_help: "Stadt in der du arbeiten möchtest (oder jetzt lebst)."
+    basics_country: "Land"
+    basics_country_help: "Land in dem du arbeiten möchtest (oder jetzt lebst)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+    basics_looking_for_full_time: "Vollzeit"
+    basics_looking_for_part_time: "Teilzeit"
+    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+    basics_looking_for_internship: "Praktikum"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+    name_header: "Trage deinen Namen ein"
+    name_anonymous: "Anonymer Entwickler"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+    skills_header: "Fähigkeiten"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+    long_description_header: "Beschreibe deine gewünschte Position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
+    work_experience: "Berufserfahrung"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+    work_employer: "Arbeitgeber"
+    work_employer_help: "Name deines Arbeitgebers."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+    work_description: "Beschreibung"
+    work_description_help: "Was hast du dort gemacht (140 Zeichen; optional)"
 #    education: "Education"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+    education_school: "Schule"
+    education_school_help: "Name deiner Schule."
+    education_degree: "Abschluss"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+    education_duration_help: "Wann?"
+    education_description: "Beschreibung"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
 #    our_notes: "Our Notes"
-#    projects: "Projects"
+    projects: "Projekte"
+    projects_header: "Füge 3 Projekte hinzu"
+    projects_header_2: "Projekte (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+    project_name: "Projekt Name"
+    project_name_help: "Wie wurde das Projekt genannt?"
+    project_description: "Beschreibung"
+    project_description_help: "Beschreibe kurz das Projekt."
+    project_picture: "Bild"
+    project_picture_help: "Lade ein 230x115px oder größeres Bild hoch, welches das Projekt darstellt."
+    project_link: "Link"
+    project_link_help: "Verlinke zu dem Projekt."
+    player_code: "Spieler Code"
 
-#  employers:
-#    want_to_hire_our_players: "Want to hire expert CodeCombat players?"
+  employers:
+    want_to_hire_our_players: "Stelle CodeCombat Spieler ein"
+    what: "Was ist CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-#    candidates_count_prefix: "We currently have "
-#    candidates_count_many: "many"
-#    candidates_count_suffix: "highly skilled and vetted developers looking for work."
-#    candidate_name: "Name"
+    candidate_name: "Name"
 #    candidate_location: "Location"
 #    candidate_looking_for: "Looking For"
-#    candidate_role: "Role"
+    candidate_role: "Rolle"
 #    candidate_top_skills: "Top Skills"
 #    candidate_years_experience: "Yrs Exp"
 #    candidate_last_updated: "Last Updated"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
   play_level:
     done: "Fertig"
@@ -265,10 +375,10 @@ module.exports = nativeDescription: "Deutsch (Deutschland)", englishDescription:
     skip_tutorial: "Überspringen (Esc)"
     editor_config: "Editor Einstellungen"
     editor_config_title: "Editor Einstellungen"
-#    editor_config_level_language_label: "Language for This Level"
-#    editor_config_level_language_description: "Define the programming language for this particular level."
-#    editor_config_default_language_label: "Default Programming Language"
-#    editor_config_default_language_description: "Define the programming language you want to code in when starting new levels."
+    editor_config_level_language_label: "Sprache für dieses Level"
+    editor_config_level_language_description: "Lege die Programmiersprache für dieses bestimmte Level fest."
+    editor_config_default_language_label: "Voreinstellung Programmiersprache"
+    editor_config_default_language_description: "Definiere die Programmiersprache in der du programmieren möchtest wenn du ein neues Level beginnst."
     editor_config_keybindings_label: "Tastenbelegung"
     editor_config_keybindings_default: "Standard (Ace)"
     editor_config_keybindings_description: "Fügt zusätzliche Tastenkombinationen, bekannt aus anderen Editoren, hinzu"
@@ -278,7 +388,7 @@ module.exports = nativeDescription: "Deutsch (Deutschland)", englishDescription:
     editor_config_indentguides_description: "Zeigt vertikale Linien an um Einrückungen besser zu sehen."
     editor_config_behaviors_label: "Intelligentes Verhalten"
     editor_config_behaviors_description: "Vervollständigt automatisch Klammern und Anführungszeichen."
-#    keyboard_shortcuts: "Key Shortcuts"
+    keyboard_shortcuts: "Tastenkürzel"
     loading_ready: "Bereit!"
     tip_insert_positions: "Halte 'Umschalt' gedrückt und klicke auf die Karte um die Koordinaten einzufügen."
     tip_toggle_play: "Wechsel zwischen Play und Pause mit Strg+P."
@@ -311,14 +421,14 @@ module.exports = nativeDescription: "Deutsch (Deutschland)", englishDescription:
     time_current: "Aktuell"
     time_total: "Total"
     time_goto: "Gehe zu"
-#    infinite_loop_try_again: "Try Again"
+    infinite_loop_try_again: "Erneut versuchen"
 #    infinite_loop_reset_level: "Reset Level"
-#    infinite_loop_comment_out: "Comment Out My Code"
+    infinite_loop_comment_out: "Meinen Code auskommentieren"
 
-#  keyboard_shortcuts:
-#    keyboard_shortcuts: "Keyboard Shortcuts"
-#    space: "Space"
-#    enter: "Enter"
+  keyboard_shortcuts:
+    keyboard_shortcuts: "Tastaturkürzel"
+    space: "Leertaste"
+    enter: "Eingabetaste"
 #    escape: "Escape"
 #    cast_spell: "Cast current spell."
 #    continue_script: "Continue past current script."
@@ -338,40 +448,42 @@ module.exports = nativeDescription: "Deutsch (Deutschland)", englishDescription:
     av_entities_sub_title: "Entitäten"
     av_entities_users_url: "Benutzer"
     av_entities_active_instances_url: "Aktive Instanzen"
+    av_entities_employer_list_url: "Arbeitgeberliste"
     av_other_sub_title: "Sonstige"
 #    av_other_debug_base_url: "Base (for debugging base.jade)"
     u_title: "Benutzerliste"
     lg_title: "Letzte Spiele"
 #    clas: "CLAs"
 
-#  community:
-#    level_editor: "Level Editor"
-#    main_title: "CodeCombat Community"
-#    facebook: "Facebook"
-#    twitter: "Twitter"
-#    gplus: "Google+"
+  community:
+    level_editor: "Level Editor"
+    main_title: "CodeCombat Community"
+    facebook: "Facebook"
+    twitter: "Twitter"
+    gplus: "Google+"
 
   editor:
     main_title: "CodeCombat Editoren"
     main_description: "Entwerfe deine eigenen Level, Kampagnen, Einheiten und Lernmaterial. Wir stellen alle Werkzeuge zur Verfügung, die Du dafür benötigst!"
     article_title: "Artikel Editor"
     article_description: "Schreiben Sie Artikel, die anderen Spieler einen Überblick über Programmierkonzepte geben und in einer Vielzahl von Ebenen und Kampagnen genutzt werden können."
-#    thang_title: "Thang Editor"
+    thang_title: "Thang Editor"
     thang_description: "Entwerfe Einheiten, definiere ihre Standardlogik, Grafiken und Töne. Zurzeit werden nur Flash Vektorgrafiken unterstützt."
     level_title: "Level Editor"
     level_description: "Beinhaltet die Werkzeuge zum Scripten, Hochladen von Tönen und zur Konstruktion eigener Logik, damit jedes erdenkliches Level erstellt werden kann. Genau die Sachen, die wir selber benutzen!"
-#    got_questions: "Questions about using the CodeCombat editors?"
+#    achievement_title: "Achievement Editor"
+    got_questions: "Fragen zur Benutzung des CodeCombat Editors?"
     contact_us: "setze dich mit uns in Verbindung!"
     hipchat_prefix: "Besuche uns auch in unserem"
     hipchat_url: "HipChat room."
-#    back: "Back"
+    back: "Zurück"
     revert: "Zurücksetzen"
     revert_models: "Models zurücksetzen."
-#    fork_title: "Fork New Version"
-#    fork_creating: "Creating Fork..."
-#    more: "More"
-#    wiki: "Wiki"
-#    live_chat: "Live Chat"
+    fork_title: "Forke neue Version"
+    fork_creating: "Erzeuge Fork..."
+    more: "Mehr"
+    wiki: "Wiki"
+    live_chat: "Live Chat"
     level_some_options: "Einige Einstellungsmöglichkeiten?"
     level_tab_thangs: "Thangs"
     level_tab_scripts: "Skripte"
@@ -379,11 +491,11 @@ module.exports = nativeDescription: "Deutsch (Deutschland)", englishDescription:
     level_tab_components: "Komponenten"
     level_tab_systems: "Systeme"
     level_tab_thangs_title: "Aktuelle Thangs"
-#    level_tab_thangs_all: "All"
+    level_tab_thangs_all: "Alle"
     level_tab_thangs_conditions: "Startbedingungen"
     level_tab_thangs_add: "Thangs hinzufügen"
-#    delete: "Delete"
-#    duplicate: "Duplicate"
+    delete: "Löschen"
+    duplicate: "Duplizieren"
     level_settings_title: "Einstellungen"
     level_component_tab_title: "Aktuelle Komponenten"
     level_component_btn_new: "neue Komponente erstellen"
@@ -400,14 +512,17 @@ module.exports = nativeDescription: "Deutsch (Deutschland)", englishDescription:
     new_component_title: "Neue Komponente erstellen"
     new_component_field_system: "System"
     new_article_title: "Erstelle einen neuen Artikel"
-#    new_thang_title: "Create a New Thang Type"
+    new_thang_title: "Erstelle einen neuen Thang-Typen"
     new_level_title: "Erstelle ein neues Level"
-#    new_article_title_login: "Log In to Create a New Article"
-#    new_thang_title_login: "Log In to Create a New Thang Type"
-#    new_level_title_login: "Log In to Create a New Level"
-#    article_search_title: "Search Articles Here"
-#    thang_search_title: "Search Thang Types Here"
-#    level_search_title: "Search Levels Here"
+    new_article_title_login: "Melde dich an um einen neuen Artikel zu erstellen"
+    new_thang_title_login: "Melde dich an um einen neuen Thang-Typen zu erstellen"
+    new_level_title_login: "Melde dich an um ein neues Level zu erstellen"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
+    article_search_title: "Durchsuche Artikel hier"
+    thang_search_title: "Durchsuche Thang-Typen hier"
+    level_search_title: "Durchsuche Levels hier"
+#    achievement_search_title: "Search Achievements"
 #    read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
   article:
@@ -420,13 +535,13 @@ module.exports = nativeDescription: "Deutsch (Deutschland)", englishDescription:
     body: "Inhalt"
     version: "Version"
     commit_msg: "Commit Nachricht"
-#    version_history: "Version History"
+    version_history: "Versionshistorie"
     version_history_for: "Versionsgeschichte für: "
     result: "Ergebnis"
     results: "Ergebnisse"
     description: "Beschreibung"
     or: "oder"
-#    subject: "Subject"
+    subject: "Betreff"
     email: "Email"
     password: "Passwort"
     message: "Nachricht"
@@ -442,7 +557,7 @@ module.exports = nativeDescription: "Deutsch (Deutschland)", englishDescription:
     easy: "Einfach"
     medium: "Mittel"
     hard: "Schwer"
-#    player: "Player"
+    player: "Spieler"
 
   about:
     who_is_codecombat: "Wer ist CodeCombat?"
@@ -524,13 +639,13 @@ module.exports = nativeDescription: "Deutsch (Deutschland)", englishDescription:
 #    rights_writings: "Writings"
 #    rights_media: "Media (sounds, music) and any other creative content made specifically for that Level and not made generally available when creating Levels."
 #    rights_clarification: "To clarify, anything that is made available in the Level Editor for the purpose of making levels is under CC, whereas the content created with the Level Editor or uploaded in the course of creation of Levels is not."
-#    nutshell_title: "In a Nutshell"
+    nutshell_title: "Zusammenfassung"
 #    nutshell_description: "Any resources we provide in the Level Editor are free to use as you like for creating Levels. But we reserve the right to restrict distribution of the Levels themselves (that are created on codecombat.com) so that they may be charged for in the future, if that's what ends up happening."
-#    canonical: "The English version of this document is the definitive, canonical version. If there are any discrepencies between translations, the English document takes precedence."
+    canonical: "Die englische Version dieses Dokuments ist die definitive, kanonische Version. Sollte es Unterschiede zwischen den Übersetzungen geben, dann hat das englische Dokument Vorrang."
 
 #  contribute:
 #    page_title: "Contributing"
-#    character_classes_title: "Character Classes"
+    character_classes_title: "Charakter Klassen"
 #    introduction_desc_intro: "We have high hopes for CodeCombat."
 #    introduction_desc_pref: "We want to be where programmers of all stripes come to learn and play together, introduce others to the wonderful world of coding, and reflect the best parts of the community. We can't and don't want to do that alone; what makes projects like GitHub, Stack Overflow and Linux great are the people who use them and build on them. To that end, "
 #    introduction_desc_github_url: "CodeCombat is totally open source"
@@ -550,7 +665,7 @@ module.exports = nativeDescription: "Deutsch (Deutschland)", englishDescription:
 #    join_desc_2: "to get started, and check the box below to mark yourself as a brave Archmage and get the latest news by email. Want to chat about what to do or how to get more deeply involved? "
 #    join_desc_3: ", or find us in our "
 #    join_desc_4: "and we'll go from there!"
-#    join_url_email: "Email us"
+    join_url_email: "Emaile uns"
 #    join_url_hipchat: "public HipChat room"
 #    more_about_archmage: "Learn More About Becoming an Archmage"
 #    archmage_subscribe_desc: "Get emails on new coding opportunities and announcements."
@@ -583,7 +698,7 @@ module.exports = nativeDescription: "Deutsch (Deutschland)", englishDescription:
 #    scribe_introduction_url_mozilla: "Mozilla Developer Network"
 #    scribe_introduction_suf: " has built. If your idea of fun is articulating the concepts of programming in Markdown form, then this class might be for you."
 #    scribe_attribute_1: "Skill in words is pretty much all you need. Not only grammar and spelling, but able to convey complicated ideas to others."
-#    contact_us_url: "Contact us"
+    contact_us_url: "Kontaktiere uns"
 #    scribe_join_description: "tell us a little about yourself, your experience with programming and what sort of things you'd like to write about. We'll go from there!"
 #    more_about_scribe: "Learn More About Becoming a Scribe"
 #    scribe_subscribe_desc: "Get emails about article writing announcements."
@@ -613,12 +728,12 @@ module.exports = nativeDescription: "Deutsch (Deutschland)", englishDescription:
 #    counselor_join_desc: "tell us a little about yourself, what you've done and what you'd be interested in doing. We'll put you in our contact list and be in touch when we could use advice (not too often)."
 #    more_about_counselor: "Learn More About Becoming a Counselor"
 #    changes_auto_save: "Changes are saved automatically when you toggle checkboxes."
-#    diligent_scribes: "Our Diligent Scribes:"
-#    powerful_archmages: "Our Powerful Archmages:"
-#    creative_artisans: "Our Creative Artisans:"
-#    brave_adventurers: "Our Brave Adventurers:"
-#    translating_diplomats: "Our Translating Diplomats:"
-#    helpful_ambassadors: "Our Helpful Ambassadors:"
+    diligent_scribes: "Unsere fleißgen Schreiber:"
+    powerful_archmages: "Unsere mächtigen Erzmagier:"
+    creative_artisans: "Unsere kreativen Handwerker:"
+    brave_adventurers: "Unsere mutigen Abenteurer:"
+    translating_diplomats: "Unsere übersetzenden Diplomaten:"
+    helpful_ambassadors: "Unsere hilfreichen Botschafter:"
 
   classes:
     archmage_title: "Erzmagier"
@@ -641,18 +756,18 @@ module.exports = nativeDescription: "Deutsch (Deutschland)", englishDescription:
     my_matches: "Meine Matches"
     simulate: "Simuliere"
 #    simulation_explanation: "By simulating games you can get your game ranked faster!"
-#    simulate_games: "Simulate Games!"
+    simulate_games: "Simuliere Spiele!"
 #    simulate_all: "RESET AND SIMULATE GAMES"
-#    games_simulated_by: "Games simulated by you:"
-#    games_simulated_for: "Games simulated for you:"
-#    games_simulated: "Games simulated"
-#    games_played: "Games played"
-#    ratio: "Ratio"
+    games_simulated_by: "Spiele die durch dich simuliert worden:"
+    games_simulated_for: "Spiele die für dich simuliert worden:"
+    games_simulated: "simulierte Spiele"
+    games_played: "gespielte Spiele"
+    ratio: "Ratio"
 #    leaderboard: "Leaderboard"
 #    battle_as: "Battle as "
-#    summary_your: "Your "
-#    summary_matches: "Matches - "
-#    summary_wins: " Wins, "
+    summary_your: "Deine "
+    summary_matches: "Matches - "
+    summary_wins: " Siege, "
 #    summary_losses: " Losses"
 #    rank_no_code: "No New Code to Rank"
 #    rank_my_game: "Rank My Game!"
@@ -674,27 +789,30 @@ module.exports = nativeDescription: "Deutsch (Deutschland)", englishDescription:
     simple_ai: "Einfache KI"
     warmup: "Aufwärmen"
     vs: "VS"
-#    friends_playing: "Friends Playing"
-#    log_in_for_friends: "Log in to play with your friends!"
-#    social_connect_blurb: "Connect and play against your friends!"
+    friends_playing: "spielende Freunde"
+    log_in_for_friends: "Melde dich an um mit deinen Freunden zu spielen!"
+    social_connect_blurb: "Verbinde und spiele gegen deine Freunde!"
 #    invite_friends_to_battle: "Invite your friends to join you in battle!"
 #    fight: "Fight!"
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
-#    tournament_rules: "Tournament Rules"
+#    tournament_ended: "Tournament ended"
+    tournament_rules: "Turnier-Regeln"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+    rules: "Regeln"
+    winners: "Gewinner"
 
-#  ladder_prizes:
-#    title: "Tournament Prizes"
+  ladder_prizes:
+    title: "Turnier Preise"
 #    blurb_1: "These prizes will be awarded according to"
 #    blurb_2: "the tournament rules"
 #    blurb_3: "to the top human and ogre players."
-#    blurb_4: "Two teams means double the prizes!"
+    blurb_4: "Zwei Teams heißt die doppelte Anzahl zu gewinnender Preise!"
 #    blurb_5: "(There will be two first place winners, two second-place winners, etc.)"
-#    rank: "Rank"
-#    prizes: "Prizes"
+    rank: "Rang"
+    prizes: "Gewinne"
 #    total_value: "Total Value"
 #    in_cash: "in cash"
 #    custom_wizard: "Custom CodeCombat Wizard"
@@ -703,8 +821,8 @@ module.exports = nativeDescription: "Deutsch (Deutschland)", englishDescription:
 #    credits: "credits"
 #    one_month_coupon: "coupon: choose either Rails or HTML"
 #    one_month_discount: "discount, 30% off: choose either Rails or HTML"
-#    license: "license"
-#    oreilly: "ebook of your choice"
+    license: "Lizenz"
+    oreilly: "Ebook deiner Wahl"
 
 #  multiplayer_launch:
 #    introducing_dungeon_arena: "Introducing Dungeon Arena"
@@ -720,54 +838,55 @@ module.exports = nativeDescription: "Deutsch (Deutschland)", englishDescription:
 #    new_to_programming: ". New to programming? Hit our beginner campaign to skill up."
 #    so_ready: "I Am So Ready for This"
 
-#  loading_error:
-#    could_not_load: "Error loading from server"
-#    connection_failure: "Connection failed."
-#    unauthorized: "You need to be signed in. Do you have cookies disabled?"
-#    forbidden: "You do not have the permissions."
-#    not_found: "Not found."
-#    not_allowed: "Method not allowed."
-#    timeout: "Server timeout."
-#    conflict: "Resource conflict."
-#    bad_input: "Bad input."
-#    server_error: "Server error."
-#    unknown: "Unknown error."
+  loading_error:
+    could_not_load: "Fehler beim Laden vom Server"
+    connection_failure: "Verbindung fehlgeschlagen."
+    unauthorized: "Du musst angemeldet sein. Hast du Cookies ausgeschaltet?"
+    forbidden: "Sie haben nicht die nötigen Berechtigungen."
+    not_found: "Nicht gefunden."
+    not_allowed: "Methode nicht erlaubt."
+    timeout: "Server timeout."
+    conflict: "Resourcen Konflikt."
+    bad_input: "Falsche Eingabe."
+    server_error: "Server Fehler."
+    unknown: "Unbekannter Fehler."
 
-#  resources:
-#    your_sessions: "Your Sessions"
-#    level: "Level"
-#    social_network_apis: "Social Network APIs"
-#    facebook_status: "Facebook Status"
-#    facebook_friends: "Facebook Friends"
-#    facebook_friend_sessions: "Facebook Friend Sessions"
-#    gplus_friends: "G+ Friends"
-#    gplus_friend_sessions: "G+ Friend Sessions"
+  resources:
+    your_sessions: "Meine Sessions"
+    level: "Level"
+    social_network_apis: "Social Network APIs"
+    facebook_status: "Facebook Status"
+    facebook_friends: "Facebook Freunde"
+    facebook_friend_sessions: "Facebook Freunde Sessions"
+    gplus_friends: "G+ Freunde"
+    gplus_friend_sessions: "G+ Freunde Sessions"
 #    leaderboard: "Leaderboard"
-#    user_schema: "User Schema"
-#    user_profile: "User Profile"
+    user_schema: "Benutzerschema"
+    user_profile: "Benutzerprofil"
 #    patches: "Patches"
 #    patched_model: "Source Document"
-#    model: "Model"
-#    system: "System"
-#    component: "Component"
-#    components: "Components"
-#    thang: "Thang"
-#    thangs: "Thangs"
-#    level_session: "Your Session"
-#    opponent_session: "Opponent Session"
-#    article: "Article"
-#    user_names: "User Names"
-#    thang_names: "Thang Names"
-#    files: "Files"
-#    top_simulators: "Top Simulators"
+    model: "Model"
+    system: "System"
+    component: "Komponente"
+    components: "Komponenten"
+    thang: "Thang"
+    thangs: "Thangs"
+    level_session: "Deine Session"
+    opponent_session: "Gegner-Session"
+    article: "Artikel"
+    user_names: "Benutzernamen"
+    thang_names: "Thang Namen"
+    files: "Dateien"
+    top_simulators: "Top Simulatoren"
 #    source_document: "Source Document"
-#    document: "Document"
-#    sprite_sheet: "Sprite Sheet"
+    document: "Dokument"
+    sprite_sheet: "Sprite Sheet"
+    candidate_sessions: "Kandidat-Sessions"
 
-#  delta:
-#    added: "Added"
-#    modified: "Modified"
-#    deleted: "Deleted"
+  delta:
+    added: "hinzugefügt"
+    modified: "modifiziert"
+    deleted: "gelöscht"
 #    moved_index: "Moved Index"
 #    text_diff: "Text Diff"
 #    merge_conflict_with: "MERGE CONFLICT WITH"
diff --git a/app/locale/de.coffee b/app/locale/de.coffee
index 29396ab36..41396ba00 100644
--- a/app/locale/de.coffee
+++ b/app/locale/de.coffee
@@ -3,18 +3,18 @@ module.exports = nativeDescription: "Deutsch", englishDescription: "German", tra
     loading: "Lade..."
     saving: "Speichere..."
     sending: "Übertrage..."
-#    send: "Send"
+    send: "Senden"
     cancel: "Abbrechen"
     save: "Speichern"
-#    publish: "Publish"
-#    create: "Create"
+    publish: "Publiziere"
+    create: "Erstelle"
     delay_1_sec: "1 Sekunde"
     delay_3_sec: "3 Sekunden"
     delay_5_sec: "5 Sekunden"
     manual: "Manuell"
-#    fork: "Fork"
+    fork: "Fork"
     play: "Abspielen"
-#    retry: "Retry"
+    retry: "Erneut versuchen"
 #    watch: "Watch"
 #    unwatch: "Unwatch"
 #    submit_patch: "Submit Patch"
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "Deutsch", englishDescription: "German", tra
     minutes: "Minuten"
     hour: "Stunde"
     hours: "Stunden"
+    day: "Tag"
+    days: "Tage"
+    week: "Woche"
+    weeks: "Wochen"
+    month: "Monat"
+    months: "Monate"
+    year: "Jahr"
+    years: "Jahre"
 
   modal:
     close: "Schließen"
@@ -61,7 +69,7 @@ module.exports = nativeDescription: "Deutsch", englishDescription: "German", tra
   login:
     sign_up: "Registrieren"
     log_in: "Einloggen"
-#    logging_in: "Logging In"
+    logging_in: "Logge ein"
     log_out: "Ausloggen"
     recover: "Account wiederherstellen"
 
@@ -78,11 +86,11 @@ module.exports = nativeDescription: "Deutsch", englishDescription: "German", tra
     creating: "Erzeuge Account..."
     sign_up: "Neuen Account anlegen"
     log_in: "mit Passwort einloggen"
-#    social_signup: "Or, you can sign up through Facebook or G+:"
+    social_signup: "oder, du registriest dich über Facebook oder G+:"
 #    required: "You need to log in before you can go that way."
 
   home:
-    slogan: "Lerne spielend JavaScript"
+    slogan: "Lerne spielend Programmieren"
     no_ie: "CodeCombat läuft nicht im IE8 oder älteren Browsern. Tut uns Leid!"
     no_mobile: "CodeCombat ist nicht für Mobilgeräte optimiert und funktioniert möglicherweise nicht."
     play: "Spielen"
@@ -120,8 +128,8 @@ module.exports = nativeDescription: "Deutsch", englishDescription: "German", tra
     forum_page: "unser Forum"
     forum_suffix: "."
     send: "Sende Feedback"
-#    contact_candidate: "Contact Candidate"
-#    recruitment_reminder: "Use this form to reach out to candidates you are interested in interviewing. Remember that CodeCombat charges 15% of first-year salary. The fee is due upon hiring the employee and is refundable for 90 days if the employee does not remain employed. Part time, remote, and contract employees are free, as are interns."
+    contact_candidate: "Kontaktiere Kandidaten"
+    recruitment_reminder: "Benutzen Sie dieses Formular um Kontakt zu Kandidaten aufzunehmen, an denen Sie interessiert sind. Bedenken Sie das CodeCombat 15% des ersten Jahresgehaltes berechnet. Diese Gebühr wird fällig wenn Sie den Kandidaten einstellen und ist für 90 Tage rückerstattungsfähig, sollte der Mitarbeiter nicht eingestellt bleiben. Mitarbeiter die für Teilzeit, Remote oder eine Auftragsarbeit eingestellt werden sind kostenlos, das gilt auch für Praktikanten."
 
   diplomat_suggestion:
     title: "Hilf CodeCombat zu übersetzen!"
@@ -134,13 +142,13 @@ module.exports = nativeDescription: "Deutsch", englishDescription: "German", tra
   wizard_settings:
     title: "Zauberer Einstellungen"
     customize_avatar: "Individualisiere deinen Avatar"
-#    active: "Active"
-#    color: "Color"
-#    group: "Group"
+    active: "Aktiv"
+    color: "Farbe"
+    group: "Gruppe"
     clothes: "Kleidung"
     trim: "Applikationen"
     cloud: "Wolke"
-#    team: "Team"
+    team: "Team"
     spell: "Zauber"
     boots: "Stiefel"
     hue: "Farbton"
@@ -153,7 +161,7 @@ module.exports = nativeDescription: "Deutsch", englishDescription: "German", tra
     autosave: "Sichere Änderungen automatisch"
     me_tab: "Ich"
     picture_tab: "Bild"
-#    upload_picture: "Upload a picture"
+    upload_picture: "Ein Bild hochladen"
     wizard_tab: "Zauberer"
     password_tab: "Passwort"
     emails_tab: "Emails"
@@ -168,7 +176,7 @@ module.exports = nativeDescription: "Deutsch", englishDescription: "German", tra
 #    email_notifications_summary: "Controls for personalized, automatic email notifications related to your CodeCombat activity."
 #    email_any_notes: "Any Notifications"
 #    email_any_notes_description: "Disable to stop all activity notification emails."
-#    email_recruit_notes: "Job Opportunities"
+    email_recruit_notes: "Job-Angebote"
 #    email_recruit_notes_description: "If you play really well, we may contact you about getting you a (better) job."
     contributor_emails: "Unterstützer Email"
     contribute_prefix: "Wir suchen nach Leuten, die mitmachen! Schau dir die"
@@ -178,41 +186,143 @@ module.exports = nativeDescription: "Deutsch", englishDescription: "German", tra
     error_saving: "Fehler beim Speichern"
     saved: "Änderungen gespeichert"
     password_mismatch: "Passwörter stimmen nicht überein."
-#    job_profile: "Job Profile"
-#    job_profile_approved: "Your job profile has been approved by CodeCombat. Employers will be able to see it until you either mark it inactive or it has not been changed for four weeks."
-#    job_profile_explanation: "Hi! Fill this out, and we will get in touch about finding you a software developer job."
-#    sample_profile: "See a sample profile"
-#    view_profile: "View Your Profile"
+    job_profile: "Jobprofil"
+    job_profile_approved: "Dein Jobprofil wurde von CodeCombat freigegeben. Arbeitgeber können dieses solange einsehen, bis du es als inaktiv markiert oder wenn innerhalb von vier Wochen keine Änderung daran vorgenommen wurde."
+    job_profile_explanation: "Hi! Fülle dies aus und wir melden uns bei dir bezüglich des Auffindens eines Jobs als Programmierer"
+    sample_profile: "Ein Beispielprofil ansehen"
+    view_profile: "Dein Profil ansehen"
 
   account_profile:
-    edit_settings: "Einstellungen ändern"
+    settings: "Einstellungen"
+    edit_profile: "Profil editieren"
+#    done_editing: "Done Editing"
     profile_for_prefix: "Profil von "
     profile_for_suffix: ""
-#    approved: "Approved"
-#    not_approved: "Not Approved"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
 #    looking_for: "Looking for:"
-#    last_updated: "Last updated:"
-#    contact: "Contact"
-#    work_experience: "Work Experience"
+    last_updated: "zuletzt geändert:"
+    contact: "Kontakt"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+    next_city: "Stadt?"
+    next_country: "Wähle dein Land."
+    next_name: "Name?"
+    next_short_description: "Schreibe eine kurze Beschreibung."
+    next_long_description: "Beschreibe deine gewünschte Position"
+    next_skills: "Liste mindestens fünf Fähigkeiten."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+    next_projects: "Zeige bis zu 3 Projekte an denen du gearbeitet hast."
+#    next_links: "add any personal or social links."
+    next_photo: "Füge ein optionales professionelles Foto hinzu."
+#    next_active: "mark yourself open to offers to show up in searches."
+    example_blog: "Blog"
+    example_personal_site: "Persönliche Seite"
+    links_header: "Persönliche Links"
+    links_blurb: "Verlinke zu anderen Seiten oder Profilen die du hervorheben möchtest, wie z.B. dein GitHub, dein LinkedIn oder deinen Blog."
+    links_name: "Link-Name"
+#    links_name_help: "What are you linking to?"
+    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+    basics_city: "Stadt"
+    basics_city_help: "Stadt in der du arbeiten möchtest (oder jetzt lebst)."
+    basics_country: "Land"
+    basics_country_help: "Land in dem du arbeiten möchtest (oder jetzt lebst)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+    basics_looking_for_full_time: "Vollzeit"
+    basics_looking_for_part_time: "Teilzeit"
+    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+    basics_looking_for_internship: "Praktikum"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+    name_header: "Trage deinen Namen ein"
+    name_anonymous: "Anonymer Entwickler"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+    skills_header: "Fähigkeiten"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+    long_description_header: "Beschreibe deine gewünschte Position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
+    work_experience: "Berufserfahrung"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+    work_employer: "Arbeitgeber"
+    work_employer_help: "Name deines Arbeitgebers."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+    work_description: "Beschreibung"
+    work_description_help: "Was hast du dort gemacht (140 Zeichen; optional)"
 #    education: "Education"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+    education_school: "Schule"
+    education_school_help: "Name deiner Schule."
+    education_degree: "Abschluss"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+    education_duration_help: "Wann?"
+    education_description: "Beschreibung"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
 #    our_notes: "Our Notes"
-#    projects: "Projects"
+    projects: "Projekte"
+    projects_header: "Füge 3 Projekte hinzu"
+    projects_header_2: "Projekte (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+    project_name: "Projekt Name"
+    project_name_help: "Wie wurde das Projekt genannt?"
+    project_description: "Beschreibung"
+    project_description_help: "Beschreibe kurz das Projekt."
+    project_picture: "Bild"
+    project_picture_help: "Lade ein 230x115px oder größeres Bild hoch, welches das Projekt darstellt."
+    project_link: "Link"
+    project_link_help: "Verlinke zu dem Projekt."
+    player_code: "Spieler Code"
 
-#  employers:
-#    want_to_hire_our_players: "Want to hire expert CodeCombat players?"
+  employers:
+    want_to_hire_our_players: "Stelle CodeCombat Spieler ein"
+    what: "Was ist CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-#    candidates_count_prefix: "We currently have "
-#    candidates_count_many: "many"
-#    candidates_count_suffix: "highly skilled and vetted developers looking for work."
-#    candidate_name: "Name"
+    candidate_name: "Name"
 #    candidate_location: "Location"
 #    candidate_looking_for: "Looking For"
-#    candidate_role: "Role"
+    candidate_role: "Rolle"
 #    candidate_top_skills: "Top Skills"
 #    candidate_years_experience: "Yrs Exp"
 #    candidate_last_updated: "Last Updated"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
   play_level:
     done: "Fertig"
@@ -265,10 +375,10 @@ module.exports = nativeDescription: "Deutsch", englishDescription: "German", tra
     skip_tutorial: "Überspringen (Esc)"
     editor_config: "Editor Einstellungen"
     editor_config_title: "Editor Einstellungen"
-#    editor_config_level_language_label: "Language for This Level"
-#    editor_config_level_language_description: "Define the programming language for this particular level."
-#    editor_config_default_language_label: "Default Programming Language"
-#    editor_config_default_language_description: "Define the programming language you want to code in when starting new levels."
+    editor_config_level_language_label: "Sprache für dieses Level"
+    editor_config_level_language_description: "Lege die Programmiersprache für dieses bestimmte Level fest."
+    editor_config_default_language_label: "Voreinstellung Programmiersprache"
+    editor_config_default_language_description: "Definiere die Programmiersprache in der du programmieren möchtest wenn du ein neues Level beginnst."
     editor_config_keybindings_label: "Tastenbelegung"
     editor_config_keybindings_default: "Standard (Ace)"
     editor_config_keybindings_description: "Fügt zusätzliche Tastenkombinationen, bekannt aus anderen Editoren, hinzu"
@@ -278,7 +388,7 @@ module.exports = nativeDescription: "Deutsch", englishDescription: "German", tra
     editor_config_indentguides_description: "Zeigt vertikale Linien an um Einrückungen besser zu sehen."
     editor_config_behaviors_label: "Intelligentes Verhalten"
     editor_config_behaviors_description: "Vervollständigt automatisch Klammern und Anführungszeichen."
-#    keyboard_shortcuts: "Key Shortcuts"
+    keyboard_shortcuts: "Tastenkürzel"
     loading_ready: "Bereit!"
     tip_insert_positions: "Halte 'Umschalt' gedrückt und klicke auf die Karte um die Koordinaten einzufügen."
     tip_toggle_play: "Wechsel zwischen Play und Pause mit Strg+P."
@@ -311,14 +421,14 @@ module.exports = nativeDescription: "Deutsch", englishDescription: "German", tra
     time_current: "Aktuell"
     time_total: "Total"
     time_goto: "Gehe zu"
-#    infinite_loop_try_again: "Try Again"
+    infinite_loop_try_again: "Erneut versuchen"
 #    infinite_loop_reset_level: "Reset Level"
-#    infinite_loop_comment_out: "Comment Out My Code"
+    infinite_loop_comment_out: "Meinen Code auskommentieren"
 
-#  keyboard_shortcuts:
-#    keyboard_shortcuts: "Keyboard Shortcuts"
-#    space: "Space"
-#    enter: "Enter"
+  keyboard_shortcuts:
+    keyboard_shortcuts: "Tastaturkürzel"
+    space: "Leertaste"
+    enter: "Eingabetaste"
 #    escape: "Escape"
 #    cast_spell: "Cast current spell."
 #    continue_script: "Continue past current script."
@@ -338,40 +448,42 @@ module.exports = nativeDescription: "Deutsch", englishDescription: "German", tra
     av_entities_sub_title: "Entitäten"
     av_entities_users_url: "Benutzer"
     av_entities_active_instances_url: "Aktive Instanzen"
+    av_entities_employer_list_url: "Arbeitgeberliste"
     av_other_sub_title: "Sonstige"
 #    av_other_debug_base_url: "Base (for debugging base.jade)"
     u_title: "Benutzerliste"
     lg_title: "Letzte Spiele"
 #    clas: "CLAs"
 
-#  community:
-#    level_editor: "Level Editor"
-#    main_title: "CodeCombat Community"
-#    facebook: "Facebook"
-#    twitter: "Twitter"
-#    gplus: "Google+"
+  community:
+    level_editor: "Level Editor"
+    main_title: "CodeCombat Community"
+    facebook: "Facebook"
+    twitter: "Twitter"
+    gplus: "Google+"
 
   editor:
     main_title: "CodeCombat Editoren"
     main_description: "Entwerfe deine eigenen Level, Kampagnen, Einheiten und Lernmaterial. Wir stellen alle Werkzeuge zur Verfügung, die Du dafür benötigst!"
     article_title: "Artikel Editor"
     article_description: "Schreiben Sie Artikel, die anderen Spieler einen Überblick über Programmierkonzepte geben und in einer Vielzahl von Ebenen und Kampagnen genutzt werden können."
-#    thang_title: "Thang Editor"
+    thang_title: "Thang Editor"
     thang_description: "Entwerfe Einheiten, definiere ihre Standardlogik, Grafiken und Töne. Zurzeit werden nur Flash Vektorgrafiken unterstützt."
     level_title: "Level Editor"
     level_description: "Beinhaltet die Werkzeuge zum Scripten, Hochladen von Tönen und zur Konstruktion eigener Logik, damit jedes erdenkliches Level erstellt werden kann. Genau die Sachen, die wir selber benutzen!"
-#    got_questions: "Questions about using the CodeCombat editors?"
+#    achievement_title: "Achievement Editor"
+    got_questions: "Fragen zur Benutzung des CodeCombat Editors?"
     contact_us: "setze dich mit uns in Verbindung!"
     hipchat_prefix: "Besuche uns auch in unserem"
     hipchat_url: "HipChat room."
-#    back: "Back"
+    back: "Zurück"
     revert: "Zurücksetzen"
     revert_models: "Models zurücksetzen."
-#    fork_title: "Fork New Version"
-#    fork_creating: "Creating Fork..."
-#    more: "More"
-#    wiki: "Wiki"
-#    live_chat: "Live Chat"
+    fork_title: "Forke neue Version"
+    fork_creating: "Erzeuge Fork..."
+    more: "Mehr"
+    wiki: "Wiki"
+    live_chat: "Live Chat"
     level_some_options: "Einige Einstellungsmöglichkeiten?"
     level_tab_thangs: "Thangs"
     level_tab_scripts: "Skripte"
@@ -379,11 +491,11 @@ module.exports = nativeDescription: "Deutsch", englishDescription: "German", tra
     level_tab_components: "Komponenten"
     level_tab_systems: "Systeme"
     level_tab_thangs_title: "Aktuelle Thangs"
-#    level_tab_thangs_all: "All"
+    level_tab_thangs_all: "Alle"
     level_tab_thangs_conditions: "Startbedingungen"
     level_tab_thangs_add: "Thangs hinzufügen"
-#    delete: "Delete"
-#    duplicate: "Duplicate"
+    delete: "Löschen"
+    duplicate: "Duplizieren"
     level_settings_title: "Einstellungen"
     level_component_tab_title: "Aktuelle Komponenten"
     level_component_btn_new: "neue Komponente erstellen"
@@ -400,14 +512,17 @@ module.exports = nativeDescription: "Deutsch", englishDescription: "German", tra
     new_component_title: "Neue Komponente erstellen"
     new_component_field_system: "System"
     new_article_title: "Erstelle einen neuen Artikel"
-#    new_thang_title: "Create a New Thang Type"
+    new_thang_title: "Erstelle einen neuen Thang-Typen"
     new_level_title: "Erstelle ein neues Level"
-#    new_article_title_login: "Log In to Create a New Article"
-#    new_thang_title_login: "Log In to Create a New Thang Type"
-#    new_level_title_login: "Log In to Create a New Level"
-#    article_search_title: "Search Articles Here"
-#    thang_search_title: "Search Thang Types Here"
-#    level_search_title: "Search Levels Here"
+    new_article_title_login: "Melde dich an um einen neuen Artikel zu erstellen"
+    new_thang_title_login: "Melde dich an um einen neuen Thang-Typen zu erstellen"
+    new_level_title_login: "Melde dich an um ein neues Level zu erstellen"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
+    article_search_title: "Durchsuche Artikel hier"
+    thang_search_title: "Durchsuche Thang-Typen hier"
+    level_search_title: "Durchsuche Levels hier"
+#    achievement_search_title: "Search Achievements"
 #    read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
   article:
@@ -420,13 +535,13 @@ module.exports = nativeDescription: "Deutsch", englishDescription: "German", tra
     body: "Inhalt"
     version: "Version"
     commit_msg: "Commit Nachricht"
-#    version_history: "Version History"
+    version_history: "Versionshistorie"
     version_history_for: "Versionsgeschichte für: "
     result: "Ergebnis"
     results: "Ergebnisse"
     description: "Beschreibung"
     or: "oder"
-#    subject: "Subject"
+    subject: "Betreff"
     email: "Email"
     password: "Passwort"
     message: "Nachricht"
@@ -442,7 +557,7 @@ module.exports = nativeDescription: "Deutsch", englishDescription: "German", tra
     easy: "Einfach"
     medium: "Mittel"
     hard: "Schwer"
-#    player: "Player"
+    player: "Spieler"
 
   about:
     who_is_codecombat: "Wer ist CodeCombat?"
@@ -524,13 +639,13 @@ module.exports = nativeDescription: "Deutsch", englishDescription: "German", tra
 #    rights_writings: "Writings"
 #    rights_media: "Media (sounds, music) and any other creative content made specifically for that Level and not made generally available when creating Levels."
 #    rights_clarification: "To clarify, anything that is made available in the Level Editor for the purpose of making levels is under CC, whereas the content created with the Level Editor or uploaded in the course of creation of Levels is not."
-#    nutshell_title: "In a Nutshell"
+    nutshell_title: "Zusammenfassung"
 #    nutshell_description: "Any resources we provide in the Level Editor are free to use as you like for creating Levels. But we reserve the right to restrict distribution of the Levels themselves (that are created on codecombat.com) so that they may be charged for in the future, if that's what ends up happening."
-#    canonical: "The English version of this document is the definitive, canonical version. If there are any discrepencies between translations, the English document takes precedence."
+    canonical: "Die englische Version dieses Dokuments ist die definitive, kanonische Version. Sollte es Unterschiede zwischen den Übersetzungen geben, dann hat das englische Dokument Vorrang."
 
 #  contribute:
 #    page_title: "Contributing"
-#    character_classes_title: "Character Classes"
+    character_classes_title: "Charakter Klassen"
 #    introduction_desc_intro: "We have high hopes for CodeCombat."
 #    introduction_desc_pref: "We want to be where programmers of all stripes come to learn and play together, introduce others to the wonderful world of coding, and reflect the best parts of the community. We can't and don't want to do that alone; what makes projects like GitHub, Stack Overflow and Linux great are the people who use them and build on them. To that end, "
 #    introduction_desc_github_url: "CodeCombat is totally open source"
@@ -550,7 +665,7 @@ module.exports = nativeDescription: "Deutsch", englishDescription: "German", tra
 #    join_desc_2: "to get started, and check the box below to mark yourself as a brave Archmage and get the latest news by email. Want to chat about what to do or how to get more deeply involved? "
 #    join_desc_3: ", or find us in our "
 #    join_desc_4: "and we'll go from there!"
-#    join_url_email: "Email us"
+    join_url_email: "Emaile uns"
 #    join_url_hipchat: "public HipChat room"
 #    more_about_archmage: "Learn More About Becoming an Archmage"
 #    archmage_subscribe_desc: "Get emails on new coding opportunities and announcements."
@@ -583,7 +698,7 @@ module.exports = nativeDescription: "Deutsch", englishDescription: "German", tra
 #    scribe_introduction_url_mozilla: "Mozilla Developer Network"
 #    scribe_introduction_suf: " has built. If your idea of fun is articulating the concepts of programming in Markdown form, then this class might be for you."
 #    scribe_attribute_1: "Skill in words is pretty much all you need. Not only grammar and spelling, but able to convey complicated ideas to others."
-#    contact_us_url: "Contact us"
+    contact_us_url: "Kontaktiere uns"
 #    scribe_join_description: "tell us a little about yourself, your experience with programming and what sort of things you'd like to write about. We'll go from there!"
 #    more_about_scribe: "Learn More About Becoming a Scribe"
 #    scribe_subscribe_desc: "Get emails about article writing announcements."
@@ -613,12 +728,12 @@ module.exports = nativeDescription: "Deutsch", englishDescription: "German", tra
 #    counselor_join_desc: "tell us a little about yourself, what you've done and what you'd be interested in doing. We'll put you in our contact list and be in touch when we could use advice (not too often)."
 #    more_about_counselor: "Learn More About Becoming a Counselor"
 #    changes_auto_save: "Changes are saved automatically when you toggle checkboxes."
-#    diligent_scribes: "Our Diligent Scribes:"
-#    powerful_archmages: "Our Powerful Archmages:"
-#    creative_artisans: "Our Creative Artisans:"
-#    brave_adventurers: "Our Brave Adventurers:"
-#    translating_diplomats: "Our Translating Diplomats:"
-#    helpful_ambassadors: "Our Helpful Ambassadors:"
+    diligent_scribes: "Unsere fleißgen Schreiber:"
+    powerful_archmages: "Unsere mächtigen Erzmagier:"
+    creative_artisans: "Unsere kreativen Handwerker:"
+    brave_adventurers: "Unsere mutigen Abenteurer:"
+    translating_diplomats: "Unsere übersetzenden Diplomaten:"
+    helpful_ambassadors: "Unsere hilfreichen Botschafter:"
 
   classes:
     archmage_title: "Erzmagier"
@@ -641,18 +756,18 @@ module.exports = nativeDescription: "Deutsch", englishDescription: "German", tra
     my_matches: "Meine Matches"
     simulate: "Simuliere"
 #    simulation_explanation: "By simulating games you can get your game ranked faster!"
-#    simulate_games: "Simulate Games!"
+    simulate_games: "Simuliere Spiele!"
 #    simulate_all: "RESET AND SIMULATE GAMES"
-#    games_simulated_by: "Games simulated by you:"
-#    games_simulated_for: "Games simulated for you:"
-#    games_simulated: "Games simulated"
-#    games_played: "Games played"
-#    ratio: "Ratio"
+    games_simulated_by: "Spiele die durch dich simuliert worden:"
+    games_simulated_for: "Spiele die für dich simuliert worden:"
+    games_simulated: "simulierte Spiele"
+    games_played: "gespielte Spiele"
+    ratio: "Ratio"
 #    leaderboard: "Leaderboard"
 #    battle_as: "Battle as "
-#    summary_your: "Your "
-#    summary_matches: "Matches - "
-#    summary_wins: " Wins, "
+    summary_your: "Deine "
+    summary_matches: "Matches - "
+    summary_wins: " Siege, "
 #    summary_losses: " Losses"
 #    rank_no_code: "No New Code to Rank"
 #    rank_my_game: "Rank My Game!"
@@ -674,27 +789,30 @@ module.exports = nativeDescription: "Deutsch", englishDescription: "German", tra
     simple_ai: "Einfache KI"
     warmup: "Aufwärmen"
     vs: "VS"
-#    friends_playing: "Friends Playing"
-#    log_in_for_friends: "Log in to play with your friends!"
-#    social_connect_blurb: "Connect and play against your friends!"
+    friends_playing: "spielende Freunde"
+    log_in_for_friends: "Melde dich an um mit deinen Freunden zu spielen!"
+    social_connect_blurb: "Verbinde und spiele gegen deine Freunde!"
 #    invite_friends_to_battle: "Invite your friends to join you in battle!"
 #    fight: "Fight!"
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
-#    tournament_ends: "Tournament ends"
-#    tournament_rules: "Tournament Rules"
+    tournament_ends: "Turnier endet"
+    tournament_ended: "Turnier beendet"
+    tournament_rules: "Turnier-Regeln"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+    rules: "Regeln"
+    winners: "Gewinner"
 
-#  ladder_prizes:
-#    title: "Tournament Prizes"
+  ladder_prizes:
+    title: "Turnierpreise"
 #    blurb_1: "These prizes will be awarded according to"
 #    blurb_2: "the tournament rules"
 #    blurb_3: "to the top human and ogre players."
-#    blurb_4: "Two teams means double the prizes!"
+    blurb_4: "Zwei Teams heißt die doppelte Anzahl zu gewinnender Preise!"
 #    blurb_5: "(There will be two first place winners, two second-place winners, etc.)"
-#    rank: "Rank"
-#    prizes: "Prizes"
+    rank: "Rang"
+    prizes: "Gewinne"
 #    total_value: "Total Value"
 #    in_cash: "in cash"
 #    custom_wizard: "Custom CodeCombat Wizard"
@@ -703,8 +821,8 @@ module.exports = nativeDescription: "Deutsch", englishDescription: "German", tra
 #    credits: "credits"
 #    one_month_coupon: "coupon: choose either Rails or HTML"
 #    one_month_discount: "discount, 30% off: choose either Rails or HTML"
-#    license: "license"
-#    oreilly: "ebook of your choice"
+    license: "Lizenz"
+    oreilly: "Ebook deiner Wahl"
 
 #  multiplayer_launch:
 #    introducing_dungeon_arena: "Introducing Dungeon Arena"
@@ -720,54 +838,55 @@ module.exports = nativeDescription: "Deutsch", englishDescription: "German", tra
 #    new_to_programming: ". New to programming? Hit our beginner campaign to skill up."
 #    so_ready: "I Am So Ready for This"
 
-#  loading_error:
-#    could_not_load: "Error loading from server"
-#    connection_failure: "Connection failed."
-#    unauthorized: "You need to be signed in. Do you have cookies disabled?"
-#    forbidden: "You do not have the permissions."
-#    not_found: "Not found."
-#    not_allowed: "Method not allowed."
-#    timeout: "Server timeout."
-#    conflict: "Resource conflict."
-#    bad_input: "Bad input."
-#    server_error: "Server error."
-#    unknown: "Unknown error."
+  loading_error:
+    could_not_load: "Fehler beim Laden vom Server"
+    connection_failure: "Verbindung fehlgeschlagen."
+    unauthorized: "Du musst angemeldet sein. Hast du Cookies ausgeschaltet?"
+    forbidden: "Sie haben nicht die nötigen Berechtigungen."
+    not_found: "Nicht gefunden."
+    not_allowed: "Methode nicht erlaubt."
+    timeout: "Server timeout."
+    conflict: "Resourcen Konflikt."
+    bad_input: "Falsche Eingabe."
+    server_error: "Server Fehler."
+    unknown: "Unbekannter Fehler."
 
-#  resources:
-#    your_sessions: "Your Sessions"
-#    level: "Level"
-#    social_network_apis: "Social Network APIs"
-#    facebook_status: "Facebook Status"
-#    facebook_friends: "Facebook Friends"
-#    facebook_friend_sessions: "Facebook Friend Sessions"
-#    gplus_friends: "G+ Friends"
-#    gplus_friend_sessions: "G+ Friend Sessions"
+  resources:
+    your_sessions: "Meine Sessions"
+    level: "Level"
+    social_network_apis: "Social Network APIs"
+    facebook_status: "Facebook Status"
+    facebook_friends: "Facebook Freunde"
+    facebook_friend_sessions: "Facebook Freunde Sessions"
+    gplus_friends: "G+ Freunde"
+    gplus_friend_sessions: "G+ Freunde Sessions"
 #    leaderboard: "Leaderboard"
-#    user_schema: "User Schema"
-#    user_profile: "User Profile"
+    user_schema: "Benutzerschema"
+    user_profile: "Benutzerprofil"
 #    patches: "Patches"
 #    patched_model: "Source Document"
-#    model: "Model"
-#    system: "System"
-#    component: "Component"
-#    components: "Components"
-#    thang: "Thang"
-#    thangs: "Thangs"
-#    level_session: "Your Session"
-#    opponent_session: "Opponent Session"
-#    article: "Article"
-#    user_names: "User Names"
-#    thang_names: "Thang Names"
-#    files: "Files"
-#    top_simulators: "Top Simulators"
+    model: "Model"
+    system: "System"
+    component: "Komponente"
+    components: "Komponenten"
+    thang: "Thang"
+    thangs: "Thangs"
+    level_session: "Deine Session"
+    opponent_session: "Gegner-Session"
+    article: "Artikel"
+    user_names: "Benutzernamen"
+    thang_names: "Thang Namen"
+    files: "Dateien"
+    top_simulators: "Top Simulatoren"
 #    source_document: "Source Document"
-#    document: "Document"
-#    sprite_sheet: "Sprite Sheet"
+    document: "Dokument"
+    sprite_sheet: "Sprite Sheet"
+    candidate_sessions: "Kandidat-Sessions"
 
-#  delta:
-#    added: "Added"
-#    modified: "Modified"
-#    deleted: "Deleted"
+  delta:
+    added: "hinzugefügt"
+    modified: "modifiziert"
+    deleted: "gelöscht"
 #    moved_index: "Moved Index"
 #    text_diff: "Text Diff"
 #    merge_conflict_with: "MERGE CONFLICT WITH"
diff --git a/app/locale/el.coffee b/app/locale/el.coffee
index 67975fce2..37bd3bd04 100644
--- a/app/locale/el.coffee
+++ b/app/locale/el.coffee
@@ -5,12 +5,12 @@ module.exports = nativeDescription: "ελληνικά", englishDescription: "Gre
     sending: "Αποστολή ..."
 #    send: "Send"
     cancel: "Ακύρωση"
-#    save: "Save"
-#    publish: "Publish"
-#    create: "Create"
-#    delay_1_sec: "1 second"
-#    delay_3_sec: "3 seconds"
-#    delay_5_sec: "5 seconds"
+    save: "Αποθήκευση"
+    publish: "Δημοσιοποίηση"
+    create: "Δημιουργία"
+    delay_1_sec: "1 δευτερόλεπτο"
+    delay_3_sec: "3 δευτερόλεπτα"
+    delay_5_sec: "5 δευτερόλεπτα"
 #    manual: "Manual"
 #    fork: "Fork"
 #    play: "Play"
@@ -19,13 +19,21 @@ module.exports = nativeDescription: "ελληνικά", englishDescription: "Gre
 #    unwatch: "Unwatch"
 #    submit_patch: "Submit Patch"
 
-#  units:
-#    second: "second"
-#    seconds: "seconds"
-#    minute: "minute"
-#    minutes: "minutes"
-#    hour: "hour"
-#    hours: "hours"
+  units:
+    second: "δευτερόλεπτο"
+    seconds: "δευτερόλεπτα"
+    minute: "λεπτό"
+    minutes: "λεπτά"
+    hour: "ώρα"
+    hours: "ώρες"
+    day: "μέρα"
+    days: "μέρες"
+    week: "εβδομάδα"
+    weeks: "εβδομάδες"
+    month: "μήνας"
+    months: "μήνες"
+    year: "χρόνος"
+    years: "χρόνια"
 
   modal:
     close: "Κλείσε"
@@ -35,12 +43,12 @@ module.exports = nativeDescription: "ελληνικά", englishDescription: "Gre
     page_not_found: "Η σελίδα δεν βρέθηκε"
 
   nav:
-#    play: "Levels"
+#    play: "Επίπεδα"
 #    community: "Community"
 #    editor: "Editor"
     blog: "Μπλόγκ"
     forum: "Φόρουμ"
-#    account: "Account"
+    account: "Λογαριασμός"
     admin: "Διαχειριστής"
     home: "Αρχική"
     contribute: "Συμβάλλω"
@@ -51,12 +59,12 @@ module.exports = nativeDescription: "ελληνικά", englishDescription: "Gre
 #    employers: "Employers"
 
 #  versions:
-#    save_version_title: "Save New Version"
+    save_version_title: "Αποθήκευση νέας έκδοσης"
 #    new_major_version: "New Major Version"
-#    cla_prefix: "To save changes, first you must agree to our"
+    cla_prefix: "Για να αποθηκεύσετε, πρώτα πρέπει να συμφωνήσετε στα"
 #    cla_url: "CLA"
 #    cla_suffix: "."
-#    cla_agree: "I AGREE"
+    cla_agree: "ΣΥΜΦΩΝΩ"
 
   login:
     sign_up: "Δημιούργησε Λογαριασμό"
@@ -67,31 +75,31 @@ module.exports = nativeDescription: "ελληνικά", englishDescription: "Gre
 
   recover:
     recover_account_title: "Κάντε ανάκτηση του λογαριασμού σας"
-#    send_password: "Send Recovery Password"
+    send_password: "Αποστολή κωδικού ανάκτησης"
 
   signup:
-#    create_account_title: "Create Account to Save Progress"
+    create_account_title: "Δημιουργία λογαριασμού για αποθήκευση της προόδου"
     description: "Είναι δωρεάν. Απλώς χρειάζεται να έχεις έναν λογαριασμό και θα είσαι έτοιμος να παίξεις:"
     email_announcements: "Λαμβάνετε ανακοινώσεις μέσω e-mail"
     coppa: "13+ ή Εκτός Αμερικής "
-    coppa_why: "(Γιάτι?)"
+    coppa_why: "(Γιατί;)"
     creating: "Δημιουργία λογαριασμού"
-    sign_up: "Εγγραγή"
-    log_in: "Σύνδεση με κώδικο"
-#    social_signup: "Or, you can sign up through Facebook or G+:"
+    sign_up: "Εγγραφή"
+    log_in: "Σύνδεση με κωδικό"
+    social_signup: "Ή, μπορείς να συνδεθείς μέσω του Facebook ή του G+:"
 #    required: "You need to log in before you can go that way."
 
   home:
     slogan: "Μάθε να προγραμμάτιζεις με JavaScript μέσω ενός παιχνιδιού"
-    no_ie: "Το CodeCombat δεν παίζει με το Internet Explorer 9 ή κάποια παλαιότερη έκδοση.Συγνώμη!"
+    no_ie: "Το CodeCombat δεν παίζει με το Internet Explorer 9 ή κάποια παλαιότερη έκδοση. Συγνώμη!"
     no_mobile: "Το CodeCombat δεν σχεδιάστηκε για κινητά και μπορεί να μην δουλεύει!"
     play: "Παίξε"
-#    old_browser: "Uh oh, your browser is too old to run CodeCombat. Sorry!"
-#    old_browser_suffix: "You can try anyway, but it probably won't work."
-#    campaign: "Campaign"
-#    for_beginners: "For Beginners"
+    old_browser: "Ωχ, ο περιηγητής σας είναι πολύ παλιός για να τρέξετε το CodeCombat. Συγνώμη!"
+    old_browser_suffix: "Μπορείτε να δοκιμάσετε, αλλά πιθανών να μην λειτουργήσει."
+    campaign: "Εκστρατεία"
+    for_beginners: "Για αρχάριους"
 #    multiplayer: "Multiplayer"
-#    for_developers: "For Developers"
+    for_developers: "Για προγραμματιστές"
 
   play:
     choose_your_level: "Διάλεξε την πίστα σου"
@@ -131,21 +139,21 @@ module.exports = nativeDescription: "ελληνικά", englishDescription: "Gre
     learn_more: "Μάθετε περισσότερα σχετικά με το να είστε ένας Διπλωμάτης"
     subscribe_as_diplomat: "Εγγραφή ως Διπλωμάτης"
 
-#  wizard_settings:
-#    title: "Wizard Settings"
-#    customize_avatar: "Customize Your Avatar"
-#    active: "Active"
-#    color: "Color"
-#    group: "Group"
-#    clothes: "Clothes"
+  wizard_settings:
+    title: "Ρυθμίσεις Μάγου"
+    customize_avatar: "Διαμόρφωσε το  Avatar σου"
+    active: "Ενεργό"
+    color: "Χρώμα"
+    group: "Ομάδα"
+    clothes: "Ρούχα"
 #    trim: "Trim"
-#    cloud: "Cloud"
-#    team: "Team"
-#    spell: "Spell"
-#    boots: "Boots"
-#    hue: "Hue"
-#    saturation: "Saturation"
-#    lightness: "Lightness"
+    cloud: "Σύννεφο"
+#    team: "Ομάδα"
+    spell: "Ξόρκι"
+    boots: "Μπότες"
+    hue: "Απόχρωση"
+    saturation: "Κορεσμός"
+    lightness: "Φωτεινότητα"
 
   account_settings:
     title: "Ρυθμίσεις λογαριασμού"
@@ -153,7 +161,7 @@ module.exports = nativeDescription: "ελληνικά", englishDescription: "Gre
     autosave: "Οι ρυθμίσεις αποθηκεύονται αυτόματα"
     me_tab: "Εγώ"
     picture_tab: "Φωτογραφία"
-#    upload_picture: "Upload a picture"
+    upload_picture: "Ανέβασμα φωτογραφίας"
     wizard_tab: "Μάγος"
     password_tab: "Κωδικός"
     emails_tab: "Emails"
@@ -164,7 +172,7 @@ module.exports = nativeDescription: "ελληνικά", englishDescription: "Gre
     email_subscriptions: "Συνδρομές Email"
     email_announcements: "Ανακοινώσεις"
     email_announcements_description: "Λάβετε emails για τα τελευταία νέα και τις εξελίξεις του CodeCombat."
-#    email_notifications: "Notifications"
+    email_notifications: "Ειδοποιήσεις"
 #    email_notifications_summary: "Controls for personalized, automatic email notifications related to your CodeCombat activity."
 #    email_any_notes: "Any Notifications"
 #    email_any_notes_description: "Disable to stop all activity notification emails."
@@ -185,25 +193,126 @@ module.exports = nativeDescription: "ελληνικά", englishDescription: "Gre
 #    view_profile: "View Your Profile"
 
   account_profile:
-    edit_settings: "Επεξεργασία ρυθμίσεων"
+    settings: "Ρυθμίσεις"
+    edit_profile: "Επεξεργασία προφίλ"
+    done_editing: "Τέλος επεξεργασίας"
     profile_for_prefix: "Προφίλ για "
 #    profile_for_suffix: ""
-#    approved: "Approved"
-#    not_approved: "Not Approved"
-#    looking_for: "Looking for:"
-#    last_updated: "Last updated:"
-#    contact: "Contact"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
+    looking_for: "Αναζήτηση για:"
+    last_updated: "Τελευταία ενημερώθηκε:"
+    contact: "Επικοινωνία"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+    complete: "Ολοκληρωμένο"
+    next: "Επόμενο"
+    next_city: "πόλη;"
+    next_country: "επέλεξε τη χώρα σου."
+    next_name: "όνομα;"
+    next_short_description: "γράψε μία μικρή περιγραφή."
+    next_long_description: "περιέγραψε την επιθυμητή σου θέση."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
 #    work_experience: "Work Experience"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
 #    education: "Education"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
 #    our_notes: "Our Notes"
 #    projects: "Projects"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
 #  employers:
-#    want_to_hire_our_players: "Want to hire expert CodeCombat players?"
+#    want_to_hire_our_players: "Hire CodeCombat Players"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-#    candidates_count_prefix: "We currently have "
-#    candidates_count_many: "many"
-#    candidates_count_suffix: "highly skilled and vetted developers looking for work."
 #    candidate_name: "Name"
 #    candidate_location: "Location"
 #    candidate_looking_for: "Looking For"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "ελληνικά", englishDescription: "Gre
 #    candidate_top_skills: "Top Skills"
 #    candidate_years_experience: "Yrs Exp"
 #    candidate_last_updated: "Last Updated"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
   play_level:
     done: "Έτοιμο"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "ελληνικά", englishDescription: "Gre
 #    av_entities_sub_title: "Entities"
 #    av_entities_users_url: "Users"
 #    av_entities_active_instances_url: "Active Instances"
+#    av_entities_employer_list_url: "Employer List"
 #    av_other_sub_title: "Other"
 #    av_other_debug_base_url: "Base (for debugging base.jade)"
 #    u_title: "User List"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "ελληνικά", englishDescription: "Gre
 #    thang_description: "Build units, defining their default logic, graphics and audio. Currently only supports importing Flash exported vector graphics."
 #    level_title: "Level Editor"
 #    level_description: "Includes the tools for scripting, uploading audio, and constructing custom logic to create all sorts of levels. Everything we use ourselves!"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
 #    contact_us: "Contact us!"
 #    hipchat_prefix: "You can also find us in our"
@@ -405,44 +517,47 @@ module.exports = nativeDescription: "ελληνικά", englishDescription: "Gre
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
 #    article_search_title: "Search Articles Here"
 #    thang_search_title: "Search Thang Types Here"
 #    level_search_title: "Search Levels Here"
+#    achievement_search_title: "Search Achievements"
 #    read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
 #  article:
 #    edit_btn_preview: "Preview"
 #    edit_article_title: "Edit Article"
 
-#  general:
-#    and: "and"
-#    name: "Name"
+  general:
+    and: "και"
+    name: "Όνομα"
 #    body: "Body"
-#    version: "Version"
+    version: "Έκδοση"
 #    commit_msg: "Commit Message"
 #    version_history: "Version History"
 #    version_history_for: "Version History for: "
-#    result: "Result"
-#    results: "Results"
-#    description: "Description"
-#    or: "or"
-#    subject: "Subject"
-#    email: "Email"
-#    password: "Password"
-#    message: "Message"
+    result: "Αποτέλεσμα"
+    results: "Αποτελέσματα"
+    description: "Περιγραφή"
+    or: "ή"
+    subject: "Θέμα"
+    email: "Email"
+    password: "Κωδικός"
+    message: "Μήνυμα"
 #    code: "Code"
 #    ladder: "Ladder"
-#    when: "When"
-#    opponent: "Opponent"
-#    rank: "Rank"
-#    score: "Score"
-#    win: "Win"
-#    loss: "Loss"
-#    tie: "Tie"
-#    easy: "Easy"
-#    medium: "Medium"
-#    hard: "Hard"
-#    player: "Player"
+    when: "Όταν"
+    opponent: "Αντίπαλος"
+    rank: "Κατηγορία"
+    score: "Αποτέλεσμα"
+    win: "Νίκη"
+    loss: "Ήττα"
+    tie: "Ισοπαλία"
+    easy: "Εύκολο"
+    medium: "Μέτριο"
+    hard: "Δύσκολο"
+    player: "Παίκτης"
 
 #  about:
 #    who_is_codecombat: "Who is CodeCombat?"
@@ -620,21 +735,21 @@ module.exports = nativeDescription: "ελληνικά", englishDescription: "Gre
 #    translating_diplomats: "Our Translating Diplomats:"
 #    helpful_ambassadors: "Our Helpful Ambassadors:"
 
-#  classes:
-#    archmage_title: "Archmage"
-#    archmage_title_description: "(Coder)"
-#    artisan_title: "Artisan"
-#    artisan_title_description: "(Level Builder)"
-#    adventurer_title: "Adventurer"
-#    adventurer_title_description: "(Level Playtester)"
-#    scribe_title: "Scribe"
-#    scribe_title_description: "(Article Editor)"
-#    diplomat_title: "Diplomat"
-#    diplomat_title_description: "(Translator)"
-#    ambassador_title: "Ambassador"
-#    ambassador_title_description: "(Support)"
-#    counselor_title: "Counselor"
-#    counselor_title_description: "(Expert/Teacher)"
+  classes:
+    archmage_title: "Αρχιμάγος"
+    archmage_title_description: "(Προγραμματιστής)"
+    artisan_title: "Τεχνίτης"
+    artisan_title_description: "(Δημιουργός επιπέδων)"
+    adventurer_title: "Εξερευνητής"
+    adventurer_title_description: "(Δοκιματής επιπέδων)"
+    scribe_title: "Γραφέας"
+    scribe_title_description: "(Συντάκτης άρθρων)"
+    diplomat_title: "Διπλωμάτης"
+    diplomat_title_description: "(Μεταφραστής)"
+    ambassador_title: "Πρεσβευτής"
+    ambassador_title_description: "(Υποστήριξη)"
+    counselor_title: "Σύμβουλος"
+    counselor_title_description: "(Ειδικός/Δάσκαλος)"
 
 #  ladder:
 #    please_login: "Please log in first before playing a ladder game."
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "ελληνικά", englishDescription: "Gre
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "ελληνικά", englishDescription: "Gre
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/en-AU.coffee b/app/locale/en-AU.coffee
index a58539b9e..6ff6b88fa 100644
--- a/app/locale/en-AU.coffee
+++ b/app/locale/en-AU.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "English (AU)", englishDescription: "English
 #    minutes: "minutes"
 #    hour: "hour"
 #    hours: "hours"
+#    day: "day"
+#    days: "days"
+#    week: "week"
+#    weeks: "weeks"
+#    month: "month"
+#    months: "months"
+#    year: "year"
+#    years: "years"
 
 #  modal:
 #    close: "Close"
@@ -185,25 +193,126 @@ module.exports = nativeDescription: "English (AU)", englishDescription: "English
 #    view_profile: "View Your Profile"
 
 #  account_profile:
-#    edit_settings: "Edit Settings"
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
 #    profile_for_prefix: "Profile for "
 #    profile_for_suffix: ""
-#    approved: "Approved"
-#    not_approved: "Not Approved"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
 #    looking_for: "Looking for:"
 #    last_updated: "Last updated:"
 #    contact: "Contact"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+#    next_city: "city?"
+#    next_country: "pick your country."
+#    next_name: "name?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
 #    work_experience: "Work Experience"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
 #    education: "Education"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
 #    our_notes: "Our Notes"
 #    projects: "Projects"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
 #  employers:
-#    want_to_hire_our_players: "Want to hire expert CodeCombat players?"
+#    want_to_hire_our_players: "Hire CodeCombat Players"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-#    candidates_count_prefix: "We currently have "
-#    candidates_count_many: "many"
-#    candidates_count_suffix: "highly skilled and vetted developers looking for work."
 #    candidate_name: "Name"
 #    candidate_location: "Location"
 #    candidate_looking_for: "Looking For"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "English (AU)", englishDescription: "English
 #    candidate_top_skills: "Top Skills"
 #    candidate_years_experience: "Yrs Exp"
 #    candidate_last_updated: "Last Updated"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
 #  play_level:
 #    done: "Done"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "English (AU)", englishDescription: "English
 #    av_entities_sub_title: "Entities"
 #    av_entities_users_url: "Users"
 #    av_entities_active_instances_url: "Active Instances"
+#    av_entities_employer_list_url: "Employer List"
 #    av_other_sub_title: "Other"
 #    av_other_debug_base_url: "Base (for debugging base.jade)"
 #    u_title: "User List"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "English (AU)", englishDescription: "English
 #    thang_description: "Build units, defining their default logic, graphics and audio. Currently only supports importing Flash exported vector graphics."
 #    level_title: "Level Editor"
 #    level_description: "Includes the tools for scripting, uploading audio, and constructing custom logic to create all sorts of levels. Everything we use ourselves!"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
 #    contact_us: "Contact us!"
 #    hipchat_prefix: "You can also find us in our"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "English (AU)", englishDescription: "English
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
 #    article_search_title: "Search Articles Here"
 #    thang_search_title: "Search Thang Types Here"
 #    level_search_title: "Search Levels Here"
+#    achievement_search_title: "Search Achievements"
 #    read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
 #  article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "English (AU)", englishDescription: "English
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "English (AU)", englishDescription: "English
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/en-GB.coffee b/app/locale/en-GB.coffee
index b759c704f..e6b48b373 100644
--- a/app/locale/en-GB.coffee
+++ b/app/locale/en-GB.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "English (UK)", englishDescription: "English
 #    minutes: "minutes"
 #    hour: "hour"
 #    hours: "hours"
+#    day: "day"
+#    days: "days"
+#    week: "week"
+#    weeks: "weeks"
+#    month: "month"
+#    months: "months"
+#    year: "year"
+#    years: "years"
 
 #  modal:
 #    close: "Close"
@@ -185,25 +193,126 @@ module.exports = nativeDescription: "English (UK)", englishDescription: "English
 #    view_profile: "View Your Profile"
 
 #  account_profile:
-#    edit_settings: "Edit Settings"
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
 #    profile_for_prefix: "Profile for "
 #    profile_for_suffix: ""
-#    approved: "Approved"
-#    not_approved: "Not Approved"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
 #    looking_for: "Looking for:"
 #    last_updated: "Last updated:"
 #    contact: "Contact"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+#    next_city: "city?"
+#    next_country: "pick your country."
+#    next_name: "name?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
 #    work_experience: "Work Experience"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
 #    education: "Education"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
 #    our_notes: "Our Notes"
 #    projects: "Projects"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
 #  employers:
-#    want_to_hire_our_players: "Want to hire expert CodeCombat players?"
+#    want_to_hire_our_players: "Hire CodeCombat Players"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-#    candidates_count_prefix: "We currently have "
-#    candidates_count_many: "many"
-#    candidates_count_suffix: "highly skilled and vetted developers looking for work."
 #    candidate_name: "Name"
 #    candidate_location: "Location"
 #    candidate_looking_for: "Looking For"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "English (UK)", englishDescription: "English
 #    candidate_top_skills: "Top Skills"
 #    candidate_years_experience: "Yrs Exp"
 #    candidate_last_updated: "Last Updated"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
   play_level:
 #    done: "Done"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "English (UK)", englishDescription: "English
 #    av_entities_sub_title: "Entities"
 #    av_entities_users_url: "Users"
 #    av_entities_active_instances_url: "Active Instances"
+#    av_entities_employer_list_url: "Employer List"
 #    av_other_sub_title: "Other"
 #    av_other_debug_base_url: "Base (for debugging base.jade)"
 #    u_title: "User List"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "English (UK)", englishDescription: "English
 #    thang_description: "Build units, defining their default logic, graphics and audio. Currently only supports importing Flash exported vector graphics."
 #    level_title: "Level Editor"
 #    level_description: "Includes the tools for scripting, uploading audio, and constructing custom logic to create all sorts of levels. Everything we use ourselves!"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
 #    contact_us: "Contact us!"
 #    hipchat_prefix: "You can also find us in our"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "English (UK)", englishDescription: "English
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
 #    article_search_title: "Search Articles Here"
 #    thang_search_title: "Search Thang Types Here"
 #    level_search_title: "Search Levels Here"
+#    achievement_search_title: "Search Achievements"
 #    read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
 #  article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "English (UK)", englishDescription: "English
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "English (UK)", englishDescription: "English
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/en-US.coffee b/app/locale/en-US.coffee
index 3034bc341..362e522ed 100644
--- a/app/locale/en-US.coffee
+++ b/app/locale/en-US.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "English (US)", englishDescription: "English
 #    minutes: "minutes"
 #    hour: "hour"
 #    hours: "hours"
+#    day: "day"
+#    days: "days"
+#    week: "week"
+#    weeks: "weeks"
+#    month: "month"
+#    months: "months"
+#    year: "year"
+#    years: "years"
 
 #  modal:
 #    close: "Close"
@@ -185,25 +193,126 @@ module.exports = nativeDescription: "English (US)", englishDescription: "English
 #    view_profile: "View Your Profile"
 
 #  account_profile:
-#    edit_settings: "Edit Settings"
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
 #    profile_for_prefix: "Profile for "
 #    profile_for_suffix: ""
-#    approved: "Approved"
-#    not_approved: "Not Approved"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
 #    looking_for: "Looking for:"
 #    last_updated: "Last updated:"
 #    contact: "Contact"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+#    next_city: "city?"
+#    next_country: "pick your country."
+#    next_name: "name?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
 #    work_experience: "Work Experience"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
 #    education: "Education"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
 #    our_notes: "Our Notes"
 #    projects: "Projects"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
 #  employers:
-#    want_to_hire_our_players: "Want to hire expert CodeCombat players?"
+#    want_to_hire_our_players: "Hire CodeCombat Players"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-#    candidates_count_prefix: "We currently have "
-#    candidates_count_many: "many"
-#    candidates_count_suffix: "highly skilled and vetted developers looking for work."
 #    candidate_name: "Name"
 #    candidate_location: "Location"
 #    candidate_looking_for: "Looking For"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "English (US)", englishDescription: "English
 #    candidate_top_skills: "Top Skills"
 #    candidate_years_experience: "Yrs Exp"
 #    candidate_last_updated: "Last Updated"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
 #  play_level:
 #    done: "Done"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "English (US)", englishDescription: "English
 #    av_entities_sub_title: "Entities"
 #    av_entities_users_url: "Users"
 #    av_entities_active_instances_url: "Active Instances"
+#    av_entities_employer_list_url: "Employer List"
 #    av_other_sub_title: "Other"
 #    av_other_debug_base_url: "Base (for debugging base.jade)"
 #    u_title: "User List"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "English (US)", englishDescription: "English
 #    thang_description: "Build units, defining their default logic, graphics and audio. Currently only supports importing Flash exported vector graphics."
 #    level_title: "Level Editor"
 #    level_description: "Includes the tools for scripting, uploading audio, and constructing custom logic to create all sorts of levels. Everything we use ourselves!"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
 #    contact_us: "Contact us!"
 #    hipchat_prefix: "You can also find us in our"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "English (US)", englishDescription: "English
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
 #    article_search_title: "Search Articles Here"
 #    thang_search_title: "Search Thang Types Here"
 #    level_search_title: "Search Levels Here"
+#    achievement_search_title: "Search Achievements"
 #    read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
 #  article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "English (US)", englishDescription: "English
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "English (US)", englishDescription: "English
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/en.coffee b/app/locale/en.coffee
index ed625d57e..7094f735e 100644
--- a/app/locale/en.coffee
+++ b/app/locale/en.coffee
@@ -26,6 +26,14 @@
     minutes: "minutes"
     hour: "hour"
     hours: "hours"
+    day: "day"
+    days: "days"
+    week: "week"
+    weeks: "weeks"
+    month: "month"
+    months: "months"
+    year: "year"
+    years: "years"
 
   modal:
     close: "Close"
@@ -82,7 +90,7 @@
     required: "You need to log in before you can go that way."
 
   home:
-    slogan: "Learn to Code JavaScript by Playing a Game"
+    slogan: "Learn to Code by Playing a Game"
     no_ie: "CodeCombat does not run in Internet Explorer 9 or older. Sorry!"
     no_mobile: "CodeCombat wasn't designed for mobile devices and may not work!"
     play: "Play"
@@ -185,25 +193,131 @@
     view_profile: "View Your Profile"
 
   account_profile:
-    edit_settings: "Edit Settings"
+    settings: "Settings"
+    edit_profile: "Edit Profile"
+    done_editing: "Done Editing"
     profile_for_prefix: "Profile for "
     profile_for_suffix: ""
-    approved: "Approved"
-    not_approved: "Not Approved"
+    featured: "Featured"
+    not_featured: "Not Featured"
     looking_for: "Looking for:"
     last_updated: "Last updated:"
     contact: "Contact"
+    active: "Looking for interview offers now"
+    inactive: "Not looking for offers right now"
+    complete: "complete"
+    next: "Next"
+    next_city: "city?"
+    next_country: "pick your country."
+    next_name: "name?"
+    next_short_description: "write a short description."
+    next_long_description: "describe your desired position."
+    next_skills: "list at least five skills."
+    next_work: "chronicle your work history."
+    next_education: "recount your educational ordeals."
+    next_projects: "show off up to three projects you've worked on."
+    next_links: "add any personal or social links."
+    next_photo: "add an optional professional photo."
+    next_active: "mark yourself open to offers to show up in searches."
+    example_blog: "Blog"
+    example_personal_site: "Personal Site"
+    links_header: "Personal Links"
+    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+    links_name: "Link Name"
+    links_name_help: "What are you linking to?"
+    links_link_blurb: "Link URL"
+    basics_header: "Update basic info"
+    basics_active: "Open to Offers"
+    basics_active_help: "Want interview offers right now?"
+    basics_job_title: "Desired Job Title"
+    basics_job_title_help: "What role are you looking for?"
+    basics_city: "City"
+    basics_city_help: "City you want to work in (or live in now)."
+    basics_country: "Country"
+    basics_country_help: "Country you want to work in (or live in now)."
+    basics_visa: "US Work Status"
+    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+    basics_looking_for: "Looking For"
+    basics_looking_for_full_time: "Full-time"
+    basics_looking_for_part_time: "Part-time"
+    basics_looking_for_remote: "Remote"
+    basics_looking_for_contracting: "Contracting"
+    basics_looking_for_internship: "Internship"
+    basics_looking_for_help: "What kind of developer position do you want?"
+    name_header: "Fill in your name"
+    name_anonymous: "Anonymous Developer"
+    name_help: "Name you want employers to see, like 'Nick Winter'."
+    short_description_header: "Write a short description of yourself"
+    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+    short_description: "Tagline"
+    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+    skills_header: "Skills"
+    skills_help: "Tag relevant developer skills in order of proficiency."
+    long_description_header: "Describe your desired position"
+    long_description_blurb: "Tell employers how awesome you are and what role you want."
+    long_description: "Self Description"
+    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
     work_experience: "Work Experience"
+    work_header: "Chronicle your work history"
+    work_years: "Years of Experience"
+    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+    work_blurb: "List your relevant work experience, most recent first."
+    work_employer: "Employer"
+    work_employer_help: "Name of your employer."
+    work_role: "Job Title"
+    work_role_help: "What was your job title or role?"
+    work_duration: "Duration"
+    work_duration_help: "When did you hold this gig?"
+    work_description: "Description"
+    work_description_help: "What did you do there? (140 chars; optional)"
     education: "Education"
+    education_header: "Recount your academic ordeals"
+    education_blurb: "List your academic ordeals."
+    education_school: "School"
+    education_school_help: "Name of your school."
+    education_degree: "Degree"
+    education_degree_help: "What was your degree and field of study?"
+    education_duration: "Dates"
+    education_duration_help: "When?"
+    education_description: "Description"
+    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
     our_notes: "Our Notes"
+    remarks: "Remarks"
     projects: "Projects"
+    projects_header: "Add 3 projects"
+    projects_header_2: "Projects (Top 3)"
+    projects_blurb: "Highlight your projects to amaze employers."
+    project_name: "Project Name"
+    project_name_help: "What was the project called?"
+    project_description: "Description"
+    project_description_help: "Briefly describe the project."
+    project_picture: "Picture"
+    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+    project_link: "Link"
+    project_link_help: "Link to the project."
+    player_code: "Player Code"
 
   employers:
-    want_to_hire_our_players: "Want to hire expert CodeCombat players?"
+    want_to_hire_our_players: "Hire CodeCombat Players"
+    what: "What is CodeCombat?"
+    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+    who: "Who Are the Players?"
+    who_blurb: "CodeCombateers are CTOs, VPs of Engineering, and graduates of top 20 engineering schools. Our advanced players enjoy playing with difficult code and solving problems."
+    how: "How Do We Find Developers?"
+    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+    why: "Why Hire Through Us?"
+    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+    cost: "How much do we charge?"
+    cost_blurb: "We charge 15% of first year's salary and offer a 100% money back guarantee for 90 days. We don't charge for candidates who are already actively being interviewed at your company."
+    response: "What's the response rate?"
+    response_blurb: "Almost every developer you contact on CodeCombat will respond to inquires whether or not they want to interivew. If you would like help finding a candidate for your role, we can make recommendations."
+    why_blurb_2: "looking for work"
+    why_blurb_3: ", has "
+    why_blurb_4: "demonstrated top notch technical skills"
+    why_blurb_5: ", and has been "
+    why_blurb_6: "personally screened by us"
+    why_blurb_7: ". Stop screening and start hiring."
     see_candidates: "Click here to see our candidates"
-    candidates_count_prefix: "We currently have "
-    candidates_count_many: "many"
-    candidates_count_suffix: "highly skilled and vetted developers looking for work."
     candidate_name: "Name"
     candidate_location: "Location"
     candidate_looking_for: "Looking For"
@@ -211,8 +325,10 @@
     candidate_top_skills: "Top Skills"
     candidate_years_experience: "Yrs Exp"
     candidate_last_updated: "Last Updated"
-    candidate_approved: "Us?"
-    candidate_active: "Them?"
+    candidate_who: "Who"
+    featured_developers: "Featured Developers"
+    other_developers: "Other Developers"
+    inactive_developers: "Inactive Developers"
 
   play_level:
     done: "Done"
@@ -272,6 +388,8 @@
     editor_config_keybindings_label: "Key Bindings"
     editor_config_keybindings_default: "Default (Ace)"
     editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
+    editor_config_livecompletion_label: "Live Autocompletion"
+    editor_config_livecompletion_description: "Displays autocomplete suggestions while typing."
     editor_config_invisibles_label: "Show Invisibles"
     editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
     editor_config_indentguides_label: "Show Indent Guides"
@@ -308,6 +426,7 @@
     tip_impossible: "It always seems impossible until it's done. - Nelson Mandela"
     tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds"
     tip_first_language: "The most disastrous thing that you can ever learn is your first programming language. - Alan Kay"
+    tip_hardware_problem: "Q: How many programmers does it take to change a light bulb?  A: None, it's a hardware problem."
     time_current: "Now:"
     time_total: "Max:"
     time_goto: "Go to:"
@@ -338,6 +457,7 @@
     av_entities_sub_title: "Entities"
     av_entities_users_url: "Users"
     av_entities_active_instances_url: "Active Instances"
+    av_entities_employer_list_url: "Employer List"
     av_other_sub_title: "Other"
     av_other_debug_base_url: "Base (for debugging base.jade)"
     u_title: "User List"
@@ -360,6 +480,7 @@
     thang_description: "Build units, defining their default logic, graphics and audio. Currently only supports importing Flash exported vector graphics."
     level_title: "Level Editor"
     level_description: "Includes the tools for scripting, uploading audio, and constructing custom logic to create all sorts of levels. Everything we use ourselves!"
+    achievement_title: "Achievement Editor"
     got_questions: "Questions about using the CodeCombat editors?"
     contact_us: "Contact us!"
     hipchat_prefix: "You can also find us in our"
@@ -405,9 +526,12 @@
     new_article_title_login: "Log In to Create a New Article"
     new_thang_title_login: "Log In to Create a New Thang Type"
     new_level_title_login: "Log In to Create a New Level"
+    new_achievement_title: "Create a New Achievement"
+    new_achievement_title_login: "Log In to Create a New Achievement"
     article_search_title: "Search Articles Here"
     thang_search_title: "Search Thang Types Here"
     level_search_title: "Search Levels Here"
+    achievement_search_title: "Search Achievements"
     read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
   article:
@@ -682,9 +806,12 @@
     watch_victory: "Watch your victory"
     defeat_the: "Defeat the"
     tournament_ends: "Tournament ends"
+    tournament_ended: "Tournament ended"
     tournament_rules: "Tournament Rules"
     tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
     tournament_blurb_blog: "on our blog"
+    rules: "Rules"
+    winners: "Winners"
 
   ladder_prizes:
     title: "Tournament Prizes"
@@ -706,7 +833,6 @@
     license: "license"
     oreilly: "ebook of your choice"
 
-
   multiplayer_launch:
     introducing_dungeon_arena: "Introducing Dungeon Arena"
     new_way: "The new way to compete with code."
@@ -762,8 +888,11 @@
     files: "Files"
     top_simulators: "Top Simulators"
     source_document: "Source Document"
-    document: "Document" # note to diplomats: not a physical document, a document in MongoDB, ie a record in a database
+    document: "Document"
     sprite_sheet: "Sprite Sheet"
+    candidate_sessions: "Candidate Sessions"
+    user_remark: "User Remark"
+    versions: "Versions"
 
   delta:
     added: "Added"
diff --git a/app/locale/es-419.coffee b/app/locale/es-419.coffee
index 63299fc7b..a4fa878ec 100644
--- a/app/locale/es-419.coffee
+++ b/app/locale/es-419.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "español (América Latina)", englishDescrip
     minutes: "minutos"
     hour: "hora"
     hours: "horas"
+#    day: "day"
+#    days: "days"
+#    week: "week"
+#    weeks: "weeks"
+#    month: "month"
+#    months: "months"
+#    year: "year"
+#    years: "years"
 
   modal:
     close: "Cerrar"
@@ -82,7 +90,7 @@ module.exports = nativeDescription: "español (América Latina)", englishDescrip
 #    required: "You need to log in before you can go that way."
 
   home:
-    slogan: "Aprende a programar en JavaScript jugando"
+    slogan: "Aprende a programar jugando"
     no_ie: "¡Lo sentimos! CodeCombat no funciona en Internet Explorer 9 o versiones anteriores."
     no_mobile: "¡CodeCombat no fue diseñado para dispositivos móviles y quizás no funcione!"
     play: "Jugar"
@@ -185,25 +193,126 @@ module.exports = nativeDescription: "español (América Latina)", englishDescrip
 #    view_profile: "View Your Profile"
 
   account_profile:
-    edit_settings: "Editar Configuración"
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
     profile_for_prefix: "Perfil para "
     profile_for_suffix: ""
-    approved: "Aprobado"
-    not_approved: "No Aprobado"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
     looking_for: "Buscando:"
     last_updated: "Última Actualización:"
     contact: "Contacto"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+#    next_city: "city?"
+#    next_country: "pick your country."
+#    next_name: "name?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
     work_experience: "Experiencia de Trabajo"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
     education: "Educación"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
     our_notes: "Nuestras Notas"
     projects: "Proyectos"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
   employers:
     want_to_hire_our_players: "¿Quiere contratar a nuestros jugadores expertos de CodeCombat?"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-    candidates_count_prefix: "Actualmente tenemos "
-    candidates_count_many: "muchos"
-    candidates_count_suffix: "desarrolladores altamente cualificados y examinados en busca de trabajo."
     candidate_name: "Nombre"
     candidate_location: "Ubicación"
     candidate_looking_for: "Buscando"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "español (América Latina)", englishDescrip
     candidate_top_skills: "Mejores Habilidades"
     candidate_years_experience: "Años de Exp"
     candidate_last_updated: "Última Actualización"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
   play_level:
     done: "Listo"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "español (América Latina)", englishDescrip
     av_entities_sub_title: "Entidades"
     av_entities_users_url: "Usuarios"
     av_entities_active_instances_url: "Instancias Activas"
+#    av_entities_employer_list_url: "Employer List"
     av_other_sub_title: "Otro"
     av_other_debug_base_url: "Base (para depurar base.jade)"
     u_title: "Lista de Usuarios"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "español (América Latina)", englishDescrip
 #    thang_description: "Build units, defining their default logic, graphics and audio. Currently only supports importing Flash exported vector graphics."
 #    level_title: "Level Editor"
 #    level_description: "Includes the tools for scripting, uploading audio, and constructing custom logic to create all sorts of levels. Everything we use ourselves!"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
 #    contact_us: "Contact us!"
 #    hipchat_prefix: "You can also find us in our"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "español (América Latina)", englishDescrip
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
 #    article_search_title: "Search Articles Here"
 #    thang_search_title: "Search Thang Types Here"
 #    level_search_title: "Search Levels Here"
+#    achievement_search_title: "Search Achievements"
 #    read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
   article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "español (América Latina)", englishDescrip
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "español (América Latina)", englishDescrip
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/es-ES.coffee b/app/locale/es-ES.coffee
index e3060e31d..2065b88a4 100644
--- a/app/locale/es-ES.coffee
+++ b/app/locale/es-ES.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "español (ES)", englishDescription: "Spanis
     minutes: "minutos"
     hour: "hora"
     hours: "horas"
+    day: "día"
+    days: "días"
+    week: "semana"
+    weeks: "semanas"
+    month: "mes"
+    months: "meses"
+    year: "año"
+    years: "años"
 
   modal:
     close: "Cerrar"
@@ -47,8 +55,8 @@ module.exports = nativeDescription: "español (ES)", englishDescription: "Spanis
     legal: "Legalidad"
     about: "Sobre nosotros"
     contact: "Contacta"
-    twitter_follow: "Síguenos"
-    employers: "Empleadores"
+    twitter_follow: "Síguenos en Twitter"
+    employers: "Empleados"
 
   versions:
     save_version_title: "Guardar nueva versión"
@@ -66,28 +74,28 @@ module.exports = nativeDescription: "español (ES)", englishDescription: "Spanis
     recover: "recuperar cuenta"
 
   recover:
-    recover_account_title: "recuperar cuenta"
+    recover_account_title: "Recuperar Cuenta"
     send_password: "Enviar recuperación de contraseña"
 
   signup:
     create_account_title: "Crea una cuenta para guardar tu progreso"
-    description: "Es gratis. Solo necesitamos un par de cosas y listo para comenzar!"
+    description: "¡Es gratis!. ¡Solo necesitamos un par de cosas y listo para comenzar!"
     email_announcements: "Recibir noticias por correo electrónico"
     coppa: "Soy mayor de 13 o de fuera de los Estados Unidos"
     coppa_why: "(¿Por qué?)"
     creating: "Creando cuenta..."
     sign_up: "Registrarse"
     log_in: "Iniciar sesión con contraseña"
-    social_signup: "o, puedes acceder a través de tu cuenta de Facebook o G+:"
-#    required: "You need to log in before you can go that way."
+    social_signup: "O, puedes acceder a través de tu cuenta de Facebook o G+:"
+    required: "Tienes que estar reginstrado antes de poder seguir por aquí."
 
   home:
-    slogan: "Aprende a programar JavaScript jugando"
+    slogan: "Aprende a programar jugando"
     no_ie: "CodeCombat no funciona en Internet Explorer 9 o anteriores. ¡Lo sentimos!"
     no_mobile: "¡CodeCombat no fue diseñado para dispositivos móviles y puede que no funcione!"
     play: "Jugar"
     old_browser: "Ay, su navegador es demasiado viejo para ejecutar CodeCombat. ¡Lo sentimos!"
-    old_browser_suffix: "Puede tentar de todos modos, pero probablemente no va a funcionar."
+    old_browser_suffix: "Lo puede intentar de todos modos, pero probablemente no va a funcionar."
     campaign: "Campaña"
     for_beginners: "Para principiantes"
     multiplayer: "Multijugador"
@@ -185,25 +193,126 @@ module.exports = nativeDescription: "español (ES)", englishDescription: "Spanis
     view_profile: "Mira tu perfil"
 
   account_profile:
-    edit_settings: "Ajustes"
+    settings: "Configuración"
+    edit_profile: "Editar Perfil"
+    done_editing: "Edición Terminada"
     profile_for_prefix: "Perfil de "
     profile_for_suffix: ""
-    approved: "Aprobado"
-    not_approved: "No aprobado"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
     looking_for: "Buscando:"
     last_updated: "Última actualización:"
     contact: "Contacto"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+    next: "Siguiente"
+    next_city: "¿Ciudad?"
+    next_country: "elige tu país."
+    next_name: "¿Nombre?"
+    next_short_description: "escribe una descripción breve."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+    example_blog: "Blog"
+    example_personal_site: "Web personal"
+#    links_header: "Personal Links"
+    links_blurb: "Enlaza otros sitios o perfiles que quieras destacar como tu GitHub, LinkedIn, o tu blog."
+    links_name: "Nombre del enlace"
+    links_name_help: "¿Qué estás enlazando?"
+    links_link_blurb: "URL del enlace"
+    basics_header: "Actualizar información básica"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+    basics_city: "Ciudad"
+    basics_city_help: "Ciudad en la que quieres trabajar (o en la que vives actualmente)."
+    basics_country: "País"
+    basics_country_help: "País en la que quieres trabajar (o en la que vives actualmente)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+    basics_looking_for_full_time: "Full-time (tiempo completo)"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+    name_header: "Escriba su nombre"
+    name_anonymous: "Desarrollador Anónimo"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+    short_description_header: "Escriba una breve descripción sobre usted."
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+    short_description_help: "¿Quién eres, y qué estás buscando? 140 caracteres como máximo."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+    long_description: "Descripción Personal"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
     work_experience: "Experiencia laboral"
+#    work_header: "Chronicle your work history"
+    work_years: "Años de experiencia"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+    work_duration: "Duración"
+#    work_duration_help: "When did you hold this gig?"
+    work_description: "Descripción"
+#    work_description_help: "What did you do there? (140 chars; optional)"
     education: "Educación"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+    education_duration_help: "¿Cuándo?"
+    education_description: "Descripción"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
     our_notes: "Nuestras notas"
     projects: "Proyectos"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+    project_description: "Descripción"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
   employers:
     want_to_hire_our_players: "¿Quieres contratar jugadores expertos de CodeCombat?"
+    what: "¿Qué es CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+    who: "¿Quiénes son los jugadores?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
     see_candidates: "Click aquí para ver a nuestros candidatos"
-    candidates_count_prefix: "Actualmente tenemos "
-    candidates_count_many: "muchos"
-    candidates_count_suffix: "desarrolladores altamente cualificados, y examinados atentamente, buscando trabajo."
     candidate_name: "Nombre"
     candidate_location: "Ubicación"
     candidate_looking_for: "Buscando"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "español (ES)", englishDescription: "Spanis
     candidate_top_skills: "Mejores Habilidades"
     candidate_years_experience: "Años Exp"
     candidate_last_updated: "Última actualización"
-    candidate_approved: "¿Nosotros?"
-    candidate_active: "¿Ellos?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
   play_level:
     done: "Hecho"
@@ -265,9 +375,9 @@ module.exports = nativeDescription: "español (ES)", englishDescription: "Spanis
     skip_tutorial: "Saltar (esc)"
     editor_config: "Conf. editor"
     editor_config_title: "Configuración del editor"
-#    editor_config_level_language_label: "Language for This Level"
+    editor_config_level_language_label: "Lenguaje para este nivel"
 #    editor_config_level_language_description: "Define the programming language for this particular level."
-#    editor_config_default_language_label: "Default Programming Language"
+    editor_config_default_language_label: "Lenguaje de programación por defecto"
 #    editor_config_default_language_description: "Define the programming language you want to code in when starting new levels."
     editor_config_keybindings_label: "Atajos de teclado"
     editor_config_keybindings_default: "Actual (Ace)"
@@ -278,7 +388,7 @@ module.exports = nativeDescription: "español (ES)", englishDescription: "Spanis
     editor_config_indentguides_description: "Se puede ver las líneas verticales que definen el sangrado de una forma más claraDisplays vertical lines to see indentation better."
     editor_config_behaviors_label: "Comportamientos inteligentes"
     editor_config_behaviors_description: "Se completan automáticamente corchetes, paréntesis y comillas."
-#    keyboard_shortcuts: "Key Shortcuts"
+    keyboard_shortcuts: "Atajos de teclado"
     loading_ready: "¡Listo!"
     tip_insert_positions: "Shift+Clic en un punto del mapa para insertarlo en el editor de hechizos."
     tip_toggle_play: "Alterna entre jugar/pausa con Ctrl+P."
@@ -315,11 +425,11 @@ module.exports = nativeDescription: "español (ES)", englishDescription: "Spanis
     infinite_loop_reset_level: "Reiniciar nivel"
     infinite_loop_comment_out: "Comenta mi código"
 
-#  keyboard_shortcuts:
-#    keyboard_shortcuts: "Keyboard Shortcuts"
-#    space: "Space"
-#    enter: "Enter"
-#    escape: "Escape"
+  keyboard_shortcuts:
+    keyboard_shortcuts: "Atajos de teclado"
+    space: "Barra espaciadora (Espacio)"
+    enter: "Enter"
+    escape: "Escape"
 #    cast_spell: "Cast current spell."
 #    continue_script: "Continue past current script."
 #    skip_scripts: "Skip past all skippable scripts."
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "español (ES)", englishDescription: "Spanis
     av_entities_sub_title: "Entidades"
     av_entities_users_url: "Usuarios"
     av_entities_active_instances_url: "Instancias Activas"
+    av_entities_employer_list_url: "Lista de empleados"
     av_other_sub_title: "Otros"
     av_other_debug_base_url: "Base (para debugging base.jade)"
     u_title: "Lista de Usuarios"
@@ -347,9 +458,9 @@ module.exports = nativeDescription: "español (ES)", englishDescription: "Spanis
   community:
     level_editor: "Editor de niveles"
     main_title: "Comunidad de CodeCombat"
-#    facebook: "Facebook"
-#    twitter: "Twitter"
-#    gplus: "Google+"
+    facebook: "Facebook"
+    twitter: "Twitter"
+    gplus: "Google+"
 
   editor:
     main_title: "Editores de CodeCombat"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "español (ES)", englishDescription: "Spanis
     thang_description: "Construye unidades, su lógica predeterminada, gráficos y audio. Actualmente sólo se permite importar gráficos vectoriales exportados de Flash."
     level_title: "Editor de Niveles"
     level_description: "Incluye las herramientas para escribir scripts, subir audio, y construir una lógica personalidad con la que crear todo tipo de niveles. ¡Todo lo que usamos nosotros!"
+#    achievement_title: "Achievement Editor"
     got_questions: "¿Preguntas sobre el uso de los editores CodeCombat?"
     contact_us: "¡Contacta con nosotros!"
     hipchat_prefix: "También puedes encontrarnos en nuestra"
@@ -402,12 +514,15 @@ module.exports = nativeDescription: "español (ES)", englishDescription: "Spanis
     new_article_title: "Crear un nuevo artículo"
     new_thang_title: "Crea un nuevo tipo de objeto"
     new_level_title: "Crear un nuevo nivel"
-#    new_article_title_login: "Log In to Create a New Article"
+    new_article_title_login: "Inicia sesión para Crear un Nuevo Artíuclo"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
-#    new_level_title_login: "Log In to Create a New Level"
+    new_level_title_login: "Inicia sesión para Crear un Nuevo Nivel"
+    new_achievement_title: "Crea un nuevo Logro"
+    new_achievement_title_login: "Inicia sesión para Crear un Nuevo Logro"
     article_search_title: "Buscar artículos aquí"
     thang_search_title: "Busca tipos de objetos aquí"
     level_search_title: "Buscar niveles aquí"
+    achievement_search_title: "Buscar Logros"
     read_only_warning2: "Nota: no puedes guardar nada de lo que edites aqui porque no has iniciado sesión."
 
   article:
@@ -675,30 +790,33 @@ module.exports = nativeDescription: "español (ES)", englishDescription: "Spanis
     warmup: "calentamiento"
     vs: "VS"
     friends_playing: "Amigos jugando"
-#    log_in_for_friends: "Log in to play with your friends!"
+    log_in_for_friends: "¡Inicia sesión para jugar con tus amigos!"
     social_connect_blurb: "¡Conectate y juega contra tus amigos!"
     invite_friends_to_battle: "¡Invita a tus amigos a unirse a la batalla!"
     fight: "¡Pelea!"
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+    rules: "Reglas"
+    winners: "Ganadores"
 
-#  ladder_prizes:
+  ladder_prizes:
 #    title: "Tournament Prizes"
 #    blurb_1: "These prizes will be awarded according to"
 #    blurb_2: "the tournament rules"
 #    blurb_3: "to the top human and ogre players."
 #    blurb_4: "Two teams means double the prizes!"
 #    blurb_5: "(There will be two first place winners, two second-place winners, etc.)"
-#    rank: "Rank"
-#    prizes: "Prizes"
+    rank: "Rango"
+    prizes: "Premios"
 #    total_value: "Total Value"
 #    in_cash: "in cash"
-#    custom_wizard: "Custom CodeCombat Wizard"
-#    custom_avatar: "Custom CodeCombat avatar"
+    custom_wizard: "Personaliza tu Mago de CodeCombat"
+    custom_avatar: "Personaliza tu avatar de CoceCombat"
 #    heap: "for six months of \"Startup\" access"
 #    credits: "credits"
 #    one_month_coupon: "coupon: choose either Rails or HTML"
@@ -763,12 +881,13 @@ module.exports = nativeDescription: "español (ES)", englishDescription: "Spanis
     source_document: "Documento fuente"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
-#  delta:
-#    added: "Added"
-#    modified: "Modified"
-#    deleted: "Deleted"
+  delta:
+    added: "Añadido"
+    modified: "Modificado"
+    deleted: "Eliminado"
 #    moved_index: "Moved Index"
 #    text_diff: "Text Diff"
 #    merge_conflict_with: "MERGE CONFLICT WITH"
-#    no_changes: "No Changes"
+    no_changes: "Sin Cambios"
diff --git a/app/locale/es.coffee b/app/locale/es.coffee
index a7511115b..ef5f74793 100644
--- a/app/locale/es.coffee
+++ b/app/locale/es.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "español", englishDescription: "Spanish", t
 #    minutes: "minutes"
 #    hour: "hour"
 #    hours: "hours"
+#    day: "day"
+#    days: "days"
+#    week: "week"
+#    weeks: "weeks"
+#    month: "month"
+#    months: "months"
+#    year: "year"
+#    years: "years"
 
   modal:
     close: "Cerrar"
@@ -82,7 +90,7 @@ module.exports = nativeDescription: "español", englishDescription: "Spanish", t
 #    required: "You need to log in before you can go that way."
 
   home:
-    slogan: "Aprende a programar en JavaScript jugando"
+    slogan: "Aprende a programar jugando"
     no_ie: "CodeCombat no funciona en Internet Explorer 9 o versiones anteriores. ¡Lo sentimos!"
     no_mobile: "¡CodeCombat no fue diseñado para dispositivos móviles y quizás no funcione!"
     play: "Jugar"
@@ -185,25 +193,126 @@ module.exports = nativeDescription: "español", englishDescription: "Spanish", t
 #    view_profile: "View Your Profile"
 
   account_profile:
-    edit_settings: "Editar Ajustes"
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
     profile_for_prefix: "Perfil de "
 #    profile_for_suffix: ""
-#    approved: "Approved"
-#    not_approved: "Not Approved"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
 #    looking_for: "Looking for:"
 #    last_updated: "Last updated:"
 #    contact: "Contact"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+#    next_city: "city?"
+#    next_country: "pick your country."
+#    next_name: "name?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
 #    work_experience: "Work Experience"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
 #    education: "Education"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
 #    our_notes: "Our Notes"
 #    projects: "Projects"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
 #  employers:
-#    want_to_hire_our_players: "Want to hire expert CodeCombat players?"
+#    want_to_hire_our_players: "Hire CodeCombat Players"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-#    candidates_count_prefix: "We currently have "
-#    candidates_count_many: "many"
-#    candidates_count_suffix: "highly skilled and vetted developers looking for work."
 #    candidate_name: "Name"
 #    candidate_location: "Location"
 #    candidate_looking_for: "Looking For"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "español", englishDescription: "Spanish", t
 #    candidate_top_skills: "Top Skills"
 #    candidate_years_experience: "Yrs Exp"
 #    candidate_last_updated: "Last Updated"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
   play_level:
     done: "Hecho"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "español", englishDescription: "Spanish", t
 #    av_entities_sub_title: "Entities"
     av_entities_users_url: "Usuarios"
 #    av_entities_active_instances_url: "Active Instances"
+#    av_entities_employer_list_url: "Employer List"
     av_other_sub_title: "Otros"
 #    av_other_debug_base_url: "Base (for debugging base.jade)"
     u_title: "Lista de usuario"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "español", englishDescription: "Spanish", t
 #    thang_description: "Build units, defining their default logic, graphics and audio. Currently only supports importing Flash exported vector graphics."
     level_title: "Editor de nivel"
 #    level_description: "Includes the tools for scripting, uploading audio, and constructing custom logic to create all sorts of levels. Everything we use ourselves!"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
 #    contact_us: "Contact us!"
 #    hipchat_prefix: "You can also find us in our"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "español", englishDescription: "Spanish", t
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
 #    article_search_title: "Search Articles Here"
 #    thang_search_title: "Search Thang Types Here"
 #    level_search_title: "Search Levels Here"
+#    achievement_search_title: "Search Achievements"
 #    read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
   article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "español", englishDescription: "Spanish", t
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "español", englishDescription: "Spanish", t
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/fa.coffee b/app/locale/fa.coffee
index 430816264..7d24100ff 100644
--- a/app/locale/fa.coffee
+++ b/app/locale/fa.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "فارسی", englishDescription: "Persian",
 #    minutes: "minutes"
 #    hour: "hour"
 #    hours: "hours"
+#    day: "day"
+#    days: "days"
+#    week: "week"
+#    weeks: "weeks"
+#    month: "month"
+#    months: "months"
+#    year: "year"
+#    years: "years"
 
   modal:
     close: "بستن"
@@ -82,7 +90,7 @@ module.exports = nativeDescription: "فارسی", englishDescription: "Persian",
 #    required: "You need to log in before you can go that way."
 
   home:
-    slogan: "کد نویسی به زبان جاوااسکریپت را با بازی بیاموزید"
+    slogan: "کد نویسیا با بازی بیاموزید"
     no_ie: "متاسفیم اما بازی بر روی مرورگر های اینترنت اکسپلورر نسخه ۹ به قبل اجرا نمی شود"
     no_mobile: "این بازی برای دستگاه های موبایل طراحی نشده است و بر روی آن ها اجرا نمی شود"
     play: "شروع بازی"
@@ -185,25 +193,126 @@ module.exports = nativeDescription: "فارسی", englishDescription: "Persian",
 #    view_profile: "View Your Profile"
 
 #  account_profile:
-#    edit_settings: "Edit Settings"
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
 #    profile_for_prefix: "Profile for "
 #    profile_for_suffix: ""
-#    approved: "Approved"
-#    not_approved: "Not Approved"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
 #    looking_for: "Looking for:"
 #    last_updated: "Last updated:"
 #    contact: "Contact"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+#    next_city: "city?"
+#    next_country: "pick your country."
+#    next_name: "name?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
 #    work_experience: "Work Experience"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
 #    education: "Education"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
 #    our_notes: "Our Notes"
 #    projects: "Projects"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
 #  employers:
-#    want_to_hire_our_players: "Want to hire expert CodeCombat players?"
+#    want_to_hire_our_players: "Hire CodeCombat Players"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-#    candidates_count_prefix: "We currently have "
-#    candidates_count_many: "many"
-#    candidates_count_suffix: "highly skilled and vetted developers looking for work."
 #    candidate_name: "Name"
 #    candidate_location: "Location"
 #    candidate_looking_for: "Looking For"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "فارسی", englishDescription: "Persian",
 #    candidate_top_skills: "Top Skills"
 #    candidate_years_experience: "Yrs Exp"
 #    candidate_last_updated: "Last Updated"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
 #  play_level:
 #    done: "Done"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "فارسی", englishDescription: "Persian",
 #    av_entities_sub_title: "Entities"
 #    av_entities_users_url: "Users"
 #    av_entities_active_instances_url: "Active Instances"
+#    av_entities_employer_list_url: "Employer List"
 #    av_other_sub_title: "Other"
 #    av_other_debug_base_url: "Base (for debugging base.jade)"
 #    u_title: "User List"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "فارسی", englishDescription: "Persian",
 #    thang_description: "Build units, defining their default logic, graphics and audio. Currently only supports importing Flash exported vector graphics."
 #    level_title: "Level Editor"
 #    level_description: "Includes the tools for scripting, uploading audio, and constructing custom logic to create all sorts of levels. Everything we use ourselves!"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
 #    contact_us: "Contact us!"
 #    hipchat_prefix: "You can also find us in our"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "فارسی", englishDescription: "Persian",
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
 #    article_search_title: "Search Articles Here"
 #    thang_search_title: "Search Thang Types Here"
 #    level_search_title: "Search Levels Here"
+#    achievement_search_title: "Search Achievements"
 #    read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
 #  article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "فارسی", englishDescription: "Persian",
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "فارسی", englishDescription: "Persian",
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/fi.coffee b/app/locale/fi.coffee
index a413b2598..96a330fa0 100644
--- a/app/locale/fi.coffee
+++ b/app/locale/fi.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "suomi", englishDescription: "Finnish", tran
 #    minutes: "minutes"
 #    hour: "hour"
 #    hours: "hours"
+#    day: "day"
+#    days: "days"
+#    week: "week"
+#    weeks: "weeks"
+#    month: "month"
+#    months: "months"
+#    year: "year"
+#    years: "years"
 
 #  modal:
 #    close: "Close"
@@ -185,25 +193,126 @@ module.exports = nativeDescription: "suomi", englishDescription: "Finnish", tran
 #    view_profile: "View Your Profile"
 
 #  account_profile:
-#    edit_settings: "Edit Settings"
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
 #    profile_for_prefix: "Profile for "
 #    profile_for_suffix: ""
-#    approved: "Approved"
-#    not_approved: "Not Approved"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
 #    looking_for: "Looking for:"
 #    last_updated: "Last updated:"
 #    contact: "Contact"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+#    next_city: "city?"
+#    next_country: "pick your country."
+#    next_name: "name?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
 #    work_experience: "Work Experience"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
 #    education: "Education"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
 #    our_notes: "Our Notes"
 #    projects: "Projects"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
 #  employers:
-#    want_to_hire_our_players: "Want to hire expert CodeCombat players?"
+#    want_to_hire_our_players: "Hire CodeCombat Players"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-#    candidates_count_prefix: "We currently have "
-#    candidates_count_many: "many"
-#    candidates_count_suffix: "highly skilled and vetted developers looking for work."
 #    candidate_name: "Name"
 #    candidate_location: "Location"
 #    candidate_looking_for: "Looking For"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "suomi", englishDescription: "Finnish", tran
 #    candidate_top_skills: "Top Skills"
 #    candidate_years_experience: "Yrs Exp"
 #    candidate_last_updated: "Last Updated"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
 #  play_level:
 #    done: "Done"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "suomi", englishDescription: "Finnish", tran
 #    av_entities_sub_title: "Entities"
 #    av_entities_users_url: "Users"
 #    av_entities_active_instances_url: "Active Instances"
+#    av_entities_employer_list_url: "Employer List"
 #    av_other_sub_title: "Other"
 #    av_other_debug_base_url: "Base (for debugging base.jade)"
 #    u_title: "User List"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "suomi", englishDescription: "Finnish", tran
 #    thang_description: "Build units, defining their default logic, graphics and audio. Currently only supports importing Flash exported vector graphics."
 #    level_title: "Level Editor"
 #    level_description: "Includes the tools for scripting, uploading audio, and constructing custom logic to create all sorts of levels. Everything we use ourselves!"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
 #    contact_us: "Contact us!"
 #    hipchat_prefix: "You can also find us in our"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "suomi", englishDescription: "Finnish", tran
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
 #    article_search_title: "Search Articles Here"
 #    thang_search_title: "Search Thang Types Here"
 #    level_search_title: "Search Levels Here"
+#    achievement_search_title: "Search Achievements"
 #    read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
 #  article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "suomi", englishDescription: "Finnish", tran
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "suomi", englishDescription: "Finnish", tran
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/fr.coffee b/app/locale/fr.coffee
index 0307fe4fb..5a55252d0 100644
--- a/app/locale/fr.coffee
+++ b/app/locale/fr.coffee
@@ -16,8 +16,8 @@ module.exports = nativeDescription: "français", englishDescription: "French", t
     play: "Jouer"
     retry: "Reessayer"
     watch: "Regarder"
-#    unwatch: "Unwatch"
-#    submit_patch: "Submit Patch"
+    unwatch: "Ne plus regarder"
+    submit_patch: "Soumettre un correctif"
 
   units:
     second: "seconde"
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "français", englishDescription: "French", t
     minutes: "minutes"
     hour: "heure"
     hours: "heures"
+    day: "jour"
+    days: "jours"
+    week: "semaine"
+    weeks: "semaines"
+    month: "mois"
+    months: "mois"
+    year: "année"
+    years: "années"
 
   modal:
     close: "Fermer"
@@ -36,7 +44,7 @@ module.exports = nativeDescription: "français", englishDescription: "French", t
 
   nav:
     play: "Jouer"
-#    community: "Community"
+    community: "Communauté"
     editor: "Éditeur"
     blog: "Blog"
     forum: "Forum"
@@ -63,7 +71,7 @@ module.exports = nativeDescription: "français", englishDescription: "French", t
     log_in: "Connexion"
     logging_in: "Connecter"
     log_out: "Déconnexion"
-    recover: "récupérer son compte"
+    recover: "Récupérer son compte"
 
   recover:
     recover_account_title: "Récupérer son compte"
@@ -79,10 +87,10 @@ module.exports = nativeDescription: "français", englishDescription: "French", t
     sign_up: "S'abonner"
     log_in: "se connecter avec votre mot de passe"
     social_signup: "Ou, vous pouvez vous identifier avec Facecook ou G+:"
-#    required: "You need to log in before you can go that way."
+    required: "Vous devez être connecté pour voir cela"
 
   home:
-    slogan: "Apprenez à coder en JavaScript tout en jouant"
+    slogan: "Apprenez à coder tout en jouant"
     no_ie: "CodeCombat ne fonctionnera pas sous Internet Explorer 9 ou moins. Désolé !"
     no_mobile: "CodeCombat n'a pas été créé pour les plateformes mobiles donc il est possible qu'il ne fonctionne pas correctement ! "
     play: "Jouer"
@@ -118,10 +126,10 @@ module.exports = nativeDescription: "français", englishDescription: "French", t
     contribute_suffix: "!"
     forum_prefix: "Pour tout sujet d'ordre publique, merci d'utiliser "
     forum_page: "notre forum"
-    forum_suffix: " à la place."
+    forum_suffix: " À la place."
     send: "Envoyer un commentaire"
-#    contact_candidate: "Contact Candidate"
-#    recruitment_reminder: "Use this form to reach out to candidates you are interested in interviewing. Remember that CodeCombat charges 15% of first-year salary. The fee is due upon hiring the employee and is refundable for 90 days if the employee does not remain employed. Part time, remote, and contract employees are free, as are interns."
+    contact_candidate: "Contacter le candidat"
+    recruitment_reminder: "Utilisez ce formulaire pour entrer en contact avec le candidat qui vous interesse. Souvenez-vous que CodeCombat facture 15% de la première année de salaire. Ces frais sont dues à l'embauche de l'employé, ils sont remboursable pendant 90 jours si l'employé ne reste pas employé. Les employés à temps partiel, à distance ou contractuel sont gratuits en tant que stagiaires."
 
   diplomat_suggestion:
     title: "Aidez à traduire CodeCombat!"
@@ -134,7 +142,7 @@ module.exports = nativeDescription: "français", englishDescription: "French", t
   wizard_settings:
     title: "Paramètres du Magicien"
     customize_avatar: "Personnaliser votre avatar"
-#    active: "Active"
+    active: "Actif"
     color: "Couleur"
     group: "Groupe"
     clothes: "Vêtements"
@@ -153,7 +161,7 @@ module.exports = nativeDescription: "français", englishDescription: "French", t
     autosave: "Enregistrer automatiquement les modifications"
     me_tab: "Moi"
     picture_tab: "Photos"
-#    upload_picture: "Upload a picture"
+    upload_picture: "Héberger une image"
     wizard_tab: "Magicien"
     password_tab: "Mot de passe"
     emails_tab: "Emails"
@@ -165,11 +173,11 @@ module.exports = nativeDescription: "français", englishDescription: "French", t
     email_announcements: "Annonces"
     email_announcements_description: "Recevoir des mails sur les dernières actualités et sur le développement de CodeCombat."
     email_notifications: "Notifications"
-#    email_notifications_summary: "Controls for personalized, automatic email notifications related to your CodeCombat activity."
-#    email_any_notes: "Any Notifications"
-#    email_any_notes_description: "Disable to stop all activity notification emails."
-#    email_recruit_notes: "Job Opportunities"
-#    email_recruit_notes_description: "If you play really well, we may contact you about getting you a (better) job."
+    email_notifications_summary: "Commandes pour personaliser les notifications automatiques d'email liées à votre activité sur CodeCombat."
+    email_any_notes: "Toutes Notifications"
+    email_any_notes_description: "Désactivez pour ne plus recevoir de notifications par e-mail."
+    email_recruit_notes: "Offres d'emploi"
+    email_recruit_notes_description: "Si vous jouez vraiment bien, nous pouvons vous contacter pour vous proposer un (meilleur) emploi."
     contributor_emails: "Emails des contributeurs"
     contribute_prefix: "Nous recherchons des personnes pour se joindre à notre groupe! Consultez la "
     contribute_page: "page de contributions"
@@ -178,41 +186,143 @@ module.exports = nativeDescription: "français", englishDescription: "French", t
     error_saving: "Problème d'enregistrement"
     saved: "Changements sauvegardés"
     password_mismatch: "Le mot de passe ne correspond pas."
-#    job_profile: "Job Profile"
-#    job_profile_approved: "Your job profile has been approved by CodeCombat. Employers will be able to see it until you either mark it inactive or it has not been changed for four weeks."
-#    job_profile_explanation: "Hi! Fill this out, and we will get in touch about finding you a software developer job."
-#    sample_profile: "See a sample profile"
-    view_profile: "Voir votre profile"
+    job_profile: "Profil d'emploi"
+    job_profile_approved: "Votre profil d'emploi a été approuvé par CodeCombat. Les employeurs seront en mesure de voir votre profil jusqu'à ce que vous le marquez inactif ou qu'il n'a pas été changé pendant quatre semaines."
+    job_profile_explanation: "Salut! Remplissez-le et nous prendrons contact pour vous trouver un emploi de développeur de logiciels."
+    sample_profile: "Voir un exemple de profil"
+    view_profile: "Voir votre profil"
 
   account_profile:
-    edit_settings: "Éditer les préférences"
+    settings: "Paramètres"
+    edit_profile: "Editer Profil"
+    done_editing: "Modifications effectué"
     profile_for_prefix: "Profil pour "
     profile_for_suffix: ""
-#    approved: "Approved"
-#    not_approved: "Not Approved"
+    featured: "Complet"
+    not_featured: "Incomplet"
     looking_for: "à la recherche de:"
-    last_updated: "Last Mise à jour:"
-#    contact: "Contact"
+    last_updated: "Dernière Mise à jour:"
+    contact: "Contact"
+    active: "En recherche d'offres"
+    inactive: "Ne recherche pas d'offres"
+    complete: "terminé"
+    next: "Suivant"
+    next_city: "ville ?"
+    next_country: "choisissez votre pays."
+    next_name: "nom ?"
+    next_short_description: "résumez votre profil en quelques mots."
+    next_long_description: "décrivez le travail que vous cherchez."
+    next_skills: "listez au moins 5 compétances."
+    next_work: "décrivez votre expérience professionnelle."
+    next_education: "raconter votre scolarité."
+    next_projects: "décrivez jusqu'à 3 projets sur lesquels vous avez travaillé."
+    next_links: "ajouter des liens internet vers des sites personnels ou des réseaux sociaux."
+    next_photo: "ajouter une photo professionelle (optionnel)."
+    next_active: "déclarez vous ouvert aux offres pour apparaitre dans les recherches."
+    example_blog: "Votre blog"
+    example_personal_site: "Site Web"
+    links_header: "Liens personnels"
+    links_blurb: "Lien vers d'autres sites ou profils que vous souhaitez mettre en avant, comme votre GitHub, LinkedIn ou votre blog."
+    links_name: "Nom du lien"
+    links_name_help: "A quoi êtes vous lié ?"
+    links_link_blurb: "Lien URL"
+    basics_header: "Mettre à jour les information basiques"
+    basics_active: "Ouvert aux propositions"
+    basics_active_help: "Voulez-vous des offres maintenant ?"
+    basics_job_title: "Titre du poste souhaité"
+    basics_job_title_help: "Quel est le rôle que vous cherchez ?"
+    basics_city: "Ville"
+    basics_city_help: "Ville dans laquelle vous souhaitez travailler (ou dans laquelle vous vivez actuellement)."
+    basics_country: "Pays"
+    basics_country_help: "Pays dans lequel vous souhaitez travailler (ou dans lequel vous vivez actuellement)."
+    basics_visa: "Status de travail aux Etats-Unis"
+    basics_visa_help: "Etes vous autorisé à travailler aux Etats-Unis ou avez vous besoin d'un parrainage pour le visa ?"
+    basics_looking_for: "Recherche"
+    basics_looking_for_full_time: "Temps plein"
+    basics_looking_for_part_time: "Temps partiel"
+    basics_looking_for_remote: "A distance"
+    basics_looking_for_contracting: "Contrat"
+    basics_looking_for_internship: "Stage"
+    basics_looking_for_help: "Quel genre de poste de développeur voulez-vous ?"
+    name_header: "Remplissez votre nom"
+    name_anonymous: "Developpeur Anonyme"
+    name_help: "Le nom que vous souhaitez que l'employeur voie, par exemple 'Chuck Norris'."
+    short_description_header: "Décrivez vous en quelques mots"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+    short_description: "Description courte"
+    short_description_help: "Qui êtes vous et que recherchez vous ? 140 caractères max."
+    skills_header: "Compétences"
+    skills_help: "Notez vos compétence de développement par ordre de maitrise."
+    long_description_header: "Détaillez votre poste souhaité"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
     work_experience: "Experience de travail"
-#    education: "Education"
-#    our_notes: "Our Notes"
-#    projects: "Projects"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
+    education: "Education"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
+    our_notes: "Notes"
+    projects: "Projets"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
-#  employers:
-#    want_to_hire_our_players: "Want to hire expert CodeCombat players?"
+  employers:
+#    want_to_hire_our_players: "Hire CodeCombat Players"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-#    candidates_count_prefix: "We currently have "
-#    candidates_count_many: "many"
-#    candidates_count_suffix: "highly skilled and vetted developers looking for work."
-#    candidate_name: "Name"
-#    candidate_location: "Location"
-#    candidate_looking_for: "Looking For"
-#    candidate_role: "Role"
-#    candidate_top_skills: "Top Skills"
-#    candidate_years_experience: "Yrs Exp"
-#    candidate_last_updated: "Last Updated"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+    candidate_name: "Nom"
+    candidate_location: "Localisation"
+    candidate_looking_for: "Poste pour"
+    candidate_role: "Rôle"
+    candidate_top_skills: "Talents/Aptitudes"
+    candidate_years_experience: "Années d'expérience"
+    candidate_last_updated: "Dernière mise à jour"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
   play_level:
     done: "Fait"
@@ -223,16 +333,16 @@ module.exports = nativeDescription: "français", englishDescription: "French", t
     multiplayer: "Multijoueur"
     restart: "Relancer"
     goals: "Objectifs"
-#    success: "Success!"
-#    incomplete: "Incomplete"
-#    timed_out: "Ran out of time"
-#    failing: "Failing"
+    success: "Succès"
+    incomplete: "Imcoplet"
+    timed_out: "Plus de temps"
+    failing: "Echec"
     action_timeline: "Action sur la ligne de temps"
     click_to_select: "Clique sur une unité pour la sélectionner."
     reload_title: "Recharger tout le code?"
     reload_really: "Êtes-vous sûr de vouloir recharger ce niveau et retourner au début?"
     reload_confirm: "Tout recharger"
-#    victory_title_prefix: ""
+    victory_title_prefix: ""
     victory_title_suffix: " Terminé"
     victory_sign_up: "Inscrivez-vous pour recevoir les mises à jour"
     victory_sign_up_poke: "Vous voulez recevoir les dernières actualités par mail? Créez un compte gratuitement et nous vous tiendrons informés!"
@@ -265,10 +375,10 @@ module.exports = nativeDescription: "français", englishDescription: "French", t
     skip_tutorial: "Passer (esc)"
     editor_config: "Config de l'éditeur"
     editor_config_title: "Configuration de l'éditeur"
-#    editor_config_level_language_label: "Language for This Level"
+    editor_config_level_language_label: "Langage pour le niveau"
 #    editor_config_level_language_description: "Define the programming language for this particular level."
-#    editor_config_default_language_label: "Default Programming Language"
-#    editor_config_default_language_description: "Define the programming language you want to code in when starting new levels."
+    editor_config_default_language_label: "Langage de Programmation par défaut"
+    editor_config_default_language_description: "Choississez le langage de programmation que vous souhaitez dons les nouveaux niveaux"
     editor_config_keybindings_label: "Raccourcis clavier"
     editor_config_keybindings_default: "Par défault (Ace)"
     editor_config_keybindings_description: "Ajouter de nouveaux raccourcis connus depuis l'éditeur commun."
@@ -278,14 +388,14 @@ module.exports = nativeDescription: "français", englishDescription: "French", t
     editor_config_indentguides_description: "Affiche des guides verticaux qui permettent de visualiser l'indentation."
     editor_config_behaviors_label: "Auto-complétion"
     editor_config_behaviors_description: "Ferme automatiquement les accolades, parenthèses, et chaînes de caractères."
-#    keyboard_shortcuts: "Key Shortcuts"
+    keyboard_shortcuts: "Raccourcis Clavier"
     loading_ready: "Pret!"
-#    tip_insert_positions: "Shift+Click a point on the map to insert it into the spell editor."
+    tip_insert_positions: "Maj+Clic un point pour insérer les coordonnées dans l'éditeur ."
     tip_toggle_play: "Jouer/Pause avec Ctrl+P."
 #    tip_scrub_shortcut: "Ctrl+[ and Ctrl+] rewind and fast-forward."
 #    tip_guide_exists: "Click the guide at the top of the page for useful info."
     tip_open_source: "CodeCombat est 100% open source!"
-#    tip_beta_launch: "CodeCombat launched its beta in October, 2013."
+    tip_beta_launch: "La beta de CodeCombat a été lancée en Octobre 2013"
     tip_js_beginning: "JavaScript n'est que le commencement."
 #    tip_autocast_setting: "Adjust autocast settings by clicking the gear on the cast button."
     think_solution: "Reflechissez a propos de la solution et non du problème."
@@ -309,17 +419,17 @@ module.exports = nativeDescription: "français", englishDescription: "French", t
 #    tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds"
 #    tip_first_language: "The most disastrous thing that you can ever learn is your first programming language. - Alan Kay"
     time_current: "Maintenant:"
-#    time_total: "Max:"
-#    time_goto: "Go to:"
+    time_total: "Max:"
+    time_goto: "Allez a:"
     infinite_loop_try_again: "Reessayer"
     infinite_loop_reset_level: "Redemarrer le niveau"
     infinite_loop_comment_out: "Supprimez les commentaire de mon code"
 
-#  keyboard_shortcuts:
-#    keyboard_shortcuts: "Keyboard Shortcuts"
-#    space: "Space"
-#    enter: "Enter"
-#    escape: "Escape"
+  keyboard_shortcuts:
+    keyboard_shortcuts: "Raccourcis Clavier"
+    space: "Espace"
+    enter: "Entrer"
+    escape: "Echap"
 #    cast_spell: "Cast current spell."
 #    continue_script: "Continue past current script."
 #    skip_scripts: "Skip past all skippable scripts."
@@ -338,18 +448,19 @@ module.exports = nativeDescription: "français", englishDescription: "French", t
     av_entities_sub_title: "Entités"
     av_entities_users_url: "Utilisateurs"
     av_entities_active_instances_url: "Instances actives"
+    av_entities_employer_list_url: "Liste des employés"
     av_other_sub_title: "Autre"
     av_other_debug_base_url: "Base (pour debugger base.jade)"
     u_title: "Liste des utilisateurs"
     lg_title: "Dernières parties"
-#    clas: "CLAs"
+    clas: "CLAs"
 
-#  community:
-#    level_editor: "Level Editor"
-#    main_title: "CodeCombat Community"
-#    facebook: "Facebook"
-#    twitter: "Twitter"
-#    gplus: "Google+"
+  community:
+    level_editor: "Editeur de niveau"
+    main_title: "Communauté CodeCombat"
+    facebook: "Facebook"
+    twitter: "Twitter"
+    gplus: "Google+"
 
   editor:
     main_title: "Éditeurs CodeCombat"
@@ -360,18 +471,19 @@ module.exports = nativeDescription: "français", englishDescription: "French", t
     thang_description: "Créé des unités, définis leur comportement de base, graphisme et son. Pour l'instant cette fonctionnalité ne supporte que l'importation d'images vectorielles exportées depuis Flash."
     level_title: "Éditeur de niveau"
     level_description: "Inclut les outils de script, l'upload de vidéos, et l'élaboration de logiques personnalisées pour créer toutes sortes de niveaux. Tout ce que nous utilisons nous-mêmes!"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
     contact_us: "contactez nous!"
     hipchat_prefix: "Vous pouvez aussi nous trouver dans notre "
     hipchat_url: "conversation HipChat."
-#    back: "Back"
+    back: "Retour"
     revert: "Annuler"
     revert_models: "Annuler les modèles"
-#    fork_title: "Fork New Version"
-#    fork_creating: "Creating Fork..."
+    fork_title: "Fork une nouvelle version"
+    fork_creating: "Créer un Fork..."
     more: "Plus"
-#    wiki: "Wiki"
-#    live_chat: "Live Chat"
+    wiki: "Wiki"
+    live_chat: "Chat en live"
     level_some_options: "Quelques options?"
     level_tab_thangs: "Thangs"
     level_tab_scripts: "Scripts"
@@ -402,12 +514,15 @@ module.exports = nativeDescription: "français", englishDescription: "French", t
     new_article_title: "Créer un nouvel article"
     new_thang_title: "Créer un nouveau Type Thang"
     new_level_title: "Créer un nouveau niveau"
-#    new_article_title_login: "Log In to Create a New Article"
+    new_article_title_login: "Connectez vous pour créer un nouvel article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
-#    new_level_title_login: "Log In to Create a New Level"
+    new_level_title_login: "Connectez vous pour créer un nouveau niveau"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
     article_search_title: "Rechercher dans les articles"
     thang_search_title: "Rechercher dans les types Thang"
     level_search_title: "Rechercher dans les niveaux"
+#    achievement_search_title: "Search Achievements"
     read_only_warning2: "Note: vous ne pouvez sauvegarder aucune édition, car vous n'êtes pas identifié."
 
   article:
@@ -420,19 +535,19 @@ module.exports = nativeDescription: "français", englishDescription: "French", t
     body: "Corps"
     version: "Version"
     commit_msg: "Message de mise à jour"
-#    version_history: "Version History"
+    version_history: "Historique des versions"
     version_history_for: "Historique des versions pour : "
     result: "Resultat"
     results: "Résultats"
     description: "Description"
     or: "ou"
-#    subject: "Subject"
+    subject: "Sujet"
     email: "Email"
     password: "Mot de passe"
     message: "Message"
     code: "Code"
     ladder: "Companion"
-    when: "Lorsuqe"
+    when: "Quand"
     opponent: "Adversaire"
     rank: "Rang"
     score: "Score"
@@ -442,7 +557,7 @@ module.exports = nativeDescription: "français", englishDescription: "French", t
     easy: "Facile"
     medium: "Moyen"
     hard: "Difficile"
-#    player: "Player"
+    player: "Joueur"
 
   about:
     who_is_codecombat: "Qui est CodeCombat?"
@@ -453,8 +568,8 @@ module.exports = nativeDescription: "français", englishDescription: "French", t
     why_paragraph_1: "En développant Skritter, George ne savait pas programmer et était frustré de ne pas pouvoir implémenter ses idées. Ensuite, il essaya d'apprendre, mais les cours n'étaient pas assez rapides. Son colocataire, voulant se requalifier et arrêter d'apprendre, essaya Codecademy, mais \"s'ennuya.\" Chaque semaine un nouvel ami commençait Codecademy, puis abandonnait. Nous nous sommes rendus compte que nous avions résolu le même problème avec Skritter: les gens apprennant grâce à des cours lents et intensifs quand nous avons besoin d'expérience rapide et intensive. Nous savons comment remédier à ça."
     why_paragraph_2: "Besoin d'apprendre à développer? Vous n'avez pas besoin de cours. Vous avez besoin d'écrire beaucoup de code et de vous amuser en le faisant."
     why_paragraph_3_prefix: "C'est ce dont il s'agit en programmation. Ça doit être amusant. Pas amusant comme"
-    why_paragraph_3_italic: "génial un badge"
-    why_paragraph_3_center: "mais amusant comme"
+    why_paragraph_3_italic: "Génial un badge"
+    why_paragraph_3_center: "Mais amusant comme"
     why_paragraph_3_italic_caps: "NAN MAMAN JE DOIS FINIR MON NIVEAU!"
     why_paragraph_3_suffix: "C'est pourquoi CodeCombat est un jeu multijoueur, pas un cours avec une leçon jouée. Nous n'arrêterons pas avant que vous ne puissiez plus arrêter — mais cette fois, c'est une bonne chose."
     why_paragraph_4: "Si vous devez devenir accro à un jeu, accrochez-vous à celui-ci et devenez un des mages de l'âge de la technologie."
@@ -506,11 +621,11 @@ module.exports = nativeDescription: "français", englishDescription: "French", t
     art_description_prefix: "Tout le contenu commun est sous licence"
     cc_license_url: "Creative Commons Attribution 4.0 International"
     art_description_suffix: "Le contenu commun est tout ce qui est rendu disponible par CodeCombat afin de créer des niveaux. Cela inclut :"
-    art_music: "la musique"
-    art_sound: "le son"
-    art_artwork: "les artworks"
-    art_sprites: "les sprites"
-    art_other: "tout le reste du contenu non-code qui est rendu accessible lors de la création de niveaux."
+    art_music: "La musique"
+    art_sound: "Le son"
+    art_artwork: "Les artworks"
+    art_sprites: "Les sprites"
+    art_other: "Tout le reste du contenu non-code qui est rendu accessible lors de la création de niveaux."
     art_access: "Pour l'instant il n'y a aucun système universel et facile pour rassembler ces ressources. En général, accédez y par les URL comme le fait le site, contactez-nous pour de l'aide, ou aidez-nous à agrandir le site pour rendre ces ressources plus facilement accessibles."
     art_paragraph_1: "Pour l'attribution, s'il vous plait, nommez et référencez codecombat.com près de la source utilisée ou dans un endroit approprié. Par exemple:"
     use_list_1: "Si utilisé dans un film ou un autre jeu, incluez codecombat.com dans le générique."
@@ -518,11 +633,11 @@ module.exports = nativeDescription: "français", englishDescription: "French", t
     art_paragraph_2: "Si le contenu utilisé n'est pas créé par CodeCombat mais par un autre utilisateur de codecombat.com, attribuez le à cet utilisateur, et suivez les recommandations fournies dans la ressource de la description s'il y en a."
     rights_title: "Droits réservés"
     rights_desc: "Tous les droits sont réservés pour les niveaux eux-mêmes. Cela inclut"
-    rights_scripts: "les scripts"
-    rights_unit: "la configuration unitaire"
-    rights_description: "la description"
-    rights_writings: "l'écriture"
-    rights_media: "les médias (sons, musiques) et tous les autres contenus créatifs créés spécialement pour ce niveau et non rendus généralement accessibles en créant des niveaux."
+    rights_scripts: "Les scripts"
+    rights_unit: "La configuration unitaire"
+    rights_description: "La description"
+    rights_writings: "L'écriture"
+    rights_media: "Les médias (sons, musiques) et tous les autres contenus créatifs créés spécialement pour ce niveau et non rendus généralement accessibles en créant des niveaux."
     rights_clarification: "Pour clarifier, tout ce qui est rendu accessible dans l'éditeur de niveaux dans le but de créer des niveaux est sous licence CC, tandis que le contenu créé avec l'éditeur de niveaux ou uploadé dans le but de créer un niveau ne l'est pas."
     nutshell_title: "En un mot"
     nutshell_description: "Chaque ressource que nous fournissons dans l'éditeur de niveau est libre d'utilisation pour créer des niveaux. Mais nous nous réservons le droit de restreindre la distribution des niveaux créés (qui sont créés sur codecombat.com) ils peuvent donc devenir payants dans le futur, si c'est ce qui doit arriver."
@@ -538,7 +653,7 @@ module.exports = nativeDescription: "français", englishDescription: "French", t
     introduction_desc_ending: "Nous espérons que vous allez joindre notre aventure!"
     introduction_desc_signature: "- Nick, George, Scott, Michael, Jeremy et Glen"
     alert_account_message_intro: "Et tiens!"
-#    alert_account_message: "To subscribe for class emails, you'll need to be logged in first."
+    alert_account_message: "Pour souscrire aux e-mails, vous devez être connecté"
 #    archmage_summary: "Interested in working on game graphics, user interface design, database and server organization, multiplayer networking, physics, sound, or game engine performance? Want to help build a game to help other people learn what you are good at? We have a lot to do and if you are an experienced programmer and want to develop for CodeCombat, this class is for you. We would love your help building the best programming game ever."
     archmage_introduction: "L'une des meilleures parties de la création d'un jeu est qu'il regroupe tant de choses différentes. Graphismes, sons, réseau en temps réel, réseaux sociaux, et bien sur bien d'autres aspects de la programmation, de la gestion bas niveau de base de données, et de l'administration de serveur à l'élaboration d'interfaces utilisateur. Il y a tant à faire, et si vous êtes un programmeur expérimenté avec une aspiration à vraiment plonger dans le fond de CodeCombat, cette classe est faite pour vous. Nous aimerions avoir votre aide pour le meilleur jeu de développement de tous les temps."
     class_attributes: "Attributs de classe"
@@ -555,7 +670,7 @@ module.exports = nativeDescription: "français", englishDescription: "French", t
     more_about_archmage: "En apprendre plus sur devenir un puissant archimage"
     archmage_subscribe_desc: "Recevoir un email sur les nouvelles possibilités de développement et des annonces."
 #    artisan_summary_pref: "Want to design levels and expand CodeCombat's arsenal? People are playing through our content at a pace faster than we can build! Right now, our level editor is barebone, so be wary. Making levels will be a little challenging and buggy. If you have visions of campaigns spanning for-loops to"
-#    artisan_summary_suf: ", then this class is for you."
+    artisan_summary_suf: ", alors ce travail est pour vous"
     artisan_introduction_pref: "Nous devons créer des niveaux additionnels! Les gens veulent plus de contenu, et nous ne pouvons pas tous les créer nous-mêmes. Maintenant votre station de travail est au niveau un ; notre éditeur de niveaux est à peine utilisable même par ses créateurs, donc méfiez-vous. Si vous avez des idées sur la boucle for de"
     artisan_introduction_suf: ", cette classe est faite pour vous."
     artisan_attribute_1: "Une expérience dans la création de contenu comme celui-ci serait un plus, comme utiliser l'éditeur de niveaux de Blizzard. Mais ce n'est pas nécessaire!"
@@ -592,8 +707,8 @@ module.exports = nativeDescription: "français", englishDescription: "French", t
     diplomat_launch_url: "lancement en octobre"
     diplomat_introduction_suf: "c'est qu'il y a un intérêt considérable pour CodeCombat dans d'autres pays, particulièrement au Brésil! Nous créons une équipe de traducteurs pour changer une liste de mots en une autre pour que CodeCombat soit le plus accessible possible à travers le monde. Si vous souhaitez avoir un aperçu des prochains contenus et avoir les niveaux dans votre langue le plus tôt possible, alors cette classe est faite pour vous."
     diplomat_attribute_1: "Des facilités en anglais et dans la langue que vous souhaitez traduire. Pour transmettre des idées complexes, il est important d'avoir une solide compréhension des deux!"
-#    diplomat_join_pref_github: "Find your language locale file "
-#    diplomat_github_url: "on GitHub"
+    diplomat_join_pref_github: "Trouvez le fichier de langue souhaité"
+    diplomat_github_url: "sur GitHub"
 #    diplomat_join_suf_github: ", edit it online, and submit a pull request. Also, check this box below to keep up-to-date on new internationalization developments!"
     more_about_diplomat: "En apprendre plus sur comment devenir un bon diplomate"
     diplomat_subscribe_desc: "Recevoir un email sur le développement i18n et les niveaux à traduire."
@@ -643,11 +758,11 @@ module.exports = nativeDescription: "français", englishDescription: "French", t
     simulation_explanation: "En simulant une partie, tu peux classer ton rang plus rapidement!"
     simulate_games: "Simuler une Partie!"
     simulate_all: "REINITIALISER ET SIMULER DES PARTIES"
-#    games_simulated_by: "Games simulated by you:"
-#    games_simulated_for: "Games simulated for you:"
-#    games_simulated: "Games simulated"
-#    games_played: "Games played"
-#    ratio: "Ratio"
+    games_simulated_by: "Parties que vous avez simulé :"
+    games_simulated_for: "parties simulées pour vous :"
+    games_simulated: "Partie simulée"
+    games_played: "Parties jouées"
+    ratio: "Moyenne"
     leaderboard: "Classement"
     battle_as: "Combattre comme "
     summary_your: "Vos "
@@ -660,8 +775,8 @@ module.exports = nativeDescription: "français", englishDescription: "French", t
     rank_submitted: "Soumis pour le Classement"
     rank_failed: "Erreur lors du Classement"
     rank_being_ranked: "Partie en cours de Classement"
-#    rank_last_submitted: "submitted "
-#    help_simulate: "Help simulate games?"
+    rank_last_submitted: "Envoyé "
+    help_simulate: "De l'aide pour simuler vos parties"
     code_being_simulated: "Votre nouveau code est en cours de simulation par les autres joueurs pour le classement. Cela va se rafraichir lors que d'autres matchs auront lieu."
     no_ranked_matches_pre: "Pas de match classé pour l'équipe "
     no_ranked_matches_post: "! Affronte d'autres compétiteurs et reviens ici pour classer ta partie."
@@ -675,35 +790,38 @@ module.exports = nativeDescription: "français", englishDescription: "French", t
     warmup: "Préchauffe"
     vs: "VS"
 #    friends_playing: "Friends Playing"
-#    log_in_for_friends: "Log in to play with your friends!"
-#    social_connect_blurb: "Connect and play against your friends!"
+    log_in_for_friends: "Connectez vous pour jouer avec vos amis!"
+    social_connect_blurb: "Connectez vous pour jouer contre vos amis!"
 #    invite_friends_to_battle: "Invite your friends to join you in battle!"
-#    fight: "Fight!"
-#    watch_victory: "Watch your victory"
+    fight: "Combattez !"
+    watch_victory: "Regardez votre victoire"
 #    defeat_the: "Defeat the"
-#    tournament_ends: "Tournament ends"
-#    tournament_rules: "Tournament Rules"
+    tournament_ends: "Fin du tournoi"
+#    tournament_ended: "Tournament ended"
+    tournament_rules: "Règles du tournoi"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
-#    tournament_blurb_blog: "on our blog"
+    tournament_blurb_blog: "Sur notre blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
-#  ladder_prizes:
-#    title: "Tournament Prizes"
+  ladder_prizes:
+    title: "Prix du tournoi"
 #    blurb_1: "These prizes will be awarded according to"
-#    blurb_2: "the tournament rules"
+    blurb_2: "Régles du tournoi"
 #    blurb_3: "to the top human and ogre players."
 #    blurb_4: "Two teams means double the prizes!"
 #    blurb_5: "(There will be two first place winners, two second-place winners, etc.)"
-#    rank: "Rank"
-#    prizes: "Prizes"
-#    total_value: "Total Value"
+    rank: "Rang"
+    prizes: "Prix"
+    total_value: "Valeur totale"
 #    in_cash: "in cash"
 #    custom_wizard: "Custom CodeCombat Wizard"
 #    custom_avatar: "Custom CodeCombat avatar"
 #    heap: "for six months of \"Startup\" access"
-#    credits: "credits"
+    credits: "Crédits"
 #    one_month_coupon: "coupon: choose either Rails or HTML"
 #    one_month_discount: "discount, 30% off: choose either Rails or HTML"
-#    license: "license"
+    license: "Licence"
 #    oreilly: "ebook of your choice"
 
   multiplayer_launch:
@@ -714,61 +832,62 @@ module.exports = nativeDescription: "français", englishDescription: "French", t
 #    arenas_are_here: "CodeCombat head-to-head multiplayer arenas are here."
 #    ladder_explanation: "Choose your heroes, enchant your human or ogre armies, and climb your way over defeated fellow Wizards to reach the top of the ladders–then challenge your friends in our glorious, asynchronous multiplayer coding arenas. If you're feeling creative, you can even"
 #    fork_our_arenas: "fork our arenas"
-#    create_worlds: "and create your own worlds."
+    create_worlds: "et créez votre monde"
     javascript_rusty: "JavaScript un peu rouillé? Pas de souci; il y a un"
-    tutorial: "tutoriel"
+    tutorial: "Tutoriel"
     new_to_programming: ". Débutant en programmation? Essaie la campagne débutant pour progresser."
     so_ready: "Je Suis Prêt Pour Ca"
 
-#  loading_error:
-#    could_not_load: "Error loading from server"
-#    connection_failure: "Connection failed."
-#    unauthorized: "You need to be signed in. Do you have cookies disabled?"
-#    forbidden: "You do not have the permissions."
-#    not_found: "Not found."
-#    not_allowed: "Method not allowed."
-#    timeout: "Server timeout."
-#    conflict: "Resource conflict."
-#    bad_input: "Bad input."
-#    server_error: "Server error."
-#    unknown: "Unknown error."
+  loading_error:
+    could_not_load: "Erreur de chargement du serveur"
+    connection_failure: "La connexion a échouée."
+    unauthorized: "Vous devez être identifiée pour faire cela. Avez-vous désactivé les cookies ?"
+    forbidden: "Vous n'avez pas la permission."
+    not_found: "Introuvable."
+    not_allowed: "Méthode non autorisée."
+    timeout: "Connexion au serveur écoulée."
+    conflict: "Conflit de Ressources."
+    bad_input: "Données incorrectes ."
+    server_error: "Erreur serveur."
+    unknown: "Erreur inconnue."
 
-#  resources:
-#    your_sessions: "Your Sessions"
-#    level: "Level"
+  resources:
+    your_sessions: "vos Sessions"
+    level: "Niveau"
 #    social_network_apis: "Social Network APIs"
-#    facebook_status: "Facebook Status"
-#    facebook_friends: "Facebook Friends"
+    facebook_status: "Statut Facebook"
+    facebook_friends: "Amis Facebook"
 #    facebook_friend_sessions: "Facebook Friend Sessions"
 #    gplus_friends: "G+ Friends"
 #    gplus_friend_sessions: "G+ Friend Sessions"
-#    leaderboard: "Leaderboard"
+    leaderboard: "Classement"
 #    user_schema: "User Schema"
 #    user_profile: "User Profile"
-#    patches: "Patches"
+    patches: "Patchs"
 #    patched_model: "Source Document"
 #    model: "Model"
-#    system: "System"
+    system: "Système"
 #    component: "Component"
 #    components: "Components"
 #    thang: "Thang"
 #    thangs: "Thangs"
 #    level_session: "Your Session"
 #    opponent_session: "Opponent Session"
-#    article: "Article"
-#    user_names: "User Names"
+    article: "Article"
+    user_names: "Nom d'utilisateur"
 #    thang_names: "Thang Names"
-#    files: "Files"
-#    top_simulators: "Top Simulators"
-#    source_document: "Source Document"
-#    document: "Document"
+    files: "Fichiers"
+    top_simulators: "Top Simulateurs"
+    source_document: "Document Source"
+    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
-#  delta:
-#    added: "Added"
-#    modified: "Modified"
-#    deleted: "Deleted"
-#    moved_index: "Moved Index"
-#    text_diff: "Text Diff"
-#    merge_conflict_with: "MERGE CONFLICT WITH"
-#    no_changes: "No Changes"
+  delta:
+    added: "Ajouté"
+    modified: "Modifié"
+    deleted: "Supprimé"
+    moved_index: "Index changé"
+    text_diff: "Différence de texte"
+    merge_conflict_with: "Fusionner les conflits avec"
+    no_changes: "Aucuns Changements"
diff --git a/app/locale/he.coffee b/app/locale/he.coffee
index c7e72feb3..e1a583ecd 100644
--- a/app/locale/he.coffee
+++ b/app/locale/he.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "עברית", englishDescription: "Hebrew",
 #    minutes: "minutes"
 #    hour: "hour"
 #    hours: "hours"
+#    day: "day"
+#    days: "days"
+#    week: "week"
+#    weeks: "weeks"
+#    month: "month"
+#    months: "months"
+#    year: "year"
+#    years: "years"
 
   modal:
     close: "סגור"
@@ -185,25 +193,126 @@ module.exports = nativeDescription: "עברית", englishDescription: "Hebrew",
 #    view_profile: "View Your Profile"
 
   account_profile:
-    edit_settings: "ערוך הגדרות"
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
     profile_for_prefix: "פרופיל ל"
     profile_for_suffix: ""
-#    approved: "Approved"
-#    not_approved: "Not Approved"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
 #    looking_for: "Looking for:"
 #    last_updated: "Last updated:"
 #    contact: "Contact"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+#    next_city: "city?"
+#    next_country: "pick your country."
+#    next_name: "name?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
 #    work_experience: "Work Experience"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
 #    education: "Education"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
 #    our_notes: "Our Notes"
 #    projects: "Projects"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
 #  employers:
-#    want_to_hire_our_players: "Want to hire expert CodeCombat players?"
+#    want_to_hire_our_players: "Hire CodeCombat Players"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-#    candidates_count_prefix: "We currently have "
-#    candidates_count_many: "many"
-#    candidates_count_suffix: "highly skilled and vetted developers looking for work."
 #    candidate_name: "Name"
 #    candidate_location: "Location"
 #    candidate_looking_for: "Looking For"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "עברית", englishDescription: "Hebrew",
 #    candidate_top_skills: "Top Skills"
 #    candidate_years_experience: "Yrs Exp"
 #    candidate_last_updated: "Last Updated"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
 #  play_level:
 #    done: "Done"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "עברית", englishDescription: "Hebrew",
 #    av_entities_sub_title: "Entities"
 #    av_entities_users_url: "Users"
 #    av_entities_active_instances_url: "Active Instances"
+#    av_entities_employer_list_url: "Employer List"
 #    av_other_sub_title: "Other"
 #    av_other_debug_base_url: "Base (for debugging base.jade)"
 #    u_title: "User List"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "עברית", englishDescription: "Hebrew",
 #    thang_description: "Build units, defining their default logic, graphics and audio. Currently only supports importing Flash exported vector graphics."
 #    level_title: "Level Editor"
 #    level_description: "Includes the tools for scripting, uploading audio, and constructing custom logic to create all sorts of levels. Everything we use ourselves!"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
 #    contact_us: "Contact us!"
 #    hipchat_prefix: "You can also find us in our"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "עברית", englishDescription: "Hebrew",
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
 #    article_search_title: "Search Articles Here"
 #    thang_search_title: "Search Thang Types Here"
 #    level_search_title: "Search Levels Here"
+#    achievement_search_title: "Search Achievements"
 #    read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
 #  article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "עברית", englishDescription: "Hebrew",
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "עברית", englishDescription: "Hebrew",
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/hi.coffee b/app/locale/hi.coffee
index 95fa9c4a8..18e9e5684 100644
--- a/app/locale/hi.coffee
+++ b/app/locale/hi.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "मानक हिन्दी", englishDe
 #    minutes: "minutes"
 #    hour: "hour"
 #    hours: "hours"
+#    day: "day"
+#    days: "days"
+#    week: "week"
+#    weeks: "weeks"
+#    month: "month"
+#    months: "months"
+#    year: "year"
+#    years: "years"
 
 #  modal:
 #    close: "Close"
@@ -185,25 +193,126 @@ module.exports = nativeDescription: "मानक हिन्दी", englishDe
 #    view_profile: "View Your Profile"
 
 #  account_profile:
-#    edit_settings: "Edit Settings"
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
 #    profile_for_prefix: "Profile for "
 #    profile_for_suffix: ""
-#    approved: "Approved"
-#    not_approved: "Not Approved"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
 #    looking_for: "Looking for:"
 #    last_updated: "Last updated:"
 #    contact: "Contact"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+#    next_city: "city?"
+#    next_country: "pick your country."
+#    next_name: "name?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
 #    work_experience: "Work Experience"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
 #    education: "Education"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
 #    our_notes: "Our Notes"
 #    projects: "Projects"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
 #  employers:
-#    want_to_hire_our_players: "Want to hire expert CodeCombat players?"
+#    want_to_hire_our_players: "Hire CodeCombat Players"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-#    candidates_count_prefix: "We currently have "
-#    candidates_count_many: "many"
-#    candidates_count_suffix: "highly skilled and vetted developers looking for work."
 #    candidate_name: "Name"
 #    candidate_location: "Location"
 #    candidate_looking_for: "Looking For"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "मानक हिन्दी", englishDe
 #    candidate_top_skills: "Top Skills"
 #    candidate_years_experience: "Yrs Exp"
 #    candidate_last_updated: "Last Updated"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
 #  play_level:
 #    done: "Done"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "मानक हिन्दी", englishDe
 #    av_entities_sub_title: "Entities"
 #    av_entities_users_url: "Users"
 #    av_entities_active_instances_url: "Active Instances"
+#    av_entities_employer_list_url: "Employer List"
 #    av_other_sub_title: "Other"
 #    av_other_debug_base_url: "Base (for debugging base.jade)"
 #    u_title: "User List"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "मानक हिन्दी", englishDe
 #    thang_description: "Build units, defining their default logic, graphics and audio. Currently only supports importing Flash exported vector graphics."
 #    level_title: "Level Editor"
 #    level_description: "Includes the tools for scripting, uploading audio, and constructing custom logic to create all sorts of levels. Everything we use ourselves!"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
 #    contact_us: "Contact us!"
 #    hipchat_prefix: "You can also find us in our"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "मानक हिन्दी", englishDe
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
 #    article_search_title: "Search Articles Here"
 #    thang_search_title: "Search Thang Types Here"
 #    level_search_title: "Search Levels Here"
+#    achievement_search_title: "Search Achievements"
 #    read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
 #  article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "मानक हिन्दी", englishDe
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "मानक हिन्दी", englishDe
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/hu.coffee b/app/locale/hu.coffee
index ddddf3b93..24c6fe62a 100644
--- a/app/locale/hu.coffee
+++ b/app/locale/hu.coffee
@@ -3,7 +3,7 @@ module.exports = nativeDescription: "magyar", englishDescription: "Hungarian", t
     loading: "Töltés..."
     saving: "Mentés..."
     sending: "Küldés..."
-#    send: "Send"
+    send: "Küldés indítása"
     cancel: "Mégse"
     save: "Mentés"
 #    publish: "Publish"
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "magyar", englishDescription: "Hungarian", t
     minutes: "percek"
     hour: "óra"
     hours: "órák"
+    day: "nap"
+    days: "napok"
+    week: "hét"
+    weeks: "hetek"
+    month: "hónap"
+    months: "hónapok"
+    year: "év"
+    years: "évek"
 
   modal:
     close: "Mégse"
@@ -61,7 +69,7 @@ module.exports = nativeDescription: "magyar", englishDescription: "Hungarian", t
   login:
     sign_up: "Regisztráció"
     log_in: "Bejelentkezés"
-#    logging_in: "Logging In"
+    logging_in: "Bejelentkezés"
     log_out: "Kijelentkezés"
     recover: "meglévő fiók visszaállítása"
 
@@ -78,11 +86,11 @@ module.exports = nativeDescription: "magyar", englishDescription: "Hungarian", t
     creating: "Fiók létrehozása"
     sign_up: "Regisztráció"
     log_in: "Belépés meglévő fiókkal"
-#    social_signup: "Or, you can sign up through Facebook or G+:"
-#    required: "You need to log in before you can go that way."
+    social_signup: "De regisztrálhatsz a Facebook-on vagy a G+:-on keresztül is."
+    required: "Csak akkor mehetsz arra, ha már bejelentkeztél."
 
   home:
-    slogan: "Tanulj meg JavaScript nyelven programozni, miközben játszol!"
+    slogan: "Tanulj meg nyelven programozni, miközben játszol!"
     no_ie: "A CodeCombat nem támogatja az Internet Explorer 9, vagy korábbi verzióit. Bocsi!"
     no_mobile: "A CodeCombat nem mobil eszközökre lett tervezve. Valószínűleg nem működik helyesen."
     play: "Játssz!"
@@ -166,10 +174,10 @@ module.exports = nativeDescription: "magyar", englishDescription: "Hungarian", t
     email_announcements_description: "Szeretnél levelet kapni a legújabb fejlesztéseinkről?"
     email_notifications: "Értesítések"
 #    email_notifications_summary: "Controls for personalized, automatic email notifications related to your CodeCombat activity."
-#    email_any_notes: "Any Notifications"
-#    email_any_notes_description: "Disable to stop all activity notification emails."
-#    email_recruit_notes: "Job Opportunities"
-#    email_recruit_notes_description: "If you play really well, we may contact you about getting you a (better) job."
+    email_any_notes: "Bármely értesítés"
+    email_any_notes_description: "Minden tevékenységgel kapcsolatos e-mail értesítés letiltása."
+    email_recruit_notes: "Álláslehetőségek"
+    email_recruit_notes_description: "Ha igazán jól játszol lehet, hogy felveszzük veled a kapcsolatot és megbeszéljük, hogy szerezzünk-e neked egy (jobb) állást."
     contributor_emails: "Hozzájárulóknak szóló levelek"
     contribute_prefix: "Folyamatosan keresünk embereket, hogy csatlakozzanak hozzánk. Nézz rá a "
     contribute_page: "segítők oldalára"
@@ -181,29 +189,130 @@ module.exports = nativeDescription: "magyar", englishDescription: "Hungarian", t
     job_profile: "Munkaköri leírás"
     job_profile_approved: "Munkaköri leírásodat a Codecombat jóváhagyta. Munkaadók mindaddig láthatják, amíg meg nem jelölöd inaktíként, vagy négy hétig,ha addig nem kerül megváltoztatásra."
     job_profile_explanation: "Szió! Töltsd ki ezt és majd kapcsolatba lépünk veled és keresünk neked egy szoftware fejlesztői állást."
-#    sample_profile: "See a sample profile"
-#    view_profile: "View Your Profile"
+    sample_profile: "Nézz meg egy mintaprofilt!"
+    view_profile: "Nézd meg a profilodat!"
 
   account_profile:
-    edit_settings: "Beállítások szerkesztése"
-#    profile_for_prefix: "Profile for "
-#    profile_for_suffix: ""
-    approved: "Jóváhagyva"
-    not_approved: "Nincs jóváhagyva"
+#    settings: "Settings"
+    edit_profile: "Szerkeszd meg a profilodat"
+    done_editing: "Szerkesztés kész"
+    profile_for_prefix: "Profil "
+    profile_for_suffix: " számára"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
     looking_for: "Keres:"
     last_updated: "Legutóbb napra-készre hozva:"
     contact: "Kapcsolat"
+    active: "Azonnali interjú ajánlatokat keresek"
+    inactive: "Most éppen nem keresek interjú ajánlatokat"
+#    complete: "complete"
+    next: "Következő"
+    next_city: "Város?"
+#    next_country: "pick your country."
+    next_name: "Név?"
+    next_short_description: "adj egy rövid leírást."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
     work_experience: "Munkatapasztalat"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
     education: "Végzettség"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
 #    our_notes: "Our Notes"
     projects: "Projektek"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
   employers:
     want_to_hire_our_players: "Akarsz szakértő CodeCombat játékosokat alkalmazni?"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-    candidates_count_prefix: "Pillanatnyilag van"
-    candidates_count_many: "sok"
-    candidates_count_suffix: "magasan képzett és ellenőrzött fejlesztő, aki munkát keres."
     candidate_name: "Név"
 #    candidate_location: "Location"
     candidate_looking_for: "Keres"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "magyar", englishDescription: "Hungarian", t
 #    candidate_top_skills: "Top Skills"
 #    candidate_years_experience: "Yrs Exp"
     candidate_last_updated: "Legutóbb napra-készre hozva"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
   play_level:
     done: "Kész"
@@ -221,17 +331,17 @@ module.exports = nativeDescription: "magyar", englishDescription: "Hungarian", t
     home: "Kezdőlap"
     guide: "Segítség"
     multiplayer: "Többjátékos"
-    restart: "Előről"
+    restart: "Előlről"
     goals: "Célok"
-#    success: "Success!"
-#    incomplete: "Incomplete"
-#    timed_out: "Ran out of time"
+    success: "Sikerült!"
+    incomplete: "Hiányos"
+    timed_out: "Kifutottál az időből"
 #    failing: "Failing"
     action_timeline: "Akció - Idővonal"
     click_to_select: "Kattints egy egységre, hogy kijelöld!"
     reload_title: "Újra kezded mindet?"
-    reload_really: "Biztos vagy benne, hogy előről szeretnéd kezdeni az egész pályát?"
-    reload_confirm: "Előről az egészet"
+    reload_really: "Biztos vagy benne, hogy előlről szeretnéd kezdeni az egész pályát?"
+    reload_confirm: "Előlről az egészet"
 #    victory_title_prefix: ""
     victory_title_suffix: "Kész"
     victory_sign_up: "Regisztrálj a friss infókért"
@@ -253,15 +363,15 @@ module.exports = nativeDescription: "magyar", englishDescription: "Hungarian", t
     tome_minion_spells: "Egységeid varázslatai"
     tome_read_only_spells: "Csak olvasható varázslatok"
     tome_other_units: "Egyéb egységek"
-#    tome_cast_button_castable: "Cast Spell"
-#    tome_cast_button_casting: "Casting"
-#    tome_cast_button_cast: "Spell Cast"
+    tome_cast_button_castable: "Bocsáss rá varázslatot!"
+    tome_cast_button_casting: "Varázslat folyamatban"
+    tome_cast_button_cast: "Varázslat végrehajtva."
     tome_autocast_delay: "Automatikus varázslás késleltetés"
     tome_select_spell: "Válassz egy varázslatot"
     tome_select_a_thang: "Válassz ki valakit "
     tome_available_spells: "Elérhető varázslatok"
     hud_continue: "Folytatás (shift+space)"
-#    spell_saved: "Spell Saved"
+    spell_saved: "Varázslat elmentve."
 #    skip_tutorial: "Skip (esc)"
 #    editor_config: "Editor Config"
 #    editor_config_title: "Editor Configuration"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "magyar", englishDescription: "Hungarian", t
 #    av_entities_sub_title: "Entities"
 #    av_entities_users_url: "Users"
 #    av_entities_active_instances_url: "Active Instances"
+#    av_entities_employer_list_url: "Employer List"
 #    av_other_sub_title: "Other"
 #    av_other_debug_base_url: "Base (for debugging base.jade)"
 #    u_title: "User List"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "magyar", englishDescription: "Hungarian", t
 #    thang_description: "Build units, defining their default logic, graphics and audio. Currently only supports importing Flash exported vector graphics."
 #    level_title: "Level Editor"
 #    level_description: "Includes the tools for scripting, uploading audio, and constructing custom logic to create all sorts of levels. Everything we use ourselves!"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
 #    contact_us: "Contact us!"
 #    hipchat_prefix: "You can also find us in our"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "magyar", englishDescription: "Hungarian", t
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
 #    article_search_title: "Search Articles Here"
 #    thang_search_title: "Search Thang Types Here"
 #    level_search_title: "Search Levels Here"
+#    achievement_search_title: "Search Achievements"
 #    read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
 #  article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "magyar", englishDescription: "Hungarian", t
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "magyar", englishDescription: "Hungarian", t
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/id.coffee b/app/locale/id.coffee
index 839c075d8..222406a1b 100644
--- a/app/locale/id.coffee
+++ b/app/locale/id.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "Bahasa Indonesia", englishDescription: "Ind
 #    minutes: "minutes"
 #    hour: "hour"
 #    hours: "hours"
+#    day: "day"
+#    days: "days"
+#    week: "week"
+#    weeks: "weeks"
+#    month: "month"
+#    months: "months"
+#    year: "year"
+#    years: "years"
 
 #  modal:
 #    close: "Close"
@@ -185,25 +193,126 @@ module.exports = nativeDescription: "Bahasa Indonesia", englishDescription: "Ind
 #    view_profile: "View Your Profile"
 
 #  account_profile:
-#    edit_settings: "Edit Settings"
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
 #    profile_for_prefix: "Profile for "
 #    profile_for_suffix: ""
-#    approved: "Approved"
-#    not_approved: "Not Approved"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
 #    looking_for: "Looking for:"
 #    last_updated: "Last updated:"
 #    contact: "Contact"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+#    next_city: "city?"
+#    next_country: "pick your country."
+#    next_name: "name?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
 #    work_experience: "Work Experience"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
 #    education: "Education"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
 #    our_notes: "Our Notes"
 #    projects: "Projects"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
 #  employers:
-#    want_to_hire_our_players: "Want to hire expert CodeCombat players?"
+#    want_to_hire_our_players: "Hire CodeCombat Players"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-#    candidates_count_prefix: "We currently have "
-#    candidates_count_many: "many"
-#    candidates_count_suffix: "highly skilled and vetted developers looking for work."
 #    candidate_name: "Name"
 #    candidate_location: "Location"
 #    candidate_looking_for: "Looking For"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "Bahasa Indonesia", englishDescription: "Ind
 #    candidate_top_skills: "Top Skills"
 #    candidate_years_experience: "Yrs Exp"
 #    candidate_last_updated: "Last Updated"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
 #  play_level:
 #    done: "Done"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "Bahasa Indonesia", englishDescription: "Ind
 #    av_entities_sub_title: "Entities"
 #    av_entities_users_url: "Users"
 #    av_entities_active_instances_url: "Active Instances"
+#    av_entities_employer_list_url: "Employer List"
 #    av_other_sub_title: "Other"
 #    av_other_debug_base_url: "Base (for debugging base.jade)"
 #    u_title: "User List"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "Bahasa Indonesia", englishDescription: "Ind
 #    thang_description: "Build units, defining their default logic, graphics and audio. Currently only supports importing Flash exported vector graphics."
 #    level_title: "Level Editor"
 #    level_description: "Includes the tools for scripting, uploading audio, and constructing custom logic to create all sorts of levels. Everything we use ourselves!"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
 #    contact_us: "Contact us!"
 #    hipchat_prefix: "You can also find us in our"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "Bahasa Indonesia", englishDescription: "Ind
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
 #    article_search_title: "Search Articles Here"
 #    thang_search_title: "Search Thang Types Here"
 #    level_search_title: "Search Levels Here"
+#    achievement_search_title: "Search Achievements"
 #    read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
 #  article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "Bahasa Indonesia", englishDescription: "Ind
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "Bahasa Indonesia", englishDescription: "Ind
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/it.coffee b/app/locale/it.coffee
index 8493a00f8..35e60ccfb 100644
--- a/app/locale/it.coffee
+++ b/app/locale/it.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "Italiano", englishDescription: "Italian", t
 #    minutes: "minutes"
 #    hour: "hour"
 #    hours: "hours"
+#    day: "day"
+#    days: "days"
+#    week: "week"
+#    weeks: "weeks"
+#    month: "month"
+#    months: "months"
+#    year: "year"
+#    years: "years"
 
   modal:
     close: "Chiudi"
@@ -82,7 +90,7 @@ module.exports = nativeDescription: "Italiano", englishDescription: "Italian", t
 #    required: "You need to log in before you can go that way."
 
   home:
-    slogan: "Impara a programmare in JavaScript giocando"
+    slogan: "Impara a programmare giocando"
     no_ie: "CodeCombat non supporta Internet Explorer 9 o browser precedenti. Ci dispiace!"
     no_mobile: "CodeCombat non è stato progettato per dispositivi mobile e potrebbe non funzionare!"
     play: "Gioca"
@@ -185,25 +193,126 @@ module.exports = nativeDescription: "Italiano", englishDescription: "Italian", t
 #    view_profile: "View Your Profile"
 
   account_profile:
-    edit_settings: "Modifica impostazioni"
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
     profile_for_prefix: "Profilo di "
     profile_for_suffix: ""
-#    approved: "Approved"
-#    not_approved: "Not Approved"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
 #    looking_for: "Looking for:"
 #    last_updated: "Last updated:"
 #    contact: "Contact"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+#    next_city: "city?"
+#    next_country: "pick your country."
+#    next_name: "name?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
 #    work_experience: "Work Experience"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
 #    education: "Education"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
 #    our_notes: "Our Notes"
 #    projects: "Projects"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
 #  employers:
-#    want_to_hire_our_players: "Want to hire expert CodeCombat players?"
+#    want_to_hire_our_players: "Hire CodeCombat Players"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-#    candidates_count_prefix: "We currently have "
-#    candidates_count_many: "many"
-#    candidates_count_suffix: "highly skilled and vetted developers looking for work."
 #    candidate_name: "Name"
 #    candidate_location: "Location"
 #    candidate_looking_for: "Looking For"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "Italiano", englishDescription: "Italian", t
 #    candidate_top_skills: "Top Skills"
 #    candidate_years_experience: "Yrs Exp"
 #    candidate_last_updated: "Last Updated"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
   play_level:
     done: "Fatto"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "Italiano", englishDescription: "Italian", t
     av_entities_sub_title: "Entità"
     av_entities_users_url: "Utenti"
     av_entities_active_instances_url: "Istanze attive"
+#    av_entities_employer_list_url: "Employer List"
     av_other_sub_title: "Altro"
     av_other_debug_base_url: "Base (for debugging base.jade)"
     u_title: "Lista utenti"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "Italiano", englishDescription: "Italian", t
     thang_description: "Costruisci unità di gioco, definendo la loro logica di base, la grafica e l'audio. Per il momento si può soltanto importare grafica vettoriale esportata da Flash."
     level_title: "Modifica livello"
     level_description: "Comprende gli attrezzi per programmare, inviare audio e costruire unità logiche personalizzate per creare qualsiasi tipo di livello. Tutto quello che noi stessi usiamo!"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
     contact_us: "scrivici!"
     hipchat_prefix: "Ci puoi anche trovare nella nostra"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "Italiano", englishDescription: "Italian", t
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
 #    article_search_title: "Search Articles Here"
 #    thang_search_title: "Search Thang Types Here"
 #    level_search_title: "Search Levels Here"
+#    achievement_search_title: "Search Achievements"
 #    read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
   article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "Italiano", englishDescription: "Italian", t
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "Italiano", englishDescription: "Italian", t
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/ja.coffee b/app/locale/ja.coffee
index 4b6ef0358..8f19ae524 100644
--- a/app/locale/ja.coffee
+++ b/app/locale/ja.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "日本語", englishDescription: "Japanese",
 #    minutes: "minutes"
 #    hour: "hour"
 #    hours: "hours"
+#    day: "day"
+#    days: "days"
+#    week: "week"
+#    weeks: "weeks"
+#    month: "month"
+#    months: "months"
+#    year: "year"
+#    years: "years"
 
   modal:
     close: "閉じる"
@@ -82,7 +90,7 @@ module.exports = nativeDescription: "日本語", englishDescription: "Japanese",
 #    required: "You need to log in before you can go that way."
 
   home:
-    slogan: "ゲームをプレイしてJavaScriptを学びましょう"
+    slogan: "ゲームをプレイして学びましょう"
     no_ie: "大変申し訳ありませんが、ご利用のブラウザ(IE8以下)はサポートされていません。(ChromeやFirefoxをご利用ください)"
     no_mobile: "CodeCombat は携帯端末向けに制作されていないため、動作しない可能性があります。"
     play: "ゲームスタート"
@@ -185,25 +193,126 @@ module.exports = nativeDescription: "日本語", englishDescription: "Japanese",
 #    view_profile: "View Your Profile"
 
   account_profile:
-    edit_settings: "設定"
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
 #    profile_for_prefix: "Profile for "
     profile_for_suffix: "のプロフィール"
-    approved: "承認"
-    not_approved: "非承認"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
     looking_for: "検索:"
     last_updated: "最終更新:"
 #    contact: "Contact"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+#    next_city: "city?"
+#    next_country: "pick your country."
+#    next_name: "name?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
     work_experience: "職務経験"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
     education: "学歴"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
 #    our_notes: "Our Notes"
 #    projects: "Projects"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
   employers:
     want_to_hire_our_players: "CodeCombatのエキスパートプレイヤーをお探しですか?"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-    candidates_count_prefix: "現在、仕事を探している優秀で審査済みの開発者が"
-    candidates_count_many: "多数"
-    candidates_count_suffix: "います"
     candidate_name: "名前"
     candidate_location: "勤務地"
     candidate_looking_for: "希望"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "日本語", englishDescription: "Japanese",
     candidate_top_skills: "得意分野"
     candidate_years_experience: "経験年数"
     candidate_last_updated: "最終更新日時"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
   play_level:
     done: "完了"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "日本語", englishDescription: "Japanese",
 #    av_entities_sub_title: "Entities"
     av_entities_users_url: "ユーザー"
 #    av_entities_active_instances_url: "Active Instances"
+#    av_entities_employer_list_url: "Employer List"
     av_other_sub_title: "その他"
 #    av_other_debug_base_url: "Base (for debugging base.jade)"
 #    u_title: "User List"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "日本語", englishDescription: "Japanese",
 #    thang_description: "Build units, defining their default logic, graphics and audio. Currently only supports importing Flash exported vector graphics."
 #    level_title: "Level Editor"
 #    level_description: "Includes the tools for scripting, uploading audio, and constructing custom logic to create all sorts of levels. Everything we use ourselves!"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
 #    contact_us: "Contact us!"
 #    hipchat_prefix: "You can also find us in our"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "日本語", englishDescription: "Japanese",
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
 #    article_search_title: "Search Articles Here"
 #    thang_search_title: "Search Thang Types Here"
 #    level_search_title: "Search Levels Here"
+#    achievement_search_title: "Search Achievements"
 #    read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
 #  article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "日本語", englishDescription: "Japanese",
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "日本語", englishDescription: "Japanese",
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/ko.coffee b/app/locale/ko.coffee
index 774f92e25..e54338064 100644
--- a/app/locale/ko.coffee
+++ b/app/locale/ko.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "한국어", englishDescription: "Korean", t
 #    minutes: "minutes"
 #    hour: "hour"
 #    hours: "hours"
+#    day: "day"
+#    days: "days"
+#    week: "week"
+#    weeks: "weeks"
+#    month: "month"
+#    months: "months"
+#    year: "year"
+#    years: "years"
 
   modal:
     close: "Close"
@@ -82,7 +90,7 @@ module.exports = nativeDescription: "한국어", englishDescription: "Korean", t
 #    required: "You need to log in before you can go that way."
 
   home:
-    slogan: "쉽고 간단한 게임으로 자바스크립트 배우기"
+    slogan: "쉽고 간단한 게임배우기"
     no_ie: "죄송하지만 코드컴뱃은 인터넷 익스플로러 9에서는 동작하지 않습니다."
     no_mobile: "코드 컴뱃은 모바일 기기용으로 제작되지 않았습니다. 아마 동작하지 않을 가능성이 높습니다."
     play: "시작"
@@ -185,25 +193,126 @@ module.exports = nativeDescription: "한국어", englishDescription: "Korean", t
 #    view_profile: "View Your Profile"
 
   account_profile:
-    edit_settings: "설정사항 변경"
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
     profile_for_prefix: "프로필 "
     profile_for_suffix: ""
-#    approved: "Approved"
-#    not_approved: "Not Approved"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
 #    looking_for: "Looking for:"
 #    last_updated: "Last updated:"
 #    contact: "Contact"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+#    next_city: "city?"
+#    next_country: "pick your country."
+#    next_name: "name?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
 #    work_experience: "Work Experience"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
 #    education: "Education"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
 #    our_notes: "Our Notes"
 #    projects: "Projects"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
 #  employers:
-#    want_to_hire_our_players: "Want to hire expert CodeCombat players?"
+#    want_to_hire_our_players: "Hire CodeCombat Players"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-#    candidates_count_prefix: "We currently have "
-#    candidates_count_many: "many"
-#    candidates_count_suffix: "highly skilled and vetted developers looking for work."
 #    candidate_name: "Name"
 #    candidate_location: "Location"
 #    candidate_looking_for: "Looking For"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "한국어", englishDescription: "Korean", t
 #    candidate_top_skills: "Top Skills"
 #    candidate_years_experience: "Yrs Exp"
 #    candidate_last_updated: "Last Updated"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
   play_level:
     done: "완료"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "한국어", englishDescription: "Korean", t
     av_entities_sub_title: "속성들"
     av_entities_users_url: "유저들"
     av_entities_active_instances_url: "액티브 인스턴스들"
+#    av_entities_employer_list_url: "Employer List"
     av_other_sub_title: "다른 사람들"
     av_other_debug_base_url: "베이스 (base.jade 디버깅)"
     u_title: "유저 목록"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "한국어", englishDescription: "Korean", t
     thang_description: "유닛들, 기본적인 인공지능, 그래픽과 오디오등을 직접 빌드하세요. 현재는 백터 그래픽으로 추출된 플래시파일만 임폴트 가능합니다."
     level_title: "레벨 에디터"
     level_description: "스크립팅, 오디오 업로드, 모든 레벨을 생성하기 위한 사용자 정의 로직등 우리가 사용하는 모든 것들을 구축하는 것을 위한 툴들을 포함합니다."
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
     contact_us: "연락하기!"
     hipchat_prefix: "당신은 또한 우리를 여기에서 찾을 수 있습니다 : "
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "한국어", englishDescription: "Korean", t
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
     article_search_title: "기사들은 여기에서 찾으세요"
     thang_search_title: "Thang 타입들은 여기에서 찾으세요"
     level_search_title: "레벨들은 여기에서 찾으세요"
+#    achievement_search_title: "Search Achievements"
 #    read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
   article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "한국어", englishDescription: "Korean", t
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "한국어", englishDescription: "Korean", t
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/lt.coffee b/app/locale/lt.coffee
index 5e5e6b2ef..1c868c296 100644
--- a/app/locale/lt.coffee
+++ b/app/locale/lt.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "lietuvių kalba", englishDescription: "Lith
 #    minutes: "minutes"
 #    hour: "hour"
 #    hours: "hours"
+#    day: "day"
+#    days: "days"
+#    week: "week"
+#    weeks: "weeks"
+#    month: "month"
+#    months: "months"
+#    year: "year"
+#    years: "years"
 
 #  modal:
 #    close: "Close"
@@ -185,25 +193,126 @@ module.exports = nativeDescription: "lietuvių kalba", englishDescription: "Lith
 #    view_profile: "View Your Profile"
 
 #  account_profile:
-#    edit_settings: "Edit Settings"
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
 #    profile_for_prefix: "Profile for "
 #    profile_for_suffix: ""
-#    approved: "Approved"
-#    not_approved: "Not Approved"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
 #    looking_for: "Looking for:"
 #    last_updated: "Last updated:"
 #    contact: "Contact"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+#    next_city: "city?"
+#    next_country: "pick your country."
+#    next_name: "name?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
 #    work_experience: "Work Experience"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
 #    education: "Education"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
 #    our_notes: "Our Notes"
 #    projects: "Projects"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
 #  employers:
-#    want_to_hire_our_players: "Want to hire expert CodeCombat players?"
+#    want_to_hire_our_players: "Hire CodeCombat Players"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-#    candidates_count_prefix: "We currently have "
-#    candidates_count_many: "many"
-#    candidates_count_suffix: "highly skilled and vetted developers looking for work."
 #    candidate_name: "Name"
 #    candidate_location: "Location"
 #    candidate_looking_for: "Looking For"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "lietuvių kalba", englishDescription: "Lith
 #    candidate_top_skills: "Top Skills"
 #    candidate_years_experience: "Yrs Exp"
 #    candidate_last_updated: "Last Updated"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
 #  play_level:
 #    done: "Done"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "lietuvių kalba", englishDescription: "Lith
 #    av_entities_sub_title: "Entities"
 #    av_entities_users_url: "Users"
 #    av_entities_active_instances_url: "Active Instances"
+#    av_entities_employer_list_url: "Employer List"
 #    av_other_sub_title: "Other"
 #    av_other_debug_base_url: "Base (for debugging base.jade)"
 #    u_title: "User List"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "lietuvių kalba", englishDescription: "Lith
 #    thang_description: "Build units, defining their default logic, graphics and audio. Currently only supports importing Flash exported vector graphics."
 #    level_title: "Level Editor"
 #    level_description: "Includes the tools for scripting, uploading audio, and constructing custom logic to create all sorts of levels. Everything we use ourselves!"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
 #    contact_us: "Contact us!"
 #    hipchat_prefix: "You can also find us in our"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "lietuvių kalba", englishDescription: "Lith
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
 #    article_search_title: "Search Articles Here"
 #    thang_search_title: "Search Thang Types Here"
 #    level_search_title: "Search Levels Here"
+#    achievement_search_title: "Search Achievements"
 #    read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
 #  article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "lietuvių kalba", englishDescription: "Lith
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "lietuvių kalba", englishDescription: "Lith
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/ms.coffee b/app/locale/ms.coffee
index 1ff9f9739..008d2863f 100644
--- a/app/locale/ms.coffee
+++ b/app/locale/ms.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "Bahasa Melayu", englishDescription: "Bahasa
 #    minutes: "minutes"
 #    hour: "hour"
 #    hours: "hours"
+#    day: "day"
+#    days: "days"
+#    week: "week"
+#    weeks: "weeks"
+#    month: "month"
+#    months: "months"
+#    year: "year"
+#    years: "years"
 
   modal:
     close: "Tutup"
@@ -82,7 +90,7 @@ module.exports = nativeDescription: "Bahasa Melayu", englishDescription: "Bahasa
 #    required: "You need to log in before you can go that way."
 
   home:
-    slogan: "Belajar Kod JavaScript Dengan Permainan"
+    slogan: "Belajar Kod bDengan Permainan"
     no_ie: "CodeCombat tidak berfungsi dalam Internet Explorer 9 dan terdahulu. Maaf!"
     no_mobile: "CodeCombat tidak dibangunkan untuk telefon mudah-alih dan tablet dan tidak akan berfungsi!"
     play: "Mula"
@@ -185,25 +193,126 @@ module.exports = nativeDescription: "Bahasa Melayu", englishDescription: "Bahasa
 #    view_profile: "View Your Profile"
 
   account_profile:
-#    edit_settings: "Edit Settings"
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
     profile_for_prefix: "Profil untuk "
 #    profile_for_suffix: ""
-#    approved: "Approved"
-#    not_approved: "Not Approved"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
 #    looking_for: "Looking for:"
 #    last_updated: "Last updated:"
 #    contact: "Contact"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+#    next_city: "city?"
+#    next_country: "pick your country."
+#    next_name: "name?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
 #    work_experience: "Work Experience"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
 #    education: "Education"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
 #    our_notes: "Our Notes"
 #    projects: "Projects"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
 #  employers:
-#    want_to_hire_our_players: "Want to hire expert CodeCombat players?"
+#    want_to_hire_our_players: "Hire CodeCombat Players"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-#    candidates_count_prefix: "We currently have "
-#    candidates_count_many: "many"
-#    candidates_count_suffix: "highly skilled and vetted developers looking for work."
 #    candidate_name: "Name"
 #    candidate_location: "Location"
 #    candidate_looking_for: "Looking For"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "Bahasa Melayu", englishDescription: "Bahasa
 #    candidate_top_skills: "Top Skills"
 #    candidate_years_experience: "Yrs Exp"
 #    candidate_last_updated: "Last Updated"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
 #  play_level:
 #    done: "Done"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "Bahasa Melayu", englishDescription: "Bahasa
 #    av_entities_sub_title: "Entities"
 #    av_entities_users_url: "Users"
 #    av_entities_active_instances_url: "Active Instances"
+#    av_entities_employer_list_url: "Employer List"
 #    av_other_sub_title: "Other"
 #    av_other_debug_base_url: "Base (for debugging base.jade)"
 #    u_title: "User List"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "Bahasa Melayu", englishDescription: "Bahasa
 #    thang_description: "Build units, defining their default logic, graphics and audio. Currently only supports importing Flash exported vector graphics."
 #    level_title: "Level Editor"
 #    level_description: "Includes the tools for scripting, uploading audio, and constructing custom logic to create all sorts of levels. Everything we use ourselves!"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
 #    contact_us: "Contact us!"
 #    hipchat_prefix: "You can also find us in our"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "Bahasa Melayu", englishDescription: "Bahasa
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
 #    article_search_title: "Search Articles Here"
 #    thang_search_title: "Search Thang Types Here"
 #    level_search_title: "Search Levels Here"
+#    achievement_search_title: "Search Achievements"
 #    read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
 #  article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "Bahasa Melayu", englishDescription: "Bahasa
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "Bahasa Melayu", englishDescription: "Bahasa
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/nb.coffee b/app/locale/nb.coffee
index f319999d6..7fbf4a07c 100644
--- a/app/locale/nb.coffee
+++ b/app/locale/nb.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "Norsk Bokmål", englishDescription: "Norweg
 #    minutes: "minutes"
 #    hour: "hour"
 #    hours: "hours"
+#    day: "day"
+#    days: "days"
+#    week: "week"
+#    weeks: "weeks"
+#    month: "month"
+#    months: "months"
+#    year: "year"
+#    years: "years"
 
   modal:
     close: "Lukk"
@@ -82,7 +90,7 @@ module.exports = nativeDescription: "Norsk Bokmål", englishDescription: "Norweg
 #    required: "You need to log in before you can go that way."
 
   home:
-    slogan: "Lær å Kode JavaScript ved å Spille et Spill"
+    slogan: "Lær å Kode ved å Spille et Spill"
     no_ie: "CodeCombat kjører ikke på IE8 eller eldre. Beklager!"
     no_mobile: "CodeCombat ble ikke designet for mobile enheter, og vil muligens ikke virke!"
     play: "Spill"
@@ -185,25 +193,126 @@ module.exports = nativeDescription: "Norsk Bokmål", englishDescription: "Norweg
 #    view_profile: "View Your Profile"
 
   account_profile:
-    edit_settings: "Rediger Innstillinger"
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
     profile_for_prefix: "Profil for "
 #    profile_for_suffix: ""
-#    approved: "Approved"
-#    not_approved: "Not Approved"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
 #    looking_for: "Looking for:"
 #    last_updated: "Last updated:"
 #    contact: "Contact"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+#    next_city: "city?"
+#    next_country: "pick your country."
+#    next_name: "name?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
 #    work_experience: "Work Experience"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
 #    education: "Education"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
 #    our_notes: "Our Notes"
 #    projects: "Projects"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
 #  employers:
-#    want_to_hire_our_players: "Want to hire expert CodeCombat players?"
+#    want_to_hire_our_players: "Hire CodeCombat Players"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-#    candidates_count_prefix: "We currently have "
-#    candidates_count_many: "many"
-#    candidates_count_suffix: "highly skilled and vetted developers looking for work."
 #    candidate_name: "Name"
 #    candidate_location: "Location"
 #    candidate_looking_for: "Looking For"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "Norsk Bokmål", englishDescription: "Norweg
 #    candidate_top_skills: "Top Skills"
 #    candidate_years_experience: "Yrs Exp"
 #    candidate_last_updated: "Last Updated"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
   play_level:
     done: "Ferdig"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "Norsk Bokmål", englishDescription: "Norweg
 #    av_entities_sub_title: "Entities"
 #    av_entities_users_url: "Users"
 #    av_entities_active_instances_url: "Active Instances"
+#    av_entities_employer_list_url: "Employer List"
 #    av_other_sub_title: "Other"
 #    av_other_debug_base_url: "Base (for debugging base.jade)"
 #    u_title: "User List"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "Norsk Bokmål", englishDescription: "Norweg
 #    thang_description: "Build units, defining their default logic, graphics and audio. Currently only supports importing Flash exported vector graphics."
 #    level_title: "Level Editor"
 #    level_description: "Includes the tools for scripting, uploading audio, and constructing custom logic to create all sorts of levels. Everything we use ourselves!"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
 #    contact_us: "Contact us!"
 #    hipchat_prefix: "You can also find us in our"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "Norsk Bokmål", englishDescription: "Norweg
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
 #    article_search_title: "Search Articles Here"
 #    thang_search_title: "Search Thang Types Here"
 #    level_search_title: "Search Levels Here"
+#    achievement_search_title: "Search Achievements"
 #    read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
 #  article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "Norsk Bokmål", englishDescription: "Norweg
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "Norsk Bokmål", englishDescription: "Norweg
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/nl-BE.coffee b/app/locale/nl-BE.coffee
index 003443347..ab53bcce0 100644
--- a/app/locale/nl-BE.coffee
+++ b/app/locale/nl-BE.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "Nederlands (België)", englishDescription:
     minutes: "minuten"
     hour: "uur"
     hours: "uren"
+#    day: "day"
+#    days: "days"
+#    week: "week"
+#    weeks: "weeks"
+#    month: "month"
+#    months: "months"
+#    year: "year"
+#    years: "years"
 
   modal:
     close: "Sluiten"
@@ -82,7 +90,7 @@ module.exports = nativeDescription: "Nederlands (België)", englishDescription:
 #    required: "You need to log in before you can go that way."
 
   home:
-    slogan: "Leer programmeren in JavaScript door het spelen van een spel"
+    slogan: "Leer programmeren door het spelen van een spel"
     no_ie: "CodeCombat werkt niet in IE8 of ouder. Sorry!"
     no_mobile: "CodeCombat is niet gemaakt voor mobiele apparaten en werkt misschien niet!"
     play: "Speel"
@@ -185,25 +193,126 @@ module.exports = nativeDescription: "Nederlands (België)", englishDescription:
 #    view_profile: "View Your Profile"
 
   account_profile:
-    edit_settings: "Instellingen Aanpassen"
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
     profile_for_prefix: "Profiel voor "
     profile_for_suffix: ""
-    approved: "Goedgekeurd"
-    not_approved: "Niet goedgekeurd"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
     looking_for: "Zoekt naar:"
     last_updated: "Laatst aangepast:"
     contact: "Contact"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+#    next_city: "city?"
+#    next_country: "pick your country."
+#    next_name: "name?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
     work_experience: "Werk ervaring"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
     education: "Opleiding"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
     our_notes: "Onze notities"
     projects: "Projecten"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
   employers:
     want_to_hire_our_players: "Wil je expert CodeCombat spelers aanwerven? "
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-    candidates_count_prefix: "Momenteel hebben we "
-    candidates_count_many: "veel"
-    candidates_count_suffix: "zeer getalenteerde en ervaren ontwikkelaars die werk zoeken."
     candidate_name: "Naam"
     candidate_location: "Locatie"
     candidate_looking_for: "Zoekt naar"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "Nederlands (België)", englishDescription:
     candidate_top_skills: "Beste vaardigheden"
     candidate_years_experience: "Jaren ervaring"
     candidate_last_updated: "Laatst aangepast"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
   play_level:
     done: "Klaar"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "Nederlands (België)", englishDescription:
     av_entities_sub_title: "Entiteiten"
     av_entities_users_url: "Gebruikers"
     av_entities_active_instances_url: "Actieve instanties"
+#    av_entities_employer_list_url: "Employer List"
     av_other_sub_title: "Andere"
     av_other_debug_base_url: "Base (om base.jade te debuggen)"
     u_title: "Gebruikerslijst"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "Nederlands (België)", englishDescription:
     thang_description: "Maak eenheden, beschrijf hun standaard logica, graphics en audio. Momenteel is enkel het importeren van vector graphics geëxporteerd uit Flash ondersteund."
     level_title: "Level Editor"
     level_description: "Bevat de benodigdheden om scripts te schrijven, audio te uploaden en aangepaste logica te creëren om alle soorten levels te maken. Het is alles wat wij zelf ook gebruiken!"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
     contact_us: "contacteer ons!"
     hipchat_prefix: "Je kan ons ook vinden in ons"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "Nederlands (België)", englishDescription:
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
     article_search_title: "Zoek Artikels Hier"
     thang_search_title: "Zoek Thang Types Hier"
     level_search_title: "Zoek Levels Hier"
+#    achievement_search_title: "Search Achievements"
     read_only_warning2: "Pas op, je kunt geen aanpassingen opslaan hier, want je bent niet ingelogd."
 
   article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "Nederlands (België)", englishDescription:
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "Nederlands (België)", englishDescription:
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/nl-NL.coffee b/app/locale/nl-NL.coffee
index 993aa8b56..acbd7856a 100644
--- a/app/locale/nl-NL.coffee
+++ b/app/locale/nl-NL.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "Nederlands (Nederland)", englishDescription
     minutes: "minuten"
     hour: "uur"
     hours: "uren"
+#    day: "day"
+#    days: "days"
+#    week: "week"
+#    weeks: "weeks"
+#    month: "month"
+#    months: "months"
+#    year: "year"
+#    years: "years"
 
   modal:
     close: "Sluiten"
@@ -82,7 +90,7 @@ module.exports = nativeDescription: "Nederlands (Nederland)", englishDescription
 #    required: "You need to log in before you can go that way."
 
   home:
-    slogan: "Leer programmeren in JavaScript door het spelen van een spel"
+    slogan: "Leer programmeren door het spelen van een spel"
     no_ie: "CodeCombat werkt niet in IE8 of ouder. Sorry!"
     no_mobile: "CodeCombat is niet gemaakt voor mobiele apparaten en werkt misschien niet!"
     play: "Speel"
@@ -185,25 +193,126 @@ module.exports = nativeDescription: "Nederlands (Nederland)", englishDescription
 #    view_profile: "View Your Profile"
 
   account_profile:
-    edit_settings: "Instellingen Aanpassen"
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
     profile_for_prefix: "Profiel voor "
     profile_for_suffix: ""
-    approved: "Goedgekeurd"
-    not_approved: "Niet goedgekeurd"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
     looking_for: "Zoekt naar:"
     last_updated: "Laatst aangepast:"
     contact: "Contact"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+#    next_city: "city?"
+#    next_country: "pick your country."
+#    next_name: "name?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
     work_experience: "Werk ervaring"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
     education: "Opleiding"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
     our_notes: "Onze notities"
     projects: "Projecten"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
   employers:
     want_to_hire_our_players: "Wil je expert CodeCombat spelers aanwerven? "
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-    candidates_count_prefix: "Momenteel hebben we "
-    candidates_count_many: "veel"
-    candidates_count_suffix: "zeer getalenteerde en ervaren ontwikkelaars die werk zoeken."
     candidate_name: "Naam"
     candidate_location: "Locatie"
     candidate_looking_for: "Zoekt naar"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "Nederlands (Nederland)", englishDescription
     candidate_top_skills: "Beste vaardigheden"
     candidate_years_experience: "Jaren ervaring"
     candidate_last_updated: "Laatst aangepast"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
   play_level:
     done: "Klaar"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "Nederlands (Nederland)", englishDescription
     av_entities_sub_title: "Entiteiten"
     av_entities_users_url: "Gebruikers"
     av_entities_active_instances_url: "Actieve instanties"
+#    av_entities_employer_list_url: "Employer List"
     av_other_sub_title: "Andere"
     av_other_debug_base_url: "Base (om base.jade te debuggen)"
     u_title: "Gebruikerslijst"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "Nederlands (Nederland)", englishDescription
     thang_description: "Maak eenheden, beschrijf hun standaard logica, graphics en audio. Momenteel is enkel het importeren van vector graphics geëxporteerd uit Flash ondersteund."
     level_title: "Level Editor"
     level_description: "Bevat de benodigdheden om scripts te schrijven, audio te uploaden en aangepaste logica te creëren om alle soorten levels te maken. Het is alles wat wij zelf ook gebruiken!"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
     contact_us: "contacteer ons!"
     hipchat_prefix: "Je kan ons ook vinden in ons"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "Nederlands (Nederland)", englishDescription
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
     article_search_title: "Zoek Artikels Hier"
     thang_search_title: "Zoek Thang Types Hier"
     level_search_title: "Zoek Levels Hier"
+#    achievement_search_title: "Search Achievements"
     read_only_warning2: "Pas op, je kunt geen aanpassingen opslaan hier, want je bent niet ingelogd."
 
   article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "Nederlands (Nederland)", englishDescription
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "Nederlands (Nederland)", englishDescription
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/nl.coffee b/app/locale/nl.coffee
index ff4b82b30..ecc068641 100644
--- a/app/locale/nl.coffee
+++ b/app/locale/nl.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "Nederlands", englishDescription: "Dutch", t
     minutes: "minuten"
     hour: "uur"
     hours: "uren"
+#    day: "day"
+#    days: "days"
+#    week: "week"
+#    weeks: "weeks"
+#    month: "month"
+#    months: "months"
+#    year: "year"
+#    years: "years"
 
   modal:
     close: "Sluiten"
@@ -82,7 +90,7 @@ module.exports = nativeDescription: "Nederlands", englishDescription: "Dutch", t
 #    required: "You need to log in before you can go that way."
 
   home:
-    slogan: "Leer programmeren in JavaScript door het spelen van een spel"
+    slogan: "Leer programmeren door het spelen van een spel"
     no_ie: "CodeCombat werkt niet in IE8 of ouder. Sorry!"
     no_mobile: "CodeCombat is niet gemaakt voor mobiele apparaten en werkt misschien niet!"
     play: "Speel"
@@ -185,25 +193,126 @@ module.exports = nativeDescription: "Nederlands", englishDescription: "Dutch", t
     view_profile: "Bekijk je eigen kandidaat-profiel"
 
   account_profile:
-    edit_settings: "Instellingen Aanpassen"
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
     profile_for_prefix: "Profiel voor "
     profile_for_suffix: ""
-    approved: "Goedgekeurd"
-    not_approved: "Niet goedgekeurd"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
     looking_for: "Zoekt naar:"
     last_updated: "Laatst aangepast:"
     contact: "Contact"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+#    next_city: "city?"
+#    next_country: "pick your country."
+#    next_name: "name?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
     work_experience: "Werk ervaring"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
     education: "Opleiding"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
     our_notes: "Onze notities"
     projects: "Projecten"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
   employers:
     want_to_hire_our_players: "Wil je expert CodeCombat spelers aanwerven? "
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
     see_candidates: "Klik om je kandidaten te zien"
-    candidates_count_prefix: "Momenteel hebben we "
-    candidates_count_many: "veel"
-    candidates_count_suffix: "zeer getalenteerde en ervaren ontwikkelaars die werk zoeken."
     candidate_name: "Naam"
     candidate_location: "Locatie"
     candidate_looking_for: "Zoekt naar"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "Nederlands", englishDescription: "Dutch", t
     candidate_top_skills: "Beste vaardigheden"
     candidate_years_experience: "Jaren ervaring"
     candidate_last_updated: "Laatst aangepast"
-    candidate_approved: "Wij?"
-    candidate_active: "Zij?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
   play_level:
     done: "Klaar"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "Nederlands", englishDescription: "Dutch", t
     av_entities_sub_title: "Entiteiten"
     av_entities_users_url: "Gebruikers"
     av_entities_active_instances_url: "Actieve instanties"
+#    av_entities_employer_list_url: "Employer List"
     av_other_sub_title: "Andere"
     av_other_debug_base_url: "Base (om base.jade te debuggen)"
     u_title: "Gebruikerslijst"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "Nederlands", englishDescription: "Dutch", t
     thang_description: "Maak eenheden, beschrijf hun standaard logica, graphics en audio. Momenteel is enkel het importeren van vector graphics geëxporteerd uit Flash ondersteund."
     level_title: "Level Editor"
     level_description: "Bevat de benodigdheden om scripts te schrijven, audio te uploaden en aangepaste logica te creëren om alle soorten levels te maken. Het is alles wat wij zelf ook gebruiken!"
+#    achievement_title: "Achievement Editor"
     got_questions: "Heb je vragen over het gebruik van de CodeCombat editors?"
     contact_us: "contacteer ons!"
     hipchat_prefix: "Je kan ons ook vinden in ons"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "Nederlands", englishDescription: "Dutch", t
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
     article_search_title: "Zoek Artikels Hier"
     thang_search_title: "Zoek Thang Types Hier"
     level_search_title: "Zoek Levels Hier"
+#    achievement_search_title: "Search Achievements"
     read_only_warning2: "Pas op, je kunt geen aanpassingen opslaan hier, want je bent niet ingelogd."
 
   article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "Nederlands", englishDescription: "Dutch", t
     watch_victory: "Aanschouw je overwinning!"
     defeat_the: "Versla de"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "Nederlands", englishDescription: "Dutch", t
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/nn.coffee b/app/locale/nn.coffee
index 5c3fb53bf..6da4706fa 100644
--- a/app/locale/nn.coffee
+++ b/app/locale/nn.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "Norwegian Nynorsk", englishDescription: "No
 #    minutes: "minutes"
 #    hour: "hour"
 #    hours: "hours"
+#    day: "day"
+#    days: "days"
+#    week: "week"
+#    weeks: "weeks"
+#    month: "month"
+#    months: "months"
+#    year: "year"
+#    years: "years"
 
 #  modal:
 #    close: "Close"
@@ -185,25 +193,126 @@ module.exports = nativeDescription: "Norwegian Nynorsk", englishDescription: "No
 #    view_profile: "View Your Profile"
 
 #  account_profile:
-#    edit_settings: "Edit Settings"
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
 #    profile_for_prefix: "Profile for "
 #    profile_for_suffix: ""
-#    approved: "Approved"
-#    not_approved: "Not Approved"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
 #    looking_for: "Looking for:"
 #    last_updated: "Last updated:"
 #    contact: "Contact"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+#    next_city: "city?"
+#    next_country: "pick your country."
+#    next_name: "name?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
 #    work_experience: "Work Experience"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
 #    education: "Education"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
 #    our_notes: "Our Notes"
 #    projects: "Projects"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
 #  employers:
-#    want_to_hire_our_players: "Want to hire expert CodeCombat players?"
+#    want_to_hire_our_players: "Hire CodeCombat Players"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-#    candidates_count_prefix: "We currently have "
-#    candidates_count_many: "many"
-#    candidates_count_suffix: "highly skilled and vetted developers looking for work."
 #    candidate_name: "Name"
 #    candidate_location: "Location"
 #    candidate_looking_for: "Looking For"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "Norwegian Nynorsk", englishDescription: "No
 #    candidate_top_skills: "Top Skills"
 #    candidate_years_experience: "Yrs Exp"
 #    candidate_last_updated: "Last Updated"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
 #  play_level:
 #    done: "Done"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "Norwegian Nynorsk", englishDescription: "No
 #    av_entities_sub_title: "Entities"
 #    av_entities_users_url: "Users"
 #    av_entities_active_instances_url: "Active Instances"
+#    av_entities_employer_list_url: "Employer List"
 #    av_other_sub_title: "Other"
 #    av_other_debug_base_url: "Base (for debugging base.jade)"
 #    u_title: "User List"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "Norwegian Nynorsk", englishDescription: "No
 #    thang_description: "Build units, defining their default logic, graphics and audio. Currently only supports importing Flash exported vector graphics."
 #    level_title: "Level Editor"
 #    level_description: "Includes the tools for scripting, uploading audio, and constructing custom logic to create all sorts of levels. Everything we use ourselves!"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
 #    contact_us: "Contact us!"
 #    hipchat_prefix: "You can also find us in our"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "Norwegian Nynorsk", englishDescription: "No
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
 #    article_search_title: "Search Articles Here"
 #    thang_search_title: "Search Thang Types Here"
 #    level_search_title: "Search Levels Here"
+#    achievement_search_title: "Search Achievements"
 #    read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
 #  article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "Norwegian Nynorsk", englishDescription: "No
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "Norwegian Nynorsk", englishDescription: "No
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/no.coffee b/app/locale/no.coffee
index 84beea965..9764e3f23 100644
--- a/app/locale/no.coffee
+++ b/app/locale/no.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "Norsk", englishDescription: "Norwegian", tr
 #    minutes: "minutes"
 #    hour: "hour"
 #    hours: "hours"
+#    day: "day"
+#    days: "days"
+#    week: "week"
+#    weeks: "weeks"
+#    month: "month"
+#    months: "months"
+#    year: "year"
+#    years: "years"
 
   modal:
     close: "Lukk"
@@ -63,7 +71,7 @@ module.exports = nativeDescription: "Norsk", englishDescription: "Norwegian", tr
     log_in: "Logg Inn"
 #    logging_in: "Logging In"
     log_out: "Logg Ut"
-    recover: "gjenåpne konto"
+    recover: "Gjenåpne konto"
 
 #  recover:
 #    recover_account_title: "Recover Account"
@@ -77,12 +85,12 @@ module.exports = nativeDescription: "Norsk", englishDescription: "Norwegian", tr
     coppa_why: "(Hvorfor?)"
     creating: "Oppretter Konto..."
     sign_up: "Registrer deg"
-    log_in: "logg inn med passord"
+    log_in: "Logg inn med passord"
 #    social_signup: "Or, you can sign up through Facebook or G+:"
 #    required: "You need to log in before you can go that way."
 
   home:
-    slogan: "Lær å Kode JavaScript ved å Spille et Spill"
+    slogan: "Lær å Kode ved å Spille et Spill"
     no_ie: "CodeCombat kjører ikke på IE8 eller eldre. Beklager!"
     no_mobile: "CodeCombat ble ikke designet for mobile enheter, og vil muligens ikke virke!"
     play: "Spill"
@@ -96,7 +104,7 @@ module.exports = nativeDescription: "Norsk", englishDescription: "Norwegian", tr
   play:
     choose_your_level: "Velg Ditt Nivå"
     adventurer_prefix: "Du kan hoppe til hvilket som helts nivå under, eller diskutere nivåene på"
-    adventurer_forum: "Adventurer forumet"
+    adventurer_forum: "Eventyrerforumet"
     adventurer_suffix: "."
     campaign_beginner: "Begynner Felttog"
     campaign_beginner_description: "... hvor du lærer trolldommen bak programmering."
@@ -104,7 +112,7 @@ module.exports = nativeDescription: "Norsk", englishDescription: "Norwegian", tr
     campaign_dev_description: "... hvor du lærer grensesnittet mens du stadig gjør mer vanskeligere utfordringer."
     campaign_multiplayer: "Multispiller Arenaer"
     campaign_multiplayer_description: "... hvor du spiller direkte mot andre spillere."
-    campaign_player_created: "Spiller-Lagde"
+    campaign_player_created: "Spillerlaget"
     campaign_player_created_description: "... hvor du kjemper mot kreativiteten til en av dine medspillende <a href=\"/contribute#artisan\">Artisan Trollmenn</a>."
     level_difficulty: "Vanskelighetsgrad: "
 #    play_as: "Play As"
@@ -114,7 +122,7 @@ module.exports = nativeDescription: "Norsk", englishDescription: "Norwegian", tr
     contact_us: "Kontakt CodeCombat"
     welcome: "Bra å høre fra deg! Bruk dette skjemaet for å sende oss en epost."
     contribute_prefix: "Hvis du er interessert i å bidra, sjekk ut vår "
-    contribute_page: "bidrags side"
+    contribute_page: "bidragsside"
     contribute_suffix: "!"
     forum_prefix: "For allment tilgjengelige henvendelser, vennligst prøv "
     forum_page: "forumet vårt"
@@ -126,8 +134,8 @@ module.exports = nativeDescription: "Norsk", englishDescription: "Norwegian", tr
   diplomat_suggestion:
     title: "Hjelp med oversettelse av CodeCombat!"
     sub_heading: "Vi trenger dine språkkunnskaper."
-    pitch_body: "Vi utvikler CodeCombat på Engelsk, men vi vi har allerede spillere over hele verden. Mange av dem vil spille på Norsk, men snakker ikke Engelsk, så hvis du kan snakke begge språk, vennligst vurder å meld deg på som Diplomat og hjelp å oversette både CodeCombat web siden og alle nivåene til Norsk."
-    missing_translations: "Inntil vi har oversatt alt til Norsk vil du se Engelsk hvor Norsk ikke er tilgjengelig."
+    pitch_body: "Vi utvikler CodeCombat på engelsk, men vi vi har allerede spillere over hele verden. Mange av dem vil spille på Norsk, men snakker ikke Engelsk, så hvis du kan snakke begge språk, vennligst vurder å meld deg på som Diplomat og hjelp å oversette både CodeCombat web siden og alle nivåene til Norsk."
+    missing_translations: "Inntil vi har oversatt alt til norsk vil du se engelsk hvor norsk ikke er tilgjengelig."
     learn_more: "Lær mer om hvordan det er å være en Diplomat"
     subscribe_as_diplomat: "Meld deg på som Diplomat"
 
@@ -158,10 +166,10 @@ module.exports = nativeDescription: "Norsk", englishDescription: "Norwegian", tr
     password_tab: "Passord"
     emails_tab: "Epost"
 #    admin: "Admin"
-    wizard_color: "Farge på Trollmannens Klær"
+    wizard_color: "Farge på trollmannens Klær"
     new_password: "Nytt Passord"
     new_password_verify: "Verifiser"
-    email_subscriptions: "Epost Abonnement"
+    email_subscriptions: "Epostabonnement"
     email_announcements: "Kunngjøringer"
     email_announcements_description: "Få epost om siste nytt og utvikling fra CodeCombat."
 #    email_notifications: "Notifications"
@@ -170,9 +178,9 @@ module.exports = nativeDescription: "Norsk", englishDescription: "Norwegian", tr
 #    email_any_notes_description: "Disable to stop all activity notification emails."
 #    email_recruit_notes: "Job Opportunities"
 #    email_recruit_notes_description: "If you play really well, we may contact you about getting you a (better) job."
-    contributor_emails: "Contributor Klasse Epost"
+    contributor_emails: "Bidragsyterklasse Epost"
     contribute_prefix: "Vi leter etter folk som vil delta på festen vår! Sjekk ut "
-    contribute_page: "bidra siden"
+    contribute_page: "bidragssiden"
     contribute_suffix: " for å finne ut mer."
     email_toggle: "Vis Alle"
     error_saving: "Lagring Feilet"
@@ -185,25 +193,126 @@ module.exports = nativeDescription: "Norsk", englishDescription: "Norwegian", tr
 #    view_profile: "View Your Profile"
 
   account_profile:
-    edit_settings: "Rediger Innstillinger"
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
     profile_for_prefix: "Profil for "
 #    profile_for_suffix: ""
-#    approved: "Approved"
-#    not_approved: "Not Approved"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
 #    looking_for: "Looking for:"
 #    last_updated: "Last updated:"
 #    contact: "Contact"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+#    next_city: "city?"
+#    next_country: "pick your country."
+#    next_name: "name?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
 #    work_experience: "Work Experience"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
 #    education: "Education"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
 #    our_notes: "Our Notes"
 #    projects: "Projects"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
 #  employers:
-#    want_to_hire_our_players: "Want to hire expert CodeCombat players?"
+#    want_to_hire_our_players: "Hire CodeCombat Players"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-#    candidates_count_prefix: "We currently have "
-#    candidates_count_many: "many"
-#    candidates_count_suffix: "highly skilled and vetted developers looking for work."
 #    candidate_name: "Name"
 #    candidate_location: "Location"
 #    candidate_looking_for: "Looking For"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "Norsk", englishDescription: "Norwegian", tr
 #    candidate_top_skills: "Top Skills"
 #    candidate_years_experience: "Yrs Exp"
 #    candidate_last_updated: "Last Updated"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
   play_level:
     done: "Ferdig"
@@ -229,12 +339,12 @@ module.exports = nativeDescription: "Norsk", englishDescription: "Norwegian", tr
 #    failing: "Failing"
     action_timeline: "Hendelsestidslinje"
     click_to_select: "Klikk på en enhet for å velge den."
-    reload_title: "Laste All Koden på Nytt?"
+    reload_title: "Laste all koden på nytt?"
     reload_really: "Er du sikker på at du vil laste dette nivået på nytt, tilbake til begynnelsen?"
-    reload_confirm: "Last Alle på Nytt"
+    reload_confirm: "Last alle på nytt"
 #    victory_title_prefix: ""
     victory_title_suffix: " Ferdig"
-    victory_sign_up: "Tegn deg på for Oppdateringer"
+    victory_sign_up: "Logg deg inn for oppdateringer"
     victory_sign_up_poke: "Vil du ha siste nytt på epost? Opprett en gratis konto, så vil vi holde deg oppdatert!"
     victory_rate_the_level: "Bedøm nivået: "
 #    victory_return_to_ladder: "Return to Ladder"
@@ -242,7 +352,7 @@ module.exports = nativeDescription: "Norsk", englishDescription: "Norwegian", tr
     victory_go_home: "Gå Hjem"
     victory_review: "Fortell oss mer!"
     victory_hour_of_code_done: "Er du ferdig?"
-    victory_hour_of_code_done_yes: "Ja, jeg er ferdig med min Time i Koding!"
+    victory_hour_of_code_done_yes: "Ja, jeg er ferdig med min time i koding!"
     multiplayer_title: "Flerspillerinnstillinger"
     multiplayer_link_description: "Gi denne lenken til de du vil spille med."
     multiplayer_hint_label: "Hint:"
@@ -257,10 +367,10 @@ module.exports = nativeDescription: "Norsk", englishDescription: "Norwegian", tr
     tome_cast_button_casting: "Kaster"
     tome_cast_button_cast: "Kast Trylleformular"
     tome_autocast_delay: "Automatisk Forsinkelse"
-    tome_select_spell: "Velg et Trylleformular"
-    tome_select_a_thang: "Velg Noe for å "
+    tome_select_spell: "Velg et trylleformular"
+    tome_select_a_thang: "Velg noe for å "
     tome_available_spells: "Tilgjenglige Trylleformularer"
-    hud_continue: "Fortsett (trykk shift-mellomrom)"
+    hud_continue: "Fortsett (trykk shift+mellomrom)"
 #    spell_saved: "Spell Saved"
 #    skip_tutorial: "Skip (esc)"
 #    editor_config: "Editor Config"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "Norsk", englishDescription: "Norwegian", tr
 #    av_entities_sub_title: "Entities"
 #    av_entities_users_url: "Users"
 #    av_entities_active_instances_url: "Active Instances"
+#    av_entities_employer_list_url: "Employer List"
 #    av_other_sub_title: "Other"
 #    av_other_debug_base_url: "Base (for debugging base.jade)"
 #    u_title: "User List"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "Norsk", englishDescription: "Norwegian", tr
 #    thang_description: "Build units, defining their default logic, graphics and audio. Currently only supports importing Flash exported vector graphics."
 #    level_title: "Level Editor"
 #    level_description: "Includes the tools for scripting, uploading audio, and constructing custom logic to create all sorts of levels. Everything we use ourselves!"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
 #    contact_us: "Contact us!"
 #    hipchat_prefix: "You can also find us in our"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "Norsk", englishDescription: "Norwegian", tr
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
 #    article_search_title: "Search Articles Here"
 #    thang_search_title: "Search Thang Types Here"
 #    level_search_title: "Search Levels Here"
+#    achievement_search_title: "Search Achievements"
 #    read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
 #  article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "Norsk", englishDescription: "Norwegian", tr
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "Norsk", englishDescription: "Norwegian", tr
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/pl.coffee b/app/locale/pl.coffee
index 53b619773..14ed9cec5 100644
--- a/app/locale/pl.coffee
+++ b/app/locale/pl.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "język polski", englishDescription: "Polish
 #    minutes: "minutes"
 #    hour: "hour"
 #    hours: "hours"
+#    day: "day"
+#    days: "days"
+#    week: "week"
+#    weeks: "weeks"
+#    month: "month"
+#    months: "months"
+#    year: "year"
+#    years: "years"
 
   modal:
     close: "Zamknij"
@@ -82,7 +90,7 @@ module.exports = nativeDescription: "język polski", englishDescription: "Polish
 #    required: "You need to log in before you can go that way."
 
   home:
-    slogan: "Naucz się JavaScript grając"
+    slogan: "Naucz się programowania grając"
     no_ie: "CodeCombat nie działa na Internet Explorer 9 lub starszym. Przepraszamy!"
     no_mobile: "CodeCombat nie został zaprojektowany dla użądzeń przenośnych więc może nie działać!"
     play: "Graj"
@@ -185,25 +193,126 @@ module.exports = nativeDescription: "język polski", englishDescription: "Polish
 #    view_profile: "View Your Profile"
 
   account_profile:
-    edit_settings: "Edytuj ustawienia"
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
     profile_for_prefix: "Profil"
     profile_for_suffix: ""
-#    approved: "Approved"
-#    not_approved: "Not Approved"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
 #    looking_for: "Looking for:"
 #    last_updated: "Last updated:"
 #    contact: "Contact"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+#    next_city: "city?"
+#    next_country: "pick your country."
+#    next_name: "name?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
 #    work_experience: "Work Experience"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
 #    education: "Education"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
 #    our_notes: "Our Notes"
 #    projects: "Projects"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
 #  employers:
-#    want_to_hire_our_players: "Want to hire expert CodeCombat players?"
+#    want_to_hire_our_players: "Hire CodeCombat Players"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-#    candidates_count_prefix: "We currently have "
-#    candidates_count_many: "many"
-#    candidates_count_suffix: "highly skilled and vetted developers looking for work."
 #    candidate_name: "Name"
 #    candidate_location: "Location"
 #    candidate_looking_for: "Looking For"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "język polski", englishDescription: "Polish
 #    candidate_top_skills: "Top Skills"
 #    candidate_years_experience: "Yrs Exp"
 #    candidate_last_updated: "Last Updated"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
   play_level:
     done: "Zrobione"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "język polski", englishDescription: "Polish
     av_entities_sub_title: "Podmioty"
     av_entities_users_url: "Użytkownicy"
     av_entities_active_instances_url: "Aktywne podmioty"
+#    av_entities_employer_list_url: "Employer List"
     av_other_sub_title: "Inne"
     av_other_debug_base_url: "Baza (do debuggingu base.jade)"
     u_title: "Lista użytkowników"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "język polski", englishDescription: "Polish
     thang_description: "Twórz jednostki, definiuj ich domyślną logikę, grafiki i dźwięki. Aktualnie wspiera wyłącznie importowanie grafik wektorowych wyeksportowanych przez Flash."
     level_title: "Edytor poziomów"
     level_description: "Zawiera narzędzia do skryptowania, przesyłania dźwięków i konstruowania spersonalizowanych logik, by móc tworzyć najrozmaitsze poziomy. Wszystko to, czego sami używamy!"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
     contact_us: "skontaktuj się z nami!"
     hipchat_prefix: "Możesz nas też spotkać w naszym"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "język polski", englishDescription: "Polish
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
     article_search_title: "Przeszukaj artykuły"
     thang_search_title: "Przeszukaj typy obiektów"
     level_search_title: "Przeszukaj poziomy"
+#    achievement_search_title: "Search Achievements"
 #    read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
   article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "język polski", englishDescription: "Polish
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "język polski", englishDescription: "Polish
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/pt-BR.coffee b/app/locale/pt-BR.coffee
index e4e779847..c994afc46 100644
--- a/app/locale/pt-BR.coffee
+++ b/app/locale/pt-BR.coffee
@@ -17,7 +17,7 @@ module.exports = nativeDescription: "português do Brasil", englishDescription:
     retry: "Tente novamente"
 #    watch: "Watch"
 #    unwatch: "Unwatch"
-#    submit_patch: "Submit Patch"
+    submit_patch: "Enviar arranjo"
 
   units:
     second: "segundo"
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "português do Brasil", englishDescription:
     minutes: "minutos"
     hour: "hora"
     hours: "horas"
+    day: "dia"
+    days: "dias"
+    week: "semana"
+    weeks: "semanas"
+    month: "mês"
+    months: "meses"
+    year: "ano"
+    years: "anos"
 
   modal:
     close: "Fechar"
@@ -82,7 +90,7 @@ module.exports = nativeDescription: "português do Brasil", englishDescription:
 #    required: "You need to log in before you can go that way."
 
   home:
-    slogan: "Aprenda a programar em JavaScript enquanto se diverte com um jogo."
+    slogan: "Aprenda a programar enquanto se diverte com um jogo."
     no_ie: "CodeCombat não roda em versões mais antigas que o Internet Explorer 10. Desculpe!"
     no_mobile: "CodeCombat não foi projetado para dispositivos móveis e pode não funcionar!"
     play: "Jogar"
@@ -178,32 +186,133 @@ module.exports = nativeDescription: "português do Brasil", englishDescription:
     error_saving: "Erro no salvamento"
     saved: "Alterações Salvas"
     password_mismatch: "As senhas não estão iguais"
-#    job_profile: "Job Profile"
+    job_profile: "Perfil de trabalho"
 #    job_profile_approved: "Your job profile has been approved by CodeCombat. Employers will be able to see it until you either mark it inactive or it has not been changed for four weeks."
 #    job_profile_explanation: "Hi! Fill this out, and we will get in touch about finding you a software developer job."
     sample_profile: "Veja um perfil de exemplo"
     view_profile: "Visualizar seu perfil"
 
   account_profile:
-    edit_settings: "Editar as configurações"
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
     profile_for_prefix: "Perfil de "
     profile_for_suffix: ""
-    approved: "Aprovado"
-    not_approved: "Não Aprovado"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
 #    looking_for: "Looking for:"
     last_updated: "Última atualização:"
     contact: "Contato"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+    complete: "Completo"
+    next: "Próximo"
+    next_city: "Cidade?"
+#    next_country: "pick your country."
+    next_name: "Nome?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+    basics_country: "País"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
 #    work_experience: "Work Experience"
-    education: "Formação"
-#    our_notes: "Our Notes"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
+    education: "Educação"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+    education_school: "Escola"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
+    our_notes: "Nossas notas"
     projects: "Projetos"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
 #  employers:
-#    want_to_hire_our_players: "Want to hire expert CodeCombat players?"
+#    want_to_hire_our_players: "Hire CodeCombat Players"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-#    candidates_count_prefix: "We currently have "
-#    candidates_count_many: "many"
-#    candidates_count_suffix: "highly skilled and vetted developers looking for work."
 #    candidate_name: "Name"
 #    candidate_location: "Location"
 #    candidate_looking_for: "Looking For"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "português do Brasil", englishDescription:
 #    candidate_top_skills: "Top Skills"
 #    candidate_years_experience: "Yrs Exp"
 #    candidate_last_updated: "Last Updated"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
   play_level:
     done: "Pronto"
@@ -223,10 +333,10 @@ module.exports = nativeDescription: "português do Brasil", englishDescription:
     multiplayer: "Multiplayer"
     restart: "Reiniciar"
     goals: "Objetivos"
-#    success: "Success!"
-#    incomplete: "Incomplete"
+    success: "Sucesso!"
+    incomplete: "Incompleto"
 #    timed_out: "Ran out of time"
-#    failing: "Failing"
+    failing: "Falta"
     action_timeline: "Linha do Tempo das Ações"
     click_to_select: "Clique em um personagem para selecioná-lo."
     reload_title: "Recarregar Todo o Código?"
@@ -279,7 +389,7 @@ module.exports = nativeDescription: "português do Brasil", englishDescription:
     editor_config_behaviors_label: "Comportamentos Inteligentes"
     editor_config_behaviors_description: "Completar automaticamente colchetes, chaves e aspas."
 #    keyboard_shortcuts: "Key Shortcuts"
-#    loading_ready: "Ready!"
+    loading_ready: "Pronto!"
 #    tip_insert_positions: "Shift+Click a point on the map to insert it into the spell editor."
 #    tip_toggle_play: "Toggle play/paused with Ctrl+P."
 #    tip_scrub_shortcut: "Ctrl+[ and Ctrl+] rewind and fast-forward."
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "português do Brasil", englishDescription:
     av_entities_sub_title: "Entidades"
     av_entities_users_url: "Usuários"
     av_entities_active_instances_url: "Instâncias Ativas"
+#    av_entities_employer_list_url: "Employer List"
     av_other_sub_title: "Outro"
     av_other_debug_base_url: "Base (para debugar base.jade)"
     u_title: "Lista de Usuários"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "português do Brasil", englishDescription:
     thang_description: "Construa unidades, definindo sua lógica padrão, gráfico e áudio. Atualmente só é suportado importação de vetores gráficos exportados do Flash."
     level_title: "Editor de Niível"
     level_description: "Inclui as ferramentas para codificar, fazer o upload de áudio e construir uma lógica diferente para criar todos os tipos de níveis. Tudo o que nós mesmos utilizamos!"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
     contact_us: "entre em contato!"
     hipchat_prefix: "Você também pode nos encontrar na nossa"
@@ -369,7 +481,7 @@ module.exports = nativeDescription: "português do Brasil", englishDescription:
     revert_models: "Reverter Modelos"
 #    fork_title: "Fork New Version"
 #    fork_creating: "Creating Fork..."
-#    more: "More"
+    more: "Mais"
 #    wiki: "Wiki"
 #    live_chat: "Live Chat"
     level_some_options: "Algumas  Opções?"
@@ -382,8 +494,8 @@ module.exports = nativeDescription: "português do Brasil", englishDescription:
 #    level_tab_thangs_all: "All"
     level_tab_thangs_conditions: "Condições de Início"
     level_tab_thangs_add: "Adicionar Thangs"
-#    delete: "Delete"
-#    duplicate: "Duplicate"
+    delete: "Excluir"
+    duplicate: "Duplicar"
     level_settings_title: "Configurações"
     level_component_tab_title: "Componentess Atuais"
     level_component_btn_new: "Criar Novo Componente"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "português do Brasil", englishDescription:
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
     article_search_title: "Procurar Artigos Aqui"
     thang_search_title: "Procurar Tipos de Thang Aqui"
     level_search_title: "Procurar Níveis Aqui"
+#    achievement_search_title: "Search Achievements"
 #    read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
   article:
@@ -420,7 +535,7 @@ module.exports = nativeDescription: "português do Brasil", englishDescription:
     body: "Principal"
     version: "Versão"
     commit_msg: "Mensagem do Commit"
-#    version_history: "Version History"
+    version_history: "Version History Histórico de Versão"
     version_history_for: "Histórico de Versão para: "
     result: "Resultado"
     results: "Resultados"
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "português do Brasil", englishDescription:
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "português do Brasil", englishDescription:
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/pt-PT.coffee b/app/locale/pt-PT.coffee
index e427f2ab2..82293b01e 100644
--- a/app/locale/pt-PT.coffee
+++ b/app/locale/pt-PT.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P
 #    minutes: "minutes"
 #    hour: "hour"
 #    hours: "hours"
+#    day: "day"
+#    days: "days"
+#    week: "week"
+#    weeks: "weeks"
+#    month: "month"
+#    months: "months"
+#    year: "year"
+#    years: "years"
 
   modal:
     close: "Fechar"
@@ -82,7 +90,7 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P
 #    required: "You need to log in before you can go that way."
 
   home:
-    slogan: "Aprende a Programar JavaScript ao Jogar um Jogo"
+    slogan: "Aprende a Programar ao Jogar um Jogo"
     no_ie: "O CodeCombat não corre em Internet Explorer 9 ou anterior. Desculpa!"
     no_mobile: "O CodeCombat não foi desenhado para dispositivos móveis e pode não funcionar!"
     play: "Jogar"
@@ -185,25 +193,126 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P
 #    view_profile: "View Your Profile"
 
   account_profile:
-    edit_settings: "Editar Definições"
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
     profile_for_prefix: "Perfil de "
     profile_for_suffix: ""
-#    approved: "Approved"
-#    not_approved: "Not Approved"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
 #    looking_for: "Looking for:"
 #    last_updated: "Last updated:"
 #    contact: "Contact"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+#    next_city: "city?"
+#    next_country: "pick your country."
+#    next_name: "name?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
 #    work_experience: "Work Experience"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
 #    education: "Education"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
 #    our_notes: "Our Notes"
 #    projects: "Projects"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
 #  employers:
-#    want_to_hire_our_players: "Want to hire expert CodeCombat players?"
+#    want_to_hire_our_players: "Hire CodeCombat Players"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-#    candidates_count_prefix: "We currently have "
-#    candidates_count_many: "many"
-#    candidates_count_suffix: "highly skilled and vetted developers looking for work."
 #    candidate_name: "Name"
 #    candidate_location: "Location"
 #    candidate_looking_for: "Looking For"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P
 #    candidate_top_skills: "Top Skills"
 #    candidate_years_experience: "Yrs Exp"
 #    candidate_last_updated: "Last Updated"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
   play_level:
     done: "Concluir"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P
     av_entities_sub_title: "Entidades"
     av_entities_users_url: "Utilizadores"
     av_entities_active_instances_url: "Activar Instâncias"
+#    av_entities_employer_list_url: "Employer List"
     av_other_sub_title: "Outro"
     av_other_debug_base_url: "Base (para fazer debug base.jade)"
     u_title: "Lista de Utilizadores"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P
     thang_description: "Constrói unidades, definindo a sua logica, visual e audio por defeito. De momento só é suportado 'importing Flash exported vector graphics'."
     level_title: "Editor de níveis"
     level_description: "Inclui ferramentas para a criação de scripts, upload de áudio, e construção de lógica personalizada para criar todos os tipos de níveis. Tudo o que nós usamos!"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
     contact_us: "contacta-nos!"
     hipchat_prefix: "Podes encontrar-nos no nosso"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
     article_search_title: "Procurar Artigos Aqui"
     thang_search_title: "Procurar Tipos de Thang Aqui"
     level_search_title: "Procurar Níveis Aqui"
+#    achievement_search_title: "Search Achievements"
 #    read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
   article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/pt.coffee b/app/locale/pt.coffee
index 3ab7d89e4..f2c55aa9f 100644
--- a/app/locale/pt.coffee
+++ b/app/locale/pt.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "português", englishDescription: "Portugues
 #    minutes: "minutes"
 #    hour: "hour"
 #    hours: "hours"
+#    day: "day"
+#    days: "days"
+#    week: "week"
+#    weeks: "weeks"
+#    month: "month"
+#    months: "months"
+#    year: "year"
+#    years: "years"
 
   modal:
     close: "Fechar"
@@ -82,7 +90,7 @@ module.exports = nativeDescription: "português", englishDescription: "Portugues
 #    required: "You need to log in before you can go that way."
 
   home:
-    slogan: "Aprenda a programar em JavaScript enquanto se diverte com um jogo."
+    slogan: "Aprenda a programar enquanto se diverte com um jogo."
     no_ie: "CodeCombat não roda em versões mais antigas que o Internet Explorer 10. Desculpe!"
     no_mobile: "CodeCombat não foi projetado para dispositivos móveis e pode não funcionar!"
     play: "Jogar"
@@ -185,25 +193,126 @@ module.exports = nativeDescription: "português", englishDescription: "Portugues
 #    view_profile: "View Your Profile"
 
   account_profile:
-    edit_settings: "Editar as configurações"
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
     profile_for_prefix: "Perfil de "
 #    profile_for_suffix: ""
-#    approved: "Approved"
-#    not_approved: "Not Approved"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
 #    looking_for: "Looking for:"
 #    last_updated: "Last updated:"
 #    contact: "Contact"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+#    next_city: "city?"
+#    next_country: "pick your country."
+#    next_name: "name?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
 #    work_experience: "Work Experience"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
 #    education: "Education"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
 #    our_notes: "Our Notes"
 #    projects: "Projects"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
 #  employers:
-#    want_to_hire_our_players: "Want to hire expert CodeCombat players?"
+#    want_to_hire_our_players: "Hire CodeCombat Players"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-#    candidates_count_prefix: "We currently have "
-#    candidates_count_many: "many"
-#    candidates_count_suffix: "highly skilled and vetted developers looking for work."
 #    candidate_name: "Name"
 #    candidate_location: "Location"
 #    candidate_looking_for: "Looking For"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "português", englishDescription: "Portugues
 #    candidate_top_skills: "Top Skills"
 #    candidate_years_experience: "Yrs Exp"
 #    candidate_last_updated: "Last Updated"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
   play_level:
     done: "Pronto"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "português", englishDescription: "Portugues
 #    av_entities_sub_title: "Entities"
 #    av_entities_users_url: "Users"
 #    av_entities_active_instances_url: "Active Instances"
+#    av_entities_employer_list_url: "Employer List"
 #    av_other_sub_title: "Other"
 #    av_other_debug_base_url: "Base (for debugging base.jade)"
 #    u_title: "User List"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "português", englishDescription: "Portugues
 #    thang_description: "Build units, defining their default logic, graphics and audio. Currently only supports importing Flash exported vector graphics."
 #    level_title: "Level Editor"
 #    level_description: "Includes the tools for scripting, uploading audio, and constructing custom logic to create all sorts of levels. Everything we use ourselves!"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
 #    contact_us: "Contact us!"
 #    hipchat_prefix: "You can also find us in our"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "português", englishDescription: "Portugues
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
 #    article_search_title: "Search Articles Here"
 #    thang_search_title: "Search Thang Types Here"
 #    level_search_title: "Search Levels Here"
+#    achievement_search_title: "Search Achievements"
 #    read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
 #  article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "português", englishDescription: "Portugues
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "português", englishDescription: "Portugues
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/ro.coffee b/app/locale/ro.coffee
index 51ee46220..23f636da2 100644
--- a/app/locale/ro.coffee
+++ b/app/locale/ro.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "limba română", englishDescription: "Roman
     minutes: "minute"
     hour: "oră"
     hours: "ore"
+#    day: "day"
+#    days: "days"
+#    week: "week"
+#    weeks: "weeks"
+#    month: "month"
+#    months: "months"
+#    year: "year"
+#    years: "years"
 
   modal:
     close: "Inchide"
@@ -82,7 +90,7 @@ module.exports = nativeDescription: "limba română", englishDescription: "Roman
 #    required: "You need to log in before you can go that way."
 
   home:
-    slogan: "Învață sa scrii JavaScript jucându-te"
+    slogan: "Învață sa scrii cod jucându-te"
     no_ie: "CodeCombat nu merge pe Internet Explorer 9 sau mai vechi. Scuze!"
     no_mobile: "CodeCombat nu a fost proiectat pentru dispozitive mobile si s-ar putea sa nu meargă!"
     play: "Joacă"
@@ -185,25 +193,126 @@ module.exports = nativeDescription: "limba română", englishDescription: "Roman
 #    view_profile: "View Your Profile"
 
   account_profile:
-    edit_settings: "Modifică setările"
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
     profile_for_prefix: "Profil pentru "
     profile_for_suffix: ""
-#    approved: "Approved"
-#    not_approved: "Not Approved"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
 #    looking_for: "Looking for:"
 #    last_updated: "Last updated:"
 #    contact: "Contact"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+#    next_city: "city?"
+#    next_country: "pick your country."
+#    next_name: "name?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
 #    work_experience: "Work Experience"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
 #    education: "Education"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
 #    our_notes: "Our Notes"
 #    projects: "Projects"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
 #  employers:
-#    want_to_hire_our_players: "Want to hire expert CodeCombat players?"
+#    want_to_hire_our_players: "Hire CodeCombat Players"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-#    candidates_count_prefix: "We currently have "
-#    candidates_count_many: "many"
-#    candidates_count_suffix: "highly skilled and vetted developers looking for work."
 #    candidate_name: "Name"
 #    candidate_location: "Location"
 #    candidate_looking_for: "Looking For"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "limba română", englishDescription: "Roman
 #    candidate_top_skills: "Top Skills"
 #    candidate_years_experience: "Yrs Exp"
 #    candidate_last_updated: "Last Updated"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
   play_level:
     done: "Gata"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "limba română", englishDescription: "Roman
     av_entities_sub_title: "Entități"
     av_entities_users_url: "Utilizatori"
     av_entities_active_instances_url: "Instanțe active"
+#    av_entities_employer_list_url: "Employer List"
     av_other_sub_title: "Altele"
     av_other_debug_base_url: "Base (pentru debugging base.jade)"
     u_title: "Listă utilizatori"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "limba română", englishDescription: "Roman
     thang_description: "Construiește unități, definește logica lor, grafica și sunetul. Momentan suportă numai importare de grafică vectorială exportată din Flash."
     level_title: "Editor Nivele"
     level_description: "Include uneltele pentru scriptare, upload audio, și construcție de logică costum pentru toate tipurile de nivele.Tot ce folosim noi înșine!"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
     contact_us: "contactați-ne!"
     hipchat_prefix: "Ne puteți de asemenea găsi la"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "limba română", englishDescription: "Roman
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
     article_search_title: "Caută articole aici"
     thang_search_title: "Caută tipuri de Thang aici"
     level_search_title: "Caută nivele aici"
+#    achievement_search_title: "Search Achievements"
 #    read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
   article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "limba română", englishDescription: "Roman
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "limba română", englishDescription: "Roman
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/ru.coffee b/app/locale/ru.coffee
index 3916a7235..73dec279c 100644
--- a/app/locale/ru.coffee
+++ b/app/locale/ru.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi
     minutes: "минут(ы)"
     hour: "час"
     hours: "часа(ов)"
+    day: "день"
+#    days: "days"
+    week: "неделя"
+#    weeks: "weeks"
+    month: "месяц"
+#    months: "months"
+    year: "год"
+#    years: "years"
 
   modal:
     close: "Закрыть"
@@ -79,10 +87,10 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi
     sign_up: "Регистрация"
     log_in: "вход с паролем"
     social_signup: "Или вы можете зарегистрироваться через Facebook или G+:"
-#    required: "You need to log in before you can go that way."
+    required: "Войдите для того чтобы продолжить."
 
   home:
-    slogan: "Научитесь программировать на JavaScript, играя в игру"
+    slogan: "Научитесь программировать, играя в игру"
     no_ie: "CodeCombat не работает в IE8 или более старых версиях. Нам очень жаль!"
     no_mobile: "CodeCombat не приспособлен для работы на мобильных устройствах и может не работать!"
     play: "Играть"
@@ -153,7 +161,7 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi
     autosave: "Настройки сохраняются автоматически"
     me_tab: "Я"
     picture_tab: "Аватар"
-#    upload_picture: "Upload a picture"
+    upload_picture: "Загрузить изображение"
     wizard_tab: "Волшебник"
     password_tab: "Пароль"
     emails_tab: "Email-адреса"
@@ -166,10 +174,10 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi
     email_announcements_description: "Получать email-оповещения о последних новостях CodeCombat."
     email_notifications: "Уведомления"
 #    email_notifications_summary: "Controls for personalized, automatic email notifications related to your CodeCombat activity."
-#    email_any_notes: "Any Notifications"
-#    email_any_notes_description: "Disable to stop all activity notification emails."
-#    email_recruit_notes: "Job Opportunities"
-#    email_recruit_notes_description: "If you play really well, we may contact you about getting you a (better) job."
+    email_any_notes: "Все уведомления"
+    email_any_notes_description: "Отключите, чтобы больше не получать извещения."
+    email_recruit_notes: "Возможности для работы"
+    email_recruit_notes_description: "Если вы действительно хорошо играете, то мы можем связаться с вами для предложения (лучшей) работы."
     contributor_emails: "Рассылки по классам участников"
     contribute_prefix: "Нам нужны люди, которые присоединятся к нашей команде! Зайдите на "
     contribute_page: "страницу участников,"
@@ -185,25 +193,126 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi
     view_profile: "Просмотр вашего профиля"
 
   account_profile:
-    edit_settings: "Изменить настройки"
+    settings: "Настойки"
+    edit_profile: "Редактировать профиль"
+    done_editing: "Завершить редактирование"
     profile_for_prefix: "Профиль для "
     profile_for_suffix: ""
-    approved: "Одобрено"
-    not_approved: "Не одобрено"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
     looking_for: "Ищет:"
     last_updated: "Последнее обновление:"
     contact: "Контакты"
+#    active: "Looking for interview offers now"
+    inactive: "Не ищу предложений работы в настоящее время"
+    complete: "готово"
+    next: "Далее"
+    next_city: "Город?"
+    next_country: "Выберите вашу страну."
+    next_name: "имя?"
+    next_short_description: "напишите короткое описание."
+    next_long_description: "опишите желаемую позицию"
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
     work_experience: "Опыт работы"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
     education: "Образование"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
     our_notes: "Наши заметки"
     projects: "Проекты"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
   employers:
     want_to_hire_our_players: "Хотите нанимать игроков-экспертов CodeCombat?"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
     see_candidates: "Щёлкните, чтобы посмотреть наших кандидатов"
-    candidates_count_prefix: "Сейчас у нас есть "
-    candidates_count_many: "много"
-    candidates_count_suffix: "высококвалифицированных и проверенных разработчиков, ищущих работу."
     candidate_name: "Имя"
     candidate_location: "Местонахождение"
     candidate_looking_for: "Ищет"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi
     candidate_top_skills: "Лучшие навыки"
     candidate_years_experience: "Лет опыта"
     candidate_last_updated: "Последнее обновление"
-    candidate_approved: "Нам?"
-    candidate_active: "Им?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
   play_level:
     done: "Готово"
@@ -223,10 +333,10 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi
     multiplayer: "Мультиплеер"
     restart: "Перезапустить"
     goals: "Цели"
-#    success: "Success!"
-#    incomplete: "Incomplete"
-#    timed_out: "Ran out of time"
-#    failing: "Failing"
+    success: "Успешно!"
+    incomplete: "Не завершено"
+    timed_out: "Время истекло"
+    failing: "Неудача"
     action_timeline: "График действий"
     click_to_select: "Выберите персонажа, щёлкнув на нём"
     reload_title: "Перезагрузить код полностью?"
@@ -248,7 +358,7 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi
     multiplayer_hint_label: "Подсказка: "
     multiplayer_hint: "кликните на ссылку, чтобы выделить её, затем нажмите ⌘-С или Ctrl-C, чтобы скопировать."
     multiplayer_coming_soon: "Больше возможностей мультиплеера на подходе!"
-#    multiplayer_sign_in_leaderboard: "Sign in or create an account and get your solution on the leaderboard."
+    multiplayer_sign_in_leaderboard: "Войдите или создайте аккаунт, чтобы ваше решение оказалось в таблице лидеров."
     guide_title: "Руководство"
     tome_minion_spells: "Заклинания ваших миньонов"
     tome_read_only_spells: "Заклинания только для чтения"
@@ -265,10 +375,10 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi
     skip_tutorial: "Пропуск (Esc)"
     editor_config: "Настройки редактора"
     editor_config_title: "Настройки редактора"
-#    editor_config_level_language_label: "Language for This Level"
-#    editor_config_level_language_description: "Define the programming language for this particular level."
-#    editor_config_default_language_label: "Default Programming Language"
-#    editor_config_default_language_description: "Define the programming language you want to code in when starting new levels."
+    editor_config_level_language_label: "Язык для этого уровня"
+    editor_config_level_language_description: "Выберите язык программирования для этого конкретного уровня."
+    editor_config_default_language_label: "Язык по умолчанию"
+    editor_config_default_language_description: "Выберите язык программирования который вы хотите использовать когда начинаете новый уровень."
     editor_config_keybindings_label: "Сочетания клавиш"
     editor_config_keybindings_default: "По умолчанию (Ace)"
     editor_config_keybindings_description: "Добавляет дополнительные сочетания, известные из популярных редакторов."
@@ -278,7 +388,7 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi
     editor_config_indentguides_description: "Отображение вертикальных линий для лучшего обзора отступов."
     editor_config_behaviors_label: "Умное поведение"
     editor_config_behaviors_description: "Автозавершать квадратные, фигурные скобки и кавычки."
-#    keyboard_shortcuts: "Key Shortcuts"
+    keyboard_shortcuts: "Горячие клавиши"
     loading_ready: "Готово!"
     tip_insert_positions: "Shift+Клик по карте вставит координаты в редактор заклинаний."
     tip_toggle_play: "Переключайте воспроизведение/паузу комбинацией Ctrl+P."
@@ -315,12 +425,12 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi
     infinite_loop_reset_level: "Сбросить уровень"
     infinite_loop_comment_out: "Закомментировать мой код"
 
-#  keyboard_shortcuts:
-#    keyboard_shortcuts: "Keyboard Shortcuts"
-#    space: "Space"
-#    enter: "Enter"
-#    escape: "Escape"
-#    cast_spell: "Cast current spell."
+  keyboard_shortcuts:
+    keyboard_shortcuts: "Горячие клавиши"
+    space: "Пробел"
+    enter: "Enter"
+    escape: "Escape"
+    cast_spell: "Произнести текущее заклинание."
 #    continue_script: "Continue past current script."
 #    skip_scripts: "Skip past all skippable scripts."
 #    toggle_playback: "Toggle play/pause."
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi
     av_entities_sub_title: "Сущности"
     av_entities_users_url: "Пользователи"
     av_entities_active_instances_url: "Активные экземпляры"
+#    av_entities_employer_list_url: "Employer List"
     av_other_sub_title: "Другое"
     av_other_debug_base_url: "База (для отладки base.jade)"
     u_title: "Список пользователей"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi
     thang_description: "Создавайте юнитов, определяйте их логику по умолчанию, графику и звук. В настоящий момент поддерживается импорт только векторной графики Flash."
     level_title: "Редактор уровней"
     level_description: "Включает в себя инструменты для написания сценариев, загрузки аудио и построения собственной логики для создания всевозможных уровней. Всё, что мы используем сами!"
+    achievement_title: "Редактор достижений"
     got_questions: "Вопросы по использованию редакторов CodeCombat?"
     contact_us: "свяжитесь с нами!"
     hipchat_prefix: "Также вы можете найти нас в нашей"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
     article_search_title: "Искать статьи"
     thang_search_title: "Искать типы объектов"
     level_search_title: "Искать уровни"
+    achievement_search_title: "Искать достижения"
     read_only_warning2: "Примечание: вы не можете сохранять любые правки здесь, потому что вы не авторизованы."
 
   article:
@@ -538,7 +653,7 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi
     introduction_desc_ending: "Мы надеемся, что вы присоединитесь к нашей команде!"
     introduction_desc_signature: "- Ник, Джордж, Скотт, Михаэль, Джереми и Глен"
     alert_account_message_intro: "Привет!"
-#    alert_account_message: "To subscribe for class emails, you'll need to be logged in first."
+    alert_account_message: "Чтобы подписаться на классовые сообщения, необходимо войти в аккаунт"
     archmage_summary: "Интересует работа над игровой графикой, дизайном пользовательского интерфейса, базой данных и организацией сервера, сетевым мультиплеером, физикой, звуком или производительностью игрового движка? Хотите помочь создать игру для помощи другим людям в изучении того, в чём вы хорошо разбираетесь? У нас много работы, и если вы опытный программист и хотите разрабатывать для CodeCombat, этот класс для вас. Мы будем рады вашей помощи в создании самой лучшей игры для программистов."
     archmage_introduction: "Одна из лучших черт в создании игр - то, что они синтезируют так много различных вещей. Графика, звук, сетевое взаимодействие в режиме реального времени, социальное сетевое взаимодействие, и, конечно, большинство из более распространённых аспектов программирования, от низкоуровневого управления базами данных и администрирования сервера до построения дизайна и интерфейсов, видимых пользователю. У нас много работы, и если вы опытный программист со страстным желанием погрузиться в действительно мельчайшие детали CodeCombat, этот класс для вас. Мы будем рады вашей помощи в создании самой лучшей игры для программистов."
     class_attributes: "Атрибуты класса"
@@ -677,14 +792,17 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi
 #    friends_playing: "Friends Playing"
 #    log_in_for_friends: "Log in to play with your friends!"
 #    social_connect_blurb: "Connect and play against your friends!"
-#    invite_friends_to_battle: "Invite your friends to join you in battle!"
-#    fight: "Fight!"
+    invite_friends_to_battle: "Пригласить друзей присоединиться к вам в сражении!"
+    fight: "В бой!"
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+    winners: "Победители"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -703,7 +821,7 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi
 #    credits: "credits"
 #    one_month_coupon: "coupon: choose either Rails or HTML"
 #    one_month_discount: "discount, 30% off: choose either Rails or HTML"
-#    license: "license"
+    license: "лицензия"
 #    oreilly: "ebook of your choice"
 
   multiplayer_launch:
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi
     source_document: "Исходный документ"
     document: "Документ"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
   delta:
     added: "Добавлено"
diff --git a/app/locale/sk.coffee b/app/locale/sk.coffee
index 4128d996b..06fc9ed5f 100644
--- a/app/locale/sk.coffee
+++ b/app/locale/sk.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "slovenčina", englishDescription: "Slovak",
 #    minutes: "minutes"
 #    hour: "hour"
 #    hours: "hours"
+#    day: "day"
+#    days: "days"
+#    week: "week"
+#    weeks: "weeks"
+#    month: "month"
+#    months: "months"
+#    year: "year"
+#    years: "years"
 
   modal:
     close: "Zatvor"
@@ -82,7 +90,7 @@ module.exports = nativeDescription: "slovenčina", englishDescription: "Slovak",
 #    required: "You need to log in before you can go that way."
 
   home:
-    slogan: "Nauč sa programovať v Javascripte pomocou hry"
+    slogan: "Nauč sa programovať pomocou hry"
     no_ie: "CodeCombat nefunguje v prehliadači Internet Explorer 9 a jeho starších verziách. Ospravedlňujeme sa."
     no_mobile: "CodeCombat nebol navrhnutý pre mobilné zariadenia a nemusí na nich fungovať správne!"
     play: "Hraj"
@@ -185,25 +193,126 @@ module.exports = nativeDescription: "slovenčina", englishDescription: "Slovak",
 #    view_profile: "View Your Profile"
 
 #  account_profile:
-#    edit_settings: "Edit Settings"
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
 #    profile_for_prefix: "Profile for "
 #    profile_for_suffix: ""
-#    approved: "Approved"
-#    not_approved: "Not Approved"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
 #    looking_for: "Looking for:"
 #    last_updated: "Last updated:"
 #    contact: "Contact"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+#    next_city: "city?"
+#    next_country: "pick your country."
+#    next_name: "name?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
 #    work_experience: "Work Experience"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
 #    education: "Education"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
 #    our_notes: "Our Notes"
 #    projects: "Projects"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
 #  employers:
-#    want_to_hire_our_players: "Want to hire expert CodeCombat players?"
+#    want_to_hire_our_players: "Hire CodeCombat Players"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-#    candidates_count_prefix: "We currently have "
-#    candidates_count_many: "many"
-#    candidates_count_suffix: "highly skilled and vetted developers looking for work."
 #    candidate_name: "Name"
 #    candidate_location: "Location"
 #    candidate_looking_for: "Looking For"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "slovenčina", englishDescription: "Slovak",
 #    candidate_top_skills: "Top Skills"
 #    candidate_years_experience: "Yrs Exp"
 #    candidate_last_updated: "Last Updated"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
 #  play_level:
 #    done: "Done"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "slovenčina", englishDescription: "Slovak",
 #    av_entities_sub_title: "Entities"
 #    av_entities_users_url: "Users"
 #    av_entities_active_instances_url: "Active Instances"
+#    av_entities_employer_list_url: "Employer List"
 #    av_other_sub_title: "Other"
 #    av_other_debug_base_url: "Base (for debugging base.jade)"
 #    u_title: "User List"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "slovenčina", englishDescription: "Slovak",
 #    thang_description: "Build units, defining their default logic, graphics and audio. Currently only supports importing Flash exported vector graphics."
 #    level_title: "Level Editor"
 #    level_description: "Includes the tools for scripting, uploading audio, and constructing custom logic to create all sorts of levels. Everything we use ourselves!"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
 #    contact_us: "Contact us!"
 #    hipchat_prefix: "You can also find us in our"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "slovenčina", englishDescription: "Slovak",
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
 #    article_search_title: "Search Articles Here"
 #    thang_search_title: "Search Thang Types Here"
 #    level_search_title: "Search Levels Here"
+#    achievement_search_title: "Search Achievements"
 #    read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
 #  article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "slovenčina", englishDescription: "Slovak",
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "slovenčina", englishDescription: "Slovak",
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/sl.coffee b/app/locale/sl.coffee
index 5ab417f17..953de4e2b 100644
--- a/app/locale/sl.coffee
+++ b/app/locale/sl.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "slovenščina", englishDescription: "Sloven
 #    minutes: "minutes"
 #    hour: "hour"
 #    hours: "hours"
+#    day: "day"
+#    days: "days"
+#    week: "week"
+#    weeks: "weeks"
+#    month: "month"
+#    months: "months"
+#    year: "year"
+#    years: "years"
 
 #  modal:
 #    close: "Close"
@@ -185,25 +193,126 @@ module.exports = nativeDescription: "slovenščina", englishDescription: "Sloven
 #    view_profile: "View Your Profile"
 
 #  account_profile:
-#    edit_settings: "Edit Settings"
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
 #    profile_for_prefix: "Profile for "
 #    profile_for_suffix: ""
-#    approved: "Approved"
-#    not_approved: "Not Approved"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
 #    looking_for: "Looking for:"
 #    last_updated: "Last updated:"
 #    contact: "Contact"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+#    next_city: "city?"
+#    next_country: "pick your country."
+#    next_name: "name?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
 #    work_experience: "Work Experience"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
 #    education: "Education"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
 #    our_notes: "Our Notes"
 #    projects: "Projects"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
 #  employers:
-#    want_to_hire_our_players: "Want to hire expert CodeCombat players?"
+#    want_to_hire_our_players: "Hire CodeCombat Players"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-#    candidates_count_prefix: "We currently have "
-#    candidates_count_many: "many"
-#    candidates_count_suffix: "highly skilled and vetted developers looking for work."
 #    candidate_name: "Name"
 #    candidate_location: "Location"
 #    candidate_looking_for: "Looking For"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "slovenščina", englishDescription: "Sloven
 #    candidate_top_skills: "Top Skills"
 #    candidate_years_experience: "Yrs Exp"
 #    candidate_last_updated: "Last Updated"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
 #  play_level:
 #    done: "Done"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "slovenščina", englishDescription: "Sloven
 #    av_entities_sub_title: "Entities"
 #    av_entities_users_url: "Users"
 #    av_entities_active_instances_url: "Active Instances"
+#    av_entities_employer_list_url: "Employer List"
 #    av_other_sub_title: "Other"
 #    av_other_debug_base_url: "Base (for debugging base.jade)"
 #    u_title: "User List"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "slovenščina", englishDescription: "Sloven
 #    thang_description: "Build units, defining their default logic, graphics and audio. Currently only supports importing Flash exported vector graphics."
 #    level_title: "Level Editor"
 #    level_description: "Includes the tools for scripting, uploading audio, and constructing custom logic to create all sorts of levels. Everything we use ourselves!"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
 #    contact_us: "Contact us!"
 #    hipchat_prefix: "You can also find us in our"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "slovenščina", englishDescription: "Sloven
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
 #    article_search_title: "Search Articles Here"
 #    thang_search_title: "Search Thang Types Here"
 #    level_search_title: "Search Levels Here"
+#    achievement_search_title: "Search Achievements"
 #    read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
 #  article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "slovenščina", englishDescription: "Sloven
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "slovenščina", englishDescription: "Sloven
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/sr.coffee b/app/locale/sr.coffee
index 02d2a10d1..3bea2b668 100644
--- a/app/locale/sr.coffee
+++ b/app/locale/sr.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "српски", englishDescription: "Serbian
 #    minutes: "minutes"
 #    hour: "hour"
 #    hours: "hours"
+#    day: "day"
+#    days: "days"
+#    week: "week"
+#    weeks: "weeks"
+#    month: "month"
+#    months: "months"
+#    year: "year"
+#    years: "years"
 
   modal:
     close: "Затвори"
@@ -82,7 +90,7 @@ module.exports = nativeDescription: "српски", englishDescription: "Serbian
 #    required: "You need to log in before you can go that way."
 
   home:
-    slogan: "Научи да пишеш JavaScript играјући игру"
+    slogan: "Научи да пишеш код играјући игру"
     no_ie: "CodeCombat не ради у IE8 и старијим верзијама. Жао нам је!"
     no_mobile: "CodeCombat није дизајниран за мобилне уређаје и може да се деси да не ради!"
     play: "Играј"
@@ -185,25 +193,126 @@ module.exports = nativeDescription: "српски", englishDescription: "Serbian
 #    view_profile: "View Your Profile"
 
   account_profile:
-    edit_settings: "Измени подешавања"
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
     profile_for_prefix: "Налог за "
 #    profile_for_suffix: ""
-#    approved: "Approved"
-#    not_approved: "Not Approved"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
 #    looking_for: "Looking for:"
 #    last_updated: "Last updated:"
 #    contact: "Contact"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+#    next_city: "city?"
+#    next_country: "pick your country."
+#    next_name: "name?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
 #    work_experience: "Work Experience"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
 #    education: "Education"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
 #    our_notes: "Our Notes"
 #    projects: "Projects"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
 #  employers:
-#    want_to_hire_our_players: "Want to hire expert CodeCombat players?"
+#    want_to_hire_our_players: "Hire CodeCombat Players"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-#    candidates_count_prefix: "We currently have "
-#    candidates_count_many: "many"
-#    candidates_count_suffix: "highly skilled and vetted developers looking for work."
 #    candidate_name: "Name"
 #    candidate_location: "Location"
 #    candidate_looking_for: "Looking For"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "српски", englishDescription: "Serbian
 #    candidate_top_skills: "Top Skills"
 #    candidate_years_experience: "Yrs Exp"
 #    candidate_last_updated: "Last Updated"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
   play_level:
     done: "Урађено"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "српски", englishDescription: "Serbian
 #    av_entities_sub_title: "Entities"
 #    av_entities_users_url: "Users"
 #    av_entities_active_instances_url: "Active Instances"
+#    av_entities_employer_list_url: "Employer List"
 #    av_other_sub_title: "Other"
 #    av_other_debug_base_url: "Base (for debugging base.jade)"
 #    u_title: "User List"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "српски", englishDescription: "Serbian
 #    thang_description: "Build units, defining their default logic, graphics and audio. Currently only supports importing Flash exported vector graphics."
 #    level_title: "Level Editor"
 #    level_description: "Includes the tools for scripting, uploading audio, and constructing custom logic to create all sorts of levels. Everything we use ourselves!"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
 #    contact_us: "Contact us!"
 #    hipchat_prefix: "You can also find us in our"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "српски", englishDescription: "Serbian
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
 #    article_search_title: "Search Articles Here"
 #    thang_search_title: "Search Thang Types Here"
 #    level_search_title: "Search Levels Here"
+#    achievement_search_title: "Search Achievements"
 #    read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
 #  article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "српски", englishDescription: "Serbian
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "српски", englishDescription: "Serbian
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/sv.coffee b/app/locale/sv.coffee
index bcbe76b56..bc9240252 100644
--- a/app/locale/sv.coffee
+++ b/app/locale/sv.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "Svenska", englishDescription: "Swedish", tr
 #    minutes: "minutes"
 #    hour: "hour"
 #    hours: "hours"
+#    day: "day"
+#    days: "days"
+#    week: "week"
+#    weeks: "weeks"
+#    month: "month"
+#    months: "months"
+#    year: "year"
+#    years: "years"
 
   modal:
     close: "Stäng"
@@ -82,7 +90,7 @@ module.exports = nativeDescription: "Svenska", englishDescription: "Swedish", tr
 #    required: "You need to log in before you can go that way."
 
   home:
-    slogan: "Lär dig att koda Javascript genom att spela ett spel."
+    slogan: "Lär dig att koda genom att spela ett spel."
     no_ie: "CodeCombat fungerar tyvärr inte i IE8 eller äldre."
     no_mobile: "CodeCombat är inte designat för mobila enhter och fungerar kanske inte!"
     play: "Spela"
@@ -185,25 +193,126 @@ module.exports = nativeDescription: "Svenska", englishDescription: "Swedish", tr
 #    view_profile: "View Your Profile"
 
   account_profile:
-    edit_settings: "Ändra inställningar"
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
     profile_for_prefix: "Profil för "
 #    profile_for_suffix: ""
-#    approved: "Approved"
-#    not_approved: "Not Approved"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
 #    looking_for: "Looking for:"
 #    last_updated: "Last updated:"
 #    contact: "Contact"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+#    next_city: "city?"
+#    next_country: "pick your country."
+#    next_name: "name?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
 #    work_experience: "Work Experience"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
 #    education: "Education"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
 #    our_notes: "Our Notes"
 #    projects: "Projects"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
 #  employers:
-#    want_to_hire_our_players: "Want to hire expert CodeCombat players?"
+#    want_to_hire_our_players: "Hire CodeCombat Players"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-#    candidates_count_prefix: "We currently have "
-#    candidates_count_many: "many"
-#    candidates_count_suffix: "highly skilled and vetted developers looking for work."
 #    candidate_name: "Name"
 #    candidate_location: "Location"
 #    candidate_looking_for: "Looking For"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "Svenska", englishDescription: "Swedish", tr
 #    candidate_top_skills: "Top Skills"
 #    candidate_years_experience: "Yrs Exp"
 #    candidate_last_updated: "Last Updated"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
   play_level:
     done: "Klar"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "Svenska", englishDescription: "Swedish", tr
     av_entities_sub_title: "Enheter"
     av_entities_users_url: "Användare"
     av_entities_active_instances_url: "Aktiva instanser"
+#    av_entities_employer_list_url: "Employer List"
     av_other_sub_title: "Övrigt"
     av_other_debug_base_url: "Base (för avlusning av base.jade)"
     u_title: "Användarlista"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "Svenska", englishDescription: "Swedish", tr
     thang_description: "Bygg enheter, genom att definerade deras förinställda logik, grafik och ljud. Stöder för närvarande endast import av Flashexporterad vektorgrafik."
     level_title: "Nivåredigerare"
     level_description: "Innehåller verktygen för att skripta, ladda upp ljud och konstruera skräddarsydd logik för att skapa alla möjliga sorters nivåer. Allting vi själva använder!"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
     contact_us: "kontakta oss!"
     hipchat_prefix: "Du kan också hitta oss i vårt"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "Svenska", englishDescription: "Swedish", tr
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
     article_search_title: "Sök artiklar här"
     thang_search_title: "Sök enhetstyper här"
     level_search_title: "Sök nivåer här"
+#    achievement_search_title: "Search Achievements"
 #    read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
   article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "Svenska", englishDescription: "Swedish", tr
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "Svenska", englishDescription: "Swedish", tr
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/th.coffee b/app/locale/th.coffee
index 88fe9a38c..c8dc83823 100644
--- a/app/locale/th.coffee
+++ b/app/locale/th.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "ไทย", englishDescription: "Thai", tra
 #    minutes: "minutes"
 #    hour: "hour"
 #    hours: "hours"
+#    day: "day"
+#    days: "days"
+#    week: "week"
+#    weeks: "weeks"
+#    month: "month"
+#    months: "months"
+#    year: "year"
+#    years: "years"
 
   modal:
     close: "ปิด"
@@ -184,26 +192,127 @@ module.exports = nativeDescription: "ไทย", englishDescription: "Thai", tra
 #    sample_profile: "See a sample profile"
 #    view_profile: "View Your Profile"
 
-  account_profile:
-    edit_settings: "แก้ไขการตั้งค่า"
+#  account_profile:
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
 #    profile_for_prefix: "Profile for "
 #    profile_for_suffix: ""
-#    approved: "Approved"
-#    not_approved: "Not Approved"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
 #    looking_for: "Looking for:"
 #    last_updated: "Last updated:"
 #    contact: "Contact"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+#    next_city: "city?"
+#    next_country: "pick your country."
+#    next_name: "name?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
 #    work_experience: "Work Experience"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
 #    education: "Education"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
 #    our_notes: "Our Notes"
 #    projects: "Projects"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
 #  employers:
-#    want_to_hire_our_players: "Want to hire expert CodeCombat players?"
+#    want_to_hire_our_players: "Hire CodeCombat Players"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-#    candidates_count_prefix: "We currently have "
-#    candidates_count_many: "many"
-#    candidates_count_suffix: "highly skilled and vetted developers looking for work."
 #    candidate_name: "Name"
 #    candidate_location: "Location"
 #    candidate_looking_for: "Looking For"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "ไทย", englishDescription: "Thai", tra
 #    candidate_top_skills: "Top Skills"
 #    candidate_years_experience: "Yrs Exp"
 #    candidate_last_updated: "Last Updated"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
   play_level:
     done: "เสร็จสิ้น"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "ไทย", englishDescription: "Thai", tra
 #    av_entities_sub_title: "Entities"
 #    av_entities_users_url: "Users"
 #    av_entities_active_instances_url: "Active Instances"
+#    av_entities_employer_list_url: "Employer List"
 #    av_other_sub_title: "Other"
 #    av_other_debug_base_url: "Base (for debugging base.jade)"
 #    u_title: "User List"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "ไทย", englishDescription: "Thai", tra
 #    thang_description: "Build units, defining their default logic, graphics and audio. Currently only supports importing Flash exported vector graphics."
 #    level_title: "Level Editor"
 #    level_description: "Includes the tools for scripting, uploading audio, and constructing custom logic to create all sorts of levels. Everything we use ourselves!"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
 #    contact_us: "Contact us!"
 #    hipchat_prefix: "You can also find us in our"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "ไทย", englishDescription: "Thai", tra
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
 #    article_search_title: "Search Articles Here"
 #    thang_search_title: "Search Thang Types Here"
 #    level_search_title: "Search Levels Here"
+#    achievement_search_title: "Search Achievements"
 #    read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
 #  article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "ไทย", englishDescription: "Thai", tra
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "ไทย", englishDescription: "Thai", tra
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/tr.coffee b/app/locale/tr.coffee
index f1e5c6d39..5cd97dc2d 100644
--- a/app/locale/tr.coffee
+++ b/app/locale/tr.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "Türkçe", englishDescription: "Turkish", t
     minutes: "dakika"
     hour: "saat"
     hours: "saat"
+#    day: "day"
+#    days: "days"
+#    week: "week"
+#    weeks: "weeks"
+#    month: "month"
+#    months: "months"
+#    year: "year"
+#    years: "years"
 
   modal:
     close: "Kapat"
@@ -82,7 +90,7 @@ module.exports = nativeDescription: "Türkçe", englishDescription: "Turkish", t
 #    required: "You need to log in before you can go that way."
 
   home:
-    slogan: "Oyun oynayarak JavaScript kodlamayı öğrenin"
+    slogan: "Oyun oynayarak kodlamayı öğrenin"
     no_ie: "CodeCombat maalesef Internet Explorer 9 veya daha eski sürümlerde çalışmaz."
     no_mobile: "CodeCombat mobil cihazlar için tasarlanmamıştır bu sebeple mobil cihazlarda çalışmayabilir."
     play: "Oyna"
@@ -185,25 +193,126 @@ module.exports = nativeDescription: "Türkçe", englishDescription: "Turkish", t
 #    view_profile: "View Your Profile"
 
   account_profile:
-    edit_settings: "Ayarları Düzenle"
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
 #    profile_for_prefix: "Profile for "
     profile_for_suffix: " Kullanıcısının Profili"
-#    approved: "Approved"
-#    not_approved: "Not Approved"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
 #    looking_for: "Looking for:"
 #    last_updated: "Last updated:"
 #    contact: "Contact"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+#    next_city: "city?"
+#    next_country: "pick your country."
+#    next_name: "name?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
 #    work_experience: "Work Experience"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
 #    education: "Education"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
 #    our_notes: "Our Notes"
 #    projects: "Projects"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
 #  employers:
-#    want_to_hire_our_players: "Want to hire expert CodeCombat players?"
+#    want_to_hire_our_players: "Hire CodeCombat Players"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-#    candidates_count_prefix: "We currently have "
-#    candidates_count_many: "many"
-#    candidates_count_suffix: "highly skilled and vetted developers looking for work."
 #    candidate_name: "Name"
 #    candidate_location: "Location"
 #    candidate_looking_for: "Looking For"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "Türkçe", englishDescription: "Turkish", t
 #    candidate_top_skills: "Top Skills"
 #    candidate_years_experience: "Yrs Exp"
 #    candidate_last_updated: "Last Updated"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
   play_level:
     done: "Tamamdır"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "Türkçe", englishDescription: "Turkish", t
     av_entities_sub_title: "Ortaklıklar"
     av_entities_users_url: "Kullanıcılar"
     av_entities_active_instances_url: "Aktif Örnekler"
+#    av_entities_employer_list_url: "Employer List"
     av_other_sub_title: "Başka"
     av_other_debug_base_url: "Temel (base.jade hata kontrolü)"
     u_title: "Kullanıcı Listesi"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "Türkçe", englishDescription: "Turkish", t
     thang_description: "Öntanımlı mantıkları, grafik ve seslerini tanımlayarak birimler üretin. Şimdilik sadece Flash ile dışa aktarılmış vektör grafikleri desteklenmektedir."
     level_title: "Bölüm Düzenleyici"
     level_description: "Her türde bölüm oluşturmak için betik yazma, ses yükleme ve özel mantık inşası için araçları içermektedir. Kendi kullandığımız her şey!"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
     contact_us: "bize ulaşın!"
     hipchat_prefix: "Bizi ayrıca"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "Türkçe", englishDescription: "Turkish", t
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
 #    article_search_title: "Search Articles Here"
 #    thang_search_title: "Search Thang Types Here"
     level_search_title: "Seviye ara"
+#    achievement_search_title: "Search Achievements"
 #    read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
   article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "Türkçe", englishDescription: "Turkish", t
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "Türkçe", englishDescription: "Turkish", t
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/uk.coffee b/app/locale/uk.coffee
index 0dbfe474f..11af81570 100644
--- a/app/locale/uk.coffee
+++ b/app/locale/uk.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "українська мова", englishDesc
     minutes: "Хвилини"
     hour: "Година"
     hours: "Години"
+#    day: "day"
+#    days: "days"
+#    week: "week"
+#    weeks: "weeks"
+#    month: "month"
+#    months: "months"
+#    year: "year"
+#    years: "years"
 
   modal:
     close: "Закрити"
@@ -82,7 +90,7 @@ module.exports = nativeDescription: "українська мова", englishDesc
 #    required: "You need to log in before you can go that way."
 
   home:
-    slogan: "Навчіться програмувати на JavaScript, граючи у гру"
+    slogan: "Навчіться програмувати, граючи у гру"
     no_ie: "На жаль, CodeCombat не працює в IE8 чи більш старих версіях!"
     no_mobile: "CodeCombat не призначений для мобільних приладів і може не працювати!"
     play: "Грати"
@@ -185,25 +193,126 @@ module.exports = nativeDescription: "українська мова", englishDesc
     view_profile: "Переглянути Ваш профіль"
 
   account_profile:
-    edit_settings: "Змінити налаштування"
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
     profile_for_prefix: "Профіль для "
     profile_for_suffix: ""
-    approved: "Затверджений"
-    not_approved: "Не затверджений"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
     looking_for: "Шукає:"
     last_updated: "Останнє оновлення:"
     contact: "Сконтактуватись"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+#    next_city: "city?"
+#    next_country: "pick your country."
+#    next_name: "name?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
     work_experience: "Досвід роботи"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
     education: "Освіта"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
     our_notes: "Наші примітки"
     projects: "Роботи"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
   employers:
     want_to_hire_our_players: "Бажаєш найняти досвідчених гравців CodeCombat?"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-    candidates_count_prefix: "В даний час ми маємо "
-    candidates_count_many: "багато"
-    candidates_count_suffix: "висококваліфікованих і перевірених розробників котрі шукають роботу."
     candidate_name: "Ім‘я"
     candidate_location: "Розташування"
     candidate_looking_for: "Шукає"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "українська мова", englishDesc
     candidate_top_skills: "Найкращі навички"
     candidate_years_experience: "років досвіду"
     candidate_last_updated: "Останнє оновлення"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
   play_level:
     done: "Готово"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "українська мова", englishDesc
     av_entities_sub_title: "Організації"
     av_entities_users_url: "Учасники"
     av_entities_active_instances_url: "Активні вимоги"
+#    av_entities_employer_list_url: "Employer List"
     av_other_sub_title: "Інші"
     av_other_debug_base_url: "Основне (для налагодження base.jade)"
     u_title: "Список учасників"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "українська мова", englishDesc
     thang_description: "Створюйте юнітів, візначайте їхню логіку, графіку та аудіо. Наразі підтримується тільки імпорт векторної flash-графіки."
     level_title: "Редактор рівнів"
     level_description: "Включає інструменти для створення сценаріїв, аудіо й конструювання логіки задля створення усіх типів рівнив. Усе, що ми самі використовуємо! "
+#    achievement_title: "Achievement Editor"
     got_questions: "Є питання з використання редакторів CodeCombat?"
     contact_us: "зв’яжіться з нами!"
     hipchat_prefix: "Ви можете також знайти нас в нашій"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "українська мова", englishDesc
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
     article_search_title: "Шукати статті тут"
     thang_search_title: "Шукати типи об‘єктів тут"
     level_search_title: "Шукати рівні тут"
+#    achievement_search_title: "Search Achievements"
     read_only_warning2: "Примітка: Ви не можете зберегти ніякі зміни, оскільки Ви не зареєструвались."
 
   article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "українська мова", englishDesc
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "українська мова", englishDesc
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/ur.coffee b/app/locale/ur.coffee
index 93f928a23..b426b75cf 100644
--- a/app/locale/ur.coffee
+++ b/app/locale/ur.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "اُردُو", englishDescription: "Urdu",
 #    minutes: "minutes"
 #    hour: "hour"
 #    hours: "hours"
+#    day: "day"
+#    days: "days"
+#    week: "week"
+#    weeks: "weeks"
+#    month: "month"
+#    months: "months"
+#    year: "year"
+#    years: "years"
 
 #  modal:
 #    close: "Close"
@@ -185,25 +193,126 @@ module.exports = nativeDescription: "اُردُو", englishDescription: "Urdu",
 #    view_profile: "View Your Profile"
 
 #  account_profile:
-#    edit_settings: "Edit Settings"
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
 #    profile_for_prefix: "Profile for "
 #    profile_for_suffix: ""
-#    approved: "Approved"
-#    not_approved: "Not Approved"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
 #    looking_for: "Looking for:"
 #    last_updated: "Last updated:"
 #    contact: "Contact"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+#    next_city: "city?"
+#    next_country: "pick your country."
+#    next_name: "name?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
 #    work_experience: "Work Experience"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
 #    education: "Education"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
 #    our_notes: "Our Notes"
 #    projects: "Projects"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
 #  employers:
-#    want_to_hire_our_players: "Want to hire expert CodeCombat players?"
+#    want_to_hire_our_players: "Hire CodeCombat Players"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-#    candidates_count_prefix: "We currently have "
-#    candidates_count_many: "many"
-#    candidates_count_suffix: "highly skilled and vetted developers looking for work."
 #    candidate_name: "Name"
 #    candidate_location: "Location"
 #    candidate_looking_for: "Looking For"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "اُردُو", englishDescription: "Urdu",
 #    candidate_top_skills: "Top Skills"
 #    candidate_years_experience: "Yrs Exp"
 #    candidate_last_updated: "Last Updated"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
 #  play_level:
 #    done: "Done"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "اُردُو", englishDescription: "Urdu",
 #    av_entities_sub_title: "Entities"
 #    av_entities_users_url: "Users"
 #    av_entities_active_instances_url: "Active Instances"
+#    av_entities_employer_list_url: "Employer List"
 #    av_other_sub_title: "Other"
 #    av_other_debug_base_url: "Base (for debugging base.jade)"
 #    u_title: "User List"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "اُردُو", englishDescription: "Urdu",
 #    thang_description: "Build units, defining their default logic, graphics and audio. Currently only supports importing Flash exported vector graphics."
 #    level_title: "Level Editor"
 #    level_description: "Includes the tools for scripting, uploading audio, and constructing custom logic to create all sorts of levels. Everything we use ourselves!"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
 #    contact_us: "Contact us!"
 #    hipchat_prefix: "You can also find us in our"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "اُردُو", englishDescription: "Urdu",
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
 #    article_search_title: "Search Articles Here"
 #    thang_search_title: "Search Thang Types Here"
 #    level_search_title: "Search Levels Here"
+#    achievement_search_title: "Search Achievements"
 #    read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
 #  article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "اُردُو", englishDescription: "Urdu",
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "اُردُو", englishDescription: "Urdu",
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/vi.coffee b/app/locale/vi.coffee
index 555b66da4..032d39202 100644
--- a/app/locale/vi.coffee
+++ b/app/locale/vi.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "Tiếng Việt", englishDescription: "Vietn
 #    minutes: "minutes"
 #    hour: "hour"
 #    hours: "hours"
+#    day: "day"
+#    days: "days"
+#    week: "week"
+#    weeks: "weeks"
+#    month: "month"
+#    months: "months"
+#    year: "year"
+#    years: "years"
 
   modal:
     close: "Đóng"
@@ -82,7 +90,7 @@ module.exports = nativeDescription: "Tiếng Việt", englishDescription: "Vietn
 #    required: "You need to log in before you can go that way."
 
   home:
-    slogan: "Học mã Javascript bằng chơi Games"
+    slogan: "Học mã bằng chơi Games"
     no_ie: "Codecombat không chạy trong Internet Explorer 9 hoặc cũ hơn. Xin lỗi!"
     no_mobile: "Codecombat không được thiết kế cho các thiết bị di động và có thể không hoạt động được!"
     play: "Chơi"
@@ -184,26 +192,127 @@ module.exports = nativeDescription: "Tiếng Việt", englishDescription: "Vietn
 #    sample_profile: "See a sample profile"
 #    view_profile: "View Your Profile"
 
-  account_profile:
-    edit_settings: "Chỉnh sửa cài đặt"
+#  account_profile:
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
 #    profile_for_prefix: "Profile for "
 #    profile_for_suffix: ""
-#    approved: "Approved"
-#    not_approved: "Not Approved"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
 #    looking_for: "Looking for:"
 #    last_updated: "Last updated:"
 #    contact: "Contact"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+#    next_city: "city?"
+#    next_country: "pick your country."
+#    next_name: "name?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
 #    work_experience: "Work Experience"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
 #    education: "Education"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
 #    our_notes: "Our Notes"
 #    projects: "Projects"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
 #  employers:
-#    want_to_hire_our_players: "Want to hire expert CodeCombat players?"
+#    want_to_hire_our_players: "Hire CodeCombat Players"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-#    candidates_count_prefix: "We currently have "
-#    candidates_count_many: "many"
-#    candidates_count_suffix: "highly skilled and vetted developers looking for work."
 #    candidate_name: "Name"
 #    candidate_location: "Location"
 #    candidate_looking_for: "Looking For"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "Tiếng Việt", englishDescription: "Vietn
 #    candidate_top_skills: "Top Skills"
 #    candidate_years_experience: "Yrs Exp"
 #    candidate_last_updated: "Last Updated"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
   play_level:
     done: "Hoàn thành"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "Tiếng Việt", englishDescription: "Vietn
 #    av_entities_sub_title: "Entities"
 #    av_entities_users_url: "Users"
 #    av_entities_active_instances_url: "Active Instances"
+#    av_entities_employer_list_url: "Employer List"
 #    av_other_sub_title: "Other"
 #    av_other_debug_base_url: "Base (for debugging base.jade)"
 #    u_title: "User List"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "Tiếng Việt", englishDescription: "Vietn
 #    thang_description: "Build units, defining their default logic, graphics and audio. Currently only supports importing Flash exported vector graphics."
 #    level_title: "Level Editor"
 #    level_description: "Includes the tools for scripting, uploading audio, and constructing custom logic to create all sorts of levels. Everything we use ourselves!"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
 #    contact_us: "Contact us!"
 #    hipchat_prefix: "You can also find us in our"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "Tiếng Việt", englishDescription: "Vietn
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
 #    article_search_title: "Search Articles Here"
 #    thang_search_title: "Search Thang Types Here"
 #    level_search_title: "Search Levels Here"
+#    achievement_search_title: "Search Achievements"
 #    read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
 #  article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "Tiếng Việt", englishDescription: "Vietn
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "Tiếng Việt", englishDescription: "Vietn
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/zh-HANS.coffee b/app/locale/zh-HANS.coffee
index c0f9c4c0b..dfb9549bb 100644
--- a/app/locale/zh-HANS.coffee
+++ b/app/locale/zh-HANS.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "简体中文", englishDescription: "Chinese
     minutes: "分钟"
     hour: "小时"
     hours: "小时"
+#    day: "day"
+#    days: "days"
+#    week: "week"
+#    weeks: "weeks"
+#    month: "month"
+#    months: "months"
+#    year: "year"
+#    years: "years"
 
   modal:
     close: "关闭"
@@ -82,7 +90,7 @@ module.exports = nativeDescription: "简体中文", englishDescription: "Chinese
 #    required: "You need to log in before you can go that way."
 
   home:
-    slogan: "通过游戏学习 Javascript"
+    slogan: "通过游戏学习编程"
     no_ie: "抱歉! Internet Explorer 9 等旧式预览器无法使用本网站。"
     no_mobile: "CodeCombat 不是针对手机设备设计的,所以可能无法达到最好的体验!"
     play: "开始游戏"
@@ -185,25 +193,126 @@ module.exports = nativeDescription: "简体中文", englishDescription: "Chinese
     view_profile: "浏览个人信息"
 
   account_profile:
-    edit_settings: "编辑设置"
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
     profile_for_prefix: "关于他的基本资料:"
     profile_for_suffix: ""
-    approved: "已认证"
-    not_approved: "为认证"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
     looking_for: "寻找"
     last_updated: "最后一次更新:"
     contact: "联系"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+#    next_city: "city?"
+#    next_country: "pick your country."
+#    next_name: "name?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
     work_experience: "工作经验"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
     education: "教育程度"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
 #    our_notes: "Our Notes"
     projects: "项目"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
   employers:
     want_to_hire_our_players: "想要雇用CodeCombat上的专业玩家?"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
     see_candidates: "点击这里查看我们的忧患人"
-    candidates_count_prefix: "我们当前有 "
-    candidates_count_many: "很多"
-    candidates_count_suffix: "经过我们认证的高手们正在找工作。"
     candidate_name: "姓名"
     candidate_location: "地点"
     candidate_looking_for: "寻找"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "简体中文", englishDescription: "Chinese
     candidate_top_skills: "高级技能"
     candidate_years_experience: "多年工作经验"
     candidate_last_updated: "最后一次更新"
-    candidate_approved: "我们"
-    candidate_active: "他们"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
   play_level:
     done: "完成"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "简体中文", englishDescription: "Chinese
     av_entities_sub_title: "实体"
     av_entities_users_url: "用户"
     av_entities_active_instances_url: "活动实例"
+#    av_entities_employer_list_url: "Employer List"
     av_other_sub_title: "其他"
     av_other_debug_base_url: "Base(用于调试 base.jade)"
     u_title: "用户列表"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "简体中文", englishDescription: "Chinese
     thang_description: "创建单元,并定义单元的逻辑、图形和音频。目前只支持导入 Flash 导出的矢量图形。"
     level_title: "关卡编辑器"
     level_description: "所有用来创造所有难度的关卡的工具,包括脚本、上传音频和构建自定义逻辑。"
+#    achievement_title: "Achievement Editor"
     got_questions: "使用CodeCombat编辑器有问题?"
     contact_us: "联系我们!"
     hipchat_prefix: "你也可以在这里找到我们"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "简体中文", englishDescription: "Chinese
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
     article_search_title: "在这里搜索物品"
     thang_search_title: "在这里搜索物品类型"
     level_search_title: "在这里搜索关卡"
+#    achievement_search_title: "Search Achievements"
     read_only_warning2: "提示:你不能保存任何编辑,因为你没有登陆"
 
   article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "简体中文", englishDescription: "Chinese
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "简体中文", englishDescription: "Chinese
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/zh-HANT.coffee b/app/locale/zh-HANT.coffee
index 19c1cc824..05ab6d070 100644
--- a/app/locale/zh-HANT.coffee
+++ b/app/locale/zh-HANT.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "繁体中文", englishDescription: "Chinese
 #    minutes: "minutes"
 #    hour: "hour"
 #    hours: "hours"
+#    day: "day"
+#    days: "days"
+#    week: "week"
+#    weeks: "weeks"
+#    month: "month"
+#    months: "months"
+#    year: "year"
+#    years: "years"
 
   modal:
     close: "關閉"
@@ -82,7 +90,7 @@ module.exports = nativeDescription: "繁体中文", englishDescription: "Chinese
 #    required: "You need to log in before you can go that way."
 
   home:
-    slogan: "通過玩遊戲學習Javascript 腳本語言"
+    slogan: "通過玩遊戲學習編程"
     no_ie: "抱歉!Internet Explorer 9 等舊的瀏覽器打不開此網站"
     no_mobile: "CodeCombat 不是針對手機設備設計的,所以可能會出問題!"
     play: "開始遊戲"
@@ -185,25 +193,126 @@ module.exports = nativeDescription: "繁体中文", englishDescription: "Chinese
 #    view_profile: "View Your Profile"
 
   account_profile:
-    edit_settings: "帳號設定"
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
     profile_for_prefix: "關於"
     profile_for_suffix: "的基本資料"
-#    approved: "Approved"
-#    not_approved: "Not Approved"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
 #    looking_for: "Looking for:"
 #    last_updated: "Last updated:"
 #    contact: "Contact"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+#    next_city: "city?"
+#    next_country: "pick your country."
+#    next_name: "name?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
 #    work_experience: "Work Experience"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
 #    education: "Education"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
 #    our_notes: "Our Notes"
 #    projects: "Projects"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
 #  employers:
-#    want_to_hire_our_players: "Want to hire expert CodeCombat players?"
+#    want_to_hire_our_players: "Hire CodeCombat Players"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-#    candidates_count_prefix: "We currently have "
-#    candidates_count_many: "many"
-#    candidates_count_suffix: "highly skilled and vetted developers looking for work."
 #    candidate_name: "Name"
 #    candidate_location: "Location"
 #    candidate_looking_for: "Looking For"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "繁体中文", englishDescription: "Chinese
 #    candidate_top_skills: "Top Skills"
 #    candidate_years_experience: "Yrs Exp"
 #    candidate_last_updated: "Last Updated"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
   play_level:
     done: "完成"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "繁体中文", englishDescription: "Chinese
 #    av_entities_sub_title: "Entities"
 #    av_entities_users_url: "Users"
 #    av_entities_active_instances_url: "Active Instances"
+#    av_entities_employer_list_url: "Employer List"
 #    av_other_sub_title: "Other"
 #    av_other_debug_base_url: "Base (for debugging base.jade)"
 #    u_title: "User List"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "繁体中文", englishDescription: "Chinese
 #    thang_description: "Build units, defining their default logic, graphics and audio. Currently only supports importing Flash exported vector graphics."
 #    level_title: "Level Editor"
 #    level_description: "Includes the tools for scripting, uploading audio, and constructing custom logic to create all sorts of levels. Everything we use ourselves!"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
 #    contact_us: "Contact us!"
 #    hipchat_prefix: "You can also find us in our"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "繁体中文", englishDescription: "Chinese
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
 #    article_search_title: "Search Articles Here"
 #    thang_search_title: "Search Thang Types Here"
 #    level_search_title: "Search Levels Here"
+#    achievement_search_title: "Search Achievements"
 #    read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
 #  article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "繁体中文", englishDescription: "Chinese
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "繁体中文", englishDescription: "Chinese
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/zh-WUU-HANS.coffee b/app/locale/zh-WUU-HANS.coffee
index 0f88be822..8c7cc9ded 100644
--- a/app/locale/zh-WUU-HANS.coffee
+++ b/app/locale/zh-WUU-HANS.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "吴语", englishDescription: "Wuu (Simplifi
 #    minutes: "minutes"
 #    hour: "hour"
 #    hours: "hours"
+#    day: "day"
+#    days: "days"
+#    week: "week"
+#    weeks: "weeks"
+#    month: "month"
+#    months: "months"
+#    year: "year"
+#    years: "years"
 
 #  modal:
 #    close: "Close"
@@ -185,25 +193,126 @@ module.exports = nativeDescription: "吴语", englishDescription: "Wuu (Simplifi
 #    view_profile: "View Your Profile"
 
 #  account_profile:
-#    edit_settings: "Edit Settings"
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
 #    profile_for_prefix: "Profile for "
 #    profile_for_suffix: ""
-#    approved: "Approved"
-#    not_approved: "Not Approved"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
 #    looking_for: "Looking for:"
 #    last_updated: "Last updated:"
 #    contact: "Contact"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+#    next_city: "city?"
+#    next_country: "pick your country."
+#    next_name: "name?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
 #    work_experience: "Work Experience"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
 #    education: "Education"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
 #    our_notes: "Our Notes"
 #    projects: "Projects"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
 #  employers:
-#    want_to_hire_our_players: "Want to hire expert CodeCombat players?"
+#    want_to_hire_our_players: "Hire CodeCombat Players"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-#    candidates_count_prefix: "We currently have "
-#    candidates_count_many: "many"
-#    candidates_count_suffix: "highly skilled and vetted developers looking for work."
 #    candidate_name: "Name"
 #    candidate_location: "Location"
 #    candidate_looking_for: "Looking For"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "吴语", englishDescription: "Wuu (Simplifi
 #    candidate_top_skills: "Top Skills"
 #    candidate_years_experience: "Yrs Exp"
 #    candidate_last_updated: "Last Updated"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
 #  play_level:
 #    done: "Done"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "吴语", englishDescription: "Wuu (Simplifi
 #    av_entities_sub_title: "Entities"
 #    av_entities_users_url: "Users"
 #    av_entities_active_instances_url: "Active Instances"
+#    av_entities_employer_list_url: "Employer List"
 #    av_other_sub_title: "Other"
 #    av_other_debug_base_url: "Base (for debugging base.jade)"
 #    u_title: "User List"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "吴语", englishDescription: "Wuu (Simplifi
 #    thang_description: "Build units, defining their default logic, graphics and audio. Currently only supports importing Flash exported vector graphics."
 #    level_title: "Level Editor"
 #    level_description: "Includes the tools for scripting, uploading audio, and constructing custom logic to create all sorts of levels. Everything we use ourselves!"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
 #    contact_us: "Contact us!"
 #    hipchat_prefix: "You can also find us in our"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "吴语", englishDescription: "Wuu (Simplifi
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
 #    article_search_title: "Search Articles Here"
 #    thang_search_title: "Search Thang Types Here"
 #    level_search_title: "Search Levels Here"
+#    achievement_search_title: "Search Achievements"
 #    read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
 #  article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "吴语", englishDescription: "Wuu (Simplifi
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "吴语", englishDescription: "Wuu (Simplifi
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/zh-WUU-HANT.coffee b/app/locale/zh-WUU-HANT.coffee
index 16a240d77..4180369c3 100644
--- a/app/locale/zh-WUU-HANT.coffee
+++ b/app/locale/zh-WUU-HANT.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "吳語", englishDescription: "Wuu (Traditio
     minutes: "分"
     hour: "鐘頭"
     hours: "鐘頭"
+#    day: "day"
+#    days: "days"
+#    week: "week"
+#    weeks: "weeks"
+#    month: "month"
+#    months: "months"
+#    year: "year"
+#    years: "years"
 
   modal:
     close: "關脫"
@@ -82,7 +90,7 @@ module.exports = nativeDescription: "吳語", englishDescription: "Wuu (Traditio
 #    required: "You need to log in before you can go that way."
 
   home:
-    slogan: "打遊戲來學 Javascript"
+    slogan: "打遊戲來學編程"
     no_ie: "對弗住!箇網站叻 Internet Explorer 9 箇粒老個瀏覽器嘸處用。"
     no_mobile: "CodeCombat 勿是照手機設備設計個,怪得嘸數达弗到頂讚個享受!"
     play: "遊戲開打"
@@ -185,25 +193,126 @@ module.exports = nativeDescription: "吳語", englishDescription: "Wuu (Traditio
 #    view_profile: "View Your Profile"
 
   account_profile:
-    edit_settings: "編寫設定"
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
     profile_for_prefix: "有關渠個基本訊息:"
     profile_for_suffix: ""
-    approved: "認證過"
-    not_approved: "朆認證"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
     looking_for: "尋"
     last_updated: "塌爛遍改動:"
     contact: "聯繫"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+#    next_city: "city?"
+#    next_country: "pick your country."
+#    next_name: "name?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
     work_experience: "工作經驗"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
     education: "教育程度"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
 #    our_notes: "Our Notes"
     projects: "項目"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
   employers:
     want_to_hire_our_players: "想討用CodeCombat上個專業打手?"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-    candidates_count_prefix: "我裏瑲朞有 "
-    candidates_count_many: "無數"
-    candidates_count_suffix: "我裏認證過個高手徠搭尋工作。"
     candidate_name: "名字"
     candidate_location: "地址"
     candidate_looking_for: "尋"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "吳語", englishDescription: "Wuu (Traditio
     candidate_top_skills: "高級技能"
     candidate_years_experience: "多年工作經驗"
     candidate_last_updated: "塌爛遍改動"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
   play_level:
     done: "妝下落"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "吳語", englishDescription: "Wuu (Traditio
     av_entities_sub_title: "實體"
     av_entities_users_url: "用戶"
     av_entities_active_instances_url: "活動樣品"
+#    av_entities_employer_list_url: "Employer List"
     av_other_sub_title: "別樣"
     av_other_debug_base_url: "Base(用來調試 base.jade)"
     u_title: "用戶列表"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "吳語", englishDescription: "Wuu (Traditio
     thang_description: "造單元,定寫單元個邏輯、圖像搭聲音。能界只支持導進用 Flash 導出個矢量圖形。"
     level_title: "關編寫器"
     level_description: "所有用來做各個難度關個傢伙,包括腳本、上傳聲音搭自做邏輯。"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
     contact_us: "搭我裏聯繫!"
     hipchat_prefix: "爾徠搭也尋得着我裏"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "吳語", englishDescription: "Wuu (Traditio
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
     article_search_title: "徠箇搭尋物事"
     thang_search_title: "徠箇搭尋物事類型"
     level_search_title: "徠箇搭尋關"
+#    achievement_search_title: "Search Achievements"
     read_only_warning2: "提醒:爾嘸處存編寫,朆登進之故"
 
   article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "吳語", englishDescription: "Wuu (Traditio
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "吳語", englishDescription: "Wuu (Traditio
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/locale/zh.coffee b/app/locale/zh.coffee
index fb96986b9..0a5bf7396 100644
--- a/app/locale/zh.coffee
+++ b/app/locale/zh.coffee
@@ -26,6 +26,14 @@ module.exports = nativeDescription: "中文", englishDescription: "Chinese", tra
     minutes: "分"
     hour: "时"
     hours: "时"
+#    day: "day"
+#    days: "days"
+#    week: "week"
+#    weeks: "weeks"
+#    month: "month"
+#    months: "months"
+#    year: "year"
+#    years: "years"
 
   modal:
     close: "关闭"
@@ -82,7 +90,7 @@ module.exports = nativeDescription: "中文", englishDescription: "Chinese", tra
 #    required: "You need to log in before you can go that way."
 
   home:
-    slogan: "通过游戏学习Javascript脚本语言"
+    slogan: "通过游戏学习编程"
     no_ie: "抱歉!Internet Explorer 9等更旧的预览器打不开此网站"
     no_mobile: "CodeCombat暂时没有手机版本,可能无法运行!"
     play: "玩"
@@ -185,25 +193,126 @@ module.exports = nativeDescription: "中文", englishDescription: "Chinese", tra
 #    view_profile: "View Your Profile"
 
 #  account_profile:
-#    edit_settings: "Edit Settings"
+#    settings: "Settings"
+#    edit_profile: "Edit Profile"
+#    done_editing: "Done Editing"
 #    profile_for_prefix: "Profile for "
 #    profile_for_suffix: ""
-#    approved: "Approved"
-#    not_approved: "Not Approved"
+#    featured: "Featured"
+#    not_featured: "Not Featured"
 #    looking_for: "Looking for:"
 #    last_updated: "Last updated:"
 #    contact: "Contact"
+#    active: "Looking for interview offers now"
+#    inactive: "Not looking for offers right now"
+#    complete: "complete"
+#    next: "Next"
+#    next_city: "city?"
+#    next_country: "pick your country."
+#    next_name: "name?"
+#    next_short_description: "write a short description."
+#    next_long_description: "describe your desired position."
+#    next_skills: "list at least five skills."
+#    next_work: "chronicle your work history."
+#    next_education: "recount your educational ordeals."
+#    next_projects: "show off up to three projects you've worked on."
+#    next_links: "add any personal or social links."
+#    next_photo: "add an optional professional photo."
+#    next_active: "mark yourself open to offers to show up in searches."
+#    example_blog: "Blog"
+#    example_personal_site: "Personal Site"
+#    links_header: "Personal Links"
+#    links_blurb: "Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog."
+#    links_name: "Link Name"
+#    links_name_help: "What are you linking to?"
+#    links_link_blurb: "Link URL"
+#    basics_header: "Update basic info"
+#    basics_active: "Open to Offers"
+#    basics_active_help: "Want interview offers right now?"
+#    basics_job_title: "Desired Job Title"
+#    basics_job_title_help: "What role are you looking for?"
+#    basics_city: "City"
+#    basics_city_help: "City you want to work in (or live in now)."
+#    basics_country: "Country"
+#    basics_country_help: "Country you want to work in (or live in now)."
+#    basics_visa: "US Work Status"
+#    basics_visa_help: "Are you authorized to work in the US, or do you need visa sponsorship?"
+#    basics_looking_for: "Looking For"
+#    basics_looking_for_full_time: "Full-time"
+#    basics_looking_for_part_time: "Part-time"
+#    basics_looking_for_remote: "Remote"
+#    basics_looking_for_contracting: "Contracting"
+#    basics_looking_for_internship: "Internship"
+#    basics_looking_for_help: "What kind of developer position do you want?"
+#    name_header: "Fill in your name"
+#    name_anonymous: "Anonymous Developer"
+#    name_help: "Name you want employers to see, like 'Nick Winter'."
+#    short_description_header: "Write a short description of yourself"
+#    short_description_blurb: "Add a tagline to help an employer quickly learn more about you."
+#    short_description: "Tagline"
+#    short_description_help: "Who are you, and what are you looking for? 140 characters max."
+#    skills_header: "Skills"
+#    skills_help: "Tag relevant developer skills in order of proficiency."
+#    long_description_header: "Describe your desired position"
+#    long_description_blurb: "Tell employers how awesome you are and what role you want."
+#    long_description: "Self Description"
+#    long_description_help: "Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max."
 #    work_experience: "Work Experience"
+#    work_header: "Chronicle your work history"
+#    work_years: "Years of Experience"
+#    work_years_help: "How many years of professional experience (getting paid) developing software do you have?"
+#    work_blurb: "List your relevant work experience, most recent first."
+#    work_employer: "Employer"
+#    work_employer_help: "Name of your employer."
+#    work_role: "Job Title"
+#    work_role_help: "What was your job title or role?"
+#    work_duration: "Duration"
+#    work_duration_help: "When did you hold this gig?"
+#    work_description: "Description"
+#    work_description_help: "What did you do there? (140 chars; optional)"
 #    education: "Education"
+#    education_header: "Recount your academic ordeals"
+#    education_blurb: "List your academic ordeals."
+#    education_school: "School"
+#    education_school_help: "Name of your school."
+#    education_degree: "Degree"
+#    education_degree_help: "What was your degree and field of study?"
+#    education_duration: "Dates"
+#    education_duration_help: "When?"
+#    education_description: "Description"
+#    education_description_help: "Highlight anything about this educational experience. (140 chars; optional)"
 #    our_notes: "Our Notes"
 #    projects: "Projects"
+#    projects_header: "Add 3 projects"
+#    projects_header_2: "Projects (Top 3)"
+#    projects_blurb: "Highlight your projects to amaze employers."
+#    project_name: "Project Name"
+#    project_name_help: "What was the project called?"
+#    project_description: "Description"
+#    project_description_help: "Briefly describe the project."
+#    project_picture: "Picture"
+#    project_picture_help: "Upload a 230x115px or larger image showing off the project."
+#    project_link: "Link"
+#    project_link_help: "Link to the project."
+#    player_code: "Player Code"
 
 #  employers:
-#    want_to_hire_our_players: "Want to hire expert CodeCombat players?"
+#    want_to_hire_our_players: "Hire CodeCombat Players"
+#    what: "What is CodeCombat?"
+#    what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io."
+#    who: "Who Are the Players?"
+#    who_blurb: "CodeCombateers are software developers who enjoy using their programming skills to play games. They range from college seniors at top 20 engineering programs to 20-year industry veterans."
+#    how: "How Do We Find Developers?"
+#    how_blurb: "We host competitive tournaments to attract competitive software engieneers. We then use in-house algorithms to identify the best players among the top 5% of tournament winners."
+#    why: "Why Hire Through Us?"
+#    why_blurb_1: "We will save you time. Every CodeCombateer we feaure is "
+#    why_blurb_2: "looking for work"
+#    why_blurb_3: ", has "
+#    why_blurb_4: "demonstrated top notch technical skills"
+#    why_blurb_5: ", and has been "
+#    why_blurb_6: "personally screened by us"
+#    why_blurb_7: ". Stop screening and start hiring."
 #    see_candidates: "Click here to see our candidates"
-#    candidates_count_prefix: "We currently have "
-#    candidates_count_many: "many"
-#    candidates_count_suffix: "highly skilled and vetted developers looking for work."
 #    candidate_name: "Name"
 #    candidate_location: "Location"
 #    candidate_looking_for: "Looking For"
@@ -211,8 +320,9 @@ module.exports = nativeDescription: "中文", englishDescription: "Chinese", tra
 #    candidate_top_skills: "Top Skills"
 #    candidate_years_experience: "Yrs Exp"
 #    candidate_last_updated: "Last Updated"
-#    candidate_approved: "Us?"
-#    candidate_active: "Them?"
+#    featured_developers: "Featured Developers"
+#    other_developers: "Other Developers"
+#    inactive_developers: "Inactive Developers"
 
 #  play_level:
 #    done: "Done"
@@ -338,6 +448,7 @@ module.exports = nativeDescription: "中文", englishDescription: "Chinese", tra
 #    av_entities_sub_title: "Entities"
 #    av_entities_users_url: "Users"
 #    av_entities_active_instances_url: "Active Instances"
+#    av_entities_employer_list_url: "Employer List"
 #    av_other_sub_title: "Other"
 #    av_other_debug_base_url: "Base (for debugging base.jade)"
 #    u_title: "User List"
@@ -360,6 +471,7 @@ module.exports = nativeDescription: "中文", englishDescription: "Chinese", tra
 #    thang_description: "Build units, defining their default logic, graphics and audio. Currently only supports importing Flash exported vector graphics."
 #    level_title: "Level Editor"
 #    level_description: "Includes the tools for scripting, uploading audio, and constructing custom logic to create all sorts of levels. Everything we use ourselves!"
+#    achievement_title: "Achievement Editor"
 #    got_questions: "Questions about using the CodeCombat editors?"
 #    contact_us: "Contact us!"
 #    hipchat_prefix: "You can also find us in our"
@@ -405,9 +517,12 @@ module.exports = nativeDescription: "中文", englishDescription: "Chinese", tra
 #    new_article_title_login: "Log In to Create a New Article"
 #    new_thang_title_login: "Log In to Create a New Thang Type"
 #    new_level_title_login: "Log In to Create a New Level"
+#    new_achievement_title: "Create a New Achievement"
+#    new_achievement_title_login: "Log In to Create a New Achievement"
 #    article_search_title: "Search Articles Here"
 #    thang_search_title: "Search Thang Types Here"
 #    level_search_title: "Search Levels Here"
+#    achievement_search_title: "Search Achievements"
 #    read_only_warning2: "Note: you can't save any edits here, because you're not logged in."
 
 #  article:
@@ -682,9 +797,12 @@ module.exports = nativeDescription: "中文", englishDescription: "Chinese", tra
 #    watch_victory: "Watch your victory"
 #    defeat_the: "Defeat the"
 #    tournament_ends: "Tournament ends"
+#    tournament_ended: "Tournament ended"
 #    tournament_rules: "Tournament Rules"
 #    tournament_blurb: "Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details"
 #    tournament_blurb_blog: "on our blog"
+#    rules: "Rules"
+#    winners: "Winners"
 
 #  ladder_prizes:
 #    title: "Tournament Prizes"
@@ -763,6 +881,7 @@ module.exports = nativeDescription: "中文", englishDescription: "Chinese", tra
 #    source_document: "Source Document"
 #    document: "Document"
 #    sprite_sheet: "Sprite Sheet"
+#    candidate_sessions: "Candidate Sessions"
 
 #  delta:
 #    added: "Added"
diff --git a/app/models/Achievement.coffee b/app/models/Achievement.coffee
new file mode 100644
index 000000000..88603c6ef
--- /dev/null
+++ b/app/models/Achievement.coffee
@@ -0,0 +1,16 @@
+CocoModel = require './CocoModel'
+util = require '../lib/utils'
+
+module.exports = class Achievement extends CocoModel
+  @className: 'Achievement'
+  @schema: require 'schemas/models/achievement'
+  urlRoot: '/db/achievement'
+
+  isRepeatable: ->
+    @get('proportionalTo')?
+
+  # TODO logic is duplicated in Mongoose Achievement schema
+  getExpFunction: ->
+    kind = @get('function')?.kind or @schema.function.default.kind
+    parameters = @get('function')?.parameters or @schema.function.default.parameters
+    return utils.functionCreators[kind](parameters) if kind of utils.functionCreators
diff --git a/app/models/Article.coffee b/app/models/Article.coffee
index e93c6102a..02e7fe80f 100644
--- a/app/models/Article.coffee
+++ b/app/models/Article.coffee
@@ -1,7 +1,7 @@
-CocoModel = require('./CocoModel')
+CocoModel = require './CocoModel'
 
 module.exports = class Article extends CocoModel
-  @className: "Article"
+  @className: 'Article'
   @schema: require 'schemas/models/article'
-  urlRoot: "/db/article"
+  urlRoot: '/db/article'
   saveBackups: true
diff --git a/app/models/CocoModel.coffee b/app/models/CocoModel.coffee
index add8b5600..0d2846359 100644
--- a/app/models/CocoModel.coffee
+++ b/app/models/CocoModel.coffee
@@ -1,8 +1,10 @@
 storage = require 'lib/storage'
 deltasLib = require 'lib/deltas'
 
+NewAchievementCollection = require '../collections/NewAchievementCollection'
+
 class CocoModel extends Backbone.Model
-  idAttribute: "_id"
+  idAttribute: '_id'
   loaded: false
   loading: false
   saveBackups: false
@@ -15,10 +17,10 @@ class CocoModel extends Backbone.Model
     super()
     if not @constructor.className
       console.error("#{@} needs a className set.")
-    @markToRevert()
     @addSchemaDefaults()
     @on 'sync', @onLoaded, @
     @on 'error', @onError, @
+    @on 'add', @onLoaded, @
     @saveBackup = _.debounce(@saveBackup, 500)
 
   type: ->
@@ -38,62 +40,88 @@ class CocoModel extends Backbone.Model
     @loaded = true
     @loading = false
     @jqxhr = null
-    @markToRevert()
     @loadFromBackup()
 
   getNormalizedURL: -> "#{@urlRoot}/#{@id}"
 
   set: ->
+    inFlux = @loading or not @loaded
+    @markToRevert() unless inFlux or @_revertAttributes
     res = super(arguments...)
-    @saveBackup() if @saveBackups and @loaded and @hasLocalChanges()
+    @saveBackup() if @saveBackups and (not inFlux) and @hasLocalChanges()
     res
 
   loadFromBackup: ->
     return unless @saveBackups
     existing = storage.load @id
     if existing
-      @set(existing, {silent:true})
+      @set(existing, {silent: true})
       CocoModel.backedUp[@id] = @
 
-  saveBackup: ->
+  saveBackup: -> @saveBackupNow()
+    
+  saveBackupNow: ->
     storage.save(@id, @attributes)
     CocoModel.backedUp[@id] = @
 
   @backedUp = {}
   schema: -> return @constructor.schema
 
+  getValidationErrors: ->
+    errors = tv4.validateMultiple(@attributes, @constructor.schema or {}).errors
+    return errors if errors?.length
+
   validate: ->
-    result = tv4.validateMultiple(@attributes, @constructor.schema? or {})
-    if result.errors?.length
-      console.log @, "got validate result with errors:", result
-    return result.errors unless result.valid
+    errors = @getValidationErrors()
+    if errors?.length
+      console.debug "Validation failed for #{@constructor.className}: '#{@get('name') or @}'."
+      for error in errors
+        console.debug "\t", error.dataPath, ':', error.message
+      return errors
 
   save: (attrs, options) ->
-    @set 'editPath', document.location.pathname
     options ?= {}
+    options.headers ?= {}
+    options.headers['X-Current-Path'] = document.location.pathname
     success = options.success
     error = options.error
     options.success = (model, res) =>
-      @trigger "save:success", @
+      @trigger 'save:success', @
       success(@, res) if success
-      @markToRevert()
+      @markToRevert() if @_revertAttributes
       @clearBackup()
+      CocoModel.pollAchievements()
     options.error = (model, res) =>
       error(@, res) if error
       return unless @notyErrors
       errorMessage = "Error saving #{@get('name') ? @type()}"
       console.error errorMessage, res.responseJSON
       noty text: "#{errorMessage}: #{res.status} #{res.statusText}", layout: 'topCenter', type: 'error', killer: false, timeout: 10000
-    @trigger "save", @
+    @trigger 'save', @
     return super attrs, options
 
+  patch: (options) ->
+    return false unless @_revertAttributes
+    options ?= {}
+    options.patch = true
+
+    attrs = {_id: @id}
+    keys = []
+    for key in _.keys @attributes
+      unless _.isEqual @attributes[key], @_revertAttributes[key]
+        attrs[key] = @attributes[key]
+        keys.push key
+
+    return unless keys.length
+    console.debug 'Patching', @get('name') or @, keys
+    @save(attrs, options)
+
   fetch: ->
     @jqxhr = super(arguments...)
     @loading = true
     @jqxhr
 
   markToRevert: ->
-    return unless @saveBackups
     if @type() is 'ThangType'
       @_revertAttributes = _.clone @attributes  # No deep clones for these!
     else
@@ -107,11 +135,10 @@ class CocoModel extends Backbone.Model
     storage.remove @id
 
   hasLocalChanges: ->
-    not _.isEqual @attributes, @_revertAttributes
+    @_revertAttributes and not _.isEqual @attributes, @_revertAttributes
 
   cloneNewMinorVersion: ->
     newData = _.clone @attributes
-
     clone = new @constructor(newData)
     clone
 
@@ -126,23 +153,22 @@ class CocoModel extends Backbone.Model
     false
 
   publish: ->
-    if @isPublished() then throw new Error("Can't publish what's already-published. Can't kill what's already dead.")
-    @set "permissions", (@get("permissions") or []).concat({access: 'read', target: 'public'})
+    if @isPublished() then throw new Error('Can\'t publish what\'s already-published. Can\'t kill what\'s already dead.')
+    @set 'permissions', (@get('permissions') or []).concat({access: 'read', target: 'public'})
 
   addSchemaDefaults: ->
     return if @addedSchemaDefaults
     @addedSchemaDefaults = true
     for prop, defaultValue of @constructor.schema.default or {}
       continue if @get(prop)?
-      #console.log "setting", prop, "to", defaultValue, "from attributes.default"
+      #console.log 'setting', prop, 'to', defaultValue, 'from attributes.default'
       @set prop, defaultValue
     for prop, sch of @constructor.schema.properties or {}
       continue if @get(prop)?
       continue if prop is 'emails' # hack, defaults are handled through User.coffee's email-specific methods.
-      #console.log "setting", prop, "to", sch.default, "from sch.default" if sch.default?
+      #console.log 'setting', prop, 'to', sch.default, 'from sch.default' if sch.default?
       @set prop, sch.default if sch.default?
     if @loaded
-      @markToRevert()
       @loadFromBackup()
 
   @isObjectID: (s) ->
@@ -182,8 +208,13 @@ class CocoModel extends Backbone.Model
 
   applyDelta: (delta) ->
     newAttributes = $.extend(true, {}, @attributes)
-    jsondiffpatch.patch newAttributes, delta
+    try
+      jsondiffpatch.patch newAttributes, delta
+    catch error
+      console.error 'Error applying delta\n', JSON.stringify(delta, null, '\t'), '\n\nto attributes\n\n', newAttributes
+      return false
     @set newAttributes
+    return true
 
   getExpandedDelta: ->
     delta = @getDelta()
@@ -194,7 +225,7 @@ class CocoModel extends Backbone.Model
     deltasLib.expandDelta(delta, @attributes, @schema())
 
   watch: (doWatch=true) ->
-    $.ajax("#{@urlRoot}/#{@id}/watch", {type:'PUT', data:{on:doWatch}})
+    $.ajax("#{@urlRoot}/#{@id}/watch", {type: 'PUT', data: {on: doWatch}})
     @watching = -> doWatch
 
   watching: ->
@@ -224,9 +255,9 @@ class CocoModel extends Backbone.Model
 
   @getReferencedModel: (data, schema) ->
     return null unless schema.links?
-    linkObject = _.find schema.links, rel: "db"
+    linkObject = _.find schema.links, rel: 'db'
     return null unless linkObject
-    return null if linkObject.href.match("thang.type") and not @isObjectID(data)  # Skip loading hardcoded Thang Types for now (TODO)
+    return null if linkObject.href.match('thang.type') and not @isObjectID(data)  # Skip loading hardcoded Thang Types for now (TODO)
 
     # not fully extensible, but we can worry about that later
     link = linkObject.href
@@ -259,4 +290,13 @@ class CocoModel extends Backbone.Model
   getURL: ->
     return if _.isString @url then @url else @url()
 
+  @pollAchievements: ->
+    achievements = new NewAchievementCollection
+    achievements.fetch(
+      success: (collection) ->
+        me.fetch (success: -> Backbone.Mediator.publish('achievements:new', collection)) unless _.isEmpty(collection.models)
+    )
+
+CocoModel.pollAchievements = _.debounce CocoModel.pollAchievements, 500
+
 module.exports = CocoModel
diff --git a/app/models/File.coffee b/app/models/File.coffee
index e2fe10446..b4ac0079f 100644
--- a/app/models/File.coffee
+++ b/app/models/File.coffee
@@ -1,6 +1,6 @@
-CocoModel = require('./CocoModel')
+CocoModel = require './CocoModel'
 
 module.exports = class File extends CocoModel
-  @className: "File"
+  @className: 'File'
   @schema: {}
-  urlRoot: "/db/file"
+  urlRoot: '/db/file'
diff --git a/app/models/Level.coffee b/app/models/Level.coffee
index 0a56ccc09..6ae47f25e 100644
--- a/app/models/Level.coffee
+++ b/app/models/Level.coffee
@@ -4,10 +4,10 @@ LevelSystem = require './LevelSystem'
 ThangType = require './ThangType'
 
 module.exports = class Level extends CocoModel
-  @className: "Level"
+  @className: 'Level'
   @schema: require 'schemas/models/level'
-  urlRoot: "/db/level"
-  
+  urlRoot: '/db/level'
+
   serialize: (supermodel) ->
     # o = _.cloneDeep @attributes  # slow in level editor when there are hundreds of Thangs
     o = $.extend true, {}, @attributes
@@ -23,7 +23,6 @@ module.exports = class Level extends CocoModel
     @fillInDefaultSystemConfiguration o.systems
 
     o.thangTypes = (original: tt.get('original'), name: tt.get('name') for tt in supermodel.getModels ThangType)
-
     o
 
   sortSystems: (levelSystems, systemModels) ->
@@ -31,11 +30,11 @@ module.exports = class Level extends CocoModel
     visit = (system) ->
       return if system.original of originalsSeen
       systemModel = _.find systemModels, {original: system.original}
-      console.error "Couldn't find model for original", system.original, "from", systemModels unless systemModel
+      console.error 'Couldn\'t find model for original', system.original, 'from', systemModels unless systemModel
       for d in systemModel.dependencies or []
         system2 = _.find levelSystems, {original: d.original}
         visit system2
-      #console.log "sorted systems adding", systemModel.name
+      #console.log 'sorted systems adding', systemModel.name
       sorted.push {model: systemModel, config: _.cloneDeep system.config}
       originalsSeen[system.original] = true
     visit system for system in levelSystems
@@ -54,21 +53,21 @@ module.exports = class Level extends CocoModel
       visit = (c) ->
         return if c in sorted
         lc = _.find levelComponents, {original: c.original}
-        console.error thang.id, "couldn't find lc for", c unless lc
-        if lc.name is "Programmable"
+        console.error thang.id, 'couldn\'t find lc for', c unless lc
+        if lc.name is 'Programmable'
           # Programmable always comes last
           visit c2 for c2 in _.without thang.components, c
         else
           for d in lc.dependencies or []
             c2 = _.find thang.components, {original: d.original}
-            console.error thang.id, "couldn't find dependent Component", d.original, "from", lc.name unless c2
+            console.error thang.id, 'couldn\'t find dependent Component', d.original, 'from', lc.name unless c2
             visit c2
-          if lc.name is "Collides"
-            allied = _.find levelComponents, {name: "Allied"}
+          if lc.name is 'Collides'
+            allied = _.find levelComponents, {name: 'Allied'}
             if allied
               collides = _.find(thang.components, {original: allied.original})
               visit collides if collides
-        #console.log thang.id, "sorted comps adding", lc.name
+        #console.log thang.id, 'sorted comps adding', lc.name
         sorted.push c
       for comp in thang.components
         visit comp
@@ -90,7 +89,7 @@ module.exports = class Level extends CocoModel
     return unless properties
     for prop, schema of properties
       if schema.default? and config[prop] is undefined
-        #console.log "Setting default of", config, "for", prop, "to", schema.default
+        #console.log 'Setting default of', config, 'for', prop, 'to', schema.default
         config[prop] = schema.default
       if schema.type is 'object' and config[prop]
         @walkDefaults config[prop], schema.properties
@@ -107,4 +106,4 @@ module.exports = class Level extends CocoModel
         continue unless c?
         width = c.width if c.width? and c.width > width
         height = c.height if c.height? and c.height > height
-    return {width:width, height:height}
+    return {width: width, height: height}
diff --git a/app/models/LevelComponent.coffee b/app/models/LevelComponent.coffee
index 9a7569ad0..0e261482d 100644
--- a/app/models/LevelComponent.coffee
+++ b/app/models/LevelComponent.coffee
@@ -1,9 +1,9 @@
-CocoModel = require('./CocoModel')
+CocoModel = require './CocoModel'
 
 module.exports = class LevelComponent extends CocoModel
-  @className: "LevelComponent"
+  @className: 'LevelComponent'
   @schema: require 'schemas/models/level_component'
-  urlRoot: "/db/level.component"
+  urlRoot: '/db/level.component'
 
   set: (key, val, options) ->
     if _.isObject key
@@ -19,12 +19,12 @@ module.exports = class LevelComponent extends CocoModel
     @set 'js', @compile(@get 'code') unless @get 'js'
 
   compile: (code) ->
-    if @get('language') and @get('language') isnt 'coffeescript'
-      return console.error("Can't compile", @get('language'), "-- only CoffeeScript.", @)
+    if @get('codeLanguage') and @get('codeLanguage') isnt 'coffeescript'
+      return console.error('Can\'t compile', @get('codeLanguage'), '-- only CoffeeScript.', @)
     try
       js = CoffeeScript.compile(code, bare: true)
     catch e
-      #console.log "couldn't compile", code, "for", @get('name'), "because", e
+      #console.log 'couldn\'t compile', code, 'for', @get('name'), 'because', e
       js = @get 'js'
     js
 
diff --git a/app/models/LevelFeedback.coffee b/app/models/LevelFeedback.coffee
index a4bc1f3a9..1206934d9 100644
--- a/app/models/LevelFeedback.coffee
+++ b/app/models/LevelFeedback.coffee
@@ -1,6 +1,6 @@
-CocoModel = require('./CocoModel')
+CocoModel = require './CocoModel'
 
 module.exports = class LevelFeedback extends CocoModel
-  @className: "LevelFeedback"
+  @className: 'LevelFeedback'
   @schema: require 'schemas/models/level_feedback'
-  urlRoot: "/db/level.feedback"
+  urlRoot: '/db/level.feedback'
diff --git a/app/models/LevelSession.coffee b/app/models/LevelSession.coffee
index 90ff84260..b98cac66e 100644
--- a/app/models/LevelSession.coffee
+++ b/app/models/LevelSession.coffee
@@ -1,9 +1,9 @@
-CocoModel = require('./CocoModel')
+CocoModel = require './CocoModel'
 
 module.exports = class LevelSession extends CocoModel
-  @className: "LevelSession"
+  @className: 'LevelSession'
   @schema: require 'schemas/models/level_session'
-  urlRoot: "/db/level.session"
+  urlRoot: '/db/level.session'
 
   initialize: ->
     super()
@@ -16,7 +16,7 @@ module.exports = class LevelSession extends CocoModel
     permissions = @get 'permissions'
     permissions = (p for p in permissions when p.target isnt 'public')
     if @get('multiplayer')
-      permissions.push {target:'public', access:'write'}
+      permissions.push {target: 'public', access: 'write'}
     @set 'permissions', permissions
 
   getSourceFor: (spellKey) ->
@@ -30,9 +30,9 @@ module.exports = class LevelSession extends CocoModel
     return false unless c1 = @get('code')
     return false unless team = @get('team')
     return true unless c2 = @get('submittedCode')
-    thangSpellArr = (s.split("/") for s in @get('teamSpells')[team])
+    thangSpellArr = (s.split('/') for s in @get('teamSpells')[team])
     for item in thangSpellArr
       thang = item[0]
       spell = item[1]
-      return true if c1[thang][spell] isnt c2[thang][spell]
+      return true if c1[thang][spell] isnt c2[thang]?[spell]
     false
diff --git a/app/models/LevelSystem.coffee b/app/models/LevelSystem.coffee
index f2ca539b4..04da10e8e 100644
--- a/app/models/LevelSystem.coffee
+++ b/app/models/LevelSystem.coffee
@@ -1,10 +1,10 @@
-CocoModel = require('./CocoModel')
-SystemNameLoader = require('lib/SystemNameLoader')
+CocoModel = require './CocoModel'
+SystemNameLoader = require 'lib/SystemNameLoader'
 
 module.exports = class LevelSystem extends CocoModel
-  @className: "LevelSystem"
+  @className: 'LevelSystem'
   @schema: require 'schemas/models/level_system'
-  urlRoot: "/db/level.system"
+  urlRoot: '/db/level.system'
 
   set: (key, val, options) ->
     if _.isObject key
@@ -21,12 +21,12 @@ module.exports = class LevelSystem extends CocoModel
     SystemNameLoader.setName @
 
   compile: (code) ->
-    if @get('language') and @get('language') isnt 'coffeescript'
-      return console.error("Can't compile", @get('language'), "-- only CoffeeScript.", @)
+    if @get('codeLanguage') and @get('codeLanguage') isnt 'coffeescript'
+      return console.error('Can\'t compile', @get('codeLanguage'), '-- only CoffeeScript.', @)
     try
       js = CoffeeScript.compile(code, bare: true)
     catch e
-      #console.log "couldn't compile", code, "for", @get('name'), "because", e
+      #console.log 'couldn\'t compile', code, 'for', @get('name'), 'because', e
       js = @get 'js'
     js
 
diff --git a/app/models/Patch.coffee b/app/models/Patch.coffee
index 3416ee44d..f77354638 100644
--- a/app/models/Patch.coffee
+++ b/app/models/Patch.coffee
@@ -1,12 +1,12 @@
-CocoModel = require('./CocoModel')
+CocoModel = require './CocoModel'
 
 module.exports = class PatchModel extends CocoModel
-  @className: "Patch"
+  @className: 'Patch'
   @schema: require 'schemas/models/patch'
-  urlRoot: "/db/patch"
+  urlRoot: '/db/patch'
 
   setStatus: (status) ->
     PatchModel.setStatus @id, status
 
   @setStatus: (id, status) ->
-    $.ajax("/db/patch/#{id}/status", {type:"PUT", data: {status:status}})
+    $.ajax("/db/patch/#{id}/status", {type: 'PUT', data: {status: status}})
diff --git a/app/models/SuperModel.coffee b/app/models/SuperModel.coffee
index c5a4eeb55..c366d8285 100644
--- a/app/models/SuperModel.coffee
+++ b/app/models/SuperModel.coffee
@@ -19,11 +19,11 @@ module.exports = class SuperModel extends Backbone.Model
 
   report: ->
     # Useful for debugging why a SuperModel never finishes loading.
-    console.info "SuperModel report ------------------------"
+    console.info 'SuperModel report ------------------------'
     console.info "#{_.values(@resources).length} resources."
     unfinished = []
     for resource in _.values(@resources) when resource
-      console.info '\t', resource.name, "loaded", resource.isLoaded
+      console.info "\t", resource.name, 'loaded', resource.isLoaded
       unfinished.push resource unless resource.isLoaded
     unfinished
 
@@ -38,7 +38,6 @@ module.exports = class SuperModel extends Backbone.Model
         res = @addModelResource(cachedModel, name, fetchOptions, value)
         res.markLoading()
         return res
-
     else
       @registerModel(model)
       res = @addModelResource(model, name, fetchOptions, value)
@@ -57,7 +56,6 @@ module.exports = class SuperModel extends Backbone.Model
         res = @addModelResource(cachedCollection, name, fetchOptions, value)
         res.markLoading()
         return res
-
     else
       @addCollection collection
       @listenToOnce collection, 'sync', (c) ->
@@ -122,7 +120,7 @@ module.exports = class SuperModel extends Backbone.Model
     return @progress is 1.0 or not @denom
 
   addModelResource: (modelOrCollection, name, fetchOptions, value=1) ->
-    modelOrCollection.saveBackups = @shouldSaveBackups(modelOrCollection)
+    modelOrCollection.saveBackups = modelOrCollection.saveBackups or @shouldSaveBackups(modelOrCollection)
     @checkName(name)
     res = new ModelResource(modelOrCollection, name, fetchOptions, value)
     @storeResource(res, value)
@@ -196,8 +194,6 @@ module.exports = class SuperModel extends Backbone.Model
   getResource: (rid) ->
     return @resources[rid]
 
-
-
 class Resource extends Backbone.Model
   constructor: (name, value=1) ->
     @name = name
@@ -230,8 +226,6 @@ class Resource extends Backbone.Model
 
   load: -> @
 
-
-
 class ModelResource extends Resource
   constructor: (modelOrCollection, name, fetchOptions, value)->
     super(name, value)
@@ -253,7 +247,6 @@ class ModelResource extends Resource
     @jqxhr = null
     @model.jqxhr = null
 
-
 class RequestResource extends Resource
   constructor: (name, jqxhrOptions, value) ->
     super(name, value)
@@ -267,6 +260,4 @@ class RequestResource extends Resource
     @jqxhr.fail => _.defer => @markFailed()
     @
 
-
-
 class SomethingResource extends Resource
diff --git a/app/models/ThangType.coffee b/app/models/ThangType.coffee
index e1ccf1054..76bffd5a0 100644
--- a/app/models/ThangType.coffee
+++ b/app/models/ThangType.coffee
@@ -1,12 +1,12 @@
-CocoModel = require('./CocoModel')
+CocoModel = require './CocoModel'
 SpriteBuilder = require 'lib/sprites/SpriteBuilder'
 
 buildQueue = []
 
 module.exports = class ThangType extends CocoModel
-  @className: "ThangType"
+  @className: 'ThangType'
   @schema: require 'schemas/models/thang_type'
-  urlRoot: "/db/thang.type"
+  urlRoot: '/db/thang.type'
   building: {}
 
   initialize: ->
@@ -16,11 +16,18 @@ module.exports = class ThangType extends CocoModel
     @on 'sync', @setDefaults
     @spriteSheets = {}
 
+    ## Testing memory clearing
+    #f = =>
+    #  console.info 'resetting raw data'
+    #  @unset 'raw'
+    #  @_previousAttributes.raw = null
+    #setTimeout f, 40000
+
   setDefaults: ->
     @resetRawData() unless @get('raw')
 
   resetRawData: ->
-    @set('raw', {shapes:{}, containers:{}, animations:{}})
+    @set('raw', {shapes: {}, containers: {}, animations: {}})
 
   resetSpriteSheetCache: ->
     @buildActions()
@@ -41,7 +48,7 @@ module.exports = class ThangType extends CocoModel
     for name, action of @actions
       action.name = name
       for relatedName, relatedAction of action.relatedActions ? {}
-        relatedAction.name = action.name + "_" + relatedName
+        relatedAction.name = action.name + '_' + relatedName
         @actions[relatedAction.name] = relatedAction
     @actions
 
@@ -107,12 +114,12 @@ module.exports = class ThangType extends CocoModel
       mc = @vectorParser.buildMovieClip name
       continue unless mc
       @builder.addMovieClip mc, null, animation.scale * @options.resolutionFactor
-      framesMap[animation.scale + "_" + name] = @builder._animations[name].frames
+      framesMap[animation.scale + '_' + name] = @builder._animations[name].frames
 
     for name, action of @actions when action.animation
       continue if name is 'portrait'
       scale = action.scale ? @get('scale') ? 1
-      frames = framesMap[scale + "_" + action.animation]
+      frames = framesMap[scale + '_' + action.animation]
       continue unless frames
       frames = @mapFrames(action.frames, frames[0]) if action.frames?
       next = true
@@ -159,7 +166,7 @@ module.exports = class ThangType extends CocoModel
     spriteSheet = @builder.build()
     @logBuild @t0, false, @options.portraitOnly
     @spriteSheets[key] = spriteSheet
-    delete @building[key]
+    @building[key] = false
     @builder = null
     @options = null
     spriteSheet
@@ -171,8 +178,8 @@ module.exports = class ThangType extends CocoModel
     buildQueue[0].t0 = new Date().getTime() if buildQueue[0]
     buildQueue[0]?.buildAsync()
     @spriteSheets[key] = e.target.spriteSheet
-    delete @building[key]
-    @trigger 'build-complete', {key:key, thangType:@}
+    @building[key] = false
+    @trigger 'build-complete', {key: key, thangType: @}
     @vectorParser = null
 
   logBuild: (startTime, async, portrait) ->
@@ -242,14 +249,14 @@ module.exports = class ThangType extends CocoModel
       path: "db/thang.type/#{@get('original')}"
       b64png: src
       force: 'true'
-    $.ajax('/file', { type: 'POST', data: body, success: callback or @onFileUploaded })
+    $.ajax('/file', {type: 'POST', data: body, success: callback or @onFileUploaded})
 
   onFileUploaded: =>
     console.log 'Image uploaded'
 
   @loadUniversalWizard: ->
     return @wizardType if @wizardType
-    wizOriginal = "52a00d55cf1818f2be00000b"
+    wizOriginal = '52a00d55cf1818f2be00000b'
     url = "/db/thang.type/#{wizOriginal}/version"
     @wizardType = new module.exports()
     @wizardType.url = -> url
diff --git a/app/models/User.coffee b/app/models/User.coffee
index a80ad8f14..9766a85aa 100644
--- a/app/models/User.coffee
+++ b/app/models/User.coffee
@@ -1,11 +1,11 @@
 GRAVATAR_URL = 'https://www.gravatar.com/'
 cache = {}
-CocoModel = require('./CocoModel')
+CocoModel = require './CocoModel'
 
 module.exports = class User extends CocoModel
-  @className: "User"
+  @className: 'User'
   @schema: require 'schemas/models/user'
-  urlRoot: "/db/user"
+  urlRoot: '/db/user'
 
   initialize: ->
     super()
@@ -16,24 +16,24 @@ module.exports = class User extends CocoModel
     return 'admin' in permissions
 
   displayName: ->
-    @get('name') or "Anoner"
+    @get('name') or 'Anoner'
 
   lang: ->
-    @get('preferredLanguage') or "en-US"
+    @get('preferredLanguage') or 'en-US'
 
   getPhotoURL: (size=80, useJobProfilePhoto=false) ->
     photoURL = if useJobProfilePhoto then @get('jobProfile')?.photoURL else null
     photoURL ||= @get('photoURL')
     if photoURL
-      prefix = if photoURL.search(/\?/) is -1 then "?" else "&"
+      prefix = if photoURL.search(/\?/) is -1 then '?' else '&'
       return "#{photoURL}#{prefix}s=#{size}" if photoURL.search('http') isnt -1  # legacy
       return "/file/#{photoURL}#{prefix}s=#{size}"
     return "/db/user/#{@id}/avatar?s=#{size}"
 
   @getByID = (id, properties, force) ->
-    {me} = require('lib/auth')
+    {me} = require 'lib/auth'
     return me if me.id is id
-    user = cache[id] or new module.exports({_id:id})
+    user = cache[id] or new module.exports({_id: id})
     if force or not cache[id]
       user.loading = true
       user.fetch(
@@ -44,18 +44,18 @@ module.exports = class User extends CocoModel
       )
     cache[id] = user
     user
-    
+
   getEnabledEmails: ->
     @migrateEmails()
     emails = _.clone(@get('emails')) or {}
     emails = _.defaults emails, @schema().properties.emails.default
     (emailName for emailName, emailDoc of emails when emailDoc.enabled)
-    
+
   setEmailSubscription: (name, enabled) ->
     newSubs = _.clone(@get('emails')) or {}
     (newSubs[name] ?= {}).enabled = enabled
     @set 'emails', newSubs
-    
+
   emailMap:
     announcement: 'generalNews'
     developer: 'archmageNews'
@@ -70,7 +70,25 @@ module.exports = class User extends CocoModel
     return if @attributes.emails or not @attributes.emailSubscriptions
     oldSubs = @get('emailSubscriptions') or []
     newSubs = {}
-    newSubs[newSubName] = { enabled: oldSubName in oldSubs } for oldSubName, newSubName of @emailMap
+    newSubs[newSubName] = {enabled: oldSubName in oldSubs} for oldSubName, newSubName of @emailMap
     @set('emails', newSubs)
-    
+
   isEmailSubscriptionEnabled: (name) -> (@get('emails') or {})[name]?.enabled
+
+  a = 5
+  b = 40
+
+  # y = a * ln(1/b * (x + b)) + 1
+  @levelFromExp: (xp) ->
+    if xp > 0 then Math.floor(a * Math.log((1/b) * (xp + b))) + 1 else 1
+
+  # x = (e^((y-1)/a) - 1) * b
+  @expForLevel: (level) ->
+    Math.ceil((Math.exp((level - 1)/ a) - 1) * b)
+
+  level: ->
+    User.levelFromExp(@get('points'))
+
+  levelFromExp: (xp) -> User.levelFromExp(xp)
+
+  expForLevel: (level) -> User.expForLevel(level)
diff --git a/app/models/UserRemark.coffee b/app/models/UserRemark.coffee
new file mode 100644
index 000000000..73db3ecf3
--- /dev/null
+++ b/app/models/UserRemark.coffee
@@ -0,0 +1,6 @@
+CocoModel = require './CocoModel'
+
+module.exports = class UserRemark extends CocoModel
+  @className: 'UserRemark'
+  @schema: require 'schemas/models/user_remark'
+  urlRoot: '/db/user.remark'
diff --git a/app/schemas/definitions/bus.coffee b/app/schemas/definitions/bus.coffee
index b5625025e..a552d16a8 100644
--- a/app/schemas/definitions/bus.coffee
+++ b/app/schemas/definitions/bus.coffee
@@ -1,14 +1,14 @@
 module.exports =
   bus:
-    title: "Bus"
-    id: "bus"
-    $schema: "http://json-schema.org/draft-04/schema#"
-    description: "Bus" # TODO
-    type: "object"
+    title: 'Bus'
+    id: 'bus'
+    $schema: 'http://json-schema.org/draft-04/schema#'
+    description: 'Bus' # TODO
+    type: 'object'
     properties: # TODO
       joined:
-        type: "boolean"
+        type: ['boolean', 'null']
       players:
-        type: "object"
-    required: ["joined", "players"]
-    additionalProperties: false
\ No newline at end of file
+        type: 'object'
+    required: ['joined', 'players']
+    additionalProperties: true
diff --git a/app/schemas/definitions/misc.coffee b/app/schemas/definitions/misc.coffee
index bbf9f5c02..79ce47b11 100644
--- a/app/schemas/definitions/misc.coffee
+++ b/app/schemas/definitions/misc.coffee
@@ -1,12 +1,12 @@
 module.exports =
   jQueryEvent:
-    title: "jQuery Event"
-    id: "jQueryEvent"
-    $schema: "http://json-schema.org/draft-04/schema#"
-    description: "A standard jQuery Event"
-    type: "object"
+    title: 'jQuery Event'
+    id: 'jQueryEvent'
+    $schema: 'http://json-schema.org/draft-04/schema#'
+    description: 'A standard jQuery Event'
+    type: 'object'
     properties: # TODO schema complete
       altKey:
-        type: "boolean"
+        type: 'boolean'
     required: []
     additionalProperties: true
diff --git a/app/schemas/i18n_schema.coffee b/app/schemas/i18n_schema.coffee
index 2a2aaf816..20053d47e 100644
--- a/app/schemas/i18n_schema.coffee
+++ b/app/schemas/i18n_schema.coffee
@@ -3,26 +3,24 @@ c = require './schemas'
 
 languageCodeArrayRegex = c.generateLanguageCodeArrayRegex()
 
-
 ExampleSchema = {
-  title: "Example Schema",
-  description:"An example schema",
-  type: "object",
+  title: 'Example Schema',
+  description: 'An example schema',
+  type: 'object',
   properties: {
     text: {
-      title: "Text",
-      description: "A short message to display in the dialogue area. Markdown okay.",
-      type: "string",
+      title: 'Text',
+      description: 'A short message to display in the dialogue area. Markdown okay.',
+      type: 'string',
       maxLength: 400
     },
-    i18n: {"$ref": "#/definitions/i18n"}
+    i18n: {'$ref': '#/definitions/i18n'}
   },
-
   definitions: {
     i18n: {
-      title: "i18n",
-      description: "The internationalization object",
-      type: "object",
+      title: 'i18n',
+      description: 'The internationalization object',
+      type: 'object',
       patternProperties: {
         languageCodeArrayRegex: {
           additionalProperties: false,
@@ -30,19 +28,18 @@ ExampleSchema = {
           #put the translatable properties here
           #if it is possible to not include i18n with a reference
           # to #/properties, you could just do
-          properties: {"$ref":"#/properties"}
-           # text: {"$ref": "#/properties/text"}
+          properties: {'$ref': '#/properties'}
+           # text: {'$ref': '#/properties/text'}
           }
           default: {
-            title: "LanguageCode",
-            description: "LanguageDescription"
+            title: 'LanguageCode',
+            description: 'LanguageDescription'
           }
         }
       }
     }
-  },
-
+  }
 }
 
 #define a i18n object type for each schema, then have the i18n have it's oneOf check against
-#translatable schemas of that object
\ No newline at end of file
+#translatable schemas of that object
diff --git a/app/schemas/metaschema.coffee b/app/schemas/metaschema.coffee
index 4d9d7c0d8..163e87d98 100644
--- a/app/schemas/metaschema.coffee
+++ b/app/schemas/metaschema.coffee
@@ -1,132 +1,132 @@
 # The JSON Schema Core/Validation Meta-Schema, but with titles and descriptions added to make it easier to edit in Treema, and in CoffeeScript
 
 module.exports =
-  id: "metaschema"
-  displayProperty: "title"
-  $schema: "http://json-schema.org/draft-04/schema#"
-  title: "Schema"
-  description: "Core schema meta-schema"
+  id: 'metaschema'
+  displayProperty: 'title'
+  $schema: 'http://json-schema.org/draft-04/schema#'
+  title: 'Schema'
+  description: 'Core schema meta-schema'
   definitions:
     schemaArray:
-      type: "array"
+      type: 'array'
       minItems: 1
-      items: { $ref: "#" }
-      title: "Array of Schemas"
-      "default": [{}]
+      items: {$ref: '#'}
+      title: 'Array of Schemas'
+      'default': [{}]
     positiveInteger:
-      type: "integer"
+      type: 'integer'
       minimum: 0
-      title: "Positive Integer"
+      title: 'Positive Integer'
     positiveIntegerDefault0:
-      allOf: [ { $ref: "#/definitions/positiveInteger" }, { "default": 0 } ]
+      allOf: [{$ref: '#/definitions/positiveInteger'}, {'default': 0}]
     simpleTypes:
-      title: "Single Type"
-      "enum": [ "array", "boolean", "integer", "null", "number", "object", "string" ]
+      title: 'Single Type'
+      'enum': ['array', 'boolean', 'integer', 'null', 'number', 'object', 'string']
     stringArray:
-      type: "array"
-      items: { type: "string" }
+      type: 'array'
+      items: {type: 'string'}
       minItems: 1
       uniqueItems: true
-      title: "String Array"
-      "default": ['']
-  type: "object"
+      title: 'String Array'
+      'default': ['']
+  type: 'object'
   properties:
     id:
-      type: "string"
-      format: "uri"
+      type: 'string'
+      format: 'uri'
     $schema:
-      type: "string"
-      format: "uri"
-      "default": "http://json-schema.org/draft-04/schema#"
+      type: 'string'
+      format: 'uri'
+      'default': 'http://json-schema.org/draft-04/schema#'
     title:
-      type: "string"
+      type: 'string'
     description:
-      type: "string"
-    "default": {}
+      type: 'string'
+    'default': {}
     multipleOf:
-      type: "number"
+      type: 'number'
       minimum: 0
       exclusiveMinimum: true
     maximum:
-      type: "number"
+      type: 'number'
     exclusiveMaximum:
-      type: "boolean"
-      "default": false
+      type: 'boolean'
+      'default': false
     minimum:
-      type: "number"
+      type: 'number'
     exclusiveMinimum:
-      type: "boolean"
-      "default": false
-    maxLength: { $ref: "#/definitions/positiveInteger" }
-    minLength: { $ref: "#/definitions/positiveIntegerDefault0" }
+      type: 'boolean'
+      'default': false
+    maxLength: {$ref: '#/definitions/positiveInteger'}
+    minLength: {$ref: '#/definitions/positiveIntegerDefault0'}
     pattern:
-      type: "string"
-      format: "regex"
+      type: 'string'
+      format: 'regex'
     additionalItems:
       anyOf: [
-        { type: "boolean", "default": false }
-        { $ref: "#" }
+        {type: 'boolean', 'default': false}
+        {$ref: '#'}
       ]
     items:
       anyOf: [
-        { $ref: "#" }
-        { $ref: "#/definitions/schemaArray" }
+        {$ref: '#'}
+        {$ref: '#/definitions/schemaArray'}
       ]
-      "default": {}
-    maxItems: { $ref: "#/definitions/positiveInteger" }
-    minItems: { $ref: "#/definitions/positiveIntegerDefault0" }
+      'default': {}
+    maxItems: {$ref: '#/definitions/positiveInteger'}
+    minItems: {$ref: '#/definitions/positiveIntegerDefault0'}
     uniqueItems:
-      type: "boolean"
-      "default": false
-    maxProperties: { $ref: "#/definitions/positiveInteger" }
-    minProperties: { $ref: "#/definitions/positiveIntegerDefault0" }
-    required: { $ref: "#/definitions/stringArray" }
+      type: 'boolean'
+      'default': false
+    maxProperties: {$ref: '#/definitions/positiveInteger'}
+    minProperties: {$ref: '#/definitions/positiveIntegerDefault0'}
+    required: {$ref: '#/definitions/stringArray'}
     additionalProperties:
       anyOf: [
-        { type: "boolean", "default": true }
-        { $ref: "#" }
+        {type: 'boolean', 'default': true}
+        {$ref: '#'}
       ]
-      "default": {}
+      'default': {}
     definitions:
-      type: "object"
-      additionalProperties: { $ref: "#" }
-      "default": {}
+      type: 'object'
+      additionalProperties: {$ref: '#'}
+      'default': {}
     properties:
-      type: "object"
-      additionalProperties: { $ref: "#" }
-      "default": {}
+      type: 'object'
+      additionalProperties: {$ref: '#'}
+      'default': {}
     patternProperties:
-      type: "object"
-      additionalProperties: { $ref: "#" }
-      "default": {}
+      type: 'object'
+      additionalProperties: {$ref: '#'}
+      'default': {}
     dependencies:
-      type: "object"
+      type: 'object'
       additionalProperties:
         anyOf: [
-          { $ref: "#" }
-          { $ref: "#/definitions/stringArray" }
+          {$ref: '#'}
+          {$ref: '#/definitions/stringArray'}
         ]
-    "enum":
-      type: "array"
+    'enum':
+      type: 'array'
       minItems: 1
       uniqueItems: true
-      "default": ['']
+      'default': ['']
     type:
       anyOf: [
-        { $ref: "#/definitions/simpleTypes" }
+        {$ref: '#/definitions/simpleTypes'}
         {
-          type: "array"
-          items: { $ref: "#/definitions/simpleTypes" }
+          type: 'array'
+          items: {$ref: '#/definitions/simpleTypes'}
           minItems: 1
           uniqueItems: true
-          title: "Array of Types"
-          "default": ['string']
+          title: 'Array of Types'
+          'default': ['string']
         }]
-    allOf: { $ref: "#/definitions/schemaArray" }
-    anyOf: { $ref: "#/definitions/schemaArray" }
-    oneOf: { $ref: "#/definitions/schemaArray" }
-    not: { $ref: "#" }
+    allOf: {$ref: '#/definitions/schemaArray'}
+    anyOf: {$ref: '#/definitions/schemaArray'}
+    oneOf: {$ref: '#/definitions/schemaArray'}
+    not: {$ref: '#'}
   dependencies:
-    exclusiveMaximum: [ "maximum" ]
-    exclusiveMinimum: [ "minimum" ]
-  "default": {}
+    exclusiveMaximum: ['maximum']
+    exclusiveMinimum: ['minimum']
+  'default': {}
diff --git a/app/schemas/models/achievement.coffee b/app/schemas/models/achievement.coffee
new file mode 100644
index 000000000..196c81974
--- /dev/null
+++ b/app/schemas/models/achievement.coffee
@@ -0,0 +1,71 @@
+c = require './../schemas'
+
+# TODO add these: http://docs.mongodb.org/manual/reference/operator/query/
+MongoQueryOperatorSchema =
+  title: 'MongoDB Query operator'
+  id: 'mongoQueryOperator'
+  type: 'object'
+  properties:
+    '$gt': type: 'number'
+    '$gte': type: 'number'
+    '$in': type: 'array'
+    '$lt': type: 'number'
+    '$lte': type: 'number'
+    '$ne': type: ['number', 'string']
+    '$nin': type: 'array'
+  additionalProperties: true # TODO set to false when the schema's done
+
+MongoFindQuerySchema =
+  title: 'MongoDB Query'
+  id: 'mongoFindQuery'
+  type: 'object'
+  patternProperties:
+    #'^[-a-zA-Z0-9_]*$':
+    '^[-a-zA-Z0-9\.]*$':
+      oneOf: [
+        #{$ref: '#/definitions/' + MongoQueryOperatorSchema.id},
+        {type: 'string'},
+        {type: 'object'}
+      ]
+  additionalProperties: true # TODO make Treema accept new pattern matched keys
+  definitions: {}
+
+MongoFindQuerySchema.definitions[MongoQueryOperatorSchema.id] = MongoQueryOperatorSchema
+
+AchievementSchema = c.object()
+c.extendNamedProperties AchievementSchema
+c.extendBasicProperties AchievementSchema, 'article'
+c.extendSearchableProperties AchievementSchema
+
+_.extend(AchievementSchema.properties,
+  query:
+    #type:'object'
+    $ref: '#/definitions/' + MongoFindQuerySchema.id
+  worth: {type: 'number'}
+  collection: {type: 'string'}
+  description: {type: 'string'}
+  userField: {type: 'string'}
+  related: c.objectId(description: 'Related entity')
+  icon: {type: 'string', format: 'image-file', title: 'Icon'}
+  proportionalTo:
+    type: 'string'
+    description: 'For repeatables only. Denotes the field a repeatable achievement needs for its calculations'
+  function:
+    type: 'object'
+    properties:
+      kind: {enum: ['linear', 'logarithmic'], default: 'linear'}
+      parameters:
+        type: 'object'
+        properties:
+          a: {type: 'number', default: 1}
+          b: {type: 'number', default: 1}
+          c: {type: 'number', default: 1}
+    default: {kind: 'linear', parameters: a: 1}
+    required: ['kind', 'parameters']
+    additionalProperties: false
+)
+
+AchievementSchema.definitions = {}
+AchievementSchema.definitions[MongoFindQuerySchema.id] = MongoFindQuerySchema
+
+module.exports = AchievementSchema
diff --git a/app/schemas/models/article.coffee b/app/schemas/models/article.coffee
index 60f65640f..eccab57b3 100644
--- a/app/schemas/models/article.coffee
+++ b/app/schemas/models/article.coffee
@@ -3,8 +3,8 @@ c = require './../schemas'
 ArticleSchema = c.object()
 c.extendNamedProperties ArticleSchema  # name first
 
-ArticleSchema.properties.body = { type: 'string', title: 'Content', format: 'markdown' }
-ArticleSchema.properties.i18n = { type: 'object', title: 'i18n', format: 'i18n', props: ['name', 'body'] }
+ArticleSchema.properties.body = {type: 'string', title: 'Content', format: 'markdown'}
+ArticleSchema.properties.i18n = {type: 'object', title: 'i18n', format: 'i18n', props: ['name', 'body']}
 
 c.extendBasicProperties ArticleSchema, 'article'
 c.extendSearchableProperties ArticleSchema
diff --git a/app/schemas/models/earned_achievement.coffee b/app/schemas/models/earned_achievement.coffee
new file mode 100644
index 000000000..12451ceac
--- /dev/null
+++ b/app/schemas/models/earned_achievement.coffee
@@ -0,0 +1,30 @@
+c = require './../schemas'
+
+module.exports =
+  EarnedAchievementSchema =
+    type: 'object'
+    properties:
+      user: c.objectId
+        links:
+          [
+            {
+              rel: 'extra'
+              href: '/db/user/{($)}'
+            }
+          ]
+      achievement: c.objectId
+        links:
+          [
+            {
+              rel: 'extra'
+              href: '/db/achievement/{($)}'
+            }
+          ]
+      collection: type: 'string'
+      achievementName: type: 'string'
+      created: type: 'date'
+      changed: type: 'date'
+      achievedAmount: type: 'number'
+      earnedPoints: type: 'number'
+      previouslyAchievedAmount: {type: 'number', default: 0}
+      notified: type: 'boolean'
diff --git a/app/schemas/models/level.coffee b/app/schemas/models/level.coffee
index 444ac24c6..eba42f599 100644
--- a/app/schemas/models/level.coffee
+++ b/app/schemas/models/level.coffee
@@ -3,242 +3,242 @@ ThangComponentSchema = require './thang_component'
 
 SpecificArticleSchema = c.object()
 c.extendNamedProperties SpecificArticleSchema  # name first
-SpecificArticleSchema.properties.body = { type: 'string', title: 'Content', description: "The body content of the article, in Markdown.", format: 'markdown' }
-SpecificArticleSchema.properties.i18n = {type: "object", format: 'i18n', props: ['name', 'body'], description: "Help translate this article"}
+SpecificArticleSchema.properties.body = {type: 'string', title: 'Content', description: 'The body content of the article, in Markdown.', format: 'markdown'}
+SpecificArticleSchema.properties.i18n = {type: 'object', format: 'i18n', props: ['name', 'body'], description: 'Help translate this article'}
 SpecificArticleSchema.displayProperty = 'name'
 
-side = {title: "Side", description: "A side.", type: 'string', 'enum': ['left', 'right', 'top', 'bottom']}
-thang = {title: "Thang", description: "The name of a Thang.", type: 'string', maxLength: 30, format:'thang'}
+side = {title: 'Side', description: 'A side.', type: 'string', 'enum': ['left', 'right', 'top', 'bottom']}
+thang = {title: 'Thang', description: 'The name of a Thang.', type: 'string', maxLength: 30, format: 'thang'}
 
-eventPrereqValueTypes = ["boolean", "integer", "number", "null", "string"] # not "object" or "array"
-EventPrereqSchema = c.object {title: "Event Prerequisite", format: 'event-prereq', description: "Script requires that the value of some property on the event triggering it to meet some prerequisite.", "default": {eventProps: []}, required: ["eventProps"]},
-  eventProps: c.array {'default': ["thang"], format:'event-value-chain', maxItems: 10, title: "Event Property", description: 'A chain of keys in the event, like "thang.pos.x" to access event.thang.pos.x.'}, c.shortString(title: "Property", description: "A key in the event property key chain.")
-  equalTo: c.object {type: eventPrereqValueTypes, title: "==", description: "Script requires the event's property chain value to be equal to this value."}
-  notEqualTo: c.object {type: eventPrereqValueTypes, title: "!=", description: "Script requires the event's property chain value to *not* be equal to this value."}
-  greaterThan: {type: 'number', title: ">", description: "Script requires the event's property chain value to be greater than this value."}
-  greaterThanOrEqualTo: {type: 'number', title: ">=", description: "Script requires the event's property chain value to be greater or equal to this value."}
-  lessThan: {type: 'number', title: "<", description: "Script requires the event's property chain value to be less than this value."}
-  lessThanOrEqualTo: {type: 'number', title: "<=", description: "Script requires the event's property chain value to be less than or equal to this value."}
-  containingString: c.shortString(title: "Contains", description: "Script requires the event's property chain value to be a string containing this string.")
-  notContainingString: c.shortString(title: "Does not contain", description: "Script requires the event's property chain value to *not* be a string containing this string.")
-  containingRegexp: c.shortString(title: "Contains Regexp", description: "Script requires the event's property chain value to be a string containing this regular expression.")
-  notContainingRegexp: c.shortString(title: "Does not contain regexp", description: "Script requires the event's property chain value to *not* be a string containing this regular expression.")
+eventPrereqValueTypes = ['boolean', 'integer', 'number', 'null', 'string'] # not 'object' or 'array'
+EventPrereqSchema = c.object {title: 'Event Prerequisite', format: 'event-prereq', description: 'Script requires that the value of some property on the event triggering it to meet some prerequisite.', 'default': {eventProps: []}, required: ['eventProps']},
+  eventProps: c.array {'default': ['thang'], format: 'event-value-chain', maxItems: 10, title: 'Event Property', description: 'A chain of keys in the event, like "thang.pos.x" to access event.thang.pos.x.'}, c.shortString(title: 'Property', description: 'A key in the event property key chain.')
+  equalTo: c.object {type: eventPrereqValueTypes, title: '==', description: 'Script requires the event\'s property chain value to be equal to this value.'}
+  notEqualTo: c.object {type: eventPrereqValueTypes, title: '!=', description: 'Script requires the event\'s property chain value to *not* be equal to this value.'}
+  greaterThan: {type: 'number', title: '>', description: 'Script requires the event\'s property chain value to be greater than this value.'}
+  greaterThanOrEqualTo: {type: 'number', title: '>=', description: 'Script requires the event\'s property chain value to be greater or equal to this value.'}
+  lessThan: {type: 'number', title: '<', description: 'Script requires the event\'s property chain value to be less than this value.'}
+  lessThanOrEqualTo: {type: 'number', title: '<=', description: 'Script requires the event\'s property chain value to be less than or equal to this value.'}
+  containingString: c.shortString(title: 'Contains', description: 'Script requires the event\'s property chain value to be a string containing this string.')
+  notContainingString: c.shortString(title: 'Does not contain', description: 'Script requires the event\'s property chain value to *not* be a string containing this string.')
+  containingRegexp: c.shortString(title: 'Contains Regexp', description: 'Script requires the event\'s property chain value to be a string containing this regular expression.')
+  notContainingRegexp: c.shortString(title: 'Does not contain regexp', description: 'Script requires the event\'s property chain value to *not* be a string containing this regular expression.')
 
-GoalSchema = c.object {title: "Goal", description: "A goal that the player can accomplish.", required: ["name", "id"]},
-  name: c.shortString(title: "Name", description: "Name of the goal that the player will see, like \"Defeat eighteen dragons\".")
-  i18n: {type: "object", format: 'i18n', props: ['name'], description: "Help translate this goal"}
-  id: c.shortString(title: "ID", description: "Unique identifier for this goal, like \"defeat-dragons\".")  # unique somehow?
-  worldEndsAfter: {title: 'World Ends After', description: "When included, ends the world this many seconds after this goal succeeds or fails.", type: 'number', minimum: 0, exclusiveMinimum: true, maximum: 300, default: 3}
-  howMany: {title: "How Many", description: "When included, require only this many of the listed goal targets instead of all of them.", type: 'integer', minimum: 1}
-  hiddenGoal: {title: "Hidden", description: "Hidden goals don't show up in the goals area for the player until they're failed. (Usually they're obvious, like 'don't die'.)", 'type': 'boolean', default: false}
+GoalSchema = c.object {title: 'Goal', description: 'A goal that the player can accomplish.', required: ['name', 'id']},
+  name: c.shortString(title: 'Name', description: 'Name of the goal that the player will see, like \"Defeat eighteen dragons\".')
+  i18n: {type: 'object', format: 'i18n', props: ['name'], description: 'Help translate this goal'}
+  id: c.shortString(title: 'ID', description: 'Unique identifier for this goal, like \"defeat-dragons\".')  # unique somehow?
+  worldEndsAfter: {title: 'World Ends After', description: 'When included, ends the world this many seconds after this goal succeeds or fails.', type: 'number', minimum: 0, exclusiveMinimum: true, maximum: 300, default: 3}
+  howMany: {title: 'How Many', description: 'When included, require only this many of the listed goal targets instead of all of them.', type: 'integer', minimum: 1}
+  hiddenGoal: {title: 'Hidden', description: 'Hidden goals don\'t show up in the goals area for the player until they\'re failed. (Usually they\'re obvious, like "don\'t die".)', 'type': 'boolean', default: false}
   team: c.shortString(title: 'Team', description: 'Name of the team this goal is for, if it is not for all of the playable teams.')
-  killThangs: c.array {title: "Kill Thangs", description: "A list of Thang IDs the player should kill, or team names.", uniqueItems: true, minItems: 1, "default": ["ogres"]}, thang
-  saveThangs: c.array {title: "Save Thangs", description: "A list of Thang IDs the player should save, or team names", uniqueItems: true, minItems: 1, "default": ["humans"]}, thang
-  getToLocations: c.object {title: "Get To Locations", description: "Will be set off when any of the \"who\" touch any of the \"targets\" ", required: ["who", "targets"]},
-    who: c.array {title: "Who", description: "The Thangs who must get to the target locations.", minItems: 1}, thang
-    targets: c.array {title: "Targets", description: "The target locations to which the Thangs must get.", minItems: 1}, thang
-  getAllToLocations: c.array {title: "Get all to locations", description: "Similar to getToLocations but now a specific \"who\" can have a specific \"target\", also must be used with the HowMany property for desired effect",required: ["getToLocation"]},
-  c.object {title: "", description: ""},
-    getToLocation: c.object {title: "Get To Locations", description: "TODO: explain", required: ["who", "targets"]},
-      who: c.array {title: "Who", description: "The Thangs who must get to the target locations.", minItems: 1}, thang
-      targets: c.array {title: "Targets", description: "The target locations to which the Thangs must get.", minItems: 1}, thang
-  keepFromLocations: c.object {title: "Keep From Locations", description: "TODO: explain", required: ["who", "targets"]},
-    who: c.array {title: "Who", description: "The Thangs who must not get to the target locations.", minItems: 1}, thang
-    targets: c.array {title: "Targets", description: "The target locations to which the Thangs must not get.", minItems: 1}, thang
-  keepAllFromLocations: c.array {title: "Keep ALL From Locations", description: "Similar to keepFromLocations but now a specific \"who\" can have a specific \"target\", also must be used with the HowMany property for desired effect", required: ["keepFromLocation"]},
-  c.object {title: "", description: ""},
-    keepFromLocation: c.object {title: "Keep From Locations", description: "TODO: explain", required: ["who", "targets"]},
-      who: c.array {title: "Who", description: "The Thangs who must not get to the target locations.", minItems: 1}, thang
-      targets: c.array {title: "Targets", description: "The target locations to which the Thangs must not get.", minItems: 1}, thang
-  leaveOffSides: c.object {title: "Leave Off Sides", description: "Sides of the level to get some Thangs to leave across.", required: ["who", "sides"]},
-    who: c.array {title: "Who", description: "The Thangs which must leave off the sides of the level.", minItems: 1}, thang
-    sides: c.array {title: "Sides", description: "The sides off which the Thangs must leave.", minItems: 1}, side
-  keepFromLeavingOffSides: c.object {title: "Keep From Leaving Off Sides", description: "Sides of the level to keep some Thangs from leaving across.", required: ["who", "sides"]},
-    who: c.array {title: "Who", description: "The Thangs which must not leave off the sides of the level.", minItems: 1}, thang
-    sides: side, {title: "Sides", description: "The sides off which the Thangs must not leave.", minItems: 1}, side
-  collectThangs: c.object {title: "Collect", description: "Thangs that other Thangs must collect.", required: ["who", "targets"]},
-    who: c.array {title: "Who", description: "The Thangs which must collect the target items.", minItems: 1}, thang
-    targets: c.array {title: "Targets", description: "The target items which the Thangs must collect.", minItems: 1}, thang
-  keepFromCollectingThangs: c.object {title: "Keep From Collecting", description: "Thangs that the player must prevent other Thangs from collecting.", required: ["who", "targets"]},
-    who: c.array {title: "Who", description: "The Thangs which must not collect the target items.", minItems: 1}, thang
-    targets: c.array {title: "Targets", description: "The target items which the Thangs must not collect.", minItems: 1}, thang
+  killThangs: c.array {title: 'Kill Thangs', description: 'A list of Thang IDs the player should kill, or team names.', uniqueItems: true, minItems: 1, 'default': ['ogres']}, thang
+  saveThangs: c.array {title: 'Save Thangs', description: 'A list of Thang IDs the player should save, or team names', uniqueItems: true, minItems: 1, 'default': ['humans']}, thang
+  getToLocations: c.object {title: 'Get To Locations', description: 'Will be set off when any of the \"who\" touch any of the \"targets\"', required: ['who', 'targets']},
+    who: c.array {title: 'Who', description: 'The Thangs who must get to the target locations.', minItems: 1}, thang
+    targets: c.array {title: 'Targets', description: 'The target locations to which the Thangs must get.', minItems: 1}, thang
+  getAllToLocations: c.array {title: 'Get all to locations', description: 'Similar to getToLocations but now a specific \"who\" can have a specific \"target\", also must be used with the HowMany property for desired effect', required: ['getToLocation']},
+  c.object {title: '', description: ''},
+    getToLocation: c.object {title: 'Get To Locations', description: 'TODO: explain', required: ['who', 'targets']},
+      who: c.array {title: 'Who', description: 'The Thangs who must get to the target locations.', minItems: 1}, thang
+      targets: c.array {title: 'Targets', description: 'The target locations to which the Thangs must get.', minItems: 1}, thang
+  keepFromLocations: c.object {title: 'Keep From Locations', description: 'TODO: explain', required: ['who', 'targets']},
+    who: c.array {title: 'Who', description: 'The Thangs who must not get to the target locations.', minItems: 1}, thang
+    targets: c.array {title: 'Targets', description: 'The target locations to which the Thangs must not get.', minItems: 1}, thang
+  keepAllFromLocations: c.array {title: 'Keep ALL From Locations', description: 'Similar to keepFromLocations but now a specific \"who\" can have a specific \"target\", also must be used with the HowMany property for desired effect', required: ['keepFromLocation']},
+  c.object {title: '', description: ''},
+    keepFromLocation: c.object {title: 'Keep From Locations', description: 'TODO: explain', required: ['who', 'targets']},
+      who: c.array {title: 'Who', description: 'The Thangs who must not get to the target locations.', minItems: 1}, thang
+      targets: c.array {title: 'Targets', description: 'The target locations to which the Thangs must not get.', minItems: 1}, thang
+  leaveOffSides: c.object {title: 'Leave Off Sides', description: 'Sides of the level to get some Thangs to leave across.', required: ['who', 'sides']},
+    who: c.array {title: 'Who', description: 'The Thangs which must leave off the sides of the level.', minItems: 1}, thang
+    sides: c.array {title: 'Sides', description: 'The sides off which the Thangs must leave.', minItems: 1}, side
+  keepFromLeavingOffSides: c.object {title: 'Keep From Leaving Off Sides', description: 'Sides of the level to keep some Thangs from leaving across.', required: ['who', 'sides']},
+    who: c.array {title: 'Who', description: 'The Thangs which must not leave off the sides of the level.', minItems: 1}, thang
+    sides: side, {title: 'Sides', description: 'The sides off which the Thangs must not leave.', minItems: 1}, side
+  collectThangs: c.object {title: 'Collect', description: 'Thangs that other Thangs must collect.', required: ['who', 'targets']},
+    who: c.array {title: 'Who', description: 'The Thangs which must collect the target items.', minItems: 1}, thang
+    targets: c.array {title: 'Targets', description: 'The target items which the Thangs must collect.', minItems: 1}, thang
+  keepFromCollectingThangs: c.object {title: 'Keep From Collecting', description: 'Thangs that the player must prevent other Thangs from collecting.', required: ['who', 'targets']},
+    who: c.array {title: 'Who', description: 'The Thangs which must not collect the target items.', minItems: 1}, thang
+    targets: c.array {title: 'Targets', description: 'The target items which the Thangs must not collect.', minItems: 1}, thang
 
-ResponseSchema = c.object {title: "Dialogue Button", description: "A button to be shown to the user with the dialogue.", required: ["text"]},
-  text: {title: "Title", description: "The text that will be on the button", "default": "Okay", type: 'string', maxLength: 30}
-  channel: c.shortString(title: "Channel", format: 'event-channel', description: 'Channel that this event will be broadcast over, like "level-set-playing".')
-  event: {type: 'object', title: "Event", description: "Event that will be broadcast when this button is pressed, like {playing: true}."}
-  buttonClass: c.shortString(title: "Button Class", description: 'CSS class that will be added to the button, like "btn-primary".')
-  i18n: {type: "object", format: 'i18n', props: ['text'], description: "Help translate this button"}
+ResponseSchema = c.object {title: 'Dialogue Button', description: 'A button to be shown to the user with the dialogue.', required: ['text']},
+  text: {title: 'Title', description: 'The text that will be on the button', 'default': 'Okay', type: 'string', maxLength: 30}
+  channel: c.shortString(title: 'Channel', format: 'event-channel', description: 'Channel that this event will be broadcast over, like "level-set-playing".')
+  event: {type: 'object', title: 'Event', description: 'Event that will be broadcast when this button is pressed, like {playing: true}.'}
+  buttonClass: c.shortString(title: 'Button Class', description: 'CSS class that will be added to the button, like "btn-primary".')
+  i18n: {type: 'object', format: 'i18n', props: ['text'], description: 'Help translate this button'}
 
-PointSchema = c.object {title: "Point", description: "An {x, y} coordinate point.", format: "point2d", required: ["x", "y"]},
-  x: {title: "x", description: "The x coordinate.", type: "number", "default": 15}
-  y: {title: "y", description: "The y coordinate.", type: "number", "default": 20}
+PointSchema = c.object {title: 'Point', description: 'An {x, y} coordinate point.', format: 'point2d', required: ['x', 'y']},
+  x: {title: 'x', description: 'The x coordinate.', type: 'number', 'default': 15}
+  y: {title: 'y', description: 'The y coordinate.', type: 'number', 'default': 20}
 
-SpriteCommandSchema = c.object {title: "Thang Command", description: "Make a target Thang move or say something, or select/deselect it.", required: ["id"], default: {id: "Captain Anya"}},
+SpriteCommandSchema = c.object {title: 'Thang Command', description: 'Make a target Thang move or say something, or select/deselect it.', required: ['id'], default: {id: 'Captain Anya'}},
   id: thang
-  select: {title: "Select", description: "Select or deselect this Thang.", type: 'boolean'}
-  say: c.object {title: "Say", description: "Make this Thang say a message.", required: ["text"]},
-    blurb: c.shortString(title: "Blurb", description: "A very short message to display above this Thang's head. Plain text.", maxLength: 50)
-    mood: c.shortString(title: "Mood", description: "The mood with which the Thang speaks.", "enum": ["explain", "debrief", "congrats", "attack", "joke", "tip", "alarm"], "default": "explain")
-    text: {title: "Text", description: "A short message to display in the dialogue area. Markdown okay.", type: "string", maxLength: 400}
-    sound: c.object {title: "Sound", description: "A dialogue sound file to accompany the message.", required: ["mp3", "ogg"]},
-      mp3: c.shortString(title: "MP3", format: 'sound-file')
-      ogg: c.shortString(title: "OGG", format: 'sound-file')
-      preload: {title: "Preload", description: "Whether to load this sound file before the level can begin (typically for the first dialogue of a level).", type: 'boolean', "default": false}
-    responses: c.array {title: "Buttons", description: "An array of buttons to include with the dialogue, with which the user can respond."}, ResponseSchema
-    i18n: {type: "object", format: 'i18n', props: ['blurb', 'text'], description: "Help translate this message"}
-  move: c.object {title: "Move", description: "Tell the Thang to move.", required: ['target'], default: {target: {x: 20, y: 20}, duration: 500}},
+  select: {title: 'Select', description: 'Select or deselect this Thang.', type: 'boolean'}
+  say: c.object {title: 'Say', description: 'Make this Thang say a message.', required: ['text']},
+    blurb: c.shortString(title: 'Blurb', description: 'A very short message to display above this Thang\'s head. Plain text.', maxLength: 50)
+    mood: c.shortString(title: 'Mood', description: 'The mood with which the Thang speaks.', 'enum': ['explain', 'debrief', 'congrats', 'attack', 'joke', 'tip', 'alarm'], 'default': 'explain')
+    text: {title: 'Text', description: 'A short message to display in the dialogue area. Markdown okay.', type: 'string', maxLength: 400}
+    sound: c.object {title: 'Sound', description: 'A dialogue sound file to accompany the message.', required: ['mp3', 'ogg']},
+      mp3: c.shortString(title: 'MP3', format: 'sound-file')
+      ogg: c.shortString(title: 'OGG', format: 'sound-file')
+      preload: {title: 'Preload', description: 'Whether to load this sound file before the level can begin (typically for the first dialogue of a level).', type: 'boolean', 'default': false}
+    responses: c.array {title: 'Buttons', description: 'An array of buttons to include with the dialogue, with which the user can respond.'}, ResponseSchema
+    i18n: {type: 'object', format: 'i18n', props: ['blurb', 'text'], description: 'Help translate this message'}
+  move: c.object {title: 'Move', description: 'Tell the Thang to move.', required: ['target'], default: {target: {x: 20, y: 20}, duration: 500}},
     target: _.extend _.cloneDeep(PointSchema), {title: 'Target', description: 'Target point to which the Thang will move.'}
-    duration: {title: "Duration", description: "Number of milliseconds over which to move, or 0 for an instant move.", type: 'integer', minimum: 0, default: 500, format: 'milliseconds'}
+    duration: {title: 'Duration', description: 'Number of milliseconds over which to move, or 0 for an instant move.', type: 'integer', minimum: 0, default: 500, format: 'milliseconds'}
 
-NoteGroupSchema = c.object {title: "Note Group", description: "A group of notes that should be sent out as a result of this script triggering.", displayProperty: "name"},
-  name: {title: "Name", description: "Short name describing the script, like \"Anya greets the player\", for your convenience.", type: "string"}
-  dom: c.object {title: "DOM", description: "Manipulate things in the play area DOM, outside of the level area canvas."},
-    focus: c.shortString(title: "Focus", description: "Set the window focus to this DOM selector string.")
+NoteGroupSchema = c.object {title: 'Note Group', description: 'A group of notes that should be sent out as a result of this script triggering.', displayProperty: 'name'},
+  name: {title: 'Name', description: 'Short name describing the script, like \"Anya greets the player\", for your convenience.', type: 'string'}
+  dom: c.object {title: 'DOM', description: 'Manipulate things in the play area DOM, outside of the level area canvas.'},
+    focus: c.shortString(title: 'Focus', description: 'Set the window focus to this DOM selector string.')
     showVictory: {
-      title: "Show Victory",
-      description: "Show the done button and maybe also the victory modal.",
+      title: 'Show Victory',
+      description: 'Show the done button and maybe also the victory modal.',
       enum: [true, 'Done Button', 'Done Button And Modal'] # deprecate true, same as 'done_button_and_modal'
     }
-    highlight: c.object {title: "Highlight", description: "Highlight the target DOM selector string with a big arrow."},
-      target: c.shortString(title: "Target", description: "Target highlight element DOM selector string.")
-      delay: {type: 'integer', minimum: 0, title: "Delay", description: "Show the highlight after this many milliseconds. Doesn't affect the dim shade cutout highlight method."}
-      offset:  _.extend _.cloneDeep(PointSchema), {title: 'Offset', description: 'Pointing arrow tip offset in pixels from the default target.', format: null}
-      rotation: {type: 'number', minimum: 0, title: "Rotation", description: "Rotation of the pointing arrow, in radians. PI / 2 points left, PI points up, etc."}
-      sides: c.array {title: "Sides", description: "Which sides of the target element to point at."}, {type: 'string', 'enum': ['left', 'right', 'top', 'bottom'], title: "Side", description: "A side of the target element to point at."}
-    lock: {title: "Lock", description: "Whether the interface should be locked so that the player's focus is on the script, or specific areas to lock.", type: ['boolean', 'array'], items: {type: 'string', enum: ['surface', 'editor', 'palette', 'hud', 'playback', 'playback-hover', 'level', ]}}
-    letterbox: {type: 'boolean', title: 'Letterbox', description:'Turn letterbox mode on or off. Disables surface and playback controls.'}
+    highlight: c.object {title: 'Highlight', description: 'Highlight the target DOM selector string with a big arrow.'},
+      target: c.shortString(title: 'Target', description: 'Target highlight element DOM selector string.')
+      delay: {type: 'integer', minimum: 0, title: 'Delay', description: 'Show the highlight after this many milliseconds. Doesn\'t affect the dim shade cutout highlight method.'}
+      offset: _.extend _.cloneDeep(PointSchema), {title: 'Offset', description: 'Pointing arrow tip offset in pixels from the default target.', format: null}
+      rotation: {type: 'number', minimum: 0, title: 'Rotation', description: 'Rotation of the pointing arrow, in radians. PI / 2 points left, PI points up, etc.'}
+      sides: c.array {title: 'Sides', description: 'Which sides of the target element to point at.'}, {type: 'string', 'enum': ['left', 'right', 'top', 'bottom'], title: 'Side', description: 'A side of the target element to point at.'}
+    lock: {title: 'Lock', description: 'Whether the interface should be locked so that the player\'s focus is on the script, or specific areas to lock.', type: ['boolean', 'array'], items: {type: 'string', enum: ['surface', 'editor', 'palette', 'hud', 'playback', 'playback-hover', 'level']}}
+    letterbox: {type: 'boolean', title: 'Letterbox', description: 'Turn letterbox mode on or off. Disables surface and playback controls.'}
 
-  goals: c.object {title: "Goals (Old)", description: "Deprecated. Goals added here have no effect. Add goals in the level settings instead."},
-    add: c.array {title: "Add", description: "Deprecated. Goals added here have no effect. Add goals in the level settings instead."}, GoalSchema
-    remove: c.array {title: "Remove", description: "Deprecated. Goals removed here have no effect. Adjust goals in the level settings instead."}, GoalSchema
+  goals: c.object {title: 'Goals (Old)', description: 'Deprecated. Goals added here have no effect. Add goals in the level settings instead.'},
+    add: c.array {title: 'Add', description: 'Deprecated. Goals added here have no effect. Add goals in the level settings instead.'}, GoalSchema
+    remove: c.array {title: 'Remove', description: 'Deprecated. Goals removed here have no effect. Adjust goals in the level settings instead.'}, GoalSchema
 
-  playback: c.object {title: "Playback", description: "Control the playback of the level."},
-    playing: {type: 'boolean', title: "Set Playing", description: "Set whether playback is playing or paused."}
-    scrub: c.object {title: "Scrub", description: "Scrub the level playback time to a certain point.", default: {offset: 2, duration: 1000, toRatio: 0.5}},
-      offset: {type: 'integer', title: "Offset", description: "Number of frames by which to adjust the scrub target time.", default: 2}
-      duration: {type: 'integer', title: "Duration", description: "Number of milliseconds over which to scrub time.", minimum: 0, format: 'milliseconds'}
-      toRatio: {type: 'number', title: "To Progress Ratio", description: "Set playback time to a target playback progress ratio.", minimum: 0, maximum: 1}
-      toTime: {type: 'number', title: "To Time", description: "Set playback time to a target playback point, in seconds.", minimum: 0}
-      toGoal: c.shortString(title: "To Goal", description: "Set playback time to when this goal was achieved. (TODO: not implemented.)")
+  playback: c.object {title: 'Playback', description: 'Control the playback of the level.'},
+    playing: {type: 'boolean', title: 'Set Playing', description: 'Set whether playback is playing or paused.'}
+    scrub: c.object {title: 'Scrub', description: 'Scrub the level playback time to a certain point.', default: {offset: 2, duration: 1000, toRatio: 0.5}},
+      offset: {type: 'integer', title: 'Offset', description: 'Number of frames by which to adjust the scrub target time.', default: 2}
+      duration: {type: 'integer', title: 'Duration', description: 'Number of milliseconds over which to scrub time.', minimum: 0, format: 'milliseconds'}
+      toRatio: {type: 'number', title: 'To Progress Ratio', description: 'Set playback time to a target playback progress ratio.', minimum: 0, maximum: 1}
+      toTime: {type: 'number', title: 'To Time', description: 'Set playback time to a target playback point, in seconds.', minimum: 0}
+      toGoal: c.shortString(title: 'To Goal', description: 'Set playback time to when this goal was achieved. (TODO: not implemented.)')
 
-  script: c.object {title: "Script", description: "Extra configuration for this action group."},
-    duration: {type: 'integer', minimum: 0, title: "Duration", description: "How long this script should last in milliseconds. 0 for indefinite.", format: 'milliseconds'}
-    skippable: {type: 'boolean', title: "Skippable", description: "Whether this script shouldn't bother firing when the player skips past all current scripts."}
-    beforeLoad: {type: 'boolean', title: "Before Load", description: "Whether this script should fire before the level is finished loading."}
+  script: c.object {title: 'Script', description: 'Extra configuration for this action group.'},
+    duration: {type: 'integer', minimum: 0, title: 'Duration', description: 'How long this script should last in milliseconds. 0 for indefinite.', format: 'milliseconds'}
+    skippable: {type: 'boolean', title: 'Skippable', description: 'Whether this script shouldn\'t bother firing when the player skips past all current scripts.'}
+    beforeLoad: {type: 'boolean', title: 'Before Load', description: 'Whether this script should fire before the level is finished loading.'}
 
-  sprites: c.array {title: "Sprites", description: "Commands to issue to Sprites on the Surface."}, SpriteCommandSchema
+  sprites: c.array {title: 'Sprites', description: 'Commands to issue to Sprites on the Surface.'}, SpriteCommandSchema
 
-  surface: c.object {title: "Surface", description: "Commands to issue to the Surface itself."},
-    focus: c.object {title: "Camera", description: "Focus the camera on a specific point on the Surface.", format:'viewport'},
-      target: {anyOf: [PointSchema, thang, {type: 'null'}], title: "Target", description: "Where to center the camera view.", default: {x:0, y:0}}
-      zoom: {type: 'number', minimum: 0, exclusiveMinimum: true, maximum: 64, title: "Zoom", description: "What zoom level to use."}
-      duration: {type:'number', minimum: 0, title: "Duration", description: "in ms"}
-      bounds: c.array {title:'Boundary', maxItems: 2, minItems: 2, default:[{x:0,y:0}, {x:46, y:39}], format: 'bounds'}, PointSchema
-      isNewDefault: {type:'boolean', format: 'hidden', title: "New Default", description: 'Set this as new default zoom once scripts end.'} # deprecated
-    highlight: c.object {title: "Highlight", description: "Highlight specific Sprites on the Surface."},
-      targets: c.array {title: "Targets", description: "Thang IDs of target Sprites to highlight."}, thang
-      delay: {type: 'integer', minimum: 0, title: "Delay", description: "Delay in milliseconds before the highlight appears."}
-    lockSelect: {type: 'boolean', title: "Lock Select", description: "Whether to lock Sprite selection so that the player can't select/deselect anything."}
+  surface: c.object {title: 'Surface', description: 'Commands to issue to the Surface itself.'},
+    focus: c.object {title: 'Camera', description: 'Focus the camera on a specific point on the Surface.', format: 'viewport'},
+      target: {anyOf: [PointSchema, thang, {type: 'null'}], title: 'Target', description: 'Where to center the camera view.', default: {x: 0, y: 0}}
+      zoom: {type: 'number', minimum: 0, exclusiveMinimum: true, maximum: 64, title: 'Zoom', description: 'What zoom level to use.'}
+      duration: {type: 'number', minimum: 0, title: 'Duration', description: 'in ms'}
+      bounds: c.array {title: 'Boundary', maxItems: 2, minItems: 2, default: [{x: 0, y: 0}, {x: 46, y: 39}], format: 'bounds'}, PointSchema
+      isNewDefault: {type: 'boolean', format: 'hidden', title: 'New Default', description: 'Set this as new default zoom once scripts end.'} # deprecated
+    highlight: c.object {title: 'Highlight', description: 'Highlight specific Sprites on the Surface.'},
+      targets: c.array {title: 'Targets', description: 'Thang IDs of target Sprites to highlight.'}, thang
+      delay: {type: 'integer', minimum: 0, title: 'Delay', description: 'Delay in milliseconds before the highlight appears.'}
+    lockSelect: {type: 'boolean', title: 'Lock Select', description: 'Whether to lock Sprite selection so that the player can\'t select/deselect anything.'}
 
-  sound: c.object {title: "Sound", description: "Commands to control sound playback."},
-    suppressSelectionSounds: {type: "boolean", title: "Suppress Selection Sounds", description: "Whether to suppress selection sounds made from clicking on Thangs."}
-    music: c.object { title: "Music", description: "Control music playing"},
-      play: { title: "Play", type: "boolean" }
-      file: c.shortString(title: "File", enum:['/music/music_level_1','/music/music_level_2','/music/music_level_3','/music/music_level_4','/music/music_level_5'])
+  sound: c.object {title: 'Sound', description: 'Commands to control sound playback.'},
+    suppressSelectionSounds: {type: 'boolean', title: 'Suppress Selection Sounds', description: 'Whether to suppress selection sounds made from clicking on Thangs.'}
+    music: c.object {title: 'Music', description: 'Control music playing'},
+      play: {title: 'Play', type: 'boolean'}
+      file: c.shortString(title: 'File', enum: ['/music/music_level_1', '/music/music_level_2', '/music/music_level_3', '/music/music_level_4', '/music/music_level_5'])
 
 ScriptSchema = c.object {
-  title: "Script"
+  title: 'Script'
   description: 'A script fires off a chain of notes to interact with the game when a certain event triggers it.'
-  required: ["channel"]
-  'default': {channel: "world:won", noteChain: []}
+  required: ['channel']
+  'default': {channel: 'world:won', noteChain: []}
 },
-  id: c.shortString(title: "ID", description: "A unique ID that other scripts can rely on in their Happens After prereqs, for sequencing.")  # uniqueness?
-  channel: c.shortString(title: "Event", format: 'event-channel', description: 'Event channel this script might trigger for, like "world:won".')
-  eventPrereqs: c.array {title: "Event Checks", description: "Logical checks on the event for this script to trigger.", format:'event-prereqs'}, EventPrereqSchema
-  repeats: {title: "Repeats", description: "Whether this script can trigger more than once during a level.", enum: [true, false, 'session'], "default": false}
-  scriptPrereqs: c.array {title: "Happens After", description: "Scripts that need to fire first."},
-    c.shortString(title: "ID", description: "A unique ID of a script.")
-  notAfter: c.array {title: "Not After", description: "Do not run this script if any of these scripts have run."},
-    c.shortString(title: "ID", description: "A unique ID of a script.")
-  noteChain: c.array {title: "Actions", description: "A list of things that happen when this script triggers."}, NoteGroupSchema
+  id: c.shortString(title: 'ID', description: 'A unique ID that other scripts can rely on in their Happens After prereqs, for sequencing.')  # uniqueness?
+  channel: c.shortString(title: 'Event', format: 'event-channel', description: 'Event channel this script might trigger for, like "world:won".')
+  eventPrereqs: c.array {title: 'Event Checks', description: 'Logical checks on the event for this script to trigger.', format: 'event-prereqs'}, EventPrereqSchema
+  repeats: {title: 'Repeats', description: 'Whether this script can trigger more than once during a level.', enum: [true, false, 'session'], 'default': false}
+  scriptPrereqs: c.array {title: 'Happens After', description: 'Scripts that need to fire first.'},
+    c.shortString(title: 'ID', description: 'A unique ID of a script.')
+  notAfter: c.array {title: 'Not After', description: 'Do not run this script if any of these scripts have run.'},
+    c.shortString(title: 'ID', description: 'A unique ID of a script.')
+  noteChain: c.array {title: 'Actions', description: 'A list of things that happen when this script triggers.'}, NoteGroupSchema
 
 LevelThangSchema = c.object {
-  title: "Thang",
-  description: "Thangs are any units, doodads, or abstract things that you use to build the level. (\"Thing\" was too confusing to say.)",
-  format: "thang"
-  required: ["id", "thangType", "components"]
+  title: 'Thang',
+  description: 'Thangs are any units, doodads, or abstract things that you use to build the level. (\"Thing\" was too confusing to say.)',
+  format: 'thang'
+  required: ['id', 'thangType', 'components']
   'default':
-    id: "Boris"
-    thangType: "Soldier"
+    id: 'Boris'
+    thangType: 'Soldier'
     components: []
 },
   id: thang  # TODO: figure out if we can make this unique and how to set dynamic defaults
-  # TODO: split thangType into "original" and "majorVersion" like the rest for consistency
-  thangType: c.objectId(links: [{rel: "db", href: "/db/thang.type/{($)}/version"}], title: "Thang Type", description: "A reference to the original Thang template being configured.", format: 'thang-type')
-  components: c.array {title: "Components", description: "Thangs are configured by changing the Components attached to them.", uniqueItems: true, format: 'thang-components-array'}, ThangComponentSchema  # TODO: uniqueness should be based on "original", not whole thing
+  # TODO: split thangType into 'original' and 'majorVersion' like the rest for consistency
+  thangType: c.objectId(links: [{rel: 'db', href: '/db/thang.type/{($)}/version'}], title: 'Thang Type', description: 'A reference to the original Thang template being configured.', format: 'thang-type')
+  components: c.array {title: 'Components', description: 'Thangs are configured by changing the Components attached to them.', uniqueItems: true, format: 'thang-components-array'}, ThangComponentSchema  # TODO: uniqueness should be based on 'original', not whole thing
 
 LevelSystemSchema = c.object {
-  title: "System"
-  description: "Configuration for a System that this Level uses."
+  title: 'System'
+  description: 'Configuration for a System that this Level uses.'
   format: 'level-system'
   required: ['original', 'majorVersion']
   'default':
     majorVersion: 0
     config: {}
-  links: [{rel: "db", href: "/db/level.system/{(original)}/version/{(majorVersion)}"}]
+  links: [{rel: 'db', href: '/db/level.system/{(original)}/version/{(majorVersion)}'}]
 },
-  original: c.objectId(title: "Original", description: "A reference to the original System being configured.", format: "hidden")
-  config: c.object {title: "Configuration", description: "System-specific configuration properties.", additionalProperties: true, format: 'level-system-configuration'}
-  majorVersion: {title: "Major Version", description: "Which major version of the System is being used.", type: 'integer', minimum: 0, default: 0, format: "hidden"}
+  original: c.objectId(title: 'Original', description: 'A reference to the original System being configured.', format: 'hidden')
+  config: c.object {title: 'Configuration', description: 'System-specific configuration properties.', additionalProperties: true, format: 'level-system-configuration'}
+  majorVersion: {title: 'Major Version', description: 'Which major version of the System is being used.', type: 'integer', minimum: 0, default: 0, format: 'hidden'}
 
 GeneralArticleSchema = c.object {
-  title: "Article"
-  description: "Reference to a general documentation article."
+  title: 'Article'
+  description: 'Reference to a general documentation article.'
   required: ['original']
   format: 'latest-version-reference'
   'default':
     original: null
     majorVersion: 0
-  links: [{rel: "db", href: "/db/article/{(original)}/version/{(majorVersion)}"}]
+  links: [{rel: 'db', href: '/db/article/{(original)}/version/{(majorVersion)}'}]
 },
-  original: c.objectId(title: "Original", description: "A reference to the original Article.")#, format: "hidden")  # hidden?
-  majorVersion: {title: "Major Version", description: "Which major version of the Article is being used.", type: 'integer', minimum: 0}#, format: "hidden"}  # hidden?
+  original: c.objectId(title: 'Original', description: 'A reference to the original Article.')#, format: 'hidden')  # hidden?
+  majorVersion: {title: 'Major Version', description: 'Which major version of the Article is being used.', type: 'integer', minimum: 0}#, format: 'hidden'}  # hidden?
 
 LevelSchema = c.object {
-  title: "Level"
-  description: "A spectacular level which will delight and educate its stalwart players with the sorcery of coding."
-  required: ["name", "description", "scripts", "thangs", "documentation"]
+  title: 'Level'
+  description: 'A spectacular level which will delight and educate its stalwart players with the sorcery of coding.'
+  required: ['name', 'description', 'scripts', 'thangs', 'documentation']
   'default':
-    name: "Ineffable Wizardry"
-    description: "This level is indescribably flarmy."
+    name: 'Ineffable Wizardry'
+    description: 'This level is indescribably flarmy.'
     documentation: {specificArticles: [], generalArticles: []}
     scripts: []
     thangs: []
 }
 c.extendNamedProperties LevelSchema  # let's have the name be the first property
 _.extend LevelSchema.properties,
-  description: {title: "Description", description: "A short explanation of what this level is about.", type: "string", maxLength: 65536, "default": "This level is indescribably flarmy!", format: 'markdown'}
-  documentation: c.object {title: "Documentation", description: "Documentation articles relating to this level.", required: ["specificArticles", "generalArticles"], 'default': {specificArticles: [], generalArticles: []}},
-    specificArticles: c.array {title: "Specific Articles", description: "Specific documentation articles that live only in this level.", uniqueItems: true, "default": []}, SpecificArticleSchema
-    generalArticles: c.array {title: "General Articles", description: "General documentation articles that can be linked from multiple levels.", uniqueItems: true, "default": []}, GeneralArticleSchema
+  description: {title: 'Description', description: 'A short explanation of what this level is about.', type: 'string', maxLength: 65536, 'default': 'This level is indescribably flarmy!', format: 'markdown'}
+  documentation: c.object {title: 'Documentation', description: 'Documentation articles relating to this level.', required: ['specificArticles', 'generalArticles'], 'default': {specificArticles: [], generalArticles: []}},
+    specificArticles: c.array {title: 'Specific Articles', description: 'Specific documentation articles that live only in this level.', uniqueItems: true, 'default': []}, SpecificArticleSchema
+    generalArticles: c.array {title: 'General Articles', description: 'General documentation articles that can be linked from multiple levels.', uniqueItems: true, 'default': []}, GeneralArticleSchema
   background: c.objectId({format: 'hidden'})
   nextLevel: {
-    type:'object',
-    links: [{rel: "extra", href: "/db/level/{($)}"}, {rel:'db', href: "/db/level/{(original)}/version/{(majorVersion)}"}],
+    type: 'object',
+    links: [{rel: 'extra', href: '/db/level/{($)}'}, {rel: 'db', href: '/db/level/{(original)}/version/{(majorVersion)}'}],
     format: 'latest-version-reference',
-    title: "Next Level",
-    description: "Reference to the next level players will player after beating this one."
+    title: 'Next Level',
+    description: 'Reference to the next level players will play after beating this one.'
   }
-  scripts: c.array {title: "Scripts", description: "An array of scripts that trigger based on what the player does and affect things outside of the core level simulation.", "default": []}, ScriptSchema
-  thangs: c.array {title: "Thangs", description: "An array of Thangs that make up the level.", "default": []}, LevelThangSchema
-  systems: c.array {title: "Systems", description: "Levels are configured by changing the Systems attached to them.", uniqueItems: true, default: []}, LevelSystemSchema  # TODO: uniqueness should be based on "original", not whole thing
-  victory: c.object {title: "Victory Screen", default: {}, properties: {'body': {type: 'string', format: 'markdown', title: 'Body Text', description: 'Inserted into the Victory Modal once this level is complete. Tell the player they did a good job and what they accomplished!'}, i18n: {type: "object", format: 'i18n', props: ['body'], description: "Help translate this victory message"}}}
-  i18n: {type: "object", format: 'i18n', props: ['name', 'description'], description: "Help translate this level"}
-  icon: { type: 'string', format: 'image-file', title: 'Icon' }
+  scripts: c.array {title: 'Scripts', description: 'An array of scripts that trigger based on what the player does and affect things outside of the core level simulation.', 'default': []}, ScriptSchema
+  thangs: c.array {title: 'Thangs', description: 'An array of Thangs that make up the level.', 'default': []}, LevelThangSchema
+  systems: c.array {title: 'Systems', description: 'Levels are configured by changing the Systems attached to them.', uniqueItems: true, default: []}, LevelSystemSchema  # TODO: uniqueness should be based on 'original', not whole thing
+  victory: c.object {title: 'Victory Screen', default: {}, properties: {'body': {type: 'string', format: 'markdown', title: 'Body Text', description: 'Inserted into the Victory Modal once this level is complete. Tell the player they did a good job and what they accomplished!'}, i18n: {type: 'object', format: 'i18n', props: ['body'], description: 'Help translate this victory message'}}}
+  i18n: {type: 'object', format: 'i18n', props: ['name', 'description'], description: 'Help translate this level'}
+  icon: {type: 'string', format: 'image-file', title: 'Icon'}
   goals: c.array {title: 'Goals', description: 'An array of goals which are visible to the player and can trigger scripts.'}, GoalSchema
-  type: c.shortString(title: "Type", description: "What kind of level this is.", "enum": ['campaign', 'ladder', 'ladder-tutorial'])
-  showsGuide: c.shortString(title: "Shows Guide", description: "If the guide is shown at the beginning of the level.", "enum": ['first-time', 'always'])
+  type: c.shortString(title: 'Type', description: 'What kind of level this is.', 'enum': ['campaign', 'ladder', 'ladder-tutorial'])
+  showsGuide: c.shortString(title: 'Shows Guide', description: 'If the guide is shown at the beginning of the level.', 'enum': ['first-time', 'always'])
 
 c.extendBasicProperties LevelSchema, 'level'
 c.extendSearchableProperties LevelSchema
@@ -253,4 +253,4 @@ module.exports = LevelSchema
 # 2. Open up the Treema demo page http://localhost:9090/demo.html
 # 3. tv4.addSchema(metaschema.id, metaschema)
 # 4. S = <paste big schema here>
-# 5. tv4.validateMultiple(S, metaschema)   and look for errors
+# 5. tv4.validateMultiple(S, metaschema) and look for errors
diff --git a/app/schemas/models/level_component.coffee b/app/schemas/models/level_component.coffee
index 8552979ee..b97cb7d1e 100644
--- a/app/schemas/models/level_component.coffee
+++ b/app/schemas/models/level_component.coffee
@@ -3,70 +3,115 @@ metaschema = require './../metaschema'
 
 attackSelfCode = """
 class AttacksSelf extends Component
-  @className: "AttacksSelf"
+  @className: 'AttacksSelf'
   chooseAction: ->
     @attack @
 """
 systems = [
-  'action', 'ai', 'alliance', 'collision', 'combat', 'display', 'event', 'existence', 'hearing'
+  'action', 'ai', 'alliance', 'collision', 'combat', 'display', 'event', 'existence', 'hearing',
   'inventory', 'movement', 'programming', 'targeting', 'ui', 'vision', 'misc', 'physics', 'effect',
   'magic'
 ]
 
 PropertyDocumentationSchema = c.object {
-  title: "Property Documentation"
-  description: "Documentation entry for a property this Component will add to its Thang which other Components might
- want to also use."
-  "default":
-    name: "foo"
-    type: "object"
+  title: 'Property Documentation'
+  description: 'Documentation entry for a property this Component will add to its Thang which other Components might want to also use.'
+  'default':
+    name: 'foo'
+    type: 'object'
     description: 'The `foo` property can satisfy all the #{spriteName}\'s foobar needs. Use it wisely.'
   required: ['name', 'type', 'description']
 },
-  name: {type: 'string', title: "Name", description: "Name of the property."}
+  name: {type: 'string', title: 'Name', description: 'Name of the property.'}
   # not actual JS types, just whatever they describe...
-  type: c.shortString(title: "Type", description: "Intended type of the property.")
-  description: {title: "Description", type: 'string', description: "Description of the property.", format: 'markdown', maxLength: 1000}
-  args: c.array {title: "Arguments", description: "If this property has type 'function', then provide documentation for any function arguments."}, c.FunctionArgumentSchema
-  owner: {title: "Owner", type: 'string', description: 'Owner of the property, like "this" or "Math".'}
-  example: {title: "Example", type: 'string', description: 'An optional example code block.', format: 'javascript'}
+  type: c.shortString(title: 'Type', description: 'Intended type of the property.')
+  description:
+    oneOf: [
+      {title: 'Description', type: 'string', description: 'Description of the property.', maxLength: 1000, format: 'markdown'}
+      {
+        type: 'object',
+        title: 'Language Descriptions',
+        description: 'Property descriptions by code language.',
+        additionalProperties: {type: 'string', description: 'Description of the property.', maxLength: 1000, format: 'markdown'}
+      }
+    ]
+  args: c.array {title: 'Arguments', description: 'If this property has type "function", then provide documentation for any function arguments.'}, c.FunctionArgumentSchema
+  owner: {title: 'Owner', type: 'string', description: 'Owner of the property, like "this" or "Math".'}
+  example:
+    oneOf: [
+      {title: 'Example', type: 'string', description: 'An optional example code block.', format: 'javascript'}
+      {
+        type: 'object',
+        title: 'Language Examples',
+        description: 'Examples by code language.',
+        additionalProperties: {type: 'string', description: 'An example code block.', format: 'javascript'}  # TODO: not JS
+      }
+    ]
+  snippets: c.object {
+    title: 'Snippets',
+    description: 'List of snippets for the respective programming languages'
+  },
+    javascript: c.object {title: 'JavaScript'}, c.codeSnippet 'javascript'
+    coffeescript: c.object {title: 'CoffeeScript'}, c.codeSnippet 'coffee'
+    python: c.object {title: 'Python'}, c.codeSnippet 'python'
+    clojure: c.object {title: 'Clojure'}, c.codeSnippet 'clojure'
+    lua: c.object {title: 'Lua'}, c.codeSnippet 'lua'
+    io: c.object {title: 'IO'}, c.codeSnippet 'io'
   returns: c.object {
-    title: "Return Value"
+    title: 'Return Value'
     description: 'Optional documentation of any return value.'
     required: ['type']
     default: {type: 'null'}
   },
-    type: c.shortString(title: "Type", description: "Type of the return value")
-    example: c.shortString(title: "Example", description: "Example return value")
-    description: {title: "Description", type: 'string', description: "Description of the return value.", maxLength: 1000}
+    type: c.shortString(title: 'Type', description: 'Type of the return value')
+    example:
+      oneOf: [
+        c.shortString(title: 'Example', description: 'Example return value')
+        {
+          type: 'object',
+          title: 'Language Examples',
+          description: 'Example return values by code language.',
+          additionalProperties: c.shortString(description: 'Example return value.', format: 'javascript')  # TODO: not JS
+        }
+      ]
+    description:
+      oneOf: [
+        {title: 'Description', type: 'string', description: 'Description of the return value.', maxLength: 1000}
+        {
+          type: 'object',
+          title: 'Language Descriptions',
+          description: 'Example return values by code language.',
+          additionalProperties: {type: 'string', description: 'Description of the return value.', maxLength: 1000}
+        }
+      ]
 
 DependencySchema = c.object {
-  title: "Component Dependency"
-  description: "A Component upon which this Component depends."
-  "default":
+  title: 'Component Dependency'
+  description: 'A Component upon which this Component depends.'
+  'default':
     #original: ?
     majorVersion: 0
-  required: ["original", "majorVersion"]
+  required: ['original', 'majorVersion']
   format: 'latest-version-reference'
-  links: [{rel: "db", href: "/db/level.component/{(original)}/version/{(majorVersion)}"}]
+  links: [{rel: 'db', href: '/db/level.component/{(original)}/version/{(majorVersion)}'}]
 },
-  original: c.objectId(title: "Original", description: "A reference to another Component upon which this Component depends.")
+  original: c.objectId(title: 'Original', description: 'A reference to another Component upon which this Component depends.')
   majorVersion:
-    title: "Major Version"
-    description: "Which major version of the Component this Component needs."
+    title: 'Major Version'
+    description: 'Which major version of the Component this Component needs.'
     type: 'integer'
     minimum: 0
 
 LevelComponentSchema = c.object {
-  title: "Component"
-  description: "A Component which can affect Thang behavior."
-  required: ["system", "name", "description", "code", "dependencies", "propertyDocumentation", "language"]
-  "default":
-    system: "ai"
-    name: "AttacksSelf"
-    description: "This Component makes the Thang attack itself."
+  title: 'Component'
+  description: 'A Component which can affect Thang behavior.'
+  required: ['system', 'name', 'description', 'code', 'dependencies', 'propertyDocumentation', 'codeLanguage']
+  'default':
+    system: 'ai'
+    name: 'AttacksSelf'
+    description: 'This Component makes the Thang attack itself.'
     code: attackSelfCode
-    language: "coffeescript"
+    codeLanguage: 'coffeescript'
     dependencies: []  # TODO: should depend on something by default
     propertyDocumentation: []
 }
@@ -74,42 +119,41 @@ c.extendNamedProperties LevelComponentSchema  # let's have the name be the first
 LevelComponentSchema.properties.name.pattern = c.classNamePattern
 _.extend LevelComponentSchema.properties,
   system:
-    title: "System"
-    description: "The short name of the System this Component belongs to, like \"ai\"."
-    type: "string"
-    "enum": systems
-    "default": "ai"
+    title: 'System'
+    description: 'The short name of the System this Component belongs to, like \"ai\".'
+    type: 'string'
+    'enum': systems
+    'default': 'ai'
   description:
-    title: "Description"
-    description: "A short explanation of what this Component does."
-    type: "string"
+    title: 'Description'
+    description: 'A short explanation of what this Component does.'
+    type: 'string'
     maxLength: 2000
-    "default": "This Component makes the Thang attack itself."
-  language:
-    type: "string"
-    title: "Language"
-    description: "Which programming language this Component is written in."
-    "enum": ["coffeescript"]
+    'default': 'This Component makes the Thang attack itself.'
+  codeLanguage:
+    type: 'string'
+    title: 'Language'
+    description: 'Which programming language this Component is written in.'
+    'enum': ['coffeescript']
   code:
-    title: "Code"
-    description: "The code for this Component, as a CoffeeScript class. TODO: add link to documentation for
- how to write these."
-    "default": attackSelfCode
-    type: "string"
-    format: "coffee"
+    title: 'Code'
+    description: 'The code for this Component, as a CoffeeScript class. TODO: add link to documentation for how to write these.'
+    'default': attackSelfCode
+    type: 'string'
+    format: 'coffee'
   js:
-    title: "JavaScript"
-    description: "The transpiled JavaScript code for this Component"
-    type: "string"
-    format: "hidden"
-  dependencies: c.array {title: "Dependencies", description: "An array of Components upon which this Component depends.", "default": [], uniqueItems: true}, DependencySchema
-  propertyDocumentation: c.array {title: "Property Documentation", description: "An array of documentation entries for each notable property this Component will add to its Thang which other Components might want to also use.", "default": []}, PropertyDocumentationSchema
-  configSchema: _.extend metaschema, {title: "Configuration Schema", description: "A schema for validating the arguments that can be passed to this Component as configuration.", default: {type: 'object', additionalProperties: false}}
+    title: 'JavaScript'
+    description: 'The transpiled JavaScript code for this Component'
+    type: 'string'
+    format: 'hidden'
+  dependencies: c.array {title: 'Dependencies', description: 'An array of Components upon which this Component depends.', 'default': [], uniqueItems: true}, DependencySchema
+  propertyDocumentation: c.array {title: 'Property Documentation', description: 'An array of documentation entries for each notable property this Component will add to its Thang which other Components might want to also use.', 'default': []}, PropertyDocumentationSchema
+  configSchema: _.extend metaschema, {title: 'Configuration Schema', description: 'A schema for validating the arguments that can be passed to this Component as configuration.', default: {type: 'object', additionalProperties: false}}
   official:
-    type: "boolean"
-    title: "Official"
-    description: "Whether this is an official CodeCombat Component."
-    "default": false
+    type: 'boolean'
+    title: 'Official'
+    description: 'Whether this is an official CodeCombat Component.'
+    'default': false
 
 c.extendBasicProperties LevelComponentSchema, 'level.component'
 c.extendSearchableProperties LevelComponentSchema
diff --git a/app/schemas/models/level_feedback.coffee b/app/schemas/models/level_feedback.coffee
index f8bb6a73c..ce0374d8b 100644
--- a/app/schemas/models/level_feedback.coffee
+++ b/app/schemas/models/level_feedback.coffee
@@ -5,22 +5,22 @@ LevelFeedbackLevelSchema = c.object {required: ['original', 'majorVersion']}, {
   majorVersion: {type: 'integer', minimum: 0, default: 0}}
 
 LevelFeedbackSchema = c.object {
-  title: "Feedback"
-  description: "Feedback on a level."
+  title: 'Feedback'
+  description: 'Feedback on a level.'
 }
 
 _.extend LevelFeedbackSchema.properties,
   # denormalization
-  creatorName: { type: 'string' }
-  levelName: { type: 'string' }
-  levelID: { type: 'string' }
+  creatorName: {type: 'string'}
+  levelName: {type: 'string'}
+  levelID: {type: 'string'}
+
+  creator: c.objectId(links: [{rel: 'extra', href: '/db/user/{($)}'}])
+  created: c.date({title: 'Created', readOnly: true})
 
-  creator: c.objectId(links: [{rel: 'extra', href: "/db/user/{($)}"}])
-  created: c.date( { title: 'Created', readOnly: true })
-  
   level: LevelFeedbackLevelSchema
-  rating: { type: 'number', minimum: 1, maximum: 5 }
-  review: { type: 'string' }
+  rating: {type: 'number', minimum: 1, maximum: 5}
+  review: {type: 'string'}
 
 c.extendBasicProperties LevelFeedbackSchema, 'level.feedback'
 
diff --git a/app/schemas/models/level_session.coffee b/app/schemas/models/level_session.coffee
index a37c98aaf..a4e655ded 100644
--- a/app/schemas/models/level_session.coffee
+++ b/app/schemas/models/level_session.coffee
@@ -5,7 +5,7 @@ LevelSessionPlayerSchema = c.object
     links: [
       {
         rel: 'extra'
-        href: "/db/user/{($)}"
+        href: '/db/user/{($)}'
       }
     ]
   time:
@@ -13,7 +13,6 @@ LevelSessionPlayerSchema = c.object
   changes:
     type: 'Number'
 
-
 LevelSessionLevelSchema = c.object {required: ['original', 'majorVersion']},
   original: c.objectId({})
   majorVersion:
@@ -21,11 +20,9 @@ LevelSessionLevelSchema = c.object {required: ['original', 'majorVersion']},
     minimum: 0
     default: 0
 
-
 LevelSessionSchema = c.object
-  title: "Session"
-  description: "A single session for a given level."
-
+  title: 'Session'
+  description: 'A single session for a given level.'
 
 _.extend LevelSessionSchema.properties,
   # denormalization
@@ -42,7 +39,7 @@ _.extend LevelSessionSchema.properties,
       [
         {
           rel: 'extra'
-          href: "/db/user/{($)}"
+          href: '/db/user/{($)}'
         }
       ]
   created: c.date
@@ -108,17 +105,17 @@ _.extend LevelSessionSchema.properties,
       additionalProperties:
         type: 'string'
         format: 'javascript'
-  
+
   codeLanguage:
     type: 'string'
     default: 'javascript'
-    
+
   playtime:
     type: 'number'
     title: 'Playtime'
     default: 0
     description: 'The total playtime on this session'
-    
+
   teamSpells:
     type: 'object'
     additionalProperties:
@@ -134,7 +131,7 @@ _.extend LevelSessionSchema.properties,
     type: 'number'
 
   standardDeviation:
-    type:'number'
+    type: 'number'
     minimum: 0
 
   totalScore:
@@ -156,7 +153,7 @@ _.extend LevelSessionSchema.properties,
   submittedCodeLanguage:
     type: 'string'
     default: 'javascript'
-    
+
   transpiledCode:
     type: 'object'
     additionalProperties:
@@ -203,7 +200,6 @@ _.extend LevelSessionSchema.properties,
           title: 'Playtime so far'
           description: 'The total seconds of playtime on this session when the match was computed.'
           type: 'number'
-        
         metrics:
           type: 'object'
           title: 'Metrics'
@@ -223,19 +219,19 @@ _.extend LevelSessionSchema.properties,
               sessionID:
                 title: 'Opponent Session ID'
                 description: 'The session ID of an opponent.'
-                type: ['object', 'string','null']
+                type: ['object', 'string', 'null']
               userID:
                 title: 'Opponent User ID'
                 description: 'The user ID of an opponent'
-                type: ['object','string','null']
+                type: ['object', 'string', 'null']
               name:
                 title: 'Opponent name'
                 description: 'The name of the opponent'
-                type: ['string','null']
+                type: ['string', 'null']
               totalScore:
                 title: 'Opponent total score'
                 description: 'The totalScore of a user when the match was computed'
-                type: ['number','string', 'null']
+                type: ['number', 'string', 'null']
               metrics:
                 type: 'object'
                 properties:
@@ -244,11 +240,6 @@ _.extend LevelSessionSchema.properties,
                     description: 'The opponent\'s ranking in a given match'
                     type: 'number'
 
-
-
-
-
-
 c.extendBasicProperties LevelSessionSchema, 'level.session'
 c.extendPermissionsProperties LevelSessionSchema, 'level.session'
 
diff --git a/app/schemas/models/level_system.coffee b/app/schemas/models/level_system.coffee
index 1804de363..13f97e545 100644
--- a/app/schemas/models/level_system.coffee
+++ b/app/schemas/models/level_system.coffee
@@ -19,47 +19,46 @@ class Jitter extends System
 """
 
 PropertyDocumentationSchema = c.object {
-  title: "Property Documentation"
-  description: "Documentation entry for a property this System will add to its Thang which other Systems
- might want to also use."
-  "default":
-    name: "foo"
-    type: "object"
-    description: "This System provides a 'foo' property to satisfy all one's foobar needs. Use it wisely."
+  title: 'Property Documentation'
+  description: 'Documentation entry for a property this System will add to its Thang which other Systems might want to also use.'
+  'default':
+    name: 'foo'
+    type: 'object'
+    description: 'This System provides a "foo" property to satisfy all one\'s foobar needs. Use it wisely.'
   required: ['name', 'type', 'description']
 },
-  name: {type: 'string', pattern: c.identifierPattern, title: "Name", description: "Name of the property."}
+  name: {type: 'string', pattern: c.identifierPattern, title: 'Name', description: 'Name of the property.'}
   # not actual JS types, just whatever they describe...
-  type: c.shortString(title: "Type", description: "Intended type of the property.")
-  description: {type: 'string', description: "Description of the property.", maxLength: 1000}
-  args: c.array {title: "Arguments", description: "If this property has type 'function', then provide documentation for any function arguments."}, c.FunctionArgumentSchema
+  type: c.shortString(title: 'Type', description: 'Intended type of the property.')
+  description: {type: 'string', description: 'Description of the property.', maxLength: 1000}
+  args: c.array {title: 'Arguments', description: 'If this property has type "function", then provide documentation for any function arguments.'}, c.FunctionArgumentSchema
 
 DependencySchema = c.object {
-  title: "System Dependency"
-  description: "A System upon which this System depends."
-  "default":
+  title: 'System Dependency'
+  description: 'A System upon which this System depends.'
+  'default':
     #original: ?
     majorVersion: 0
-  required: ["original", "majorVersion"]
+  required: ['original', 'majorVersion']
   format: 'latest-version-reference'
-  links: [{rel: "db", href: "/db/level.system/{(original)}/version/{(majorVersion)}"}]
+  links: [{rel: 'db', href: '/db/level.system/{(original)}/version/{(majorVersion)}'}]
 },
-  original: c.objectId(title: "Original", description: "A reference to another System upon which this System depends.")
+  original: c.objectId(title: 'Original', description: 'A reference to another System upon which this System depends.')
   majorVersion:
-    title: "Major Version"
-    description: "Which major version of the System this System needs."
+    title: 'Major Version'
+    description: 'Which major version of the System this System needs.'
     type: 'integer'
     minimum: 0
 
 LevelSystemSchema = c.object {
-  title: "System"
-  description: "A System which can affect Level behavior."
-  required: ["name", "description", "code", "dependencies", "propertyDocumentation", "language"]
-  "default":
-    name: "JitterSystem"
-    description: "This System makes all idle, movable Thangs jitter around."
+  title: 'System'
+  description: 'A System which can affect Level behavior.'
+  required: ['name', 'description', 'code', 'dependencies', 'propertyDocumentation', 'codeLanguage']
+  'default':
+    name: 'JitterSystem'
+    description: 'This System makes all idle, movable Thangs jitter around.'
     code: jitterSystemCode
-    language: "coffeescript"
+    codeLanguage: 'coffeescript'
     dependencies: []  # TODO: should depend on something by default
     propertyDocumentation: []
 }
@@ -67,36 +66,35 @@ c.extendNamedProperties LevelSystemSchema  # let's have the name be the first pr
 LevelSystemSchema.properties.name.pattern = c.classNamePattern
 _.extend LevelSystemSchema.properties,
   description:
-    title: "Description"
-    description: "A short explanation of what this System does."
-    type: "string"
+    title: 'Description'
+    description: 'A short explanation of what this System does.'
+    type: 'string'
     maxLength: 2000
-    "default": "This System doesn't do anything yet."
-  language:
-    type: "string"
-    title: "Language"
-    description: "Which programming language this System is written in."
-    "enum": ["coffeescript"]
+    'default': 'This System doesn\'t do anything yet.'
+  codeLanguage:
+    type: 'string'
+    title: 'Language'
+    description: 'Which programming language this System is written in.'
+    'enum': ['coffeescript']
   code:
-    title: "Code"
-    description: "The code for this System, as a CoffeeScript class. TODO: add link to documentation
- for how to write these."
-    "default": jitterSystemCode
-    type: "string"
-    format: "coffee"
+    title: 'Code'
+    description: 'The code for this System, as a CoffeeScript class. TODO: add link to documentation for how to write these.'
+    'default': jitterSystemCode
+    type: 'string'
+    format: 'coffee'
   js:
-    title: "JavaScript"
-    description: "The transpiled JavaScript code for this System"
-    type: "string"
-    format: "hidden"
-  dependencies: c.array {title: "Dependencies", description: "An array of Systems upon which this System depends.", "default": [], uniqueItems: true}, DependencySchema
-  propertyDocumentation: c.array {title: "Property Documentation", description: "An array of documentation entries for each notable property this System will add to its Level which other Systems might want to also use.", "default": []}, PropertyDocumentationSchema
-  configSchema: _.extend metaschema, {title: "Configuration Schema", description: "A schema for validating the arguments that can be passed to this System as configuration.", default: {type: 'object', additionalProperties: false}}
+    title: 'JavaScript'
+    description: 'The transpiled JavaScript code for this System'
+    type: 'string'
+    format: 'hidden'
+  dependencies: c.array {title: 'Dependencies', description: 'An array of Systems upon which this System depends.', 'default': [], uniqueItems: true}, DependencySchema
+  propertyDocumentation: c.array {title: 'Property Documentation', description: 'An array of documentation entries for each notable property this System will add to its Level which other Systems might want to also use.', 'default': []}, PropertyDocumentationSchema
+  configSchema: _.extend metaschema, {title: 'Configuration Schema', description: 'A schema for validating the arguments that can be passed to this System as configuration.', default: {type: 'object', additionalProperties: false}}
   official:
-    type: "boolean"
-    title: "Official"
-    description: "Whether this is an official CodeCombat System."
-    "default": false
+    type: 'boolean'
+    title: 'Official'
+    description: 'Whether this is an official CodeCombat System.'
+    'default': false
 
 c.extendBasicProperties LevelSystemSchema, 'level.system'
 c.extendSearchableProperties LevelSystemSchema
diff --git a/app/schemas/models/patch.coffee b/app/schemas/models/patch.coffee
index e14423371..6af348725 100644
--- a/app/schemas/models/patch.coffee
+++ b/app/schemas/models/patch.coffee
@@ -1,24 +1,24 @@
 c = require './../schemas'
 
 patchables = ['level', 'thang_type', 'level_system', 'level_component', 'article']
-  
-PatchSchema = c.object({title:'Patch', required:['target', 'delta', 'commitMessage']}, {
-  delta: { title: 'Delta', type:['array', 'object'] }
+
+PatchSchema = c.object({title: 'Patch', required: ['target', 'delta', 'commitMessage']}, {
+  delta: {title: 'Delta', type: ['array', 'object']}
   commitMessage: c.shortString({maxLength: 500, minLength: 1})
-  creator: c.objectId(links: [{rel: 'extra', href: "/db/user/{($)}"}])
-  created: c.date( { title: 'Created', readOnly: true })
-  status: { enum: ['pending', 'accepted', 'rejected', 'withdrawn']}
-  
-  target: c.object({title: 'Target', required:['collection', 'id']}, {
-    collection: { enum: patchables }
+  creator: c.objectId(links: [{rel: 'extra', href: '/db/user/{($)}'}])
+  created: c.date({title: 'Created', readOnly: true})
+  status: {enum: ['pending', 'accepted', 'rejected', 'withdrawn']}
+
+  target: c.object({title: 'Target', required: ['collection', 'id']}, {
+    collection: {enum: patchables}
     id: c.objectId(title: 'Target ID') # search by this if not versioned
 
   # if target is versioned, want to know that info too
     original: c.objectId(title: 'Target Original') # search by this if versioned
     version:
       properties:
-        major: { type: 'number', minimum: 0 }
-        minor: { type: 'number', minimum: 0 }
+        major: {type: 'number', minimum: 0}
+        minor: {type: 'number', minimum: 0}
   })
 })
 
diff --git a/app/schemas/models/thang_component.coffee b/app/schemas/models/thang_component.coffee
index eebcf155b..a8b6b5b74 100644
--- a/app/schemas/models/thang_component.coffee
+++ b/app/schemas/models/thang_component.coffee
@@ -1,21 +1,21 @@
 c = require './../schemas'
 
 module.exports = ThangComponentSchema = c.object {
-  title: "Component"
-  description: "Configuration for a Component that this Thang uses."
+  title: 'Component'
+  description: 'Configuration for a Component that this Thang uses.'
   format: 'thang-component'
   required: ['original', 'majorVersion']
   'default':
     majorVersion: 0
     config: {}
-  links: [{rel: "db", href: "/db/level.component/{(original)}/version/{(majorVersion)}"}]
+  links: [{rel: 'db', href: '/db/level.component/{(original)}/version/{(majorVersion)}'}]
 },
-  original: c.objectId(title: "Original", description: "A reference to the original Component being configured.", format: "hidden")
-  config: c.object {title: "Configuration", description: "Component-specific configuration properties.", additionalProperties: true, format: 'thang-component-configuration'}
+  original: c.objectId(title: 'Original', description: 'A reference to the original Component being configured.', format: 'hidden')
+  config: c.object {title: 'Configuration', description: 'Component-specific configuration properties.', additionalProperties: true, format: 'thang-component-configuration'}
   majorVersion:
-    title: "Major Version"
-    description: "Which major version of the Component is being used."
+    title: 'Major Version'
+    description: 'Which major version of the Component is being used.'
     type: 'integer'
     minimum: 0
     default: 0
-    format: "hidden"
+    format: 'hidden'
diff --git a/app/schemas/models/thang_type.coffee b/app/schemas/models/thang_type.coffee
index 37624c180..0203287af 100644
--- a/app/schemas/models/thang_type.coffee
+++ b/app/schemas/models/thang_type.coffee
@@ -4,144 +4,144 @@ ThangComponentSchema = require './thang_component'
 ThangTypeSchema = c.object()
 c.extendNamedProperties ThangTypeSchema  # name first
 
-ShapeObjectSchema = c.object { title: 'Shape' },
-  fc: { type: 'string', title: 'Fill Color' }
-  lf: { type: 'array', title: 'Linear Gradient Fill' }
-  ls: { type: 'array', title: 'Linear Gradient Stroke' }
-  p: { type: 'string', title: 'Path' }
-  de: { type: 'array', title: 'Draw Ellipse' }
-  sc: { type: 'string', title: 'Stroke Color' }
-  ss: { type: 'array', title: 'Stroke Style' }
-  t: c.array {}, { type: 'number', title: 'Transform' }
-  m: { type: 'string', title: 'Mask' }
+ShapeObjectSchema = c.object {title: 'Shape'},
+  fc: {type: 'string', title: 'Fill Color'}
+  lf: {type: 'array', title: 'Linear Gradient Fill'}
+  ls: {type: 'array', title: 'Linear Gradient Stroke'}
+  p: {type: 'string', title: 'Path'}
+  de: {type: 'array', title: 'Draw Ellipse'}
+  sc: {type: 'string', title: 'Stroke Color'}
+  ss: {type: 'array', title: 'Stroke Style'}
+  t: c.array {}, {type: 'number', title: 'Transform'}
+  m: {type: 'string', title: 'Mask'}
 
-ContainerObjectSchema = c.object { format: 'container' },
-  b: c.array { title: 'Bounds' }, { type: 'number' }
-  c: c.array { title: 'Children' }, { anyOf: [
-    { type: 'string', title: 'Shape Child' },
-    c.object { title: 'Container Child' }
-      gn: { type: 'string', title: 'Global Name' }
-      t: c.array {}, { type: 'number' }
+ContainerObjectSchema = c.object {format: 'container'},
+  b: c.array {title: 'Bounds'}, {type: 'number'}
+  c: c.array {title: 'Children'}, {anyOf: [
+    {type: 'string', title: 'Shape Child'},
+    c.object {title: 'Container Child'}
+      gn: {type: 'string', title: 'Global Name'}
+      t: c.array {}, {type: 'number'}
   ]}
 
 RawAnimationObjectSchema = c.object {},
-  bounds: c.array { title: 'Bounds' }, { type: 'number' }
-  frameBounds: c.array { title: 'Frame Bounds' }, c.array { title: 'Bounds' }, { type: 'number' }
+  bounds: c.array {title: 'Bounds'}, {type: 'number'}
+  frameBounds: c.array {title: 'Frame Bounds'}, c.array {title: 'Bounds'}, {type: 'number'}
   shapes: c.array {},
-    bn: { type: 'string', title: 'Block Name' }
-    gn: { type: 'string', title: 'Global Name' }
-    im : { type: 'boolean', title: 'Is Mask' }
-    m: { type: 'string', title: 'Uses Mask' }
+    bn: {type: 'string', title: 'Block Name'}
+    gn: {type: 'string', title: 'Global Name'}
+    im : {type: 'boolean', title: 'Is Mask'}
+    m: {type: 'string', title: 'Uses Mask'}
   containers: c.array {},
-    bn: { type: 'string', title: 'Block Name' }
-    gn: { type: 'string', title: 'Global Name' }
-    t: c.array {}, { type: 'number' }
-    o: { type: 'boolean', title: 'Starts Hidden (_off)'}
-    al: { type: 'number', title: 'Alpha'}
+    bn: {type: 'string', title: 'Block Name'}
+    gn: {type: 'string', title: 'Global Name'}
+    t: c.array {}, {type: 'number'}
+    o: {type: 'boolean', title: 'Starts Hidden (_off)'}
+    al: {type: 'number', title: 'Alpha'}
   animations: c.array {},
-    bn: { type: 'string', title: 'Block Name' }
-    gn: { type: 'string', title: 'Global Name' }
-    t: c.array {}, { type: 'number', title: 'Transform' }
-    a: c.array { title: 'Arguments' }
+    bn: {type: 'string', title: 'Block Name'}
+    gn: {type: 'string', title: 'Global Name'}
+    t: c.array {}, {type: 'number', title: 'Transform'}
+    a: c.array {title: 'Arguments'}
   tweens: c.array {},
-    c.array { title: 'Function Chain', },
-      c.object { title: 'Function Call' },
-        n: { type: 'string', title: 'Name' }
-        a: c.array { title: 'Arguments' }
+    c.array {title: 'Function Chain'},
+      c.object {title: 'Function Call'},
+        n: {type: 'string', title: 'Name'}
+        a: c.array {title: 'Arguments'}
   graphics: c.array {},
-    bn: { type: 'string', title: 'Block Name' }
-    p: { type: 'string', title: 'Path' }
+    bn: {type: 'string', title: 'Block Name'}
+    p: {type: 'string', title: 'Path'}
 
-PositionsSchema = c.object { title: 'Positions', description: 'Customize position offsets.' },
-  registration: c.point2d { title: 'Registration Point', description: "Action-specific registration point override." }
-  torso: c.point2d { title: 'Torso Offset', description: "Action-specific torso offset override." }
-  mouth: c.point2d { title: 'Mouth Offset', description: "Action-specific mouth offset override." }
-  aboveHead: c.point2d { title: 'Above Head Offset', description: "Action-specific above-head offset override." }
+PositionsSchema = c.object {title: 'Positions', description: 'Customize position offsets.'},
+  registration: c.point2d {title: 'Registration Point', description: 'Action-specific registration point override.'}
+  torso: c.point2d {title: 'Torso Offset', description: 'Action-specific torso offset override.'}
+  mouth: c.point2d {title: 'Mouth Offset', description: 'Action-specific mouth offset override.'}
+  aboveHead: c.point2d {title: 'Above Head Offset', description: 'Action-specific above-head offset override.'}
 
 ActionSchema = c.object {},
-  animation: { type: 'string', description: 'Raw animation being sourced', format: 'raw-animation' }
-  container: { type: 'string', description: 'Name of the container to show' }
-  relatedActions: c.object { },
-    begin: { $ref: '#/definitions/action' }
-    end: { $ref: '#/definitions/action' }
-    main: { $ref: '#/definitions/action' }
-    fore: { $ref: '#/definitions/action' }
-    back: { $ref: '#/definitions/action' }
-    side: { $ref: '#/definitions/action' }
+  animation: {type: 'string', description: 'Raw animation being sourced', format: 'raw-animation'}
+  container: {type: 'string', description: 'Name of the container to show'}
+  relatedActions: c.object {},
+    begin: {$ref: '#/definitions/action'}
+    end: {$ref: '#/definitions/action'}
+    main: {$ref: '#/definitions/action'}
+    fore: {$ref: '#/definitions/action'}
+    back: {$ref: '#/definitions/action'}
+    side: {$ref: '#/definitions/action'}
 
-    "?0?011?11?11": { $ref: '#/definitions/action', title: "NW corner" }
-    "?0?11011?11?": { $ref: '#/definitions/action', title: "NE corner, flipped" }
-    "?0?111111111": { $ref: '#/definitions/action', title: "N face" }
-    "?11011011?0?": { $ref: '#/definitions/action', title: "SW corner, top" }
-    "11?11?110?0?": { $ref: '#/definitions/action', title: "SE corner, top, flipped" }
-    "?11011?0????": { $ref: '#/definitions/action', title: "SW corner, bottom" }
-    "11?110?0????": { $ref: '#/definitions/action', title: "SE corner, bottom, flipped" }
-    "?11011?11?11": { $ref: '#/definitions/action', title: "W face" }
-    "11?11011?11?": { $ref: '#/definitions/action', title: "E face, flipped" }
-    "011111111111": { $ref: '#/definitions/action', title: "NW elbow" }
-    "110111111111": { $ref: '#/definitions/action', title: "NE elbow, flipped" }
-    "111111111?0?": { $ref: '#/definitions/action', title: "S face, top" }
-    "111111?0????": { $ref: '#/definitions/action', title: "S face, bottom" }
-    "111111111011": { $ref: '#/definitions/action', title: "SW elbow, top" }
-    "111111111110": { $ref: '#/definitions/action', title: "SE elbow, top, flipped" }
-    "111111011?11": { $ref: '#/definitions/action', title: "SW elbow, bottom" }
-    "11111111011?": { $ref: '#/definitions/action', title: "SE elbow, bottom, flipped" }
-    "111111111111": { $ref: '#/definitions/action', title: "Middle" }
+    '?0?011?11?11': {$ref: '#/definitions/action', title: 'NW corner'}
+    '?0?11011?11?': {$ref: '#/definitions/action', title: 'NE corner, flipped'}
+    '?0?111111111': {$ref: '#/definitions/action', title: 'N face'}
+    '?11011011?0?': {$ref: '#/definitions/action', title: 'SW corner, top'}
+    '11?11?110?0?': {$ref: '#/definitions/action', title: 'SE corner, top, flipped'}
+    '?11011?0????': {$ref: '#/definitions/action', title: 'SW corner, bottom'}
+    '11?110?0????': {$ref: '#/definitions/action', title: 'SE corner, bottom, flipped'}
+    '?11011?11?11': {$ref: '#/definitions/action', title: 'W face'}
+    '11?11011?11?': {$ref: '#/definitions/action', title: 'E face, flipped'}
+    '011111111111': {$ref: '#/definitions/action', title: 'NW elbow'}
+    '110111111111': {$ref: '#/definitions/action', title: 'NE elbow, flipped'}
+    '111111111?0?': {$ref: '#/definitions/action', title: 'S face, top'}
+    '111111?0????': {$ref: '#/definitions/action', title: 'S face, bottom'}
+    '111111111011': {$ref: '#/definitions/action', title: 'SW elbow, top'}
+    '111111111110': {$ref: '#/definitions/action', title: 'SE elbow, top, flipped'}
+    '111111011?11': {$ref: '#/definitions/action', title: 'SW elbow, bottom'}
+    '11111111011?': {$ref: '#/definitions/action', title: 'SE elbow, bottom, flipped'}
+    '111111111111': {$ref: '#/definitions/action', title: 'Middle'}
 
-  loops: { type: 'boolean' }
-  speed: { type: 'number' }
-  goesTo: { type: 'string', description: 'Action (animation?) to which we switch after this animation.' }
-  frames: { type: 'string', pattern:'^[0-9,]+$', description: 'Manually way to specify frames.' }
-  framerate: { type: 'number', description: 'Get this from the HTML output.' }
+  loops: {type: 'boolean'}
+  speed: {type: 'number'}
+  goesTo: {type: 'string', description: 'Action (animation?) to which we switch after this animation.'}
+  frames: {type: 'string', pattern: '^[0-9,]+$', description: 'Manually way to specify frames.'}
+  framerate: {type: 'number', description: 'Get this from the HTML output.'}
   positions: PositionsSchema
-  scale: { title: 'Scale', type: 'number' }
-  flipX: { title: "Flip X", type: 'boolean', description: "Flip this animation horizontally?" }
-  flipY: { title: "Flip Y", type: 'boolean', description: "Flip this animation vertically?" }
+  scale: {title: 'Scale', type: 'number'}
+  flipX: {title: 'Flip X', type: 'boolean', description: 'Flip this animation horizontally?'}
+  flipY: {title: 'Flip Y', type: 'boolean', description: 'Flip this animation vertically?'}
 
-SoundSchema = c.sound({delay: { type: 'number' }})
+SoundSchema = c.sound({delay: {type: 'number'}})
 
 _.extend ThangTypeSchema.properties,
   raw: c.object {title: 'Raw Vector Data'},
     shapes: c.object {title: 'Shapes', additionalProperties: ShapeObjectSchema}
     containers: c.object {title: 'Containers', additionalProperties: ContainerObjectSchema}
     animations: c.object {title: 'Animations', additionalProperties: RawAnimationObjectSchema}
-  kind: c.shortString { enum: ['Unit', 'Floor', 'Wall', 'Doodad', 'Misc', 'Mark'], default: 'Misc', title: 'Kind' }
+  kind: c.shortString {enum: ['Unit', 'Floor', 'Wall', 'Doodad', 'Misc', 'Mark'], default: 'Misc', title: 'Kind'}
 
-  actions: c.object { title: 'Actions', additionalProperties: { $ref: '#/definitions/action' } }
-  soundTriggers: c.object { title: "Sound Triggers", additionalProperties: c.array({}, { $ref: '#/definitions/sound' }) },
-    say: c.object { format: 'slug-props', additionalProperties: { $ref: '#/definitions/sound' } },
-      defaultSimlish: c.array({}, { $ref: '#/definitions/sound' })
-      swearingSimlish: c.array({}, { $ref: '#/definitions/sound' })
-  rotationType: { title: 'Rotation', type: 'string', enum: ['isometric', 'fixed']}
-  matchWorldDimensions: { title: 'Match World Dimensions', type: 'boolean' }
-  shadow: { title: 'Shadow Diameter', type: 'number', format: 'meters', description: "Shadow diameter in meters" }
+  actions: c.object {title: 'Actions', additionalProperties: {$ref: '#/definitions/action'}}
+  soundTriggers: c.object {title: 'Sound Triggers', additionalProperties: c.array({}, {$ref: '#/definitions/sound'})},
+    say: c.object {format: 'slug-props', additionalProperties: {$ref: '#/definitions/sound'}},
+      defaultSimlish: c.array({}, {$ref: '#/definitions/sound'})
+      swearingSimlish: c.array({}, {$ref: '#/definitions/sound'})
+  rotationType: {title: 'Rotation', type: 'string', enum: ['isometric', 'fixed']}
+  matchWorldDimensions: {title: 'Match World Dimensions', type: 'boolean'}
+  shadow: {title: 'Shadow Diameter', type: 'number', format: 'meters', description: 'Shadow diameter in meters'}
   layerPriority:
     title: 'Layer Priority'
     type: 'integer'
-    description: "Within its layer, sprites are sorted by layer priority, then y, then z."
+    description: 'Within its layer, sprites are sorted by layer priority, then y, then z.'
   scale:
     title: 'Scale'
     type: 'number'
   positions: PositionsSchema
-  raster: { type: 'string', format: 'image-file', title: 'Raster Image' }
+  raster: {type: 'string', format: 'image-file', title: 'Raster Image'}
   colorGroups: c.object
     title: 'Color Groups'
     additionalProperties:
-      type:'array'
+      type: 'array'
       format: 'thang-color-group'
-      items: {type:'string'}
-  snap: c.object { title: "Snap", description: "In the level editor, snap positioning to these intervals.", required: ['x', 'y'] },
+      items: {type: 'string'}
+  snap: c.object {title: 'Snap', description: 'In the level editor, snap positioning to these intervals.', required: ['x', 'y']},
     x:
-      title: "Snap X"
+      title: 'Snap X'
       type: 'number'
-      description: "Snap to this many meters in the x-direction."
+      description: 'Snap to this many meters in the x-direction.'
       default: 4
     y:
-      title: "Snap Y"
+      title: 'Snap Y'
       type: 'number'
-      description: "Snap to this many meters in the y-direction."
+      description: 'Snap to this many meters in the y-direction.'
       default: 4
-  components: c.array {title: "Components", description: "Thangs are configured by changing the Components attached to them.", uniqueItems: true, format: 'thang-components-array'}, ThangComponentSchema  # TODO: uniqueness should be based on "original", not whole thing
+  components: c.array {title: 'Components', description: 'Thangs are configured by changing the Components attached to them.', uniqueItems: true, format: 'thang-components-array'}, ThangComponentSchema  # TODO: uniqueness should be based on 'original', not whole thing
 
 ThangTypeSchema.definitions =
   action: ActionSchema
diff --git a/app/schemas/models/user.coffee b/app/schemas/models/user.coffee
index a6525bf91..a144494e1 100644
--- a/app/schemas/models/user.coffee
+++ b/app/schemas/models/user.coffee
@@ -2,12 +2,12 @@ c = require './../schemas'
 emailSubscriptions = ['announcement', 'tester', 'level_creator', 'developer', 'article_editor', 'translator', 'support', 'notification']
 
 UserSchema = c.object {},
-  name: c.shortString({title: 'Display Name', default:''})
+  name: c.shortString({title: 'Display Name', default: ''})
   email: c.shortString({title: 'Email', format: 'email'})
   firstName: c.shortString({title: 'First Name'})
   lastName: c.shortString({title: 'Last Name'})
   gender: {type: 'string', 'enum': ['male', 'female']}
-  password: {type: 'string', maxLength: 256, minLength: 2, title:'Password'}
+  password: {type: 'string', maxLength: 256, minLength: 2, title: 'Password'}
   passwordReset: {type: 'string'}
   photoURL: {type: 'string', format: 'image-file', title: 'Profile Picture', description: 'Upload a 256x256px or larger image to serve as your profile picture.'}
 
@@ -17,24 +17,24 @@ UserSchema = c.object {},
   wizardColor1: c.pct({title: 'Wizard Clothes Color'})
   volume: c.pct({title: 'Volume'})
   music: {type: 'boolean', default: true}
-  autocastDelay: {type: 'integer', 'default': 5000 }
-  lastLevel: { type: 'string' }
+  autocastDelay: {type: 'integer', 'default': 5000}
+  lastLevel: {type: 'string'}
 
   emailSubscriptions: c.array {uniqueItems: true}, {'enum': emailSubscriptions}
-  emails: c.object {title: "Email Settings", default: {generalNews: {enabled:true}, anyNotes: {enabled:true}, recruitNotes: {enabled:true}}},
+  emails: c.object {title: 'Email Settings', default: {generalNews: {enabled: true}, anyNotes: {enabled: true}, recruitNotes: {enabled: true}}},
     # newsletters
-    generalNews: { $ref: '#/definitions/emailSubscription' }
-    adventurerNews: { $ref: '#/definitions/emailSubscription' }
-    ambassadorNews: { $ref: '#/definitions/emailSubscription' }
-    archmageNews: { $ref: '#/definitions/emailSubscription' }
-    artisanNews: { $ref: '#/definitions/emailSubscription' }
-    diplomatNews: { $ref: '#/definitions/emailSubscription' }
-    scribeNews: { $ref: '#/definitions/emailSubscription' }
+    generalNews: {$ref: '#/definitions/emailSubscription'}
+    adventurerNews: {$ref: '#/definitions/emailSubscription'}
+    ambassadorNews: {$ref: '#/definitions/emailSubscription'}
+    archmageNews: {$ref: '#/definitions/emailSubscription'}
+    artisanNews: {$ref: '#/definitions/emailSubscription'}
+    diplomatNews: {$ref: '#/definitions/emailSubscription'}
+    scribeNews: {$ref: '#/definitions/emailSubscription'}
 
     # notifications
-    anyNotes: { $ref: '#/definitions/emailSubscription' } # overrides any other notifications settings
-    recruitNotes: { $ref: '#/definitions/emailSubscription' }
-    employerNotes: { $ref: '#/definitions/emailSubscription' }
+    anyNotes: {$ref: '#/definitions/emailSubscription'} # overrides any other notifications settings
+    recruitNotes: {$ref: '#/definitions/emailSubscription'}
+    employerNotes: {$ref: '#/definitions/emailSubscription'}
 
   # server controlled
   permissions: c.array {'default': []}, c.shortString()
@@ -60,11 +60,12 @@ UserSchema = c.object {},
     colorConfig: c.object {additionalProperties: c.colorConfig()}
 
   aceConfig: c.object {},
-    language: {type: 'string', 'default': 'javascript', 'enum': ['javascript', 'coffeescript', 'clojure', 'lua', 'python', 'io']}
+    language: {type: 'string', 'default': 'javascript', 'enum': ['javascript', 'coffeescript', 'python', 'clojure', 'lua', 'io']}
     keyBindings: {type: 'string', 'default': 'default', 'enum': ['default', 'vim', 'emacs']}
     invisibles: {type: 'boolean', 'default': false}
     indentGuides: {type: 'boolean', 'default': false}
     behaviors: {type: 'boolean', 'default': false}
+    liveCompletion: {type: 'boolean', 'default': true}
 
   simulatedBy: {type: 'integer', minimum: 0, default: 0}
   simulatedFor: {type: 'integer', minimum: 0, default: 0}
@@ -77,8 +78,8 @@ UserSchema = c.object {},
     name: c.shortString {title: 'Name', description: 'Name you want employers to see, like "Nick Winter".'}
     city: c.shortString {title: 'City', description: 'City you want to work in (or live in now), like "San Francisco" or "Lubbock, TX".', default: 'Defaultsville, CA', format: 'city'}
     country: c.shortString {title: 'Country', description: 'Country you want to work in (or live in now), like "USA" or "France".', default: 'USA', format: 'country'}
-    skills: c.array {title: 'Skills', description: 'Tag relevant developer skills in order of proficiency. Employers will see the first five at a glance.', default: ['javascript'], minItems: 1, maxItems: 30, uniqueItems: true},
-      {type: 'string', minLength: 1, maxLength: 20, description: 'Ex.: "objective-c", "mongodb", "rails", "android", "javascript"', format: 'skill'}
+    skills: c.array {title: 'Skills', description: 'Tag relevant developer skills in order of proficiency.', default: ['javascript'], minItems: 1, maxItems: 30, uniqueItems: true},
+      {type: 'string', minLength: 1, maxLength: 50, description: 'Ex.: "objective-c", "mongodb", "rails", "android", "javascript"', format: 'skill'}
     experience: {type: 'integer', title: 'Years of Experience', minimum: 0, description: 'How many years of professional experience (getting paid) developing software do you have?'}
     shortDescription: {type: 'string', maxLength: 140, title: 'Short Description', description: 'Who are you, and what are you looking for? 140 characters max.', default: 'Programmer seeking to build great software.'}
     longDescription: {type: 'string', maxLength: 600, title: 'Description', description: 'Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max.', format: 'markdown', default: '* I write great code.\n* You need great code?\n* Great!'}
@@ -103,18 +104,58 @@ UserSchema = c.object {},
         link: c.url {title: 'Link', description: 'Link to the project.', default: 'http://example.com'}
     links: c.array {title: 'Personal and Social Links', description: 'Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog.'},
       c.object {title: 'Link', description: 'A link to another site you want to highlight, like your GitHub, your LinkedIn, or your blog.', required: ['name', 'link']},
-        name: {type: 'string', maxLength: 30, title: 'Link Name', description: 'What are you linking to? Ex: "Personal Website", "Twitter"', format: 'link-name'}
+        name: {type: 'string', maxLength: 30, title: 'Link Name', description: 'What are you linking to? Ex: "Personal Website", "GitHub"', format: 'link-name'}
         link: c.url {title: 'Link', description: 'The URL.', default: 'http://example.com'}
     photoURL: {type: 'string', format: 'image-file', title: 'Profile Picture', description: 'Upload a 256x256px or larger image if you want to show a different profile picture to employers than your normal avatar.'}
-
+    curated: c.object {title: 'Curated', required: ['shortDescription', 'mainTag', 'location', 'education', 'workHistory', 'phoneScreenFilter', 'schoolFilter', 'locationFilter', 'roleFilter', 'seniorityFilter']},
+      shortDescription:
+        title: 'Short description'
+        description: 'A sentence or two describing the candidate'
+        type: 'string'
+      mainTag:
+        title: 'Main tag'
+        description: 'A main tag to describe this candidate'
+        type: 'string'
+      location:
+        title: 'Location'
+        description: 'The CURRENT location of the candidate'
+        type: 'string'
+      education:
+        title: 'Education'
+        description: 'The main educational institution of the candidate'
+        type: 'string'
+      workHistory: c.array {title: 'Work history', description: 'One or two places the candidate has worked', type: 'array'},
+        title: 'Workplace'
+        type: 'string'
+      phoneScreenFilter:
+        title: 'Phone screened'
+        type: 'boolean'
+        description: 'Whether the candidate has been phone screened.'
+      schoolFilter:
+        title: 'School'
+        type: 'string'
+        enum: ['Top 20 Eng.', 'Other US', 'Other Intl.']
+      locationFilter:
+        title: 'Location'
+        type: 'string'
+        enum: ['Bay Area', 'New York', 'Other US', 'International']
+      roleFilter:
+        title: 'Role'
+        type: 'string'
+        enum: ['Web Developer', 'Software Developer', 'iOS Developer', 'Android Developer', 'Project Manager']
+      seniorityFilter:
+        title: 'Seniority'
+        type: 'string'
+        enum: ['College Student', 'Recent Grad', 'Junior', 'Senior', 'Management']
   jobProfileApproved: {title: 'Job Profile Approved', type: 'boolean', description: 'Whether your profile has been approved by CodeCombat.'}
-  jobProfileNotes: {type: 'string', maxLength: 1000, title: 'Our Notes', description: "CodeCombat's notes on the candidate.", format: 'markdown', default: ''}
-  employerAt: c.shortString {description: "If given employer permissions to view job candidates, for which employer?"}
+  jobProfileNotes: {type: 'string', maxLength: 1000, title: 'Our Notes', description: 'CodeCombat\'s notes on the candidate.', format: 'markdown', default: ''}
+  employerAt: c.shortString {description: 'If given employer permissions to view job candidates, for which employer?'}
   signedEmployerAgreement: c.object {},
-    linkedinID: c.shortString {title:"LinkedInID", description: "The user's LinkedIn ID when they signed the contract."}
-    date: c.date {title: "Date signed employer agreement"}
-    data: c.object {description: "Cached LinkedIn data slurped from profile."}
-
+    linkedinID: c.shortString {title: 'LinkedInID', description: 'The user\'s LinkedIn ID when they signed the contract.'}
+    date: c.date {title: 'Date signed employer agreement'}
+    data: c.object {description: 'Cached LinkedIn data slurped from profile.', additionalProperties: true}
+  points: {type: 'number'}
+  activity: {type: 'object', description: 'Summary statistics about user activity', additionalProperties: c.activity}
 
 c.extendBasicProperties UserSchema, 'user'
 
diff --git a/app/schemas/models/user_remark.coffee b/app/schemas/models/user_remark.coffee
new file mode 100644
index 000000000..839ce1380
--- /dev/null
+++ b/app/schemas/models/user_remark.coffee
@@ -0,0 +1,23 @@
+c = require './../schemas'
+
+UserRemarkSchema = c.object {
+  title: 'Remark'
+  description: 'Remarks on a user, point of contact, tasks.'
+}
+
+_.extend UserRemarkSchema.properties,
+  user: c.objectId links: [{rel: 'extra', href: '/db/user/{($)}'}]
+  contact: c.objectId links: [{rel: 'extra', href: '/db/user/{($)}'}]
+  created: c.date title: 'Created', readOnly: true
+  history: c.array {title: 'History', description: 'Records of our interactions with the user.'},
+    c.object {title: 'Record'}, {date: c.date(title: 'Date'), content: {title: 'Content', type: 'string', format: 'markdown'}}
+  tasks: c.array {title: 'Tasks', description: 'Task entries: when to email the contact about something.'},
+    c.object {title: 'Task'}, {date: c.date(title: 'Date'), action: {title: 'Action', type: 'string'}}
+
+  # denormalization
+  userName: {title: 'Player Name', type: 'string'}
+  contactName: {title: 'Contact Name', type: 'string'}  # Not actually our usernames
+
+c.extendBasicProperties UserRemarkSchema, 'user.remark'
+
+module.exports = UserRemarkSchema
diff --git a/app/schemas/schemas.coffee b/app/schemas/schemas.coffee
index 9c20c9ba2..8474a9be0 100644
--- a/app/schemas/schemas.coffee
+++ b/app/schemas/schemas.coffee
@@ -8,37 +8,37 @@ combine = (base, ext) ->
   return base unless ext?
   return _.extend(base, ext)
 
-urlPattern = '^(ht|f)tp(s?)\:\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-‌​\.\?\,\'\/\\\+&%\$#_=]*)?$'
+urlPattern = '^(ht|f)tp(s?)\:\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&%\$#_=]*)?$'
 
 # Common schema properties
-me.object = (ext, props) -> combine {type: 'object', additionalProperties: false, properties: props or {}}, ext
-me.array = (ext, items) -> combine {type: 'array', items: items or {}}, ext
+me.object = (ext, props) -> combine({type: 'object', additionalProperties: false, properties: props or {}}, ext)
+me.array = (ext, items) -> combine({type: 'array', items: items or {}}, ext)
 me.shortString = (ext) -> combine({type: 'string', maxLength: 100}, ext)
 me.pct = (ext) -> combine({type: 'number', maximum: 1.0, minimum: 0.0}, ext)
 me.date = (ext) -> combine({type: ['object', 'string'], format: 'date-time'}, ext)
 # should just be string (Mongo ID), but sometimes mongoose turns them into objects representing those, so we are lenient
-me.objectId = (ext) -> schema = combine({type: ['object', 'string'] }, ext)
+me.objectId = (ext) -> schema = combine({type: ['object', 'string']}, ext)
 me.url = (ext) -> combine({type: 'string', format: 'url', pattern: urlPattern}, ext)
 
-PointSchema = me.object {title: "Point", description: "An {x, y} coordinate point.", format: "point2d", required: ["x", "y"]},
-  x: {title: "x", description: "The x coordinate.", type: "number", "default": 15}
-  y: {title: "y", description: "The y coordinate.", type: "number", "default": 20}
+PointSchema = me.object {title: 'Point', description: 'An {x, y} coordinate point.', format: 'point2d', required: ['x', 'y']},
+  x: {title: 'x', description: 'The x coordinate.', type: 'number', 'default': 15}
+  y: {title: 'y', description: 'The y coordinate.', type: 'number', 'default': 20}
 
 me.point2d = (ext) -> combine(_.cloneDeep(PointSchema), ext)
 
-SoundSchema = me.object { format: 'sound' },
-  mp3: { type: 'string', format: 'sound-file' }
-  ogg: { type: 'string', format: 'sound-file' }
+SoundSchema = me.object {format: 'sound'},
+  mp3: {type: 'string', format: 'sound-file'}
+  ogg: {type: 'string', format: 'sound-file'}
 
 me.sound = (props) ->
   obj = _.cloneDeep(SoundSchema)
   obj.properties[prop] = props[prop] for prop of props
   obj
 
-ColorConfigSchema = me.object { format: 'color-sound' },
-  hue: { format: 'range', type: 'number', minimum: 0, maximum: 1 }
-  saturation: { format: 'range', type: 'number', minimum: 0, maximum: 1 }
-  lightness: { format: 'range', type: 'number', minimum: 0, maximum: 1 }
+ColorConfigSchema = me.object {format: 'color-sound'},
+  hue: {format: 'range', type: 'number', minimum: 0, maximum: 1}
+  saturation: {format: 'range', type: 'number', minimum: 0, maximum: 1}
+  lightness: {format: 'range', type: 'number', minimum: 0, maximum: 1}
 
 me.colorConfig = (props) ->
   obj = _.cloneDeep(ColorConfigSchema)
@@ -49,23 +49,23 @@ me.colorConfig = (props) ->
 
 basicProps = (linkFragment) ->
   _id: me.objectId(links: [{rel: 'self', href: "/db/#{linkFragment}/{($)}"}], format: 'hidden')
-  __v: { title: 'Mongoose Version', format: 'hidden' }
+  __v: {title: 'Mongoose Version', format: 'hidden'}
 
 me.extendBasicProperties = (schema, linkFragment) ->
   schema.properties = {} unless schema.properties?
   _.extend(schema.properties, basicProps(linkFragment))
-  
+
 # PATCHABLE
 
 patchableProps = ->
   patches: me.array({title:'Patches'}, {
-    _id: me.objectId(links: [{rel: "db", href: "/db/patch/{($)}"}], title: "Patch ID", description: "A reference to the patch.")
-    status: { enum: ['pending', 'accepted', 'rejected', 'cancelled']}
+    _id: me.objectId(links: [{rel: 'db', href: '/db/patch/{($)}'}], title: 'Patch ID', description: 'A reference to the patch.')
+    status: {enum: ['pending', 'accepted', 'rejected', 'cancelled']}
   })
-  allowPatches: { type: 'boolean' }
-  watchers: me.array({title:'Watchers'},
-    me.objectId(links: [{rel: 'extra', href: "/db/user/{($)}"}]))
-  
+  allowPatches: {type: 'boolean'}
+  watchers: me.array({title: 'Watchers'},
+    me.objectId(links: [{rel: 'extra', href: '/db/user/{($)}'}]))
+
 me.extendPatchableProperties = (schema) ->
   schema.properties = {} unless schema.properties?
   _.extend(schema.properties, patchableProps())
@@ -80,44 +80,41 @@ me.extendNamedProperties = (schema) ->
   schema.properties = {} unless schema.properties?
   _.extend(schema.properties, namedProps())
 
-
 # VERSIONED
 
 versionedProps = (linkFragment) ->
   version:
-    'default': { minor: 0, major: 0, isLatestMajor: true, isLatestMinor: true }
+    'default': {minor: 0, major: 0, isLatestMajor: true, isLatestMinor: true}
     format: 'version'
     title: 'Version'
     type: 'object'
     readOnly: true
     additionalProperties: false
     properties:
-      major: { type: 'number', minimum: 0 }
-      minor: { type: 'number', minimum: 0 }
-      isLatestMajor: { type: 'boolean' }
-      isLatestMinor: { type: 'boolean' }
+      major: {type: 'number', minimum: 0}
+      minor: {type: 'number', minimum: 0}
+      isLatestMajor: {type: 'boolean'}
+      isLatestMinor: {type: 'boolean'}
   # TODO: figure out useful 'rel' values here
   original: me.objectId(links: [{rel: 'extra', href: "/db/#{linkFragment}/{($)}"}], format: 'hidden')
   parent: me.objectId(links: [{rel: 'extra', href: "/db/#{linkFragment}/{($)}"}], format: 'hidden')
-  creator: me.objectId(links: [{rel: 'extra', href: "/db/user/{($)}"}], format: 'hidden')
-  created: me.date( { title: 'Created', readOnly: true })
-  commitMessage: { type: 'string', maxLength: 500, title: 'Commit Message', readOnly: true }
+  creator: me.objectId(links: [{rel: 'extra', href: '/db/user/{($)}'}], format: 'hidden')
+  created: me.date({title: 'Created', readOnly: true})
+  commitMessage: {type: 'string', maxLength: 500, title: 'Commit Message', readOnly: true}
 
 me.extendVersionedProperties = (schema, linkFragment) ->
   schema.properties = {} unless schema.properties?
   _.extend(schema.properties, versionedProps(linkFragment))
 
-
 # SEARCHABLE
 
 searchableProps = ->
-  index: { format: 'hidden' }
+  index: {format: 'hidden'}
 
 me.extendSearchableProperties = (schema) ->
   schema.properties = {} unless schema.properties?
   _.extend(schema.properties, searchableProps())
 
-
 # PERMISSIONED
 
 permissionsProps = ->
@@ -129,7 +126,7 @@ permissionsProps = ->
       properties:
         target: {}
         access: {type: 'string', 'enum': ['read', 'write', 'owner']}
-    format: "hidden"
+    format: 'hidden'
 
 me.extendPermissionsProperties = (schema) ->
   schema.properties = {} unless schema.properties?
@@ -137,7 +134,7 @@ me.extendPermissionsProperties = (schema) ->
 
 # TRANSLATABLE
 
-me.generateLanguageCodeArrayRegex = -> "^(" + Language.languageCodes.join("|") + ")$"
+me.generateLanguageCodeArrayRegex = -> '^(' + Language.languageCodes.join('|') + ')$'
 
 me.getLanguageCodeArray = ->
   return Language.languageCodes
@@ -146,27 +143,56 @@ me.getLanguagesObject = -> return Language
 
 # OTHER
 
-me.classNamePattern = "^[A-Z][A-Za-z0-9]*$"  # starts with capital letter; just letters and numbers
-me.identifierPattern = "^[a-z][A-Za-z0-9]*$"  # starts with lowercase letter; just letters and numbers
-me.constantPattern = "^[A-Z0-9_]+$"  # just uppercase letters, underscores, and numbers
-me.identifierOrConstantPattern = "^([a-z][A-Za-z0-9]*|[A-Z0-9_]+)$"
+me.classNamePattern = '^[A-Z][A-Za-z0-9]*$'  # starts with capital letter; just letters and numbers
+me.identifierPattern = '^[a-z][A-Za-z0-9]*$'  # starts with lowercase letter; just letters and numbers
+me.constantPattern = '^[A-Z0-9_]+$'  # just uppercase letters, underscores, and numbers
+me.identifierOrConstantPattern = '^([a-z][A-Za-z0-9]*|[A-Z0-9_]+)$'
 
 me.FunctionArgumentSchema = me.object {
-  title: "Function Argument",
-  description: "Documentation entry for a function argument."
-  "default":
-    name: "target"
-    type: "object"
-    example: "this.getNearestEnemy()"
-    description: "The target of this function."
+  title: 'Function Argument',
+  description: 'Documentation entry for a function argument.'
+  'default':
+    name: 'target'
+    type: 'object'
+    example: 'this.getNearestEnemy()'
+    description: 'The target of this function.'
   required: ['name', 'type', 'example', 'description']
 },
-  name: {type: 'string', pattern: me.identifierPattern, title: "Name", description: "Name of the function argument."}
+  name: {type: 'string', pattern: me.identifierPattern, title: 'Name', description: 'Name of the function argument.'}
   # not actual JS types, just whatever they describe...
-  type: me.shortString(title: "Type", description: "Intended type of the argument.")
-  example: me.shortString(title: "Example", description: "Example value for the argument.")
-  description: {title: "Description", type: 'string', description: "Description of the argument.", maxLength: 1000}
-  "default":
-    title: "Default"
-    description: "Default value of the argument. (Your code should set this.)"
-    "default": null
+  type: me.shortString(title: 'Type', description: 'Intended type of the argument.')
+  example:
+    oneOf: [
+      me.shortString(title: 'Example', description: 'Example value for the argument.')
+      {
+        type: 'object',
+        title: 'Language Examples',
+        description: 'Examples by code language.',
+        additionalProperties: me.shortString(description: 'Example value for the argument.')
+      }
+    ]
+  description:
+    oneOf: [
+      {title: 'Description', type: 'string', description: 'Description of the argument.', maxLength: 1000}
+      {
+        type: 'object',
+        title: 'Language Descriptions',
+        description: 'Example argument descriptions by code language.',
+        additionalProperties: {type: 'string', description: 'Description of the argument.', maxLength: 1000}
+      }
+    ]
+  'default':
+    title: 'Default'
+    description: 'Default value of the argument. (Your code should set this.)'
+    'default': null
+
+me.codeSnippet = (mode) ->
+  return snippet =
+    code: {type: 'string', title: 'Snippet', default: '', description: 'Code snippet. Use ${1:defaultValue} syntax to add flexible arguments'}
+    # code: {type: 'string', format: 'ace', aceMode: 'ace/mode/'+mode, title: 'Snippet', default: '', description: 'Code snippet. Use ${1:defaultValue} syntax to add flexible arguments'}
+    tab: {type: 'string', title: 'Tab Trigger', description: 'Tab completion text. Will be expanded to the snippet if typed and hit tab.'}
+
+me.activity = me.object {description: 'Stats on an activity'},
+  first: me.date()
+  last: me.date()
+  count: {type: 'integer', minimum: 0}
diff --git a/app/schemas/subscriptions/app.coffee b/app/schemas/subscriptions/app.coffee
index 29fe52087..f107935c4 100644
--- a/app/schemas/subscriptions/app.coffee
+++ b/app/schemas/subscriptions/app.coffee
@@ -1,48 +1,45 @@
 module.exports =
-  "application:idle-changed":
+  'application: idle-changed':
     {} # TODO schema
 
-  "fbapi-loaded":
+  'fbapi-loaded':
     {} # TODO schema
 
-  "logging-in-with-facebook":
+  'logging-in-with-facebook':
     {} # TODO schema
 
-  "facebook-logged-in":
-    title: "Facebook logged in"
-    $schema: "http://json-schema.org/draft-04/schema#"
-    description: "Published when you successfully logged in with facebook"
-    type: "object"
+  'facebook-logged-in':
+    title: 'Facebook logged in'
+    $schema: 'http://json-schema.org/draft-04/schema#'
+    description: 'Published when you successfully logged in with facebook'
+    type: 'object'
     properties:
       response:
-        type: "object"
+        type: 'object'
         properties:
-          status: { type: "string" }
+          status: {type: 'string'}
           authResponse:
-            type: "object"
+            type: 'object'
             properties:
-              accessToken: { type: "string" }
-              expiresIn: { type: "number" }
-              signedRequest: { type: "string" }
-              userID: { type: "string" }
-    required: ["response"]
-    
-  "facebook-logged-out": {}
-  
-  "linkedin-loaded": {}
+              accessToken: {type: 'string'}
+              expiresIn: {type: 'number'}
+              signedRequest: {type: 'string'}
+              userID: {type: 'string'}
+    required: ['response']
 
-  "gapi-loaded":
+  'facebook-logged-out': {}
+
+  'linkedin-loaded': {}
+
+  'gapi-loaded':
     {} # TODO schema
 
-  "logging-in-with-gplus":
+  'logging-in-with-gplus':
     {} # TODO schema
 
-  "gplus-logged-in":
-    title: "G+ logged in"
-    $schema: "http://json-schema.org/draft-04/schema#"
-    description: "Published when you successfully logged in with G+"
-    type: "object"
-    properties:
-      authResult:
-        type: "string"
-    required: ["authResult"]
+  'gplus-logged-in':
+    title: 'G+ logged in'
+    $schema: 'http://json-schema.org/draft-04/schema#'
+    description: 'Published when you successfully logged in with G+'
+    type: 'object'
+    required: ['access_token']
diff --git a/app/schemas/subscriptions/bus.coffee b/app/schemas/subscriptions/bus.coffee
index 91569ae7f..72bdd6b07 100644
--- a/app/schemas/subscriptions/bus.coffee
+++ b/app/schemas/subscriptions/bus.coffee
@@ -1,71 +1,71 @@
 module.exports =
-  "bus:connecting":
-    title: "Bus Connecting"
-    $schema: "http://json-schema.org/draft-04/schema#"
-    description: "Published when a Bus starts connecting"
-    type: "object"
+  'bus:connecting':
+    title: 'Bus Connecting'
+    $schema: 'http://json-schema.org/draft-04/schema#'
+    description: 'Published when a Bus starts connecting'
+    type: 'object'
     properties:
       bus:
-        $ref: "bus"
+        $ref: 'bus'
 
-  "bus:connected":
-    title: "Bus Connected"
-    $schema: "http://json-schema.org/draft-04/schema#"
-    description: "Published when a Bus has connected"
-    type: "object"
+  'bus:connected':
+    title: 'Bus Connected'
+    $schema: 'http://json-schema.org/draft-04/schema#'
+    description: 'Published when a Bus has connected'
+    type: 'object'
     properties:
       bus:
-        $ref: "bus"
+        $ref: 'bus'
 
-  "bus:disconnected":
-    title: "Bus Disconnected"
-    $schema: "http://json-schema.org/draft-04/schema#"
-    description: "Published when a Bus has disconnected"
-    type: "object"
+  'bus:disconnected':
+    title: 'Bus Disconnected'
+    $schema: 'http://json-schema.org/draft-04/schema#'
+    description: 'Published when a Bus has disconnected'
+    type: 'object'
     properties:
       bus:
-        $ref: "bus"
+        $ref: 'bus'
 
-  "bus:new-message":
-    title: "Message sent"
-    $schema: "http://json-schema.org/draft-04/schema#"
-    description: "A new message was sent"
-    type: "object"
+  'bus:new-message':
+    title: 'Message sent'
+    $schema: 'http://json-schema.org/draft-04/schema#'
+    description: 'A new message was sent'
+    type: 'object'
     properties:
       message:
-        type: "string"
+        type: 'object'
       bus:
-        $ref: "bus"
+        $ref: 'bus'
 
-  "bus:player-joined":
-    title: "Player joined"
-    $schema: "http://json-schema.org/draft-04/schema#"
-    description: "A new player has joined"
-    type: "object"
+  'bus:player-joined':
+    title: 'Player joined'
+    $schema: 'http://json-schema.org/draft-04/schema#'
+    description: 'A new player has joined'
+    type: 'object'
     properties:
       player:
-        type: "object"
+        type: 'object'
       bus:
-        $ref: "bus"
+        $ref: 'bus'
 
-  "bus:player-left":
-    title: "Player left"
-    $schema: "http://json-schema.org/draft-04/schema#"
-    description: "A player has left"
-    type: "object"
+  'bus:player-left':
+    title: 'Player left'
+    $schema: 'http://json-schema.org/draft-04/schema#'
+    description: 'A player has left'
+    type: 'object'
     properties:
       player:
-        type: "object"
+        type: 'object'
       bus:
-        $ref: "bus"
+        $ref: 'bus'
 
-  "bus:player-states-changed":
-    title: "Player state changes"
-    $schema: "http://json-schema.org/draft-04/schema#"
-    description: "State of the players has changed"
-    type: "object"
+  'bus:player-states-changed':
+    title: 'Player state changes'
+    $schema: 'http://json-schema.org/draft-04/schema#'
+    description: 'State of the players has changed'
+    type: 'object'
     properties:
       player:
-        type: "array"
+        type: 'array'
       bus:
-        $ref: "bus"
+        $ref: 'bus'
diff --git a/app/schemas/subscriptions/editor.coffee b/app/schemas/subscriptions/editor.coffee
index eba61f772..b75649c9e 100644
--- a/app/schemas/subscriptions/editor.coffee
+++ b/app/schemas/subscriptions/editor.coffee
@@ -1,78 +1,78 @@
 module.exports =
-  "save-new-version":
-    title: "Save New Version"
-    $schema: "http://json-schema.org/draft-04/schema#"
-    description: "Published when a version gets saved"
-    type: "object"
+  'save-new-version':
+    title: 'Save New Version'
+    $schema: 'http://json-schema.org/draft-04/schema#'
+    description: 'Published when a version gets saved'
+    type: 'object'
     properties:
       major:
-        type: "boolean"
+        type: 'boolean'
       commitMessage:
-        type: "string"
-    required: ["major", "commitMessage"]
+        type: 'string'
+    required: ['major', 'commitMessage']
     additionalProperties: false
 
   # TODO all these events starting with 'level:' should have 'editor' in their name
   # to avoid confusion with level play events
 
-  "level:view-switched":
-    title: "Level View Switched"
-    $schema: "http://json-schema.org/draft-04/schema#"
-    description: "Published whenever the view switches"
-    $ref: "jQueryEvent"
+  'level:view-switched':
+    title: 'Level View Switched'
+    $schema: 'http://json-schema.org/draft-04/schema#'
+    description: 'Published whenever the view switches'
+    $ref: 'jQueryEvent'
 
-  "level-components-changed":
+  'level-components-changed':
     {} # TODO schema
 
-  "edit-level-component":
+  'edit-level-component':
     {} # TODO schema
 
-  "level-component-edited":
+  'level-component-edited':
     {} # TODO schema
 
-  "level-component-editing-ended":
+  'level-component-editing-ended':
     {} # TODO schema
 
-  "level-systems-changed":
+  'level-systems-changed':
     {} # TODO schema
 
-  "edit-level-system":
+  'edit-level-system':
     {} # TODO schema
 
-  "level-system-added":
+  'level-system-added':
     {} # TODO schema
 
-  "level-system-edited":
+  'level-system-edited':
     {} # TODO schema
 
-  "level-system-editing-ended":
+  'level-system-editing-ended':
     {} # TODO schema
 
-  "level-thangs-changed":
-    title: "Level Thangs Changed"
-    $schema: "http://json-schema.org/draft-04/schema#"
-    description: "Published when a Thang changes"
-    type: "object"
+  'level-thangs-changed':
+    title: 'Level Thangs Changed'
+    $schema: 'http://json-schema.org/draft-04/schema#'
+    description: 'Published when a Thang changes'
+    type: 'object'
     properties:
       thangsData:
-        type: "array"
-    required: ["thangsData"]
+        type: 'array'
+    required: ['thangsData']
     additionalProperties: false
 
-  "edit-level-thang":
+  'edit-level-thang':
     {} # TODO schema
 
-  "level-thang-edited":
+  'level-thang-edited':
     {} # TODO schema
 
-  "level-thang-done-editing":
+  'level-thang-done-editing':
     {} # TODO schema
 
-  "level-loaded":
+  'level-loaded':
     {} # TODO schema
 
-  "level-reload-from-data":
+  'level-reload-from-data':
     {} # TODO schema
 
-  "save-new-version":
+  'save-new-version':
     {} # TODO schema
diff --git a/app/schemas/subscriptions/errors.coffee b/app/schemas/subscriptions/errors.coffee
index 4fa0e33ef..598dfc6d9 100644
--- a/app/schemas/subscriptions/errors.coffee
+++ b/app/schemas/subscriptions/errors.coffee
@@ -1,5 +1,4 @@
 module.exports =
   # app/lib/errors
-  "server-error":
+  'server-error':
     {} # TODO schema
-
diff --git a/app/schemas/subscriptions/misc.coffee b/app/schemas/subscriptions/misc.coffee
index 5834aaff8..87ff86cac 100644
--- a/app/schemas/subscriptions/misc.coffee
+++ b/app/schemas/subscriptions/misc.coffee
@@ -1,20 +1,20 @@
 module.exports =
-  "audio-played:loaded":
+  'audio-played:loaded':
     {} # TODO schema
 
   # TODO location is debatable
-  "note-group-started":
+  'note-group-started':
     {} # TODO schema
 
-  "note-group-ended":
+  'note-group-ended':
     {} # TODO schema
 
-  "modal-closed":
+  'modal-closed':
     {} # TODO schema
 
   # TODO I propose prepending 'modal:'
-  "save-new-version":
+  'save-new-version':
     {} # TODO schema
 
-  "router:navigate":
+  'router:navigate':
     {} # TODO schema
diff --git a/app/schemas/subscriptions/play.coffee b/app/schemas/subscriptions/play.coffee
index 04764da5f..cfb9cffd4 100644
--- a/app/schemas/subscriptions/play.coffee
+++ b/app/schemas/subscriptions/play.coffee
@@ -2,157 +2,154 @@ module.exports =
   # TODO There should be a better way to divide these channels into smaller ones
 
   # TODO location is debatable
-  "echo-self-wizard-sprite":
+  'echo-self-wizard-sprite':
     {} # TODO schema
 
-  "level:session-will-save":
+  'level:session-will-save':
     {} # TODO schema
 
-  "level-loader:progress-changed":
+  'level-loader:progress-changed':
     {} # TODO schema
 
-  "level:shift-space-pressed":
+  'level:shift-space-pressed':
     {} # TODO schema
 
-  "level:escape-pressed":
+  'level:escape-pressed':
     {} # TODO schema
 
-  "level-enable-controls":
+  'level-enable-controls':
     {} # TODO schema
 
-  "level-set-letterbox":
+  'level-set-letterbox':
     {} # TODO schema
 
-  "level:started":
+  'level:started':
     {} # TODO schema
 
-  "level-set-debug":
+  'level-set-debug':
     {} # TODO schema
 
-  "level-set-grid":
+  'level-set-grid':
     {} # TODO schema
 
-  "tome:cast-spell":
+  'tome:cast-spell':
     {} # TODO schema
 
-  "level:restarted":
+  'level:restarted':
     {} # TODO schema
 
-  "level-set-volume":
+  'level-set-volume':
     {} # TODO schema
 
-  "level-set-time":
+  'level-set-time':
     {} # TODO schema
 
-  "level-select-sprite":
+  'level-select-sprite':
     {} # TODO schema
 
-  "level-set-playing":
+  'level-set-playing':
     {} # TODO schema
 
-  "level:team-set":
+  'level:team-set':
     {} # TODO schema
 
-  "level:docs-shown": {}
+  'level:docs-shown': {}
 
-  "level:docs-hidden": {}
+  'level:docs-hidden': {}
 
-  "level:victory-hidden":
+  'level:victory-hidden':
     {} # TODO schema
 
-  "next-game-pressed":
+  'next-game-pressed':
     {} # TODO schema
 
-  "focus-editor":
+  'end-current-script':
     {} # TODO schema
 
-  "end-current-script":
+  'script:reset':
     {} # TODO schema
 
-  "script:reset":
+  'script:ended':
     {} # TODO schema
 
-  "script:ended":
-    {} # TODO schema
+  'end-all-scripts': {}
 
-  "end-all-scripts": {}
-
-  "script:state-changed":
+  'script:state-changed':
     {} # TODO schema
 
   'script-manager:tick':
     type: 'object'
     additionalProperties: false
     properties:
-      scriptRunning: { type: 'string' }
-      noteGroupRunning: { type: 'string' }
-      timeSinceLastScriptEnded: { type: 'number' }
-      scriptStates: 
+      scriptRunning: {type: 'string'}
+      noteGroupRunning: {type: 'string'}
+      timeSinceLastScriptEnded: {type: 'number'}
+      scriptStates:
         type: 'object'
         additionalProperties:
           title: 'Script State'
           type: 'object'
           additionalProperties: false
           properties:
-            timeSinceLastEnded: 
+            timeSinceLastEnded:
               type: 'number'
               description: 'seconds since this script ended last'
             timeSinceLastTriggered:
               type: 'number'
               description: 'seconds since this script was triggered last'
 
-  "play-sound":
+  'play-sound':
     {} # TODO schema
 
   # TODO refactor name
-  "onLoadingViewUnveiled":
+  'onLoadingViewUnveiled':
     {} # TODO schema
 
-  "playback:manually-scrubbed":
+  'playback:manually-scrubbed':
     {} # TODO schema
 
-  "change:editor-config":
+  'change:editor-config':
     {} # TODO schema
 
-  "restart-level":
+  'restart-level':
     {} # TODO schema
 
-  "play-next-level":
+  'play-next-level':
     {} # TODO schema
 
-  "level-select-sprite":
+  'level-select-sprite':
     {} # TODO schema
 
-  "level-toggle-grid":
+  'level-toggle-grid':
     {} # TODO schema
 
-  "level-toggle-debug":
+  'level-toggle-debug':
     {} # TODO schema
 
-  "level-toggle-pathfinding":
+  'level-toggle-pathfinding':
     {} # TODO schema
 
-  "level-scrub-forward":
+  'level-scrub-forward':
     {} # TODO schema
 
-  "level-scrub-back":
+  'level-scrub-back':
     {} # TODO schema
 
-  "level-show-victory":
+  'level-show-victory':
     type: 'object'
     additionalProperties: false
     properties:
-      showModal: { type: 'boolean' }
-      
-  "level-highlight-dom":
+      showModal: {type: 'boolean'}
+
+  'level-highlight-dom':
     type: 'object'
     additionalProperties: false
     properties:
-      selector: { type: 'string' }
-      delay: { type: 'number' }
-      sides: { type: 'array', items: { 'enum': ['left', 'right', 'top', 'bottom'] }}
-      offset: { type: 'object' }
-      rotation: { type: 'number' }
+      selector: {type: 'string'}
+      delay: {type: 'number'}
+      sides: {type: 'array', items: {'enum': ['left', 'right', 'top', 'bottom']}}
+      offset: {type: 'object'}
+      rotation: {type: 'number'}
 
-  "goal-manager:new-goal-states":
+  'goal-manager:new-goal-states':
     {} # TODO schema
diff --git a/app/schemas/subscriptions/surface.coffee b/app/schemas/subscriptions/surface.coffee
index 6fa5f2415..0c7413248 100644
--- a/app/schemas/subscriptions/surface.coffee
+++ b/app/schemas/subscriptions/surface.coffee
@@ -1,96 +1,96 @@
 module.exports =  # /app/lib/surface
-  "camera-dragged":
+  'camera-dragged':
     {} # TODO schema
 
-  "camera-zoom-in":
+  'camera-zoom-in':
     {} # TODO schema
 
-  "camera-zoom-out":
+  'camera-zoom-out':
     {} # TODO schema
 
-  "camera-zoom-to":
+  'camera-zoom-to':
     {} # TODO schema
 
-  "camera:zoom-updated":
+  'camera:zoom-updated':
     {} # TODO schema
 
-  "sprite:speech-updated":
+  'sprite:speech-updated':
     {} # TODO schema
 
-  "dialogue-sound-completed":
+  'dialogue-sound-completed':
     {} # TODO schema
 
-  "surface:gold-changed":
+  'surface:gold-changed':
     {} # TODO schema
 
-  "surface:coordinate-selected":
+  'surface:coordinate-selected':
     {} # TODO schema
 
-  "surface:coordinates-shown":
+  'surface:coordinates-shown':
     {} # TODO schema
 
-  "level-sprite-clear-dialogue":
+  'level-sprite-clear-dialogue':
     {} # TODO schema
 
-  "sprite:loaded":
+  'sprite:loaded':
     {} # TODO schema
 
-  "choose-point":
+  'choose-point':
     {} # TODO schema
 
-  "choose-region":
+  'choose-region':
     {} # TODO schema
 
-  "surface:new-thang-added":
+  'surface:new-thang-added':
     {} # TODO schema
 
-  "surface:sprite-selected":
+  'surface:sprite-selected':
     {} # TODO schema
 
-  "thang-began-talking":
+  'thang-began-talking':
     {} # TODO schema
 
-  "thang-finished-talking":
+  'thang-finished-talking':
     {} # TODO schema
 
-  "surface:world-set-up":
+  'surface:world-set-up':
     {} # TODO schema
 
-  "surface:frame-changed":
+  'surface:frame-changed':
     {} # TODO schema
 
-  "surface:playback-ended":
+  'surface:playback-ended':
     {} # TODO schema
 
-  "surface:playback-restarted":
+  'surface:playback-restarted':
     {} # TODO schema
 
-  "level-set-playing":
+  'level-set-playing':
     {} # TODO schema
 
-  "registrar-echo-states":
+  'registrar-echo-states':
     {} # TODO schema
 
-  "surface:mouse-moved":
+  'surface:mouse-moved':
     {} # TODO schema
 
-  "surface:stage-mouse-down":
+  'surface:stage-mouse-down':
     {} # TODO schema
 
-  "surface:mouse-scrolled":
+  'surface:mouse-scrolled':
     {} # TODO schema
 
-  "surface:ticked":
+  'surface:ticked':
     {} # TODO schema
 
-  "surface:mouse-over":
+  'surface:mouse-over':
     {} # TODO schema
 
-  "surface:mouse-out":
+  'surface:mouse-out':
     {} # TODO schema
 
-  "self-wizard:target-changed":
+  'self-wizard:target-changed':
     {} # TODO schema
 
-  "echo-all-wizard-sprites":
+  'echo-all-wizard-sprites':
     {} # TODO schema
diff --git a/app/schemas/subscriptions/tome.coffee b/app/schemas/subscriptions/tome.coffee
index 7c6a5a11f..f19203d0a 100644
--- a/app/schemas/subscriptions/tome.coffee
+++ b/app/schemas/subscriptions/tome.coffee
@@ -1,73 +1,95 @@
 module.exports =
-  "tome:cast-spell":
+  'tome:cast-spell':
     {} # TODO schema
 
   # TODO do we really need both 'cast-spell' and 'cast-spells'?
-  "tome:cast-spells":
+  'tome:cast-spells':
     {} # TODO schema
 
-  "tome:manual-cast":
+  'tome:manual-cast':
     {} # TODO schema
 
-  "tome:spell-created":
+  'tome:spell-created':
     {} # TODO schema
 
-  "tome:spell-debug-property-hovered":
+  'tome:spell-debug-property-hovered':
     {} # TODO schema
 
-  "tome:toggle-spell-list":
+  'tome:toggle-spell-list':
     {} # TODO schema
 
-  "tome:reload-code":
+  'tome:reload-code':
     {} # TODO schema
 
-  "tome:palette-hovered":
+  'tome:palette-hovered':
     {} # TODO schema
 
-  "tome:palette-pin-toggled":
+  'tome:palette-pin-toggled':
     {} # TODO schema
 
-  "tome:palette-clicked":
+  'tome:palette-clicked':
     {} # TODO schema
 
-  "tome:spell-statement-index-updated":
+  'tome:spell-statement-index-updated':
     {} # TODO schema
 
   # TODO proposition: refactor 'tome' into spell events
-  "spell-beautify":
+  'spell-beautify':
     {} # TODO schema
 
-  "spell-step-forward":
+  'spell-step-forward':
     {} # TODO schema
 
-  "spell-step-backward":
+  'spell-step-backward':
     {} # TODO schema
 
-  "tome:spell-loaded":
+  'tome:spell-loaded':
     {} # TODO schema
 
-  "tome:cast-spell":
+  'tome:cast-spell':
     {} # TODO schema
 
-  "tome:spell-changed":
+  'tome:spell-changed':
     {} # TODO schema
 
-  "tome:editing-ended":
+  'tome:editing-ended':
     {} # TODO schema
 
-  "tome:editing-began":
+  'tome:editing-began':
     {} # TODO schema
 
-  "tome:problems-updated":
+  'tome:problems-updated':
     {} # TODO schema
 
-  "tome:thang-list-entry-popover-shown":
+  'tome:thang-list-entry-popover-shown':
     {} # TODO schema
 
-  "tome:spell-shown":
+  'tome:spell-shown':
     {} # TODO schema
 
-  # TODO proposition: add tome to name
-  "focus-editor":
+  'tome:focus-editor':
     {} # TODO schema
 
+  'tome:change-language':
+    title: 'Tome Change Language'
+    $schema: 'http://json-schema.org/draft-04/schema#'
+    description: 'Published when the Tome should update its programming language.'
+    type: 'object'
+    additionalProperties: false
+    properties:
+      language:
+        type: 'string'
+    required: ['language']
+
+  'tome:spell-changed-language':
+    title: 'Spell Changed Language'
+    $schema: 'http://json-schema.org/draft-04/schema#'
+    description: 'Published when an individual spell has updated its code language.'
+    type: 'object'
+    additionalProperties: false
+    properties:
+      spell:
+        type: 'object'
+      language:
+        type: 'string'
+    required: ['spell']
diff --git a/app/schemas/subscriptions/user.coffee b/app/schemas/subscriptions/user.coffee
index 44e713777..b9ae1e4c0 100644
--- a/app/schemas/subscriptions/user.coffee
+++ b/app/schemas/subscriptions/user.coffee
@@ -1,9 +1,9 @@
 module.exports =
-  "me:synced":
+  'me:synced':
     {} # TODO schema
 
-  "user-fetched":
+  'user-fetched':
     {} # TODO schema
 
-  "edit-wizard-settings":
+  'edit-wizard-settings':
     {} # TODO schema
diff --git a/app/schemas/subscriptions/world.coffee b/app/schemas/subscriptions/world.coffee
index d5e953de4..9cb7487f0 100644
--- a/app/schemas/subscriptions/world.coffee
+++ b/app/schemas/subscriptions/world.coffee
@@ -1,15 +1,15 @@
 module.exports =
-  "god:user-code-problem":
+  'god:user-code-problem':
     {} # TODO schema
 
-  "god:infinite-loop":
+  'god:infinite-loop':
     {} # TODO schema
 
-  "god:user-code-problem":
+  'god:user-code-problem':
     {} # TODO schema
 
-  "god:new-world-created":
+  'god:new-world-created':
     {} # TODO schema
 
-  "god:world-load-progress-changed":
-    {} # TODO schema
\ No newline at end of file
+  'god:world-load-progress-changed':
+    {} # TODO schema
diff --git a/app/styles/account/profile.sass b/app/styles/account/profile.sass
index 59807aa1c..05a06f6ee 100644
--- a/app/styles/account/profile.sass
+++ b/app/styles/account/profile.sass
@@ -1,19 +1,53 @@
+@import "app/styles/bootstrap/variables"
+
 #profile-view
+  $sideBackground: rgb(220, 220, 220)
+
   .profile-control-bar
-    background-color: rgb(78, 78, 78)
+    background-color: $sideBackground
     width: 100%
     text-align: center
 
-    button.edit-settings-button
-      margin: 2px
+    .profile-completion-progress
+      width: 100%
+      height: 33px
+      margin-bottom: 0
+      border-radius: 0
+      background-color: darken($sideBackground, 15%)
+  
+      .progress-bar
+        line-height: 33px
+        font-size: 16px
+
+      .progress-text
+        position: absolute
+        width: 100%
+        text-align: center
+        line-height: 33px
+        font-size: 16px
+        color: white
+        text-shadow: 0px 1px 0px black
+  
+    button, a.btn
+      margin: 10px 2px 10px 2px
+      
+      &:disabled
+        border-radius: 0
+        opacity: 1
+
       i
         margin-right: 5px
-    
-  .approved, .not-approved
-    display: none
+      
+    .linked-in-button
+      cursor: default
 
+    .sample-profile
+      position: absolute
+      right: 5px
+  
   .main-content-area
     padding: 0
+    background-color: white
 
     .flat-button
       width: 100%
@@ -41,7 +75,7 @@
         font-family: "Helvetica Neue", Helvetica, Arial, sans-serif
         color: #555
 
-      ul.links, ul.projects
+      ul.links, ul.projects, ul.sessions
         margin: 0
         padding: 0
     
@@ -68,20 +102,20 @@
         .left-column
           width: $side-width - 2 * $side-padding
           padding: $side-padding
-          background-color: rgb(220, 220, 220)
+          background-color: $sideBackground
 
           .sub-column
             width: $side-width - 2 * $side-padding
             overflow-wrap: break-word
 
-          .profile-photo-container
+          #profile-photo-container
             position: relative
             margin-bottom: 10px
 
             img.profile-photo
               width: $side-width - 2 * $side-padding
               border-radius: 6px
-                
+
             .profile-caption
               background-color: rgba(0, 0, 0, 0.5)
               color: white
@@ -106,7 +140,7 @@
             background-color: rgb(177, 55, 25)
             padding: 15px
             font-size: 20px
-      
+
         .middle-column
           width: $middle-width - 2 * $middle-padding
           padding-left: $middle-padding
@@ -128,7 +162,7 @@
               overflow-wrap: break-word
 
           code
-            background-color: rgb(220, 220, 220)
+            background-color: $sideBackground
             color: #555
             margin: 2px 0
             display: inline-block
@@ -159,9 +193,14 @@
             width: 100%
             height: 100px
 
+          #remark-treema
+            background-color: white
+            border: 0
+            padding-top: 0
+
         .right-column
           width: $side-width
-          background-color: rgb(220, 220, 220)
+          background-color: $sideBackground
 
           .sub-column
             width: $side-width - 2 * $side-padding
@@ -176,7 +215,7 @@
             li
               margin-bottom: 10px
               padding: 5px 3px
-              border: 2px solid rgb(220, 220, 220)
+              border: 2px solid $sideBackground
               transition: .5s ease-in-out
               position: relative
               background-color: white
@@ -196,25 +235,106 @@
                 left: 0
                 z-index: 1
         
-              .project-image
-                width: 230px
-                height: 115px
-                background-size: cover
-                background-repeat: no-repeat
-                background-position: center
+          .project-image
+            width: 230px
+            height: 115px
+            background-size: cover
+            background-repeat: no-repeat
+            background-position: center
 
-                -webkit-filter: grayscale(100%)
-                -webkit-transition: .5s ease-in-out
-                -moz-filter: grayscale(100%) 
-                -moz-transition: .5s ease-in-out
-                -o-filter: grayscale(100%) 
-                -o-transition: .5s ease-in-out
-                filter: grayscale(100%)
-                transition: .5s ease-in-out
+            -webkit-filter: grayscale(100%)
+            -webkit-transition: .5s ease-in-out
+            -moz-filter: grayscale(100%) 
+            -moz-transition: .5s ease-in-out
+            -o-filter: grayscale(100%) 
+            -o-transition: .5s ease-in-out
+            filter: grayscale(100%)
+            transition: .5s ease-in-out
 
-            li:hover
-              .project-image
-                -webkit-filter: grayscale(0%)
-                -moz-filter: grayscale(0%)
-                -o-filter: grayscale(0%)
-                filter: grayscale(0%)
+          ul.projects li:hover .project-image, .project-image:hover
+            -webkit-filter: grayscale(0%)
+            -moz-filter: grayscale(0%)
+            -o-filter: grayscale(0%)
+            filter: grayscale(0%)
+
+  .main-content-area
+
+    .job-profile-container
+      .editable-section
+        position: relative
+        transition: box-shadow 0.5s easeInOutQuad
+        min-height: 30px
+
+        &.just-saved
+          box-shadow: 0px 0px 20px 0px #080
+          z-index: 1
+
+        .editable-form
+          display: none
+          background-color: white
+          padding: 5px 5px 5px 5px
+
+          .skill-array-item
+            display: inline-block
+
+            input
+              width: 120px
+              margin: 5px
+
+          .project-image
+            width: 210px
+            height: 105px
+            cursor: pointer
+
+      .editable-icon
+        display: none
+  
+    .job-profile-container.editable-profile
+
+      .full-height-column.deemphasized
+        background-color: $sideBackground
+
+      .saving
+        opacity: 0.75
+  
+      .editable-thinner
+        padding-right: 30px
+                
+      .editable-icon
+        display: block
+        position: absolute
+        right: 5px
+        top: 5px
+        font-size: 20px
+        color: $blue
+        opacity: 0.5
+          
+      .edit-label
+        color: $blue
+        font-weight: 300
+
+      .edit-example-button
+        background-color: transparentize($blue, 0.25)
+
+      .edit-example-text
+        color: $blue
+
+      code.edit-example-tag
+        color: $blue
+      
+      .emphasized
+        outline: 1px solid $green
+
+      .editable-section.deemphasized:not(.just-saved), .our-notes-section.deemphasized
+        opacity: 0.5
+
+      .editable-section:hover
+        cursor: pointer
+        outline: 1px solid $blue
+  
+        .editable-icon
+          opacity: 1.0
+          cursor: pointer
+
+        .editable-form
+          cursor: default
diff --git a/app/styles/base.sass b/app/styles/base.sass
index 3fbc45e24..eae0d473b 100644
--- a/app/styles/base.sass
+++ b/app/styles/base.sass
@@ -1,6 +1,5 @@
 @import "bootstrap/variables"
 @import "bootstrap/mixins"
-@import "bootstrap/variables"
 
 html
   background-color: #2f261d
diff --git a/app/styles/demo.sass b/app/styles/demo.sass
new file mode 100644
index 000000000..dec0fcba3
--- /dev/null
+++ b/app/styles/demo.sass
@@ -0,0 +1,14 @@
+#demo-view
+  margin: 0 20px
+  
+  h2
+    background: #add8e6
+    font-family: Arial, Geneva, sans-serif
+    padding: 20px
+    font-weight: bold
+
+  #demo-wrapper
+    width: 78%
+    
+  #demo-nav
+    width: 20%
diff --git a/app/styles/docs/components.sass b/app/styles/docs/components.sass
new file mode 100644
index 000000000..177b11a39
--- /dev/null
+++ b/app/styles/docs/components.sass
@@ -0,0 +1,2 @@
+#docs-components-view
+  color: saddlebrown
\ No newline at end of file
diff --git a/app/styles/editor/achievement/edit.sass b/app/styles/editor/achievement/edit.sass
new file mode 100644
index 000000000..7177978d3
--- /dev/null
+++ b/app/styles/editor/achievement/edit.sass
@@ -0,0 +1,12 @@
+#editor-achievement-edit-view
+  .treema-root
+    margin: 28px 0px 20px
+
+  button
+    float: right
+    margin-top: 15px
+    margin-left: 10px
+
+  textarea
+    width: 92%
+    height: 300px
diff --git a/app/styles/employers.sass b/app/styles/employers.sass
index 1c7538cf2..c9f519ce8 100644
--- a/app/styles/employers.sass
+++ b/app/styles/employers.sass
@@ -1,6 +1,149 @@
 #employers-view
-  #see-candidates
+
+  button
+    background: #fce232 /* Old browsers */
+    background: -moz-linear-gradient(top, #fce232 0%, #ea8e2b 100%) 
+    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fce232), color-stop(100%,#ea8e2b))
+    background: -webkit-linear-gradient(top, #fce232 0%,#ea8e2b 100%) 
+    background: -o-linear-gradient(top, #fce232 0%,#ea8e2b 100%) 
+    background: -ms-linear-gradient(top, #fce232 0%,#ea8e2b 100%) 
+    background: linear-gradient(to bottom, #fce232 0%,#ea8e2b 100%)
+    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fce232', endColorstr='#ea8e2b',GradientType=0 )
+    vertical-align: text-bottom
+    margin-left: 30px
+    
+  //filter panels
+  #filter
+    margin-bottom: 10px
+    .panel-heading
+      background-color: darkgrey
+    .panel-body
+      background-color: darkgrey
+     
+  #filters
+    .filter_section
+      width: 16%
+      display: inline-block
+      vertical-align: top
+    margin-bottom: 10px
+  .get-started-button
+    vertical-align: text-bottom
+    margin-left: 10px
+  
+  #filter-button, #create-alert-button
+    float: right
+    
+  #login-link, #logout-button
+    float: right
+    color: #333333
+    display: inline-block
+    :visited
+      color: #333333
+  #logout-button:hover
     cursor: pointer
+      
+  #tagline, .hiring-call-to-action
+    width: 100%
+    text-align: center
+    display: inline-block
+    margin-top: 20px
+    h1, h2, h3 
+      display: inline-block
+    button
+      display: inline-block
+  h1, h2, h3, h4
+    font-family: Arial, Helvetica, sans-serif
+    color: #333333
+  #tagline
+    margin-bottom: 20px
+
+  .see-candidates-header
+    margin: 30px
+    text-align: center
+
+    #see-candidates
+      cursor: pointer
+
+  .reasons
+    height: 275px
+    margin-bottom: 25px
+    width: 100%    
+
+    .information_row
+      height: 150px
+      padding-right: 15px
+    
+
+    .reason
+      width: 33%
+      padding-left: 3%
+      height: 150px
+      display: inline-block
+      vertical-align: top
+    .employer_icon
+      width: 125px
+      margin: 0px auto
+      
+    .reason_long
+      width: 50%
+      padding-left: 3%
+      display: inline-block
+      .employer_icon
+        display: inline-block
+        width: 25%
+        max-width: 125px
+        vertical-align: text-bottom
+      .reason_text
+        display: inline-block
+        width: 75%
+  #bottom_row
+    height: auto
+  #candidate-table
+    width: 96%
+    margin-left: 2%
+    margin-right: 2%
+    background-color: #E7E7E7
+    table
+      cursor: pointer
+      width: 96%
+      margin-left: 2%
+      margin-right: 2%
+      margin-bottom: 30px
+      .tag_column
+        width: 25%
+        display: inline-block
+      .location_column
+        display: inline-block
+        width: 25%
+      .education_column
+        display: inline-block
+        width: 25%
+      .work_column
+        display: inline-block
+        width: 25%
+      tr 
+        .candidate-picture
+          width: 50px
+          height: 50px
+          border-radius: 5px
+          overflow: hidden
+          margin-right: 10px
+          
+        .candidate-description
+          width: 100%
+          vertical-align: bottom
+      td
+        margin-bottom: 10px
+        margin-top: 10px
+        padding-bottom: 5px
+        padding-top: 10px
+      .border_row
+        border-bottom: 1px solid #d3d3d3
+        vertical-align: bottom
+        padding-top: 0px
+      
+  #results
+    display: inline-block
   .tablesorter
     //img
     //  display: none
@@ -23,6 +166,9 @@
     tr
       cursor: pointer
 
+    tr.expired
+      opacity: 0.5
+
     code
       background-color: rgb(220, 220, 220)
       color: #555
@@ -36,3 +182,10 @@
       min-width: 50px
     td:nth-child(7) select
       min-width: 100px
+
+#employers-view, #profile-view.viewed-by-employer
+  #outer-content-wrapper, #intermediate-content-wrapper, #inner-content-wrapper
+    background: #B4B4B4
+
+  .main-content-area
+    background-color: #EAEAEA
diff --git a/app/styles/home.sass b/app/styles/home.sass
index 2c49541c7..c58133fb8 100644
--- a/app/styles/home.sass
+++ b/app/styles/home.sass
@@ -32,6 +32,7 @@
     img
       display: block
       margin: 0 auto
+      @include transition(box-shadow .50s ease-in-out)
 
     text-shadow: 2px 2px 5px black
     
@@ -58,14 +59,160 @@
       color: $yellow
       font-size: 90px
       font-family: Bangers
-      @include transition(color .10s linear)
+      @include transition(color .25s ease-in-out)
           
-    &:hover div
+    &:hover div, &.hovered div
       color: lighten($yellow, 20%)
-    &:hover img
+    &:hover img, &.hovered img
       filter: brightness(1.2)
       -webkit-filter: brightness(1.2)
-      box-shadow: 0 0 5px black
+      box-shadow: 0 0 15px black
+
+    .code-language-logo
+      background-color: transparent
+      background-repeat: no-repeat
+      position: absolute
+      right: 35px
+      top: 15px
+      width: 50px
+      height: 50px
+
+      &.inverted
+        filter: invert(100%)
+        -webkit-filter: invert(100%)
+
+  .code-languages
+    margin: 10px 0 30px 0
+
+    &:hover
+      .code-language
+        opacity: 0.6
+
+      .code-language.selected-language:not(:hover)
+        opacity: 0.8
+
+        h2, h3
+          text-shadow: none
+
+        .code-wizard
+          opacity: 0.5
+
+    .code-language
+      cursor: pointer
+      text-align: center
+      position: relative
+      opacity: 0.6
+
+      &:hover
+        opacity: 1
+
+        h2, h3
+          text-shadow: 0px 0px 5px white
+
+        .code-wizard
+          display: block
+          opacity: 1
+
+      &.selected-language
+        opacity: 1
+
+        h2, h3
+          text-shadow: 0px 0px 5px white
+
+        .code-wizard
+          display: block
+
+      .code-wizard
+        position: absolute
+        background: transparent url(/images/pages/home/wizard.png) no-repeat
+        background-size: contain
+        width: 111px
+        height: 97px
+        display: none
+
+      .code-language-beta
+        background: transparent url(/images/pages/home/language_beta_sticker.png) no-repeat
+        background-size: contain
+        width: 100px
+        height: 32px
+        position: absolute
+        right: 20px
+        top: -7px
+
+    .primary-code-languages
+
+      #javascript
+        background: transparent url(/images/pages/home/language_js.png) no-repeat
+        padding-right: 150px
+
+        .code-wizard
+          left: 120px
+
+      #python
+        background: transparent url(/images/pages/home/language_python.png) no-repeat
+        padding-left: 150px
+
+        .code-wizard
+          right: 120px
+
+      .code-language
+        width: 498px
+        height: 153px
+        padding: 30px
+        margin: 0px 0 0 -6px
+
+        .code-wizard
+          top: -65px
+
+        h2
+          margin: 15px 0 5px
+
+    .secondary-code-languages
+      margin-left: -10px
+
+      .col-md-3
+        padding: 0px
+
+      .code-language
+        background: transparent url(/images/pages/home/language_background_small.png) no-repeat
+        width: 250px
+        height: 80px
+        margin: 20px 0 20px 0
+        padding: 20px 20px 20px 70px
+
+        .code-wizard
+          top: -51px
+          left: 89px
+          height: 63px
+
+        .code-language-logo
+          position: absolute
+          left: 15px
+          top: 17px
+          width: 50px
+          height: 50px
+
+        .code-language-beta
+          right: -15px
+          top: -16px
+          height: 24px
+
+        h3
+          margin: 0
+          padding: 0
+
+      #coffeescript .code-language-logo
+        background: transparent url(/images/pages/home/language_logo_coffeescript.png) no-repeat center
+
+      #clojure .code-language-logo
+        background: transparent url(/images/pages/home/language_logo_clojure.png) no-repeat center
+
+      #lua .code-language-logo
+        background: transparent url(/images/pages/home/language_logo_lua.png) no-repeat center
+
+      #io .code-language-logo
+        background: transparent url(/images/pages/home/language_logo_io.png) no-repeat center
+
   
 #multiplayer-launch-modal
   .modal-dialog
diff --git a/app/styles/modal/save_version.sass b/app/styles/modal/save_version.sass
index 66de28a29..af350a53a 100644
--- a/app/styles/modal/save_version.sass
+++ b/app/styles/modal/save_version.sass
@@ -52,4 +52,8 @@
   .checkbox
     margin: 10px 10px 0
     input
-      margin-right: 5px
\ No newline at end of file
+      margin-right: 5px
+      
+  #errors-wrapper
+    margin-top: 20px
+    margin-bottom: 0
\ No newline at end of file
diff --git a/app/styles/notify.sass b/app/styles/notify.sass
new file mode 100644
index 000000000..abf50bb70
--- /dev/null
+++ b/app/styles/notify.sass
@@ -0,0 +1,50 @@
+.notifyjs-achievement-base
+  //background: url("/images/pages/base/notify_mockup.png")
+  background-image: url("/images/pages/base/modal_background.png")
+  background-size: 100% 100%
+  width: 500px
+  height: 200px
+  padding: 35px 35px 15px 15px
+  text-align: center
+  cursor: auto
+
+  .achievement-body
+    .achievement-image
+      img
+        float: left
+        width: 100px
+        height: 100px
+        border-radius: 50%
+        margin: 20px 30px 20px 30px
+        -webkit-box-shadow: 0px 0px 36px 0px white
+        -moz-box-shadow: 0px 0px 36px 0px white
+        box-shadow: 0px 0px 36px 0px white
+
+    .achievement-title
+      font-family: Bangers
+      font-size: 28px
+
+    .achievement-description
+      margin-top: 10px
+      font-size: 16px
+
+    .achievement-progress
+      padding: 15px 0px 0px 0px
+
+      .achievement-message
+        font-family: Bangers
+        font-size: 18px
+        &:empty
+          display: none
+
+      .progress-wrapper
+        .progress-bar-wrapper
+          width: 100%
+        .earned-exp
+          padding-left: 5px
+          font-family: Bangers
+          font-size: 16px
+          float: right
+
+.progress-bar-white
+  background-color: white
diff --git a/app/styles/play/ladder/ladder.sass b/app/styles/play/ladder/ladder.sass
index 51ecbd02e..565db3a94 100644
--- a/app/styles/play/ladder/ladder.sass
+++ b/app/styles/play/ladder/ladder.sass
@@ -101,9 +101,6 @@
     background-image: none
     color: white
     
-  td
-    padding: 1px 2px
-    
   #must-log-in button
     margin-right: 10px
 
@@ -135,6 +132,12 @@
           img
             margin-right: 10px
 
+  #winners
+    .win
+      color: #172
+    .loss
+      color: #712
+
 @media only screen and (max-width: 800px)
   #ladder-view
     #level-column img
diff --git a/app/styles/play/ladder/ladder_tab.sass b/app/styles/play/ladder/ladder_tab.sass
index f722faf18..cdc5025aa 100644
--- a/app/styles/play/ladder/ladder_tab.sass
+++ b/app/styles/play/ladder/ladder_tab.sass
@@ -47,3 +47,6 @@
     position: absolute
     right: 15px
     bottom: -5px
+
+  td
+    padding: 1px 2px
diff --git a/app/styles/play/ladder/my_matches_tab.sass b/app/styles/play/ladder/my_matches_tab.sass
index 66b03d72b..99e01f997 100644
--- a/app/styles/play/ladder/my_matches_tab.sass
+++ b/app/styles/play/ladder/my_matches_tab.sass
@@ -35,4 +35,5 @@
   tr.loss .state-cell
     color: #712
 
-    
+  td
+    padding: 1px 2px
diff --git a/app/styles/play/level/modal/docs.sass b/app/styles/play/level/modal/docs.sass
index 2f833d8ef..f126a182d 100644
--- a/app/styles/play/level/modal/docs.sass
+++ b/app/styles/play/level/modal/docs.sass
@@ -1,5 +1,25 @@
-#docs-modal .modal-dialog
+#docs-modal .modal-dialog, #settings-treema .treema-markdown
   width: 800px
+  
+  .tab-content
+    padding-top: 20px
 
   li:not(.active) a[data-toggle="tab"]
     cursor: pointer
+
+  img
+    display: block
+    margin: 0 auto
+    
+  img + em
+    display: block
+    margin: 0 auto
+    text-align: center
+
+  hr
+    border-color: #5c5c5c
+    width: 80%
+    
+  table
+    width: 80%
+    margin: 20px 10%
\ No newline at end of file
diff --git a/app/styles/play/level/tome/spell_debug.sass b/app/styles/play/level/tome/spell_debug.sass
index e02326b55..976675c2e 100644
--- a/app/styles/play/level/tome/spell_debug.sass
+++ b/app/styles/play/level/tome/spell_debug.sass
@@ -8,4 +8,11 @@
   padding: 10px
   background: transparent url(/images/level/popover_background.png)
   background-size: 100% 100%
+  .progress
+    position: relative
+    span
+      position: absolute
+      display: block
+      color: black
+      width: 100%
       
diff --git a/app/styles/play/level/tome/spell_palette.sass b/app/styles/play/level/tome/spell_palette.sass
index 52ce37658..5e19cc0ce 100644
--- a/app/styles/play/level/tome/spell_palette.sass
+++ b/app/styles/play/level/tome/spell_palette.sass
@@ -60,3 +60,29 @@
     display: inline-block
     margin-right: 3px
     vertical-align: top
+
+  .code-language-logo
+    position: absolute
+    width: 20px
+    height: 20px
+    left: 12px
+    top: 34px
+    z-index: 10
+    background-color: transparent
+    background-repeat: no-repeat
+    background-size: contain
+    cursor: pointer
+
+    &.javascript
+      background-image: url(/images/pages/home/language_logo_javascript.png)
+    &.python
+      background-image: url(/images/pages/home/language_logo_python.png)
+    &.coffeescript
+      background-image: url(/images/pages/home/language_logo_coffeescript.png)
+    &.clojure
+      background-image: url(/images/pages/home/language_logo_clojure.png)
+    &.lua
+      background-image: url(/images/pages/home/language_logo_lua.png)
+    &.io
+      background-image: url(/images/pages/home/language_logo_io.png)
+
diff --git a/app/styles/recruitment_base.sass b/app/styles/recruitment_base.sass
new file mode 100644
index 000000000..06bfe815c
--- /dev/null
+++ b/app/styles/recruitment_base.sass
@@ -0,0 +1,21 @@
+@import "bootstrap/variables"
+@import "bootstrap/mixins"
+@import "base"
+
+#employers-wrapper
+  background-color: #B4B4B4
+  height: 100%
+  #outer-content-wrapper, #intermediate-content-wrapper, #inner-content-wrapper
+    background: #B4B4B4
+
+  .navbar, #top-nav, .content.clearfix
+    background-color: #B4B4B4
+
+  .footer
+    border-top: none
+    background-color: #B4B4B4
+    padding-bottom: 50px
+   
+
+#employer-content-area
+  margin: auto
\ No newline at end of file
diff --git a/app/styles/test.sass b/app/styles/test.sass
new file mode 100644
index 000000000..41655e7b1
--- /dev/null
+++ b/app/styles/test.sass
@@ -0,0 +1,14 @@
+#test-view
+  margin: 0 20px
+  
+  h2
+    background: #add8e6
+    font-family: Arial, Geneva, sans-serif
+    padding: 20px
+    font-weight: bold
+
+  #test-wrapper
+    width: 78%
+    
+  #test-nav
+    width: 20%
\ No newline at end of file
diff --git a/app/templates/account/profile.jade b/app/templates/account/profile.jade
index aedd0d623..de9dcca11 100644
--- a/app/templates/account/profile.jade
+++ b/app/templates/account/profile.jade
@@ -1,130 +1,493 @@
 extends /templates/base
 
 block content
-
-  if myProfile || (me.isAdmin() && user.get('jobProfile'))
+  if allowedToEditJobProfile
     .profile-control-bar
-      if myProfile
-        a(href=user.get('jobProfile') ? "/account/settings#job-profile" : "/account/settings")
-          button.btn.edit-settings-button
-            i.icon-cog
-            span(data-i18n="account_profile.edit_settings") Edit Settings
-      if me.isAdmin() && user.get('jobProfile')
-        button.btn.edit-settings-button#toggle-job-profile-approved
+      if editing
+        .progress.profile-completion-progress
+          .progress-bar.progress-bar-success(style="width: #{100 * progress}%")
+          .progress-text
+      a.btn(href="/account/settings")
+        i.icon-cog
+        span(data-i18n="account_profile.settings") Settings
+      if editing
+        button.btn.btn-success#toggle-editing
+          i.icon-ok
+          span(data-i18n="account_profile.done_editing") Done Editing
+      else
+        button.btn#toggle-editing
           i.icon-cog
-          span(data-i18n='account_profile.approved').approved Approved
-          span(data-i18n='account_profile.not_approved').not-approved Not Approved
-        if user.id != me.id
-          button.btn.edit-settings-button#enter-espionage-mode 007
-  
-  if user.get('jobProfile') && allowedToViewJobProfile
-    - var profile = user.get('jobProfile');
-    .job-profile-container
+          span(data-i18n="account_profile.edit_profile") Edit Profile
+      if linkedInAuthorized && editing
+        button.btn.btn-success#importLinkedIn
+          i.icon-arrow-down
+          span Import LinkedIn
+      else if editing
+        button.btn.linked-in-button
+          script(type="in/Login" id="linkedInAuthButton" data-onAuth="contractCallback")
+      if profile && profile.active
+        button.btn.btn-success#toggle-job-profile-active
+          i.icon-eye-open
+          span(data-i18n="account_profile.active") Looking for interview offers now
+      else
+        button.btn#toggle-job-profile-active
+          i.icon-eye-close
+          span(data-i18n="account_profile.inactive") Not looking for offers right now
+      if profile && (profile.active || me.isAdmin())
+        if profileApproved
+          button.btn.btn-success#toggle-job-profile-approved(disabled=!me.isAdmin())
+            i.icon-eye-open
+            span(data-i18n='account_profile.featured') Featured
+        else if me.isAdmin()
+          button.btn#toggle-job-profile-approved
+            i.icon-eye-close
+            span(data-i18n='account_profile.not_featured') Not Featured
+      if me.isAdmin() && !myProfile
+        button.btn#enter-espionage-mode 007
+      if me.isAdmin()
+        button.btn#open-model-modal Raw
+
+  if profile && allowedToViewJobProfile
+    div(class="job-profile-container" + (editing ? " editable-profile" : ""))
       .job-profile-row
         .left-column.full-height-column
           .sub-column
-            .profile-photo-container
+            #profile-photo-container.editable-section(title="Click to change your photo")
+              .editable-icon.glyphicon.glyphicon-pencil
               img.profile-photo(src=user.getPhotoURL(240, true))
               .profile-caption= profile.jobTitle || 'Software Developer'
-  
-            if profileLinks.length
-              ul.links
-                each link in profileLinks
-                  if link.link && link.name
-                    li(title=profile.name + " on " + link.name, class=link.icon ? "has-icon" : "")
-                      a(href=link.link)
-                        if link.icon
-                          img(src=link.icon.url, alt=link.icon.name)
-                        else
-                          button.btn.btn-large.btn-inverse.flat-button= link.name
-  
-            div= profile.city + ', ' + profile.country
-            div= profile.visa
-            div
-              span(data-i18n="account_profile.looking_for") Looking for:
-              |  #{profile.lookingFor}
-            div
-              span(data-i18n="account_profile.last_updated") Last updated:
-              |  #{moment(profile.updated).fromNow()}
-  
-            button#contact-candidate.btn.btn-large.btn-inverse.flat-button
-              span(data-i18n="account_profile.contact") Contact
-              |  #{profile.name.split(' ')[0]}
+
+            #links-container.editable-section
+              .editable-display(title="Click to add social and personal links")
+                .editable-icon.glyphicon.glyphicon-pencil
+                if profileLinks && profileLinks.length
+                  ul.links.editable-thinner
+                    each link in profileLinks
+                      if link.link && link.name
+                        li(title=profile.name + " on " + link.name, class=link.icon ? "has-icon" : "")
+                          a(href=link.link)
+                            if link.icon
+                              img(src=link.icon.url, alt=link.icon.name)
+                            else
+                              button.btn.btn-large.btn-inverse.flat-button= link.name
+                else if editing
+                  h3.edit-label(data-i18n="account_profile.add_links") Add some links
+                  ul.links
+                    li.has-icon
+                      a(href='http://example.com')
+                        img(src='/images/pages/account/profile/icon_github.png', alt='GitHub')
+                    li.has-icon
+                      a(href='http://example.com')
+                        img(src='/images/pages/account/profile/icon_facebook.png', alt='Facebook')
+                    li.has-icon
+                      a(href='http://example.com')
+                        img(src='/images/pages/account/profile/icon_twitter.png', alt='Twitter')
+                    li.has-icon
+                      a(href='http://example.com/')
+                        img(src='/images/pages/account/profile/icon_linkedin.png', alt='LinkedIn')
+                  button.btn.btn-large.btn-inverse.flat-button.edit-example-button(data-i18n="account_profile.example_blog") Blog
+                  button.btn.btn-large.btn-inverse.flat-button.edit-example-button(data-i18n="account_profile.example_personal_site") Personal Site
+
+              form.editable-form
+                .editable-icon.glyphicon.glyphicon-remove
+                h3(data-i18n="account_profile.links_header") Personal Links
+                p.help-block(data-i18n="account_profile.links_blurb") Link any other sites or profiles you want to highlight, like your GitHub, your LinkedIn, or your blog.
+                .editable-array(data-property='links')
+                  for link, index in (profile.links || []).concat({})
+                    .array-item.link-container.well.well-sm
+                      .form-group
+                        label.control-label(data-i18n="account_profile.links_name") Link Name
+                        input.form-control(type='link-name', maxlength='30', data-schemaformat='link-name', name="root[links][#{index}][name]", value=link.name, data-autocomplete="commonLinkNames", data-autocomplete-min-length=0)
+                        if !index
+                          p.help-block
+                            span(data-i18n="account_profile.links_name_help") What are you linking to?
+                            |  Ex.: 'Personal Website', 'GitHub'
+                      .form-group
+                        label.control-label(data-i18n="account_profile.links_link") Link URL
+                        input.form-control(type='url', pattern='^(ht|f)tp(s?)://[0-9a-zA-Z]([-.w]*[0-9a-zA-Z])*(:(0-9)*)*(/?)([a-zA-Z0-9-‌​.?,\'/\+&%$#_=]*)?$', data-schemaformat='url', name="root[links][#{index}][link]", value=link.link)
+                        if !index
+                          p.help-block Ex.: "https://github.com/nwinter"
+                button.btn.btn-success.btn-block.save-section(data-i18n="common.save") Save
+
+            .editable-section#basic-info-container
+              - var editableDefaults = editing && profile.city == jobProfileSchema.properties.city.default
+              div(class="editable-display" + (editableDefaults ? " edit-example-text" : ""), title="Click to edit your basic info")
+                .editable-icon.glyphicon.glyphicon-pencil
+                if editableDefaults
+                  h3.edit-label(data-i18n="account_profile.basics_header") Update basic info
+                div= profile.city + ', ' + profile.country
+                div= profile.visa
+                div
+                  span(data-i18n="account_profile.looking_for") Looking for:
+                  |  #{profile.lookingFor}
+                div
+                  span(data-i18n="account_profile.last_updated") Last updated:
+                  |  #{moment(profile.updated).fromNow()}
+
+              form.editable-form
+                .editable-icon.glyphicon.glyphicon-remove
+                .form-group
+                  label.control-label(data-i18n="account_profile.basics_active") Open to Offers
+                  select.form-control(name='root[active]')
+                    option(value='1', selected=profile.active, data-i18n="account_profile.active") Looking for interview offers now
+                    option(value='', selected=!profile.active, data-i18n="account_profile.inactive") Not looking for offers right now
+                  p.help-block(data-i18n="account_profile.basics_active_help") Want interview offers right now?
+                .form-group
+                  label.control-label(data-i18n="account_profile.basics_job_title") Desired Job Title
+                  input.form-control(type='text', maxlength='50', name='root[jobTitle]', value=profile.jobTitle)
+                  p.help-block
+                    span(data-i18n="account_profile.basics_job_title_help") What role are you looking for?
+                    |  Ex.: "Full Stack Engineer", "Front-End Developer", "iOS Developer"
+                .form-group
+                  label.control-label(data-i18n="account_profile.basics_city") City
+                  input.form-control(type='city', maxlength='100', data-schemaformat='city', name='root[city]', value=profile.city, data-autocomplete="commonCities", data-autocomplete-min-length=1)
+                  p.help-block
+                    span(data-i18n="account_profile.basics_city_help") City you want to work in (or live in now).
+                    |  Ex.: "San Francisco", "Lubbock, TX"
+                .form-group
+                  label.control-label(data-i18n="account_profile.basics_country") Country
+                  input.form-control(type='country', maxlength='100', data-schemaformat='country', name='root[country]', value=profile.country, data-autocomplete="commonCountries", data-autocomplete-min-length=1)
+                  p.help-block
+                    span(data-i18n="account_profile.basics_country_help") Country you want to work in (or live in now).
+                    |  Ex.: "USA", "France"
+                .form-group
+                  label.control-label(data-i18n="account_profile.basics_visa") US Work Status
+                  select.form-control(name='root[visa]')
+                    option(value='Authorized to work in the US', selected=profile.visa == 'Authorized to work in the US') Authorized to work in the US
+                    option(value='Need visa sponsorship', selected=profile.visa == 'Need visa sponsorship') Need visa sponsorship
+                  p.help-block(data-i18n="account_profile.basics_visa_help") Are you authorized to work in the US, or do you need visa sponsorship?
+                .form-group
+                  label.control-label(data-i18n="account_profile.basics_looking_for") Looking For
+                  select.form-control(name='root[lookingFor]')
+                    option(value='Full-time', selected=profile.lookingFor == "Full-time", data-i18n="account_profile.basics_looking_for_full_time") Full-time
+                    option(value='Part-time', selected=profile.lookingFor == "Part-time", data-i18n="account_profile.basics_looking_for_part_time") Part-time
+                    option(value='Remote', selected=profile.lookingFor == "Remote", data-i18n="account_profile.basics_looking_for_remote") Remote
+                    option(value='Contracting', selected=profile.lookingFor == "Contracting", data-i18n="account_profile.basics_looking_for_contracting") Contracting
+                    option(value='Internship', selected=profile.lookingFor == "Internship", data-i18n="account_profile.basics_looking_for_internship") Internship
+                  p.help-block(data-i18n="account_profile.basics_looking_for_help") What kind of developer position do you want?
+                button.btn.btn-success.btn-block.save-section(data-i18n="common.save") Save
+
+            if !editing && !myProfile
+              button#contact-candidate.btn.btn-large.btn-inverse.flat-button
+                span(data-i18n="account_profile.contact") Contact
+                |  #{profile.name.split(' ')[0]}
+            if me.isAdmin()
+              select#admin-contact.form-control
+                for contact in adminContacts
+                  option(value=contact.id, selected=remark && remark.get('contact') == contact.id)= contact.name
+
+            if !editing && sessions.length
+              h3(data-i18n="account_profile.player_code") Player Code
+              ul.sessions
+                each session in sessions
+                  li
+                    - var sessionLink = "/play/level/" + session.levelID + "?team=" + (session.team || 'humans') + (myProfile ? '' : "&session=" + session._id);
+                    a(href=sessionLink)
+                      span= session.levelName
+                      if session.team
+                        span  #{session.team}
+                    if session.codeLanguage != 'javascript'
+                      span  - #{{coffeescript: 'CoffeeScript', python: 'Python', lua: 'Lua', io: 'Io', clojure: 'Clojure'}[session.codeLanguage]}
 
         .middle-column.full-height-column
           .sub-column
-            h3= profile.name || "Anonymous Developer"
-            if profile.shortDescription
-              p= profile.shortDescription
-  
-            each skill in profile.skills
-              code= skill
-              span  
-            if profile.longDescription
-              div.long-description!= marked(profile.longDescription)
-  
-            if profile.work.length
-              h3.experience-header
-                img.header-icon(src="/images/pages/account/profile/work.png", alt="")
-                span(data-i18n="account_profile.work_experience") Work Experience
-              each job in profile.work
-                if job.role && job.employer
-                  div.experience-entry
-                    div.duration.pull-right= job.duration
-                    | #{job.role} at #{job.employer}
+            #name-container.editable-section
+              .editable-display(title="Click to fill in your name")
+                .editable-icon.glyphicon.glyphicon-pencil
+                if editing && !profile.name
+                  h3.edit-label(data-i18n="account_profile.name_header") Fill in your name
+                else if profile.name
+                  h3= profile.name + (me.isAdmin() ? ' (' + user.get('name') + ')' : '')
+                else
+                  h3
+                    span(data-i18n="account_profile.name_anonymous") Anonymous Developer
+                    if me.isAdmin()
+                      span  (#{user.get('name')})
+
+              form.editable-form
+                .editable-icon.glyphicon.glyphicon-remove
+                .form-group
+                  label.control-label(data-i18n="general.name") Name
+                  input.form-control(type='text', maxlength='100', name='root[name]', value=profile.name)
+                  p.help-block(data-i18n="account_profile.name_help") Name you want employers to see, like 'Nick Winter'.
+                button.btn.btn-success.btn-block.save-section(data-i18n="common.save") Save
+
+
+            #short-description-container.editable-section
+              .editable-display(title="Click to write your tagline")
+                .editable-icon.glyphicon.glyphicon-pencil
+                if editing && (!profile.shortDescription || profile.shortDescription == jobProfileSchema.properties.shortDescription.default)
+                  h3.edit-label(data-i18n="account_profile.short_description_header") Write a short description of yourself
+                  p.edit-example-text(data-i18n="account_profile.short_description_blurb") Add a tagline to help an employer quickly learn more about you.
+
+                else if profile.shortDescription
+                  p.editable-thinner= profile.shortDescription
+
+              form.editable-form
+                .editable-icon.glyphicon.glyphicon-remove
+                .form-group
+                  label.control-label(data-i18n="account_profile.short_description") Tagline
+                  textarea.form-control(rows=3, maxlength='140', name='root[shortDescription]')= profile.shortDescription
+                  p.help-block(data-i18n="account_profile.short_description_help") Who are you, and what are you looking for? 140 characters max.
+                button.btn.btn-success.btn-block.save-section(data-i18n="common.save") Save
+
+
+            #skills-container.editable-section
+              .editable-display.editable-thinner(title="Click to tag your programming skills")
+                .editable-icon.glyphicon.glyphicon-pencil
+                if editing && (!profile.skills || !profile.skills.length || (profile.skills.length == 1 && profile.skills[0] == 'javascript'))
+                  h3.edit-label Tag your programming skills
+                  each skill in ["python", "coffeescript", "node", "ios", "objective-c", "javascript", "app-engine", "mongodb", "web dev", "django", "backbone"]
+                    code.edit-example-tag= skill
+                    span  
+                else
+                  each skill in profile.skills
+                    code= skill
+                    span  
+
+              form.editable-form
+                .editable-icon.glyphicon.glyphicon-remove
+                h3(data-i18n="account_profile.skills_header") Skills
+                p.help-block
+                  span(data-i18n="account_profile.skills_help") Tag relevant developer skills in order of proficiency.
+                  |  Ex.: "objective-c", "mongodb", "rails", "android", "javascript"
+                .editable-array(data-property='skills')
+                  for skill, index in (profile.skills || []).concat('')
+                    .array-item.skill-array-item
+                      input.form-control(type='skill', maxlength='20', pattern='.{1,}', data-schemaformat='skill', name="root[skills][#{index}]", value=skill, data-autocomplete="commonSkills", data-autocomplete-min-length=1)
+                button.btn.btn-success.btn-block.save-section(data-i18n="common.save") Save
+
+
+            #long-description-container.editable-section
+              .editable-display(title="Click to start writing your longer description")
+                .editable-icon.glyphicon.glyphicon-pencil
+                - var modified = profile.longDescription && profile.longDescription != jobProfileSchema.properties.longDescription.default
+                if editing && !modified
+                  h3.edit-label(data-i18n="account_profile.long_description_header") Describe your desired position
+                  p.edit-example-text(data-i18n="account_profile.long_description_blurb") Tell employers how awesome you are and what role you want.
+                else if modified
+                  div.long-description.editable-thinner!= marked(profile.longDescription)
+
+              form.editable-form
+                .editable-icon.glyphicon.glyphicon-remove
+                .form-group
+                  label.control-label(data-i18n="account_profile.long_description") Self Description
+                  textarea.form-control(rows=20, maxlength='600', data-schemaformat='markdown', name='root[longDescription]')= profile.longDescription
+                  p.help-block(data-i18n="account_profile.long_description_help") Describe yourself to potential employers. Keep it short and to the point. We recommend outlining the position that would most interest you. Tasteful markdown okay; 600 characters max.
+                button.btn.btn-success.btn-block.save-section(data-i18n="common.save") Save
+
+            #work-container.editable-section
+              .editable-display(title="Click to add work experience")
+                .editable-icon.glyphicon.glyphicon-pencil
+                if profile.work && profile.work.length
+                  h3.experience-header
+                    img.header-icon(src="/images/pages/account/profile/work.png", alt="")
+                    span(data-i18n="account_profile.work_experience") Work Experience
+                    |  - #{profile.experience}
+                    | 
+                    span(data-i18n=profile.experience == 1 ? "units.year" : "units.years")
+                  each job in profile.work
+                    if job.role && job.employer
+                      div.experience-entry
+                        div.duration.pull-right= job.duration
+                        | #{job.role} at #{job.employer}
+                        .clearfix
+                        if job.description
+                          div!= marked(job.description)
+                else if editing
+                  h3.experience-header.edit-label(data-i18n="account_profile.work_header") Chronicle your work history
+
+                  div.experience-entry.edit-example-text
+                      div.duration.pull-right June, 2012 - present
+                      | UX Designer at Hooli
+                      .clearfix
+                      div Revolutionized CSS, refactored flattening, and designed all the things.
+
+                  div.experience-entry.edit-example-text
+                      div.duration.pull-right 1999 - 2012
+                      | Software Engineer at Initrode
+                      .clearfix
+                      div Built a P2P streaming TPS report fulfillment system.
+
+              form.editable-form
+                .editable-icon.glyphicon.glyphicon-remove
+                h3(data-i18n="account_profile.work_experience") Work Experience
+                .form-group
+                  label.control-label(data-i18n="account_profile.work_years") Years of Experience
+                  input.form-control(type='text', name='root[experience]', value=profile.experience)
+                  p.help-block(data-i18n="account_profile.work_years_help") How many years of professional experience (getting paid) developing software do you have?
+                p(data-i18n="account_profile.work_blurb") List your relevant work experience, most recent first.
+                .editable-array(data-property='work')
+                  for job, index in (profile.work || []).concat({})
+                    .array-item.well.well-sm
+                      .form-group
+                        label.control-label(data-i18n="account_profile.work_employer") Employer
+                        input.form-control(type='text', maxlength='100', name="root[work][#{index}][employer]", value=job.employer)
+                        p.help-block(data-i18n="account_profile.work_employer_help") Name of your employer.
+                      .form-group
+                        label.control-label(data-i18n="account_profile.work_role") Job Title
+                        input.form-control(type='text', maxlength='100', name="root[work][#{index}][role]", value=job.role)
+                        p.help-block(data-i18n="account_profile.work_role_help") What was your job title or role?
+                      .form-group
+                        label.control-label(data-i18n="account_profile.work_duration") Duration
+                        input.form-control(type='text', maxlength='100', name="root[work][#{index}][duration]", value=job.duration)
+                        p.help-block
+                          span(data-i18n="account_profile.work_duration_help") When did you hold this gig?
+                          |  Ex.: "Feb 2013 - present".
+                      .form-group
+                        label.control-label(data-i18n="account_profile.work_description") Description
+                        textarea.form-control(rows=3, maxlength='140', name="root[work][#{index}][description]")= job.description
+                        p.help-block(data-i18n="account_profile.work_description_help") What did you do there? (140 chars; optional)
+                button.btn.btn-success.btn-block.save-section(data-i18n="common.save") Save
+
+
+            #education-container.editable-section
+              .editable-display(title="Click to add academic experience")
+                .editable-icon.glyphicon.glyphicon-pencil
+                if profile.education && profile.education.length
+                  h3.experience-header
+                    img.header-icon(src="/images/pages/account/profile/education.png", alt="")
+                    span(data-i18n="account_profile.education") Education
+                  each school in profile.education
+                    if school.degree && school.school
+                      div.experience-entry
+                        div.duration.pull-right= school.duration
+                        | #{school.degree} at #{school.school}
+                        .clearfix
+                        if school.description
+                          div!= marked(school.description)
+                else if editing
+                  h3.experience-header.edit-label(data-i18n="account_profile.education_header") Recount your academic ordeals
+
+                  div.experience-entry.edit-example-text
+                    div.duration.pull-right 1995 - 1997
+                    | Ph.D. Janitorial Science at MIT
                     .clearfix
-                    if job.description
-                      div!= marked(job.description)
-  
-            if profile.education.length
-              h3.experience-header
-                img.header-icon(src="/images/pages/account/profile/education.png", alt="")
-                span(data-i18n="account_profile.education") Education
-              each school in profile.education
-                if school.degree && school.school
-                  div.experience-entry
-                    div.duration.pull-right= school.duration
-                    | #{school.degree} at #{school.school}
-                    .clearfix
-                    if school.description
-                      div!= marked(school.description)
-  
+                    div Anonymously solved problems in algebraic graph theory. Swept floors.
+
+              form.editable-form
+                .editable-icon.glyphicon.glyphicon-remove
+                h3(data-i18n="accont_profile.education") Education
+                p(data-i18n="account_profile.education_blurb") List your academic ordeals.
+                .editable-array(data-property='education')
+                  for school, index in (profile.education || []).concat({})
+                    .array-item.well.well-sm
+                      .form-group
+                        label.control-label(data-i18n="account_profile.education_school") School
+                        input.form-control(type='text', maxlength='100', name="root[education][#{index}][school]", value=school.school)
+                        p.help-block(data-i18n="account_profile.education_school_help") Name of your school.
+                      .form-group
+                        label.control-label(data-i18n="account_profile.education_degree") Degree
+                        input.form-control(type='text', maxlength='100', name="root[education][#{index}][degree]", value=school.degree)
+                        p.help-block
+                          span(data-i18n="account_profile.education_degree_help") What was your degree and field of study?
+                          |  Ex.: "Ph.D. Human-Computer Interaction (incomplete)"
+                      .form-group
+                        label.control-label(data-i18n="account_profile.education_duration") Dates
+                        input.form-control(type='text', maxlength='100', name="root[education][#{index}][duration]", value=school.duration)
+                        p.help-block
+                          span(data-i18n="account_profile.education_duration_help") When?
+                          |  Ex.: "Aug 2004 - May 2008".
+                      .form-group
+                        label.control-label(data-i18n="account_profile.education_description") Description
+                        textarea.form-control(rows=3, maxlength='140', name="root[education][#{index}][description]")= school.description
+                        p.help-block(data-i18n="account_profile.education_description_help") Highlight anything about this educational experience. (140 chars; optional)
+                button.btn.btn-success.btn-block.save-section(data-i18n="common.save") Save
+
+
             if user.get('jobProfileNotes') || me.isAdmin()
-              h3.experience-header(data-i18n="account_profile.our_notes") Our Notes
-              - var notes = user.get('jobProfileNotes') || '';
-              if me.isAdmin()
-                textarea#job-profile-notes!= notes
-                button.btn.btn-primary#save-notes-button Save Notes
-              else
-                div!= marked(notes)
+              div(class="our-notes-section" + (editing ? " deemphasized" : ""))
+                h3.experience-header(data-i18n="account_profile.our_notes") Our Notes
+                - var notes = user.get('jobProfileNotes') || '';
+                if me.isAdmin()
+                  textarea#job-profile-notes!= notes
+                  button.btn.btn-primary#save-notes-button(data-i18n="common.save") Save
+                else
+                  div!= marked(notes)
+
+            if me.isAdmin()
+              h3(data-i18n="account_profile.remarks") Remarks
+              #remark-treema
 
         .right-column.full-height-column
           .sub-column
-            if profile.projects.length
-              h3(data-i18n="account_profile.projects") Projects
-              ul.projects
-                each project in profile.projects
-                  if project.name
-                    li
-                      if project.link && project.link.length && project.link != 'http://example.com'
-                        a(href=project.link)
-                      if project.picture
-                        .project-image(style="background-image: url('/file/" + project.picture + "')")
-                      p= project.name
-                      div!= marked(project.description)
+            #projects-container.editable-section
+              .editable-display(title="Click to add your projects")
+                .editable-icon.glyphicon.glyphicon-pencil
+                if profile.projects && profile.projects.length
+                  h3(data-i18n="account_profile.projects") Projects
+                  ul.projects
+                    each project in profile.projects
+                      if project.name
+                        li
+                          if project.link && project.link.length && project.link != 'http://example.com'
+                            a(href=project.link)
+                          if project.picture
+                            .project-image(style="background-image: url('/file/" + project.picture + "')")
+                          p= project.name
+                          div!= marked(project.description)
+                else if editing
+                  h3.edit-label(data-i18n="account_profile.projects_header") Add 3 projects
+                  ul.projects
+                    li.edit-example-text
+                      .project-image(style="background-image: url('/images/pages/account/profile/sample_project.png')")
+                      p Cog.js
+                      div JS microlibrary to animate fixie bike cogs on ecommerce sites that sell bike hardware.
+                    li.edit-example-text
+                      .project-image(style="background-image: url('/images/pages/account/profile/sample_project.png')")
+                      p Combjoy
+                      div Ember.js project that schedules hair stylists to ride in Ubers with you to comb your hair on your way to work.
+                    li.edit-example-text
+                      .project-image(style="background-image: url('/images/pages/account/profile/sample_project.png')")
+                      p Bass Drop
+                      div Insert a few lines of JS into your site and get a "Drop the bass!" button for your website. Plays techno.
+
+              form.editable-form
+                .editable-icon.glyphicon.glyphicon-remove
+                h3(data-i18n="account_profile.projects_header_2") Projects (Top 3)
+                p(data-i18n="account_profile.projects_blurb") Highlight your projects to amaze employers.
+                for index in [0, 1, 2]
+                  - var project = (profile.projects || [])[index] || {};
+                  .array-item.well.well-sm
+                    .form-group
+                      label.control-label(data-i18n="account_profile.projects_name") Project Name
+                      input.form-control(type='text', maxlength='100', name="root[projects][#{index}][name]", value=project.name)
+                      p.help-block(data-i18n="account_profile.projects_name_help") What was the project called?
+                    .form-group
+                      label.control-label(data-i18n="account_profile.projects_description") Description
+                      textarea.form-control(rows=6, maxlength='400', data-schemaformat='markdown', name="root[projects][#{index}][description]")= project.description
+                      p.help-block(data-i18n="account_profile.projects_description_help") Briefly describe the project.
+                    .form-group
+                      label.control-label(data-i18n="account_profile.projects_picture") Picture
+                      .project-image(style="background-image: url('" + (src=project.picture ? "/file/" + project.picture : "/images/pages/account/profile/sample_project.png") + "')")
+                      input(type="hidden", name="root[projects][#{index}][picture]", value=project.picture)
+                      p.help-block(data-i18n="account_profile.projects_picture_help") Upload a 230x115px or larger image showing off the project.
+                    .form-group
+                      label.control-label(data-i18n="account_profile.projects_link") Link
+                      input.form-control(type='url', pattern='^(ht|f)tp(s?)://[0-9a-zA-Z]([-.w]*[0-9a-zA-Z])*(:(0-9)*)*(/?)([a-zA-Z0-9-‌​.?,\'/\+&%$#_=]*)?$', data-schemaformat='url', name="root[projects][#{index}][link]", value=project.link)
+                      p.help-block(data-i18n="account_profile.projects_link_help") Link to the project.
+                button.btn.btn-success.btn-block.save-section(data-i18n="common.save") Save
+
   else if allowedToViewJobProfile
     .public-profile-container
-      h2 Loading...
-      
-                        
+      h2(data-i18n="common.loading") Loading...
+
+  else if user
+    .public-profile-container
+      h2
+        span(data-i18n="account_profile.profile_for_prefix") Profile for 
+        span= user.get('name') || "Anonymous Wizard"
+        span(data-i18n="account_profile.profile_for_suffix")  
+
+      img.profile-photo(src=user.getPhotoURL(256))
+
+      p To see a private user profile, you may need to log in.
+
   else
     .public-profile-container
-      h2 
+      h2
         span(data-i18n="account_profile.profile_for_prefix") Profile for 
-        span= user.get('name')
+        span= userID
         span(data-i18n="account_profile.profile_for_suffix") 
-  
-      img.profile-photo(src=user.getPhotoURL(256))
-  
-      h2 TODO
-      p Public user profiles are not ready yet. If you are seeing this, we probably have a bug leading to a broken link.
\ No newline at end of file
+        |  
+        span(data-i18n="loading_error.not_found")
diff --git a/app/templates/achievement_notify.jade b/app/templates/achievement_notify.jade
new file mode 100644
index 000000000..f7ce0eb9b
--- /dev/null
+++ b/app/templates/achievement_notify.jade
@@ -0,0 +1,12 @@
+div
+  .clearfix.achievement-body
+    .achievement-image(data-notify-html="image")
+    .achievement-content
+      .achievement-title(data-notify-html="title")
+      .achievement-description(data-notify-html="description")
+
+      .achievement-progress
+        .achievement-message(data-notify-html="message")
+        .progress-wrapper
+          .earned-exp(data-notify-html="earnedExp")
+          .progress-bar-wrapper(data-notify-html="progressBar")
diff --git a/app/templates/admin.jade b/app/templates/admin.jade
index 229f51607..11ee67ee8 100644
--- a/app/templates/admin.jade
+++ b/app/templates/admin.jade
@@ -23,6 +23,8 @@ block content
       a(href="/admin/users", data-i18n="admin.av_entities_users_url") Users
     li
       a(href="/admin/level_sessions", data-i18n="admin.av_entities_active_instances_url") Active Instances
+    li
+      a(href="/admin/employer_list", data-i18n="admin.av_entities_employer_list_url") Employer List
         
   h4(data-i18n="admin.av_other_sub_title") Other
 
@@ -31,3 +33,11 @@ block content
       a(href="/admin/base", data-i18n="admin.av_other_debug_base_url") Base (for debugging base.jade)
     li
       a(href="/admin/clas", data-i18n="admin.clas") CLAs
+
+  hr
+
+  h3 Achievements
+  p This is just some stuff for temporary achievement testing. Should be replaced by a demo system.
+
+  input#increment-field(type="text")
+  a.btn.btn-secondary#increment-button(href="#") Increment
diff --git a/app/templates/admin/employer_list.jade b/app/templates/admin/employer_list.jade
new file mode 100644
index 000000000..f61e5ba1c
--- /dev/null
+++ b/app/templates/admin/employer_list.jade
@@ -0,0 +1,70 @@
+extends /templates/base
+
+block content
+
+  if !me.isAdmin()
+    h1 Admin Only
+  else
+    h1(data-i18n="admin.av_entities_employer_list_url") Employer List
+  
+    p
+      | We currently have 
+      if employers.length
+        | #{employers.length}
+      else
+        | ...
+      |  employers in the system.
+  
+    if employers.length
+      table.table.table-condensed.table-hover.table-responsive.tablesorter
+        thead
+          tr
+            th(data-i18n="general.name") Name
+            th Company
+            th(data-i18n="general.email") Email
+            th Logins
+            th Candidates Viewed
+            th Candidates Contacted
+            th Signed Up
+    
+        tbody
+          for employer, index in employers
+            - var activity = employer.get('activity') || {};
+            - var hasLinkedIn = typeof employer.get('signedEmployerAgreement') !== "undefined";
+            - var emptyDate = {date: Date.now()};
+            - var linkedIn = hasLinkedIn ? employer.get('signedEmployerAgreement').data : emptyDate;
+            tr(data-employer-id=employer.id)
+              td
+                img(src=employer.getPhotoURL(50), height=50)
+                p
+                  if employer.get('firstName')
+                    span= employer.get('firstName') + ' ' + employer.get('lastName')
+                    if employer.get('name')
+                      |  - 
+                  else if linkedIn.firstName
+                    span= linkedIn.firstName + ' ' + linkedIn.lastName
+                    if employer.get('name')
+                      |  - 
+                  if employer.get('name')
+                    span= employer.get('name')
+                  if !employer.get('firstName') && !linkedIn.firstName && !employer.get('name')
+                    | Anoner
+              td
+                if employer.get('signedEmployerAgreement')
+                  a(href=employer.get('signedEmployerAgreement').data.publicProfileUrl)= employer.get('employerAt')
+                else
+                  | Unknown
+              td= employer.get('email')
+              for a in ['login', 'view_candidate', 'contact_candidate']
+                - var act = activity[a];
+                if act
+                  td
+                    strong= act.count
+                    |  
+                    br
+                    span= moment(act.first).fromNow()
+                    br
+                    span= moment(act.last).fromNow()
+                else
+                  td 0
+              td(data-employer-age=(new Date() - new Date(linkedIn.date)) / 86400 / 1000)= moment(employer.get('signedEmployerAgreement') ? employer.get('signedEmployerAgreement').date : linkedIn.date).fromNow()
diff --git a/app/templates/base.jade b/app/templates/base.jade
index dc5d79286..01a67687c 100644
--- a/app/templates/base.jade
+++ b/app/templates/base.jade
@@ -12,7 +12,7 @@ body
           
           a.navbar-brand(href='/')
             img(src="/images/pages/base/logo.png", title="CodeCombat - Learn how to code by playing a game", alt="CodeCombat")
-        .collapse.navbar-collapse#collapsible-navbar      
+        .collapse.navbar-collapse#collapsible-navbar
           ul.nav.navbar-nav
             li.play
               a.header-font(href='/play', data-i18n="nav.play") Levels
diff --git a/app/templates/community.jade b/app/templates/community.jade
index 3ff8d3444..755e55cf4 100644
--- a/app/templates/community.jade
+++ b/app/templates/community.jade
@@ -79,9 +79,6 @@ block content
           li 
             a(href="/contribute#ambassador", data-i18n="classes.ambassador_title") 
             | : support our community of educators and coders.
-          li 
-            a(href="/contribute#counselor", data-i18n="classes.counselor_title") 
-            | : offer your advice and business acumen to the founders.
 
         | Check out the
         a(href="/contribute", data-i18n="nav.contribute") 
diff --git a/app/templates/contribute/contribute.jade b/app/templates/contribute/contribute.jade
index d9457e6d8..5fdb19698 100644
--- a/app/templates/contribute/contribute.jade
+++ b/app/templates/contribute/contribute.jade
@@ -179,23 +179,4 @@ block content
 
         .contributor-signup(data-contributor-class-id="support", data-contributor-class-name="ambassador")
 
-      #counselor.header-scrolling-fix
-
-        .class_image
-          img.img-responsive(src="/images/pages/contribute/counselor.png", alt="")
-
-        h3.header-scrolling-fix
-          span(data-i18n="classes.counselor_title") Counselor
-          span  
-          span(data-i18n="classes.counselor_title_description") (Expert/Teacher)
-        p(data-i18n="contribute.counselor_summary")
-          | None of the above roles fit what you are interested in? Do not worry, we are on the 
-          | lookout for anybody who wants a hand in the development of CodeCombat! If you are
-          | interested in teaching, game development, open source management, or anything else 
-          | that you think will be relevant to us, then this class is for you.
-    
-        a(href="/contribute/counselor")
-          p.lead(data-i18n="contribute.more_about_counselor")
-            | Learn More About Becoming a Counselor
-
     div.clearfix
\ No newline at end of file
diff --git a/app/templates/contribute/contribute_nav.jade b/app/templates/contribute/contribute_nav.jade
index c7379e975..90b07133e 100644
--- a/app/templates/contribute/contribute_nav.jade
+++ b/app/templates/contribute/contribute_nav.jade
@@ -30,9 +30,4 @@ ul.contribute_class.affix.nav.nav-list.nav-pills#contribute-nav
     a(href=navPrefix + "#ambassador")
       span(data-i18n="classes.ambassador_title") Ambassador
       span  
-      span(data-i18n="classes.ambassador_title_description") (Support)
-  li
-    a(href=navPrefix + "#counselor")
-      span(data-i18n="classes.counselor_title") Counselor
-      span  
-      span(data-i18n="classes.counselor_title_description") (Expert/Teacher)
\ No newline at end of file
+      span(data-i18n="classes.ambassador_title_description") (Support)
\ No newline at end of file
diff --git a/app/templates/contribute/counselor.jade b/app/templates/contribute/counselor.jade
deleted file mode 100644
index 36a79d8cc..000000000
--- a/app/templates/contribute/counselor.jade
+++ /dev/null
@@ -1,49 +0,0 @@
-extends /templates/base
-
-block content
-
-  div.contribute_class
-
-    include /templates/contribute/contribute_nav
-
-    div.class-main#sounselor-main
-      
-      .class_image
-          img.img-responsive(src="/images/pages/contribute/counselor.png", alt="")
-
-      h2
-        span(data-i18n="classes.counselor_title") Counselor
-        span  
-        span(data-i18n="classes.counselor_title_description") (Expert/Teacher)
-      p(data-i18n="contribute.counselor_introduction_1")
-        | Do you have life experience?
-        | A different perspective on things that can help us decide how to shape CodeCombat?
-        | Of all these roles, this will probably take the least time, but
-        | individually you may make the most difference.
-        | We're on the lookout for wisened sages, particularly in areas like: teaching,
-        | game development, open source project management, technical recruiting, entrepreneurship,
-        | or design.
-      
-      p(data-i18n="contribute.counselor_introduction_2")
-        | Or really anything that is relevant to the development of CodeCombat.
-        | If you have knowledge and want to share it to help grow this project, then
-        | this class might be for you.
-  
-      h4(data-i18n="contribute.class_attributes") Class Attributes
-      ul
-        li(data-i18n="contribute.counselor_attribute_1")
-          | Experience, in any of the areas above or something you think might be helpful.
-        li(data-i18n="contribute.counselor_attribute_2")
-          | A little bit of free time!
-  
-      h4(data-i18n="contribute.how_to_join") How to Join 
-      p 
-        a(title='Contact', tabindex=-1, data-toggle="coco-modal", data-target="modal/contact", data-i18n="contribute.contact_us_url")
-          | Contact us
-        span , 
-        span(data-i18n="contribute.counselor_join_desc")
-          | tell us a little about yourself, what you've done and what you'd
-          | be interested in doing. We'll put you in our contact list and be in touch
-          | when we could use advice (not too often).
-
-    div.clearfix
diff --git a/app/templates/demo.jade b/app/templates/demo.jade
new file mode 100644
index 000000000..4c093d0fd
--- /dev/null
+++ b/app/templates/demo.jade
@@ -0,0 +1,22 @@
+h2 Demo Page
+
+ol.breadcrumb
+  for path in parentFolders
+    li
+      a(href=path.url)= path.name
+  li.active= currentFolder
+
+.well.pull-left#demo-wrapper
+  #demo-area
+    
+.nav.nav-pills.nav-stacked.pull-right.well#demo-nav
+  for child in children
+    li(class=child.type)
+      a(href=child.url).small
+        if child.type == 'folder'
+          span.glyphicon.glyphicon-folder-close
+        else
+          span.glyphicon.glyphicon-file
+        span.spl= child.name
+        if child.type == 'folder'
+          strong (#{child.size})
diff --git a/app/templates/docs/components.jade b/app/templates/docs/components.jade
new file mode 100644
index 000000000..20c3afb27
--- /dev/null
+++ b/app/templates/docs/components.jade
@@ -0,0 +1,6 @@
+extends /templates/base
+
+block content
+  ul
+    for component in components
+      li= component.get('name')
\ No newline at end of file
diff --git a/app/templates/editor/achievement/edit.jade b/app/templates/editor/achievement/edit.jade
new file mode 100644
index 000000000..42b59de17
--- /dev/null
+++ b/app/templates/editor/achievement/edit.jade
@@ -0,0 +1,31 @@
+extends /templates/base
+
+block content
+  if me.isAdmin()
+    div
+      ol.breadcrumb
+        li
+          a(href="/editor", data-i18n="editor.main_title") CodeCombat Editors
+        li
+          a(href="/editor/achievement", data-i18n="editor.achievement_title") Achievement Editor
+        li.active
+          | #{achievement.attributes.name}
+
+    button(data-i18n="", disabled=me.isAdmin() === true ? undefined : "true").btn.btn-primary#recalculate-button Recalculate
+    button(data-i18n="common.save", disabled=me.isAdmin() === true ? undefined : "true").btn.btn-primary#save-button Save
+
+    h3(data-i18n="achievement.edit_achievement_title") Edit Achievement
+      span
+        |: "#{achievement.attributes.name}"
+
+    #achievement-treema
+
+    #achievement-view
+
+    hr
+
+    div#error-view
+
+  else
+    .alert.alert-danger
+      span Admin only. Turn around.
diff --git a/app/templates/editor/achievement/table.jade b/app/templates/editor/achievement/table.jade
new file mode 100644
index 000000000..3c390dfb0
--- /dev/null
+++ b/app/templates/editor/achievement/table.jade
@@ -0,0 +1,17 @@
+extends /templates/kinds/table
+
+block tableHeader
+  tr
+    th(data-i18n="general.name") Name
+    th(data-i18n="general.description") Description
+    th(data-i18n="general.collection") Collection
+
+block tableBody
+  for data in documents
+    - data = data.attributes
+    tr
+      td
+        a(href="/editor/achievement/#{data.slug || data._id}")
+          | #{data.name}
+      td #{data.description}
+      td #{data.collection}
diff --git a/app/templates/editor/level/edit.jade b/app/templates/editor/level/edit.jade
index c2dfbac6f..d04b8f4bd 100644
--- a/app/templates/editor/level/edit.jade
+++ b/app/templates/editor/level/edit.jade
@@ -47,9 +47,20 @@ block header
             a
               span.glyphicon-floppy-disk.glyphicon
         
-        li(title="⌃↩ or ⌘↩: Play preview of current level")#play-button
-          a
-            span.glyphicon-play.glyphicon
+        if level.get('type') === 'ladder'
+          li.dropdown
+            a(data-toggle='dropdown')
+              span.glyphicon-play.glyphicon
+            ul.dropdown-menu
+              li.dropdown-header Play As Which Team?
+              li
+                for team in ['humans', 'ogres']
+                  a.play-with-team-button(data-team=team)= team
+        
+        else
+          li(title="⌃↩ or ⌘↩: Play preview of current level")#play-button
+            a
+              span.glyphicon-play.glyphicon
         li.dropdown
           a(data-toggle='dropdown')
             span.glyphicon-chevron-down.glyphicon
diff --git a/app/templates/editor/level/save.jade b/app/templates/editor/level/save.jade
index eccef370a..ae119168a 100644
--- a/app/templates/editor/level/save.jade
+++ b/app/templates/editor/level/save.jade
@@ -53,3 +53,7 @@ block modal-body-content
           label
             input(id=id + "-version-is-major", name="version-is-major", type="checkbox")
             span(data-i18n="versions.new_major_version") New Major Version
+
+  #errors-wrapper.alert.alert-danger.hide
+    strong Validation Error! Save failed.
+    p.errors
\ No newline at end of file
diff --git a/app/templates/editor/patch_modal.jade b/app/templates/editor/patch_modal.jade
index 4d46d8cb5..50549331e 100644
--- a/app/templates/editor/patch_modal.jade
+++ b/app/templates/editor/patch_modal.jade
@@ -7,7 +7,10 @@ block modal-header-content
 block modal-body-content
   .modal-body
     p= patch.get('commitMessage')
-    .changes-stub
+    if deltaWorked
+      .changes-stub
+    else
+      .alert.alert-danger Could not apply this delta to the current version.
 
 
 block modal-footer
diff --git a/app/templates/employers.jade b/app/templates/employers.jade
index dcb6d2cac..243d3998a 100644
--- a/app/templates/employers.jade
+++ b/app/templates/employers.jade
@@ -1,67 +1,176 @@
-extends /templates/base
+extends /templates/recruitment_base
 
 block content
-
-  h1(data-i18n="employers.want_to_hire_our_players") Want to hire expert CodeCombat players?
-
-  p
-    span(data-i18n="employers.candidates_count_prefix") We currently have 
-    if candidates.length
-      | #{candidates.length}
-    else
-      span(data-i18n="employers.candidates_count_many") many
-    |  
-    span(data-i18n="employers.candidates_count_suffix") highly skilled and vetted developers looking for work.
-  if !isEmployer
-    
-    h3
-      a#see-candidates(title='Contact', tabindex=-1, data-toggle="coco-modal", data-target="modal/employer_signup", data-i18n="employers.see_candidates") Click here to see our candidates
-      
+  if me.get('anonymous')
+    a#login-link Login
+    br
+  if !isEmployer && !me.isAdmin()
+    #tagline
+      h1(data-i18n="employers.hire_developers_not_credentials") Hire developers, not credentials.
+      button.btn.get-started-button Get started
+  else
+    if !me.get('anonymous')
+      a#logout-button(data-i18n="login.log_out") Logout
+      br
+    #filter
+      .panel-group#filter_panel
+        a#filter-link(data-toggle="collapse" data-target="#collapseOne")
+          .panel.panel-default
+            .panel-heading
+              h4.panel-title
+               
+                span.glyphicon.glyphicon-folder-open#folder-icon
+                |  Filter
+        .panel-collapse.collapse.in#collapseOne
+          .panel-body
+            form#filters
+              .filter_section#screened_filter
+                h4 Screened
+                input(type="checkbox" name="phoneScreenFilter" value="true")
+                | Phone Screened
+                br
+                input(type="checkbox" name="phoneScreenFilter" value="false")
+                | Not Phone Screened
+              .filter_section#visa_filter
+                h4 Visa
+                input(type="checkbox" name="visa" value="Authorized to work in the US")
+                | US Authorized
+                br
+                input(type="checkbox" name="visa" value="Need visa sponsorship")
+                | Not Authorized
+              .filter_section#school_filter
+                h4 School
+                input(type="checkbox" name="schoolFilter" value="Top 20 Eng.")
+                | Top 20 Eng.
+                br
+                input(type="checkbox" name="schoolFilter" value="Other US")
+                | Other US
+                br
+                input(type="checkbox" name="schoolFilter" value="Other Intl.")
+                | Other Intl.
+              .filter_section#location_filter
+                h4 Location
+                input(type="checkbox" name="locationFilter" value="Bay Area")
+                | Bay Area
+                br
+                input(type="checkbox" name="locationFilter" value="New York")
+                | New York
+                br
+                input(type="checkbox" name="locationFilter" value="Other US")
+                | Other US
+                br
+                input(type="checkbox" name="locationFilter" value="International")
+                | International
+              .filter_section#role_filter
+                h4 Role
+                input(type="checkbox" name="roleFilter" value="Web Developer")
+                | Web Developer
+                br
+                input(type="checkbox" name="roleFilter" value="Software Developer")
+                | Software Developer
+                br
+                input(type="checkbox" name="roleFilter" value="iOS Developer")
+                | iOS Developer
+                br
+                input(type="checkbox" name="roleFilter" value="Android Developer")
+                | Android Developer
+                br
+                input(type="checkbox" name="roleFilter" value="Project Manager")
+                | Project Developer
+              .filter_section#seniority_filter
+                h4 Seniority
+                input(type="checkbox" name="seniorityFilter" value="College Student")
+                | College Student
+                br
+                input(type="checkbox" name="seniorityFilter" value="Recent Grad")
+                | Recent Grad
+                br
+                input(type="checkbox" name="seniorityFilter" value="Junior")
+                | Junior
+                br
+                input(type="checkbox" name="seniorityFilter" value="Senior")
+                | Senior
+                br
+                input(type="checkbox" name="seniorityFilter" value="Management")
+                | Management
+            //input#select_all_checkbox(type="checkbox" name="select_all" checked)
+            //| Select all
+            button.btn#filter-button Filter
+            p#results #{numberOfCandidates} results
+            //button.btn#create-alert-button Create Alert
   if candidates.length
-    table.table.table-condensed.table-hover.table-responsive.tablesorter
-      thead
-        tr
-          th(data-i18n="general.name") Name
-          th(data-i18n="employers.candidate_location") Location
-          th(data-i18n="employers.candidate_looking_for") Looking For
-          th(data-i18n="employers.candidate_role") Role
-          th(data-i18n="employers.candidate_top_skills") Top Skills
-          th(data-i18n="employers.candidate_years_experience") Yrs Exp
-          th(data-i18n="employers.candidate_last_updated") Last Updated
-          if me.isAdmin()
-            th(data-i18n="employers.candidate_approved") Us?
-            th(data-i18n="employers.candidate_active") Them?
-  
-      tbody
-        for candidate, index in candidates
-          - var profile = candidate.get('jobProfile');
-          - var authorized = candidate.id;  // If we have the id, then we are authorized.
-          tr(data-candidate-id=candidate.id, id=candidate.id)
-            td
-              if authorized
-                img(src=candidate.getPhotoURL(50), alt=profile.name, title=profile.name, height=50)
-                p= profile.name
+    #candidate-table
+      table
+        tbody
+          for candidate, index in featuredCandidates
+            - var profile = candidate.get('jobProfile');
+            - var authorized = candidate.id;  // If we have the id, then we are authorized.
+            - var profileAge = (new Date() - new Date(profile.updated)) / 86400 / 1000;
+            - var expired = profileAge > 2 * 30.4;
+            - var curated = profile.curated;
+            
+            tr.candidate-row(data-candidate-id=candidate.id, id=candidate.id, class=expired ? "expired" : "")
+              td(rowspan=2)
+                .candidate-picture
+                  img(src=candidate.getPhotoURL(50), alt=profile.name, title=profile.name, width=50)
+              if curated && curated.shortDescription
+                td.candidate-description #{curated.shortDescription}
               else
-                img(src="/images/pages/contribute/archmage.png", alt="", title="Sign up as an employer to see our candidates", width=50)
-                p Developer ##{index + 1}
-            if profile.country == 'USA'
-              td= profile.city
-            else
-              td= profile.country
-            td= profile.lookingFor
-            td= profile.jobTitle
-            td
-              each skill in profile.skills.slice(0, 10)
-                code= skill
-                span  
-            td= profile.experience
-            td(data-profile-age=(new Date() - new Date(profile.updated)) / 86400 / 1000)= moment(profile.updated).fromNow()
-            if me.isAdmin()
-              if candidate.get('jobProfileApproved')
-                td ✓
+                td.candidate-description #{profile.shortDescription}
+            tr.border_row(data-candidate-id=candidate.id)
+              if curated
+                - var workHistory = curated.workHistory.join(",");
+                td.tag_column
+                  img(src="/images/pages/employer/tag.png")
+                  |  #{curated.mainTag}
+                td.location_column
+                  img(src="/images/pages/employer/location.png")
+                  |  #{curated.location}
+                td.education_column
+                  img(src="/images/pages/employer/education.png")
+                  |  #{curated.education}
+                td.work_column
+                  if workHistory
+                    img(src="/images/pages/employer/briefcase.png")
+                    |  #{workHistory}
               else
-                td ✗
-              if profile.active
-                td ✓
-              else
-                td ✗
\ No newline at end of file
+                td Hi
+
+  if !isEmployer && !me.isAdmin()
+    div#info_wrapper
+      span.hiring-call-to-action
+        h2#start-hiring(data-i18n="employers.start_hiring") Start hiring.
+        button.btn.get-started-button Get started
+      
+      h2#hiring-reasons.hiring-call-to-action(data-i18n="employers.reasons") 3 reasons you should hire through us:
+      .reasons#top_row
+        .reason
+          img.employer_icon(src="/images/pages/employer/employer_icon2.png")
+          h3(data-i18n="employers.everyone_looking") Everyone here is looking for work.
+          p(data-i18n="employers.everyone_looking_blurb") Forget about 20% LinkedIn InMail response rates. Everyone that we list on this site wants to find their next position and will respond to your request for an introduction.
+        .reason
+          img.employer_icon(src="/images/pages/employer/employer_icon6.png")
+          h3(data-i18n="employers.weeding") We've done the weeding for you.
+          //this will break in i18n. Fix the inlining
+          p(data-i18n="employers.weeding_blurb")
+          | Every candidate that has a 
+          span.glyphicon.glyphicon-earphone
+          | icon has already gone through a phone screen with us. We only feature developers that we would work with.
+        .reason
+          img(class="employer_icon" src="/images/pages/employer/employer_icon3.png")
+          h3(data-i18n="employers.pass_screen") They will pass your technical screen.
+          p(data-i18n="employers.pass_screen_blurb") All of these developers have ranked in our programming competitions. One employer found that 5x as many of our devs passed their technical screen than hiring from Hacker News.
+      span.hiring-call-to-action
+        h2(data-i18n="employers.make_hiring_easier") Make my hiring easier, please.
+        button.btn.get-started-button Get started
+      .reasons#bottom_row
+        .reason_long
+          img.employer_icon(src="/images/pages/employer/employer_icon1.png")
+          .reason_text
+            h3(data-i18n="employers.what") What is CodeCombat?
+            p(data-i18n="employers.what_blurb") CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io.
+        .reason_long
+          img.employer_icon(src="/images/pages/employer/employer_icon5.png")
+          .reason_text
+            h3(data-i18n="employers.cost") Who Are the Players?
+            p(data-i18n="employers.cost_blurb") CodeCombateers are CTOs, VPs of Engineering, and graduates of top 20 engineering schools. No junior developers here. Our players enjoy playing with code and solving problems.
diff --git a/app/templates/home.jade b/app/templates/home.jade
index e790d40bf..02775696a 100644
--- a/app/templates/home.jade
+++ b/app/templates/home.jade
@@ -2,31 +2,55 @@ extends /templates/base
 
 block content
 
-  h1#site-slogan(data-i18n="home.slogan") Learn to Code JavaScript by Playing a Game
+  h1#site-slogan(data-i18n="home.slogan") Learn to Code by Playing a Game
 
-  if frontPageContent == 'video'
-    //- if language is Chinese, we use youku, because China can't visit youtube.
-    //- otherwise, we use youtube.
-    if languageName == "zh-HANS"
-      #trailer-wrapper
-        <embed src="http://player.youku.com/player.php/sid/XNjk2Mzg5NjYw/v.swf" style="margin-left:15px; margin-top:8px;"allowFullScreen="true" quality="high" width="920" height="518" wmode="opaque"></embed>
-        img(src="/images/pages/home/video_border.png")
-      #mobile-trailer-wrapper
-        <embed src="http://player.youku.com/player.php/sid/XNjk2Mzg5NjYw/v.swf" style="margin-left:15px; margin-top:8px;"allowFullScreen="true" quality="high" width="280" height="158" wmode="opaque"></embed>
-    else
-      #trailer-wrapper
-        <iframe width="920" height="518" src="//www.youtube.com/embed/1zjaA13k-dA?rel=0&controls=0&modestbranding=1&showinfo=0&iv_load_policy=3&vq=hd720&wmode=transparent" frameborder="0" wmode="opaque" allowfullscreen></iframe>
-        img(src="/images/pages/home/video_border.png")
-      #mobile-trailer-wrapper
-        <iframe src="//www.youtube.com/embed/1zjaA13k-dA" frameborder="0" width="280" height="158"></iframe> 
-    hr
+  .code-languages
+    .primary-code-languages.row
+      .col-md-6
+        .code-language#javascript(data-code-language='javascript')
+          .code-wizard
+          h2 JavaScript
+          p The language of the web. Great for writing websites, web apps, HTML5 games, and servers.
 
-  else if frontPageContent == 'screenshot'
-    #front-screenshot
-      img(src="/images/pages/home/front_screenshot_01.png", alt="")
+      .col-md-6
+        .code-language.beta#python(data-code-language='python')
+          .code-wizard
+          .code-language-beta
+          h2 Python
+          p Simple yet powerful, Python is a great general purpose programming language.
 
-  else if frontPageContent == 'nothing'
-    p &nbsp;
+    .secondary-code-languages.row
+      .col-md-3
+        .code-language.beta#coffeescript(data-code-language='coffeescript')
+          .code-language-logo
+          .code-wizard
+          .code-language-beta
+          h3 CoffeeScript
+          p Nicer JavaScript syntax
+
+      .col-md-3
+        .code-language.beta#clojure(data-code-language='clojure')
+          .code-language-logo
+          .code-wizard
+          .code-language-beta
+          h3 Clojure
+          p A modern Lisp
+
+      .col-md-3
+        .code-language.beta#lua(data-code-language='lua')
+          .code-language-logo
+          .code-wizard
+          .code-language-beta
+          h3 Lua
+          p Game scripting language
+
+      .col-md-3
+        .code-language.beta#io(data-code-language='io', title="Careful: Io is still quite buggy")
+          .code-language-logo
+          .code-wizard
+          .code-language-beta
+          h3 Io
+          p Simple but obscure
 
   .alert.alert-danger.lt-ie10
     strong(data-i18n="home.no_ie") CodeCombat does not run in Internet Explorer 9 or older. Sorry!
@@ -49,6 +73,7 @@ block content
         h3(data-i18n="home.campaign") Campaign
         h4(data-i18n="home.for_beginners") For Beginners
       .play-text(data-i18n="home.play") Play
+      .code-language-logo
 
   a#multiplayer(href="/play/ladder")
     div.game-mode-wrapper
@@ -59,5 +84,6 @@ block content
         h3(data-i18n="home.multiplayer") Multiplayer
         h4(data-i18n="home.for_developers") For Developers
       .play-text(data-i18n="home.play") Play
+      .code-language-logo
 
   .clearfix
diff --git a/app/templates/kinds/search.jade b/app/templates/kinds/search.jade
index 9660027b3..59a9c880c 100644
--- a/app/templates/kinds/search.jade
+++ b/app/templates/kinds/search.jade
@@ -1,38 +1,44 @@
 extends /templates/base
 
 block content
-  div
-    ol.breadcrumb
-      li
-        a(href="/editor", data-i18n="editor.main_title") CodeCombat Editors
-      li.active(data-i18n="#{currentEditor}") 
-        | #{currentEditor}
+  if !unauthorized
+    div
+      ol.breadcrumb
+        li
+          a(href="/editor", data-i18n="editor.main_title") CodeCombat Editors
+        li.active(data-i18n="#{currentEditor}")
+          | #{currentEditor}
+
+    if me.get('anonymous')
+      a.btn.btn-primary.open-modal-button(data-toggle="coco-modal", data-target="modal/auth", role="button", data-i18n="#{currentNewSignup}") Log in to Create a New Content
+    else
+      a.btn.btn-primary.open-modal-button(href='#new-model-modal', role="button", data-toggle="modal", data-i18n="#{currentNew}") Create a New Something
+    input#search(data-i18n="[placeholder]#{currentSearch}")
+    hr
+    div.results
+      table
+
+    // TODO: make this into a ModalView subview
+    div.modal.fade#new-model-modal
+      .modal-dialog
+        .background-wrapper
+          .modal-content
+            .modal-header
+              h3(data-i18n="#{currentNew}") Create New #{modelLabel}
+            .modal-body
+              form.form
+                .form-group
+                  label.control-label(for="name", data-i18n="general.name") Name
+                  input#name.form-control(name="name", type="text")
+            .modal-footer
+              button.btn(data-dismiss="modal", data-i18n="common.cancel") Cancel
+              button.btn.btn-primary.new-model-submit(data-i18n="common.create") Create
+            .modal-body.wait.secret
+              h3(data-i18n="play_level.tip_reticulating") Reticulating Splines...
+              .progress.progress-striped.active
+                .progress-bar
 
-  if me.get('anonymous')
-    a.btn.btn-primary.open-modal-button(data-toggle="coco-modal", data-target="modal/auth", role="button", data-i18n="#{currentNewSignup}") Log in to Create a New Content
   else
-    a.btn.btn-primary.open-modal-button(href='#new-model-modal', role="button", data-toggle="modal", data-i18n="#{currentNew}") Create a New Something
-  input#search(data-i18n="[placeholder]#{currentSearch}")
-  hr
-  div.results
-    table
-
-  // TODO: make this into a ModalView subview
-  div.modal.fade#new-model-modal
-    .modal-dialog
-      .background-wrapper
-        .modal-content
-          .modal-header
-            h3(data-i18n="#{currentNew}") Create New #{modelLabel}
-          .modal-body
-            form.form
-              .form-group
-                label.control-label(for="name", data-i18n="general.name") Name
-                input#name.form-control(name="name", type="text")
-          .modal-footer
-            button.btn(data-dismiss="modal", data-i18n="common.cancel") Cancel
-            button.btn.btn-primary.new-model-submit(data-i18n="common.create") Create
-          .modal-body.wait.secret
-            h3(data-i18n="play_level.tip_reticulating") Reticulating Splines...
-            .progress.progress-striped.active
-              .progress-bar
+    .alert.alert-danger
+      span Admin only. Turn around.
+      // TODO Ruben prettify
diff --git a/app/templates/kinds/table.jade b/app/templates/kinds/table.jade
index 0eb0c1500..6e1653469 100755
--- a/app/templates/kinds/table.jade
+++ b/app/templates/kinds/table.jade
@@ -5,17 +5,19 @@ table.table
         | Results
       span
         |: #{documents.length}
-  
-  tr
-    th(data-i18n="general.name") Name
-    th(data-i18n="general.description") Description
-    th(data-i18n="general.version") Version
-  
-  for data in documents 
-    - data = data.attributes;
+
+  block tableHeader
     tr
-      td
-        a(href="/editor/#{page}/#{data.slug || data._id}")
-          | #{data.name}
-      td.body-row #{data.description}
-      td #{data.version.major}.#{data.version.minor}
\ No newline at end of file
+      th(data-i18n="general.name") Name
+      th(data-i18n="general.description") Description
+      th(data-i18n="general.version") Version
+
+  block tableBody
+    for data in documents
+      - data = data.attributes;
+      tr
+        td
+          a(href="/editor/#{page}/#{data.slug || data._id}")
+            | #{data.name}
+        td.body-row #{data.description}
+        td #{data.version.major}.#{data.version.minor}
\ No newline at end of file
diff --git a/app/templates/modal/confirm.jade b/app/templates/modal/confirm.jade
new file mode 100644
index 000000000..f7d746de4
--- /dev/null
+++ b/app/templates/modal/confirm.jade
@@ -0,0 +1,11 @@
+extends /templates/modal/modal_base
+
+block modal-header-content
+  h3 #{confirmTitle}
+
+block modal-body-content
+  p #{confirmBody}
+
+block modal-footer-content
+  button.btn.btn-secondary#decline-button(type="button", data-dismiss="modal") #{confirmDecline}
+  button.btn.btn-primary#confirm-button(type="button", data-dismiss=closeOnConfirm === true ? "modal" : undefined) #{confirmConfirm}
diff --git a/app/templates/modal/employer_signup_modal.jade b/app/templates/modal/employer_signup_modal.jade
index 0274d0eeb..d6a627ddf 100644
--- a/app/templates/modal/employer_signup_modal.jade
+++ b/app/templates/modal/employer_signup_modal.jade
@@ -10,16 +10,31 @@ block modal-body-content
   if userIsAnonymous
     if userIsAuthorized
       | You appear to be authorized on CodeCombat with LinkedIn. 
+    else if sentMoreInfoEmail
+      | Thanks! You should receive an email from George shortly.
     else
       h4(data-i18n="employer_signup.sub_heading") Let us find your next brilliant developers.
       p Create an account to get started!
-      .form
+      .form#signup-form
         .form-group
           label.control-label(for="signup-email", data-i18n="general.email") Email
           input#signup-email.form-control.input-large(name="email",type="email")
         .form-group
           label.control-label(for="signup-password", data-i18n="general.password") Password              
           input#signup-password.input-large.form-control(name="password", type="password")
+      .modal-footer.linkedin
+        button.btn.btn-primary(id="create-account-button") Create Account
+        br
+        br
+        | Already have a CodeCombat account? 
+        a.login-link(data-toggle="coco-modal", data-target="modal/auth") Log in to continue!
+      h4 Want more information first?
+      p Enter your email and George, our CEO, will contact you shortly.
+      .form
+        .form-group
+          label.control-label(for="more-info-email", data-i18n="general.email") Email
+          input#more-info-email.form-control.input-large(name="more-info-email",type="email")
+      button.btn.btn-primary(id="more-info-button") Send me more information!
   else if !userIsAuthorized
     .modal-footer.linkedin
       p Please sign into your LinkedIn account to verify your identity.
@@ -34,7 +49,7 @@ block modal-body-content
     br
     br
     b Placement fee: 
-    | If you hire our any of our players, you agree to pay us 15% of the candidate's first year annualized starting base salary. The fee is due on the first day that the candidate is employed and is 100% refundable for up to 90 day if the candidate doesn't remain employed at the company for any reason.
+    | If you hire any of our players, you agree to pay us 15% of the candidate's first year annualized starting base salary. The fee is due on the first day that the candidate is employed and is 100% refundable for up to 90 day if the candidate doesn't remain employed at the company for any reason.
     br
     br
     b Interns are free: 
@@ -44,14 +59,7 @@ block modal-body-content
     | By clicking Agree, you are agreeing to CodeCombat's Placement Agreement on behalf of your company. You also consent to CodeCombat storing basic LinkedIn profile data for verification purposes, including your name, email, public profile URL, and work history.
 block modal-footer
   if userIsAnonymous   
-    if !userIsAuthorized
-      .modal-footer.linkedin
-        button.btn.btn-primary(id="create-account-button") Create Account
-        br
-        br
-        | Already have a CodeCombat account? 
-        a.login-link(data-toggle="coco-modal", data-target="modal/auth") Log in to continue!
-    else
+    if userIsAuthorized
       .modal-footer.linkedin
         a.login-link(data-toggle="coco-modal", data-target="modal/auth") Please log in to continue.
   else if !userIsAnonymous && !userIsAuthorized
@@ -61,4 +69,4 @@ block modal-footer
       button.btn.btn-primary(id="contract-agreement-button") I agree
   else
     .modal-footer.linkedin
-       | Thanks! You've already agreed to the contract.
\ No newline at end of file
+       | Thanks! You've already agreed to the contract.
diff --git a/app/templates/modal/modal_base.jade b/app/templates/modal/modal_base.jade
index e2c2d527f..c8374033e 100644
--- a/app/templates/modal/modal_base.jade
+++ b/app/templates/modal/modal_base.jade
@@ -24,4 +24,4 @@
       block modal-footer
         .modal-footer
           block modal-footer-content
-            button.btn.btn-primary(type="button", data-dismiss="modal", aria-hidden="true", data-i18n="modal.okay") Okay
\ No newline at end of file
+            button.btn.btn-primary(type="button", data-dismiss="modal", aria-hidden="true", data-i18n="modal.okay") Okay
diff --git a/app/templates/modal/model.jade b/app/templates/modal/model.jade
index 4fae4c294..404dfb571 100644
--- a/app/templates/modal/model.jade
+++ b/app/templates/modal/model.jade
@@ -4,6 +4,8 @@ block modal-header
 
 block modal-body-content
   for model in models
-    h3= model.type() + ': ' + model.id
-    .model-treema(data-model-id=model.id)
+    .model-container(data-model-id=model.id)
+      h3= model.type() + ': ' + model.id
+      .model-treema(data-model-id=model.id)
+      btn.btn.btn-success.save-model(data-i18n="common.save") Save
     hr
diff --git a/app/templates/modal/versions.jade b/app/templates/modal/versions.jade
index c3818573b..56c9b0f71 100755
--- a/app/templates/modal/versions.jade
+++ b/app/templates/modal/versions.jade
@@ -11,17 +11,17 @@ block modal-body-content
     table.table.table-condensed
       tr
         th
-        th(data-i18n="general.name") Name
-        th(data-i18n="general.version") Version
+        th
+        th
+        th
         th(data-i18n="general.commit_msg") Commit Message
       for data in dataList
         tr
           td
             input(type="checkbox", value=data._id).select
-          td
-            a(href="/editor/#{page}/#{data.slug || data._id}")
-              | #{data.name}
           td #{data.version.major}.#{data.version.minor}
+          td= moment(data.created).format('l')
+          td= data.creator
           td #{data.commitMessage}
 
   div.delta-container
diff --git a/app/templates/play/ladder/ladder.jade b/app/templates/play/ladder/ladder.jade
index c786ed655..3e042df50 100644
--- a/app/templates/play/ladder/ladder.jade
+++ b/app/templates/play/ladder/ladder.jade
@@ -11,13 +11,26 @@ block content
   if level.get('name') == 'Greed'
     .tournament-blurb
       h2
-        span(data-i18n="ladder.tournament_ends") Tournament ends
+        //span(data-i18n="ladder.tournament_ends") Tournament ends
+        span(data-i18n="ladder.tournament_ended") Tournament ended
         |  #{tournamentTimeLeft}
       p
         span(data-i18n="ladder.tournament_blurb") Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details
         |  
         a(href="http://blog.codecombat.com/multiplayer-programming-tournament", data-i18n="ladder.tournament_blurb_blog") on our blog
         | .
+      p
+        strong Tournament ended! 
+        a(href="#winners") Behold the winners
+        | . Thanks for playing! You can 
+        strong still play
+        |  Greed and all of our other 
+        a(href="/play/ladder") multiplayer arenas
+        | .
+      p
+        | Want to commiserate? Head over to 
+        a(href="http://discourse.codecombat.com/") the forum
+        |  and discuss your strategies, your triumphs, and your turmoils.
 
       .sponsor-logos
         a(href="https://heapanalytics.com/")
@@ -59,9 +72,11 @@ block content
         a(href="#simulate", data-toggle="tab", data-i18n="ladder.simulate") Simulate
     if level.get('name') == 'Greed'
       li
-        a(href="#prizes", data-toggle="tab", data-i18n="ladder.prizes") Prizes
+        a(href="#prizes", data-toggle="tab", data-i18n="ladder_prizes.prizes") Prizes
       li
         a(href="#rules", data-toggle="tab", data-i18n="ladder.rules") Rules
+      li
+        a(href="#winners", data-toggle="tab", data-i18n="ladder.winners") Winners
 
   div.tab-content
     .tab-pane.active.well#ladder
@@ -70,628 +85,668 @@ block content
       #my-matches-tab-view
     .tab-pane.well#simulate
       #simulate-tab-view
-    .tab-pane.well#prizes
-      h1(data-i18n="ladder_prizes.title") Tournament Prizes
-      p
-        span(data-i18n="ladder_prizes.blurb_1") These prizes will be awarded according to
-        |  
-        a(href="#rules", data-i18n="ladder_prizes.blurb_2") the tournament rules
-        |  
-        span(data-i18n="ladder_prizes.blurb_3") to the top human and ogre players.
-        |  
-        strong(data-i18n="ladder_prizes.blurb_4") Two teams means double the prizes!
-        |  
-        span(data-i18n="ladder_prizes.blurb_5") (There will be two first place winners, two second-place winners, etc.)
-
-      table#prize_table.table
-        thead
-          tr
-            td(data-i18n="ladder_prizes.rank") Rank
-            td(data-i18n="ladder_prizes.prizes") Prizes
-            td(data-i18n="ladder_prizes.total_value") Total Value
-        tbody
-          tr 
-            td 1st
-            td 
-              ul.list-unstyled
-                li
-                  img(src=base + "cash1.png")
-                  span $512 
-                  span(data-i18n="ladder_prizes.in_cash") in cash
-                li
-                  img(src=base + "custom_wizard.png")
-                  span(data-i18n="ladder_prizes.custom_wizard") Custom CodeCombat Wizard
-                li
-                  img(src=base + "custom_avatar.png")
-                  span(data-i18n="ladder_prizes.custom_avatar") Custom CodeCombat avatar
-                li
-                  img(src=base + "heap.png")
-                  span
-                    a(href="https://heapanalytics.com/") Heap Analytics
-                    |  
-                    span(data-i18n="ladder_prizes.heap") for six months of "Startup" access
-                    |  - $354
-                li
-                  img(src=base + "firebase.png")
-                  span
-                    a(href="https://www.firebase.com/") Firebase
-                    |  
-                    span(data-i18n="ladder_prizes.credits") credits
-                    |  - $300
-                li
-                  img(src=base + "one_month.png")
-                  span
-                    a(href="https://onemonthrails.com/") One Month Rails
-                    |  
-                    span(data-i18n="ladder_prizes.one_month_coupon") coupon: choose either Rails or HTML
-                    |  - $99
-                li
-                  img(src=base + "webstorm.png")
-                  span
-                    a(href="http://www.jetbrains.com/webstorm/") Webstorm
-                    |  
-                    span(data-i18n="ladder_prizes.license") license
-                    |  - $49
-                li
-                  img(src=base + "oreilly.png")
-                  span
-                    a(href="http://shop.oreilly.com/category/ebooks.do") O'Reilly
-                    |  
-                    span(data-i18n="ladder_prizes.oreilly") ebook of your choice
-                    |  - $40
-                li
-                  img(src=base + "aws.png")
-                  span
-                    a(href="http://aws.amazon.com/") Amazon Web Services
-                    |  
-                    span(data-i18n="ladder_prizes.credits") credits
-                    |  - $50
-            td $2054
-          tr 
-            td 2nd
-            td 
-              ul.list-unstyled
-                li
-                  img(src=base + "cash2.png")
-                  span $256 
-                  span(data-i18n="ladder_prizes.in_cash") in cash
-                li
-                  img(src=base + "custom_avatar.png")
-                  span(data-i18n="ladder_prizes.custom_avatar") Custom CodeCombat avatar
-                li
-                  img(src=base + "heap.png")
-                  span
-                    a(href="https://heapanalytics.com/") Heap Analytics
-                    |  
-                    span(data-i18n="ladder_prizes.heap") for six months of "Startup" access
-                    |  - $354
-                li
-                  img(src=base + "firebase.png")
-                  span
-                    a(href="https://www.firebase.com/") Firebase
-                    |  
-                    span(data-i18n="ladder_prizes.credits") credits
-                    |  - $300
-                li
-                  img(src=base + "one_month.png")
-                  span
-                    a(href="https://onemonthrails.com/") One Month Rails
-                    |  
-                    span(data-i18n="ladder_prizes.one_month_discount") discount, 30% off: choose either Rails or HTML
-                    |  - $30
-                li
-                  img(src=base + "webstorm.png")
-                  span
-                    a(href="http://www.jetbrains.com/webstorm/") Webstorm
-                    |  
-                    span(data-i18n="ladder_prizes.license") license
-                    |  - $49
-                li
-                  img(src=base + "oreilly.png")
-                  span
-                    a(href="http://shop.oreilly.com/category/ebooks.do") O'Reilly
-                    |  
-                    span(data-i18n="ladder_prizes.oreilly") ebook of your choice
-                    |  - $40
-                li
-                  img(src=base + "aws.png")
-                  span
-                    a(href="http://aws.amazon.com/") Amazon Web Services
-                    |  
-                    span(data-i18n="ladder_prizes.credits") credits
-                    |  - $50
-            td $1229
-          tr 
-            td 3rd
-            td
-              ul.list-unstyled
-                li
-                  img(src=base + "cash2.png")
-                  span $128 
-                  span(data-i18n="ladder_prizes.in_cash") in cash
-                li
-                  img(src=base + "custom_avatar.png")
-                  span(data-i18n="ladder_prizes.custom_avatar") Custom CodeCombat avatar
-                li
-                  img(src=base + "heap.png")
-                  span
-                    a(href="https://heapanalytics.com/") Heap Analytics
-                    |  
-                    span(data-i18n="ladder_prizes.heap") for six months of "Startup" access
-                    |  - $354
-                li
-                  img(src=base + "firebase.png")
-                  span
-                    a(href="https://www.firebase.com/") Firebase
-                    |  
-                    span(data-i18n="ladder_prizes.credits") credits
-                    |  - $300
-                li
-                  img(src=base + "one_month.png")
-                  span
-                    a(href="https://onemonthrails.com/") One Month Rails
-                    |  
-                    span(data-i18n="ladder_prizes.one_month_discount") discount, 30% off: choose either Rails or HTML
-                    |  - $30
-                li
-                  img(src=base + "webstorm.png")
-                  span
-                    a(href="http://www.jetbrains.com/webstorm/") Webstorm
-                    |  
-                    span(data-i18n="ladder_prizes.license") license
-                    |  - $49
-                li
-                  img(src=base + "oreilly.png")
-                  span
-                    a(href="http://shop.oreilly.com/category/ebooks.do") O'Reilly
-                    |  
-                    span(data-i18n="ladder_prizes.oreilly") ebook of your choice
-                    |  - $40
-                li
-                  img(src=base + "aws.png")
-                  span
-                    a(href="http://aws.amazon.com/") Amazon Web Services
-                    |  
-                    span(data-i18n="ladder_prizes.credits") credits
-                    |  - $50
-            td $1101
-          tr 
-            td 4th
-            td
-              ul.list-unstyled
-                li
-                  img(src=base + "cash3.png")
-                  span $64 
-                  span(data-i18n="ladder_prizes.in_cash") in cash
-                li
-                  img(src=base + "heap.png")
-                  span
-                    a(href="https://heapanalytics.com/") Heap Analytics
-                    |  
-                    span(data-i18n="ladder_prizes.heap") for six months of "Startup" access
-                    |  - $354
-                li
-                  img(src=base + "firebase.png")
-                  span
-                    a(href="https://www.firebase.com/") Firebase
-                    |  
-                    span(data-i18n="ladder_prizes.credits") credits
-                    |  - $300
-                li
-                  img(src=base + "one_month.png")
-                  span
-                    a(href="https://onemonthrails.com/") One Month Rails
-                    |  
-                    span(data-i18n="ladder_prizes.one_month_discount") discount, 30% off: choose either Rails or HTML
-                    |  - $30
-                li
-                  img(src=base + "webstorm.png")
-                  span
-                    a(href="http://www.jetbrains.com/webstorm/") Webstorm
-                    |  
-                    span(data-i18n="ladder_prizes.license") license
-                    |  - $49
-                li
-                  img(src=base + "oreilly.png")
-                  span
-                    a(href="http://shop.oreilly.com/category/ebooks.do") O'Reilly
-                    |  
-                    span(data-i18n="ladder_prizes.oreilly") ebook of your choice
-                    |  - $40
-                li
-                  img(src=base + "aws.png")
-                  span
-                    a(href="http://aws.amazon.com/") Amazon Web Services
-                    |  
-                    span(data-i18n="ladder_prizes.credits") credits
-                    |  - $50
-            td $887
-          tr 
-            td 5th
-            td
-              ul.list-unstyled
-                li
-                  img(src=base + "cash3.png")
-                  span $32 
-                  span(data-i18n="ladder_prizes.in_cash") in cash
-                li
-                  img(src=base + "heap.png")
-                  span
-                    a(href="https://heapanalytics.com/") Heap Analytics
-                    |  
-                    span(data-i18n="ladder_prizes.heap") for six months of "Startup" access
-                    |  - $354
-                li
-                  img(src=base + "firebase.png")
-                  span
-                    a(href="https://www.firebase.com/") Firebase
-                    |  
-                    span(data-i18n="ladder_prizes.credits") credits
-                    |  - $300
-                li
-                  img(src=base + "one_month.png")
-                  span
-                    a(href="https://onemonthrails.com/") One Month Rails
-                    |  
-                    span(data-i18n="ladder_prizes.one_month_discount") discount, 30% off: choose either Rails or HTML
-                    |  - $30
-                li
-                  img(src=base + "webstorm.png")
-                  span
-                    a(href="http://www.jetbrains.com/webstorm/") Webstorm
-                    |  
-                    span(data-i18n="ladder_prizes.license") license
-                    |  - $49
-                li
-                  img(src=base + "oreilly.png")
-                  span
-                    a(href="http://shop.oreilly.com/category/ebooks.do") O'Reilly
-                    |  
-                    span(data-i18n="ladder_prizes.oreilly") ebook of your choice
-                    |  - $40
-                li
-                  img(src=base + "aws.png")
-                  span
-                    a(href="http://aws.amazon.com/") Amazon Web Services
-                    |  
-                    span(data-i18n="ladder_prizes.credits") credits
-                    |  - $50
-            td $855
-          tr 
-            td 6th
-            td
-              ul.list-unstyled
-                li
-                  img(src=base + "cash3.png")
-                  span $16 
-                  span(data-i18n="ladder_prizes.in_cash") in cash
-                li
-                  img(src=base + "firebase.png")
-                  span
-                    a(href="https://www.firebase.com/") Firebase
-                    |  
-                    span(data-i18n="ladder_prizes.credits") credits
-                    |  - $300
-                li
-                  img(src=base + "one_month.png")
-                  span
-                    a(href="https://onemonthrails.com/") One Month Rails
-                    |  
-                    span(data-i18n="ladder_prizes.one_month_discount") discount, 30% off: choose either Rails or HTML
-                    |  - $30
-                li
-                  img(src=base + "webstorm.png")
-                  span
-                    a(href="http://www.jetbrains.com/webstorm/") Webstorm
-                    |  
-                    span(data-i18n="ladder_prizes.license") license
-                    |  - $49
-                li
-                  img(src=base + "oreilly.png")
-                  span
-                    a(href="http://shop.oreilly.com/category/ebooks.do") O'Reilly
-                    |  
-                    span(data-i18n="ladder_prizes.oreilly") ebook of your choice
-                    |  - $40
-                li
-                  img(src=base + "aws.png")
-                  span
-                    a(href="http://aws.amazon.com/") Amazon Web Services
-                    |  
-                    span(data-i18n="ladder_prizes.credits") credits
-                    |  - $50
-            td $485
-          tr 
-            td 7th
-            td
-              ul.list-unstyled
-                li
-                  img(src=base + "cash3.png")
-                  span $8 
-                  span(data-i18n="ladder_prizes.in_cash") in cash
-                li
-                  img(src=base + "firebase.png")
-                  span
-                    a(href="https://www.firebase.com/") Firebase
-                    |  
-                    span(data-i18n="ladder_prizes.credits") credits
-                    |  - $300
-                li
-                  img(src=base + "one_month.png")
-                  span
-                    a(href="https://onemonthrails.com/") One Month Rails
-                    |  
-                    span(data-i18n="ladder_prizes.one_month_discount") discount, 30% off: choose either Rails or HTML
-                    |  - $30
-                li
-                  img(src=base + "webstorm.png")
-                  span
-                    a(href="http://www.jetbrains.com/webstorm/") Webstorm
-                    |  
-                    span(data-i18n="ladder_prizes.license") license
-                    |  - $49
-                li
-                  img(src=base + "oreilly.png")
-                  span
-                    a(href="http://shop.oreilly.com/category/ebooks.do") O'Reilly
-                    |  
-                    span(data-i18n="ladder_prizes.oreilly") ebook of your choice
-                    |  - $40
-                li
-                  img(src=base + "aws.png")
-                  span
-                    a(href="http://aws.amazon.com/") Amazon Web Services
-                    |  
-                    span(data-i18n="ladder_prizes.credits") credits
-                    |  - $50
-            td $477
-          tr 
-            td 8th
-            td
-              ul.list-unstyled
-                li
-                  img(src=base + "cash3.png")
-                  span $4 
-                  span(data-i18n="ladder_prizes.in_cash") in cash
-                li
-                  img(src=base + "firebase.png")
-                  span
-                    a(href="https://www.firebase.com/") Firebase
-                    |  
-                    span(data-i18n="ladder_prizes.credits") credits
-                    |  - $300
-                li
-                  img(src=base + "one_month.png")
-                  span
-                    a(href="https://onemonthrails.com/") One Month Rails
-                    |  
-                    span(data-i18n="ladder_prizes.one_month_discount") discount, 30% off: choose either Rails or HTML
-                    |  - $30
-                li
-                  img(src=base + "webstorm.png")
-                  span
-                    a(href="http://www.jetbrains.com/webstorm/") Webstorm
-                    |  
-                    span(data-i18n="ladder_prizes.license") license
-                    |  - $49
-                li
-                  img(src=base + "oreilly.png")
-                  span
-                    a(href="http://shop.oreilly.com/category/ebooks.do") O'Reilly
-                    |  
-                    span(data-i18n="ladder_prizes.oreilly") ebook of your choice
-                    |  - $40
-                li
-                  img(src=base + "aws.png")
-                  span
-                    a(href="http://aws.amazon.com/") Amazon Web Services
-                    |  
-                    span(data-i18n="ladder_prizes.credits") credits
-                    |  - $50
-            td $473
-          tr 
-            td 9th
-            td
-              ul.list-unstyled
-                li
-                  img(src=base + "cash3.png")
-                  span $2 
-                  span(data-i18n="ladder_prizes.in_cash") in cash
-                li
-                  img(src=base + "firebase.png")
-                  span
-                    a(href="https://www.firebase.com/") Firebase
-                    |  
-                    span(data-i18n="ladder_prizes.credits") credits
-                    |  - $300
-                li
-                  img(src=base + "one_month.png")
-                  span
-                    a(href="https://onemonthrails.com/") One Month Rails
-                    |  
-                    span(data-i18n="ladder_prizes.one_month_discount") discount, 30% off: choose either Rails or HTML
-                    |  - $30
-                li
-                  img(src=base + "webstorm.png")
-                  span
-                    a(href="http://www.jetbrains.com/webstorm/") Webstorm
-                    |  
-                    span(data-i18n="ladder_prizes.license") license
-                    |  - $49
-                li
-                  img(src=base + "oreilly.png")
-                  span
-                    a(href="http://shop.oreilly.com/category/ebooks.do") O'Reilly
-                    |  
-                    span(data-i18n="ladder_prizes.oreilly") ebook of your choice
-                    |  - $40
-                li
-                  img(src=base + "aws.png")
-                  span
-                    a(href="http://aws.amazon.com/") Amazon Web Services
-                    |  
-                    span(data-i18n="ladder_prizes.credits") credits
-                    |  - $50
-            td $471
-          tr 
-            td 10th
-            td
-              ul.list-unstyled
-                li
-                  img(src=base + "cash3.png")
-                  span $1 
-                  span(data-i18n="ladder_prizes.in_cash") in cash
-                li
-                  img(src=base + "firebase.png")
-                  span
-                    a(href="https://www.firebase.com/") Firebase
-                    |  
-                    span(data-i18n="ladder_prizes.credits") credits
-                    |  - $300
-                li
-                  img(src=base + "one_month.png")
-                  span
-                    a(href="https://onemonthrails.com/") One Month Rails
-                    |  
-                    span(data-i18n="ladder_prizes.one_month_discount") discount, 30% off: choose either Rails or HTML
-                    |  - $30
-                li
-                  img(src=base + "webstorm.png")
-                  span
-                    a(href="http://www.jetbrains.com/webstorm/") Webstorm
-                    |  
-                    span(data-i18n="ladder_prizes.license") license
-                    |  - $49
-                li
-                  img(src=base + "oreilly.png")
-                  span
-                    a(href="http://shop.oreilly.com/category/ebooks.do") O'Reilly
-                    |  
-                    span(data-i18n="ladder_prizes.oreilly") ebook of your choice
-                    |  - $40
-                li
-                  img(src=base + "aws.png")
-                  span
-                    a(href="http://aws.amazon.com/") Amazon Web Services
-                    |  
-                    span(data-i18n="ladder_prizes.credits") credits
-                    |  - $50
-            td $470
-          tr 
-            td 11 - 40
-            td
-              ul.list-unstyled
-                li
-                  img(src=base + "webstorm.png")
-                  span
-                    a(href="http://www.jetbrains.com/webstorm/") Webstorm
-                    |  
-                    span(data-i18n="ladder_prizes.license") license
-                    |  - $49
-                li
-                  img(src=base + "oreilly.png")
-                  span
-                    a(href="http://shop.oreilly.com/category/ebooks.do") O'Reilly
-                    |  
-                    span(data-i18n="ladder_prizes.oreilly") ebook of your choice
-                    |  - $40
-                li
-                  img(src=base + "aws.png")
-                  span
-                    a(href="http://aws.amazon.com/") Amazon Web Services
-                    |  
-                    span(data-i18n="ladder_prizes.credits") credits
-                    |  - $50
-            td $139
-          tr 
-            td 41 - 100
-            td
-              ul.list-unstyled
-                li
-                  img(src=base + "oreilly.png")
-                  span
-                    a(href="http://shop.oreilly.com/category/ebooks.do") O'Reilly
-                    |  
-                    span(data-i18n="ladder_prizes.oreilly") ebook of your choice
-                    |  - $40
-                li
-                  img(src=base + "aws.png")
-                  span
-                    a(href="http://aws.amazon.com/") Amazon Web Services
-                    |  
-                    span(data-i18n="ladder_prizes.credits") credits
-                    |  - $50
-            td $90
-          tr 
-            td 101+
-            td
-              ul.list-unstyled
-                li
-                  img(src=base + "aws.png")
-                  span
-                    a(href="http://aws.amazon.com/") Amazon Web Services
-                    |  
-                    span(data-i18n="ladder_prizes.credits") credits
-                    |  - $50
-            td $50
-
-    .tab-pane.well#rules
-      h1(data-i18n="ladder.tournament_rules") Tournament Rules
-      h2 General
-      p You don't have to buy anything to participate in the tournament, and trying to pay us won't increase your odds of winning. Although we don't anticipate the rules changing, they are subject to change.
-
-      h2 Dates and Times
-      p The tournament starts on Tuesday, May 20 at 8:30AM and ends on Tuesday, June 10 at 5:00PM PDT. After the tournament finishes, we will check the games manually to prevent duplicate entries and cheating. We will email all the winners within two weeks of the end date.
-
-      h2 Eligilibity
-      p The tournament is open to anyone over the age of 13. Players are allowed to form teams to compete, but we will only be rewarding submissions, so if a team of 10 wins, they will need to split the prize.
-
-      p The tournament is NOT open to people who live in countries or states that prohibit participating or receiving a prize in a challenge (these include, but are not limited to Brazil, Quebec, Italy, Cuba, Sudan, Iran, North Korea, and Syria). To clarify, people from the aforementioned places are welcome to play the Greed level, but cannot receive prizes. Organizations involved in putting the tournament together (namely CodeCombat and all of our employees) are excluded from participating/winning prizes.
-
-      h2 Submission Requirements
-      p 
-        | To be eligible to win prizes, players must submit their code to the Greed ladder for ranking AND defeat our default AI. Every player that submits their code to the ladder and beats our default AI will receive $50 in AWS credits as described on the 
-        a(href="#prizes", data-i18n="ladder_prizes.tournament_prizes") Tournament Prizes
-        |  page.
-
-      p
-        | There are some restrictions regarding who can use the AWS credits. Please see the additional rules of use on 
-        a(href="https://aws.amazon.com/awscredits") Amazon's AWS credits page.
-
-      h2 Submission Rights
-      p We reserve the right to use your submission and site identity (including username, avatar, and any information you mark as public) to promote the tournament. This is in keeping with our overall site terms of service.
-
-      h2 Judging Criteria
-      p
-        | We will calculate final rankings by running the top games from the public leaderboard from both teams against each other and sorting solutions by wins and losses. The number of games from each side to be used in the final ranking is yet to be determined, but is probably around 150. The final ranking will be performed with a snapshot of solutions taken the end of the contest. The final ranking methedology is subject to change. We will not be evaluating code in any manual way for common traits like adequate documentation, cleanliness, etc. We reserve the right to disqualify any player for any reason. The public leaderboards are a good proxy for your final rank, but are not guaranteed to be accurate. To repeat, 
-        strong the leaderboards are only a preliminary proxy for your final rank
-        | .
-
-      p
-        | Your rank will change as players submit more solutions and more matches are played according to 
-        a(href="https://github.com/codecombat/bayesian-battle") our open-source ranking library, Bayesian Battle
-        | , but our final ranking will use an exhaustive pairwise matching round amongst the top players as described above.
-
-      h2 Prizes
-      p 
-        | Prizes will be awarded to everyone that achieves a rank covered on the 
-        a(href="#prizes", data-i18n="ladder.prizes") Tournament Prizes
-        |  page.
-
-      p Please remember that the player ranks listed on the prize page refer to ranks WITHIN a leaderboard. So if you are the #2 Ogre player, you will win the #2 prize. Similarly, if you are the #3 Human player, you will receive the #3 prize. If you have submissions on both leaderboards, we will only count your highest submission for the purposes of distributing prizes. As a result, your final ranking may be higher than your preliminary ranking due to removing duplicate submissions above you.
-
-      h2 Verifying Potential Winners
-      p We may ask players to identify themselves so that we can detect duplicate entries. This may be done in the form of a Facebook, Google+, or LinkedIn profile, but we may need more information. All players eligible for prizes agree that refusing to provide us with identifying information may lead to ineligibility for prizes. 
-
-      p On a related note, if we have reason to believe that a player has intentionally submitted duplicate entries for the purpose of receiving more prizes or manipulating the leaderboards in any way, we will remove that player and all submissions we believe to be associated with them. We want this to be fair for everyone.
-
-      h2 Prize Distribution
-      p Different sponsors require different ways of claiming their prizes, and we will work with winners to ensure they are able to redeem their prizes in a timely fashion. For cash prizes, we will deliver the money via PayPal. We will not ship checks, money orders, or cash through the mail. We will assume reasonable international money transfer costs to deliver cash prizes through Paypal.
-
-      p Winners are responsible for any taxes associated with claiming their prizes. CodeCombat is not responsible for filing paperwork on behalf of winners for tax claims. 
-
-      h2 Contact
-      p
-        | If you have any questions or would like to get in touch with us for any other reason, we can be reached at team@codecombat.com. You can also post to our public 
-        a(href="http://discourse.codecombat.com/") Discourse forum
-        | .
+    if level.get('name') == 'Greed'
+      .tab-pane.well#prizes
+        h1(data-i18n="ladder_prizes.title") Tournament Prizes
+        p
+          span(data-i18n="ladder_prizes.blurb_1") These prizes will be awarded according to
+          |  
+          a(href="#rules", data-i18n="ladder_prizes.blurb_2") the tournament rules
+          |  
+          span(data-i18n="ladder_prizes.blurb_3") to the top human and ogre players.
+          |  
+          strong(data-i18n="ladder_prizes.blurb_4") Two teams means double the prizes!
+          |  
+          span(data-i18n="ladder_prizes.blurb_5") (There will be two first place winners, two second-place winners, etc.)
+  
+        table#prize_table.table
+          thead
+            tr
+              td(data-i18n="ladder_prizes.rank") Rank
+              td(data-i18n="ladder_prizes.prizes") Prizes
+              td(data-i18n="ladder_prizes.total_value") Total Value
+          tbody
+            tr 
+              td 1st
+              td 
+                ul.list-unstyled
+                  li
+                    img(src=base + "cash1.png")
+                    span $512 
+                    span(data-i18n="ladder_prizes.in_cash") in cash
+                  li
+                    img(src=base + "custom_wizard.png")
+                    span(data-i18n="ladder_prizes.custom_wizard") Custom CodeCombat Wizard
+                  li
+                    img(src=base + "custom_avatar.png")
+                    span(data-i18n="ladder_prizes.custom_avatar") Custom CodeCombat avatar
+                  li
+                    img(src=base + "heap.png")
+                    span
+                      a(href="https://heapanalytics.com/") Heap Analytics
+                      |  
+                      span(data-i18n="ladder_prizes.heap") for six months of "Startup" access
+                      |  - $354
+                  li
+                    img(src=base + "firebase.png")
+                    span
+                      a(href="https://www.firebase.com/") Firebase
+                      |  
+                      span(data-i18n="ladder_prizes.credits") credits
+                      |  - $300
+                  li
+                    img(src=base + "one_month.png")
+                    span
+                      a(href="https://onemonthrails.com/") One Month Rails
+                      |  
+                      span(data-i18n="ladder_prizes.one_month_coupon") coupon: choose either Rails or HTML
+                      |  - $99
+                  li
+                    img(src=base + "webstorm.png")
+                    span
+                      a(href="http://www.jetbrains.com/webstorm/") Webstorm
+                      |  
+                      span(data-i18n="ladder_prizes.license") license
+                      |  - $49
+                  li
+                    img(src=base + "oreilly.png")
+                    span
+                      a(href="http://shop.oreilly.com/category/ebooks.do") O'Reilly
+                      |  
+                      span(data-i18n="ladder_prizes.oreilly") ebook of your choice
+                      |  - $40
+                  li
+                    img(src=base + "aws.png")
+                    span
+                      a(href="http://aws.amazon.com/") Amazon Web Services
+                      |  
+                      span(data-i18n="ladder_prizes.credits") credits
+                      |  - $50
+              td $2054
+            tr 
+              td 2nd
+              td 
+                ul.list-unstyled
+                  li
+                    img(src=base + "cash2.png")
+                    span $256 
+                    span(data-i18n="ladder_prizes.in_cash") in cash
+                  li
+                    img(src=base + "custom_avatar.png")
+                    span(data-i18n="ladder_prizes.custom_avatar") Custom CodeCombat avatar
+                  li
+                    img(src=base + "heap.png")
+                    span
+                      a(href="https://heapanalytics.com/") Heap Analytics
+                      |  
+                      span(data-i18n="ladder_prizes.heap") for six months of "Startup" access
+                      |  - $354
+                  li
+                    img(src=base + "firebase.png")
+                    span
+                      a(href="https://www.firebase.com/") Firebase
+                      |  
+                      span(data-i18n="ladder_prizes.credits") credits
+                      |  - $300
+                  li
+                    img(src=base + "one_month.png")
+                    span
+                      a(href="https://onemonthrails.com/") One Month Rails
+                      |  
+                      span(data-i18n="ladder_prizes.one_month_discount") discount, 30% off: choose either Rails or HTML
+                      |  - $30
+                  li
+                    img(src=base + "webstorm.png")
+                    span
+                      a(href="http://www.jetbrains.com/webstorm/") Webstorm
+                      |  
+                      span(data-i18n="ladder_prizes.license") license
+                      |  - $49
+                  li
+                    img(src=base + "oreilly.png")
+                    span
+                      a(href="http://shop.oreilly.com/category/ebooks.do") O'Reilly
+                      |  
+                      span(data-i18n="ladder_prizes.oreilly") ebook of your choice
+                      |  - $40
+                  li
+                    img(src=base + "aws.png")
+                    span
+                      a(href="http://aws.amazon.com/") Amazon Web Services
+                      |  
+                      span(data-i18n="ladder_prizes.credits") credits
+                      |  - $50
+              td $1229
+            tr 
+              td 3rd
+              td
+                ul.list-unstyled
+                  li
+                    img(src=base + "cash2.png")
+                    span $128 
+                    span(data-i18n="ladder_prizes.in_cash") in cash
+                  li
+                    img(src=base + "custom_avatar.png")
+                    span(data-i18n="ladder_prizes.custom_avatar") Custom CodeCombat avatar
+                  li
+                    img(src=base + "heap.png")
+                    span
+                      a(href="https://heapanalytics.com/") Heap Analytics
+                      |  
+                      span(data-i18n="ladder_prizes.heap") for six months of "Startup" access
+                      |  - $354
+                  li
+                    img(src=base + "firebase.png")
+                    span
+                      a(href="https://www.firebase.com/") Firebase
+                      |  
+                      span(data-i18n="ladder_prizes.credits") credits
+                      |  - $300
+                  li
+                    img(src=base + "one_month.png")
+                    span
+                      a(href="https://onemonthrails.com/") One Month Rails
+                      |  
+                      span(data-i18n="ladder_prizes.one_month_discount") discount, 30% off: choose either Rails or HTML
+                      |  - $30
+                  li
+                    img(src=base + "webstorm.png")
+                    span
+                      a(href="http://www.jetbrains.com/webstorm/") Webstorm
+                      |  
+                      span(data-i18n="ladder_prizes.license") license
+                      |  - $49
+                  li
+                    img(src=base + "oreilly.png")
+                    span
+                      a(href="http://shop.oreilly.com/category/ebooks.do") O'Reilly
+                      |  
+                      span(data-i18n="ladder_prizes.oreilly") ebook of your choice
+                      |  - $40
+                  li
+                    img(src=base + "aws.png")
+                    span
+                      a(href="http://aws.amazon.com/") Amazon Web Services
+                      |  
+                      span(data-i18n="ladder_prizes.credits") credits
+                      |  - $50
+              td $1101
+            tr 
+              td 4th
+              td
+                ul.list-unstyled
+                  li
+                    img(src=base + "cash3.png")
+                    span $64 
+                    span(data-i18n="ladder_prizes.in_cash") in cash
+                  li
+                    img(src=base + "heap.png")
+                    span
+                      a(href="https://heapanalytics.com/") Heap Analytics
+                      |  
+                      span(data-i18n="ladder_prizes.heap") for six months of "Startup" access
+                      |  - $354
+                  li
+                    img(src=base + "firebase.png")
+                    span
+                      a(href="https://www.firebase.com/") Firebase
+                      |  
+                      span(data-i18n="ladder_prizes.credits") credits
+                      |  - $300
+                  li
+                    img(src=base + "one_month.png")
+                    span
+                      a(href="https://onemonthrails.com/") One Month Rails
+                      |  
+                      span(data-i18n="ladder_prizes.one_month_discount") discount, 30% off: choose either Rails or HTML
+                      |  - $30
+                  li
+                    img(src=base + "webstorm.png")
+                    span
+                      a(href="http://www.jetbrains.com/webstorm/") Webstorm
+                      |  
+                      span(data-i18n="ladder_prizes.license") license
+                      |  - $49
+                  li
+                    img(src=base + "oreilly.png")
+                    span
+                      a(href="http://shop.oreilly.com/category/ebooks.do") O'Reilly
+                      |  
+                      span(data-i18n="ladder_prizes.oreilly") ebook of your choice
+                      |  - $40
+                  li
+                    img(src=base + "aws.png")
+                    span
+                      a(href="http://aws.amazon.com/") Amazon Web Services
+                      |  
+                      span(data-i18n="ladder_prizes.credits") credits
+                      |  - $50
+              td $887
+            tr 
+              td 5th
+              td
+                ul.list-unstyled
+                  li
+                    img(src=base + "cash3.png")
+                    span $32 
+                    span(data-i18n="ladder_prizes.in_cash") in cash
+                  li
+                    img(src=base + "heap.png")
+                    span
+                      a(href="https://heapanalytics.com/") Heap Analytics
+                      |  
+                      span(data-i18n="ladder_prizes.heap") for six months of "Startup" access
+                      |  - $354
+                  li
+                    img(src=base + "firebase.png")
+                    span
+                      a(href="https://www.firebase.com/") Firebase
+                      |  
+                      span(data-i18n="ladder_prizes.credits") credits
+                      |  - $300
+                  li
+                    img(src=base + "one_month.png")
+                    span
+                      a(href="https://onemonthrails.com/") One Month Rails
+                      |  
+                      span(data-i18n="ladder_prizes.one_month_discount") discount, 30% off: choose either Rails or HTML
+                      |  - $30
+                  li
+                    img(src=base + "webstorm.png")
+                    span
+                      a(href="http://www.jetbrains.com/webstorm/") Webstorm
+                      |  
+                      span(data-i18n="ladder_prizes.license") license
+                      |  - $49
+                  li
+                    img(src=base + "oreilly.png")
+                    span
+                      a(href="http://shop.oreilly.com/category/ebooks.do") O'Reilly
+                      |  
+                      span(data-i18n="ladder_prizes.oreilly") ebook of your choice
+                      |  - $40
+                  li
+                    img(src=base + "aws.png")
+                    span
+                      a(href="http://aws.amazon.com/") Amazon Web Services
+                      |  
+                      span(data-i18n="ladder_prizes.credits") credits
+                      |  - $50
+              td $855
+            tr 
+              td 6th
+              td
+                ul.list-unstyled
+                  li
+                    img(src=base + "cash3.png")
+                    span $16 
+                    span(data-i18n="ladder_prizes.in_cash") in cash
+                  li
+                    img(src=base + "firebase.png")
+                    span
+                      a(href="https://www.firebase.com/") Firebase
+                      |  
+                      span(data-i18n="ladder_prizes.credits") credits
+                      |  - $300
+                  li
+                    img(src=base + "one_month.png")
+                    span
+                      a(href="https://onemonthrails.com/") One Month Rails
+                      |  
+                      span(data-i18n="ladder_prizes.one_month_discount") discount, 30% off: choose either Rails or HTML
+                      |  - $30
+                  li
+                    img(src=base + "webstorm.png")
+                    span
+                      a(href="http://www.jetbrains.com/webstorm/") Webstorm
+                      |  
+                      span(data-i18n="ladder_prizes.license") license
+                      |  - $49
+                  li
+                    img(src=base + "oreilly.png")
+                    span
+                      a(href="http://shop.oreilly.com/category/ebooks.do") O'Reilly
+                      |  
+                      span(data-i18n="ladder_prizes.oreilly") ebook of your choice
+                      |  - $40
+                  li
+                    img(src=base + "aws.png")
+                    span
+                      a(href="http://aws.amazon.com/") Amazon Web Services
+                      |  
+                      span(data-i18n="ladder_prizes.credits") credits
+                      |  - $50
+              td $485
+            tr 
+              td 7th
+              td
+                ul.list-unstyled
+                  li
+                    img(src=base + "cash3.png")
+                    span $8 
+                    span(data-i18n="ladder_prizes.in_cash") in cash
+                  li
+                    img(src=base + "firebase.png")
+                    span
+                      a(href="https://www.firebase.com/") Firebase
+                      |  
+                      span(data-i18n="ladder_prizes.credits") credits
+                      |  - $300
+                  li
+                    img(src=base + "one_month.png")
+                    span
+                      a(href="https://onemonthrails.com/") One Month Rails
+                      |  
+                      span(data-i18n="ladder_prizes.one_month_discount") discount, 30% off: choose either Rails or HTML
+                      |  - $30
+                  li
+                    img(src=base + "webstorm.png")
+                    span
+                      a(href="http://www.jetbrains.com/webstorm/") Webstorm
+                      |  
+                      span(data-i18n="ladder_prizes.license") license
+                      |  - $49
+                  li
+                    img(src=base + "oreilly.png")
+                    span
+                      a(href="http://shop.oreilly.com/category/ebooks.do") O'Reilly
+                      |  
+                      span(data-i18n="ladder_prizes.oreilly") ebook of your choice
+                      |  - $40
+                  li
+                    img(src=base + "aws.png")
+                    span
+                      a(href="http://aws.amazon.com/") Amazon Web Services
+                      |  
+                      span(data-i18n="ladder_prizes.credits") credits
+                      |  - $50
+              td $477
+            tr 
+              td 8th
+              td
+                ul.list-unstyled
+                  li
+                    img(src=base + "cash3.png")
+                    span $4 
+                    span(data-i18n="ladder_prizes.in_cash") in cash
+                  li
+                    img(src=base + "firebase.png")
+                    span
+                      a(href="https://www.firebase.com/") Firebase
+                      |  
+                      span(data-i18n="ladder_prizes.credits") credits
+                      |  - $300
+                  li
+                    img(src=base + "one_month.png")
+                    span
+                      a(href="https://onemonthrails.com/") One Month Rails
+                      |  
+                      span(data-i18n="ladder_prizes.one_month_discount") discount, 30% off: choose either Rails or HTML
+                      |  - $30
+                  li
+                    img(src=base + "webstorm.png")
+                    span
+                      a(href="http://www.jetbrains.com/webstorm/") Webstorm
+                      |  
+                      span(data-i18n="ladder_prizes.license") license
+                      |  - $49
+                  li
+                    img(src=base + "oreilly.png")
+                    span
+                      a(href="http://shop.oreilly.com/category/ebooks.do") O'Reilly
+                      |  
+                      span(data-i18n="ladder_prizes.oreilly") ebook of your choice
+                      |  - $40
+                  li
+                    img(src=base + "aws.png")
+                    span
+                      a(href="http://aws.amazon.com/") Amazon Web Services
+                      |  
+                      span(data-i18n="ladder_prizes.credits") credits
+                      |  - $50
+              td $473
+            tr 
+              td 9th
+              td
+                ul.list-unstyled
+                  li
+                    img(src=base + "cash3.png")
+                    span $2 
+                    span(data-i18n="ladder_prizes.in_cash") in cash
+                  li
+                    img(src=base + "firebase.png")
+                    span
+                      a(href="https://www.firebase.com/") Firebase
+                      |  
+                      span(data-i18n="ladder_prizes.credits") credits
+                      |  - $300
+                  li
+                    img(src=base + "one_month.png")
+                    span
+                      a(href="https://onemonthrails.com/") One Month Rails
+                      |  
+                      span(data-i18n="ladder_prizes.one_month_discount") discount, 30% off: choose either Rails or HTML
+                      |  - $30
+                  li
+                    img(src=base + "webstorm.png")
+                    span
+                      a(href="http://www.jetbrains.com/webstorm/") Webstorm
+                      |  
+                      span(data-i18n="ladder_prizes.license") license
+                      |  - $49
+                  li
+                    img(src=base + "oreilly.png")
+                    span
+                      a(href="http://shop.oreilly.com/category/ebooks.do") O'Reilly
+                      |  
+                      span(data-i18n="ladder_prizes.oreilly") ebook of your choice
+                      |  - $40
+                  li
+                    img(src=base + "aws.png")
+                    span
+                      a(href="http://aws.amazon.com/") Amazon Web Services
+                      |  
+                      span(data-i18n="ladder_prizes.credits") credits
+                      |  - $50
+              td $471
+            tr 
+              td 10th
+              td
+                ul.list-unstyled
+                  li
+                    img(src=base + "cash3.png")
+                    span $1 
+                    span(data-i18n="ladder_prizes.in_cash") in cash
+                  li
+                    img(src=base + "firebase.png")
+                    span
+                      a(href="https://www.firebase.com/") Firebase
+                      |  
+                      span(data-i18n="ladder_prizes.credits") credits
+                      |  - $300
+                  li
+                    img(src=base + "one_month.png")
+                    span
+                      a(href="https://onemonthrails.com/") One Month Rails
+                      |  
+                      span(data-i18n="ladder_prizes.one_month_discount") discount, 30% off: choose either Rails or HTML
+                      |  - $30
+                  li
+                    img(src=base + "webstorm.png")
+                    span
+                      a(href="http://www.jetbrains.com/webstorm/") Webstorm
+                      |  
+                      span(data-i18n="ladder_prizes.license") license
+                      |  - $49
+                  li
+                    img(src=base + "oreilly.png")
+                    span
+                      a(href="http://shop.oreilly.com/category/ebooks.do") O'Reilly
+                      |  
+                      span(data-i18n="ladder_prizes.oreilly") ebook of your choice
+                      |  - $40
+                  li
+                    img(src=base + "aws.png")
+                    span
+                      a(href="http://aws.amazon.com/") Amazon Web Services
+                      |  
+                      span(data-i18n="ladder_prizes.credits") credits
+                      |  - $50
+              td $470
+            tr 
+              td 11 - 40
+              td
+                ul.list-unstyled
+                  li
+                    img(src=base + "webstorm.png")
+                    span
+                      a(href="http://www.jetbrains.com/webstorm/") Webstorm
+                      |  
+                      span(data-i18n="ladder_prizes.license") license
+                      |  - $49
+                  li
+                    img(src=base + "oreilly.png")
+                    span
+                      a(href="http://shop.oreilly.com/category/ebooks.do") O'Reilly
+                      |  
+                      span(data-i18n="ladder_prizes.oreilly") ebook of your choice
+                      |  - $40
+                  li
+                    img(src=base + "aws.png")
+                    span
+                      a(href="http://aws.amazon.com/") Amazon Web Services
+                      |  
+                      span(data-i18n="ladder_prizes.credits") credits
+                      |  - $50
+              td $139
+            tr 
+              td 41 - 100
+              td
+                ul.list-unstyled
+                  li
+                    img(src=base + "oreilly.png")
+                    span
+                      a(href="http://shop.oreilly.com/category/ebooks.do") O'Reilly
+                      |  
+                      span(data-i18n="ladder_prizes.oreilly") ebook of your choice
+                      |  - $40
+                  li
+                    img(src=base + "aws.png")
+                    span
+                      a(href="http://aws.amazon.com/") Amazon Web Services
+                      |  
+                      span(data-i18n="ladder_prizes.credits") credits
+                      |  - $50
+              td $90
+            tr 
+              td 101+
+              td
+                ul.list-unstyled
+                  li
+                    img(src=base + "aws.png")
+                    span
+                      a(href="http://aws.amazon.com/") Amazon Web Services
+                      |  
+                      span(data-i18n="ladder_prizes.credits") credits
+                      |  - $50
+              td $50
+  
+      .tab-pane.well#rules
+        h1(data-i18n="ladder.tournament_rules") Tournament Rules
+        h2 General
+        p You don't have to buy anything to participate in the tournament, and trying to pay us won't increase your odds of winning. Although we don't anticipate the rules changing, they are subject to change.
+  
+        h2 Dates and Times
+        p The tournament starts on Tuesday, May 20 at 8:30AM and ends on Tuesday, June 10 at 5:00PM PDT. After the tournament finishes, we will check the games manually to prevent duplicate entries and cheating. We will email all the winners within two weeks of the end date.
+  
+        h2 Eligilibity
+        p The tournament is open to anyone over the age of 13. Players are allowed to form teams to compete, but we will only be rewarding submissions, so if a team of 10 wins, they will need to split the prize.
+  
+        p The tournament is NOT open to people who live in countries or states that prohibit participating or receiving a prize in a challenge (these include, but are not limited to Brazil, Quebec, Italy, Cuba, Sudan, Iran, North Korea, and Syria). To clarify, people from the aforementioned places are welcome to play the Greed level, but cannot receive prizes. Organizations involved in putting the tournament together (namely CodeCombat and all of our employees) are excluded from participating/winning prizes.
+  
+        h2 Submission Requirements
+        p 
+          | To be eligible to win prizes, players must submit their code to the Greed ladder for ranking AND defeat our default AI. Every player that submits their code to the ladder and beats our default AI will receive $50 in AWS credits as described on the 
+          a(href="#prizes", data-i18n="ladder_prizes.tournament_prizes") Tournament Prizes
+          |  page.
+  
+        p
+          | There are some restrictions regarding who can use the AWS credits. Please see the additional rules of use on 
+          a(href="https://aws.amazon.com/awscredits") Amazon's AWS credits page.
+  
+        h2 Submission Rights
+        p We reserve the right to use your submission and site identity (including username, avatar, and any information you mark as public) to promote the tournament. This is in keeping with our overall site terms of service.
+  
+        h2 Judging Criteria
+        p
+          | We will calculate final rankings by running the top games from the public leaderboard from both teams against each other and sorting solutions by wins and losses. The number of games from each side to be used in the final ranking is yet to be determined, but is probably around 150. The final ranking will be performed with a snapshot of solutions taken the end of the contest. The final ranking methedology is subject to change. We will not be evaluating code in any manual way for common traits like adequate documentation, cleanliness, etc. We reserve the right to disqualify any player for any reason. The public leaderboards are a good proxy for your final rank, but are not guaranteed to be accurate. To repeat, 
+          strong the leaderboards are only a preliminary proxy for your final rank
+          | .
+  
+        p
+          | Your rank will change as players submit more solutions and more matches are played according to 
+          a(href="https://github.com/codecombat/bayesian-battle") our open-source ranking library, Bayesian Battle
+          | , but our final ranking will use an exhaustive pairwise matching round amongst the top players as described above.
+  
+        h2 Prizes
+        p 
+          | Prizes will be awarded to everyone that achieves a rank covered on the 
+          a(href="#prizes", data-i18n="ladder.prizes") Tournament Prizes
+          |  page.
+  
+        p Please remember that the player ranks listed on the prize page refer to ranks WITHIN a leaderboard. So if you are the #2 Ogre player, you will win the #2 prize. Similarly, if you are the #3 Human player, you will receive the #3 prize. If you have submissions on both leaderboards, we will only count your highest submission for the purposes of distributing prizes. As a result, your final ranking may be higher than your preliminary ranking due to removing duplicate submissions above you.
+  
+        h2 Verifying Potential Winners
+        p We may ask players to identify themselves so that we can detect duplicate entries. This may be done in the form of a Facebook, Google+, or LinkedIn profile, but we may need more information. All players eligible for prizes agree that refusing to provide us with identifying information may lead to ineligibility for prizes. 
+  
+        p On a related note, if we have reason to believe that a player has intentionally submitted duplicate entries for the purpose of receiving more prizes or manipulating the leaderboards in any way, we will remove that player and all submissions we believe to be associated with them. We want this to be fair for everyone.
+  
+        h2 Prize Distribution
+        p Different sponsors require different ways of claiming their prizes, and we will work with winners to ensure they are able to redeem their prizes in a timely fashion. For cash prizes, we will deliver the money via PayPal. We will not ship checks, money orders, or cash through the mail. We will assume reasonable international money transfer costs to deliver cash prizes through Paypal.
+  
+        p Winners are responsible for any taxes associated with claiming their prizes. CodeCombat is not responsible for filing paperwork on behalf of winners for tax claims. 
+  
+        h2 Contact
+        p
+          | If you have any questions or would like to get in touch with us for any other reason, we can be reached at team@codecombat.com. You can also post to our public 
+          a(href="http://discourse.codecombat.com/") Discourse forum
+          | .
+  
+      .tab-pane.well#winners
+        h1(data-i18n="ladder.winners") Winners
+  
+        table.table.table-hover.table-condensed
+          thead
+            tr
+              th(data-i18n="ladder_prizes.rank") Rank
+              th Human
+              th Human wins/losses/ties
+              th Ogre
+              th Ogre wins/losses/ties
+              th Spectate
+          tbody
+            each human, index in winners.humans
+              - var ogre = winners.ogres[index]
+              tr 
+                td= human.rank
+                td= human.name
+                td
+                  span.win= human.wins
+                  |  - 
+                  span.loss= human.losses
+                  |  - 
+                  span.tie= 377 - human.wins - human.losses
+                if ogre
+                  td= ogre.name
+                  td
+                    span.win= ogre.wins
+                    |  - 
+                    span.loss= ogre.losses
+                    |  - 
+                    span.tie= 407 - ogre.wins - ogre.losses
+                  td
+                    a(href="/play/spectate/" + level.get('slug') + "?session-one=" + human.sessionID + "&session-two=" + ogre.sessionID) Watch the battle
+                else
+                  td
+                  td
+                  td
\ No newline at end of file
diff --git a/app/templates/play/level/goals.jade b/app/templates/play/level/goals.jade
index 51d64f23b..d1e0b689c 100644
--- a/app/templates/play/level/goals.jade
+++ b/app/templates/play/level/goals.jade
@@ -1,7 +1,7 @@
 ul#primary-goals-list
 div.goals-status
   strong(data-i18n="play_level.goals") Goals
-  span.spl.spr :
+  span.spr :
   span(data-i18n="play_level.success").secret.goal-status.success Success!
   span(data-i18n="play_level.incomplete").secret.goal-status.incomplete Incomplete
   span(data-i18n="play_level.timed_out").secret.goal-status.timed-out Ran out of time
diff --git a/app/templates/play/level/level_loading.jade b/app/templates/play/level/level_loading.jade
index 89e652a00..33de4253e 100644
--- a/app/templates/play/level/level_loading.jade
+++ b/app/templates/play/level/level_loading.jade
@@ -25,7 +25,7 @@
     strong.tip(data-i18n='play_level.tip_impossible') It always seems impossible until it's done. - Nelson Mandela
 
     strong.tip.rare(data-i18n='play_level.tip_baby_coders') In the future, even babies will be Archmages.
-    strong.tip.rare(data-i18n='play_level.tip_joke') Q: How many programmers does it take to change a light bulb?  A: None, it's a hardware problem.
+    strong.tip.rare(data-i18n='play_level.tip_hardware_problem') Q: How many programmers does it take to change a light bulb?  A: None, it's a hardware problem.
     strong.tip.rare(data-i18n='play_level.tip_morale_improves') Loading will continue until morale improves.
     strong.tip.rare(data-i18n='play_level.tip_all_species') We believe in equal opportunities to learn programming for all species.
     strong.tip.rare(data-i18n='play_level.tip_reticulating') Reticulating spines.
diff --git a/app/templates/play/level/modal/editor_config.jade b/app/templates/play/level/modal/editor_config.jade
index 89ec7f585..bac960ed1 100644
--- a/app/templates/play/level/modal/editor_config.jade
+++ b/app/templates/play/level/modal/editor_config.jade
@@ -27,6 +27,12 @@ block modal-body-content
         option(value="emacs" selected=(keyBindings === "emacs")) Emacs
       span.help-block(data-i18n="play_level.editor_config_keybindings_description") Adds additional shortcuts known from the common editors.
 
+    .form-group.checkbox
+      label(for="tome-live-completion")
+        input#tome-live-completion(name="liveCompletion", type="checkbox", checked=liveCompletion)
+        span(data-i18n="play_level.editor_config_livecompletion_label") Live Autocompletion
+      span.help-block(data-i18n="play_level.editor_config_livecompletion_description") Displays autocomplete suggestions while typing.
+
     .form-group.checkbox
       label(for="tome-invisibles")
         input#tome-invisibles(name="invisibles", type="checkbox", checked=invisibles)
diff --git a/app/templates/play/level/tome/spell_debug.jade b/app/templates/play/level/tome/spell_debug.jade
index 428446e3a..01a8225ea 100644
--- a/app/templates/play/level/tome/spell_debug.jade
+++ b/app/templates/play/level/tome/spell_debug.jade
@@ -1,2 +1,6 @@
+div.progress
+  .progress-bar(role="progressbar", aria-valuenow="50", aria-valuemin="0", aria-valuemax="100")
+    span Inspecting variable...
 pre
+  
   code
\ No newline at end of file
diff --git a/app/templates/play/level/tome/spell_list_tab_entry.jade b/app/templates/play/level/tome/spell_list_tab_entry.jade
index eb9d01e0c..8ebad097f 100644
--- a/app/templates/play/level/tome/spell_list_tab_entry.jade
+++ b/app/templates/play/level/tome/spell_list_tab_entry.jade
@@ -2,7 +2,7 @@
   i.icon-chevron-down
 .thang-avatar-placeholder
 
-code #{spell.name}(#{parameters})
+code #{methodSignature}
 
 .btn.btn-small.reload-code(title="Reload original code for " + spell.name)
   i.icon-repeat
diff --git a/app/templates/play/level/tome/spell_palette.jade b/app/templates/play/level/tome/spell_palette.jade
index f87259d77..2164a970b 100644
--- a/app/templates/play/level/tome/spell_palette.jade
+++ b/app/templates/play/level/tome/spell_palette.jade
@@ -1,9 +1,10 @@
 img(src="/images/level/code_palette_background.png").code-palette-background
+.code-language-logo
 ul(class="nav nav-pills" + (tabbed ? ' multiple-tabs' : ''))
   each slug, group in entryGroupSlugs
     li(class=group == "this" || slug == "available-spells" ? "active" : "")
       a(data-toggle="pill", data-target='#palette-tab-' + slug)
-        h4= group
+        h4= entryGroupNames[group]
 .tab-content
   each slug, group in entryGroupSlugs
     div(id="palette-tab-" + slug, class="tab-pane nano" + (group == "this" || slug == defaultGroupSlug ? " active" : ""))
diff --git a/app/templates/play/level/tome/spell_palette_entry_popover.jade b/app/templates/play/level/tome/spell_palette_entry_popover.jade
index 56577c4e7..a8a79503e 100644
--- a/app/templates/play/level/tome/spell_palette_entry_popover.jade
+++ b/app/templates/play/level/tome/spell_palette_entry_popover.jade
@@ -11,11 +11,22 @@ if doc.example
   p.example
     strong Example:
     div!= marked("```\n" + doc.example + "```")
-else if doc.type == 'function'
+else if doc.type == 'function' && argumentExamples.length
   p.example
     strong Example:
     div
-      code= doc.owner + '.' + doc.name + '(' + argumentExamples.join(', ') + ');'
+      if language == 'javascript'
+        code= doc.owner + '.' + doc.name + '(' + argumentExamples.join(', ') + ');'
+      else if language == 'coffeescript'
+        code= doc.ownerName + (doc.ownerName == '@' ? '' : '.') + doc.name + ' ' + argumentExamples.join(', ')
+      else if language == 'python'
+        code= doc.ownerName + '.' + doc.name + '(' + argumentExamples.join(', ') + ')'
+      else if language == 'clojure'
+        code= '(.' + doc.name + ' ' + doc.ownerName + ' ' + argumentExamples.join(', ') + ')'
+      else if language == 'lua'
+        code= doc.ownerName + ':' + doc.name + '(' + argumentExamples.join(', ') + ')'
+      else if language == 'io'
+        code= (doc.ownerName == 'this' ? '' : doc.ownerName + ' ') + doc.name + '(' + argumentExamples.join(', ') + ')'
 
 if (doc.type != 'function' && doc.type != 'snippet') || doc.name == 'now'
   p.value
diff --git a/app/templates/play/spectate.jade b/app/templates/play/spectate.jade
index e6a9650f9..ee9408d4c 100644
--- a/app/templates/play/spectate.jade
+++ b/app/templates/play/spectate.jade
@@ -3,7 +3,7 @@
 .level-content
   #control-bar-view
   #canvas-wrapper
-    canvas(width=924, height=589)#surface
+    canvas(width=1848, height=1178)#surface
     #canvas-left-gradient.gradient
     #canvas-top-gradient.gradient
   #gold-view.secret.expanded
diff --git a/app/templates/recruitment_base.jade b/app/templates/recruitment_base.jade
new file mode 100644
index 000000000..b04d4848d
--- /dev/null
+++ b/app/templates/recruitment_base.jade
@@ -0,0 +1,21 @@
+body
+  #fb-root
+  #employers-wrapper
+    block header
+      .nav
+        .content.clearfix
+          .navbar-header
+            a.navbar-brand(href='/')
+              img(src="/images/pages/base/recruitment_logo.png", title="CodeCombat - Learn how to code by playing a game", alt="CodeCombat")
+    block outer_content
+      #outer-content-wrapper
+        
+        #intermediate-content-wrapper
+          
+          #inner-content-wrapper
+            .main-content-area#employer-content-area
+              block content
+                p If this is showing, you dun goofed
+  
+    block footer
+      .footer
\ No newline at end of file
diff --git a/app/templates/test.jade b/app/templates/test.jade
new file mode 100644
index 000000000..1c95da748
--- /dev/null
+++ b/app/templates/test.jade
@@ -0,0 +1,22 @@
+h2 Testing Page
+
+ol.breadcrumb
+  for path in parentFolders
+    li
+      a(href=path.url)= path.name
+  li.active= currentFolder
+
+.well.pull-left#test-wrapper
+  #testing-area
+    
+.nav.nav-pills.nav-stacked.pull-right.well#test-nav
+  for child in children
+    li(class=child.type)
+      a(href=child.url).small
+        if child.type == 'folder'
+          span.glyphicon.glyphicon-folder-close
+        else
+          span.glyphicon.glyphicon-file
+        span.spl= child.name
+        if child.type == 'folder'
+          strong (#{child.size})
diff --git a/app/treema-ext.coffee b/app/treema-ext.coffee
index 044c7e6d4..0bb6772e6 100644
--- a/app/treema-ext.coffee
+++ b/app/treema-ext.coffee
@@ -6,6 +6,8 @@ locale = require 'locale/locale'
 class DateTimeTreema extends TreemaNode.nodeMap.string
   valueClass: 'treema-date-time'
   buildValueForDisplay: (el) -> el.text(moment(@data).format('llll'))
+  buildValueForEditing: (valEl) ->
+    @buildValueForEditingSimply valEl, null, 'date'
 
 class VersionTreema extends TreemaNode
   valueClass: 'treema-version'
@@ -16,7 +18,7 @@ class LiveEditingMarkup extends TreemaNode.nodeMap.ace
 
   constructor: ->
     super(arguments...)
-    @schema.aceMode = "ace/mode/markdown"
+    @schema.aceMode = 'ace/mode/markdown'
 
   buildValueForEditing: (valEl) ->
     super(valEl)
@@ -198,7 +200,7 @@ class ImageFileTreema extends TreemaNode.nodeMap.string
 class CoffeeTreema extends TreemaNode.nodeMap.ace
   constructor: ->
     super(arguments...)
-    @schema.aceMode = "ace/mode/coffee"
+    @schema.aceMode = 'ace/mode/coffee'
     @schema.aceTabSize = 2
 
   buildValueForEditing: (valEl) ->
@@ -214,7 +216,7 @@ class CoffeeTreema extends TreemaNode.nodeMap.ace
 class JavaScriptTreema extends CoffeeTreema
   constructor: ->
     super(arguments...)
-    @schema.aceMode = "ace/mode/javascript"
+    @schema.aceMode = 'ace/mode/javascript'
     @schema.aceTabSize = 4
 
 KB = 1024
@@ -230,13 +232,13 @@ class InternationalizationNode extends TreemaNode.nodeMap.object
 
     i18nChildSchema = {
       title: @findLanguageName(key)
-      type: "object"
+      type: 'object'
       properties: {}
     }
     return i18nChildSchema unless @parent
     unless @schema.props?
-      console.warn "i18n props array is empty! Filling with all parent properties by default"
-      @schema.props = (prop for prop,_ of @parent.schema.properties when prop isnt "i18n")
+      console.warn 'i18n props array is empty! Filling with all parent properties by default'
+      @schema.props = (prop for prop,_ of @parent.schema.properties when prop isnt 'i18n')
 
     for i18nProperty in @schema.props
       i18nChildSchema.properties[i18nProperty] = @parent.schema.properties[i18nProperty]
@@ -253,7 +255,7 @@ class LatestVersionCollection extends CocoCollection
 class LatestVersionReferenceNode extends TreemaNode
   searchValueTemplate: '<input placeholder="Search" /><div class="treema-search-results"></div>'
   valueClass: 'treema-latest-version'
-  url: '/db/article/search'
+  url: '/db/article'
   lastTerm: null
 
   constructor: ->
@@ -264,7 +266,7 @@ class LatestVersionReferenceNode extends TreemaNode
     link = (l for l in links when l.rel is 'db')[0]
     return unless link
     parts = (p for p in link.href.split('/') when p.length)
-    @url = "/db/#{parts[1]}/search"
+    @url = "/db/#{parts[1]}"
     @model = require('models/' + _.string.classify(parts[1]))
 
   buildValueForDisplay: (valEl) ->
diff --git a/app/views/DemoView.coffee b/app/views/DemoView.coffee
new file mode 100644
index 000000000..a3b65c781
--- /dev/null
+++ b/app/views/DemoView.coffee
@@ -0,0 +1,88 @@
+CocoView = require 'views/kinds/CocoView'
+template = require 'templates/demo'
+requireUtils = require 'lib/requireUtils'
+
+DEMO_REQUIRE_PREFIX = 'test/demo/'
+DEMO_URL_PREFIX = '/demo/'
+
+###
+  What are demo files?
+
+  They could be a function which returns an element to insert into the demo page.
+  But what about demoing achievements? They'll get put into the main html. Or modals.
+  Well, I was thinking that a single folder would show all demos at the same time, line them up.
+  But it'd be confusing to have a whole bunch of achievement demos show up all at the same time?
+  Maybe there could be a button to show all the demos. Hmm, that'd be cool.
+  It could work like Jasmine, where it modifies the path and so when you select to run them, they all run with page reloads.
+  I think for now, I'll just say: have it be a function which we can run anytime.
+  It may or may not return an element to be inserted into the main area.
+
+  Another idea. Do we want root views to just take over the full view?
+  Or should they just go into the central part?
+  Probably should take over the full view, and if you want to get out of the demo, you navigate back.
+
+###
+
+module.exports = DemoView = class DemoView extends CocoView
+  id: 'demo-view'
+  template: template
+
+  # INITIALIZE
+
+  constructor: (options, @subPath='') ->
+    super(options)
+    @subPath = @subPath[1..] if @subPath[0] is '/'
+    @loadDemoingLibs() unless DemoView.loaded
+
+  loadDemoingLibs: ->
+    @queue = new createjs.LoadQueue()
+    @queue.on('complete', @scriptsLoaded, @)
+    window.jasmine = {} # so that mock-ajax properly loads. It expects jasmine to be loaded
+    for f in ['mock-ajax', 'demo-app']
+      @queue.loadFile({
+        src: "/javascripts/#{f}.js"
+        type: createjs.LoadQueue.JAVASCRIPT
+      })
+
+  scriptsLoaded: ->
+    @initDemoFiles()
+    @children = requireUtils.parseImmediateChildren(@demoFiles, @subPath, DEMO_REQUIRE_PREFIX, DEMO_URL_PREFIX)
+    @render()
+    @runDemo()
+
+  # RENDER DATA
+
+  getRenderData: ->
+    c = super(arguments...)
+    c.parentFolders = requireUtils.getParentFolders(@subPath, DEMO_URL_PREFIX)
+    c.children = @children or []
+    parts = @subPath.split('/')
+    c.currentFolder = parts[parts.length-1] or parts[parts.length-2] or 'All'
+    c
+
+  # RUNNING DEMOS
+
+  initDemoFiles: ->
+    @demoFiles = @getAllDemoFiles()
+    if @subPath
+      prefix = DEMO_REQUIRE_PREFIX + @subPath
+      @demoFiles = (f for f in @demoFiles when f.startsWith prefix)
+
+  runDemo: ->
+    # TODO: Maybe have an option to run all demos in this folder at the same time?
+    return unless @subPath and _.last(@subPath.split('/')).indexOf('.demo') > -1
+    requirePath = DEMO_REQUIRE_PREFIX + @subPath
+    demoFunc = require requirePath
+    if not _.isFunction(demoFunc)
+      console.error "Demo files must export a function. #{requirePath} does not."
+      return
+
+    jasmine.Ajax.install()
+    view = demoFunc()
+    return unless view
+    @$el.find('#demo-area').empty().append(view.$el)
+    # TODO, maybe handle root views differently than modal views differently than everything else?
+
+  getAllDemoFiles: ->
+    allFiles = window.require.list()
+    (f for f in allFiles when f.indexOf('.demo') > -1)
diff --git a/app/views/TestView.coffee b/app/views/TestView.coffee
new file mode 100644
index 000000000..dceff7b36
--- /dev/null
+++ b/app/views/TestView.coffee
@@ -0,0 +1,79 @@
+CocoView = require 'views/kinds/CocoView'
+template = require 'templates/test'
+requireUtils = require 'lib/requireUtils'
+
+TEST_REQUIRE_PREFIX = 'test/app/'
+TEST_URL_PREFIX = '/test/'
+
+module.exports = TestView = class TestView extends CocoView
+  id: 'test-view'
+  template: template
+  reloadOnClose: true
+
+  # INITIALIZE
+
+  constructor: (options, @subPath='') ->
+    super(options)
+    @subPath = @subPath[1..] if @subPath[0] is '/'
+    @loadTestingLibs()
+
+  loadTestingLibs: ->
+    @queue = new createjs.LoadQueue()
+    @queue.on('complete', @scriptsLoaded, @)
+    for f in ['jasmine', 'jasmine-html', 'boot', 'mock-ajax', 'test-app']
+      @queue.loadFile({
+        src: "/javascripts/#{f}.js"
+        type: createjs.LoadQueue.JAVASCRIPT
+      })
+
+  scriptsLoaded: ->
+    @initSpecFiles()
+    @render()
+    TestView.runTests(@specFiles)
+    window.runJasmine()
+
+  # RENDER DATA
+
+  getRenderData: ->
+    c = super(arguments...)
+    c.parentFolders = requireUtils.getParentFolders(@subPath, TEST_URL_PREFIX)
+    c.children = requireUtils.parseImmediateChildren(@specFiles, @subPath, TEST_REQUIRE_PREFIX, TEST_URL_PREFIX)
+    parts = @subPath.split('/')
+    c.currentFolder = parts[parts.length-1] or parts[parts.length-2] or 'All'
+    c
+
+  # RUNNING TESTS
+
+  initSpecFiles: ->
+    @specFiles = TestView.getAllSpecFiles()
+    if @subPath
+      prefix = TEST_REQUIRE_PREFIX + @subPath
+      @specFiles = (f for f in @specFiles when f.startsWith prefix)
+
+  @runTests: (specFiles) ->
+    specFiles ?= @getAllSpecFiles()
+    describe 'CodeCombat Client', =>
+      jasmine.Ajax.install()
+      beforeEach ->
+        jasmine.Ajax.requests.reset()
+        Backbone.Mediator.init()
+        Backbone.Mediator.setValidationEnabled false
+        # TODO Stubbify more things
+        #   * document.location
+        #   * firebase
+        #   * all the services that load in main.html
+
+      afterEach ->
+        # TODO Clean up more things
+        #   * Events
+
+      require f for f in specFiles # runs the tests
+
+  @getAllSpecFiles = ->
+    allFiles = window.require.list()
+    (f for f in allFiles when f.indexOf('.spec') > -1)
+
+  destroy: ->
+    # hack to get jasmine tests to properly run again on clicking links, and make sure if you
+    # leave this page (say, back to the main site) that test stuff doesn't follow you.
+    document.location.reload()
diff --git a/app/views/about_view.coffee b/app/views/about_view.coffee
index af77a43b9..76988aba8 100644
--- a/app/views/about_view.coffee
+++ b/app/views/about_view.coffee
@@ -2,5 +2,5 @@ View = require 'views/kinds/RootView'
 template = require 'templates/about'
 
 module.exports = class AboutView extends View
-  id: "about-view"
+  id: 'about-view'
   template: template
diff --git a/app/views/account/job_profile_view.coffee b/app/views/account/job_profile_view.coffee
index 8c11aa2c8..bd4472d23 100644
--- a/app/views/account/job_profile_view.coffee
+++ b/app/views/account/job_profile_view.coffee
@@ -1,6 +1,6 @@
 CocoView = require 'views/kinds/CocoView'
 template = require 'templates/account/job_profile'
-{me} = require('lib/auth')
+{me} = require 'lib/auth'
 
 module.exports = class JobProfileView extends CocoView
   id: 'job-profile-view'
@@ -19,10 +19,10 @@ module.exports = class JobProfileView extends CocoView
 
   buildJobProfileTreema: ->
     visibleSettings = @editableSettings.concat @readOnlySettings
-    data = _.pick (me.get('jobProfile') ? {}), (value, key) => key in visibleSettings
+    data = _.pick (me.get('jobProfile') ? {}), (value, key) -> key in visibleSettings
     data.name ?= (me.get('firstName') + ' ' + me.get('lastName')).trim() if me.get('firstName')
     schema = _.cloneDeep me.schema().properties.jobProfile
-    schema.properties = _.pick schema.properties, (value, key) => key in visibleSettings
+    schema.properties = _.pick schema.properties, (value, key) -> key in visibleSettings
     schema.required = _.intersection schema.required, visibleSettings
     for prop in @readOnlySettings
       schema.properties[prop].readOnly = true
@@ -54,13 +54,13 @@ module.exports = class JobProfileView extends CocoView
     next = null
     for metric in metrics = @getProgressMetrics()
       done = metric.fn()
-      completed += metric.weight ? 1 if done
+      completed += metric.weight if done
       totalWeight += metric.weight
       next = metric.name unless next or done
     progress = Math.round 100 * completed / totalWeight
     bar = @$el.find('.profile-completion-progress .progress-bar')
     bar.css 'width', "#{progress}%"
-    text = ""
+    text = ''
     if progress > 19
       text = "#{progress}% complete"
     else if progress > 5
@@ -77,33 +77,32 @@ module.exports = class JobProfileView extends CocoView
     modified = (field) -> -> jobProfile[field] and jobProfile[field] isnt schema.properties[field].default
     listStarted = (field, subfields) -> -> jobProfile[field]?.length and _.every subfields, (subfield) -> jobProfile[field][0][subfield]
     @progressMetrics = [
-      {name: "Mark yourself open to offers to show up in searches.", weight: 1, fn: modified 'active'}
-      {name: "Specify your desired job title.", weight: 0, fn: exists 'jobTitle'}
-      {name: "Provide your name.", weight: 1, fn: modified 'name'}
-      {name: "Choose your city.", weight: 1, fn: modified 'city'}
-      {name: "Pick your country.", weight: 0, fn: exists 'country'}
-      {name: "List at least five skills.", weight: 2, fn: -> jobProfile.skills.length >= 5}
-      {name: "Write a short description to summarize yourself at a glance.", weight: 2, fn: modified 'shortDescription'}
-      {name: "Fill in your main description to sell yourself and describe the work you're looking for.", weight: 3, fn: modified 'longDescription'}
-      {name: "List your work experience.", weight: 3, fn: listStarted 'work', ['role', 'employer']}
-      {name: "Recount your educational ordeals.", weight: 3, fn: listStarted 'education', ['degree', 'school']}
-      {name: "Show off up to three projects you've worked on.", weight: 3, fn: listStarted 'projects', ['name']}
-      {name: "Add any personal or social links.", weight: 2, fn: listStarted 'links', ['link', 'name']}
-      {name: "Add an optional professional photo.", weight: 2, fn: modified 'photoURL'}
+      {name: 'Mark yourself open to offers to show up in searches.', weight: 1, fn: modified 'active'}
+      {name: 'Specify your desired job title.', weight: 0, fn: exists 'jobTitle'}
+      {name: 'Provide your name.', weight: 1, fn: modified 'name'}
+      {name: 'Choose your city.', weight: 1, fn: modified 'city'}
+      {name: 'Pick your country.', weight: 0, fn: exists 'country'}
+      {name: 'List at least five skills.', weight: 2, fn: -> jobProfile.skills.length >= 5}
+      {name: 'Write a short description to summarize yourself at a glance.', weight: 2, fn: modified 'shortDescription'}
+      {name: 'Fill in your main description to sell yourself and describe the work you\'re looking for.', weight: 3, fn: modified 'longDescription'}
+      {name: 'List your work experience.', weight: 3, fn: listStarted 'work', ['role', 'employer']}
+      {name: 'Recount your educational ordeals.', weight: 3, fn: listStarted 'education', ['degree', 'school']}
+      {name: 'Show off up to three projects you\'ve worked on.', weight: 3, fn: listStarted 'projects', ['name']}
+      {name: 'Add any personal or social links.', weight: 2, fn: listStarted 'links', ['link', 'name']}
+      {name: 'Add an optional professional photo.', weight: 2, fn: modified 'photoURL'}
     ]
 
   getData: ->
     return {} unless me.get('jobProfile') or @hasEditedProfile
     _.pick @jobProfileTreema.data, (value, key) => key in @editableSettings
 
+JobProfileView.commonSkills = commonSkills = ['c#', 'java', 'javascript', 'php', 'android', 'jquery', 'python', 'c++', 'html', 'mysql', 'ios', 'asp.net', 'css', 'sql', 'iphone', '.net', 'objective-c', 'ruby-on-rails', 'c', 'ruby', 'sql-server', 'ajax', 'wpf', 'linux', 'database', 'django', 'vb.net', 'windows', 'facebook', 'r', 'html5', 'multithreading', 'ruby-on-rails-3', 'wordpress', 'winforms', 'node.js', 'spring', 'osx', 'performance', 'visual-studio-2010', 'oracle', 'swing', 'algorithm', 'git', 'linq', 'apache', 'web-services', 'perl', 'wcf', 'entity-framework', 'bash', 'visual-studio', 'sql-server-2008', 'hibernate', 'actionscript-3', 'angularjs', 'matlab', 'qt', 'ipad', 'sqlite', 'cocoa-touch', 'cocoa', 'flash', 'mongodb', 'codeigniter', 'jquery-ui', 'css3', 'tsql', 'google-maps', 'silverlight', 'security', 'delphi', 'vba', 'postgresql', 'jsp', 'shell', 'internet-explorer', 'google-app-engine', 'sockets', 'validation', 'scala', 'oop', 'unit-testing', 'xaml', 'parsing', 'twitter-bootstrap', 'google-chrome', 'http', 'magento', 'email', 'android-layout', 'flex', 'rest', 'maven', 'jsf', 'listview', 'date', 'winapi', 'windows-phone-7', 'facebook-graph-api', 'unix', 'url', 'c#-4.0', 'jquery-ajax', 'svn', 'symfony2', 'table', 'cakephp', 'firefox', 'ms-access', 'java-ee', 'jquery-mobile', 'python-2.7', 'tomcat', 'zend-framework', 'opencv', 'visual-c++', 'opengl', 'spring-mvc', 'sql-server-2005', 'authentication', 'search', 'xslt', 'servlets', 'pdf', 'animation', 'math', 'batch-file', 'excel-vba', 'iis', 'mod-rewrite', 'sharepoint', 'gwt', 'powershell', 'visual-studio-2012', 'haskell', 'grails', 'ubuntu', 'networking', 'nhibernate', 'design-patterns', 'testing', 'jpa', 'visual-studio-2008', 'core-data', 'user-interface', 'audio', 'backbone.js', 'gcc', 'mobile', 'design', 'activerecord', 'extjs', 'video', 'stored-procedures', 'optimization', 'drupal', 'image-processing', 'android-intent', 'logging', 'web-applications', 'razor', 'database-design', 'azure', 'vim', 'memory-management', 'model-view-controller', 'cordova', 'c++11', 'selenium', 'ssl', 'assembly', 'soap', 'boost', 'canvas', 'google-maps-api-3', 'netbeans', 'heroku', 'jsf-2', 'encryption', 'hadoop', 'linq-to-sql', 'dll', 'xpath', 'data-binding', 'windows-phone-8', 'phonegap', 'jdbc', 'python-3.x', 'twitter', 'mvvm', 'gui', 'web', 'jquery-plugins', 'numpy', 'deployment', 'ios7', 'emacs', 'knockout.js', 'graphics', 'joomla', 'unicode', 'windows-8', 'android-fragments', 'ant', 'command-line', 'version-control', 'yii', 'github', 'amazon-web-services', 'macros', 'ember.js', 'svg', 'opengl-es', 'django-models', 'solr', 'orm', 'blackberry', 'windows-7', 'ruby-on-rails-4', 'compiler', 'tcp', 'pdo', 'architecture', 'groovy', 'nginx', 'concurrency', 'paypal', 'iis-7', 'express', 'vbscript', 'google-chrome-extension', 'memory-leaks', 'rspec', 'actionscript', 'interface', 'fonts', 'oauth', 'ssh', 'tfs', 'junit', 'struts2', 'd3.js', 'coldfusion', '.net-4.0', 'jqgrid', 'asp-classic', 'https', 'plsql', 'stl', 'sharepoint-2010', 'asp.net-web-api', 'mysqli', 'sed', 'awk', 'internet-explorer-8', 'jboss', 'charts', 'scripting', 'matplotlib', 'laravel', 'clojure', 'entity-framework-4', 'intellij-idea', 'xml-parsing', 'sqlite3', '3d', 'io', 'mfc', 'devise', 'playframework', 'youtube', 'amazon-ec2', 'localization', 'cuda', 'jenkins', 'ssis', 'safari', 'doctrine2', 'vb6', 'amazon-s3', 'dojo', 'air', 'eclipse-plugin', 'android-asynctask', 'crystal-reports', 'cocos2d-iphone', 'dns', 'highcharts', 'ruby-on-rails-3.2', 'ado.net', 'sql-server-2008-r2', 'android-emulator', 'spring-security', 'cross-browser', 'oracle11g', 'bluetooth', 'f#', 'msbuild', 'drupal-7', 'google-apps-script', 'mercurial', 'xna', 'google-analytics', 'lua', 'parallel-processing', 'internationalization', 'java-me', 'mono', 'monotouch', 'android-ndk', 'lucene', 'kendo-ui', 'linux-kernel', 'terminal', 'phpmyadmin', 'makefile', 'ffmpeg', 'applet', 'active-directory', 'coffeescript', 'pandas', 'responsive-design', 'xhtml', 'silverlight-4.0', '.net-3.5', 'jaxb', 'ruby-on-rails-3.1', 'gps', 'geolocation', 'network-programming', 'windows-services', 'laravel-4', 'ggplot2', 'rss', 'webkit', 'functional-programming', 'wsdl', 'telerik', 'maven-2', 'cron', 'mapreduce', 'websocket', 'automation', 'windows-runtime', 'django-forms', 'tkinter', 'android-widget', 'android-activity', 'rubygems', 'content-management-system', 'doctrine', 'django-templates', 'gem', 'fluent-nhibernate', 'seo', 'meteor', 'serial-port', 'glassfish', 'documentation', 'cryptography', 'ef-code-first', 'extjs4', 'x86', 'wordpress-plugin', 'go', 'wix', 'linq-to-entities', 'oracle10g', 'cocos2d', 'selenium-webdriver', 'open-source', 'jtable', 'qt4', 'smtp', 'redis', 'jvm', 'openssl', 'timezone', 'nosql', 'erlang', 'playframework-2.0', 'machine-learning', 'mocking', 'unity3d', 'thread-safety', 'android-actionbar', 'jni', 'udp', 'jasper-reports', 'zend-framework2', 'apache2', 'internet-explorer-7', 'sqlalchemy', 'neo4j', 'ldap', 'jframe', 'youtube-api', 'filesystems', 'make', 'flask', 'gdb', 'cassandra', 'sms', 'g++', 'django-admin', 'push-notification', 'statistics', 'tinymce', 'locking', 'javafx', 'firefox-addon', 'fancybox', 'windows-phone', 'log4j', 'uikit', 'prolog', 'socket.io', 'icons', 'oauth-2.0', 'refactoring', 'sencha-touch', 'elasticsearch', 'symfony1', 'google-api', 'webserver', 'wpf-controls', 'microsoft-metro', 'gtk', 'flex4', 'three.js', 'gradle', 'centos', 'angularjs-directive', 'internet-explorer-9', 'sass', 'html5-canvas', 'interface-builder', 'programming-languages', 'gmail', 'jersey', 'twitter-bootstrap-3', 'arduino', 'requirejs', 'cmake', 'web-development', 'software-engineering', 'startups', 'entrepreneurship', 'social-media-marketing', 'writing', 'marketing', 'web-design', 'graphic-design', 'game-development', 'game-design', 'photoshop', 'illustrator', 'robotics', 'aws', 'devops', 'mathematica', 'bioinformatics', 'data-vis', 'ui', 'embedded-systems', 'codecombat']
 
-commonSkills = ['c#', 'java', 'javascript', 'php', 'android', 'jquery', 'python', 'c++', 'html', 'mysql', 'ios', 'asp.net', 'css', 'sql', 'iphone', '.net', 'objective-c', 'ruby-on-rails', 'c', 'ruby', 'sql-server', 'ajax', 'wpf', 'linux', 'database', 'django', 'vb.net', 'windows', 'facebook', 'r', 'html5', 'multithreading', 'ruby-on-rails-3', 'wordpress', 'winforms', 'node.js', 'spring', 'osx', 'performance', 'visual-studio-2010', 'oracle', 'swing', 'algorithm', 'git', 'linq', 'apache', 'web-services', 'perl', 'wcf', 'entity-framework', 'bash', 'visual-studio', 'sql-server-2008', 'hibernate', 'actionscript-3', 'angularjs', 'matlab', 'qt', 'ipad', 'sqlite', 'cocoa-touch', 'cocoa', 'flash', 'mongodb', 'codeigniter', 'jquery-ui', 'css3', 'tsql', 'google-maps', 'silverlight', 'security', 'delphi', 'vba', 'postgresql', 'jsp', 'shell', 'internet-explorer', 'google-app-engine', 'sockets', 'validation', 'scala', 'oop', 'unit-testing', 'xaml', 'parsing', 'twitter-bootstrap', 'google-chrome', 'http', 'magento', 'email', 'android-layout', 'flex', 'rest', 'maven', 'jsf', 'listview', 'date', 'winapi', 'windows-phone-7', 'facebook-graph-api', 'unix', 'url', 'c#-4.0', 'jquery-ajax', 'svn', 'symfony2', 'table', 'cakephp', 'firefox', 'ms-access', 'java-ee', 'jquery-mobile', 'python-2.7', 'tomcat', 'zend-framework', 'opencv', 'visual-c++', 'opengl', 'spring-mvc', 'sql-server-2005', 'authentication', 'search', 'xslt', 'servlets', 'pdf', 'animation', 'math', 'batch-file', 'excel-vba', 'iis', 'mod-rewrite', 'sharepoint', 'gwt', 'powershell', 'visual-studio-2012', 'haskell', 'grails', 'ubuntu', 'networking', 'nhibernate', 'design-patterns', 'testing', 'jpa', 'visual-studio-2008', 'core-data', 'user-interface', 'audio', 'backbone.js', 'gcc', 'mobile', 'design', 'activerecord', 'extjs', 'video', 'stored-procedures', 'optimization', 'drupal', 'image-processing', 'android-intent', 'logging', 'web-applications', 'razor', 'database-design', 'azure', 'vim', 'memory-management', 'model-view-controller', 'cordova', 'c++11', 'selenium', 'ssl', 'assembly', 'soap', 'boost', 'canvas', 'google-maps-api-3', 'netbeans', 'heroku', 'jsf-2', 'encryption', 'hadoop', 'linq-to-sql', 'dll', 'xpath', 'data-binding', 'windows-phone-8', 'phonegap', 'jdbc', 'python-3.x', 'twitter', 'mvvm', 'gui', 'web', 'jquery-plugins', 'numpy', 'deployment', 'ios7', 'emacs', 'knockout.js', 'graphics', 'joomla', 'unicode', 'windows-8', 'android-fragments', 'ant', 'command-line', 'version-control', 'yii', 'github', 'amazon-web-services', 'macros', 'ember.js', 'svg', 'opengl-es', 'django-models', 'solr', 'orm', 'blackberry', 'windows-7', 'ruby-on-rails-4', 'compiler', 'tcp', 'pdo', 'architecture', 'groovy', 'nginx', 'concurrency', 'paypal', 'iis-7', 'express', 'vbscript', 'google-chrome-extension', 'memory-leaks', 'rspec', 'actionscript', 'interface', 'fonts', 'oauth', 'ssh', 'tfs', 'junit', 'struts2', 'd3.js', 'coldfusion', '.net-4.0', 'jqgrid', 'asp-classic', 'https', 'plsql', 'stl', 'sharepoint-2010', 'asp.net-web-api', 'mysqli', 'sed', 'awk', 'internet-explorer-8', 'jboss', 'charts', 'scripting', 'matplotlib', 'laravel', 'clojure', 'entity-framework-4', 'intellij-idea', 'xml-parsing', 'sqlite3', '3d', 'io', 'mfc', 'devise', 'playframework', 'youtube', 'amazon-ec2', 'localization', 'cuda', 'jenkins', 'ssis', 'safari', 'doctrine2', 'vb6', 'amazon-s3', 'dojo', 'air', 'eclipse-plugin', 'android-asynctask', 'crystal-reports', 'cocos2d-iphone', 'dns', 'highcharts', 'ruby-on-rails-3.2', 'ado.net', 'sql-server-2008-r2', 'android-emulator', 'spring-security', 'cross-browser', 'oracle11g', 'bluetooth', 'f#', 'msbuild', 'drupal-7', 'google-apps-script', 'mercurial', 'xna', 'google-analytics', 'lua', 'parallel-processing', 'internationalization', 'java-me', 'mono', 'monotouch', 'android-ndk', 'lucene', 'kendo-ui', 'linux-kernel', 'terminal', 'phpmyadmin', 'makefile', 'ffmpeg', 'applet', 'active-directory', 'coffeescript', 'pandas', 'responsive-design', 'xhtml', 'silverlight-4.0', '.net-3.5', 'jaxb', 'ruby-on-rails-3.1', 'gps', 'geolocation', 'network-programming', 'windows-services', 'laravel-4', 'ggplot2', 'rss', 'webkit', 'functional-programming', 'wsdl', 'telerik', 'maven-2', 'cron', 'mapreduce', 'websocket', 'automation', 'windows-runtime', 'django-forms', 'tkinter', 'android-widget', 'android-activity', 'rubygems', 'content-management-system', 'doctrine', 'django-templates', 'gem', 'fluent-nhibernate', 'seo', 'meteor', 'serial-port', 'glassfish', 'documentation', 'cryptography', 'ef-code-first', 'extjs4', 'x86', 'wordpress-plugin', 'go', 'wix', 'linq-to-entities', 'oracle10g', 'cocos2d', 'selenium-webdriver', 'open-source', 'jtable', 'qt4', 'smtp', 'redis', 'jvm', 'openssl', 'timezone', 'nosql', 'erlang', 'playframework-2.0', 'machine-learning', 'mocking', 'unity3d', 'thread-safety', 'android-actionbar', 'jni', 'udp', 'jasper-reports', 'zend-framework2', 'apache2', 'internet-explorer-7', 'sqlalchemy', 'neo4j', 'ldap', 'jframe', 'youtube-api', 'filesystems', 'make', 'flask', 'gdb', 'cassandra', 'sms', 'g++', 'django-admin', 'push-notification', 'statistics', 'tinymce', 'locking', 'javafx', 'firefox-addon', 'fancybox', 'windows-phone', 'log4j', 'uikit', 'prolog', 'socket.io', 'icons', 'oauth-2.0', 'refactoring', 'sencha-touch', 'elasticsearch', 'symfony1', 'google-api', 'webserver', 'wpf-controls', 'microsoft-metro', 'gtk', 'flex4', 'three.js', 'gradle', 'centos', 'angularjs-directive', 'internet-explorer-9', 'sass', 'html5-canvas', 'interface-builder', 'programming-languages', 'gmail', 'jersey', 'twitter-bootstrap-3', 'arduino', 'requirejs', 'cmake', 'web-development', 'software-engineering', 'startups', 'entrepreneurship', 'social-media-marketing', 'writing', 'marketing', 'web-design', 'graphic-design', 'game-development', 'game-design', 'photoshop', 'illustrator', 'robotics', 'aws', 'devops', 'mathematica', 'bioinformatics', 'data-vis', 'ui', 'embedded-systems', 'codecombat']
+JobProfileView.commonLinkNames = commonLinkNames = ['GitHub', 'Facebook', 'Twitter', 'G+', 'LinkedIn', 'Personal Website', 'Blog']
 
-commonLinkNames = ['GitHub', 'Facebook', 'Twitter', 'G+', 'LinkedIn', 'Personal Website', 'Blog']
+JobProfileView.commonCountries = commonCountries = ['Afghanistan', 'Albania', 'Algeria', 'American Samoa', 'Andorra', 'Angola', 'Anguilla', 'Antarctica', 'Antigua and Barbuda', 'Argentina', 'Armenia', 'Aruba', 'Australia', 'Austria', 'Azerbaijan', 'Bahamas', 'Bahrain', 'Bangladesh', 'Barbados', 'Belarus', 'Belgium', 'Belize', 'Benin', 'Bermuda', 'Bhutan', 'Bolivia', 'Bosnia and Herzegovina', 'Botswana', 'Brazil', 'Brunei Darussalam', 'Bulgaria', 'Burkina Faso', 'Burundi', 'Cambodia', 'Cameroon', 'Canada', 'Cape Verde', 'Cayman Islands', 'Central African Republic', 'Chad', 'Chile', 'China', 'Christmas Island', 'Cocos (Keeling) Islands', 'Colombia', 'Comoros', 'Democratic Republic of the Congo (Kinshasa)', 'Congo, Republic of (Brazzaville)', 'Cook Islands', 'Costa Rica', 'Ivory Coast', 'Croatia', 'Cuba', 'Cyprus', 'Czech Republic', 'Denmark', 'Djibouti', 'Dominica', 'Dominican Republic', 'East Timor', 'Ecuador', 'Egypt', 'El Salvador', 'Equatorial Guinea', 'Eritrea', 'Estonia', 'Ethiopia', 'Falkland Islands', 'Faroe Islands', 'Fiji', 'Finland', 'France', 'French Guiana', 'French Polynesia', 'French Southern Territories', 'Gabon', 'Gambia', 'Georgia', 'Germany', 'Ghana', 'Gibraltar', 'Great Britain', 'Greece', 'Greenland', 'Grenada', 'Guadeloupe', 'Guam', 'Guatemala', 'Guinea', 'Guinea-Bissau', 'Guyana', 'Haiti', 'Holy See', 'Honduras', 'Hong Kong', 'Hungary', 'Iceland', 'India', 'Indonesia', 'Iran', 'Iraq', 'Ireland', 'Israel', 'Italy', 'Jamaica', 'Japan', 'Jordan', 'Kazakhstan', 'Kenya', 'Kiribati', 'North Korea', 'South Korea', 'Kosovo', 'Kuwait', 'Kyrgyzstan', 'Lao, People\'s Democratic Republic', 'Latvia', 'Lebanon', 'Lesotho', 'Liberia', 'Libya', 'Liechtenstein', 'Lithuania', 'Luxembourg', 'Macau', 'Macedonia, Rep. of', 'Madagascar', 'Malawi', 'Malaysia', 'Maldives', 'Mali', 'Malta', 'Marshall Islands', 'Martinique', 'Mauritania', 'Mauritius', 'Mayotte', 'Mexico', 'Micronesia, Federal States of', 'Moldova, Republic of', 'Monaco', 'Mongolia', 'Montenegro', 'Montserrat', 'Morocco', 'Mozambique', 'Myanmar, Burma', 'Namibia', 'Nauru', 'Nepal', 'Netherlands', 'Netherlands Antilles', 'New Caledonia', 'New Zealand', 'Nicaragua', 'Niger', 'Nigeria', 'Niue', 'Northern Mariana Islands', 'Norway', 'Oman', 'Pakistan', 'Palau', 'Palestinian territories', 'Panama', 'Papua New Guinea', 'Paraguay', 'Peru', 'Philippines', 'Pitcairn Island', 'Poland', 'Portugal', 'Puerto Rico', 'Qatar', 'Reunion Island', 'Romania', 'Russian Federation', 'Rwanda', 'Saint Kitts and Nevis', 'Saint Lucia', 'Saint Vincent and the Grenadines', 'Samoa', 'San Marino', 'Sao Tome and Principe', 'Saudi Arabia', 'Senegal', 'Serbia', 'Seychelles', 'Sierra Leone', 'Singapore', 'Slovakia', 'Slovenia', 'Solomon Islands', 'Somalia', 'South Africa', 'South Sudan', 'Spain', 'Sri Lanka', 'Sudan', 'Suriname', 'Swaziland', 'Sweden', 'Switzerland', 'Syria, Syrian Arab Republic', 'Taiwan', 'Tajikistan', 'Tanzania; officially the United Republic of Tanzania', 'Thailand', 'Tibet', 'Timor-Leste', 'Togo', 'Tokelau', 'Tonga', 'Trinidad and Tobago', 'Tunisia', 'Turkey', 'Turkmenistan', 'Turks and Caicos Islands', 'Tuvalu', 'Uganda', 'Ukraine', 'United Arab Emirates', 'United Kingdom', 'USA', 'Uruguay', 'Uzbekistan', 'Vanuatu', 'Vatican City State', 'Venezuela', 'Vietnam', 'Virgin Islands (British)', 'Virgin Islands (U.S.)', 'Wallis and Futuna Islands', 'Western Sahara', 'Yemen', 'Zambia', 'Zimbabwe']
 
-countries = ['Afghanistan', 'Albania', 'Algeria', 'American Samoa', 'Andorra', 'Angola', 'Anguilla', 'Antarctica', 'Antigua and Barbuda', 'Argentina', 'Armenia', 'Aruba', 'Australia', 'Austria', 'Azerbaijan', 'Bahamas', 'Bahrain', 'Bangladesh', 'Barbados', 'Belarus', 'Belgium', 'Belize', 'Benin', 'Bermuda', 'Bhutan', 'Bolivia', 'Bosnia and Herzegovina', 'Botswana', 'Brazil', 'Brunei Darussalam', 'Bulgaria', 'Burkina Faso', 'Burundi', 'Cambodia', 'Cameroon', 'Canada', 'Cape Verde', 'Cayman Islands', 'Central African Republic', 'Chad', 'Chile', 'China', 'Christmas Island', 'Cocos (Keeling) Islands', 'Colombia', 'Comoros', 'Democratic Republic of the Congo (Kinshasa)', 'Congo, Republic of (Brazzaville)', 'Cook Islands', 'Costa Rica', 'Ivory Coast', 'Croatia', 'Cuba', 'Cyprus', 'Czech Republic', 'Denmark', 'Djibouti', 'Dominica', 'Dominican Republic', 'East Timor', 'Ecuador', 'Egypt', 'El Salvador', 'Equatorial Guinea', 'Eritrea', 'Estonia', 'Ethiopia', 'Falkland Islands', 'Faroe Islands', 'Fiji', 'Finland', 'France', 'French Guiana', 'French Polynesia', 'French Southern Territories', 'Gabon', 'Gambia', 'Georgia', 'Germany', 'Ghana', 'Gibraltar', 'Great Britain', 'Greece', 'Greenland', 'Grenada', 'Guadeloupe', 'Guam', 'Guatemala', 'Guinea', 'Guinea-Bissau', 'Guyana', 'Haiti', 'Holy See', 'Honduras', 'Hong Kong', 'Hungary', 'Iceland', 'India', 'Indonesia', 'Iran', 'Iraq', 'Ireland', 'Israel', 'Italy', 'Jamaica', 'Japan', 'Jordan', 'Kazakhstan', 'Kenya', 'Kiribati', 'North Korea', 'South Korea', 'Kosovo', 'Kuwait', 'Kyrgyzstan', 'Lao, People\'s Democratic Republic', 'Latvia', 'Lebanon', 'Lesotho', 'Liberia', 'Libya', 'Liechtenstein', 'Lithuania', 'Luxembourg', 'Macau', 'Macedonia, Rep. of', 'Madagascar', 'Malawi', 'Malaysia', 'Maldives', 'Mali', 'Malta', 'Marshall Islands', 'Martinique', 'Mauritania', 'Mauritius', 'Mayotte', 'Mexico', 'Micronesia, Federal States of', 'Moldova, Republic of', 'Monaco', 'Mongolia', 'Montenegro', 'Montserrat', 'Morocco', 'Mozambique', 'Myanmar, Burma', 'Namibia', 'Nauru', 'Nepal', 'Netherlands', 'Netherlands Antilles', 'New Caledonia', 'New Zealand', 'Nicaragua', 'Niger', 'Nigeria', 'Niue', 'Northern Mariana Islands', 'Norway', 'Oman', 'Pakistan', 'Palau', 'Palestinian territories', 'Panama', 'Papua New Guinea', 'Paraguay', 'Peru', 'Philippines', 'Pitcairn Island', 'Poland', 'Portugal', 'Puerto Rico', 'Qatar', 'Reunion Island', 'Romania', 'Russian Federation', 'Rwanda', 'Saint Kitts and Nevis', 'Saint Lucia', 'Saint Vincent and the Grenadines', 'Samoa', 'San Marino', 'Sao Tome and Principe', 'Saudi Arabia', 'Senegal', 'Serbia', 'Seychelles', 'Sierra Leone', 'Singapore', 'Slovakia', 'Slovenia', 'Solomon Islands', 'Somalia', 'South Africa', 'South Sudan', 'Spain', 'Sri Lanka', 'Sudan', 'Suriname', 'Swaziland', 'Sweden', 'Switzerland', 'Syria, Syrian Arab Republic', 'Taiwan', 'Tajikistan', 'Tanzania; officially the United Republic of Tanzania', 'Thailand', 'Tibet', 'Timor-Leste', 'Togo', 'Tokelau', 'Tonga', 'Trinidad and Tobago', 'Tunisia', 'Turkey', 'Turkmenistan', 'Turks and Caicos Islands', 'Tuvalu', 'Uganda', 'Ukraine', 'United Arab Emirates', 'United Kingdom', 'USA', 'Uruguay', 'Uzbekistan', 'Vanuatu', 'Vatican City State', 'Venezuela', 'Vietnam', 'Virgin Islands (British)', 'Virgin Islands (U.S.)', 'Wallis and Futuna Islands', 'Western Sahara', 'Yemen', 'Zambia', 'Zimbabwe']
-
-commonCities = ['Tokyo', 'Jakarta', 'Seoul', 'Delhi', 'Shanghai', 'Manila', 'Karachi', 'New York', 'Sao Paulo', 'Mexico City', 'Cairo', 'Beijing', 'Osaka', 'Mumbai (Bombay)', 'Guangzhou', 'Moscow', 'Los Angeles', 'Calcutta', 'Dhaka', 'Buenos Aires', 'Istanbul', 'Rio de Janeiro', 'Shenzhen', 'Lagos', 'Paris', 'Nagoya', 'Lima', 'Chicago', 'Kinshasa', 'Tianjin', 'Chennai', 'Bogota', 'Bengaluru', 'London', 'Taipei', 'Ho Chi Minh City (Saigon)', 'Dongguan', 'Hyderabad', 'Chengdu', 'Lahore', 'Johannesburg', 'Tehran', 'Essen', 'Bangkok', 'Hong Kong', 'Wuhan', 'Ahmedabad', 'Chongqung', 'Baghdad', 'Hangzhou', 'Toronto', 'Kuala Lumpur', 'Santiago', 'Dallas-Fort Worth', 'Quanzhou', 'Miami', 'Shenyang', 'Belo Horizonte', 'Philadelphia', 'Nanjing', 'Madrid', 'Houston', 'Xi\'an-Xianyang', 'Milan', 'Luanda', 'Pune', 'Singapore', 'Riyadh', 'Khartoum', 'Saint Petersburg', 'Atlanta', 'Surat', 'Washington', 'Bandung', 'Surabaya', 'Yangoon', 'Alexandria', 'Guadalajara', 'Harbin', 'Boston', 'Zhengzhou', 'Qingdao', 'Abidjan', 'Barcelona', 'Monterrey', 'Ankara', 'Suzhou', 'Phoenix-Mesa', 'Salvador', 'Porto Alegre', 'Rome', 'Accra', 'Sydney', 'Recife', 'Naples', 'Detroit', 'Dalian', 'Fuzhou', 'Medellin', 'San Francisco', 'Silicon Valley', 'Portland', 'Seattle', 'Austin', 'Denver', 'Boulder']
+JobProfileView.commonCities = commonCities = ['Tokyo', 'Jakarta', 'Seoul', 'Delhi', 'Shanghai', 'Manila', 'Karachi', 'New York', 'Sao Paulo', 'Mexico City', 'Cairo', 'Beijing', 'Osaka', 'Mumbai (Bombay)', 'Guangzhou', 'Moscow', 'Los Angeles', 'Calcutta', 'Dhaka', 'Buenos Aires', 'Istanbul', 'Rio de Janeiro', 'Shenzhen', 'Lagos', 'Paris', 'Nagoya', 'Lima', 'Chicago', 'Kinshasa', 'Tianjin', 'Chennai', 'Bogota', 'Bengaluru', 'London', 'Taipei', 'Ho Chi Minh City (Saigon)', 'Dongguan', 'Hyderabad', 'Chengdu', 'Lahore', 'Johannesburg', 'Tehran', 'Essen', 'Bangkok', 'Hong Kong', 'Wuhan', 'Ahmedabad', 'Chongqung', 'Baghdad', 'Hangzhou', 'Toronto', 'Kuala Lumpur', 'Santiago', 'Dallas-Fort Worth', 'Quanzhou', 'Miami', 'Shenyang', 'Belo Horizonte', 'Philadelphia', 'Nanjing', 'Madrid', 'Houston', 'Xi\'an-Xianyang', 'Milan', 'Luanda', 'Pune', 'Singapore', 'Riyadh', 'Khartoum', 'Saint Petersburg', 'Atlanta', 'Surat', 'Washington', 'Bandung', 'Surabaya', 'Yangoon', 'Alexandria', 'Guadalajara', 'Harbin', 'Boston', 'Zhengzhou', 'Qingdao', 'Abidjan', 'Barcelona', 'Monterrey', 'Ankara', 'Suzhou', 'Phoenix-Mesa', 'Salvador', 'Porto Alegre', 'Rome', 'Accra', 'Sydney', 'Recife', 'Naples', 'Detroit', 'Dalian', 'Fuzhou', 'Medellin', 'San Francisco', 'Silicon Valley', 'Portland', 'Seattle', 'Austin', 'Denver', 'Boulder']
 
 autoFocus = true  # Not working right now, possibly a Treema bower thing.
 
@@ -128,5 +127,5 @@ class CityNode extends TreemaNode.nodeMap.string
 class CountryNode extends TreemaNode.nodeMap.string
   buildValueForEditing: (valEl) ->
     super(valEl)
-    valEl.find('input').autocomplete(source: countries, minLength: 1, delay: 0, autoFocus: autoFocus)
+    valEl.find('input').autocomplete(source: commonCountries, minLength: 1, delay: 0, autoFocus: autoFocus)
     valEl
diff --git a/app/views/account/profile_view.coffee b/app/views/account/profile_view.coffee
index 49249f317..8c88b2a39 100644
--- a/app/views/account/profile_view.coffee
+++ b/app/views/account/profile_view.coffee
@@ -1,76 +1,356 @@
 View = require 'views/kinds/RootView'
 template = require 'templates/account/profile'
 User = require 'models/User'
+LevelSession = require 'models/LevelSession'
+CocoCollection = require 'collections/CocoCollection'
+{me} = require 'lib/auth'
 JobProfileContactView = require 'views/modal/job_profile_contact_modal'
+JobProfileView = require 'views/account/job_profile_view'
+UserRemark = require 'models/UserRemark'
+forms = require 'lib/forms'
+ModelModal = require 'views/modal/model_modal'
+
+class LevelSessionsCollection extends CocoCollection
+  url: -> "/db/user/#{@userID}/level.sessions/employer"
+  model: LevelSession
+  constructor: (@userID) ->
+    super()
+
+adminContacts = [
+  {id: '', name: 'Assign a Contact'}
+  {id: '512ef4805a67a8c507000001', name: 'Nick'}
+  {id: '5162fab9c92b4c751e000274', name: 'Scott'}
+  {id: '51eb2714fa058cb20d0006ef', name: 'Michael'}
+  {id: '51538fdb812dd9af02000001', name: 'George'}
+  {id: '52a57252a89409700d0000d9', name: 'Ignore'}
+]
 
 module.exports = class ProfileView extends View
-  id: "profile-view"
+  id: 'profile-view'
   template: template
+  subscriptions:
+    'linkedin-loaded': 'onLinkedInLoaded'
 
   events:
+    'click #toggle-editing': 'toggleEditing'
+    'click #importLinkedIn': 'importLinkedIn'
+    'click #toggle-job-profile-active': 'toggleJobProfileActive'
     'click #toggle-job-profile-approved': 'toggleJobProfileApproved'
-    'click save-notes-button': 'onJobProfileNotesChanged'
+    'click #save-notes-button': 'onJobProfileNotesChanged'
     'click #contact-candidate': 'onContactCandidate'
     'click #enter-espionage-mode': 'enterEspionageMode'
+    'click #open-model-modal': 'openModelModal'
+    'click .editable-profile .profile-photo': 'onEditProfilePhoto'
+    'click .editable-profile .project-image': 'onEditProjectImage'
+    'click .editable-profile .editable-display': 'onEditSection'
+    'click .editable-profile .save-section': 'onSaveSection'
+    'click .editable-profile .glyphicon-remove': 'onCancelSectionEdit'
+    'change .editable-profile .editable-array input': 'onEditArray'
+    'keyup .editable-profile .editable-array input': 'onEditArray'
+    'click .editable-profile a': 'onClickLinkWhileEditing'
+    'change #admin-contact': 'onAdminContactChanged'
 
   constructor: (options, @userID) ->
+    @userID ?= me.id
     @onJobProfileNotesChanged = _.debounce @onJobProfileNotesChanged, 1000
+    @onRemarkChanged = _.debounce @onRemarkChanged, 1000
+    @authorizedWithLinkedIn = IN?.User?.isAuthorized()
+    @linkedInLoaded = Boolean(IN?.parse)
+    @waitingForLinkedIn = false
+    window.contractCallback = =>
+      @authorizedWithLinkedIn = IN?.User?.isAuthorized()
+      @render()
     super options
+    if User.isObjectID @userID
+      @finishInit()
+    else
+      $.ajax "/db/user/#{@userID}/nameToID", success: (@userID) =>
+        @finishInit() unless @destroyed
+        @render()
+
+  finishInit: ->
+    return unless @userID
+    @uploadFilePath = "db/user/#{@userID}"
+    @highlightedContainers = []
     if @userID is me.id
       @user = me
-    else if me.isAdmin() or "employer" in me.get('permissions')
+    else if me.isAdmin() or 'employer' in me.get('permissions')
       @user = User.getByID(@userID)
       @user.fetch()
-      @listenTo @user, "sync", =>
+      @listenTo @user, 'sync', =>
         @render()
+      $.post "/db/user/#{me.id}/track/view_candidate"
+      $.post "/db/user/#{@userID}/track/viewed_by_employer" unless me.isAdmin()
+    else
+      @user = User.getByID(@userID)
+    @sessions = @supermodel.loadCollection(new LevelSessionsCollection(@userID), 'candidate_sessions').model
+    if me.isAdmin()
+      # Mimicking how the VictoryModal fetches LevelFeedback
+      @remark = new UserRemark()
+      @remark.setURL "/db/user/#{@userID}/remark"
+      @remark.fetch()
+      @listenToOnce @remark, 'sync', @onRemarkLoaded
+      @listenToOnce @remark, 'error', @onRemarkNotFound
+
+  onRemarkLoaded: ->
+    @remark.setURL "/db/user.remark/#{@remark.id}"
+    @render()
+
+  onRemarkNotFound: ->
+    @remark = new UserRemark()  # hmm, why do we create a new one here?
+    @remark.set 'user', @userID
+    @remark.set 'userName', name if name = @user.get('name')
+
+  onLinkedInLoaded: =>
+    @linkedinLoaded = true
+    if @waitingForLinkedIn
+      @renderLinkedInButton()
+    @authorizedWithLinkedIn = IN?.User?.isAuthorized()
+
+  renderLinkedInButton: =>
+    IN?.parse()
+
+  afterInsert: ->
+    super()
+    linkedInButtonParentElement = document.getElementById('linkedInAuthButton')
+    if linkedInButtonParentElement
+      if @linkedinLoaded
+        @renderLinkedInButton()
+      else
+        @waitingForLinkedIn = true
+
+  importLinkedIn: =>
+    overwriteConfirm = confirm('Importing LinkedIn data will overwrite your current work experience, skills, name, descriptions, and education. Continue?')
+    unless overwriteConfirm then return
+    application.linkedinHandler.getProfileData (err, profileData) =>
+      @processLinkedInProfileData profileData
+
+  jobProfileSchema: -> @user.schema().properties.jobProfile.properties
+
+  processLinkedInProfileData: (p) ->
+    #handle formatted-name
+    currentJobProfile = @user.get('jobProfile')
+    oldJobProfile = _.cloneDeep(currentJobProfile)
+    jobProfileSchema = @user.schema().properties.jobProfile.properties
+
+    if p['formattedName']? and p['formattedName'] isnt 'private'
+      nameMaxLength = jobProfileSchema.name.maxLength
+      currentJobProfile.name = p['formattedName'].slice(0, nameMaxLength)
+    if p['skills']?['values'].length
+      skillNames = []
+      skillMaxLength = jobProfileSchema.skills.items.maxLength
+      for skill in p.skills.values
+        skillNames.push skill.skill.name.slice(0, skillMaxLength)
+      currentJobProfile.skills = skillNames
+    if p['headline']
+      shortDescriptionMaxLength = jobProfileSchema.shortDescription.maxLength
+      currentJobProfile.shortDescription = p['headline'].slice(0, shortDescriptionMaxLength)
+    if p['summary']
+      longDescriptionMaxLength = jobProfileSchema.longDescription.maxLength
+      currentJobProfile.longDescription = p.summary.slice(0, longDescriptionMaxLength)
+    if p['positions']?['values']?.length
+      newWorks = []
+      workSchema = jobProfileSchema.work.items.properties
+      for position in p['positions']['values']
+        workObj = {}
+        descriptionMaxLength = workSchema.description.maxLength
+
+        workObj.description = position.summary?.slice(0, descriptionMaxLength)
+        workObj.description ?= ''
+        if position.startDate?.year?
+          workObj.duration = "#{position.startDate.year} - "
+          if (not position.endDate?.year) or (position.endDate?.year and position.endDate?.year > (new Date().getFullYear()))
+            workObj.duration += 'present'
+          else
+            workObj.duration += position.endDate.year
+        else
+          workObj.duration = ''
+        durationMaxLength = workSchema.duration.maxLength
+        workObj.duration = workObj.duration.slice(0, durationMaxLength)
+        employerMaxLength = workSchema.employer.maxLength
+        workObj.employer = position.company?.name ? ''
+        workObj.employer = workObj.employer.slice(0, employerMaxLength)
+        workObj.role = position.title ? ''
+        roleMaxLength = workSchema.role.maxLength
+        workObj.role = workObj.role.slice(0, roleMaxLength)
+        newWorks.push workObj
+      currentJobProfile.work = newWorks
+
+    if p['educations']?['values']?.length
+      newEducation = []
+      eduSchema = jobProfileSchema.education.items.properties
+      for education in p['educations']['values']
+        educationObject = {}
+        educationObject.degree = education.degree ? 'Studied'
+
+        if education.startDate?.year?
+          educationObject.duration = "#{education.startDate.year} - "
+          if (not education.endDate?.year) or (education.endDate?.year and education.endDate?.year > (new Date().getFullYear()))
+            educationObject.duration += 'present'
+            if educationObject.degree is 'Studied'
+              educationObject.degree = 'Studying'
+          else
+            educationObject.duration += education.endDate.year
+        else
+          educationObject.duration = ''
+        if education.fieldOfStudy
+          if educationObject.degree is 'Studied' or educationObject.degree is 'Studying'
+            educationObject.degree += " #{education.fieldOfStudy}"
+          else
+            educationObject.degree += " in #{education.fieldOfStudy}"
+        educationObject.degree = educationObject.degree.slice(0, eduSchema.degree.maxLength)
+        educationObject.duration = educationObject.duration.slice(0, eduSchema.duration.maxLength)
+        educationObject.school = education.schoolName ? ''
+        educationObject.school = educationObject.school.slice(0, eduSchema.school.maxLength)
+        educationObject.description = ''
+        newEducation.push educationObject
+      currentJobProfile.education = newEducation
+    if p['publicProfileUrl']
+      #search for linkedin link
+      links = currentJobProfile.links
+      alreadyHasLinkedIn = false
+      for link in links
+        if link.link.toLowerCase().indexOf('linkedin') > -1
+          alreadyHasLinkedIn = true
+          break
+      unless alreadyHasLinkedIn
+        newLink =
+          link: p['publicProfileUrl']
+          name: 'LinkedIn'
+        currentJobProfile.links.push newLink
+    @user.set('jobProfile', currentJobProfile)
+    validationErrors = @user.validate()
+    if validationErrors
+      @user.set('jobProfile', oldJobProfile)
+      return alert("Please notify team@codecombat.com! There were validation errors from the LinkedIn import: #{JSON.stringify validationErrors}")
+    else
+      @render()
 
   getRenderData: ->
     context = super()
+    context.userID = @userID
+    context.linkedInAuthorized = @authorizedWithLinkedIn
+    context.jobProfileSchema = me.schema().properties.jobProfile
+    if @user and not jobProfile = @user.get 'jobProfile'
+      jobProfile = {}
+      for prop, schema of context.jobProfileSchema.properties
+        jobProfile[prop] = _.clone schema.default if schema.default?
+      for prop in context.jobProfileSchema.required
+        jobProfile[prop] ?= {string: '', boolean: false, number: 0, integer: 0, array: []}[context.jobProfileSchema.properties[prop].type]
+      @user.set 'jobProfile', jobProfile
+    jobProfile.name ?= (@user.get('firstName') + ' ' + @user.get('lastName')).trim() if @user?.get('firstName')
+    context.profile = jobProfile
     context.user = @user
-    context.allowedToViewJobProfile = me.isAdmin() or "employer" in me.get('permissions')
-    context.myProfile = @user.id is context.me.id
+    context.myProfile = @user?.id is context.me.id
+    context.allowedToViewJobProfile = @user and (me.isAdmin() or 'employer' in me.get('permissions') or (context.myProfile && !me.get('anonymous')))
+    context.allowedToEditJobProfile = @user and (me.isAdmin() or (context.myProfile && !me.get('anonymous')))
+    context.profileApproved = @user?.get 'jobProfileApproved'
+    context.progress = @progress ? @updateProgress()
+    @editing ?= context.myProfile and context.progress < 0.8
+    context.editing = @editing
     context.marked = marked
     context.moment = moment
     context.iconForLink = @iconForLink
-    if links = @user.get('jobProfile')?.links
+    if links = jobProfile?.links
       links = ($.extend(true, {}, link) for link in links)
       link.icon = @iconForLink link for link in links
       context.profileLinks = _.sortBy links, (link) -> not link.icon  # icons first
+    if @sessions
+      context.sessions = (s.attributes for s in @sessions.models when (s.get('submitted') or (s.get('levelID') is 'gridmancer') and s.get('code')?.thoktar?.plan?.length isnt 942))  # no default code
+      context.sessions.sort (a, b) -> (b.playtime ? 0) - (a.playtime ? 0)
+    else
+      context.sessions = []
+    context.adminContacts = adminContacts
+    context.remark = @remark
     context
 
   afterRender: ->
     super()
-    @updateProfileApproval() if me.isAdmin()
-    unless @user.get('jobProfile')?.projects?.length
+    if me.get('employerAt')
+      @$el.addClass 'viewed-by-employer'
+    return unless @user
+    unless @user.get('jobProfile')?.projects?.length or @editing
       @$el.find('.right-column').hide()
       @$el.find('.middle-column').addClass('double-column')
+    unless @editing
+      @$el.find('.editable-display').attr('title', '')
+    @initializeAutocomplete()
+    highlightNext = @highlightNext ? true
+    justSavedSection = @$el.find('#' + @justSavedSectionID).addClass 'just-saved'
+    _.defer =>
+      @progress = @updateProgress highlightNext
+      _.delay ->
+        justSavedSection.removeClass 'just-saved', duration: 1500, easing: 'easeOutQuad'
+      , 500
+    if me.isAdmin()
+      visibleSettings = ['history', 'tasks']
+      data = _.pick (@remark.attributes), (value, key) -> key in visibleSettings
+      data.history ?= []
+      data.tasks ?= []
+      schema = _.cloneDeep @remark.schema()
+      schema.properties = _.pick schema.properties, (value, key) => key in visibleSettings
+      schema.required = _.intersection (schema.required ? []), visibleSettings
+      treemaOptions =
+        filePath: "db/user/#{@userID}"
+        schema: schema
+        data: data
+        aceUseWrapMode: true
+        callbacks: {change: @onRemarkChanged}
+      @remarkTreema = @$el.find('#remark-treema').treema treemaOptions
+      @remarkTreema.build()
+      @remarkTreema.open(3)
 
-  updateProfileApproval: ->
-    approved = @user.get 'jobProfileApproved'
-    @$el.find('.approved').toggle Boolean(approved)
-    @$el.find('.not-approved').toggle not approved
+  onRemarkChanged: (e) =>
+    return unless @remarkTreema.isValid()
+    for key in ['history', 'tasks']
+      val = _.filter(@remarkTreema.get(key), (entry) -> entry?.content or entry?.action)
+      entry.date ?= (new Date()).toISOString() for entry in val if key is 'history'
+      @remark.set key, val
+    @saveRemark()
+
+  initializeAutocomplete: (container) ->
+    (container ? @$el).find('input[data-autocomplete]').each ->
+      $(@).autocomplete(source: JobProfileView[$(@).data('autocomplete')], minLength: parseInt($(@).data('autocomplete-min-length')), delay: 0, autoFocus: true)
+
+  toggleEditing: ->
+    @editing = not @editing
+    @render()
+    _.delay @renderLinkedInButton, 1000
+    @saveEdits()
 
   toggleJobProfileApproved: ->
+    return unless me.isAdmin()
     approved = not @user.get 'jobProfileApproved'
     @user.set 'jobProfileApproved', approved
-    @user.save()
-    @updateProfileApproval()
+    res = @user.save {jobProfileApproved: approved}, {patch: true}
+    res.success (model, response, options) => @render()
+
+  toggleJobProfileActive: ->
+    active = not @user.get('jobProfile').active
+    @user.get('jobProfile').active = active
+    @saveEdits()
+    if active and not (me.isAdmin() or @stackLed)
+      $.post '/stacklead'
+      @stackLed = true
 
   enterEspionageMode: ->
     postData = emailLower: @user.get('email').toLowerCase(), usernameLower: @user.get('name').toLowerCase()
     $.ajax
-      type: "POST",
-      url: "/auth/spy"
+      type: 'POST',
+      url: '/auth/spy'
       data: postData
       success: @espionageSuccess
 
   espionageSuccess: (model) ->
     window.location.reload()
 
+  openModelModal: (e) ->
+    @openModalView new ModelModal models: [@user]
+
   onJobProfileNotesChanged: (e) =>
-    notes = @$el.find("#job-profile-notes").val()
+    notes = @$el.find('#job-profile-notes').val()
     @user.set 'jobProfileNotes', notes
-    @user.save()
+    @user.save {jobProfileNotes: notes}, {patch: true}
 
   iconForLink: (link) ->
     icons = [
@@ -87,4 +367,220 @@ module.exports = class ProfileView extends View
     null
 
   onContactCandidate: (e) ->
-    @openModalView new JobProfileContactView recipientID: @user.id
+    @openModalView new JobProfileContactView recipientID: @user.id, recipientUserName: @user.get('name')
+
+  showErrors: (errors) ->
+    section = @$el.find '.saving'
+    console.error 'Couldn\'t save because of validation errors:', errors
+    section.removeClass 'saving'
+    forms.clearFormAlerts section
+    # This is pretty lame, since we don't easily match which field had the error like forms.applyErrorsToForm can.
+    section.find('form').addClass('has-error').find('.save-section').before($("<span class='help-block error-help-block'>#{errors[0].message}</span>"))
+
+  saveEdits: (highlightNext) ->
+    errors = @user.validate()
+    return @showErrors errors if errors
+    jobProfile = @user.get('jobProfile')
+    jobProfile.updated = (new Date()).toISOString() if @user is me
+    @user.set 'jobProfile', jobProfile
+    return unless res = @user.save()
+    res.error =>
+      return if @destroyed
+      @showErrors [message: res.responseText]
+    res.success (model, response, options) =>
+      return if @destroyed
+      @justSavedSectionID = @$el.find('.editable-section.saving').removeClass('saving').attr('id')
+      @highlightNext = highlightNext
+      @render()
+      @highlightNext = false
+      @justSavedSectionID = null
+
+  onEditProfilePhoto: (e) ->
+    onSaving = =>
+      @$el.find('.profile-photo').addClass('saving')
+    onSaved = (uploadingPath) =>
+      @user.get('jobProfile').photoURL = uploadingPath
+      @saveEdits()
+    filepicker.pick {mimetypes: 'image/*'}, @onImageChosen(onSaving, onSaved)
+
+  onEditProjectImage: (e) ->
+    img = $(e.target)
+    onSaving = =>
+      img.addClass('saving')
+    onSaved = (uploadingPath) =>
+      img.parent().find('input').val(uploadingPath)
+      img.css('background-image', "url('/file/#{uploadingPath}')")
+      img.removeClass('saving')
+    filepicker.pick {mimetypes: 'image/*'}, @onImageChosen(onSaving, onSaved)
+
+  formatImagePostData: (inkBlob) ->
+    url: inkBlob.url, filename: inkBlob.filename, mimetype: inkBlob.mimetype, path: @uploadFilePath, force: true
+
+  onImageChosen: (onSaving, onSaved) ->
+    (inkBlob) =>
+      onSaving()
+      uploadingPath = [@uploadFilePath, inkBlob.filename].join('/')
+      $.ajax '/file', type: 'POST', data: @formatImagePostData(inkBlob), success: @onImageUploaded(onSaved, uploadingPath)
+
+  onImageUploaded: (onSaved, uploadingPath) ->
+    (e) =>
+      onSaved uploadingPath
+
+  onEditSection: (e) ->
+    @$el.find('.emphasized').removeClass('emphasized')
+    section = $(e.target).closest('.editable-section').removeClass 'deemphasized'
+    section.find('.editable-form').show().find('select, input, textarea').first().focus()
+    section.find('.editable-display').hide()
+    @$el.find('.editable-section').not(section).addClass 'deemphasized'
+    column = section.closest('.full-height-column')
+    @$el.find('.full-height-column').not(column).addClass 'deemphasized'
+
+  onCancelSectionEdit: (e) ->
+    @render()
+
+  onSaveSection: (e) ->
+    e.preventDefault()
+    section = $(e.target).closest('.editable-section')
+    form = $(e.target).closest('form')
+    isEmpty = @arrayItemIsEmpty
+    section.find('.array-item').each ->
+      $(@).remove() if isEmpty @
+    resetOnce = false  # We have to clear out arrays if we're going to redo them
+    serialized = form.serializeArray()
+    jobProfile = @user.get 'jobProfile'
+    rootPropertiesSeen = {}
+    for field in serialized
+      keyChain = @extractFieldKeyChain field.name
+      value = @extractFieldValue keyChain[0], field.value
+      parent = jobProfile
+      for key, i in keyChain
+        rootPropertiesSeen[key] = true unless i
+        break if i is keyChain.length - 1
+        child = parent[key]
+        if _.isArray(child) and not resetOnce
+          child = parent[key] = []
+          resetOnce = true
+        else unless child?
+          child = parent[key] = {}
+        parent = child
+      if key is 'link' and keyChain[0] is 'projects' and not value
+        delete parent[key]
+      else
+        parent[key] = value
+    form.find('.editable-array').each ->
+      key = $(@).data('property')
+      unless rootPropertiesSeen[key]
+        jobProfile[key] = []
+    if section.hasClass('projects-container') and not section.find('.array-item').length
+      jobProfile.projects = []
+    section.addClass 'saving'
+    @saveEdits true
+
+  extractFieldKeyChain: (key) ->
+    # 'root[projects][0][name]' -> ['projects', '0', 'name']
+    key.replace(/^root/, '').replace(/\[(.*?)\]/g, '.$1').replace(/^\./, '').split(/\./)
+
+  extractFieldValue: (key, value) ->
+    switch key
+      when 'active' then Boolean value
+      when 'experience' then parseInt value or '0'
+      else value
+
+  arrayItemIsEmpty: (arrayItem) ->
+    for input in $(arrayItem).find('input[type!=hidden], textarea')
+      return false if $(input).val().trim()
+    true
+
+  onEditArray: (e) ->
+    # We make sure there's always an empty array item at the end for the user to add to, deleting interstitial empties.
+    array = $(e.target).closest('.editable-array')
+    arrayItems = array.find('.array-item')
+    toRemove = []
+    for arrayItem, index in arrayItems
+      empty = @arrayItemIsEmpty arrayItem
+      if index is arrayItems.length - 1
+        lastEmpty = empty
+      else if empty and not $(arrayItem).find('input:focus, textarea:focus').length
+        toRemove.unshift index
+    $(arrayItems[emptyIndex]).remove() for emptyIndex in toRemove
+    unless lastEmpty
+      clone = $(arrayItem).clone(false)
+      clone.find('input').each -> $(@).val('')
+      clone.find('textarea').each -> $(@).text('')
+      array.append clone
+      @initializeAutocomplete clone
+    for arrayItem, index in array.find('.array-item')
+      for input in $(arrayItem).find('input, textarea')
+        $(input).attr('name', $(input).attr('name').replace(/\[\d+\]/, "[#{index}]"))
+
+  onClickLinkWhileEditing: (e) ->
+    e.preventDefault()
+
+  onAdminContactChanged: (e) ->
+    newContact = @$el.find('#admin-contact').val()
+    newContactName = if newContact then _.find(adminContacts, id: newContact).name else ''
+    @remark.set 'contact', newContact
+    @remark.set 'contactName', newContactName
+    @saveRemark()
+
+  saveRemark: ->
+    @remark.set 'user', @user.id
+    @remark.set 'userName', @user.get('name')
+    if errors = @remark.validate()
+      return console.error 'UserRemark', @remark, 'failed validation with errors:', errors
+    res = @remark.save()
+    res.error =>
+      return if @destroyed
+      console.error 'UserRemark', @remark, 'failed to save with error:', res.responseText
+    res.success (model, response, options) =>
+      return if @destroyed
+      console.log 'Saved UserRemark', @remark, 'with response', response
+
+  updateProgress: (highlightNext) ->
+    return unless @user
+    completed = 0
+    totalWeight = 0
+    next = null
+    for metric in metrics = @getProgressMetrics()
+      done = metric.fn()
+      completed += metric.weight if done
+      totalWeight += metric.weight
+      next = metric unless next or done
+    progress = Math.round 100 * completed / totalWeight
+    bar = @$el.find('.profile-completion-progress .progress-bar')
+    bar.css 'width', "#{progress}%"
+    if next
+      text = ''
+      t = $.i18n.t
+      text = "#{progress}% #{t 'account_profile.complete'}. #{t 'account_profile.next'}: #{next.name}"
+      bar.parent().show().find('.progress-text').text text
+      if highlightNext and next?.container and not (next.container in @highlightedContainers)
+        @highlightedContainers.push next.container
+        @$el.find(next.container).addClass 'emphasized'
+        #@onEditSection target: next.container
+        #$('#page-container').scrollTop 0
+    else
+      bar.parent().hide()
+    completed / totalWeight
+
+  getProgressMetrics: ->
+    schema = me.schema().properties.jobProfile
+    jobProfile = @user.get('jobProfile') ? {}
+    exists = (field) -> -> jobProfile[field]
+    modified = (field) -> -> jobProfile[field] and jobProfile[field] isnt schema.properties[field].default
+    listStarted = (field, subfields) -> -> jobProfile[field]?.length and _.every subfields, (subfield) -> jobProfile[field][0][subfield]
+    t = $.i18n.t
+    @progressMetrics = [
+      {name: t('account_profile.next_name'), weight: 1, container: '#name-container', fn: modified 'name'}
+      {name: t('account_profile.next_short_description'), weight: 2, container: '#short-description-container', fn: modified 'shortDescription'}
+      {name: t('account_profile.next_skills'), weight: 2, container: '#skills-container', fn: -> jobProfile.skills?.length >= 5}
+      {name: t('account_profile.next_long_description'), weight: 3, container: '#long-description-container', fn: modified 'longDescription'}
+      {name: t('account_profile.next_work'), weight: 3, container: '#work-container', fn: listStarted 'work', ['role', 'employer']}
+      {name: t('account_profile.next_education'), weight: 3, container: '#education-container', fn: listStarted 'education', ['degree', 'school']}
+      {name: t('account_profile.next_projects'), weight: 3, container: '#projects-container', fn: listStarted 'projects', ['name']}
+      {name: t('account_profile.next_city'), weight: 1, container: '#basic-info-container', fn: modified 'city'}
+      {name: t('account_profile.next_country'), weight: 0, container: '#basic-info-container', fn: exists 'country'}
+      {name: t('account_profile.next_links'), weight: 2, container: '#links-container', fn: listStarted 'links', ['link', 'name']}
+      {name: t('account_profile.next_photo'), weight: 2, container: '#profile-photo-container', fn: modified 'photoURL'}
+      {name: t('account_profile.next_active'), weight: 1, fn: modified 'active'}
+    ]
diff --git a/app/views/account/settings_view.coffee b/app/views/account/settings_view.coffee
index 1aae7bc6a..7c49e2eb5 100644
--- a/app/views/account/settings_view.coffee
+++ b/app/views/account/settings_view.coffee
@@ -1,8 +1,8 @@
 View = require 'views/kinds/RootView'
 template = require 'templates/account/settings'
-{me} = require('lib/auth')
-forms = require('lib/forms')
-User = require('models/User')
+{me} = require 'lib/auth'
+forms = require 'lib/forms'
+User = require 'models/User'
 AuthModalView = require 'views/modal/auth_modal'
 
 WizardSettingsView = require './wizard_settings_view'
@@ -35,7 +35,7 @@ module.exports = class SettingsView extends View
       forms.clearFormAlerts($('#password-pane', @$el))
     )
 
-    @chooseTab(location.hash.replace('#',''))
+    @chooseTab(location.hash.replace('#', ''))
 
     wizardSettingsView = new WizardSettingsView()
     @listenTo wizardSettingsView, 'change', @save
@@ -107,12 +107,13 @@ module.exports = class SettingsView extends View
     @grabData()
     res = me.validate()
     if res?
+      console.error 'Couldn\'t save because of validation errors:', res
       forms.applyErrorsToForm(@$el, res)
       return
 
     return unless me.hasLocalChanges()
 
-    res = me.save()
+    res = me.patch()
     return unless res
     save = $('#save-button', @$el).text($.i18n.t('common.saving', defaultValue: 'Saving...'))
       .removeClass('btn-danger').addClass('btn-success').show()
@@ -134,7 +135,7 @@ module.exports = class SettingsView extends View
     bothThere = Boolean(password1) and Boolean(password2)
     if bothThere and password1 isnt password2
       message = $.i18n.t('account_settings.password_mismatch', defaultValue: 'Password does not match.')
-      err = [message:message, property:'password2', formatted:true]
+      err = [message: message, property: 'password2', formatted: true]
       forms.applyErrorsToForm(@$el, err)
       return
     if bothThere
@@ -144,7 +145,7 @@ module.exports = class SettingsView extends View
     me.set 'name', $('#name', @$el).val()
     me.set 'email', $('#email', @$el).val()
     for emailName, enabled of @getSubscriptions()
-      me.setEmailSubscription emailName, enabled 
+      me.setEmailSubscription emailName, enabled
     me.set 'photoURL', @pictureTreema.get('/photoURL')
 
     adminCheckbox = @$el.find('#admin')
diff --git a/app/views/account/unsubscribe_view.coffee b/app/views/account/unsubscribe_view.coffee
index 9c951abb0..e75ae7f4b 100644
--- a/app/views/account/unsubscribe_view.coffee
+++ b/app/views/account/unsubscribe_view.coffee
@@ -3,7 +3,7 @@ template = require 'templates/account/unsubscribe'
 {me} = require 'lib/auth'
 
 module.exports = class UnsubscribeView extends RootView
-  id: "unsubscribe-view"
+  id: 'unsubscribe-view'
   template: template
 
   events:
diff --git a/app/views/account/wizard_settings_view.coffee b/app/views/account/wizard_settings_view.coffee
index 1458f78de..6e441654f 100644
--- a/app/views/account/wizard_settings_view.coffee
+++ b/app/views/account/wizard_settings_view.coffee
@@ -1,6 +1,6 @@
 CocoView = require 'views/kinds/CocoView'
 template = require 'templates/account/wizard_settings'
-{me} = require('lib/auth')
+{me} = require 'lib/auth'
 ThangType = require 'models/ThangType'
 SpriteBuilder = require 'lib/sprites/SpriteBuilder'
 {hslToHex, hexToHSL} = require 'lib/utils'
@@ -77,7 +77,7 @@ module.exports = class WizardSettingsView extends CocoView
       input = colorGroup.find('.minicolors-input')
       hex = input.val()
       hsl = hexToHSL(hex)
-      config = {hue: hsl[0], saturation:hsl[1], lightness:hsl[2]}
+      config = {hue: hsl[0], saturation: hsl[1], lightness: hsl[2]}
       wizardSettings.colorConfig[colorName] = config
     else
       delete wizardSettings.colorConfig[colorName]
diff --git a/app/views/admin/base_view.coffee b/app/views/admin/base_view.coffee
index 5db653086..ca58690c0 100644
--- a/app/views/admin/base_view.coffee
+++ b/app/views/admin/base_view.coffee
@@ -2,5 +2,5 @@ RootView = require 'views/kinds/RootView'
 template = require 'templates/base'
 
 module.exports = class BaseView extends RootView
-  id: "base-view"
+  id: 'base-view'
   template: template
diff --git a/app/views/admin/clas_view.coffee b/app/views/admin/clas_view.coffee
index e099b4d10..96828e23e 100644
--- a/app/views/admin/clas_view.coffee
+++ b/app/views/admin/clas_view.coffee
@@ -2,7 +2,7 @@ View = require 'views/kinds/RootView'
 template = require 'templates/admin/clas'
 
 module.exports = class CLAsView extends View
-  id: "admin-clas-view"
+  id: 'admin-clas-view'
   template: template
   startsLoading: true
 
diff --git a/app/views/admin/employer_list_view.coffee b/app/views/admin/employer_list_view.coffee
new file mode 100644
index 000000000..b2ec64d77
--- /dev/null
+++ b/app/views/admin/employer_list_view.coffee
@@ -0,0 +1,159 @@
+View = require 'views/kinds/RootView'
+template = require 'templates/admin/employer_list'
+app = require 'application'
+User = require 'models/User'
+{me} = require 'lib/auth'
+CocoCollection = require 'collections/CocoCollection'
+ModelModal = require 'views/modal/model_modal'
+
+class EmployersCollection extends CocoCollection
+  url: '/db/user/x/employers'
+  model: User
+
+module.exports = class EmployersView extends View
+  id: 'employers-view'
+  template: template
+
+  events:
+    'click tbody tr td:first-child': 'onEmployerClicked'
+
+  constructor: (options) ->
+    super options
+    @getEmployers()
+
+  afterRender: ->
+    super()
+    @sortTable() if @employers.models.length
+
+  getRenderData: ->
+    ctx = super()
+    ctx.employers = @employers.models
+    ctx.moment = moment
+    ctx
+
+  getEmployers: ->
+    @employers = new EmployersCollection()
+    @employers.fetch()
+    # Re-render when we have fetched them, but don't wait and show a progress bar while loading.
+    @listenToOnce @employers, 'all', => @render()
+
+  sortTable: ->
+    # http://mottie.github.io/tablesorter/docs/example-widget-bootstrap-theme.html
+    $.extend $.tablesorter.themes.bootstrap,
+      # these classes are added to the table. To see other table classes available,
+      # look here: http://twitter.github.com/bootstrap/base-css.html#tables
+      table: 'table table-bordered'
+      caption: 'caption'
+      header: 'bootstrap-header' # give the header a gradient background
+      footerRow: ''
+      footerCells: ''
+      icons: '' # add 'icon-white' to make them white; this icon class is added to the <i> in the header
+      sortNone: 'bootstrap-icon-unsorted'
+      sortAsc: 'icon-chevron-up'  # glyphicon glyphicon-chevron-up' # we are still using v2 icons
+      sortDesc: 'icon-chevron-down'  # glyphicon-chevron-down' # we are still using v2 icons
+      active: '' # applied when column is sorted
+      hover: '' # use custom css here - bootstrap class may not override it
+      filterRow: '' # filter row class
+      even: '' # odd row zebra striping
+      odd: '' # even row zebra striping
+
+    # e = exact text from cell
+    # n = normalized value returned by the column parser
+    # f = search filter input value
+    # i = column index
+    # $r = ???
+    filterSelectExactMatch = (e, n, f, i, $r) -> e is f
+
+    # call the tablesorter plugin and apply the uitheme widget
+    @$el.find('.tablesorter').tablesorter
+      theme: 'bootstrap'
+      widthFixed: true
+      headerTemplate: '{content} {icon}'
+      textSorter:
+        6: (a, b, direction, column, table) ->
+          days = []
+          for s in [a, b]
+            n = parseInt s
+            n = 0 unless _.isNumber n
+            n = 1 if /^a/.test s
+            for [duration, factor] in [
+              [/second/i, 1 / (86400 * 1000)]
+              [/minute/i, 1 / 1440]
+              [/hour/i, 1 / 24]
+              [/week/i, 7]
+              [/month/i, 30.42]
+              [/year/i, 365.2425]
+            ]
+              if duration.test s
+                n *= factor
+                break
+            if /^in /i.test s
+              n *= -1
+            days.push n
+          days[0] - days[1]
+      sortList: [[6, 0]]
+      # widget code contained in the jquery.tablesorter.widgets.js file
+      # use the zebra stripe widget if you plan on hiding any rows (filter widget)
+      widgets: ['uitheme', 'zebra', 'filter']
+      widgetOptions:
+        # using the default zebra striping class name, so it actually isn't included in the theme variable above
+        # this is ONLY needed for bootstrap theming if you are using the filter widget, because rows are hidden
+        zebra: ['even', 'odd']
+
+        # extra css class applied to the table row containing the filters & the inputs within that row
+        filter_cssFilter: ''
+
+        # If there are child rows in the table (rows with class name from 'cssChildRow' option)
+        # and this option is true and a match is found anywhere in the child row, then it will make that row
+        # visible; default is false
+        filter_childRows: false
+
+        # if true, filters are collapsed initially, but can be revealed by hovering over the grey bar immediately
+        # below the header row. Additionally, tabbing through the document will open the filter row when an input gets focus
+        filter_hideFilters: false
+
+        # Set this option to false to make the searches case sensitive
+        filter_ignoreCase: true
+
+        # jQuery selector string of an element used to reset the filters
+        filter_reset: '.reset'
+
+        # Use the $.tablesorter.storage utility to save the most recent filters
+        filter_saveFilters: true
+
+        # Delay in milliseconds before the filter widget starts searching; This option prevents searching for
+        # every character while typing and should make searching large tables faster.
+        filter_searchDelay: 150
+
+        # Set this option to true to use the filter to find text from the start of the column
+        # So typing in 'a' will find 'albert' but not 'frank', both have a's; default is false
+        filter_startsWith: false
+
+        filter_functions:
+          3:
+            '0-1': (e, n, f, i, $r) -> parseInt(e) <= 1
+            '2-5': (e, n, f, i, $r) -> 2 <= parseInt(e) <= 5
+            '6+': (e, n, f, i, $r) -> 6 <= parseInt(e)
+          4:
+            '0-1': (e, n, f, i, $r) -> parseInt(e) <= 1
+            '2-5': (e, n, f, i, $r) -> 2 <= parseInt(e) <= 5
+            '6+': (e, n, f, i, $r) -> 6 <= parseInt(e)
+          5:
+            '0-1': (e, n, f, i, $r) -> parseInt(e) <= 1
+            '2-5': (e, n, f, i, $r) -> 2 <= parseInt(e) <= 5
+            '6+': (e, n, f, i, $r) -> 6 <= parseInt(e)
+          6:
+            'Last day': (e, n, f, i, $r) ->
+              days = parseFloat $($r.find('td')[i]).data('employer-age')
+              days <= 1
+            'Last week': (e, n, f, i, $r) ->
+              days = parseFloat $($r.find('td')[i]).data('employer-age')
+              days <= 7
+            'Last 4 weeks': (e, n, f, i, $r) ->
+              days = parseFloat $($r.find('td')[i]).data('employer-age')
+              days <= 28
+
+  onEmployerClicked: (e) ->
+    return unless id = $(e.target).closest('tr').data('employer-id')
+    employer = new User _id: id
+    @openModalView new ModelModal models: [employer]
diff --git a/app/views/admin/files_view.coffee b/app/views/admin/files_view.coffee
index 9df6deb10..f444bd91a 100644
--- a/app/views/admin/files_view.coffee
+++ b/app/views/admin/files_view.coffee
@@ -3,17 +3,17 @@ template = require 'templates/admin/files'
 tableTemplate = require 'templates/admin/files_table'
 
 module.exports = class FilesView extends RootView
-  id: "admin-files-view"
+  id: 'admin-files-view'
   template: template
-  
+
   events:
     'click #upload-button': -> filepicker.pick {mimetypes:'audio/*'}, @onFileChosen
     'change #folder-select': 'loadFiles'
-      
+
   afterRender: ->
     super()
     @loadFiles()
-  
+
   onFileChosen: (InkBlob) =>
     body =
       url: InkBlob.url
@@ -25,18 +25,18 @@ module.exports = class FilesView extends RootView
     # Automatically overwrite if the same path was put in here before
 #    body.force = true # if InkBlob.filename is @data
     @uploadingPath = [@currentFolder(), InkBlob.filename].join('/')
-    $.ajax('/file', { type: 'POST', data: body, success: @onFileUploaded })
+    $.ajax('/file', {type: 'POST', data: body, success: @onFileUploaded})
 
   onFileUploaded: (e) =>
     @loadFiles()
-    
+
   currentFolder: -> @$el.find('#folder-select').val()
 
   loadFiles: ->
     $.ajax
       url: "/file/#{@currentFolder()}/"
       success: @onLoadedFiles
-      
+
   onLoadedFiles: (res) =>
     table = tableTemplate({files:res})
-    @$el.find('#file-table').replaceWith(table)
\ No newline at end of file
+    @$el.find('#file-table').replaceWith(table)
diff --git a/app/views/admin/level_sessions_view.coffee b/app/views/admin/level_sessions_view.coffee
index c00fcc2fe..cca854cc3 100644
--- a/app/views/admin/level_sessions_view.coffee
+++ b/app/views/admin/level_sessions_view.coffee
@@ -8,7 +8,7 @@ class LevelSessionCollection extends Backbone.Collection
   model: LevelSession
 
 module.exports = class LevelSessionsView extends View
-  id: "admin-level-sessions-view"
+  id: 'admin-level-sessions-view'
   template: template
 
   constructor: (options) ->
diff --git a/app/views/admin/users_view.coffee b/app/views/admin/users_view.coffee
index acc9a8152..fa4aa1ba9 100644
--- a/app/views/admin/users_view.coffee
+++ b/app/views/admin/users_view.coffee
@@ -5,7 +5,7 @@ User = require 'models/User'
 module.exports = class UsersView extends View
   # TODO: Pagination, choosing filters on the page itself.
 
-  id: "admin-users-view"
+  id: 'admin-users-view'
   template: template
 
   constructor: (options) ->
@@ -41,4 +41,4 @@ module.exports = class UsersView extends View
   getRenderData: ->
     c = super()
     c.users = (user.attributes for user in @users.models)
-    c
\ No newline at end of file
+    c
diff --git a/app/views/admin_view.coffee b/app/views/admin_view.coffee
index 8c93ff616..6b0aadcc9 100644
--- a/app/views/admin_view.coffee
+++ b/app/views/admin_view.coffee
@@ -3,23 +3,24 @@ View = require 'views/kinds/RootView'
 template = require 'templates/admin'
 
 module.exports = class AdminView extends View
-  id: "admin-view"
+  id: 'admin-view'
   template: template
 
   events:
     'click #enter-espionage-mode': 'enterEspionageMode'
+    'click #increment-button': 'incrementUserAttribute'
 
   enterEspionageMode: ->
-    userEmail = $("#user-email").val().toLowerCase()
-    username = $("#user-username").val().toLowerCase()
+    userEmail = $('#user-email').val().toLowerCase()
+    username = $('#user-username').val().toLowerCase()
 
     postData =
       usernameLower: username
       emailLower: userEmail
 
     $.ajax
-      type: "POST",
-      url: "/auth/spy"
+      type: 'POST',
+      url: '/auth/spy'
       data: postData
       success: @espionageSuccess
       error: @espionageFailure
@@ -29,3 +30,8 @@ module.exports = class AdminView extends View
 
   espionageFailure: (jqxhr, status,error)->
     console.log "There was an error entering espionage mode: #{error}"
+
+  incrementUserAttribute: (e) ->
+    val = $('#increment-field').val()
+    me.set(val, me.get(val) + 1)
+    me.save()
diff --git a/app/views/cla_view.coffee b/app/views/cla_view.coffee
index 70269eaed..93f03aa56 100644
--- a/app/views/cla_view.coffee
+++ b/app/views/cla_view.coffee
@@ -3,7 +3,7 @@ template = require 'templates/cla'
 {me} = require 'lib/auth'
 
 module.exports = class CLAView extends View
-  id: "cla-view"
+  id: 'cla-view'
   template: template
 
   events:
@@ -17,8 +17,8 @@ module.exports = class CLAView extends View
   onAgree: ->
     @$el.find('#agreement-button').prop('disabled', true).text('Saving')
     $.ajax({
-      url: "/db/user/me/agreeToCLA"
-      data: { 'githubUsername': @$el.find('#github-username').val() }
+      url: '/db/user/me/agreeToCLA'
+      data: {'githubUsername': @$el.find('#github-username').val()}
       method: 'POST'
       success: @onAgreeSucceeded
       error: @onAgreeFailed
diff --git a/app/views/community_view.coffee b/app/views/community_view.coffee
index e31b09f33..69a140269 100644
--- a/app/views/community_view.coffee
+++ b/app/views/community_view.coffee
@@ -2,5 +2,5 @@ View = require 'views/kinds/RootView'
 template = require 'templates/community'
 
 module.exports = class CommunityView extends View
-  id: "community-view"
+  id: 'community-view'
   template: template
diff --git a/app/views/contribute/adventurer_view.coffee b/app/views/contribute/adventurer_view.coffee
index 9428a8624..deda5add5 100644
--- a/app/views/contribute/adventurer_view.coffee
+++ b/app/views/contribute/adventurer_view.coffee
@@ -1,8 +1,8 @@
 ContributeClassView = require 'views/contribute/contribute_class_view'
 template = require 'templates/contribute/adventurer'
-{me} = require('lib/auth')
+{me} = require 'lib/auth'
 
 module.exports = class AdventurerView extends ContributeClassView
-  id: "adventurer-view"
+  id: 'adventurer-view'
   template: template
   contributorClassName: 'adventurer'
diff --git a/app/views/contribute/ambassador_view.coffee b/app/views/contribute/ambassador_view.coffee
index 6ea7a68cd..73c35bf96 100644
--- a/app/views/contribute/ambassador_view.coffee
+++ b/app/views/contribute/ambassador_view.coffee
@@ -1,8 +1,8 @@
 ContributeClassView = require 'views/contribute/contribute_class_view'
 template = require 'templates/contribute/ambassador'
-{me} = require('lib/auth')
+{me} = require 'lib/auth'
 
 module.exports = class AmbassadorView extends ContributeClassView
-  id: "ambassador-view"
+  id: 'ambassador-view'
   template: template
   contributorClassName: 'ambassador'
diff --git a/app/views/contribute/archmage_view.coffee b/app/views/contribute/archmage_view.coffee
index 7ac7508ca..e29a9be5c 100644
--- a/app/views/contribute/archmage_view.coffee
+++ b/app/views/contribute/archmage_view.coffee
@@ -2,32 +2,32 @@ ContributeClassView = require 'views/contribute/contribute_class_view'
 template = require 'templates/contribute/archmage'
 
 module.exports = class ArchmageView extends ContributeClassView
-  id: "archmage-view"
+  id: 'archmage-view'
   template: template
   contributorClassName: 'archmage'
 
   contributors: [
-    {id: "52bfc3ecb7ec628868001297", name: "Tom Steinbrecher", github: "TomSteinbrecher"}
-    {id: "5272806093680c5817033f73", name: "Sébastien Moratinos", github: "smoratinos"}
-    {name: "deepak1556", avatar: "deepak", github: "deepak1556"}
-    {name: "Ronnie Cheng", avatar: "ronald", github: "rhc2104"}
-    {name: "Chloe Fan", avatar: "chloe", github: "chloester"}
-    {name: "Rachel Xiang", avatar: "rachel", github: "rdxiang"}
-    {name: "Dan Ristic", avatar: "dan", github: "dristic"}
-    {name: "Brad Dickason", avatar: "brad", github: "bdickason"}
-    {name: "Rebecca Saines", avatar: "becca"}
-    {name: "Laura Watiker", avatar: "laura", github: "lwatiker"}
-    {name: "Shiying Zheng", avatar: "shiying", github: "shiyingzheng"}
-    {name: "Mischa Lewis-Norelle", avatar: "mischa", github: "mlewisno"}
-    {name: "Paul Buser", avatar: "paul"}
-    {name: "Benjamin Stern", avatar: "ben"}
-    {name: "Alex Cotsarelis", avatar: "alex"}
-    {name: "Ken Stanley", avatar: "ken"}
-    {name: "devast8a", avatar: "", github: "devast8a"}
-    {name: "phansch", avatar: "", github: "phansch"}
-    {name: "Zach Martin", avatar: "", github: "zachster01"}
-    {name: "David Golds", avatar: ""}
-    {name: "gabceb", avatar: "", github: "gabceb"}
-    {name: "MDP66", avatar: "", github: "MDP66"}
-    {name: "Alexandru Caciulescu", avatar: "", github: "Darredevil"}
+    {id: '52bfc3ecb7ec628868001297', name: 'Tom Steinbrecher', github: 'TomSteinbrecher'}
+    {id: '5272806093680c5817033f73', name: 'Sébastien Moratinos', github: 'smoratinos'}
+    {name: 'deepak1556', avatar: 'deepak', github: 'deepak1556'}
+    {name: 'Ronnie Cheng', avatar: 'ronald', github: 'rhc2104'}
+    {name: 'Chloe Fan', avatar: 'chloe', github: 'chloester'}
+    {name: 'Rachel Xiang', avatar: 'rachel', github: 'rdxiang'}
+    {name: 'Dan Ristic', avatar: 'dan', github: 'dristic'}
+    {name: 'Brad Dickason', avatar: 'brad', github: 'bdickason'}
+    {name: 'Rebecca Saines', avatar: 'becca'}
+    {name: 'Laura Watiker', avatar: 'laura', github: 'lwatiker'}
+    {name: 'Shiying Zheng', avatar: 'shiying', github: 'shiyingzheng'}
+    {name: 'Mischa Lewis-Norelle', avatar: 'mischa', github: 'mlewisno'}
+    {name: 'Paul Buser', avatar: 'paul'}
+    {name: 'Benjamin Stern', avatar: 'ben'}
+    {name: 'Alex Cotsarelis', avatar: 'alex'}
+    {name: 'Ken Stanley', avatar: 'ken'}
+    {name: 'devast8a', avatar: '', github: 'devast8a'}
+    {name: 'phansch', avatar: '', github: 'phansch'}
+    {name: 'Zach Martin', avatar: '', github: 'zachster01'}
+    {name: 'David Golds', avatar: ''}
+    {name: 'gabceb', avatar: '', github: 'gabceb'}
+    {name: 'MDP66', avatar: '', github: 'MDP66'}
+    {name: 'Alexandru Caciulescu', avatar: '', github: 'Darredevil'}
   ]
diff --git a/app/views/contribute/artisan_view.coffee b/app/views/contribute/artisan_view.coffee
index dbad64902..7094dba98 100644
--- a/app/views/contribute/artisan_view.coffee
+++ b/app/views/contribute/artisan_view.coffee
@@ -1,25 +1,25 @@
 ContributeClassView = require 'views/contribute/contribute_class_view'
 template = require 'templates/contribute/artisan'
-{me} = require('lib/auth')
+{me} = require 'lib/auth'
 
 module.exports = class ArtisanView extends ContributeClassView
-  id: "artisan-view"
+  id: 'artisan-view'
   template: template
   contributorClassName: 'artisan'
 
   contributors: [
-    {name: "Sootn", avatar: ""}
-    {name: "Zach Martin", avatar: "", github: "zachster01"}
-    {name: "Aftermath", avatar: ""}
-    {name: "mcdavid1991", avatar: ""}
-    {name: "dwhittaker", avatar: ""}
-    {name: "Zacharias Fisches", avatar: ""}
-    {name: "Tom Setliff", avatar: ""}
-    {name: "Robert Moreton", avatar: "rob"}
-    {name: "Andrew Witcher", avatar: "andrew"}
-    {name: "Axandre Oge", avatar: "axandre"}
-    {name: "Katharine Chan", avatar: "katharine"}
-    {name: "Derek Wong", avatar: "derek"}
-    {name: "Alexandru Caciulescu", avatar: "", github: "Darredevil"}
-    {name: "Prabh Simran Singh Baweja", avatar: "", github: "prabh27"}
+    {name: 'Sootn', avatar: ''}
+    {name: 'Zach Martin', avatar: '', github: 'zachster01'}
+    {name: 'Aftermath', avatar: ''}
+    {name: 'mcdavid1991', avatar: ''}
+    {name: 'dwhittaker', avatar: ''}
+    {name: 'Zacharias Fisches', avatar: ''}
+    {name: 'Tom Setliff', avatar: ''}
+    {name: 'Robert Moreton', avatar: 'rob'}
+    {name: 'Andrew Witcher', avatar: 'andrew'}
+    {name: 'Axandre Oge', avatar: 'axandre'}
+    {name: 'Katharine Chan', avatar: 'katharine'}
+    {name: 'Derek Wong', avatar: 'derek'}
+    {name: 'Alexandru Caciulescu', avatar: '', github: 'Darredevil'}
+    {name: 'Prabh Simran Singh Baweja', avatar: '', github: 'prabh27'}
   ]
diff --git a/app/views/contribute/contribute_class_view.coffee b/app/views/contribute/contribute_class_view.coffee
index d9110c3fd..3da551ffb 100644
--- a/app/views/contribute/contribute_class_view.coffee
+++ b/app/views/contribute/contribute_class_view.coffee
@@ -1,6 +1,6 @@
 SignupModalView = require 'views/modal/signup_modal'
 View = require 'views/kinds/RootView'
-{me} = require('lib/auth')
+{me} = require 'lib/auth'
 contributorSignupAnonymousTemplate = require 'templates/contribute/contributor_signup_anonymous'
 contributorSignupTemplate = require 'templates/contribute/contributor_signup'
 contributorListTemplate = require 'templates/contribute/contributor_list'
@@ -34,9 +34,9 @@ module.exports = class ContributeClassView extends View
     el = $(e.target)
     checked = el.prop('checked')
     subscription = el.attr('name')
-    
+
     me.setEmailSubscription subscription+'News', checked
-    me.save()
+    me.patch()
     @openModalView new SignupModalView() if me.get 'anonymous'
     el.parent().find('.saved-notification').finish().show('fast').delay(3000).fadeOut(2000)
 
diff --git a/app/views/contribute/counselor_view.coffee b/app/views/contribute/counselor_view.coffee
index 6e5a6be2c..c2a8e4faf 100644
--- a/app/views/contribute/counselor_view.coffee
+++ b/app/views/contribute/counselor_view.coffee
@@ -1,8 +1,8 @@
 ContributeClassView = require 'views/contribute/contribute_class_view'
 template = require 'templates/contribute/counselor'
-{me} = require('lib/auth')
+{me} = require 'lib/auth'
 
 module.exports = class CounselorView extends ContributeClassView
-  id: "counselor-view"
+  id: 'counselor-view'
   template: template
   contributorClassName: 'counselor'
diff --git a/app/views/contribute/diplomat_view.coffee b/app/views/contribute/diplomat_view.coffee
index 0769af517..00b3dd7a7 100644
--- a/app/views/contribute/diplomat_view.coffee
+++ b/app/views/contribute/diplomat_view.coffee
@@ -1,8 +1,8 @@
 ContributeClassView = require 'views/contribute/contribute_class_view'
 template = require 'templates/contribute/diplomat'
-{me} = require('lib/auth')
+{me} = require 'lib/auth'
 
 module.exports = class DiplomatView extends ContributeClassView
-  id: "diplomat-view"
+  id: 'diplomat-view'
   template: template
   contributorClassName: 'diplomat'
diff --git a/app/views/contribute/scribe_view.coffee b/app/views/contribute/scribe_view.coffee
index 7f87a3275..d52d0106b 100644
--- a/app/views/contribute/scribe_view.coffee
+++ b/app/views/contribute/scribe_view.coffee
@@ -1,18 +1,18 @@
 ContributeClassView = require 'views/contribute/contribute_class_view'
 template = require 'templates/contribute/scribe'
-{me} = require('lib/auth')
+{me} = require 'lib/auth'
 
 module.exports = class ScribeView extends ContributeClassView
-  id: "scribe-view"
+  id: 'scribe-view'
   template: template
   contributorClassName: 'scribe'
 
   contributors: [
-    {name: "Ryan Faidley"}
-    {name: "Mischa Lewis-Norelle", github: "mlewisno"}
-    {name: "Tavio"}
-    {name: "Ronnie Cheng", github: "rhc2104"}
-    {name: "engstrom"}
-    {name: "Dman19993"}
-    {name: "mattinsler"}
+    {name: 'Ryan Faidley'}
+    {name: 'Mischa Lewis-Norelle', github: 'mlewisno'}
+    {name: 'Tavio'}
+    {name: 'Ronnie Cheng', github: 'rhc2104'}
+    {name: 'engstrom'}
+    {name: 'Dman19993'}
+    {name: 'mattinsler'}
   ]
diff --git a/app/views/contribute_view.coffee b/app/views/contribute_view.coffee
index 12a35c71f..fa772c75a 100644
--- a/app/views/contribute_view.coffee
+++ b/app/views/contribute_view.coffee
@@ -2,7 +2,7 @@ ContributeClassView = require 'views/contribute/contribute_class_view'
 template = require 'templates/contribute/contribute'
 
 module.exports = class ContributeView extends ContributeClassView
-  id: "contribute-view"
+  id: 'contribute-view'
   template: template
   navPrefix: ''
 
diff --git a/app/views/docs/components_view.coffee b/app/views/docs/components_view.coffee
new file mode 100644
index 000000000..f80decee3
--- /dev/null
+++ b/app/views/docs/components_view.coffee
@@ -0,0 +1,26 @@
+RootView = require 'views/kinds/RootView'
+template = require 'templates/docs/components'
+CocoCollection = require 'collections/CocoCollection'
+LevelComponent = require 'models/LevelComponent'
+
+class ComponentDocsCollection extends CocoCollection
+  url: '/db/level.component?project=name,description,dependencies,propertyDocumentation'
+  model: LevelComponent
+
+module.exports = class UnnamedView extends RootView
+  id: 'docs-components-view'
+  template: template
+
+  constructor: (options) ->
+    super(options)
+    @componentDocs = new ComponentDocsCollection()
+    @supermodel.loadCollection @componentDocs, 'components'
+    
+  onLoaded: ->
+    console.log 'we have the components...', (c.get('name') for c in @componentDocs.models)
+    super()
+
+  getRenderData: ->
+    c = super()
+    c.components = @componentDocs.models
+    c
diff --git a/app/views/editor/achievement/edit.coffee b/app/views/editor/achievement/edit.coffee
new file mode 100644
index 000000000..ce65446dd
--- /dev/null
+++ b/app/views/editor/achievement/edit.coffee
@@ -0,0 +1,107 @@
+View = require 'views/kinds/RootView'
+template = require 'templates/editor/achievement/edit'
+Achievement = require 'models/Achievement'
+ConfirmModal = require 'views/modal/confirm'
+
+module.exports = class AchievementEditView extends View
+  id: 'editor-achievement-edit-view'
+  template: template
+  startsLoading: true
+
+  events:
+    'click #save-button': 'saveAchievement'
+    'click #recalculate-button': 'confirmRecalculation'
+
+  subscriptions:
+    'save-new': 'saveAchievement'
+
+  constructor: (options, @achievementID) ->
+    super options
+    @achievement = new Achievement(_id: @achievementID)
+    @achievement.saveBackups = true
+
+    @listenToOnce(@achievement, 'error',
+      () =>
+        @hideLoading()
+        $(@$el).find('.main-content-area').children('*').not('#error-view').remove()
+
+        @insertSubView(new ErrorView())
+    )
+
+    @achievement.fetch()
+    @listenToOnce(@achievement, 'sync', @buildTreema)
+    @pushChangesToPreview = _.throttle(@pushChangesToPreview, 500)
+
+  buildTreema: ->
+    return if @treema? or (not @achievement.loaded)
+
+    @startsLoading = false
+    @render()
+    data = $.extend(true, {}, @achievement.attributes)
+    options =
+      data: data
+      filePath: "db/achievement/#{@achievement.get('_id')}"
+      schema: Achievement.schema
+      readOnly: me.get('anonymous')
+      callbacks:
+        change: @pushChangesToPreview
+    @treema = @$el.find('#achievement-treema').treema(options)
+
+    @treema.build()
+
+  pushChangesToPreview: =>
+    'TODO' # TODO might want some intrinsic preview thing
+
+  getRenderData: (context={}) ->
+    context = super(context)
+    context.achievement = @achievement
+    context.authorized = me.isAdmin()
+    context
+
+  openSaveModal: ->
+    'Maybe later' # TODO
+
+  saveAchievement: (e) ->
+    @treema.endExistingEdits()
+    for key, value of @treema.data
+      @achievement.set(key, value)
+
+    res = @achievement.save()
+
+    res.error (collection, response, options) =>
+      console.error response
+
+    res.success =>
+      url = "/editor/achievement/#{@achievement.get('slug') or @achievement.id}"
+      document.location.href = url
+
+  confirmRecalculation: (e) ->
+    renderData =
+      'confirmTitle': 'Are you really sure?'
+      'confirmBody': 'This will trigger recalculation of the achievement for all users. Are you really sure you want to go down this path?'
+      'confirmDecline': 'Not really'
+      'confirmConfirm': 'Definitely'
+
+    confirmModal = new ConfirmModal(renderData)
+    confirmModal.onConfirm @recalculateAchievement
+    @openModalView confirmModal
+
+  recalculateAchievement: =>
+    $.ajax
+      data: JSON.stringify(achievements: [@achievement.get('slug') or @achievement.get('_id')])
+      success: (data, status, jqXHR) ->
+        noty
+          timeout: 5000
+          text: 'Recalculation process started'
+          type: 'success'
+          layout: 'topCenter'
+      error: (jqXHR, status, error) ->
+        console.error jqXHR
+        noty
+          timeout: 5000
+          text: "Starting recalculation process failed with error code #{jqXHR.status}"
+          type: 'error'
+          layout: 'topCenter'
+      url: '/admin/earned.achievement/recalculate'
+      type: 'POST'
+      contentType: 'application/json'
diff --git a/app/views/editor/achievement/home.coffee b/app/views/editor/achievement/home.coffee
new file mode 100644
index 000000000..4f6a21b29
--- /dev/null
+++ b/app/views/editor/achievement/home.coffee
@@ -0,0 +1,19 @@
+SearchView = require 'views/kinds/SearchView'
+
+module.exports = class AchievementSearchView extends SearchView
+  id: 'editor-achievement-home-view'
+  modelLabel: 'Achievement'
+  model: require 'models/Achievement'
+  modelURL: '/db/achievement'
+  tableTemplate: require 'templates/editor/achievement/table'
+  projection: ['name', 'description', 'collection', 'slug']
+
+  getRenderData: ->
+    context = super()
+    context.currentEditor = 'editor.achievement_title'
+    context.currentNew = 'editor.new_achievement_title'
+    context.currentNewSignup = 'editor.new_achievement_title_login'
+    context.currentSearch = 'editor.achievement_search_title'
+    context.unauthorized = true unless me.isAdmin()
+    @$el.i18n()
+    context
diff --git a/app/views/editor/article/edit.coffee b/app/views/editor/article/edit.coffee
index c165c9701..1511ba155 100644
--- a/app/views/editor/article/edit.coffee
+++ b/app/views/editor/article/edit.coffee
@@ -6,7 +6,7 @@ Article = require 'models/Article'
 SaveVersionModal = require 'views/modal/save_version_modal'
 
 module.exports = class ArticleEditView extends View
-  id: "editor-article-edit-view"
+  id: 'editor-article-edit-view'
   template: template
   startsLoading: true
 
@@ -81,7 +81,7 @@ module.exports = class ArticleEditView extends View
     @preview.focus() if window.focus
     @preview.onload = => @pushChangesToPreview()
     return false
-    
+
   openSaveModal: ->
     @openModalView(new SaveVersionModal({model: @article}))
 
@@ -101,11 +101,12 @@ module.exports = class ArticleEditView extends View
       @disableModalInProgress(modal)
 
     res.success =>
+      @article.clearBackup()
       modal.modal('hide')
       url = "/editor/article/#{newArticle.get('slug') or newArticle.id}"
       document.location.href = url
 
   showVersionHistory: (e) ->
-    versionHistoryView = new VersionHistoryView article:@article, @articleID
+    versionHistoryView = new VersionHistoryView article: @article, @articleID
     @openModalView versionHistoryView
     Backbone.Mediator.publish 'level:view-switched', e
diff --git a/app/views/editor/article/home.coffee b/app/views/editor/article/home.coffee
index 41d7419f9..4f8fdab05 100644
--- a/app/views/editor/article/home.coffee
+++ b/app/views/editor/article/home.coffee
@@ -1,8 +1,17 @@
 SearchView = require 'views/kinds/SearchView'
 
 module.exports = class ThangTypeHomeView extends SearchView
-  id: "editor-article-home-view"
+  id: 'editor-article-home-view'
   modelLabel: 'Article'
   model: require 'models/Article'
   modelURL: '/db/article'
   tableTemplate: require 'templates/editor/article/table'
+
+  getRenderData: ->
+    context = super()
+    context.currentEditor = 'editor.article_title'
+    context.currentNew = 'editor.new_article_title'
+    context.currentNewSignup = 'editor.new_article_title_login'
+    context.currentSearch = 'editor.article_search_title'
+    @$el.i18n()
+    context
diff --git a/app/views/editor/article/preview.coffee b/app/views/editor/article/preview.coffee
index 74851e1c2..ef4d3455b 100644
--- a/app/views/editor/article/preview.coffee
+++ b/app/views/editor/article/preview.coffee
@@ -2,5 +2,5 @@ View = require 'views/kinds/RootView'
 template = require 'templates/editor/article/preview'
 
 module.exports = class PreviewView extends View
-  id: "editor-article-preview-view"
+  id: 'editor-article-preview-view'
   template: template
diff --git a/app/views/editor/article/versions_view.coffee b/app/views/editor/article/versions_view.coffee
index 63b040366..98d9f1c63 100644
--- a/app/views/editor/article/versions_view.coffee
+++ b/app/views/editor/article/versions_view.coffee
@@ -1,9 +1,9 @@
 VersionsModalView = require 'views/modal/versions_modal'
 
 module.exports = class ArticleVersionsView extends VersionsModalView
-  id: "editor-article-versions-view"
-  url: "/db/article/"
-  page: "article"
+  id: 'editor-article-versions-view'
+  url: '/db/article/'
+  page: 'article'
 
   constructor: (options, @ID) ->
-    super options, ID, require 'models/Article'
\ No newline at end of file
+    super options, ID, require 'models/Article'
diff --git a/app/views/editor/component/versions_view.coffee b/app/views/editor/component/versions_view.coffee
index 1edaad280..409dc8553 100755
--- a/app/views/editor/component/versions_view.coffee
+++ b/app/views/editor/component/versions_view.coffee
@@ -1,9 +1,9 @@
 VersionsModalView = require 'views/modal/versions_modal'
 
 module.exports = class ComponentVersionsView extends VersionsModalView
-  id: "editor-component-versions-view"
-  url: "/db/level.component/"
-  page: "component"
+  id: 'editor-component-versions-view'
+  url: '/db/level.component/'
+  page: 'component'
 
   constructor: (options, @ID) ->
-    super options, ID, require 'models/LevelComponent'
\ No newline at end of file
+    super options, ID, require 'models/LevelComponent'
diff --git a/app/views/editor/components/config.coffee b/app/views/editor/components/config.coffee
index 7b605a5a1..7fb37b3ab 100644
--- a/app/views/editor/components/config.coffee
+++ b/app/views/editor/components/config.coffee
@@ -6,7 +6,7 @@ LevelComponent = require 'models/LevelComponent'
 nodes = require '../level/treema_nodes'
 
 module.exports = class ComponentConfigView extends CocoView
-  id: "component-config-column-view"
+  id: 'component-config-column-view'
   template: template
   className: 'column'
   changed: false
@@ -29,7 +29,7 @@ module.exports = class ComponentConfigView extends CocoView
   afterRender: ->
     super()
     @buildTreema()
-    
+
   buildTreema: ->
     thangs = if @level? then @level.get('thangs') else []
     thangIDs = _.filter(_.pluck(thangs, 'id'))
@@ -68,5 +68,5 @@ module.exports = class ComponentConfigView extends CocoView
   onConfigEdited: =>
     @changed = true
     @callback?(@data())
-    
+
   data: -> @editThangTreema.data
diff --git a/app/views/editor/components/main.coffee b/app/views/editor/components/main.coffee
index e8040f231..234608a44 100644
--- a/app/views/editor/components/main.coffee
+++ b/app/views/editor/components/main.coffee
@@ -8,7 +8,7 @@ ComponentsCollection = require 'collections/ComponentsCollection'
 ComponentConfigView = require './config'
 
 module.exports = class ThangComponentEditView extends CocoView
-  id: "thang-components-edit-view"
+  id: 'thang-components-edit-view'
   template: template
 
   constructor: (options) ->
@@ -18,7 +18,7 @@ module.exports = class ThangComponentEditView extends CocoView
     @level = options.level
     @callback = options.callback
     @componentCollection = @supermodel.loadCollection(new ComponentsCollection(), 'components').model
-      
+
   afterRender: ->
     super()
     return unless @supermodel.finished()
@@ -31,7 +31,7 @@ module.exports = class ThangComponentEditView extends CocoView
       supermodel: @supermodel
       schema: level.schema().properties.thangs.items.properties.components
       data: _.cloneDeep @components
-      callbacks: {select: @onSelectExtantComponent, change:@onChangeExtantComponents}
+      callbacks: {select: @onSelectExtantComponent, change: @onChangeExtantComponents}
       noSortable: true
       nodeClasses:
         'thang-components-array': ThangComponentsArrayNode
@@ -49,13 +49,13 @@ module.exports = class ThangComponentEditView extends CocoView
     components = (m.attributes for m in @componentCollection.models)
     _.remove components, (comp) =>
       _.find extantComponents, {original: comp.original}  # already have this one added
-    components = _.sortBy components, (comp) -> comp.system + "." + comp.name
+    components = _.sortBy components, (comp) -> comp.system + '.' + comp.name
 
     treemaOptions =
       supermodel: @supermodel
-      schema: { type: 'array', items: LevelComponent.schema }
+      schema: {type: 'array', items: LevelComponent.schema}
       data: ($.extend(true, {}, c) for c in components)
-      callbacks: {select: @onSelectAddableComponent, enter: @onAddComponentEnterPressed }
+      callbacks: {select: @onSelectAddableComponent, enter: @onAddComponentEnterPressed}
       readOnly: true
       noSortable: true
       nodeClasses:
@@ -162,7 +162,7 @@ module.exports = class ThangComponentEditView extends CocoView
     id = node.data._id
     comp = _.find @componentCollection.models, id: id
     unless comp
-      return console.error "Couldn't find component for id", id, "out of", @components.models
+      return console.error 'Couldn\'t find component for id', id, 'out of', @components.models
     # Add all dependencies, recursively, unless we already have them
     toAdd = comp.getDependencies(@componentCollection.models)
     _.remove toAdd, (c1) =>
@@ -181,7 +181,6 @@ module.exports = class ThangComponentEditView extends CocoView
         treema.select()
         return
 
-
   reportChanges: ->
     @callback?($.extend(true, [], @extantComponentsTreema.data))
 
@@ -210,11 +209,11 @@ class ThangComponentNode extends TreemaObjectNode
 
   grabDBComponent: ->
     @component = @settings.supermodel.getModelByOriginalAndMajorVersion LevelComponent, @data.original, @data.majorVersion
-    console.error "Couldn't find comp for", @data.original, @data.majorVersion, "from models", @settings.supermodel.models unless @component
+    console.error 'Couldn\'t find comp for', @data.original, @data.majorVersion, 'from models', @settings.supermodel.models unless @component
 
   buildValueForDisplay: (valEl) ->
     return super valEl unless @data.original and @component
-    s = @component.get('system') + "." + @component.get('name')
+    s = @component.get('system') + '.' + @component.get('name')
     @buildValueForDisplaySimply valEl, s
 
 class ComponentArrayNode extends TreemaArrayNode
@@ -234,7 +233,7 @@ class ComponentNode extends TreemaObjectNode
   collection: false
 
   buildValueForDisplay: (valEl) ->
-    s = @data.system + "." + @data.name
+    s = @data.system + '.' + @data.name
     @buildValueForDisplaySimply valEl, s
 
   onEnterPressed: (args...) ->
diff --git a/app/views/editor/delta.coffee b/app/views/editor/delta.coffee
index 9036f5557..fe0f875da 100644
--- a/app/views/editor/delta.coffee
+++ b/app/views/editor/delta.coffee
@@ -21,7 +21,7 @@ module.exports = class DeltaView extends CocoView
   ###
   
   @deltaCounter: 0
-  className: "delta-view"
+  className: 'delta-view'
   template: template
 
   constructor: (options) ->
@@ -30,8 +30,7 @@ module.exports = class DeltaView extends CocoView
     @skipPaths = options.skipPaths
     
     for modelName in ['model', 'headModel', 'comparisonModel']
-      continue unless m = options[modelName]
-      @[modelName] = @supermodel.loadModel(m, 'document').model
+      @[modelName] = options[modelName]
     
     @buildDeltas() if @supermodel.finished()
     
@@ -44,26 +43,27 @@ module.exports = class DeltaView extends CocoView
       @expandedDeltas = @model.getExpandedDeltaWith(@comparisonModel)
     else
       @expandedDeltas = @model.getExpandedDelta()
-      
-    @filterExpandedDeltas()
+    [@expandedDeltas, @skippedDeltas] = @filterDeltas(@expandedDeltas)
       
     if @headModel
       @headDeltas = @headModel.getExpandedDelta()
+      @headDeltas = @filterDeltas(@headDeltas)[0]
       @conflicts = deltasLib.getConflicts(@headDeltas, @expandedDeltas)
 
-  filterExpandedDeltas: ->
-    return unless @skipPaths
+  filterDeltas: (deltas) ->
+    return [deltas, []] unless @skipPaths
     for path, i in @skipPaths
       @skipPaths[i] = [path] if _.isString(path)
     newDeltas = []
-    for delta in @expandedDeltas
+    skippedDeltas = []
+    for delta in deltas
       skip = false
       for skipPath in @skipPaths
         if _.isEqual _.first(delta.dataPath, skipPath.length), skipPath
           skip = true
           break
-      newDeltas.push delta unless skip
-    @expandedDeltas = newDeltas
+      if skip then skippedDeltas.push delta else newDeltas.push delta
+    [newDeltas, skippedDeltas]
 
   getRenderData: ->
     c = super()
@@ -87,7 +87,7 @@ module.exports = class DeltaView extends CocoView
       @expandDetails(deltaEl, deltaData)
       
   expandDetails: (deltaEl, deltaData) ->
-    treemaOptions = { schema: deltaData.schema, readOnly: true }
+    treemaOptions = { schema: deltaData.schema or {}, readOnly: true }
     
     if _.isObject(deltaData.left) and leftEl = deltaEl.find('.old-value')
       options = _.defaults {data: deltaData.left}, treemaOptions
@@ -109,5 +109,6 @@ module.exports = class DeltaView extends CocoView
 
   getApplicableDelta: ->
     delta = @model.getDelta()
-    delta = deltasLib.pruneConflictsFromDelta delta, @conflicts if @conflicts 
-    delta
\ No newline at end of file
+    delta = deltasLib.pruneConflictsFromDelta delta, @conflicts if @conflicts
+    delta = deltasLib.pruneExpandedDeltasFromDelta delta, @skippedDeltas if @skippedDeltas
+    delta
diff --git a/app/views/editor/level/add_thangs_view.coffee b/app/views/editor/level/add_thangs_view.coffee
index cf1824201..7a7070b17 100644
--- a/app/views/editor/level/add_thangs_view.coffee
+++ b/app/views/editor/level/add_thangs_view.coffee
@@ -4,14 +4,14 @@ ThangType = require 'models/ThangType'
 CocoCollection = require 'collections/CocoCollection'
 
 class ThangTypeSearchCollection extends CocoCollection
-  url: '/db/thang.type/search?project=true'
+  url: '/db/thang.type?project=true'
   model: ThangType
 
   addTerm: (term) ->
     @url += "&term=#{term}" if term
 
 module.exports = class AddThangsView extends View
-  id: "add-thangs-column"
+  id: 'add-thangs-column'
   className: 'add-thangs-palette thangs-column'
   template: add_thangs_template
   startsLoading: false
@@ -72,5 +72,5 @@ module.exports = class AddThangsView extends View
     @lastSearch = term
 
   onEscapePressed: ->
-    @$el.find('input#thang-search').val("")
-    @runSearch
\ No newline at end of file
+    @$el.find('input#thang-search').val('')
+    @runSearch
diff --git a/app/views/editor/level/component/edit.coffee b/app/views/editor/level/component/edit.coffee
index 6d416e011..a7bc51149 100644
--- a/app/views/editor/level/component/edit.coffee
+++ b/app/views/editor/level/component/edit.coffee
@@ -6,9 +6,9 @@ PatchesView = require 'views/editor/patches_view'
 SaveVersionModal = require 'views/modal/save_version_modal'
 
 module.exports = class LevelComponentEditView extends View
-  id: "editor-level-component-edit-view"
+  id: 'editor-level-component-edit-view'
   template: template
-  editableSettings: ['name', 'description', 'system', 'language', 'dependencies', 'propertyDocumentation', 'i18n']
+  editableSettings: ['name', 'description', 'system', 'codeLanguage', 'dependencies', 'propertyDocumentation', 'i18n']
 
   events:
     'click #done-editing-component-button': 'endEditing'
@@ -24,7 +24,8 @@ module.exports = class LevelComponentEditView extends View
   constructor: (options) ->
     super options
     @levelComponent = @supermodel.getModelByOriginalAndMajorVersion LevelComponent, options.original, options.majorVersion or 0
-    console.log "Couldn't get levelComponent for", options, "from", @supermodel.models unless @levelComponent
+    console.log 'Couldn\'t get levelComponent for', options, 'from', @supermodel.models unless @levelComponent
+    @onEditorChange = _.debounce @onEditorChange, 1000
 
   getRenderData: (context={}) ->
     context = super(context)
@@ -33,6 +34,7 @@ module.exports = class LevelComponentEditView extends View
     context
 
   onLoaded: -> @render()
+
   afterRender: ->
     super()
     @buildSettingsTreema()
@@ -43,6 +45,7 @@ module.exports = class LevelComponentEditView extends View
 
   buildSettingsTreema: ->
     data = _.pick @levelComponent.attributes, (value, key) => key in @editableSettings
+    data = $.extend(true, {}, data)
     schema = _.cloneDeep LevelComponent.schema
     schema.properties = _.pick schema.properties, (value, key) => key in @editableSettings
     schema.required = _.intersection schema.required, @editableSettings
@@ -95,6 +98,7 @@ module.exports = class LevelComponentEditView extends View
     @editor.on('change', @onEditorChange)
 
   onEditorChange: =>
+    return if @destroyed
     @levelComponent.set 'code', @editor.getValue()
     Backbone.Mediator.publish 'level-component-edited', levelComponent: @levelComponent
     null
@@ -109,7 +113,7 @@ module.exports = class LevelComponentEditView extends View
     Backbone.Mediator.publish 'level:view-switched', e
 
   startPatchingComponent: (e) ->
-    @openModalView new SaveVersionModal({model:@levelComponent})
+    @openModalView new SaveVersionModal({model: @levelComponent})
     Backbone.Mediator.publish 'level:view-switched', e
 
   toggleWatchComponent: ->
diff --git a/app/views/editor/level/component/new.coffee b/app/views/editor/level/component/new.coffee
index 88b7761b8..072a69df6 100644
--- a/app/views/editor/level/component/new.coffee
+++ b/app/views/editor/level/component/new.coffee
@@ -4,9 +4,8 @@ LevelComponent = require 'models/LevelComponent'
 forms = require 'lib/forms'
 {me} = require 'lib/auth'
 
-
 module.exports = class LevelComponentNewView extends View
-  id: "editor-level-component-new-modal"
+  id: 'editor-level-component-new-modal'
   template: template
   instant: false
   modalWidthPercent: 60
@@ -30,7 +29,7 @@ module.exports = class LevelComponentNewView extends View
     @showLoading()
     res.error =>
       @hideLoading()
-      console.log "Got errors:", JSON.parse(res.responseText)
+      console.log 'Got errors:', JSON.parse(res.responseText)
       forms.applyErrorsToForm(@$el, JSON.parse(res.responseText))
     res.success =>
       @supermodel.registerModel component
diff --git a/app/views/editor/level/components_tab_view.coffee b/app/views/editor/level/components_tab_view.coffee
index a0fe32f94..27f91ae87 100644
--- a/app/views/editor/level/components_tab_view.coffee
+++ b/app/views/editor/level/components_tab_view.coffee
@@ -9,7 +9,7 @@ class LevelComponentCollection extends Backbone.Collection
   model: LevelComponent
 
 module.exports = class ComponentsTabView extends View
-  id: "editor-level-components-tab-view"
+  id: 'editor-level-components-tab-view'
   template: template
   className: 'tab-pane'
 
@@ -35,13 +35,13 @@ module.exports = class ComponentsTabView extends View
 
     componentModels = @supermodel.getModels LevelComponent
     componentModelMap = {}
-    componentModelMap[comp.get('original')] = comp for comp in componentModels    
+    componentModelMap[comp.get('original')] = comp for comp in componentModels
     components = ({original: key.split('.')[0], majorVersion: parseInt(key.split('.')[1], 10), thangs: value, count: value.length} for key, value of @presentComponents)
     treemaData = _.sortBy components, (comp) ->
       comp = componentModelMap[comp.original]
       res = [comp.get('system'), comp.get('name')]
       return res
-      
+
     treemaOptions =
       supermodel: @supermodel
       schema: {type: 'array', items: {type: 'object', format: 'level-component'}}
@@ -82,9 +82,9 @@ class LevelComponentNode extends TreemaObjectNode
   valueClass: 'treema-level-component'
   collection: false
   buildValueForDisplay: (valEl) ->
-    count = if @data.count is 1 then @data.thangs[0] else ((if @data.count >= 100 then "100+" else @data.count) + " Thangs")
-    if @data.original.match ":"
-      name = "Old: " + @data.original.replace('systems/', '')
+    count = if @data.count is 1 then @data.thangs[0] else ((if @data.count >= 100 then '100+' else @data.count) + ' Thangs')
+    if @data.original.match ':'
+      name = 'Old: ' + @data.original.replace('systems/', '')
     else
       comp = _.find @settings.supermodel.getModels(LevelComponent), (m) =>
         m.get('original') is @data.original and m.get('version').major is @data.majorVersion
diff --git a/app/views/editor/level/edit.coffee b/app/views/editor/level/edit.coffee
index 1b19e68b2..eb9e879c0 100644
--- a/app/views/editor/level/edit.coffee
+++ b/app/views/editor/level/edit.coffee
@@ -19,12 +19,13 @@ VersionHistoryView = require './versions_view'
 ErrorView = require '../../error_view'
 
 module.exports = class EditorLevelView extends View
-  id: "editor-level-view"
+  id: 'editor-level-view'
   template: template
   cache: false
 
   events:
     'click #play-button': 'onPlayLevel'
+    'click .play-with-team-button': 'onPlayLevel'
     'click #commit-level-start-button': 'startCommittingLevel'
     'click #fork-level-start-button': 'startForkingLevel'
     'click #level-history-button': 'showVersionHistory'
@@ -34,7 +35,7 @@ module.exports = class EditorLevelView extends View
     'click #level-watch-button': 'toggleWatchLevel'
     'click #pop-level-i18n-button': -> @level.populateI18N()
     'mouseup .nav-tabs > li a': 'toggleTab'
-    
+
   constructor: (options, @levelID) ->
     super options
     @supermodel.shouldSaveBackups = (model) ->
@@ -73,10 +74,11 @@ module.exports = class EditorLevelView extends View
     Backbone.Mediator.publish 'level-loaded', level: @level
     @showReadOnly() if me.get('anonymous')
     @patchesView = @insertSubView(new PatchesView(@level), @$el.find('.patches-view'))
-    @listenTo @patchesView, 'accepted-patch', -> setTimeout "location.reload()", 400
+    @listenTo @patchesView, 'accepted-patch', -> location.reload()
     @$el.find('#level-watch-button').find('> span').toggleClass('secret') if @level.watching()
 
   onPlayLevel: (e) ->
+    team = $(e.target).data('team')
     sendLevel = =>
       @childWindow.Backbone.Mediator.publish 'level-reload-from-data', level: @level, supermodel: @supermodel
     if @childWindow and not @childWindow.closed
@@ -84,15 +86,16 @@ module.exports = class EditorLevelView extends View
       sendLevel()
     else
       # Create a new Window with a blank LevelView
-      scratchLevelID = @level.get('slug') + "?dev=true"
+      scratchLevelID = @level.get('slug') + '?dev=true'
+      scratchLevelID += "&team=#{team}" if team
       @childWindow = window.open("/play/level/#{scratchLevelID}", 'child_window', 'width=1024,height=560,left=10,top=10,location=0,menubar=0,scrollbars=0,status=0,titlebar=0,toolbar=0', true)
       @childWindow.onPlayLevelViewLoaded = (e) => sendLevel()  # still a hack
     @childWindow.focus()
 
   startPatchingLevel: (e) ->
-    @openModalView new SaveVersionModal({model:@level})
+    @openModalView new SaveVersionModal({model: @level})
     Backbone.Mediator.publish 'level:view-switched', e
-    
+
   startCommittingLevel: (e) ->
     @openModalView new LevelSaveView level: @level, supermodel: @supermodel
     Backbone.Mediator.publish 'level:view-switched', e
@@ -103,7 +106,7 @@ module.exports = class EditorLevelView extends View
     Backbone.Mediator.publish 'level:view-switched', e
 
   showVersionHistory: (e) ->
-    versionHistoryView = new VersionHistoryView level:@level, @levelID
+    versionHistoryView = new VersionHistoryView level: @level, @levelID
     @openModalView versionHistoryView
     Backbone.Mediator.publish 'level:view-switched', e
 
@@ -111,7 +114,7 @@ module.exports = class EditorLevelView extends View
     button = @$el.find('#level-watch-button')
     @level.watch(button.find('.watch').is(':visible'))
     button.find('> span').toggleClass('secret')
-    
+
   toggleTab: (e) ->
     @renderScrollbar()
     return unless $(document).width() <= 800
diff --git a/app/views/editor/level/fork_view.coffee b/app/views/editor/level/fork_view.coffee
index 9f8ffb229..522a21b1c 100644
--- a/app/views/editor/level/fork_view.coffee
+++ b/app/views/editor/level/fork_view.coffee
@@ -4,7 +4,7 @@ forms = require 'lib/forms'
 Level = require 'models/Level'
 
 module.exports = class LevelForkView extends View
-  id: "editor-level-fork-modal"
+  id: 'editor-level-fork-modal'
   template: template
   instant: false
   modalWidthPercent: 60
diff --git a/app/views/editor/level/home.coffee b/app/views/editor/level/home.coffee
index 247c9d3ff..f5db556e6 100644
--- a/app/views/editor/level/home.coffee
+++ b/app/views/editor/level/home.coffee
@@ -1,8 +1,17 @@
 SearchView = require 'views/kinds/SearchView'
 
 module.exports = class EditorSearchView extends SearchView
-  id: "editor-level-home-view"
+  id: 'editor-level-home-view'
   modelLabel: 'Level'
   model: require 'models/Level'
   modelURL: '/db/level'
   tableTemplate: require 'templates/editor/level/table'
+
+  getRenderData: ->
+    context = super()
+    context.currentEditor = 'editor.level_title'
+    context.currentNew = 'editor.new_level_title'
+    context.currentNewSignup = 'editor.new_level_title_login'
+    context.currentSearch = 'editor.level_search_title'
+    @$el.i18n()
+    context
diff --git a/app/views/editor/level/modal/world_select.coffee b/app/views/editor/level/modal/world_select.coffee
index 05cef5e38..adbbd11d3 100644
--- a/app/views/editor/level/modal/world_select.coffee
+++ b/app/views/editor/level/modal/world_select.coffee
@@ -57,7 +57,7 @@ module.exports = class WorldSelectModal extends View
     window.s = @surface
     @surface.playing = false
     @surface.setWorld @world
-    @surface.camera.zoomTo({x:262, y:-164}, 1.66, 0)
+    @surface.camera.zoomTo({x: 262, y: -164}, 1.66, 0)
     @showDefaults()
 
   showDefaults: ->
diff --git a/app/views/editor/level/save_view.coffee b/app/views/editor/level/save_view.coffee
index 75226dd54..3d95ee2f4 100644
--- a/app/views/editor/level/save_view.coffee
+++ b/app/views/editor/level/save_view.coffee
@@ -39,10 +39,10 @@ module.exports = class LevelSaveView extends SaveVersionModal
     for changeEl, i in changeEls
       model = models[i]
       try
-        deltaView = new DeltaView({model:model})
+        deltaView = new DeltaView({model: model})
         @insertSubView(deltaView, $(changeEl))
       catch e
-        console.error "Couldn't create delta view:", e
+        console.error 'Couldn\'t create delta view:', e
 
   shouldSaveEntity: (m) ->
     return false unless m.hasWriteAccess()
@@ -53,19 +53,19 @@ module.exports = class LevelSaveView extends SaveVersionModal
 
   commitLevel: ->
     modelsToSave = []
-    @showLoading()
+    formsToSave = []
     for form in @$el.find('form')
       # Level form is first, then LevelComponents' forms, then LevelSystems' forms
       fields = {}
       for field in $(form).serializeArray()
-        fields[field.name] = if field.value is "on" then true else field.value
+        fields[field.name] = if field.value is 'on' then true else field.value
       isLevelForm = $(form).attr('id') is 'save-level-form'
       if isLevelForm
         model = @level
       else
         [kind, klass] = if $(form).hasClass 'component-form' then ['component', LevelComponent] else ['system', LevelSystem]
         model = @supermodel.getModelByOriginalAndMajorVersion klass, fields["#{kind}-original"], parseInt(fields["#{kind}-parent-major-version"], 10)
-        console.log "Couldn't find model for", kind, fields, "from", @supermodel.models unless model
+        console.log 'Couldn\'t find model for', kind, fields, 'from', @supermodel.models unless model
       newModel = if fields.major then model.cloneNewMajorVersion() else model.cloneNewMinorVersion()
       newModel.set 'commitMessage', fields['commit-message']
       modelsToSave.push newModel
@@ -75,15 +75,29 @@ module.exports = class LevelSaveView extends SaveVersionModal
           @level.publish()
       else if @level.isPublished() and not newModel.isPublished()
         newModel.publish()  # Publish any LevelComponents that weren't published yet
+      formsToSave.push form
 
+    for model in modelsToSave
+      if errors = model.getValidationErrors()
+        messages = ("\t #{error.dataPath}: #{error.message}" for error in errors)
+        messages = messages.join('<br />')
+        @$el.find('#errors-wrapper .errors').html(messages)
+        @$el.find('#errors-wrapper').removeClass('hide')
+        return
+
+    @showLoading()
+    tuples = _.zip(modelsToSave, formsToSave)
+    for [newModel, form] in tuples
       res = newModel.save()
       do (newModel, form) =>
         res.error =>
           @hideLoading()
-          console.log "Got errors:", JSON.parse(res.responseText)
+          console.log 'Got errors:', JSON.parse(res.responseText)
           forms.applyErrorsToForm($(form), JSON.parse(res.responseText))
         res.success =>
           modelsToSave = _.without modelsToSave, newModel
+          oldModel = _.find @supermodel.models, (m) -> m.get('original') is newModel.get('original')
+          oldModel.clearBackup()  # Otherwise looking at old versions is confusing.
           unless modelsToSave.length
             url = "/editor/level/#{@level.get('slug') or @level.id}"
             document.location.href = url
diff --git a/app/views/editor/level/scripts_tab_view.coffee b/app/views/editor/level/scripts_tab_view.coffee
index b2789948f..7a3e96c65 100644
--- a/app/views/editor/level/scripts_tab_view.coffee
+++ b/app/views/editor/level/scripts_tab_view.coffee
@@ -5,7 +5,7 @@ Surface = require 'lib/surface/Surface'
 nodes = require './treema_nodes'
 
 module.exports = class ScriptsTabView extends View
-  id: "editor-level-scripts-tab-view"
+  id: 'editor-level-scripts-tab-view'
   template: template
   className: 'tab-pane'
 
@@ -16,7 +16,7 @@ module.exports = class ScriptsTabView extends View
     super options
     @world = options.world
     @files = options.files
-  
+
   onLoaded: ->
   onLevelLoaded: (e) ->
     @level = e.level
@@ -86,7 +86,6 @@ module.exports = class ScriptsTabView extends View
   onScriptChanged: =>
     @scriptsTreema.set(@selectedScriptPath, @scriptTreema.data)
 
-
 class ScriptNode extends TreemaObjectNode
   valueClass: 'treema-script'
   collection: false
@@ -109,7 +108,6 @@ class ScriptNode extends TreemaObjectNode
     return unless firstRow?
     firstRow.select()
 
-
 class EventPropsNode extends TreemaNode.nodeMap.string
   valueClass: 'treema-event-props'
 
@@ -152,32 +150,6 @@ class EventPrereqNode extends TreemaNode.nodeMap.object
 class ChannelNode extends TreemaNode.nodeMap.string
   buildValueForEditing: (valEl) ->
     super(valEl)
-    valEl.find('input').autocomplete(source: channels, minLength: 0, delay: 0, autoFocus: true)
+    autocompleteValues = ({label: val?.title or key, value: key} for key, val of Backbone.Mediator.channelSchemas)
+    valEl.find('input').autocomplete(source: autocompleteValues, minLength: 0, delay: 0, autoFocus: true)
     valEl
-
-channels = [
-  "tome:palette-hovered",
-  "tome:palette-clicked",
-  "tome:spell-shown",
-  "end-current-script",
-  "goal-manager:new-goal-states",
-  "god:new-world-created",
-  "help-multiplayer",
-  "help-next",
-  "help-overview",
-  "level-restart-ask",
-  "level-set-playing",
-  "level:docs-hidden",
-  "level:team-set",
-  "playback:manually-scrubbed",
-  "sprite:speech-updated",
-  "surface:coordinates-shown",
-  "surface:frame-changed",
-  "surface:sprite-selected",
-  "world:thang-attacked-when-out-of-range",
-  "world:thang-collected-item",
-  "world:thang-died",
-  "world:thang-left-map",
-  "world:thang-touched-goal",
-  "world:won"
-]
diff --git a/app/views/editor/level/settings_tab_view.coffee b/app/views/editor/level/settings_tab_view.coffee
index f834e172c..b3f99150c 100644
--- a/app/views/editor/level/settings_tab_view.coffee
+++ b/app/views/editor/level/settings_tab_view.coffee
@@ -51,4 +51,5 @@ module.exports = class SettingsTabView extends View
   onSettingsChanged: (e) =>
     $('.level-title').text @settingsTreema.data.name
     for key in @editableSettings
+      continue if @settingsTreema.data[key] is undefined
       @level.set key, @settingsTreema.data[key]
diff --git a/app/views/editor/level/system/add.coffee b/app/views/editor/level/system/add.coffee
index 64caa52b4..28a362809 100644
--- a/app/views/editor/level/system/add.coffee
+++ b/app/views/editor/level/system/add.coffee
@@ -5,11 +5,11 @@ LevelSystem = require 'models/LevelSystem'
 CocoCollection = require 'collections/CocoCollection'
 
 class LevelSystemSearchCollection extends CocoCollection
-  url: '/db/level_system/search'
+  url: '/db/level_system'
   model: LevelSystem
 
 module.exports = class LevelSystemAddView extends View
-  id: "editor-level-system-add-modal"
+  id: 'editor-level-system-add-modal'
   template: template
   instant: true
 
@@ -52,7 +52,7 @@ module.exports = class LevelSystemAddView extends View
     id = $(e.currentTarget).data('system-id')
     system = _.find @systems.models, id: id
     unless system
-      return console.error "Couldn't find system for id", id, "out of", @systems.models
+      return console.error 'Couldn\'t find system for id', id, 'out of', @systems.models
     # Add all dependencies, recursively, unless we already have them
     toAdd = system.getDependencies(@systems.models)
     _.remove toAdd, (s1) =>
diff --git a/app/views/editor/level/system/edit.coffee b/app/views/editor/level/system/edit.coffee
index 404ac360b..f9e9646db 100644
--- a/app/views/editor/level/system/edit.coffee
+++ b/app/views/editor/level/system/edit.coffee
@@ -6,9 +6,9 @@ PatchesView = require 'views/editor/patches_view'
 SaveVersionModal = require 'views/modal/save_version_modal'
 
 module.exports = class LevelSystemEditView extends View
-  id: "editor-level-system-edit-view"
+  id: 'editor-level-system-edit-view'
   template: template
-  editableSettings: ['name', 'description', 'language', 'dependencies', 'propertyDocumentation', 'i18n']
+  editableSettings: ['name', 'description', 'codeLanguage', 'dependencies', 'propertyDocumentation', 'i18n']
 
   events:
     'click #done-editing-system-button': 'endEditing'
@@ -24,7 +24,7 @@ module.exports = class LevelSystemEditView extends View
   constructor: (options) ->
     super options
     @levelSystem = @supermodel.getModelByOriginalAndMajorVersion LevelSystem, options.original, options.majorVersion or 0
-    console.log "Couldn't get levelSystem for", options, "from", @supermodel.models unless @levelSystem
+    console.log 'Couldn\'t get levelSystem for', options, 'from', @supermodel.models unless @levelSystem
 
   getRenderData: (context={}) ->
     context = super(context)
@@ -106,7 +106,7 @@ module.exports = class LevelSystemEditView extends View
     Backbone.Mediator.publish 'level:view-switched', e
 
   startPatchingSystem: (e) ->
-    @openModalView new SaveVersionModal({model:@levelSystem})
+    @openModalView new SaveVersionModal({model: @levelSystem})
     Backbone.Mediator.publish 'level:view-switched', e
 
   toggleWatchSystem: ->
diff --git a/app/views/editor/level/system/new.coffee b/app/views/editor/level/system/new.coffee
index 4b91a7df6..1ddd8d158 100644
--- a/app/views/editor/level/system/new.coffee
+++ b/app/views/editor/level/system/new.coffee
@@ -4,9 +4,8 @@ LevelSystem = require 'models/LevelSystem'
 forms = require 'lib/forms'
 {me} = require 'lib/auth'
 
-
 module.exports = class LevelSystemNewView extends View
-  id: "editor-level-system-new-modal"
+  id: 'editor-level-system-new-modal'
   template: template
   instant: false
   modalWidthPercent: 60
@@ -29,7 +28,7 @@ module.exports = class LevelSystemNewView extends View
     @showLoading()
     res.error =>
       @hideLoading()
-      console.log "Got errors:", JSON.parse(res.responseText)
+      console.log 'Got errors:', JSON.parse(res.responseText)
       forms.applyErrorsToForm(@$el, JSON.parse(res.responseText))
     res.success =>
       @supermodel.registerModel system
diff --git a/app/views/editor/level/systems_tab_view.coffee b/app/views/editor/level/systems_tab_view.coffee
index 4d3ed88c6..a3b6df3f2 100644
--- a/app/views/editor/level/systems_tab_view.coffee
+++ b/app/views/editor/level/systems_tab_view.coffee
@@ -8,7 +8,7 @@ LevelSystemAddView = require './system/add'
 {ThangTypeNode} = require './treema_nodes'
 
 module.exports = class SystemsTabView extends View
-  id: "editor-level-systems-tab-view"
+  id: 'editor-level-systems-tab-view'
   template: template
   className: 'tab-pane'
 
@@ -33,10 +33,10 @@ module.exports = class SystemsTabView extends View
 
   afterRender: ->
     @buildSystemsTreema()
-    
+
   onLoaded: ->
     super()
-      
+
   onLevelLoaded: (e) ->
     @level = e.level
     @buildSystemsTreema()
@@ -109,21 +109,21 @@ module.exports = class SystemsTabView extends View
 
   buildDefaultSystems: ->
     [
-      {original: "528112c00268d018e3000008", majorVersion: 0}  # Event
-      {original: "5280f83b8ae1581b66000001", majorVersion: 0, config: {lifespan: 60}}  # Existence
-      {original: "5281146f0268d018e3000014", majorVersion: 0}  # Programming
-      {original: "528110f30268d018e3000001", majorVersion: 0}  # AI
-      {original: "52810ffa33e01a6e86000012", majorVersion: 0}  # Action
-      {original: "528114b20268d018e3000017", majorVersion: 0}  # Targeting
-      {original: "528105f833e01a6e86000007", majorVersion: 0}  # Collision
-      {original: "528113240268d018e300000c", majorVersion: 0, config: {gravity: 9.81}}  # Movement
-      {original: "528112530268d018e3000007", majorVersion: 0}  # Combat
-      {original: "52810f4933e01a6e8600000c", majorVersion: 0}  # Hearing
-      {original: "528115040268d018e300001b", majorVersion: 0}  # Vision
-      {original: "5280dc4d251616c907000001", majorVersion: 0}  # Inventory
-      {original: "528111b30268d018e3000004", majorVersion: 0}  # Alliance
-      {original: "528114e60268d018e300001a", majorVersion: 0}  # UI
-      {original: "528114040268d018e3000011", majorVersion: 0}  # Physics
+      {original: '528112c00268d018e3000008', majorVersion: 0}  # Event
+      {original: '5280f83b8ae1581b66000001', majorVersion: 0, config: {lifespan: 60}}  # Existence
+      {original: '5281146f0268d018e3000014', majorVersion: 0}  # Programming
+      {original: '528110f30268d018e3000001', majorVersion: 0}  # AI
+      {original: '52810ffa33e01a6e86000012', majorVersion: 0}  # Action
+      {original: '528114b20268d018e3000017', majorVersion: 0}  # Targeting
+      {original: '528105f833e01a6e86000007', majorVersion: 0}  # Collision
+      {original: '528113240268d018e300000c', majorVersion: 0, config: {gravity: 9.81}}  # Movement
+      {original: '528112530268d018e3000007', majorVersion: 0}  # Combat
+      {original: '52810f4933e01a6e8600000c', majorVersion: 0}  # Hearing
+      {original: '528115040268d018e300001b', majorVersion: 0}  # Vision
+      {original: '5280dc4d251616c907000001', majorVersion: 0}  # Inventory
+      {original: '528111b30268d018e3000004', majorVersion: 0}  # Alliance
+      {original: '528114e60268d018e300001a', majorVersion: 0}  # UI
+      {original: '528114040268d018e3000011', majorVersion: 0}  # Physics
     ]
 
 class LevelSystemNode extends TreemaObjectNode
@@ -137,7 +137,7 @@ class LevelSystemNode extends TreemaObjectNode
     unless _.isString @data.original
       return alert('Press the "Add System" button at the bottom instead of the "+". Sorry.')
     @system = @settings.supermodel.getModelByOriginalAndMajorVersion(LevelSystem, @data.original, @data.majorVersion)
-    console.error "Couldn't find system for", @data.original, @data.majorVersion, "from models", @settings.supermodel.models unless @system
+    console.error 'Couldn\'t find system for', @data.original, @data.majorVersion, 'from models', @settings.supermodel.models unless @system
 
   getChildSchema: (key) ->
     return @system.attributes.configSchema if key is 'config'
diff --git a/app/views/editor/level/thang/edit.coffee b/app/views/editor/level/thang/edit.coffee
index d749eea10..01eb9c1d1 100644
--- a/app/views/editor/level/thang/edit.coffee
+++ b/app/views/editor/level/thang/edit.coffee
@@ -10,7 +10,7 @@ module.exports = class LevelThangEditView extends View
   ThangType editor view.
   ###
 
-  id: "editor-level-thang-edit"
+  id: 'editor-level-thang-edit'
   template: template
 
   events:
diff --git a/app/views/editor/level/thangs_tab_view.coffee b/app/views/editor/level/thangs_tab_view.coffee
index 5d5cdd7b3..8e905654a 100644
--- a/app/views/editor/level/thangs_tab_view.coffee
+++ b/app/views/editor/level/thangs_tab_view.coffee
@@ -17,15 +17,15 @@ MOVE_SPEED = 13
 
 # Essential component original ids
 componentOriginals =
-  "existence.Exists"          : "524b4150ff92f1f4f8000024"
-  "physics.Physical"          : "524b75ad7fc0f6d519000001"
+  'existence.Exists': '524b4150ff92f1f4f8000024'
+  'physics.Physical': '524b75ad7fc0f6d519000001'
 
 class ThangTypeSearchCollection extends CocoCollection
-  url: '/db/thang.type/search?project=original,name,version,slug,kind,components'
+  url: '/db/thang.type?project=original,name,version,slug,kind,components'
   model: ThangType
 
 module.exports = class ThangsTabView extends View
-  id: "editor-level-thangs-tab-view"
+  id: 'editor-level-thangs-tab-view'
   className: 'tab-pane active'
   template: thangs_template
   startsLoading: true
@@ -69,7 +69,7 @@ module.exports = class ThangsTabView extends View
     @level = options.level
 
     $(document).bind 'contextmenu', @preventDefaultContextMenu
-    
+
   getRenderData: (context={}) ->
     context = super(context)
     return context unless @supermodel.finished()
@@ -102,7 +102,7 @@ module.exports = class ThangsTabView extends View
       $('#thangs-list').height(oldHeight - thangsHeaderHeight - 40)
     else
       $('#thangs-list').height(oldHeight - thangsHeaderHeight - 80)
-      
+
 
   afterRender: ->
     super()
@@ -166,7 +166,7 @@ module.exports = class ThangsTabView extends View
     }
     @surface.playing = false
     @surface.setWorld @world
-    @surface.camera.zoomTo({x:262, y:-164}, 1.66, 0)
+    @surface.camera.zoomTo({x: 262, y: -164}, 1.66, 0)
 
   destroy: ->
     @selectAddThangType null
@@ -186,6 +186,7 @@ module.exports = class ThangsTabView extends View
 
   onStageMouseUp: (e) ->
     if @addThangSprite
+      @surface.camera.lock()
       # If we click on the background, we need to add @addThangSprite, but not if onSpriteMouseUp will fire.
       @backgroundAddClickTimeout = _.defer => @onExtantThangSelected {}
     $('#contextmenu').hide()
@@ -194,7 +195,7 @@ module.exports = class ThangsTabView extends View
     return unless @selectedExtantThang and e.thang?.id is @selectedExtantThang?.id
     @surface.camera.dragDisabled = true
     {stageX, stageY} = e.originalEvent
-    wop = @surface.camera.canvasToWorld x: stageX, y: stageY
+    wop = @surface.camera.screenToWorld x: stageX, y: stageY
     wop.z = @selectedExtantThang.depth / 2
     @adjustThangPos @selectedExtantSprite, @selectedExtantThang, wop
     [w, h] = [@surface.camera.canvasWidth, @surface.camera.canvasHeight]
@@ -202,14 +203,15 @@ module.exports = class ThangsTabView extends View
 
   onSpriteMouseUp: (e) ->
     clearTimeout @backgroundAddClickTimeout
-    if e.originalEvent.nativeEvent.button == 2
+    @surface.camera.unlock()
+    if e.originalEvent.nativeEvent.button == 2 and @selectedExtantThang
       @onSpriteContextMenu e
     clearInterval(@movementInterval) if @movementInterval?
     @movementInterval = null
     @surface.camera.dragDisabled = false
     return unless @selectedExtantThang and e.thang?.id is @selectedExtantThang?.id
     pos = @selectedExtantThang.pos
-    physicalOriginal = componentOriginals["physics.Physical"]
+    physicalOriginal = componentOriginals['physics.Physical']
     path = "id=#{@selectedExtantThang.id}/components/original=#{physicalOriginal}"  # TODO: hack
     physical = @thangsTreema.get path
     return if not physical or (physical.config.pos.x is pos.x and physical.config.pos.y is pos.y)
@@ -227,7 +229,7 @@ module.exports = class ThangsTabView extends View
     if e.thang and (key.alt or key.meta)
       # We alt-clicked, so create a clone addThang
       @selectAddThangType e.thang.spriteName, @selectedExtantThang
-    else if e.thang and not (@addThangSprite and @addThangType is "Blood Torch Test")  # TODO: figure out which Thangs can be placed on other Thangs
+    else if e.thang and not (@addThangSprite and @addThangType is 'Blood Torch Test')  # TODO: figure out which Thangs can be placed on other Thangs
       # We clicked on a Thang (or its Treema), so select the Thang
       @selectAddThang null
       @selectedExtantThangClickTime = new Date()
@@ -250,6 +252,7 @@ module.exports = class ThangsTabView extends View
 #      @thangsTreema.deselectAll()
 
   selectAddThang: (e) =>
+    return if e? and $(e.target).closest('#thang-search').length # Ignore if you're trying to search thangs
     return unless e? and $(e.target).closest('#editor-level-thangs-tab-view').length or key.isPressed('esc')
     if e then target = $(e.target) else target = @$el.find('.add-thangs-palette')  # pretend to click on background if no event
     return true if target.attr('id') is 'surface'
@@ -258,7 +261,7 @@ module.exports = class ThangsTabView extends View
     @$el.find('.add-thangs-palette .add-thang-palette-icon.selected').removeClass('selected')
     @selectAddThangType(if wasSelected then null else target.attr 'data-thang-type') unless key.alt or key.meta
     target.addClass('selected') if @addThangType
-    false
+    #false # was causing #1099, any reason to keep?
 
   moveAddThangSelection: (direction) ->
     return unless @addThangType
@@ -270,27 +273,25 @@ module.exports = class ThangsTabView extends View
 
   selectAddThangType: (type, @cloneSourceThang) ->
     if _.isString type
-      type = _.find @supermodel.getModels(ThangType), (m) -> m.get("name") is type
+      type = _.find @supermodel.getModels(ThangType), (m) -> m.get('name') is type
     pos = @addThangSprite?.thang.pos  # Maintain old sprite's pos if we have it
     @surface.spriteBoss.removeSprite @addThangSprite if @addThangSprite
     @addThangType = type
     if @addThangType
-      @surface.camera.lock()
       thang = @createAddThang()
-      @addThangSprite = @surface.spriteBoss.addThangToSprites thang, @surface.spriteBoss.spriteLayers["Floating"]
+      @addThangSprite = @surface.spriteBoss.addThangToSprites thang, @surface.spriteBoss.spriteLayers['Floating']
       @addThangSprite.notOfThisWorld = true
       @addThangSprite.imageObject.alpha = 0.75
       @addThangSprite.playSound? 'selected'
       pos ?= x: Math.round(@world.width / 2), y: Math.round(@world.height / 2)
       @adjustThangPos @addThangSprite, thang, pos
     else
-      @surface.camera.unlock()
       @addThangSprite = null
 
   createEssentialComponents: ->
     [
-      {original: componentOriginals["existence.Exists"], majorVersion: 0, config: {}}
-      {original: componentOriginals["physics.Physical"], majorVersion: 0, config: {pos: {x: 10, y: 10, z: 1}, width: 2, height: 2, depth: 2, shape: "box"}}
+      {original: componentOriginals['existence.Exists'], majorVersion: 0, config: {}}
+      {original: componentOriginals['physics.Physical'], majorVersion: 0, config: {pos: {x: 10, y: 10, z: 1}, width: 2, height: 2, depth: 2, shape: 'box'}}
     ]
 
   createAddThang: ->
@@ -303,9 +304,9 @@ module.exports = class ThangsTabView extends View
     for raw in mockThang.components
       comp = _.find allComponents, {original: raw.original}
       continue if comp.name in ['Selectable', 'Attackable']  # Don't draw health bars or intercept clicks
-      componentClass = @world.loadClassFromCode comp.js, comp.name, "component"
+      componentClass = @world.loadClassFromCode comp.js, comp.name, 'component'
       components.push [componentClass, raw.config]
-    thang = new Thang @world, @addThangType.get('name'), "Add Thang Phantom"
+    thang = new Thang @world, @addThangType.get('name'), 'Add Thang Phantom'
     thang.addComponents components...
     thang
 
@@ -319,7 +320,7 @@ module.exports = class ThangsTabView extends View
 
   onSurfaceMouseMoved: (e) ->
     return unless @addThangSprite
-    wop = @surface.camera.canvasToWorld x: e.x, y: e.y
+    wop = @surface.camera.screenToWorld x: e.x, y: e.y
     wop.z = 0.5
     @adjustThangPos @addThangSprite, @addThangSprite.thang, wop
     null
@@ -355,7 +356,7 @@ module.exports = class ThangsTabView extends View
   moveSide: =>
     return unless @speed
     c = @surface.camera
-    p = {x:c.target.x + @moveLatitude * @speed / c.zoom, y:c.target.y + @moveLongitude * @speed / c.zoom}
+    p = {x: c.target.x + @moveLatitude * @speed / c.zoom, y: c.target.y + @moveLongitude * @speed / c.zoom}
     c.zoomTo(p, c.zoom, 0)
 
   deleteSelectedExtantThang: (e) =>
@@ -440,18 +441,14 @@ module.exports = class ThangsTabView extends View
 
   onDuplicateClicked: (e) ->
     $('#contextmenu').hide()
-    if !@addThangType
-      thang = @selectedExtantThang.spriteName
-      e.target = $(".add-thang-palette-icon[data-thang-type='" + thang + "']").get 0
-    @selectAddThang e
-    
+    @selectAddThangType @selectedExtantThang.spriteName, @selectedExtantThang
+
   toggleThangsContainer: (e) ->
     $('#all-thangs').toggle()
-    
+
   toggleThangsPalette: (e) ->
     $('#add-thangs-column').toggle()
     @onWindowResize e
-   
 
 class ThangsNode extends TreemaNode.nodeMap.array
   valueClass: 'treema-array-replacement'
@@ -476,11 +473,11 @@ class ThangNode extends TreemaObjectNode
       kind = ThangNode.thangKindMap[s]
       @$el.addClass "treema-#{kind}"
       s = name
-    s += " - " + @data.id if @data.id isnt s
+    s += ' - ' + @data.id if @data.id isnt s
     if pos
       s += " (#{Math.round(pos.x)}, #{Math.round(pos.y)})"
     else
-      s += " (non-physical)"
+      s += ' (non-physical)'
     @buildValueForDisplaySimply valEl, s
 
   onEnterPressed: ->
diff --git a/app/views/editor/level/treema_nodes.coffee b/app/views/editor/level/treema_nodes.coffee
index 01e1362a2..f06654698 100644
--- a/app/views/editor/level/treema_nodes.coffee
+++ b/app/views/editor/level/treema_nodes.coffee
@@ -62,7 +62,7 @@ class WorldRegionNode extends TreemaNode.nodeMap.object
   callback: (e) =>
     x = Math.min e.points[0].x, e.points[1].x
     y = Math.min e.points[0].y, e.points[1].y
-    @data.pos = {x:x, y:y, z:0}
+    @data.pos = {x: x, y: y, z: 0}
     @data.width = Math.abs e.points[0].x - e.points[1].x
     @data.height = Math.min e.points[0].y - e.points[1].y
     @refreshDisplay()
@@ -70,7 +70,6 @@ class WorldRegionNode extends TreemaNode.nodeMap.object
   createWorldBounds: ->
     # not yet written
 
-
 module.exports.WorldViewportNode = class WorldViewportNode extends TreemaNode.nodeMap.object
   # selecting ratio'd dimensions in the world, ie the camera in level scripts
   constructor: (args...) ->
@@ -132,15 +131,15 @@ module.exports.WorldBoundsNode = class WorldBoundsNode extends TreemaNode.nodeMa
     if btn.length then @openMap() else super(arguments...)
 
   openMap: ->
-    bounds = @data or [{x:0, y:0}, {x:100, y: 80}]
+    bounds = @data or [{x: 0, y: 0}, {x: 100, y: 80}]
     modal = new WorldSelectModal(world: @settings.world, dataType: 'region', default: bounds, supermodel: @settings.supermodel)
     modal.callback = @callback
     @settings.view.openModalView modal
 
   callback: (e) =>
     return unless e
-    @set '/0', { x: shorten(e.points[0].x), y: shorten(e.points[0].y) }
-    @set '/1', { x: shorten(e.points[1].x), y: shorten(e.points[1].y) }
+    @set '/0', {x: shorten(e.points[0].x), y: shorten(e.points[0].y)}
+    @set '/1', {x: shorten(e.points[1].x), y: shorten(e.points[1].y)}
 
 module.exports.ThangNode = class ThangNode extends TreemaNode.nodeMap.string
   buildValueForEditing: (valEl) ->
@@ -201,7 +200,7 @@ module.exports.ThangTypeNode = class ThangTypeNode extends TreemaNode.nodeMap.st
   constructor: (args...) ->
     super args...
     @thangType = _.find @settings.supermodel.getModels(ThangType), (m) => m.get('original') is @data if @data
-    console.log "ThangTypeNode found ThangType", @thangType, "for data", @data
+    console.log 'ThangTypeNode found ThangType', @thangType, 'for data', @data
 
   buildValueForDisplay: (valEl) ->
     @buildValueForDisplaySimply(valEl, @thangType?.get('name') or 'None')
diff --git a/app/views/editor/level/versions_view.coffee b/app/views/editor/level/versions_view.coffee
index 09aa5925e..38375ead8 100644
--- a/app/views/editor/level/versions_view.coffee
+++ b/app/views/editor/level/versions_view.coffee
@@ -1,9 +1,9 @@
 VersionsModalView = require 'views/modal/versions_modal'
 
 module.exports = class LevelVersionsView extends VersionsModalView
-  id: "editor-level-versions-view"
-  url: "/db/level/"
-  page: "level"
+  id: 'editor-level-versions-view'
+  url: '/db/level/'
+  page: 'level'
 
   constructor: (options, @ID) ->
-    super options, ID, require 'models/Level'
\ No newline at end of file
+    super options, ID, require 'models/Level'
diff --git a/app/views/editor/patch_modal.coffee b/app/views/editor/patch_modal.coffee
index 4603cbc48..37361e129 100644
--- a/app/views/editor/patch_modal.coffee
+++ b/app/views/editor/patch_modal.coffee
@@ -4,10 +4,11 @@ DeltaView = require 'views/editor/delta'
 auth = require 'lib/auth'
 
 module.exports = class PatchModal extends ModalView
-  id: "patch-modal"
+  id: 'patch-modal'
   template: template
   plain: true
   modalWidthPercent: 60
+  @DOC_SKIP_PATHS = ['_id','version', 'commitMessage', 'parent', 'created', 'slug', 'index', '__v', 'patches', 'creator']
 
   events:
     'click #withdraw-button': 'withdrawPatch'
@@ -23,27 +24,35 @@ module.exports = class PatchModal extends ModalView
       @originalSource = new @targetModel.constructor({_id:targetID})
       @supermodel.loadModel @originalSource, 'source_document'
 
+  applyDelta: ->
+    @headModel = null
+    if @targetModel.hasWriteAccess()
+      @headModel = @originalSource.clone(false)
+      @headModel.markToRevert true
+      @headModel.set(@targetModel.attributes)
+      @headModel.loaded = true
+
+    @pendingModel = @originalSource.clone(false)
+    @pendingModel.markToRevert true
+    @deltaWorked = @pendingModel.applyDelta(@patch.get('delta'))
+    @pendingModel.loaded = true
+
+  render: ->
+    @applyDelta() if @supermodel.finished()
+    super()
+
   getRenderData: ->
     c = super()
     c.isPatchCreator = @patch.get('creator') is auth.me.id
     c.isPatchRecipient = @targetModel.hasWriteAccess()
     c.status = @patch.get 'status'
     c.patch = @patch
+    c.deltaWorked = @deltaWorked
     c
 
   afterRender: ->
-    return unless @supermodel.finished()
-    headModel = null
-    if @targetModel.hasWriteAccess()
-      headModel = @originalSource.clone(false)
-      headModel.set(@targetModel.attributes)
-      headModel.loaded = true
-
-    pendingModel = @originalSource.clone(false)
-    pendingModel.applyDelta(@patch.get('delta'))
-    pendingModel.loaded = true
-
-    @deltaView = new DeltaView({model:pendingModel, headModel:headModel})
+    return super() unless @supermodel.finished() and @deltaWorked
+    @deltaView = new DeltaView({model:@pendingModel, headModel:@headModel, skipPaths: PatchModal.DOC_SKIP_PATHS})
     changeEl = @$el.find('.changes-stub')
     @insertSubView(@deltaView, changeEl)
     super()
@@ -51,6 +60,7 @@ module.exports = class PatchModal extends ModalView
   acceptPatch: ->
     delta = @deltaView.getApplicableDelta()
     @targetModel.applyDelta(delta)
+    @targetModel.saveBackupNow()
     @patch.setStatus('accepted')
     @trigger 'accepted-patch'
     @hide()
diff --git a/app/views/editor/patches_view.coffee b/app/views/editor/patches_view.coffee
index 17aef667b..751ec837c 100644
--- a/app/views/editor/patches_view.coffee
+++ b/app/views/editor/patches_view.coffee
@@ -46,12 +46,13 @@ module.exports = class PatchesView extends CocoView
     @reloadPatches()
 
   reloadPatches: ->
+    @supermodel.resetProgress()
     @load()
     @render()
 
   openPatchModal: (e) ->
-    console.log "open patch modal"
-    patch = _.find @patches.models, {id:$(e.target).data('patch-id')}
+    console.log 'open patch modal'
+    patch = _.find @patches.models, {id: $(e.target).data('patch-id')}
     modal = new PatchModal(patch, @model)
     @openModalView(modal)
     @listenTo modal, 'accepted-patch', -> @trigger 'accepted-patch'
diff --git a/app/views/editor/system/versions_view.coffee b/app/views/editor/system/versions_view.coffee
index 562d134ad..6c0fe3e59 100755
--- a/app/views/editor/system/versions_view.coffee
+++ b/app/views/editor/system/versions_view.coffee
@@ -1,9 +1,9 @@
 VersionsModalView = require 'views/modal/versions_modal'
 
 module.exports = class SystemVersionsView extends VersionsModalView
-  id: "editor-system-versions-view"
-  url: "/db/level.system/"
-  page: "system"
+  id: 'editor-system-versions-view'
+  url: '/db/level.system/'
+  page: 'system'
 
   constructor: (options, @ID) ->
-    super options, ID, require 'models/LevelSystem'
\ No newline at end of file
+    super options, ID, require 'models/LevelSystem'
diff --git a/app/views/editor/thang/colors_tab_view.coffee b/app/views/editor/thang/colors_tab_view.coffee
index 00ba6b16c..b4a60e017 100644
--- a/app/views/editor/thang/colors_tab_view.coffee
+++ b/app/views/editor/thang/colors_tab_view.coffee
@@ -13,7 +13,7 @@ module.exports = class ColorsTabView extends CocoView
   constructor: (@thangType, options) ->
     @listenToOnce(@thangType, 'sync', @tryToBuild)
     # @listenToOnce(@thangType.schema(), 'sync', @tryToBuild)
-    @colorConfig = { hue: 0, saturation: 0.5, lightness: 0.5 }
+    @colorConfig = {hue: 0, saturation: 0.5, lightness: 0.5}
     @spriteBuilder = new SpriteBuilder(@thangType)
     f = =>
       @offset++
@@ -24,7 +24,7 @@ module.exports = class ColorsTabView extends CocoView
   destroy: ->
     clearInterval @interval
     super()
-  
+
   onLoaded: -> @render()
   afterRender: ->
     super()
@@ -36,9 +36,9 @@ module.exports = class ColorsTabView extends CocoView
   # sliders
 
   initSliders: ->
-    @hueSlider = @initSlider $("#hue-slider", @$el), 0, @makeSliderCallback 'hue'
-    @saturationSlider = @initSlider $("#saturation-slider", @$el), 50, @makeSliderCallback 'saturation'
-    @lightnessSlider = @initSlider $("#lightness-slider", @$el), 50, @makeSliderCallback 'lightness'
+    @hueSlider = @initSlider $('#hue-slider', @$el), 0, @makeSliderCallback 'hue'
+    @saturationSlider = @initSlider $('#saturation-slider', @$el), 50, @makeSliderCallback 'saturation'
+    @lightnessSlider = @initSlider $('#lightness-slider', @$el), 50, @makeSliderCallback 'lightness'
 
   makeSliderCallback: (property) ->
     (e, result) =>
@@ -51,7 +51,7 @@ module.exports = class ColorsTabView extends CocoView
     canvas = @$el.find('#tinting-display')
     @stage = new createjs.Stage(canvas[0])
     createjs.Ticker.setFPS 20
-    createjs.Ticker.addEventListener("tick", @stage)
+    createjs.Ticker.addEventListener('tick', @stage)
     @updateMovieClip()
 
   updateMovieClip: ->
diff --git a/app/views/editor/thang/edit.coffee b/app/views/editor/thang/edit.coffee
index 3d753ff50..39fe787ba 100644
--- a/app/views/editor/thang/edit.coffee
+++ b/app/views/editor/thang/edit.coffee
@@ -14,10 +14,10 @@ SaveVersionModal = require 'views/modal/save_version_modal'
 ErrorView = require '../../error_view'
 template = require 'templates/editor/thang/edit'
 
-CENTER = {x:200, y:300}
+CENTER = {x: 200, y: 300}
 
 module.exports = class ThangTypeEditView extends View
-  id: "editor-thang-type-edit-view"
+  id: 'editor-thang-type-edit-view'
   template: template
   startsLoading: true
   resolution: 4
@@ -66,7 +66,7 @@ module.exports = class ThangTypeEditView extends View
     raw = ("raw:#{name}" for name in raw)
     main = _.keys(@thangType.get('actions') or {})
     main.concat(raw)
-  
+
   afterRender: ->
     super()
     return unless @supermodel.finished()
@@ -112,7 +112,7 @@ module.exports = class ThangTypeEditView extends View
     @refreshAnimation()
 
     createjs.Ticker.setFPS(30)
-    createjs.Ticker.addEventListener("tick", @stage)
+    createjs.Ticker.addEventListener('tick', @stage)
 
   toggleDots: ->
     @showDots = not @showDots
@@ -234,7 +234,7 @@ module.exports = class ThangTypeEditView extends View
       movieClip.regY = -reg.y
     @showImageObject(movieClip)
 
-  getSpriteOptions: -> { resolutionFactor: @resolution, thang: @mockThang}
+  getSpriteOptions: -> {resolutionFactor: @resolution, thang: @mockThang}
 
   showSprite: (actionName) ->
     options = @getSpriteOptions()
@@ -266,7 +266,7 @@ module.exports = class ThangTypeEditView extends View
   # sliders
 
   initSliders: ->
-    @rotationSlider = @initSlider $("#rotation-slider", @$el), 50, @updateRotation
+    @rotationSlider = @initSlider $('#rotation-slider', @$el), 50, @updateRotation
     @scaleSlider = @initSlider $('#scale-slider', @$el), 29, @updateScale
     @resolutionSlider = @initSlider $('#resolution-slider', @$el), 39, @updateResolution
     @healthSlider = @initSlider $('#health-slider', @$el), 100, @updateHealth
@@ -326,7 +326,9 @@ module.exports = class ThangTypeEditView extends View
         image = @currentSprite.imageObject.image
         portraitSource = imageToPortrait image
         # bit of a hacky way to get that portrait
-      success = -> document.location.href = url
+      success = =>
+        @thangType.clearBackup()
+        document.location.href = url
       newThangType.uploadGenericPortrait success, portraitSource
 
   clearRawData: ->
@@ -399,7 +401,7 @@ module.exports = class ThangTypeEditView extends View
     @showingSelectedNode = false
 
   showVersionHistory: (e) ->
-    versionHistoryView = new VersionHistoryView thangType:@thangType, @thangTypeID
+    versionHistoryView = new VersionHistoryView thangType: @thangType, @thangTypeID
     @openModalView versionHistoryView
     Backbone.Mediator.publish 'level:view-switched', e
 
@@ -411,12 +413,12 @@ module.exports = class ThangTypeEditView extends View
     super()
 
 imageToPortrait = (img) ->
-  canvas = document.createElement("canvas")
+  canvas = document.createElement('canvas')
   canvas.width = 100
   canvas.height = 100
-  ctx = canvas.getContext("2d")
+  ctx = canvas.getContext('2d')
   scaleX = 100 / img.width
   scaleY = 100 / img.height
   ctx.scale scaleX, scaleY
   ctx.drawImage img, 0, 0
-  canvas.toDataURL("image/png") 
\ No newline at end of file
+  canvas.toDataURL('image/png')
diff --git a/app/views/editor/thang/home.coffee b/app/views/editor/thang/home.coffee
index 2fb208723..b14f1b9c4 100644
--- a/app/views/editor/thang/home.coffee
+++ b/app/views/editor/thang/home.coffee
@@ -5,10 +5,19 @@ module.exports = class ThangTypeHomeView extends SearchView
   modelLabel: 'Thang Type'
   model: require 'models/ThangType'
   modelURL: '/db/thang.type'
-  tableTemplate: require 'templates/editor/thang/table' 
+  tableTemplate: require 'templates/editor/thang/table'
+
+  getRenderData: ->
+    context = super()
+    context.currentEditor = 'editor.thang_title'
+    context.currentNew = 'editor.new_thang_title'
+    context.currentNewSignup = 'editor.new_thang_title_login'
+    context.currentSearch = 'editor.thang_search_title'
+    @$el.i18n()
+    context
 
   onSearchChange: =>
     super()
-    @$el.find("img").error(-> $(this).hide())
+    @$el.find('img').error(-> $(this).hide())
 
-  # TODO: do the new thing on click, not just enter
\ No newline at end of file
+  # TODO: do the new thing on click, not just enter
diff --git a/app/views/editor/thang/versions_view.coffee b/app/views/editor/thang/versions_view.coffee
index 889d9c902..08344ce48 100755
--- a/app/views/editor/thang/versions_view.coffee
+++ b/app/views/editor/thang/versions_view.coffee
@@ -1,9 +1,9 @@
 VersionsModalView = require 'views/modal/versions_modal'
 
 module.exports = class ComponentVersionsView extends VersionsModalView
-  id: "editor-thang-versions-view"
-  url: "/db/thang.type/"
-  page: "thang"
+  id: 'editor-thang-versions-view'
+  url: '/db/thang.type/'
+  page: 'thang'
 
   constructor: (options, @ID) ->
-    super options, ID, require 'models/ThangType'
\ No newline at end of file
+    super options, ID, require 'models/ThangType'
diff --git a/app/views/editor_view.coffee b/app/views/editor_view.coffee
index f07d0af0f..aafe00eb1 100644
--- a/app/views/editor_view.coffee
+++ b/app/views/editor_view.coffee
@@ -2,5 +2,5 @@ View = require 'views/kinds/RootView'
 template = require 'templates/editor'
 
 module.exports = class EditorView extends View
-  id: "editor-nav-view"
-  template: template
\ No newline at end of file
+  id: 'editor-nav-view'
+  template: template
diff --git a/app/views/employers_view.coffee b/app/views/employers_view.coffee
index 757675cf2..5b7bd2710 100644
--- a/app/views/employers_view.coffee
+++ b/app/views/employers_view.coffee
@@ -2,6 +2,7 @@ View = require 'views/kinds/RootView'
 template = require 'templates/employers'
 app = require 'application'
 User = require 'models/User'
+UserRemark = require 'models/UserRemark'
 {me} = require 'lib/auth'
 CocoCollection = require 'collections/CocoCollection'
 EmployerSignupView = require 'views/modal/employer_signup_modal'
@@ -10,20 +11,30 @@ class CandidatesCollection extends CocoCollection
   url: '/db/user/x/candidates'
   model: User
 
+class UserRemarksCollection extends CocoCollection
+  url: '/db/user.remark?project=contact,contactName,user'
+  model: UserRemark
+
 module.exports = class EmployersView extends View
-  id: "employers-view"
+  id: 'employers-view'
   template: template
 
   events:
     'click tbody tr': 'onCandidateClicked'
+    'change #filters input': 'onFilterChanged'
+    'click #filter-button': 'applyFilters'
+    'change #select_all_checkbox': 'handleSelectAllChange'
+    'click .get-started-button': 'openSignupModal'
+    'click .navbar-brand': 'restoreBodyColor'
+    'click #login-link': 'onClickAuthbutton'
+    'click #filter-link': 'swapFolderIcon'
 
   constructor: (options) ->
     super options
     @getCandidates()
-  checkForEmployerSignupHash: =>
-    if window.location.hash is "#employerSignupLoggingIn" and not ("employer" in me.get("permissions"))
-      @openModalView application.router.getView("modal/employer_signup","_modal")
-      window.location.hash = ""
+    @setFilterDefaults()
+
+
   afterRender: ->
     super()
     @sortTable() if @candidates.models.length
@@ -31,50 +42,145 @@ module.exports = class EmployersView extends View
   afterInsert: ->
     super()
     _.delay @checkForEmployerSignupHash, 500
+    #fairly hacky, change this in the future
+    @originalBackgroundColor = $('body').css 'background-color'
+    $('body').css 'background-color', '#B4B4B4'
+
+  restoreBodyColor: ->
+    $('body').css 'background-color', @originalBackgroundColor
+
+  swapFolderIcon: ->
+    $('#folder-icon').toggleClass('glyphicon-folder-close').toggleClass('glyphicon-folder-open')
+  onFilterChanged: ->
+    @resetFilters()
+    that = @
+    $('#filters :input').each ->
+      input = $(this)
+      checked = input.prop 'checked'
+      name = input.attr 'name'
+      value = input.val()
+      if name is 'phoneScreenFilter'
+        value = JSON.parse(input.prop 'value')
+      if checked
+        that.filters[name] = _.union that.filters[name], [value]
+      else
+        that.filters[name] = _.difference that.filters[name], [value]
+
+    for filterName, filterValues of @filters
+      if filterValues.length is 0
+        @filters[filterName] = @defaultFilters[filterName]
+
+  openSignupModal: ->
+    @openModalView new EmployerSignupView
+  handleSelectAllChange: (e) ->
+    checkedState = e.currentTarget.checked
+    $('#filters :input').each ->
+      $(this).prop 'checked', checkedState
+    @onFilterChanged()
+
+  resetFilters: ->
+    for filterName, filterValues of @filters
+      @filters[filterName] = []
+
+  applyFilters: ->
+    candidateList = _.sortBy @candidates.models, (c) -> c.get('jobProfile').updated
+    candidateList = _.filter candidateList, (c) -> c.get('jobProfileApproved')
+
+    filteredCandidates = candidateList
+    for filterName, filterValues of @filters
+      if filterName is 'visa'
+        filteredCandidates = _.difference filteredCandidates, _.filter(filteredCandidates, (c) ->
+          fieldValue = c.get('jobProfile').visa
+          return not (_.contains filterValues, fieldValue)
+        )
+      else
+        filteredCandidates = _.difference filteredCandidates, _.filter(filteredCandidates, (c) ->
+          unless c.get('jobProfile').curated then return true
+          fieldValue = c.get('jobProfile').curated?[filterName]
+          return not (_.contains filterValues, fieldValue)
+        )
+    candidateIDsToShow = _.pluck filteredCandidates, 'id'
+    $('#candidate-table tr').each -> $(this).hide()
+    candidateIDsToShow.forEach (id) ->
+      $("[data-candidate-id=#{id}]").show()
+    $('#results').text(candidateIDsToShow.length + ' results')
+
+
+    return filteredCandidates
+  setFilterDefaults: ->
+    @filters =
+      phoneScreenFilter: [true, false]
+      visa: ['Authorized to work in the US', 'Need visa sponsorship']
+      schoolFilter: ['Top 20 Eng.', 'Other US', 'Other Intl.']
+      locationFilter: ['Bay Area', 'New York', 'Other US', 'International']
+      roleFilter: ['Web Developer', 'Software Developer', 'iOS Developer', 'Android Developer', 'Project Manager']
+      seniorityFilter: ['College Student', 'Recent Grad', 'Junior', 'Senior', 'Management']
+    @defaultFilters = _.cloneDeep @filters
+
 
   getRenderData: ->
-    c = super()
-    c.candidates = @candidates.models
-    userPermissions = me.get('permissions') ? []
+    ctx = super()
+    ctx.isEmployer = @isEmployer()
+    ctx.candidates = _.sortBy @candidates.models, (c) -> -1 * c.get('jobProfile').experience
+    ctx.activeCandidates = _.filter ctx.candidates, (c) -> c.get('jobProfile').active
+    ctx.inactiveCandidates = _.reject ctx.candidates, (c) -> c.get('jobProfile').active
+    ctx.featuredCandidates = _.filter ctx.activeCandidates, (c) -> c.get('jobProfileApproved')
+    unless @isEmployer() or me.isAdmin()
+      ctx.featuredCandidates = _.filter ctx.featuredCandidates, (c) -> c.get('jobProfile').curated
+      ctx.featuredCandidates = ctx.featuredCandidates.slice(0,7)
+    ctx.otherCandidates = _.reject ctx.activeCandidates, (c) -> c.get('jobProfileApproved')
+    ctx.remarks = {}
+    ctx.remarks[remark.get('user')] = remark for remark in @remarks.models
+    ctx.moment = moment
+    ctx._ = _
+    ctx.numberOfCandidates = ctx.featuredCandidates.length
+    ctx
 
-    c.isEmployer = _.contains userPermissions, "employer"
-    c.moment = moment
-    c
+  isEmployer: ->
+    userPermissions = me.get('permissions') ? []
+    _.contains userPermissions, 'employer'
 
   getCandidates: ->
     @candidates = new CandidatesCollection()
     @candidates.fetch()
+    @remarks = new UserRemarksCollection()
+    @remarks.fetch()
     # Re-render when we have fetched them, but don't wait and show a progress bar while loading.
     @listenToOnce @candidates, 'all', @renderCandidatesAndSetupScrolling
+    @listenToOnce @remarks, 'all', @renderCandidatesAndSetupScrolling
 
   renderCandidatesAndSetupScrolling: =>
     @render()
-    $(".nano").nanoScroller()
-    if window.history?.state?.lastViewedCandidateID
-      $(".nano").nanoScroller({scrollTo:$("#" + window.history.state.lastViewedCandidateID)})
-    else if window.location.hash.length is 25
-      $(".nano").nanoScroller({scrollTo:$(window.location.hash)})
+    $('.nano').nanoScroller()
+    #if window.history?.state?.lastViewedCandidateID
+    #  $('.nano').nanoScroller({scrollTo: $('#' + window.history.state.lastViewedCandidateID)})
+    #else if window.location.hash.length is 25
+    #  $('.nano').nanoScroller({scrollTo: $(window.location.hash)})
+
+  checkForEmployerSignupHash: =>
+    if window.location.hash is '#employerSignupLoggingIn' and not ('employer' in me.get('permissions'))
+      @openModalView application.router.getView('modal/employer_signup', '_modal')
+      window.location.hash = ''
 
   sortTable: ->
     # http://mottie.github.io/tablesorter/docs/example-widget-bootstrap-theme.html
     $.extend $.tablesorter.themes.bootstrap,
       # these classes are added to the table. To see other table classes available,
       # look here: http://twitter.github.com/bootstrap/base-css.html#tables
-      table: "table table-bordered"
-      caption: "caption"
-      header: "bootstrap-header" # give the header a gradient background
-      footerRow: ""
-      footerCells: ""
-      icons: "" # add "icon-white" to make them white; this icon class is added to the <i> in the header
-      sortNone: "bootstrap-icon-unsorted"
-      sortAsc: "icon-chevron-up"  # glyphicon glyphicon-chevron-up" # we are still using v2 icons
-      sortDesc: "icon-chevron-down"  # glyphicon-chevron-down" # we are still using v2 icons
-      active: "" # applied when column is sorted
-      hover: "" # use custom css here - bootstrap class may not override it
-      filterRow: "" # filter row class
-      even: "" # odd row zebra striping
-      odd: "" # even row zebra striping
-
+      table: 'table table-bordered'
+      caption: 'caption'
+      header: 'bootstrap-header' # give the header a gradient background
+      footerRow: ''
+      footerCells: ''
+      icons: '' # add 'icon-white' to make them white; this icon class is added to the <i> in the header
+      sortNone: 'bootstrap-icon-unsorted'
+      sortAsc: 'icon-chevron-up'  # glyphicon glyphicon-chevron-up' # we are still using v2 icons
+      sortDesc: 'icon-chevron-down'  # glyphicon-chevron-down' # we are still using v2 icons
+      active: '' # applied when column is sorted
+      hover: '' # use custom css here - bootstrap class may not override it
+      filterRow: '' # filter row class
+      even: '' # odd row zebra striping
+      odd: '' # even row zebra striping
 
     # e = exact text from cell
     # n = normalized value returned by the column parser
@@ -84,20 +190,21 @@ module.exports = class EmployersView extends View
     filterSelectExactMatch = (e, n, f, i, $r) -> e is f
 
     # call the tablesorter plugin and apply the uitheme widget
-    @$el.find(".tablesorter").tablesorter
-      theme: "bootstrap"
+    @$el.find('.tablesorter').tablesorter
+      theme: 'bootstrap'
       widthFixed: true
-      headerTemplate: "{content} {icon}"
+      headerTemplate: '{content} {icon}'
       textSorter:
         6: (a, b, direction, column, table) ->
           days = []
           for s in [a, b]
             n = parseInt s
             n = 0 unless _.isNumber n
+            n = 1 if /^a/.test s
             for [duration, factor] in [
-              [/second/i, 1 / (86400 * 1000)]
-              [/minute/i, 1 / 1440]
-              [/hour/i, 1 / 24]
+              [/second/i, 1/(86400*1000)]
+              [/minute/i, 1/1440]
+              [/hour/i, 1/24]
               [/week/i, 7]
               [/month/i, 30.42]
               [/year/i, 365.2425]
@@ -109,19 +216,19 @@ module.exports = class EmployersView extends View
               n *= -1
             days.push n
           days[0] - days[1]
-      sortList: [[6, 0]]
+      sortList: if @isEmployer() or me.isAdmin() then [[6, 0]] else [[0, 1]]
       # widget code contained in the jquery.tablesorter.widgets.js file
       # use the zebra stripe widget if you plan on hiding any rows (filter widget)
-      widgets: ["uitheme", "zebra", "filter"]
+      widgets: ['uitheme', 'zebra', 'filter']
       widgetOptions:
         # using the default zebra striping class name, so it actually isn't included in the theme variable above
         # this is ONLY needed for bootstrap theming if you are using the filter widget, because rows are hidden
-        zebra: ["even", "odd"]
+        zebra: ['even', 'odd']
 
         # extra css class applied to the table row containing the filters & the inputs within that row
-        filter_cssFilter: ""
+        filter_cssFilter: ''
 
-        # If there are child rows in the table (rows with class name from "cssChildRow" option)
+        # If there are child rows in the table (rows with class name from 'cssChildRow' option)
         # and this option is true and a match is found anywhere in the child row, then it will make that row
         # visible; default is false
         filter_childRows: false
@@ -134,7 +241,7 @@ module.exports = class EmployersView extends View
         filter_ignoreCase: true
 
         # jQuery selector string of an element used to reset the filters
-        filter_reset: ".reset"
+        filter_reset: '.reset'
 
         # Use the $.tablesorter.storage utility to save the most recent filters
         filter_saveFilters: true
@@ -144,47 +251,44 @@ module.exports = class EmployersView extends View
         filter_searchDelay: 150
 
         # Set this option to true to use the filter to find text from the start of the column
-        # So typing in "a" will find "albert" but not "frank", both have a's; default is false
+        # So typing in 'a' will find 'albert' but not 'frank', both have a's; default is false
         filter_startsWith: false
 
         filter_functions:
           2:
-            "Full-time": filterSelectExactMatch
-            "Part-time": filterSelectExactMatch
-            "Contracting": filterSelectExactMatch
-            "Remote": filterSelectExactMatch
-            "Internship": filterSelectExactMatch
+            'Full-time': filterSelectExactMatch
+            'Part-time': filterSelectExactMatch
+            'Contracting': filterSelectExactMatch
+            'Remote': filterSelectExactMatch
+            'Internship': filterSelectExactMatch
           5:
-            "0-1": (e, n, f, i, $r) -> n <= 1
-            "2-5": (e, n, f, i, $r) -> 2 <= n <= 5
-            "6+": (e, n, f, i, $r) -> 6 <= n
+            '0-1': (e, n, f, i, $r) -> n <= 1
+            '2-5': (e, n, f, i, $r) -> 2 <= n <= 5
+            '6+': (e, n, f, i, $r) -> 6 <= n
           6:
-            "Last day": (e, n, f, i, $r) ->
+            'Last day': (e, n, f, i, $r) ->
               days = parseFloat $($r.find('td')[i]).data('profile-age')
               days <= 1
-            "Last week": (e, n, f, i, $r) ->
+            'Last week': (e, n, f, i, $r) ->
               days = parseFloat $($r.find('td')[i]).data('profile-age')
               days <= 7
-            "Last 4 weeks": (e, n, f, i, $r) ->
+            'Last 4 weeks': (e, n, f, i, $r) ->
               days = parseFloat $($r.find('td')[i]).data('profile-age')
               days <= 28
-          7:
-            "✓": filterSelectExactMatch
-            "✗": filterSelectExactMatch
           8:
-            "✓": filterSelectExactMatch
-            "✗": filterSelectExactMatch
+            '✓': filterSelectExactMatch
+            '✗': filterSelectExactMatch
 
   onCandidateClicked: (e) ->
     id = $(e.target).closest('tr').data('candidate-id')
-    if id
+    if id and (@isEmployer() or me.isAdmin())
       if window.history
         oldState = _.cloneDeep window.history.state ? {}
-        oldState["lastViewedCandidateID"] = id
-        window.history.replaceState(oldState,"")
-      else  
+        oldState['lastViewedCandidateID'] = id
+        window.history.replaceState(oldState, '')
+      else
         window.location.hash = id
       url = "/account/profile/#{id}"
-      window.open url,"_blank"
+      window.open url, '_blank'
     else
       @openModalView new EmployerSignupView
diff --git a/app/views/error_view.coffee b/app/views/error_view.coffee
index 03ee44f92..3ed6db5fd 100644
--- a/app/views/error_view.coffee
+++ b/app/views/error_view.coffee
@@ -2,5 +2,5 @@ View = require 'views/kinds/RootView'
 template = require 'templates/error'
 
 module.exports = class ErrorView extends View
-  id: "error-view"
-  template: template
\ No newline at end of file
+  id: 'error-view'
+  template: template
diff --git a/app/views/home_view.coffee b/app/views/home_view.coffee
index 1e314aed0..40eb72e88 100644
--- a/app/views/home_view.coffee
+++ b/app/views/home_view.coffee
@@ -10,6 +10,9 @@ module.exports = class HomeView extends View
   id: 'home-view'
   template: template
 
+  events:
+    'click .code-language': 'onCodeLanguageSelected'
+
   constructor: ->
     super(arguments...)
     ThangType.loadUniversalWizard()
@@ -25,10 +28,7 @@ module.exports = class HomeView extends View
       console.warn 'no more jquery browser version...'
     c.isEnglish = (me.get('preferredLanguage') or 'en').startsWith 'en'
     c.languageName = me.get('preferredLanguage')
-    # A/B test: https://github.com/codecombat/codecombat/issues/769
-    c.frontPageContent = {0: "video", 1: "screenshot", 2: "nothing"}[me.get('testGroupNumber') % 3]
-    application.tracker.identify frontPageContent: c.frontPageContent
-    application.tracker.trackEvent 'Front Page Content', frontPageContent: c.frontPageContent
+    c.codeLanguage = (me.get('aceConfig') ? {}).language or 'javascript'
     c
 
   afterRender: ->
@@ -36,13 +36,36 @@ module.exports = class HomeView extends View
     @$el.find('.modal').on 'shown.bs.modal', ->
       $('input:visible:first', @).focus()
 
-    # Try to find latest level and set "Play" link to go to that level
-    lastLevel = me.get("lastLevel")
-    lastLevel ?= localStorage?["lastLevel"]  # Temp, until it's migrated to user property
+    # Try to find latest level and set 'Play' link to go to that level
+    lastLevel = me.get('lastLevel')
+    lastLevel ?= localStorage?['lastLevel']  # Temp, until it's migrated to user property
     if lastLevel
-      playLink = @$el.find("#beginner-campaign")
+      playLink = @$el.find('#beginner-campaign')
       if playLink[0]?
-        href = playLink.attr("href").split("/")
+        href = playLink.attr('href').split('/')
         href[href.length-1] = lastLevel if href.length isnt 0
-        href = href.join("/")
-        playLink.attr("href", href)
+        href = href.join('/')
+        playLink.attr('href', href)
+
+    codeLanguage = (me.get('aceConfig') ? {}).language or 'javascript'
+    @$el.find(".code-language[data-code-language=#{codeLanguage}]").addClass 'selected-language'
+    @updateLanguageLogos codeLanguage
+
+  updateLanguageLogos: (codeLanguage) ->
+    @$el.find('.game-mode-wrapper .code-language-logo').css('background-image', "url(/images/pages/home/language_logo_#{codeLanguage}.png)").toggleClass 'inverted', (codeLanguage in ['io', 'coffeescript'])
+
+  onCodeLanguageSelected: (e) ->
+    target = $(e.target).closest('.code-language')
+    codeLanguage = target.data('code-language')
+    @$el.find('.code-language').removeClass 'selected-language'
+    target.addClass 'selected-language'
+    aceConfig = me.get('aceConfig') ? {}
+    return if (aceConfig.language or 'javascript') is codeLanguage
+    aceConfig.language = codeLanguage
+    me.set 'aceConfig', aceConfig
+    me.save()  # me.patch() doesn't work if aceConfig previously existed and we switched just once
+
+    firstButton = @$el.find('#beginner-campaign .game-mode-wrapper').delay(500).addClass('hovered', 500).delay(500).removeClass('hovered', 500)
+    lastButton = @$el.find('#multiplayer .game-mode-wrapper').delay(1000).addClass('hovered', 500).delay(500).removeClass('hovered', 500)
+    $('#page-container').animate {scrollTop: firstButton.offset().top - 100, easing: 'easeInOutCubic'}, 500
+    @updateLanguageLogos codeLanguage
diff --git a/app/views/kinds/CocoView.coffee b/app/views/kinds/CocoView.coffee
index 18122b830..541d02657 100644
--- a/app/views/kinds/CocoView.coffee
+++ b/app/views/kinds/CocoView.coffee
@@ -4,6 +4,7 @@ CocoClass = require 'lib/CocoClass'
 loadingScreenTemplate = require 'templates/loading'
 loadingErrorTemplate = require 'templates/loading_error'
 
+lastToggleModalCall = 0
 visibleModal = null
 waitingModal = null
 classCount = 0
@@ -15,9 +16,6 @@ module.exports = class CocoView extends Backbone.View
   template: -> ''
 
   events:
-    'click a': 'toggleModal'
-    'click button': 'toggleModal'
-    'click li': 'toggleModal'
     'click .retry-loading-resource': 'onRetryResource'
     'click .retry-loading-request': 'onRetryRequest'
 
@@ -46,7 +44,6 @@ module.exports = class CocoView extends Backbone.View
     @subviews = {}
     @listenToShortcuts()
     @updateProgressBar = _.debounce @updateProgressBar, 100
-    @toggleModal = _.debounce @toggleModal, 100
     # Backbone.Mediator handles subscription setup/teardown automatically
 
     @listenTo(@supermodel, 'loaded-all', @onLoaded)
@@ -106,7 +103,7 @@ module.exports = class CocoView extends Backbone.View
     context ?= {}
     context.isProduction = document.location.href.search(/codecombat.com/) isnt -1
     context.me = me
-    context.pathname = document.location.pathname  # like "/play/level"
+    context.pathname = document.location.pathname  # like '/play/level'
     context.fbRef = context.pathname.replace(/[^a-zA-Z0-9+/=\-.:_]/g, '').slice(0, 40) or 'home'
     context.isMobile = @isMobile()
     context.isIE = @isIE()
@@ -150,6 +147,8 @@ module.exports = class CocoView extends Backbone.View
 
   # Modals
 
+  @lastToggleModalCall = 0
+
   toggleModal: (e) ->
     if $(e.currentTarget).prop('target') is '_blank'
       return true
@@ -158,6 +157,7 @@ module.exports = class CocoView extends Backbone.View
     return unless elem.data('toggle') is 'coco-modal'
     target = elem.data('target')
     view = application.router.getView(target, '_modal') # could set up a system for loading cached modals, if told to
+    e.stopPropagation()
     @openModalView(view)
 
   openModalView: (modalView, softly=false) ->
@@ -205,7 +205,7 @@ module.exports = class CocoView extends Backbone.View
 
   showReadOnly: ->
     return if me.isAdmin()
-    warning = $.i18n.t 'editor.read_only_warning2', defaultValue: "Note: you can't save any edits here, because you're not logged in."
+    warning = $.i18n.t 'editor.read_only_warning2', defaultValue: 'Note: you can\'t save any edits here, because you\'re not logged in.'
     noty text: warning, layout: 'center', type: 'information', killer: true, timeout: 5000
 
   # Loading ModalViews
@@ -264,11 +264,12 @@ module.exports = class CocoView extends Backbone.View
 
   # Utilities
 
-  getQueryVariable: (param, defaultValue) ->
+  getQueryVariable: (param, defaultValue) -> CocoView.getQueryVariable(param, defaultValue)
+  @getQueryVariable: (param, defaultValue) ->
     query = document.location.search.substring 1
-    pairs = (pair.split("=") for pair in query.split "&")
+    pairs = (pair.split('=') for pair in query.split '&')
     for pair in pairs when pair[0] is param
-      return {"true": true, "false": false}[pair[1]] ? decodeURIComponent(pair[1])
+      return {'true': true, 'false': false}[pair[1]] ? decodeURIComponent(pair[1])
     defaultValue
 
   getRootView: ->
@@ -282,16 +283,16 @@ module.exports = class CocoView extends Backbone.View
 
   isIE: ->
     ua = navigator.userAgent or navigator.vendor or window.opera
-    return ua.search("MSIE") != -1
+    return ua.search('MSIE') != -1
 
   isMac: ->
     navigator.platform.toUpperCase().indexOf('MAC') isnt -1
 
   initSlider: ($el, startValue, changeCallback) ->
-    slider = $el.slider({ animate: "fast" })
+    slider = $el.slider({animate: 'fast'})
     slider.slider('value', startValue)
-    slider.on('slide',changeCallback)
-    slider.on('slidechange',changeCallback)
+    slider.on('slide', changeCallback)
+    slider.on('slidechange', changeCallback)
     slider
 
 
diff --git a/app/views/kinds/ModalView.coffee b/app/views/kinds/ModalView.coffee
index 26a32081a..ad25b3c09 100644
--- a/app/views/kinds/ModalView.coffee
+++ b/app/views/kinds/ModalView.coffee
@@ -1,18 +1,23 @@
 CocoView = require './CocoView'
 
 module.exports = class ModalView extends CocoView
-  className: "modal fade"
+  className: 'modal fade'
   closeButton: true
   closesOnClickOutside: true
   modalWidthPercent: null
   plain: false
 
+  events:
+    'click a': 'toggleModal'
+    'click button': 'toggleModal'
+    'click li': 'toggleModal'
+
   shortcuts:
     'esc': 'hide'
 
   constructor: (options) ->
     options ?= {}
-    @className = @className.replace " fade", "" if options.instant
+    @className = @className.replace ' fade', '' if options.instant
     @closeButton = options.closeButton if options.closeButton?
     @modalWidthPercent = options.modalWidthPercent if options.modalWidthPercent
     super options
@@ -46,7 +51,7 @@ module.exports = class ModalView extends CocoView
 
   hide: ->
     @trigger 'hide'
-    @$el.removeClass('fade').modal "hide"
+    @$el.removeClass('fade').modal 'hide'
 
   onHidden: ->
     @trigger 'hidden'
diff --git a/app/views/kinds/RootView.coffee b/app/views/kinds/RootView.coffee
index 3350dc48e..aac5dc64f 100644
--- a/app/views/kinds/RootView.coffee
+++ b/app/views/kinds/RootView.coffee
@@ -6,6 +6,10 @@ CocoView = require './CocoView'
 {logoutUser, me} = require('lib/auth')
 locale = require 'locale/locale'
 
+Achievement = require '../../models/Achievement'
+User = require '../../models/User'
+# TODO remove
+
 filterKeyboardEvents = (allowedEvents, func) ->
   return (splat...) ->
     e = splat[0]
@@ -14,10 +18,73 @@ filterKeyboardEvents = (allowedEvents, func) ->
 
 module.exports = class RootView extends CocoView
   events:
-    "click #logout-button": "logoutAccount"
+    'click #logout-button': 'logoutAccount'
     'change .language-dropdown': 'onLanguageChanged'
     'click .toggle-fullscreen': 'toggleFullscreen'
     'click .auth-button': 'onClickAuthbutton'
+    'click a': 'toggleModal'
+    'click button': 'toggleModal'
+    'click li': 'toggleModal'
+
+  subscriptions:
+    'achievements:new': 'handleNewAchievements'
+
+  showNewAchievement: (achievement, earnedAchievement) ->
+    currentLevel = me.level()
+    nextLevel = currentLevel + 1
+    currentLevelExp = User.expForLevel(currentLevel)
+    nextLevelExp = User.expForLevel(nextLevel)
+    totalExpNeeded = nextLevelExp - currentLevelExp
+    expFunction = achievement.getExpFunction()
+    currentExp = me.get('points')
+    previousExp = currentExp - achievement.get('worth')
+    previousExp = expFunction(earnedAchievement.get('previouslyAchievedAmount')) * achievement.get('worth') if achievement.isRepeatable()
+    achievedExp = currentExp - previousExp
+    leveledUp = currentExp - achievedExp < currentLevelExp
+    alreadyAchievedPercentage = 100 * (previousExp - currentLevelExp) / totalExpNeeded
+    newlyAchievedPercentage = if leveledUp then 100 * (currentExp - currentLevelExp) / totalExpNeeded else  100 * achievedExp / totalExpNeeded
+
+    console.debug "Current level is #{currentLevel} (#{currentLevelExp} xp), next level is #{nextLevel} (#{nextLevelExp} xp)."
+    console.debug "Need a total of #{nextLevelExp - currentLevelExp}, already had #{previousExp} and just now earned #{achievedExp} totalling on #{currentExp}"
+
+    alreadyAchievedBar = $("<div class='progress-bar progress-bar-warning' style='width:#{alreadyAchievedPercentage}%'></div>")
+    newlyAchievedBar = $("<div data-toggle='tooltip' class='progress-bar progress-bar-success' style='width:#{newlyAchievedPercentage}%'></div>")
+    emptyBar = $("<div data-toggle='tooltip' class='progress-bar progress-bar-white' style='width:#{100 - newlyAchievedPercentage - alreadyAchievedPercentage}%'></div>")
+    progressBar = $('<div class="progress" data-toggle="tooltip"></div>').append(alreadyAchievedBar).append(newlyAchievedBar).append(emptyBar)
+    message = if (currentLevel isnt 1) and leveledUp then "Reached level #{currentLevel}!" else null
+
+    alreadyAchievedBar.tooltip(title: "#{currentExp} XP in total")
+    newlyAchievedBar.tooltip(title: "#{achievedExp} XP earned")
+    emptyBar.tooltip(title: "#{nextLevelExp - currentExp} XP until level #{nextLevel}")
+
+    # TODO a default should be linked here
+    imageURL = '/file/' + achievement.get('icon')
+    data =
+      title: achievement.get('name')
+      image: $("<img src='#{imageURL}' />")
+      description: achievement.get('description')
+      progressBar: progressBar
+      earnedExp: "+ #{achievedExp} XP"
+      message: message
+
+    options =
+      autoHideDelay: 10000
+      globalPosition: 'bottom right'
+      showDuration: 400
+      style: 'achievement'
+      autoHide: true
+      clickToHide: true
+
+    $.notify( data, options )
+
+  handleNewAchievements: (earnedAchievements) ->
+    _.each(earnedAchievements.models, (earnedAchievement) =>
+      achievement = new Achievement(_id: earnedAchievement.get('achievement'))
+      console.log achievement
+      achievement.fetch(
+        success: (achievement) => @showNewAchievement(achievement, earnedAchievement)
+      )
+    )
 
   logoutAccount: ->
     logoutUser($('#login-email').val())
@@ -47,7 +114,7 @@ module.exports = class RootView extends CocoView
 
   afterRender: ->
     super(arguments...)
-    @chooseTab(location.hash.replace('#','')) if location.hash
+    @chooseTab(location.hash.replace('#', '')) if location.hash
     @buildLanguages()
     $('body').removeClass('is-playing')
 
@@ -57,10 +124,10 @@ module.exports = class RootView extends CocoView
   # TODO: automate tabs to put in hashes when they are clicked
 
   buildLanguages: ->
-    $select = @$el.find(".language-dropdown").empty()
-    if $select.hasClass("fancified")
+    $select = @$el.find('.language-dropdown').empty()
+    if $select.hasClass('fancified')
       $select.parent().find('.options, .trigger').remove()
-      $select.unwrap().removeClass("fancified")
+      $select.unwrap().removeClass('fancified')
     preferred = me.lang()
     codes = _.keys(locale)
     genericCodes = _.filter codes, (code) ->
@@ -68,27 +135,27 @@ module.exports = class RootView extends CocoView
         code2 isnt code and code2.split('-')[0] is code)
     for code, localeInfo of locale when not (code in genericCodes) or code is preferred
       $select.append(
-        $("<option></option>").val(code).text(localeInfo.nativeDescription))
+        $('<option></option>').val(code).text(localeInfo.nativeDescription))
     $select.val(preferred).fancySelect().parent().find('.trigger').addClass('header-font')
     $('body').attr('lang', preferred)
 
   onLanguageChanged: ->
-    newLang = $(".language-dropdown").val()
+    newLang = $('.language-dropdown').val()
     $.i18n.setLng(newLang, {})
     @saveLanguage(newLang)
     @render()
-    unless newLang.split('-')[0] is "en"
-      @openModalView(application.router.getView("modal/diplomat_suggestion", "_modal"))
+    unless newLang.split('-')[0] is 'en'
+      @openModalView(application.router.getView('modal/diplomat_suggestion', '_modal'))
 
   saveLanguage: (newLang) ->
     me.set('preferredLanguage', newLang)
-    res = me.save()
+    res = me.patch()
     return unless res
     res.error ->
       errors = JSON.parse(res.responseText)
-      console.warn "Error saving language:", errors
+      console.warn 'Error saving language:', errors
     res.success (model, response, options) ->
-      #console.log "Saved language:", newLang
+      #console.log 'Saved language:', newLang
 
   toggleFullscreen: (e) ->
     # https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Using_full_screen_mode?redirectlocale=en-US&redirectslug=Web/Guide/DOM/Using_full_screen_mode
diff --git a/app/views/kinds/SearchView.coffee b/app/views/kinds/SearchView.coffee
index 209abdd8e..91b04d4d5 100644
--- a/app/views/kinds/SearchView.coffee
+++ b/app/views/kinds/SearchView.coffee
@@ -1,11 +1,15 @@
 View = require 'views/kinds/RootView'
 template = require 'templates/kinds/search'
-forms = require('lib/forms')
-app = require('application')
+forms = require 'lib/forms'
+app = require 'application'
 
 class SearchCollection extends Backbone.Collection
-  initialize: (modelURL, @model, @term) ->
-    @url = "#{modelURL}/search?project=true"
+  initialize: (modelURL, @model, @term, @projection) ->
+    @url = "#{modelURL}?project="
+    if @projection? and not (@projection == [])
+      @url += projection[0]
+      @url += ',' + projected for projected in projection[1..]
+    else @url += 'true'
     @url += "&term=#{term}" if @term
 
 module.exports = class SearchView extends View
@@ -17,6 +21,7 @@ module.exports = class SearchView extends View
   model: null # Article
   modelURL: null # '/db/article'
   tableTemplate: null # require 'templates/editor/article/table'
+  projected: null # ['name', 'description', 'version'] or null for default
 
   events:
     'change input#search': 'runSearch'
@@ -26,27 +31,6 @@ module.exports = class SearchView extends View
     'shown.bs.modal #new-model-modal': 'focusOnName'
     'hidden.bs.modal #new-model-modal': 'onModalHidden'
 
-  getRenderData: ->
-    context = super()
-    switch @modelLabel
-      when 'Level'
-        context.currentEditor = 'editor.level_title'
-        context.currentNew = 'editor.new_level_title'
-        context.currentNewSignup = 'editor.new_level_title_login'
-        context.currentSearch = 'editor.level_search_title'
-      when 'Thang Type'
-        context.currentEditor = 'editor.thang_title'
-        context.currentNew = 'editor.new_thang_title'
-        context.currentNewSignup = 'editor.new_thang_title_login'
-        context.currentSearch = 'editor.thang_search_title'
-      when 'Article'
-        context.currentEditor = 'editor.article_title'
-        context.currentNew = 'editor.new_article_title'
-        context.currentNewSignup = 'editor.new_article_title_login'
-        context.currentSearch = 'editor.article_search_title'
-    @$el.i18n()
-    context
-
   constructor: (options) ->
     @runSearch = _.debounce(@runSearch, 500)
     super options
@@ -61,11 +45,12 @@ module.exports = class SearchView extends View
     searchInput.focus()
 
   runSearch: =>
+    return if @destroyed
     term = @$el.find('input#search').val()
     return if @sameSearch(term)
     @removeOldSearch()
 
-    @collection = new SearchCollection(@modelURL, @model, term)
+    @collection = new SearchCollection(@modelURL, @model, term, @projection)
     @collection.term = term # needed?
     @listenTo(@collection, 'sync', @onSearchChange)
     @showLoading(@$el.find('.results'))
@@ -74,7 +59,7 @@ module.exports = class SearchView extends View
     @collection.fetch()
 
   updateHash: (term) ->
-    newPath = document.location.pathname + (if term then "#" + term else "")
+    newPath = document.location.pathname + (if term then '#' + term else '')
     currentPath = document.location.pathname + document.location.hash
     app.router.navigate(newPath) if newPath isnt currentPath
 
@@ -118,7 +103,7 @@ module.exports = class SearchView extends View
   onModalHidden: ->
     # Can only redirect after the modal hidden event has triggered
     base = document.location.pathname[1..] + '/'
-    app.router.navigate(base + (@model.get('slug') or @model.id), {trigger:true})
+    app.router.navigate(base + (@model.get('slug') or @model.id), {trigger: true})
 
   focusOnName: ->
     @$el.find('#name').focus()
diff --git a/app/views/legal_view.coffee b/app/views/legal_view.coffee
index 92aedb97e..09ae6f2c3 100644
--- a/app/views/legal_view.coffee
+++ b/app/views/legal_view.coffee
@@ -2,5 +2,5 @@ View = require 'views/kinds/RootView'
 template = require 'templates/legal'
 
 module.exports = class LegalView extends View
-  id: "legal-view"
+  id: 'legal-view'
   template: template
diff --git a/app/views/modal/auth_modal.coffee b/app/views/modal/auth_modal.coffee
index 43a2e23be..81edc7dd4 100644
--- a/app/views/modal/auth_modal.coffee
+++ b/app/views/modal/auth_modal.coffee
@@ -6,25 +6,25 @@ User = require 'models/User'
 application  = require 'application'
 
 module.exports = class AuthModalView extends View
-  id: "auth-modal"
+  id: 'auth-modal'
   template: template
   mode: 'login' # or 'signup'
-  
+
   events:
     # login buttons
-    "click #switch-to-signup-button": "onSignupInstead"
-    "click #signup-confirm-age": "checkAge"
+    'click #switch-to-signup-button': 'onSignupInstead'
+    'click #signup-confirm-age': 'checkAge'
     'submit': 'onSubmitForm' # handles both submit buttons
 
   subscriptions:
     'server-error': 'onServerError'
     'logging-in-with-facebook': 'onLoggingInWithFacebook'
-    
+
   getRenderData: ->
     c = super()
     c.showRequiredError = @options.showRequiredError
-    c.title = {0: "short", 1: "long"}[me.get('testGroupNumber') % 2]
-    c.descriptionOn = {0: "yes", 1: "no"}[Math.floor(me.get('testGroupNumber')/2) % 2]
+    c.title = {0: 'short', 1: 'long'}[me.get('testGroupNumber') % 2]
+    c.descriptionOn = {0: 'yes', 1: 'no'}[Math.floor(me.get('testGroupNumber')/2) % 2]
     if @mode is 'signup'
       application.tracker.identify authModalTitle: c.title
       application.tracker.trackEvent 'Started Signup', authModalTitle: c.title, descriptionOn: c.descriptionOn
@@ -35,20 +35,20 @@ module.exports = class AuthModalView extends View
   afterInsert: ->
     super()
     _.delay application.router.renderLoginButtons, 500
-    
+
   onSignupInstead: (e) ->
     @mode = 'signup'
     @previousFormInputs = forms.formToObject @$el
     @render()
     _.delay application.router.renderLoginButtons, 500
-    
+
   onSubmitForm: (e) ->
     e.preventDefault()
     if @mode is 'login' then @loginAccount() else @createAccount()
     false
 
   checkAge: (e) ->
-    $("#signup-button", @$el).prop 'disabled', not $(e.target).prop('checked')
+    $('#signup-button', @$el).prop 'disabled', not $(e.target).prop('checked')
 
   loginAccount: ->
     forms.clearFormAlerts(@$el)
@@ -62,8 +62,8 @@ module.exports = class AuthModalView extends View
     forms.clearFormAlerts(@$el)
     userObject = forms.formToObject @$el
     delete userObject.subscribe
-    delete userObject["confirm-age"]
-    for key, val of me.attributes when key in ["preferredLanguage", "testGroupNumber", "dateCreated", "wizardColor1", "name", "music", "volume", "emails"]
+    delete userObject['confirm-age']
+    for key, val of me.attributes when key in ['preferredLanguage', 'testGroupNumber', 'dateCreated', 'wizardColor1', 'name', 'music', 'volume', 'emails']
       userObject[key] ?= val
     subscribe = @$el.find('#signup-subscribe').prop('checked')
     userObject.emails ?= {}
@@ -80,4 +80,4 @@ module.exports = class AuthModalView extends View
     @enableModalInProgress(modal) # TODO: part of forms
 
   onServerError: (e) -> # TODO: work error handling into a separate forms system
-    @disableModalInProgress(@$el)
\ No newline at end of file
+    @disableModalInProgress(@$el)
diff --git a/app/views/modal/confirm.coffee b/app/views/modal/confirm.coffee
new file mode 100644
index 000000000..4749fc913
--- /dev/null
+++ b/app/views/modal/confirm.coffee
@@ -0,0 +1,30 @@
+ModalView = require '../kinds/ModalView'
+template = require 'templates/modal/confirm'
+
+module.exports = class ConfirmModal extends ModalView
+  id: 'confirm-modal'
+  template: template
+  closeButton: true
+  closeOnConfirm: true
+
+  events:
+    'click #decline-button': 'doDecline'
+    'click #confirm-button': 'doConfirm'
+
+  constructor: (@renderData={}, options={}) ->
+    super(options)
+
+  getRenderData: ->
+    context = super()
+    context.closeOnConfirm = @closeOnConfirm
+    _.extend context, @renderData
+
+  setRenderData: (@renderData) ->
+
+  onDecline: (@decline) ->
+
+  onConfirm: (@confirm) ->
+
+  doConfirm: -> @confirm() if @confirm
+
+  doDecline: -> @decline() if @decline
diff --git a/app/views/modal/contact_modal.coffee b/app/views/modal/contact_modal.coffee
index 2e313d44a..0851c9ee9 100644
--- a/app/views/modal/contact_modal.coffee
+++ b/app/views/modal/contact_modal.coffee
@@ -19,12 +19,12 @@ contactSchema =
       minLength: 1
 
 module.exports = class ContactView extends View
-  id: "contact-modal"
+  id: 'contact-modal'
   template: template
   closeButton: true
 
   events:
-    "click #contact-submit-button": "contact"
+    'click #contact-submit-button': 'contact'
 
   contact: ->
     forms.clearFormAlerts @$el
@@ -33,3 +33,4 @@ module.exports = class ContactView extends View
     return forms.applyErrorsToForm @$el, res.errors unless res.valid
     window.tracker?.trackEvent 'Sent Feedback', message: contactMessage
     sendContactMessage contactMessage, @$el
+    $.post "/db/user/#{me.id}/track/contact_codecombat"
diff --git a/app/views/modal/diplomat_suggestion_modal.coffee b/app/views/modal/diplomat_suggestion_modal.coffee
index 511fe369a..48312ad36 100644
--- a/app/views/modal/diplomat_suggestion_modal.coffee
+++ b/app/views/modal/diplomat_suggestion_modal.coffee
@@ -1,18 +1,18 @@
 View = require 'views/kinds/ModalView'
 template = require 'templates/modal/diplomat_suggestion'
-{me} = require('lib/auth')
-forms = require('lib/forms')
+{me} = require 'lib/auth'
+forms = require 'lib/forms'
 
 module.exports = class DiplomatSuggestionView extends View
-  id: "diplomat-suggestion-modal"
+  id: 'diplomat-suggestion-modal'
   template: template
 
   events:
-    "click #subscribe-button": "subscribeAsDiplomat"
+    'click #subscribe-button': 'subscribeAsDiplomat'
 
   subscribeAsDiplomat: ->
     me.setEmailSubscription 'diplomatNews', true
-    me.save()
-    $("#email_translator").prop("checked", 1)
+    me.patch()
+    $('#email_translator').prop('checked', 1)
     @hide()
     return
diff --git a/app/views/modal/employer_signup_modal.coffee b/app/views/modal/employer_signup_modal.coffee
index e7d88ac57..5355e26c9 100644
--- a/app/views/modal/employer_signup_modal.coffee
+++ b/app/views/modal/employer_signup_modal.coffee
@@ -1,27 +1,26 @@
 View = require 'views/kinds/ModalView'
 template = require 'templates/modal/employer_signup_modal'
-forms = require('lib/forms')
+forms = require 'lib/forms'
 User = require 'models/User'
-auth = require('lib/auth')
+auth = require 'lib/auth'
 me = auth.me
 
 module.exports = class EmployerSignupView extends View
-  id: "employer-signup"
+  id: 'employer-signup'
   template: template
   closeButton: true
 
-
   subscriptions:
-    "server-error": "onServerError"
+    'server-error': 'onServerError'
     'linkedin-loaded': 'onLinkedInLoaded'
-    "created-user-without-reload": 'createdAccount'
+    'created-user-without-reload': 'createdAccount'
 
   events:
-    "click #contract-agreement-button": "agreeToContract"
-    "click #create-account-button": "createAccount"
-    "click .login-link": "setHashToOpenModalAutomatically"
-    "keydown": "checkForFormSubmissionEnterPress"
-
+    'click #contract-agreement-button': 'agreeToContract'
+    'click #create-account-button': 'createAccount'
+    'click #more-info-button': 'submitMoreInfoEmail'
+    'click .login-link': 'setHashToOpenModalAutomatically'
+    'keydown': 'checkForFormSubmissionEnterPress'
 
   constructor: (options) ->
     super(options)
@@ -30,6 +29,7 @@ module.exports = class EmployerSignupView extends View
     @reloadWhenClosed = false
     @linkedinLoaded = Boolean(IN.parse)
     @waitingForLinkedIn = false
+    @sentMoreInfoEmail = false
     window.contractCallback = =>
       @authorizedWithLinkedIn = IN?.User?.isAuthorized()
       @render()
@@ -47,7 +47,7 @@ module.exports = class EmployerSignupView extends View
 
   afterInsert: ->
     super()
-    linkedInButtonParentElement = document.getElementById("linkedInAuthButton")
+    linkedInButtonParentElement = document.getElementById('linkedInAuthButton')
     if linkedInButtonParentElement
       if @linkedinLoaded
         @renderLinkedInButton()
@@ -57,8 +57,9 @@ module.exports = class EmployerSignupView extends View
   getRenderData: ->
     context = super()
     context.userIsAuthorized = @authorizedWithLinkedIn
-    context.userHasSignedContract = "employer" in me.get("permissions")
+    context.userHasSignedContract = 'employer' in me.get('permissions')
     context.userIsAnonymous = context.me.get('anonymous')
+    context.sentMoreInfoEmail = @sentMoreInfoEmail
     context
 
   agreeToContract: ->
@@ -67,7 +68,7 @@ module.exports = class EmployerSignupView extends View
       $.ajax
         url: "/db/user/#{me.id}/agreeToEmployerAgreement"
         data: profileData
-        type: "POST"
+        type: 'POST'
         success: @handleAgreementSuccess
         error: @handleAgreementFailure
 
@@ -80,29 +81,52 @@ module.exports = class EmployerSignupView extends View
     alert "There was an error signing the contract. Please contact team@codecombat.com with this error: #{error.responseText}"
 
   checkForFormSubmissionEnterPress: (e) ->
-    if e.which is 13 then @createAccount(e)
+    if e.which is 13
+      if $('#signup-email').val() isnt '' and $('#signup-password').val() isnt ''
+        @createAccount(e)
+      else if $('#more-info-email').val() isnt ''
+        @submitMoreInfoEmail e
 
   createAccount: (e) =>
     window.tracker?.trackEvent 'Finished Employer Signup'
+    el = $('#signup-form')
     e.stopPropagation()
-    forms.clearFormAlerts(@$el)
-    userObject = forms.formToObject @$el
+    forms.clearFormAlerts(el)
+    userObject = forms.formToObject el
     delete userObject.subscribe
-    for key, val of me.attributes when key in ["preferredLanguage", "testGroupNumber", "dateCreated", "wizardColor1", "name", "music", "volume", "emails"]
+    for key, val of me.attributes when key in ['preferredLanguage', 'testGroupNumber', 'dateCreated', 'wizardColor1', 'name', 'music', 'volume', 'emails']
       userObject[key] ?= val
     userObject.emails ?= {}
     userObject.emails.employerNotes = {enabled: true}
     res = tv4.validateMultiple userObject, User.schema
-    return forms.applyErrorsToForm(@$el, res.errors) unless res.valid
-    @enableModalInProgress(@$el)
+    return forms.applyErrorsToForm(el, res.errors) unless res.valid
+    @enableModalInProgress(el)
     auth.createUserWithoutReload userObject, null
 
+  submitMoreInfoEmail: (e) =>
+    emailAddress = $('#more-info-email').val()
+    window.tracker?.trackEvent 'Employer requested more information.'
+    successFunc = =>
+      @sentMoreInfoEmail = true
+      @render()
+    errorFunc = =>
+      alert('Something went wrong! Please contact team@codecombat.com for more information and inform them of this error.')
+    $.ajax
+      type: 'POST'
+      url: '/contact'
+      data:
+        email: emailAddress
+        message: "THIS IS AN AUTOMATED MESSAGE FROM THE EMPLOYER SIGNUP FORM \n Please send me more info about hiring CodeCombat players."
+      success: successFunc
+      error: errorFunc
+    $.post '/stacklead', email: emailAddress
+
   setHashToOpenModalAutomatically: (e) ->
-    window.location.hash = "employerSignupLoggingIn"
+    window.location.hash = 'employerSignupLoggingIn'
 
   createdAccount: ->
     @reloadWhenClosed = true
-    @listenTo me,"sync", =>
+    @listenTo me, 'sync', =>
       @render()
       IN.parse()
     me.fetch()
diff --git a/app/views/modal/job_profile_contact_modal.coffee b/app/views/modal/job_profile_contact_modal.coffee
index 236301454..0a933fe48 100644
--- a/app/views/modal/job_profile_contact_modal.coffee
+++ b/app/views/modal/job_profile_contact_modal.coffee
@@ -27,7 +27,7 @@ contactSchema =
       minLength: 1
 
 module.exports = class JobProfileContactView extends ContactView
-  id: "job-profile-contact-modal"
+  id: 'job-profile-contact-modal'
   template: template
 
   contact: ->
@@ -36,6 +36,8 @@ module.exports = class JobProfileContactView extends ContactView
     contactMessage.recipientID = @options.recipientID
     res = tv4.validateMultiple contactMessage, contactSchema
     return forms.applyErrorsToForm @$el, res.errors unless res.valid
-    contactMessage.message += '\n\n\n\n[CodeCombat says: please let us know if you end up accepting this job. Thanks!]'
+    contactMessage.message += "\n\n\n\n[For reference, the recipient's CodeCombat username is  #{@options.recipientUserName}!]"
     window.tracker?.trackEvent 'Sent Job Profile Message', message: contactMessage
     sendContactMessage contactMessage, @$el
+    $.post "/db/user/#{me.id}/track/contact_candidate"
+    $.post "/db/user/#{@options.recipientID}/track/contacted_by_employer" unless me.isAdmin()
diff --git a/app/views/modal/model_modal.coffee b/app/views/modal/model_modal.coffee
index 67602431d..50b0cdd8a 100644
--- a/app/views/modal/model_modal.coffee
+++ b/app/views/modal/model_modal.coffee
@@ -4,6 +4,9 @@ template = require 'templates/modal/model'
 module.exports = class ModelModal extends View
   id: 'model-modal'
   template: template
+  plain: true
+
+  events: 'click .save-model': 'onSaveModel'
 
   constructor: (options) ->
     super options
@@ -19,6 +22,7 @@ module.exports = class ModelModal extends View
 
   afterRender: ->
     return unless @supermodel.finished()
+    @modelTreemas = {}
     for model in @models
       data = $.extend true, {}, model.attributes
       schema = $.extend true, {}, model.schema()
@@ -30,6 +34,7 @@ module.exports = class ModelModal extends View
       modelTreema?.build()
       modelTreema?.open()
       @openTastyTreemas modelTreema, model
+      @modelTreemas[model.id] = modelTreema
 
   openTastyTreemas: (modelTreema, model) ->
     # To save on quick inspection, let's auto-open the properties we're most likely to want to see.
@@ -44,3 +49,23 @@ module.exports = class ModelModal extends View
         }[team]
         for dessert in desserts
           child.childrenTreemas[dessert]?.open()
+
+  onSaveModel: (e) ->
+    container = $(e.target).closest('.model-container')
+    model = _.find @models, id: container.data('model-id')
+    treema = @modelTreemas[model.id]
+    for key, val of treema.data when not _.isEqual val, model.get key
+      console.log 'Updating', key, 'from', model.get(key), 'to', val
+      model.set key, val
+    for key, val of model.attributes when treema.get(key) is undefined and not _.string.startsWith key, '_'
+      console.log 'Deleting', key, 'which was', val, 'but man, that ain\'t going to work, now is it?'
+      model.unset key
+    if errors = model.validate()
+      return console.warn model, 'failed validation with errors:', errors
+    return unless res = model.patch()
+    res.error =>
+      return if @destroyed
+      console.error model, 'failed to save with error:', res.responseText
+    res.success (model, response, options) =>
+      return if @destroyed
+      @hide()
diff --git a/app/views/modal/recover_modal.coffee b/app/views/modal/recover_modal.coffee
index c77017e82..c65fc1f8a 100644
--- a/app/views/modal/recover_modal.coffee
+++ b/app/views/modal/recover_modal.coffee
@@ -1,6 +1,6 @@
 View = require 'views/kinds/ModalView'
 template = require 'templates/modal/recover'
-forms = require('lib/forms')
+forms = require 'lib/forms'
 {genericFailure} = require 'lib/errors'
 
 filterKeyboardEvents = (allowedEvents, func) ->
@@ -10,12 +10,12 @@ filterKeyboardEvents = (allowedEvents, func) ->
     return func(splat...)
 
 module.exports = class RecoverModalView extends View
-  id: "recover-modal"
+  id: 'recover-modal'
   template: template
-  
+
   events:
-    "click #recover-button": "recoverAccount"
-    "keydown input": "recoverAccount"
+    'click #recover-button': 'recoverAccount'
+    'keydown input': 'recoverAccount'
 
   subscriptions:
     'server-error': 'onServerError'
@@ -31,10 +31,10 @@ module.exports = class RecoverModalView extends View
     forms.clearFormAlerts(@$el)
     email = (forms.formToObject @$el).email
     return unless email
-    res = $.post '/auth/reset', {email:email}, @successfullyRecovered
+    res = $.post '/auth/reset', {email: email}, @successfullyRecovered
     res.fail(genericFailure)
     @enableModalInProgress(@$el)
-    
+
   successfullyRecovered: =>
     @disableModalInProgress(@$el)
     @$el.find('.modal-body:visible').text('Recovery email sent.')
diff --git a/app/views/modal/save_version_modal.coffee b/app/views/modal/save_version_modal.coffee
index 9b7e0f110..9edaaf859 100644
--- a/app/views/modal/save_version_modal.coffee
+++ b/app/views/modal/save_version_modal.coffee
@@ -34,10 +34,10 @@ module.exports = class SaveVersionModal extends ModalView
     changeEl = @$el.find('.changes-stub')
     if insertDeltaView
       try
-        deltaView = new DeltaView({model:@model})
+        deltaView = new DeltaView({model: @model})
         @insertSubView(deltaView, changeEl)
       catch e
-        console.error "Couldn't create delta view:", e
+        console.error 'Couldn\'t create delta view:', e
     @$el.find('.commit-message input').attr('placeholder', $.i18n.t('general.commit_msg'))
 
   onClickSaveButton: ->
@@ -57,7 +57,6 @@ module.exports = class SaveVersionModal extends ModalView
     }
     errors = patch.validate()
     forms.applyErrorsToForm(@$el, errors) if errors
-    patch.set 'editPath', document.location.pathname
     res = patch.save()
     return unless res
     @enableModalInProgress(@$el)
@@ -74,7 +73,7 @@ module.exports = class SaveVersionModal extends ModalView
   onAgreedToCLA: ->
     @$el.find('#agreement-button').text('Saving').prop('disabled', true)
     $.ajax({
-      url: "/db/user/me/agreeToCLA"
+      url: '/db/user/me/agreeToCLA'
       method: 'POST'
       success: @onAgreeSucceeded
       error: @onAgreeFailed
diff --git a/app/views/modal/signup_modal.coffee b/app/views/modal/signup_modal.coffee
index e368034cf..7c34cd6fe 100644
--- a/app/views/modal/signup_modal.coffee
+++ b/app/views/modal/signup_modal.coffee
@@ -1,4 +1,4 @@
 AuthModal = require 'views/modal/auth_modal'
 
 module.exports = class SignupModalView extends AuthModal
-  mode: 'signup'
\ No newline at end of file
+  mode: 'signup'
diff --git a/app/views/modal/versions_modal.coffee b/app/views/modal/versions_modal.coffee
index 9a00f5d58..f00cbe29d 100755
--- a/app/views/modal/versions_modal.coffee
+++ b/app/views/modal/versions_modal.coffee
@@ -2,12 +2,16 @@ ModalView = require 'views/kinds/ModalView'
 template = require 'templates/modal/versions'
 tableTemplate = require 'templates/kinds/table'
 DeltaView = require 'views/editor/delta'
+PatchModal = require 'views/editor/patch_modal'
+nameLoader = require 'lib/NameLoader'
+CocoCollection = require 'collections/CocoCollection'
 
-class VersionsViewCollection extends Backbone.Collection
-  url: ""
+class VersionsViewCollection extends CocoCollection
+  url: ''
   model: null
 
   initialize: (@url, @levelID, @model) ->
+    super()
     @url = url + levelID + '/versions'
     @model = model
 
@@ -18,42 +22,46 @@ module.exports = class VersionsModalView extends ModalView
   modalWidthPercent: 80
 
   # needs to be overwritten by child
-  id: ""
-  url: ""
-  page: ""
-  
+  id: ''
+  url: ''
+  page: ''
+
   events:
     'change input.select': 'onSelectionChanged'
 
   constructor: (options, @ID, @model) ->
     super options
-    @view = new model(_id: @ID)
-    @view.fetch()
-    @listenToOnce(@view, 'sync', @onViewSync)
+    @original = new model(_id: @ID)
+    @original = @supermodel.loadModel(@original, 'document').model
+    @listenToOnce(@original, 'sync', @onViewSync)
 
   onViewSync: ->
-    @collection = new VersionsViewCollection(@url, @view.attributes.original, @model)
-    @collection.fetch()
-    @listenTo(@collection, 'sync', @onVersionFetched)
+    @versions = new VersionsViewCollection(@url, @original.attributes.original, @model)
+    @versions = @supermodel.loadCollection(@versions, 'versions').model
+    @listenTo(@versions, 'sync', @onVersionsFetched)
 
-  onVersionFetched: ->
-    @startsLoading = false
-    @render()
+  onVersionsFetched: ->
+    ids = (p.get('creator') for p in @versions.models)
+    jqxhrOptions = nameLoader.loadNames ids
+    @supermodel.addRequestResource('user_names', jqxhrOptions).load() if jqxhrOptions
 
   onSelectionChanged: ->
     rows = @$el.find 'input.select:checked'
     deltaEl = @$el.find '.delta-view'
     @removeSubView(@deltaView) if @deltaView
     @deltaView = null
-    if rows.length isnt 2 then return 
-    
-    laterVersion = new @model(_id:$(rows[0]).val())
-    earlierVersion = new @model(_id:$(rows[1]).val())
-    @deltaView = new DeltaView({model:earlierVersion, comparisonModel:laterVersion, skipPaths:['_id','version', 'commitMessage', 'parent', 'created', 'slug', 'index']})
+    if rows.length isnt 2 then return
+
+    laterVersion = new @model(_id: $(rows[0]).val())
+    earlierVersion = new @model(_id: $(rows[1]).val())
+    @deltaView = new DeltaView({model: earlierVersion, comparisonModel: laterVersion, skipPaths: PatchModal.DOC_SKIP_PATHS})
     @insertSubView(@deltaView, deltaEl)
 
   getRenderData: (context={}) ->
     context = super(context)
     context.page = @page
-    context.dataList = (m.attributes for m in @collection.models) if @collection
+    if @versions
+      context.dataList = (m.attributes for m in @versions.models)
+      for version in context.dataList
+        version.creator = nameLoader.getName(version.creator)
     context
diff --git a/app/views/modal/wizard_settings_modal.coffee b/app/views/modal/wizard_settings_modal.coffee
index 5715a4c1f..1f7d5bc8f 100644
--- a/app/views/modal/wizard_settings_modal.coffee
+++ b/app/views/modal/wizard_settings_modal.coffee
@@ -3,10 +3,10 @@ template = require 'templates/modal/wizard_settings'
 WizardSprite = require 'lib/surface/WizardSprite'
 ThangType = require 'models/ThangType'
 {me} = require 'lib/auth'
-forms = require('lib/forms')
+forms = require 'lib/forms'
 
 module.exports = class WizardSettingsModal extends View
-  id: "wizard-settings-modal"
+  id: 'wizard-settings-modal'
   template: template
   closesOnClickOutside: false
 
@@ -29,7 +29,7 @@ module.exports = class WizardSettingsModal extends View
     name = $('#wizard-settings-name').val()
     success = (id) =>
       forms.clearFormAlerts(@$el)
-      forms.applyErrorsToForm(@$el, {property:'name', message:'is already taken'}) if id and id isnt me.id
+      forms.applyErrorsToForm(@$el, {property: 'name', message: 'is already taken'}) if id and id isnt me.id
     $.ajax("/db/user/#{name}/nameToID", {success: success})
 
   onWizardSettingsDone: ->
@@ -40,14 +40,14 @@ module.exports = class WizardSettingsModal extends View
       forms.applyErrorsToForm(@$el, res)
       return
 
-    res = me.save()
+    res = me.patch()
     return unless res
     save = $('#save-button', @$el).text($.i18n.t('common.saving', defaultValue: 'Saving...'))
       .addClass('btn-info').show().removeClass('btn-danger')
 
     res.error =>
       errors = JSON.parse(res.responseText)
-      console.warn "Got errors saving user:", errors
+      console.warn 'Got errors saving user:', errors
       forms.applyErrorsToForm(@$el, errors)
       @disableModalInProgress(@$el)
 
diff --git a/app/views/multiplayer_view.coffee b/app/views/multiplayer_view.coffee
index cf0fdd64b..acfaefe15 100644
--- a/app/views/multiplayer_view.coffee
+++ b/app/views/multiplayer_view.coffee
@@ -9,7 +9,7 @@ module.exports = class MultiplayerLaunchView extends HomeView
 
 class MultiplayerLaunchModal extends ModalView
   template: modalTemplate
-  id: "multiplayer-launch-modal"
+  id: 'multiplayer-launch-modal'
 
   hide: ->
     $('#multiplayer-video').attr('src','')
@@ -17,4 +17,4 @@ class MultiplayerLaunchModal extends ModalView
 
   onHidden: ->
     $('#multiplayer-video').attr('src','')
-    super()
\ No newline at end of file
+    super()
diff --git a/app/views/not_found.coffee b/app/views/not_found.coffee
index 6febc5ef0..95e94921b 100644
--- a/app/views/not_found.coffee
+++ b/app/views/not_found.coffee
@@ -2,5 +2,5 @@ View = require 'views/kinds/RootView'
 template = require 'templates/not_found'
 
 module.exports = class NotFoundView extends View
-  id: "not-found-view"
+  id: 'not-found-view'
   template: template
diff --git a/app/views/play/common/ladder_submission_view.coffee b/app/views/play/common/ladder_submission_view.coffee
index 02eac35bd..4cf4b7e29 100644
--- a/app/views/play/common/ladder_submission_view.coffee
+++ b/app/views/play/common/ladder_submission_view.coffee
@@ -2,7 +2,7 @@ CocoView = require 'views/kinds/CocoView'
 template = require 'templates/play/common/ladder_submission'
 
 module.exports = class LadderSubmissionView extends CocoView
-  className: "ladder-submission-view"
+  className: 'ladder-submission-view'
   template: template
 
   events:
@@ -79,19 +79,21 @@ module.exports = class LadderSubmissionView extends CocoView
     for thang, spells of submittedCode
       transpiledCode[thang] = {}
       for spellID, spell of spells
-        unless _.contains(@session.get('teamSpells')[@session.get('team')], thang + "/" + spellID) then continue
+        unless _.contains(@session.get('teamSpells')[@session.get('team')], thang + '/' + spellID) then continue
         #DRY this
         aetherOptions =
           problems: {}
           language: language
           functionName: spellID
           functionParameters: []
-          yieldConditionally: spellID is "plan"
+          yieldConditionally: spellID is 'plan'
           globals: ['Vector', '_']
           protectAPI: true
           includeFlow: false
           executionLimit: 1 * 1000 * 1000
-        if spellID is "hear" then aetherOptions["functionParameters"] = ["speaker","message","data"]
+        if spellID is 'hear' then aetherOptions.functionParameters = ['speaker', 'message', 'data']
+        if spellID is 'makeBid' then aetherOptions.functionParameters = ['tileGroupLetter']
+        if spellID is 'findCentroids' then aetherOptions.functionParameters = ['centroids']
 
         aether = new Aether aetherOptions
         transpiledCode[thang][spellID] = aether.transpile spell
diff --git a/app/views/play/ladder/ladder_tab.coffee b/app/views/play/ladder/ladder_tab.coffee
index f979ee005..d0a7ff2a5 100644
--- a/app/views/play/ladder/ladder_tab.coffee
+++ b/app/views/play/ladder/ladder_tab.coffee
@@ -10,14 +10,6 @@ ModelModal = require 'views/modal/model_modal'
 
 HIGHEST_SCORE = 1000000
 
-class LevelSessionsCollection extends CocoCollection
-  url: ''
-  model: LevelSession
-
-  constructor: (levelID) ->
-    super()
-    @url = "/db/level/#{levelID}/all_sessions"
-
 module.exports = class LadderTabView extends CocoView
   id: 'ladder-tab-view'
   template: require 'templates/play/ladder/ladder_tab'
@@ -36,19 +28,19 @@ module.exports = class LadderTabView extends CocoView
 
   constructor: (options, @level, @sessions) ->
     super(options)
-    @socialNetworkRes = @supermodel.addSomethingResource("social_network_apis", 0)
     @teams = teamDataFromLevel @level
     @leaderboards = {}
     @refreshLadder()
+    @socialNetworkRes = @supermodel.addSomethingResource('social_network_apis', 0)
     @checkFriends()
 
   checkFriends: ->
     return if @checked or (not window.FB) or (not window.gapi)
     @checked = true
 
-    # @addSomethingToLoad("facebook_status")
+    # @addSomethingToLoad('facebook_status')
 
-    @fbStatusRes = @supermodel.addSomethingResource("facebook_status", 0)
+    @fbStatusRes = @supermodel.addSomethingResource('facebook_status', 0)
     @fbStatusRes.load()
 
     FB.getLoginStatus (response) =>
@@ -73,9 +65,9 @@ module.exports = class LadderTabView extends CocoView
   onConnectedWithFacebook: -> location.reload() if @connecting
 
   loadFacebookFriends: ->
-    # @addSomethingToLoad("facebook_friends")
+    # @addSomethingToLoad('facebook_friends')
 
-    @fbFriendRes = @supermodel.addSomethingResource("facebook_friends", 0)
+    @fbFriendRes = @supermodel.addSomethingResource('facebook_friends', 0)
     @fbFriendRes.load()
 
     FB.api '/me/friends', @onFacebookFriendsLoaded
@@ -105,6 +97,7 @@ module.exports = class LadderTabView extends CocoView
       friend.otherTeam = if friend.team is 'humans' then 'ogres' else 'humans'
       friend.imageSource = "http://graph.facebook.com/#{friend.facebookID}/picture"
     @facebookFriendSessions = result
+    @render() # because the ladder tab renders before waiting for fb to finish
 
   # GOOGLE PLUS
 
@@ -117,8 +110,8 @@ module.exports = class LadderTabView extends CocoView
 
   gplusSessionStateLoaded: ->
     if application.gplusHandler.loggedIn
-      #@addSomethingToLoad("gplus_friends")
-      @gpFriendRes = @supermodel.addSomethingResource("gplus_friends", 0)
+      #@addSomethingToLoad('gplus_friends')
+      @gpFriendRes = @supermodel.addSomethingResource('gplus_friends', 0)
       @gpFriendRes.load()
       application.gplusHandler.loadFriends @gplusFriendsLoaded
 
@@ -147,6 +140,7 @@ module.exports = class LadderTabView extends CocoView
       friend.otherTeam = if friend.team is 'humans' then 'ogres' else 'humans'
       friend.imageSource = friendsMap[friend.gplusID].image.url
     @gplusFriendSessions = result
+    @render() # because the ladder tab renders before waiting for gplus to finish
 
   # LADDER LOADING
 
@@ -159,7 +153,7 @@ module.exports = class LadderTabView extends CocoView
         oldLeaderboard.destroy()
       teamSession = _.find @sessions.models, (session) -> session.get('team') is team.id
       @leaderboards[team.id] = new LeaderboardData(@level, team.id, teamSession, @ladderLimit)
-      @leaderboardRes = @supermodel.addModelResource(@leaderboards[team.id], 'leaderboard', 3)
+      @leaderboardRes = @supermodel.addModelResource(@leaderboards[team.id], 'leaderboard', {}, 3)
       @leaderboardRes.load()
 
   render: ->
@@ -188,7 +182,7 @@ module.exports = class LadderTabView extends CocoView
 
   generateHistogram: (histogramElement, histogramData, teamName) ->
     #renders twice, hack fix
-    if $("#"+histogramElement.attr("id")).has("svg").length then return
+    if $('#' + histogramElement.attr('id')).has('svg').length then return
     histogramData = histogramData.map (d) -> d*100
 
     margin =
@@ -200,72 +194,71 @@ module.exports = class LadderTabView extends CocoView
     width = 300 - margin.left - margin.right
     height = 125 - margin.top - margin.bottom
 
-    formatCount = d3.format(",.0")
+    formatCount = d3.format(',.0')
 
-    x = d3.scale.linear().domain([-3000,6000]).range([0,width])
+    x = d3.scale.linear().domain([-3000, 6000]).range([0, width])
 
     data = d3.layout.histogram().bins(x.ticks(20))(histogramData)
-    y = d3.scale.linear().domain([0,d3.max(data, (d) -> d.y)]).range([height,10])
+    y = d3.scale.linear().domain([0, d3.max(data, (d) -> d.y)]).range([height, 10])
 
     #create the x axis
-    xAxis = d3.svg.axis().scale(x).orient("bottom").ticks(5).outerTickSize(0)
+    xAxis = d3.svg.axis().scale(x).orient('bottom').ticks(5).outerTickSize(0)
 
-    svg = d3.select("#"+histogramElement.attr("id")).append("svg")
-      .attr("width", width + margin.left + margin.right)
-      .attr("height", height + margin.top + margin.bottom)
-    .append("g")
-      .attr("transform","translate(#{margin.left},#{margin.top})")
-    barClass = "bar"
-    if teamName.toLowerCase() is "ogres" then barClass = "ogres-bar"
-    if teamName.toLowerCase() is "humans" then barClass = "humans-bar"
+    svg = d3.select('#' + histogramElement.attr('id')).append('svg')
+      .attr('width', width + margin.left + margin.right)
+      .attr('height', height + margin.top + margin.bottom)
+    .append('g')
+      .attr('transform', "translate(#{margin.left}, #{margin.top})")
+    barClass = 'bar'
+    if teamName.toLowerCase() is 'ogres' then barClass = 'ogres-bar'
+    if teamName.toLowerCase() is 'humans' then barClass = 'humans-bar'
 
-    bar = svg.selectAll(".bar")
+    bar = svg.selectAll('.bar')
       .data(data)
-    .enter().append("g")
-      .attr("class",barClass)
-      .attr("transform", (d) -> "translate(#{x(d.x)},#{y(d.y)})")
+    .enter().append('g')
+      .attr('class', barClass)
+      .attr('transform', (d) -> "translate(#{x(d.x)}, #{y(d.y)})")
 
-    bar.append("rect")
-      .attr("x",1)
-      .attr("width",width/20)
-      .attr("height", (d) -> height - y(d.y))
+    bar.append('rect')
+      .attr('x', 1)
+      .attr('width', width/20)
+      .attr('height', (d) -> height - y(d.y))
     if @leaderboards[teamName].session?
       playerScore = @leaderboards[teamName].session.get('totalScore') * 100
-      scorebar = svg.selectAll(".specialbar")
+      scorebar = svg.selectAll('.specialbar')
         .data([playerScore])
-        .enter().append("g")
-        .attr("class","specialbar")
-        .attr("transform", "translate(#{x(playerScore)},#{y(9001)})")
+        .enter().append('g')
+        .attr('class', 'specialbar')
+        .attr('transform', "translate(#{x(playerScore)}, #{y(9001)})")
 
-      scorebar.append("rect")
-        .attr("x",1)
-        .attr("width",3)
-        .attr("height",height - y(9001))
-    rankClass = "rank-text"
-    if teamName.toLowerCase() is "ogres" then rankClass = "rank-text ogres-rank-text"
-    if teamName.toLowerCase() is "humans" then rankClass = "rank-text humans-rank-text"
+      scorebar.append('rect')
+        .attr('x', 1)
+        .attr('width', 3)
+        .attr('height', height - y(9001))
+    rankClass = 'rank-text'
+    if teamName.toLowerCase() is 'ogres' then rankClass = 'rank-text ogres-rank-text'
+    if teamName.toLowerCase() is 'humans' then rankClass = 'rank-text humans-rank-text'
 
     message = "#{histogramData.length} players"
     if @leaderboards[teamName].session?
       if @leaderboards[teamName].myRank <= histogramData.length
         message="##{@leaderboards[teamName].myRank} of #{histogramData.length}"
       else
-        message="Rank your session!"
-    svg.append("g")
-      .append("text")
-      .attr("class",rankClass)
-      .attr("y",0)
-      .attr("text-anchor","end")
-      .attr("x",width)
+        message='Rank your session!'
+    svg.append('g')
+      .append('text')
+      .attr('class', rankClass)
+      .attr('y', 0)
+      .attr('text-anchor', 'end')
+      .attr('x', width)
       .text(message)
 
     #Translate the x-axis up
-    svg.append("g")
-      .attr("class", "x axis")
-      .attr("transform","translate(0," + height + ")")
+    svg.append('g')
+      .attr('class', 'x axis')
+      .attr('transform', 'translate(0, ' + height + ')')
       .call(xAxis)
 
-
   consolidateFriends: ->
     allFriendSessions = (@facebookFriendSessions or []).concat(@gplusFriendSessions or [])
     sessions = _.uniq allFriendSessions, false, (session) -> session._id
@@ -286,25 +279,25 @@ module.exports = class LadderTabView extends CocoView
     @ladderLimit += 100
     @refreshLadder()
 
-class LeaderboardData extends CocoClass
+module.exports.LeaderboardData = LeaderboardData = class LeaderboardData extends CocoClass
   ###
   Consolidates what you need to load for a leaderboard into a single Backbone Model-like object.
   ###
 
   constructor: (@level, @team, @session, @limit) ->
     super()
-    @fetch()
 
   fetch: ->
-    @topPlayers = new LeaderboardCollection(@level, {order:-1, scoreOffset: HIGHEST_SCORE, team: @team, limit: @limit})
+    console.warn 'Already have top players on', @ if @topPlayers
+    @topPlayers = new LeaderboardCollection(@level, {order: -1, scoreOffset: HIGHEST_SCORE, team: @team, limit: @limit})
     promises = []
     promises.push @topPlayers.fetch()
 
     if @session
       score = @session.get('totalScore') or 10
-      @playersAbove = new LeaderboardCollection(@level, {order:1, scoreOffset: score, limit: 4, team: @team})
+      @playersAbove = new LeaderboardCollection(@level, {order: 1, scoreOffset: score, limit: 4, team: @team})
       promises.push @playersAbove.fetch()
-      @playersBelow = new LeaderboardCollection(@level, {order:-1, scoreOffset: score, limit: 4, team: @team})
+      @playersBelow = new LeaderboardCollection(@level, {order: -1, scoreOffset: score, limit: 4, team: @team})
       promises.push @playersBelow.fetch()
       level = "#{@level.get('original')}.#{@level.get('version').major}"
       success = (@myRank) =>
@@ -315,8 +308,9 @@ class LeaderboardData extends CocoClass
     @promise
 
   onLoad: =>
-    return if @destroyed
+    return if @destroyed or not @topPlayers.loaded
     @loaded = true
+    @loading = false
     @trigger 'sync', @
     # TODO: cache user ids -> names mapping, and load them here as needed,
     #   and apply them to sessions. Fetching each and every time is too costly.
diff --git a/app/views/play/ladder/ladder_view.coffee b/app/views/play/ladder/ladder_view.coffee
index 6a5f16178..2fef77845 100644
--- a/app/views/play/ladder/ladder_view.coffee
+++ b/app/views/play/ladder/ladder_view.coffee
@@ -12,7 +12,6 @@ SimulateTabView = require './simulate_tab'
 LadderPlayModal = require './play_modal'
 CocoClass = require 'lib/CocoClass'
 
-
 HIGHEST_SCORE = 1000000
 
 class LevelSessionsCollection extends CocoCollection
@@ -32,18 +31,18 @@ module.exports = class LadderView extends RootView
 
   events:
     'click .play-button': 'onClickPlayButton'
-    'click a': 'onClickedLink'
+    'click a:not([data-toggle])': 'onClickedLink'
 
   constructor: (options, @levelID) ->
     super(options)
-    @level = @supermodel.loadModel(new Level(_id:@levelID), 'level').model
+    @level = @supermodel.loadModel(new Level(_id: @levelID), 'level').model
     @sessions = @supermodel.loadCollection(new LevelSessionsCollection(levelID), 'your_sessions').model
 
     @teams = []
 
   onLoaded: ->
     @teams = teamDataFromLevel @level
-    @render()
+    super()
 
   getRenderData: ->
     ctx = super()
@@ -54,6 +53,7 @@ module.exports = class LadderView extends RootView
     ctx.levelDescription = marked(@level.get('description')) if @level.get('description')
     ctx._ = _
     ctx.tournamentTimeLeft = moment(new Date(1402444800000)).fromNow()
+    ctx.winners = require('views/play/ladder/tournament_results')[@levelID]
     ctx
 
   afterRender: ->
@@ -70,7 +70,7 @@ module.exports = class LadderView extends RootView
 
   fetchSessionsAndRefreshViews: ->
     return if @destroyed or application.userIsIdle or (new Date() - 2000 < @lastRefreshTime) or not @supermodel.finished()
-    @sessions.fetch({"success": @refreshViews})
+    @sessions.fetch({'success': @refreshViews})
 
   refreshViews: =>
     return if @destroyed or application.userIsIdle
@@ -93,7 +93,7 @@ module.exports = class LadderView extends RootView
 
   showApologeticSignupModal: ->
     SignupModal = require 'views/modal/auth_modal'
-    @openModalView(new SignupModal({showRequiredError:true}))
+    @openModalView(new SignupModal({showRequiredError: true}))
 
   onClickedLink: (e) ->
     link = $(e.target).closest('a').attr('href')
diff --git a/app/views/play/ladder/my_matches_tab.coffee b/app/views/play/ladder/my_matches_tab.coffee
index 3dfe87cbd..458b3c441 100644
--- a/app/views/play/ladder/my_matches_tab.coffee
+++ b/app/views/play/ladder/my_matches_tab.coffee
@@ -27,7 +27,7 @@ module.exports = class MyMatchesTabView extends CocoView
       for match in (session.get('matches') or [])
         id = match.opponents[0].userID
         unless id
-          console.error "Found bad opponent ID in malformed match:", match, "from session", session
+          console.error 'Found bad opponent ID in malformed match:', match, 'from session', session
           continue
         ids.push id unless @nameMap[id]
 
@@ -38,7 +38,7 @@ module.exports = class MyMatchesTabView extends CocoView
       for session in @sessions.models
         for match in session.get('matches') or []
           opponent = match.opponents[0]
-          @nameMap[opponent.userID] ?= nameMap[opponent.userID]?.name ? "<bad match data>"
+          @nameMap[opponent.userID] ?= nameMap[opponent.userID]?.name ? '<bad match data>'
       @finishRendering()
 
     $.ajax('/db/user/-/names', {
@@ -112,7 +112,7 @@ module.exports = class MyMatchesTabView extends CocoView
 
     @$el.find('tr.fresh').removeClass('fresh', 5000)
 
-  generateScoreLineChart: (wrapperID, scoreHistory,teamName) =>
+  generateScoreLineChart: (wrapperID, scoreHistory, teamName) =>
     margin =
       top: 20
       right: 20
@@ -121,20 +121,20 @@ module.exports = class MyMatchesTabView extends CocoView
 
     width = 450 - margin.left - margin.right
     height = 125
-    x = d3.time.scale().range([0,width])
-    y = d3.scale.linear().range([height,0])
+    x = d3.time.scale().range([0, width])
+    y = d3.scale.linear().range([height, 0])
 
-    xAxis = d3.svg.axis().scale(x).orient("bottom").ticks(4).outerTickSize(0)
-    yAxis = d3.svg.axis().scale(y).orient("left").ticks(4).outerTickSize(0)
+    xAxis = d3.svg.axis().scale(x).orient('bottom').ticks(4).outerTickSize(0)
+    yAxis = d3.svg.axis().scale(y).orient('left').ticks(4).outerTickSize(0)
 
     line = d3.svg.line().x(((d) -> x(d.date))).y((d) -> y(d.close))
-    selector = "#" + wrapperID
+    selector = '#' + wrapperID
 
-    svg = d3.select(selector).append("svg")
-      .attr("width", width + margin.left + margin.right)
-      .attr("height", height + margin.top + margin.bottom)
-      .append("g")
-      .attr("transform","translate(#{margin.left},#{margin.top})")
+    svg = d3.select(selector).append('svg')
+      .attr('width', width + margin.left + margin.right)
+      .attr('height', height + margin.top + margin.bottom)
+      .append('g')
+      .attr('transform', "translate(#{margin.left}, #{margin.top})")
     time = 0
     data = scoreHistory.map (d) ->
       time +=1
@@ -146,19 +146,19 @@ module.exports = class MyMatchesTabView extends CocoView
     x.domain(d3.extent(data, (d) -> d.date))
     y.domain(d3.extent(data, (d) -> d.close))
 
-    svg.append("g")
-      .attr("class", "y axis")
+    svg.append('g')
+      .attr('class', 'y axis')
       .call(yAxis)
-      .append("text")
-      .attr("transform", "rotate(-90)")
-      .attr("y",4)
-      .attr("dy", ".75em")
-      .style("text-anchor","end")
-      .text("Score")
-    lineClass = "line"
-    if teamName.toLowerCase() is "ogres" then lineClass = "ogres-line"
-    if teamName.toLowerCase() is "humans" then lineClass = "humans-line"
-    svg.append("path")
+      .append('text')
+      .attr('transform', 'rotate(-90)')
+      .attr('y', 4)
+      .attr('dy', '.75em')
+      .style('text-anchor', 'end')
+      .text('Score')
+    lineClass = 'line'
+    if teamName.toLowerCase() is 'ogres' then lineClass = 'ogres-line'
+    if teamName.toLowerCase() is 'humans' then lineClass = 'humans-line'
+    svg.append('path')
       .datum(data)
-      .attr("class",lineClass)
-      .attr("d",line)
+      .attr('class', lineClass)
+      .attr('d', line)
diff --git a/app/views/play/ladder/play_modal.coffee b/app/views/play/ladder/play_modal.coffee
index 7cfd850b8..e54e79a18 100644
--- a/app/views/play/ladder/play_modal.coffee
+++ b/app/views/play/ladder/play_modal.coffee
@@ -6,7 +6,7 @@ LeaderboardCollection = require 'collections/LeaderboardCollection'
 {teamDataFromLevel} = require './utils'
 
 module.exports = class LadderPlayModal extends View
-  id: "ladder-play-modal"
+  id: 'ladder-play-modal'
   template: template
   closeButton: true
   startsLoading: true
@@ -115,7 +115,7 @@ module.exports = class LadderPlayModal extends View
     success = => cb true
     failure = => cb false
     $.ajax
-      type: "GET"
+      type: 'GET'
       url: "/db/level/#{tutorialLevelID}/exists"
       success: success
       error: failure
@@ -166,18 +166,17 @@ module.exports = class LadderPlayModal extends View
       opponentID: opponent.userID
     }
 
-
 class ChallengersData
   constructor: (@level, @team, @otherTeam, @session) ->
     _.extend @, Backbone.Events
     score = @session?.get('totalScore') or 25
-    @easyPlayer = new LeaderboardCollection(@level, {order:1, scoreOffset: score - 5, limit: 1, team: @otherTeam})
+    @easyPlayer = new LeaderboardCollection(@level, {order: 1, scoreOffset: score - 5, limit: 1, team: @otherTeam})
     @easyPlayer.fetch()
     @listenToOnce(@easyPlayer, 'sync', @challengerLoaded)
-    @mediumPlayer = new LeaderboardCollection(@level, {order:1, scoreOffset: score, limit: 1, team: @otherTeam})
+    @mediumPlayer = new LeaderboardCollection(@level, {order: 1, scoreOffset: score, limit: 1, team: @otherTeam})
     @mediumPlayer.fetch()
     @listenToOnce(@mediumPlayer, 'sync', @challengerLoaded)
-    @hardPlayer = new LeaderboardCollection(@level, {order:-1, scoreOffset: score + 5, limit: 1, team: @otherTeam})
+    @hardPlayer = new LeaderboardCollection(@level, {order: -1, scoreOffset: score + 5, limit: 1, team: @otherTeam})
     @hardPlayer.fetch()
     @listenToOnce(@hardPlayer, 'sync', @challengerLoaded)
 
diff --git a/app/views/play/ladder/simulate_tab.coffee b/app/views/play/ladder/simulate_tab.coffee
index e73a4807a..ddb28030c 100644
--- a/app/views/play/ladder/simulate_tab.coffee
+++ b/app/views/play/ladder/simulate_tab.coffee
@@ -40,15 +40,15 @@ module.exports = class SimulateTabView extends CocoView
 
   onSimulateButtonClick: (e) ->
     application.tracker?.trackEvent 'Simulate Button Click', {}
-    $("#simulate-button").prop "disabled", true
-    $("#simulate-button").text "Simulating..."
+    $('#simulate-button').prop 'disabled', true
+    $('#simulate-button').text 'Simulating...'
 
     @simulator.fetchAndSimulateTask()
 
   refresh: ->
     success = (numberOfGamesInQueue) ->
-      $("#games-in-queue").text numberOfGamesInQueue
-    $.ajax "/queue/messagesInQueueCount", {success}
+      $('#games-in-queue').text numberOfGamesInQueue
+    $.ajax '/queue/messagesInQueueCount', {success}
 
   updateSimulationStatus: (simulationStatus, sessions) ->
     @simulationStatus = simulationStatus
@@ -56,15 +56,15 @@ module.exports = class SimulateTabView extends CocoView
       if sessions?
         #TODO: Fetch names from Redis, the creatorName is denormalized
         creatorNames = (session.creatorName for session in sessions)
-        @simulationStatus = "Simulating game between "
+        @simulationStatus = 'Simulating game between '
         for index in [0...creatorNames.length]
           unless creatorNames[index]
-            creatorNames[index] = "Anonymous"
-          @simulationStatus += (if index != 0 then " and " else "") + creatorNames[index]
-        @simulationStatus += "..."
+            creatorNames[index] = 'Anonymous'
+          @simulationStatus += (if index != 0 then ' and ' else '') + creatorNames[index]
+        @simulationStatus += '...'
     catch e
       console.log "There was a problem with the named simulation status: #{e}"
-    $("#simulation-status-text").text @simulationStatus
+    $('#simulation-status-text').text @simulationStatus
 
   resimulateAllSessions: ->
     postData =
@@ -93,17 +93,17 @@ class SimulatorsLeaderboardData extends CocoClass
     super()
 
   fetch: ->
-    @topSimulators = new SimulatorsLeaderboardCollection({order:-1, scoreOffset: -1, limit: 20})
+    @topSimulators = new SimulatorsLeaderboardCollection({order: -1, scoreOffset: -1, limit: 20})
     promises = []
     promises.push @topSimulators.fetch()
     unless @me.get('anonymous')
       score = @me.get('simulatedBy') or 0
       queueSuccess = (@numberOfGamesInQueue) =>
-      promises.push $.ajax "/queue/messagesInQueueCount", {success: queueSuccess}
-      @playersAbove = new SimulatorsLeaderboardCollection({order:1, scoreOffset: score, limit: 4})
+      promises.push $.ajax '/queue/messagesInQueueCount', {success: queueSuccess}
+      @playersAbove = new SimulatorsLeaderboardCollection({order: 1, scoreOffset: score, limit: 4})
       promises.push @playersAbove.fetch()
       if score
-        @playersBelow = new SimulatorsLeaderboardCollection({order:-1, scoreOffset: score, limit: 4})
+        @playersBelow = new SimulatorsLeaderboardCollection({order: -1, scoreOffset: score, limit: 4})
         promises.push @playersBelow.fetch()
       success = (@myRank) =>
 
diff --git a/app/views/play/ladder/tournament_results.coffee b/app/views/play/ladder/tournament_results.coffee
new file mode 100644
index 000000000..3cbe60305
--- /dev/null
+++ b/app/views/play/ladder/tournament_results.coffee
@@ -0,0 +1,552 @@
+module.exports = results = greed: {}
+
+results.greed.humans = [
+  {team: 'humans', rank: 1, sessionID: '5381e3537585483905a829c1', name: 'Wizard Dude', playtime: 63184, wins: 363, losses: 0, score: 363}
+  {team: 'humans', rank: 2, sessionID: '537cf76184c54c6e05c05415', name: 'Vettax', playtime: 96757, wins: 365, losses: 9, score: 356}
+  {team: 'humans', rank: 3, sessionID: '53836824c85c223a05f4a1dd', name: 'HighSea', playtime: 98996, wins: 354, losses: 7, score: 347}
+  {team: 'humans', rank: 4, sessionID: '537c5cf614aaabe80c69fc8d', name: 'BubbleDragon', playtime: 136876, wins: 352, losses: 12, score: 340}
+  {team: 'humans', rank: 5, sessionID: '537bad0cb0d477e005347fb5', name: 'Bakanio', playtime: 103933, wins: 348, losses: 11, score: 337}
+  {team: 'humans', rank: 6, sessionID: '537cbf86264b3a7d12eb9d55', name: 'zero_degrees', playtime: 4236, wins: 346, losses: 17, score: 329}
+  {team: 'humans', rank: 7, sessionID: '538915d2d06c503805fe40d2', name: 'Transistor', playtime: 742, wins: 347, losses: 19, score: 328}
+  {team: 'humans', rank: 8, sessionID: '537bbc56831db4ca0526ced3', name: 'Chrc', playtime: 2105, wins: 339, losses: 15, score: 324}
+  {team: 'humans', rank: 9, sessionID: '5381d7f87585483905a825fc', name: 'nemoyatpeace', playtime: 121202, wins: 344, losses: 20, score: 324}
+  {team: 'humans', rank: 10, sessionID: '53928ff24ca25c6205e290c0', name: 'Catalina', playtime: 239, wins: 342, losses: 27, score: 315}
+  {team: 'humans', rank: 11, sessionID: '5383f8162757353805a97454', name: 'Zzadded', playtime: 53485, wins: 334, losses: 28, score: 306}
+  {team: 'humans', rank: 12, sessionID: '537d047084c54c6e05c05ab9', name: 'Moojo', playtime: 83687, wins: 331, losses: 27, score: 304}
+  {team: 'humans', rank: 13, sessionID: '537bab02f5b6a9d405ec5107', name: 'Pentiado', playtime: 70424, wins: 336, losses: 33, score: 303}
+  {team: 'humans', rank: 14, sessionID: '537d11947e1e10b705bbc4a6', name: 'Banadux', playtime: 141292, wins: 333, losses: 32, score: 301}
+  {team: 'humans', rank: 15, sessionID: '538181fd7585483905a801e1', name: 'chadnickbok', playtime: 922, wins: 334, losses: 33, score: 301}
+  {team: 'humans', rank: 16, sessionID: '537bc4990de0a02c07e8799a', name: 'Mepath', playtime: 94421, wins: 315, losses: 28, score: 287}
+  {team: 'humans', rank: 17, sessionID: '53826025c85c223a05f42c5c', name: 'Frederick the Great', playtime: 24696, wins: 325, losses: 42, score: 283}
+  {team: 'humans', rank: 18, sessionID: '5387d070b924da39051331a5', name: 'NoMan', playtime: 279296, wins: 320, losses: 46, score: 274}
+  {team: 'humans', rank: 19, sessionID: '535e50c1ba35914a07a308c9', name: 'Patogeno', playtime: 69601, wins: 318, losses: 44, score: 274}
+  {team: 'humans', rank: 20, sessionID: '537b9b023803a287057583dd', name: 'avv', playtime: 85418, wins: 316, losses: 50, score: 266}
+  {team: 'humans', rank: 21, sessionID: '537c89d814aaabe80c6a1139', name: 'Foosvald', playtime: 3197, wins: 307, losses: 41, score: 266}
+  {team: 'humans', rank: 22, sessionID: '538350c778171d3d057eb1e4', name: 'Ticaj', playtime: 29249, wins: 316, losses: 52, score: 264}
+  {team: 'humans', rank: 23, sessionID: '537b7d9a5bc02238050d1450', name: 'DrMonky', playtime: 14815, wins: 315, losses: 55, score: 260}
+  {team: 'humans', rank: 24, sessionID: '537c7d8526529de30cca4310', name: 'imkat', playtime: 14870, wins: 292, losses: 38, score: 254}
+  {team: 'humans', rank: 25, sessionID: '5392283b2446a44105387cbb', name: 'AKA', playtime: 134724, wins: 312, losses: 58, score: 254}
+  {team: 'humans', rank: 26, sessionID: '537b7ff9e91b4d3b05525db2', name: 'UltraNagog', playtime: 113091, wins: 296, losses: 46, score: 250}
+  {team: 'humans', rank: 27, sessionID: '537c1b0e0ff88b2c06288354', name: 'Master J', playtime: 32859, wins: 305, losses: 57, score: 248}
+  {team: 'humans', rank: 28, sessionID: '537c551814aaabe80c69f8e9', name: 'texastoast', playtime: 75930, wins: 300, losses: 54, score: 246}
+  {team: 'humans', rank: 29, sessionID: '537b9f2551e98aa705b60500', name: 'Otsix', playtime: 2270, wins: 302, losses: 58, score: 244}
+  {team: 'humans', rank: 30, sessionID: '537bb4b88698e13805226bb9', name: 'asselinpaul', playtime: 22992, wins: 306, losses: 64, score: 242}
+  {team: 'humans', rank: 31, sessionID: '537b87c6e91b4d3b0552600f', name: 'tedshot', playtime: 22872, wins: 306, losses: 65, score: 241}
+  {team: 'humans', rank: 32, sessionID: '537bae76ec57a3e805cbf5b3', name: 'Aeter', playtime: 18224, wins: 307, losses: 66, score: 241}
+  {team: 'humans', rank: 33, sessionID: '537b9e8a51e98aa705b604ab', name: 'bxp', playtime: 17385, wins: 304, losses: 67, score: 237}
+  {team: 'humans', rank: 34, sessionID: '537bdbe4a41b6b3a059befd0', name: 'princeben', playtime: 52246, wins: 290, losses: 56, score: 234}
+  {team: 'humans', rank: 35, sessionID: '537bdf1d375835400576a207', name: 'Mal Keshar', playtime: 985, wins: 295, losses: 68, score: 227}
+  {team: 'humans', rank: 36, sessionID: '5383f2ea2757353805a972d3', name: 'Mergen', playtime: 37792, wins: 297, losses: 71, score: 226}
+  {team: 'humans', rank: 37, sessionID: '537cec6a9cce053a05c04385', name: 'Simulatorboy', playtime: 15925, wins: 295, losses: 75, score: 220}
+  {team: 'humans', rank: 38, sessionID: '537b977d556db17605be76a2', name: 'shoebane', playtime: 89060, wins: 287, losses: 68, score: 219}
+  {team: 'humans', rank: 39, sessionID: '538757328ca8b1120b8c0bb5', name: 'ProvençalLeGaulois', playtime: 183850, wins: 289, losses: 71, score: 218}
+  {team: 'humans', rank: 40, sessionID: '5384b9803e0daa3905188225', name: 'Rincewind the Wizard', playtime: 49014, wins: 280, losses: 64, score: 216}
+  {team: 'humans', rank: 41, sessionID: '53805c227585483905a77c38', name: 'guuuuuuuuuuu', playtime: 40835, wins: 290, losses: 76, score: 214}
+  {team: 'humans', rank: 42, sessionID: '537bc0060b070d6b0691fd47', name: 'toothpaste', playtime: 116438, wins: 289, losses: 78, score: 211}
+  {team: 'humans', rank: 43, sessionID: '538bc7d05572d43b0520ede9', name: 'MaxF', playtime: 16012, wins: 271, losses: 62, score: 209}
+  {team: 'humans', rank: 44, sessionID: '537ca06126529de30cca58a1', name: 'firemanphil', playtime: 58857, wins: 287, losses: 81, score: 206}
+  {team: 'humans', rank: 45, sessionID: '537b895ee91b4d3b0552606a', name: 'Supaku', playtime: 23623, wins: 281, losses: 79, score: 202}
+  {team: 'humans', rank: 46, sessionID: '537ba1d7903fd2b805155298', name: 'Greediest', playtime: 32390, wins: 286, losses: 87, score: 199}
+  {team: 'humans', rank: 47, sessionID: '537ba398903fd2b805155376', name: 'RapTorS', playtime: 30828, wins: 280, losses: 83, score: 197}
+  {team: 'humans', rank: 48, sessionID: '537bbb371aaa69c405267714', name: 'PIptastic', playtime: 14165, wins: 282, losses: 85, score: 197}
+  {team: 'humans', rank: 49, sessionID: '537fd2f62a5a5acd08dbbe90', name: 'aldezar', playtime: 55511, wins: 260, losses: 64, score: 196}
+  {team: 'humans', rank: 50, sessionID: '537c0f440ff88b2c06287c31', name: 'yes', playtime: 42677, wins: 251, losses: 55, score: 196}
+  {team: 'humans', rank: 51, sessionID: '537fb985c1a6b99109171054', name: 'IamTesting', playtime: 242, wins: 280, losses: 90, score: 190}
+  {team: 'humans', rank: 52, sessionID: '537cdd63665bde1b13ffdede', name: 'wiggles', playtime: 9574, wins: 278, losses: 94, score: 184}
+  {team: 'humans', rank: 53, sessionID: '537cda44665bde1b13ffdcb2', name: 'Nullable', playtime: 21602, wins: 275, losses: 93, score: 182}
+  {team: 'humans', rank: 54, sessionID: '537bf012b72b2bbe053c9173', name: 'hyn', playtime: 5688, wins: 278, losses: 97, score: 181}
+  {team: 'humans', rank: 55, sessionID: '537bda813dd7d35105f5fec2', name: 'Rinomon', playtime: 19811, wins: 272, losses: 96, score: 176}
+  {team: 'humans', rank: 56, sessionID: '537b9e7251e98aa705b604a2', name: 'stuntman_fx', playtime: 12496, wins: 258, losses: 86, score: 172}
+  {team: 'humans', rank: 57, sessionID: '537d1def7e1e10b705bbcbc4', name: 'WizBit', playtime: 35790, wins: 270, losses: 98, score: 172}
+  {team: 'humans', rank: 58, sessionID: '537b8a93e91b4d3b055260f3', name: 'Korla March', playtime: 13093, wins: 265, losses: 94, score: 171}
+  {team: 'humans', rank: 59, sessionID: '53873bc17d99a7390561afd2', name: 'VicksC', playtime: 65582, wins: 262, losses: 93, score: 169}
+  {team: 'humans', rank: 60, sessionID: '537b907d5bc02238050d1b22', name: 'Jonanin', playtime: 60888, wins: 272, losses: 103, score: 169}
+  {team: 'humans', rank: 61, sessionID: '537b9345c74f237005ecc475', name: 'AdrianoKF', playtime: 8880, wins: 267, losses: 100, score: 167}
+  {team: 'humans', rank: 62, sessionID: '537ba08651e98aa705b605a8', name: 'frickinjason', playtime: 311295, wins: 266, losses: 99, score: 167}
+  {team: 'humans', rank: 63, sessionID: '536076104c5ed51d05284aeb', name: '会打电脑的狼', playtime: 180932, wins: 262, losses: 96, score: 166}
+  {team: 'humans', rank: 64, sessionID: '537fb41bc1a6b99109170daf', name: 'avatar652', playtime: 23943, wins: 260, losses: 95, score: 165}
+  {team: 'humans', rank: 65, sessionID: '537bb34a8698e13805226ae1', name: 'Superice', playtime: 8561, wins: 267, losses: 103, score: 164}
+  {team: 'humans', rank: 66, sessionID: '537b8f285bc02238050d1a91', name: 'renner96', playtime: 8962, wins: 265, losses: 103, score: 162}
+  {team: 'humans', rank: 67, sessionID: '537b97ba556db17605be76bc', name: 'howsiwei', playtime: 37865, wins: 249, losses: 90, score: 159}
+  {team: 'humans', rank: 68, sessionID: '537d6e997e6f2dba0510649c', name: 'Brainoutoforder', playtime: 79551, wins: 263, losses: 104, score: 159}
+  {team: 'humans', rank: 69, sessionID: '537bbe24d9644630065c90f4', name: 'cc', playtime: 27244, wins: 247, losses: 94, score: 153}
+  {team: 'humans', rank: 70, sessionID: '538f055b7558763705258211', name: 'Klee', playtime: 29269, wins: 264, losses: 111, score: 153}
+  {team: 'humans', rank: 71, sessionID: '537c3a51e8ea6e790a7cceb2', name: 'NovaHorizon', playtime: 72951, wins: 254, losses: 103, score: 151}
+  {team: 'humans', rank: 72, sessionID: '537c3e0dd08a96e40a64f01c', name: 'Arnfrid', playtime: 13133, wins: 261, losses: 111, score: 150}
+  {team: 'humans', rank: 73, sessionID: '537b7cf65bc02238050d141f', name: 'rawpower', playtime: 60808, wins: 256, losses: 110, score: 146}
+  {team: 'humans', rank: 74, sessionID: '537bcc75c57303a5070c2e9a', name: 'dhimdis', playtime: 43092, wins: 256, losses: 111, score: 145}
+  {team: 'humans', rank: 75, sessionID: '538bc1a15572d43b0520e8ae', name: 'rednek', playtime: 38220, wins: 250, losses: 106, score: 144}
+  {team: 'humans', rank: 76, sessionID: '5380c8ed7585483905a7ad55', name: 'Kungfury', playtime: 628, wins: 254, losses: 113, score: 141}
+  {team: 'humans', rank: 77, sessionID: '537c37dff1d9cfe4096ba9c9', name: 'Auralien', playtime: 24844, wins: 255, losses: 115, score: 140}
+  {team: 'humans', rank: 78, sessionID: '539234c52446a441053881ad', name: 'Szalami', playtime: 45304, wins: 243, losses: 108, score: 135}
+  {team: 'humans', rank: 79, sessionID: '537c15910ff88b2c06287fd5', name: 'Ahrimen', playtime: 24541, wins: 253, losses: 120, score: 133}
+  {team: 'humans', rank: 80, sessionID: '537ff34f4cd8023705770b31', name: 'ColtYolo', playtime: 18704, wins: 244, losses: 115, score: 129}
+  {team: 'humans', rank: 81, sessionID: '538ceadc56c3613905300df1', name: 'Teshynil', playtime: 59986, wins: 233, losses: 105, score: 128}
+  {team: 'humans', rank: 82, sessionID: '538f174df3691038051651f1', name: 'Leas', playtime: 11670, wins: 251, losses: 126, score: 125}
+  {team: 'humans', rank: 83, sessionID: '537d8cae13add33a051be70c', name: 'Jamar', playtime: 9358, wins: 245, losses: 123, score: 122}
+  {team: 'humans', rank: 84, sessionID: '53877f428ca8b1120b8c2ba8', name: 'madcoder', playtime: 58824, wins: 241, losses: 120, score: 121}
+  {team: 'humans', rank: 85, sessionID: '5391f1f282f0bc4705242218', name: 'RedRudeBoy', playtime: 13356, wins: 230, losses: 110, score: 120}
+  {team: 'humans', rank: 86, sessionID: '537bdb1c6b018e5505b9d5ae', name: 'Ralkarin', playtime: 16137, wins: 245, losses: 128, score: 117}
+  {team: 'humans', rank: 87, sessionID: '537bc9efa968548907de6dc5', name: 'scrumlock', playtime: 43716, wins: 238, losses: 122, score: 116}
+  {team: 'humans', rank: 88, sessionID: '53973dc02546283905a3d603', name: 'Olivier_A', playtime: 5903, wins: 246, losses: 131, score: 115}
+  {team: 'humans', rank: 89, sessionID: '537d3fffe20e956205f0da0c', name: 'Lecky', playtime: 28974, wins: 242, losses: 127, score: 115}
+  {team: 'humans', rank: 90, sessionID: '537b9edc7c89ec9805f4de89', name: 'Cemiv', playtime: 5632, wins: 241, losses: 134, score: 107}
+  {team: 'humans', rank: 91, sessionID: '537b8bede91b4d3b05526151', name: 'Witchy', playtime: 29809, wins: 214, losses: 110, score: 104}
+  {team: 'humans', rank: 92, sessionID: '535d728c30f061020b8f9893', name: 'ZeoNFrosT', playtime: 0, wins: 233, losses: 130, score: 103}
+  {team: 'humans', rank: 93, sessionID: '537b9c4b16613c8405155abd', name: 'JD557', playtime: 17456, wins: 236, losses: 134, score: 102}
+  {team: 'humans', rank: 94, sessionID: '537bdb396b018e5505b9d5ba', name: 'devast8a', playtime: 89013, wins: 233, losses: 133, score: 100}
+  {team: 'humans', rank: 95, sessionID: '537b7fbc5bc02238050d14ee', name: 'jojman272', playtime: 859, wins: 232, losses: 132, score: 100}
+  {team: 'humans', rank: 96, sessionID: '537cc552e4523d0113ba4eb2', name: 'Sir Coward', playtime: 26839, wins: 235, losses: 135, score: 100}
+  {team: 'humans', rank: 97, sessionID: '537b8abde91b4d3b05526103', name: 'Jef', playtime: 10311, wins: 236, losses: 139, score: 97}
+  {team: 'humans', rank: 98, sessionID: '537ed4db14bb1d38053b5b72', name: 'ModernBarbershop', playtime: 33894, wins: 221, losses: 129, score: 92}
+  {team: 'humans', rank: 99, sessionID: '537b8ba6e91b4d3b0552613c', name: 'Wiz', playtime: 1655, wins: 227, losses: 137, score: 90}
+  {team: 'humans', rank: 100, sessionID: '537bad3396ee90f605f2b0f9', name: 'Rnq', playtime: 14853, wins: 226, losses: 138, score: 88}
+  {team: 'humans', rank: 101, sessionID: '537f9d5ba7d2578f083d69b4', name: 'BLACKORP', playtime: 2869, wins: 225, losses: 138, score: 87}
+  {team: 'humans', rank: 102, sessionID: '537ba00e7c89ec9805f4defc', name: 'xoko814', playtime: 869, wins: 225, losses: 139, score: 86}
+  {team: 'humans', rank: 103, sessionID: '5391f83082f0bc47052424c7', name: 'tarasiu', playtime: 228, wins: 225, losses: 139, score: 86}
+  {team: 'humans', rank: 104, sessionID: '537d26d77e1e10b705bbd0d5', name: 'Traitor', playtime: 8900, wins: 222, losses: 137, score: 85}
+  {team: 'humans', rank: 105, sessionID: '537bbb0a1aaa69c4052676f5', name: 'TROGDOR BURNINATE', playtime: 6630, wins: 231, losses: 146, score: 85}
+  {team: 'humans', rank: 106, sessionID: '5387a8a3d06c503805fda60d', name: 'masanorinyo', playtime: 68753, wins: 226, losses: 142, score: 84}
+  {team: 'humans', rank: 107, sessionID: '538e8593f369103805160d76', name: 'Aggar', playtime: 12492, wins: 228, losses: 144, score: 84}
+  {team: 'humans', rank: 108, sessionID: '537e7eac63734c630505be27', name: 'TheRealThrall', playtime: 587, wins: 224, losses: 141, score: 83}
+  {team: 'humans', rank: 109, sessionID: '537c8dfa26529de30cca4c43', name: 'xeno', playtime: 15394, wins: 222, losses: 142, score: 80}
+  {team: 'humans', rank: 110, sessionID: '537bef0b8c297aa0055d1184', name: 'Floogle', playtime: 36828, wins: 224, losses: 145, score: 79}
+  {team: 'humans', rank: 111, sessionID: '537c666826529de30cca38c2', name: 'Jerson Otzoy', playtime: 46519, wins: 201, losses: 122, score: 79}
+  {team: 'humans', rank: 112, sessionID: '537cb6b2a3cb63ea103c8000', name: 'phisixersai', playtime: 8170, wins: 224, losses: 146, score: 78}
+  {team: 'humans', rank: 113, sessionID: '537b9ba716613c8405155a73', name: 'Beerdroid', playtime: 2547, wins: 226, losses: 150, score: 76}
+  {team: 'humans', rank: 114, sessionID: '537c9bcd26529de30cca54e0', name: 'Dood', playtime: 1121, wins: 219, losses: 145, score: 74}
+  {team: 'humans', rank: 115, sessionID: '537c5b7c26529de30cca3439', name: 'Markoth', playtime: 787, wins: 220, losses: 147, score: 73}
+  {team: 'humans', rank: 116, sessionID: '537d1c297e1e10b705bbca7d', name: 'chotic', playtime: 1292, wins: 218, losses: 146, score: 72}
+  {team: 'humans', rank: 117, sessionID: '538484a53e0daa39051863e4', name: 'Drago', playtime: 465, wins: 217, losses: 147, score: 70}
+  {team: 'humans', rank: 118, sessionID: '537baaab03ff8dc005b8436c', name: 'Petteri', playtime: 15235, wins: 219, losses: 149, score: 70}
+  {team: 'humans', rank: 119, sessionID: '537ca0aa26529de30cca58c8', name: '3ng3l', playtime: 1703, wins: 217, losses: 147, score: 70}
+  {team: 'humans', rank: 120, sessionID: '537b897f5bc02238050d181c', name: 'Jremz', playtime: 8386, wins: 221, losses: 152, score: 69}
+  {team: 'humans', rank: 121, sessionID: '537ba85554a7b1d5053bb366', name: 'Taters', playtime: 9664, wins: 193, losses: 126, score: 67}
+  {team: 'humans', rank: 122, sessionID: '537b9220e91b4d3b055263ea', name: 'Listr', playtime: 34000, wins: 202, losses: 136, score: 66}
+  {team: 'humans', rank: 123, sessionID: '537cadbd2f6e3aee0ed581f0', name: 'satefa', playtime: 10106, wins: 220, losses: 156, score: 64}
+  {team: 'humans', rank: 124, sessionID: '537d0a8c84c54c6e05c05db7', name: 'redWizzard', playtime: 53180, wins: 183, losses: 120, score: 63}
+  {team: 'humans', rank: 125, sessionID: '536c6d1c68b5258d0c4b7da8', name: 'Tober', playtime: 452, wins: 216, losses: 153, score: 63}
+  {team: 'humans', rank: 126, sessionID: '535ee1e023f09c2c0836a2a7', name: '(ノಠ益ಠ)ノ彡┻━┻', playtime: 3229, wins: 218, losses: 158, score: 60}
+  {team: 'humans', rank: 127, sessionID: '5371626351ce9b3a05d95d5c', name: 'Perrekus', playtime: 9047, wins: 215, losses: 158, score: 57}
+  {team: 'humans', rank: 128, sessionID: '53968372e1b8fd0c08c693d5', name: 'leoTest', playtime: 10739, wins: 215, losses: 158, score: 57}
+  {team: 'humans', rank: 129, sessionID: '537cfcd69cce053a05c04ce1', name: 'Soulnai', playtime: 22641, wins: 210, losses: 154, score: 56}
+  {team: 'humans', rank: 130, sessionID: '537bf57795356a43065f7403', name: 'Mordecai', playtime: 11262, wins: 215, losses: 159, score: 56}
+  {team: 'humans', rank: 131, sessionID: '5377aabf05e1483905cb99d5', name: 'Umaris', playtime: 23418, wins: 211, losses: 156, score: 55}
+  {team: 'humans', rank: 132, sessionID: '537c93ce26529de30cca5029', name: 'Willybe', playtime: 4772, wins: 212, losses: 158, score: 54}
+  {team: 'humans', rank: 133, sessionID: '537babf403838cf0050ace06', name: 'Brian Humphrey', playtime: 7300, wins: 212, losses: 158, score: 54}
+  {team: 'humans', rank: 134, sessionID: '537e19e30efa6a37059e0b4f', name: 'Aqrrc', playtime: 5003, wins: 210, losses: 163, score: 47}
+  {team: 'humans', rank: 135, sessionID: '5395d19622ca0e39054ea5b1', name: 'anykey', playtime: 29278, wins: 201, losses: 155, score: 46}
+  {team: 'humans', rank: 136, sessionID: '537b7fd6e91b4d3b05525da3', name: 'Gily', playtime: 17673, wins: 205, losses: 163, score: 42}
+  {team: 'humans', rank: 137, sessionID: '537bbbcb3dc5f3c3055c3040', name: 'roseaboveit', playtime: 12398, wins: 205, losses: 168, score: 37}
+  {team: 'humans', rank: 138, sessionID: '538757897d99a7390561bb7f', name: 'Jeremy', playtime: 6842, wins: 199, losses: 166, score: 33}
+  {team: 'humans', rank: 139, sessionID: '537b8b845bc02238050d18e8', name: 'Abel Soares Siqueira', playtime: 4945, wins: 204, losses: 171, score: 33}
+  {team: 'humans', rank: 140, sessionID: '537b8a37e91b4d3b055260c9', name: 'mattmatt', playtime: 77241, wins: 198, losses: 166, score: 32}
+  {team: 'humans', rank: 141, sessionID: '537fc26d2a5a5acd08dbb0a5', name: 'Melrakal', playtime: 2393, wins: 200, losses: 173, score: 27}
+  {team: 'humans', rank: 142, sessionID: '537bd8a73dd7d35105f5fd6a', name: 'drakiac', playtime: 14601, wins: 196, losses: 169, score: 27}
+  {team: 'humans', rank: 143, sessionID: '537cea3d9cce053a05c04226', name: 'CNKLC', playtime: 11663, wins: 200, losses: 175, score: 25}
+  {team: 'humans', rank: 144, sessionID: '537bf9c20ff88b2c06286e7c', name: 'Jotipalo', playtime: 4124, wins: 199, losses: 176, score: 23}
+  {team: 'humans', rank: 145, sessionID: '53807d9405e52a3305de99f5', name: 'Booya', playtime: 118149, wins: 173, losses: 152, score: 21}
+  {team: 'humans', rank: 146, sessionID: '537bf291d3443b2b068c1056', name: 'Penguin', playtime: 7688, wins: 196, losses: 176, score: 20}
+  {team: 'humans', rank: 147, sessionID: '5380b82005e52a3305deb679', name: 'TheWrightDev', playtime: 26967, wins: 194, losses: 176, score: 18}
+  {team: 'humans', rank: 148, sessionID: '537cf2aa98a1be440545d878', name: 'Kipernicus', playtime: 11906, wins: 189, losses: 181, score: 8}
+  {team: 'humans', rank: 149, sessionID: '535e1f1187ab8481075b8d95', name: 'freek', playtime: 0, wins: 190, losses: 183, score: 7}
+  {team: 'humans', rank: 150, sessionID: '535f0911d42bda62085e40fc', name: 'heated', playtime: 65, wins: 188, losses: 182, score: 6}
+  {team: 'humans', rank: 151, sessionID: '539120d882f0bc470523cd6f', name: 'Fitbos', playtime: 1622, wins: 0, losses: 0, score: 0}
+  {team: 'humans', rank: 152, sessionID: '539875130599fa3a05ca7293', name: 'jeimmy', playtime: 663, wins: 0, losses: 0, score: 0}
+  {team: 'humans', rank: 153, sessionID: '537b7ccce91b4d3b05525cdc', name: 'Bart2121', playtime: 4177, wins: 184, losses: 187, score: -3}
+  {team: 'humans', rank: 154, sessionID: '53866ed58ca8b1120b8b816d', name: 'Nikolai', playtime: 26320, wins: 184, losses: 187, score: -3}
+  {team: 'humans', rank: 155, sessionID: '5385610f3e0daa390518e2f6', name: 'Stravinsky', playtime: 8870, wins: 182, losses: 185, score: -3}
+  {team: 'humans', rank: 156, sessionID: '537b94956c13497e05de816e', name: 'Maix', playtime: 3163, wins: 183, losses: 186, score: -3}
+  {team: 'humans', rank: 157, sessionID: '537187dcce8e453b05c9d21c', name: 'NasytToast', playtime: 0, wins: 183, losses: 188, score: -5}
+  {team: 'humans', rank: 158, sessionID: '537bb696dd932f6b05d370fd', name: 'HandmadeMercury', playtime: 5539, wins: 169, losses: 175, score: -6}
+  {team: 'humans', rank: 159, sessionID: '537b7f605bc02238050d14c9', name: 'Jaden', playtime: 10547, wins: 182, losses: 192, score: -10}
+  {team: 'humans', rank: 160, sessionID: '537c489314aaabe80c69f413', name: 'HiddEnigma', playtime: 5850, wins: 181, losses: 191, score: -10}
+  {team: 'humans', rank: 161, sessionID: '537bb7cd1e8dd17a054c1044', name: 'Alexander the Grape', playtime: 30398, wins: 178, losses: 189, score: -11}
+  {team: 'humans', rank: 162, sessionID: '538eada37558763705255a0c', name: 'Evran', playtime: 22253, wins: 179, losses: 192, score: -13}
+  {team: 'humans', rank: 163, sessionID: '5386aedf7d99a7390561802a', name: 'Reclusiarch', playtime: 3281, wins: 178, losses: 192, score: -14}
+  {team: 'humans', rank: 164, sessionID: '538b7202b924da3905157e07', name: 'Mlatic', playtime: 723, wins: 176, losses: 190, score: -14}
+  {team: 'humans', rank: 165, sessionID: '537c4411c209bbd60c16a3d8', name: 'liorst1', playtime: 14571, wins: 178, losses: 193, score: -15}
+  {team: 'humans', rank: 166, sessionID: '537fcaee2a5a5acd08dbb79c', name: 'Booya2nd', playtime: 9598, wins: 153, losses: 168, score: -15}
+  {team: 'humans', rank: 167, sessionID: '538ae84fb924da3905154172', name: 'WAAW', playtime: 3668, wins: 177, losses: 194, score: -17}
+  {team: 'humans', rank: 168, sessionID: '538751b78ca8b1120b8c0792', name: 'DZC', playtime: 5512, wins: 170, losses: 188, score: -18}
+  {team: 'humans', rank: 169, sessionID: '537c0ab50ff88b2c0628792e', name: 'maxily', playtime: 18792, wins: 174, losses: 192, score: -18}
+  {team: 'humans', rank: 170, sessionID: '537ba1347c89ec9805f4df76', name: 'qkhhly', playtime: 9518, wins: 176, losses: 196, score: -20}
+  {team: 'humans', rank: 171, sessionID: '538b4bbdd06c503805ff3b8a', name: 'iamcodewar', playtime: 10939, wins: 178, losses: 198, score: -20}
+  {team: 'humans', rank: 172, sessionID: '537f14e18fe881f1055df20a', name: 'Alanor', playtime: 20437, wins: 150, losses: 174, score: -24}
+  {team: 'humans', rank: 173, sessionID: '537f57ff3282d7a507695039', name: 'Navi\' Dendi', playtime: 4382, wins: 172, losses: 197, score: -25}
+  {team: 'humans', rank: 174, sessionID: '537c14950ff88b2c06287f22', name: 'lolka', playtime: 3820, wins: 172, losses: 200, score: -28}
+  {team: 'humans', rank: 175, sessionID: '53570b7a1bfa9bba14b5e045', name: 'Scott', playtime: 6228, wins: 173, losses: 202, score: -29}
+  {team: 'humans', rank: 176, sessionID: '537bbd0f3cd816fa05a48401', name: 'DonutBaron', playtime: 9716, wins: 165, losses: 195, score: -30}
+  {team: 'humans', rank: 177, sessionID: '5381726d7585483905a7f978', name: 'armlol', playtime: 5149, wins: 171, losses: 204, score: -33}
+  {team: 'humans', rank: 178, sessionID: '538c0bfb56c36139052fa076', name: 'Aura Temple Network', playtime: 7489, wins: 169, losses: 205, score: -36}
+  {team: 'humans', rank: 179, sessionID: '538ec77af3691038051629c3', name: 'BI', playtime: 3870, wins: 164, losses: 200, score: -36}
+  {team: 'humans', rank: 180, sessionID: '537b889fe91b4d3b0552603e', name: 'McDerp', playtime: 3415, wins: 161, losses: 203, score: -42}
+  {team: 'humans', rank: 181, sessionID: '537d169a7e1e10b705bbc736', name: 'Nitor', playtime: 7036, wins: 159, losses: 205, score: -46}
+  {team: 'humans', rank: 182, sessionID: '53837eee6f3bea3a05faf5fb', name: 'HeadCrusher', playtime: 22806, wins: 133, losses: 182, score: -49}
+  {team: 'humans', rank: 183, sessionID: '537ba4887c89ec9805f4e10d', name: 'Geralt', playtime: 2353, wins: 158, losses: 208, score: -50}
+  {team: 'humans', rank: 184, sessionID: '53802aab05e52a3305de797e', name: 'micblayo', playtime: 14726, wins: 159, losses: 209, score: -50}
+  {team: 'humans', rank: 185, sessionID: '538b60bdb924da39051576e2', name: 'mydoom', playtime: 9270, wins: 159, losses: 209, score: -50}
+  {team: 'humans', rank: 186, sessionID: '5380f3917585483905a7c0b3', name: 'Lalaland1125', playtime: 689, wins: 160, losses: 211, score: -51}
+  {team: 'humans', rank: 187, sessionID: '537b8125e91b4d3b05525e1e', name: 'Garrett', playtime: 1833, wins: 157, losses: 212, score: -55}
+  {team: 'humans', rank: 188, sessionID: '537b8c60e91b4d3b05526181', name: 'Usopp', playtime: 8340, wins: 156, losses: 217, score: -61}
+  {team: 'humans', rank: 189, sessionID: '537b9b4116613c8405155a41', name: 'Y0DA', playtime: 5351, wins: 154, losses: 216, score: -62}
+  {team: 'humans', rank: 190, sessionID: '5387f127d06c503805fdcd97', name: 'Hexadecimage', playtime: 89476, wins: 151, losses: 222, score: -71}
+  {team: 'humans', rank: 191, sessionID: '539265012446a44105389a8c', name: 'odeakihumi', playtime: 23819, wins: 143, losses: 219, score: -76}
+  {team: 'humans', rank: 192, sessionID: '537ba73a980cfcba051f19c5', name: 'Torg', playtime: 7045, wins: 145, losses: 221, score: -76}
+  {team: 'humans', rank: 193, sessionID: '5392bbc0e04ba13805ed4c0f', name: 'iownspace', playtime: 51659, wins: 146, losses: 223, score: -77}
+  {team: 'humans', rank: 194, sessionID: '537bf14bf8b46fbd0544fc18', name: 'danshou', playtime: 22590, wins: 148, losses: 226, score: -78}
+  {team: 'humans', rank: 195, sessionID: '537b212dfe0ec03905fcd712', name: 'ThunderClan', playtime: 766, wins: 144, losses: 228, score: -84}
+  {team: 'humans', rank: 196, sessionID: '536540d51415c79e648b1de5', name: 'Nick04 Bubonic', playtime: 12, wins: 138, losses: 222, score: -84}
+  {team: 'humans', rank: 197, sessionID: '537fb0792a5a5acd08dba76f', name: 'Slackus', playtime: 49736, wins: 141, losses: 226, score: -85}
+  {team: 'humans', rank: 198, sessionID: '537d44911333605305550411', name: 'tehowner', playtime: 2969, wins: 138, losses: 223, score: -85}
+  {team: 'humans', rank: 199, sessionID: '537df429933d99860613ab2d', name: 'Farafonoff', playtime: 4315, wins: 142, losses: 228, score: -86}
+  {team: 'humans', rank: 200, sessionID: '538501137d99a7390560db54', name: 'Joodoc', playtime: 6042, wins: 144, losses: 231, score: -87}
+  {team: 'humans', rank: 201, sessionID: '537b8a58e91b4d3b055260d8', name: 'Terebijoke', playtime: 85680, wins: 122, losses: 210, score: -88}
+  {team: 'humans', rank: 202, sessionID: '537c110195356a43065f8450', name: 'Chen Yu LIu', playtime: 843, wins: 140, losses: 232, score: -92}
+  {team: 'humans', rank: 203, sessionID: '537dba4613add33a051bf680', name: 'Bobbybaby', playtime: 1509, wins: 140, losses: 232, score: -92}
+  {team: 'humans', rank: 204, sessionID: '537b9003e91b4d3b05526329', name: 'Coreth', playtime: 11677, wins: 131, losses: 224, score: -93}
+  {team: 'humans', rank: 205, sessionID: '538b618bd06c503805ff4210', name: 'robat', playtime: 5776, wins: 138, losses: 234, score: -96}
+  {team: 'humans', rank: 206, sessionID: '5383b7196f3bea3a05fb1472', name: 'lilos', playtime: 2464, wins: 135, losses: 232, score: -97}
+  {team: 'humans', rank: 207, sessionID: '537f8672d409ac270861c842', name: 'ThatOtherPerson', playtime: 2018, wins: 137, losses: 236, score: -99}
+  {team: 'humans', rank: 208, sessionID: '53809c2c7585483905a795f1', name: '都比', playtime: 28855, wins: 136, losses: 235, score: -99}
+  {team: 'humans', rank: 209, sessionID: '537c866f14aaabe80c6a0f90', name: 'Energy', playtime: 1276, wins: 130, losses: 229, score: -99}
+  {team: 'humans', rank: 210, sessionID: '538e4af0755876370525291c', name: 'commando Tech', playtime: 3725, wins: 136, losses: 236, score: -100}
+  {team: 'humans', rank: 211, sessionID: '537b9da67c89ec9805f4de0b', name: 'tembelu', playtime: 9298, wins: 129, losses: 230, score: -101}
+  {team: 'humans', rank: 212, sessionID: '53972a5f2546283905a3bdc5', name: 'holyKoT', playtime: 2171, wins: 131, losses: 241, score: -110}
+  {team: 'humans', rank: 213, sessionID: '537ba6dd980cfcba051f199d', name: 'Aaron1011', playtime: 3449, wins: 130, losses: 240, score: -110}
+  {team: 'humans', rank: 214, sessionID: '537c68bf26529de30cca39cb', name: 'ESWAT', playtime: 893, wins: 128, losses: 239, score: -111}
+  {team: 'humans', rank: 215, sessionID: '537d5fdb3dcf67c40571fb13', name: 'JustTurrable', playtime: 264, wins: 125, losses: 240, score: -115}
+  {team: 'humans', rank: 216, sessionID: '537e4268e1489fe206667e26', name: 'EvanK', playtime: 668, wins: 125, losses: 245, score: -120}
+  {team: 'humans', rank: 217, sessionID: '537be834a3b60b390500e0a3', name: 'gilxa1226', playtime: 394, wins: 125, losses: 245, score: -120}
+  {team: 'humans', rank: 218, sessionID: '537bbcfd9e1bf5f905926ebf', name: 'Qin Shi Huang', playtime: 4691, wins: 125, losses: 246, score: -121}
+  {team: 'humans', rank: 219, sessionID: '537b9bd016613c8405155a8b', name: 'WaffleFries', playtime: 2944, wins: 121, losses: 246, score: -125}
+  {team: 'humans', rank: 220, sessionID: '537b8a65e91b4d3b055260e0', name: 'Gurra', playtime: 6295, wins: 107, losses: 233, score: -126}
+  {team: 'humans', rank: 221, sessionID: '537e2025933d99860613c614', name: 'Encosia', playtime: 2025, wins: 118, losses: 250, score: -132}
+  {team: 'humans', rank: 222, sessionID: '537bb694dd932f6b05d370fc', name: 'Kaboomm', playtime: 4333, wins: 116, losses: 253, score: -137}
+  {team: 'humans', rank: 223, sessionID: '538001aebf8ae33a0501b98e', name: 'taichi_kunnn', playtime: 3524, wins: 112, losses: 254, score: -142}
+  {team: 'humans', rank: 224, sessionID: '53630b6573bdb4f7045a772c', name: 'Lonib', playtime: 0, wins: 113, losses: 257, score: -144}
+  {team: 'humans', rank: 225, sessionID: '5360f83b67c29a0609ddceb4', name: 'Readper', playtime: 0, wins: 109, losses: 264, score: -155}
+  {team: 'humans', rank: 226, sessionID: '53717f4551ce9b3a05d96043', name: 'cpkenn09y', playtime: 0, wins: 106, losses: 263, score: -157}
+  {team: 'humans', rank: 227, sessionID: '537b9b9416613c8405155a6b', name: 'Rubini', playtime: 6763, wins: 103, losses: 271, score: -168}
+  {team: 'humans', rank: 228, sessionID: '53902ad775587637052615d9', name: 'Loxk', playtime: 32690, wins: 89, losses: 265, score: -176}
+  {team: 'humans', rank: 229, sessionID: '537b93886c13497e05de80a6', name: 'Klomnar', playtime: 405, wins: 98, losses: 274, score: -176}
+  {team: 'humans', rank: 230, sessionID: '537b9c7c16613c8405155ae0', name: 'dpen2000', playtime: 4313, wins: 93, losses: 273, score: -180}
+  {team: 'humans', rank: 231, sessionID: '53692c2d84e82a3a0553305e', name: 'rnprdk', playtime: 0, wins: 94, losses: 278, score: -184}
+  {team: 'humans', rank: 232, sessionID: '537be99f20a501380564e764', name: 'rizend', playtime: 3017, wins: 92, losses: 279, score: -187}
+  {team: 'humans', rank: 233, sessionID: '537ba94d54a7b1d5053bb426', name: 'Rokner', playtime: 3911, wins: 90, losses: 282, score: -192}
+  {team: 'humans', rank: 234, sessionID: '537b949e556db17605be74ff', name: 'baldeagle', playtime: 7698, wins: 91, losses: 284, score: -193}
+  {team: 'humans', rank: 235, sessionID: '535f0cdfc2e83ad9048faef0', name: 'Mobius', playtime: 0, wins: 87, losses: 288, score: -201}
+  {team: 'humans', rank: 236, sessionID: '537bbe446d5f9f2f06e0c674', name: 'Lakk', playtime: 12072, wins: 76, losses: 296, score: -220}
+  {team: 'humans', rank: 237, sessionID: '535ac395d83daa1a052494c1', name: 'Michael S.', playtime: 304, wins: 68, losses: 304, score: -236}
+  {team: 'humans', rank: 238, sessionID: '53718c6cce8e453b05c9d298', name: 'Blitz', playtime: 0, wins: 68, losses: 306, score: -238}
+  {team: 'humans', rank: 239, sessionID: '536310848e22980605aa58c3', name: 'sjarvie', playtime: 0, wins: 66, losses: 308, score: -242}
+  {team: 'humans', rank: 240, sessionID: '537ba10e51e98aa705b605df', name: 'Deleu', playtime: 7241, wins: 61, losses: 307, score: -246}
+  {team: 'humans', rank: 241, sessionID: '537b92765bc02238050d1bf0', name: 'Deneim', playtime: 13791, wins: 62, losses: 312, score: -250}
+  {team: 'humans', rank: 242, sessionID: '538e609af36910380515f8d6', name: 'Volgax', playtime: 6774, wins: 59, losses: 310, score: -251}
+  {team: 'humans', rank: 243, sessionID: '537ba62557494fc405a6faac', name: 'Zandrasco', playtime: 4193, wins: 60, losses: 315, score: -255}
+  {team: 'humans', rank: 244, sessionID: '537ecf5414bb1d38053b58bb', name: 'Sir Mouse', playtime: 16021, wins: 52, losses: 321, score: -269}
+  {team: 'humans', rank: 245, sessionID: '538c8faf5572d43b05214e3b', name: 'AceWizard', playtime: 54, wins: 45, losses: 315, score: -270}
+  {team: 'humans', rank: 246, sessionID: '537deb820efa6a37059df268', name: 'MadMan30', playtime: 316, wins: 46, losses: 319, score: -273}
+  {team: 'humans', rank: 247, sessionID: '537bf38495356a43065f7291', name: 'NicRio', playtime: 130, wins: 43, losses: 316, score: -273}
+  {team: 'humans', rank: 248, sessionID: '537cd876665bde1b13ffdad4', name: 'Is_G', playtime: 776, wins: 44, losses: 319, score: -275}
+  {team: 'humans', rank: 249, sessionID: '537bb14b4f81f53805b6366a', name: 'jeromeASF', playtime: 335, wins: 41, losses: 318, score: -277}
+  {team: 'humans', rank: 250, sessionID: '5381745005e52a3305df1c23', name: 'El Psy Congr00', playtime: 1032, wins: 41, losses: 319, score: -278}
+  {team: 'humans', rank: 251, sessionID: '538451183e0daa39051845a0', name: 'loquele', playtime: 549, wins: 43, losses: 322, score: -279}
+  {team: 'humans', rank: 252, sessionID: '537b606a2daeeb3905a9292f', name: 'DeathStalker', playtime: 166, wins: 38, losses: 319, score: -281}
+  {team: 'humans', rank: 253, sessionID: '537bd56ab0d1766d05243002', name: 'thelion', playtime: 338, wins: 40, losses: 323, score: -283}
+  {team: 'humans', rank: 254, sessionID: '537d15d37e1e10b705bbc6ef', name: 'Diegobrp', playtime: 2132, wins: 37, losses: 321, score: -284}
+  {team: 'humans', rank: 255, sessionID: '537caa102f6e3aee0ed57f84', name: 'Sakares Saengkaew', playtime: 34, wins: 37, losses: 321, score: -284}
+  {team: 'humans', rank: 256, sessionID: '53627e2fca5c6f3c11ebc9b1', name: 'Animex', playtime: 0, wins: 38, losses: 324, score: -286}
+  {team: 'humans', rank: 257, sessionID: '537bc0ad1c8dfa820699fcb9', name: 'Black Mage Wizard Guy', playtime: 691, wins: 37, losses: 323, score: -286}
+  {team: 'humans', rank: 258, sessionID: '535f07d39894af8f7fd84e85', name: 'Maksym', playtime: 0, wins: 38, losses: 327, score: -289}
+  {team: 'humans', rank: 259, sessionID: '537b98e33803a287057582a8', name: 'Angeland', playtime: 1758, wins: 41, losses: 330, score: -289}
+  {team: 'humans', rank: 260, sessionID: '537c63f426529de30cca37ba', name: 'Dmitry', playtime: 181, wins: 35, losses: 325, score: -290}
+  {team: 'humans', rank: 261, sessionID: '537ceb1798a1be440545d40e', name: 'jaba', playtime: 572, wins: 35, losses: 325, score: -290}
+  {team: 'humans', rank: 262, sessionID: '537c0f3f0ff88b2c06287c2b', name: 'Quan Pham', playtime: 4353, wins: 40, losses: 332, score: -292}
+  {team: 'humans', rank: 263, sessionID: '537d60467e6f2dba051060b6', name: 'rhall', playtime: 67548, wins: 11, losses: 316, score: -305}
+  {team: 'humans', rank: 264, sessionID: '5384c9de7d99a7390560bfd7', name: 'Secathor', playtime: 16404, wins: 28, losses: 345, score: -317}
+  {team: 'humans', rank: 265, sessionID: '538a08bed06c503805feb6b0', name: 'Nemoy', playtime: 1643, wins: 0, losses: 319, score: -319}
+  {team: 'humans', rank: 266, sessionID: '537c3806f1d9cfe4096ba9d8', name: 'Hannofcart', playtime: 17397, wins: 0, losses: 323, score: -323}
+  {team: 'humans', rank: 267, sessionID: '537c4d5f26529de30cca2e68', name: 'Morphumax', playtime: 58395, wins: 0, losses: 323, score: -323}
+  {team: 'humans', rank: 268, sessionID: '53864aa37d99a73905615dda', name: 'shoetest', playtime: 14876, wins: 0, losses: 324, score: -324}
+  {team: 'humans', rank: 269, sessionID: '537b97cd556db17605be76c3', name: 'domrein', playtime: 12339, wins: 0, losses: 324, score: -324}
+  {team: 'humans', rank: 270, sessionID: '53835f1fc85c223a05f49ddb', name: 'hace', playtime: 9175, wins: 0, losses: 325, score: -325}
+  {team: 'humans', rank: 271, sessionID: '53666cc75af8b2c71dc017e8', name: 'Bonesdog', playtime: 0, wins: 0, losses: 326, score: -326}
+  {team: 'humans', rank: 272, sessionID: '537be26d20a501380564e359', name: 'Cinnamon Scrolls', playtime: 6619, wins: 0, losses: 330, score: -330}
+  {team: 'humans', rank: 273, sessionID: '537b8f3ce91b4d3b055262d7', name: 'asdasd', playtime: 242330, wins: 0, losses: 335, score: -335}
+  {team: 'humans', rank: 274, sessionID: '5383551cc85c223a05f49992', name: 'marthyi', playtime: 30008, wins: 325, losses: 43, score: 282}
+  {team: 'humans', rank: 275, sessionID: '538f5334f369103805167613', name: 'Leshka', playtime: 10409, wins: 93, losses: 282, score: -189}
+]
+
+results.greed.ogres = [
+  {team: 'ogres', rank: 1, sessionID: '537b958e6c13497e05de81f2', name: 'Bellardia', playtime: 189111, wins: 387, losses: 7, score: 380}
+  {team: 'ogres', rank: 2, sessionID: '537c11df95356a43065f84c9', name: 'blinkingTore', playtime: 38360, wins: 381, losses: 9, score: 372}
+  {team: 'ogres', rank: 3, sessionID: '537c09ee95356a43065f801c', name: 'Eye', playtime: 172960, wins: 370, losses: 18, score: 352}
+  {team: 'ogres', rank: 4, sessionID: '537b7d475bc02238050d1439', name: 'Cripi', playtime: 61966, wins: 373, losses: 23, score: 350}
+  {team: 'ogres', rank: 5, sessionID: '537e317450d1673a054b7dd2', name: 'Pop-up', playtime: 39939, wins: 369, losses: 26, score: 343}
+  {team: 'ogres', rank: 6, sessionID: '537e364a50d1673a054b8322', name: 'Ravenclaw', playtime: 4579, wins: 367, losses: 24, score: 343}
+  {team: 'ogres', rank: 7, sessionID: '537cb51fa0d7a5cc10992b11', name: 'JerryP', playtime: 52872, wins: 368, losses: 33, score: 335}
+  {team: 'ogres', rank: 8, sessionID: '537bd37888a86e67053f9d61', name: 'Mickydtron', playtime: 38533, wins: 368, losses: 35, score: 333}
+  {team: 'ogres', rank: 9, sessionID: '5384a3f63e0daa390518765d', name: 'ProfBoesch', playtime: 10366, wins: 365, losses: 34, score: 331}
+  {team: 'ogres', rank: 10, sessionID: '538064d27585483905a77f9f', name: 'KaosWalking', playtime: 88663, wins: 359, losses: 35, score: 324}
+  {team: 'ogres', rank: 11, sessionID: '53892a98d06c503805fe522b', name: 'Urdaris', playtime: 87750, wins: 353, losses: 32, score: 321}
+  {team: 'ogres', rank: 12, sessionID: '53668d64c6ab10ef1ea9a10d', name: 'no_login_found', playtime: 11313, wins: 355, losses: 46, score: 309}
+  {team: 'ogres', rank: 13, sessionID: '537f68bc14f08dec07950945', name: 'Take it easy', playtime: 2839, wins: 348, losses: 47, score: 301}
+  {team: 'ogres', rank: 14, sessionID: '537bac56b0d477e005347f67', name: 'gosunero', playtime: 41429, wins: 346, losses: 54, score: 292}
+  {team: 'ogres', rank: 15, sessionID: '536d258f68b5258d0c4b96ed', name: 'Jex', playtime: 4910, wins: 337, losses: 48, score: 289}
+  {team: 'ogres', rank: 16, sessionID: '537bcba8a797656f07c93db5', name: 'Durbination', playtime: 13465, wins: 337, losses: 49, score: 288}
+  {team: 'ogres', rank: 17, sessionID: '5381e48a7585483905a82a2d', name: 'Edoardo Morandi', playtime: 96844, wins: 330, losses: 49, score: 281}
+  {team: 'ogres', rank: 18, sessionID: '538471737d99a73905608fb4', name: 'Artraxus', playtime: 61114, wins: 336, losses: 60, score: 276}
+  {team: 'ogres', rank: 19, sessionID: '537ba9a154a7b1d5053bb45a', name: 'skeltoac', playtime: 39087, wins: 330, losses: 55, score: 275}
+  {team: 'ogres', rank: 20, sessionID: '537be145a3b60b390500dcc3', name: 'ReyO', playtime: 204112, wins: 328, losses: 55, score: 273}
+  {team: 'ogres', rank: 21, sessionID: '537cc939665bde1b13ffd197', name: 'Orson Peters', playtime: 24821, wins: 333, losses: 60, score: 273}
+  {team: 'ogres', rank: 22, sessionID: '5395cf0b7362c439054f7c3a', name: 'nino48', playtime: 33541, wins: 327, losses: 62, score: 265}
+  {team: 'ogres', rank: 23, sessionID: '537d541e3dcf67c40571f792', name: 'pbd', playtime: 4062, wins: 319, losses: 84, score: 235}
+  {team: 'ogres', rank: 24, sessionID: '537e284650d1673a054b7602', name: 'Tech', playtime: 13208, wins: 306, losses: 71, score: 235}
+  {team: 'ogres', rank: 25, sessionID: '537d025184c54c6e05c059b7', name: 'Storm0x2a', playtime: 1026, wins: 306, losses: 71, score: 235}
+  {team: 'ogres', rank: 26, sessionID: '537bed83f575b482052f03a0', name: 'Blindfold', playtime: 45865, wins: 303, losses: 69, score: 234}
+  {team: 'ogres', rank: 27, sessionID: '537bc4750de0a02c07e8797f', name: 'Walter Danilo Galante', playtime: 24476, wins: 313, losses: 84, score: 229}
+  {team: 'ogres', rank: 28, sessionID: '538d0a4356c3613905301e50', name: 'Fedux', playtime: 1862, wins: 300, losses: 79, score: 221}
+  {team: 'ogres', rank: 29, sessionID: '537b8cbee91b4d3b0552619e', name: 'Nazywam', playtime: 6395, wins: 303, losses: 83, score: 220}
+  {team: 'ogres', rank: 30, sessionID: '5382502a7585483905a85e42', name: 'vlizard', playtime: 803, wins: 308, losses: 89, score: 219}
+  {team: 'ogres', rank: 31, sessionID: '5385d1cf3e0daa3905191e57', name: 'olu', playtime: 65635, wins: 301, losses: 86, score: 215}
+  {team: 'ogres', rank: 32, sessionID: '537babd003838cf0050acdf2', name: 'Pentar', playtime: 36006, wins: 309, losses: 95, score: 214}
+  {team: 'ogres', rank: 33, sessionID: '537c31112b08c344082e22de', name: 'Agathanar', playtime: 41371, wins: 308, losses: 94, score: 214}
+  {team: 'ogres', rank: 34, sessionID: '537cd98ae4523d0113ba5ac7', name: 'Tehvudgaw', playtime: 81681, wins: 298, losses: 94, score: 204}
+  {team: 'ogres', rank: 35, sessionID: '537b803ae91b4d3b05525dc7', name: 'Forsaken', playtime: 50237, wins: 294, losses: 91, score: 203}
+  {team: 'ogres', rank: 36, sessionID: '537b7e44e91b4d3b05525d38', name: 'COGSMITH', playtime: 284674, wins: 300, losses: 98, score: 202}
+  {team: 'ogres', rank: 37, sessionID: '537ba3e0903fd2b80515539d', name: 'Statik', playtime: 64062, wins: 294, losses: 98, score: 196}
+  {team: 'ogres', rank: 38, sessionID: '537b85e15bc02238050d16d4', name: 'Cuef', playtime: 81666, wins: 286, losses: 90, score: 196}
+  {team: 'ogres', rank: 39, sessionID: '5392f7b1304ab93805efa3d2', name: 'Cracker', playtime: 2576, wins: 282, losses: 90, score: 192}
+  {team: 'ogres', rank: 40, sessionID: '537b9c42ffeaa29e051b2657', name: 'JamesJNadeau.com', playtime: 28164, wins: 295, losses: 110, score: 185}
+  {team: 'ogres', rank: 41, sessionID: '537ce37be9c4e97c05e3ea66', name: 'Quasar', playtime: 21773, wins: 287, losses: 104, score: 183}
+  {team: 'ogres', rank: 42, sessionID: '537baa2403ff8dc005b8433e', name: 'Almatia', playtime: 15387, wins: 291, losses: 109, score: 182}
+  {team: 'ogres', rank: 43, sessionID: '537b87f55bc02238050d1786', name: 'mordonne', playtime: 71830, wins: 277, losses: 103, score: 174}
+  {team: 'ogres', rank: 44, sessionID: '537e56129008f87b0541cd03', name: 'O\'Connor', playtime: 55869, wins: 281, losses: 109, score: 172}
+  {team: 'ogres', rank: 45, sessionID: '537ba9e57b9ffadb05476784', name: 'timmox', playtime: 13280, wins: 256, losses: 86, score: 170}
+  {team: 'ogres', rank: 46, sessionID: '537b86e75bc02238050d1721', name: 'Tomas', playtime: 21845, wins: 275, losses: 106, score: 169}
+  {team: 'ogres', rank: 47, sessionID: '537bebbea3b60b390500e280', name: 'Buge', playtime: 3506, wins: 281, losses: 118, score: 163}
+  {team: 'ogres', rank: 48, sessionID: '53854c0b7d99a7390560f9f4', name: 'MatBot', playtime: 15049, wins: 281, losses: 119, score: 162}
+  {team: 'ogres', rank: 49, sessionID: '5380a9bb7585483905a79dff', name: 'salesman', playtime: 60290, wins: 277, losses: 118, score: 159}
+  {team: 'ogres', rank: 50, sessionID: '53949f635009fe5b075bb584', name: 'Dematerial', playtime: 4661, wins: 273, losses: 116, score: 157}
+  {team: 'ogres', rank: 51, sessionID: '53832a3ec85c223a05f48736', name: 'Popey', playtime: 37593, wins: 256, losses: 104, score: 152}
+  {team: 'ogres', rank: 52, sessionID: '537b89a2e91b4d3b05526082', name: 'Ryemane', playtime: 20671, wins: 276, losses: 125, score: 151}
+  {team: 'ogres', rank: 53, sessionID: '537cd542e4523d0113ba5782', name: 'schups', playtime: 20886, wins: 277, losses: 127, score: 150}
+  {team: 'ogres', rank: 54, sessionID: '537be1cca3b60b390500dd24', name: 'ohsnap', playtime: 3574, wins: 273, losses: 127, score: 146}
+  {team: 'ogres', rank: 55, sessionID: '538bef7356c36139052f8c80', name: 'Hephaestian', playtime: 9626, wins: 272, losses: 131, score: 141}
+  {team: 'ogres', rank: 56, sessionID: '537c527026529de30cca302f', name: 'Jinrai', playtime: 23726, wins: 269, losses: 129, score: 140}
+  {team: 'ogres', rank: 57, sessionID: '538471087d99a73905608f84', name: 'Basque', playtime: 37986, wins: 269, losses: 130, score: 139}
+  {team: 'ogres', rank: 58, sessionID: '537cd3c3665bde1b13ffd74c', name: 'Stormaggedon Dark Lord of All', playtime: 27471, wins: 261, losses: 123, score: 138}
+  {team: 'ogres', rank: 59, sessionID: '537b984f3803a2870575824f', name: 'Cody', playtime: 85426, wins: 259, losses: 138, score: 121}
+  {team: 'ogres', rank: 60, sessionID: '5383ead92757353805a96ff4', name: 'hotdogeater', playtime: 55657, wins: 258, losses: 137, score: 121}
+  {team: 'ogres', rank: 61, sessionID: '537d2a397e1e10b705bbd2c8', name: 'PatchworkKnight', playtime: 23663, wins: 257, losses: 138, score: 119}
+  {team: 'ogres', rank: 62, sessionID: '537b8185e91b4d3b05525e3c', name: 'FlameFrost', playtime: 29939, wins: 251, losses: 142, score: 109}
+  {team: 'ogres', rank: 63, sessionID: '537bb4168623bc410575f208', name: 'NitrousDave', playtime: 29420, wins: 252, losses: 143, score: 109}
+  {team: 'ogres', rank: 64, sessionID: '537f4fa1c3067a7b07ba7786', name: 'Zodd', playtime: 8820, wins: 248, losses: 140, score: 108}
+  {team: 'ogres', rank: 65, sessionID: '538358b978171d3d057eb471', name: 'Lololala', playtime: 39892, wins: 252, losses: 144, score: 108}
+  {team: 'ogres', rank: 66, sessionID: '537f224c8fe881f1055dfb7e', name: 'Artoemius', playtime: 1470, wins: 251, losses: 150, score: 101}
+  {team: 'ogres', rank: 67, sessionID: '537b7b25e91b4d3b05525b61', name: 'Makaze', playtime: 21714, wins: 248, losses: 149, score: 99}
+  {team: 'ogres', rank: 68, sessionID: '537cf18c9cce053a05c0467f', name: 'CodeBane', playtime: 39749, wins: 233, losses: 137, score: 96}
+  {team: 'ogres', rank: 69, sessionID: '537baac910c8a6e405b9cf92', name: 'cooler', playtime: 49558, wins: 229, losses: 134, score: 95}
+  {team: 'ogres', rank: 70, sessionID: '5380d0a405e52a3305dec328', name: 'DoctorTacoPhD', playtime: 9723, wins: 249, losses: 155, score: 94}
+  {team: 'ogres', rank: 71, sessionID: '53948cfc5009fe5b075ba92d', name: 'zeus1200', playtime: 236, wins: 246, losses: 152, score: 94}
+  {team: 'ogres', rank: 72, sessionID: '537c66d114aaabe80c6a0072', name: 'Vratislav', playtime: 21203, wins: 237, losses: 144, score: 93}
+  {team: 'ogres', rank: 73, sessionID: '537b996016613c8405155922', name: 'Dafe', playtime: 701, wins: 232, losses: 140, score: 92}
+  {team: 'ogres', rank: 74, sessionID: '537b8271e91b4d3b05525e8e', name: '@billyvg', playtime: 20844, wins: 243, losses: 154, score: 89}
+  {team: 'ogres', rank: 75, sessionID: '537caafc2f6e3aee0ed58007', name: 'Sakares', playtime: 1257, wins: 237, losses: 151, score: 86}
+  {team: 'ogres', rank: 76, sessionID: '538142de05e52a3305df037d', name: 'Meowth', playtime: 12054, wins: 241, losses: 155, score: 86}
+  {team: 'ogres', rank: 77, sessionID: '537155a1ee35af3905987a87', name: 'Lanner', playtime: 3658, wins: 236, losses: 152, score: 84}
+  {team: 'ogres', rank: 78, sessionID: '537b99573803a287057582e3', name: 'DavyWong', playtime: 16467, wins: 242, losses: 161, score: 81}
+  {team: 'ogres', rank: 79, sessionID: '537be8fda3b60b390500e105', name: 'BeAsT MoDe', playtime: 2097, wins: 234, losses: 153, score: 81}
+  {team: 'ogres', rank: 80, sessionID: '537b96696c13497e05de8271', name: 'vkeg', playtime: 1883, wins: 236, losses: 157, score: 79}
+  {team: 'ogres', rank: 81, sessionID: '537ca60cb128a1850e083077', name: 'SPAMR', playtime: 19978, wins: 233, losses: 154, score: 79}
+  {team: 'ogres', rank: 82, sessionID: '537b5662fe0ec03905fcdcd4', name: 'pages', playtime: 22679, wins: 231, losses: 155, score: 76}
+  {team: 'ogres', rank: 83, sessionID: '537bf90295356a43065f7640', name: '', playtime: 167, wins: 218, losses: 144, score: 74}
+  {team: 'ogres', rank: 84, sessionID: '535de130c969efa7053345ab', name: 'Racksickle', playtime: 319, wins: 231, losses: 157, score: 74}
+  {team: 'ogres', rank: 85, sessionID: '537c2facf67b6b1c08af376f', name: 'greyworm', playtime: 22755, wins: 234, losses: 160, score: 74}
+  {team: 'ogres', rank: 86, sessionID: '537eef8c8fe881f1055dddb6', name: 'huang123', playtime: 2590, wins: 234, losses: 161, score: 73}
+  {team: 'ogres', rank: 87, sessionID: '53934430304ab93805efcf4f', name: 'LilDooda', playtime: 16603, wins: 229, losses: 156, score: 73}
+  {team: 'ogres', rank: 88, sessionID: '5389c83fb924da39051485d2', name: 'nineties', playtime: 58607, wins: 183, losses: 113, score: 70}
+  {team: 'ogres', rank: 89, sessionID: '537b760f1ed81a3b05c4fbfe', name: 'Xavion', playtime: 3593, wins: 229, losses: 159, score: 70}
+  {team: 'ogres', rank: 90, sessionID: '5383ec74087dc139054d8658', name: 'cattycat', playtime: 384, wins: 228, losses: 160, score: 68}
+  {team: 'ogres', rank: 91, sessionID: '538375bb78171d3d057ebdb6', name: 'Johnwg7', playtime: 65297, wins: 233, losses: 165, score: 68}
+  {team: 'ogres', rank: 92, sessionID: '537b99063803a287057582c1', name: 'Simba', playtime: 16847, wins: 230, losses: 163, score: 67}
+  {team: 'ogres', rank: 93, sessionID: '53929b482446a4410538b59d', name: 'Buh', playtime: 28766, wins: 230, losses: 165, score: 65}
+  {team: 'ogres', rank: 94, sessionID: '537bf9410ff88b2c06286e43', name: 'Ulfberht', playtime: 26046, wins: 232, losses: 171, score: 61}
+  {team: 'ogres', rank: 95, sessionID: '537bc6e24add491607deaaa1', name: 'Victor Hugo', playtime: 31094, wins: 221, losses: 163, score: 58}
+  {team: 'ogres', rank: 96, sessionID: '53809a807585483905a79529', name: 'stderr', playtime: 20568, wins: 229, losses: 173, score: 56}
+  {team: 'ogres', rank: 97, sessionID: '537b8643e91b4d3b05525f83', name: 'Austinh100', playtime: 12405, wins: 225, losses: 176, score: 49}
+  {team: 'ogres', rank: 98, sessionID: '537c7fad26529de30cca440d', name: 'efraglebagga', playtime: 22417, wins: 219, losses: 172, score: 47}
+  {team: 'ogres', rank: 99, sessionID: '537dde5d933d99860613a256', name: 'Meojifo', playtime: 50047, wins: 222, losses: 177, score: 45}
+  {team: 'ogres', rank: 100, sessionID: '537bc0eb467df184064bb865', name: 'Diginaut', playtime: 8029, wins: 225, losses: 180, score: 45}
+  {team: 'ogres', rank: 101, sessionID: '538390336f3bea3a05faff49', name: 'Ghostly_Cookie', playtime: 5804, wins: 221, losses: 177, score: 44}
+  {team: 'ogres', rank: 102, sessionID: '537f2cb8fdacc2fa050231bf', name: 'crazydiv', playtime: 12170, wins: 212, losses: 170, score: 42}
+  {team: 'ogres', rank: 103, sessionID: '537ef0e78fe881f1055dde46', name: 'Æ', playtime: 97439, wins: 204, losses: 163, score: 41}
+  {team: 'ogres', rank: 104, sessionID: '537b96f216613c84051557f1', name: 'mda', playtime: 11544, wins: 222, losses: 181, score: 41}
+  {team: 'ogres', rank: 105, sessionID: '537b8231e91b4d3b05525e7e', name: 'BobFranz', playtime: 632, wins: 222, losses: 184, score: 38}
+  {team: 'ogres', rank: 106, sessionID: '537b9a1d3803a2870575835f', name: 'pvande', playtime: 39177, wins: 216, losses: 179, score: 37}
+  {team: 'ogres', rank: 107, sessionID: '537c23fffa0d80a106b10eb4', name: 'Nylan', playtime: 1236, wins: 204, losses: 174, score: 30}
+  {team: 'ogres', rank: 108, sessionID: '537b91795bc02238050d1b80', name: 'Orange!', playtime: 22940, wins: 210, losses: 181, score: 29}
+  {team: 'ogres', rank: 109, sessionID: '537b8cfde91b4d3b055261b6', name: 'Thumb', playtime: 22271, wins: 212, losses: 185, score: 27}
+  {team: 'ogres', rank: 110, sessionID: '53978487888ab73905184003', name: 'Nick2', playtime: 5539, wins: 197, losses: 173, score: 24}
+  {team: 'ogres', rank: 111, sessionID: '5386313f8ca8b1120b8b58a3', name: 'fudgy', playtime: 2744, wins: 213, losses: 193, score: 20}
+  {team: 'ogres', rank: 112, sessionID: '537cbcc062dea6b811f109c7', name: 'Kirstin', playtime: 23151, wins: 211, losses: 192, score: 19}
+  {team: 'ogres', rank: 113, sessionID: '53814d4605e52a3305df086c', name: 'jsut', playtime: 21961, wins: 208, losses: 189, score: 19}
+  {team: 'ogres', rank: 114, sessionID: '5384c51f7d99a7390560bce1', name: 'Xhuy', playtime: 4562, wins: 204, losses: 188, score: 16}
+  {team: 'ogres', rank: 115, sessionID: '536259c5fc1acf300b2ebcb7', name: 'DarthNato', playtime: 26611, wins: 206, losses: 193, score: 13}
+  {team: 'ogres', rank: 116, sessionID: '538db7f65572d43b0521cf9c', name: 'rehashed', playtime: 12008, wins: 201, losses: 188, score: 13}
+  {team: 'ogres', rank: 117, sessionID: '5361946c801ef0010d3a3369', name: 'DeathScythe', playtime: 0, wins: 209, losses: 197, score: 12}
+  {team: 'ogres', rank: 118, sessionID: '537f5d073282d7a5076952e6', name: 'kraxor', playtime: 14420, wins: 191, losses: 179, score: 12}
+  {team: 'ogres', rank: 119, sessionID: '537bc98ba968548907de6dad', name: 'Huragok', playtime: 325, wins: 207, losses: 197, score: 10}
+  {team: 'ogres', rank: 120, sessionID: '53718545d0d9b1370555448b', name: 'SuchNoob', playtime: 0, wins: 196, losses: 188, score: 8}
+  {team: 'ogres', rank: 121, sessionID: '538a1888b924da390514c2d6', name: 'Lomidrevo', playtime: 9470, wins: 207, losses: 199, score: 8}
+  {team: 'ogres', rank: 122, sessionID: '537b92265bc02238050d1bc3', name: 'Drew', playtime: 21829, wins: 199, losses: 192, score: 7}
+  {team: 'ogres', rank: 123, sessionID: '537b976e556db17605be769e', name: 'Drak', playtime: 9554, wins: 202, losses: 197, score: 5}
+  {team: 'ogres', rank: 124, sessionID: '5380b07205e52a3305deb2ea', name: 'LinaLin', playtime: 1852, wins: 204, losses: 199, score: 5}
+  {team: 'ogres', rank: 125, sessionID: '537b84de5bc02238050d1699', name: 'WoLfulus', playtime: 9762, wins: 204, losses: 200, score: 4}
+  {team: 'ogres', rank: 126, sessionID: '537b7f945bc02238050d14d8', name: 'Shack', playtime: 16108, wins: 199, losses: 197, score: 2}
+  {team: 'ogres', rank: 127, sessionID: '537badf8ec57a3e805cbf577', name: 'borreltijd', playtime: 29749, wins: 202, losses: 203, score: -1}
+  {team: 'ogres', rank: 128, sessionID: '537f8306ead05fd3075d1d39', name: 'icoderz', playtime: 5382, wins: 202, losses: 204, score: -2}
+  {team: 'ogres', rank: 129, sessionID: '537b92b55bc02238050d1c18', name: 'Bullcity', playtime: 7478, wins: 197, losses: 204, score: -7}
+  {team: 'ogres', rank: 130, sessionID: '537ba0937c89ec9805f4df2f', name: 'Pavlov', playtime: 15761, wins: 198, losses: 205, score: -7}
+  {team: 'ogres', rank: 131, sessionID: '537b85055bc02238050d16a6', name: 'Drunk McLovin', playtime: 10225, wins: 194, losses: 204, score: -10}
+  {team: 'ogres', rank: 132, sessionID: '537cbb38a0d7a5cc10992ee9', name: 'Aion Crane', playtime: 9616, wins: 195, losses: 206, score: -11}
+  {team: 'ogres', rank: 133, sessionID: '537be31fa3b60b390500ddc5', name: 'antkim003', playtime: 19059, wins: 195, losses: 206, score: -11}
+  {team: 'ogres', rank: 134, sessionID: '537d20d97e1e10b705bbcd58', name: 'Tain', playtime: 28374, wins: 173, losses: 189, score: -16}
+  {team: 'ogres', rank: 135, sessionID: '537bb6d6386abb6e05a3facf', name: 'RTN', playtime: 4108, wins: 194, losses: 211, score: -17}
+  {team: 'ogres', rank: 136, sessionID: '537b86b95bc02238050d1706', name: 'Luogbelnu', playtime: 24526, wins: 191, losses: 208, score: -17}
+  {team: 'ogres', rank: 137, sessionID: '537338f73108bc3905f7528d', name: 'chess', playtime: 321, wins: 192, losses: 213, score: -21}
+  {team: 'ogres', rank: 138, sessionID: '537df0950efa6a37059df463', name: 'Rury', playtime: 14371, wins: 187, losses: 215, score: -28}
+  {team: 'ogres', rank: 139, sessionID: '537c11290ff88b2c06287d29', name: 'Crustopher', playtime: 15401, wins: 167, losses: 195, score: -28}
+  {team: 'ogres', rank: 140, sessionID: '537df96a0efa6a37059df853', name: 'HuangSY', playtime: 34229, wins: 178, losses: 209, score: -31}
+  {team: 'ogres', rank: 141, sessionID: '537b909f5bc02238050d1b32', name: 'ArthurDent', playtime: 63903, wins: 173, losses: 204, score: -31}
+  {team: 'ogres', rank: 142, sessionID: '537e901b9008f87b0541fc83', name: 'Mawox', playtime: 15961, wins: 186, losses: 218, score: -32}
+  {team: 'ogres', rank: 143, sessionID: '537fa33bf56c5874086896cc', name: 'Urg', playtime: 1760, wins: 182, losses: 218, score: -36}
+  {team: 'ogres', rank: 144, sessionID: '53854e7d7d99a7390560fadd', name: 'Dodrithard', playtime: 4087, wins: 160, losses: 196, score: -36}
+  {team: 'ogres', rank: 145, sessionID: '537bfa3395356a43065f76bd', name: 'Cicir', playtime: 7369, wins: 183, losses: 221, score: -38}
+  {team: 'ogres', rank: 146, sessionID: '537ba4f3d60bb0b405d852b2', name: 'Dubastot', playtime: 17312, wins: 160, losses: 201, score: -41}
+  {team: 'ogres', rank: 147, sessionID: '537b8dbbe91b4d3b05526226', name: 'Raetsel', playtime: 11005, wins: 180, losses: 223, score: -43}
+  {team: 'ogres', rank: 148, sessionID: '537bc0b31c8dfa820699fcc2', name: 'Source Error', playtime: 1731, wins: 171, losses: 214, score: -43}
+  {team: 'ogres', rank: 149, sessionID: '537b92dde91b4d3b05526442', name: 'Script Pimpkin', playtime: 18711, wins: 180, losses: 225, score: -45}
+  {team: 'ogres', rank: 150, sessionID: '538f33d0755876370525988f', name: 'Rigamortis', playtime: 23232, wins: 176, losses: 221, score: -45}
+  {team: 'ogres', rank: 151, sessionID: '537c8bb826529de30cca4b02', name: 'Static', playtime: 673, wins: 167, losses: 216, score: -49}
+  {team: 'ogres', rank: 152, sessionID: '537bdd5ed3f3bb3305bd997a', name: 'Tuna', playtime: 4854, wins: 177, losses: 226, score: -49}
+  {team: 'ogres', rank: 153, sessionID: '537b945d556db17605be74d0', name: 'Dino', playtime: 5413, wins: 177, losses: 227, score: -50}
+  {team: 'ogres', rank: 154, sessionID: '537bcda2c57303a5070c2f3a', name: 'LaughingMan', playtime: 52476, wins: 170, losses: 222, score: -52}
+  {team: 'ogres', rank: 155, sessionID: '53825ebf78171d3d057e4e48', name: 'Lord Azrael', playtime: 25968, wins: 175, losses: 227, score: -52}
+  {team: 'ogres', rank: 156, sessionID: '537d19307e1e10b705bbc877', name: 'Naoki', playtime: 7851, wins: 172, losses: 226, score: -54}
+  {team: 'ogres', rank: 157, sessionID: '537b95526c13497e05de81d2', name: 'Gromliqk', playtime: 15566, wins: 174, losses: 230, score: -56}
+  {team: 'ogres', rank: 158, sessionID: '537bacbc03838cf0050ace6f', name: 'cameltoe', playtime: 53128, wins: 171, losses: 230, score: -59}
+  {team: 'ogres', rank: 159, sessionID: '537b82d75bc02238050d160d', name: 'Kithid', playtime: 14756, wins: 169, losses: 229, score: -60}
+  {team: 'ogres', rank: 160, sessionID: '537d4e5d3dcf67c40571f5c3', name: 'bonnnie', playtime: 25945, wins: 173, losses: 233, score: -60}
+  {team: 'ogres', rank: 161, sessionID: '537e4d7a63734c6305059374', name: 'kotowlos', playtime: 6498, wins: 172, losses: 233, score: -61}
+  {team: 'ogres', rank: 162, sessionID: '537b80425bc02238050d152c', name: 'mdz', playtime: 12720, wins: 167, losses: 229, score: -62}
+  {team: 'ogres', rank: 163, sessionID: '537bb50218bd7f4705b9d459', name: 'Claros', playtime: 1250, wins: 170, losses: 236, score: -66}
+  {team: 'ogres', rank: 164, sessionID: '537c8a5626529de30cca4a2f', name: 'nulo', playtime: 5264, wins: 168, losses: 236, score: -68}
+  {team: 'ogres', rank: 165, sessionID: '537bb4598698e13805226b77', name: 'JojoTheGreat', playtime: 1733, wins: 162, losses: 235, score: -73}
+  {team: 'ogres', rank: 166, sessionID: '537bab9b89a8aeea05970d0b', name: 'gameloop.io', playtime: 2823, wins: 163, losses: 237, score: -74}
+  {team: 'ogres', rank: 167, sessionID: '5382411905e52a3305df893b', name: 'Richard Adleta', playtime: 3272, wins: 162, losses: 240, score: -78}
+  {team: 'ogres', rank: 168, sessionID: '537c4408a56c78cb0cb4f353', name: 'lichens', playtime: 59782, wins: 163, losses: 241, score: -78}
+  {team: 'ogres', rank: 169, sessionID: '537e1ab60efa6a37059e0bf0', name: 'Scnoobi', playtime: 3430, wins: 159, losses: 239, score: -80}
+  {team: 'ogres', rank: 170, sessionID: '537f6adc14f08dec07950ab2', name: 'Ralphy282', playtime: 42208, wins: 155, losses: 235, score: -80}
+  {team: 'ogres', rank: 171, sessionID: '537be8d820a501380564e6e7', name: 'gandalfStormcrow', playtime: 435, wins: 162, losses: 242, score: -80}
+  {team: 'ogres', rank: 172, sessionID: '537bc4b10de0a02c07e879a8', name: '', playtime: 872, wins: 161, losses: 242, score: -81}
+  {team: 'ogres', rank: 173, sessionID: '537e581863734c6305059a53', name: 'taz', playtime: 24420, wins: 160, losses: 242, score: -82}
+  {team: 'ogres', rank: 174, sessionID: '537ce331e9c4e97c05e3ea34', name: 'bb', playtime: 391, wins: 159, losses: 245, score: -86}
+  {team: 'ogres', rank: 175, sessionID: '537c5f4f14aaabe80c69fd70', name: '@ESWAT', playtime: 13389, wins: 152, losses: 239, score: -87}
+  {team: 'ogres', rank: 176, sessionID: '537b8a515bc02238050d1873', name: 'joshuacarley', playtime: 23663, wins: 156, losses: 244, score: -88}
+  {team: 'ogres', rank: 177, sessionID: '537d550d3dcf67c40571f7dc', name: 'J\'Son', playtime: 5290, wins: 156, losses: 246, score: -90}
+  {team: 'ogres', rank: 178, sessionID: '537c05ef95356a43065f7e1c', name: 'Cerbi', playtime: 9095, wins: 151, losses: 250, score: -99}
+  {team: 'ogres', rank: 179, sessionID: '537c532126529de30cca3067', name: 'warrned', playtime: 3870, wins: 149, losses: 254, score: -105}
+  {team: 'ogres', rank: 180, sessionID: '537fc780c1a6b99109171791', name: 'OWalerys', playtime: 18624, wins: 146, losses: 251, score: -105}
+  {team: 'ogres', rank: 181, sessionID: '537efa7e8fe881f1055de25e', name: 'Smaug', playtime: 14526, wins: 146, losses: 253, score: -107}
+  {team: 'ogres', rank: 182, sessionID: '537bf37d95356a43065f7286', name: 'cokaroach', playtime: 47117, wins: 124, losses: 237, score: -113}
+  {team: 'ogres', rank: 183, sessionID: '537e304e64659f3a0577248a', name: 'Plak87', playtime: 5459, wins: 144, losses: 259, score: -115}
+  {team: 'ogres', rank: 184, sessionID: '537cfe4d9cce053a05c04dc2', name: 'xzores', playtime: 9686, wins: 145, losses: 260, score: -115}
+  {team: 'ogres', rank: 185, sessionID: '537bb0ad2323353a05bd57ef', name: 'Wicked', playtime: 4520, wins: 140, losses: 258, score: -118}
+  {team: 'ogres', rank: 186, sessionID: '537cd1c4665bde1b13ffd635', name: 'Delforas', playtime: 3970, wins: 138, losses: 258, score: -120}
+  {team: 'ogres', rank: 187, sessionID: '53806a8405e52a3305de92fa', name: 'Pabelo', playtime: 4629, wins: 141, losses: 262, score: -121}
+  {team: 'ogres', rank: 188, sessionID: '537fcc57c1a6b99109171ced', name: 'jhoie', playtime: 1045, wins: 137, losses: 259, score: -122}
+  {team: 'ogres', rank: 189, sessionID: '5395d1ba7362c439054f7e6e', name: 'JenJen', playtime: 151, wins: 137, losses: 259, score: -122}
+  {team: 'ogres', rank: 190, sessionID: '537b9dc4ffeaa29e051b2738', name: 'Kevin', playtime: 9970, wins: 136, losses: 263, score: -127}
+  {team: 'ogres', rank: 191, sessionID: '537b9c09ffeaa29e051b2637', name: 'Tuefekci', playtime: 10790, wins: 131, losses: 259, score: -128}
+  {team: 'ogres', rank: 192, sessionID: '537c5b3526529de30cca340c', name: 'patchnotes', playtime: 31167, wins: 119, losses: 252, score: -133}
+  {team: 'ogres', rank: 193, sessionID: '5380fdb47585483905a7c753', name: 'null0pointer', playtime: 9524, wins: 131, losses: 266, score: -135}
+  {team: 'ogres', rank: 194, sessionID: '537b9f4751e98aa705b60515', name: 'Sawyer', playtime: 9450, wins: 136, losses: 271, score: -135}
+  {team: 'ogres', rank: 195, sessionID: '5380bd747585483905a7a707', name: 'Lobo', playtime: 5280, wins: 132, losses: 269, score: -137}
+  {team: 'ogres', rank: 196, sessionID: '5382593bc85c223a05f429d9', name: 'squidlarkin', playtime: 2036, wins: 130, losses: 267, score: -137}
+  {team: 'ogres', rank: 197, sessionID: '537cd5fee4523d0113ba57ea', name: 'Borlak', playtime: 14470, wins: 133, losses: 271, score: -138}
+  {team: 'ogres', rank: 198, sessionID: '537bbb201aaa69c4052676fd', name: 'jMerliN', playtime: 3292, wins: 129, losses: 270, score: -141}
+  {team: 'ogres', rank: 199, sessionID: '537be3c7a3b60b390500de0e', name: 'Dragon DM', playtime: 17848, wins: 131, losses: 274, score: -143}
+  {team: 'ogres', rank: 200, sessionID: '537b90295bc02238050d1af5', name: 'octopushugs', playtime: 706, wins: 125, losses: 270, score: -145}
+  {team: 'ogres', rank: 201, sessionID: '5380d5be7585483905a7b1e1', name: 'Quaritch', playtime: 12711, wins: 128, losses: 274, score: -146}
+  {team: 'ogres', rank: 202, sessionID: '5397732542cf7d3905ed7233', name: 'BloodJohn', playtime: 5178, wins: 127, losses: 276, score: -149}
+  {team: 'ogres', rank: 203, sessionID: '537cab3d0e905d000fbfad57', name: 'Xor', playtime: 19480, wins: 126, losses: 278, score: -152}
+  {team: 'ogres', rank: 204, sessionID: '537b88f85bc02238050d17e2', name: 'Jojas', playtime: 9328, wins: 126, losses: 278, score: -152}
+  {team: 'ogres', rank: 205, sessionID: '539436745009fe5b075b70a7', name: 'Vhr', playtime: 3065, wins: 122, losses: 274, score: -152}
+  {team: 'ogres', rank: 206, sessionID: '535f0c4b11c0ebd2049d1664', name: 'Jebso', playtime: 0, wins: 125, losses: 278, score: -153}
+  {team: 'ogres', rank: 207, sessionID: '537b9d3cffeaa29e051b26eb', name: '', playtime: 784, wins: 125, losses: 278, score: -153}
+  {team: 'ogres', rank: 208, sessionID: '537c3bdb54bc23770a21e166', name: 'seaclair', playtime: 385, wins: 122, losses: 279, score: -157}
+  {team: 'ogres', rank: 209, sessionID: '537bf147f8b46fbd0544fc15', name: '', playtime: 16376, wins: 109, losses: 269, score: -160}
+  {team: 'ogres', rank: 210, sessionID: '537bd2e0be90aa5605fb2ebd', name: 'educavalcanti', playtime: 50086, wins: 121, losses: 282, score: -161}
+  {team: 'ogres', rank: 211, sessionID: '537cd0e0665bde1b13ffd5ca', name: 'itsbth', playtime: 1299, wins: 104, losses: 265, score: -161}
+  {team: 'ogres', rank: 212, sessionID: '537b8e1ee91b4d3b05526274', name: 'Jorge', playtime: 4728, wins: 118, losses: 280, score: -162}
+  {team: 'ogres', rank: 213, sessionID: '537b88f6e91b4d3b05526048', name: 'CzonI', playtime: 3033, wins: 120, losses: 283, score: -163}
+  {team: 'ogres', rank: 214, sessionID: '537b7c26e91b4d3b05525c6a', name: 'TTSS', playtime: 1132, wins: 120, losses: 283, score: -163}
+  {team: 'ogres', rank: 215, sessionID: '5389d73bb924da3905149015', name: 'oli-f', playtime: 10824, wins: 101, losses: 266, score: -165}
+  {team: 'ogres', rank: 216, sessionID: '537b8c21e91b4d3b0552616d', name: 'Luke Young', playtime: 10713, wins: 117, losses: 285, score: -168}
+  {team: 'ogres', rank: 217, sessionID: '537b84e15bc02238050d169c', name: '', playtime: 359, wins: 116, losses: 284, score: -168}
+  {team: 'ogres', rank: 218, sessionID: '537b845fe91b4d3b05525f03', name: 'walesmd', playtime: 1630, wins: 116, losses: 285, score: -169}
+  {team: 'ogres', rank: 219, sessionID: '538515a73e0daa390518ba45', name: 'Azerroth', playtime: 19862, wins: 114, losses: 285, score: -171}
+  {team: 'ogres', rank: 220, sessionID: '537bd660142ee637052420e3', name: 'tkl', playtime: 8276, wins: 102, losses: 278, score: -176}
+  {team: 'ogres', rank: 221, sessionID: '538a9449b924da3905151926', name: 'cdaaar', playtime: 14955, wins: 45, losses: 222, score: -177}
+  {team: 'ogres', rank: 222, sessionID: '538345b078171d3d057eae61', name: 'Ikrus', playtime: 13687, wins: 111, losses: 295, score: -184}
+  {team: 'ogres', rank: 223, sessionID: '537b8e26e91b4d3b05526277', name: 'Zairja', playtime: 10077, wins: 101, losses: 293, score: -192}
+  {team: 'ogres', rank: 224, sessionID: '537b97f53803a28705758218', name: 'kookieblues', playtime: 2400, wins: 104, losses: 303, score: -199}
+  {team: 'ogres', rank: 225, sessionID: '537d06bd7e1e10b705bbbe83', name: 'llcossette', playtime: 2648, wins: 95, losses: 302, score: -207}
+  {team: 'ogres', rank: 226, sessionID: '537b800de91b4d3b05525db8', name: 'Merlin Gough', playtime: 8942, wins: 90, losses: 303, score: -213}
+  {team: 'ogres', rank: 227, sessionID: '538382db86de19c31c1ce893', name: 'Nick05 Testinator', playtime: 1454, wins: 90, losses: 311, score: -221}
+  {team: 'ogres', rank: 228, sessionID: '537bcd7ec57303a5070c2f1e', name: 'hedint', playtime: 8881, wins: 92, losses: 314, score: -222}
+  {team: 'ogres', rank: 229, sessionID: '537cc425665bde1b13ffce89', name: 'dotnetjohn', playtime: 1304, wins: 87, losses: 315, score: -228}
+  {team: 'ogres', rank: 230, sessionID: '537c3c1454bc23770a21e187', name: 'Prelude', playtime: 2351, wins: 85, losses: 313, score: -228}
+  {team: 'ogres', rank: 231, sessionID: '538925b4d06c503805fe4ff7', name: 'Perenolder', playtime: 21235, wins: 79, losses: 322, score: -243}
+  {team: 'ogres', rank: 232, sessionID: '538a26cdd06c503805fec706', name: 'the-k-man', playtime: 10321, wins: 78, losses: 327, score: -249}
+  {team: 'ogres', rank: 233, sessionID: '537c531d26529de30cca3065', name: 'masashi', playtime: 17871, wins: 75, losses: 330, score: -255}
+  {team: 'ogres', rank: 234, sessionID: '5371861fd4491339051c3b11', name: 'asdlk;fj asd fas', playtime: 0, wins: 65, losses: 333, score: -268}
+  {team: 'ogres', rank: 235, sessionID: '537b8429e91b4d3b05525ef5', name: 'Missblit', playtime: 28639, wins: 59, losses: 346, score: -287}
+  {team: 'ogres', rank: 236, sessionID: '538b1322d06c503805ff299f', name: 'judar1o', playtime: 5891, wins: 59, losses: 347, score: -288}
+  {team: 'ogres', rank: 237, sessionID: '53583ab57962157d05b398f8', name: 'makertech81', playtime: 170, wins: 55, losses: 344, score: -289}
+  {team: 'ogres', rank: 238, sessionID: '539723388376eb3805dc2d4e', name: 'immersion', playtime: 6471, wins: 54, losses: 348, score: -294}
+  {team: 'ogres', rank: 239, sessionID: '537c99aa14aaabe80c6a1a44', name: 'werewolf', playtime: 167, wins: 46, losses: 343, score: -297}
+  {team: 'ogres', rank: 240, sessionID: '539085aaf369103805172236', name: 'Kabbi', playtime: 6873, wins: 43, losses: 344, score: -301}
+  {team: 'ogres', rank: 241, sessionID: '537bd587b0d1766d05243016', name: 'Casey', playtime: 1229, wins: 44, losses: 346, score: -302}
+  {team: 'ogres', rank: 242, sessionID: '537e2bd864659f3a05772075', name: '', playtime: 322, wins: 42, losses: 349, score: -307}
+  {team: 'ogres', rank: 243, sessionID: '5385c7503e0daa39051919db', name: 'Zack', playtime: 66, wins: 40, losses: 348, score: -308}
+  {team: 'ogres', rank: 244, sessionID: '537ba0a551e98aa705b605b2', name: '', playtime: 232, wins: 39, losses: 349, score: -310}
+  {team: 'ogres', rank: 245, sessionID: '535fdebe5c7324a80702cb3b', name: 'mich55', playtime: 0, wins: 38, losses: 349, score: -311}
+  {team: 'ogres', rank: 246, sessionID: '5390823e7558763705263cc8', name: 'Duchess', playtime: 460, wins: 37, losses: 349, score: -312}
+  {team: 'ogres', rank: 247, sessionID: '5360a43d9859fefb0673aefa', name: 'daruba', playtime: 0, wins: 34, losses: 351, score: -317}
+  {team: 'ogres', rank: 248, sessionID: '537bab4f6e54cbda057ee565', name: 'Pajamas', playtime: 27043, wins: 14, losses: 338, score: -324}
+  {team: 'ogres', rank: 249, sessionID: '537bf053f8b46fbd0544fb8c', name: 'Fusspawn', playtime: 9524, wins: 37, losses: 368, score: -331}
+  {team: 'ogres', rank: 250, sessionID: '5382f069c85c223a05f47200', name: 'ferrak', playtime: 7015, wins: 33, losses: 373, score: -340}
+  {team: 'ogres', rank: 251, sessionID: '5380a3737585483905a799e1', name: 'Dark Pikachu', playtime: 1373, wins: 29, losses: 377, score: -348}
+  {team: 'ogres', rank: 252, sessionID: '538711898ca8b1120b8bdb3f', name: 'A', playtime: 4272, wins: 24, losses: 380, score: -356}
+  {team: 'ogres', rank: 253, sessionID: '5384af823e0daa3905187cb1', name: 'Macguffin', playtime: 837, wins: 18, losses: 384, score: -366}
+  {team: 'ogres', rank: 254, sessionID: '537db76b13add33a051bf575', name: 'Luyalve', playtime: 1404, wins: 3, losses: 372, score: -369}
+  {team: 'ogres', rank: 255, sessionID: '537b9bac16613c8405155a79', name: 'solarian', playtime: 24889, wins: 0, losses: 371, score: -371}
+  {team: 'ogres', rank: 256, sessionID: '537ba09951e98aa705b605ae', name: 'Potato', playtime: 61777, wins: 0, losses: 371, score: -371}
+  {team: 'ogres', rank: 257, sessionID: '537d24db84c54c6e05c06ac4', name: 'terriblesarcasm', playtime: 39553, wins: 0, losses: 371, score: -371}
+  {team: 'ogres', rank: 258, sessionID: '537c2abc224747bb0761634f', name: 'chicones', playtime: 9831, wins: 0, losses: 371, score: -371}
+  {team: 'ogres', rank: 259, sessionID: '538381a5c83e563705a06fdb', name: 'diddly-dum', playtime: 8077, wins: 0, losses: 372, score: -372}
+  {team: 'ogres', rank: 260, sessionID: '5388a785b924da3905139f46', name: 'AWESOMEHACKER', playtime: 564, wins: 0, losses: 372, score: -372}
+  {team: 'ogres', rank: 261, sessionID: '537bb6d2386abb6e05a3facc', name: 'chrm', playtime: 213307, wins: 0, losses: 375, score: -375}
+  {team: 'ogres', rank: 262, sessionID: '537bc26e8fe668b406d4c019', name: 'Sapid', playtime: 11917, wins: 0, losses: 376, score: -376}
+  {team: 'ogres', rank: 263, sessionID: '5357127a1bfa9bba14b5e048', name: 'dcm</script><script>alert(\'XSS\')</script>', playtime: 5380, wins: 0, losses: 376, score: -376}
+  {team: 'ogres', rank: 264, sessionID: '537aee4cfb4c173805cf26f7', name: 'basicer', playtime: 10407, wins: 0, losses: 376, score: -376}
+  {team: 'ogres', rank: 265, sessionID: '5382cbb078171d3d057e804f', name: 'vvv', playtime: 719, wins: 0, losses: 376, score: -376}
+  {team: 'ogres', rank: 266, sessionID: '537ba40a903fd2b8051553b0', name: 'ElderTale', playtime: 13984, wins: 0, losses: 376, score: -376}
+  {team: 'ogres', rank: 267, sessionID: '53839e256f3bea3a05fb09b3', name: 'Gondolfs', playtime: 29985, wins: 0, losses: 378, score: -378}
+  {team: 'ogres', rank: 268, sessionID: '537a73a6e488a7380545affd', name: 'Galvan', playtime: 514, wins: 0, losses: 378, score: -378}
+  {team: 'ogres', rank: 269, sessionID: '537b96b16c13497e05de82a8', name: 'Krris', playtime: 2618, wins: 0, losses: 379, score: -379}
+  {team: 'ogres', rank: 270, sessionID: '537bc1b81db8c8ac063a3b7b', name: 'jpiasetz', playtime: 14565, wins: 0, losses: 380, score: -380}
+]
diff --git a/app/views/play/ladder/utils.coffee b/app/views/play/ladder/utils.coffee
index 10f088093..ffa340ac3 100644
--- a/app/views/play/ladder/utils.coffee
+++ b/app/views/play/ladder/utils.coffee
@@ -19,4 +19,4 @@ module.exports.teamDataFromLevel = (level) ->
       primaryColor: primaryColor
     })
 
-  teams
\ No newline at end of file
+  teams
diff --git a/app/views/play/ladder_home.coffee b/app/views/play/ladder_home.coffee
index 0150b2284..1508697c9 100644
--- a/app/views/play/ladder_home.coffee
+++ b/app/views/play/ladder_home.coffee
@@ -12,7 +12,7 @@ class LevelSessionsCollection extends CocoCollection
     @url = "/db/user/#{me.id}/level.sessions?project=state.complete,levelID"
 
 module.exports = class LadderHomeView extends View
-  id: "ladder-home-view"
+  id: 'ladder-home-view'
   template: template
 
   constructor: (options) ->
@@ -35,33 +35,33 @@ module.exports = class LadderHomeView extends View
         difficulty: 4
         id: 'greed'
         image: '/file/db/level/53558b5a9914f5a90d7ccddb/greed_banner.jpg'
-        description: "Liked Dungeon Arena and Gold Rush? Put them together in this economic arena!"
+        description: 'Liked Dungeon Arena and Gold Rush? Put them together in this economic arena!'
       }
       {
         name: 'Dungeon Arena'
         difficulty: 3
         id: 'dungeon-arena'
         image: '/file/db/level/53173f76c269d400000543c2/Level%20Banner%20Dungeon%20Arena.jpg'
-        description: "Play head-to-head against fellow Wizards in a dungeon melee!"
+        description: 'Play head-to-head against fellow Wizards in a dungeon melee!'
       }
       {
         name: 'Gold Rush'
         difficulty: 3
         id: 'gold-rush'
         image: '/file/db/level/533353722a61b7ca6832840c/Gold-Rush.png'
-        description: "Prove you are better at collecting gold than your opponent!"
+        description: 'Prove you are better at collecting gold than your opponent!'
       }
       {
         name: 'Brawlwood'
         difficulty: 4
         id: 'brawlwood'
         image: '/file/db/level/52d97ecd32362bc86e004e87/Level%20Banner%20Brawlwood.jpg'
-        description: "Combat the armies of other Wizards in a strategic forest arena! (Fast computer required.)"
+        description: 'Combat the armies of other Wizards in a strategic forest arena! (Fast computer required.)'
       }
     ]
 
     context.campaigns = [
-      {id: "multiplayer", name: "Multiplayer Arenas", description: "... in which you code head-to-head against other players.", levels: arenas}
+      {id: 'multiplayer', name: 'Multiplayer Arenas', description: '... in which you code head-to-head against other players.', levels: arenas}
     ]
     context.levelStatusMap = @levelStatusMap
     context
diff --git a/app/views/play/level/control_bar_view.coffee b/app/views/play/level/control_bar_view.coffee
index 9c1076edb..7a1dd58ec 100644
--- a/app/views/play/level/control_bar_view.coffee
+++ b/app/views/play/level/control_bar_view.coffee
@@ -6,7 +6,7 @@ MultiplayerModal = require './modal/multiplayer_modal'
 ReloadModal = require './modal/reload_modal'
 
 module.exports = class ControlBarView extends View
-  id: "control-bar-view"
+  id: 'control-bar-view'
   template: template
 
   subscriptions:
@@ -28,7 +28,7 @@ module.exports = class ControlBarView extends View
     'click #next-game-button': ->
       Backbone.Mediator.publish 'next-game-pressed'
 
-    'click': -> Backbone.Mediator.publish 'focus-editor'
+    'click': -> Backbone.Mediator.publish 'tome:focus-editor'
 
   constructor: (options) ->
     @worldName = options.worldName
diff --git a/app/views/play/level/dialogue_animator.coffee b/app/views/play/level/dialogue_animator.coffee
index dee5ca48c..2edae3662 100644
--- a/app/views/play/level/dialogue_animator.coffee
+++ b/app/views/play/level/dialogue_animator.coffee
@@ -3,24 +3,24 @@ module.exports = class DialogueAnimator
   childrenToAdd: null
   charsToAdd: null
   childAnimator: null
-  
+
   constructor: (html, @jqueryElement) ->
     d = $('<div></div>').html(html)
     @childrenToAdd = _.map(d[0].childNodes, (e) -> return e)
-    
+
   tick: ->
     if not @charsToAdd and not @childAnimator
       @addNextElement()
-    
+
     if @charsToAdd
       @addSingleChar()
       return
-      
+
     if @childAnimator
       @childAnimator.tick()
       if @childAnimator.done()
         @childAnimator = null
-        
+
   addNextElement: ->
     return unless @childrenToAdd.length
     nextElem = @childrenToAdd[0]
@@ -33,13 +33,13 @@ module.exports = class DialogueAnimator
       @jqueryElement.append(newElem)
       if value
         @childAnimator = new DialogueAnimator(value, newElem)
-    
+
   addSingleChar: ->
     @jqueryElement.html(@jqueryElement.html() + @charsToAdd[0])
     @charsToAdd = @charsToAdd[1..]
     if @charsToAdd.length is 0
       @charsToAdd = null
-    
+
   done: ->
     return false if @childrenToAdd.length > 0
     return false if @charsToAdd
diff --git a/app/views/play/level/goals_view.coffee b/app/views/play/level/goals_view.coffee
index 21e27e29d..e55d881b8 100644
--- a/app/views/play/level/goals_view.coffee
+++ b/app/views/play/level/goals_view.coffee
@@ -9,7 +9,7 @@ stateIconMap =
   failure: 'icon-remove'
 
 module.exports = class GoalsView extends View
-  id: "goals-view"
+  id: 'goals-view'
   template: template
 
   subscriptions:
@@ -22,7 +22,7 @@ module.exports = class GoalsView extends View
     'mouseenter': ->
       @mouseEntered = true
       @updatePlacement()
-      
+
     'mouseleave': ->
       @mouseEntered = false
       @updatePlacement()
@@ -38,7 +38,7 @@ module.exports = class GoalsView extends View
     classToShow ?= 'timed-out' if e.timedOut
     classToShow ?= 'incomplete'
     @$el.find('.goal-status.'+classToShow).removeClass 'secret'
-    
+
     list = $('#primary-goals-list', @$el)
     list.empty()
     goals = []
@@ -78,11 +78,11 @@ module.exports = class GoalsView extends View
   render: ->
     super()
     @$el.addClass('secret').addClass('expanded')
-    
+
   afterRender: ->
     super()
     @updatePlacement()
-    
+
   updatePlacement: ->
     if @playbackEnded or @mouseEntered
       # expand
diff --git a/app/views/play/level/gold_view.coffee b/app/views/play/level/gold_view.coffee
index 6191d4d7a..f7168b386 100644
--- a/app/views/play/level/gold_view.coffee
+++ b/app/views/play/level/gold_view.coffee
@@ -3,7 +3,7 @@ template = require 'templates/play/level/gold'
 teamTemplate = require 'templates/play/level/team_gold'
 
 module.exports = class GoldView extends View
-  id: "gold-view"
+  id: 'gold-view'
   template: template
 
   subscriptions:
@@ -14,25 +14,27 @@ module.exports = class GoldView extends View
     super options
     @teamGold = {}
     @teamGoldEarned = {}
+    @shownOnce = false
 
   onGoldChanged: (e) ->
-    @$el.show()
     return if @teamGold[e.team] is e.gold and @teamGoldEarned[e.team] is e.goldEarned
     @teamGold[e.team] = e.gold
     @teamGoldEarned[e.team] = e.goldEarned
     goldEl = @$el.find('.gold-amount.team-' + e.team)
     unless goldEl.length
       teamEl = teamTemplate team: e.team
-      @$el.append(teamEl)
+      @$el[if e.team is 'humans' then 'prepend' else 'append'](teamEl)
       goldEl = $('.gold-amount.team-' + e.team, teamEl)
     text = '' + e.gold
     if e.goldEarned and e.goldEarned > e.gold
       text += " (#{e.goldEarned})"
     goldEl.text text
     @updateTitle()
+    @$el.show()
+    @shownOnce = true
 
   updateTitle: ->
     @$el.attr 'title', ("Team '#{team}' has #{gold} now of #{@teamGoldEarned[team]} gold earned." for team, gold of @teamGold).join ' '
 
   onSetLetterbox: (e) ->
-    @$el.toggle not e.on
+    @$el.toggle not e.on if @shownOnce
diff --git a/app/views/play/level/hud_view.coffee b/app/views/play/level/hud_view.coffee
index 87625d631..75bc68346 100644
--- a/app/views/play/level/hud_view.coffee
+++ b/app/views/play/level/hud_view.coffee
@@ -31,7 +31,7 @@ module.exports = class HUDView extends View
     @$el.addClass 'no-selection'
 
   onClick: (e) ->
-    Backbone.Mediator.publish 'focus-editor' unless $(e.target).parents('.thang-props').length
+    Backbone.Mediator.publish 'tome:focus-editor' unless $(e.target).parents('.thang-props').length
 
   onFrameChanged: (e) ->
     @timeProgress = e.progress
@@ -126,7 +126,7 @@ module.exports = class HUDView extends View
     if thangType.get('raster')
       wrapper.empty().append($('<img />').attr('src', '/file/'+thangType.get('raster')))
     else
-      stage = thangType.getPortraitStage options
+      return unless stage = thangType.getPortraitStage options
       newCanvas = $(stage.canvas).addClass('thang-canvas')
       wrapper.empty().append(newCanvas)
       stage.update()
@@ -143,7 +143,7 @@ module.exports = class HUDView extends View
 
   createProperties: ->
     props = @$el.find('.thang-props')
-    props.find(":not(.thang-name)").remove()
+    props.find(':not(.thang-name)').remove()
     props.find('.thang-name').text(if @thang.type then "#{@thang.id} - #{@thang.type}" else @thang.id)
     propNames = _.without @thang.hudProperties ? [], 'action'
     nColumns = Math.ceil propNames.length / 5
@@ -187,8 +187,8 @@ module.exports = class HUDView extends View
         group.append(button)
         response.button = $('button:last', group)
     else
-      s = $.i18n.t('play_level.hud_continue', defaultValue: "Continue (shift+space)")
-      sk = $.i18n.t('play_level.skip_tutorial', defaultValue: "skip: esc")
+      s = $.i18n.t('play_level.hud_continue', defaultValue: 'Continue (shift+space)')
+      sk = $.i18n.t('play_level.skip_tutorial', defaultValue: 'skip: esc')
       if not @escapePressed
         group.append('<span class="hud-hint">' + sk + '</span>')
       group.append($('<button class="btn btn-small banner with-dot">' + s + ' <div class="dot"></div></button>'))
@@ -201,7 +201,7 @@ module.exports = class HUDView extends View
     if @animator.done()
       clearInterval(@messageInterval)
       @messageInterval = null
-      $('.enter', @bubble).removeClass("secret").css('opacity', 0.0).delay(500).animate({opacity:1.0}, 500, @animateEnterButton)
+      $('.enter', @bubble).removeClass('secret').css('opacity', 0.0).delay(500).animate({opacity: 1.0}, 500, @animateEnterButton)
       if @lastResponses
         buttons = $('.enter button')
         for response, i in @lastResponses
@@ -228,7 +228,7 @@ module.exports = class HUDView extends View
     return unless @bubble
     button = $('.enter', @bubble)
     dot = $('.dot', button)
-    dot.animate({opacity:0.2}, 300).animate({opacity:1.9}, 600, @animateEnterButton)
+    dot.animate({opacity: 0.2}, 300).animate({opacity: 1.9}, 600, @animateEnterButton)
 
   switchToDialogueElements: ->
     @dialogueMode = true
@@ -236,11 +236,11 @@ module.exports = class HUDView extends View
     @$el.find('.thang-canvas-wrapper').removeClass('secret')
     $('.dialogue-area', @$el)
       .removeClass('secret')
-      .animate({opacity:1.0}, 200)
+      .animate({opacity: 1.0}, 200)
     $('.dialogue-bubble', @$el)
       .css('opacity', 0.0)
       .delay(200)
-      .animate({opacity:1.0}, 200)
+      .animate({opacity: 1.0}, 200)
     clearTimeout @hintNextSelectionTimeout
 
   switchToThangElements: ->
@@ -257,26 +257,26 @@ module.exports = class HUDView extends View
     @updateActions()
 
   createPropElement: (prop) ->
-    if prop in ["maxHealth"]
+    if prop in ['maxHealth']
       return null  # included in the bar
     context =
       prop: prop
-      hasIcon: prop in ["health", "pos", "target", "inventory", "gold", "bountyGold", "visualRange", "attackDamage", "attackRange", "maxSpeed"]
-      hasBar: prop in ["health"]
+      hasIcon: prop in ['health', 'pos', 'target', 'inventory', 'gold', 'bountyGold', 'visualRange', 'attackDamage', 'attackRange', 'maxSpeed']
+      hasBar: prop in ['health']
     $(prop_template(context))
 
   updatePropElement: (prop, val) ->
     pel = @$el.find '.thang-props *[name=' + prop + ']'
-    if prop in ["maxHealth"]
+    if prop in ['maxHealth']
       return  # Don't show maxes--they're built into bar labels.
-    if prop in ["health"]
-      max = @thang["max" + prop.charAt(0).toUpperCase() + prop.slice(1)]
-      regen = @thang[prop + "ReplenishRate"]
+    if prop in ['health']
+      max = @thang['max' + prop.charAt(0).toUpperCase() + prop.slice(1)]
+      regen = @thang[prop + 'ReplenishRate']
       percent = Math.round 100 * val / max
-      pel.find('.bar').css 'width', percent + "%"
-      labelText = prop + ": " + @formatValue(prop, val) + " / " + @formatValue(prop, max)
+      pel.find('.bar').css 'width', percent + '%'
+      labelText = prop + ': ' + @formatValue(prop, val) + ' / ' + @formatValue(prop, max)
       if regen
-        labelText += " (+" + @formatValue(prop, regen) + "/s)"
+        labelText += ' (+' + @formatValue(prop, regen) + '/s)'
       pel.find('.bar-prop-value').text(Math.round(max)) if max
     else
       s = @formatValue(prop, val)
@@ -290,11 +290,11 @@ module.exports = class HUDView extends View
     pel
 
   formatValue: (prop, val) ->
-    if prop is "target" and not val
-      val = @thang["targetPos"]
+    if prop is 'target' and not val
+      val = @thang['targetPos']
       val = null if val?.isZero()
-    if prop is "rotation"
-      return (val * 180 / Math.PI).toFixed(0) + "˚"
+    if prop is 'rotation'
+      return (val * 180 / Math.PI).toFixed(0) + '˚'
     if prop.search(/Range$/) isnt -1
       return val + 'm'
     if typeof val is 'number'
@@ -302,14 +302,14 @@ module.exports = class HUDView extends View
       if -10 < val < 10 then return val.toFixed(2)
       if -100 < val < 100 then return val.toFixed(1)
       return val.toFixed(0)
-    if val and typeof val is "object"
+    if val and typeof val is 'object'
       if val.id
         return val.id
       else if val.x and val.y
         return "x: #{val.x.toFixed(0)} y: #{val.y.toFixed(0)}"
         #return "x: #{val.x.toFixed(0)} y: #{val.y.toFixed(0)}, z: #{val.z.toFixed(0)}"  # Debugging: include z
     else if not val?
-      return "No " + prop
+      return 'No ' + prop
     return val
 
   updateActions: ->
diff --git a/app/views/play/level/level_chat_view.coffee b/app/views/play/level/level_chat_view.coffee
index 09936ae65..c581563da 100644
--- a/app/views/play/level/level_chat_view.coffee
+++ b/app/views/play/level/level_chat_view.coffee
@@ -51,14 +51,14 @@ module.exports = class LevelChatView extends View
     @playNoise() if e.message.authorID isnt me.id
 
   playNoise: ->
-    Backbone.Mediator.publish 'play-sound', trigger: "chat_received"
+    Backbone.Mediator.publish 'play-sound', trigger: 'chat_received'
 
   messageObjectToJQuery: (message) ->
     td = $('<td></td>')
     content = message.content
     content = _.string.escapeHTML(content)
-    content = content.replace(/\n/g, "<br/>")
-    content = content.replace(RegExp('  ', 'g'), "&nbsp; ") # coffeescript can't compile "/  /g"
+    content = content.replace(/\n/g, '<br/>')
+    content = content.replace(RegExp('  ', 'g'), '&nbsp; ') # coffeescript can't compile '/  /g'
     if _.string.startsWith(content, '/me')
       content = message.authorName + content.slice(3)
 
diff --git a/app/views/play/level/level_loading_view.coffee b/app/views/play/level/level_loading_view.coffee
index 217b4bc9b..2ed460796 100644
--- a/app/views/play/level/level_loading_view.coffee
+++ b/app/views/play/level/level_loading_view.coffee
@@ -1,9 +1,8 @@
 View = require 'views/kinds/CocoView'
 template = require 'templates/play/level/level_loading'
 
-
 module.exports = class LevelLoadingView extends View
-  id: "level-loading-view"
+  id: 'level-loading-view'
   template: template
 
   onLoaded: ->
diff --git a/app/views/play/level/modal/docs_modal.coffee b/app/views/play/level/modal/docs_modal.coffee
index 8c6a56a16..72aa6b8d0 100644
--- a/app/views/play/level/modal/docs_modal.coffee
+++ b/app/views/play/level/modal/docs_modal.coffee
@@ -8,6 +8,7 @@ utils = require 'lib/utils'
 module.exports = class DocsModal extends View
   template: template
   id: 'docs-modal'
+  plain: true
 
   shortcuts:
     'enter': 'hide'
@@ -49,7 +50,7 @@ module.exports = class DocsModal extends View
 
   clickTab: (e) =>
     @$el.find('li.active').removeClass('active')
-    
+
   afterInsert: ->
     super()
     Backbone.Mediator.publish 'level:docs-shown'
diff --git a/app/views/play/level/modal/editor_config_modal.coffee b/app/views/play/level/modal/editor_config_modal.coffee
index a90afad08..5f8fd878f 100644
--- a/app/views/play/level/modal/editor_config_modal.coffee
+++ b/app/views/play/level/modal/editor_config_modal.coffee
@@ -1,6 +1,6 @@
 View = require 'views/kinds/ModalView'
 template = require 'templates/play/level/modal/editor_config'
-{me} = require('lib/auth')
+{me} = require 'lib/auth'
 
 module.exports = class EditorConfigModal extends View
   id: 'level-editor-config-modal'
@@ -13,6 +13,7 @@ module.exports = class EditorConfigModal extends View
     invisibles: false
     indentGuides: false
     behaviors: false
+    liveCompletion: true
 
   events:
     'change #tome-invisibles': 'updateInvisibles'
@@ -20,6 +21,7 @@ module.exports = class EditorConfigModal extends View
     'change #tome-key-bindings': 'updateKeyBindings'
     'change #tome-indent-guides': 'updateIndentGuides'
     'change #tome-behaviors': 'updateBehaviors'
+    'change #tome-live-completion': 'updateLiveCompletion'
 
   constructor: (options) ->
     super(options)
@@ -43,6 +45,7 @@ module.exports = class EditorConfigModal extends View
     c.invisibles = @aceConfig.invisibles
     c.indentGuides = @aceConfig.indentGuides
     c.behaviors = @aceConfig.behaviors
+    c.liveCompletion = @aceConfig.liveCompletion
     c
 
   updateSessionLanguage: ->
@@ -63,6 +66,9 @@ module.exports = class EditorConfigModal extends View
   updateBehaviors: ->
     @aceConfig.behaviors = @$el.find('#tome-behaviors').prop('checked')
 
+  updateLiveCompletion: ->
+    @aceConfig.liveCompletion = @$el.find('#tome-live-completion').prop('checked')
+
   afterRender: ->
     super()
 
@@ -75,11 +81,12 @@ module.exports = class EditorConfigModal extends View
     @aceConfig.keyBindings = @$el.find('#tome-key-bindings').val()
     @aceConfig.indentGuides = @$el.find('#tome-indent-guides').prop('checked')
     @aceConfig.behaviors = @$el.find('#tome-behaviors').prop('checked')
+    @aceConfig.liveCompletion = @$el.find('#tome-live-completion').prop('checked')
     me.set 'aceConfig', @aceConfig
     Backbone.Mediator.publish 'tome:change-config'
     Backbone.Mediator.publish 'tome:change-language', language: newLanguage unless newLanguage is oldLanguage
     @session.save() unless newLanguage is oldLanguage
-    me.save()
+    me.patch()
 
   destroy: ->
     super()
diff --git a/app/views/play/level/modal/victory_modal.coffee b/app/views/play/level/modal/victory_modal.coffee
index ecc883426..6ee9cabef 100644
--- a/app/views/play/level/modal/victory_modal.coffee
+++ b/app/views/play/level/modal/victory_modal.coffee
@@ -54,7 +54,7 @@ module.exports = class VictoryModal extends View
     @feedback = new LevelFeedback()
     @feedback.set('levelID', @level.get('slug') or @level.id)
     @feedback.set('levelName', @level.get('name') or '')
-    @feedback.set('level', {majorVersion: @level.get('version').major, original:@level.get('original')})
+    @feedback.set('level', {majorVersion: @level.get('version').major, original: @level.get('original')})
     @showStars()
 
   onPlayNextLevel: ->
@@ -79,9 +79,9 @@ module.exports = class VictoryModal extends View
       elapsed = (new Date() - new Date(me.get('dateCreated')))
       enough = not c.hasNextLevel or elapsed >= 30 * 60 * 1000
       if enough and not me.get('hourOfCodeComplete')
-        $('body').append($("<img src='http://code.org/api/hour/finish_codecombat.png' style='visibility: hidden;'>"))
+        $('body').append($('<img src="http://code.org/api/hour/finish_codecombat.png" style="visibility: hidden;">'))
         me.set 'hourOfCodeComplete', true
-        me.save()
+        me.patch()
         window.tracker?.trackEvent 'Hour of Code Finish', {}
       # Show the "I'm done" button if they get to the end, unless it's been over two hours
       tooMuch = elapsed >= 120 * 60 * 1000
@@ -95,7 +95,7 @@ module.exports = class VictoryModal extends View
 
   afterInsert: ->
     super()
-    Backbone.Mediator.publish 'play-sound', trigger: "victory"
+    Backbone.Mediator.publish 'play-sound', trigger: 'victory'
     gapi?.plusone?.go? @$el[0]
     FB?.XFBML?.parse? @$el[0]
     twttr?.widgets?.load?()
diff --git a/app/views/play/level/playback_view.coffee b/app/views/play/level/playback_view.coffee
index 9d377eb52..4ae415729 100644
--- a/app/views/play/level/playback_view.coffee
+++ b/app/views/play/level/playback_view.coffee
@@ -6,7 +6,7 @@ EditorConfigModal = require './modal/editor_config_modal'
 KeyboardShortcutsModal = require './modal/keyboard_shortcuts_modal'
 
 module.exports = class PlaybackView extends View
-  id: "playback-view"
+  id: 'playback-view'
   template: template
 
   subscriptions:
@@ -36,7 +36,7 @@ module.exports = class PlaybackView extends View
     'click #zoom-out-button': -> Backbone.Mediator.publish('camera-zoom-out') unless @shouldIgnore()
     'click #volume-button': 'onToggleVolume'
     'click #play-button': 'onTogglePlay'
-    'click': -> Backbone.Mediator.publish 'focus-editor'
+    'click': -> Backbone.Mediator.publish 'tome:focus-editor'
     'mouseenter #timeProgress': 'onProgressEnter'
     'mouseleave #timeProgress': 'onProgressLeave'
     'mousemove #timeProgress': 'onProgressHover'
@@ -48,14 +48,13 @@ module.exports = class PlaybackView extends View
     '⌘+], ctrl+]': 'onScrubForward'
     '⌘+⇧+], ctrl+⇧+]': 'onSingleScrubForward'
 
-
   # popover that shows at the current mouse position on the progressbar, using the bootstrap popover.
   # Could make this into a jQuery plugins itself theoretically.
   class HoverPopup extends $.fn.popover.Constructor
     constructor: () ->
       @enabled = true
       @shown = false
-      @type = "HoverPopup"
+      @type = 'HoverPopup'
       @options =
         placement: 'top'
         container: 'body'
@@ -66,7 +65,7 @@ module.exports = class PlaybackView extends View
       @$element = $('#timeProgress')
       @$tip = $('#timePopover')
 
-      @content = ""
+      @content = ''
 
     getContent: -> @content
 
@@ -122,7 +121,7 @@ module.exports = class PlaybackView extends View
   # These functions could go to some helper class
 
   pad2: (num) ->
-    if not num? or num is 0 then "00" else ((if num < 10 then "0" else "") + num)
+    if not num? or num is 0 then '00' else ((if num < 10 then '0' else '') + num)
 
   formatTime: (text, time) =>
     "#{text}\t#{@timeToString time}"
@@ -131,9 +130,9 @@ module.exports = class PlaybackView extends View
     mins = Math.floor(time / 60)
     secs = (time - mins * 60).toFixed(1)
     if withUnits
-      ret = ""
-      ret = (mins + " " + (if mins is 1 then @minute else @minutes)) if (mins > 0)
-      ret = (ret + " " + secs + " " + (if secs is 1 then @second else @seconds)) if (secs > 0 or mins is 0)
+      ret = ''
+      ret = (mins + ' ' + (if mins is 1 then @minute else @minutes)) if (mins > 0)
+      ret = (ret + ' ' + secs + ' ' + (if secs is 1 then @second else @seconds)) if (secs > 0 or mins is 0)
     else
       "#{mins}:#{@pad2 secs}"
 
@@ -302,7 +301,7 @@ module.exports = class PlaybackView extends View
     @clickingSlider = false  # whether the mouse has been pressed down without moving
     @$progressScrubber.slider(
       max: @sliderIncrements
-      animate: "slow"
+      animate: 'slow'
       slide: (event, ui) =>
         @scrubTo ui.value / @sliderIncrements
         @slideCount += 1
@@ -355,7 +354,7 @@ module.exports = class PlaybackView extends View
   onToggleMusic: (e) ->
     e?.preventDefault()
     me.set('music', not me.get('music'))
-    me.save()
+    me.patch()
     $(document.activeElement).blur()
 
   destroy: ->
diff --git a/app/views/play/level/thang_avatar_view.coffee b/app/views/play/level/thang_avatar_view.coffee
index fe9babf5b..054fb0d1a 100644
--- a/app/views/play/level/thang_avatar_view.coffee
+++ b/app/views/play/level/thang_avatar_view.coffee
@@ -7,7 +7,7 @@ module.exports = class ThangAvatarView extends View
   template: template
 
   subscriptions:
-    'tome:problems-updated': "onProblemsUpdated"
+    'tome:problems-updated': 'onProblemsUpdated'
     'god:new-world-created': 'onNewWorld'
 
   constructor: (options) ->
@@ -18,10 +18,10 @@ module.exports = class ThangAvatarView extends View
     if not @thangType
       console.error 'Thang avatar view expected a thang type to be provided.'
       return
-      
+
     unless @thangType.isFullyLoaded() or @thangType.loading
       @thangType.fetch()
-  
+
     # couldn't get the level view to load properly through the supermodel
     # so just doing it manually this time.
     @listenTo @thangType, 'sync', @render
@@ -73,4 +73,4 @@ module.exports = class ThangAvatarView extends View
     @options.thang = @thang = e.world.thangMap[@thang.id] if @thang
 
   destroy: ->
-    super()
\ No newline at end of file
+    super()
diff --git a/app/views/play/level/tome/cast_button_view.coffee b/app/views/play/level/tome/cast_button_view.coffee
index 133cfbfcc..1eb85c79f 100644
--- a/app/views/play/level/tome/cast_button_view.coffee
+++ b/app/views/play/level/tome/cast_button_view.coffee
@@ -11,7 +11,7 @@ module.exports = class CastButtonView extends View
     'click .autocast-delays a': 'onCastOptionsClick'
 
   subscriptions:
-    'tome:spell-changed': "onSpellChanged"
+    'tome:spell-changed': 'onSpellChanged'
     'tome:cast-spells': 'onCastSpells'
     'god:world-load-progress-changed': 'onWorldLoadProgressChanged'
     'god:new-world-created': 'onNewWorld'
@@ -20,8 +20,8 @@ module.exports = class CastButtonView extends View
     super options
     @spells = options.spells
     @levelID = options.levelID
-    @castShortcut = "⇧↵"
-    @castShortcutVerbose = "Shift+Enter"
+    @castShortcut = '⇧↵'
+    @castShortcutVerbose = 'Shift+Enter'
 
   getRenderData: (context={}) ->
     context = super context
@@ -35,7 +35,7 @@ module.exports = class CastButtonView extends View
     @castOptions = $('.autocast-delays', @$el)
     delay = me.get('autocastDelay')
     delay ?= 5000
-    if @levelID in ['brawlwood', 'brawlwood-tutorial', 'dungeon-arena', 'dungeon-arena-tutorial', 'gold-rush', 'greed']
+    unless @levelID in ['rescue-mission', 'grab-the-mushroom', 'drink-me', 'its-a-trap', 'break-the-prison', 'taunt', 'cowardly-taunt', 'commanding-followers', 'mobile-artillery']
       delay = 90019001
     @setAutocastDelay delay
 
@@ -46,7 +46,7 @@ module.exports = class CastButtonView extends View
     Backbone.Mediator.publish 'tome:manual-cast', {}
 
   onCastOptionsClick: (e) =>
-    Backbone.Mediator.publish 'focus-editor'
+    Backbone.Mediator.publish 'tome:focus-editor'
     @castButtonGroup.removeClass 'open'
     @setAutocastDelay $(e.target).attr 'data-delay'
     false
@@ -84,20 +84,20 @@ module.exports = class CastButtonView extends View
       Backbone.Mediator.publish 'tome:spell-has-changed-significantly-calculation', hasChangedSignificantly: castable
       @castButtonGroup.toggleClass('castable', castable).toggleClass('casting', @casting)
       if @casting
-        s = $.i18n.t("play_level.tome_cast_button_casting", defaultValue: "Casting")
+        s = $.i18n.t('play_level.tome_cast_button_casting', defaultValue: 'Casting')
       else if castable
-        s = $.i18n.t("play_level.tome_cast_button_castable", defaultValue: "Cast Spell") + " " + @castShortcut
+        s = $.i18n.t('play_level.tome_cast_button_castable', defaultValue: 'Cast Spell') + ' ' + @castShortcut
       else
-        s = $.i18n.t("play_level.tome_cast_button_cast", defaultValue: "Spell Cast")
+        s = $.i18n.t('play_level.tome_cast_button_cast', defaultValue: 'Spell Cast')
       @castButton.text s
       @castButton.prop 'disabled', not castable
 
   setAutocastDelay: (delay) ->
-    #console.log "Set autocast delay to", delay
+    #console.log 'Set autocast delay to', delay
     return unless delay
     @autocastDelay = delay = parseInt delay
     me.set('autocastDelay', delay)
-    me.save()
+    me.patch()
     spell.view.setAutocastDelay delay for spellKey, spell of @spells
     @castOptions.find('a').each ->
       $(@).toggleClass('selected', parseInt($(@).attr('data-delay')) is delay)
diff --git a/app/views/play/level/tome/doc_formatter.coffee b/app/views/play/level/tome/doc_formatter.coffee
new file mode 100644
index 000000000..2d256c3ad
--- /dev/null
+++ b/app/views/play/level/tome/doc_formatter.coffee
@@ -0,0 +1,124 @@
+popoverTemplate = require 'templates/play/level/tome/spell_palette_entry_popover'
+{downTheChain} = require 'lib/world/world_utils'
+window.Vector = require 'lib/world/vector'  # So we can document it
+
+safeJSONStringify = (input, maxDepth) ->
+  recursion = (input, path, depth) ->
+    output = {}
+    pPath = undefined
+    refIdx = undefined
+    path = path or ''
+    depth = depth or 0
+    depth++
+    return '{depth over ' + maxDepth + '}' if maxDepth and depth > maxDepth
+    for p of input
+      pPath = ((if path then (path + '.') else '')) + p
+      if typeof input[p] is 'function'
+        output[p] = '{function}'
+      else if typeof input[p] is 'object'
+        refIdx = refs.indexOf(input[p])
+        if -1 isnt refIdx
+          output[p] = '{reference to ' + refsPaths[refIdx] + '}'
+        else
+          refs.push input[p]
+          refsPaths.push pPath
+          output[p] = recursion(input[p], pPath, depth)
+      else
+        output[p] = input[p]
+    output
+  refs = []
+  refsPaths = []
+  maxDepth = maxDepth or 5
+  if typeof input is 'object'
+    output = recursion(input)
+  else
+    output = input
+  JSON.stringify output, null, 1
+
+module.exports = class DocFormatter
+  constructor: (@options) ->
+    @doc = _.cloneDeep options.doc
+    @fillOutDoc()
+
+  fillOutDoc: ->
+    if _.isString @doc
+      @doc = name: @doc, type: typeof @options.thang[@doc]
+    if @options.isSnippet
+      @doc.type = 'snippet'
+      @doc.owner = 'snippets'
+      @doc.shortName = @doc.shorterName = @doc.title = @doc.name
+    else
+      @doc.owner ?= 'this'
+      ownerName = @doc.ownerName = if @doc.owner isnt 'this' then @doc.owner else switch @options.language
+        when 'python', 'lua' then 'self'
+        when 'coffeescript' then '@'
+        else 'this'
+      if @doc.type is 'function'
+        sep = {clojure: ' '}[@options.language] ? ', '
+        argNames = (arg.name for arg in @doc.args ? []).join sep
+        argString = if argNames then '__ARGS__' else ''
+        @doc.shortName = switch @options.language
+          when 'coffeescript' then "#{ownerName}#{if ownerName is '@' then '' else '.'}#{@doc.name}#{if argString then ' ' + argString else '()'}"
+          when 'python' then "#{ownerName}.#{@doc.name}(#{argString})"
+          when 'lua' then "#{ownerName}:#{@doc.name}(#{argString})"
+          when 'clojure' then "(.#{@doc.name} #{ownerName}#{if argNames then ' ' + argString else ''})"
+          when 'io' then "#{if ownerName is 'this' then '' else ownerName + ' '}#{@doc.name}#{if argNames then '(' + argNames + ')' else ''}"
+          else "#{ownerName}.#{@doc.name}(#{argString});"
+      else
+        @doc.shortName = switch @options.language
+          when 'coffeescript' then "#{ownerName}#{if ownerName is '@' then '' else '.'}#{@doc.name}"
+          when 'python' then "#{ownerName}.#{@doc.name}"
+          when 'lua' then "#{ownerName}.#{@doc.name}"
+          when 'clojure' then "(.#{@doc.name} #{ownerName})"
+          when 'io' then "#{if ownerName is 'this' then '' else ownerName + ' '}#{@doc.name}"
+          else "#{ownerName}.#{@doc.name};"
+      @doc.shorterName = @doc.shortName
+      if @doc.type is 'function' and argString
+        @doc.shortName = @doc.shorterName.replace argString, argNames
+        @doc.shorterName = @doc.shorterName.replace argString, (if argNames.length > 6 then '...' else argNames)
+      if @options.language is 'javascript'
+        @doc.shorterName = @doc.shortName.replace ';', ''
+        if @doc.owner is 'this' or @options.tabbify
+          @doc.shorterName = @doc.shorterName.replace /^this\./, ''
+      @doc.title = if @options.shortenize then @doc.shorterName else @doc.shortName
+
+    # Grab the language-specific documentation for some sub-properties, if we have it.
+    toTranslate = [{obj: @doc, prop: 'example'}, {obj: @doc, prop: 'returns'}]
+    for arg in (@doc.args ? [])
+      toTranslate.push {obj: arg, prop: 'example'}, {obj: arg, prop: 'description'}
+    for {obj, prop} in toTranslate
+      if val = obj[prop]?[@options.language]
+        obj[prop] = val
+      else unless _.isString obj[prop]
+        obj[prop] = null
+
+  formatPopover: ->
+    content = popoverTemplate doc: @doc, language: @options.language, value: @formatValue(), marked: marked, argumentExamples: (arg.example or arg.default or arg.name for arg in @doc.args ? [])
+    owner = if @doc.owner is 'this' then @options.thang else window[@doc.owner]
+    content = content.replace /#{spriteName}/g, @options.thang.type ? @options.thang.spriteName  # Prefer type, and excluded the quotes we'd get with @formatValue
+    content.replace /\#\{(.*?)\}/g, (s, properties) => @formatValue downTheChain(owner, properties.split('.'))
+
+  formatValue: (v) ->
+    return null if @doc.type is 'snippet'
+    return @options.thang.now() if @doc.name is 'now'
+    return '[Function]' if not v and @doc.type is 'function'
+    unless v?
+      if @doc.owner is 'this'
+        v = @options.thang[@doc.name]
+      else
+        v = window[@doc.owner][@doc.name]  # grab Math or Vector
+    if @doc.type is 'number' and not isNaN v
+      if v == Math.round v
+        return v
+      return v.toFixed 2
+    if _.isString v
+      return "\"#{v}\""
+    if v?.id
+      return v.id
+    if v?.name
+      return v.name
+    if _.isArray v
+      return '[' + (@formatValue v2 for v2 in v).join(', ') + ']'
+    if _.isPlainObject v
+      return safeJSONStringify v, 2
+    v
diff --git a/app/views/play/level/tome/problem.coffee b/app/views/play/level/tome/problem.coffee
index 9dc6db442..13fb7cede 100644
--- a/app/views/play/level/tome/problem.coffee
+++ b/app/views/play/level/tome/problem.coffee
@@ -1,5 +1,5 @@
 ProblemAlertView = require './problem_alert_view'
-Range = ace.require("ace/range").Range
+Range = ace.require('ace/range').Range
 
 module.exports = class Problem
   annotation: null
@@ -25,7 +25,7 @@ module.exports = class Problem
       column: start.col,
       raw: text,
       text: text,
-      type: @aetherProblem.level ? "error"
+      type: @aetherProblem.level ? 'error'
 
   buildAlertView: ->
     @alertView = new ProblemAlertView problem: @
@@ -39,7 +39,7 @@ module.exports = class Problem
     @markerRange = new Range start.row, start.col, end.row, end.col
     @markerRange.start = @ace.getSession().getDocument().createAnchor @markerRange.start
     @markerRange.end = @ace.getSession().getDocument().createAnchor @markerRange.end
-    @markerRange.id = @ace.getSession().addMarker @markerRange, clazz, "text"
+    @markerRange.id = @ace.getSession().addMarker @markerRange, clazz, 'text'
 
   removeMarkerRange: ->
     return unless @markerRange
diff --git a/app/views/play/level/tome/problem_alert_view.coffee b/app/views/play/level/tome/problem_alert_view.coffee
index f17648e67..2a77e1632 100644
--- a/app/views/play/level/tome/problem_alert_view.coffee
+++ b/app/views/play/level/tome/problem_alert_view.coffee
@@ -9,7 +9,7 @@ module.exports = class ProblemAlertView extends View
   subscriptions: {}
 
   events:
-    "click .close": "onRemoveClicked"
+    'click .close': 'onRemoveClicked'
 
   constructor: (options) ->
     super options
diff --git a/app/views/play/level/tome/spell.coffee b/app/views/play/level/tome/spell.coffee
index a44dadde4..0572542b3 100644
--- a/app/views/play/level/tome/spell.coffee
+++ b/app/views/play/level/tome/spell.coffee
@@ -14,29 +14,36 @@ module.exports = class Spell
     @spellKey = options.spellKey
     @pathComponents = options.pathComponents
     @session = options.session
+    @otherSession = options.otherSession
     @spectateView = options.spectateView
     @supermodel = options.supermodel
     @skipProtectAPI = options.skipProtectAPI
     @worker = options.worker
-    p = options.programmableMethod
 
+    p = options.programmableMethod
+    @languages = p.languages ? {}
+    @languages.javascript ?= p.source
     @name = p.name
     @permissions = read: p.permissions?.read ? [], readwrite: p.permissions?.readwrite ? []  # teams
-    teamSpells = @session.get('teamSpells')
-    team = @session.get('team') ? 'humans'
-    @useTranspiledCode = @permissions.readwrite.length and ((teamSpells and not _.contains(teamSpells[team], @spellKey)) or (@session.get('creator') isnt me.id) or @spectateView)
-    #console.log @spellKey, "using transpiled code?", @useTranspiledCode
-    @source = @originalSource = p.source
+    if @canWrite()
+      @setLanguage options.language
+    else if @isEnemySpell()
+      @setLanguage options.otherSession.get 'submittedCodeLanguage'
+    else
+      @setLanguage 'javascript'
+    @useTranspiledCode = @shouldUseTranspiledCode()
+    console.log 'Spell', @spellKey, 'is using transpiled code (should only happen if it\'s an enemy/spectate writable method).' if @useTranspiledCode
+
+    @source = @originalSource
     @parameters = p.parameters
     if @permissions.readwrite.length and sessionSource = @session.getSourceFor(@spellKey)
       @source = sessionSource
-    @language = if @canWrite() then options.language else 'javascript'
     @thangs = {}
     @view = new SpellView {spell: @, session: @session, worker: @worker}
     @view.render()  # Get it ready and code loaded in advance
-    @tabView = new SpellListTabEntryView spell: @, supermodel: @supermodel
+    @tabView = new SpellListTabEntryView spell: @, supermodel: @supermodel, language: @language
     @tabView.render()
-    @team = @permissions.readwrite[0] ? "common"
+    @team = @permissions.readwrite[0] ? 'common'
     Backbone.Mediator.publish 'tome:spell-created', spell: @
 
   destroy: ->
@@ -45,6 +52,9 @@ module.exports = class Spell
     @thangs = null
     @worker = null
 
+  setLanguage: (@language) ->
+    @originalSource = @languages[language] ? @languages.javascript
+
   addThang: (thang) ->
     if @thangs[thang.id]
       @thangs[thang.id].thang = thang
@@ -78,11 +88,11 @@ module.exports = class Spell
         else
           pure = spellThang.aether.transpile source
           problems = spellThang.aether.problems
-        #console.log "aether transpiled", source.length, "to", spellThang.aether.pure.length, "for", thangID, @spellKey
+        #console.log 'aether transpiled', source.length, 'to', spellThang.aether.pure.length, 'for', thangID, @spellKey
       else
         spellThang.aether.pure = pure
         spellThang.aether.problems = problems
-        #console.log "aether reused transpilation for", thangID, @spellKey
+        #console.log 'aether reused transpilation for', thangID, @spellKey
     null
 
   hasChanged: (newSource=null, currentSource=null) ->
@@ -93,19 +103,19 @@ module.exports = class Spell
       aether = spellThang.aether
       break
     unless aether
-      console.error @toString(), "couldn't find a spellThang with aether of", @thangs
+      console.error @toString(), 'couldn\'t find a spellThang with aether of', @thangs
       cb false
     workerMessage =
-      function: "hasChangedSignificantly"
+      function: 'hasChangedSignificantly'
       a: (newSource ? @originalSource)
       spellKey: @spellKey
       b: (currentSource ? @source)
       careAboutLineNumbers: true
       careAboutLint: true
-    @worker.addEventListener "message", (e) =>
+    @worker.addEventListener 'message', (e) =>
       workerData = JSON.parse e.data
-      if workerData.function is "hasChangedSignificantly" and workerData.spellKey is @spellKey
-        @worker.removeEventListener "message", arguments.callee, false
+      if workerData.function is 'hasChangedSignificantly' and workerData.spellKey is @spellKey
+        @worker.removeEventListener 'message', arguments.callee, false
         cb(workerData.hasChanged)
     @worker.postMessage JSON.stringify(workerMessage)
 
@@ -114,26 +124,26 @@ module.exports = class Spell
     writable = @permissions.readwrite.length > 0
     aetherOptions =
       problems:
-        jshint_W040: {level: "ignore"}
-        jshint_W030: {level: "ignore"}  # aether_NoEffect instead
-        jshint_W038: {level: "ignore"}  # eliminates hoisting problems
-        jshint_W091: {level: "ignore"}  # eliminates more hoisting problems
-        jshint_E043: {level: "ignore"}  # https://github.com/codecombat/codecombat/issues/813 -- since we can't actually tell JSHint to really ignore things
-        jshint_Unknown: {level: "ignore"}  # E043 also triggers Unknown, so ignore that, too
+        jshint_W040: {level: 'ignore'}
+        jshint_W030: {level: 'ignore'}  # aether_NoEffect instead
+        jshint_W038: {level: 'ignore'}  # eliminates hoisting problems
+        jshint_W091: {level: 'ignore'}  # eliminates more hoisting problems
+        jshint_E043: {level: 'ignore'}  # https://github.com/codecombat/codecombat/issues/813 -- since we can't actually tell JSHint to really ignore things
+        jshint_Unknown: {level: 'ignore'}  # E043 also triggers Unknown, so ignore that, too
         aether_MissingThis: {level: 'error'}
-      language: if @canWrite() then @language else 'javascript'
+      language: @language
       functionName: @name
       functionParameters: @parameters
       yieldConditionally: thang.plan?
       globals: ['Vector', '_']
       # TODO: Gridmancer doesn't currently work with protectAPI, so hack it off
-      protectAPI: not (@skipProtectAPI or window.currentView?.level.get('name').match("Gridmancer")) and writable  # If anyone can write to this method, we must protect it.
+      protectAPI: not (@skipProtectAPI or window.currentView?.level.get('name').match('Gridmancer')) and writable  # If anyone can write to this method, we must protect it.
       includeFlow: false
       executionLimit: 1 * 1000 * 1000
-    #console.log "creating aether with options", aetherOptions
+    #console.log 'creating aether with options', aetherOptions
     aether = new Aether aetherOptions
     workerMessage =
-      function: "createAether"
+      function: 'createAether'
       spellKey: @spellKey
       options: aetherOptions
     @worker.postMessage JSON.stringify workerMessage
@@ -143,11 +153,27 @@ module.exports = class Spell
     for thangId, spellThang of @thangs
       spellThang.aether?.setLanguage @language
       spellThang.castAether = null
+      Backbone.Mediator.publish 'tome:spell-changed-language', spell: @, language: @language
     workerMessage =
-      function: "updateLanguageAether"
+      function: 'updateLanguageAether'
       newLanguage: @language
     @worker.postMessage JSON.stringify workerMessage
     @transpile()
 
   toString: ->
     "<Spell: #{@spellKey}>"
+
+  isEnemySpell: ->
+    return false unless @permissions.readwrite.length
+    return false unless @otherSession
+    teamSpells = @session.get('teamSpells')
+    team = @session.get('team') ? 'humans'
+    teamSpells and not _.contains(teamSpells[team], @spellKey)
+
+  shouldUseTranspiledCode: ->
+    # Determine whether this code has already been transpiled, or whether it's raw source needing transpilation.
+    return true if @spectateView  # Use transpiled code for both teams if we're just spectating.
+    return true if @isEnemySpell()  # Use transpiled for enemy spells.
+    # Players without permissions can't view the raw code.
+    return true if @session.get('creator') isnt me.id and not (me.isAdmin() or 'employer' in me.get('permissions'))
+    false
diff --git a/app/views/play/level/tome/spell_debug_view.coffee b/app/views/play/level/tome/spell_debug_view.coffee
index c48d3beab..8d08dca71 100644
--- a/app/views/play/level/tome/spell_debug_view.coffee
+++ b/app/views/play/level/tome/spell_debug_view.coffee
@@ -1,11 +1,11 @@
 View = require 'views/kinds/CocoView'
 template = require 'templates/play/level/tome/spell_debug'
-Range = ace.require("ace/range").Range
-TokenIterator = ace.require("ace/token_iterator").TokenIterator
+Range = ace.require('ace/range').Range
+TokenIterator = ace.require('ace/token_iterator').TokenIterator
 serializedClasses =
-  Thang: require "lib/world/thang"
-  Vector: require "lib/world/vector"
-  Rectangle: require "lib/world/rectangle"
+  Thang: require 'lib/world/thang'
+  Vector: require 'lib/world/vector'
+  Rectangle: require 'lib/world/rectangle'
 
 module.exports = class DebugView extends View
   className: 'spell-debug-view'
@@ -14,6 +14,7 @@ module.exports = class DebugView extends View
   subscriptions:
     'god:new-world-created': 'onNewWorld'
     'god:debug-value-return': 'handleDebugValue'
+    'god:debug-world-load-progress-changed': 'handleWorldLoadProgressChanged'
     'tome:spell-shown': 'changeCurrentThangAndSpell'
     'tome:cast-spells': 'onTomeCast'
     'surface:frame-changed': 'onFrameChanged'
@@ -26,6 +27,7 @@ module.exports = class DebugView extends View
     @ace = options.ace
     @thang = options.thang
     @spell = options.spell
+    @progress = 0
     @variableStates = {}
     @globals = {Math: Math, _: _, String: String, Number: Number, Array: Array, Object: Object}  # ... add more as documented
     for className, serializedClass of serializedClasses
@@ -36,11 +38,10 @@ module.exports = class DebugView extends View
     @lastFrameRequested = -1
     @workerIsSimulating = false
     @spellHasChanged = false
-    
-
+    @debouncedTooltipUpdate = _.debounce @updateTooltipProgress, 100
 
   pad2: (num) ->
-    if not num? or num is 0 then "00" else ((if num < 10 then "0" else "") + num)
+    if not num? or num is 0 then '00' else ((if num < 10 then '0' else '') + num)
 
   calculateCurrentTimeString: =>
     time = @currentFrame / @frameRate
@@ -48,30 +49,44 @@ module.exports = class DebugView extends View
     secs = (time - mins * 60).toFixed(1)
     "#{mins}:#{@pad2 secs}"
 
-
   setTooltipKeyAndValue: (key, value) =>
+    @hideProgressBarAndShowText()
     message = "Time: #{@calculateCurrentTimeString()}\n#{key}: #{value}"
-    @$el.find("code").text message
+    @$el.find('code').text message
     @$el.show().css(@pos)
 
   setTooltipText: (text) =>
     #perhaps changing styling here in the future
-    @$el.find("code").text text
+    @hideProgressBarAndShowText()
+    @$el.find('code').text text
     @$el.show().css(@pos)
 
+  setTooltipProgress: (progress) =>
+    @showProgressBarAndHideText()
+    @$el.find('.progress-bar').css('width', progress + '%').attr 'aria-valuenow', progress
+    @$el.show().css(@pos)
+
+  showProgressBarAndHideText: ->
+    @$el.find('pre').css('display', 'none')
+    @$el.find('.progress').css('display', 'block')
+
+  hideProgressBarAndShowText: ->
+    @$el.find('pre').css('display', 'block')
+    @$el.find('.progress').css('display', 'none')
+
   onTomeCast: ->
     @invalidateCache()
 
   invalidateCache: -> @cache = {}
 
-  retrieveValueFromCache: (thangID,spellID,variableChain,frame) ->
+  retrieveValueFromCache: (thangID, spellID, variableChain, frame) ->
     joinedVariableChain = variableChain.join()
     value = @cache[frame]?[thangID]?[spellID]?[joinedVariableChain]
     return value ? undefined
 
   updateCache: (thangID, spellID, variableChain, frame, value) ->
     currentObject = @cache
-    keys = [frame,thangID,spellID,variableChain.join()]
+    keys = [frame, thangID, spellID, variableChain.join()]
     for keyIndex in [0...(keys.length - 1)]
       key = keys[keyIndex]
       unless key of currentObject
@@ -79,7 +94,6 @@ module.exports = class DebugView extends View
       currentObject = currentObject[key]
     currentObject[keys[keys.length - 1]] = value
 
-
   changeCurrentThangAndSpell: (thangAndSpellObject) ->
     @thang = thangAndSpellObject.thang
     @spell = thangAndSpellObject.spell
@@ -87,14 +101,16 @@ module.exports = class DebugView extends View
   handleDebugValue: (returnObject) ->
     @workerIsSimulating = false
     {key, value} = returnObject
-    @updateCache(@thang.id,@spell.name,key.split("."),@lastFrameRequested,value)
-    if @variableChain and not key is @variableChain.join(".") then return
-    @setTooltipKeyAndValue(key,value)
+    @updateCache(@thang.id, @spell.name, key.split('.'), @lastFrameRequested, value)
+    if @variableChain and not key is @variableChain.join('.') then return
+    @setTooltipKeyAndValue(key, value)
 
+  handleWorldLoadProgressChanged: (data) ->
+    @progress = data.progress
 
   afterRender: ->
     super()
-    @ace.on "mousemove", @onMouseMove
+    @ace.on 'mousemove', @onMouseMove
 
   setVariableStates: (@variableStates) ->
     @update()
@@ -111,13 +127,13 @@ module.exports = class DebugView extends View
       break if endOfLine or not token  # Don't iterate beyond end or beginning of line
       it.stepBackward()
     if @isIdentifier token
-      # This could be a property access, like "enemy.target.pos" or "this.spawnedRectangles".
+      # This could be a property access, like 'enemy.target.pos' or 'this.spawnedRectangles'.
       # We have to realize this and dig into the nesting of the objects.
       start = it.getCurrentTokenColumn()
       [chain, start, end] = [[token.value], start, start + token.value.length]
       while it.getCurrentTokenRow() is pos.row
         it.stepBackward()
-        break unless it.getCurrentToken()?.value is "."
+        break unless it.getCurrentToken()?.value is '.'
         it.stepBackward()
         token = null  # If we're doing a complex access like this.getEnemies().length, then length isn't a valid var.
         break unless @isIdentifier(prev = it.getCurrentToken())
@@ -125,7 +141,7 @@ module.exports = class DebugView extends View
         start = it.getCurrentTokenColumn()
         chain.unshift token.value
     #Highlight all tokens, so true overrides all other conditions TODO: Refactor this later
-    if token and (true or token.value of @variableStates or token.value is "this" or @globals[token.value])
+    if token and (true or token.value of @variableStates or token.value is 'this' or @globals[token.value])
       @variableChain = chain
       offsetX = e.domEvent.offsetX ? e.clientX - $(e.domEvent.target).offset().left
       offsetY = e.domEvent.offsetY ? e.clientY - $(e.domEvent.target).offset().top
@@ -141,6 +157,11 @@ module.exports = class DebugView extends View
     @variableChain = @markerRange = null
     @update()
 
+  updateTooltipProgress: =>
+    if @variableChain and @progress < 1
+      @setTooltipProgress(@progress * 100)
+      _.delay @updateTooltipProgress, 100
+
   onNewWorld: (e) ->
     @thang = @options.thang = e.world.thangMap[@thang.id] if @thang
     @frameRate = e.world.frameRate
@@ -148,21 +169,22 @@ module.exports = class DebugView extends View
   onFrameChanged: (data) ->
     @currentFrame = data.frame
     @frameRate = data.world.frameRate
+
   onSpellChangedCalculation: (data) ->
     @spellHasChanged = data.hasChangedSignificantly
-    
+
   update: ->
     if @variableChain
       if @spellHasChanged
-        @setTooltipText("You've changed this spell! \nPlease recast to use the hover debugger.")
-      else if @variableChain.length is 2 and @variableChain[0] is "this"
-        @setTooltipKeyAndValue(@variableChain.join("."),@stringifyValue(@thang[@variableChain[1]],0))
+        @setTooltipText('You\'ve changed this spell! \nPlease recast to use the hover debugger.')
+      else if @variableChain.length is 2 and @variableChain[0] is 'this'
+        @setTooltipKeyAndValue(@variableChain.join('.'), @stringifyValue(@thang[@variableChain[1]], 0))
       else if @variableChain.length is 1 and Aether.globals[@variableChain[0]]
-        @setTooltipKeyAndValue(@variableChain.join("."),@stringifyValue(Aether.globals[@variableChain[0]],0))
-      else if @workerIsSimulating
-        @setTooltipText("World is simulating, please wait...")
+        @setTooltipKeyAndValue(@variableChain.join('.'), @stringifyValue(Aether.globals[@variableChain[0]], 0))
+      else if @workerIsSimulating and @progress < 1
+        @debouncedTooltipUpdate()
       else if @currentFrame is @lastFrameRequested and (cacheValue = @retrieveValueFromCache(@thang.id, @spell.name, @variableChain, @currentFrame))
-        @setTooltipKeyAndValue(@variableChain.join("."),cacheValue)
+        @setTooltipKeyAndValue(@variableChain.join('.'), cacheValue)
       else
         Backbone.Mediator.publish 'tome:spell-debug-value-request',
           thangID: @thang.id
@@ -171,7 +193,8 @@ module.exports = class DebugView extends View
           frame: @currentFrame
         if @currentFrame isnt @lastFrameRequested then @workerIsSimulating = true
         @lastFrameRequested = @currentFrame
-        @setTooltipText("Finding value...")
+        @progress = 0
+        @debouncedTooltipUpdate()
     else
       @$el.hide()
     if @variableChain?.length is 2
@@ -184,10 +207,10 @@ module.exports = class DebugView extends View
   stringifyValue: (value, depth) ->
     return value if not value or _.isString value
     if _.isFunction value
-      return if depth is 2 then undefined else "<Function>"
+      return if depth is 2 then undefined else '<Function>'
     return "<this #{value.id}>" if value is @thang and depth
     if depth is 2
-      if value.constructor?.className is "Thang"
+      if value.constructor?.className is 'Thang'
         value = "<#{value.type or value.spriteName} - #{value.id}, #{if value.pos then value.pos.toString() else 'non-physical'}>"
       else
         value = value.toString()
@@ -196,23 +219,23 @@ module.exports = class DebugView extends View
     isArray = _.isArray value
     isObject = _.isObject value
     return value.toString() unless isArray or isObject
-    brackets = if isArray then ["[", "]"] else ["{", "}"]
+    brackets = if isArray then ['[', ']'] else ['{', '}']
     size = _.size value
-    return brackets.join "" unless size
+    return brackets.join '' unless size
     values = []
     if isArray
       for v in value
         s = @stringifyValue(v, depth + 1)
-        values.push "" + s unless s is undefined
+        values.push '' + s unless s is undefined
     else
       for key in value.apiProperties ? _.keys value
         s = @stringifyValue(value[key], depth + 1)
-        values.push key + ": " + s unless s is undefined
-    sep = '\n' + ("  " for i in [0 ... depth]).join('')
+        values.push key + ': ' + s unless s is undefined
+    sep = '\n' + ('  ' for i in [0 ... depth]).join('')
     prefix = value.constructor?.className
-    prefix ?= "Array" if isArray
-    prefix ?= "Object" if isObject
-    prefix = if prefix then prefix + " " else ""
+    prefix ?= 'Array' if isArray
+    prefix ?= 'Object' if isObject
+    prefix = if prefix then prefix + ' ' else ''
     return "#{prefix}#{brackets[0]}#{sep}  #{values.join(sep + '  ')}#{sep}#{brackets[1]}"
   notifyPropertyHovered: =>
     clearTimeout @hoveredPropertyTimeout if @hoveredPropertyTimeout
@@ -227,9 +250,9 @@ module.exports = class DebugView extends View
       @ace.getSession().removeMarker @marker
       @marker = null
     if @markerRange
-      @marker = @ace.getSession().addMarker @markerRange, "ace_bracket", "text"
+      @marker = @ace.getSession().addMarker @markerRange, 'ace_bracket', 'text'
 
 
   destroy: ->
-    @ace?.removeEventListener "mousemove", @onMouseMove
+    @ace?.removeEventListener 'mousemove', @onMouseMove
     super()
diff --git a/app/views/play/level/tome/spell_list_entry_thangs_view.coffee b/app/views/play/level/tome/spell_list_entry_thangs_view.coffee
index c7a545a65..43f54f2cd 100644
--- a/app/views/play/level/tome/spell_list_entry_thangs_view.coffee
+++ b/app/views/play/level/tome/spell_list_entry_thangs_view.coffee
@@ -30,10 +30,10 @@ module.exports = class SpellListEntryThangsView extends View
       avatar.render()
       avatar.setSelected thang is @thang
       avatar.$el.data('thang-id', thang.id).click (e) ->
-        Backbone.Mediator.publish "level-select-sprite", thangID: $(@).data('thang-id'), spellName: spellName
+        Backbone.Mediator.publish 'level-select-sprite', thangID: $(@).data('thang-id'), spellName: spellName
       avatar.onProblemsUpdated spell: @spell
       @avatars.push avatar
-      
+
   destroy: ->
     avatar.destroy() for avatar in @avatars
     super()
diff --git a/app/views/play/level/tome/spell_list_entry_view.coffee b/app/views/play/level/tome/spell_list_entry_view.coffee
index 7f72cab5d..cd39559a8 100644
--- a/app/views/play/level/tome/spell_list_entry_view.coffee
+++ b/app/views/play/level/tome/spell_list_entry_view.coffee
@@ -12,7 +12,8 @@ module.exports = class SpellListEntryView extends View
   controlsEnabled: true
 
   subscriptions:
-    'tome:problems-updated': "onProblemsUpdated"
+    'tome:problems-updated': 'onProblemsUpdated'
+    'tome:spell-changed-language': 'onSpellChangedLanguage'
     'level-disable-controls': 'onDisableControls'
     'level-enable-controls': 'onEnableControls'
     'god:new-world-created': 'onNewWorld'
@@ -30,11 +31,38 @@ module.exports = class SpellListEntryView extends View
   getRenderData: (context={}) ->
     context = super context
     context.spell = @spell
-    context.parameters = (@spell.parameters or []).join ', '
-    context.thangNames = (thangID for thangID, spellThang of @spell.thangs when spellThang.thang.exists).join(', ')  # + ", Marcus, Robert, Phoebe, Will Smith, Zap Brannigan, You, Gandaaaaalf"
+    context.methodSignature = @createMethodSignature()
+    context.thangNames = (thangID for thangID, spellThang of @spell.thangs when spellThang.thang.exists).join(', ')  # + ', Marcus, Robert, Phoebe, Will Smith, Zap Brannigan, You, Gandaaaaalf'
     context.showTopDivider = @showTopDivider
     context
 
+  createMethodSignature: ->
+    parameters = (@spell.parameters or []).slice()
+    if @spell.language in ['python', 'lua']
+      parameters.unshift 'self'
+    else if @spell.language is 'io'
+      parameters.unshift '...'
+    paramString = parameters.join ', '
+    name = @spell.name
+    switch @spell.language
+      when 'io'
+        "#{name} := method(#{paramString})"
+      when 'clojure'
+        "(defn #{name} [#{paramString}] ...)"
+      when 'python'
+        "def #{name}(#{paramString}):"
+      when 'lua'
+        "function #{name}(#{paramString}) ... end"
+      when 'coffeescript'
+        if parameters.length
+          "@#{name} = (#{paramString}) ->"
+        else
+          "@#{name} = ->"
+      when 'javascript'
+        "function #{name}(#{paramString}) { ... }"
+      else
+        "#{name}(#{paramString})"
+
   getPrimarySpellThang: ->
     if @lastSelectedThang
       spellThang = _.find @spell.thangs, (spellThang) => spellThang.thang.id is @lastSelectedThang.id
@@ -42,7 +70,7 @@ module.exports = class SpellListEntryView extends View
     for thangID, spellThang of @spell.thangs
       continue unless spellThang.thang.exists
       return spellThang  # Just do the first one else
-  
+
   afterRender: ->
     super()
     return unless @options.showTopDivider  # Don't repeat Thang avatars when not changed from previous entry
@@ -60,7 +88,7 @@ module.exports = class SpellListEntryView extends View
 
   onClick: (e) ->
     spellThang = @getPrimarySpellThang()
-    Backbone.Mediator.publish "level-select-sprite", thangID: spellThang.thang.id, spellName: @spell.name
+    Backbone.Mediator.publish 'level-select-sprite', thangID: spellThang.thang.id, spellName: @spell.name
 
   onMouseEnterAvatar: (e) ->
     return unless @controlsEnabled and _.size(@spell.thangs) > 1
@@ -90,7 +118,11 @@ module.exports = class SpellListEntryView extends View
 
   onProblemsUpdated: (e) ->
     return unless e.spell is @spell
-    @$el.toggleClass "user-code-problem", e.problems.length
+    @$el.toggleClass 'user-code-problem', e.problems.length
+
+  onSpellChangedLanguage: (e) ->
+    return unless e.spell is @spell
+    @render()  # So that we can update parameters if needed
 
   onDisableControls: (e) -> @toggleControls e, false
   onEnableControls: (e) -> @toggleControls e, true
@@ -105,7 +137,7 @@ module.exports = class SpellListEntryView extends View
 
   onNewWorld: (e) ->
     @lastSelectedThang = e.world.thangMap[@lastSelectedThang.id] if @lastSelectedThang
-    
+
   destroy: ->
     @avatar?.destroy()
     super()
diff --git a/app/views/play/level/tome/spell_list_tab_entry_view.coffee b/app/views/play/level/tome/spell_list_tab_entry_view.coffee
index 51c54263a..1938cc1e4 100644
--- a/app/views/play/level/tome/spell_list_tab_entry_view.coffee
+++ b/app/views/play/level/tome/spell_list_tab_entry_view.coffee
@@ -1,18 +1,18 @@
 SpellListEntryView = require './spell_list_entry_view'
 ThangAvatarView = require 'views/play/level/thang_avatar_view'
 template = require 'templates/play/level/tome/spell_list_tab_entry'
-popoverTemplate = require 'templates/play/level/tome/spell_palette_entry_popover'
 LevelComponent = require 'models/LevelComponent'
-{downTheChain} = require 'lib/world/world_utils'
+DocFormatter = require './doc_formatter'
 
 module.exports = class SpellListTabEntryView extends SpellListEntryView
   template: template
   id: 'spell-list-tab-entry-view'
 
   subscriptions:
-    'tome:spell-loaded': "onSpellLoaded"
-    'tome:spell-changed': "onSpellChanged"
+    'tome:spell-loaded': 'onSpellLoaded'
+    'tome:spell-changed': 'onSpellChanged'
     'god:new-world-created': 'onNewWorld'
+    'tome:spell-changed-language': 'onSpellChangedLanguage'
 
   events:
     'click .spell-list-button': 'onDropdownClick'
@@ -60,43 +60,16 @@ module.exports = class SpellListTabEntryView extends SpellListEntryView
           found = true
           break
     return unless found
-    doc = _.clone doc
-    doc.owner = 'this'
-    doc.shortName = doc.shorterName = doc.title = "this.#{doc.name}();"
+    docFormatter = new DocFormatter doc: doc, thang: @thang, language: @options.language
     @$el.find('code').popover(
       animation: true
       html: true
       placement: 'bottom'
       trigger: 'hover'
-      content: @formatPopover doc
+      content: docFormatter.formatPopover()
       container: @$el.parent()
     )
 
-  formatPopover: (doc) ->
-    content = popoverTemplate doc: doc, marked: marked, argumentExamples: (arg.example or arg.default or arg.name for arg in doc.args ? [])
-    owner = @thang
-    content = content.replace /#{spriteName}/g, @thang.type ? @thang.spriteName  # Prefer type, and excluded the quotes we'd get with @formatValue
-    content.replace /\#\{(.*?)\}/g, (s, properties) => @formatValue downTheChain(owner, properties.split('.'))
-
-  formatValue: (v) ->
-    # TODO: refactor and move spell_palette_entry_view version of this somewhere else
-    # maybe think about making it common with what Aether does and the SpellDebugView, too
-    if _.isNumber v
-      if v == Math.round v
-        return v
-      return v.toFixed 2
-    if _.isString v
-      return "\"#{v}\""
-    if v?.id
-      return v.id
-    if v?.name
-      return v.name
-    if _.isArray v
-      return '[' + (@formatValue v2 for v2 in v).join(', ') + ']'
-    if _.isPlainObject v
-      return safeJSONStringify v, 2
-    v
-
   onMouseEnterAvatar: (e) ->  # Don't call super
   onMouseLeaveAvatar: (e) ->  # Don't call super
   onClick: (e) ->  # Don't call super
@@ -107,11 +80,11 @@ module.exports = class SpellListTabEntryView extends SpellListEntryView
 
   onCodeReload: ->
     return unless @controlsEnabled
-    Backbone.Mediator.publish "tome:reload-code", spell: @spell
+    Backbone.Mediator.publish 'tome:reload-code', spell: @spell
 
   onBeautifyClick: ->
     return unless @controlsEnabled
-    Backbone.Mediator.publish "spell-beautify", spell: @spell
+    Backbone.Mediator.publish 'spell-beautify', spell: @spell
 
   updateReloadButton: ->
     changed = @spell.hasChanged null, @spell.getSource()
@@ -125,6 +98,14 @@ module.exports = class SpellListTabEntryView extends SpellListEntryView
     return unless e.spell is @spell
     @updateReloadButton()
 
+  onSpellChangedLanguage: (e) ->
+    return unless e.spell is @spell
+    @options.language = e.language
+    @$el.find('code').popover 'destroy'
+    @render()
+    @docsBuilt = false
+    @buildDocs() if @thang
+
   toggleControls: (e, enabled) ->
     # Don't call super; do it differently
     return if e.controls and not ('editor' in e.controls)
diff --git a/app/views/play/level/tome/spell_list_view.coffee b/app/views/play/level/tome/spell_list_view.coffee
index d4ab72157..f18eacb9b 100644
--- a/app/views/play/level/tome/spell_list_view.coffee
+++ b/app/views/play/level/tome/spell_list_view.coffee
@@ -26,7 +26,7 @@ module.exports = class SpellListView extends View
     # Keep only spells for which we have permissions
     spells = _.filter @options.spells, (s) -> s.canRead()
     @spells = _.sortBy spells, @sortScoreForSpell
-    #console.log "Kept sorted spells", @spells
+    #console.log 'Kept sorted spells', @spells
 
   sortScoreForSpell: (s) =>
     # Sort by most spells per fewest Thangs
@@ -66,7 +66,7 @@ module.exports = class SpellListView extends View
     for entry in newEntries
       @$el.append entry.el
       entry.render()  # Render after appending so that we can access parent container for popover
-  
+
   rerenderEntries: ->
     entry.render() for entry in @entries
 
@@ -93,4 +93,4 @@ module.exports = class SpellListView extends View
 
   destroy: ->
     entry.destroy() for entry in @entries
-    super()
\ No newline at end of file
+    super()
diff --git a/app/views/play/level/tome/spell_palette_entry_view.coffee b/app/views/play/level/tome/spell_palette_entry_view.coffee
index 5a610d984..1996b1972 100644
--- a/app/views/play/level/tome/spell_palette_entry_view.coffee
+++ b/app/views/play/level/tome/spell_palette_entry_view.coffee
@@ -1,57 +1,8 @@
 View = require 'views/kinds/CocoView'
 template = require 'templates/play/level/tome/spell_palette_entry'
-popoverTemplate = require 'templates/play/level/tome/spell_palette_entry_popover'
 {me} = require 'lib/auth'
 filters = require 'lib/image_filter'
-{downTheChain} = require 'lib/world/world_utils'
-window.Vector = require 'lib/world/vector'  # So we can document it
-
-safeJSONStringify = (input, maxDepth) ->
-  recursion = (input, path, depth) ->
-    output = {}
-    pPath = undefined
-    refIdx = undefined
-    path = path or ""
-    depth = depth or 0
-    depth++
-    return "{depth over " + maxDepth + "}"  if maxDepth and depth > maxDepth
-    for p of input
-      pPath = ((if path then (path + ".") else "")) + p
-      if typeof input[p] is "function"
-        output[p] = "{function}"
-      else if typeof input[p] is "object"
-        refIdx = refs.indexOf(input[p])
-        if -1 isnt refIdx
-          output[p] = "{reference to " + refsPaths[refIdx] + "}"
-        else
-          refs.push input[p]
-          refsPaths.push pPath
-          output[p] = recursion(input[p], pPath, depth)
-      else
-        output[p] = input[p]
-    output
-  refs = []
-  refsPaths = []
-  maxDepth = maxDepth or 5
-  if typeof input is "object"
-    output = recursion(input)
-  else
-    output = input
-  JSON.stringify output, null, 1
-
-# http://stackoverflow.com/a/987376/540620
-$.fn.selectText = ->
-  el = @[0]
-  if document.body.createTextRange
-    range = document.body.createTextRange()
-    range.moveToElementText(el)
-    range.select()
-  else if window.getSelection
-    selection = window.getSelection()
-    range = document.createRange()
-    range.selectNodeContents(el)
-    selection.removeAllRanges()
-    selection.addRange(range)
+DocFormatter = require './doc_formatter'
 
 module.exports = class SpellPaletteEntryView extends View
   tagName: 'div'  # Could also try <code> instead of <div>, but would need to adjust colors
@@ -60,9 +11,9 @@ module.exports = class SpellPaletteEntryView extends View
   popoverPinned: false
 
   subscriptions:
-    'surface:frame-changed': "onFrameChanged"
-    'tome:palette-hovered': "onPaletteHovered"
-    'tome:palette-pin-toggled': "onPalettePinToggled"
+    'surface:frame-changed': 'onFrameChanged'
+    'tome:palette-hovered': 'onPaletteHovered'
+    'tome:palette-pin-toggled': 'onPalettePinToggled'
     'tome:spell-debug-property-hovered': 'onSpellDebugPropertyHovered'
 
   events:
@@ -73,25 +24,8 @@ module.exports = class SpellPaletteEntryView extends View
   constructor: (options) ->
     super options
     @thang = options.thang
-    @doc = options.doc
-    if _.isString @doc
-      @doc = name: @doc, type: typeof @thang[@doc]
-    if options.isSnippet
-      @doc.type = @doc.owner = 'snippet'
-      @doc.shortName = @doc.shorterName = @doc.title = @doc.name
-    else
-      @doc.owner ?= 'this'
-      suffix = ''
-      if @doc.type is 'function'
-        argNames = (arg.name for arg in @doc.args ? []).join(', ')
-        argNames = '...' if argNames.length > 6
-        suffix = "(#{argNames})"
-      @doc.shortName = "#{@doc.owner}.#{@doc.name}#{suffix};"
-      if @doc.owner is 'this' or options.tabbify
-        @doc.shorterName = "#{@doc.name}#{suffix}"
-      else
-        @doc.shorterName = @doc.shortName.replace ';', ''
-      @doc.title = if options.shortenize then @doc.shorterName else @doc.shortName
+    @docFormatter = new DocFormatter options
+    @doc = @docFormatter.doc
 
   getRenderData: ->
     c = super()
@@ -106,46 +40,15 @@ module.exports = class SpellPaletteEntryView extends View
       html: true
       placement: 'top'
       trigger: 'manual'  # Hover, until they click, which will then pin it until unclick.
-      content: @formatPopover()
+      content: @docFormatter.formatPopover()
       container: '#tome-view'
     )
     @$el.on 'show.bs.popover', =>
       Backbone.Mediator.publish 'tome:palette-hovered', thang: @thang, prop: @doc.name, entry: @
 
-  formatPopover: ->
-    content = popoverTemplate doc: @doc, value: @formatValue(), marked: marked, argumentExamples: (arg.example or arg.default or arg.name for arg in @doc.args ? [])
-    owner = if @doc.owner is 'this' then @thang else window[@doc.owner]
-    content = content.replace /#{spriteName}/g, @thang.type ? @thang.spriteName  # Prefer type, and excluded the quotes we'd get with @formatValue
-    content.replace /\#\{(.*?)\}/g, (s, properties) => @formatValue downTheChain(owner, properties.split('.'))
-
-  formatValue: (v) ->
-    return null if @doc.type is 'snippet'
-    return @thang.now() if @doc.name is 'now'
-    return '[Function]' if not v and @doc.type is 'function'
-    unless v?
-      if @doc.owner is 'this'
-        v = @thang[@doc.name]
-      else
-        v = window[@doc.owner][@doc.name]  # grab Math or Vector
-    if @doc.type is 'number' and not isNaN v
-      if v == Math.round v
-        return v
-      return v.toFixed 2
-    if _.isString v
-      return "\"#{v}\""
-    if v?.id
-      return v.id
-    if v?.name
-      return v.name
-    if _.isArray v
-      return '[' + (@formatValue v2 for v2 in v).join(', ') + ']'
-    if _.isPlainObject v
-      return safeJSONStringify v, 2
-    v
-
   onMouseEnter: (e) ->
     # Make sure the doc has the updated Thang so it can regenerate its prop value
-    @$el.data('bs.popover').options.content = @formatPopover()
+    @$el.data('bs.popover').options.content = @docFormatter.formatPopover()
     @$el.popover('setContent')
     @$el.popover 'show' unless @popoverPinned or @otherPopoverPinned
 
@@ -173,7 +76,7 @@ module.exports = class SpellPaletteEntryView extends View
 
   onFrameChanged: (e) ->
     return unless e.selectedThang?.id is @thang.id
-    @options.thang = @thang = e.selectedThang  # Update our thang to the current version
+    @options.thang = @thang = @docFormatter.options.thang = e.selectedThang  # Update our thang to the current version
 
   onPaletteHovered: (e) ->
     return if e.entry is @
diff --git a/app/views/play/level/tome/spell_palette_view.coffee b/app/views/play/level/tome/spell_palette_view.coffee
index e14ff1507..1924258e8 100644
--- a/app/views/play/level/tome/spell_palette_view.coffee
+++ b/app/views/play/level/tome/spell_palette_view.coffee
@@ -4,6 +4,7 @@ template = require 'templates/play/level/tome/spell_palette'
 filters = require 'lib/image_filter'
 SpellPaletteEntryView = require './spell_palette_entry_view'
 LevelComponent = require 'models/LevelComponent'
+EditorConfigModal = require '../modal/editor_config_modal'
 
 N_ROWS = 4
 
@@ -15,7 +16,11 @@ module.exports = class SpellPaletteView extends View
   subscriptions:
     'level-disable-controls': 'onDisableControls'
     'level-enable-controls': 'onEnableControls'
-    'surface:frame-changed': "onFrameChanged"
+    'surface:frame-changed': 'onFrameChanged'
+    'tome:change-language': 'onTomeChangedLanguage'
+
+  events:
+    'click .code-language-logo': 'onEditEditorConfig'
 
   constructor: (options) ->
     super options
@@ -26,6 +31,7 @@ module.exports = class SpellPaletteView extends View
     c = super()
     c.entryGroups = @entryGroups
     c.entryGroupSlugs = @entryGroupSlugs
+    c.entryGroupNames = @entryGroupNames
     c.tabbed = _.size(@entryGroups) > 1
     c.defaultGroupSlug = @defaultGroupSlug
     c
@@ -39,14 +45,18 @@ module.exports = class SpellPaletteView extends View
         for entry in entryColumn
           col.append entry.el
           entry.render()  # Render after appending so that we can access parent container for popover
-      $('.nano').nanoScroller()
+    $('.nano').nanoScroller()
+    @updateCodeLanguage @options.language
+
+  updateCodeLanguage: (language) ->
+    @options.language = language
+    @$el.find('.code-language-logo').removeClass().addClass 'code-language-logo ' + language
 
   createPalette: ->
     lcs = @supermodel.getModels LevelComponent
     allDocs = {}
     for lc in lcs
       for doc in (lc.get('propertyDocumentation') ? [])
-        doc = _.clone doc
         allDocs['__' + doc.name] ?= []
         allDocs['__' + doc.name].push doc
         if doc.type is 'snippet' then doc.owner = 'snippets'
@@ -59,6 +69,13 @@ module.exports = class SpellPaletteView extends View
         Array: 'programmableArrayProperties'
         Object: 'programmableObjectProperties'
         String: 'programmableStringProperties'
+        Global: 'programmableGlobalProperties'
+        Function: 'programmableFunctionProperties'
+        RegExp: 'programmableRegExpProperties'
+        Date: 'programmableDateProperties'
+        Number: 'programmableNumberProperties'
+        JSON: 'programmableJSONProperties'
+        LoDash: 'programmableLoDashProperties'
         Vector: 'programmableVectorProperties'
         snippets: 'programmableSnippets'
     else
@@ -66,6 +83,7 @@ module.exports = class SpellPaletteView extends View
         'this': 'apiProperties'
     count = 0
     propGroups = {}
+    console.log 'thang', @thang
     for owner, storage of propStorage
       props = _.reject @thang[storage] ? [], (prop) -> prop[0] is '_'  # no private properties
       added = propGroups[owner] = _.sortBy(props).slice()
@@ -74,6 +92,9 @@ module.exports = class SpellPaletteView extends View
     shortenize = count > 6
     tabbify = count >= 10
     @entries = []
+
+    Backbone.Mediator.publish 'tome:update-snippets', propGroups: propGroups, allDocs: allDocs, language: @options.language
+
     for owner, props of propGroups
       for prop in props
         doc = _.find (allDocs['__' + prop] ? []), (doc) ->
@@ -86,25 +107,30 @@ module.exports = class SpellPaletteView extends View
       return 'more' if entry.doc.owner is 'this' and entry.doc.name in (propGroups.more ? [])
       entry.doc.owner
     @entries = _.sortBy @entries, (entry) ->
-      order = ['this', 'more', 'Math', 'Vector', 'snippets']
+      order = ['this', 'more', 'Math', 'Vector', 'String', 'Object', 'Array', 'Function', 'snippets']
       index = order.indexOf groupForEntry entry
       index = String.fromCharCode if index is -1 then order.length else index
       index += entry.doc.name
     if tabbify and _.find @entries, ((entry) -> entry.doc.owner isnt 'this')
       @entryGroups = _.groupBy @entries, groupForEntry
     else
-      defaultGroup = $.i18n.t("play_level.tome_available_spells", defaultValue: "Available Spells")
+      defaultGroup = $.i18n.t('play_level.tome_available_spells', defaultValue: 'Available Spells')
       @entryGroups = {}
       @entryGroups[defaultGroup] = @entries
       @defaultGroupSlug = _.string.slugify defaultGroup
     @entryGroupSlugs = {}
+    @entryGroupNames = {}
     for group, entries of @entryGroups
-      @entryGroupSlugs[group] = _.string.slugify group
       @entryGroups[group] = _.groupBy entries, (entry, i) -> Math.floor i / N_ROWS
+      @entryGroupSlugs[group] = _.string.slugify group
+      @entryGroupNames[group] = group
+    if thisName = {coffeescript: '@', lua: 'self', clojure: 'self'}[@options.language]
+      if @entryGroupNames.this
+        @entryGroupNames.this = thisName
     null
 
   addEntry: (doc, shortenize, tabbify, isSnippet=false) ->
-    new SpellPaletteEntryView doc: doc, thang: @thang, shortenize: shortenize, tabbify: tabbify, isSnippet: isSnippet
+    new SpellPaletteEntryView doc: doc, thang: @thang, shortenize: shortenize, tabbify: tabbify, isSnippet: isSnippet, language: @options.language
 
   onDisableControls: (e) -> @toggleControls e, false
   onEnableControls: (e) -> @toggleControls e, true
@@ -128,6 +154,15 @@ module.exports = class SpellPaletteView extends View
     return unless e.selectedThang?.id is @thang.id
     @options.thang = @thang = e.selectedThang  # Update our thang to the current version
 
+  onTomeChangedLanguage: (e) ->
+    @updateCodeLanguage e.language
+    entry.destroy() for entry in @entries
+    @createPalette()
+    @render()
+
+  onEditEditorConfig: (e) ->
+    @openModalView new EditorConfigModal session: @options.session
+
   destroy: ->
     entry.destroy() for entry in @entries
     @toggleBackground = null
diff --git a/app/views/play/level/tome/spell_toolbar_view.coffee b/app/views/play/level/tome/spell_toolbar_view.coffee
index 2abd5460d..6ac432e17 100644
--- a/app/views/play/level/tome/spell_toolbar_view.coffee
+++ b/app/views/play/level/tome/spell_toolbar_view.coffee
@@ -24,7 +24,7 @@ module.exports = class SpellToolbarView extends View
     super()
 
   toggleFlow: (to) ->
-    @$el.find(".flow").toggle to
+    @$el.find('.flow').toggle to
 
   setStatementIndex: (statementIndex) ->
     return unless total = @callState?.statementsExecuted
@@ -55,8 +55,8 @@ module.exports = class SpellToolbarView extends View
         $metrics.find('.statements-executed-total').text " (#{@metrics.statementsExecuted})"
         titleSuffix = " (#{@metrics.statementsExecuted} statements total)"
       else
-        $metrics.find('.statements-executed-total').text ""
-        titleSuffix = ""
+        $metrics.find('.statements-executed-total').text ''
+        titleSuffix = ''
       $metrics.find('.statements-metric').show().attr('title', "Statement #{@statementIndex + 1} of #{statementsExecuted} this call#{titleSuffix}")
     else
       $metrics.find('.statements-metric').hide()
diff --git a/app/views/play/level/tome/spell_view.coffee b/app/views/play/level/tome/spell_view.coffee
index 04851959e..7c3114f59 100644
--- a/app/views/play/level/tome/spell_view.coffee
+++ b/app/views/play/level/tome/spell_view.coffee
@@ -2,10 +2,11 @@ View = require 'views/kinds/CocoView'
 template = require 'templates/play/level/tome/spell'
 {me} = require 'lib/auth'
 filters = require 'lib/image_filter'
-Range = ace.require("ace/range").Range
+Range = ace.require('ace/range').Range
 Problem = require './problem'
 SpellDebugView = require './spell_debug_view'
 SpellToolbarView = require './spell_toolbar_view'
+LevelComponent = require 'models/LevelComponent'
 
 module.exports = class SpellView extends View
   id: 'spell-view'
@@ -18,9 +19,9 @@ module.exports = class SpellView extends View
   editModes:
     'javascript': 'ace/mode/javascript'
     'coffeescript': 'ace/mode/coffee'
+    'python': 'ace/mode/python'
     'clojure': 'ace/mode/clojure'
     'lua': 'ace/mode/lua'
-    'python': 'ace/mode/python'
     'io': 'ace/mode/text'
 
   keyBindings:
@@ -41,10 +42,11 @@ module.exports = class SpellView extends View
     'tome:spell-changed': 'onSpellChanged'
     'level:session-will-save': 'onSessionWillSave'
     'modal-closed': 'focus'
-    'focus-editor': 'focus'
+    'tome:focus-editor': 'focus'
     'tome:spell-statement-index-updated': 'onStatementIndexUpdated'
     'tome:change-language': 'onChangeLanguage'
     'tome:change-config': 'onChangeEditorConfig'
+    'tome:update-snippets': 'addZatannaSnippets'
     'spell-beautify': 'onSpellBeautify'
 
   events:
@@ -81,7 +83,7 @@ module.exports = class SpellView extends View
     @aceSession.setMode @editModes[@spell.language]
     @aceSession.setWrapLimitRange null
     @aceSession.setUseWrapMode true
-    @aceSession.setNewLineMode "unix"
+    @aceSession.setNewLineMode 'unix'
     @aceSession.setUseSoftTabs true
     @ace.setTheme 'ace/theme/textmate'
     @ace.setDisplayIndentGuides aceConfig.indentGuides
@@ -93,6 +95,11 @@ module.exports = class SpellView extends View
     @toggleControls null, @writable
     @aceSession.selection.on 'changeCursor', @onCursorActivity
     $(@ace.container).find('.ace_gutter').on 'click', '.ace_error, .ace_warning, .ace_info', @onAnnotationClick
+    @zatanna = new Zatanna @ace,
+
+      liveCompletion: aceConfig.liveCompletion ? true
+      completers:
+        keywords: false
 
   createACEShortcuts: ->
     @aceCommands = aceCommands = []
@@ -165,6 +172,27 @@ module.exports = class SpellView extends View
     @ace.setValue @spell.source
     @ace.clearSelection()
 
+  addZatannaSnippets: (e) ->
+    snippetEntries = []
+    for owner, props of e.propGroups
+      for prop in props
+        doc = _.find (e.allDocs['__' + prop] ? []), (doc) ->
+          return true if doc.owner is owner
+          return (owner is 'this' or owner is 'more') and (not doc.owner? or doc.owner is 'this')
+        console.log 'could not find doc for', prop, 'from', e.allDocs['__' + prop], 'for', owner, 'of', e.propGroups unless doc
+        doc ?= prop
+        if doc.snippets?[e.language]
+          entry =
+            content: doc.snippets[e.language].code
+            name: doc.name
+            tabTrigger: doc.snippets[e.language].tab
+          snippetEntries.push entry
+
+    # window.zatanna = @zatanna
+    # window.snippetEntries = snippetEntries
+    lang = @editModes[e.language].substr 'ace/mode/'.length
+    @zatanna.addSnippets snippetEntries, lang
+
   onMultiplayerChanged: ->
     if @session.get('multiplayer')
       @createFirepad()
@@ -225,6 +253,7 @@ module.exports = class SpellView extends View
     @debugView.thang = @thang
     @toolbarView?.toggleFlow false
     @updateAether false, false
+    # @addZatannaSnippets()
     @highlightCurrentLine()
 
   cast: (preload=false) ->
@@ -272,7 +301,10 @@ module.exports = class SpellView extends View
     else
       @ace.setValue source
     @eventsSuppressed = false
-    @ace.resize true  # hack: @ace may not have updated its text properly, so we force it to refresh
+    try
+      @ace.resize true  # hack: @ace may not have updated its text properly, so we force it to refresh
+    catch error
+      console.warn 'Error resizing ACE after an update:', error
 
   # Called from CastButtonView initially and whenever the delay is changed
   setAutocastDelay: (@autocastDelay) ->
@@ -343,14 +375,14 @@ module.exports = class SpellView extends View
       @clearAetherDisplay()
       if codeHasChangedSignificantly and not codeIsAsCast
         workerMessage =
-          function: "transpile"
+          function: 'transpile'
           spellKey: @spell.spellKey
           source: source
 
-        @worker.addEventListener "message", (e) =>
+        @worker.addEventListener 'message', (e) =>
           workerData = JSON.parse e.data
-          if workerData.function is "transpile" and workerData.spellKey is @spell.spellKey
-            @worker.removeEventListener "message", arguments.callee, false
+          if workerData.function is 'transpile' and workerData.spellKey is @spell.spellKey
+            @worker.removeEventListener 'message', arguments.callee, false
             aether.problems = workerData.problems
             aether.raw = source
             finishUpdatingAether(aether)
@@ -401,7 +433,7 @@ module.exports = class SpellView extends View
     currentLine = _.string.rtrim(@aceDoc.$lines[cursorPosition.row].replace(/[ \t]*\/\/[^"']*/g, ''))  # trim // unless inside "
     endOfLine = cursorPosition.column >= currentLine.length  # just typed a semicolon or brace, for example
     beginningOfLine = not currentLine.substr(0, cursorPosition.column).trim().length  # uncommenting code, for example
-    #console.log "finished?", valid, endOfLine, beginningOfLine, cursorPosition, currentLine.length, aether, new Date() - 0, currentLine
+    #console.log 'finished?', valid, endOfLine, beginningOfLine, cursorPosition, currentLine.length, aether, new Date() - 0, currentLine
     if valid and (endOfLine or beginningOfLine)
       if @autocastDelay > 60000
         @preload()
@@ -433,7 +465,7 @@ module.exports = class SpellView extends View
     @spellHasChanged = false
 
   onUserCodeProblem: (e) ->
-    return @onInfiniteLoop e if e.problem.id is "runtime_InfiniteLoop"
+    return @onInfiniteLoop e if e.problem.id is 'runtime_InfiniteLoop'
     return unless e.problem.userInfo.methodName is @spell.name
     return unless spellThang = _.find @spell.thangs, (spellThang, thangID) -> thangID is e.problem.userInfo.thangID
     @spell.hasChangedSignificantly @getSource(), null, (hasChanged) =>
@@ -464,7 +496,7 @@ module.exports = class SpellView extends View
       aether = e.world.userCodeMap[thangID]?[@spell.name]  # Might not be there if this is a new Programmable Thang.
       spellThang.castAether = aether
       spellThang.aether = @spell.createAether thang
-    #console.log thangID, @spell.spellKey, "ran", aether.metrics.callsExecuted, "times over", aether.metrics.statementsExecuted, "statements, with max recursion depth", aether.metrics.maxDepth, "and full flow/metrics", aether.metrics, aether.flow
+    #console.log thangID, @spell.spellKey, 'ran', aether.metrics.callsExecuted, 'times over', aether.metrics.statementsExecuted, 'statements, with max recursion depth', aether.metrics.maxDepth, 'and full flow/metrics', aether.metrics, aether.flow
     @spell.transpile()
     @updateAether false, false
 
@@ -517,7 +549,7 @@ module.exports = class SpellView extends View
         executedRows[state.range[0].row] = true
     #state.executing = true if state.userInfo?.time is @thang.world.age  # no work
     currentCallIndex ?= callNumber - 1
-    #console.log "got call index", currentCallIndex, "for time", @thang.world.age, "out of", states.length
+    #console.log 'got call index', currentCallIndex, 'for time', @thang.world.age, 'out of', states.length
 
     @decoratedGutter = @decoratedGutter || {}
 
@@ -532,7 +564,7 @@ module.exports = class SpellView extends View
         @aceSession.removeGutterDecoration row, 'executing'
         @aceSession.removeGutterDecoration row, 'executed'
         @decoratedGutter[row] = ''
-    if not executed.length or (@spell.name is "plan" and @spellThang.castAether.metrics.statementsExecuted < 20)
+    if not executed.length or (@spell.name is 'plan' and @spellThang.castAether.metrics.statementsExecuted < 20)
       @toolbarView?.toggleFlow false
       @debugView.setVariableStates {}
       return
@@ -549,11 +581,11 @@ module.exports = class SpellView extends View
       if clazz is 'executed'
         continue if marked[start.row]
         marked[start.row] = true
-        markerType = "fullLine"
+        markerType = 'fullLine'
       else
         @debugView.setVariableStates state.variables
         gotVariableStates = true
-        markerType = "text"
+        markerType = 'text'
       markerRange = new Range start.row, start.col, end.row, end.col
       markerRange.start = @aceDoc.createAnchor markerRange.start
       markerRange.end = @aceDoc.createAnchor markerRange.end
@@ -594,7 +626,7 @@ module.exports = class SpellView extends View
     disabled = not enabled
     $('body').focus() if disabled and $(document.activeElement).is('.ace_text-input')
     @ace.setReadOnly disabled
-    @ace[if disabled then "setStyle" else "unsetStyle"] "disabled"
+    @ace[if disabled then 'setStyle' else 'unsetStyle'] 'disabled'
     @toggleBackground()
 
   toggleBackground: =>
@@ -617,10 +649,15 @@ module.exports = class SpellView extends View
     @ace.setDisplayIndentGuides aceConfig.indentGuides # default false
     @ace.setShowInvisibles aceConfig.invisibles # default false
     @ace.setKeyboardHandler @keyBindings[aceConfig.keyBindings ? 'default']
+    @zatanna.set 'liveCompletion', (aceConfig.liveCompletion ? false)
 
   onChangeLanguage: (e) ->
-    if @spell.canWrite()
-      @aceSession.setMode @editModes[e.language]
+    return unless @spell.canWrite()
+    @aceSession.setMode @editModes[e.language]
+    # @zatanna.set 'language', @editModes[e.language].substr('ace/mode/')
+    wasDefault = @getSource() is @spell.originalSource
+    @spell.setLanguage e.language
+    @reloadCode true if wasDefault
 
   dismiss: ->
     @spell.hasChangedSignificantly @getSource(), null, (hasChanged) =>
diff --git a/app/views/play/level/tome/thang_list_entry_view.coffee b/app/views/play/level/tome/thang_list_entry_view.coffee
index 388a5d10f..79d9bfa27 100644
--- a/app/views/play/level/tome/thang_list_entry_view.coffee
+++ b/app/views/play/level/tome/thang_list_entry_view.coffee
@@ -15,10 +15,10 @@ module.exports = class ThangListEntryView extends View
   reasonsToBeDisabled: {}
 
   subscriptions:
-    'tome:problems-updated': "onProblemsUpdated"
+    'tome:problems-updated': 'onProblemsUpdated'
     'level-disable-controls': 'onDisableControls'
     'level-enable-controls': 'onEnableControls'
-    'surface:frame-changed': "onFrameChanged"
+    'surface:frame-changed': 'onFrameChanged'
     'level-set-letterbox': 'onSetLetterbox'
     'tome:thang-list-entry-popover-shown': 'onThangListEntryPopoverShown'
     'surface:coordinates-shown': 'onSurfaceCoordinatesShown'
@@ -83,7 +83,7 @@ module.exports = class ThangListEntryView extends View
   onClick: (e) ->
     return unless @controlsEnabled
     @sortSpells()
-    Backbone.Mediator.publish "level-select-sprite", thangID: @thang.id, spellName: @spells[0]?.name
+    Backbone.Mediator.publish 'level-select-sprite', thangID: @thang.id, spellName: @spells[0]?.name
 
   onMouseEnter: (e) ->
     return unless @controlsEnabled and @spells.length
@@ -122,7 +122,7 @@ module.exports = class ThangListEntryView extends View
     @popover.mouseleave (e) => @hideSpells()
     thangID = @thang.id
     @popover.find('code').click (e) ->
-      Backbone.Mediator.publish "level-select-sprite", thangID: thangID, spellName: $(@).data 'spell-name'
+      Backbone.Mediator.publish 'level-select-sprite', thangID: thangID, spellName: $(@).data 'spell-name'
     Backbone.Mediator.publish 'tome:thang-list-entry-popover-shown', entry: @
 
   hideSpells: =>
diff --git a/app/views/play/level/tome/thang_list_view.coffee b/app/views/play/level/tome/thang_list_view.coffee
index a2271f146..a931e06e7 100644
--- a/app/views/play/level/tome/thang_list_view.coffee
+++ b/app/views/play/level/tome/thang_list_view.coffee
@@ -55,9 +55,9 @@ module.exports = class ThangListView extends View
   addThangListEntries: ->
     @entries = []
     for [thangs, section, permission] in [
-      [@readwriteThangs, "#readwrite-thangs", "readwrite"]  # Your Minions
-      [@readThangs, "#read-thangs", "read"]  # Read-Only
-      [@muggleThangs, "#muggle-thangs", null]  # Non-Castable
+      [@readwriteThangs, '#readwrite-thangs', 'readwrite']  # Your Minions
+      [@readThangs, '#read-thangs', 'read']  # Read-Only
+      [@muggleThangs, '#muggle-thangs', null]  # Non-Castable
     ]
       section = @$el.find(section).toggle thangs.length > 0
       for thang in thangs
@@ -84,4 +84,3 @@ module.exports = class ThangListView extends View
   destroy: ->
     entry.destroy() for entry in @entries
     super()
-
diff --git a/app/views/play/level/tome/tome_view.coffee b/app/views/play/level/tome/tome_view.coffee
index 1366722e8..d709797e7 100644
--- a/app/views/play/level/tome/tome_view.coffee
+++ b/app/views/play/level/tome/tome_view.coffee
@@ -45,8 +45,8 @@ module.exports = class TomeView extends View
   cache: false
 
   subscriptions:
-    'tome:spell-loaded': "onSpellLoaded"
-    'tome:cast-spell': "onCastSpell"
+    'tome:spell-loaded': 'onSpellLoaded'
+    'tome:cast-spell': 'onCastSpell'
     'tome:toggle-spell-list': 'onToggleSpellList'
     'tome:change-language': 'updateLanguageForAllSpells'
     'surface:sprite-selected': 'onSpriteSelected'
@@ -69,7 +69,7 @@ module.exports = class TomeView extends View
       @teamSpellMap = @generateTeamSpellMap(@spells)
     else
       @cast()
-      console.warn "Warning: There are no Programmable Thangs in this level, which makes it unplayable."
+      console.warn 'Warning: There are no Programmable Thangs in this level, which makes it unplayable.'
     delete @options.thangs
 
   onNewWorld: (e) ->
@@ -81,14 +81,14 @@ module.exports = class TomeView extends View
 
   onCommentMyCode: (e) ->
     for spellKey, spell of @spells when spell.canWrite()
-      console.log "Commenting out", spellKey
+      console.log 'Commenting out', spellKey
       commentedSource = 'return;  // Commented out to stop infinite loop.\n' + spell.getSource()
       spell.view.updateACEText commentedSource
       spell.view.recompile false
     @cast()
 
   createWorker: ->
-    return new Worker("/javascripts/workers/aether_worker.js")
+    return new Worker('/javascripts/workers/aether_worker.js')
 
   generateTeamSpellMap: (spellObject) ->
     teamSpellMap = {}
@@ -120,12 +120,13 @@ module.exports = class TomeView extends View
         spellKey = pathComponents.join '/'
         @thangSpells[thang.id].push spellKey
         unless method.cloneOf
-          skipProtectAPI = @getQueryVariable "skip_protect_api", (@options.levelID in ['gridmancer'])
+          skipProtectAPI = @getQueryVariable 'skip_protect_api', (@options.levelID in ['gridmancer'])
           spell = @spells[spellKey] = new Spell
             programmableMethod: method
             spellKey: spellKey
             pathComponents: pathPrefixComponents.concat(pathComponents)
             session: @options.session
+            otherSession: @options.otherSession
             supermodel: @supermodel
             skipProtectAPI: skipProtectAPI
             worker: @worker
@@ -162,7 +163,7 @@ module.exports = class TomeView extends View
     @spellList.$el.hide()
 
   onClick: (e) ->
-    Backbone.Mediator.publish 'focus-editor' unless $(e.target).parents('.popover').length
+    Backbone.Mediator.publish 'tome:focus-editor' unless $(e.target).parents('.popover').length
 
   clearSpellView: ->
     @spellView?.dismiss()
@@ -201,7 +202,7 @@ module.exports = class TomeView extends View
 
   updateSpellPalette: (thang, spell) ->
     return unless thang and @spellPaletteView?.thang isnt thang and thang.programmableProperties or thang.apiProperties
-    @spellPaletteView = @insertSubView new SpellPaletteView thang: thang, supermodel: @supermodel, programmable: spell?.canRead()
+    @spellPaletteView = @insertSubView new SpellPaletteView thang: thang, supermodel: @supermodel, programmable: spell?.canRead(), language: spell?.language ? @options.session.get('codeLanguage'), session: @options.session
     @spellPaletteView.toggleControls {}, spell.view.controlsEnabled if spell   # TODO: know when palette should have been disabled but didn't exist
 
   spellFor: (thang, spellName) ->
@@ -215,7 +216,7 @@ module.exports = class TomeView extends View
     spell
 
   reloadAllCode: ->
-    spell.view.reloadCode false for spellKey, spell of @spells when spell.team is me.team or (spell.team in ["common", "neutral", null])
+    spell.view.reloadCode false for spellKey, spell of @spells when spell.team is me.team or (spell.team in ['common', 'neutral', null])
     Backbone.Mediator.publish 'tome:cast-spells', spells: @spells, preload: false
 
   updateLanguageForAllSpells: (e) ->
diff --git a/app/views/play/level_view.coffee b/app/views/play/level_view.coffee
index 392198638..88b6955e6 100644
--- a/app/views/play/level_view.coffee
+++ b/app/views/play/level_view.coffee
@@ -1,6 +1,6 @@
 View = require 'views/kinds/RootView'
 template = require 'templates/play/level'
-{me} = require('lib/auth')
+{me} = require 'lib/auth'
 ThangType = require 'models/ThangType'
 utils = require 'lib/utils'
 
@@ -74,7 +74,7 @@ module.exports = class PlayLevelView extends View
   constructor: (options, @levelID) ->
     console.profile?() if PROFILE_ME
     super options
-    if not me.get('hourOfCode') and @getQueryVariable "hour_of_code"
+    if not me.get('hourOfCode') and @getQueryVariable 'hour_of_code'
       @setUpHourOfCode()
 
     @isEditorPreview = @getQueryVariable 'dev'
@@ -89,12 +89,12 @@ module.exports = class PlayLevelView extends View
       setTimeout f, 100
     else
       @load()
-      application.tracker?.trackEvent 'Started Level Load', level: @levelID, label: @levelID
+      application.tracker?.trackEvent 'Started Level Load', level: @levelID, label: @levelID, ['Google Analytics']
 
   setUpHourOfCode: ->
     me.set 'hourOfCode', true
-    me.save()
-    $('body').append($("<img src='http://code.org/api/hour/begin_codecombat.png' style='visibility: hidden;'>"))
+    me.patch()
+    $('body').append($('<img src="http://code.org/api/hour/begin_codecombat.png" style="visibility: hidden;">'))
     application.tracker?.trackEvent 'Hour of Code Begin', {}
 
   setLevel: (@level, givenSupermodel) ->
@@ -112,7 +112,7 @@ module.exports = class PlayLevelView extends View
   load: ->
     @loadStartTime = new Date()
     @god = new God debugWorker: true
-    @levelLoader = new LevelLoader supermodel: @supermodel, levelID: @levelID, sessionID: @sessionID, opponentSessionID: @getQueryVariable('opponent'), team: @getQueryVariable("team")
+    @levelLoader = new LevelLoader supermodel: @supermodel, levelID: @levelID, sessionID: @sessionID, opponentSessionID: @getQueryVariable('opponent'), team: @getQueryVariable('team')
     @listenToOnce @levelLoader, 'world-necessities-loaded', @onWorldNecessitiesLoaded
 
   # CocoView overridden methods ###############################################
@@ -166,7 +166,7 @@ module.exports = class PlayLevelView extends View
   onWorldNecessitiesLoaded: ->
     # Called when we have enough to build the world, but not everything is loaded
     @grabLevelLoaderData()
-    team = @getQueryVariable("team") ? @world.teamForPlayer(0)
+    team = @getQueryVariable('team') ? @world.teamForPlayer(0)
     @loadOpponentTeam(team)
     @setupGod()
     @setTeam team
@@ -191,7 +191,7 @@ module.exports = class PlayLevelView extends View
       continue if spellTeam is myTeam or not myTeam
       opponentSpells = opponentSpells.concat spells
     if (not @session.get('teamSpells')) and @otherSession?.get('teamSpells')
-      @session.set('teamSpells',@otherSession.get('teamSpells'))
+      @session.set('teamSpells', @otherSession.get('teamSpells'))
     opponentCode = @otherSession?.get('transpiledCode') or {}
     myCode = @session.get('code') or {}
     for spell in opponentSpells
@@ -221,7 +221,7 @@ module.exports = class PlayLevelView extends View
     @god.setGoalManager @goalManager
 
   insertSubviews: ->
-    @insertSubView @tome = new TomeView levelID: @levelID, session: @session, thangs: @world.thangs, supermodel: @supermodel
+    @insertSubView @tome = new TomeView levelID: @levelID, session: @session, otherSession: @otherSession, thangs: @world.thangs, supermodel: @supermodel
     @insertSubView new PlaybackView session: @session
     @insertSubView new GoalsView {}
     @insertSubView new GoldView {}
@@ -237,7 +237,7 @@ module.exports = class PlayLevelView extends View
     Backbone.Mediator.publish 'level-set-volume', volume: volume
 
   initScriptManager: ->
-    @scriptManager = new ScriptManager({scripts: @world.scripts or [], view:@, session: @session})
+    @scriptManager = new ScriptManager({scripts: @world.scripts or [], view: @, session: @session})
     @scriptManager.loadFromSession()
 
   register: ->
@@ -267,9 +267,9 @@ module.exports = class PlayLevelView extends View
     surfaceCanvas = $('canvas#surface', @$el)
     @surface = new Surface(@world, surfaceCanvas, thangTypes: @supermodel.getModels(ThangType), playJingle: not @isEditorPreview)
     worldBounds = @world.getBounds()
-    bounds = [{x:worldBounds.left, y:worldBounds.top}, {x:worldBounds.right, y:worldBounds.bottom}]
+    bounds = [{x: worldBounds.left, y: worldBounds.top}, {x: worldBounds.right, y: worldBounds.bottom}]
     @surface.camera.setBounds(bounds)
-    @surface.camera.zoomTo({x:0, y:0}, 0.1, 0)
+    @surface.camera.zoomTo({x: 0, y: 0}, 0.1, 0)
 
   # Once Surface is Loaded ####################################################
 
@@ -291,7 +291,7 @@ module.exports = class PlayLevelView extends View
       @loadEndTime = new Date()
       loadDuration = @loadEndTime - @loadStartTime
       console.debug "Level unveiled after #{(loadDuration / 1000).toFixed(2)}s"
-      application.tracker?.trackEvent 'Finished Level Load', level: @levelID, label: @levelID, loadDuration: loadDuration
+      application.tracker?.trackEvent 'Finished Level Load', level: @levelID, label: @levelID, loadDuration: loadDuration, ['Google Analytics']
       application.tracker?.trackTiming loadDuration, 'Level Load Time', @levelID, @levelID
 
   onSurfaceSetUpNewWorld: ->
@@ -370,7 +370,7 @@ module.exports = class PlayLevelView extends View
     Backbone.Mediator.publish 'router:navigate', {
       route: nextLevelURL,
       viewClass: PlayLevelView,
-      viewArgs: [{supermodel:@supermodel}, nextLevelID]}
+      viewArgs: [{supermodel: @supermodel}, nextLevelID]}
 
   getNextLevel: ->
     return null unless nextLevelOriginal = @level.get('nextLevel')?.original
@@ -439,7 +439,6 @@ module.exports = class PlayLevelView extends View
       @pointerInterval = setInterval(@animatePointer, 1200)
     , 1)
 
-
   animatePointer: =>
     pointer = $('#pointer')
     pointer.css('transition', 'all 0.6s ease-out')
diff --git a/app/views/play/spectate_view.coffee b/app/views/play/spectate_view.coffee
index 76e5430ca..340978693 100644
--- a/app/views/play/spectate_view.coffee
+++ b/app/views/play/spectate_view.coffee
@@ -1,6 +1,6 @@
 View = require 'views/kinds/RootView'
 template = require 'templates/play/spectate'
-{me} = require('lib/auth')
+{me} = require 'lib/auth'
 ThangType = require 'models/ThangType'
 utils = require 'lib/utils'
 
@@ -104,7 +104,7 @@ module.exports = class SpectateLevelView extends View
       sessionID: @sessionOne
       opponentSessionID: @sessionTwo
       spectateMode: true
-      team: @getQueryVariable("team")
+      team: @getQueryVariable('team')
     @listenToOnce(@levelLoader, 'loaded-all', @onLevelLoaderLoaded)
     @god = new God maxAngels: 1
 
@@ -203,7 +203,7 @@ module.exports = class SpectateLevelView extends View
       c = opponentCode[thang]?[spell]
       myCode[thang] ?= {}
       if c then myCode[thang][spell] = c else delete myCode[thang][spell]
-    
+
     @session.set('code', myCode)
     if @session.get('multiplayer') and @otherSession?
       # For now, ladderGame will disallow multiplayer, because session code combining doesn't play nice yet.
@@ -227,7 +227,7 @@ module.exports = class SpectateLevelView extends View
     @modelsLoaded ?= 0
     canvas = @$el.find('#surface')[0]
     ctx = canvas.getContext('2d')
-    ctx.font="20px Georgia"
+    ctx.font='20px Georgia'
     ctx.clearRect(0, 0, canvas.width, canvas.height)
     ctx.fillText("Loaded #{@modelsLoaded} thingies",50,50)
 
@@ -349,7 +349,6 @@ module.exports = class SpectateLevelView extends View
       @pointerInterval = setInterval(@animatePointer, 1200)
     ), 1)
 
-
   animatePointer: ->
     pointer = $('#pointer')
     pointer.css('transition', 'all 0.6s ease-out')
@@ -394,9 +393,9 @@ module.exports = class SpectateLevelView extends View
   initScriptManager: ->
     if @world.scripts
       nonVictoryPlaybackScripts = _.reject @world.scripts, (script) ->
-        script.id.indexOf("Set Camera Boundaries and Goals") == -1
+        script.id.indexOf('Set Camera Boundaries and Goals') == -1
     else
-      console.log "World scripts don't exist!"
+      console.log 'World scripts don\'t exist!'
       nonVictoryPlaybackScripts = []
     console.log nonVictoryPlaybackScripts
     @scriptManager = new ScriptManager({scripts: nonVictoryPlaybackScripts, view:@, session: @session})
@@ -418,7 +417,7 @@ module.exports = class SpectateLevelView extends View
 
   onSessionWillSave: (e) ->
     # Something interesting has happened, so (at a lower frequency), we'll save a screenshot.
-    console.log "Session is saving but shouldn't save!!!!!!!"
+    console.log 'Session is saving but shouldn\'t save!!!!!!!'
 
   # Throttled
   saveScreenshot: (session) =>
@@ -443,7 +442,7 @@ module.exports = class SpectateLevelView extends View
       AudioPlayer.preloadSoundReference sound
 
   onNextGamePressed: (e) ->
-    console.log "You want to see the next game!"
+    console.log 'You want to see the next game!'
     @fetchRandomSessionPair (err, data) =>
       if err? then return console.log "There was an error fetching the random session pair: #{data}"
       @sessionOne = data[0]._id
@@ -457,19 +456,20 @@ module.exports = class SpectateLevelView extends View
             spectateSessions: {sessionOne: @sessionOne, sessionTwo: @sessionTwo}
             supermodel: @supermodel
           }
-          @levelID ]
-        }
-      history?.pushState? {}, "", url  # Backbone won't update the URL if just query parameters change
+          @levelID
+        ]
+      }
+      history?.pushState? {}, '', url  # Backbone won't update the URL if just query parameters change
 
   fetchRandomSessionPair: (cb) ->
-    console.log "Fetching random session pair!"
+    console.log 'Fetching random session pair!'
     randomSessionPairURL = "/db/level/#{@levelID}/random_session_pair"
     $.ajax
       url: randomSessionPairURL
-      type: "GET"
+      type: 'GET'
       complete: (jqxhr, textStatus) ->
-        if textStatus isnt "success"
-          cb("error", jqxhr.statusText)
+        if textStatus isnt 'success'
+          cb('error', jqxhr.statusText)
         else
           cb(null, $.parseJSON(jqxhr.responseText))
 
diff --git a/app/views/play_view.coffee b/app/views/play_view.coffee
index 8662ecef4..4db520f00 100644
--- a/app/views/play_view.coffee
+++ b/app/views/play_view.coffee
@@ -12,7 +12,7 @@ class LevelSessionsCollection extends CocoCollection
     @url = "/db/user/#{me.id}/level.sessions?project=state.complete,levelID"
 
 module.exports = class PlayView extends View
-  id: "play-view"
+  id: 'play-view'
   template: template
 
   constructor: (options) ->
@@ -37,70 +37,70 @@ module.exports = class PlayView extends View
         difficulty: 1
         id: 'rescue-mission'
         image: '/file/db/level/52740644904ac0411700067c/rescue_mission_icon.png'
-        description: "Tharin has been captured!"
+        description: 'Tharin has been captured!'
       }
       {
         name: 'Grab the Mushroom'
         difficulty: 1
         id: 'grab-the-mushroom'
         image: '/file/db/level/529662dfe0df8f0000000007/grab_the_mushroom_icon.png'
-        description: "Grab a powerup and smash a big ogre."
+        description: 'Grab a powerup and smash a big ogre.'
       }
       {
         name: 'Drink Me'
         difficulty: 1
         id: 'drink-me'
         image: '/file/db/level/525dc5589a0765e496000006/drink_me_icon.png'
-        description: "Drink up and slay two munchkins."
+        description: 'Drink up and slay two munchkins.'
       }
       {
         name: 'Taunt the Guards'
         difficulty: 1
         id: 'taunt-the-guards'
         image: '/file/db/level/5276c9bdcf83207a2801ff8f/taunt_icon.png'
-        description: "Tharin, if clever, can escape with Phoebe."
+        description: 'Tharin, if clever, can escape with Phoebe.'
       }
       {
-        name: "It's a Trap"
+        name: 'It\'s a Trap'
         difficulty: 1
         id: 'its-a-trap'
         image: '/file/db/level/528aea2d7f37fc4e0700016b/its_a_trap_icon.png'
-        description: "Organize a dungeon ambush with archers."
+        description: 'Organize a dungeon ambush with archers.'
       }
       {
         name: 'Break the Prison'
         difficulty: 1
         id: 'break-the-prison'
         image: '/file/db/level/5275272c69abdcb12401216e/break_the_prison_icon.png'
-        description: "More comrades are imprisoned!"
+        description: 'More comrades are imprisoned!'
       }
       {
         name: 'Taunt'
         difficulty: 1
         id: 'taunt'
         image: '/file/db/level/525f150306e1ab0962000018/taunt_icon.png'
-        description: "Taunt the ogre to claim victory."
+        description: 'Taunt the ogre to claim victory.'
       }
       {
         name: 'Cowardly Taunt'
         difficulty: 1
         id: 'cowardly-taunt'
         image: '/file/db/level/525abfd9b12777d78e000009/cowardly_taunt_icon.png'
-        description: "Lure infuriated ogres to their doom."
+        description: 'Lure infuriated ogres to their doom.'
       }
       {
         name: 'Commanding Followers'
         difficulty: 1
         id: 'commanding-followers'
         image: '/file/db/level/525ef8ef06e1ab0962000003/commanding_followers_icon.png'
-        description: "Lead allied soldiers into battle."
+        description: 'Lead allied soldiers into battle.'
       }
       {
         name: 'Mobile Artillery'
         difficulty: 1
         id: 'mobile-artillery'
         image: '/file/db/level/525085419851b83f4b000001/mobile_artillery_icon.png'
-        description: "Blow ogres up!"
+        description: 'Blow ogres up!'
       }
     ]
 
@@ -110,35 +110,35 @@ module.exports = class PlayView extends View
         difficulty: 2
         id: 'hunter-triplets'
         image: '/file/db/level/526711d9add4f8965f000002/hunter_triplets_icon.png'
-        description: "Three soldiers go ogre hunting."
+        description: 'Three soldiers go ogre hunting.'
       }
       {
         name: 'Emphasis on Aim'
         difficulty: 2
         id: 'emphasis-on-aim'
         image: '/file/db/level/525f384d96cd77000000000f/munchkin_masher_icon.png'
-        description: "Chose your targets carefully."
+        description: 'Chose your targets carefully.'
       }
       {
         name: 'Zone of Danger'
         difficulty: 3
         id: 'zone-of-danger'
         image: '/file/db/level/526ae95c1e5cd30000000008/zone_of_danger_icon.png'
-        description: "Target the ogres swarming into arrow range."
+        description: 'Target the ogres swarming into arrow range.'
       }
       {
         name: 'Molotov Medic'
         difficulty: 2
         id: 'molotov-medic'
         image: '/file/db/level/52602ecb026e8481e7000001/generic_1.png'
-        description: "Tharin must play support in this dungeon battle."
+        description: 'Tharin must play support in this dungeon battle.'
       }
       {
         name: 'Gridmancer'
         difficulty: 5
         id: 'gridmancer'
         image: '/file/db/level/52ae2460ef42c52f13000008/gridmancer_icon.png'
-        description: "Super algorithm challenge level!"
+        description: 'Super algorithm challenge level!'
       }
     ]
 
@@ -148,7 +148,7 @@ module.exports = class PlayView extends View
         difficulty: 4
         id: 'greed'
         image: '/file/db/level/526fd3043c637ece50001bb2/the_herd_icon.png'
-        description: "Liked Dungeon Arena and Gold Rush? Put them together in this economic arena!"
+        description: 'Liked Dungeon Arena and Gold Rush? Put them together in this economic arena!'
         levelPath: 'ladder'
       }
       {
@@ -156,7 +156,7 @@ module.exports = class PlayView extends View
         difficulty: 3
         id: 'dungeon-arena'
         image: '/file/db/level/526ae95c1e5cd30000000008/zone_of_danger_icon.png'
-        description: "Play head-to-head against fellow Wizards in a dungeon melee!"
+        description: 'Play head-to-head against fellow Wizards in a dungeon melee!'
         levelPath: 'ladder'
       }
       {
@@ -164,7 +164,7 @@ module.exports = class PlayView extends View
         difficulty: 3
         id: 'gold-rush'
         image: '/file/db/level/52602ecb026e8481e7000001/generic_1.png'
-        description: "Prove you are better at collecting gold than your opponent!"
+        description: 'Prove you are better at collecting gold than your opponent!'
         levelPath: 'ladder'
       }
       {
@@ -172,7 +172,7 @@ module.exports = class PlayView extends View
         difficulty: 4
         id: 'brawlwood'
         image: '/file/db/level/525ef8ef06e1ab0962000003/commanding_followers_icon.png'
-        description: "Combat the armies of other Wizards in a strategic forest arena! (Fast computer required.)"
+        description: 'Combat the armies of other Wizards in a strategic forest arena! (Fast computer required.)'
         levelPath: 'ladder'
       }
     ]
@@ -183,14 +183,14 @@ module.exports = class PlayView extends View
         difficulty: 2
         id: 'extra-extrapolation'
         image: '/file/db/level/526bda3fe79aefde2a003e36/mobile_artillery_icon.png'
-        description: "Predict your target's position for deadly aim. - by Sootn"
+        description: 'Predict your target\'s position for deadly aim. - by Sootn'
       }
       {
         name: 'The Right Route'
         difficulty: 1
         id: 'the-right-route'
         image: '/file/db/level/526fd3043c637ece50001bb2/the_herd_icon.png'
-        description: "Strike at the weak point in an array of enemies. - by Aftermath"
+        description: 'Strike at the weak point in an array of enemies. - by Aftermath'
       }
       {
         name: 'Sword Loop'
@@ -211,45 +211,50 @@ module.exports = class PlayView extends View
         difficulty: 3
         id: 'bubble-sort-bootcamp-battle'
         image: '/file/db/level/525ef8ef06e1ab0962000003/commanding_followers_icon.png'
-        description: "Write a bubble sort to organize your soldiers. - by Alexandru"
+        description: 'Write a bubble sort to organize your soldiers. - by Alexandru Caciulescu'
       }
       {
         name: 'Ogres of Hanoi'
         difficulty: 3
         id: 'ogres-of-hanoi'
         image: '/file/db/level/526fd3043c637ece50001bb2/the_herd_icon.png'
-        description: "Transfer a stack of ogres while preserving their honor. - by Alexandru"
+        description: 'Transfer a stack of ogres while preserving their honor. - by Alexandru Caciulescu'
+      }
+      {
+        name: 'Danger! Minefield'
+        difficulty: 3
+        id: 'danger-minefield'
+        image: '/file/db/level/526bda3fe79aefde2a003e36/mobile_artillery_icon.png'
+        description: 'Learn how to find prime numbers while defusing mines! - by Alexandru Caciulescu'
+      }
+      {
+        name: 'K-means++ Cluster Wars'
+        difficulty: 4
+        id: 'k-means-cluster-wars'
+        image: '/file/db/level/525ef8ef06e1ab0962000003/commanding_followers_icon.png'
+        description: 'Learn cluster analysis while leading armies into battle! - by Alexandru Caciulescu'
       }
       {
         name: 'Find the Spy'
         difficulty: 2
         id: 'find-the-spy'
         image: '/file/db/level/526ae95c1e5cd30000000008/zone_of_danger_icon.png'
-        description: "Identify the spies hidden among your soldiers - by Nathan Gossett"
+        description: 'Identify the spies hidden among your soldiers - by Nathan Gossett'
       }
       {
         name: 'Harvest Time'
         difficulty: 2
         id: 'harvest-time'
         image: '/file/db/level/529662dfe0df8f0000000007/grab_the_mushroom_icon.png'
-        description: "Collect a hundred mushrooms in just five lines of code - by Nathan Gossett"
+        description: 'Collect a hundred mushrooms in just five lines of code - by Nathan Gossett'
       }
-
-      #{
-      #  name: 'Enemy Artillery'
-      #  difficulty: 1
-      #  id: 'enemy-artillery'
-      #  image: '/file/db/level/526dba94a188322044000a40/mobile_artillery_icon.png'
-      #  description: "Take cover while shells fly, then strike! - by mcdavid1991"
-      #  disabled: true
-      #}
     ]
 
     context.campaigns = [
-      {id: "beginner", name: "Beginner Campaign", description: "... in which you learn the wizardry of programming.", levels: tutorials}
-      {id: "multiplayer", name: "Multiplayer Arenas", description: "... in which you code head-to-head against other players.", levels: arenas}
-      {id: "dev", name: "Random Harder Levels", description: "... in which you learn the interface while doing something a little harder.", levels: experienced}
-      {id: "player_created", name: "Player-Created", description: "... in which you battle against the creativity of your fellow <a href=\"/contribute#artisan\">Artisan Wizards</a>.", levels: playerCreated}
+      {id: 'beginner', name: 'Beginner Campaign', description: '... in which you learn the wizardry of programming.', levels: tutorials}
+      {id: 'multiplayer', name: 'Multiplayer Arenas', description: '... in which you code head-to-head against other players.', levels: arenas}
+      {id: 'dev', name: 'Random Harder Levels', description: '... in which you learn the interface while doing something a little harder.', levels: experienced}
+      {id: 'player_created', name: 'Player-Created', description: '... in which you battle against the creativity of your fellow <a href=\"/contribute#artisan\">Artisan Wizards</a>.', levels: playerCreated}
     ]
     context.levelStatusMap = @levelStatusMap
     context
diff --git a/app/views/sprite_parser_test_view.coffee b/app/views/sprite_parser_test_view.coffee
index a4fb5fbf1..ece70743e 100644
--- a/app/views/sprite_parser_test_view.coffee
+++ b/app/views/sprite_parser_test_view.coffee
@@ -6,7 +6,7 @@ samples = require 'lib/sprites/parser_samples_artillery'
 ThangType = require 'models/ThangType'
 
 module.exports = class SpriteParserTestView extends View
-  id: "sprite-parser-test-view"
+  id: 'sprite-parser-test-view'
   template: template
 
   afterRender: ->
@@ -17,6 +17,6 @@ module.exports = class SpriteParserTestView extends View
     for sample in _.shuffle samples
       parser = new SpriteParser(thangType)
       parser.parse(sample)
-    console.log "thang type is now", thangType
+    console.log 'thang type is now', thangType
     console.log JSON.stringify(thangType).length
-#    console.log JSON.stringify(thangType.attributes.raw.animations.tharin_defend.tweens)
\ No newline at end of file
+#    console.log JSON.stringify(thangType.attributes.raw.animations.tharin_defend.tweens)
diff --git a/app/views/teachers_view.coffee b/app/views/teachers_view.coffee
index b3fbc77ba..783f1391e 100644
--- a/app/views/teachers_view.coffee
+++ b/app/views/teachers_view.coffee
@@ -2,5 +2,5 @@ View = require 'views/kinds/RootView'
 template = require 'templates/teachers'
 
 module.exports = class TeachersView extends View
-  id: "teachers-view"
+  id: 'teachers-view'
   template: template
diff --git a/bin/coco-mongodb b/bin/coco-mongodb
index 55b60e90e..df6e3b7ad 100755
--- a/bin/coco-mongodb
+++ b/bin/coco-mongodb
@@ -88,5 +88,8 @@ mongo_db_path = os.path.abspath(os.path.join(current_directory,os.pardir)) + os.
 if not os.path.exists(mongo_db_path):
     os.mkdir(mongo_db_path)
 mongo_arguments = [mongo_executable + u" --setParameter textSearchEnabled=true --dbpath=" + mongo_db_path]
+
+if 'fork' in sys.argv: mongo_arguments[0] += " --fork --logpath ./mongodb.log"
+
 call(mongo_arguments,shell=True)
 
diff --git a/bower.json b/bower.json
index 13a3aa7fc..beb943ad0 100644
--- a/bower.json
+++ b/bower.json
@@ -40,10 +40,11 @@
     "jsondiffpatch": "~0.1.5",
     "nanoscroller": "~0.8.0",
     "jquery.tablesorter": "~2.15.13",
-    "treema": "~0.0.8",
+    "treema": "~0.0.9",
     "bootstrap": "~3.1.1",
     "validated-backbone-mediator": "~0.1.3",
-    "jquery.browser": "~0.0.6"
+    "jquery.browser": "~0.0.6",
+    "zatanna": "~0.0.2"
   },
   "overrides": {
     "backbone": {
diff --git a/config.coffee b/config.coffee
index 55b9888b4..940a8e688 100644
--- a/config.coffee
+++ b/config.coffee
@@ -3,15 +3,11 @@ startsWith = (string, substring) ->
   string.lastIndexOf(substring, 0) is 0
 
 exports.config =
-  server:
-    path: 'server.coffee'
   paths:
     'public': 'public'
   conventions:
     ignored: (path) -> startsWith(sysPath.basename(path), '_')
-  workers:
-    enabled: false  # turned out to be much, much slower than without workers
-  sourceMaps: true
+  sourceMaps: false
   files:
     javascripts:
       defaultExtension: 'coffee'
@@ -22,6 +18,7 @@ exports.config =
           |(app[\/\\]lib[\/\\]utils.coffee)
           |(vendor[\/\\]scripts[\/\\]Box2dWeb-2.1.a.3)
           |(vendor[\/\\]scripts[\/\\]string_score.js)
+          |(bower_components[\/\\]underscore.string)
         )///
         'javascripts/app.js': /^app/
         'javascripts/vendor.js': ///^(
@@ -38,8 +35,9 @@ exports.config =
         'javascripts/aether.js': ///^(
           (bower_components[\/\\]aether[\/\\]build[\/\\]aether.js)
         )///
-#        'test/javascripts/test.js': /^test[\/\\](?!vendor)/
-#        'test/javascripts/test-vendor.js': /^test[\/\\](?=vendor)/
+        'javascripts/test-app.js': /^test[\/\\]app/
+        'javascripts/demo-app.js': /^test[\/\\]demo/
+
       order:
         before: [
           'bower_components/jquery/dist/jquery.js'
@@ -55,7 +53,6 @@ exports.config =
           'vendor/scripts/movieclip-NEXT.min.js'
           # Validated Backbone Mediator dependencies
           'bower_components/tv4/tv4.js'
-
           # Aether before box2d for some strange Object.defineProperty thing
           'bower_components/aether/build/aether.js'
           'bower_components/d3/d3.min.js'
@@ -76,18 +73,29 @@ exports.config =
   framework: 'backbone'
 
   plugins:
+    autoReload:
+      delay: 300
     coffeelint:
       pattern: /^app\/.*\.coffee$/
       options:
         line_endings:
-          value: "unix"
-          level: "error"
+          value: 'unix'
+          level: 'error'
         max_line_length:
-          level: "ignore"
+          level: 'ignore'
         no_trailing_whitespace:
-          level: "ignore"  # PyCharm can't just autostrip for .coffee, needed for .jade
+          level: 'ignore'  # PyCharm can't just autostrip for .coffee, needed for .jade
         no_unnecessary_fat_arrows:
-          level: "ignore"
+          level: 'ignore'
     uglify:
       output:
         semicolons: false
+
+  onCompile: (files) ->
+    exec = require('child_process').exec
+    regexFrom = '\\/\\/# sourceMappingURL=([^\\/].*)\\.map'
+    regexTo = '\\/\\/# sourceMappingURL=\\/javascripts\\/$1\\.map'
+    regex = "s/#{regexFrom}/#{regexTo}/g"
+    for file in files
+      c = "perl -pi -e '#{regex}' #{file.path}"
+      exec c
diff --git a/headless_client.coffee b/headless_client.coffee
index d48d97f8c..04fdc109a 100644
--- a/headless_client.coffee
+++ b/headless_client.coffee
@@ -2,12 +2,12 @@
 This file will simulate games on node.js by emulating the browser environment.
 ###
 simulateOneGame = false
-if process.argv[2] is "one-game"
+if process.argv[2] is 'one-game'
   #calculate result of one game here
   simulateOneGame = true
   console.log "Simulating #{process.argv[3]} vs #{process.argv[4]}"
-bowerComponentsPath = "./bower_components/"
-headlessClientPath = "./headless_client/"
+bowerComponentsPath = './bower_components/'
+headlessClientPath = './headless_client/'
 
 # SETTINGS
 options =
@@ -19,9 +19,10 @@ options =
   exitOnLeak: false # Exit if leak is found. Only useful if leaktest is set to true, obviously.
   heapdump: false # Dumps the whole heap after every pass. The heap dumps can then be viewed in Chrome browser.
   headlessClient: true
+  simulateOnlyOneGame: simulateOneGame
 
 options.heapdump = require('heapdump') if options.heapdump
-server = if options.testing then "http://127.0.0.1:3000" else "https://codecombat.com"
+server = if options.testing then 'http://127.0.0.1:3000' else 'https://codecombat.com'
 
 # Disabled modules
 disable = [
@@ -34,7 +35,7 @@ disable = [
 
 # Global emulated stuff
 GLOBAL.window = GLOBAL
-GLOBAL.document = location: pathname: "headless_client"
+GLOBAL.document = location: pathname: 'headless_client'
 GLOBAL.console.debug = console.log
 GLOBAL.Worker = require('webworker-threads').Worker
 Worker::removeEventListener = (what) ->
@@ -64,7 +65,7 @@ hookedLoader = (request, parent, isMain) ->
     request = path + '/app/' + request
   else if request is 'underscore'
     request = 'lodash'
-  console.log "loading " + request if options.debug
+  console.log 'loading ' + request if options.debug
   originalLoader request, parent, isMain
 unhook = () ->
   m._load = originalLoader
@@ -97,14 +98,14 @@ login = require './login.coffee' #should contain an object containing they keys
 #Login user and start the code.
 $.ajax
   url: '/auth/login'
-  type: "POST"
+  type: 'POST'
   data: login
   parse: true
-  error: (error) -> "Bad Error. Can't connect to server or something. " + error
+  error: (error) -> 'Bad Error. Can\'t connect to server or something. ' + error
   success: (response, textStatus, jqXHR) ->
-    console.log "User: ", response if options.debug
+    console.log 'User: ', response if options.debug
     unless jqXHR.status is 200
-      console.log "User not authenticated. Status code: ", jqXHR.status
+      console.log 'User not authenticated. Status code: ', jqXHR.status
       return
     GLOBAL.window.userObject = response # JSON.parse response
     Simulator = require 'lib/simulator/Simulator'
diff --git a/headless_client/jQlone.coffee b/headless_client/jQlone.coffee
index a5abf26dd..12f806bf1 100644
--- a/headless_client/jQlone.coffee
+++ b/headless_client/jQlone.coffee
@@ -2,14 +2,14 @@
 #Leaves out all the dome stuff but allows ajax.
 _ = require 'lodash'
 request = require 'request'
-Deferred = require "JQDeferred"
+Deferred = require 'JQDeferred'
 module.exports = $ = (input) ->
   console.log 'Ignored jQuery: ', input if $._debug
   append: (input)-> exports: ()->
 
 # Non-standard jQuery stuff. Don't use outside of server.
 $._debug = false
-$._server = "https://codecombat.com"
+$._server = 'https://codecombat.com'
 $._cookies = request.jar()
 
 $.when = Deferred.when
@@ -21,8 +21,8 @@ $.ajax = (options) ->
     url = $._server + url
 
   data = options.data
-  console.log "Requesting: " + JSON.stringify options if $._debug
-  console.log "URL: " + url if $._debug
+  console.log 'Requesting: ' + JSON.stringify options if $._debug
+  console.log 'URL: ' + url if $._debug
   deferred = Deferred()
   request
     url: url
@@ -31,9 +31,9 @@ $.ajax = (options) ->
     method: options.type
     body: data
     , (error, response, body) ->
-      console.log "HTTP Request:" + JSON.stringify options if $._debug and not error
+      console.log 'HTTP Request:' + JSON.stringify options if $._debug and not error
       if responded
-        console.log "\t↳Already returned before." if $._debug
+        console.log '\t↳Already returned before.' if $._debug
         return
       if (error)
         console.warn "\t↳Returned: error: #{error}"
diff --git a/headless_client/worker_world.coffee b/headless_client/worker_world.coffee
index e40317bfe..c683c4f1d 100644
--- a/headless_client/worker_world.coffee
+++ b/headless_client/worker_world.coffee
@@ -17,8 +17,8 @@ betterConsole = () ->
   self.console = log: ->
     if self.logsLogged++ is self.logLimit
       self.postMessage
-        type: "console-log"
-        args: ["Log limit " + self.logLimit + " reached; shutting up."]
+        type: 'console-log'
+        args: ['Log limit ' + self.logLimit + ' reached; shutting up.']
         id: self.workerID
 
     else if self.logsLogged < self.logLimit
@@ -26,19 +26,19 @@ betterConsole = () ->
       i = 0
 
       while i < args.length
-        args[i] = args[i].toString()  if args[i].constructor.className is "Thang" or args[i].isComponent  if args[i] and args[i].constructor
+        args[i] = args[i].toString() if args[i].constructor.className is 'Thang' or args[i].isComponent if args[i] and args[i].constructor
         ++i
       try
         self.postMessage
-          type: "console-log"
+          type: 'console-log'
           args: args
           id: self.workerID
 
       catch error
         self.postMessage
-          type: "console-log"
+          type: 'console-log'
           args: [
-              "Could not post log: " + args
+              'Could not post log: ' + args
               error.toString()
               error.stack
               error.stackTrace
@@ -50,9 +50,8 @@ betterConsole = () ->
   GLOBAL.console = console = self.console
   self.console
 
-
 work = () ->
-  console.log "starting..."
+  console.log 'starting...'
 
   console.log = ->
 
@@ -70,7 +69,7 @@ work = () ->
     self.logsLogged = 0
 
   self.runWorld = (args) ->
-    console.log "Running world inside worker."
+    console.log 'Running world inside worker.'
     self.postedErrors = {}
     self.t0 = new Date()
     self.postedErrors = false
@@ -79,7 +78,7 @@ work = () ->
     try
       self.world = new World(args.userCodeMap)
       self.world.levelSessionIDs = args.levelSessionIDs
-      self.world.loadFromLevel args.level, true  if args.level
+      self.world.loadFromLevel args.level, true if args.level
       self.world.headless = args.headless
       self.goalManager = new GoalManager(self.world)
       self.goalManager.setGoals args.goals
@@ -87,22 +86,21 @@ work = () ->
       self.goalManager.worldGenerationWillBegin()
       self.world.setGoalManager self.goalManager
     catch error
-      console.log "There has been an error inside the worker."
+      console.log 'There has been an error inside the worker.'
       self.onWorldError error
       return
     Math.random = self.world.rand.randf # so user code is predictable
-    console.log "Loading frames."
-
-    self.postMessage type: "start-load-frames"
+    Aether.replaceBuiltin('Math', Math)
+    console.log 'Loading frames.'
 
+    self.postMessage type: 'start-load-frames'
 
     self.world.loadFrames self.onWorldLoaded, self.onWorldError, self.onWorldLoadProgress, true
 
-
   self.onWorldLoaded = onWorldLoaded = ->
     self.goalManager.worldGenerationEnded()
     goalStates = self.goalManager.getGoalStates()
-    self.postMessage type: "end-load-frames", goalStates: goalStates
+    self.postMessage type: 'end-load-frames', goalStates: goalStates
 
     t1 = new Date()
     diff = t1 - self.t0
@@ -114,13 +112,13 @@ work = () ->
       serialized = serializedWorld: self.world.serialize()
       transferableSupported = false
     catch error
-      console.log "World serialization error:", error.toString() + "\n" + error.stack or error.stackTrace
+      console.log 'World serialization error:', error.toString() + "\n" + error.stack or error.stackTrace
     t2 = new Date()
 
-    # console.log("About to transfer", serialized.serializedWorld.trackedPropertiesPerThangValues, serialized.transferableObjects);
+    # console.log('About to transfer', serialized.serializedWorld.trackedPropertiesPerThangValues, serialized.transferableObjects);
     try
       message =
-        type: "new-world"
+        type: 'new-world'
         serialized: serialized.serializedWorld
         goalStates: goalStates
       if transferableSupported
@@ -129,55 +127,53 @@ work = () ->
         self.postMessage message
 
     catch error
-      console.log "World delivery error:", error.toString() + "\n" + error.stack or error.stackTrace
+      console.log 'World delivery error:', error.toString() + "\n" + error.stack or error.stackTrace
     t3 = new Date()
-    console.log "And it was so: (" + (diff / self.world.totalFrames).toFixed(3) + "ms per frame,", self.world.totalFrames, "frames)\nSimulation   :", diff + "ms \nSerialization:", (t2 - t1) + "ms\nDelivery     :", (t3 - t2) + "ms"
+    console.log 'And it was so: (' + (diff / self.world.totalFrames).toFixed(3) + 'ms per frame,', self.world.totalFrames, "frames)\nSimulation   :", diff + "ms \nSerialization:", (t2 - t1) + "ms\nDelivery     :", (t3 - t2) + 'ms'
     self.cleanUp()
 
 
   self.onWorldError = onWorldError = (error) ->
-    self.postMessage type: "end-load-frames"
-    if error instanceof Aether.problems.UserCodeProblem
-      #console.log "Aether userCodeProblem occured."
-      unless self.postedErrors[error.key]
-        problem = error.serialize()
+    if error.isUserCodeProblem
+      errorKey = error.userInfo.key
+      if not errorKey or not self.postedErrors[errorKey]
         self.postMessage
-          type: "user-code-problem"
-          problem: problem
-
-        self.postedErrors[error.key] = problem
+          type: 'user-code-problem'
+          problem: error
+        self.postedErrors[errorKey] = error
     else
-      console.log "Non-UserCodeError:", error.toString() + "\n" + error.stack or error.stackTrace
-    self.cleanUp()
+      console.log 'Non-UserCodeError:', error.toString() + "\n" + error.stack or error.stackTrace
+      self.cleanUp()
+    return true
 
   self.onWorldLoadProgress = onWorldLoadProgress = (progress) ->
-    #console.log "Worker onWorldLoadProgress"
+    #console.log 'Worker onWorldLoadProgress'
     self.postMessage
-      type: "world-load-progress-changed"
+      type: 'world-load-progress-changed'
       progress: progress
 
   self.abort = abort = ->
-    #console.log "Abort called for worker."
+    #console.log 'Abort called for worker.'
     if self.world
-      #console.log "About to abort:", self.world.name, typeof self.world.abort
+      #console.log 'About to abort:', self.world.name, typeof self.world.abort
       self.world.abort()
       self.world = null
-    self.postMessage type: "abort"
+    self.postMessage type: 'abort'
     self.cleanUp()
 
   self.reportIn = reportIn = ->
-    console.log "Reporting in."
-    self.postMessage type: "report-in"
+    console.log 'Reporting in.'
+    self.postMessage type: 'report-in'
 
-  self.addEventListener "message", (event) ->
+  self.addEventListener 'message', (event) ->
     #console.log JSON.stringify event
     self[event.data.func] event.data.args
 
-  self.postMessage type: "worker-initialized"
+  self.postMessage type: 'worker-initialized'
 
-worldCode = fs.readFileSync "./public/javascripts/world.js", 'utf8'
-lodashCode = fs.readFileSync "./public/javascripts/lodash.js", 'utf8'
-aetherCode = fs.readFileSync "./public/javascripts/aether.js", 'utf8'
+worldCode = fs.readFileSync './public/javascripts/world.js', 'utf8'
+lodashCode = fs.readFileSync './public/javascripts/lodash.js', 'utf8'
+aetherCode = fs.readFileSync './public/javascripts/aether.js', 'utf8'
 
 #window.BOX2D_ENABLED = true;
 
@@ -188,7 +184,7 @@ ret = """
   GLOBAL = root = window = self;
   GLOBAL.window = window;
 
-  self.workerID = "Worker";
+  self.workerID = 'Worker';
 
   console = #{JASON.stringify betterConsole}();
 
@@ -204,17 +200,15 @@ ret = """
 
     // the actual function
     #{JASON.stringify work}();
-  }catch (error) {
-    self.postMessage({"type": "console-log", args: ["An unhandled error occured: ", error.toString(), error.stack], id: -1});
+  } catch (error) {
+    self.postMessage({'type': 'console-log', args: ['An unhandled error occured: ', error.toString(), error.stack], id: -1});
   }
 """
 
-
 #console = #{JASON.stringify createConsole}();
 #
 #  console.error = console.info = console.log;
 #self.console = console;
 #GLOBAL.console = console;
 
-
 module.exports = new Function(ret)
diff --git a/karma.conf.js b/karma.conf.js
index 4e7e335e4..bf0924f77 100644
--- a/karma.conf.js
+++ b/karma.conf.js
@@ -13,9 +13,11 @@ module.exports = function(config) {
     files : [
       'public/javascripts/vendor.js',
       'public/lib/ace/ace.js',
+      'public/javascripts/aether.js',
       'public/javascripts/app.js',
-
-      'test/app/**/*.coffee'
+      'public/javascripts/mock-ajax.js',
+      'public/javascripts/test-app.js',
+      'public/javascripts/run-tests.js'
     ],
 
     preprocessors : {
diff --git a/multicore.coffee b/multicore.coffee
new file mode 100644
index 000000000..194b5940e
--- /dev/null
+++ b/multicore.coffee
@@ -0,0 +1,14 @@
+cluster = require 'cluster'
+numCPUs = require('os').cpus().length
+
+if cluster.isMaster
+        for i in [0...numCPUs]
+                cluster.fork()
+        cluster.on 'exit', (worker, code, signal) ->
+                console.log 'worker' + worker.process.id + 'died'
+                cluster.fork()
+else
+        require('coffee-script')
+        require('coffee-script/register')
+        server = require('./server')
+        server.startServer()
diff --git a/package.json b/package.json
index c0a76be34..32568f23e 100644
--- a/package.json
+++ b/package.json
@@ -91,11 +91,11 @@
     "karma-firefox-launcher": "~0.1.3",
     "karma-html2js-preprocessor": "~0.1.0",
     "karma-coffee-preprocessor": "~0.1.2",
-    "karma-jasmine": "~0.1.5",
+    "karma-jasmine": "~0.2.0",
     "requirejs": "~2.1.10",
     "karma-requirejs": "~0.2.1",
     "karma-phantomjs-launcher": "~0.1.1",
-    "karma": "~0.10.9",
+    "karma": "~0.12",
     "karma-coverage": "~0.1.4",
     "compressible": "~1.0.1",
     "jasmine-spec-reporter": "~0.3.0"
diff --git a/scripts/copy-i18n-tags.coffee b/scripts/copy-i18n-tags.coffee
index 9e125ace0..c7f49b975 100644
--- a/scripts/copy-i18n-tags.coffee
+++ b/scripts/copy-i18n-tags.coffee
@@ -9,7 +9,7 @@ for file in dir when not (file in ['locale.coffee', 'en.coffee'])
   for enCat, enTags of en
     catMissing = not categories[enCat]
     cat = (categories[enCat] ?= {})
-    lines.push "" unless first  # blank lines between categories
+    lines.push '' unless first  # blank lines between categories
     lines.push "#{if catMissing then '#' else ''}  #{enCat}:"
     first = false
     for enTag, enString of enTags
diff --git a/scripts/devSetup/bootstrap.sh b/scripts/devSetup/bootstrap.sh
index 9d1f34b8e..46099635c 100644
--- a/scripts/devSetup/bootstrap.sh
+++ b/scripts/devSetup/bootstrap.sh
@@ -58,7 +58,13 @@ checkDependencies deps[@] basicDependenciesErrorHandling
 if command -v node >/dev/null 2>&1; then
     checkNodeVersion
 fi
-#install git repository
-git clone $repositoryUrl coco
-#python ./coco/scripts/devSetup/setup.py
-echo "Now copy and paste 'sudo python ./coco/scripts/devSetup/setup.py' into the terminal!"
+
+#check if a git repository already exists here
+if [ -d .git ]; then
+  echo "A git repository already exists here!"
+else
+  #install git repository
+  git clone $repositoryUrl coco
+  #python ./coco/scripts/devSetup/setup.py
+  echo "Now copy and paste 'sudo python ./coco/scripts/devSetup/setup.py' into the terminal!"
+fi
diff --git a/scripts/devSetup/systemConfiguration.py b/scripts/devSetup/systemConfiguration.py
index 9d49e95ce..78df92fdf 100644
--- a/scripts/devSetup/systemConfiguration.py
+++ b/scripts/devSetup/systemConfiguration.py
@@ -33,7 +33,8 @@ class SystemConfiguration(object):
             return 64
         else:
             if self.operating_system == u"mac":
-                raise NotSupportedError(u"Your processor is determined to have a maxSize of" + sys.maxsize +
+                if os.uname()[4] == u"x86_64":
+                  return 64
+                raise NotSupportedError(u"Your processor is determined to have a maxSize of" + str(sys.maxsize) +
                                         u",\n which doesn't correspond with a 64-bit architecture.")
             return 32
-
diff --git a/scripts/mail.coffee b/scripts/mail.coffee
index b9983b619..dbc81a790 100644
--- a/scripts/mail.coffee
+++ b/scripts/mail.coffee
@@ -7,9 +7,10 @@ async = require 'async'
 
 serverSetup = require '../server_setup'
 sendwithus = require '../server/sendwithus'
-User = require '../server/users/User.coffee'
-Level = require '../server/levels/Level.coffee'
-LevelSession = require '../server/levels/sessions/LevelSession.coffee'
+User = require '../server/users/User'
+Level = require '../server/levels/Level'
+LevelSession = require '../server/levels/sessions/LevelSession'
+tournamentResults = require '../app/views/play/ladder/tournament_results'
 
 alreadyEmailed = []
 
@@ -17,17 +18,21 @@ DEBUGGING = true
 
 sendInitialRecruitingEmail = ->
   leaderboards = [
-    {slug: 'brawlwood', team: 'humans', limit: 55, name: "Brawlwood", original: "52d97ecd32362bc86e004e87", majorVersion: 0}
-    {slug: 'brawlwood', team: 'ogres', limit: 40, name: "Brawlwood", original: "52d97ecd32362bc86e004e87", majorVersion: 0}
-    {slug: 'dungeon-arena', team: 'humans', limit: 200, name: "Dungeon Arena", original: "53173f76c269d400000543c2", majorVersion: 0}
-    {slug: 'dungeon-arena', team: 'ogres', limit: 150, name: "Dungeon Arena", original: "53173f76c269d400000543c2", majorVersion: 0}
+    {slug: 'brawlwood', team: 'humans', limit: 55, name: 'Brawlwood', original: '52d97ecd32362bc86e004e87', majorVersion: 0}
+    {slug: 'brawlwood', team: 'ogres', limit: 40, name: 'Brawlwood', original: '52d97ecd32362bc86e004e87', majorVersion: 0}
+    {slug: 'dungeon-arena', team: 'humans', limit: 300, name: 'Dungeon Arena', original: '53173f76c269d400000543c2', majorVersion: 0}
+    {slug: 'dungeon-arena', team: 'ogres', limit: 250, name: 'Dungeon Arena', original: '53173f76c269d400000543c2', majorVersion: 0}
+    {slug: 'greed', team: 'humans', limit: 465, name: 'Greed', original: '53558b5a9914f5a90d7ccddb', majorVersion: 0}
+    {slug: 'greed', team: 'ogres', limit: 371, name: 'Greed', original: '53558b5a9914f5a90d7ccddb', majorVersion: 0}
+    {slug: 'gold-rush', team: 'humans', limit: 253, name: 'Gold Rush', original: '533353722a61b7ca6832840c', majorVersion: 0}
+    {slug: 'gold-rush', team: 'ogres', limit: 203, name: 'Gold Rush', original: '533353722a61b7ca6832840c', majorVersion: 0}
   ]
   async.waterfall [
     (callback) -> async.map leaderboards, grabSessions, callback
     (sessionLists, callback) -> async.map collapseSessions(sessionLists), grabUser, callback
-    (users, callback) -> async.map users, emailUser, callback
+    (users, callback) -> async.map users, emailUserInitialRecruiting, callback
   ], (err, results) ->
-    return console.log "Error:", err if err
+    return console.log 'Error:', err if err
     console.log "Looked at sending to #{results.length} users; sent to #{_.filter(results).length}."
     console.log "Sent to: ['#{(user.email for user in results when user).join('\', \'')}']"
 
@@ -38,13 +43,12 @@ grabSessions = (levelInfo, callback) ->
     submitted: true
   sortParameters = totalScore: -1
   selectString = 'totalScore creator'
-  query = LevelSession
-    .find(queryParameters)
-    .limit(levelInfo.limit)
-    .sort(sortParameters)
-    .select(selectString)
-    .lean()
-  query.exec (err, sessions) ->
+  LevelSession.aggregate [
+    {$match: queryParameters}
+    {$project: {totalScore: 1, creator: 1}}
+    {$sort: sortParameters}
+    {$limit: levelInfo.limit}
+  ], (err, sessions) ->
     return callback err if err
     for session, rank in sessions
       session.levelInfo = levelInfo
@@ -76,29 +80,87 @@ grabUser = (session, callback) ->
     callback null, user
 
 totalEmailsSent = 0
-emailUser = (user, callback) ->
-  #return callback null, false if user.emails?.anyNotes?.enabled is false  # TODO: later, uncomment to obey also "anyNotes" when that's untangled
+emailUserInitialRecruiting = (user, callback) ->
+  #return callback null, false if user.emails?.anyNotes?.enabled is false  # TODO: later, uncomment to obey also 'anyNotes' when that's untangled
   return callback null, false if user.emails?.recruitNotes?.enabled is false
   return callback null, false if user.email in alreadyEmailed
-  return callback null, false if DEBUGGING and (totalEmailsSent > 1 or Math.random() > 0.1)
+  return callback null, false if DEBUGGING and (totalEmailsSent > 1 or Math.random() > 0.05)
   ++totalEmailsSent
   name = if user.firstName and user.lastName then "#{user.firstName}" else user.name
-  name = "Wizard" if not name or name is "Anoner"
+  name = 'Wizard' if not name or name is 'Anoner'
   team = user.session.levelInfo.team
   team = team.substr(0, team.length - 1)
   context =
-    email_id: sendwithus.templates.one_time_recruiting_email
+    email_id: sendwithus.templates.recruiting_email
     recipient:
       address: if DEBUGGING then 'nick@codecombat.com' else user.email
       name: name
     email_data:
       name: name
       level_name: user.session.levelInfo.name
-      place: "##{user.session.rank}"  # like "#31"
+      place: "##{user.session.rank}"  # like '#31'
       level_race: team
+      ladder_link: "http://codecombat.com/play/ladder/#{user.session.levelInfo.slug}"
   sendwithus.api.send context, (err, result) ->
     return callback err if err
     callback null, user
 
+sendTournamentResultsEmail = ->
+  winners = tournamentResults.greed.humans.concat tournamentResults.greed.ogres
+  async.waterfall [
+    (callback) -> async.map winners, grabSession, callback
+    (winners, callback) -> async.map winners, grabEmail, callback
+    (winners, callback) -> async.map winners, emailUserTournamentResults, callback
+  ], (err, results) ->
+    return console.log 'Error:', err if err
+    console.log "Looked at sending to #{results.length} users; sent to #{_.filter(results).length}."
+    console.log "Sent to: ['#{(user.email for user in results when user).join('\', \'')}']"
+
+grabSession = (winner, callback) ->
+  LevelSession.findOne(_id: winner.sessionID).select('creator').lean().exec (err, session) ->
+    return callback err if err
+    winner.userID = session.creator
+    callback null, winner
+
+grabEmail = (winner, callback) ->
+  User.findOne(_id: winner.userID).select('email').lean().exec (err, user) ->
+    return callback err if err
+    winner.email = user.email
+    callback null, winner
+
+emailUserTournamentResults = (winner, callback) ->
+  return callback null, false if DEBUGGING and (winner.team is 'humans' or totalEmailsSent > 1)
+  ++totalEmailsSent
+  name = winner.name
+  team = winner.team.substr(0, winner.team.length - 1)
+  context =
+    email_id: sendwithus.templates.greed_tournament_rank
+    recipient:
+      address: if DEBUGGING then 'nick@codecombat.com' else winner.email
+      name: name
+    email_data:
+      userID: winner.userID
+      name: name
+      level_name: 'Greed'
+      wins: winner.wins
+      ties: {humans: 377, ogres: 407}[winner.team] - winner.wins - winner.losses
+      losses: winner.losses
+      rank: winner.rank
+      team_name: team
+      ladder_url: 'http://codecombat.com/play/ladder/greed#winners'
+      top3: winner.rank <= 3
+      top5: winner.rank <= 5
+      top10: winner.rank <= 10
+      top40: winner.rank <= 40
+      top100: winner.rank <= 100
+  sendwithus.api.send context, (err, result) ->
+    return callback err if err
+    callback null, winner
+
 serverSetup.connectToDatabase()
-sendInitialRecruitingEmail()
+
+fn = process.argv[2]
+try
+  eval fn + '()'
+catch err
+  console.log "Error running #{fn}", err
diff --git a/scripts/mongodb/queries/patches.js b/scripts/mongodb/queries/patches.js
index 418ebbe18..771aadd21 100644
--- a/scripts/mongodb/queries/patches.js
+++ b/scripts/mongodb/queries/patches.js
@@ -7,7 +7,21 @@ for(var i in patches) {
   if(patch.target.collection === 'level') collection = db.levels;
   if(patch.target.collection === 'level_component') collection = db.level.components;
   if(patch.target.collection === 'level_system') collection = db.level.systems;
+  if(patch.target.collection === 'thang_type') collection = db.level.thang.types;
+  if(collection === null) {
+    print('could not find collection', patch.target.collection);
+    continue;
+  }
   var target = collection.findOne({original:patch.target.original, name:{$exists:true}});
   var creator = db.users.findOne({_id:patch.creator});
+  if(target === null) {
+    print('No target for patch from', patch.target.collection);
+    continue;
+  }
+  if(creator === null) {
+    print(target.name, 'made by unknown person...');
+    continue;
+  }
+    
   print(target.name, 'made by', creator.name);
  }
\ No newline at end of file
diff --git a/scripts/runAfterGit.coffee b/scripts/runAfterGit.coffee
new file mode 100644
index 000000000..cc08f1ff7
--- /dev/null
+++ b/scripts/runAfterGit.coffee
@@ -0,0 +1,124 @@
+# This is written in coffeescript. Run this using coffee, not node.           (Line to yield nice warnings on node. :))
+return console.log '------------------------------------------------- \n
+
+Commandline utility written in Coffeescript to run all updates, download latest database and install it after you git pushed. \n
+Params: \n
+\t--skipupdates skips npm and bower update \n
+\t--dldb: download the latest database (Over 300 mb!) \n
+\t--resetdb: to reset the database and load dump from tmp. Will need a downloaded database or --dbdownload specified \n
+\t--mongopath <.path/to/mongo>: to specify mongodb folder if not set in PATH. \n
+\t--help: Yo fund this one already. \n
+\n
+May need an initial npm install upfront if newly checked out. \n
+
+' if '--help' in process.argv
+
+#TODO: MD5 Verification, using http://23.21.59.137/dump.md5 using digest stream https://github.com/jeffbski/digest-stream
+dbDump = 'http://23.21.59.137/dump.tar.gz' # Don't change this unless you know what you're doing
+dbLocalPath = '../temp'
+
+fs = require 'fs'
+tar = require 'tar'
+spawn = require('child_process').spawn
+http = require 'http'
+fs = require 'fs'
+zlib = require 'zlib'
+Deferred = require 'JQDeferred'
+
+#TODO: Could kill current coco server here.
+
+mongopath = ''
+useNext = false
+for path in process.argv
+  if useNext
+    mongopath = path
+    break
+  useNext = path is '--mongopath'
+mongopath += '/bin/' if mongopath.length
+mongopath += 'mongodb' # mongodb is in path.
+
+run = (proc, args) ->
+  deferred = Deferred()
+  spawned = spawn proc, args
+  spawned.stdout.on 'data', (data) -> process.stdout.write data
+  spawned.stderr.on 'data', (data) -> process.stderr.write data
+  spawned.on 'exit', (code) ->
+    console.log proc + ' exited with code ' + code
+    # unless code is null doesn't seem to work
+    #  deferred.reject()
+    deferred.resolve code
+  spawned.on 'error', (code, error) ->
+    console.error proc + ' failed!'
+    deferred.reject()
+  deferred.promise()
+
+removeDir = (path) ->
+  if fs.existsSync(path)
+    fs.readdirSync(path).forEach (file) ->
+      current = path + '/' + file
+      if fs.lstatSync(current).isDirectory() # recurse
+        removeDir current
+      else # delete file
+        fs.unlinkSync current
+    fs.rmdirSync path
+
+resetDB = ->
+  deferred = Deferred()
+  console.log 'Dropping Database'
+  mongodrop = run 'mongo', ['coco', '--eval', 'db.dropDatabase()']
+  mongodrop.fail -> console.error 'Error occurred while dropping mongo. Make sure CoCo\'s MongoDB is running.'
+  mongodrop.done ->
+    console.log 'Restoring from dump.'
+    mongorestore = run 'mongorestore', [dbLocalPath]
+    mongorestore.always = deferred.resolve()
+  deferred.promise()
+
+downloadDB = ->
+  deferred = Deferred()
+  #mongoose = require 'mongoose'
+  # TODO: What if mongo is not running?
+  console.log 'Downloading Database dump. It\'s big. This may take a while...'
+  request = http.get dbDump, (response)->
+    unzip = response.pipe(zlib.createGunzip()).pipe(tar.Extract(path: dbLocalPath))
+    # Log download
+    currentChunk = 0
+    cur = 0
+    len = parseInt(response.headers['content-length'], 10)
+    total = len / 1048576 #1048576 - bytes in  1Megabyte
+    response.on 'data', (chunk) ->
+      cur += chunk.length
+      console.log 'DB dump download received chunk ' + currentChunk++ + ', '  + (100.0 * cur / len).toFixed(2) + '% finished of ' + total.toFixed(0) + ' mb'
+    unzip.on('data', -> console.log 'Unpacking zip...')
+    unzip.on('error', (err) -> console.log 'An error occurred while downloading DB Dump: ' + err)
+    unzip.on 'end', ->
+      console.log 'Finished downloading.'
+      deferred.resolve()
+    deferred.promise()
+
+installUpdates = ->
+  deferred = Deferred()
+  npm = if process.platform is 'win32' then 'npm.cmd' else 'npm'
+  npminstall = run npm, ['update']
+  npminstall.done ->
+    bowerinstall = run 'bower', ['update']
+    deferred.resolve()
+  deferred.promise()
+
+cleanUpTmp = ->
+  removeDir dbLocalPath
+
+unless '--skipupdates' in process.argv
+  installUpdates()
+
+if '--resetdb' in process.argv
+  if '--dldb' in process.argv
+    downloadDB().done ->
+        resetDB().done ->
+          cleanUpTmp() if '--cleanup' in process.argv
+  else
+    resetDB().done ->
+      cleanUpTmp() if '--cleanup' in process.argv
+else if '--dldb' in process.argv
+  downloadDB()
+
+# TODO: Could advice to start SCOCODE.bat et al. here
diff --git a/scripts/simulate.coffee b/scripts/simulate.coffee
index 01eccb5f9..cd8e62e59 100644
--- a/scripts/simulate.coffee
+++ b/scripts/simulate.coffee
@@ -1,13 +1,13 @@
-spawn = require("child_process").spawn
+spawn = require('child_process').spawn
 
-[sessionOne, sessionTwo] = [process.argv[2],process.argv[3]]
+[sessionOne, sessionTwo] = [process.argv[2], process.argv[3]]
 homeDirectory = process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE
 unless sessionOne and sessionTwo and sessionOne.length is 24 and sessionTwo.length is 24
-  console.log "Not enough games to continue!"
+  console.log 'Not enough games to continue!'
   process.exit(1)
 run = (cb) ->
-  command = spawn("coffee",["headless_client.coffee","one-game",sessionOne,sessionTwo],{cwd: homeDirectory + "/codecombat/"})
-  result = ""
+  command = spawn('coffee', ['headless_client.coffee', 'one-game', sessionOne, sessionTwo], {cwd: homeDirectory + '/codecombat/'})
+  result = ''
   command.stdout.on 'data', (data) ->
     result += data.toString()
   command.stdout.on 'close', ->
@@ -15,9 +15,7 @@ run = (cb) ->
 run (result) ->
   lines = result.split("\n")
   for line in lines
-    if line.slice(0, 10) is "GAMERESULT"
+    if line.slice(0, 10) is 'GAMERESULT'
       process.stdout.write line.slice(11)
       process.exit(0)
   process.exit(0)
-    
- 
\ No newline at end of file
diff --git a/scripts/transpile.coffee b/scripts/transpile.coffee
index 5b4794b4c..5c39b414b 100644
--- a/scripts/transpile.coffee
+++ b/scripts/transpile.coffee
@@ -2,79 +2,89 @@ do (setupLodash = this) ->
   GLOBAL._ = require 'lodash'
   _.str = require 'underscore.string'
   _.mixin _.str.exports()
-Aether = require "aether"
+Aether = require 'aether'
 async = require 'async'
 
 serverSetup = require '../server_setup'
-Level = require '../server/levels/Level.coffee'
-LevelSession = require '../server/levels/sessions/LevelSession.coffee'
+Level = require '../server/levels/Level'
+LevelSession = require '../server/levels/sessions/LevelSession'
 
 Aether.addGlobal 'Vector', require '../app/lib/world/vector'
 Aether.addGlobal '_', _
-
+i = 0
 transpileLevelSession = (sessionID, cb) ->
-  query = LevelSession.findOne("_id": sessionID).select("submittedCode").lean()
+  query = LevelSession.findOne('_id': sessionID).select('team teamSpells submittedCode submittedCodeLanguage').lean()
   query.exec (err, session) ->
     if err then return cb err
     submittedCode = session.submittedCode
+    unless session.submittedCodeLanguage
+      throw 'SUBMITTED CODE LANGUAGE DOESN\'T EXIST'
+    else
+      console.log "Transpiling code for session #{i++} #{session._id} in language #{session.submittedCodeLanguage}"
     transpiledCode = {}
-    console.log "Updating session #{sessionID}"
+    #console.log "Updating session #{sessionID}"
     for thang, spells of submittedCode
       transpiledCode[thang] = {}
       for spellID, spell of spells
+        spellName = thang + '/' + spellID
 
+        if session.teamSpells and not (spellName in session.teamSpells[session.team]) then continue
+        #console.log "Transpiling spell #{spellName}"
         aetherOptions =
           problems: {}
-          language: "javascript"
+          language: session.submittedCodeLanguage
           functionName: spellID
           functionParameters: []
-          yieldConditionally: spellID is "plan"
+          yieldConditionally: spellID is 'plan'
           globals: ['Vector', '_']
           protectAPI: true
           includeFlow: false
           executionLimit: 1 * 1000 * 1000
-        if spellID is "hear" then aetherOptions["functionParameters"] = ["speaker","message","data"]
+        if spellID is 'hear' then aetherOptions.functionParameters = ['speaker', 'message', 'data']
+        if spellID is 'makeBid' then aetherOptions.functionParameters = ['tileGroupLetter']
+        if spellID is 'findCentroids' then aetherOptions.functionParameters = ['centroids']
 
         aether = new Aether aetherOptions
         transpiledCode[thang][spellID] = aether.transpile spell
     conditions =
-      "_id": sessionID
+      '_id': sessionID
     update =
-      "transpiledCode": transpiledCode
-      "submittedCodeLanguage": "javascript"
-    query = LevelSession.update(conditions,update)
+      'transpiledCode': transpiledCode
+    query = LevelSession.update(conditions, update)
 
     query.exec (err, numUpdated) -> cb err
 
 findLadderLevelSessions = (levelID, cb) ->
   queryParameters =
-    "level.original": levelID + ""
+    'level.original': levelID + ''
     submitted: true
 
-  selectString = "_id"
+  selectString = '_id'
   query = LevelSession.find(queryParameters).select(selectString).lean()
 
   query.exec (err, levelSessions) ->
     if err then return cb err
-    levelSessionIDs = _.pluck levelSessions, "_id"
+    levelSessionIDs = _.pluck levelSessions, '_id'
     async.eachSeries levelSessionIDs, transpileLevelSession, (err) ->
       if err then return cb err
-      cb null
+      return cb null
 
 
 transpileLadderSessions = ->
   queryParameters =
-    type: "ladder"
-    "version.isLatestMajor": true
-    "version.isLatestMinor": true
-  selectString = "original"
+    type: 'ladder'
+    'version.isLatestMajor': true
+    'version.isLatestMinor': true
+  selectString = 'original'
   query = Level.find(queryParameters).select(selectString).lean()
 
   query.exec (err, ladderLevels) ->
     throw err if err
-    ladderLevels = _.pluck ladderLevels, "original"
+    ladderLevels = _.pluck ladderLevels, 'original'
     async.eachSeries ladderLevels, findLadderLevelSessions, (err) ->
       throw err if err
 
 serverSetup.connectToDatabase()
 transpileLadderSessions()
+# 2014-06-21: took about an hour to do 5480 sessions, ~93/min
+# eta: db.level.sessions.find({submitted: true}).count() / 93
diff --git a/server.coffee b/server.coffee
index 6021f2865..9b3df86ac 100644
--- a/server.coffee
+++ b/server.coffee
@@ -11,7 +11,7 @@ serverSetup = require './server_setup'
 module.exports.startServer = ->
   app = createAndConfigureApp()
   http.createServer(app).listen(app.get('port'))
-  log.info("Express SSL server listening on port " + app.get('port'))
+  log.info('Express SSL server listening on port ' + app.get('port'))
   return app
 
 createAndConfigureApp = ->
diff --git a/server/achievements/Achievement.coffee b/server/achievements/Achievement.coffee
new file mode 100644
index 000000000..fed2cfa5b
--- /dev/null
+++ b/server/achievements/Achievement.coffee
@@ -0,0 +1,45 @@
+mongoose = require 'mongoose'
+jsonschema = require '../../app/schemas/models/achievement'
+log = require 'winston'
+util = require '../../app/lib/utils'
+plugins = require '../plugins/plugins'
+
+# `pre` and `post` are not called for update operations executed directly on the database,
+# including `Model.update`,`.findByIdAndUpdate`,`.findOneAndUpdate`, `.findOneAndRemove`,and `.findByIdAndRemove`.order
+# to utilize `pre` or `post` middleware, you should `find()` the document, and call the `init`, `validate`, `save`,
+# or `remove` functions on the document. See [explanation](http://github.com/LearnBoost/mongoose/issues/964).
+
+AchievementSchema = new mongoose.Schema({
+  userField: String
+}, {strict: false})
+
+AchievementSchema.methods.objectifyQuery = ->
+  try
+    @set('query', JSON.parse(@get('query'))) if typeof @get('query') == 'string'
+  catch error
+    log.error "Couldn't convert query string to object because of #{error}"
+    @set('query', {})
+
+AchievementSchema.methods.stringifyQuery = ->
+  @set('query', JSON.stringify(@get('query'))) if typeof @get('query') != 'string'
+
+  getExpFunction: ->
+    kind = @get('function')?.kind or jsonschema.function.default.kind
+    parameters = @get('function')?.parameters or jsonschema.function.default.parameters
+    return utils.functionCreators[kind](parameters) if kind of utils.functionCreators
+
+AchievementSchema.post('init', (doc) -> doc.objectifyQuery())
+
+AchievementSchema.pre('save', (next) ->
+  @stringifyQuery()
+  next()
+)
+
+AchievementSchema.plugin(plugins.NamedPlugin)
+AchievementSchema.plugin(plugins.SearchablePlugin, {searchable: ['name']})
+
+module.exports = Achievement = mongoose.model('Achievement', AchievementSchema)
+
+# Reload achievements upon save
+AchievablePlugin = require '../plugins/achievements'
+AchievementSchema.post 'save', (doc) -> AchievablePlugin.loadAchievements()
diff --git a/server/achievements/EarnedAchievement.coffee b/server/achievements/EarnedAchievement.coffee
new file mode 100644
index 000000000..685a502c6
--- /dev/null
+++ b/server/achievements/EarnedAchievement.coffee
@@ -0,0 +1,23 @@
+mongoose = require 'mongoose'
+jsonschema = require '../../app/schemas/models/earned_achievement'
+
+EarnedAchievementSchema = new mongoose.Schema({
+  created:
+    type: Date
+    default: Date.now
+  changed:
+    type: Date
+    default: Date.now
+  notified:
+    type: Boolean
+    default: false
+}, {strict:false})
+
+EarnedAchievementSchema.pre 'save', (next) ->
+  @set('changed', Date.now())
+  next()
+
+EarnedAchievementSchema.index({user: 1, achievement: 1}, {unique: true, name: 'earned achievement index'})
+EarnedAchievementSchema.index({user: 1, changed: -1}, {name: 'latest '})
+
+module.exports = EarnedAchievement = mongoose.model('EarnedAchievement', EarnedAchievementSchema)
diff --git a/server/achievements/achievement_handler.coffee b/server/achievements/achievement_handler.coffee
new file mode 100644
index 000000000..989a8b955
--- /dev/null
+++ b/server/achievements/achievement_handler.coffee
@@ -0,0 +1,14 @@
+Achievement = require './Achievement'
+Handler = require '../commons/Handler'
+
+class AchievementHandler extends Handler
+  modelClass: Achievement
+
+  # Used to determine which properties requests may edit
+  editableProperties: ['name', 'query', 'worth', 'collection', 'description', 'userField', 'proportionalTo', 'icon', 'function']
+  jsonSchema = require '../../app/schemas/models/achievement.coffee'
+
+  hasAccess: (req) ->
+    req.method is 'GET' or req.user?.isAdmin()
+
+module.exports = new AchievementHandler()
diff --git a/server/achievements/earned_achievement_handler.coffee b/server/achievements/earned_achievement_handler.coffee
new file mode 100644
index 000000000..11f40cc54
--- /dev/null
+++ b/server/achievements/earned_achievement_handler.coffee
@@ -0,0 +1,114 @@
+log = require 'winston'
+mongoose = require 'mongoose'
+async = require 'async'
+Achievement = require './Achievement'
+EarnedAchievement = require './EarnedAchievement'
+User = require '../users/User'
+Handler = require '../commons/Handler'
+LocalMongo = require '../../app/lib/LocalMongo'
+
+class EarnedAchievementHandler extends Handler
+  modelClass: EarnedAchievement
+
+  # Don't allow POSTs or anything yet
+  hasAccess: (req) ->
+    req.method is 'GET' # or req.user.isAdmin()
+
+  recalculate: (req, res) ->
+    onSuccess = (data) => log.debug 'Finished recalculating achievements'
+    if 'achievements' of req.body # Support both slugs and IDs separated by commas
+      achievementSlugsOrIDs = req.body.achievements
+      EarnedAchievementHandler.recalculate achievementSlugsOrIDs, onSuccess
+    else
+      EarnedAchievementHandler.recalculate onSuccess
+    @sendSuccess res, {}
+
+  # Returns success: boolean
+  # TODO call onFinished
+  @recalculate: (callbackOrSlugsOrIDs, onFinished) ->
+    if _.isArray callbackOrSlugsOrIDs
+      achievementSlugs = (thing for thing in callbackOrSlugsOrIDs when not Handler.isID(thing))
+      achievementIDs = (thing for thing in callbackOrSlugsOrIDs when Handler.isID(thing))
+    else
+      onFinished = callbackOrSlugsOrIDs
+
+    filter = {}
+    filter.$or = [
+      {_id: $in: achievementIDs},
+      {slug: $in: achievementSlugs}
+    ] if achievementSlugs? or achievementIDs?
+
+    # Fetch all relevant achievements
+    Achievement.find filter, (err, achievements) ->
+      return log.error err if err?
+
+      # Fetch every single user
+      User.find {}, (err, users) ->
+        _.each users, (user) ->
+          # Keep track of a user's already achieved in order to set the notified values correctly
+          userID = user.get('_id').toHexString()
+
+          # Fetch all of a user's earned achievements
+          EarnedAchievement.find {user: userID}, (err, alreadyEarned) ->
+            alreadyEarnedIDs = []
+            previousPoints = 0
+            _.each alreadyEarned, (earned) ->
+              if (_.find achievements, (single) -> earned.get('achievement') is single.get('_id').toHexString())
+                alreadyEarnedIDs.push earned.get('achievement')
+                previousPoints += earned.get 'earnedPoints'
+
+            # TODO maybe also delete earned? Make sure you don't delete too many
+
+            newTotalPoints = 0
+
+            earnedAchievementSaverGenerator = (achievement) -> (callback) ->
+              isRepeatable = achievement.get('proportionalTo')?
+              model = mongoose.model(achievement.get('collection'))
+              if not model?
+                log.error "Model #{achievement.get 'collection'} doesn't even exist."
+                return callback()
+
+              model.findOne achievement.query, (err, something) ->
+                return callback() unless something
+
+                log.debug "Matched an achievement: #{achievement.get 'name'}"
+
+                earned =
+                  user: userID
+                  achievement: achievement._id.toHexString()
+                  achievementName: achievement.get 'name'
+                  notified: achievement._id in alreadyEarnedIDs
+
+                if isRepeatable
+                  earned.achievedAmount = something.get(achievement.get 'proportionalTo')
+                  earned.previouslyAchievedAmount = 0
+
+                  expFunction = achievement.getExpFunction()
+                  newPoints = expFunction(earned.achievedAmount) * achievement.get('worth')
+                else
+                  newPoints = achievement.get 'worth'
+
+                earned.earnedPoints = newPoints
+                newTotalPoints += newPoints
+
+                EarnedAchievement.update {achievement: earned.achievement, user: earned.user}, earned, {upsert: true}, (err) ->
+                  log.error err if err?
+                  callback()
+
+            saveUserPoints = (callback) ->
+              # In principle it is enough to deduct the old amount of points and add the new amount,
+              # but just to be entirely safe let's start from 0 in case we're updating all of a user's achievements
+              log.debug "Matched a total of #{newTotalPoints} new points"
+              if _.isEmpty filter # Completely clean
+                User.update {_id: userID}, {$set: points: newTotalPoints}, {}, (err) -> log.error err if err?
+              else
+                log.debug "Incrementing score for these achievements with #{newTotalPoints - previousPoints}"
+                User.update {_id: userID}, {$inc: points: newTotalPoints - previousPoints}, {}, (err) -> log.error err if err?
+
+            earnedAchievementSavers = (earnedAchievementSaverGenerator(achievement) for achievement in achievements)
+            earnedAchievementSavers.push saveUserPoints
+
+            # We need to have all these database updates chained so we know the final score
+            async.series earnedAchievementSavers
+
+module.exports = new EarnedAchievementHandler()
diff --git a/server/articles/Article.coffee b/server/articles/Article.coffee
index 626fc779c..1645b15b6 100644
--- a/server/articles/Article.coffee
+++ b/server/articles/Article.coffee
@@ -1,7 +1,7 @@
-mongoose = require('mongoose')
-plugins = require('../plugins/plugins')
+mongoose = require 'mongoose'
+plugins = require '../plugins/plugins'
 
-ArticleSchema = new mongoose.Schema(body: String, {strict:false})
+ArticleSchema = new mongoose.Schema(body: String, {strict: false})
 
 ArticleSchema.plugin(plugins.NamedPlugin)
 ArticleSchema.plugin(plugins.VersionedPlugin)
diff --git a/server/articles/article_handler.coffee b/server/articles/article_handler.coffee
index 8aa2d26dc..d0d500904 100644
--- a/server/articles/article_handler.coffee
+++ b/server/articles/article_handler.coffee
@@ -1,5 +1,5 @@
-Article = require('./Article')
-Handler = require('../commons/Handler')
+Article = require './Article'
+Handler = require '../commons/Handler'
 
 ArticleHandler = class ArticleHandler extends Handler
   modelClass: Article
diff --git a/server/commons/Handler.coffee b/server/commons/Handler.coffee
index 81293b4ad..a796b705e 100644
--- a/server/commons/Handler.coffee
+++ b/server/commons/Handler.coffee
@@ -1,5 +1,5 @@
 async = require 'async'
-mongoose = require('mongoose')
+mongoose = require 'mongoose'
 Grid = require 'gridfs-stream'
 errors = require './errors'
 log = require 'winston'
@@ -7,7 +7,7 @@ Patch = require '../patches/Patch'
 User = require '../users/User'
 sendwithus = require '../sendwithus'
 
-PROJECT = {original:1, name:1, version:1, description: 1, slug:1, kind: 1}
+PROJECT = {original: 1, name: 1, version: 1, description: 1, slug: 1, kind: 1}
 FETCH_LIMIT = 200
 
 module.exports = class Handler
@@ -17,6 +17,7 @@ module.exports = class Handler
   postEditableProperties: []
   jsonSchema: {}
   waterfallFunctions: []
+  allowedMethods: ['GET', 'POST', 'PUT', 'PATCH']
 
   # subclasses should override these methods
   hasAccess: (req) -> true
@@ -63,26 +64,71 @@ module.exports = class Handler
 
   # generic handlers
   get: (req, res) ->
-    # by default, ordinary users never get unfettered access to the database
-    return @sendUnauthorizedError(res) unless req.user?.isAdmin()
+    @sendUnauthorizedError(res) if not @hasAccess(req)
 
-    # admins can send any sort of query down the wire, though
-    conditions = JSON.parse(req.query.conditions || '[]')
-    query = @modelClass.find()
+    specialParameters = ['term', 'project', 'conditions']
 
-    try
-      for condition in conditions
-        name = condition[0]
-        f = query[name]
-        args = condition[1..]
-        query = query[name](args...)
-    catch e
-      return @sendError(res, 422, 'Badly formed conditions.')
+    # If the model uses coco search it's probably a text search
+    if @modelClass.schema.uses_coco_search
+      term = req.query.term
+      matchedObjects = []
+      filters = if @modelClass.schema.uses_coco_versions or @modelClass.schema.uses_coco_permissions then [filter: {index: true}] else [filter: {}]
+      if @modelClass.schema.uses_coco_permissions and req.user
+        filters.push {filter: {index: req.user.get('id')}}
+      projection = null
+      if req.query.project is 'true'
+        projection = PROJECT
+      else if req.query.project
+        if @modelClass.className is 'User'
+          projection = PROJECT
+          log.warn 'Whoa, we haven\'t yet thought about public properties for User projection yet.'
+        else
+          projection = {}
+          projection[field] = 1 for field in req.query.project.split(',')
+      for filter in filters
+        callback = (err, results) =>
+          return @sendDatabaseError(res, err) if err
+          for r in results.results ? results
+            obj = r.obj ? r
+            continue if obj in matchedObjects  # TODO: probably need a better equality check
+            matchedObjects.push obj
+          filters.pop()  # doesn't matter which one
+          unless filters.length
+            res.send matchedObjects
+            res.end()
+        if term
+          filter.project = projection
+          @modelClass.textSearch term, filter, callback
+        else
+          args = [filter.filter]
+          args.push projection if projection
+          @modelClass.find(args...).limit(FETCH_LIMIT).exec callback
+    # if it's not a text search but the user is an admin, let him try stuff anyway
+    else if req.user?.isAdmin()
+      # admins can send any sort of query down the wire
+      filter = {}
+      filter[key] = (val for own key, val of req.query.filter when key not in specialParameters) if 'filter' of req.query
 
-    query.exec (err, documents) =>
-      return @sendDatabaseError(res, err) if err
-      documents = (@formatEntity(req, doc) for doc in documents)
-      @sendSuccess(res, documents)
+      query = @modelClass.find(filter)
+
+      # Conditions are chained query functions, for example: query.find().limit(20).sort('-dateCreated')
+      conditions = JSON.parse(req.query.conditions || '[]')
+      try
+        for condition in conditions
+          name = condition[0]
+          f = query[name]
+          args = condition[1..]
+          query = query[name](args...)
+      catch e
+        return @sendError(res, 422, 'Badly formed conditions.')
+
+      query.exec (err, documents) =>
+        return @sendDatabaseError(res, err) if err
+        documents = (@formatEntity(req, doc) for doc in documents)
+        @sendSuccess(res, documents)
+    # regular users are only allowed text searches for now, without any additional filters or sorting
+    else
+      return @sendUnauthorizedError(res)
 
   getById: (req, res, id) ->
     # return @sendNotFoundError(res) # for testing
@@ -105,7 +151,7 @@ module.exports = class Handler
     ids = req.query.ids or req.body.ids
     if @modelClass.schema.uses_coco_versions
       return @getNamesByOriginals(req, res)
-    @getPropertiesFromMultipleDocuments res, User, "name", ids
+    @getPropertiesFromMultipleDocuments res, User, 'name', ids
 
   getNamesByOriginals: (req, res) ->
     ids = req.query.ids or req.body.ids
@@ -153,50 +199,12 @@ module.exports = class Handler
         return @sendDatabaseError(res, err) if err
         @sendSuccess(res, @formatEntity(req, document))
 
-  search: (req, res) ->
-    unless @modelClass.schema.uses_coco_search
-      return @sendNotFoundError(res)
-
-    term = req.query.term
-    matchedObjects = []
-    filters = [{filter: {index: true}}]
-    if @modelClass.schema.uses_coco_permissions and req.user
-      filters.push {filter: {index: req.user.get('id')}}
-    projection = null
-    if req.query.project is 'true'
-      projection = PROJECT
-    else if req.query.project
-      if @modelClass.className is 'User'
-        projection = PROJECTION
-        log.warn "Whoa, we haven't yet thought about public properties for User projection yet."
-      else
-        projection = {}
-        projection[field] = 1 for field in req.query.project.split(',')
-    for filter in filters
-      callback = (err, results) =>
-        return @sendDatabaseError(res, err) if err
-        for r in results.results ? results
-          obj = r.obj ? r
-          continue if obj in matchedObjects  # TODO: probably need a better equality check
-          matchedObjects.push obj
-        filters.pop()  # doesn't matter which one
-        unless filters.length
-          res.send matchedObjects
-          res.end()
-      if term
-        filter.project = projection
-        @modelClass.textSearch term, filter, callback
-      else
-        args = [filter.filter]
-        args.push projection if projection
-        @modelClass.find(args...).limit(FETCH_LIMIT).exec callback
-
   versions: (req, res, id) ->
     # TODO: a flexible system for doing GAE-like cursors for these sort of paginating queries
     # Keeping it simple for now and just allowing access to the first FETCH_LIMIT results.
     query = {'original': mongoose.Types.ObjectId(id)}
     sort = {'created': -1}
-    selectString = 'slug name version commitMessage created permissions'
+    selectString = 'slug name version commitMessage created creator permissions'
     aggregate = $match: query
     @modelClass.aggregate(aggregate).project(selectString).limit(FETCH_LIMIT).sort(sort).exec (err, results) =>
       return @sendDatabaseError(res, err) if err
@@ -325,7 +333,8 @@ module.exports = class Handler
         newDocument.save (err) =>
           return @sendDatabaseError(res, err) if err
           @sendSuccess(res, @formatEntity(req, newDocument))
-          @notifyWatchersOfChange(req.user, newDocument, req.body.editPath) if @modelClass.schema.is_patchable
+          if @modelClass.schema.is_patchable
+            @notifyWatchersOfChange(req.user, newDocument, req.headers['x-current-path'])
 
       if major?
         parentDocument.makeNewMinorVersion(updatedObject, major, done)
@@ -375,7 +384,6 @@ module.exports = class Handler
       @modelClass.findOne {slug: idOrSlug}, (err, document) ->
         done(err, document)
 
-
   doWaterfallChecks: (req, document, done) ->
     return done(null, document) unless @waterfallFunctions.length
 
@@ -419,3 +427,7 @@ module.exports = class Handler
         dict[document.id] = document
       res.send dict
       res.end()
+
+  delete: (req, res) -> @sendMethodNotAllowed res, @allowedMethods, 'DELETE not allowed.'
+
+  head: (req, res) -> @sendMethodNotAllowed res, @allowedMethods, 'HEAD not allowed.'
diff --git a/server/commons/database.coffee b/server/commons/database.coffee
index d664725c0..c0656562c 100644
--- a/server/commons/database.coffee
+++ b/server/commons/database.coffee
@@ -20,9 +20,9 @@ module.exports.generateMongoConnectionString = ->
   else
     dbName = config.mongo.db
     dbName += '_unittest' if testing
-    address = config.mongo.host + ":" + config.mongo.port
+    address = config.mongo.host + ':' + config.mongo.port
     if config.mongo.username and config.mongo.password
-      address = config.mongo.username + ":" + config.mongo.password + "@" + address
+      address = config.mongo.username + ':' + config.mongo.password + '@' + address
     address = "mongodb://#{address}/#{dbName}"
 
   return address
diff --git a/server/commons/errors.coffee b/server/commons/errors.coffee
index 8af347126..819cb87a8 100644
--- a/server/commons/errors.coffee
+++ b/server/commons/errors.coffee
@@ -1,5 +1,3 @@
-
-
 module.exports.custom = (res, code=500, message='Internal Server Error') ->
   res.send code, message
   res.end()
@@ -17,8 +15,9 @@ module.exports.notFound = (res, message='Not found.') ->
   res.send 404, message
   res.end()
 
-module.exports.badMethod = (res, message='Method Not Allowed') ->
-  # TODO: The response MUST include an Allow header containing a list of valid methods for the requested resource
+module.exports.badMethod = (res, allowed=['GET', 'POST', 'PUT', 'PATCH'], message='Method Not Allowed') ->
+  allowHeader = _.reduce allowed, ((str, current) -> str += ', ' + current)
+  res.set 'Allow', allowHeader # TODO not sure if these are always the case
   res.send 405, message
   res.end()
 
@@ -34,10 +33,10 @@ module.exports.serverError = (res, message='Internal Server Error') ->
   res.send 500, message
   res.end()
 
-module.exports.gatewayTimeoutError = (res, message="Gateway timeout") ->
+module.exports.gatewayTimeoutError = (res, message='Gateway timeout') ->
   res.send 504, message
   res.end()
 
-module.exports.clientTimeout = (res, message="The server did not recieve the client response in a timely manner") ->
+module.exports.clientTimeout = (res, message='The server did not receive the client response in a timely manner') ->
   res.send 408, message
-  res.end()
\ No newline at end of file
+  res.end()
diff --git a/server/commons/logging.coffee b/server/commons/logging.coffee
index 37c6b5668..537e045e0 100644
--- a/server/commons/logging.coffee
+++ b/server/commons/logging.coffee
@@ -1,4 +1,4 @@
-winston = require('winston')
+winston = require 'winston'
 
 module.exports.setup = ->
   winston.remove(winston.transports.Console)
diff --git a/server/commons/mail.coffee b/server/commons/mail.coffee
index 96bb56e2d..e270bb2cd 100644
--- a/server/commons/mail.coffee
+++ b/server/commons/mail.coffee
@@ -8,8 +8,8 @@ module.exports.MAILCHIMP_GROUPS = ['Announcements', 'Adventurers', 'Artisans', '
 module.exports.NEWS_GROUPS = ['generalNews', 'adventurerNews', 'artisanNews', 'archmageNews', 'scribeNews', 'diplomatNews', 'ambassadorNews']
 
 nodemailer = require 'nodemailer'
-module.exports.transport = nodemailer.createTransport "SMTP",
+module.exports.transport = nodemailer.createTransport 'SMTP',
   service: config.mail.service
   user: config.mail.username
   pass: config.mail.password
-  authMethod: "LOGIN"
+  authMethod: 'LOGIN'
diff --git a/server/commons/mapping.coffee b/server/commons/mapping.coffee
index 3cfcc2164..802b33790 100644
--- a/server/commons/mapping.coffee
+++ b/server/commons/mapping.coffee
@@ -1,4 +1,3 @@
-
 module.exports.handlers =
   'article': 'articles/article_handler'
   'level': 'levels/level_handler'
@@ -9,9 +8,13 @@ module.exports.handlers =
   'patch': 'patches/patch_handler'
   'thang_type': 'levels/thangs/thang_type_handler'
   'user': 'users/user_handler'
+  'user_remark': 'users/remarks/user_remark_handler'
+  'achievement': 'achievements/achievement_handler'
+  'earned_achievement': 'achievements/earned_achievement_handler'
 
 module.exports.routes =
   [
+    'routes/admin'
     'routes/auth'
     'routes/contact'
     'routes/db'
@@ -21,4 +24,5 @@ module.exports.routes =
     'routes/mail'
     'routes/sprites'
     'routes/queue'
+    'routes/stacklead'
   ]
diff --git a/server/commons/queue.coffee b/server/commons/queue.coffee
index 0703427d4..312f60a6e 100644
--- a/server/commons/queue.coffee
+++ b/server/commons/queue.coffee
@@ -13,13 +13,11 @@ module.exports.queueClient = undefined
 defaultMessageVisibilityTimeoutInSeconds = 500
 defaultMessageReceiptTimeout = 10
 
-
 module.exports.initializeQueueClient = (cb) ->
   module.exports.queueClient = generateQueueClient() unless queueClient?
 
   cb?()
 
-
 generateQueueClient = ->
   #if config.queue.accessKeyId
   if false #TODO: Change this in production
@@ -27,49 +25,40 @@ generateQueueClient = ->
   else
     queueClient = new MongoQueueClient()
 
-
 class SQSQueueClient
   registerQueue: (queueName, options, callback) ->
     queueCreationOptions =
       QueueName: queueName
 
-    @sqs.createQueue queueCreationOptions, (err,data) =>
+    @sqs.createQueue queueCreationOptions, (err, data) =>
       @_logAndThrowFatalException "There was an error creating a new SQS queue, reason: #{JSON.stringify err}" if err?
 
       newQueue = new SQSQueue queueName, data.QueueUrl, @sqs
 
       callback? err, newQueue
 
-
   constructor: ->
     @_configure()
     @sqs = @_generateSQSInstance()
 
-
   _configure: ->
     aws.config.update
       accessKeyId: config.queue.accessKeyId
       secretAccessKey: config.queue.secretAccessKey
       region: config.queue.region
 
-
   _generateSQSInstance: -> new aws.SQS()
 
-
   _logAndThrowFatalException: (errorMessage) ->
     log.error errorMessage
     throw new Error errorMessage
 
-
-
 class SQSQueue extends events.EventEmitter
   constructor: (@queueName, @queueUrl, @sqs) ->
 
-
   subscribe: (eventName, callback) -> @on eventName, callback
   unsubscribe: (eventName, callback) -> @removeListener eventName, callback
 
-
   receiveMessage: (callback) ->
     queueReceiveOptions =
       QueueUrl: @queueUrl
@@ -77,14 +66,13 @@ class SQSQueue extends events.EventEmitter
 
     @sqs.receiveMessage queueReceiveOptions, (err, data) =>
       if err?
-        @emit 'error',err,originalData
+        @emit 'error', err, originalData
       else
         originalData = data
         data = new SQSMessage originalData, this
-        @emit 'message',err,data
-
-      callback? err,data
+        @emit 'message', err, data
 
+      callback? err, data
 
   deleteMessage: (receiptHandle, callback) ->
     queueDeletionOptions =
@@ -92,10 +80,9 @@ class SQSQueue extends events.EventEmitter
       ReceiptHandle: receiptHandle
 
     @sqs.deleteMessage queueDeletionOptions, (err, data) =>
-      if err? then @emit 'error',err,data else @emit 'message',err,data
-
-      callback? err,data
+      if err? then @emit 'error', err, data else @emit 'message', err, data
 
+      callback? err, data
 
   changeMessageVisibilityTimeout: (secondsFromNow, receiptHandle, callback) ->
     messageVisibilityTimeoutOptions =
@@ -104,10 +91,9 @@ class SQSQueue extends events.EventEmitter
       VisibilityTimeout: secondsFromNow
 
     @sqs.changeMessageVisibility messageVisibilityTimeoutOptions, (err, data) =>
-      if err? then @emit 'error',err,data else @emit 'edited',err,data
-
-      callback? err,data
+      if err? then @emit 'error', err, data else @emit 'edited', err, data
 
+      callback? err, data
 
   sendMessage: (messageBody, delaySeconds, callback) ->
     queueSendingOptions =
@@ -116,14 +102,12 @@ class SQSQueue extends events.EventEmitter
       DelaySeconds: delaySeconds
 
     @sqs.sendMessage queueSendingOptions, (err, data) =>
-      if err? then @emit 'error',err,data else @emit 'sent',err, data
-
-      callback? err,data
+      if err? then @emit 'error', err, data else @emit 'sent', err, data
 
+      callback? err, data
 
   listenForever: => async.forever (asyncCallback) => @receiveMessage (err, data) -> asyncCallback(null)
 
-
 class SQSMessage
   constructor: (@originalMessage, @parentQueue) ->
 
@@ -138,55 +122,46 @@ class SQSMessage
   requeue: (callback) -> @parentQueue.changeMessageVisibilityTimeout 0, @getReceiptHandle(), callback
 
   changeMessageVisibilityTimeout: (secondsFromFunctionCall, callback) ->
-    @parentQueue.changeMessageVisibilityTimeout secondsFromFunctionCall,@getReceiptHandle(), callback
+    @parentQueue.changeMessageVisibilityTimeout secondsFromFunctionCall, @getReceiptHandle(), callback
 
   getReceiptHandle: -> @originalMessage.Messages[0].ReceiptHandle
 
-
-
-
 class MongoQueueClient
   registerQueue: (queueName, options, callback) ->
-    newQueue = new MongoQueue queueName,options,@messageModel
+    newQueue = new MongoQueue queueName, options, @messageModel
     callback(null, newQueue)
 
-
   constructor: ->
     @_configure()
     @_createMongoConnection()
     @messageModel = @_generateMessageModel()
 
-
   _configure: -> @databaseAddress = db.generateMongoConnectionString()
 
-
   _createMongoConnection:  ->
     @mongooseConnection = mongoose.createConnection @databaseAddress
-    @mongooseConnection.on 'error', -> log.error "There was an error connecting to the queue in MongoDB"
-    @mongooseConnection.once 'open', -> log.info "Successfully connected to MongoDB queue!"
-
+    @mongooseConnection.on 'error', -> log.error 'There was an error connecting to the queue in MongoDB'
+    @mongooseConnection.once 'open', -> log.info 'Successfully connected to MongoDB queue!'
 
   _generateMessageModel: ->
     schema = new mongoose.Schema
       messageBody: Object,
-      queue: {type: String, index:true}
+      queue: {type: String, index: true}
       scheduledVisibilityTime: {type: Date, index: true}
       receiptHandle: {type: String, index: true}
 
-    @mongooseConnection.model 'messageQueue',schema
-
+    @mongooseConnection.model 'messageQueue', schema
 
 class MongoQueue extends events.EventEmitter
   constructor: (queueName, options, messageModel) ->
     @Message = messageModel
     @queueName = queueName
 
-
   subscribe: (eventName, callback) -> @on eventName, callback
   unsubscribe: (eventName, callback) -> @removeListener eventName, callback
 
   totalMessagesInQueue: (callback) -> @Message.count {}, callback
-    
+
   receiveMessage: (callback) ->
     conditions =
       queue: @queueName
@@ -202,13 +177,12 @@ class MongoQueue extends events.EventEmitter
         scheduledVisibilityTime: @_constructDefaultVisibilityTimeoutDate()
 
     @Message.findOneAndUpdate conditions, update, (err, data) =>
-      return @emit 'error',err,data if err?
+      return @emit 'error', err, data if err?
 
       originalData = data
       data = new MongoMessage originalData, this
-      @emit 'message',err,data
-      callback? err,data
-
+      @emit 'message', err, data
+      callback? err, data
 
   deleteMessage: (receiptHandle, callback) ->
     conditions =
@@ -218,10 +192,9 @@ class MongoQueue extends events.EventEmitter
         $gte: new Date()
 
     @Message.findOneAndRemove conditions, {}, (err, data) =>
-      if err? then @emit 'error',err,data else @emit 'delete',err,data
-
-      callback? err,data
+      if err? then @emit 'error', err, data else @emit 'delete', err, data
 
+      callback? err, data
 
   sendMessage: (messageBody, delaySeconds, callback) ->
     messageToSend = new @Message
@@ -229,9 +202,9 @@ class MongoQueue extends events.EventEmitter
       queue: @queueName
       scheduledVisibilityTime: @_constructDefaultVisibilityTimeoutDate delaySeconds
 
-    messageToSend.save (err,data) =>
-      if err? then @emit 'error',err,data else @emit 'sent',err, data
-      callback? err,data
+    messageToSend.save (err, data) =>
+      if err? then @emit 'error', err, data else @emit 'sent', err, data
+      callback? err, data
 
   changeMessageVisibilityTimeout: (secondsFromNow, receiptHandle, callback) ->
     conditions =
@@ -247,17 +220,15 @@ class MongoQueue extends events.EventEmitter
     @Message.findOneAndUpdate conditions, update, (err, data) =>
       if err?
         log.error "There was a problem updating the message visibility timeout:#{err}"
-        @emit 'error',err,data
+        @emit 'error', err, data
       else
-        @emit 'update',err,data
-        #log.info "The message visibility time was updated"
+        @emit 'update', err, data
+        #log.info 'The message visibility time was updated'
 
       callback? err, data
 
-
   listenForever: => async.forever (asyncCallback) => @recieveMessage (err, data) -> asyncCallback(null)
 
-
   _constructDefaultVisibilityTimeoutDate: (timeoutSeconds) ->
     timeoutSeconds ?= defaultMessageVisibilityTimeoutInSeconds
     newDate = new Date()
@@ -265,11 +236,8 @@ class MongoQueue extends events.EventEmitter
 
     newDate
 
-
   _generateRandomReceiptHandle: -> crypto.randomBytes(20).toString('hex')
 
-
-
 class MongoMessage
   constructor: (@originalMessage, @parentQueue) ->
 
@@ -284,6 +252,6 @@ class MongoMessage
   requeue: (callback) -> @parentQueue.changeMessageVisibilityTimeout 0, @getReceiptHandle(), callback
 
   changeMessageVisibilityTimeout: (secondsFromFunctionCall, callback) ->
-    @parentQueue.changeMessageVisibilityTimeout secondsFromFunctionCall,@getReceiptHandle(), callback
+    @parentQueue.changeMessageVisibilityTimeout secondsFromFunctionCall, @getReceiptHandle(), callback
 
   getReceiptHandle: -> @originalMessage.receiptHandle
diff --git a/server/levels/Level.coffee b/server/levels/Level.coffee
index 9cadeac7b..05cbdeb8f 100644
--- a/server/levels/Level.coffee
+++ b/server/levels/Level.coffee
@@ -1,6 +1,6 @@
-mongoose = require('mongoose')
-plugins = require('../plugins/plugins')
-jsonschema = require('../../app/schemas/models/level')
+mongoose = require 'mongoose'
+plugins = require '../plugins/plugins'
+jsonschema = require '../../app/schemas/models/level'
 
 LevelSchema = new mongoose.Schema({
   description: String
@@ -17,7 +17,7 @@ LevelSchema.pre 'init', (next) ->
   for prop, sch of jsonschema.properties
     @set(prop, _.cloneDeep(sch.default)) if sch.default?
   next()
-  
+
 LevelSchema.post 'init', (doc) ->
   if _.isString(doc.get('nextLevel'))
     doc.set('nextLevel', undefined)
diff --git a/server/levels/components/LevelComponent.coffee b/server/levels/components/LevelComponent.coffee
index 6c1a58370..6fb467908 100644
--- a/server/levels/components/LevelComponent.coffee
+++ b/server/levels/components/LevelComponent.coffee
@@ -1,6 +1,6 @@
-mongoose = require('mongoose')
-plugins = require('../../plugins/plugins')
-jsonschema = require('../../../app/schemas/models/level_component')
+mongoose = require 'mongoose'
+plugins = require '../../plugins/plugins'
+jsonschema = require '../../../app/schemas/models/level_component'
 
 LevelComponentSchema = new mongoose.Schema {
   description: String
diff --git a/server/levels/components/level_component_handler.coffee b/server/levels/components/level_component_handler.coffee
index 3bcc572d0..810fa3e86 100644
--- a/server/levels/components/level_component_handler.coffee
+++ b/server/levels/components/level_component_handler.coffee
@@ -1,5 +1,5 @@
-LevelComponent = require('./LevelComponent')
-Handler = require('../../commons/Handler')
+LevelComponent = require './LevelComponent'
+Handler = require '../../commons/Handler'
 
 LevelComponentHandler = class LevelComponentHandler extends Handler
   modelClass: LevelComponent
@@ -9,7 +9,7 @@ LevelComponentHandler = class LevelComponentHandler extends Handler
     'description'
     'code'
     'js'
-    'language'
+    'codeLanguage'
     'dependencies'
     'propertyDocumentation'
     'configSchema'
@@ -25,4 +25,4 @@ LevelComponentHandler = class LevelComponentHandler extends Handler
     req.method is 'GET' or req.user?.isAdmin()
 
 
-module.exports = new LevelComponentHandler()
\ No newline at end of file
+module.exports = new LevelComponentHandler()
diff --git a/server/levels/feedbacks/LevelFeedback.coffee b/server/levels/feedbacks/LevelFeedback.coffee
index 5fef6a567..523bf9120 100644
--- a/server/levels/feedbacks/LevelFeedback.coffee
+++ b/server/levels/feedbacks/LevelFeedback.coffee
@@ -1,8 +1,8 @@
 # TODO: not updated since rename from level_instance, or since we redid how all models are done; probably busted
 
-mongoose = require('mongoose')
-plugins = require('../../plugins/plugins')
-jsonschema = require('../../../app/schemas/models/level_feedback')
+mongoose = require 'mongoose'
+plugins = require '../../plugins/plugins'
+jsonschema = require '../../../app/schemas/models/level_feedback'
 
 LevelFeedbackSchema = new mongoose.Schema({
   created:
@@ -10,4 +10,4 @@ LevelFeedbackSchema = new mongoose.Schema({
     'default': Date.now
 }, {strict: false})
 
-module.exports = LevelFeedback = mongoose.model('level.feedback', LevelFeedbackSchema)
\ No newline at end of file
+module.exports = LevelFeedback = mongoose.model('level.feedback', LevelFeedbackSchema)
diff --git a/server/levels/feedbacks/level_feedback_handler.coffee b/server/levels/feedbacks/level_feedback_handler.coffee
index 58d268db1..4226b1d07 100644
--- a/server/levels/feedbacks/level_feedback_handler.coffee
+++ b/server/levels/feedbacks/level_feedback_handler.coffee
@@ -1,5 +1,5 @@
-LevelFeedback = require('./LevelFeedback')
-Handler = require('../../commons/Handler')
+LevelFeedback = require './LevelFeedback'
+Handler = require '../../commons/Handler'
 
 class LevelFeedbackHandler extends Handler
   modelClass: LevelFeedback
diff --git a/server/levels/level_handler.coffee b/server/levels/level_handler.coffee
index 27c5f0042..0843b0ffc 100644
--- a/server/levels/level_handler.coffee
+++ b/server/levels/level_handler.coffee
@@ -1,11 +1,12 @@
-Level = require('./Level')
-Session = require('./sessions/LevelSession')
+Level = require './Level'
+Session = require './sessions/LevelSession'
 User = require '../users/User'
-SessionHandler = require('./sessions/level_session_handler')
-Feedback = require('./feedbacks/LevelFeedback')
-Handler = require('../commons/Handler')
-mongoose = require('mongoose')
+SessionHandler = require './sessions/level_session_handler'
+Feedback = require './feedbacks/LevelFeedback'
+Handler = require '../commons/Handler'
+mongoose = require 'mongoose'
 async = require 'async'
+
 LevelHandler = class LevelHandler extends Handler
   modelClass: Level
   jsonSchema: require '../../app/schemas/models/level'
@@ -34,7 +35,7 @@ LevelHandler = class LevelHandler extends Handler
     return @getMyLeaderboardRank(req, res, args[0]) if args[1] is 'leaderboard_rank'
     return @getMySessions(req, res, args[0]) if args[1] is 'my_sessions'
     return @getFeedback(req, res, args[0]) if args[1] is 'feedback'
-    return @getRandomSessionPair(req,res,args[0]) if args[1] is 'random_session_pair'
+    return @getRandomSessionPair(req, res, args[0]) if args[1] is 'random_session_pair'
     return @getLeaderboardFacebookFriends(req, res, args[0]) if args[1] is 'leaderboard_facebook_friends'
     return @getLeaderboardGPlusFriends(req, res, args[0]) if args[1] is 'leaderboard_gplus_friends'
     return @getHistogramData(req, res, args[0]) if args[1] is 'histogram_data'
@@ -69,23 +70,22 @@ LevelHandler = class LevelHandler extends Handler
         return @sendSuccess(res, doc) if doc?
         @createAndSaveNewSession sessionQuery, req, res
 
-
   createAndSaveNewSession: (sessionQuery, req, res) =>
     initVals = sessionQuery
 
     initVals.state =
-      complete:false
+      complete: false
       scripts:
-        currentScript:null # will not save empty objects
+        currentScript: null # will not save empty objects
 
     initVals.permissions = [
       {
-        target:req.user.id
-        access:'owner'
+        target: req.user.id
+        access: 'owner'
       }
       {
-        target:'public'
-        access:'write'
+        target: 'public'
+        access: 'write'
       }
     ]
     initVals.codeLanguage = req.user.get('aceConfig')?.language ? 'javascript'
@@ -101,9 +101,9 @@ LevelHandler = class LevelHandler extends Handler
   getMySessions: (req, res, slugOrID) ->
     findParameters = {}
     if Handler.isID slugOrID
-      findParameters["_id"] = slugOrID
+      findParameters['_id'] = slugOrID
     else
-      findParameters["slug"] = slugOrID
+      findParameters['slug'] = slugOrID
     selectString = 'original version.major permissions'
     query = Level.findOne(findParameters)
       .select(selectString)
@@ -122,23 +122,23 @@ LevelHandler = class LevelHandler extends Handler
       query.exec (err, results) =>
         if err then @sendDatabaseError(res, err) else @sendSuccess res, results
 
-  getHistogramData: (req, res,slug) ->
+  getHistogramData: (req, res, slug) ->
     query = Session.aggregate [
-      {$match: {"levelID":slug, "submitted": true, "team":req.query.team}}
+      {$match: {'levelID': slug, 'submitted': true, 'team': req.query.team}}
       {$project: {totalScore: 1, _id: 0}}
     ]
 
     query.exec (err, data) =>
       if err? then return @sendDatabaseError res, err
-      valueArray = _.pluck data, "totalScore"
+      valueArray = _.pluck data, 'totalScore'
       @sendSuccess res, valueArray
 
   checkExistence: (req, res, slugOrID) ->
     findParameters = {}
     if Handler.isID slugOrID
-      findParameters["_id"] = slugOrID
+      findParameters['_id'] = slugOrID
     else
-      findParameters["slug"] = slugOrID
+      findParameters['slug'] = slugOrID
     selectString = 'original version.major permissions'
     query = Level.findOne(findParameters)
     .select(selectString)
@@ -147,14 +147,14 @@ LevelHandler = class LevelHandler extends Handler
     query.exec (err, level) =>
       return @sendDatabaseError(res, err) if err
       return @sendNotFoundError(res) unless level?
-      res.send({"exists":true})
+      res.send({'exists': true})
       res.end()
 
   getLeaderboard: (req, res, id) ->
     sessionsQueryParameters = @makeLeaderboardQueryParameters(req, id)
 
     sortParameters =
-      "totalScore": req.query.order
+      'totalScore': req.query.order
     selectProperties = ['totalScore', 'creatorName', 'creator']
 
     query = Session
@@ -180,7 +180,7 @@ LevelHandler = class LevelHandler extends Handler
     [original, version] = id.split '.'
     version = parseInt(version) ? 0
     scoreQuery = {}
-    scoreQuery[if req.query.order is 1 then "$gt" else "$lt"] = req.query.scoreOffset
+    scoreQuery[if req.query.order is 1 then '$gt' else '$lt'] = req.query.scoreOffset
     query =
       level:
         original: original
@@ -203,14 +203,14 @@ LevelHandler = class LevelHandler extends Handler
     return res.send([]) unless friendIDs.length
 
     q = {}
-    q[serviceProperty] = {$in:friendIDs}
+    q[serviceProperty] = {$in: friendIDs}
     query = User.find(q).select("#{serviceProperty} name").lean()
 
     query.exec (err, userResults) ->
       return res.send([]) unless userResults.length
       [id, version] = id.split('.')
       userIDs = (r._id+'' for r in userResults)
-      q = {'level.original':id, 'level.majorVersion': parseInt(version), creator: {$in:userIDs}, totalScore:{$exists:true}}
+      q = {'level.original': id, 'level.majorVersion': parseInt(version), creator: {$in: userIDs}, totalScore: {$exists: true}}
       query = Session.find(q)
       .select('creator creatorName totalScore team')
       .lean()
@@ -225,9 +225,9 @@ LevelHandler = class LevelHandler extends Handler
   getRandomSessionPair: (req, res, slugOrID) ->
     findParameters = {}
     if Handler.isID slugOrID
-      findParameters["_id"] = slugOrID
+      findParameters['_id'] = slugOrID
     else
-      findParameters["slug"] = slugOrID
+      findParameters['slug'] = slugOrID
     selectString = 'original version'
     query = Level.findOne(findParameters)
     .select(selectString)
@@ -241,17 +241,17 @@ LevelHandler = class LevelHandler extends Handler
         level:
           original: level.original.toString()
           majorVersion: level.version.major
-        submitted:true
+        submitted: true
 
-      query = Session.find(sessionsQueryParameters).distinct("team")
+      query = Session.find(sessionsQueryParameters).distinct('team')
       query.exec (err, teams) =>
         return @sendDatabaseError res, err if err? or not teams
         findTop20Players = (sessionQueryParams, team, cb) ->
-          sessionQueryParams["team"] = team
+          sessionQueryParams['team'] = team
           Session.aggregate [
             {$match: sessionQueryParams}
-            {$project: {"totalScore":1}}
-            {$sort: {"totalScore":-1}}
+            {$project: {'totalScore': 1}}
+            {$sort: {'totalScore': -1}}
             {$limit: 20}
           ], cb
 
@@ -260,10 +260,9 @@ LevelHandler = class LevelHandler extends Handler
           sessions = []
           for mapItem in map
             sessions.push _.sample(mapItem)
-          if map.length != 2 then return @sendDatabaseError res, "There aren't sessions of 2 teams, so cannot choose random opponents!"
+          if map.length != 2 then return @sendDatabaseError res, 'There aren\'t sessions of 2 teams, so cannot choose random opponents!'
           @sendSuccess res, sessions
 
-
   getFeedback: (req, res, id) ->
     return @sendNotFoundError(res) unless req.user
     @fetchLevelByIDAndHandleErrors id, req, res, (err, level) =>
diff --git a/server/levels/sessions/LevelSession.coffee b/server/levels/sessions/LevelSession.coffee
index c30519ba0..4873e40a5 100644
--- a/server/levels/sessions/LevelSession.coffee
+++ b/server/levels/sessions/LevelSession.coffee
@@ -1,8 +1,9 @@
 # TODO: not updated since rename from level_instance, or since we redid how all models are done; probably busted
 
-mongoose = require('mongoose')
-plugins = require('../../plugins/plugins')
-jsonschema = require('../../../app/schemas/models/level_session')
+mongoose = require 'mongoose'
+plugins = require '../../plugins/plugins'
+AchievablePlugin = require '../../plugins/achievements'
+jsonschema = require '../../../app/schemas/models/level_session'
 
 LevelSessionSchema = new mongoose.Schema({
   created:
@@ -10,6 +11,7 @@ LevelSessionSchema = new mongoose.Schema({
     'default': Date.now
 }, {strict: false})
 LevelSessionSchema.plugin(plugins.PermissionsPlugin)
+LevelSessionSchema.plugin(AchievablePlugin)
 
 LevelSessionSchema.pre 'init', (next) ->
   # TODO: refactor this into a set of common plugins for all models?
@@ -22,4 +24,4 @@ LevelSessionSchema.pre 'save', (next) ->
   @set('changed', new Date())
   next()
 
-module.exports = LevelSession = mongoose.model('level.session', LevelSessionSchema)
\ No newline at end of file
+module.exports = LevelSession = mongoose.model('level.session', LevelSessionSchema)
diff --git a/server/levels/sessions/level_session_handler.coffee b/server/levels/sessions/level_session_handler.coffee
index 1c03a17f6..b1179acf8 100644
--- a/server/levels/sessions/level_session_handler.coffee
+++ b/server/levels/sessions/level_session_handler.coffee
@@ -1,5 +1,5 @@
-LevelSession = require('./LevelSession')
-Handler = require('../../commons/Handler')
+LevelSession = require './LevelSession'
+Handler = require '../../commons/Handler'
 log = require 'winston'
 
 TIMEOUT = 1000 * 30 # no activity for 30 seconds means it's not active
@@ -8,20 +8,21 @@ class LevelSessionHandler extends Handler
   modelClass: LevelSession
   editableProperties: ['multiplayer', 'players', 'code', 'codeLanguage', 'completed', 'state',
                        'levelName', 'creatorName', 'levelID', 'screenshot',
-                       'chat', 'teamSpells', 'submitted', 'unsubscribed','playtime']
+                       'chat', 'teamSpells', 'submitted', 'submittedCodeLanguage', 'unsubscribed', 'playtime']
+  privateProperties: ['code', 'submittedCode', 'unsubscribed']
   jsonSchema: require '../../../app/schemas/models/level_session'
 
   getByRelationship: (req, res, args...) ->
     return @getActiveSessions req, res if args.length is 2 and args[1] is 'active'
     super(arguments...)
-    
+
   formatEntity: (req, document) ->
     documentObject = super(req, document)
-    if req.user.isAdmin() or req.user.id is document.creator
+    if req.user.isAdmin() or req.user.id is document.creator or ('employer' in req.user.get('permissions'))
       return documentObject
     else
-      return _.omit documentObject, ['submittedCode','code']
-      
+      return _.omit documentObject, @privateProperties
+
   getActiveSessions: (req, res) ->
     return @sendUnauthorizedError(res) unless req.user.isAdmin()
     start = new Date()
@@ -34,6 +35,7 @@ class LevelSessionHandler extends Handler
 
   hasAccessToDocument: (req, document, method=null) ->
     return true if req.method is 'GET' and document.get('totalScore')
+    return true if ('employer' in req.user.get('permissions')) and (method ? req.method).toLowerCase() is 'get'
     super(arguments...)
 
 module.exports = new LevelSessionHandler()
diff --git a/server/levels/systems/LevelSystem.coffee b/server/levels/systems/LevelSystem.coffee
index f945aaa95..b553cdd89 100644
--- a/server/levels/systems/LevelSystem.coffee
+++ b/server/levels/systems/LevelSystem.coffee
@@ -1,6 +1,6 @@
-mongoose = require('mongoose')
-plugins = require('../../plugins/plugins')
-jsonschema = require('../../../app/schemas/models/level_system')
+mongoose = require 'mongoose'
+plugins = require '../../plugins/plugins'
+jsonschema = require '../../../app/schemas/models/level_system'
 
 LevelSystemSchema = new mongoose.Schema {
   description: String
diff --git a/server/levels/systems/level_system_handler.coffee b/server/levels/systems/level_system_handler.coffee
index bf1bb39d5..ef9dd5d2b 100644
--- a/server/levels/systems/level_system_handler.coffee
+++ b/server/levels/systems/level_system_handler.coffee
@@ -1,5 +1,5 @@
-LevelSystem = require('./LevelSystem')
-Handler = require('../../commons/Handler')
+LevelSystem = require './LevelSystem'
+Handler = require '../../commons/Handler'
 
 LevelSystemHandler = class LevelSystemHandler extends Handler
   modelClass: LevelSystem
@@ -7,7 +7,7 @@ LevelSystemHandler = class LevelSystemHandler extends Handler
     'description'
     'code'
     'js'
-    'language'
+    'codeLanguage'
     'dependencies'
     'propertyDocumentation'
     'configSchema'
diff --git a/server/levels/thangs/LevelThangType.coffee b/server/levels/thangs/LevelThangType.coffee
index 98d89c4b3..264ef5348 100644
--- a/server/levels/thangs/LevelThangType.coffee
+++ b/server/levels/thangs/LevelThangType.coffee
@@ -1,5 +1,5 @@
-mongoose = require('mongoose')
-plugins = require('../../plugins/plugins')
+mongoose = require 'mongoose'
+plugins = require '../../plugins/plugins'
 
 LevelComponentSchema = new mongoose.Schema(
   original: {type: mongoose.Schema.ObjectId, ref: 'level.session'}
diff --git a/server/levels/thangs/ThangType.coffee b/server/levels/thangs/ThangType.coffee
index 292597719..78ee66180 100644
--- a/server/levels/thangs/ThangType.coffee
+++ b/server/levels/thangs/ThangType.coffee
@@ -1,5 +1,5 @@
-mongoose = require('mongoose')
-plugins = require('../../plugins/plugins')
+mongoose = require 'mongoose'
+plugins = require '../../plugins/plugins'
 
 ThangTypeSchema = new mongoose.Schema({
   body: String,
diff --git a/server/levels/thangs/thang_type_handler.coffee b/server/levels/thangs/thang_type_handler.coffee
index a8d5c05e7..9e51a80f3 100644
--- a/server/levels/thangs/thang_type_handler.coffee
+++ b/server/levels/thangs/thang_type_handler.coffee
@@ -1,5 +1,5 @@
-ThangType = require('./ThangType')
-Handler = require('../../commons/Handler')
+ThangType = require './ThangType'
+Handler = require '../../commons/Handler'
 
 ThangTypeHandler = class ThangTypeHandler extends Handler
   modelClass: ThangType
diff --git a/server/patches/Patch.coffee b/server/patches/Patch.coffee
index 3e12638cf..05227e7f6 100644
--- a/server/patches/Patch.coffee
+++ b/server/patches/Patch.coffee
@@ -1,4 +1,4 @@
-mongoose = require('mongoose')
+mongoose = require 'mongoose'
 {handlers} = require '../commons/mapping'
 
 PatchSchema = new mongoose.Schema({}, {strict: false})
@@ -10,22 +10,22 @@ PatchSchema.pre 'save', (next) ->
   Handler = require '../commons/Handler'
   if not Handler.isID(targetID)
     err = new Error('Invalid input.')
-    err.response = {message:"isn't a MongoDB id.", property:'target.id'}
+    err.response = {message: 'isn\'t a MongoDB id.', property: 'target.id'}
     err.code = 422
     return next(err)
-  
+
   collection = target.collection
   handler = require('../' + handlers[collection])
   handler.getDocumentForIdOrSlug targetID, (err, document) =>
     if err
       err = new Error('Server error.')
-      err.response = {message:'', property:'target.id'}
+      err.response = {message: '', property: 'target.id'}
       err.code = 500
       return next(err)
 
     if not document
       err = new Error('Target of patch not found.')
-      err.response = {message:'was not found.', property:'target.id'}
+      err.response = {message: 'was not found.', property: 'target.id'}
       err.code = 404
       return next(err)
 
@@ -37,7 +37,7 @@ PatchSchema.pre 'save', (next) ->
       @set('target', target)
     else
       target.original = targetID
-    
+
     patches = document.get('patches') or []
     patches = _.clone patches
     patches.push @_id
diff --git a/server/patches/patch_handler.coffee b/server/patches/patch_handler.coffee
index 7d30ce353..f9c3a2224 100644
--- a/server/patches/patch_handler.coffee
+++ b/server/patches/patch_handler.coffee
@@ -1,9 +1,9 @@
-Patch = require('./Patch')
+Patch = require './Patch'
 User = require '../users/User'
-Handler = require('../commons/Handler')
+Handler = require '../commons/Handler'
 schema = require '../../app/schemas/models/patch'
 {handlers} = require '../commons/mapping'
-mongoose = require('mongoose')
+mongoose = require 'mongoose'
 log = require 'winston'
 sendwithus = require '../sendwithus'
 
@@ -23,12 +23,12 @@ PatchHandler = class PatchHandler extends Handler
   getByRelationship: (req, res, args...) ->
     return @setStatus(req, res, args[0]) if req.route.method is 'put' and args[1] is 'status'
     super(arguments...)
-    
+
   setStatus: (req, res, id) ->
     newStatus = req.body.status
     unless newStatus in ['rejected', 'accepted', 'withdrawn']
-      return @sendBadInputError(res, "Status must be 'rejected', 'accepted', or 'withdrawn'")
-      
+      return @sendBadInputError(res, 'Status must be "rejected", "accepted", or "withdrawn"')
+
     @getDocumentForIdOrSlug id, (err, patch) =>
       return @sendDatabaseError(res, err) if err
       return @sendNotFoundError(res) unless patch?
@@ -45,25 +45,25 @@ PatchHandler = class PatchHandler extends Handler
 
         if newStatus in ['rejected', 'accepted']
           return @sendUnauthorizedError(res) unless targetHandler.hasAccessToDocument(req, target, 'put')
-        
+
         if newStatus is 'withdrawn'
           return @sendUnauthorizedError(res) unless req.user.get('_id').equals patch.get('creator')
-          
+
         # these require callbacks
-        patch.update {$set:{status:newStatus}}, {}, ->
-        target.update {$pull:{patches:patch.get('_id')}}, {}, ->
+        patch.update {$set: {status: newStatus}}, {}, ->
+        target.update {$pull: {patches: patch.get('_id')}}, {}, ->
         @sendSuccess(res, null)
 
   onPostSuccess: (req, doc) ->
-    log.error "Error sending patch created: could not find the loaded target on the patch object." unless doc.targetLoaded
+    log.error 'Error sending patch created: could not find the loaded target on the patch object.' unless doc.targetLoaded
     return unless doc.targetLoaded
     watchers = doc.targetLoaded.get('watchers') or []
     watchers = (w for w in watchers when not w.equals(req.user.get('_id')))
     return unless watchers?.length
-    User.find({_id:{$in:watchers}}).select({email:1, name:1}).exec (err, watchers) =>
+    User.find({_id: {$in: watchers}}).select({email: 1, name: 1}).exec (err, watchers) =>
       for watcher in watchers
         @sendPatchCreatedEmail req.user, watcher, doc, doc.targetLoaded, req.body.editPath
-    
+
   sendPatchCreatedEmail: (patchCreator, watcher, patch, target, editPath) ->
 #    return if watcher._id is patchCreator._id
     context =
diff --git a/server/plugins/achievements.coffee b/server/plugins/achievements.coffee
new file mode 100644
index 000000000..431775268
--- /dev/null
+++ b/server/plugins/achievements.coffee
@@ -0,0 +1,96 @@
+mongoose = require 'mongoose'
+EarnedAchievement = require '../achievements/EarnedAchievement'
+LocalMongo = require '../../app/lib/LocalMongo'
+util = require '../../app/lib/utils'
+log = require 'winston'
+
+achievements = {}
+
+module.exports = AchievablePlugin = (schema, options) ->
+  User = require '../users/User'  # Avoid mutual inclusion cycles
+  Achievement = require '../achievements/Achievement'
+
+  checkForAchievement = (doc) ->
+    collectionName = doc.constructor.modelName
+
+  before = {}
+
+  schema.post 'init', (doc) ->
+    before[doc.id] = doc.toObject()
+
+  schema.post 'save', (doc) ->
+    isNew = not doc.isInit('_id')
+    originalDocObj = before[doc.id] unless isNew
+
+    category = doc.constructor.modelName
+
+    if category of achievements
+      docObj = doc.toObject()
+      for achievement in achievements[category]
+        query = achievement.get('query')
+        isRepeatable = achievement.get('proportionalTo')?
+        alreadyAchieved = if isNew then false else LocalMongo.matchesQuery originalDocObj, query
+        newlyAchieved = LocalMongo.matchesQuery(docObj, query)
+        log.debug 'isRepeatable: ' + isRepeatable
+        log.debug 'alreadyAchieved: ' +  alreadyAchieved
+        log.debug 'newlyAchieved: ' + newlyAchieved
+
+        userObjectID = doc.get(achievement.get('userField'))
+        userID = if _.isObject userObjectID then userObjectID.toHexString() else userObjectID # Standardize! Use strings, not ObjectId's
+
+        if newlyAchieved and (not alreadyAchieved or isRepeatable)
+          earned = {
+            user: userID
+            achievement: achievement._id.toHexString()
+            achievementName: achievement.get 'name'
+          }
+
+          worth = achievement.get('worth')
+          earnedPoints = 0
+          wrapUp = ->
+            # Update user's experience points
+            User.update({_id: userID}, {$inc: {points: earnedPoints}}, {}, (err, count) ->
+              console.error err if err?
+            )
+
+          if isRepeatable
+            log.debug 'Upserting repeatable achievement called \'' + (achievement.get 'name') + '\' for ' + userID
+            proportionalTo = achievement.get 'proportionalTo'
+            originalAmount = util.getByPath(originalDocObj, proportionalTo) or 0
+            newAmount = docObj[proportionalTo]
+
+            if originalAmount isnt newAmount
+              expFunction = achievement.getExpFunction()
+              earned.notified = false
+              earned.achievedAmount = newAmount
+              earned.earnedPoints = (expFunction(newAmount) - expFunction(originalAmount)) * worth
+              earned.previouslyAchievedAmount = originalAmount
+              EarnedAchievement.update {achievement: earned.achievement, user: earned.user}, earned, {upsert: true}, (err) ->
+                return log.debug err if err?
+
+              earnedPoints = earned.earnedPoints
+              log.debug earnedPoints
+              wrapUp()
+
+          else # not alreadyAchieved
+            log.debug 'Creating a new earned achievement called \'' + (achievement.get 'name') + '\' for ' + userID
+            earned.earnedPoints = worth
+            (new EarnedAchievement(earned)).save (err, doc) ->
+              return log.debug err if err?
+              earnedPoints = worth
+              wrapUp()
+
+    delete before[doc.id] unless isNew # This assumes everything we patch has a _id
+    return
+
+module.exports.loadAchievements = ->
+  achievements = {}
+  Achievement = require '../achievements/Achievement'
+  query = Achievement.find({})
+  query.exec (err, docs) ->
+    _.each docs, (achievement) ->
+      category = achievement.get 'collection'
+      achievements[category] = [] unless category of achievements
+      achievements[category].push achievement
+
+AchievablePlugin.loadAchievements()
diff --git a/server/plugins/plugins.coffee b/server/plugins/plugins.coffee
index 4b189967e..e36bb16de 100644
--- a/server/plugins/plugins.coffee
+++ b/server/plugins/plugins.coffee
@@ -1,12 +1,29 @@
-mongoose = require('mongoose')
-User = require('../users/User')
-textSearch = require('mongoose-text-search')
+mongoose = require 'mongoose'
+textSearch = require 'mongoose-text-search'
+
+module.exports.MigrationPlugin = (schema, migrations) ->
+  # Property name migrations made EZ
+  # This is for just when you want one property to be named differently
+
+  # 1. Change the schema and the client/server logic to use the new name
+  # 2. Add this plugin to the target models, passing in a dictionary of old/new names.
+  # 3. Check that tests still run, deploy to production.
+  # 4. Run db.<collection>.update({}, {$rename: {'<oldname>': '<newname>'}}, {multi: true}) on the server
+  # 5. Remove the names you added to the migrations dictionaries for the next deploy
+
+  schema.post 'init', ->
+    for oldKey in _.keys migrations
+      val = @get oldKey
+      @set oldKey, undefined
+      continue if val is undefined
+      newKey = migrations[oldKey]
+      @set newKey, val
 
 module.exports.PatchablePlugin = (schema) ->
   schema.is_patchable = true
-  schema.index({'target.original':1, 'status':'1', 'created':-1})
-  
-RESERVED_NAMES = ['search', 'names']
+  schema.index({'target.original': 1, 'status': '1', 'created': -1})
+
+RESERVED_NAMES = ['names']
 
 module.exports.NamedPlugin = (schema) ->
   schema.uses_coco_names = true
@@ -21,7 +38,7 @@ module.exports.NamedPlugin = (schema) ->
     newSlug = _.str.slugify(@get('name'))
     if newSlug in RESERVED_NAMES
       err = new Error('Reserved name.')
-      err.response = {message:' is a reserved name', property: 'name'}
+      err.response = {message: ' is a reserved name', property: 'name'}
       err.code = 422
       return next(err)
     if newSlug isnt @get('slug')
@@ -40,29 +57,27 @@ module.exports.NamedPlugin = (schema) ->
       err.code = 422
       done(err)
 
-    query = { slug:slug }
+    query = {slug: slug}
 
     if @get('original')
-      query.original = {'$ne':@original}
+      query.original = {'$ne': @original}
     else if @_id
-      query._id = {'$ne':@_id}
+      query._id = {'$ne': @_id}
 
     @model(@constructor.modelName).count query, (err, count) ->
       if count
         err = new Error('Slug conflict.')
-        err.response = {message:'is already in use', property:'name'}
+        err.response = {message: 'is already in use', property: 'name'}
         err.code = 409
         done(err)
       done()
 
-
-
 module.exports.PermissionsPlugin = (schema) ->
   schema.uses_coco_permissions = true
 
   PermissionSchema = new mongoose.Schema
     target: mongoose.Schema.Types.Mixed
-    access: {type: String, 'enum':['read', 'write', 'owner']}
+    access: {type: String, 'enum': ['read', 'write', 'owner']}
   , {id: false, _id: false}
 
   schema.add(permissions: [PermissionSchema])
@@ -70,7 +85,7 @@ module.exports.PermissionsPlugin = (schema) ->
   schema.pre 'save', (next) ->
     return next() if @getOwner()
     err = new Error('Permissions needs an owner.')
-    err.response = {message:'needs an owner.', property:'permissions'}
+    err.response = {message: 'needs an owner.', property: 'permissions'}
     err.code = 409
     next(err)
 
@@ -126,7 +141,7 @@ module.exports.VersionedPlugin = (schema) ->
     original: {type: mongoose.Schema.ObjectId, ref: @modelName}
     parent: {type: mongoose.Schema.ObjectId, ref: @modelName}
     creator: {type: mongoose.Schema.ObjectId, ref: 'User'}
-    created: { type: Date, 'default': Date.now }
+    created: {type: Date, 'default': Date.now}
     commitMessage: {type: String}
   )
 
@@ -136,15 +151,15 @@ module.exports.VersionedPlugin = (schema) ->
 
   schema.statics.getLatestMajorVersion = (original, options, done) ->
     options = options or {}
-    query = @findOne({original:original, 'version.isLatestMajor':true})
+    query = @findOne({original: original, 'version.isLatestMajor': true})
     query.select(options.select) if options.select
     query.exec((err, latest) =>
       return done(err) if err
       return done(null, latest) if latest
 
       # handle the case where no version is marked as the latest
-      q = @find({original:original})
-      q.sort({'version.major':-1, 'version.minor':-1})
+      q = @find({original: original})
+      q.sort({'version.major': -1, 'version.minor': -1})
       q.select(options.select) if options.select
       q.limit(1)
       q.exec((err, latest) =>
@@ -164,13 +179,13 @@ module.exports.VersionedPlugin = (schema) ->
 
   schema.statics.getLatestMinorVersion = (original, majorVersion, options, done) ->
     options = options or {}
-    query = @findOne({original:original, 'version.isLatestMinor':true, 'version.major':majorVersion})
+    query = @findOne({original: original, 'version.isLatestMinor': true, 'version.major': majorVersion})
     query.select(options.select) if options.select
     query.exec((err, latest) =>
       return done(err) if err
       return done(null, latest) if latest
-      q = @find({original:original, 'version.major':majorVersion})
-      q.sort({'version.minor':-1})
+      q = @find({original: original, 'version.major': majorVersion})
+      q.sort({'version.minor': -1})
       q.select(options.select) if options.select
       q.limit(1)
       q.exec((err, latest) ->
@@ -190,17 +205,17 @@ module.exports.VersionedPlugin = (schema) ->
   schema.methods.makeNewMajorVersion = (newObject, done) ->
     Model = @model(@constructor.modelName)
 
-    latest = Model.getLatestMajorVersion(@original, {select:'version'}, (err, latest) =>
+    latest = Model.getLatestMajorVersion(@original, {select: 'version'}, (err, latest) =>
       return done(err) if err
 
       updatedObject = _.cloneDeep latestObject
       # unmark the current latest major version in the database
       latestObject = latest.toObject()
       latestObject.version.isLatestMajor = false
-      Model.update({_id: latest._id}, {version: latestObject.version, $unset: {index:1, slug: 1} }, {}, (err) =>
+      Model.update({_id: latest._id}, {version: latestObject.version, $unset: {index: 1, slug: 1}}, {}, (err) =>
         return done(err) if err
 
-        newObject['version'] = { major: latest.version.major + 1 }
+        newObject['version'] = {major: latest.version.major + 1}
         newObject.index = true
         newObject.parent = @_id
         delete newObject['_id']
@@ -212,7 +227,7 @@ module.exports.VersionedPlugin = (schema) ->
   schema.methods.makeNewMinorVersion = (newObject, majorVersion, done) ->
     Model = @model(@constructor.modelName)
 
-    latest = Model.getLatestMinorVersion(@original, majorVersion, {select:'version'}, (err, latest) =>
+    latest = Model.getLatestMinorVersion(@original, majorVersion, {select: 'version'}, (err, latest) =>
       return done(err) if err
 
       # unmark the current latest major version in the database
@@ -220,7 +235,7 @@ module.exports.VersionedPlugin = (schema) ->
       wasLatestMajor = latestObject.version.isLatestMajor
       latestObject.version.isLatestMajor = false
       latestObject.version.isLatestMinor = false
-      Model.update({_id: latest._id}, {version: latestObject.version, $unset: {index:1, slug: 1}}, {}, (err) =>
+      Model.update({_id: latest._id}, {version: latestObject.version, $unset: {index: 1, slug: 1}}, {}, (err) =>
         return done(err) if err
 
         newObject['version'] =
@@ -239,7 +254,6 @@ module.exports.VersionedPlugin = (schema) ->
       )
     )
 
-
 module.exports.SearchablePlugin = (schema, options) ->
   # this plugin must be added only after the others (specifically Versioned and Permissions)
   # have been added, as how it builds the text search index depends on which of those are used.
@@ -257,9 +271,9 @@ module.exports.SearchablePlugin = (schema, options) ->
 
   index[prop] = 'text' for prop in searchable
 
-  # should now have something like {'index': 1, name:'text', body:'text'}
+  # should now have something like {'index': 1, name: 'text', body: 'text'}
   schema.plugin(textSearch)
-  schema.index(index, { sparse: true, name: 'search index', language_override: 'searchLanguage' })
+  schema.index(index, {sparse: true, name: 'search index', language_override: 'searchLanguage'})
 
   schema.pre 'save', (next) ->
     # never index old versions, index plugin handles un-indexing old versions
diff --git a/server/queues/scoring.coffee b/server/queues/scoring.coffee
index 149afa959..4a57234c1 100644
--- a/server/queues/scoring.coffee
+++ b/server/queues/scoring.coffee
@@ -16,15 +16,14 @@ bayes = new (require 'bayesian-battle')()
 scoringTaskQueue = undefined
 scoringTaskTimeoutInSeconds = 240
 
-
 module.exports.setup = (app) -> connectToScoringQueue()
 
 connectToScoringQueue = ->
   queues.initializeQueueClient ->
-    queues.queueClient.registerQueue "scoring", {}, (error,data) ->
+    queues.queueClient.registerQueue 'scoring', {}, (error, data) ->
       if error? then throw new Error  "There was an error registering the scoring queue: #{error}"
       scoringTaskQueue = data
-      log.info "Connected to scoring task queue!"
+      log.info 'Connected to scoring task queue!'
 
 module.exports.messagesInQueueCount = (req, res) ->
   scoringTaskQueue.totalMessagesInQueue (err, count) ->
@@ -33,18 +32,16 @@ module.exports.messagesInQueueCount = (req, res) ->
     res.send(response)
     res.end()
 
-
 module.exports.addPairwiseTaskToQueueFromRequest = (req, res) ->
   taskPair = req.body.sessions
   addPairwiseTaskToQueue req.body.sessions, (err, success) ->
     if err? then return errors.serverError res, "There was an error adding pairwise tasks: #{err}"
-    sendResponseObject req, res, {"message":"All task pairs were succesfully sent to the queue"}
-
+    sendResponseObject req, res, {'message': 'All task pairs were succesfully sent to the queue'}
 
 addPairwiseTaskToQueue = (taskPair, cb) ->
-  LevelSession.findOne(_id:taskPair[0]).lean().exec (err, firstSession) =>
+  LevelSession.findOne(_id: taskPair[0]).lean().exec (err, firstSession) =>
     if err? then return cb err
-    LevelSession.find(_id:taskPair[1]).exec (err, secondSession) =>
+    LevelSession.find(_id: taskPair[1]).exec (err, secondSession) =>
       if err? then return cb err
       try
         taskPairs = generateTaskPairs(secondSession, firstSession)
@@ -57,7 +54,7 @@ addPairwiseTaskToQueue = (taskPair, cb) ->
 
 # We should rip these out, probably
 module.exports.resimulateAllSessions = (req, res) ->
-  unless isUserAdmin req then return errors.unauthorized res, "Unauthorized. Even if you are authorized, you shouldn't do this"
+  unless isUserAdmin req then return errors.unauthorized res, 'Unauthorized. Even if you are authorized, you shouldn\'t do this'
 
   originalLevelID = req.body.originalLevelID
   levelMajorVersion = parseInt(req.body.levelMajorVersion)
@@ -75,9 +72,9 @@ module.exports.resimulateAllSessions = (req, res) ->
   query.exec (err, result) ->
     if err? then return errors.serverError res, err
     result = _.sample result, 10
-    async.each result, resimulateSession.bind(@,originalLevelID,levelMajorVersion), (err) ->
+    async.each result, resimulateSession.bind(@, originalLevelID, levelMajorVersion), (err) ->
       if err? then return errors.serverError res, err
-      sendResponseObject req, res, {"message":"All task pairs were succesfully sent to the queue"}
+      sendResponseObject req, res, {'message': 'All task pairs were succesfully sent to the queue'}
 
 resimulateSession = (originalLevelID, levelMajorVersion, session, cb) =>
   sessionUpdateObject =
@@ -109,7 +106,7 @@ selectRandomSkipIndex = (numberOfSessions) ->
     numberWeights[index] = lambda*Math.exp(-1*lambda*number) + lambda/(numberOfSessions/15)
   sum = numberWeights.reduce (a, b) -> a + b
 
-  for number,index in numberWeights
+  for number, index in numberWeights
     numberWeights[index] /= sum
 
   rand = (min, max) -> Math.random() * (max - min) + min
@@ -125,91 +122,102 @@ selectRandomSkipIndex = (numberOfSessions) ->
       return numbers[i]
 
 module.exports.getTwoGames = (req, res) ->
-  #if userIsAnonymous req then return errors.unauthorized(res, "You need to be logged in to get games.")
+  #if userIsAnonymous req then return errors.unauthorized(res, 'You need to be logged in to get games.')
   humansGameID = req.body.humansGameID
   ogresGameID = req.body.ogresGameID
 
   unless ogresGameID and humansGameID
     #fetch random games here
     queryParams =
-      "levelID":"greed"
-      "submitted":true
-      "team":"humans"
-    selection = "team totalScore transpiledCode teamSpells levelID creatorName creator submitDate"
+      'levelID': 'greed'
+      'submitted': true
+      'team': 'humans'
+    selection = 'team totalScore transpiledCode submittedCodeLanguage teamSpells levelID creatorName creator submitDate'
     LevelSession.count queryParams, (err, numberOfHumans) =>
-      if err? then return errors.serverError(res, "Couldn't get the number of human games")
-      humanSkipCount = selectRandomSkipIndex(numberOfHumans)
+      if err? then return errors.serverError(res, 'Couldn\'t get the number of human games')
+      unless numberOfHumans
+        res.send(204, 'No games to score.')
+        return res.end()
+      humanSkipCount = Math.floor(Math.random() * numberOfHumans)
       ogreCountParams =
-        "levelID": "greed"
-        "submitted":true
-        "team":"ogres"
+        'levelID': 'greed'
+        'submitted': true
+        'team': 'ogres'
       LevelSession.count ogreCountParams, (err, numberOfOgres) =>
-        if err? then return errors.serverError(res, "Couldnt' get the number of ogre games")
-        ogresSkipCount = selectRandomSkipIndex(numberOfOgres)
+        if err? then return errors.serverError(res, 'Couldn\'t get the number of ogre games')
+        unless numberOfOgres
+          res.send(204, 'No games to score.')
+          return res.end()
+        ogresSkipCount = Math.floor(Math.random() * numberOfOgres)
 
         query = LevelSession
           .aggregate()
           .match(queryParams)
           .project(selection)
-          .sort({"submitDate": -1})
+          .sort({'submitDate': -1})
           .skip(humanSkipCount)
           .limit(1)
         query.exec (err, randomSession) =>
           if err? then return errors.serverError(res, "Couldn't select a random session! #{err}")
           randomSession = randomSession[0]
           queryParams =
-            "levelID":"greed"
-            "submitted":true
-            "team": "ogres"
+            'levelID': 'greed'
+            'submitted': true
+            'team': 'ogres'
           query = LevelSession
             .aggregate()
             .match(queryParams)
             .project(selection)
-            .sort({"submitDate": -1})
+            .sort({'submitDate': -1})
             .skip(ogresSkipCount)
             .limit(1)
           query.exec (err, otherSession) =>
-            if err? then return errors.serverError(res, "Couldnt' select the other random session!")
+            if err? then return errors.serverError(res, 'Couldn\'t select the other random session!')
             otherSession = otherSession[0]
             taskObject =
-              "messageGenerated": Date.now()
-              "sessions": []
+              'messageGenerated': Date.now()
+              'sessions': []
             for session in [randomSession, otherSession]
               sessionInformation =
-                "sessionID": session._id
-                "team": session.team ? "No team"
-                "transpiledCode": session.transpiledCode
-                "teamSpells": session.teamSpells ? {}
-                "levelID": session.levelID
-                "creatorName": session.creatorName
-                "creator": session.creator
-                "totalScore": session.totalScore
+                'sessionID': session._id
+                'team': session.team ? 'No team'
+                'transpiledCode': session.transpiledCode
+                'submittedCodeLanguage': session.submittedCodeLanguage
+                'teamSpells': session.teamSpells ? {}
+                'levelID': session.levelID
+                'creatorName': session.creatorName
+                'creator': session.creator
+                'totalScore': session.totalScore
               taskObject.sessions.push sessionInformation
-            console.log "Dispatching random game between", taskObject.sessions[0].creatorName, "and", taskObject.sessions[1].creatorName
+            console.log 'Dispatching random game between', taskObject.sessions[0].creatorName, 'and', taskObject.sessions[1].creatorName
             sendResponseObject req, res, taskObject
   else
     console.log "Directly simulating #{humansGameID} vs. #{ogresGameID}."
-    LevelSession.findOne(_id: humansGameID).lean().exec (err, humanSession) =>
-      if err? then return errors.serverError(res, "Couldn't find the human game")
-      LevelSession.findOne(_id: ogresGameID).lean().exec (err, ogreSession) =>
-        if err? then return errors.serverError(res, "Couldn't find the ogre game")
+    LevelSession.findOne(_id: humansGameID).select(selection).lean().exec (err, humanSession) =>
+      if err? then return errors.serverError(res, 'Couldn\'t find the human game')
+      LevelSession.findOne(_id: ogresGameID).select(selection).lean().exec (err, ogreSession) =>
+        if err? then return errors.serverError(res, 'Couldn\'t find the ogre game')
         taskObject =
-          "messageGenerated": Date.now()
-          "sessions": []
+          'messageGenerated': Date.now()
+          'sessions': []
         for session in [humanSession, ogreSession]
           sessionInformation =
-            "sessionID": session._id
-            "team": session.team ? "No team"
-            "transpiledCode": session.transpiledCode
-            "teamSpells": session.teamSpells ? {}
-            "levelID": session.levelID
+            'sessionID': session._id
+            'team': session.team ? 'No team'
+            'transpiledCode': session.transpiledCode
+            'submittedCodeLanguage': session.submittedCodeLanguage
+            'teamSpells': session.teamSpells ? {}
+            'levelID': session.levelID
+            'creatorName': session.creatorName
+            'creator': session.creator
+            'totalScore': session.totalScore
 
           taskObject.sessions.push sessionInformation
         sendResponseObject req, res, taskObject
 
 module.exports.recordTwoGames = (req, res) ->
   sessions = req.body.sessions
-  console.log "Recording non-chained result of", sessions?[0]?.name, sessions[0]?.metrics?.rank, "and", sessions?[1]?.name, sessions?[1]?.metrics?.rank
+  console.log 'Recording non-chained result of', sessions?[0]?.name, sessions[0]?.metrics?.rank, 'and', sessions?[1]?.name, sessions?[1]?.metrics?.rank
 
   yetiGuru = clientResponseObject: req.body, isRandomMatch: true
   async.waterfall [
@@ -220,9 +228,7 @@ module.exports.recordTwoGames = (req, res) ->
     updateUserSimulationCounts.bind(yetiGuru, req.user._id)
   ], (err, successMessageObject) ->
     if err? then return errors.serverError res, "There was an error recording the single game:#{err}"
-    sendResponseObject req, res, {"message":"The single game was submitted successfully!"}
-
-
+    sendResponseObject req, res, {'message': 'The single game was submitted successfully!'}
 
 module.exports.createNewTask = (req, res) ->
   requestSessionID = req.body.session
@@ -233,8 +239,8 @@ module.exports.createNewTask = (req, res) ->
 
   yetiGuru = {}
   async.waterfall [
-    validatePermissions.bind(yetiGuru,req,requestSessionID)
-    fetchAndVerifyLevelType.bind(yetiGuru,currentLevelID)
+    validatePermissions.bind(yetiGuru, req, requestSessionID)
+    fetchAndVerifyLevelType.bind(yetiGuru, currentLevelID)
     fetchSessionObjectToSubmit.bind(yetiGuru, requestSessionID)
     updateSessionToSubmit.bind(yetiGuru, transpiledCode)
     fetchInitialSessionsToRankAgainst.bind(yetiGuru, requestLevelMajorVersion, originalLevelID)
@@ -243,9 +249,8 @@ module.exports.createNewTask = (req, res) ->
     if err? then return errors.serverError res, "There was an error submitting the game to the queue:#{err}"
     sendResponseObject req, res, successMessageObject
 
-
-validatePermissions = (req,sessionID, callback) ->
-  if isUserAnonymous req then return callback "You are unauthorized to submit that game to the simulator"
+validatePermissions = (req, sessionID, callback) ->
+  if isUserAnonymous req then return callback 'You are unauthorized to submit that game to the simulator'
   if isUserAdmin req then return callback null
 
   findParameters =
@@ -260,7 +265,7 @@ validatePermissions = (req,sessionID, callback) ->
     if err? then return callback err
     userHasPermissionToSubmitCode = retrievedSession.creator is req.user?.id and
       not _.isEqual(retrievedSession.code, retrievedSession.submittedCode)
-    unless userHasPermissionToSubmitCode then return callback "You are unauthorized to submit that game to the simulator"
+    unless userHasPermissionToSubmitCode then return callback 'You are unauthorized to submit that game to the simulator'
     callback null
 
 fetchAndVerifyLevelType = (levelID, cb) ->
@@ -274,7 +279,7 @@ fetchAndVerifyLevelType = (levelID, cb) ->
   .lean()
   query.exec (err, levelWithType) ->
     if err? then return cb err
-    if not levelWithType.type or levelWithType.type isnt "ladder" then return cb "Level isn't of type 'ladder'"
+    if not levelWithType.type or levelWithType.type isnt 'ladder' then return cb 'Level isn\'t of type "ladder"'
     cb null
 
 fetchSessionObjectToSubmit = (sessionID, callback) ->
@@ -308,8 +313,8 @@ fetchInitialSessionsToRankAgainst = (levelMajorVersion, levelID, submittedSessio
   opposingTeam = calculateOpposingTeam(submittedSession.team)
 
   findParameters =
-    "level.original": levelID
-    "level.majorVersion": levelMajorVersion
+    'level.original': levelID
+    'level.majorVersion': levelMajorVersion
     submitted: true
     submittedCode:
       $exists: true
@@ -328,20 +333,18 @@ fetchInitialSessionsToRankAgainst = (levelMajorVersion, levelID, submittedSessio
   query.exec (err, sessionToRankAgainst) ->
     callback err, sessionToRankAgainst, submittedSession
 
-
-generateAndSendTaskPairsToTheQueue = (sessionToRankAgainst,submittedSession, callback) ->
+generateAndSendTaskPairsToTheQueue = (sessionToRankAgainst, submittedSession, callback) ->
   taskPairs = generateTaskPairs(sessionToRankAgainst, submittedSession)
   sendEachTaskPairToTheQueue taskPairs, (taskPairError) ->
     if taskPairError? then return callback taskPairError
-    #console.log "Sent task pairs to the queue!"
+    #console.log 'Sent task pairs to the queue!'
     #console.log taskPairs
-    callback null, {"message": "All task pairs were succesfully sent to the queue"}
-
+    callback null, {'message': 'All task pairs were succesfully sent to the queue'}
 
 module.exports.dispatchTaskToConsumer = (req, res) ->
   yetiGuru = {}
   async.waterfall [
-    checkSimulationPermissions.bind(yetiGuru,req)
+    checkSimulationPermissions.bind(yetiGuru, req)
     receiveMessageFromSimulationQueue
     changeMessageVisibilityTimeout
     parseTaskQueueMessage
@@ -350,33 +353,31 @@ module.exports.dispatchTaskToConsumer = (req, res) ->
     processTaskObject
   ], (err, taskObjectToSend) ->
     if err?
-      if typeof err is "string" and err.indexOf "No more games in the queue" isnt -1
-        res.send(204, "No games to score.")
+      if typeof err is 'string' and err.indexOf 'No more games in the queue' isnt -1
+        res.send(204, 'No games to score.')
         return res.end()
       else
         return errors.serverError res, "There was an error dispatching the task: #{err}"
     sendResponseObject req, res, taskObjectToSend
 
-
-
 checkSimulationPermissions = (req, cb) ->
   if isUserAnonymous req
-    cb "You need to be logged in to simulate games"
+    cb 'You need to be logged in to simulate games'
   else
     cb null
 
 receiveMessageFromSimulationQueue = (cb) ->
   scoringTaskQueue.receiveMessage (err, message) ->
     if err? then return cb "No more games in the queue, error:#{err}"
-    if messageIsInvalid(message) then return cb "Message received from queue is invalid"
+    if messageIsInvalid(message) then return cb 'Message received from queue is invalid'
     cb null, message
 
 changeMessageVisibilityTimeout = (message, cb) ->
   message.changeMessageVisibilityTimeout scoringTaskTimeoutInSeconds, (err) -> cb err, message
 
-parseTaskQueueMessage = (message,cb) ->
+parseTaskQueueMessage = (message, cb) ->
   try
-    if typeof message.getBody() is "object"
+    if typeof message.getBody() is 'object'
       messageBody = message.getBody()
     else
       messageBody = JSON.parse message.getBody()
@@ -389,33 +390,34 @@ constructTaskObject = (taskMessageBody, message, callback) ->
     if err? then return callback err
 
     taskObject =
-      "messageGenerated": Date.now()
-      "sessions": []
+      'messageGenerated': Date.now()
+      'sessions': []
 
     for session in sessions
       sessionInformation =
-        "sessionID": session._id
-        "submitDate": session.submitDate
-        "team": session.team ? "No team"
-        "transpiledCode": session.transpiledCode
-        "teamSpells": session.teamSpells ? {}
-        "levelID": session.levelID
-        "creator": session.creator
-        "creatorName":session.creatorName
-        "totalScore": session.totalScore
+        'sessionID': session._id
+        'submitDate': session.submitDate
+        'team': session.team ? 'No team'
+        'transpiledCode': session.transpiledCode
+        'submittedCodeLanguage': session.submittedCodeLanguage
+        'teamSpells': session.teamSpells ? {}
+        'levelID': session.levelID
+        'creator': session.creator
+        'creatorName': session.creatorName
+        'totalScore': session.totalScore
 
       taskObject.sessions.push sessionInformation
     callback null, taskObject, message
 
 constructTaskLogObject = (calculatorUserID, taskObject, message, callback) ->
   taskLogObject = new TaskLog
-    "createdAt": new Date()
-    "calculator":calculatorUserID
-    "sentDate": Date.now()
-    "messageIdentifierString":message.getReceiptHandle()
+    'createdAt': new Date()
+    'calculator': calculatorUserID
+    'sentDate': Date.now()
+    'messageIdentifierString': message.getReceiptHandle()
   taskLogObject.save (err) -> callback err, taskObject, taskLogObject, message
 
-processTaskObject = (taskObject,taskLogObject, message, cb) ->
+processTaskObject = (taskObject, taskLogObject, message, cb) ->
   taskObject.taskID = taskLogObject._id
   taskObject.receiptHandle = message.getReceiptHandle()
   cb null, taskObject
@@ -423,23 +425,22 @@ processTaskObject = (taskObject,taskLogObject, message, cb) ->
 getSessionInformation = (sessionIDString, callback) ->
   findParameters =
     _id: sessionIDString
-  selectString = 'submitDate team submittedCode teamSpells levelID creator creatorName transpiledCode totalScore'
+  selectString = 'submitDate team submittedCode teamSpells levelID creator creatorName transpiledCode submittedCodeLanguage totalScore'
   query = LevelSession
   .findOne(findParameters)
   .select(selectString)
   .lean()
 
   query.exec (err, session) ->
-    if err? then return callback err, {"error":"There was an error retrieving the session."}
+    if err? then return callback err, {'error': 'There was an error retrieving the session.'}
     callback null, session
 
-
 module.exports.processTaskResult = (req, res) ->
   originalSessionID = req.body?.originalSessionID
   yetiGuru = {}
   try
     async.waterfall [
-      verifyClientResponse.bind(yetiGuru,req.body)
+      verifyClientResponse.bind(yetiGuru, req.body)
       fetchTaskLog.bind(yetiGuru)
       checkTaskLog.bind(yetiGuru)
       deleteQueueMessage.bind(yetiGuru)
@@ -454,29 +455,29 @@ module.exports.processTaskResult = (req, res) ->
       findNearestBetterSessionID.bind(yetiGuru)
       addNewSessionsToQueue.bind(yetiGuru)
     ], (err, results) ->
-      if err is "shouldn't continue"
+      if err is 'shouldn\'t continue'
         markSessionAsDoneRanking originalSessionID, (err) ->
-          if err? then return sendResponseObject req, res, {"error":"There was an error marking the session as done ranking"}
-          sendResponseObject req, res, {"message":"The scores were updated successfully, person lost so no more games are being inserted!"}
-      else if err is "no session was found"
+          if err? then return sendResponseObject req, res, {'error': 'There was an error marking the session as done ranking'}
+          sendResponseObject req, res, {'message': 'The scores were updated successfully, person lost so no more games are being inserted!'}
+      else if err is 'no session was found'
         markSessionAsDoneRanking originalSessionID, (err) ->
-          if err? then return sendResponseObject req, res, {"error":"There was an error marking the session as done ranking"}
-          sendResponseObject req, res, {"message":"There were no more games to rank (game is at top)!"}
+          if err? then return sendResponseObject req, res, {'error': 'There was an error marking the session as done ranking'}
+          sendResponseObject req, res, {'message': 'There were no more games to rank (game is at top)!'}
       else if err?
         errors.serverError res, "There was an error:#{err}"
       else
-        sendResponseObject req, res, {"message":"The scores were updated successfully and more games were sent to the queue!"}
+        sendResponseObject req, res, {'message': 'The scores were updated successfully and more games were sent to the queue!'}
   catch e
-    errors.serverError res, "There was an error processing the task result!"
+    errors.serverError res, 'There was an error processing the task result!'
 
 verifyClientResponse = (responseObject, callback) ->
   #TODO: better verification
-  if typeof responseObject isnt "object" or responseObject?.originalSessionID?.length isnt 24
-    callback "The response to that query is required to be a JSON object."
+  if typeof responseObject isnt 'object' or responseObject?.originalSessionID?.length isnt 24
+    callback 'The response to that query is required to be a JSON object.'
   else
     @clientResponseObject = responseObject
 
-    #log.info "Verified client response!"
+    #log.info 'Verified client response!'
     callback null, responseObject
 
 fetchTaskLog = (responseObject, callback) ->
@@ -484,18 +485,18 @@ fetchTaskLog = (responseObject, callback) ->
   query.exec (err, taskLog) =>
     return callback new Error("Couldn't find TaskLog for _id #{responseObject.taskID}!") unless taskLog
     @taskLog = taskLog
-    #log.info "Fetched task log!"
+    #log.info 'Fetched task log!'
     callback err, taskLog.toObject()
 
 checkTaskLog = (taskLog, callback) ->
-  if taskLog.calculationTimeMS then return callback "That computational task has already been performed"
-  if hasTaskTimedOut taskLog.sentDate then return callback "The task has timed out"
-  #log.info "Checked task log"
+  if taskLog.calculationTimeMS then return callback 'That computational task has already been performed'
+  if hasTaskTimedOut taskLog.sentDate then return callback 'The task has timed out'
+  #log.info 'Checked task log'
   callback null
 
 deleteQueueMessage = (callback) ->
   scoringTaskQueue.deleteMessage @clientResponseObject.receiptHandle, (err) ->
-    #log.info "Deleted queue message"
+    #log.info 'Deleted queue message'
     callback err
 
 fetchLevelSession = (callback) ->
@@ -507,32 +508,31 @@ fetchLevelSession = (callback) ->
   .lean()
   query.exec (err, session) =>
     @levelSession = session
-    #log.info "Fetched level session"
+    #log.info 'Fetched level session'
     callback err
 
-
 checkSubmissionDate = (callback) ->
   supposedSubmissionDate = new Date(@clientResponseObject.sessions[0].submitDate)
   if Number(supposedSubmissionDate) isnt Number(@levelSession.submitDate)
-    callback "The game has been resubmitted. Removing from queue..."
+    callback 'The game has been resubmitted. Removing from queue...'
   else
-    #log.info "Checked submission date"
+    #log.info 'Checked submission date'
     callback null
 
 logTaskComputation = (callback) ->
-  @taskLog.set('calculationTimeMS',@clientResponseObject.calculationTimeMS)
+  @taskLog.set('calculationTimeMS', @clientResponseObject.calculationTimeMS)
   @taskLog.set('sessions')
   @taskLog.calculationTimeMS = @clientResponseObject.calculationTimeMS
   @taskLog.sessions = @clientResponseObject.sessions
   @taskLog.save (err, saved) ->
-    #log.info "Logged task computation"
+    #log.info 'Logged task computation'
     callback err
 
 updateSessions = (callback) ->
   sessionIDs = _.pluck @clientResponseObject.sessions, 'sessionID'
 
   async.map sessionIDs, retrieveOldSessionData, (err, oldScores) =>
-    if err? then callback err, {"error": "There was an error retrieving the old scores"}
+    if err? then callback err, {'error': 'There was an error retrieving the old scores'}
     try
       oldScoreArray = _.toArray putRankingFromMetricsIntoScoreObject @clientResponseObject, oldScores
       newScoreArray = bayes.updatePlayerSkills oldScoreArray
@@ -542,12 +542,12 @@ updateSessions = (callback) ->
 
 saveNewScoresToDatabase = (newScoreArray, callback) ->
   async.eachSeries newScoreArray, updateScoreInSession, (err) ->
-    #log.info "Saved new scores to database"
-    callback err,newScoreArray
+    #log.info 'Saved new scores to database'
+    callback err, newScoreArray
 
 
-updateScoreInSession = (scoreObject,callback) ->
-  LevelSession.findOne {"_id": scoreObject.id}, (err, session) ->
+updateScoreInSession = (scoreObject, callback) ->
+  LevelSession.findOne {'_id': scoreObject.id}, (err, session) ->
     if err? then return callback err, null
 
     session = session.toObject()
@@ -559,7 +559,7 @@ updateScoreInSession = (scoreObject,callback) ->
       totalScore: newTotalScore
       $push: {scoreHistory: {$each: [scoreHistoryAddition], $slice: -1000}}
 
-    LevelSession.update {"_id": scoreObject.id}, updateObject, callback
+    LevelSession.update {'_id': scoreObject.id}, updateObject, callback
     #log.info "New total score for session #{scoreObject.id} is #{updateObject.totalScore}"
 
 indexNewScoreArray = (newScoreArray, callback) ->
@@ -582,10 +582,10 @@ addMatchToSessions = (newScoreObject, callback) ->
     matchObject.opponents[sessionID].metrics.rank = Number(newScoreObject[sessionID]?.gameRanking ? 0)
 
   #log.info "Match object computed, result: #{matchObject}"
-  #log.info "Writing match object to database..."
+  #log.info 'Writing match object to database...'
   #use bind with async to do the writes
   sessionIDs = _.pluck @clientResponseObject.sessions, 'sessionID'
-  async.each sessionIDs, updateMatchesInSession.bind(@,matchObject), (err) ->
+  async.each sessionIDs, updateMatchesInSession.bind(@, matchObject), (err) ->
     callback err
 
 updateMatchesInSession = (matchObject, sessionID, callback) ->
@@ -596,18 +596,18 @@ updateMatchesInSession = (matchObject, sessionID, callback) ->
   opponentsClone = _.omit opponentsClone, sessionID
   opponentsArray = _.toArray opponentsClone
   currentMatchObject.opponents = opponentsArray
-  LevelSession.findOne {"_id": sessionID}, (err, session) ->
+  LevelSession.findOne {'_id': sessionID}, (err, session) ->
     session = session.toObject()
     currentMatchObject.playtime = session.playtime ? 0
     sessionUpdateObject =
       $push: {matches: {$each: [currentMatchObject], $slice: -200}}
     #log.info "Updating session #{sessionID}"
-    LevelSession.update {"_id":sessionID}, sessionUpdateObject, callback
+    LevelSession.update {'_id': sessionID}, sessionUpdateObject, callback
 
-updateUserSimulationCounts = (reqUserID,callback) ->
+updateUserSimulationCounts = (reqUserID, callback) ->
   incrementUserSimulationCount reqUserID, 'simulatedBy', (err) =>
     if err? then return callback err
-    console.log "Incremented user simulation count!"
+    console.log 'Incremented user simulation count!'
     unless @isRandomMatch
       incrementUserSimulationCount @levelSession.creator, 'simulatedFor', callback
     else
@@ -628,31 +628,30 @@ determineIfSessionShouldContinueAndUpdateLog = (cb) ->
     _id: sessionID
 
   updateParameters =
-    "$inc": {}
+    '$inc': {}
 
   if sessionRank is 0
-    updateParameters["$inc"] = {numberOfWinsAndTies: 1}
+    updateParameters['$inc'] = {numberOfWinsAndTies: 1}
   else
-    updateParameters["$inc"] = {numberOfLosses: 1}
+    updateParameters['$inc'] = {numberOfLosses: 1}
 
-  LevelSession.findOneAndUpdate queryParameters, updateParameters,{select: 'numberOfWinsAndTies numberOfLosses'}, (err, updatedSession) ->
+  LevelSession.findOneAndUpdate queryParameters, updateParameters, {select: 'numberOfWinsAndTies numberOfLosses'}, (err, updatedSession) ->
     if err? then return cb err, updatedSession
     updatedSession = updatedSession.toObject()
 
     totalNumberOfGamesPlayed = updatedSession.numberOfWinsAndTies + updatedSession.numberOfLosses
     if totalNumberOfGamesPlayed < 10
-      #console.log "Number of games played is less than 10, continuing..."
+      #console.log 'Number of games played is less than 10, continuing...'
       cb null
     else
       ratio = (updatedSession.numberOfLosses) / (totalNumberOfGamesPlayed)
       if ratio > 0.33
-        cb "shouldn't continue"
+        cb 'shouldn\'t continue'
         console.log "Ratio(#{ratio}) is bad, ending simulation"
       else
         #console.log "Ratio(#{ratio}) is good, so continuing simulations"
         cb null
 
-
 findNearestBetterSessionID = (cb) ->
   try
     levelOriginalID = @levelSession.level.original
@@ -673,8 +672,8 @@ findNearestBetterSessionID = (cb) ->
         $gt: opponentSessionTotalScore
       _id:
         $nin: opponentSessionIDs
-      "level.original": levelOriginalID
-      "level.majorVersion": levelMajorVersion
+      'level.original': levelOriginalID
+      'level.majorVersion': levelMajorVersion
       submitted: true
       submittedCode:
         $exists: true
@@ -683,7 +682,7 @@ findNearestBetterSessionID = (cb) ->
     if opponentSessionTotalScore < 30
       # Don't play a ton of matches at low scores--skip some in proportion to how close to 30 we are.
       # TODO: this could be made a lot more flexible.
-      queryParameters["totalScore"]["$gt"] = opponentSessionTotalScore + 2 * (30 - opponentSessionTotalScore) / 20
+      queryParameters['totalScore']['$gt'] = opponentSessionTotalScore + 2 * (30 - opponentSessionTotalScore) / 20
 
     limitNumber = 1
 
@@ -701,13 +700,12 @@ findNearestBetterSessionID = (cb) ->
     #console.log "Finding session with score near #{opponentSessionTotalScore}"
     query.exec (err, session) ->
       if err? then return cb err, session
-      unless session then return cb "no session was found"
+      unless session then return cb 'no session was found'
       #console.log "Found session with score #{session.totalScore}"
       cb err, session._id
 
-
 retrieveAllOpponentSessionIDs = (sessionID, cb) ->
-  query = LevelSession.findOne({"_id":sessionID})
+  query = LevelSession.findOne({'_id': sessionID})
   .select('matches.opponents.sessionID matches.date submitDate')
   .lean()
   query.exec (err, session) ->
@@ -715,13 +713,11 @@ retrieveAllOpponentSessionIDs = (sessionID, cb) ->
     opponentSessionIDs = (match.opponents[0].sessionID for match in session.matches when match.date > session.submitDate)
     cb err, opponentSessionIDs
 
-
 calculateOpposingTeam = (sessionTeam) ->
-  teams = ['ogres','humans']
+  teams = ['ogres', 'humans']
   opposingTeams = _.pull teams, sessionTeam
   return opposingTeams[0]
 
-
 addNewSessionsToQueue = (sessionID, callback) ->
   sessions = [@clientResponseObject.originalSessionID, sessionID]
   addPairwiseTaskToQueue sessions, callback
@@ -735,15 +731,15 @@ generateTaskPairs = (submittedSessions, sessionToScore) ->
   for session in submittedSessions
     if session.toObject?
       session = session.toObject()
-    teams = ['ogres','humans']
+    teams = ['ogres', 'humans']
     opposingTeams = _.pull teams, sessionToScore.team
     if String(session._id) isnt String(sessionToScore._id) and session.team in opposingTeams
-      #console.log "Adding game to taskPairs!"
-      taskPairs.push [sessionToScore._id,String session._id]
+      #console.log 'Adding game to taskPairs!'
+      taskPairs.push [sessionToScore._id, String session._id]
   return taskPairs
 
 sendTaskPairToQueue = (taskPair, callback) ->
-  scoringTaskQueue.sendMessage {sessions: taskPair}, 5, (err,data) -> callback? err,data
+  scoringTaskQueue.sendMessage {sessions: taskPair}, 5, (err, data) -> callback? err, data
 
 getUserIDFromRequest = (req) -> if req.user? then return req.user._id else return null
 
@@ -751,14 +747,14 @@ isUserAnonymous = (req) -> if req.user? then return req.user.get('anonymous') el
 
 isUserAdmin = (req) -> return Boolean(req.user?.isAdmin())
 
-sendResponseObject = (req,res,object) ->
+sendResponseObject = (req, res, object) ->
   res.setHeader('Content-Type', 'application/json')
   res.send(object)
   res.end()
 
 hasTaskTimedOut = (taskSentTimestamp) -> taskSentTimestamp + scoringTaskTimeoutInSeconds * 1000 < Date.now()
 
-handleTimedOutTask = (req, res, taskBody) -> errors.clientTimeout res, "The results weren't provided within the timeout"
+handleTimedOutTask = (req, res, taskBody) -> errors.clientTimeout res, 'The results weren\'t provided within the timeout'
 
 putRankingFromMetricsIntoScoreObject = (taskObject, scoreObject) ->
   scoreObject = _.indexBy scoreObject, 'id'
@@ -766,17 +762,17 @@ putRankingFromMetricsIntoScoreObject = (taskObject, scoreObject) ->
   return scoreObject
 
 retrieveOldSessionData = (sessionID, callback) ->
-  LevelSession.findOne {"_id":sessionID}, (err, session) ->
-    return callback err, {"error":"There was an error retrieving the session."} if err?
+  LevelSession.findOne {'_id': sessionID}, (err, session) ->
+    return callback err, {'error': 'There was an error retrieving the session.'} if err?
 
     session = session.toObject()
     oldScoreObject =
-      "standardDeviation":session.standardDeviation ? 25/3
-      "meanStrength":session.meanStrength ? 25
-      "totalScore":session.totalScore ? (25 - 1.8*(25/3))
-      "id": sessionID
+      'standardDeviation': session.standardDeviation ? 25/3
+      'meanStrength': session.meanStrength ? 25
+      'totalScore': session.totalScore ? (25 - 1.8*(25/3))
+      'id': sessionID
     callback err, oldScoreObject
 
 markSessionAsDoneRanking = (sessionID, cb) ->
-  #console.log "Marking session as done ranking..."
-  LevelSession.update {"_id":sessionID}, {"isRanking":false}, cb
+  #console.log 'Marking session as done ranking...'
+  LevelSession.update {'_id': sessionID}, {'isRanking': false}, cb
diff --git a/server/queues/task/ScoringTask.coffee b/server/queues/task/ScoringTask.coffee
index c5147bbef..b6dcf27d9 100644
--- a/server/queues/task/ScoringTask.coffee
+++ b/server/queues/task/ScoringTask.coffee
@@ -1,8 +1,8 @@
-mongoose = require('mongoose')
+mongoose = require 'mongoose'
 
 ScoringTaskSchema = new mongoose.Schema(
   createdAt: {type: Date, expires: 3600} #expire document 1 hour after they are created
-  calculator: {type:mongoose.Schema.Types.ObjectId}
+  calculator: {type: mongoose.Schema.Types.ObjectId}
   sentDate: {type: Number}
   messageIdentifierString: {type: String}
   calculationTimeMS: {type: Number, default: 0}
diff --git a/server/routes/admin.coffee b/server/routes/admin.coffee
new file mode 100644
index 000000000..c15b3cc05
--- /dev/null
+++ b/server/routes/admin.coffee
@@ -0,0 +1,27 @@
+log = require 'winston'
+errors = require '../commons/errors'
+handlers = require('../commons/mapping').handlers
+
+mongoose = require 'mongoose'
+
+module.exports.setup = (app) ->
+  app.post '/admin/*', (req, res) ->
+    # TODO apparently I can leave this out as long as I use res.send
+    res.setHeader('Content-Type', 'application/json')
+
+    module = req.path[7..]
+    parts = module.split('/')
+    module = parts[0]
+
+    return errors.unauthorized(res, 'Must be admin to access this area.') unless req.user?.isAdmin()
+
+    try
+      moduleName = module.replace '.', '_'
+      name = handlers[moduleName]
+      handler = require('../' + name)
+
+      return handler[parts[1]](req, res, parts[2..]...) if parts[1] of handler
+
+    catch error
+      log.error("Error trying db method '#{req.route.method}' route '#{parts}' from #{name}: #{error}")
+      errors.notFound(res, "Route #{req.path} not found.")
diff --git a/server/routes/auth.coffee b/server/routes/auth.coffee
index eed93dfae..5c3298f44 100644
--- a/server/routes/auth.coffee
+++ b/server/routes/auth.coffee
@@ -1,7 +1,7 @@
-authentication = require('passport')
+authentication = require 'passport'
 LocalStrategy = require('passport-local').Strategy
-User = require('../users/User')
-UserHandler = require('../users/user_handler')
+User = require '../users/User'
+UserHandler = require '../users/user_handler'
 LevelSession = require '../levels/sessions/LevelSession'
 config = require '../../server_config'
 errors = require '../commons/errors'
@@ -15,9 +15,9 @@ module.exports.setup = (app) ->
 
   authentication.use(new LocalStrategy(
     (username, password, done) ->
-      User.findOne({emailLower:username.toLowerCase()}).exec((err, user) ->
+      User.findOne({emailLower: username.toLowerCase()}).exec((err, user) ->
         return done(err) if err
-        return done(null, false, {message:'not found', property:'email'}) if not user
+        return done(null, false, {message: 'not found', property: 'email'}) if not user
         passwordReset = (user.get('passwordReset') or '').toLowerCase()
         if passwordReset and password.toLowerCase() is passwordReset
           User.update {_id: user.get('_id')}, {passwordReset: ''}, {}, ->
@@ -25,44 +25,48 @@ module.exports.setup = (app) ->
 
         hash = User.hashPassword(password)
         unless user.get('passwordHash') is hash
-          return done(null, false, {message:'is wrong.', property:'password'})
+          return done(null, false, {message: 'is wrong.', property: 'password'})
         return done(null, user)
       )
   ))
+
   app.post '/auth/spy', (req, res, next) ->
     if req?.user?.isAdmin()
 
       username = req.body.usernameLower
       emailLower = req.body.emailLower
       if emailLower
-        query = {"emailLower":emailLower}
+        query = {'emailLower': emailLower}
       else if username
-        query = {"nameLower":username}
+        query = {'nameLower': username}
       else
-        return errors.badInput res, "You need to supply one of emailLower or username"
+        return errors.badInput res, 'You need to supply one of emailLower or username'
 
       User.findOne query, (err, user) ->
-        if err? then return errors.serverError res, "There was an error finding the specified user"
+        if err? then return errors.serverError res, 'There was an error finding the specified user'
 
-        unless user then return errors.badInput res, "The specified user couldn't be found"
+        unless user then return errors.badInput res, 'The specified user couldn\'t be found'
 
         req.logIn user, (err) ->
-          if err? then return errors.serverError res, "There was an error logging in with the specified"
+          if err? then return errors.serverError res, 'There was an error logging in with the specified'
           res.send(UserHandler.formatEntity(req, user))
           return res.end()
     else
-      return errors.unauthorized res, "You must be an admin to enter espionage mode"
+      return errors.unauthorized res, 'You must be an admin to enter espionage mode'
 
   app.post('/auth/login', (req, res, next) ->
     authentication.authenticate('local', (err, user, info) ->
       return next(err) if err
       if not user
-        return errors.unauthorized(res, [{message:info.message, property:info.property}])
+        return errors.unauthorized(res, [{message: info.message, property: info.property}])
 
       req.logIn(user, (err) ->
         return next(err) if (err)
-        res.send(UserHandler.formatEntity(req, req.user))
-        return res.end()
+        activity = req.user.trackActivity 'login', 1
+        user.update {activity: activity}, (err) ->
+          return next(err) if (err)
+          res.send(UserHandler.formatEntity(req, req.user))
+          return res.end()
       )
     )(req, res, next)
   )
@@ -89,13 +93,13 @@ module.exports.setup = (app) ->
 
   app.post('/auth/reset', (req, res) ->
     unless req.body.email
-      return errors.badInput(res, [{message:'Need an email specified.', property:'email'}])
+      return errors.badInput(res, [{message: 'Need an email specified.', property: 'email'}])
 
-    User.findOne({emailLower:req.body.email.toLowerCase()}).exec((err, user) ->
+    User.findOne({emailLower: req.body.email.toLowerCase()}).exec((err, user) ->
       if not user
-        return errors.notFound(res, [{message:'not found.', property:'email'}])
+        return errors.notFound(res, [{message: 'not found.', property: 'email'}])
 
-      user.set('passwordReset', Math.random().toString(36).slice(2,7).toUpperCase())
+      user.set('passwordReset', Math.random().toString(36).slice(2, 7).toUpperCase())
       user.save (err) =>
         return errors.serverError(res) if err
         if config.isProduction
@@ -128,18 +132,18 @@ module.exports.setup = (app) ->
           res.send "Unsubscribed #{req.query.email} from CodeCombat emails for #{session.levelName} #{session.team} ladder updates. Sorry to see you go! <p><a href='/play/ladder/#{session.levelID}#my-matches'>Ladder preferences</a></p>"
           res.end()
 
-    User.findOne({emailLower:req.query.email.toLowerCase()}).exec (err, user) ->
+    User.findOne({emailLower: req.query.email.toLowerCase()}).exec (err, user) ->
       if not user
         return errors.notFound res, "No user found with email '#{req.query.email}'"
 
       emails = _.clone(user.get('emails')) or {}
       msg = ''
-      
+
       if req.query.recruitNotes
         emails.recruitNotes ?= {}
         emails.recruitNotes.enabled = false
         msg = "Unsubscribed #{req.query.email} from recruiting emails."
-      
+
       else
         msg = "Unsubscribed #{req.query.email} from all CodeCombat emails. Sorry to see you go!"
         emailSettings.enabled = false for emailSettings in _.values(emails)
@@ -147,10 +151,10 @@ module.exports.setup = (app) ->
         emails.generalNews.enabled = false
         emails.anyNotes ?= {}
         emails.anyNotes.enabled = false
-        
+
       user.update {$set: {emails: emails}}, {}, =>
         return errors.serverError res, 'Database failure.' if err
-        res.send msg + "<p><a href='/account/settings'>Account settings</a></p>"
+        res.send msg + '<p><a href="/account/settings">Account settings</a></p>'
         res.end()
 
 module.exports.loginUser = loginUser = (req, res, user, send=true, next=null) ->
@@ -169,16 +173,15 @@ module.exports.loginUser = loginUser = (req, res, user, send=true, next=null) ->
   )
 
 module.exports.makeNewUser = makeNewUser = (req) ->
-  user = new User({anonymous:true})
+  user = new User({anonymous: true})
   user.set 'testGroupNumber', Math.floor(Math.random() * 256)  # also in app/lib/auth
   user.set 'preferredLanguage', languages.languageCodeFromAcceptedLanguages req.acceptedLanguages
-        
+
 createMailOptions = (receiver, password) ->
   # TODO: use email templates here
   options =
     from: config.mail.username
     to: receiver
     replyTo: config.mail.username
-    subject: "[CodeCombat] Password Reset"
+    subject: '[CodeCombat] Password Reset'
     text: "You can log into your account with: #{password}"
-
diff --git a/server/routes/base.coffee b/server/routes/base.coffee
index 5c7dd9f54..0881a7f83 100644
--- a/server/routes/base.coffee
+++ b/server/routes/base.coffee
@@ -6,4 +6,4 @@ module.exports.setup = (app) ->
     do (route) ->
       module = require('../'+route)
       module.setup app
-      log.debug "route module #{route} setup"
\ No newline at end of file
+      log.debug "route module #{route} setup"
diff --git a/server/routes/contact.coffee b/server/routes/contact.coffee
index 1ceb8d196..7f4991e19 100644
--- a/server/routes/contact.coffee
+++ b/server/routes/contact.coffee
@@ -26,12 +26,12 @@ createMailOptions = (sender, message, user, recipientID, subject, done) ->
     text: "#{message}\n\nUsername: #{user.get('name') or 'Anonymous'}\nID: #{user._id}"
     #html: message.replace '\n', '<br>\n'
 
-  if recipientID and (user.isAdmin() or ('employer' in (user.permissions ? [])))
+  if recipientID and (user.isAdmin() or ('employer' in (user.get('permissions') ? [])))
     User.findById(recipientID, 'email').exec (err, document) ->
       if err
         log.error "Error looking up recipient to email from #{recipientID}: #{err}" if err
       else
-        options.bcc = options.to
+        options.bcc = [options.to, sender]
         options.to = document.get('email')
       done options
   else
diff --git a/server/routes/db.coffee b/server/routes/db.coffee
index f65a56744..5b4ae3b17 100644
--- a/server/routes/db.coffee
+++ b/server/routes/db.coffee
@@ -6,7 +6,7 @@ mongoose = require 'mongoose'
 module.exports.setup = (app) ->
   # This is hacky and should probably get moved somewhere else, I dunno
   app.get '/db/cla.submissions', (req, res) ->
-    return errors.unauthorized(res, "You must be an admin to view that information") unless req.user?.isAdmin()
+    return errors.unauthorized(res, 'You must be an admin to view that information') unless req.user?.isAdmin()
     res.setHeader('Content-Type', 'application/json')
     collection = mongoose.connection.db.collection 'cla.submissions', (err, collection) ->
       return log.error "Couldn't fetch CLA submissions because #{err}" if err
@@ -34,7 +34,6 @@ module.exports.setup = (app) ->
       return handler.getLatestVersion(req, res, parts[1], parts[3]) if parts[2] is 'version'
       return handler.versions(req, res, parts[1]) if parts[2] is 'versions'
       return handler.files(req, res, parts[1]) if parts[2] is 'files'
-      return handler.search(req, res) if req.route.method is 'get' and parts[1] is 'search'
       return handler.getNamesByIDs(req, res) if req.route.method in ['get', 'post'] and parts[1] is 'names'
       return handler.getByRelationship(req, res, parts[1..]...) if parts.length > 2
       return handler.getById(req, res, parts[1]) if req.route.method is 'get' and parts[1]?
diff --git a/server/routes/file.coffee b/server/routes/file.coffee
index 1cc0f73d7..681c7715b 100644
--- a/server/routes/file.coffee
+++ b/server/routes/file.coffee
@@ -1,15 +1,15 @@
 Grid = require 'gridfs-stream'
 fs = require 'fs'
 request = require 'request'
-mongoose = require('mongoose')
+mongoose = require 'mongoose'
 errors = require '../commons/errors'
+config = require '../../server_config'
 
 module.exports.setup = (app) ->
   app.all '/file*', (req, res) ->
     return fileGet(req, res) if req.route.method is 'get'
     return filePost(req, res) if req.route.method is 'post'
-    return errors.badMethod(res)
-
+    return errors.badMethod(res, ['GET', 'POST'])
 
 fileGet = (req, res) ->
   path = req.path[6..]
@@ -38,7 +38,7 @@ fileGet = (req, res) ->
   else
     Grid.gfs.collection('media').findOne query, (err, filedata) =>
       return errors.notFound(res) if not filedata
-      readstream = Grid.gfs.createReadStream({_id: filedata._id, root:'media'})
+      readstream = Grid.gfs.createReadStream({_id: filedata._id, root: 'media'})
       if req.headers['if-modified-since'] is filedata.uploadDate
         res.status(304)
         return res.end()
@@ -106,11 +106,11 @@ savePNG = (req, res) ->
     writestream = Grid.gfs.createWriteStream(options)
     img = new Buffer(req.body.b64png, 'base64')
     streamBuffers = require 'stream-buffers'
-    myReadableStreamBuffer = new streamBuffers.ReadableStreamBuffer({frequency: 10,chunkSize: 2048})
+    myReadableStreamBuffer = new streamBuffers.ReadableStreamBuffer({frequency: 10, chunkSize: 2048})
     myReadableStreamBuffer.put(img)
     myReadableStreamBuffer.pipe(writestream)
     handleStreamEnd(res, writestream)
-    
+
 userCanEditFile = (user=null, file=null) ->
   # no user means 'anyone'. No file means 'any file'
   return false unless user
@@ -127,9 +127,11 @@ checkExistence = (options, req, res, force, done) ->
   Grid.gfs.collection('media').find(q).toArray (err, files) ->
     file = files[0]
     if file and ((not userCanEditFile(req.user, file) or (not force)))
-      errors.conflict(res, {canForce:userCanEditFile(req.user, file)})
+      errors.conflict(res, {canForce: userCanEditFile(req.user, file)})
       done(true)
     else if file
+      fullPath = "/file/#{options.metadata.path}/#{options.filename}"
+      clearCloudFlareCacheForFile(fullPath)
       q = { _id: file._id }
       q.root = 'media'
       Grid.gfs.remove q, (err) ->
@@ -172,3 +174,20 @@ createPostOptions = (req) ->
   options.metadata.description = req.body.description if req.body.description?
 
   options
+
+clearCloudFlareCacheForFile = (path='/file') ->
+  unless config.cloudflare.token
+    console.log 'skipping clearing cloud cache, not configured'
+    return
+
+  request = require 'request'
+  r = request.post 'https://www.cloudflare.com/api_json.html', (err, httpResponse, body) ->
+    if (err)
+      console.error('CloudFlare file cache clear failed:', body)
+
+  form = r.form()
+  form.append 'tkn', config.cloudflare.token
+  form.append 'email', 'scott@codecombat.com'
+  form.append 'z', 'codecombat.com'
+  form.append 'a', 'zone_file_purge'
+  form.append 'url', "http://codecombat.com#{path}"
diff --git a/server/routes/folder.coffee b/server/routes/folder.coffee
index 7ac5e187a..f30d2e49f 100644
--- a/server/routes/folder.coffee
+++ b/server/routes/folder.coffee
@@ -1,18 +1,18 @@
-mongoose = require('mongoose')
+mongoose = require 'mongoose'
 errors = require '../commons/errors'
 
 module.exports.setup = (app) ->
   app.all '/folder*', (req, res) ->
     return folderGet(req, res) if req.route.method is 'get'
-    return errors.badMethod(res)
+    return errors.badMethod(res, ['GET'])
 
 folderGet = (req, res) ->
   folder = req.path[7..]
   userfolder = "/user-#{req.user.id}/"
   folder = userfolder if folder is '/me/'
   return errors.forbidden(res) unless (folder is userfolder) or (req.user.isAdmin())
-    
+
   mongoose.connection.db.collection 'media.files', (errors, collection) ->
     collection.find({'metadata.path': folder}).toArray (err, results) ->
       res.send(results)
-      res.end()
\ No newline at end of file
+      res.end()
diff --git a/server/routes/languages.coffee b/server/routes/languages.coffee
index a959e823d..b29cc8fdb 100644
--- a/server/routes/languages.coffee
+++ b/server/routes/languages.coffee
@@ -11,7 +11,7 @@ module.exports.setup = (app) ->
 
   app.all '/languages', (req, res) ->
     # Now that these are in the client, not sure when we would use this, but hey
-    return errors.badMethod(res) if req.route.method isnt 'get'
+    return errors.badMethod(res, ['GET']) if req.route.method isnt 'get'
     res.send(languages)
     return res.end()
 
diff --git a/server/routes/mail.coffee b/server/routes/mail.coffee
index e7c2ee361..f5885a38a 100644
--- a/server/routes/mail.coffee
+++ b/server/routes/mail.coffee
@@ -1,10 +1,10 @@
 mail = require '../commons/mail'
-User = require '../users/User.coffee'
+User = require '../users/User'
 errors = require '../commons/errors'
 #request = require 'request'
 config = require '../../server_config'
-LevelSession = require '../levels/sessions/LevelSession.coffee'
-Level = require '../levels/Level.coffee'
+LevelSession = require '../levels/sessions/LevelSession'
+Level = require '../levels/Level'
 log = require 'winston'
 sendwithus = require '../sendwithus'
 
@@ -22,13 +22,13 @@ getAllLadderScores = (next) ->
     .lean()
   query.exec (err, levels) ->
     if err
-      log.error "Couldn't fetch ladder levels. Error: ", err
+      log.error 'Couldn\'t fetch ladder levels. Error: ', err
       return next []
     for level in levels
       for team in ['humans', 'ogres']
         'I ... am not doing this.'
         # Query to get sessions to make histogram
-        # db.level.sessions.find({"submitted":true,"levelID":"brawlwood",team:"ogres"},{"_id":0,"totalScore":1})
+        # db.level.sessions.find({'submitted': true, 'levelID': 'brawlwood', team: 'ogres'}, {'_id': 0, 'totalScore': 1})
 
 DEBUGGING = false
 LADDER_PREGAME_INTERVAL = 2 * 3600 * 1000  # Send emails two hours before players last submitted.
@@ -36,17 +36,17 @@ getTimeFromDaysAgo = (now, daysAgo) ->
   t = now - 86400 * 1000 * daysAgo - LADDER_PREGAME_INTERVAL
 
 isRequestFromDesignatedCronHandler = (req, res) ->
-  requestIP = req.headers['x-forwarded-for']?.replace(" ","").split(",")[0]
+  requestIP = req.headers['x-forwarded-for']?.replace(' ', '').split(',')[0]
   if requestIP isnt config.mail.cronHandlerPublicIP and requestIP isnt config.mail.cronHandlerPrivateIP
     console.log "RECEIVED REQUEST FROM IP #{requestIP}(headers indicate #{req.headers['x-forwarded-for']}"
-    console.log "UNAUTHORIZED ATTEMPT TO SEND TRANSACTIONAL LADDER EMAIL THROUGH CRON MAIL HANDLER"
-    res.send("You aren't authorized to perform that action. Only the specified Cron handler may perform that action.")
+    console.log 'UNAUTHORIZED ATTEMPT TO SEND TRANSACTIONAL LADDER EMAIL THROUGH CRON MAIL HANDLER'
+    res.send('You aren\'t authorized to perform that action. Only the specified Cron handler may perform that action.')
     res.end()
     return false
   return true
 
 handleLadderUpdate = (req, res) ->
-  log.info("Going to see about sending ladder update emails.")
+  log.info('Going to see about sending ladder update emails.')
   requestIsFromDesignatedCronHandler = isRequestFromDesignatedCronHandler req, res
   return unless requestIsFromDesignatedCronHandler or DEBUGGING
 
@@ -63,7 +63,7 @@ handleLadderUpdate = (req, res) ->
       endTime = startTime + 15 * 60 * 1000  # Debugging: make sure there's something to send
     findParameters = {submitted: true, submitDate: {$gt: new Date(startTime), $lte: new Date(endTime)}}
     # TODO: think about putting screenshots in the email
-    selectString = "creator team levelName levelID totalScore matches submitted submitDate scoreHistory"
+    selectString = 'creator team levelName levelID totalScore matches submitted submitDate scoreHistory'
     query = LevelSession.find(findParameters)
       .select(selectString)
       .lean()
@@ -76,7 +76,7 @@ handleLadderUpdate = (req, res) ->
         sendLadderUpdateEmail result, now, daysAgo for result in results
 
 sendLadderUpdateEmail = (session, now, daysAgo) ->
-  User.findOne({_id: session.creator}).select("name email firstName lastName emailSubscriptions emails preferredLanguage").exec (err, user) ->
+  User.findOne({_id: session.creator}).select('name email firstName lastName emailSubscriptions emails preferredLanguage').exec (err, user) ->
     if err
       log.error "Couldn't find user for #{session.creator} from session #{session._id}"
       return
@@ -88,7 +88,7 @@ sendLadderUpdateEmail = (session, now, daysAgo) ->
       log.info "Not sending email to #{user.get('email')} #{user.get('name')} because the session had no levelName in it."
       return
     name = if user.get('firstName') and user.get('lastName') then "#{user.get('firstName')}" else user.get('name')
-    name = "Wizard" if not name or name is "Anoner"
+    name = 'Wizard' if not name or name is 'Anoner'
 
     # Fetch the most recent defeat and victory, if there are any.
     # (We could look at strongest/weakest, but we'd have to fetch everyone, or denormalize more.)
@@ -135,22 +135,22 @@ sendLadderUpdateEmail = (session, now, daysAgo) ->
       if err
         log.error "Couldn't find defeateded opponent: #{err}"
         defeatedOpponent = null
-      victoryContext = {opponent_name: defeatedOpponent?.name ? "Anoner", url: urlForMatch(victory)} if victory
+      victoryContext = {opponent_name: defeatedOpponent?.name ? 'Anoner', url: urlForMatch(victory)} if victory
 
       onFetchedVictoriousOpponent = (err, victoriousOpponent) ->
         if err
           log.error "Couldn't find victorious opponent: #{err}"
           victoriousOpponent = null
-        defeatContext = {opponent_name: victoriousOpponent?.name ? "Anoner", url: urlForMatch(defeat)} if defeat
+        defeatContext = {opponent_name: victoriousOpponent?.name ? 'Anoner', url: urlForMatch(defeat)} if defeat
         sendEmail defeatContext, victoryContext
 
       if defeat
-        User.findOne({_id: defeat.opponents[0].userID}).select("name").lean().exec onFetchedVictoriousOpponent
+        User.findOne({_id: defeat.opponents[0].userID}).select('name').lean().exec onFetchedVictoriousOpponent
       else
         onFetchedVictoriousOpponent null, null
 
     if victory
-      User.findOne({_id: victory.opponents[0].userID}).select("name").lean().exec onFetchedDefeatedOpponent
+      User.findOne({_id: victory.opponents[0].userID}).select('name').lean().exec onFetchedDefeatedOpponent
     else
       onFetchedDefeatedOpponent null, null
 
@@ -184,7 +184,7 @@ handleMailchimpWebHook = (req, res) ->
     res.send 'No email provided'
     return res.end()
 
-  query = {'mailChimp.leid':post.data.web_id}
+  query = {'mailChimp.leid': post.data.web_id}
   User.findOne query, (err, user) ->
     return errors.serverError(res) if err
     if not user
diff --git a/server/routes/queue.coffee b/server/routes/queue.coffee
index 388bce4e0..169b71371 100644
--- a/server/routes/queue.coffee
+++ b/server/routes/queue.coffee
@@ -2,40 +2,39 @@ log = require 'winston'
 errors = require '../commons/errors'
 scoringQueue = require '../queues/scoring'
 
-
 module.exports.setup = (app) ->
   scoringQueue.setup()
 
   #app.post '/queue/scoring/pairwise', (req, res) ->
   #  handler = loadQueueHandler 'scoring'
   #  handler.addPairwiseTaskToQueue req, res
-  
+
   app.get '/queue/messagesInQueueCount', (req, res) ->
     handler = loadQueueHandler 'scoring'
     handler.messagesInQueueCount req, res
-    
+
   app.post '/queue/scoring/resimulateAllSessions', (req, res) ->
     handler = loadQueueHandler 'scoring'
     handler.resimulateAllSessions req, res
-    
+
   app.post '/queue/scoring/getTwoGames', (req, res) ->
     handler = loadQueueHandler 'scoring'
-    handler.getTwoGames req, res    
-  
+    handler.getTwoGames req, res
+
   app.put '/queue/scoring/recordTwoGames', (req, res) ->
     handler = loadQueueHandler 'scoring'
     handler.recordTwoGames req, res
-    
+
   app.all '/queue/*', (req, res) ->
     setResponseHeaderToJSONContentType res
-      
+
     queueName = getQueueNameFromPath req.path
     try
       handler = loadQueueHandler queueName
       if isHTTPMethodGet req
-        handler.dispatchTaskToConsumer req,res
+        handler.dispatchTaskToConsumer req, res
       else if isHTTPMethodPut req
-        handler.processTaskResult req,res
+        handler.processTaskResult req, res
       else if isHTTPMethodPost req
         handler.createNewTask req, res #TODO: do not use this in production
       else
@@ -43,7 +42,6 @@ module.exports.setup = (app) ->
     catch error
       log.error error
       sendQueueError req, res, error
-  
 
 setResponseHeaderToJSONContentType = (res) -> res.setHeader('Content-Type', 'application/json')
 
@@ -56,16 +54,12 @@ getQueueNameFromPath = (path) ->
 
 loadQueueHandler = (queueName) -> require ('../queues/' + queueName)
 
-
 isHTTPMethodGet = (req) -> return req.route.method is 'get'
 
 isHTTPMethodPost = (req) -> return req.route.method is 'post'
 
 isHTTPMethodPut = (req) -> return req.route.method is 'put'
 
+sendMethodNotSupportedError = (req, res) -> errors.badMethod(res, ['GET', 'POST', 'PUT'], 'Queues do not support the HTTP method used.' )
 
-sendMethodNotSupportedError = (req, res) -> errors.badMethod(res,"Queues do not support the HTTP method used." )
-
-sendQueueError = (req,res, error) -> errors.serverError(res, "Route #{req.path} had a problem: #{error}")
-
-
+sendQueueError = (req, res, error) -> errors.serverError(res, "Route #{req.path} had a problem: #{error}")
diff --git a/server/routes/stacklead.coffee b/server/routes/stacklead.coffee
new file mode 100644
index 000000000..705a7bf7d
--- /dev/null
+++ b/server/routes/stacklead.coffee
@@ -0,0 +1,32 @@
+config = require '../../server_config'
+request = require 'request'
+log = require 'winston'
+
+module.exports.setup = (app) ->
+  app.post '/stacklead', (req, res) ->
+    return res.end() unless req.user
+    email = req.body.email or req.user.get 'email'
+    sendStackLead email, req.user
+    return res.end()
+
+module.exports.sendStackLead = sendStackLead = (email, user) ->
+  return unless key = config.mail.stackleadAPIKey
+  form = email: email, api_key: key
+  if user
+    form.first_name = firstName if firstName = user.get('firstName')
+    form.last_name = lastName if lastName = user.get('lastName')
+    if profile = user.get 'jobProfile'
+      form.name = name if name = profile.name
+      form.location = location if location = profile.city
+      form.location = location if location = profile.city
+      for link in (profile.links ? [])
+        form.linkedin = link.link if /linkedin/.test link.link
+        form.twitter = link.link if /twitter/.test link.link
+      form.company = company if company = profile.work?[0]?.employer
+    if linkedIn = user.get('signedEmployerAgreement')?.data
+      form.first_name = data.firstName if data.firstName
+      form.last_name = data.lastName if data.lastName
+      form.linkedin = data.publicProfileUrl if data.publicProfileUrl
+      data.company = company if company = data.positions?.values?[0]?.company?.name
+  request.post {uri: 'https://stacklead.com/api/leads', form: form}, (err, res, body) ->
+    return log.error 'Error sending StackLead request:', err or body if err or /error/.test body
diff --git a/server/sendwithus.coffee b/server/sendwithus.coffee
index 1f8145eb1..656ec8401 100644
--- a/server/sendwithus.coffee
+++ b/server/sendwithus.coffee
@@ -14,4 +14,5 @@ module.exports.templates =
   ladder_update_email: 'JzaZxf39A4cKMxpPZUfWy4'
   patch_created: 'tem_xhxuNosLALsizTNojBjNcL'
   change_made_notify_watcher: 'tem_7KVkfmv9SZETb25dtHbUtG'
-  one_time_recruiting_email: 'tem_mdFMgtcczHKYu94Jmq68j8'
+  recruiting_email: 'tem_mdFMgtcczHKYu94Jmq68j8'
+  greed_tournament_rank: 'tem_c4KYnk2TriEkkZx5NqqGLG'
diff --git a/server/users/User.coffee b/server/users/User.coffee
index 744b8db7b..421335a21 100644
--- a/server/users/User.coffee
+++ b/server/users/User.coffee
@@ -1,7 +1,7 @@
-mongoose = require('mongoose')
-jsonschema = require('../../app/schemas/models/user')
-crypto = require('crypto')
-{salt, isProduction} = require('../../server_config')
+mongoose = require 'mongoose'
+jsonschema = require '../../app/schemas/models/user'
+crypto = require 'crypto'
+{salt, isProduction} = require '../../server_config'
 mail = require '../commons/mail'
 log = require 'winston'
 
@@ -29,6 +29,17 @@ UserSchema.methods.isAdmin = ->
   p = @get('permissions')
   return p and 'admin' in p
 
+UserSchema.methods.trackActivity = (activityName, increment) ->
+  now = new Date()
+  increment ?= parseInt increment or 1
+  increment = Math.max increment, 0
+  activity = @get('activity') ? {}
+  activity[activityName] ?= {first: now, count: 0}
+  activity[activityName].count += increment
+  activity[activityName].last = now
+  @set 'activity', activity
+  activity
+
 emailNameMap =
   generalNews: 'announcement'
   adventurerNews: 'tester'
@@ -79,8 +90,8 @@ UserSchema.statics.updateMailChimp = (doc, callback) ->
 
   params = {}
   params.id = mail.MAILCHIMP_LIST_ID
-  params.email = if existingProps then {leid:existingProps.leid} else {email:doc.get('email')}
-  params.merge_vars = { groupings: [ {id: mail.MAILCHIMP_GROUP_ID, groups: newGroups} ] }
+  params.email = if existingProps then {leid: existingProps.leid} else {email: doc.get('email')}
+  params.merge_vars = {groupings: [{id: mail.MAILCHIMP_GROUP_ID, groups: newGroups}]}
   params.update_existing = true
   params.double_optin = false
 
@@ -97,7 +108,6 @@ UserSchema.statics.updateMailChimp = (doc, callback) ->
 
   mc?.lists.subscribe params, onSuccess, onFailure
 
-
 UserSchema.pre('save', (next) ->
   @set('emailLower', @get('email')?.toLowerCase())
   @set('nameLower', @get('name')?.toLowerCase())
@@ -127,3 +137,6 @@ UserSchema.statics.hashPassword = (password) ->
   shasum.digest('hex')
 
 module.exports = User = mongoose.model('User', UserSchema)
+
+AchievablePlugin = require '../plugins/achievements'
+UserSchema.plugin(AchievablePlugin)
diff --git a/server/users/remarks/UserRemark.coffee b/server/users/remarks/UserRemark.coffee
new file mode 100644
index 000000000..445340c0b
--- /dev/null
+++ b/server/users/remarks/UserRemark.coffee
@@ -0,0 +1,11 @@
+mongoose = require 'mongoose'
+plugins = require '../../plugins/plugins'
+jsonschema = require '../../../app/schemas/models/user_remark'
+
+UserRemarkSchema = new mongoose.Schema({
+  created:
+    type: Date
+    'default': Date.now
+}, {strict: false})
+
+module.exports = UserRemark = mongoose.model('user.remark', UserRemarkSchema)
diff --git a/server/users/remarks/user_remark_handler.coffee b/server/users/remarks/user_remark_handler.coffee
new file mode 100644
index 000000000..9cc7ff90b
--- /dev/null
+++ b/server/users/remarks/user_remark_handler.coffee
@@ -0,0 +1,12 @@
+UserRemark = require './UserRemark'
+Handler = require '../../commons/Handler'
+
+class UserRemarkHandler extends Handler
+  modelClass: UserRemark
+  editableProperties: ['user', 'contact', 'history', 'tasks', 'userName', 'contactName']
+  jsonSchema: require '../../../app/schemas/models/user_remark'
+
+  hasAccess: (req) ->
+    req.user?.isAdmin()
+
+module.exports = new UserRemarkHandler()
diff --git a/server/users/user_handler.coffee b/server/users/user_handler.coffee
index f7723f859..ac43fda1c 100644
--- a/server/users/user_handler.coffee
+++ b/server/users/user_handler.coffee
@@ -8,8 +8,10 @@ config = require '../../server_config'
 errors = require '../commons/errors'
 async = require 'async'
 log = require 'winston'
-LevelSession = require('../levels/sessions/LevelSession')
+LevelSession = require '../levels/sessions/LevelSession'
 LevelSessionHandler = require '../levels/sessions/level_session_handler'
+EarnedAchievement = require '../achievements/EarnedAchievement'
+UserRemark = require './remarks/UserRemark'
 
 serverProperties = ['passwordHash', 'emailLower', 'nameLower', 'passwordReset']
 privateProperties = [
@@ -22,7 +24,7 @@ candidateProperties = [
 
 UserHandler = class UserHandler extends Handler
   modelClass: User
-
+  jsonSchema: schema
   editableProperties: [
     'name', 'photoURL', 'password', 'anonymous', 'wizardColor1', 'volume',
     'firstName', 'lastName', 'gender', 'facebookID', 'gplusID', 'emails',
@@ -30,15 +32,11 @@ UserHandler = class UserHandler extends Handler
     'wizard', 'aceConfig', 'autocastDelay', 'lastLevel', 'jobProfile'
   ]
 
-  jsonSchema: schema
-
-  constructor: ->
-    super(arguments...)
-    @editableProperties.push('permissions') unless config.isProduction
-
   getEditableProperties: (req, document) ->
     props = super req, document
-    props.push 'jobProfileApproved', 'jobProfileNotes' if req.user.isAdmin()
+    props.push 'permissions' unless config.isProduction
+    props.push 'jobProfileApproved', 'jobProfileNotes' if req.user.isAdmin()  # Admins naturally edit these
+    props.push privateProperties... if req.user.isAdmin()  # Admins are mad with power
     props
 
   formatEntity: (req, document) ->
@@ -47,7 +45,7 @@ UserHandler = class UserHandler extends Handler
     delete obj[prop] for prop in serverProperties
     includePrivates = req.user and (req.user.isAdmin() or req.user._id.equals(document._id))
     delete obj[prop] for prop in privateProperties unless includePrivates
-    includeCandidate = includePrivates or (obj.jobProfileApproved and req.user and ('employer' in (req.user.get('permissions') ? [])) and @employerCanViewCandidate req.user, obj)
+    includeCandidate = includePrivates or (obj.jobProfile?.active and req.user and ('employer' in (req.user.get('permissions') ? [])) and @employerCanViewCandidate req.user, obj)
     delete obj[prop] for prop in candidateProperties unless includeCandidate
     return obj
 
@@ -63,7 +61,7 @@ UserHandler = class UserHandler extends Handler
         log.warn "Error grabbing FB token: #{err}" if err
         body = JSON.parse(body)
         emailsMatch = req.body.email is body.email
-        return callback(res:'Invalid Facebook Access Token.', code:422) unless emailsMatch
+        return callback(res: 'Invalid Facebook Access Token.', code: 422) unless emailsMatch
         callback(null, req, user)
       )
 
@@ -77,7 +75,7 @@ UserHandler = class UserHandler extends Handler
         log.warn "Error grabbing G+ token: #{err}" if err
         body = JSON.parse(body)
         emailsMatch = req.body.email is body.email
-        return callback(res:'Invalid G+ Access Token.', code:422) unless emailsMatch
+        return callback(res: 'Invalid G+ Access Token.', code: 422) unless emailsMatch
         callback(null, req, user)
       )
 
@@ -86,18 +84,18 @@ UserHandler = class UserHandler extends Handler
       return callback(null, req, user) unless req.body.email?
       emailLower = req.body.email.toLowerCase()
       return callback(null, req, user) if emailLower is user.get('emailLower')
-      User.findOne({emailLower:emailLower}).exec (err, otherUser) ->
+      User.findOne({emailLower: emailLower}).exec (err, otherUser) ->
         log.error "Database error setting user email: #{err}" if err
-        return callback(res:'Database error.', code:500) if err
+        return callback(res: 'Database error.', code: 500) if err
 
         if (req.query.gplusID or req.query.facebookID) and otherUser
           # special case, log in as that user
           return req.logIn(otherUser, (err) ->
-            return callback(res:'Facebook user login error.', code:500) if err
+            return callback(res: 'Facebook user login error.', code: 500) if err
             return callback(null, req, otherUser)
           )
-        r = {message:'is already used by another account', property:'email'}
-        return callback({res:r, code:409}) if otherUser
+        r = {message: 'is already used by another account', property: 'email'}
+        return callback({res: r, code: 409}) if otherUser
         user.set('email', req.body.email)
         callback(null, req, user)
 
@@ -107,12 +105,12 @@ UserHandler = class UserHandler extends Handler
       nameLower = req.body.name?.toLowerCase()
       return callback(null, req, user) unless nameLower
       return callback(null, req, user) if nameLower is user.get('nameLower') and not user.get('anonymous')
-      User.findOne({nameLower:nameLower,anonymous:false}).exec (err, otherUser) ->
+      User.findOne({nameLower: nameLower, anonymous: false}).exec (err, otherUser) ->
         log.error "Database error setting user name: #{err}" if err
-        return callback(res:'Database error.', code:500) if err
-        r = {message:'is already used by another account', property:'name'}
+        return callback(res: 'Database error.', code: 500) if err
+        r = {message: 'is already used by another account', property: 'name'}
         console.log 'Another user exists' if otherUser
-        return callback({res:r, code:409}) if otherUser
+        return callback({res: r, code: 409}) if otherUser
         user.set('name', req.body.name)
         callback(null, req, user)
   ]
@@ -125,17 +123,17 @@ UserHandler = class UserHandler extends Handler
   getNamesByIDs: (req, res) ->
     ids = req.query.ids or req.body.ids
     returnWizard = req.query.wizard or req.body.wizard
-    properties = if returnWizard then "name wizard" else "name"
+    properties = if returnWizard then 'name wizard' else 'name'
     @getPropertiesFromMultipleDocuments res, User, properties, ids
 
   nameToID: (req, res, name) ->
-    User.findOne({nameLower:name.toLowerCase(),anonymous:false}).exec (err, otherUser) ->
+    User.findOne({nameLower: unescape(name).toLowerCase(), anonymous: false}).exec (err, otherUser) ->
       res.send(if otherUser then otherUser._id else JSON.stringify(''))
       res.end()
 
   getSimulatorLeaderboard: (req, res) ->
     queryParameters = @getSimulatorLeaderboardQueryParameters(req)
-    leaderboardQuery = User.find(queryParameters.query).select("name simulatedBy simulatedFor").sort({"simulatedBy":queryParameters.sortOrder}).limit(queryParameters.limit)
+    leaderboardQuery = User.find(queryParameters.query).select('name simulatedBy simulatedFor').sort({'simulatedBy': queryParameters.sortOrder}).limit(queryParameters.limit)
     leaderboardQuery.exec (err, otherUsers) ->
         otherUsers = _.reject otherUsers, _id: req.user._id if req.query.scoreOffset isnt -1
         otherUsers ?= []
@@ -149,7 +147,7 @@ UserHandler = class UserHandler extends Handler
       return @sendDatabaseError(res, err) if err
       res.send JSON.stringify(count + 1)
 
-   getSimulatorLeaderboardQueryParameters: (req) ->
+  getSimulatorLeaderboardQueryParameters: (req) ->
     @validateSimulateLeaderboardRequestParameters(req)
 
     query = {}
@@ -157,11 +155,11 @@ UserHandler = class UserHandler extends Handler
     limit = if req.query.limit > 30 then 30 else req.query.limit
     if req.query.scoreOffset isnt -1
       simulatedByQuery = {}
-      simulatedByQuery[if req.query.order is 1 then "$gt" else "$lte"] = req.query.scoreOffset
+      simulatedByQuery[if req.query.order is 1 then '$gt' else '$lte'] = req.query.scoreOffset
       query.simulatedBy = simulatedByQuery
       sortOrder = 1 if req.query.order is 1
     else
-      query.simulatedBy = {"$exists": true}
+      query.simulatedBy = {'$exists': true}
     {query: query, sortOrder: sortOrder, limit: limit}
 
   validateSimulateLeaderboardRequestParameters: (req) ->
@@ -184,14 +182,19 @@ UserHandler = class UserHandler extends Handler
 
   getByRelationship: (req, res, args...) ->
     return @agreeToCLA(req, res) if args[1] is 'agreeToCLA'
-    return @agreeToEmployerAgreement(req,res) if args[1] is 'agreeToEmployerAgreement'
+    return @agreeToEmployerAgreement(req, res) if args[1] is 'agreeToEmployerAgreement'
     return @avatar(req, res, args[0]) if args[1] is 'avatar'
     return @getNamesByIDs(req, res) if args[1] is 'names'
     return @nameToID(req, res, args[0]) if args[1] is 'nameToID'
+    return @getLevelSessionsForEmployer(req, res, args[0]) if args[1] is 'level.sessions' and args[2] is 'employer'
     return @getLevelSessions(req, res, args[0]) if args[1] is 'level.sessions'
     return @getCandidates(req, res) if args[1] is 'candidates'
+    return @getEmployers(req, res) if args[1] is 'employers'
     return @getSimulatorLeaderboard(req, res, args[0]) if args[1] is 'simulatorLeaderboard'
     return @getMySimulatorLeaderboardRank(req, res, args[0]) if args[1] is 'simulator_leaderboard_rank'
+    return @getEarnedAchievements(req, res, args[0]) if args[1] is 'achievements'
+    return @trackActivity(req, res, args[0], args[2], args[3]) if args[1] is 'track' and args[2]
+    return @getRemark(req, res, args[0]) if args[1] is 'remark'
     return @sendNotFoundError(res)
     super(arguments...)
 
@@ -210,7 +213,7 @@ UserHandler = class UserHandler extends Handler
         req.user.set('signedCLA', doc.created)
         req.user.save (err) =>
           return @sendDatabaseError(res, err) if err
-          @sendSuccess(res, {result:'success'})
+          @sendSuccess(res, {result: 'success'})
 
   avatar: (req, res, id) ->
     @modelClass.findById(id).exec (err, document) =>
@@ -223,54 +226,94 @@ UserHandler = class UserHandler extends Handler
       res.redirect photoURL
       res.end()
 
-  getLevelSessions: (req, res, userID) ->
-    return @sendUnauthorizedError(res) unless req.user._id+'' is userID or req.user.isAdmin()
-    query = {'creator': userID}
-    projection = null
-    if req.query.project
-      projection = {}
-      projection[field] = 1 for field in req.query.project.split(',')
+  getLevelSessionsForEmployer: (req, res, userID) ->
+    return @sendUnauthorizedError(res) unless req.user._id+'' is userID or req.user.isAdmin() or ('employer' in req.user.get('permissions'))
+    query = creator: userID, levelID: {$in: ['gridmancer', 'greed', 'dungeon-arena', 'brawlwood', 'gold-rush']}
+    projection = 'levelName levelID team playtime codeLanguage submitted code totalScore'
     LevelSession.find(query).select(projection).exec (err, documents) =>
       return @sendDatabaseError(res, err) if err
       documents = (LevelSessionHandler.formatEntity(req, doc) for doc in documents)
       @sendSuccess(res, documents)
 
+  getLevelSessions: (req, res, userID) ->
+    query = creator: userID
+    isAuthorized = req.user._id+'' is userID or req.user.isAdmin()
+    projection = {}
+    if req.query.project
+      projection[field] = 1 for field in req.query.project.split(',') when isAuthorized or not (field in LevelSessionHandler.privateProperties)
+    else unless isAuthorized
+      projection[field] = 0 for field in LevelSessionHandler.privateProperties
+
+    LevelSession.find(query).select(projection).exec (err, documents) =>
+      return @sendDatabaseError(res, err) if err
+      documents = (LevelSessionHandler.formatEntity(req, doc) for doc in documents)
+      @sendSuccess(res, documents)
+
+  getEarnedAchievements: (req, res, userID) ->
+    queryObject = {$query: {user: userID}, $orderby: {changed: -1}}
+    queryObject.$query.notified = false if req.query.notified is 'false'
+    query = EarnedAchievement.find(queryObject)
+    query.exec (err, documents) =>
+      return @sendDatabaseError(res, err) if err?
+      cleandocs = (@formatEntity(req, doc) for doc in documents)
+      for doc in documents  # Maybe move this logic elsewhere
+        doc.set('notified', true)
+        doc.save()
+      @sendSuccess(res, cleandocs)
+
+  trackActivity: (req, res, userID, activityName, increment=1) ->
+    return @sendMethodNotAllowed res unless req.method is 'POST'
+    isMe = userID is req.user._id + ''
+    isAuthorized = isMe or req.user.isAdmin()
+    isAuthorized ||= ('employer' in req.user.get('permissions')) and (activityName in ['viewed_by_employer', 'contacted_by_employer'])
+    return @sendUnauthorizedError res unless isAuthorized
+    updateUser = (user) =>
+      activity = user.trackActivity activityName, increment
+      user.update {activity: activity}, (err) =>
+        return @sendDatabaseError res, err if err
+        @sendSuccess res, result: 'success'
+    if isMe
+      updateUser(req.user)
+    else
+      @getDocumentForIdOrSlug userID, (err, user) =>
+        return @sendDatabaseError res, err if err
+        return @sendNotFoundError res unless user
+        updateUser user
+
   agreeToEmployerAgreement: (req, res) ->
     userIsAnonymous = req.user?.get('anonymous')
-    if userIsAnonymous then return errors.unauthorized(res, "You need to be logged in to agree to the employer agreeement.")
+    if userIsAnonymous then return errors.unauthorized(res, 'You need to be logged in to agree to the employer agreeement.')
     profileData = req.body
     #TODO: refactor this bit to make it more elegant
     if not profileData.id or not profileData.positions or not profileData.emailAddress or not profileData.firstName or not profileData.lastName
-      return errors.badInput(res, "You need to have a more complete profile to sign up for this service.")
+      return errors.badInput(res, 'You need to have a more complete profile to sign up for this service.')
     @modelClass.findById(req.user.id).exec (err, user) =>
-      if user.get('employerAt') or user.get('signedEmployerAgreement') or "employer" in user.get('permissions')
-        return errors.conflict(res, "You already have signed the agreement!")
+      if user.get('employerAt') or user.get('signedEmployerAgreement') or 'employer' in user.get('permissions')
+        return errors.conflict(res, 'You already have signed the agreement!')
       #TODO: Search for the current position
-      employerAt = _.filter(profileData.positions.values,"isCurrent")[0]?.company.name ? "Not available"
+      employerAt = _.filter(profileData.positions.values, 'isCurrent')[0]?.company.name ? 'Not available'
       signedEmployerAgreement =
         linkedinID: profileData.id
         date: new Date()
         data: profileData
       updateObject =
-        "employerAt": employerAt
-        "signedEmployerAgreement": signedEmployerAgreement
-        $push: "permissions":'employer'
+        'employerAt': employerAt
+        'signedEmployerAgreement': signedEmployerAgreement
+        $push: 'permissions': 'employer'
 
-      User.update {"_id": req.user.id}, updateObject, (err, result) =>
+      User.update {'_id': req.user.id}, updateObject, (err, result) =>
         if err? then return errors.serverError(res, "There was an issue updating the user object to reflect employer status: #{err}")
-        res.send({"message": "The agreement was successful."})
+        res.send({'message': 'The agreement was successful.'})
         res.end()
 
   getCandidates: (req, res) ->
     authorized = req.user.isAdmin() or ('employer' in req.user.get('permissions'))
-    since = (new Date((new Date()) - 2 * 30.4 * 86400 * 1000)).toISOString()
-    #query = {'jobProfile.active': true, 'jobProfile.updated': {$gt: since}}
+    months = if req.user.isAdmin() then 12 else 2
+    since = (new Date((new Date()) - months * 30.4 * 86400 * 1000)).toISOString()
     query = {'jobProfile.updated': {$gt: since}}
-    query.jobProfileApproved = true unless req.user.isAdmin()
     query['jobProfile.active'] = true unless req.user.isAdmin()
-    selection = 'jobProfile'
-    selection += ' email' if authorized
-    selection += ' jobProfileApproved' if req.user.isAdmin()
+    selection = 'jobProfile jobProfileApproved photoURL'
+    selection += ' email name' if authorized
     User.find(query).select(selection).exec (err, documents) =>
       return @sendDatabaseError(res, err) if err
       candidates = (candidate for candidate in documents when @employerCanViewCandidate req.user, candidate.toObject())
@@ -278,10 +321,10 @@ UserHandler = class UserHandler extends Handler
       @sendSuccess(res, candidates)
 
   formatCandidate: (authorized, document) ->
-    fields = if authorized then ['jobProfile', 'jobProfileApproved', 'photoURL', '_id'] else ['jobProfile']
+    fields = if authorized then ['name', 'jobProfile', 'jobProfileApproved', 'photoURL', '_id'] else ['_id','jobProfile', 'jobProfileApproved']
     obj = _.pick document.toObject(), fields
-    obj.photoURL ||= obj.jobProfile.photoURL if authorized
-    subfields = ['country', 'city', 'lookingFor', 'jobTitle', 'skills', 'experience', 'updated', 'active']
+    obj.photoURL ||= obj.jobProfile.photoURL #if authorized
+    subfields = ['country', 'city', 'lookingFor', 'jobTitle', 'skills', 'experience', 'updated', 'active', 'shortDescription', 'curated', 'visa']
     if authorized
       subfields = subfields.concat ['name']
     obj.jobProfile = _.pick obj.jobProfile, subfields
@@ -297,9 +340,17 @@ UserHandler = class UserHandler extends Handler
       return false if job.employer?.toLowerCase() is employer.get('employerAt')?.toLowerCase()
     true
 
+  getEmployers: (req, res) ->
+    return @sendUnauthorizedError(res) unless req.user.isAdmin()
+    query = {employerAt: {$exists: true, $ne: ''}}
+    selection = 'name firstName lastName email activity signedEmployerAgreement photoURL employerAt'
+    User.find(query).select(selection).lean().exec (err, documents) =>
+      return @sendDatabaseError res, err if err
+      @sendSuccess res, documents
+
   buildGravatarURL: (user, size, fallback) ->
     emailHash = @buildEmailHash user
-    fallback ?= "http://codecombat.com/file/db/thang.type/52a00d55cf1818f2be00000b/portrait.png"
+    fallback ?= 'http://codecombat.com/file/db/thang.type/52a00d55cf1818f2be00000b/portrait.png'
     fallback = "http://codecombat.com#{fallback}" unless /^http/.test fallback
     "https://www.gravatar.com/avatar/#{emailHash}?s=#{size}&default=#{fallback}"
 
@@ -312,4 +363,16 @@ UserHandler = class UserHandler extends Handler
       hash.update(user.get('_id') + '')
     hash.digest('hex')
 
+  getRemark: (req, res, userID) ->
+    return @sendUnauthorizedError(res) unless req.user.isAdmin()
+    query = user: userID
+    projection = null
+    if req.query.project
+      projection = {}
+      projection[field] = 1 for field in req.query.project.split(',')
+    UserRemark.findOne(query).select(projection).exec (err, remark) =>
+      return @sendDatabaseError res, err if err
+      return @sendNotFoundError res unless remark?
+      @sendSuccess res, remark
+
 module.exports = new UserHandler()
diff --git a/server_config.coffee b/server_config.coffee
index a30cbde32..6018bf84f 100644
--- a/server_config.coffee
+++ b/server_config.coffee
@@ -1,47 +1,50 @@
 config = {}
 
-config.unittest = process.argv.indexOf("--unittest") > -1
+config.unittest = process.argv.indexOf('--unittest') > -1
 
 config.port = process.env.COCO_PORT or process.env.COCO_NODE_PORT or 3000
 config.ssl_port = process.env.COCO_SSL_PORT or process.env.COCO_SSL_NODE_PORT or 3443
+config.cloudflare =
+  token: process.env.COCO_CLOUDFLARE_API_KEY or ''
 
 config.mongo =
   port: process.env.COCO_MONGO_PORT or 27017
-  host: process.env.COCO_MONGO_HOST or "localhost"
-  db: process.env.COCO_MONGO_DATABASE_NAME or "coco"
-  mongoose_replica_string: process.env.COCO_MONGO_MONGOOSE_REPLICA_STRING or ""
+  host: process.env.COCO_MONGO_HOST or 'localhost'
+  db: process.env.COCO_MONGO_DATABASE_NAME or 'coco'
+  mongoose_replica_string: process.env.COCO_MONGO_MONGOOSE_REPLICA_STRING or ''
 
 if config.unittest
   config.port += 1
   config.ssl_port += 1
-  config.mongo.host = "localhost"
+  config.mongo.host = 'localhost'
 else
-  config.mongo.username = process.env.COCO_MONGO_USERNAME or ""
-  config.mongo.password = process.env.COCO_MONGO_PASSWORD or ""
+  config.mongo.username = process.env.COCO_MONGO_USERNAME or ''
+  config.mongo.password = process.env.COCO_MONGO_PASSWORD or ''
 
 config.mail =
-  service: process.env.COCO_MAIL_SERVICE_NAME or "Zoho"
-  username: process.env.COCO_MAIL_SERVICE_USERNAME or ""
-  password: process.env.COCO_MAIL_SERVICE_PASSWORD or ""
-  mailchimpAPIKey: process.env.COCO_MAILCHIMP_API_KEY or ""
-  mailchimpWebhook: process.env.COCO_MAILCHIMP_WEBHOOK or "/mail/webhook"
-  sendwithusAPIKey: process.env.COCO_SENDWITHUS_API_KEY or ""
-  cronHandlerPublicIP: process.env.COCO_CRON_PUBLIC_IP or ""
-  cronHandlerPrivateIP: process.env.COCO_CRON_PRIVATE_IP or ""
-  
+  service: process.env.COCO_MAIL_SERVICE_NAME or 'Zoho'
+  username: process.env.COCO_MAIL_SERVICE_USERNAME or ''
+  password: process.env.COCO_MAIL_SERVICE_PASSWORD or ''
+  mailchimpAPIKey: process.env.COCO_MAILCHIMP_API_KEY or ''
+  mailchimpWebhook: process.env.COCO_MAILCHIMP_WEBHOOK or '/mail/webhook'
+  sendwithusAPIKey: process.env.COCO_SENDWITHUS_API_KEY or ''
+  stackleadAPIKey: process.env.COCO_STACKLEAD_API_KEY or ''
+  cronHandlerPublicIP: process.env.COCO_CRON_PUBLIC_IP or ''
+  cronHandlerPrivateIP: process.env.COCO_CRON_PRIVATE_IP or ''
+
 config.queue =
-  accessKeyId: process.env.COCO_AWS_ACCESS_KEY_ID or ""
-  secretAccessKey: process.env.COCO_AWS_SECRET_ACCESS_KEY or ""
-  region: "us-east-1"
-  simulationQueueName: "simulationQueue"
+  accessKeyId: process.env.COCO_AWS_ACCESS_KEY_ID or ''
+  secretAccessKey: process.env.COCO_AWS_SECRET_ACCESS_KEY or ''
+  region: 'us-east-1'
+  simulationQueueName: 'simulationQueue'
 
 config.mongoQueue =
-  queueDatabaseName: "coco_queue"
+  queueDatabaseName: 'coco_queue'
 
-config.salt = process.env.COCO_SALT or "pepper"
-config.cookie_secret = process.env.COCO_COOKIE_SECRET or "chips ahoy"
+config.salt = process.env.COCO_SALT or 'pepper'
+config.cookie_secret = process.env.COCO_COOKIE_SECRET or 'chips ahoy'
 
-config.isProduction = config.mongo.host isnt "localhost"
+config.isProduction = config.mongo.host isnt 'localhost'
 
 if not config.unittest and  not config.isProduction
   # change artificially slow down non-static requests for testing
diff --git a/server_setup.coffee b/server_setup.coffee
index d214497cb..7f2b11ce6 100644
--- a/server_setup.coffee
+++ b/server_setup.coffee
@@ -48,7 +48,7 @@ setupPassportMiddleware = (app) ->
   app.use(authentication.initialize())
   app.use(authentication.session())
 
-setupOneSecondDelayMiddlware = (app) ->
+setupOneSecondDelayMiddleware = (app) ->
   if(config.slow_down)
     app.use((req, res, next) -> setTimeout((-> next()), 1000))
 
@@ -57,7 +57,7 @@ setupMiddlewareToSendOldBrowserWarningWhenPlayersViewLevelDirectly = (app) ->
     # https://github.com/biggora/express-useragent/blob/master/lib/express-useragent.js
     return false unless ua = req.useragent
     return true if ua.isiPad or ua.isiPod or ua.isiPhone or ua.isOpera
-    return false unless ua and ua.Browser in ["Chrome", "Safari", "Firefox", "IE"] and ua.Version
+    return false unless ua and ua.Browser in ['Chrome', 'Safari', 'Firefox', 'IE'] and ua.Version
     b = ua.Browser
     v = parseInt ua.Version.split('.')[0], 10
     return true if b is 'Chrome' and v < 17
@@ -74,7 +74,7 @@ exports.setupMiddleware = (app) ->
   setupMiddlewareToSendOldBrowserWarningWhenPlayersViewLevelDirectly app
   setupExpressMiddleware app
   setupPassportMiddleware app
-  setupOneSecondDelayMiddlware app
+  setupOneSecondDelayMiddleware app
 
 ###Routing function implementations###
 
@@ -93,7 +93,10 @@ sendMain = (req, res) ->
     log.error "Error modifying main.html: #{err}" if err
     # insert the user object directly into the html so the application can have it immediately. Sanitize </script>
     data = data.replace('"userObjectTag"', JSON.stringify(UserHandler.formatEntity(req, req.user)).replace(/\//g, '\\/'))
-    res.send data
+    res.header 'Cache-Control', 'no-cache, no-store, must-revalidate'
+    res.header 'Pragma', 'no-cache'
+    res.header 'Expires', 0
+    res.send 200, data
 
 setupFacebookCrossDomainCommunicationRoute = (app) ->
   app.get '/channel.html', (req, res) ->
diff --git a/test/app/first.coffee b/test/app/first.coffee
deleted file mode 100644
index 022272833..000000000
--- a/test/app/first.coffee
+++ /dev/null
@@ -1,26 +0,0 @@
-# Karma has real issues logging arbitrary objects
-# But we log them all the time
-# Wrapping console.log so this stops messing up our tests.
-
-ll = console.log
-
-console.log = (splat...) ->
-  try
-    s = (JSON.stringify(i) for i in splat)
-    ll(_.string.join(', ', s...))
-  catch TypeError
-    console.log('could not log what you tried to log')
-
-console.warn = (splat...) ->
-  console.log("WARN", splat...)
-
-console.error = (splat...) ->
-  console.log("ERROR", splat...)
-
-
-# When the page loads the first time, it doesn't actually load if there's no 'me' loaded.
-# Get past this by creating a fake 'me'
-
-#User = require 'models/User'
-#auth = require 'lib/auth'
-#auth.me = new User({anonymous:true})
\ No newline at end of file
diff --git a/test/app/fixtures/levels.coffee b/test/app/fixtures/levels.coffee
new file mode 100644
index 000000000..46383fc10
--- /dev/null
+++ b/test/app/fixtures/levels.coffee
@@ -0,0 +1,8 @@
+module.exports.LadderLevel =
+  name: 'Ladder Level'
+  original: '0123456789abcdef'
+  version:
+    major: 1
+    minor: 2
+    isLatestMajor: true
+    isLatestMinor: true
diff --git a/test/app/lib/FacebookHandler.spec.coffee b/test/app/lib/FacebookHandler.spec.coffee
new file mode 100644
index 000000000..49766391e
--- /dev/null
+++ b/test/app/lib/FacebookHandler.spec.coffee
@@ -0,0 +1,80 @@
+FacebookHandler = require 'lib/FacebookHandler'
+
+mockAuthEvent =
+  response:
+    authResponse:
+      accessToken: 'aksdhjflkqjrj245234b52k345q344le4j4k5l45j45s4dkljvdaskl'
+      userID: '4301938'
+      expiresIn: 5138
+      signedRequest: 'akjsdhfjkhea.3423nkfkdsejnfkd'
+    status: 'connected'
+
+# Whatev, it's all public info anyway
+mockMe =
+  id: '4301938'
+  email: 'scott@codecombat.com'
+  first_name: 'Scott'
+  gender: 'male'
+  last_name: 'Erickson'
+  link: 'https://www.facebook.com/scott.erickson.779'
+  locale: 'en_US'
+  name: 'Scott Erickson'
+  timezone: -7
+  updated_time: '2014-05-21T04:58:06+0000'
+  username: 'scott.erickson.779'
+  verified: true
+  work: [
+    {
+      employer:
+        id: '167559910060759'
+        name: 'CodeCombat'
+
+      location:
+        id: '114952118516947'
+        name: 'San Francisco, California'
+
+      start_date: '2013-02-28'
+    }
+    {
+      end_date: '2013-01-31'
+      employer:
+        id: '39198748555'
+        name: 'Skritter'
+
+      location:
+        id: '106109576086811'
+        name: 'Oberlin, Ohio'
+
+      start_date: '2008-06-01'
+    }
+  ]
+
+window.FB ?= {
+  api: ->
+}
+
+describe 'lib/FacebookHandler.coffee', ->
+  it 'on facebook-logged-in, gets data from FB and sends a patch to the server', ->
+    me.clear({silent: true})
+    me.markToRevert()
+    me.set({_id: '12345'})
+
+    spyOn FB, 'api'
+
+    new FacebookHandler()
+    Backbone.Mediator.publish 'facebook-logged-in', mockAuthEvent
+
+    expect(FB.api).toHaveBeenCalled()
+    apiArgs = FB.api.calls.argsFor(0)
+    expect(apiArgs[0]).toBe('/me')
+    apiArgs[1](mockMe) # sending the 'response'
+    request = jasmine.Ajax.requests.mostRecent()
+    expect(request).toBeDefined()
+    params = JSON.parse request.params
+    expect(params.firstName).toBe(mockMe.first_name)
+    expect(params.lastName).toBe(mockMe.last_name)
+    expect(params.gender).toBe(mockMe.gender)
+    expect(params.email).toBe(mockMe.email)
+    expect(params.facebookID).toBe(mockMe.id)
+    expect(request.method).toBe('PATCH')
+    expect(_.string.startsWith(request.url, '/db/user/12345')).toBeTruthy()
diff --git a/test/app/lib/script_manager.spec.coffee b/test/app/lib/ScriptManager.spec.coffee
similarity index 83%
rename from test/app/lib/script_manager.spec.coffee
rename to test/app/lib/ScriptManager.spec.coffee
index 458628a4f..1bf82b168 100644
--- a/test/app/lib/script_manager.spec.coffee
+++ b/test/app/lib/ScriptManager.spec.coffee
@@ -1,11 +1,11 @@
 describe('ScriptManager', ->
-  SM = require 'lib/scripts/ScriptManager'
+  ScriptManager = require 'lib/scripts/ScriptManager'
   xit('broadcasts note with event upon hearing from channel', ->
-    note = {channel: 'cnn', event: {1:1}}
+    note = {channel: 'cnn', event: {1: 1}}
     noteGroup = {duration: 0, notes: [note]}
     script = {channel: 'pbs', noteChain: [noteGroup]}
 
-    sm = new SM({scripts: [script]})
+    sm = new ScriptManager({scripts: [script]})
     sm.paused = false
 
     gotEvent = {}
@@ -19,7 +19,7 @@ describe('ScriptManager', ->
   )
 
   xit('is silent when script event do not match', ->
-    note = {channel: 'cnn', event: {1:1}}
+    note = {channel: 'cnn', event: {1: 1}}
     noteGroup = {duration: 0, notes: [note]}
     script =
       channel: 'pbs'
@@ -30,7 +30,7 @@ describe('ScriptManager', ->
 
       noteChain: [noteGroup]
 
-    sm = new SM([script])
+    sm = new ScriptManager([script])
     sm.paused = false
 
     gotEvent = null
@@ -38,31 +38,31 @@ describe('ScriptManager', ->
     Backbone.Mediator.subscribe('cnn', f, @)
 
     # bunch of mismatches
-    Backbone.Mediator.publish('pbs', {foo:'rad'})
+    Backbone.Mediator.publish('pbs', {foo: 'rad'})
     expect(gotEvent).toBeNull()
     Backbone.Mediator.publish('pbs', 'bar')
     Backbone.Mediator.publish('pbs')
-    Backbone.Mediator.publish('pbs', {foo:'bar'})
+    Backbone.Mediator.publish('pbs', {foo: 'bar'})
     expect(gotEvent[1]).toBe(note.event[1])
     sm.destroy()
     Backbone.Mediator.unsubscribe('cnn', f, @)
   )
 
   xit('makes no subscriptions when something is invalid', ->
-    note = {event: {1:1}} # channel is required
+    note = {event: {1: 1}} # channel is required
     noteGroup = {notes: [note]}
     script = {channel: 'pbs', noteChain: [noteGroup]}
-    sm = new SM([script])
+    sm = new ScriptManager([script])
     expect(sm.subscriptions['pbs']).toBe(undefined)
     sm.destroy()
   )
 
   xit('fills out lots of notes based on note group properties', ->
-    note = {channel: 'cnn', event: {1:1}}
+    note = {channel: 'cnn', event: {1: 1}}
 
     noteGroup =
       duration: 0
-      botPos: [1,2]
+      botPos: [1, 2]
       botMessage: 'testers'
       domHighlight: '#code-area'
       surfaceHighlights: ['Guy0', 'Guy1']
@@ -71,7 +71,7 @@ describe('ScriptManager', ->
 
     script = {channel: 'pbs', noteChain: [noteGroup]}
 
-    sm = new SM([script])
+    sm = new ScriptManager([script])
     sm.paused = false
 
     Backbone.Mediator.publish('pbs')
@@ -88,12 +88,12 @@ describe('ScriptManager', ->
   )
 
   xit('releases notes based on user confirmation', ->
-    note1 = {channel: 'cnn', event: {1:1}}
-    note2 = {channel: 'cbs', event: {2:2}}
+    note1 = {channel: 'cnn', event: {1: 1}}
+    note2 = {channel: 'cbs', event: {2: 2}}
     noteGroup1 = {duration: 0, notes: [note1]}
     noteGroup2 = {duration: 0, notes: [note2]}
     script = {channel: 'pbs', noteChain: [noteGroup1, noteGroup2]}
-    sm = new SM({scripts:[script]})
+    sm = new ScriptManager({scripts: [script]})
     sm.paused = false
 
     gotCnnEvent = null
@@ -110,7 +110,7 @@ describe('ScriptManager', ->
     expect(sm.scriptInProgress).toBe(true)
     runs(-> Backbone.Mediator.publish('end-current-script'))
     f = -> gotCbsEvent?
-    waitsFor(f, "The next event should have been published", 20)
+    waitsFor(f, 'The next event should have been published', 20)
     f = ->
       expect(gotCnnEvent[1]).toBe(1)
       expect(gotCbsEvent[2]).toBe(2)
@@ -125,14 +125,14 @@ describe('ScriptManager', ->
 
   xit('ignores triggers for scripts waiting for other scripts to fire', ->
     # channel2 won't fire the cbs notification until channel1 does its thing
-    note1 = {channel: 'cnn', event: {1:1}}
-    note2 = {channel: 'cbs', event: {2:2}}
+    note1 = {channel: 'cnn', event: {1: 1}}
+    note2 = {channel: 'cbs', event: {2: 2}}
     noteGroup1 = {duration: 0, notes: [note1]}
     noteGroup2 = {duration: 0, notes: [note2]}
     script1 = {channel: 'channel1', id: 'channel1Script', noteChain: [noteGroup1]}
     script2 = {channel: 'channel2', scriptPrereqs: ['channel1Script'], noteChain: [noteGroup2]}
 
-    sm = new SM([script1, script2])
+    sm = new ScriptManager([script1, script2])
     sm.paused = false
     gotCbsEvent = null
     f = (event) -> gotCbsEvent = event
diff --git a/test/app/lib/deltas.spec.coffee b/test/app/lib/deltas.spec.coffee
new file mode 100644
index 000000000..e658f3869
--- /dev/null
+++ b/test/app/lib/deltas.spec.coffee
@@ -0,0 +1,18 @@
+deltas = require 'lib/deltas'
+
+describe 'deltas lib', ->
+  
+  describe 'getConflicts', ->
+  
+    it 'handles conflicts where one change conflicts with several changes', ->
+      originalData = {list:[1,2,3]}
+      forkA = {list:['1', 2, '3']}
+      forkB = {noList: '...'}
+      differ = deltas.makeJSONDiffer()
+      
+      expandedDeltaA = deltas.expandDelta(differ.diff originalData, forkA)
+      expandedDeltaB = deltas.expandDelta(differ.diff originalData, forkB)
+      deltas.getConflicts(expandedDeltaA, expandedDeltaB)
+      for delta in expandedDeltaA
+        expect(delta.conflict).toBeDefined()
+      
\ No newline at end of file
diff --git a/test/app/lib/forms.spec.coffee b/test/app/lib/forms.spec.coffee
deleted file mode 100644
index c7f040d99..000000000
--- a/test/app/lib/forms.spec.coffee
+++ /dev/null
@@ -1,21 +0,0 @@
-describe 'forms library', ->
-  forms = require 'lib/forms'
-  Router = require 'lib/Router'
-  #it 'adds errors to the create account form', ->
-  #  router = new Router()
-  #  router.openRoute('home')
-  #
-  #  # doesn't work
-  #  console.log "going to click", $('button[data-target="modal/signup"]').click().length, "signup buttons"
-  #  forms.applyErrorsToForm($('#signup-modal'), [message:"is bad", property:"email"])
-  #  messages = $('#signup-modal .help-inline')
-  #  expect(messages.length).toBe(1)
-  #  expect($('#signup-modal .error').length).toBe(1)
-  #  expect(messages.text()).toBe('Email is bad.')
-  #
-  #it 'clears errors from the create account form', ->
-  #  expect($('#signup-modal .help-inline').length).toBe(1)
-  #  expect($('#signup-modal .error').length).toBe(1)
-  #  forms.clearFormAlerts($('#signup-modal'))
-  #  expect($('#signup-modal .help-inline').length).toBe(0)
-  #  expect($('#signup-modal .error').length).toBe(0)
\ No newline at end of file
diff --git a/test/app/lib/goal_manager.spec.coffee b/test/app/lib/goal_manager.spec.coffee
index b5eb25367..df1d2ef02 100644
--- a/test/app/lib/goal_manager.spec.coffee
+++ b/test/app/lib/goal_manager.spec.coffee
@@ -1,20 +1,20 @@
 xdescribe 'GoalManager', ->
-  GoalManager = require('lib/world/GoalManager')
+  GoalManager = require 'lib/world/GoalManager'
 
   liveState =
     stateMap:
-      '1':{health:10}
-      '2':{health:5}
+      '1': {health: 10}
+      '2': {health: 5}
 
   halfLiveState =
     stateMap:
-      '1':{health:0}
-      '2':{health:5}
+      '1': {health: 0}
+      '2': {health: 5}
 
   deadState =
     stateMap:
-      '1':{health:0}
-      '2':{health:-5}
+      '1': {health: 0}
+      '2': {health: -5}
 
 
   it 'can tell when everyone is dead', ->
@@ -22,10 +22,10 @@ xdescribe 'GoalManager', ->
     world =
       frames: [liveState, liveState, liveState]
     gm.setWorld(world)
-      
-    goal = { id: 'die', name: 'Kill Everyone', killGuy: ['1','2'] }
+
+    goal = {id: 'die', name: 'Kill Everyone', killGuy: ['1', '2']}
     gm.addGoal goal
-    
+
     expect(gm.goalStates['die'].complete).toBe(false)
 
     world.frames.push(deadState)
@@ -39,10 +39,10 @@ xdescribe 'GoalManager', ->
     world =
       frames: [liveState, liveState, liveState, deadState, deadState]
     gm.setWorld(world)
-  
-    goal = { id: 'live', name: 'Save guy 2', saveGuy: '2' }
+
+    goal = {id: 'live', name: 'Save guy 2', saveGuy: '2'}
     gm.addGoal goal
-  
+
     expect(gm.goalStates['live'].complete).toBe(false)
     world =
       frames: [liveState, liveState, liveState, liveState, liveState]
@@ -53,4 +53,4 @@ xdescribe 'GoalManager', ->
 #    world.frames.push(deadState)
 #    gm.setWorld(world)
 #    expect(gm.goalStates['live'].complete).toBe(true)
-#    expect(gm.goalStates['live'].frameCompleted).toBe(3)
\ No newline at end of file
+#    expect(gm.goalStates['live'].frameCompleted).toBe(3)
diff --git a/test/app/lib/local_mongo.spec.coffee b/test/app/lib/local_mongo.spec.coffee
new file mode 100644
index 000000000..4aa2dc76e
--- /dev/null
+++ b/test/app/lib/local_mongo.spec.coffee
@@ -0,0 +1,80 @@
+describe 'Local Mongo queries', ->
+  LocalMongo = require 'lib/LocalMongo'
+
+  beforeEach ->
+    @fixture1 =
+      'id': 'somestring'
+      'value': 9000
+      'levels': [3, 8, 21]
+      'worth': 6
+      'type': 'unicorn'
+      'likes': ['poptarts', 'popsicles', 'popcorn']
+
+    @fixture2 = this: is: so: 'deep'
+
+  it 'regular match of a property', ->
+    expect(LocalMongo.matchesQuery(@fixture1, 'gender': 'unicorn')).toBeFalsy()
+    expect(LocalMongo.matchesQuery(@fixture1, 'type': 'unicorn')).toBeTruthy()
+    expect(LocalMongo.matchesQuery(@fixture1, 'type': 'zebra')).toBeFalsy()
+    expect(LocalMongo.matchesQuery(@fixture1, 'type': 'unicorn', 'id': 'somestring')).toBeTruthy()
+
+  it 'array match of a property', ->
+    expect(LocalMongo.matchesQuery(@fixture1, 'likes': 'poptarts')).toBeTruthy()
+    expect(LocalMongo.matchesQuery(@fixture1, 'likes': 'walks on the beach')).toBeFalsy()
+
+  it 'nested match', ->
+    expect(LocalMongo.matchesQuery(@fixture2, 'this.is.so': 'deep')).toBeTruthy()
+
+  it '$gt selector', ->
+    expect(LocalMongo.matchesQuery(@fixture1, 'value': '$gt': 8000)).toBeTruthy()
+    expect(LocalMongo.matchesQuery(@fixture1, 'value': '$gt': [8000, 10000])).toBeTruthy()
+    expect(LocalMongo.matchesQuery(@fixture1, 'levels': '$gt': [10, 20, 30])).toBeTruthy()
+    expect(LocalMongo.matchesQuery(@fixture1, 'value': '$gt': 9000)).toBeFalsy()
+    expect(LocalMongo.matchesQuery(@fixture1, 'value': {'$gt': 8000}, 'worth': {'$gt': 5})).toBeTruthy()
+
+  it '$gte selector', ->
+    expect(LocalMongo.matchesQuery(@fixture1, 'value': '$gte': 9001)).toBeFalsy()
+    expect(LocalMongo.matchesQuery(@fixture1, 'value': '$gte': 9000)).toBeTruthy()
+    expect(LocalMongo.matchesQuery(@fixture1, 'value': '$gte': [9000, 10000])).toBeTruthy()
+    expect(LocalMongo.matchesQuery(@fixture1, 'levels': '$gte': [21, 30])).toBeTruthy()
+
+  it '$lt selector', ->
+    expect(LocalMongo.matchesQuery(@fixture1, 'value': '$lt': 9001)).toBeTruthy()
+    expect(LocalMongo.matchesQuery(@fixture1, 'value': '$lt': 9000)).toBeFalsy()
+    expect(LocalMongo.matchesQuery(@fixture1, 'value': '$lt': [9001, 9000])).toBeTruthy()
+    expect(LocalMongo.matchesQuery(@fixture1, 'levels': '$lt': [10, 20, 30])).toBeTruthy()
+    expect(LocalMongo.matchesQuery(@fixture1, 'value': {'$lt': 9001}, 'worth': {'$lt': 7})).toBeTruthy()
+
+  it '$lte selector', ->
+    expect(LocalMongo.matchesQuery(@fixture1, 'value': '$lte': 9000)).toBeTruthy()
+    expect(LocalMongo.matchesQuery(@fixture1, 'value': '$lte': 8000)).toBeFalsy()
+    expect(LocalMongo.matchesQuery(@fixture1, 'value': {'$lte': 9000}, 'worth': {'$lte': [6, 5]})).toBeTruthy()
+
+  it '$ne selector', ->
+    expect(LocalMongo.matchesQuery(@fixture1, 'value': '$ne': 9000)).toBeFalsy()
+    expect(LocalMongo.matchesQuery(@fixture1, 'id': '$ne': 'otherstring')).toBeTruthy()
+    expect(LocalMongo.matchesQuery(@fixture1, 'id': '$ne': ['otherstring', 'somestring'])).toBeFalsy()
+    expect(LocalMongo.matchesQuery(@fixture1, 'likes': '$ne': ['popcorn', 'chicken'])).toBeFalsy()
+
+  it '$in selector', ->
+    expect(LocalMongo.matchesQuery(@fixture1, 'type': '$in': ['unicorn', 'zebra'])).toBeTruthy()
+    expect(LocalMongo.matchesQuery(@fixture1, 'type': '$in': ['cats', 'dogs'])).toBeFalsy()
+    expect(LocalMongo.matchesQuery(@fixture1, 'likes': '$in': ['popcorn', 'chicken'])).toBeTruthy()
+
+  it '$nin selector', ->
+    expect(LocalMongo.matchesQuery(@fixture1, 'type': '$nin': ['unicorn', 'zebra'])).toBeFalsy()
+    expect(LocalMongo.matchesQuery(@fixture1, 'type': '$nin': ['cats', 'dogs'])).toBeTruthy()
+    expect(LocalMongo.matchesQuery(@fixture1, 'likes': '$nin': ['popcorn', 'chicken'])).toBeFalsy()
+
+  it '$or operator', ->
+    expect(LocalMongo.matchesQuery(@fixture1, $or: [{value: 9000}, {type: 'zebra'}])).toBeTruthy()
+    expect(LocalMongo.matchesQuery(@fixture1, $or: [{value: 9001}, {worth: '$lt': 10}])).toBeTruthy()
+
+  it '$and operator', ->
+    expect(LocalMongo.matchesQuery(@fixture1, $and: [{value: 9000}, {type: 'zebra'}])).toBeFalsy()
+    expect(LocalMongo.matchesQuery(@fixture1, $and: [{value: 9000}, {type: 'unicorn'}])).toBeTruthy()
+    expect(LocalMongo.matchesQuery(@fixture1, $and: [{value: '$gte': 9000}, {worth: '$lt': 10}])).toBeTruthy()
+
+  it '$exists operator', ->
+    expect(LocalMongo.matchesQuery(@fixture1, type: $exists: true)).toBeTruthy()
+    expect(LocalMongo.matchesQuery(@fixture1, interesting: $exists: false)).toBeTruthy()
diff --git a/test/app/lib/path.spec.coffee b/test/app/lib/path.spec.coffee
deleted file mode 100644
index 64ee09c77..000000000
--- a/test/app/lib/path.spec.coffee
+++ /dev/null
@@ -1,26 +0,0 @@
-describe('Path.createPath', ->
-  path = require 'lib/surface/path'
-  it('ignores the first point', ->
-    points = [[0,0], [1,1], [2,2]]
-    g = new createjs.Graphics()
-    g.lineTo = jasmine.createSpy('graphicz')
-    path.createPath(points, {tailColor:[100,100,100,0.0]}, g)
-    expect(g.lineTo.calls.length).toBe(1)
-    expect(g.lineTo.calls[0].args[0]).toBe(points[2])
-  )
-  
-#  # BROKEN
-  xit('dots correctly', ->
-    points = ([x,x] for x in [0..30])
-    g = new createjs.Graphics()
-    calls = []
-    funcs = ['lineTo', 'moveTo', 'beginStroke', 'endStroke', 'setStrokeStyle']
-    for funcName in funcs
-      f = (funcName) => (args...) =>
-        calls.push("#{funcName}(#{args})")
-      g[funcName] = jasmine.createSpy('graphics').andCallFake(f(funcName))
-    path.createPath(points, {dotted:true}, g)
-    expect(g.beginStroke.calls.length).toBe(4)
-  )
-)
-
diff --git a/test/app/lib/router.spec.coffee b/test/app/lib/router.spec.coffee
deleted file mode 100644
index 97bf9e8e6..000000000
--- a/test/app/lib/router.spec.coffee
+++ /dev/null
@@ -1,10 +0,0 @@
-describe 'Router', ->
-  Router = require 'lib/Router'
-  xit 'caches the home view', ->
-    router = new Router()
-    router.openRoute('home')
-    #currentView doesn't exist
-    expect(router.cache['home']).toBe(router.currentView)
-    home = router.currentView
-    router.openRoute('home')
-    expect(router.cache['home']).toBe(router.currentView)
diff --git a/test/app/lib/surface/camera.spec.coffee b/test/app/lib/surface/camera.spec.coffee
index 8019cd38f..f875a1135 100644
--- a/test/app/lib/surface/camera.spec.coffee
+++ b/test/app/lib/surface/camera.spec.coffee
@@ -20,7 +20,6 @@ describe 'Camera (Surface point of view)', ->
     expect(cap.x).toBeCloseTo (sup.x - cam.surfaceViewport.x) * cam.zoom
     expect(cap.y).toBeCloseTo (sup.y - cam.surfaceViewport.y) * cam.zoom
 
-
     scp = cam.worldToScreen wop
     # If we ever want to use screen conversion, then make it and add this test
     #expect(scp.x).toBeCloseTo cap.x * @someCanvasToScreenXScaleFactor
@@ -52,7 +51,7 @@ describe 'Camera (Surface point of view)', ->
       x: cam.worldViewport.cx
       y: cam.worldViewport.cy - camDist * cam.y2x * cam.z2y
       z: camDist * cam.z2x * cam.y2z
-    #console.log "botFOV", botFOV * 180 / Math.PI, "botDist", botDist, "camDist", camDist, "target pos", targetPos, "actual pos", cam.cameraWorldPos()
+    #console.log 'botFOV', botFOV * 180 / Math.PI, 'botDist', botDist, 'camDist', camDist, 'target pos', targetPos, 'actual pos', cam.cameraWorldPos()
     expectPositionsEqual cam.cameraWorldPos(), targetPos
 
     if wop
@@ -98,25 +97,25 @@ describe 'Camera (Surface point of view)', ->
                 checkCameraPos cam, wop
 
   it 'works at 90 degrees', ->
-    cam = new Camera { attr: (x) -> 100 }, 100 * Camera.MPP, 100 * Camera.MPP
+    cam = new Camera {attr: (x) -> 100}, 100 * Camera.MPP, 100 * Camera.MPP
     expect(cam.x2y).toBeCloseTo 1
     expect(cam.x2z).toBeGreaterThan 9001
     expect(cam.z2y).toBeCloseTo 0
 
   it 'works at 0 degrees', ->
-    cam = new Camera { attr: (x) -> 100 }, 100 * Camera.MPP, 100 * Camera.MPP
+    cam = new Camera {attr: (x) -> 100}, 100 * Camera.MPP, 100 * Camera.MPP
     expect(cam.x2z).toBeGreaterThan 9001
     expect(cam.x2y).toBeCloseTo 1
     expect(cam.z2y).toBeCloseTo 0
 
   it 'works at 45 degrees', ->
-    cam = new Camera { attr: (x) -> 100 }, 100 * Camera.MPP, 100 * Camera.MPP
+    cam = new Camera {attr: (x) -> 100}, 100 * Camera.MPP, 100 * Camera.MPP
     expect(cam.x2y).toBeCloseTo 1
     expect(cam.x2z).toBeGreaterThan 9001
     expect(cam.z2y).toBeCloseTo 0
 
   xit 'works at default angle of asin(0.75) ~= 48.9 degrees', ->
-    cam = new Camera { attr: (x) -> 100 }, 100 * Camera.MPP, 100 * Camera.MPP
+    cam = new Camera {attr: (x) -> 100}, 100 * Camera.MPP, 100 * Camera.MPP
     angle = 1 / Math.cos angle
     expect(cam.angle).toBeCloseTo angle
     expect(cam.x2y).toBeCloseTo 1
@@ -124,7 +123,7 @@ describe 'Camera (Surface point of view)', ->
     expect(cam.z2y).toBeCloseTo 0
 
   xit 'works at 2x zoom, 90 degrees', ->
-    cam = new Camera { attr: (x) -> 100 }, 100 * Camera.MPP, 100 * Camera.MPP
+    cam = new Camera {attr: (x) -> 100}, 100 * Camera.MPP, 100 * Camera.MPP
     checkCameraPos cam
     wop = x: 5, y: 2.5, z: 7
     cap = cam.worldToCanvas wop
@@ -144,7 +143,7 @@ describe 'Camera (Surface point of view)', ->
     expectPositionsEqual cap, {x: 0, y: 50}
 
   xit 'works at 2x zoom, 30 degrees', ->
-    cam = new Camera { attr: (x) -> 100 }, 100 * Camera.MPP, 2 * 100 * Camera.MPP
+    cam = new Camera {attr: (x) -> 100}, 100 * Camera.MPP, 2 * 100 * Camera.MPP
     expect(cam.x2y).toBeCloseTo 1
     expect(cam.x2z).toBeGreaterThan 9001
     checkCameraPos cam
@@ -165,15 +164,15 @@ describe 'Camera (Surface point of view)', ->
     expectPositionsEqual cap, {x: 50, y: -100}
 
   it 'works at 2x zoom, 60 degree hFOV', ->
-    cam = new Camera { attr: (x) -> 100 }, 100 * Camera.MPP, 100 * Camera.MPP
+    cam = new Camera {attr: (x) -> 100}, 100 * Camera.MPP, 100 * Camera.MPP
     checkCameraPos cam
 
   xit 'works at 2x zoom, 60 degree hFOV, 40 degree hFOV', ->
-    cam = new Camera { attr: (x) -> x is 'height' ? 63.041494 : 100 }, 100 * Camera.MPP, 63.041494 * Camera.MPP
+    cam = new Camera {attr: (x) -> x is 'height' ? 63.041494 : 100}, 100 * Camera.MPP, 63.041494 * Camera.MPP
     checkCameraPos cam
 
   xit 'works on a surface wider than it is tall, 30 degrees, default viewing upper left corner', ->
-    cam = new Camera { attr: (x) -> 100 }, 200 * Camera.MPP, 2 * 50 * Camera.MPP
+    cam = new Camera {attr: (x) -> 100}, 200 * Camera.MPP, 2 * 50 * Camera.MPP
     checkCameraPos cam
     expect(cam.zoom).toBeCloseTo 2
     wop = x: 5, y: 4, z: 6 * cam.y2z  # like x: 5, y: 10 out of world width: 20, height: 10
diff --git a/test/app/lib/utils.spec.coffee b/test/app/lib/utils.spec.coffee
index 925bc8e54..061a9aa71 100644
--- a/test/app/lib/utils.spec.coffee
+++ b/test/app/lib/utils.spec.coffee
@@ -3,26 +3,25 @@ describe 'utils library', ->
 
   beforeEach ->
     this.fixture1 =
-      "text": "G'day, Wizard! Come to practice? Well, let's get started..."
-      "blurb": "G'day"
-      "i18n":
-        "es-419":
-          "text": "¡Buenas, Hechicero! ¿Vienes a practicar? Bueno, empecemos..."
-        "es-ES":
-          "text": "¡Buenas Mago! ¿Vienes a practicar? Bien, empecemos..."
-        "es":
-          "text": "¡Buenas Mago! ¿Vienes a practicar? Muy bien, empecemos..."
-        "fr":
-          "text": "S'lut, Magicien! Venu pratiquer? Ok, bien débutons..."
-        "pt-BR":
-          "text": "Bom dia, feiticeiro! Veio praticar? Então vamos começar..."
-        "en":
-          "text": "Ohai Magician!"
-        "de":
-          "text": "'N Tach auch, Zauberer! Kommst Du zum Üben? Dann lass uns anfangen..."
-        "sv":
-          "text": "Godagens, trollkarl! Kommit för att öva? Nå, låt oss börja..."
-
+      'text': 'G\'day, Wizard! Come to practice? Well, let\'s get started...'
+      'blurb': 'G\'day'
+      'i18n':
+        'es-419':
+          'text': '¡Buenas, Hechicero! ¿Vienes a practicar? Bueno, empecemos...'
+        'es-ES':
+          'text': '¡Buenas Mago! ¿Vienes a practicar? Bien, empecemos...'
+        'es':
+          'text': '¡Buenas Mago! ¿Vienes a practicar? Muy bien, empecemos...'
+        'fr':
+          'text': 'S\'lut, Magicien! Venu pratiquer? Ok, bien débutons...'
+        'pt-BR':
+          'text': 'Bom dia, feiticeiro! Veio praticar? Então vamos começar...'
+        'en':
+          'text': 'Ohai Magician!'
+        'de':
+          'text': '\'N Tach auch, Zauberer! Kommst Du zum Üben? Dann lass uns anfangen...'
+        'sv':
+          'text': 'Godagens, trollkarl! Kommit för att öva? Nå, låt oss börja...'
 
   it 'i18n should find a valid target string', ->
     expect(util.i18n(this.fixture1, 'text', 'sv')).toEqual(this.fixture1.i18n['sv'].text)
diff --git a/test/app/lib/world/goal_manager.spec.coffee b/test/app/lib/world/GoalManager.spec.coffee
similarity index 78%
rename from test/app/lib/world/goal_manager.spec.coffee
rename to test/app/lib/world/GoalManager.spec.coffee
index c7f057fea..d17cc193a 100644
--- a/test/app/lib/world/goal_manager.spec.coffee
+++ b/test/app/lib/world/GoalManager.spec.coffee
@@ -1,32 +1,19 @@
-describe('World', ->
+describe('GoalManager', ->
   GoalManager = require 'lib/world/GoalManager'
-  #validator = require 'validators/goal'
+  killGoal = {name: 'Kill Guy', killThangs: ['Guy1', 'Guy2'], id: 'killguy'}
+  saveGoal = {name: 'Save Guy', saveThangs: ['Guy1', 'Guy2'], id: 'saveguy'}
+  getToLocGoal = {name: 'Go there', getToLocation: {target: 'Frying Pan', who: 'Potato'}, id: 'id'}
+  keepFromLocGoal = {name: 'Go there', keepFromLocation: {target: 'Frying Pan', who: 'Potato'}, id: 'id'}
+  leaveMapGoal = {name: 'Go away', leaveOffSide: {who: 'Yall'}, id: 'id'}
+  stayMapGoal =  {name: 'Stay here', keepFromLeavingOffSide: {who: 'Yall'}, id: 'id'}
+  getItemGoal = {name: 'Mine', getItem: {who: 'Grabby', itemID: 'Sandwich'}, id: 'id'}
+  keepItemGoal = {name: 'Not Yours', keepFromGettingItem: {who: 'Grabby', itemID: 'Sandwich'}, id: 'id'}
 
-  killGoal = { name: 'Kill Guy', killGuy: ['Guy1', 'Guy2'], id:'killguy'}
-  saveGoal = { name: 'Save Guy', saveGuy: ['Guy1', 'Guy2'], id:'saveguy'}
-  getToLocGoal = { name: 'Go there', getToLocation: {target:'Frying Pan', who:'Potato'}, id:'id'}
-  keepFromLocGoal = { name: 'Go there', keepFromLocation: {target:'Frying Pan', who:'Potato'}, id:'id'}
-  leaveMapGoal = { name: 'Go away', leaveOffSide: {who:'Yall'}, id:'id'}
-  stayMapGoal =  { name: 'Stay here', keepFromLeavingOffSide: {who:'Yall'}, id:'id'}
-  getItemGoal = { name: 'Mine', getItem: {who:'Grabby', itemID:'Sandwich'}, id:'id'}
-  keepItemGoal = { name: 'Not Yours', keepFromGettingItem: {who:'Grabby', itemID:'Sandwich'}, id:'id'}
-
-  xit 'uses valid goals', ->
-    goals = [
-      killGoal, saveGoal,
-      getToLocGoal, keepFromLocGoal,
-      leaveMapGoal, stayMapGoal,
-      getItemGoal, keepItemGoal,
-    ]
-    for goal in goals
-      result = validator(goal)
-      expect(result.valid).toBe(true)
-
-  xit('handles kill goal', ->
+  it('handles kill goal', ->
     gm = new GoalManager()
     gm.setGoals([killGoal])
     gm.worldGenerationWillBegin()
-    gm.submitWorldGenerationEvent('world:thang-died', {thang:{id:'Guy1'}}, 10)
+    gm.submitWorldGenerationEvent('world:thang-died', {thang: {id: 'Guy1'}}, 10)
     gm.worldGenerationEnded()
     goalStates = gm.getGoalStates()
     expect(goalStates.killguy.status).toBe('incomplete')
@@ -34,7 +21,7 @@ describe('World', ->
     expect(goalStates.killguy.killed.Guy2).toBe(false)
     expect(goalStates.killguy.keyFrame).toBe(0)
 
-    gm.submitWorldGenerationEvent('world:thang-died', {thang:{id:'Guy2'}}, 20)
+    gm.submitWorldGenerationEvent('world:thang-died', {thang: {id: 'Guy2'}}, 20)
     goalStates = gm.getGoalStates()
     expect(goalStates.killguy.status).toBe('success')
     expect(goalStates.killguy.killed.Guy1).toBe(true)
@@ -42,11 +29,11 @@ describe('World', ->
     expect(goalStates.killguy.keyFrame).toBe(20)
   )
 
-  xit('handles save goal', ->
+  it('handles save goal', ->
     gm = new GoalManager()
     gm.setGoals([saveGoal])
     gm.worldGenerationWillBegin()
-    gm.submitWorldGenerationEvent('world:thang-died', {thang:{id:'Guy1'}}, 10)
+    gm.submitWorldGenerationEvent('world:thang-died', {thang: {id: 'Guy1'}}, 10)
     gm.worldGenerationEnded()
     goalStates = gm.getGoalStates()
     expect(goalStates.saveguy.status).toBe('failure')
@@ -78,7 +65,7 @@ describe('World', ->
     gm = new GoalManager()
     gm.setGoals([getToLocGoal])
     gm.worldGenerationWillBegin()
-    gm.submitWorldGenerationEvent('world:thang-touched-goal', {actor:{id:'Potato'}, touched:{id:'Frying Pan'}}, 10)
+    gm.submitWorldGenerationEvent('world:thang-touched-goal', {actor: {id: 'Potato'}, touched: {id: 'Frying Pan'}}, 10)
     gm.worldGenerationEnded()
     goalStates = gm.getGoalStates()
     expect(goalStates.id.status).toBe('success')
@@ -89,7 +76,7 @@ describe('World', ->
     gm = new GoalManager()
     gm.setGoals([keepFromLocGoal])
     gm.worldGenerationWillBegin()
-    gm.submitWorldGenerationEvent('world:thang-touched-goal', {actor:{id:'Potato'}, touched:{id:'Frying Pan'}}, 10)
+    gm.submitWorldGenerationEvent('world:thang-touched-goal', {actor: {id: 'Potato'}, touched: {id: 'Frying Pan'}}, 10)
     gm.worldGenerationEnded()
     goalStates = gm.getGoalStates()
     expect(goalStates.id.status).toBe('failure')
@@ -118,7 +105,7 @@ describe('World', ->
     gm = new GoalManager()
     gm.setGoals([leaveMapGoal])
     gm.worldGenerationWillBegin()
-    gm.submitWorldGenerationEvent('world:thang-left-map', {thang:{id:'Yall'}}, 10)
+    gm.submitWorldGenerationEvent('world:thang-left-map', {thang: {id: 'Yall'}}, 10)
     gm.worldGenerationEnded()
     goalStates = gm.getGoalStates()
     expect(goalStates.id.status).toBe('success')
@@ -129,7 +116,7 @@ describe('World', ->
     gm = new GoalManager()
     gm.setGoals([stayMapGoal])
     gm.worldGenerationWillBegin()
-    gm.submitWorldGenerationEvent('world:thang-left-map', {thang:{id:'Yall'}}, 10)
+    gm.submitWorldGenerationEvent('world:thang-left-map', {thang: {id: 'Yall'}}, 10)
     gm.worldGenerationEnded()
     goalStates = gm.getGoalStates()
     expect(goalStates.id.status).toBe('failure')
@@ -158,7 +145,7 @@ describe('World', ->
     gm = new GoalManager()
     gm.setGoals([getItemGoal])
     gm.worldGenerationWillBegin()
-    gm.submitWorldGenerationEvent('world:thang-collected-item', {actor:{id:'Grabby'}, item:{id:'Sandwich'}}, 10)
+    gm.submitWorldGenerationEvent('world:thang-collected-item', {actor: {id: 'Grabby'}, item: {id: 'Sandwich'}}, 10)
     gm.worldGenerationEnded()
     goalStates = gm.getGoalStates()
     expect(goalStates.id.status).toBe('success')
@@ -169,7 +156,7 @@ describe('World', ->
     gm = new GoalManager()
     gm.setGoals([keepItemGoal])
     gm.worldGenerationWillBegin()
-    gm.submitWorldGenerationEvent('world:thang-collected-item', {actor:{id:'Grabby'}, item:{id:'Sandwich'}}, 10)
+    gm.submitWorldGenerationEvent('world:thang-collected-item', {actor: {id: 'Grabby'}, item: {id: 'Sandwich'}}, 10)
     gm.worldGenerationEnded()
     goalStates = gm.getGoalStates()
     expect(goalStates.id.status).toBe('failure')
diff --git a/test/app/lib/world/rectangle.spec.coffee b/test/app/lib/world/rectangle.spec.coffee
index 1f674a8a8..76b13e0d3 100644
--- a/test/app/lib/world/rectangle.spec.coffee
+++ b/test/app/lib/world/rectangle.spec.coffee
@@ -71,11 +71,11 @@ describe 'Rectangle', ->
   it 'is its own AABB when not rotated', ->
     rect = new Rectangle 10, 20, 30, 40
     aabb = rect.axisAlignedBoundingBox()
-    for prop in ["x", "y", "width", "height"]
+    for prop in ['x', 'y', 'width', 'height']
       expect(rect[prop]).toBe aabb[prop]
 
   it 'is its own AABB when rotated 180', ->
     rect = new Rectangle 10, 20, 30, 40, Math.PI
     aabb = rect.axisAlignedBoundingBox()
-    for prop in ["x", "y", "width", "height"]
+    for prop in ['x', 'y', 'width', 'height']
       expect(rect[prop]).toBe aabb[prop]
diff --git a/test/app/lib/world/thang.spec.coffee b/test/app/lib/world/thang.spec.coffee
deleted file mode 100644
index 3e275d6df..000000000
--- a/test/app/lib/world/thang.spec.coffee
+++ /dev/null
@@ -1,14 +0,0 @@
-describe 'Thang', ->
-  Thang = require 'lib/world/thang'
-  World = require 'lib/world/world'
-  Rectangle = require 'lib/world/rectangle'
-  Vector = require 'lib/world/vector'
-  world = new World()
-
-  #it 'intersects itself', ->
-  #  spyOn(Vector, 'subtract').andCallThrough()
-  #  for thang in world.thangs
-  #    spyOn(thang, 'intersects').andCallThrough()
-  #    expect(thang.intersects thang).toBeTruthy()
-  #    #console.log thang.intersects.calls[0].args + ''
-  #  #console.log "Vector.subtract calls: " + Vector.subtract.calls.length
diff --git a/test/app/lib/world/world.spec.coffee b/test/app/lib/world/world.spec.coffee
deleted file mode 100644
index bfef231df..000000000
--- a/test/app/lib/world/world.spec.coffee
+++ /dev/null
@@ -1,2 +0,0 @@
-describe 'World', ->
-  World = require 'lib/world/world'
diff --git a/test/app/models/CocoModel.spec.coffee b/test/app/models/CocoModel.spec.coffee
new file mode 100644
index 000000000..67e019c9a
--- /dev/null
+++ b/test/app/models/CocoModel.spec.coffee
@@ -0,0 +1,84 @@
+CocoModel = require 'models/CocoModel'
+
+class BlandClass extends CocoModel
+  @className: 'Bland'
+  @schema: {
+    type: 'object'
+    additionalProperties: false
+    properties:
+      number: {type: 'number'}
+      object: {type: 'object'}
+      string: {type: 'string'}
+      _id: {type: 'string'}
+  }
+  urlRoot: '/db/bland'
+
+describe 'CocoModel', ->
+  describe 'save', ->
+
+    it 'saves to db/<urlRoot>', ->
+      b = new BlandClass({})
+      res = b.save()
+      request = jasmine.Ajax.requests.mostRecent()
+      expect(res).toBeDefined()
+      expect(request.url).toBe(b.urlRoot)
+      expect(request.method).toBe('POST')
+
+    it 'does not save if the data is invalid based on the schema', ->
+      b = new BlandClass({number: 'NaN'})
+      res = b.save()
+      expect(res).toBe(false)
+      request = jasmine.Ajax.requests.mostRecent()
+      expect(request).toBeUndefined()
+
+    it 'uses PUT when _id is included', ->
+      b = new BlandClass({_id: 'test'})
+      b.save()
+      request = jasmine.Ajax.requests.mostRecent()
+      expect(request.method).toBe('PUT')
+
+  describe 'patch', ->
+    it 'PATCHes only properties that have changed', ->
+      b = new BlandClass({_id: 'test', number: 1})
+      b.loaded = true
+      b.set('string', 'string')
+      b.patch()
+      request = jasmine.Ajax.requests.mostRecent()
+      params = JSON.parse request.params
+      expect(params.string).toBeDefined()
+      expect(params.number).toBeUndefined()
+
+    it 'collates all changes made over several sets', ->
+      b = new BlandClass({_id: 'test', number: 1})
+      b.loaded = true
+      b.set('string', 'string')
+      b.set('object', {4: 5})
+      b.patch()
+      request = jasmine.Ajax.requests.mostRecent()
+      params = JSON.parse request.params
+      expect(params.string).toBeDefined()
+      expect(params.object).toBeDefined()
+      expect(params.number).toBeUndefined()
+
+    it 'does not include data from previous patches', ->
+      b = new BlandClass({_id: 'test', number: 1})
+      b.loaded = true
+      b.set('object', {1: 2})
+      b.patch()
+      request = jasmine.Ajax.requests.mostRecent()
+      attrs = JSON.stringify(b.attributes) # server responds with all
+      request.response({status: 200, responseText: attrs})
+
+      b.set('number', 3)
+      b.patch()
+      request = jasmine.Ajax.requests.mostRecent()
+      params = JSON.parse request.params
+      expect(params.object).toBeUndefined()
+
+    it 'does nothing when there\'s nothing to patch', ->
+      b = new BlandClass({_id: 'test', number: 1})
+      b.loaded = true
+      b.set('number', 1)
+      b.patch()
+      request = jasmine.Ajax.requests.mostRecent()
+      expect(request).toBeUndefined()
diff --git a/test/app/models/SuperModel.spec.coffee b/test/app/models/SuperModel.spec.coffee
new file mode 100644
index 000000000..1e64d8d14
--- /dev/null
+++ b/test/app/models/SuperModel.spec.coffee
@@ -0,0 +1,52 @@
+SuperModel = require 'models/SuperModel'
+User = require 'models/User'
+ComponentsCollection = require 'collections/ComponentsCollection'
+
+describe 'SuperModel', ->
+  describe 'progress (property)', ->
+    it 'is finished by default', ->
+      s = new SuperModel()
+      expect(s.finished()).toBeTruthy()
+
+    it 'is based on resource completion and value', (done) ->
+      s = new SuperModel()
+      r1 = s.addSomethingResource('???', 2)
+      r2 = s.addSomethingResource('???', 3)
+      expect(s.progress).toBe(0)
+      r1.markLoaded()
+
+      # progress updates are deferred so defer more
+      _.defer ->
+        expect(s.progress).toBe(0.4)
+        r2.markLoaded()
+        _.defer ->
+          expect(s.progress).toBe(1)
+          done()
+
+  describe 'loadModel (function)', ->
+    it 'starts loading the model if it isn\'t already loading', ->
+      s = new SuperModel()
+      m = new User({_id: '12345'})
+      s.loadModel(m, 'user')
+      request = jasmine.Ajax.requests.mostRecent()
+      expect(request).toBeDefined()
+
+    it 'also loads collections', ->
+      s = new SuperModel()
+      c = new ComponentsCollection()
+      s.loadModel(c, 'collection')
+      request = jasmine.Ajax.requests.mostRecent()
+      expect(request).toBeDefined()
+
+  describe 'events', ->
+    it 'triggers "loaded-all" when finished', (done) ->
+      s = new SuperModel()
+      m = new User({_id: '12345'})
+      triggered = false
+      s.once 'loaded-all', -> triggered = true
+      s.loadModel(m, 'user')
+      request = jasmine.Ajax.requests.mostRecent()
+      request.response({status: 200, responseText: '{}'})
+      _.defer ->
+        expect(triggered).toBe(true)
+        done()
diff --git a/test/app/views/editor/components_tab_view.spec.coffee b/test/app/views/editor/components_tab_view.spec.coffee
deleted file mode 100644
index a7c311041..000000000
--- a/test/app/views/editor/components_tab_view.spec.coffee
+++ /dev/null
@@ -1,4 +0,0 @@
-describe 'editor/level/thangs_tab', ->
-  ComponentsTabView = require 'views/editor/level/components_tab_view'
-
-  it 'does stuff', ->
diff --git a/test/app/views/editor/editor_view.spec.coffee b/test/app/views/editor/editor_view.spec.coffee
deleted file mode 100644
index fd53ed150..000000000
--- a/test/app/views/editor/editor_view.spec.coffee
+++ /dev/null
@@ -1,4 +0,0 @@
-describe 'editor/level', ->
-  EditorLevelView = require 'views/editor/level/home'
-
-  it 'does stuff', ->
diff --git a/test/app/views/editor/level/EditorLevelView.spec.coffee b/test/app/views/editor/level/EditorLevelView.spec.coffee
new file mode 100644
index 000000000..47b32700f
--- /dev/null
+++ b/test/app/views/editor/level/EditorLevelView.spec.coffee
@@ -0,0 +1,14 @@
+EditorLevelView = require 'views/editor/level/edit'
+
+emptyLevel = {'_id': '53a0a1e2d9048dbc3a793c81', 'name': 'Emptiness', 'description': 'Tis nothing..', 'documentation': {'generalArticles': [], 'specificArticles': []}, 'scripts': [], 'thangs': [], 'systems': [], 'victory': {}, 'version': {'minor': 0, 'major': 0, 'isLatestMajor': true, 'isLatestMinor': true}, 'index': '5388f9ac9a904d0000d94f87', 'slug': 'emptiness', 'creator': '5388f9ac9a904d0000d94f87', 'original': '53a0a1e2d9048dbc3a793c81', 'watchers': ['5388f9ac9a904d0000d94f87'], '__v': 0, 'created': '2014-06-17T20:15:30.207Z', 'permissions': [{'access': 'owner', 'target': '5388f9ac9a904d0000d94f87'}]}
+
+describe 'EditorLevelView', ->
+  describe 'revert button', ->
+    it 'opens just one modal when you click it', ->
+      view = new EditorLevelView({}, 'something')
+      request = jasmine.Ajax.requests.first()
+      request.response {status: 200, responseText: JSON.stringify(emptyLevel)}
+      view.render()
+      spyOn(view, 'openModalView')
+      view.$el.find('#revert-button').click()
+      expect(view.openModalView.calls.count()).toBe(1)
diff --git a/test/app/views/editor/scripts_tab_view.spec.coffee b/test/app/views/editor/scripts_tab_view.spec.coffee
deleted file mode 100644
index 079f12403..000000000
--- a/test/app/views/editor/scripts_tab_view.spec.coffee
+++ /dev/null
@@ -1,4 +0,0 @@
-describe 'editor/level/scripts_tab', ->
-  ScriptsTabView = require 'views/editor/level/scripts_tab_view'
-
-  it 'does stuff', ->
diff --git a/test/app/views/editor/settings_tab_view.spec.coffee b/test/app/views/editor/settings_tab_view.spec.coffee
deleted file mode 100644
index 9da3147ba..000000000
--- a/test/app/views/editor/settings_tab_view.spec.coffee
+++ /dev/null
@@ -1,4 +0,0 @@
-describe 'editor/level/settings_tab', ->
-  SettingsTabView = require 'views/editor/level/settings_tab_view'
-
-  it 'does stuff', ->
diff --git a/test/app/views/editor/systems_tab_view.spec.coffee b/test/app/views/editor/systems_tab_view.spec.coffee
deleted file mode 100644
index 08309e612..000000000
--- a/test/app/views/editor/systems_tab_view.spec.coffee
+++ /dev/null
@@ -1,4 +0,0 @@
-describe 'editor/level/systems_tab', ->
-  SystemsTabView = require 'views/editor/level/systems_tab_view'
-
-  it 'does stuff', ->
diff --git a/test/app/views/editor/thangs_tab_view.spec.coffee b/test/app/views/editor/thangs_tab_view.spec.coffee
deleted file mode 100644
index e95a2e9eb..000000000
--- a/test/app/views/editor/thangs_tab_view.spec.coffee
+++ /dev/null
@@ -1,4 +0,0 @@
-describe 'editor/level/thangs_tab', ->
-  ThangsTabView = require 'views/editor/level/thangs_tab_view'
-
-  it 'does stuff', ->
diff --git a/test/app/views/home_view.spec.coffee b/test/app/views/home_view.spec.coffee
new file mode 100644
index 000000000..e69de29bb
diff --git a/test/app/views/modal/AuthModalView.spec.coffee b/test/app/views/modal/AuthModalView.spec.coffee
new file mode 100644
index 000000000..01bd1b98e
--- /dev/null
+++ b/test/app/views/modal/AuthModalView.spec.coffee
@@ -0,0 +1,12 @@
+AuthModalView = require 'views/modal/auth_modal'
+RecoverModalView = require 'views/modal/recover_modal'
+
+describe 'AuthModalView', ->
+  it 'opens the recover modal when you click the recover link', ->
+    m = new AuthModalView()
+    m.render()
+    spyOn(m, 'openModalView')
+    m.$el.find('#link-to-recover').click()
+    expect(m.openModalView.calls.count()).toEqual(1)
+    args = m.openModalView.calls.argsFor(0)
+    expect(args[0] instanceof RecoverModalView).toBeTruthy()
diff --git a/test/app/views/play/ladder/ladder_tab.spec.coffee b/test/app/views/play/ladder/ladder_tab.spec.coffee
new file mode 100644
index 000000000..0f74b341b
--- /dev/null
+++ b/test/app/views/play/ladder/ladder_tab.spec.coffee
@@ -0,0 +1,18 @@
+LadderTabView = require 'views/play/ladder/ladder_tab'
+Level = require 'models/Level'
+fixtures = require 'test/app/fixtures/levels'
+
+describe 'LeaderboardData', ->
+  it 'triggers "sync" when its request is finished', ->
+    level = new Level(fixtures.LadderLevel)
+    leaderboard = new LadderTabView.LeaderboardData(level, 'humans', null, 4)
+    leaderboard.fetch()
+
+    # no session passed in, so only one request
+    expect(jasmine.Ajax.requests.count()).toBe(1)
+
+    request = jasmine.Ajax.requests.mostRecent()
+    triggered = false
+    leaderboard.once 'sync', -> triggered = true
+    request.response({status: 200, responseText: '{}'})
+    expect(triggered).toBe(true)
diff --git a/test/demo/views/editor/PatchesView.demo.coffee b/test/demo/views/editor/PatchesView.demo.coffee
new file mode 100644
index 000000000..cf2ee2480
--- /dev/null
+++ b/test/demo/views/editor/PatchesView.demo.coffee
@@ -0,0 +1,41 @@
+PatchesView = require 'views/editor/patches_view'
+CocoModel = require 'models/CocoModel'
+
+class BlandModel extends CocoModel
+  @className: 'Bland'
+  @schema: {
+    type: 'object'
+    additionalProperties: false
+    properties:
+      number: {type: 'number'}
+      object: {type: 'object'}
+      string: {type: 'string'}
+      _id: {type: 'string'}
+  }
+  urlRoot: '/db/bland'
+
+module.exports = ->
+  model = new BlandModel({_id: '12345', name: 'name', original: 'original'})
+  v = new PatchesView(model)
+  v.load()
+
+  # Respond to request for pending patches.
+  r = jasmine.Ajax.requests.mostRecent()
+  patches = [
+    {
+      delta: null
+      commitMessage: 'Demo message'
+      creator: '12345'
+      created: '2014-01-01T12:00:00.000Z'
+      status: 'pending'
+    }
+  ]
+  r.response({status: 200, responseText: JSON.stringify patches})
+
+  # Respond to request for user ids -> names
+  r = jasmine.Ajax.requests.mostRecent()
+  names = {'12345': {name: 'Patchman'}}
+  r.response({status: 200, responseText: JSON.stringify names})
+
+  v.render()
+  v
diff --git a/test/server/common.coffee b/test/server/common.coffee
index dc01d8389..fa1b04f4c 100644
--- a/test/server/common.coffee
+++ b/test/server/common.coffee
@@ -3,18 +3,22 @@
 
 console.log 'IT BEGINS'
 
-require('jasmine-spec-reporter')
+require 'jasmine-spec-reporter'
 jasmine.getEnv().reporter.subReporters_ = []
 jasmine.getEnv().addReporter(new jasmine.SpecReporter({
   displaySuccessfulSpec: true,
   displayFailedSpec: true
   }))
-GLOBAL._ = require('lodash')
-_.str = require('underscore.string')
+
+rep = new jasmine.JsApiReporter()
+jasmine.getEnv().addReporter(rep)
+
+GLOBAL._ = require 'lodash'
+_.str = require 'underscore.string'
 _.mixin(_.str.exports())
 GLOBAL.mongoose = require 'mongoose'
 mongoose.connect('mongodb://localhost/coco_unittest')
-path = require('path')
+path = require 'path'
 GLOBAL.testing = true
 
 models_path = [
@@ -26,6 +30,8 @@ models_path = [
   '../../server/levels/thangs/LevelThangType'
   '../../server/users/User'
   '../../server/patches/Patch'
+  '../../server/achievements/Achievement'
+  '../../server/achievements/EarnedAchievement'
 ]
 
 for m in models_path
@@ -61,7 +67,7 @@ GLOBAL.saveModels = (models, done) ->
   async.parallel funcs, (err, results) ->
     done(err)
 
-GLOBAL.simplePermissions = [target:'public', access:'owner']
+GLOBAL.simplePermissions = [target: 'public', access: 'owner']
 GLOBAL.ObjectId = mongoose.Types.ObjectId
 GLOBAL.request = require 'request'
 
@@ -84,8 +90,8 @@ unittest.getUser = (name, email, password, done, force) ->
     request.get getURL('/auth/whoami'), ->
       req = request.post(getURL('/db/user'), (err, response, body) ->
         throw err if err
-        User.findOne({email:email}).exec((err, user) ->
-          user.set('permissions', if password is '80yqxpb38j' then [ 'admin' ] else [])
+        User.findOne({email: email}).exec((err, user) ->
+          user.set('permissions', if password is '80yqxpb38j' then ['admin'] else [])
           user.set('name', name)
           user.save (err) ->
             wrapUpGetUser(email, user, done)
@@ -149,3 +155,13 @@ _drop = (done) ->
     chunks = mongoose.connection.db.collection('media.chunks')
     chunks.remove {}, ->
       done()
+
+tickInterval = null
+tick = ->
+  # When you want jasmine-node to exit after running the tests,
+  # you have to close the connection first.
+  if rep.finished
+    mongoose.disconnect()
+    clearTimeout tickInterval
+
+tickInterval = setInterval tick, 1000
diff --git a/test/server/functional/achievement.spec.coffee b/test/server/functional/achievement.spec.coffee
new file mode 100644
index 000000000..e91538fd8
--- /dev/null
+++ b/test/server/functional/achievement.spec.coffee
@@ -0,0 +1,106 @@
+require '../common'
+
+unlockable =
+  name: 'Dungeon Arena Started'
+  description: 'Started playing Dungeon Arena.'
+  worth: 3
+  collection: 'level.session'
+  query: "{\"level.original\": \"dungeon-arena\"}"
+  userField: 'creator'
+
+repeatable =
+  name: 'Simulated'
+  description: 'Simulated Games.'
+  worth: 1
+  collection: 'User'
+  query: "{\"simulatedBy\": {\"$gt\": \"0\"}}"
+  userField: '_id'
+  proportionalTo: 'simulatedBy'
+
+url = getURL('/db/achievement')
+
+describe 'Achievement', ->
+  allowHeader = 'GET, POST, PUT, PATCH'
+
+  it 'preparing test: deleting all Achievements first', (done) ->
+    clearModels [Achievement, EarnedAchievement, LevelSession, User], (err) ->
+      expect(err).toBeNull()
+      done()
+
+  it 'can\'t be created by ordinary users', (done) ->
+    loginJoe ->
+      request.post {uri: url, json: unlockable}, (err, res, body) ->
+        expect(res.statusCode).toBe(403)
+        done()
+
+  it 'can\'t be updated by ordinary users', (done) ->
+    loginJoe ->
+      request.put {uri: url, json: unlockable}, (err, res, body) ->
+        expect(res.statusCode).toBe(403)
+
+        request {method: 'patch', uri: url, json: unlockable}, (err, res, body) ->
+          expect(res.statusCode).toBe(403)
+          done()
+
+  it 'can be created by admins', (done) ->
+    loginAdmin ->
+      request.post {uri: url, json: unlockable}, (err, res, body) ->
+        expect(res.statusCode).toBe(200)
+        unlockable._id = body._id
+
+        request.post {uri: url, json: repeatable}, (err, res, body) ->
+          expect(res.statusCode).toBe(200)
+          repeatable._id = body._id
+          done()
+
+  it 'can get all for ordinary users', (done) ->
+    loginJoe ->
+      request.get {uri: url, json: unlockable}, (err, res, body) ->
+        expect(res.statusCode).toBe(200)
+        expect(body.length).toBe(2)
+        done()
+
+  it 'can be read by ordinary users', (done) ->
+    loginJoe ->
+      request.get {uri: url + '/' + unlockable._id, json: unlockable}, (err, res, body) ->
+        expect(res.statusCode).toBe(200)
+        expect(body.name).toBe(unlockable.name)
+        done()
+
+  it 'can\'t be requested with HTTP HEAD method', (done) ->
+    loginJoe ->
+      request.head {uri: url + '/' + unlockable._id}, (err, res, body) ->
+        expect(res.statusCode).toBe(405)
+        expect(res.headers.allow).toBe(allowHeader)
+        done()
+
+  it 'can\'t be requested with HTTP DEL method', (done) ->
+    loginJoe ->
+      request.del {uri: url + '/' + unlockable._id}, (err, res, body) ->
+        expect(res.statusCode).toBe(405)
+        expect(res.headers.allow).toBe(allowHeader)
+        done()
+
+  it 'get schema', (done) ->
+    request.get {uri: url + '/schema'}, (err, res, body) ->
+      expect(res.statusCode).toBe(200)
+      body = JSON.parse(body)
+      expect(body.type).toBeDefined()
+      done()
+
+describe 'Achieving Achievements', ->
+
+  it 'allows users to unlock one-time Achievements', (done) ->
+    loginJoe (joe) ->
+      levelSession =
+        creator: joe._id
+        level: original: 'dungeon-arena'
+
+      request.post {uri: getURL('/db/level.session'), json: levelSession}, (session) ->
+
+        done()
+
+  xit 'cleaning up test: deleting all Achievements and relates', (done) ->
+    clearModels [Achievement, EarnedAchievement, LevelSession], (err) ->
+      expect(err).toBeNull()
+      done()
diff --git a/test/server/functional/article.spec.coffee b/test/server/functional/article.spec.coffee
index a3973007b..e17f241ea 100644
--- a/test/server/functional/article.spec.coffee
+++ b/test/server/functional/article.spec.coffee
@@ -7,19 +7,21 @@ describe '/db/article', ->
       throw err if err
       done()
 
-  article = {name: 'Yo', body:'yo ma'}
+  article = {name: 'Yo', body: 'yo ma'}
+  article2 = {name: 'Original', body: 'yo daddy'}
+
   url = getURL('/db/article')
   articles = {}
 
   it 'does not allow non-admins to create Articles.', (done) ->
     loginJoe ->
-      request.post {uri:url, json:article}, (err, res, body) ->
+      request.post {uri: url, json: article}, (err, res, body) ->
         expect(res.statusCode).toBe(403)
         done()
 
   it 'allows admins to create Articles', (done) ->
     loginAdmin ->
-      request.post {uri:url, json:article}, (err, res, body) ->
+      request.post {uri: url, json: article}, (err, res, body) ->
         expect(res.statusCode).toBe(200)
         expect(body.slug).toBeDefined()
         expect(body.body).toBeDefined()
@@ -27,12 +29,23 @@ describe '/db/article', ->
         expect(body.original).toBeDefined()
         expect(body.creator).toBeDefined()
         articles[0] = body
-        done()
+
+        # Having two articles allow for testing article search and such
+        request.post {uri: url, json: article2}, (err, res, body) ->
+          expect(res.statusCode).toBe(200)
+          expect(body.slug).toBeDefined()
+          expect(body.body).toBeDefined()
+          expect(body.name).toBeDefined()
+          expect(body.original).toBeDefined()
+          expect(body.creator).toBeDefined()
+          articles[0] = body
+
+          done()
 
   it 'allows admins to make new minor versions', (done) ->
     new_article = _.clone(articles[0])
-    new_article.body = '...'
-    request.post {uri:url, json:new_article}, (err, res, body) ->
+    new_article.body = 'yo daddy'
+    request.post {uri: url, json: new_article}, (err, res, body) ->
       expect(res.statusCode).toBe(200)
       expect(body.version.major).toBe(0)
       expect(body.version.minor).toBe(1)
@@ -45,7 +58,7 @@ describe '/db/article', ->
   it 'allows admins to make new major versions', (done) ->
     new_article = _.clone(articles[1])
     delete new_article.version
-    request.post {uri:url, json:new_article}, (err, res, body) ->
+    request.post {uri: url, json: new_article}, (err, res, body) ->
       expect(res.statusCode).toBe(200)
       expect(body.version.major).toBe(1)
       expect(body.version.minor).toBe(0)
@@ -56,30 +69,29 @@ describe '/db/article', ->
 
   it 'grants access for regular users', (done) ->
     loginJoe ->
-      request.get {uri:url+'/'+articles[0]._id}, (err, res, body) ->
+      request.get {uri: url+'/'+articles[0]._id}, (err, res, body) ->
         body = JSON.parse(body)
         expect(res.statusCode).toBe(200)
         expect(body.body).toBe(articles[0].body)
         done()
-    
-  
+
   it 'does not allow regular users to make new versions', (done) ->
     new_article = _.clone(articles[2])
-    request.post {uri:url, json:new_article}, (err, res, body) ->
+    request.post {uri: url, json: new_article}, (err, res, body) ->
       expect(res.statusCode).toBe(403)
       done()
 
   it 'allows name changes from one version to the next', (done) ->
     loginAdmin ->
       new_article = _.clone(articles[0])
-      new_article.name = "Yo mama now is the larger"
-      request.post {uri:url, json:new_article}, (err, res, body) ->
+      new_article.name = 'Yo mama now is the larger'
+      request.post {uri: url, json: new_article}, (err, res, body) ->
         expect(res.statusCode).toBe(200)
         expect(body.name).toBe(new_article.name)
         done()
 
   it 'get schema', (done) ->
-    request.get {uri:url+'/schema'}, (err, res, body) ->
+    request.get {uri: url+'/schema'}, (err, res, body) ->
       expect(res.statusCode).toBe(200)
       body = JSON.parse(body)
       expect(body.type).toBeDefined()
@@ -87,9 +99,40 @@ describe '/db/article', ->
 
   it 'does not allow naming an article a reserved word', (done) ->
     loginAdmin ->
-      new_article = {name: 'Search', body:'is a reserved word'}
-      request.post {uri:url, json:new_article}, (err, res, body) ->
+      new_article = {name: 'Names', body: 'is a reserved word'}
+      request.post {uri: url, json: new_article}, (err, res, body) ->
         expect(res.statusCode).toBe(422)
         done()
-        
-       
\ No newline at end of file
+
+  it 'allows regular users to get all articles', (done) ->
+    loginJoe ->
+      request.get {uri: url, json: {}}, (err, res, body) ->
+        expect(res.statusCode).toBe(200)
+        expect(body.length).toBe(2)
+        done()
+
+  it 'allows regular users to get articles and use projection', (done) ->
+    loginJoe ->
+      # default projection
+      request.get {uri: url + '?project=true', json: {}}, (err, res, body) ->
+        expect(res.statusCode).toBe(200)
+        expect(body.length).toBe(2)
+        expect(body[0].created).toBeUndefined()
+        expect(body[0].version).toBeDefined()
+
+        # custom projection
+        request.get {uri: url + '?project=original', json: {}}, (err, res, body) ->
+          expect(res.statusCode).toBe(200)
+          expect(body.length).toBe(2)
+          expect(Object.keys(body[0]).length).toBe(2)
+          expect(body[0].original).toBeDefined()
+          done()
+
+  it 'allows regular users to perform a text search', (done) ->
+    loginJoe ->
+      request.get {uri: url + '?term="daddy"', json: {}}, (err, res, body) ->
+        expect(res.statusCode).toBe(200)
+        expect(body.length).toBe(1)
+        expect(body[0].name).toBe(article2.name)
+        expect(body[0].body).toBe(article2.body)
+        done()
diff --git a/test/server/functional/auth.spec.coffee b/test/server/functional/auth.spec.coffee
index 15ef44171..b5ef55878 100644
--- a/test/server/functional/auth.spec.coffee
+++ b/test/server/functional/auth.spec.coffee
@@ -6,9 +6,8 @@ urlLogin = getURL('/auth/login')
 urlReset = getURL('/auth/reset')
 
 describe '/auth/whoami', ->
-  http = require 'http'
   it 'returns 200', (done) ->
-    http.get(getURL('/auth/whoami'), (response) ->
+    request.get(getURL('/auth/whoami'), (err, response) ->
       expect(response).toBeDefined()
       expect(response.statusCode).toBe(200)
       done()
@@ -57,7 +56,7 @@ describe '/auth/login', ->
   it 'rejects wrong passwords', (done) ->
     req = request.post(urlLogin, (error, response) ->
       expect(response.statusCode).toBe(401)
-      expect(response.body.indexOf("wrong")).toBeGreaterThan(-1)
+      expect(response.body.indexOf('wrong')).toBeGreaterThan(-1)
       done()
     )
     form = req.form()
@@ -73,7 +72,6 @@ describe '/auth/login', ->
     form.append('username', 'scoTT@gmaIL.com')
     form.append('password', 'NaDa')
 
-
 describe '/auth/reset', ->
   passwordReset = ''
 
@@ -144,7 +142,7 @@ describe '/auth/unsubscribe', ->
       request.get getURL('/auth/whoami'), ->
         throw err if err
         done()
-  
+
   it 'removes just recruitment emails if you include ?recruitNotes=1', (done) ->
     loginJoe (joe) ->
       url = getURL('/auth/unsubscribe?recruitNotes=1&email='+joe.get('email'))
diff --git a/test/server/functional/db-id-version.spec.coffee b/test/server/functional/db-id-version.spec.coffee
index 81433f4b5..564715841 100644
--- a/test/server/functional/db-id-version.spec.coffee
+++ b/test/server/functional/db-id-version.spec.coffee
@@ -7,27 +7,27 @@ describe '/db/<id>/version', ->
       throw err if err
       done()
 
-  article = {name: 'Yo', body:'yo ma'}
+  article = {name: 'Yo', body: 'yo ma'}
   url = getURL('/db/article')
   articles = {}
 
   it 'sets up', (done) ->
     loginAdmin ->
-      request.post {uri:url, json:article}, (err, res, body) ->
+      request.post {uri: url, json: article}, (err, res, body) ->
         expect(res.statusCode).toBe(200)
         articles[0] = body
         new_article = _.clone(articles[0])
         new_article.body = '...'
-        request.post {uri:url, json:new_article}, (err, res, body) ->
+        request.post {uri: url, json: new_article}, (err, res, body) ->
           expect(res.statusCode).toBe(200)
           articles[1] = body
           new_article = _.clone(articles[1])
           delete new_article.version
-          request.post {uri:url, json:new_article}, (err, res, body) ->
+          request.post {uri: url, json: new_article}, (err, res, body) ->
             expect(res.statusCode).toBe(200)
             articles[2] = body
             done()
-            
+
   createVersionUrl = (versionString=null) ->
     original = articles[0]._id
     url = getURL("/db/article/#{original}/version")
@@ -36,7 +36,7 @@ describe '/db/<id>/version', ->
 
   it 'can fetch the latest absolute version', (done) ->
     baseUrl = createVersionUrl()
-    request.get {uri:baseUrl}, (err, res, body) ->
+    request.get {uri: baseUrl}, (err, res, body) ->
       body = JSON.parse(body)
       expect(res.statusCode).toBe(200)
       expect(body.version.major).toBe(1)
@@ -45,7 +45,7 @@ describe '/db/<id>/version', ->
 
   it 'can fetch the latest major version', (done) ->
     baseUrl = createVersionUrl('0')
-    request.get {uri:baseUrl}, (err, res, body) ->
+    request.get {uri: baseUrl}, (err, res, body) ->
       body = JSON.parse(body)
       expect(res.statusCode).toBe(200)
       expect(body.version.major).toBe(0)
@@ -54,15 +54,15 @@ describe '/db/<id>/version', ->
 
   it 'can fetch a particular version', (done) ->
     baseUrl = createVersionUrl('0.0')
-    request.get {uri:baseUrl}, (err, res, body) ->
+    request.get {uri: baseUrl}, (err, res, body) ->
       body = JSON.parse(body)
       expect(res.statusCode).toBe(200)
       expect(body.version.major).toBe(0)
       expect(body.version.minor).toBe(0)
       done()
-       
+
   it 'returns 404 when no doc is found', (done) ->
     baseUrl = createVersionUrl('3.14')
-    request.get {uri:baseUrl}, (err, res, body) ->
+    request.get {uri: baseUrl}, (err, res, body) ->
       expect(res.statusCode).toBe(404)
       done()
diff --git a/test/server/functional/file.spec.coffee b/test/server/functional/file.spec.coffee
index 0fb58ffd8..e7ad50702 100644
--- a/test/server/functional/file.spec.coffee
+++ b/test/server/functional/file.spec.coffee
@@ -1,12 +1,16 @@
 require '../common'
 
-describe '/file', ->
+# Doesn't work on Travis. Need to figure out why, probably by having the
+# url not depend on some external resource.
+
+xdescribe '/file', ->
   url = getURL('/file')
   files = []
   options = {
-    uri:url
+    uri: url
     json: {
-      url: 'http://scotterickson.info/images/where-are-you.jpg'
+      # url: 'http://scotterickson.info/images/where-are-you.jpg'
+      url: 'http://fc07.deviantart.net/fs37/f/2008/283/5/1/Chu_Chu_Pikachu_by_angelishi.gif'
       filename: 'where-are-you.jpg'
       mimetype: 'image/jpeg'
       description: 'None!'
@@ -20,9 +24,12 @@ describe '/file', ->
     filename: 'ittybitty.data'
     mimetype: 'application/octet-stream'
     description: 'rando-info'
-    my_buffer_url: 'http://scotterickson.info/images/where-are-you.jpg'
+    # my_buffer_url: 'http://scotterickson.info/images/where-are-you.jpg'
+    my_buffer_url: 'http://fc07.deviantart.net/fs37/f/2008/283/5/1/Chu_Chu_Pikachu_by_angelishi.gif'
   }
 
+  allowHeader = 'GET, POST'
+
   it 'preparing test : deletes all the files first', (done) ->
     dropGridFS ->
       done()
@@ -56,25 +63,25 @@ describe '/file', ->
     request.post(options, func)
 
   it 'can be read by an admin.', (done) ->
-    request.get {uri:url+'/'+files[0]._id}, (err, res) ->
+    request.get {uri: url+'/'+files[0]._id}, (err, res) ->
       expect(res.statusCode).toBe(200)
       expect(res.headers['content-type']).toBe(files[0].contentType)
       done()
 
   it 'returns 404 for missing files', (done) ->
     id = '000000000000000000000000'
-    request.get {uri:url+'/'+id}, (err, res) ->
+    request.get {uri: url+'/'+id}, (err, res) ->
       expect(res.statusCode).toBe(404)
       done()
 
   it 'returns 404 for invalid ids', (done) ->
-    request.get {uri:url+'/thiswillnotwork'}, (err, res) ->
+    request.get {uri: url+'/thiswillnotwork'}, (err, res) ->
       expect(res.statusCode).toBe(404)
       done()
 
   it 'can be created directly with form parameters', (done) ->
     options2 = {
-      uri:url
+      uri: url
     }
 
     func = (err, res, body) ->
@@ -105,7 +112,7 @@ describe '/file', ->
     form.append('my_buffer', request(jsonOptions.my_buffer_url))
 
   it 'created directly, can be read', (done) ->
-    request.get {uri:url+'/'+files[1]._id}, (err, res) ->
+    request.get {uri: url+'/'+files[1]._id}, (err, res) ->
       expect(res.statusCode).toBe(200)
       expect(res.headers['content-type']).toBe(files[1].contentType)
       done()
@@ -126,7 +133,7 @@ describe '/file', ->
     request.post(options, func)
 
   it 'does overwrite existing files if force is true', (done) ->
-    options.json.force = "true" # TODO ask why it's a string and not a boolean ?
+    options.json.force = 'true' # TODO ask why it's a string and not a boolean ?
 
     func = (err, res, body) ->
       expect(res.statusCode).toBe(200)
@@ -142,19 +149,28 @@ describe '/file', ->
 
     request.post(options, func)
 
-  it ' can\'t be requested with HTTP PUT method', (done) ->
-    request.put {uri:url}, (err, res) ->
+  it ' can\'t be requested with HTTP PATCH method', (done) ->
+    request {method: 'patch', uri: url}, (err, res) ->
       expect(res.statusCode).toBe(405)
+      expect(res.headers.allow).toBe(allowHeader)
+      done()
+
+  it ' can\'t be requested with HTTP PUT method', (done) ->
+    request.put {uri: url}, (err, res) ->
+      expect(res.statusCode).toBe(405)
+      expect(res.headers.allow).toBe(allowHeader)
       done()
 
   it ' can\'t be requested with HTTP HEAD method', (done) ->
-    request.head {uri:url}, (err, res) ->
+    request.head {uri: url}, (err, res) ->
       expect(res.statusCode).toBe(405)
+      expect(res.headers.allow).toBe(allowHeader)
       done()
 
   it ' can\'t be requested with HTTP DEL method', (done) ->
-    request.del {uri:url}, (err, res) ->
+    request.del {uri: url}, (err, res) ->
       expect(res.statusCode).toBe(405)
+      expect(res.headers.allow).toBe(allowHeader)
       done()
 
 # TODO: test server errors, see what they do
diff --git a/test/server/functional/folder.spec.coffee b/test/server/functional/folder.spec.coffee
new file mode 100644
index 000000000..e8ee823b2
--- /dev/null
+++ b/test/server/functional/folder.spec.coffee
@@ -0,0 +1,35 @@
+require '../common'
+
+describe 'folder', ->
+  url = getURL('/folder')
+  allowHeader = 'GET'
+
+  it 'can\'t be requested with HTTP POST method', (done) ->
+    request.post {uri: url}, (err, res, body) ->
+      expect(res.statusCode).toBe(405)
+      expect(res.headers.allow).toBe(allowHeader)
+      done()
+
+  it 'can\'t be requested with HTTP PUT method', (done) ->
+    request.put {uri: url}, (err, res, body) ->
+      expect(res.statusCode).toBe(405)
+      expect(res.headers.allow).toBe(allowHeader)
+      done()
+
+  it 'can\'t be requested with HTTP PATCH method', (done) ->
+    request {method: 'patch', uri: url}, (err, res, body) ->
+      expect(res.statusCode).toBe(405)
+      expect(res.headers.allow).toBe(allowHeader)
+      done()
+
+  it 'can\'t be requested with HTTP HEAD method', (done) ->
+    request.head {uri: url}, (err, res, body) ->
+      expect(res.statusCode).toBe(405)
+      expect(res.headers.allow).toBe(allowHeader)
+      done()
+
+  it 'can\'t be requested with HTTP DELETE method', (done) ->
+    request.del {uri: url}, (err, res, body) ->
+      expect(res.statusCode).toBe(405)
+      expect(res.headers.allow).toBe(allowHeader)
+      done()
diff --git a/test/server/functional/languages.spec.coffee b/test/server/functional/languages.spec.coffee
new file mode 100644
index 000000000..a42f71722
--- /dev/null
+++ b/test/server/functional/languages.spec.coffee
@@ -0,0 +1,35 @@
+require '../common'
+
+describe 'languages', ->
+  url = getURL('/languages')
+  allowHeader = 'GET'
+
+  it 'can\'t be requested with HTTP POST method', (done) ->
+    request.post {uri: url}, (err, res, body) ->
+      expect(res.statusCode).toBe(405)
+      expect(res.headers.allow).toBe(allowHeader)
+      done()
+
+  it 'can\'t be requested with HTTP PUT method', (done) ->
+    request.put {uri: url}, (err, res, body) ->
+      expect(res.statusCode).toBe(405)
+      expect(res.headers.allow).toBe(allowHeader)
+      done()
+
+  it 'can\'t be requested with HTTP PATCH method', (done) ->
+    request {method: 'patch', uri: url}, (err, res, body) ->
+      expect(res.statusCode).toBe(405)
+      expect(res.headers.allow).toBe(allowHeader)
+      done()
+
+  it 'can\'t be requested with HTTP HEAD method', (done) ->
+    request.head {uri: url}, (err, res, body) ->
+      expect(res.statusCode).toBe(405)
+      expect(res.headers.allow).toBe(allowHeader)
+      done()
+
+  it 'can\'t be requested with HTTP DELETE method', (done) ->
+    request.del {uri: url}, (err, res, body) ->
+      expect(res.statusCode).toBe(405)
+      expect(res.headers.allow).toBe(allowHeader)
+      done()
diff --git a/test/server/functional/level.spec.coffee b/test/server/functional/level.spec.coffee
index edd163d0d..41d394aae 100644
--- a/test/server/functional/level.spec.coffee
+++ b/test/server/functional/level.spec.coffee
@@ -3,12 +3,12 @@ require '../common'
 describe 'Level', ->
 
   level =
-    name: "King's Peak 3"
+    name: 'King\'s Peak 3'
     description: 'Climb a mountain.'
     permissions: simplePermissions
     scripts: []
     thangs: []
-    documentation: {specificArticles:[], generalArticles:[]}
+    documentation: {specificArticles: [], generalArticles: []}
 
   urlLevel = '/db/level'
 
@@ -19,12 +19,12 @@ describe 'Level', ->
 
   it 'can make a Level.', (done) ->
     loginJoe ->
-      request.post {uri:getURL(urlLevel), json:level}, (err, res, body) ->
+      request.post {uri: getURL(urlLevel), json: level}, (err, res, body) ->
         expect(res.statusCode).toBe(200)
         done()
 
   it 'get schema', (done) ->
-    request.get {uri:getURL(urlLevel+'/schema')}, (err, res, body) ->
+    request.get {uri: getURL(urlLevel+'/schema')}, (err, res, body) ->
       expect(res.statusCode).toBe(200)
       body = JSON.parse(body)
       expect(body.type).toBeDefined()
diff --git a/test/server/functional/level_component.spec.coffee b/test/server/functional/level_component.spec.coffee
index 9127ccefd..d34ec82cb 100644
--- a/test/server/functional/level_component.spec.coffee
+++ b/test/server/functional/level_component.spec.coffee
@@ -3,11 +3,11 @@ require '../common'
 describe 'LevelComponent', ->
 
   component =
-    name:'BashesEverything'
-    description:'Makes the unit uncontrollably bash anything bashable, using the bash system.'
+    name: 'BashesEverything'
+    description: 'Makes the unit uncontrollably bash anything bashable, using the bash system.'
     code: 'bash();'
-    language: 'coffeescript'
-    permissions:simplePermissions
+    codeLanguage: 'coffeescript'
+    permissions: simplePermissions
     propertyDocumentation: []
     system: 'ai'
     dependencies: []
@@ -23,19 +23,19 @@ describe 'LevelComponent', ->
 
   it 'can\'t be created by ordinary users.', (done) ->
     loginJoe ->
-      request.post {uri:url, json:component}, (err, res, body) ->
+      request.post {uri: url, json: component}, (err, res, body) ->
         expect(res.statusCode).toBe(403)
         done()
 
   it 'can be created by an admin.', (done) ->
     loginAdmin ->
-      request.post {uri:url, json:component}, (err, res, body) ->
+      request.post {uri: url, json: component}, (err, res, body) ->
         expect(res.statusCode).toBe(200)
         expect(body._id).toBeDefined()
         expect(body.name).toBe(component.name)
         expect(body.description).toBe(component.description)
         expect(body.code).toBe(component.code)
-        expect(body.language).toBe(component.language)
+        expect(body.codeLanguage).toBe(component.codeLanguage)
         expect(body.__v).toBe(0)
         expect(body.creator).toBeDefined()
         expect(body.original).toBeDefined()
@@ -47,13 +47,13 @@ describe 'LevelComponent', ->
 
   it 'have a unique name.', (done) ->
     loginAdmin ->
-      request.post {uri:url, json:component}, (err, res, body) ->
+      request.post {uri: url, json: component}, (err, res, body) ->
         expect(res.statusCode).toBe(409)
         done()
 
   it 'can be read by an admin.', (done) ->
     loginAdmin ->
-      request.get {uri:url+'/'+components[0]._id}, (err, res, body) ->
+      request.get {uri: url+'/'+components[0]._id}, (err, res, body) ->
         expect(res.statusCode).toBe(200)
         body = JSON.parse(body)
         expect(body._id).toBe(components[0]._id)
@@ -61,7 +61,7 @@ describe 'LevelComponent', ->
 
   it 'can be read by ordinary users.', (done) ->
     loginJoe ->
-      request.get {uri:url+'/'+components[0]._id}, (err, res, body) ->
+      request.get {uri: url+'/'+components[0]._id}, (err, res, body) ->
         expect(res.statusCode).toBe(200)
         body = JSON.parse(body)
         expect(body._id).toBe(components[0]._id)
@@ -69,7 +69,7 @@ describe 'LevelComponent', ->
         expect(body.slug).toBeDefined()
         expect(body.description).toBe(components[0].description)
         expect(body.code).toBe(components[0].code)
-        expect(body.language).toBe(components[0].language)
+        expect(body.codeLanguage).toBe(components[0].codeLanguage)
         expect(body.__v).toBe(0)
         expect(body.official).toBeDefined()
         expect(body.creator).toBeDefined()
@@ -85,7 +85,7 @@ describe 'LevelComponent', ->
 
   it 'is unofficial by default', (done) ->
     loginJoe ->
-      request.get {uri:url+'/'+components[0]._id}, (err, res, body) ->
+      request.get {uri: url+'/'+components[0]._id}, (err, res, body) ->
         expect(res.statusCode).toBe(200)
         body = JSON.parse(body)
         expect(body._id).toBe(components[0]._id)
@@ -94,24 +94,24 @@ describe 'LevelComponent', ->
 
   it 'has system ai by default', (done) ->
     loginJoe ->
-      request.get {uri:url+'/'+components[0]._id}, (err, res, body) ->
+      request.get {uri: url+'/'+components[0]._id}, (err, res, body) ->
         expect(res.statusCode).toBe(200)
         body = JSON.parse(body)
         expect(body._id).toBe(components[0]._id)
-        expect(body.system).toBe("ai")
+        expect(body.system).toBe('ai')
         done()
 
   it 'official property isn\'t editable by an ordinary user.', (done) ->
     components[0].official = true
     loginJoe ->
-      request.post {uri:url, json:components[0]}, (err, res, body) ->
+      request.post {uri: url, json: components[0]}, (err, res, body) ->
         expect(res.statusCode).toBe(403)
         done()
 
   it 'official property is editable by an admin.', (done) ->
     components[0].official = true
     loginAdmin ->
-      request.post {uri:url, json:components[0]}, (err, res, body) ->
+      request.post {uri: url, json: components[0]}, (err, res, body) ->
         expect(res.statusCode).toBe(200)
         expect(body.official).toBe(true)
         expect(body.original).toBe(components[0].original)
@@ -119,7 +119,7 @@ describe 'LevelComponent', ->
         expect(body.version.isLatestMajor).toBe(true)
         components[1] = body
 
-        request.get {uri:url+'/'+components[0]._id}, (err, res, body) ->
+        request.get {uri: url+'/'+components[0]._id}, (err, res, body) ->
           expect(res.statusCode).toBe(200)
           body = JSON.parse(body)
           expect(body._id).toBe(components[0]._id)
@@ -129,22 +129,22 @@ describe 'LevelComponent', ->
           done()
 
   xit ' can\'t be requested with HTTP PUT method', (done) ->
-    request.put {uri:url+'/'+components[0]._id}, (err, res) ->
-      expect(res.statusCode).toBe(404)
+    request.put {uri: url+'/'+components[0]._id}, (err, res) ->
+      expect(res.statusCode).toBe(405)
       done()
 
   it ' can\'t be requested with HTTP HEAD method', (done) ->
-    request.head {uri:url+'/'+components[0]._id}, (err, res) ->
-      expect(res.statusCode).toBe(404)
+    request.head {uri: url+'/'+components[0]._id}, (err, res) ->
+      expect(res.statusCode).toBe(405)
       done()
 
   it ' can\'t be requested with HTTP DEL method', (done) ->
-    request.del {uri:url+'/'+components[0]._id}, (err, res) ->
-      expect(res.statusCode).toBe(404)
+    request.del {uri: url+'/'+components[0]._id}, (err, res) ->
+      expect(res.statusCode).toBe(405)
       done()
 
   it 'get schema', (done) ->
-    request.get {uri:url+'/schema'}, (err, res, body) ->
+    request.get {uri: url+'/schema'}, (err, res, body) ->
       expect(res.statusCode).toBe(200)
       body = JSON.parse(body)
       expect(body.type).toBeDefined()
diff --git a/test/server/functional/level_feedback.spec.coffee b/test/server/functional/level_feedback.spec.coffee
index 95f4b6eb0..4cd0da0de 100644
--- a/test/server/functional/level_feedback.spec.coffee
+++ b/test/server/functional/level_feedback.spec.coffee
@@ -5,7 +5,7 @@ describe 'LevelFeedback', ->
   url = getURL('/db/level.feedback')
 
   it 'get schema', (done) ->
-    request.get {uri:url+'/schema'}, (err, res, body) ->
+    request.get {uri: url+'/schema'}, (err, res, body) ->
       expect(res.statusCode).toBe(200)
       body = JSON.parse(body)
       expect(body.type).toBeDefined()
diff --git a/test/server/functional/level_session.spec.coffee b/test/server/functional/level_session.spec.coffee
index aa8d99c7b..ba0265cf0 100644
--- a/test/server/functional/level_session.spec.coffee
+++ b/test/server/functional/level_session.spec.coffee
@@ -5,7 +5,7 @@ describe 'LevelFeedback', ->
   url = getURL('/db/level.session')
 
   it 'get schema', (done) ->
-    request.get {uri:url+'/schema'}, (err, res, body) ->
+    request.get {uri: url+'/schema'}, (err, res, body) ->
       expect(res.statusCode).toBe(200)
       body = JSON.parse(body)
       expect(body.type).toBeDefined()
diff --git a/test/server/functional/level_system.spec.coffee b/test/server/functional/level_system.spec.coffee
index 229c3a39d..7d5c1e488 100644
--- a/test/server/functional/level_system.spec.coffee
+++ b/test/server/functional/level_system.spec.coffee
@@ -3,14 +3,14 @@ require '../common'
 describe 'LevelSystem', ->
 
   system =
-    name:'Bashing'
-    description:'Performs Thang bashing updates for Bashes Thangs.'
+    name: 'Bashing'
+    description: 'Performs Thang bashing updates for Bashes Thangs.'
     code: """class Bashing extends System
       constructor: (world) ->
         super world
     """
-    language: 'coffeescript'
-    permissions:simplePermissions
+    codeLanguage: 'coffeescript'
+    permissions: simplePermissions
     dependencies: []
     propertyDocumentation: []
 
@@ -25,19 +25,19 @@ describe 'LevelSystem', ->
 
   it 'can\'t be created by ordinary users.', (done) ->
     loginJoe ->
-      request.post {uri:url, json:system}, (err, res, body) ->
+      request.post {uri: url, json: system}, (err, res, body) ->
         expect(res.statusCode).toBe(403)
         done()
 
   it 'can be created by an admin.', (done) ->
     loginAdmin ->
-      request.post {uri:url, json:system}, (err, res, body) ->
+      request.post {uri: url, json: system}, (err, res, body) ->
         expect(res.statusCode).toBe(200)
         expect(body._id).toBeDefined()
         expect(body.name).toBe(system.name)
         expect(body.description).toBe(system.description)
         expect(body.code).toBe(system.code)
-        expect(body.language).toBe(system.language)
+        expect(body.codeLanguage).toBe(system.codeLanguage)
         expect(body.__v).toBe(0)
         expect(body.creator).toBeDefined()
         expect(body.original).toBeDefined()
@@ -49,13 +49,13 @@ describe 'LevelSystem', ->
 
   it 'have a unique name.', (done) ->
     loginAdmin ->
-      request.post {uri:url, json:system}, (err, res, body) ->
+      request.post {uri: url, json: system}, (err, res, body) ->
         expect(res.statusCode).toBe(409)
         done()
 
   it 'can be read by an admin.', (done) ->
     loginAdmin ->
-      request.get {uri:url+'/'+systems[0]._id}, (err, res, body) ->
+      request.get {uri: url+'/'+systems[0]._id}, (err, res, body) ->
         expect(res.statusCode).toBe(200)
         body = JSON.parse(body)
         expect(body._id).toBe(systems[0]._id)
@@ -63,7 +63,7 @@ describe 'LevelSystem', ->
 
   it 'can be read by ordinary users.', (done) ->
     loginJoe ->
-      request.get {uri:url+'/'+systems[0]._id}, (err, res, body) ->
+      request.get {uri: url+'/'+systems[0]._id}, (err, res, body) ->
         expect(res.statusCode).toBe(200)
         body = JSON.parse(body)
         expect(body._id).toBe(systems[0]._id)
@@ -71,7 +71,7 @@ describe 'LevelSystem', ->
         expect(body.slug).toBeDefined()
         expect(body.description).toBe(systems[0].description)
         expect(body.code).toBe(systems[0].code)
-        expect(body.language).toBe(systems[0].language)
+        expect(body.codeLanguage).toBe(systems[0].codeLanguage)
         expect(body.__v).toBe(0)
         expect(body.official).toBeDefined()
         expect(body.creator).toBeDefined()
@@ -87,7 +87,7 @@ describe 'LevelSystem', ->
 
   it 'is unofficial by default', (done) ->
     loginJoe ->
-      request.get {uri:url+'/'+systems[0]._id}, (err, res, body) ->
+      request.get {uri: url+'/'+systems[0]._id}, (err, res, body) ->
         expect(res.statusCode).toBe(200)
         body = JSON.parse(body)
         expect(body._id).toBe(systems[0]._id)
@@ -97,14 +97,14 @@ describe 'LevelSystem', ->
   it 'official property isn\'t editable by an ordinary user.', (done) ->
     systems[0].official = true
     loginJoe ->
-      request.post {uri:url, json:systems[0]}, (err, res, body) ->
+      request.post {uri: url, json: systems[0]}, (err, res, body) ->
         expect(res.statusCode).toBe(403)
         done()
 
   it 'official property is editable by an admin.', (done) ->
     systems[0].official = true
     loginAdmin ->
-      request.post {uri:url, json:systems[0]}, (err, res, body) ->
+      request.post {uri: url, json: systems[0]}, (err, res, body) ->
         expect(res.statusCode).toBe(200)
         expect(body.official).toBe(true)
         expect(body.original).toBe(systems[0].original)
@@ -112,7 +112,7 @@ describe 'LevelSystem', ->
         expect(body.version.isLatestMajor).toBe(true)
         systems[1] = body
 
-        request.get {uri:url+'/'+systems[0]._id}, (err, res, body) ->
+        request.get {uri: url+'/'+systems[0]._id}, (err, res, body) ->
           expect(res.statusCode).toBe(200)
           body = JSON.parse(body)
           expect(body._id).toBe(systems[0]._id)
@@ -122,17 +122,17 @@ describe 'LevelSystem', ->
           done()
 
   it ' can\'t be requested with HTTP HEAD method', (done) ->
-    request.head {uri:url+'/'+systems[0]._id}, (err, res) ->
-      expect(res.statusCode).toBe(404)
+    request.head {uri: url+'/'+systems[0]._id}, (err, res) ->
+      expect(res.statusCode).toBe(405)
       done()
 
   it ' can\'t be requested with HTTP DEL method', (done) ->
-    request.del {uri:url+'/'+systems[0]._id}, (err, res) ->
-      expect(res.statusCode).toBe(404)
+    request.del {uri: url+'/'+systems[0]._id}, (err, res) ->
+      expect(res.statusCode).toBe(405)
       done()
 
   it 'get schema', (done) ->
-    request.get {uri:url+'/schema'}, (err, res, body) ->
+    request.get {uri: url+'/schema'}, (err, res, body) ->
       expect(res.statusCode).toBe(200)
       body = JSON.parse(body)
       expect(body.type).toBeDefined()
diff --git a/test/server/functional/level_thang_component.spec.coffee b/test/server/functional/level_thang_component.spec.coffee
index 75e334a7a..d3d7e46b4 100644
--- a/test/server/functional/level_thang_component.spec.coffee
+++ b/test/server/functional/level_thang_component.spec.coffee
@@ -5,7 +5,7 @@ describe 'Level Thang Component', ->
   url = getURL('/db/thang.component')
 
   it 'get schema', (done) ->
-    request.get {uri:url+'/schema'}, (err, res, body) ->
+    request.get {uri: url+'/schema'}, (err, res, body) ->
       expect(res.statusCode).toBe(200)
       body = JSON.parse(body)
       expect(body.type).toBeDefined()
diff --git a/test/server/functional/level_thang_type.spec.coffee b/test/server/functional/level_thang_type.spec.coffee
index 152514951..7d31d8747 100644
--- a/test/server/functional/level_thang_type.spec.coffee
+++ b/test/server/functional/level_thang_type.spec.coffee
@@ -5,7 +5,7 @@ describe 'Level Thang Type', ->
   url = getURL('/db/thang.type')
 
   it 'get schema', (done) ->
-    request.get {uri:url+'/schema'}, (err, res, body) ->
+    request.get {uri: url+'/schema'}, (err, res, body) ->
       expect(res.statusCode).toBe(200)
       body = JSON.parse(body)
       expect(body.type).toBeDefined()
diff --git a/test/server/functional/mail.spec.coffee b/test/server/functional/mail.spec.coffee
index 0910aab6f..87127865b 100644
--- a/test/server/functional/mail.spec.coffee
+++ b/test/server/functional/mail.spec.coffee
@@ -23,10 +23,10 @@ describe 'handleProfileUpdate', ->
     expect(u.isEmailSubscriptionEnabled('ambassadorNews')).toBeTruthy()
     expect(u.isEmailSubscriptionEnabled('artisanNews')).toBeTruthy()
     done()
-    
+
 describe 'handleUnsubscribe', ->
   it 'turns off all news and notifications', (done) ->
-    u = new User({generalNews: {enabled:true}, archmageNews: {enabled:true}, anyNotes: {enabled:true}})
+    u = new User({generalNews: {enabled: true}, archmageNews: {enabled: true}, anyNotes: {enabled: true}})
     mail.handleUnsubscribe(u)
     expect(u.isEmailSubscriptionEnabled('generalNews')).toBeFalsy()
     expect(u.isEmailSubscriptionEnabled('adventurerNews')).toBeFalsy()
diff --git a/test/server/functional/patch.spec.coffee b/test/server/functional/patch.spec.coffee
index 9d0f4265d..d75c3d2cf 100644
--- a/test/server/functional/patch.spec.coffee
+++ b/test/server/functional/patch.spec.coffee
@@ -7,7 +7,7 @@ describe '/db/patch', ->
       throw err if err
       done()
 
-  article = {name: 'Yo', body:'yo ma'}
+  article = {name: 'Yo', body: 'yo ma'}
   articleURL = getURL('/db/article')
   articles = {}
 
@@ -15,20 +15,20 @@ describe '/db/patch', ->
   patches = {}
   patch =
     commitMessage: 'Accept this patch!'
-    delta: {name:['test']}
+    delta: {name: ['test']}
     editPath: '/who/knows/yes'
     target:
-      id:null
+      id: null
       collection: 'article'
 
   it 'creates an Article to patch', (done) ->
     loginAdmin ->
-      request.post {uri:articleURL, json:article}, (err, res, body) ->
+      request.post {uri: articleURL, json: article}, (err, res, body) ->
         articles[0] = body
         patch.target.id = articles[0]._id
         done()
 
-  it "allows someone to submit a patch to something they don't control", (done) ->
+  it 'allows someone to submit a patch to something they don\'t control', (done) ->
     loginJoe (joe) ->
       request.post {uri: patchURL, json: patch}, (err, res, body) ->
         expect(res.statusCode).toBe(200)
@@ -40,23 +40,23 @@ describe '/db/patch', ->
         expect(body.creator).toBe(joe.id)
         patches[0] = body
         done()
-      
+
   it 'adds a patch to the target document', (done) ->
     Article.findOne({}).exec (err, article) ->
       expect(article.toObject().patches[0]).toBeDefined()
       done()
-      
+
   it 'shows up in patch requests', (done) ->
     patchesURL = getURL("/db/article/#{articles[0]._id}/patches")
     request.get {uri: patchesURL}, (err, res, body) ->
       body = JSON.parse(body)
       expect(res.statusCode).toBe(200)
       expect(body.length).toBe(1)
-      done() 
-      
+      done()
+
   it 'allows you to set yourself as watching', (done) ->
     watchingURL = getURL("/db/article/#{articles[0]._id}/watch")
-    request.put {uri: watchingURL, json: {on:true}}, (err, res, body) ->
+    request.put {uri: watchingURL, json: {on: true}}, (err, res, body) ->
       expect(body.watchers[1]).toBeDefined()
       done()
 
@@ -67,44 +67,44 @@ describe '/db/patch', ->
 
   it 'does not add duplicate watchers', (done) ->
     watchingURL = getURL("/db/article/#{articles[0]._id}/watch")
-    request.put {uri: watchingURL, json: {on:true}}, (err, res, body) ->
+    request.put {uri: watchingURL, json: {on: true}}, (err, res, body) ->
       expect(body.watchers.length).toBe(2)
       done()
-      
+
   it 'allows removing yourself', (done) ->
     watchingURL = getURL("/db/article/#{articles[0]._id}/watch")
-    request.put {uri: watchingURL, json: {on:false}}, (err, res, body) ->
+    request.put {uri: watchingURL, json: {on: false}}, (err, res, body) ->
       expect(body.watchers.length).toBe(1)
       done()
-      
+
   it 'allows the submitter to withdraw the pull request', (done) ->
     statusURL = getURL("/db/patch/#{patches[0]._id}/status")
-    request.put {uri: statusURL, json: {status:'withdrawn'}}, (err, res, body) ->
+    request.put {uri: statusURL, json: {status: 'withdrawn'}}, (err, res, body) ->
       expect(res.statusCode).toBe(200)
       Patch.findOne({}).exec (err, article) ->
         expect(article.get('status')).toBe 'withdrawn'
         Article.findOne({}).exec (err, article) ->
           expect(article.toObject().patches.length).toBe(0)
           done()
-  
+
   it 'does not allow the submitter to reject or accept the pull request', (done) ->
     statusURL = getURL("/db/patch/#{patches[0]._id}/status")
-    request.put {uri: statusURL, json: {status:'rejected'}}, (err, res, body) ->
+    request.put {uri: statusURL, json: {status: 'rejected'}}, (err, res, body) ->
       expect(res.statusCode).toBe(403)
-      request.put {uri: statusURL, json: {status:'accepted'}}, (err, res, body) ->
+      request.put {uri: statusURL, json: {status: 'accepted'}}, (err, res, body) ->
         expect(res.statusCode).toBe(403)
         Patch.findOne({}).exec (err, article) ->
           expect(article.get('status')).toBe 'withdrawn'
           done()
-  
+
   it 'allows the recipient to accept or reject the pull request', (done) ->
     statusURL = getURL("/db/patch/#{patches[0]._id}/status")
     loginAdmin ->
-      request.put {uri: statusURL, json: {status:'rejected'}}, (err, res, body) ->
+      request.put {uri: statusURL, json: {status: 'rejected'}}, (err, res, body) ->
         expect(res.statusCode).toBe(200)
         Patch.findOne({}).exec (err, article) ->
           expect(article.get('status')).toBe 'rejected'
-          request.put {uri: statusURL, json: {status:'accepted'}}, (err, res, body) ->
+          request.put {uri: statusURL, json: {status: 'accepted'}}, (err, res, body) ->
             expect(res.statusCode).toBe(200)
             Patch.findOne({}).exec (err, article) ->
               expect(article.get('status')).toBe 'accepted'
@@ -112,8 +112,8 @@ describe '/db/patch', ->
 
   it 'does not allow the recipient to withdraw the pull request', (done) ->
     statusURL = getURL("/db/patch/#{patches[0]._id}/status")
-    request.put {uri: statusURL, json: {status:'withdrawn'}}, (err, res, body) ->
+    request.put {uri: statusURL, json: {status: 'withdrawn'}}, (err, res, body) ->
       expect(res.statusCode).toBe(403)
       Patch.findOne({}).exec (err, article) ->
         expect(article.get('status')).toBe 'accepted'
-        done()
\ No newline at end of file
+        done()
diff --git a/test/server/functional/queue.spec.coffee b/test/server/functional/queue.spec.coffee
new file mode 100644
index 000000000..a290168fa
--- /dev/null
+++ b/test/server/functional/queue.spec.coffee
@@ -0,0 +1,23 @@
+require '../common'
+
+describe 'queue', ->
+  someURL = getURL('/queue/')
+  allowHeader = 'GET, POST, PUT'
+
+  xit 'can\'t be requested with HTTP PATCH method', (done) ->
+    request {method: 'patch', uri: someURL}, (err, res, body) ->
+      expect(res.statusCode).toBe(405)
+      expect(res.headers.allow).toBe(allowHeader)
+      done()
+
+  xit 'can\'t be requested with HTTP HEAD method', (done) ->
+    request.head {uri: someURL}, (err, res, body) ->
+      expect(res.statusCode).toBe(405)
+      expect(res.headers.allow).toBe(allowHeader)
+      done()
+
+  xit 'can\'t be requested with HTTP DELETE method', (done) ->
+    request.del {uri: someURL}, (err, res, body) ->
+      expect(res.statusCode).toBe(405)
+      expect(res.headers.allow).toBe(allowHeader)
+      done()
diff --git a/test/server/functional/user.spec.coffee b/test/server/functional/user.spec.coffee
index 03a88242d..5395566a4 100644
--- a/test/server/functional/user.spec.coffee
+++ b/test/server/functional/user.spec.coffee
@@ -5,7 +5,7 @@ User = require '../../../server/users/User'
 urlUser = '/db/user'
 
 describe 'Server user object', ->
-  
+
   it 'uses the schema defaults to fill in email preferences', (done) ->
     user = new User()
     expect(user.isEmailSubscriptionEnabled('generalNews')).toBeTruthy()
@@ -25,9 +25,9 @@ describe 'Server user object', ->
     user = new User()
     user.set 'emailSubscriptions', ['tester']
     user.setEmailSubscription('artisanNews', true)
-    expect(JSON.stringify(user.get('emailSubscriptions'))).toBe(JSON.stringify(['tester','level_creator']))
+    expect(JSON.stringify(user.get('emailSubscriptions'))).toBe(JSON.stringify(['tester', 'level_creator']))
     done()
-    
+
 describe 'User.updateMailChimp', ->
   makeMC = (callback) ->
     GLOBAL.mc =
@@ -39,7 +39,7 @@ describe 'User.updateMailChimp', ->
       expect(JSON.stringify(params.merge_vars.groupings[0].groups)).toBe(JSON.stringify(['Announcements']))
       done()
 
-    user = new User({emailSubscriptions:['announcement'], email:'tester@gmail.com'})
+    user = new User({emailSubscriptions: ['announcement'], email: 'tester@gmail.com'})
     User.updateMailChimp(user)
 
 describe 'POST /db/user', ->
@@ -53,7 +53,7 @@ describe 'POST /db/user', ->
             res = JSON.parse(response.body)
             expect(res.anonymous).toBeTruthy()
             expect(res.name).toEqual('Jim')
-            done() 
+            done()
         )
         form = req.form()
         form.append('name', 'Jim')
@@ -118,12 +118,12 @@ describe 'POST /db/user', ->
         request.get getURL('/auth/whoami'), ->
           req = request.post(getURL('/db/user'), (err, response) ->
             expect(response.statusCode).toBe(409)
-            done() 
+            done()
           )
           form = req.form()
           form.append('name', 'Jim')
 
-    req = request.post(getURL('/db/user'), (err,response,body) ->
+    req = request.post(getURL('/db/user'), (err, response, body) ->
       expect(response.statusCode).toBe(200)
       request.get getURL('/auth/whoami'), (request, response, body) ->
         res = JSON.parse(response.body)
@@ -134,7 +134,6 @@ describe 'POST /db/user', ->
     form.append('email', 'new@user.com')
     form.append('password', 'new')
 
-
 describe 'PUT /db/user', ->
 
   it 'logs in as normal joe', (done) ->
@@ -165,8 +164,8 @@ describe 'PUT /db/user', ->
         done()
       form = req.form()
       form.append('_id', joe.id)
-      form.append('email', "farghlarghlfarghlarghlfarghlarghlfarghlarghlfarghlarghlfarghlar
-ghlfarghlarghlfarghlarghlfarghlarghlfarghlarghlfarghlarghlfarghlarghlfarghlarghlfarghlarghl")
+      form.append('email', 'farghlarghlfarghlarghlfarghlarghlfarghlarghlfarghlarghlfarghlar
+ghlfarghlarghlfarghlarghlfarghlarghlfarghlarghlfarghlarghlfarghlarghlfarghlarghlfarghlarghl')
 
   it 'logs in as admin', (done) ->
     loginAdmin -> done()
@@ -178,7 +177,7 @@ ghlfarghlarghlfarghlarghlfarghlarghlfarghlarghlfarghlarghlfarghlarghlfarghlarghl
       done()
     form = req.form()
     form.append('_id', '513108d4cb8b610000000004')
-    form.append('email', "perfectly@good.com")
+    form.append('email', 'perfectly@good.com')
 
   it 'denies if the email being changed is already taken', (done) ->
     unittest.getNormalJoe (joe) ->
@@ -226,7 +225,7 @@ describe 'GET /db/user', ->
     form.append('password', '80yqxpb38j')
 
   it 'get schema', (done) ->
-    request.get {uri:getURL(urlUser+'/schema')}, (err, res, body) ->
+    request.get {uri: getURL(urlUser+'/schema')}, (err, res, body) ->
       expect(res.statusCode).toBe(200)
       body = JSON.parse(body)
       expect(body.type).toBeDefined()
diff --git a/test/server/integration/models/Level.spec.coffee b/test/server/integration/models/Level.spec.coffee
index 7cbc286d7..1067da955 100644
--- a/test/server/integration/models/Level.spec.coffee
+++ b/test/server/integration/models/Level.spec.coffee
@@ -3,7 +3,7 @@ require '../../common'
 describe 'Level', ->
 
   level = new Level(
-    name: "King's Peak"
+    name: 'King\'s Peak'
     description: 'Climb a mountain!!!'
     permissions: simplePermissions
     original: new ObjectId()
@@ -18,13 +18,3 @@ describe 'Level', ->
     level.save (err) ->
       throw err if err
       done()
-
-  it 'loads again after being saved', (done) ->
-    url = getURL('/db/level/'+level._id)
-    request.get url, (err, res, body) ->
-      expect(res.statusCode).toBe(200)
-      sameLevel = JSON.parse(body)
-      expect(sameLevel.name).toEqual(level.get 'name')
-      expect(sameLevel.description).toEqual(level.get 'description')
-      expect(sameLevel.permissions).toEqual(simplePermissions)
-      done()
diff --git a/test/server/integration/models/LevelComponent.spec.coffee b/test/server/integration/models/LevelComponent.spec.coffee
index 90dc5779d..782721cd5 100644
--- a/test/server/integration/models/LevelComponent.spec.coffee
+++ b/test/server/integration/models/LevelComponent.spec.coffee
@@ -3,12 +3,12 @@ require '../../common'
 describe 'LevelComponent', ->
 
   raw =
-    name:'Bashes Everything'
-    description:'Makes the unit uncontrollably bash anything bashable, using the bash system.'
+    name: 'Bashes Everything'
+    description: 'Makes the unit uncontrollably bash anything bashable, using the bash system.'
     code: 'bash();'
-    language: 'javascript'
+    codeLanguage: 'javascript'
     official: true
-    permissions:simplePermissions
+    permissions: simplePermissions
 
   comp = new LevelComponent(raw)
 
@@ -21,4 +21,3 @@ describe 'LevelComponent', ->
     comp.save (err) ->
       expect(err).toBeNull()
       done()
-
diff --git a/test/server/integration/models/LevelSession.spec.coffee b/test/server/integration/models/LevelSession.spec.coffee
index ecfeefd32..1b3f6afd9 100644
--- a/test/server/integration/models/LevelSession.spec.coffee
+++ b/test/server/integration/models/LevelSession.spec.coffee
@@ -15,5 +15,3 @@ describe 'LevelSession', ->
     session.save (err) ->
       throw err if err
       done()
-
-
diff --git a/test/server/integration/models/LevelSystem.spec.coffee b/test/server/integration/models/LevelSystem.spec.coffee
index 39008f9f7..15cbbe474 100644
--- a/test/server/integration/models/LevelSystem.spec.coffee
+++ b/test/server/integration/models/LevelSystem.spec.coffee
@@ -3,15 +3,15 @@ require '../../common'
 describe 'LevelSystem', ->
 
   raw =
-    name:'Bashing'
-    description:'Performs Thang bashing updates for Bashes Thangs.'
+    name: 'Bashing'
+    description: 'Performs Thang bashing updates for Bashes Thangs.'
     code: """class Bashing extends System
       constructor: (world) ->
         super world
     """
-    language: 'coffeescript'
+    codeLanguage: 'coffeescript'
     official: true
-    permissions:simplePermissions
+    permissions: simplePermissions
 
   comp = new LevelSystem(raw)
 
diff --git a/test/server/integration/models/article.spec.coffee b/test/server/integration/models/article.spec.coffee
index 51ba6e423..6ce3fb047 100644
--- a/test/server/integration/models/article.spec.coffee
+++ b/test/server/integration/models/article.spec.coffee
@@ -8,6 +8,6 @@ describe 'Article', ->
       done()
 
   it 'can be saved', (done) ->
-    article = new Article(name:'List Comprehension', body:"A programmer's best friend.")
+    article = new Article(name: 'List Comprehension', body: "A programmer's best friend.")
     article.save (err) ->
-      done()
\ No newline at end of file
+      done()
diff --git a/test/server/integration/models/plugins.spec.coffee b/test/server/integration/models/plugins.spec.coffee
index b01c74ef5..e7921fba7 100644
--- a/test/server/integration/models/plugins.spec.coffee
+++ b/test/server/integration/models/plugins.spec.coffee
@@ -3,7 +3,7 @@ require '../../common'
 describe 'NamePlugin', ->
 
   article = new Article(
-    name: "Alpha"
+    name: 'Alpha'
     body: 'What does it mean?'
   )
 
@@ -19,17 +19,17 @@ describe 'NamePlugin', ->
 
   it 'does not allow name conflicts', (done) ->
     c2 = new Article(
-      name: "Alpha"
+      name: 'Alpha'
       body: 'The misunderstood Greek character.'
     )
 
     c2.save (err) ->
       expect(err.code).toBe(409)
       done()
-      
+
   it 'prevents slugs from being valid ObjectIds', (done) ->
     c2 = new Article(
-      name: "522e0f149aaa330000000002"
+      name: '522e0f149aaa330000000002'
       body: '... fish.'
     )
 
@@ -37,7 +37,6 @@ describe 'NamePlugin', ->
       expect(err.code).toBe(422)
       done()
 
-
 describe 'VersionedPlugin', ->
   it 'clears things first', (done) ->
     clearModels [Article], (err) ->
@@ -45,43 +44,43 @@ describe 'VersionedPlugin', ->
       done()
 
   it 'can create new major versions', (done) ->
-    firstArticle = new Article(name:'List Comp1', body:"A programmer's best friend.")
+    firstArticle = new Article(name: 'List Comp1', body: "A programmer's best friend.")
     firstArticle.original = firstArticle._id
-  
+
     firstArticle.save (err) ->
       throw err if err
-  
+
       secondObject = firstArticle.toObject()
-      secondObject['body'] = "Not as good as lambda."
-  
+      secondObject['body'] = 'Not as good as lambda.'
+
       firstArticle.makeNewMajorVersion secondObject, (err, secondArticle) ->
         throw err if err
-  
+
         secondArticle.save (err) ->
           throw err if err
-  
+
           thirdObject = secondArticle.toObject()
-          thirdObject['body'] = "..."
-  
+          thirdObject['body'] = '...'
+
           secondArticle.makeNewMajorVersion thirdObject, (err, thirdArticle) ->
             throw err if err
-  
+
             thirdArticle.save ->
-  
-              Article.find {original:firstArticle.original}, (err, results) ->
+
+              Article.find {original: firstArticle.original}, (err, results) ->
                 expect(results.length).toBe(3)
                 expect(results[0].version.major).toBe(2)
                 expect(results[1].version.major).toBe(1)
                 expect(results[2].version.major).toBe(0)
-  
+
                 expect(results[0].version.minor).toBe(0)
                 expect(results[1].version.minor).toBe(0)
                 expect(results[2].version.minor).toBe(0)
-  
+
                 expect(results[2].version.isLatestMajor).toBe(false)
                 expect(results[1].version.isLatestMajor).toBe(false)
                 expect(results[0].version.isLatestMajor).toBe(true)
-  
+
                 expect(results[2].version.isLatestMinor).toBe(true)
                 expect(results[1].version.isLatestMinor).toBe(true)
                 expect(results[0].version.isLatestMinor).toBe(true)
@@ -91,63 +90,63 @@ describe 'VersionedPlugin', ->
                 expect(results[0].index).toBe(true)
 
                 done()
-  
+
   it 'works if you do not successfully save the new major version', (done) ->
-    firstArticle = new Article(name:'List Comp2', body:"A programmer's best friend.")
+    firstArticle = new Article(name: 'List Comp2', body: "A programmer's best friend.")
     firstArticle.original = firstArticle._id
-  
+
     firstArticle.save (err) ->
       throw err if err
-  
+
       secondObject = firstArticle.toObject()
-      secondObject['body'] = "Not as good as lambda."
-  
+      secondObject['body'] = 'Not as good as lambda.'
+
       firstArticle.makeNewMajorVersion secondObject, (err, forgottenSecondArticle) ->
         throw err if err
-  
+
         firstArticle.makeNewMajorVersion secondObject, (err, realSecondArticle) ->
           throw err if err
           expect(realSecondArticle.version.major).toBe(1)
           done()
-  
+
   it 'can create new minor versions', (done) ->
-    firstArticle = new Article(name:'List Comp3', body:"A programmer's best friend.")
+    firstArticle = new Article(name: 'List Comp3', body: "A programmer's best friend.")
     firstArticle.original = firstArticle._id
-  
+
     firstArticle.save (err) ->
       throw err if err
-  
+
       secondObject = firstArticle.toObject()
-      secondObject['body'] = "Not as good as lambda."
-  
+      secondObject['body'] = 'Not as good as lambda.'
+
       firstArticle.makeNewMinorVersion secondObject, 0, (err, secondArticle) ->
         throw err if err
-  
+
         secondArticle.save (err) ->
           throw err if err
-  
+
           thirdObject = secondArticle.toObject()
-          thirdObject['body'] = "..."
-  
+          thirdObject['body'] = '...'
+
           secondArticle.makeNewMinorVersion thirdObject, 0, (err, thirdArticle) ->
             throw err if err
-  
+
             thirdArticle.save ->
-  
-              Article.find {original:firstArticle.original}, (err, results) ->
+
+              Article.find {original: firstArticle.original}, (err, results) ->
                 expect(results.length).toBe(3)
                 expect(results[0].version.major).toBe(0)
                 expect(results[1].version.major).toBe(0)
                 expect(results[2].version.major).toBe(0)
-  
+
                 expect(results[2].version.minor).toBe(0)
                 expect(results[1].version.minor).toBe(1)
                 expect(results[0].version.minor).toBe(2)
-  
+
                 expect(results[2].version.isLatestMajor).toBe(false)
                 expect(results[1].version.isLatestMajor).toBe(false)
                 expect(results[0].version.isLatestMajor).toBe(true)
-  
+
                 expect(results[2].version.isLatestMinor).toBe(false)
                 expect(results[1].version.isLatestMinor).toBe(false)
                 expect(results[0].version.isLatestMinor).toBe(true)
@@ -157,38 +156,38 @@ describe 'VersionedPlugin', ->
                 expect(results[0].index).toBe(true)
 
                 done()
-  
+
   it 'works if you do not successfully save the new minor version', (done) ->
     firstArticle = new Article(
-      name:'List Comp4',
-      body:"A programmer's best friend."
+      name: 'List Comp4',
+      body: "A programmer's best friend."
       index: true
     )
     firstArticle.original = firstArticle._id
-  
+
     firstArticle.save (err) ->
       throw err if err
-  
+
       secondObject = firstArticle.toObject()
-      secondObject['body'] = "Not as good as lambda."
-  
+      secondObject['body'] = 'Not as good as lambda.'
+
       firstArticle.makeNewMinorVersion secondObject, 0, (err, forgottenSecondArticle) ->
         throw err if err
-  
+
         firstArticle.makeNewMinorVersion secondObject, 0, (err, realSecondArticle) ->
           throw err if err
           expect(realSecondArticle.version.minor).toBe(1)
           done()
 
   it 'works if you add a new minor version for an old major version', (done) ->
-    firstArticle = new Article(name:'List Comp4.5', body:"A programmer's best friend.")
+    firstArticle = new Article(name: 'List Comp4.5', body: "A programmer's best friend.")
     firstArticle.original = firstArticle._id
 
     firstArticle.save (err) ->
       throw err if err
 
       secondObject = firstArticle.toObject()
-      secondObject['body'] = "Not as good as lambda."
+      secondObject['body'] = 'Not as good as lambda.'
 
       firstArticle.makeNewMajorVersion secondObject, (err, secondArticle) ->
         throw err if err
@@ -197,47 +196,47 @@ describe 'VersionedPlugin', ->
           throw err if err
 
           thirdObject = secondArticle.toObject()
-          thirdObject['body'] = "..."
-          
+          thirdObject['body'] = '...'
+
           Article.findOne {_id: firstArticle._id}, (err, firstArticle) ->
-          
+
             firstArticle.makeNewMinorVersion thirdObject, 0, (err, thirdArticle) ->
               throw err if err
-  
+
               thirdArticle.save ->
-  
-                Article.find {original:firstArticle.original}, (err, results) ->
+
+                Article.find {original: firstArticle.original}, (err, results) ->
                   expect(results.length).toBe(3)
                   expect(results[2].version.major).toBe(0)
                   expect(results[1].version.major).toBe(0)
                   expect(results[0].version.major).toBe(1)
-  
+
                   expect(results[2].version.minor).toBe(0)
                   expect(results[1].version.minor).toBe(1)
                   expect(results[0].version.minor).toBe(0)
-  
+
                   expect(results[2].version.isLatestMajor).toBe(false)
                   expect(results[1].version.isLatestMajor).toBe(false)
                   expect(results[0].version.isLatestMajor).toBe(true)
-  
+
                   expect(results[2].version.isLatestMinor).toBe(false)
                   expect(results[1].version.isLatestMinor).toBe(true)
                   expect(results[0].version.isLatestMinor).toBe(true)
-                  
+
                   expect(results[2].index).toBeUndefined()
                   expect(results[1].index).toBeUndefined()
                   expect(results[0].index).toBe(true)
                   done()
-                  
+
   it 'only keeps slugs for the absolute latest versions', (done) ->
-    firstArticle = new Article(name:'List Comp4.6', body:"A programmer's best friend.")
+    firstArticle = new Article(name: 'List Comp4.6', body: "A programmer's best friend.")
     firstArticle.original = firstArticle._id
 
     firstArticle.save (err) ->
       throw err if err
 
       secondObject = firstArticle.toObject()
-      secondObject['body'] = "Not as good as lambda."
+      secondObject['body'] = 'Not as good as lambda.'
 
       firstArticle.makeNewMajorVersion secondObject, (err, secondArticle) ->
         throw err if err
@@ -246,7 +245,7 @@ describe 'VersionedPlugin', ->
           throw err if err
 
           thirdObject = secondArticle.toObject()
-          thirdObject['body'] = "..."
+          thirdObject['body'] = '...'
 
           Article.findOne {_id: firstArticle._id}, (err, firstArticle) ->
 
@@ -255,7 +254,7 @@ describe 'VersionedPlugin', ->
 
               thirdArticle.save ->
 
-                Article.find {original:firstArticle.original}, (err, results) ->
+                Article.find {original: firstArticle.original}, (err, results) ->
                   expect(results.length).toBe(3)
                   expect(results[2].slug).toBeUndefined()
                   expect(results[1].slug).toBeUndefined()
@@ -272,16 +271,16 @@ describe 'SearchablePlugin', ->
   it 'can do a text search', (done) ->
     # absolutely does not work at all if you don't save an article first
     firstArticle = new Article(
-      name:'List Comp5',
-      body:"A programmer's best friend.",
-      index:true
+      name: 'List Comp5',
+      body: "A programmer's best friend.",
+      index: true
     )
     firstArticle.original = firstArticle._id
 
     firstArticle.save (err) ->
       throw err if err
 
-      Article.textSearch 'best', {filter:{ index: true}}, (err, results) ->
+      Article.textSearch 'best', {filter: {index: true}}, (err, results) ->
         expect(err).toBeNull()
         if results
           expect(results.results.length).toBeGreaterThan(0)
@@ -289,16 +288,15 @@ describe 'SearchablePlugin', ->
           console.log('ERROR:', err)
         done()
 
-
   it 'keeps the index property up to date', (done) ->
-    firstArticle = new Article(name:'List Comp6', body:"A programmer's best friend.")
+    firstArticle = new Article(name: 'List Comp6', body: "A programmer's best friend.")
     firstArticle.original = firstArticle._id
 
     firstArticle.save (err) ->
       throw err if err
 
       secondObject = firstArticle.toObject()
-      secondObject['body'] = "Not as good as lambda."
+      secondObject['body'] = 'Not as good as lambda.'
 
       firstArticle.makeNewMinorVersion secondObject, 0, (err, secondArticle) ->
         throw err if err
@@ -307,7 +305,7 @@ describe 'SearchablePlugin', ->
           throw err if err
 
           thirdObject = secondArticle.toObject()
-          thirdObject['body'] = "..."
+          thirdObject['body'] = '...'
 
           secondArticle.makeNewMajorVersion thirdObject, (err, thirdArticle) ->
             throw err if err
@@ -315,16 +313,16 @@ describe 'SearchablePlugin', ->
             thirdArticle.save ->
               throw err if err
 
-              Article.find {original:firstArticle.original}, (err, results) ->
+              Article.find {original: firstArticle.original}, (err, results) ->
                 expect(results[2].index).toBeUndefined()
                 expect(results[1].index).toBeUndefined()
                 expect(results[0].index).toBe(true)
                 done()
 
   raw =
-    name:'Battlefield 1942'
-    description:'Vacation all over the world!'
-    permissions:[
-      target:'not_the_public'
-      access:'owner'
+    name: 'Battlefield 1942'
+    description: 'Vacation all over the world!'
+    permissions: [
+      target: 'not_the_public'
+      access: 'owner'
     ]
diff --git a/test/server/unit/user.spec.coffee b/test/server/unit/user.spec.coffee
index 00e1cba17..e5173146d 100644
--- a/test/server/unit/user.spec.coffee
+++ b/test/server/unit/user.spec.coffee
@@ -1,4 +1,4 @@
-GLOBAL._ = require('lodash')
+GLOBAL._ = require 'lodash'
 
 User = require '../../../server/users/User'
 
@@ -21,4 +21,3 @@ describe 'user', ->
     classicUser.set('permissions', ['user'])
     expect(classicUser.isAdmin()).toBeFalsy()
     done()
-
diff --git a/test/vendor/example.coffee b/test/vendor/example.coffee
index d055d440e..d08284dc1 100644
--- a/test/vendor/example.coffee
+++ b/test/vendor/example.coffee
@@ -1 +1 @@
-massivelyUsefulTestExample = "test..."
+massivelyUsefulTestExample = 'test...'
diff --git a/vendor/scripts/string_score.js b/vendor/scripts/string_score.js
index d282858bf..497b4b619 100644
--- a/vendor/scripts/string_score.js
+++ b/vendor/scripts/string_score.js
@@ -124,7 +124,7 @@
       //final_score = (word_score + abbreviation_score) / 2;
       final_score = ((abbreviation_score * (abbreviation_length / string_length)) + abbreviation_score) / 2;
       
-      final_score = final_score / fuzzies;
+      final_score /= fuzzies;
       
       if (start_of_string_bonus && (final_score + 0.15 < 1)) {
         final_score += 0.15;
diff --git a/vendor/styles/jasmine.css b/vendor/styles/jasmine.css
new file mode 100755
index 000000000..f4d35b6e7
--- /dev/null
+++ b/vendor/styles/jasmine.css
@@ -0,0 +1,55 @@
+body { background-color: #eeeeee; padding: 0; margin: 5px; overflow-y: scroll; }
+
+.html-reporter { font-size: 11px; font-family: Monaco, "Lucida Console", monospace; line-height: 14px; color: #333333; }
+.html-reporter a { text-decoration: none; }
+.html-reporter a:hover { text-decoration: underline; }
+.html-reporter p, .html-reporter h1, .html-reporter h2, .html-reporter h3, .html-reporter h4, .html-reporter h5, .html-reporter h6 { margin: 0; line-height: 14px; }
+.html-reporter .banner, .html-reporter .symbol-summary, .html-reporter .summary, .html-reporter .result-message, .html-reporter .spec .description, .html-reporter .spec-detail .description, .html-reporter .alert .bar, .html-reporter .stack-trace { padding-left: 9px; padding-right: 9px; }
+.html-reporter .banner .version { margin-left: 14px; }
+.html-reporter #jasmine_content { position: fixed; right: 100%; }
+.html-reporter .version { color: #aaaaaa; }
+.html-reporter .banner { margin-top: 14px; }
+.html-reporter .duration { color: #aaaaaa; float: right; }
+.html-reporter .symbol-summary { overflow: hidden; *zoom: 1; margin: 14px 0; }
+.html-reporter .symbol-summary li { display: inline-block; height: 8px; width: 14px; font-size: 16px; }
+.html-reporter .symbol-summary li.passed { font-size: 14px; }
+.html-reporter .symbol-summary li.passed:before { color: #5e7d00; content: "\02022"; }
+.html-reporter .symbol-summary li.failed { line-height: 9px; }
+.html-reporter .symbol-summary li.failed:before { color: #b03911; content: "x"; font-weight: bold; margin-left: -1px; }
+.html-reporter .symbol-summary li.disabled { font-size: 14px; }
+.html-reporter .symbol-summary li.disabled:before { color: #bababa; content: "\02022"; }
+.html-reporter .symbol-summary li.pending { line-height: 17px; }
+.html-reporter .symbol-summary li.pending:before { color: #ba9d37; content: "*"; }
+.html-reporter .exceptions { color: #fff; float: right; margin-top: 5px; margin-right: 5px; }
+.html-reporter .bar { line-height: 28px; font-size: 14px; display: block; color: #eee; }
+.html-reporter .bar.failed { background-color: #b03911; }
+.html-reporter .bar.passed { background-color: #a6b779; }
+.html-reporter .bar.skipped { background-color: #bababa; }
+.html-reporter .bar.menu { background-color: #fff; color: #aaaaaa; }
+.html-reporter .bar.menu a { color: #333333; }
+.html-reporter .bar a { color: white; }
+.html-reporter.spec-list .bar.menu.failure-list, .html-reporter.spec-list .results .failures { display: none; }
+.html-reporter.failure-list .bar.menu.spec-list, .html-reporter.failure-list .summary { display: none; }
+.html-reporter .running-alert { background-color: #666666; }
+.html-reporter .results { margin-top: 14px; }
+.html-reporter.showDetails .summaryMenuItem { font-weight: normal; text-decoration: inherit; }
+.html-reporter.showDetails .summaryMenuItem:hover { text-decoration: underline; }
+.html-reporter.showDetails .detailsMenuItem { font-weight: bold; text-decoration: underline; }
+.html-reporter.showDetails .summary { display: none; }
+.html-reporter.showDetails #details { display: block; }
+.html-reporter .summaryMenuItem { font-weight: bold; text-decoration: underline; }
+.html-reporter .summary { margin-top: 14px; }
+.html-reporter .summary ul { list-style-type: none; margin-left: 14px; padding-top: 0; padding-left: 0; }
+.html-reporter .summary ul.suite { margin-top: 7px; margin-bottom: 7px; }
+.html-reporter .summary li.passed a { color: #5e7d00; }
+.html-reporter .summary li.failed a { color: #b03911; }
+.html-reporter .summary li.pending a { color: #ba9d37; }
+.html-reporter .description + .suite { margin-top: 0; }
+.html-reporter .suite { margin-top: 14px; }
+.html-reporter .suite a { color: #333333; }
+.html-reporter .failures .spec-detail { margin-bottom: 28px; }
+.html-reporter .failures .spec-detail .description { background-color: #b03911; }
+.html-reporter .failures .spec-detail .description a { color: white; }
+.html-reporter .result-message { padding-top: 14px; color: #333333; white-space: pre; }
+.html-reporter .result-message span.result { display: block; }
+.html-reporter .stack-trace { margin: 5px 0 0 0; max-height: 224px; overflow: auto; line-height: 18px; color: #666666; border: 1px solid #ddd; background: white; white-space: pre; }